diff mercurial/util.py @ 4182:01c4ea5e788c

A 'glob:foo?bar' pattern determines a root - the tree root
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 10 Mar 2007 23:00:47 -0300
parents 51ee2868a571
children ce3ecf99a18b
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -469,7 +469,7 @@ def _matcher(canonroot, cwd, names, inc,
         for p in pat.split('/'):
             if contains_glob(p): break
             root.append(p)
-        return '/'.join(root)
+        return '/'.join(root) or '.'
 
     pats = []
     files = []
@@ -483,7 +483,7 @@ def _matcher(canonroot, cwd, names, inc,
             pats.append((kind, name))
         if kind == 'glob':
             root = globprefix(name)
-            if root: roots.append(root)
+            roots.append(root)
         elif kind == 'relpath':
             files.append((kind, name))
             roots.append(name)