Patchwork [11,of,11] obsfate: add obsfate to default mapfile

login
register
mail settings
Submitter Boris Feld
Date Oct. 9, 2017, 6:40 p.m.
Message ID <ab0796c0fbce5d831451.1507574453@FB>
Download mbox | patch
Permalink /patch/24676/
State Superseded
Headers show

Comments

Boris Feld - Oct. 9, 2017, 6:40 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1507305216 -7200
#      Fri Oct 06 17:53:36 2017 +0200
# Node ID ab0796c0fbce5d8314511bf08ea5b6b4cf0b9dfc
# Parent  1943f74e8e4cb6bd1d44910898fffcaec7a56ca1
# EXP-Topic obsfatekeyword
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r ab0796c0fbce
obsfate: add obsfate to default mapfile

Use the verbosity aware template keyword introduced earlier. It has the nice
property of being verbosity dependent but in order to customize the obsfate
part, users will need to replace the lobsfate definition from default mapfile
with the one using template functions (by copying the one from test-obsmarker-
template.t for example).

As it's a more advanced use-case, I'm more inclined to have the same code for
the {obsfate} keyword, in the changeset printer and in the default mapfile for
consistency.

But, the definition in default mapfile could be replaced with one based on
template filter to obsfate output customization if it is a big need for users.
Denis Laxalde - Oct. 9, 2017, 8:17 p.m.
Boris Feld a écrit :
> # HG changeset patch
> # User Boris Feld <boris.feld@octobus.net>
> # Date 1507305216 -7200
> #      Fri Oct 06 17:53:36 2017 +0200
> # Node ID ab0796c0fbce5d8314511bf08ea5b6b4cf0b9dfc
> # Parent  1943f74e8e4cb6bd1d44910898fffcaec7a56ca1
> # EXP-Topic obsfatekeyword
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r ab0796c0fbce
> obsfate: add obsfate to default mapfile

This series looks good to me overall. It's really helpful to have this 
in core.


> Use the verbosity aware template keyword introduced earlier. It has the nice
> property of being verbosity dependent but in order to customize the obsfate
> part, users will need to replace the lobsfate definition from default mapfile
> with the one using template functions (by copying the one from test-obsmarker-
> template.t for example).
> 
> As it's a more advanced use-case, I'm more inclined to have the same code for
> the {obsfate} keyword, in the changeset printer and in the default mapfile for
> consistency.
> 
> But, the definition in default mapfile could be replaced with one based on
> template filter to obsfate output customization if it is a big need for users.
>
Pulkit Goyal - Oct. 9, 2017, 9:43 p.m.
On Tue, Oct 10, 2017 at 12:10 AM, Boris Feld <boris.feld@octobus.net> wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld@octobus.net>
> # Date 1507305216 -7200
> #      Fri Oct 06 17:53:36 2017 +0200
> # Node ID ab0796c0fbce5d8314511bf08ea5b6b4cf0b9dfc
> # Parent  1943f74e8e4cb6bd1d44910898fffcaec7a56ca1
> # EXP-Topic obsfatekeyword
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r ab0796c0fbce
> obsfate: add obsfate to default mapfile

[snip]

> +# Obsfate templates
> +lobsfate = '{if(obsfate, "{label('log.obsfate', '{obsfate % "obsfate:     {fate}\n"}')}")}'
> diff -r 1943f74e8e4c -r ab0796c0fbce tests/test-obsmarker-template.t
> --- a/tests/test-obsmarker-template.t   Thu Oct 05 15:25:18 2017 +0200
> +++ b/tests/test-obsmarker-template.t   Fri Oct 06 17:53:36 2017 +0200
> @@ -117,7 +117,27 @@
>    | @  changeset:   1:471f378eab4c
>    |/   user:        test
>    |    date:        Thu Jan 01 00:00:00 1970 +0000
> -  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by test2
> +  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by test, test2
^ this one

> +  |    summary:     A0
> +  |
> +  o  changeset:   0:ea207398892e
> +     user:        test
> +     date:        Thu Jan 01 00:00:00 1970 +0000
> +     summary:     ROOT
> +
> +
> +  $ hg log -G -T "default"
> +  o  changeset:   3:d004c8f274b9
> +  |  tag:         tip
> +  |  parent:      0:ea207398892e
> +  |  user:        test
> +  |  date:        Thu Jan 01 00:00:00 1970 +0000
> +  |  summary:     A2
> +  |
> +  | @  changeset:   1:471f378eab4c
> +  |/   user:        test
> +  |    date:        Thu Jan 01 00:00:00 1970 +0000
> +  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by test, test2
^ this one

