diff -r 0471b9ddd0b2 -r 844b1ad5b34b tests/test-evolve-obshistory-phase-divergent.t --- a/tests/test-evolve-obshistory-phase-divergent.t Wed Apr 08 01:17:01 2020 +0800 +++ b/tests/test-evolve-obshistory-phase-divergent.t Fri May 08 22:50:09 2020 +0800 @@ -1,5 +1,4 @@ -This test file test the various messages when accessing obsolete -revisions. +Testing obslog and other commands accessing obsolete revisions. Global setup ============ @@ -7,7 +6,7 @@ $ . $TESTDIR/testlib/obshistory_setup.sh Test output with phase-divergence -=================================== +================================= Test setup ---------- @@ -66,8 +65,8 @@ Actual test ----------- -Check that debugobshistory on the divergent revision show both destinations - $ hg obslog --hidden 471f378eab4c --patch +Check that obslog on the public revision shows both public (diverged) and draft (divergent) revisions + $ hg obslog --hidden 471f378eab4c --patch --no-origin @ 471f378eab4c (1) A0 reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) diff -r 471f378eab4c -r fdf9bde5129a changeset-description @@ -80,46 +79,7 @@ Check that with all option, every changeset is shown - $ hg obslog --hidden --all 471f378eab4c --patch - * fdf9bde5129a (2) A1 - | - @ 471f378eab4c (1) A0 - reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) - diff -r 471f378eab4c -r fdf9bde5129a changeset-description - --- a/changeset-description - +++ b/changeset-description - @@ -1,1 +1,1 @@ - -A0 - +A1 - - - $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool - [ - { - "markers": [ - { - "date": [ - *, (glob) - 0 - ], - "effects": [ - "description" - ], - "operation": "amend", - "succnodes": [ - "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e" - ], - "user": "test", - "verb": "reworded" - } - ], - "node": "471f378eab4c5e25f6c77f785b27c936efb22874", - "shortdescription": "A0" - } - ] -Check that debugobshistory on the first diverged revision show the revision -and the diverent one - $ hg obslog fdf9bde5129a --patch + $ hg obslog --hidden --all 471f378eab4c --patch --no-origin * fdf9bde5129a (2) A1 | @ 471f378eab4c (1) A0 @@ -132,66 +92,101 @@ +A1 - -Check that all option show all of them - $ hg obslog fdf9bde5129a -a --patch + $ hg obslog --hidden --all 471f378eab4c --patch * fdf9bde5129a (2) A1 + | reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000) + | diff -r 471f378eab4c -r fdf9bde5129a changeset-description + | --- a/changeset-description + | +++ b/changeset-description + | @@ -1,1 +1,1 @@ + | -A0 + | +A1 | - @ 471f378eab4c (1) A0 - reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) - diff -r 471f378eab4c -r fdf9bde5129a changeset-description - --- a/changeset-description - +++ b/changeset-description - @@ -1,1 +1,1 @@ - -A0 - +A1 - - -Check that debugobshistory on the second diverged revision show the revision -and the diverent one - $ hg obslog fdf9bde5129a --patch - * fdf9bde5129a (2) A1 | @ 471f378eab4c (1) A0 - reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) - diff -r 471f378eab4c -r fdf9bde5129a changeset-description - --- a/changeset-description - +++ b/changeset-description - @@ -1,1 +1,1 @@ - -A0 - +A1 - -Check that all option show all of them - $ hg obslog fdf9bde5129a -a --patch + $ hg obslog --hidden 471f378eab4c --no-graph --no-origin -Tjson | python -m json.tool + [ + { + "markers": [ + { + "dates": [ + [ + *, (glob) + 0 + ] + ], + "effects": [ + "description" + ], + "operations": [ + "amend" + ], + "succnodes": [ + "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e" + ], + "users": [ + "test" + ], + "verb": "reworded" + } + ], + "node": "471f378eab4c5e25f6c77f785b27c936efb22874", + "shortdescription": "A0" + } + ] + $ hg obslog --hidden 471f378eab4c --no-graph -Tjson | python -m json.tool + [ + { + "markers": [], + "node": "471f378eab4c5e25f6c77f785b27c936efb22874", + "shortdescription": "A0" + } + ] +Check that obslog on the draft (divergent) revision also shows public (diverged) revision + $ hg obslog fdf9bde5129a --patch * fdf9bde5129a (2) A1 + | reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000) + | diff -r 471f378eab4c -r fdf9bde5129a changeset-description + | --- a/changeset-description + | +++ b/changeset-description + | @@ -1,1 +1,1 @@ + | -A0 + | +A1 + | | @ 471f378eab4c (1) A0 - reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) - diff -r 471f378eab4c -r fdf9bde5129a changeset-description - --- a/changeset-description - +++ b/changeset-description - @@ -1,1 +1,1 @@ - -A0 - +A1 - -Check that debugobshistory on the both diverged revision show a coherent -graph - $ hg obslog 'fdf9bde5129a+fdf9bde5129a' --patch + +Check that all option shows all of them + $ hg obslog fdf9bde5129a -a --patch * fdf9bde5129a (2) A1 + | reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000) + | diff -r 471f378eab4c -r fdf9bde5129a changeset-description + | --- a/changeset-description + | +++ b/changeset-description + | @@ -1,1 +1,1 @@ + | -A0 + | +A1 + | | @ 471f378eab4c (1) A0 - reworded(description) as fdf9bde5129a using amend by test (Thu Jan 01 00:00:00 1970 +0000) - diff -r 471f378eab4c -r fdf9bde5129a changeset-description - --- a/changeset-description - +++ b/changeset-description - @@ -1,1 +1,1 @@ - -A0 - +A1 +Check that obslog on the both draft (divergent) and public (diverged) revisions shows a coherent graph + $ hg obslog 'fdf9bde5129a+471f378eab4c' --patch + * fdf9bde5129a (2) A1 + | reworded(description) from 471f378eab4c using amend by test (Thu Jan 01 00:00:00 1970 +0000) + | diff -r 471f378eab4c -r fdf9bde5129a changeset-description + | --- a/changeset-description + | +++ b/changeset-description + | @@ -1,1 +1,1 @@ + | -A0 + | +A1 + | + | + @ 471f378eab4c (1) A0 - $ hg obslog 'fdf9bde5129a+fdf9bde5129a' --no-graph -Tjson | python -m json.tool + $ hg obslog 'fdf9bde5129a+471f378eab4c' --no-graph --no-origin -Tjson | python -m json.tool [ { "markers": [], @@ -201,18 +196,24 @@ { "markers": [ { - "date": [ - 0.0, - 0 + "dates": [ + [ + 0.0, + 0 + ] ], "effects": [ "description" ], - "operation": "amend", + "operations": [ + "amend" + ], "succnodes": [ "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e" ], - "user": "test", + "users": [ + "test" + ], "verb": "reworded" } ], @@ -220,6 +221,41 @@ "shortdescription": "A0" } ] + $ hg obslog 'fdf9bde5129a+471f378eab4c' --no-graph -Tjson | python -m json.tool + [ + { + "markers": [ + { + "dates": [ + [ + 0.0, + 0 + ] + ], + "effects": [ + "description" + ], + "operations": [ + "amend" + ], + "prednodes": [ + "471f378eab4c5e25f6c77f785b27c936efb22874" + ], + "users": [ + "test" + ], + "verb": "reworded" + } + ], + "node": "fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e", + "shortdescription": "A1" + }, + { + "markers": [], + "node": "471f378eab4c5e25f6c77f785b27c936efb22874", + "shortdescription": "A0" + } + ] $ hg update 471f378eab4c 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg update --hidden 'desc(A0)'