debugmutation: improve format and render successors

Summary:
Update the debugmutation format to collapse long chains.  Add
`hg debugmutation -s` to follow the successor relationship (printing what the
commit became) instead of the predecessor relationship.

Reviewed By: mitrandir77

Differential Revision: D17156463

fbshipit-source-id: 44a68692e3bdea6a2fe2ef9f53b533199136eab1
This commit is contained in:
Mark Thomas 2019-09-06 00:40:29 -07:00 committed by Facebook Github Bot
parent 284acf32f4
commit 3a124c9d82

View File

@ -33,7 +33,7 @@ create a commit with mutation extras
$ echo 1 > 1 && hg add 1 && hg commit -m 1
$ echo 1a > 1 && hg amend -m 1a --config mutation.record=true
$ hg debugmutation .
6ad95cdc8ab9aab92b341e8a7b90296d04885b30 amend by test at 1970-01-01T00:00:00 from:
* 6ad95cdc8ab9aab92b341e8a7b90296d04885b30 amend by test at 1970-01-01T00:00:00 from:
f0161ad23099c690115006c21e96f780f5d740b6
pushrebase it directly onto master - it will be rewritten without the mutation extras
@ -54,7 +54,7 @@ pushrebase it directly onto master - it will be rewritten without the mutation e
o 0: d20a80d4def3 'base'
$ hg debugmutation master
a05b3505b7d1aac5fd90b09a5f014822647ec205
* a05b3505b7d1aac5fd90b09a5f014822647ec205
create another commit on the base commit with mutation extras
$ hg up 0
@ -62,7 +62,7 @@ create another commit on the base commit with mutation extras
$ echo 2 > 2 && hg add 2 && hg commit -m 2
$ echo 2a > 2 && hg amend -m 2a --config mutation.record=true
$ hg debugmutation .
fd935a5d42c4be474397d87ab7810b0b006722af amend by test at 1970-01-01T00:00:00 from:
* fd935a5d42c4be474397d87ab7810b0b006722af amend by test at 1970-01-01T00:00:00 from:
1b9fe529321657f93e84f23afaf9c855b9af34ff
pushrebase it onto master - it will be rebased and rewritten without the mutation extras
@ -87,4 +87,4 @@ pushrebase it onto master - it will be rebased and rewritten without the mutatio
o 0: d20a80d4def3 'base'
$ hg debugmutation master
7042a534cddcd761aeea38446ce39590634568e8
* 7042a534cddcd761aeea38446ce39590634568e8