scmutil: match no longer accepts repo objects
authorMatt Mackall <mpm@selenic.com>
Sat, 18 Jun 2011 16:52:51 -0500
changeset 14672 785bbc8634f8
parent 14671 35c2cc322ba8
child 14673 b0566467c492
scmutil: match no longer accepts repo objects
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Sat Jun 18 16:52:51 2011 -0500
+++ b/mercurial/scmutil.py	Sat Jun 18 16:52:51 2011 -0500
@@ -558,18 +558,12 @@
         ret.append(p)
     return ret
 
-def match(ctxorrepo, pats=[], opts={}, globbed=False, default='relpath'):
+def match(ctx, pats=[], opts={}, globbed=False, default='relpath'):
     if pats == ("",):
         pats = []
     if not globbed and default == 'relpath':
         pats = expandpats(pats or [])
 
-    if hasattr(ctxorrepo, 'match'):
-        ctx = ctxorrepo
-    else:
-        # will eventually abort here
-        ctx = ctxorrepo[None]
-
     m = ctx.match(pats, opts.get('include'), opts.get('exclude'),
                          default)
     def badfn(f, msg):