>    |    summary:     A0
>    |
>    o  changeset:   0:ea207398892e
> @@ -264,6 +284,71 @@
>    |/     Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000)
>    o  ea207398892e

I am bit confused by two of the outputs above. They say `rewritten
using amend as XXXX by test, test2`. Does that mean test did some
amend, then test2 did some amend and the resulting changeset is XXXX.
This more or sounds like they performed the amend together and the
resulting changeset is XXXX.
If this has been discussed earlier, feel free to ignore me as I missed
couple of obsfate series earlier I guess.
Boris Feld - Oct. 10, 2017, 7:01 a.m.
On Tue, 2017-10-10 at 03:13 +0530, Pulkit Goyal wrote:
> On Tue, Oct 10, 2017 at 12:10 AM, Boris Feld <boris.feld@octobus.net>
> wrote:
> > # HG changeset patch
> > # User Boris Feld <boris.feld@octobus.net>
> > # Date 1507305216 -7200
> > #      Fri Oct 06 17:53:36 2017 +0200
> > # Node ID ab0796c0fbce5d8314511bf08ea5b6b4cf0b9dfc
> > # Parent  1943f74e8e4cb6bd1d44910898fffcaec7a56ca1
> > # EXP-Topic obsfatekeyword
> > # Available At https://bitbucket.org/octobus/mercurial-devel/
> > #              hg pull https://bitbucket.org/octobus/mercurial-deve
> > l/ -r ab0796c0fbce
> > obsfate: add obsfate to default mapfile
> 
> [snip]
> 
> > +# Obsfate templates
> > +lobsfate = '{if(obsfate, "{label('log.obsfate', '{obsfate %
> > "obsfate:     {fate}\n"}')}")}'
> > diff -r 1943f74e8e4c -r ab0796c0fbce tests/test-obsmarker-
> > template.t
> > --- a/tests/test-obsmarker-template.t   Thu Oct 05 15:25:18 2017
> > +0200
> > +++ b/tests/test-obsmarker-template.t   Fri Oct 06 17:53:36 2017
> > +0200
> > @@ -117,7 +117,27 @@
> >    | @  changeset:   1:471f378eab4c
> >    |/   user:        test
> >    |    date:        Thu Jan 01 00:00:00 1970 +0000
> > -  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by
> > test2
> > +  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by
> > test, test2
> 
> ^ this one
> 
> > +  |    summary:     A0
> > +  |
> > +  o  changeset:   0:ea207398892e
> > +     user:        test
> > +     date:        Thu Jan 01 00:00:00 1970 +0000
> > +     summary:     ROOT
> > +
> > +
> > +  $ hg log -G -T "default"
> > +  o  changeset:   3:d004c8f274b9
> > +  |  tag:         tip
> > +  |  parent:      0:ea207398892e
> > +  |  user:        test
> > +  |  date:        Thu Jan 01 00:00:00 1970 +0000
> > +  |  summary:     A2
> > +  |
> > +  | @  changeset:   1:471f378eab4c
> > +  |/   user:        test
> > +  |    date:        Thu Jan 01 00:00:00 1970 +0000
> > +  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by
> > test, test2
> 
> ^ this one
> 
> >    |    summary:     A0
> >    |
> >    o  changeset:   0:ea207398892e
> > @@ -264,6 +284,71 @@
> >    |/     Obsfate: rewritten using amend as 2:a468dc9b3633 by test
> > (at 2009-02-13 23:31 +0000)
> >    o  ea207398892e
> 
> I am bit confused by two of the outputs above. They say `rewritten
> using amend as XXXX by test, test2`. Does that mean test did some
> amend, then test2 did some amend and the resulting changeset is XXXX.
> This more or sounds like they performed the amend together and the
> resulting changeset is XXXX.

