Patrick Mézard  committed 4d9e80f

editor: do not touch RevisionData copies from the editor

Copy source can be passed when adding the file to the revision data.

  • Participants
  • Parent commits febca88
  • Branches default

Comments (0)

Files changed (1)

File hgsubversion/

         self.externals = {}
         self.exception = None
-    def set(self, path, data, isexec=False, islink=False):
+    def set(self, path, data, isexec=False, islink=False, copypath=None):
         self.files[path] = data
         self.execfiles[path] = isexec
         self.symlinks[path] = islink
             del self.deleted[path]
         if path in self.missing:
+        if copypath is not None:
+            self.copies[path] = copypath
     def delete(self, path):
         self.deleted[path] = True
                     % file_baton)
         path, data, isexec, islink, copypath = self._openfiles.pop(file_baton)
         del self._openpaths[path]
-        self.current.set(path, data, isexec, islink)
-        if copypath is not None:
-            self.current.copies[path] = copypath
+        self.current.set(path, data, isexec, islink, copypath)
     def add_directory(self, path, parent_baton, copyfrom_path,
             ctx = self.repo[node]
             for path, copy in copies:
                 data, isexec, islink, copied = copy.resolve(self.repo, ctx)
-                self.current.set(path, data, isexec, islink)
-                self.current.copies[path] = copied
+                self.current.set(path, data, isexec, islink, copied)
         for f in self._deleted: