2GB limit

Martin Pool mbp at canonical.com
Fri Oct 8 07:28:44 BST 2010


On 8 October 2010 17:19, Maritza Mendez <martitzam at gmail.com> wrote:
>
>
> On Thu, Oct 7, 2010 at 4:37 PM, Martin Pool <mbp at canonical.com> wrote:
>>
>> I think you could use a precommit hook to check this, and there is a
>> bug asking for a builtin feature to warn about committing large files.
>>  I think that would be quite useful, even if we had no size limits at
>> all.
>>
>
> Thanks for the push.  I have a shell of a very simple plugin started which
> adds 'bzr commit-limit [SIZE]' to get/set the maximum comittable filesize in
> megabytes and extends the builtin 'commit' with a pre-commit hook to
> actually enforce the limit.  I'd like to set SIZE separately for each
> branch.  I see various examples of caching per-branch conf data.  Would
> someone kindly point me to an existing canonical (no pun!) example of how
> per-branch persistent data should be saved and retrieved?

I would suggest that, rather than adding a command to set this, you
just put it in the config.  Then when vila's upcoming set/get config
commands land, they'll be able to manipulate this.  I would take a
setting like 'commit_file_size_limit' from the BranchConfig, which the
commit code should be able to obtain from the branch object.  I think
it would be reasonable to add a builtin default: I'm not sure what
size would be so large that you probably don't want to add it without
thinking: perhaps 10MB or 100MB?

-- 
Martin



More information about the bazaar mailing list