The outputs mean that 471f378eab4c has been rewritten and it tipmost
successor is XXX. From 471f378eab4c to XXX, it has been rewritten
several times (we don't show how many times, maybe we could in verbose
mode) resulting in as many obs-markers. The set of users from these
obs-markers is {'test', 'test2'}.

The order is not significant here, we just sorted the resulting set for
display.

The output might not be precise enough as it can match all these
scenarios:
- test amended the changeset, then test2 amended the changeset
- test2 amended the changeset, then test amended the changeset
- test amended 100 times the changeset, then test2 amended once the
changeset
- test and test2 amended the changeset successively a hundred of times.

What we are sure with this output:
- test has amended at least once
- test2 has amended at least once
- no other users amended this changeset or its successors


> If this has been discussed earlier, feel free to ignore me as I
> missed
> couple of obsfate series earlier I guess.

Patch

diff -r 1943f74e8e4c -r ab0796c0fbce mercurial/templates/map-cmdline.default
--- a/mercurial/templates/map-cmdline.default	Thu Oct 05 15:25:18 2017 +0200
+++ b/mercurial/templates/map-cmdline.default	Fri Oct 06 17:53:36 2017 +0200
@@ -1,9 +1,9 @@ 
 # Base templates. Due to name clashes with existing keywords, we have
 # to replace some keywords with 'lkeyword', for 'labelled keyword'
-changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{ltroubles}{summary}\n'
+changeset = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{ltroubles}{lobsfate}{summary}\n'
 changeset_quiet = '{lnode}'
-changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{ltroubles}{lfiles}{lfile_copies_switch}{description}\n'
-changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{ltroubles}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
+changeset_verbose = '{cset}{branches}{bookmarks}{tags}{parents}{user}{ldate}{ltroubles}{lobsfate}{lfiles}{lfile_copies_switch}{description}\n'
+changeset_debug = '{fullcset}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{ltroubles}{lobsfate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'
 
 # File templates
 lfiles = '{if(files,
@@ -80,3 +80,6 @@ 
                                        '{desc|strip}')}\n\n")}'
 
 status = '{status} {path}\n{if(copy, "  {copy}\n")}'
+
+# Obsfate templates
+lobsfate = '{if(obsfate, "{label('log.obsfate', '{obsfate % "obsfate:     {fate}\n"}')}")}'
diff -r 1943f74e8e4c -r ab0796c0fbce tests/test-obsmarker-template.t
--- a/tests/test-obsmarker-template.t	Thu Oct 05 15:25:18 2017 +0200
+++ b/tests/test-obsmarker-template.t	Fri Oct 06 17:53:36 2017 +0200
@@ -117,7 +117,27 @@ 
   | @  changeset:   1:471f378eab4c
   |/   user:        test
   |    date:        Thu Jan 01 00:00:00 1970 +0000
-  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by test2
+  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by test, test2
+  |    summary:     A0
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
+
+  $ hg log -G -T "default"
+  o  changeset:   3:d004c8f274b9
+  |  tag:         tip
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     A2
+  |
+  | @  changeset:   1:471f378eab4c
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by test, test2
   |    summary:     A0
   |
   o  changeset:   0:ea207398892e
@@ -264,6 +284,71 @@ 
   |/     Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000)
   o  ea207398892e
   
+
+  $ hg log -G -T "default" --hidden
+  @  changeset:   3:d004c8f274b9
+  |  tag:         tip
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     A2
+  |
+  | x  changeset:   2:a468dc9b3633
+  |/   parent:      0:ea207398892e
+  |    user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by test2
+  |    summary:     A1
+  |
+  | x  changeset:   1:471f378eab4c
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten using amend as 2:a468dc9b3633
+  |    summary:     A0
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
+  $ hg log -G -T "default" --hidden -v
+  @  changeset:   3:d004c8f274b9
+  |  tag:         tip
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  files:       A0
+  |  description:
+  |  A2
+  |
+  |
+  | x  changeset:   2:a468dc9b3633
+  |/   parent:      0:ea207398892e
+  |    user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000)
+  |    files:       A0
+  |    description:
+  |    A1
+  |
+  |
+  | x  changeset:   1:471f378eab4c
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000)
+  |    files:       A0
+  |    description:
+  |    A0
+  |
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     files:       ROOT
+     description:
+     ROOT
+  
+  
 Test templates with splitted commit
 ===================================
 
