Merge histedit fixes from stable.
authorAugie Fackler <raf@durin42.com>
Tue, 16 Jul 2013 11:13:18 -0500
changeset 19393 33e1b2d4bdbc
parent 19390 3af3a165db18 (current diff)
parent 19392 f6b047cf9272 (diff)
child 19394 4da845cd854f
Merge histedit fixes from stable.
hgext/histedit.py
--- a/hgext/histedit.py	Sat Jun 29 14:27:53 2013 +0400
+++ b/hgext/histedit.py	Tue Jul 16 11:13:18 2013 -0500
@@ -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):
--- a/tests/test-histedit-fold.t	Sat Jun 29 14:27:53 2013 +0400
+++ b/tests/test-histedit-fold.t	Tue Jul 16 11:13:18 2013 -0500
@@ -186,7 +186,7 @@
   $ hg commit -m '+5'
   $ echo 6 >> file
   $ hg commit -m '+6'
-  $ hg logt -G --template '{rev}:{node|short} {desc|firstline}\n'
+  $ hg logt -G
   @  3:251d831eeec5 +6
   |
   o  2:888f9082bf99 +5
@@ -266,3 +266,37 @@
   +6
   $ cd ..
 
+
+Folding with initial rename (issue3729)
+---------------------------------------
+
+  $ hg init fold-rename
+  $ cd fold-rename
+  $ echo a > a.txt
+  $ hg add a.txt
+  $ hg commit -m a
+  $ hg rename a.txt b.txt
+  $ hg commit -m rename
+  $ echo b >> b.txt
+  $ hg commit -m b
+
+  $ hg logt --follow b.txt
+  2:e0371e0426bc b
+  1:1c4f440a8085 rename
+  0:6c795aa153cb a
+
+  $ hg histedit 1c4f440a8085 --commands - 2>&1 << EOF | fixbundle
+  > pick 1c4f440a8085 rename
+  > fold e0371e0426bc b
+  > EOF
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  reverting b.txt
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg logt --follow b.txt
+  1:cf858d235c76 rename
+  0:6c795aa153cb a
+
+  $ cd ..