mercurial/scmutil.py
changeset 16171 336e61875335
parent 16167 94a8396c9305
child 16208 85db991780b7
--- a/mercurial/scmutil.py	Sat Feb 25 21:51:13 2012 +0100
+++ b/mercurial/scmutil.py	Sat Feb 25 22:11:34 2012 +0100
@@ -579,7 +579,7 @@
         ret.append(p)
     return ret
 
-def match(ctx, pats=[], opts={}, globbed=False, default='relpath'):
+def matchandpats(ctx, pats=[], opts={}, globbed=False, default='relpath'):
     if pats == ("",):
         pats = []
     if not globbed and default == 'relpath':
@@ -590,7 +590,10 @@
     def badfn(f, msg):
         ctx._repo.ui.warn("%s: %s\n" % (m.rel(f), msg))
     m.bad = badfn
-    return m
+    return m, pats
+
+def match(ctx, pats=[], opts={}, globbed=False, default='relpath'):
+    return matchandpats(ctx, pats, opts, globbed, default)[0]
 
 def matchall(repo):
     return matchmod.always(repo.root, repo.getcwd())