Largefiles broken?

Matt Harbison matt_harbison at yahoo.com
Thu Nov 15 21:12:26 CST 2012


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:

   1) 'hg add' already has a --large option, so adding a similar looking 
--largefiles option is bound to be confusing to most users.

   2) If you add this option to 'hg addremove' then it probably needs to 
be added to commit to support -A (which is basically 'hg addremove && hg 
commit').  But then it is only useful for commit with the -A option.

   3) This is really only useful for the initial add, because the 
pattern and size config is honored automatically after that.  That makes 
this option feel like clutter most of the time.

I'm not sure if it is possible to detect where the size and pattern 
config comes from (i.e. command line, global hgrc, project hgrc) by the 
time the command is being processed.  But if it can be detected, maybe 
specifying these on either the command line or the project hgrc should 
be considered opt in enough.  Those aren't picked up from clones or some 
external configuration, so somebody must have thought it was a good idea 
for the repo if present.

The other option is to support a tracked file that contains these 
options, similar to hgignore or hgeol.  I think bug 3245 is asking for 
this in part.

   http://bz.selenic.com/show_bug.cgi?id=3245


--Matt


More information about the Mercurial-devel mailing list