Let "hg add" do nothing

Mark A. Flacy mflacy at verizon.net
Wed Aug 22 09:01:58 CDT 2007


On 2007.08.22 06:00, Neal Becker wrote:
> Steffen Kaiser wrote:
> 
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >> Hello,
> >> is there a way to let have
> >> $ hg add
> >> (no arguments)
> >> do nothing, but display the help or something harmless like that?
> >> The default of "If no names are given, add all files in the  
> repository."
> > really bugs me.
> >
> I brought up the same issue before.  I find the current behavior  
> strange,
> surprising, and harmful.
> 
> I vote +1 that hg should consistently treat all instances of 'hg  
> [whatever]'
> with no argument as a noop.  When we want to recursively operate, we  
> should
> use 'hg [whatever] [dir]', as in 'hg add .'.  In addition, commands  
> that
> currently take a possible directory argument, such as add, ci, should  
> not
> operate on a parent of the cwd unless explicitly asked to.

-1

This new behavior would annoy me.

The Windows people, however, would probably like a command to undo the  
last add.  The Linux/Unix people would probably also like such command,  
but it's more important to have when grep isn't available.

-- 
Mark A. Flacy



More information about the Mercurial mailing list