diff hgsubversion/editor.py @ 496:5e0dfe59d4c3

copies: fix under-reporting of copies in hg
author Augie Fackler <durin42@gmail.com>
date Fri, 16 Oct 2009 19:09:25 -0400
parents fbc7cf4fd701
children cad864ed29de
line wrap: on
line diff
--- a/hgsubversion/editor.py
+++ b/hgsubversion/editor.py
@@ -278,8 +278,9 @@ class HgEditor(delta.Editor):
             parentid = self.meta.get_parent_revision(self.current.rev.revnum, branch)
             if parentid != revlog.nullid:
                 parentctx = self.repo.changectx(parentid)
-                if util.aresamefiles(parentctx, cp_f_ctx, copies.values()):
-                    self.current.copies.update(copies)
+                for k, v in copies.iteritems():
+                    if util.aresamefiles(parentctx, cp_f_ctx, [v]):
+                        self.current.copies.update({k: v})
         return path
 
     @ieditor