[Bug 4331] New: Mercurial drops the trailing slash from relglob patterns

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Mon Aug 11 20:54:47 CDT 2014


http://bz.selenic.com/show_bug.cgi?id=4331

          Priority: normal
            Bug ID: 4331
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Mercurial drops the trailing slash from relglob
                    patterns
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: sid0 at fb.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 3.1
         Component: Mercurial
           Product: Mercurial

(in an empty directory)
$ hg init
$ cat > .hgignore <<EOF
syntax: glob
path1/
path2/
EOF
$ mkdir path1
$ touch path1/foo
$ touch path2
$ hg status
? .hgignore

I expect hg status to also print path2 because that's a file, not a directory,
and the pattern ends with a slash.

The problem is that we're calling util.normpath here:
http://selenic.com/hg/file/fff8e1cec90f/mercurial/match.py#l371 -- this drops
the trailing slash entirely.

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


More information about the Mercurial-devel mailing list