@@ -439,6 +524,31 @@ 
   o  ea207398892e
   
 
+  $ hg log -G -T "default" --hidden
+  @  changeset:   3:f257fde29c7a
+  |  tag:         tip
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     A0
+  |
+  o  changeset:   2:337fec4d2edc
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     A0
+  |
+  | x  changeset:   1:471597cad322
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     split as 2:337fec4d2edc, 3:f257fde29c7a
+  |    summary:     A0
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
+
 Test templates with folded commit
 =================================
 
@@ -642,6 +752,31 @@ 
   |/     Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
+  $ hg log -G -T "default" --hidden
+  @  changeset:   3:eb5a0daa2192
+  |  tag:         tip
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     C0
+  |
+  | x  changeset:   2:0dec01379d3b
+  | |  user:        test
+  | |  date:        Thu Jan 01 00:00:00 1970 +0000
+  | |  obsfate:     rewritten as 3:eb5a0daa2192
+  | |  summary:     B0
+  | |
+  | x  changeset:   1:471f378eab4c
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten as 3:eb5a0daa2192
+  |    summary:     A0
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
 
 Test templates with divergence
 ==============================
@@ -887,6 +1022,41 @@ 
   |      Obsfate: rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
+  $ hg log -G -T "default" --hidden
+  o  changeset:   4:019fadeab383
+  |  tag:         tip
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  instability: content-divergent
+  |  summary:     A3
+  |
+  | x  changeset:   3:65b757b745b9
+  |/   parent:      0:ea207398892e
+  |    user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten using amend as 4:019fadeab383
+  |    summary:     A2
+  |
+  | @  changeset:   2:fdf9bde5129a
+  |/   parent:      0:ea207398892e
+  |    user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    instability: content-divergent
+  |    summary:     A1
+  |
+  | x  changeset:   1:471f378eab4c
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten using amend as 2:fdf9bde5129a
+  |    obsfate:     rewritten using amend as 3:65b757b745b9
+  |    summary:     A0
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
 
 Test templates with amended + folded commit
 ===========================================
@@ -1159,6 +1329,38 @@ 
   |/     Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
+  $ hg log -G -T "default" --hidden
+  @  changeset:   4:eb5a0daa2192
+  |  tag:         tip
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     C0
+  |
+  | x  changeset:   3:b7ea6d14e664
+  | |  parent:      1:471f378eab4c
+  | |  user:        test
+  | |  date:        Thu Jan 01 00:00:00 1970 +0000
+  | |  obsfate:     rewritten as 4:eb5a0daa2192
+  | |  summary:     B1
+  | |
+  | | x  changeset:   2:0dec01379d3b
+  | |/   user:        test
+  | |    date:        Thu Jan 01 00:00:00 1970 +0000
+  | |    obsfate:     rewritten using amend as 3:b7ea6d14e664
+  | |    summary:     B0
+  | |
+  | x  changeset:   1:471f378eab4c
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten as 4:eb5a0daa2192
+  |    summary:     A0
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
 
 Test template with pushed and pulled obs markers
 ================================================
@@ -1336,6 +1538,25 @@ 
   |/     Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
+  $ hg log -G -T "default" --hidden
+  @  changeset:   2:7a230b46bf61
+  |  tag:         tip
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     A2
+  |
+  | x  changeset:   1:471f378eab4c
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten using amend as 2:7a230b46bf61
+  |    summary:     A0
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
 
 Test template with obsmarkers cycle
 ===================================
@@ -1508,6 +1729,32 @@ 
   |/     Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000)
   @  ea207398892e
   
+  $ hg log -G -T "default" --hidden
+  o  changeset:   3:f897c6137566
+  |  tag:         tip
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     C0
+  |
+  | x  changeset:   2:0dec01379d3b
+  | |  user:        test
+  | |  date:        Thu Jan 01 00:00:00 1970 +0000
+  | |  obsfate:     rewritten as 3:f897c6137566
+  | |  obsfate:     rewritten as 1:471f378eab4c
+  | |  summary:     B0
+  | |
+  | x  changeset:   1:471f378eab4c
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten as 2:0dec01379d3b
+  |    summary:     A0
+  |
+  @  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
 
 Test template with split + divergence with cycles
 =================================================
@@ -1938,6 +2185,80 @@ 
   |/     Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
