Commits

rcohen committed a402cd4

Fix handling of metadata operations add, remove, copy and rename.

  • Participants
  • Parent commits 5993732

Comments (0)

Files changed (1)

                 raise util.Abort(_('local changes found'))
         return m, a, r, d
 
-    def apply(self, repo, patch, sim, force=False, **opts):
+    def apply(self, repo, patchfile, sim, force=False, **opts):
         """applies a patch and manages repo and attic state"""
         self.check_localchanges(repo, force)
-        (success, files, fuzz) = self.patch(repo, patch)
+        (success, files, fuzz) = self.patch(repo, patchfile)
         if success:
             if files:
-                cmdutil.addremove(repo,
-                                  ['%s/%s' % (repo.root, f) for f in files],
-                                  opts, similarity = sim/100.)
-            self.applied = patch
-            self.currentpatch = patch
+                patch.updatedir(self.ui, repo, files, similarity = sim/100.)
+            self.applied = patchfile
+            self.currentpatch = patchfile
             self.persiststate()
         return success