[Bug 5222] New: debugignore and `status -i` don't always agree

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Thu Apr 28 19:37:49 UTC 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5222

            Bug ID: 5222
           Summary: debugignore and `status -i` don't always agree
           Product: Mercurial
           Version: 3.8-rc
          Hardware: PC
                OS: All
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at selenic.com
          Reporter: matt_harbison at yahoo.com
                CC: mercurial-devel at selenic.com

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')

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list