diff hgext/histedit.py @ 19392:f6b047cf9272 stable

histedit: use base for computing renames when folding (issue3729) When a file was renamed in the very first changeset being histedited, the rename was not detected. Consider a history like this: 0 base: add a.txt 1 first: rename a.txt to b.txt 2 last: edit b.txt When 1 and 2 are edited, copies.pathcopies(first, last) correctly returns that nothing was renamed. We must instead use copies.pathcopies(first, last) to detect the initial rename.
author Martin Geisler <martin@geisler.net>
date Mon, 15 Jul 2013 15:04:42 +0200
parents 87bb53367633
children 33e1b2d4bdbc
line wrap: on
line diff
--- a/hgext/histedit.py	Mon Jul 15 13:20:39 2013 +0200
+++ b/hgext/histedit.py	Mon Jul 15 15:04:42 2013 +0200
@@ -247,7 +247,7 @@
         files.update(ctx.files())
 
     # Recompute copies (avoid recording a -> b -> a)
-    copied = copies.pathcopies(first, last)
+    copied = copies.pathcopies(base, last)
 
     # prune files which were reverted by the updates
     def samefile(f):