diff mercurial/cmdutil.py @ 4055:e37786b29bed

docopy: deal with globs on windows in a better way
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Tue, 30 Jan 2007 18:32:20 -0200
parents dec4eba7ccad
children 431f3c1d3a37 08d31e43592a f9bbcebcacea
line wrap: on
line diff
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -127,7 +127,7 @@ def make_file(repo, pat, node=None,
                               pathname),
                 mode)
 
-def matchpats(repo, pats=[], opts={}, head=''):
+def matchpats(repo, pats=[], opts={}, head='', globbed=False):
     cwd = repo.getcwd()
     if not pats and cwd:
         opts['include'] = [os.path.join(cwd, i)
@@ -136,10 +136,12 @@ def matchpats(repo, pats=[], opts={}, he
                            for x in opts.get('exclude', [])]
         cwd = ''
     return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'),
-                           opts.get('exclude'), head)
+                           opts.get('exclude'), head, globbed=globbed)
 
-def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None):
-    files, matchfn, anypats = matchpats(repo, pats, opts, head)
+def walk(repo, pats=[], opts={}, node=None, head='', badmatch=None,
+         globbed=False):
+    files, matchfn, anypats = matchpats(repo, pats, opts, head,
+                                        globbed=globbed)
     exact = dict.fromkeys(files)
     for src, fn in repo.walk(node=node, files=files, match=matchfn,
                              badmatch=badmatch):