Largefiles broken?

Matt Harbison matt_harbison at yahoo.com
Fri Nov 16 20:30:29 CST 2012


Arne Babenhauserheide wrote:
> Am Donnerstag, 15. November 2012, 22:12:26 schrieb Matt Harbison:
>> dukeofgaming wrote:
>>> I think adding a "largefiles" option to these two commands could be more
>>> intuitive:
>>>
>>> hg add --largefiles
>>> hg addremove --largefiles
>>>
>>> Would this be possible?
>> I agree that having to explicitly add one of the files first is a bit
>> surprising and inconvenient, and even init --large doesn't completely
>> fix this because what if you want to opt in later?  But I don't think
>> this proposal will gain acceptance for a couple of reasons:
>
> Why not just as a config option to largefiles?
>
> [largefiles]
> assume_tracked_largefile = True
>
> All the calls would then change to
>
> hg --config largefiles.assume_tracked_largefile=True add/addremove/commit/…
>
> It would then also be possible to opt in for all repos by setting the config
> in the ~/.hgrc.

I could be wrong, but I was under the impression that the reason an 
explicit opt in was required was to prevent somebody from simply 
enabling the extension in the user level or global hgrc, along with a 
pattern or size, and unwittingly commit largefiles in a repo they didn't 
mean to.  So adding another option that could be put in the global or 
user config and cause the exact same problem undermines that safeguard.

Given a choice between that and just honoring the pattern as long as the 
extension is enabled, I would opt for the latter.  But I'm not sure that 
would be permitted, given that largefiles somewhat changes a DVCS to a 
CVCS (i.e. largefiles don't come along for the ride by default when 
pulling or cloning).

Maybe Matt, Natosha or someone else originally involved should weigh in. 
  I'd like to improve the situation, but I'm hoping there's a more 
elegant way.

--Matt


More information about the Mercurial-devel mailing list