bump: copy parent manifest before editting it stable
authorDurham Goode <durham@fb.com>
Mon, 12 Sep 2016 10:41:00 -0700
branchstable
changeset 1735 8f902ec9ed9a
parent 1718 54f40b722cf9
child 1736 c9a79b432907
child 1739 904ae1b2087b
bump: copy parent manifest before editting it Previously, the bump code would access the previous manifest, then edit that dictionary data structure. Because the manifest was in the mancache at that time, those edits were persisted to other readers who asked for that manifest. This caused commits being made during bump to have the wrong file parents in many situations (hence why the tests need updating).
README
hgext/evolve.py
tests/test-evolve.t
tests/test-stabilize-result.t
--- a/README	Mon Aug 01 22:42:38 2016 +0200
+++ b/README	Mon Sep 12 10:41:00 2016 -0700
@@ -56,6 +56,10 @@
 Changelog
 =========
 
+5.4.2 --
+
+ - Fix erroneous manifest computation when solving 'bumped' changeset.
+
 5.4.1 -- 2016-08-01
 
  - compat with Mercurial 3.9
--- a/hgext/evolve.py	Mon Aug 01 22:42:38 2016 +0200
+++ b/hgext/evolve.py	Mon Sep 12 10:41:00 2016 -0700
@@ -2014,7 +2014,7 @@
         repo.ui.status(_('computing new diff\n'))
         files = set()
         copied = copies.pathcopies(prec, bumped)
-        precmanifest = prec.manifest()
+        precmanifest = prec.manifest().copy()
         # 3.3.2 needs a list.
         # future 3.4 don't detect the size change during iteration
         # this is fishy
--- a/tests/test-evolve.t	Mon Aug 01 22:42:38 2016 +0200
+++ b/tests/test-evolve.t	Mon Sep 12 10:41:00 2016 -0700
@@ -377,8 +377,8 @@
   recreate:[8] another feature that rox
   atop:[7] another feature (child of ba0ec09b1bab)
   computing new diff
-  committed as 2d8c5414e9f0
-  working directory is now at 2d8c5414e9f0
+  committed as 6707c5e1c49d
+  working directory is now at 6707c5e1c49d
   $ hg glog
   @  9	feature-B: bumped update to 99833d22b0c6: - test
   |
@@ -437,7 +437,7 @@
   move:[11] dansk 3!
   atop:[14] dansk 2!
   merging main-file-1
-  working directory is now at 536984593824
+  working directory is now at 68557e4f0048
   $ hg glog
   @  15	: dansk 3! - test
   |
@@ -810,9 +810,9 @@
   2 changesets folded
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ glog
-  @  16:d1297ecc971f@default(draft) Folding with custom commit message
+  @  16:98cb758db56d@default(draft) Folding with custom commit message
   |
-  o  13:27b934eaf1f9@default(draft) dansk!
+  o  13:0a2f9b959bb4@default(draft) dansk!
   |
   o  7:99833d22b0c6@default(public) another feature (child of ba0ec09b1bab)
   |
@@ -829,7 +829,7 @@
   2 changesets folded
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg qlog
-  17 - 0b1eca0e871b A longer
+  17 - a00182c58888 A longer
                     commit message (draft)
   7 - 99833d22b0c6 another feature (child of ba0ec09b1bab) (public)
   6 - ba0ec09b1bab a nifty feature (public)
--- a/tests/test-stabilize-result.t	Mon Aug 01 22:42:38 2016 +0200
+++ b/tests/test-stabilize-result.t	Mon Sep 12 10:41:00 2016 -0700
@@ -176,10 +176,10 @@
   perform evolve? [Ny] y
   rebasing to destination parent: 66719795a494
   computing new diff
-  committed as (a7cabd7bd9c2|671b9d7eeaec) (re)
-  working directory is now at (a7cabd7bd9c2|671b9d7eeaec) (re)
+  committed as c2c1151aa854
+  working directory is now at c2c1151aa854
   $ glog
-  @  14:(a7cabd7bd9c2|671b9d7eeaec)@default\(draft\) bk:\[\] bumped update to 1cf0aacfd363: (re)
+  @  14:c2c1151aa854@default(draft) bk:[] bumped update to 1cf0aacfd363:
   |
   | o  9:7bc2f5967f5e@default(draft) bk:[] add c
   | |