diff tests/test-merge-no-file-change.t @ 39148:46da52f4b820

commit: try hard to reuse p1 manifest if nothing changed This is all for commit reproducibility on "hg convert". With this change, p1 manifest is reused if ctx.files() *to be committed* is empty, and if new manifest entry is identical to p1. This is important property for "hg convert" since memctx.files() built from a convert source may be either a) more narrowed thanks to a committed ctx.files() which provides more accurate status, or b) containing redundant files because of sloppy filtering on e.g. octopus merge.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 07 Jul 2018 22:40:39 +0900
parents f0c2653ca706
children 8988e640a8ac
line wrap: on
line diff
--- a/tests/test-merge-no-file-change.t	Sun Aug 12 18:44:42 2018 +0900
+++ b/tests/test-merge-no-file-change.t	Sat Jul 07 22:40:39 2018 +0900
@@ -30,6 +30,7 @@
   $ hg ci --debug -m merge
   committing files:
   b
+  not reusing manifest (no file change in changelog, but manifest differs)
   committing manifest
   committing changelog
   updating the branch cache
@@ -136,12 +137,12 @@
   $ hg ci --debug -m merge
   committing files:
   b
-  committing manifest
+  reusing manifest form p1 (listed files actually unchanged)
   committing changelog
   updating the branch cache
-  committed changeset 3:4bfaad7f925b7f17f60524dc5d4e605f7bfbba3f
+  committed changeset 3:c8d50407916ef8a5a97cb6e36ca9bc844a6ee13e
   $ hg log -GTl
-  @    3:4bfaad7f925b p=2,1 m=3:a3a9fe23a5b8 f=[]
+  @    3:c8d50407916e p=2,1 m=2:36b69ba4b24b f=[]
   |\
   | o  2:99451f16b3f5 p=0,-1 m=2:36b69ba4b24b f=["b"]
   | |
@@ -155,16 +156,6 @@
 
   $ cd ..
   $ check_convert_identity flag-change-take-p1
-  3:c8d50407916e
-  *** BUG: hash changes on convert ***
-  o    3:c8d50407916e p=2,1 m=2:36b69ba4b24b f=[]
-  |\
-  | o  2:99451f16b3f5 p=0,-1 m=2:36b69ba4b24b f=["b"]
-  | |
-  o |  1:64d01526d4c2 p=0,-1 m=1:686dbf0aeca4 f=["b"]
-  |/
-  o  0:487a0a245cea p=-1,-1 m=0:8515d4bfda76 f=["a"]
-  
 
 An identical file added at both parents, but the flag differs. Take other:
 
@@ -226,6 +217,7 @@
   $ hg ci --debug -m merge
   committing files:
   c
+  not reusing manifest (no file change in changelog, but manifest differs)
   committing manifest
   committing changelog
   updating the branch cache
@@ -299,6 +291,7 @@
   $ hg ci --debug -m merge
   committing files:
   b
+  not reusing manifest (no file change in changelog, but manifest differs)
   committing manifest
   committing changelog
   updating the branch cache