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
--- a/mercurial/scmutil.py Wed Jan 10 14:00:23 2018 -0800
+++ b/mercurial/scmutil.py Sun Jan 14 23:59:17 2018 -0800
@@ -1222,6 +1222,9 @@
'unbundle',
]
+# A marker that tells the evolve extension to suppress its own reporting
+_reportstroubledchangesets = True
+
def registersummarycallback(repo, otr, txnname=''):
"""register a callback to issue a summary after the transaction is closed
"""
@@ -1257,6 +1260,32 @@
repo.ui.status(_('obsoleted %i changesets\n')
% len(obsoleted))
+ if obsolete.isenabled(repo, obsolete.createmarkersopt):
+ instabilitytypes = [
+ ('orphan', 'orphan'),
+ ('phase-divergent', 'phasedivergent'),
+ ('content-divergent', 'contentdivergent'),
+ ]
+
+ def getinstabilitycounts(repo):
+ filtered = repo.changelog.filteredrevs
+ counts = {}
+ for instability, revset in instabilitytypes:
+ counts[instability] = len(set(obsolete.getrevs(repo, revset)) -
+ filtered)
+ return counts
+
+ oldinstabilitycounts = getinstabilitycounts(repo)
+ @reportsummary
+ def reportnewinstabilities(repo, tr):
+ newinstabilitycounts = getinstabilitycounts(repo)
+ for instability, revset in instabilitytypes:
+ delta = (newinstabilitycounts[instability] -
+ oldinstabilitycounts[instability])
+ if delta > 0:
+ repo.ui.warn(_('%i new %s changesets\n') %
+ (delta, instability))
+
if txmatch(_reportnewcssource):
@reportsummary
def reportnewcs(repo, tr):
--- a/tests/test-amend.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-amend.t Sun Jan 14 23:59:17 2018 -0800
@@ -185,6 +185,7 @@
> EOF
$ hg amend
+ 1 new orphan changesets
$ hg log -T '{rev} {node|short} {desc}\n' -G
@ 3 be169c7e8dbe B
|
--- a/tests/test-cache-abuse.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-cache-abuse.t Sun Jan 14 23:59:17 2018 -0800
@@ -70,6 +70,11 @@
$ damage "tags --hidden" tags2
$ damage tags tags2-visible
$ damage "tag -f t3" hgtagsfnodes1
+ 1 new orphan changesets
+ 1 new orphan changesets
+ 1 new orphan changesets
+ 1 new orphan changesets
+ 1 new orphan changesets
Beat up branch caches:
--- a/tests/test-commit-amend.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-commit-amend.t Sun Jan 14 23:59:17 2018 -0800
@@ -605,6 +605,7 @@
babar
$ hg commit --amend
+ 1 new orphan changesets
$ hg log -r 'orphan()'
changeset: 16:37973c7e0b61
branch: a
--- a/tests/test-drawdag.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-drawdag.t Sun Jan 14 23:59:17 2018 -0800
@@ -206,6 +206,7 @@
> \|/
> A
> EOS
+ 1 new orphan changesets
$ hg log -r 'sort(all(), topo)' -G --hidden -T '{desc} {node}'
* G 711f53bbef0bebd12eb6f0511d5e2e998b984846
--- a/tests/test-exchange-obsmarkers-case-A3.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-exchange-obsmarkers-case-A3.t Sun Jan 14 23:59:17 2018 -0800
@@ -74,6 +74,7 @@
created new head
$ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
obsoleted 1 changesets
$ hg log -G --hidden
@@ -163,6 +164,7 @@
created new head
$ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
obsoleted 1 changesets
$ hg log -G --hidden
@@ -218,6 +220,7 @@
remote: added 1 changesets with 1 changes to 1 files (+1 heads)
remote: 1 new obsolescence markers
remote: obsoleted 1 changesets
+ remote: 1 new orphan changesets
## post push state
# obstore: main
28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
@@ -234,6 +237,7 @@
added 1 changesets with 1 changes to 1 files (+1 heads)
1 new obsolescence markers
obsoleted 1 changesets
+ 1 new orphan changesets
new changesets e5ea8f9c7314
(run 'hg heads' to see heads, 'hg merge' to merge)
## post pull state
--- a/tests/test-exchange-obsmarkers-case-A4.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-exchange-obsmarkers-case-A4.t Sun Jan 14 23:59:17 2018 -0800
@@ -65,6 +65,7 @@
$ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'`
$ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg log -G --hidden
@ e5ea8f9c7314 (draft): A1
|
--- a/tests/test-exchange-obsmarkers-case-B5.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-exchange-obsmarkers-case-B5.t Sun Jan 14 23:59:17 2018 -0800
@@ -71,6 +71,7 @@
$ mkcommit B1
$ hg debugobsolete --hidden `getid 'desc(A0)'` `getid 'desc(A1)'`
obsoleted 1 changesets
+ 2 new orphan changesets
$ hg debugobsolete --hidden aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(B0)'`
$ hg debugobsolete --hidden `getid 'desc(B0)'` `getid 'desc(B1)'`
obsoleted 1 changesets
--- a/tests/test-exchange-obsmarkers-case-C1.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-exchange-obsmarkers-case-C1.t Sun Jan 14 23:59:17 2018 -0800
@@ -58,6 +58,7 @@
$ mkcommit A
$ mkcommit B
$ hg prune -qd '0 0' '.~1'
+ 1 new orphan changesets
$ hg prune -qd '0 0' .
$ hg log -G --hidden
x f6fbb35d8ac9 (draft): B
--- a/tests/test-exchange-obsmarkers-case-C4.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-exchange-obsmarkers-case-C4.t Sun Jan 14 23:59:17 2018 -0800
@@ -67,6 +67,7 @@
$ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'`
obsoleted 1 changesets
$ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'`
+ 2 new content-divergent changesets
$ hg prune -qd '0 0' .
$ hg log -G --hidden
x 7f7f229b13a6 (draft): C
--- a/tests/test-exchange-obsmarkers-case-D1.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-exchange-obsmarkers-case-D1.t Sun Jan 14 23:59:17 2018 -0800
@@ -62,6 +62,7 @@
created new head
$ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg prune -d '0 0' 'desc(B)'
obsoleted 1 changesets
$ hg strip --hidden -q 'desc(A0)'
--- a/tests/test-exchange-obsmarkers-case-D4.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-exchange-obsmarkers-case-D4.t Sun Jan 14 23:59:17 2018 -0800
@@ -60,6 +60,7 @@
$ mkcommit B1
$ hg debugobsolete `getid 'desc(A0)'` aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A1)'`
$ hg debugobsolete `getid 'desc(B0)'` bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
obsoleted 1 changesets
--- a/tests/test-histedit-obsolete.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-histedit-obsolete.t Sun Jan 14 23:59:17 2018 -0800
@@ -222,6 +222,7 @@
[1]
$ echo c >> c
$ hg histedit --continue
+ 1 new orphan changesets
$ hg log -r 'orphan()'
11:c13eb81022ca f (no-eol)
--- a/tests/test-obshistory.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-obshistory.t Sun Jan 14 23:59:17 2018 -0800
@@ -333,6 +333,7 @@
$ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(C0)'`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(C0)'`
obsoleted 1 changesets
@@ -412,6 +413,7 @@
updating to a hidden changeset 471f378eab4c
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg commit --amend -m "A2"
+ 2 new content-divergent changesets
$ hg log --hidden -G
@ changeset: 3:65b757b745b9
| tag: tip
@@ -498,6 +500,7 @@
$ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(C0)'`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid 'desc(B1)'` `getid 'desc(C0)'`
obsoleted 1 changesets
--- a/tests/test-obsmarker-template.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-obsmarker-template.t Sun Jan 14 23:59:17 2018 -0800
@@ -591,6 +591,7 @@
created new head
$ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"`
obsoleted 1 changesets
@@ -817,6 +818,7 @@
updating to a hidden changeset 471f378eab4c
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg commit --amend -m "A2"
+ 2 new content-divergent changesets
$ hg log --hidden -G
@ changeset: 3:65b757b745b9
| tag: tip
@@ -1112,6 +1114,7 @@
created new head
$ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B1)"` `getid "desc(C0)"`
obsoleted 1 changesets
@@ -1589,6 +1592,7 @@
$ hg debugobsolete `getid "desc(A0)"` `getid "desc(B0)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"`
obsoleted 1 changesets
$ hg debugobsolete `getid "desc(B0)"` `getid "desc(A0)"`
@@ -1874,10 +1878,12 @@
$ hg up 6
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg commit --amend -m "Add only B"
+ 1 new orphan changesets
$ hg up 6 --hidden
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg commit --amend -m "Add B only"
+ 4 new content-divergent changesets
$ hg log -G
@ changeset: 9:0b997eb7ceee
--- a/tests/test-obsolete-bundle-strip.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-obsolete-bundle-strip.t Sun Jan 14 23:59:17 2018 -0800
@@ -272,6 +272,7 @@
$ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
$ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete --record-parents `getid 'desc("C-B0")'`
obsoleted 1 changesets
$ hg up 'desc("ROOT")'
@@ -601,6 +602,7 @@
$ hg debugobsolete a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0 `getid 'desc("C-A0")'`
$ hg debugobsolete `getid 'desc("C-A0")'` `getid 'desc("C-A1")'`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete --record-parents `getid 'desc("C-B0")'`
obsoleted 1 changesets
@@ -770,8 +772,10 @@
$ hg debugobsolete `getid 'desc("C-A")'` `getid 'desc("C-B")'` `getid 'desc("C-C")'` # record split
obsoleted 1 changesets
$ hg debugobsolete `getid 'desc("C-A")'` `getid 'desc("C-D")'` # other divergent
+ 3 new content-divergent changesets
$ hg debugobsolete `getid 'desc("C-A")'` b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0
$ hg debugobsolete b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 `getid 'desc("C-E")'`
+ 1 new content-divergent changesets
$ hg debugobsolete `getid 'desc("C-B")'` `getid 'desc("C-E")'`
obsoleted 1 changesets
$ hg debugobsolete `getid 'desc("C-C")'` `getid 'desc("C-E")'`
@@ -952,6 +956,7 @@
b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
# stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/2f20ff6509f0-8adeb22d-backup.hg
+ 3 new content-divergent changesets
### Backup markers ###
06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
@@ -1121,6 +1126,7 @@
b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
# stripping: saved backup bundle to $TESTTMP/split-fold/.hg/strip-backup/9ac430e15fca-36b6476a-backup.hg
+ 3 new content-divergent changesets
### Backup markers ###
06dc9da25ef03e1ff7864dded5fcba42eff2a3f0 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
27ec657ca21dd27c36c99fa75586f72ff0d442f1 2f20ff6509f0e013e90c5c8efd996131c918b0ca 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- a/tests/test-obsolete-changeset-exchange.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-obsolete-changeset-exchange.t Sun Jan 14 23:59:17 2018 -0800
@@ -71,6 +71,7 @@
adding manifests
adding file changes
added 1 changesets with 0 changes to 1 files (+1 heads)
+ 1 new phase-divergent changesets
new changesets f89bcc95eba5
(run 'hg heads' to see heads, 'hg merge' to merge)
--- a/tests/test-obsolete-distributed.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-obsolete-distributed.t Sun Jan 14 23:59:17 2018 -0800
@@ -276,6 +276,7 @@
$ hg up 'desc("c_A")'
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg commit --amend -m 'c_A1'
+ 1 new orphan changesets
$ hg rebase -r 'desc("c_B0")' -d . # no easy way to rewrite the message with the rebase
rebasing 2:ef908e42ce65 "c_B0"
$ hg up
@@ -323,6 +324,7 @@
$ hg up 'desc("c_A")'
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg commit --amend -m 'c_A2'
+ 1 new orphan changesets
$ hg rebase -r 'desc("c_B1")' -d . # no easy way to rewrite the message with the rebase
rebasing 2:956063ac4557 "c_B1"
$ hg up
--- a/tests/test-obsolete-divergent.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-obsolete-divergent.t Sun Jan 14 23:59:17 2018 -0800
@@ -61,6 +61,7 @@
$ hg debugobsolete `getid A_0` `getid A_1`
obsoleted 1 changesets
$ hg debugobsolete `getid A_0` `getid A_2`
+ 2 new content-divergent changesets
$ hg log -G --hidden
* 3:392fd25390da A_2
|
@@ -120,6 +121,7 @@
$ hg debugobsolete `getid A_0` `getid A_1`
obsoleted 1 changesets
$ hg debugobsolete `getid A_0` `getid A_2`
+ 2 new content-divergent changesets
$ mkcommit A_3
created new head
$ hg debugobsolete `getid A_2` `getid A_3`
@@ -180,6 +182,7 @@
obsoleted 1 changesets
$ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid A_1`
$ hg debugobsolete `getid A_0` `getid A_2`
+ 2 new content-divergent changesets
$ hg log -G --hidden
* 3:392fd25390da A_2
|
@@ -250,6 +253,7 @@
$ hg debugobsolete `getid A_0` `getid A_1`
obsoleted 1 changesets
$ hg debugobsolete `getid A_0` `getid A_2`
+ 2 new content-divergent changesets
$ mkcommit A_3
created new head
$ hg debugobsolete `getid A_1` `getid A_3`
@@ -430,6 +434,7 @@
created new head
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg debugobsolete `getid A_5` `getid A_9`
+ 4 new content-divergent changesets
$ hg log -G --hidden
* 10:bed64f5d2f5a A_9
|
@@ -670,6 +675,7 @@
$ rm .hg/localtags
$ hg cleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
+ 2 new content-divergent changesets
$ hg log -G -T '{rev}:{node|short} {desc} {instabilities}' -r 'sort(all(), topo)'
@ 5:1a2a9b5b0030 B2 content-divergent
|
--- a/tests/test-obsolete.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-obsolete.t Sun Jan 14 23:59:17 2018 -0800
@@ -208,6 +208,7 @@
Check that public changeset are not accounted as obsolete:
$ hg --hidden phase --public 2
+ 1 new phase-divergent changesets
$ hg log -G
@ 5:5601fb93a350 (draft phase-divergent) [tip ] add new_3_c
|
@@ -519,6 +520,7 @@
$ mkcommit original_e
$ hg debugobsolete --record-parents `getid original_d` -d '0 0'
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete | grep `getid original_d`
94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
$ hg log -r 'obsolete()'
@@ -583,6 +585,7 @@
adding file changes
added 6 changesets with 6 changes to 6 files (+1 heads)
7 new obsolescence markers
+ 1 new orphan changesets
no warning displayed
@@ -918,7 +921,9 @@
$ hg debugobsolete `getid obsolete_e`
obsoleted 1 changesets
+ 2 new orphan changesets
$ hg debugobsolete `getid original_c` `getid babar`
+ 1 new phase-divergent changesets
$ hg log --config ui.logtemplate= -r 'phasedivergent() and orphan()'
changeset: 7:50c51b361e60
user: test
@@ -1293,6 +1298,7 @@
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo aa > a
$ hg amendtransient
+ 1 new orphan changesets
[1, 2]
Test cache consistency for the visible filter
--- a/tests/test-push-checkheads-partial-C2.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-partial-C2.t Sun Jan 14 23:59:17 2018 -0800
@@ -61,6 +61,7 @@
created new head
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg log -G --hidden
@ f6082bc4ffef (draft): A1
|
--- a/tests/test-push-checkheads-partial-C4.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-partial-C4.t Sun Jan 14 23:59:17 2018 -0800
@@ -61,6 +61,7 @@
created new head
$ hg debugobsolete --record-parents `getid "desc(A0)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg log -G --hidden
@ 0f88766e02d6 (draft): C0
|
--- a/tests/test-push-checkheads-pruned-B2.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-pruned-B2.t Sun Jan 14 23:59:17 2018 -0800
@@ -61,6 +61,7 @@
created new head
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete --record-parents `getid "desc(B0)"`
obsoleted 1 changesets
$ hg log -G --hidden
--- a/tests/test-push-checkheads-pruned-B3.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-pruned-B3.t Sun Jan 14 23:59:17 2018 -0800
@@ -61,6 +61,7 @@
created new head
$ hg debugobsolete --record-parents `getid "desc(A0)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
obsoleted 1 changesets
$ hg log -G --hidden
--- a/tests/test-push-checkheads-pruned-B4.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-pruned-B4.t Sun Jan 14 23:59:17 2018 -0800
@@ -62,6 +62,7 @@
created new head
$ hg debugobsolete --record-parents `getid "desc(A0)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete --record-parents `getid "desc(B0)"`
obsoleted 1 changesets
$ hg log -G --hidden
--- a/tests/test-push-checkheads-pruned-B5.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-pruned-B5.t Sun Jan 14 23:59:17 2018 -0800
@@ -65,6 +65,7 @@
created new head
$ hg debugobsolete --record-parents `getid "desc(A0)"`
obsoleted 1 changesets
+ 2 new orphan changesets
$ hg debugobsolete `getid "desc(B0)"` `getid "desc(B1)"`
obsoleted 1 changesets
$ hg debugobsolete --record-parents `getid "desc(C0)"`
--- a/tests/test-push-checkheads-pruned-B8.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-pruned-B8.t Sun Jan 14 23:59:17 2018 -0800
@@ -68,6 +68,7 @@
created new head
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
obsoleted 1 changesets
$ hg debugobsolete --record-parents `getid "desc(B1)"`
--- a/tests/test-push-checkheads-superceed-A2.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-superceed-A2.t Sun Jan 14 23:59:17 2018 -0800
@@ -61,6 +61,7 @@
$ mkcommit B1
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
obsoleted 1 changesets
$ hg log -G --hidden
--- a/tests/test-push-checkheads-superceed-A3.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-superceed-A3.t Sun Jan 14 23:59:17 2018 -0800
@@ -64,6 +64,7 @@
$ mkcommit A1
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
obsoleted 1 changesets
$ hg log -G --hidden
--- a/tests/test-push-checkheads-superceed-A6.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-superceed-A6.t Sun Jan 14 23:59:17 2018 -0800
@@ -70,6 +70,7 @@
$ mkcommit B1
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
obsoleted 1 changesets
$ hg log -G --hidden
--- a/tests/test-push-checkheads-superceed-A7.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-superceed-A7.t Sun Jan 14 23:59:17 2018 -0800
@@ -70,6 +70,7 @@
created new head
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
obsoleted 1 changesets
$ hg log -G --hidden
--- a/tests/test-push-checkheads-unpushed-D2.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-unpushed-D2.t Sun Jan 14 23:59:17 2018 -0800
@@ -65,6 +65,7 @@
created new head
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete --record-parents `getid "desc(B0)"`
obsoleted 1 changesets
$ hg up 0
--- a/tests/test-push-checkheads-unpushed-D3.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-unpushed-D3.t Sun Jan 14 23:59:17 2018 -0800
@@ -68,6 +68,7 @@
created new head
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
obsoleted 1 changesets
$ hg log -G --hidden
--- a/tests/test-push-checkheads-unpushed-D4.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-unpushed-D4.t Sun Jan 14 23:59:17 2018 -0800
@@ -84,6 +84,7 @@
$ mkcommit B1
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
obsoleted 1 changesets
$ hg log -G --hidden
--- a/tests/test-push-checkheads-unpushed-D5.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-checkheads-unpushed-D5.t Sun Jan 14 23:59:17 2018 -0800
@@ -73,6 +73,7 @@
created new head
$ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
obsoleted 1 changesets
$ hg log -G --hidden
@@ -107,5 +108,6 @@
added 1 changesets with 1 changes to 1 files
1 new obsolescence markers
obsoleted 1 changesets
+ 1 new orphan changesets
$ cd ../..
--- a/tests/test-push-race.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-push-race.t Sun Jan 14 23:59:17 2018 -0800
@@ -1707,6 +1707,7 @@
added 1 changesets with 1 changes to 1 files (+1 heads)
1 new obsolescence markers
obsoleted 1 changesets
+ 1 new orphan changesets
new changesets 720c5163ecf6
(run 'hg heads .' to see heads, 'hg merge' to merge)
$ hg -R ./client-other pull
@@ -1718,6 +1719,7 @@
added 1 changesets with 1 changes to 1 files (+1 heads)
1 new obsolescence markers
obsoleted 1 changesets
+ 1 new orphan changesets
new changesets 720c5163ecf6
(run 'hg heads .' to see heads, 'hg merge' to merge)
$ hg -R ./client-racy pull
@@ -1727,6 +1729,7 @@
adding manifests
adding file changes
added 1 changesets with 0 changes to 0 files
+ 1 new orphan changesets
new changesets a98a47d8b85b
(run 'hg update' to get a working copy)
@@ -1792,6 +1795,7 @@
$ hg -R client-other/ branch --force default
marked working directory as branch default
$ hg -R client-other/ commit -m "C-W"
+ 1 new orphan changesets
created new head
$ ID_V=`hg -R client-other log -T '{node}\n' -r 'desc("C-V")'`
$ ID_W=`hg -R client-other log -T '{node}\n' -r 'desc("C-W")'`
@@ -1818,6 +1822,7 @@
remote: added 1 changesets with 0 changes to 1 files (+1 heads)
remote: 1 new obsolescence markers
remote: obsoleted 1 changesets
+ remote: 1 new orphan changesets
$ release $TESTTMP/watchfile
--- a/tests/test-rebase-dest.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-rebase-dest.t Sun Jan 14 23:59:17 2018 -0800
@@ -420,6 +420,7 @@
> \| # amend: I -> I2
> A
> EOF
+ 6 new orphan changesets
rebasing 16:5c432343bf59 "J" (J tip)
rebasing 3:26805aba1e60 "C" (C)
rebasing 6:f585351a92f8 "D" (D)
--- 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
--- a/tests/test-revset2.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-revset2.t Sun Jan 14 23:59:17 2018 -0800
@@ -1636,6 +1636,8 @@
> \|/ | # amend: F -> G
> A A Z # amend: A -> Z
> EOS
+ 3 new orphan changesets
+ 3 new content-divergent changesets
$ hg log -r 'successors(Z)' -T '{desc}\n'
Z
--- a/tests/test-show-work.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-show-work.t Sun Jan 14 23:59:17 2018 -0800
@@ -242,6 +242,7 @@
> EOF
$ hg debugobsolete `hg log -r 'desc("commit 2")' -T "{node}"`
obsoleted 1 changesets
+ 1 new orphan changesets
$ hg show work --color=debug
@ [log.changeset changeset.draft changeset.unstable instability.orphan|32f3] [log.description|commit 3]
x [log.changeset changeset.draft changeset.obsolete|6a75] [log.description|commit 2]
--- a/tests/test-split.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-split.t Sun Jan 14 23:59:17 2018 -0800
@@ -417,6 +417,7 @@
[255]
#else
$ runsplit -r 1 --no-rebase >/dev/null
+ 3 new orphan changesets
$ hg bookmark
d1 2:b5c5ea414030
* d2 3:f4a0a8d004cc
@@ -459,6 +460,7 @@
> |
> A
> EOS
+ 2 new orphan changesets
$ eval `hg tags -T '{tag}={node}\n'`
$ rm .hg/localtags
$ hg split $B --config experimental.evolution=createmarkers
--- a/tests/test-strip.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-strip.t Sun Jan 14 23:59:17 2018 -0800
@@ -1285,6 +1285,7 @@
> EOF
$ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py
+ 4 new orphan changesets
$ rm .hg/localtags
$ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)'
--- a/tests/test-unamend.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-unamend.t Sun Jan 14 23:59:17 2018 -0800
@@ -258,6 +258,7 @@
2 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ echo bar >> f
$ hg amend
+ 3 new orphan changesets
$ hg rebase -s 6 -d . -q
$ hg glog
@@ -285,12 +286,14 @@
[255]
$ hg unamend
+ 3 new orphan changesets
Trying to unamend a public changeset
$ hg up -C 23
5 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg phase -r . -p
+ 1 new phase-divergent changesets
$ hg unamend
abort: cannot unamend public changesets
(see 'hg help phases' for details)
--- a/tests/test-uncommit.t Wed Jan 10 14:00:23 2018 -0800
+++ b/tests/test-uncommit.t Sun Jan 14 23:59:17 2018 -0800
@@ -190,6 +190,7 @@
$ hg bookmark
foo 9:48e5bd7cd583
$ hg uncommit
+ 3 new orphan changesets
$ hg status
M files
A file-abc
@@ -220,6 +221,7 @@
$ hg bookmark
foo 9:48e5bd7cd583
$ hg uncommit file-ab
+ 1 new orphan changesets
$ hg status
A file-ab