Possible bug in "status" command

Peter Williams pwil3058 at bigpond.net.au
Mon Mar 5 21:08:13 CST 2007


There's a discrepancy in the actual behaviour of the "i" option to the 
"status" command and the documentation.  Either the documentation is 
wrong or there is a bug in the status command.

The relevant part of the documentation reads:

  -A --all        show status of all files
  -m --modified   show only modified files
  -a --added      show only added files
  -r --removed    show only removed files
  -d --deleted    show only deleted (but tracked) files
  -c --clean      show only files without changes
  -u --unknown    show only unknown (not tracked) files
  -i --ignored    show ignored files

To me this clearly implies that the -i flag will cause ignored files to 
be ADDED to the files that would otherwise be displayed but in fact it 
causes ONLY ignored files to be shown.

It seems to me that the ADDED behaviour is the more desirable as it 
allows changed, not tracked and ignored files to be displayed with:

hg status -i

instead of the

hg status -mardui

which is currently required.  Of course, this would make display of ONLY 
ignored files impossible but I can't really imagine anybody wanting to 
do that.

Which is correct: the behaviour or the documentation?

Peter
-- 
Peter Williams                                   pwil3058 at bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce


More information about the Mercurial-devel mailing list