diff mercurial/patch.py @ 11303:a1aad8333864

move working dir/dirstate methods from localrepo to workingctx
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 07 Jun 2010 20:03:32 +0200
parents 0429d0d49f92
children ad764a6a2eed
line wrap: on
line diff
--- 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: