mercurial/cmdutil.py
changeset 36194 39b3aab6231e
parent 36141 62719115875d
child 36203 01280638bdb1
--- a/mercurial/cmdutil.py	Sun Feb 11 20:37:44 2018 +0100
+++ b/mercurial/cmdutil.py	Wed Feb 14 14:12:05 2018 +0100
@@ -2903,7 +2903,6 @@
     parent, p2 = parents
     node = ctx.node()
     excluded_files = []
-    matcher_opts = {"exclude": excluded_files}
 
     def checkout(f):
         fc = ctx[f]
@@ -2924,7 +2923,7 @@
             if choice == 0:
                 repo.dirstate.drop(f)
             else:
-                excluded_files.append(repo.wjoin(f))
+                excluded_files.append(f)
         else:
             repo.dirstate.drop(f)
     for f in actions['remove'][0]:
@@ -2935,7 +2934,7 @@
             if choice == 0:
                 doremove(f)
             else:
-                excluded_files.append(repo.wjoin(f))
+                excluded_files.append(f)
         else:
             doremove(f)
     for f in actions['drop'][0]:
@@ -2955,8 +2954,8 @@
     newlyaddedandmodifiedfiles = set()
     if interactive:
         # Prompt the user for changes to revert
-        torevert = [repo.wjoin(f) for f in actions['revert'][0]]
-        m = scmutil.match(ctx, torevert, matcher_opts)
+        torevert = [f for f in actions['revert'][0] if f not in excluded_files]
+        m = scmutil.matchfiles(repo, torevert)
         diffopts = patch.difffeatureopts(repo.ui, whitespace=True)
         diffopts.nodates = True
         diffopts.git = True