[issue416] -X -I dont override .hgignore rules

Brendan Cully brendan at kublai.com
Thu Nov 9 10:04:37 CST 2006


On Thursday, 09 November 2006 at 13:53, Sascha Wilde wrote:
> 
> New submission from Sascha Wilde <wilde at intevation.de>:
> 
> Following the rule that command line options take precedence over configuration
> files, a user (at least me) would expect the -I (--include) and -X (--exclude)
> options to override rules from the .hgignore file.
> 
> But they don't.
> 
> Example:
> % hg init
> % mkdir narf
> % touch narf/poit narf/zort
> % echo . >.hgignore
> % hg add -I . narf
> 
> Does nothing.  I would expect "-I ." to override the ignore all rule from
> .hgignore and thereby allow me to add the directory narf recursively.

I would rather not see this "fixed." Suppose .hgignore is configured
to ignore *.tmp, and you've added a bunch of files all over your
working dir but you only want to commit the ones in subdirectory
foo. With your proposed change it's somewhat painful to skip over
foo/**/*.tmp.


More information about the Mercurial-devel mailing list