hg add default behaviour...

Brian Baker brian_e_baker at yahoo.com
Wed Aug 22 15:01:05 CDT 2007


+tan(90)

The way I see it 'hg add' with no arguments doesn't fit the principle
of least suprise. 

In fact being a newcomer to Mercurial I'd be very suprised if a bunch
of objects and other generated files got added to my repo all of a
sudden. If I do a 'hg add' in new directory I'd just made with a couple
of source files in, I wouldn't expect stuff from all over the
repository to get added.

I say hang backwards compatibility, and make the default behaviour
sane. 
Now is the time to do it as Mercurial hasn't got to version 1. I too
would like to know who relies on the wacky default behaviour of add.

Use:
hg add --repo[sitory] 

For a command line version of getting to the old behaviour, and give a
helpful message if no arguments are used with add.

I prefer --repository to --all, as all could be construde to mean all
files in the present directory.

If we really must maintain existing behaviour for the sake of backwards
compatibility use a .hg configuration flag to allow the 'extreme'
behaviour we have at the moment, please don't keep it as the default.

Brian


      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 


More information about the Mercurial mailing list