mercurial/patch.py
changeset 11303 a1aad8333864
parent 11022 0429d0d49f92
child 11376 ad764a6a2eed
--- a/mercurial/patch.py	Thu Jun 03 23:18:18 2010 -0500
+++ b/mercurial/patch.py	Mon Jun 07 20:03:32 2010 +0200
@@ -1226,10 +1226,13 @@
             copies.append((gp.oldpath, gp.path))
         elif gp.op == 'DELETE':
             removes.add(gp.path)
+
+    wctx = repo[None]
     for src, dst in copies:
-        repo.copy(src, dst)
+        wctx.copy(src, dst)
     if (not similarity) and removes:
-        repo.remove(sorted(removes), True)
+        wctx.remove(sorted(removes), True)
+
     for f in patches:
         gp = patches[f]
         if gp and gp.mode: