mercurial/util.py
changeset 4195 e8ee8fdeddb1
parent 4193 dd0d9bd91e0a
child 4197 492d0d5b6976
--- a/mercurial/util.py	Sat Mar 10 23:00:55 2007 -0300
+++ b/mercurial/util.py	Sat Mar 10 23:00:57 2007 -0300
@@ -382,10 +382,11 @@
     return _matcher(canonroot, cwd, names, inc, exc, head, 'glob', src)
 
 def cmdmatcher(canonroot, cwd='', names=[], inc=[], exc=[], head='',
-               src=None, globbed=False):
-    if not globbed:
+               src=None, globbed=False, default=None):
+    default = default or 'relpath'
+    if default == 'relpath' and not globbed:
         names = expand_glob(names)
-    return _matcher(canonroot, cwd, names, inc, exc, head, 'relpath', src)
+    return _matcher(canonroot, cwd, names, inc, exc, head, default, src)
 
 def _matcher(canonroot, cwd, names, inc, exc, head, dflt_pat, src):
     """build a function to match a set of file patterns