Mercurial > hg-stable
diff tests/test-rebase-obsolete.t @ 35709:1a09dad8b85a
evolution: report new unstable changesets
This adds a transaction summary callback that reports the number of
new orphan, content-divergent and phase-divergent changesets.
The code for reporting it is based on the code from the evolve
extension, but simplified a bit. It simply counts the numbers for each
kind of instability before and after the transaction. That's obviously
not very efficient, but it's easy to reason about, so I'm doing this
as a first step that can make us quite confident about the test case
changes. We can optimize it later and make sure that the tests are not
affected. The code has been used in the evolve extension for a long
time and has apparently been sufficiently fast, so it doesn't seem
like a pressing issue.
Unlike the evolve extension's version of this report, this version
applies to all commands (or all transactions run as part of any
command, to be exact).
Differential Revision: https://phab.mercurial-scm.org/D1867
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 14 Jan 2018 23:59:17 -0800 |
parents | 7336ac5e786e |
children | 35a0f6f31eef |
line wrap: on
line diff
--- a/tests/test-rebase-obsolete.t Wed Jan 10 14:00:23 2018 -0800 +++ b/tests/test-rebase-obsolete.t Sun Jan 14 23:59:17 2018 -0800 @@ -182,6 +182,7 @@ $ hg rebase --rev 'desc(D)' --dest 'desc(H)' rebasing 9:08483444fef9 "D" + 1 new orphan changesets $ hg debugobsolete 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 {cd010b8cd998f3981a5a8115f94f8da4ab506089} (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '0', 'operation': 'rebase', 'user': 'test'} 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 5ae4c968c6aca831df823664e706c9d4aa34473d 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'test'} @@ -460,6 +461,7 @@ 9:cf44d2f5a9f4 D (no-eol) $ hg rebase -r 8 rebasing 8:e273c5e7d2d2 "C" + 1 new orphan changesets $ hg log -G o 11:0d8f238b634c C | @@ -582,6 +584,7 @@ rebasing 3:32af7686d403 "D" rebasing 7:02de42196ebe "H" rebasing 9:4bde274eefcf "I" (tip) + 1 new orphan changesets $ hg log -G @ 12:acd174b7ab39 I | @@ -616,12 +619,14 @@ $ echo J > J $ hg add J $ hg commit -m J + 1 new orphan changesets $ hg debugobsolete `hg log --rev . -T '{node}'` obsoleted 1 changesets $ hg rebase --rev .~1::. --dest 'max(desc(D))' --traceback --config experimental.rebaseskipobsolete=off rebasing 9:4bde274eefcf "I" rebasing 13:06edfc82198f "J" (tip) + 2 new content-divergent changesets $ hg log -G @ 15:5ae8a643467b J | @@ -656,6 +661,7 @@ $ echo "K" > K $ hg add K $ hg commit --amend -m "K" + 1 new orphan changesets $ echo "L" > L $ hg add L $ hg commit -m "L" @@ -664,6 +670,7 @@ $ echo "M" > M $ hg add M $ hg commit --amend -m "M" + 1 new orphan changesets $ hg log -G @ 18:bfaedf8eb73b M | @@ -702,6 +709,7 @@ $ hg rebase -s 14 -d 17 --config experimental.rebaseskipobsolete=True note: not rebasing 14:9ad579b4a5de "I", already in destination as 16:fc37a630c901 "K" rebasing 15:5ae8a643467b "J" + 1 new orphan changesets $ cd .. @@ -732,6 +740,7 @@ $ echo C > C $ hg add C $ hg commit -m C + 1 new orphan changesets $ hg log -G @ 4:212cb178bcbb C | @@ -756,6 +765,7 @@ $ echo D > D $ hg add D $ hg commit -m D + 1 new orphan changesets $ hg --hidden strip -r 'desc(B1)' saved backup bundle to $TESTTMP/obsskip/.hg/strip-backup/86f6414ccda7-b1c452ee-backup.hg $ hg log -G @@ -796,6 +806,7 @@ $ hg debugobsolete `hg log -r 7 -T '{node}\n'` --config experimental.evolution=true obsoleted 1 changesets + 1 new orphan changesets $ hg rebase -d 6 -r "4::" rebasing 4:ff2c4d47b71d "C" note: not rebasing 7:360bbaa7d3ce "O", it has no successor @@ -871,6 +882,7 @@ $ echo "bar" > foo $ hg add foo $ hg commit -m "bar foo" + 1 new orphan changesets $ hg log -G @ 14:73568ab6879d bar foo | @@ -922,6 +934,7 @@ $ hg rebase -s 10 -d 12 --config experimental.evolution.allowdivergence=True rebasing 10:121d9e3bc4c6 "P" rebasing 14:73568ab6879d "bar foo" (tip) + 2 new content-divergent changesets $ hg summary parent: 16:61bd55f69bc4 tip bar foo @@ -961,6 +974,7 @@ $ hg commit -m "dummy change" $ hg debugobsolete `hg log -r ".^" -T '{node}'` `hg log -r 18 -T '{node}'` --config experimental.evolution=true obsoleted 1 changesets + 1 new orphan changesets $ hg log -G -r 16:: @ 21:7bdc8a87673d dummy change @@ -1020,6 +1034,7 @@ > \| > a > EOF + 1 new orphan changesets $ hg log -G -r 'a':: * 7:1143e9adc121 f | @@ -1087,6 +1102,8 @@ rebasing 3:a82ac2b38757 "c" (c) rebasing 4:76be324c128b "d" (d) rebasing 7:1143e9adc121 "f" (f tip) + 1 new orphan changesets + 2 new content-divergent changesets $ hg log -G -r 'a':: -T instabilities o 10:e1744ea07510 f | @@ -1118,6 +1135,8 @@ rebasing 3:a82ac2b38757 "c" (c) rebasing 4:76be324c128b "d" (d) rebasing 7:1143e9adc121 "f" (f tip) + 1 new orphan changesets + 2 new content-divergent changesets $ hg strip -r 0: @@ -1136,6 +1155,7 @@ > \| > a > EOF + 1 new orphan changesets $ hg log -G -r 'a': * 8:2876ce66c6eb g | @@ -1206,6 +1226,7 @@ > \|/ > A > EOF + 1 new orphan changesets $ hg rebase -d B -s D note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) @@ -1237,6 +1258,7 @@ > \|/ > A > EOF + 1 new orphan changesets $ hg rebase -d B -s E note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) @@ -1268,6 +1290,7 @@ > \|/ > A > EOF + 1 new orphan changesets $ hg rebase -d C -s D note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) @@ -1302,6 +1325,7 @@ > \|/ > A > EOF + 1 new orphan changesets $ hg rebase -d C -s E note: not rebasing 3:7fb047a69f22 "E" (E), already in destination as 1:112478962961 "B" (B) @@ -1335,6 +1359,7 @@ > \|/ > A > EOF + 1 new orphan changesets $ hg rebase -d C -b F rebasing 2:b18e25de2cf5 "D" (D) @@ -1370,6 +1395,7 @@ > \|/ > A > EOF + 1 new orphan changesets $ hg rebase -d C -b F note: not rebasing 2:b18e25de2cf5 "D" (D), already in destination as 1:112478962961 "B" (B) @@ -1405,6 +1431,7 @@ > | | > X Y > EOS + 1 new orphan changesets $ hg rebase -r A+B+E -d F note: not rebasing 4:a3d17304151f "A" (A), already in destination as 0:96cc3511f894 "C" (C) note: not rebasing 5:b23a2cc00842 "B" (B), already in destination as 1:058c1e1fb10a "D" (D) @@ -1423,6 +1450,7 @@ > /| | # replace: A -> C > A B C # D/D = D > EOS + 1 new orphan changesets $ hg rebase -r A+B+D -d Z note: not rebasing 0:426bada5c675 "A" (A), already in destination as 2:96cc3511f894 "C" (C) rebasing 1:fc2b737bb2e5 "B" (B) @@ -1453,6 +1481,7 @@ > /| | # replace: B -> C > A B C # D/D = D > EOS + 1 new orphan changesets $ hg rebase -r B+A+D -d Z rebasing 0:426bada5c675 "A" (A) note: not rebasing 1:fc2b737bb2e5 "B" (B), already in destination as 2:96cc3511f894 "C" (C) @@ -1530,6 +1559,7 @@ $ hg rebase -r B+D1 -d E rebasing 1:112478962961 "B" (B) note: not rebasing 5:15ecf15e0114 "D1" (book D1 tip), already in destination as 2:0807738e0be9 "D2" (D2) + 1 new orphan changesets $ hg log -G -T '{desc} {bookmarks}' @ B book | @@ -1561,6 +1591,7 @@ > |/ > A > EOS + 1 new orphan changesets $ eval `hg tags -T '{tag}={node}\n'` $ rm .hg/localtags