Mercurial > hg > mercurial-source
diff tests/test-graft.t @ 39897: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 | 5b04b6204931 |
children | 2f89a7defe62 |
line wrap: on
line diff
--- a/tests/test-graft.t +++ b/tests/test-graft.t @@ -699,8 +699,23 @@ summary: 2 ... grafts of grafts unfortunately can't - $ hg graft -q 13 + $ hg graft -q 13 --debug + scanning for duplicate grafts + grafting 13:7a4785234d87 "2" + searching for copies back to rev 12 + unmatched files in other (from topological common ancestor): + g + unmatched files new in both: + b + resolving manifests + branchmerge: True, force: True, partial: False + ancestor: b592ea63bb0c, local: 7e61b508e709+, remote: 7a4785234d87 + committing files: + b warning: can't find ancestor for 'b' copied from 'a'! + reusing manifest form p1 (listed files actually unchanged) + committing changelog + updating the branch cache $ hg log -r 'destination(13)' All copies of a cset $ hg log -r 'origin(13) or destination(origin(13))' @@ -731,7 +746,7 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: 2 - changeset: 22:d1cb6591fa4b + changeset: 22:3a4e92d81b97 branch: dev tag: tip user: foo @@ -743,8 +758,8 @@ $ hg graft 'origin(13) or destination(origin(13))' skipping ancestor revision 21:7e61b508e709 - skipping ancestor revision 22:d1cb6591fa4b - skipping revision 2:5c095ad7e90f (already grafted to 22:d1cb6591fa4b) + skipping ancestor revision 22:3a4e92d81b97 + skipping revision 2:5c095ad7e90f (already grafted to 22:3a4e92d81b97) grafting 7:ef0ef43d49e7 "2" warning: can't find ancestor for 'b' copied from 'a'! grafting 13:7a4785234d87 "2" @@ -758,7 +773,7 @@ $ hg graft 19 0 6 skipping ungraftable merge revision 6 skipping ancestor revision 0:68795b066622 - skipping already grafted revision 19:9627f653b421 (22:d1cb6591fa4b also has origin 2:5c095ad7e90f) + skipping already grafted revision 19:9627f653b421 (22:3a4e92d81b97 also has origin 2:5c095ad7e90f) [255] $ hg graft 19 0 6 --force skipping ungraftable merge revision 6 @@ -773,12 +788,12 @@ $ hg ci -m 28 $ hg backout 28 reverting a - changeset 29:53177ba928f6 backs out changeset 28:50a516bb8b57 + changeset 29:9d95e865b00c backs out changeset 28:cc20d29aec8d $ hg graft 28 - skipping ancestor revision 28:50a516bb8b57 + skipping ancestor revision 28:cc20d29aec8d [255] $ hg graft 28 --force - grafting 28:50a516bb8b57 "28" + grafting 28:cc20d29aec8d "28" merging a $ cat a abc @@ -788,7 +803,7 @@ $ echo def > a $ hg ci -m 31 $ hg graft 28 --force --tool internal:fail - grafting 28:50a516bb8b57 "28" + grafting 28:cc20d29aec8d "28" abort: unresolved conflicts, can't continue (use 'hg resolve' and 'hg graft --continue') [255] @@ -801,7 +816,7 @@ (no more unresolved files) continue: hg graft --continue $ hg graft -c - grafting 28:50a516bb8b57 "28" + grafting 28:cc20d29aec8d "28" $ cat a abc @@ -822,8 +837,8 @@ $ hg tag -f something $ hg graft -qr 27 $ hg graft -f 27 - grafting 27:ed6c7e54e319 "28" - note: graft of 27:ed6c7e54e319 created no changes to commit + grafting 27:17d42b8f5d50 "28" + note: graft of 27:17d42b8f5d50 created no changes to commit $ cd ..