# HG changeset patch # User Alexis S. L. Carvalho # Date 1174096100 10800 # Node ID 03a665f9f913b48fe8bfc9ae3edf8db786823c8b # Parent ec932167c3a7dcb99cb1c5ef5f93c6d88d2443fc util._matcher: use "." as the root of empty {rel,}path patterns Should fix issue332. Really. diff -r ec932167c3a7 -r 03a665f9f913 mercurial/util.py --- a/mercurial/util.py Sat Mar 10 23:01:02 2007 -0300 +++ b/mercurial/util.py Fri Mar 16 22:48:20 2007 -0300 @@ -492,7 +492,7 @@ roots.append(root) elif kind in ('relpath', 'path'): files.append((kind, name)) - roots.append(name) + roots.append(name or '.') elif kind == 'relglob': roots.append('.') return roots, pats + files, anypats diff -r ec932167c3a7 -r 03a665f9f913 tests/test-revert --- a/tests/test-revert Sat Mar 10 23:01:02 2007 -0300 +++ b/tests/test-revert Fri Mar 16 22:48:20 2007 -0300 @@ -89,4 +89,6 @@ hg ci -A -m b -d '1000001 0' echo foobar > b/b hg revert b +echo foobar > b/b +hg revert . true diff -r ec932167c3a7 -r 03a665f9f913 tests/test-revert.out --- a/tests/test-revert.out Sat Mar 10 23:01:02 2007 -0300 +++ b/tests/test-revert.out Fri Mar 16 22:48:20 2007 -0300 @@ -61,3 +61,4 @@ %% issue332 adding b/b reverting b/b +reverting b/b