When run from a place other than the repo root, debugignore may say ignored files aren't really ignored. I originally thought it was always an issue from the sub directory, but it does pick up patterns without a path. It seems to want a path from the root of the repo regardless of cwd, but that isn't obvious from the help, nor is it consistent with file handling for other commands. STR: $ hg init r2 $ cd r2 $ cat >> .hgignore <<EOF > syntax: glob > **.c > dir/foo.b > EOF $ hg ci -Aqm hgignore $ mkdir dir $ touch dir/foo.c dir/foo.b OK from the root dir $ hg st -i I dir/foo.b I dir/foo.c $ hg debugignore dir/foo.c dir/foo.c is ignored (ignore rule in $TESTTMP\r2\.hgignore, line 2: '**.c') $ hg debugignore dir/foo.b dir/foo.b is ignored (ignore rule in $TESTTMP\r2\.hgignore, line 3: 'dir/foo.b') $ cd dir Path pattern is incorrect $ hg st -i I dir/foo.b I dir/foo.c $ hg debugignore foo.c foo.c is ignored (ignore rule in $TESTTMP\r2\.hgignore, line 2: '**.c') $ hg debugignore foo.b foo.b is not ignored Full path works as expected $ hg debugignore dir/foo.b dir/foo.b is ignored (ignore rule in $TESTTMP\r2\.hgignore, line 3: 'dir/foo.b')
Maybe debugignore have to use matcher.
Bug was inactive for 278 days, archiving
Fixed by https://mercurial-scm.org/repo/hg/rev/e9672de52a23 Matt Harbison <matt_harbison@yahoo.com> debugignore: eliminate inconsistencies with `hg status` (issue5222) Using a matcher for this command allows processing the named file(s) as relative to cwd. It also leverages the icasefs normalization logic the same way the status command does. (However, a false indicator is given for a nonexistent file in some cases, e.g. passing 'foo.REJ' when that file doesn't exist, and the rule is '*.rej'. Maybe the regex itself needs to be case insensitive on these platforms, at least for the debug command.) Finally, the file printed is relative to cwd and uses platform specific slashes, so a few (glob)s were needed in seemingly unrelated tests. (please test the fix)
Bug was set to TESTING for 11 days, resolving