+  $ hg log -G -T "default" --hidden
+  o  changeset:   10:eceed8f98ffc
+  |  tag:         tip
+  |  parent:      8:b18bc8331526
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  instability: content-divergent
+  |  summary:     Add A,B,C
+  |
+  | o  changeset:   9:0b997eb7ceee
+  | |  parent:      5:dd800401bd8c
+  | |  user:        test
+  | |  date:        Thu Jan 01 00:00:00 1970 +0000
+  | |  instability: content-divergent
+  | |  summary:     Add B only
+  | |
+  o |  changeset:   8:b18bc8331526
+  |/   parent:      5:dd800401bd8c
+  |    user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    instability: content-divergent
+  |    summary:     Add only B
+  |
+  | x  changeset:   7:ba2ed02b0c9a
+  | |  user:        test
+  | |  date:        Thu Jan 01 00:00:00 1970 +0000
+  | |  obsfate:     rewritten using rebase as 10:eceed8f98ffc
+  | |  summary:     Add A,B,C
+  | |
+  | x  changeset:   6:4a004186e638
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten using amend as 8:b18bc8331526
+  |    obsfate:     rewritten using amend as 9:0b997eb7ceee
+  |    summary:     Add A,B,C
+  |
+  o  changeset:   5:dd800401bd8c
+  |  parent:      3:f897c6137566
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  instability: content-divergent
+  |  summary:     Add A,B,C
+  |
+  | @  changeset:   4:9bd10a0775e4
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a
+  |    summary:     Add A,B,C
+  |
+  o  changeset:   3:f897c6137566
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     C0
+  |
+  | x  changeset:   2:0dec01379d3b
+  | |  user:        test
+  | |  date:        Thu Jan 01 00:00:00 1970 +0000
+  | |  obsfate:     rewritten as 3:f897c6137566
+  | |  obsfate:     rewritten as 1:471f378eab4c
+  | |  summary:     B0
+  | |
+  | x  changeset:   1:471f378eab4c
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten as 2:0dec01379d3b
+  |    summary:     A0
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
+
 Test templates with pruned commits
 ==================================
 
@@ -2045,6 +2366,35 @@ 
   o  ea207398892e
   
 
+  $ hg log -G -T "default" --hidden
+  x  changeset:   3:65b757b745b9
+  |  tag:         tip
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  obsfate:     pruned
+  |  summary:     A2
+  |
+  | x  changeset:   2:fdf9bde5129a
+  |/   parent:      0:ea207398892e
+  |    user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     pruned
+  |    summary:     A1
+  |
+  | @  changeset:   1:471f378eab4c
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     rewritten using amend as 2:fdf9bde5129a
+  |    obsfate:     rewritten using amend as 3:65b757b745b9
+  |    summary:     A0
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
+
 Test templates with splitted and pruned commit
 ==============================================
 
@@ -2167,3 +2517,28 @@ 
   |/     Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
+  $ hg log -G -T "default" --hidden
+  @  changeset:   3:0d0ef4bdf70e
+  |  tag:         tip
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  obsfate:     pruned
+  |  summary:     A2
+  |
+  o  changeset:   2:617adc3a144c
+  |  parent:      0:ea207398892e
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     A1
+  |
+  | x  changeset:   1:471597cad322
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    obsfate:     split as 2:617adc3a144c, 3:0d0ef4bdf70e
+  |    summary:     A0
+  |
+  o  changeset:   0:ea207398892e
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     ROOT
+  
diff -r 1943f74e8e4c -r ab0796c0fbce tests/test-obsolete.t
--- a/tests/test-obsolete.t	Thu Oct 05 15:25:18 2017 +0200
+++ b/tests/test-obsolete.t	Fri Oct 06 17:53:36 2017 +0200
@@ -946,6 +946,7 @@ 
   parent:      3:6f9641995072
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
+  obsfate:     pruned
   summary:     add obsolete_e
   
 
@@ -981,6 +982,7 @@ 
   [log.parent changeset.draft|parent:      3:6f9641995072]
   [log.user|user:        test]
   [log.date|date:        Thu Jan 01 00:00:00 1970 +0000]
+  [log.obsfate|obsfate:     pruned]
   [log.summary|summary:     add obsolete_e]