diff hgext/evolve.py @ 1786:b674277ea4ef stable

uncommit: don't lose copy information of remaining files (issue5403) As reported in the issue, "hg uncommit" would lose copy information of the files that remained in the commit. The problem was simply that the a dict of copies was iterated as "src, dst in copies.items()" where it should have been "dst, src ...".
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 31 Jan 2017 12:32:45 -0800
parents c3741a5adbb0
children e553fc96447d
line wrap: on
line diff
--- a/hgext/evolve.py	Wed Jan 25 16:40:45 2017 +0100
+++ b/hgext/evolve.py	Tue Jan 31 12:32:45 2017 -0800
@@ -2687,7 +2687,7 @@
 
     # Filter copies
     copied = copies.pathcopies(target, ctx)
-    copied = dict((src, dst) for src, dst in copied.iteritems()
+    copied = dict((dst, src) for dst, src in copied.iteritems()
                   if dst in files)
     def filectxfn(repo, memctx, path, contentctx=ctx, redirect=newcontent):
         if path in redirect: