mercurial/scmutil.py
changeset 23533 891aaa7c0c70
parent 23481 94091ab9d112
child 23534 83bbedc16b3f
--- a/mercurial/scmutil.py	Wed Dec 10 23:46:47 2014 -0500
+++ b/mercurial/scmutil.py	Sun Nov 09 19:57:02 2014 -0500
@@ -713,13 +713,13 @@
     '''Return a matcher that will efficiently match exactly these files.'''
     return matchmod.exact(repo.root, repo.getcwd(), files)
 
-def addremove(repo, pats=[], opts={}, dry_run=None, similarity=None):
+def addremove(repo, matcher, opts={}, dry_run=None, similarity=None):
+    m = matcher
     if dry_run is None:
         dry_run = opts.get('dry_run')
     if similarity is None:
         similarity = float(opts.get('similarity') or 0)
-    # we'd use status here, except handling of symlinks and ignore is tricky
-    m = match(repo[None], pats, opts)
+
     rejected = []
     m.bad = lambda x, y: rejected.append(x)