changeset 34850:62a4ccf9784a

obsfate: filter out current user if not in verbose Obsolescence is sometimes used only locally so the obs-marker users is always the same. Showing the user in this case does not bring much values. In the case where multiple users rewrite the commit, display the full list of users. Also show all users in verbose mode.
author Boris Feld <boris.feld@octobus.net>
date Mon, 09 Oct 2017 15:34:12 +0200
parents 9f2891fb426c
children 6f53a53245a2
files mercurial/obsutil.py tests/test-obsmarker-template.t tests/test-obsolete-distributed.t tests/test-obsolete-divergent.t tests/test-obsolete.t
diffstat 5 files changed, 120 insertions(+), 110 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/obsutil.py	Fri Oct 06 16:23:47 2017 +0200
+++ b/mercurial/obsutil.py	Mon Oct 09 15:34:12 2017 +0200
@@ -788,6 +788,10 @@
     """ Build a obsfate string for a single successorset using all obsfate
     related function defined in obsutil
     """
+    quiet = ui.quiet
+    verbose = ui.verbose
+    normal = not verbose and not quiet
+
     line = []
 
     # Verb
@@ -805,8 +809,14 @@
 
     # Users
     users = markersusers(markers)
+    # Filter out current user in not verbose mode to reduce amount of
+    # information
+    if not verbose:
+        currentuser = ui.username(acceptempty=True)
+        if len(users) == 1 and currentuser in users:
+            users = None
 
-    if users:
+    if (verbose or normal) and users:
         line.append(" by %s" % ", ".join(users))
 
     # Date
--- a/tests/test-obsmarker-template.t	Fri Oct 06 16:23:47 2017 +0200
+++ b/tests/test-obsmarker-template.t	Mon Oct 09 15:34:12 2017 +0200
@@ -219,9 +219,9 @@
   @  d004c8f274b9
   |
   | x  a468dc9b3633
-  |/     Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000)
+  |/     Obsfate: rewritten using amend as 3:d004c8f274b9 (at 2001-04-19 04:25 +0000)
   | x  471f378eab4c
-  |/     Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000)
+  |/     Obsfate: rewritten using amend as 2:a468dc9b3633 (at 2009-02-13 23:31 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden
@@ -230,7 +230,7 @@
   | x  a468dc9b3633
   |/     Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000)
   | x  471f378eab4c
-  |/     Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000)
+  |/     Obsfate: rewritten using amend as 2:a468dc9b3633 (at 2009-02-13 23:31 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden -v
@@ -394,7 +394,7 @@
   o  337fec4d2edc
   |
   | x  471597cad322
-  |/     Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden
@@ -403,7 +403,7 @@
   o  337fec4d2edc
   |
   | x  471597cad322
-  |/     Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden -v
@@ -594,18 +594,18 @@
   @  eb5a0daa2192
   |
   | x  0dec01379d3b
-  | |    Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 3:eb5a0daa2192 (at 1970-01-01 00:00 +0000)
   | x  471f378eab4c
-  |/     Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten as 3:eb5a0daa2192 (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden
   @  eb5a0daa2192
   |
   | x  0dec01379d3b
-  | |    Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 3:eb5a0daa2192 (at 1970-01-01 00:00 +0000)
   | x  471f378eab4c
-  |/     Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten as 3:eb5a0daa2192 (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden -v
@@ -824,24 +824,24 @@
   o  019fadeab383
   |
   | x  65b757b745b9
-  |/     Obsfate: rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten using amend as 4:019fadeab383 (at 1970-01-01 00:00 +0000)
   | @  fdf9bde5129a
   |/
   | x  471f378eab4c
-  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000)
-  |      Obsfate: rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a (at 1970-01-01 00:00 +0000)
+  |      Obsfate: rewritten using amend as 3:65b757b745b9 (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden
   o  019fadeab383
   |
   | x  65b757b745b9
-  |/     Obsfate: rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten using amend as 4:019fadeab383 (at 1970-01-01 00:00 +0000)
   | @  fdf9bde5129a
   |/
   | x  471f378eab4c
-  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000)
-  |      Obsfate: rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a (at 1970-01-01 00:00 +0000)
+  |      Obsfate: rewritten using amend as 3:65b757b745b9 (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden -v
@@ -1095,22 +1095,22 @@
   @  eb5a0daa2192
   |
   | x  b7ea6d14e664
-  | |    Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 4:eb5a0daa2192 (at 1970-01-01 00:00 +0000)
   | | x  0dec01379d3b
-  | |/     Obsfate: rewritten using amend as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000)
+  | |/     Obsfate: rewritten using amend as 3:b7ea6d14e664 (at 1970-01-01 00:00 +0000)
   | x  471f378eab4c
-  |/     Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten as 4:eb5a0daa2192 (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden
   @  eb5a0daa2192
   |
   | x  b7ea6d14e664
-  | |    Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 4:eb5a0daa2192 (at 1970-01-01 00:00 +0000)
   | | x  0dec01379d3b
-  | |/     Obsfate: rewritten using amend as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000)
+  | |/     Obsfate: rewritten using amend as 3:b7ea6d14e664 (at 1970-01-01 00:00 +0000)
   | x  471f378eab4c
-  |/     Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten as 4:eb5a0daa2192 (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden -v
@@ -1282,14 +1282,14 @@
   @  7a230b46bf61
   |
   | x  471f378eab4c
-  |/     Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten using amend as 2:7a230b46bf61 (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden
   @  7a230b46bf61
   |
   | x  471f378eab4c
-  |/     Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten using amend as 2:7a230b46bf61 (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden -v
@@ -1445,20 +1445,20 @@
   o  f897c6137566
   |
   | x  0dec01379d3b
-  | |    Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000)
-  | |    Obsfate: rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 3:f897c6137566 (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 1:471f378eab4c (at 1970-01-01 00:00 +0000)
   | x  471f378eab4c
-  |/     Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten as 2:0dec01379d3b (at 1970-01-01 00:00 +0000)
   @  ea207398892e
   
   $ hg fatelogkw --hidden
   o  f897c6137566
   |
   | x  0dec01379d3b
-  | |    Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000)
-  | |    Obsfate: rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 3:f897c6137566 (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 1:471f378eab4c (at 1970-01-01 00:00 +0000)
   | x  471f378eab4c
-  |/     Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten as 2:0dec01379d3b (at 1970-01-01 00:00 +0000)
   @  ea207398892e
   
   $ hg fatelogkw --hidden -v
@@ -1832,21 +1832,21 @@
   o |  b18bc8331526
   |/
   | x  ba2ed02b0c9a
-  | |    Obsfate: rewritten using rebase as 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten using rebase as 10:eceed8f98ffc (at 1970-01-01 00:00 +0000)
   | x  4a004186e638
-  |/     Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000)
-  |      Obsfate: rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten using amend as 8:b18bc8331526 (at 1970-01-01 00:00 +0000)
+  |      Obsfate: rewritten using amend as 9:0b997eb7ceee (at 1970-01-01 00:00 +0000)
   o  dd800401bd8c
   |
   | @  9bd10a0775e4
-  |/     Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a (at 1970-01-01 00:00 +0000)
   o  f897c6137566
   |
   | x  0dec01379d3b
-  | |    Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000)
-  | |    Obsfate: rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 3:f897c6137566 (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 1:471f378eab4c (at 1970-01-01 00:00 +0000)
   | x  471f378eab4c
-  |/     Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten as 2:0dec01379d3b (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden
@@ -1857,21 +1857,21 @@
   o |  b18bc8331526
   |/
   | x  ba2ed02b0c9a
-  | |    Obsfate: rewritten using rebase as 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten using rebase as 10:eceed8f98ffc (at 1970-01-01 00:00 +0000)
   | x  4a004186e638
-  |/     Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000)
-  |      Obsfate: rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten using amend as 8:b18bc8331526 (at 1970-01-01 00:00 +0000)
+  |      Obsfate: rewritten using amend as 9:0b997eb7ceee (at 1970-01-01 00:00 +0000)
   o  dd800401bd8c
   |
   | @  9bd10a0775e4
-  |/     Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a (at 1970-01-01 00:00 +0000)
   o  f897c6137566
   |
   | x  0dec01379d3b
-  | |    Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000)
-  | |    Obsfate: rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 3:f897c6137566 (at 1970-01-01 00:00 +0000)
+  | |    Obsfate: rewritten as 1:471f378eab4c (at 1970-01-01 00:00 +0000)
   | x  471f378eab4c
-  |/     Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten as 2:0dec01379d3b (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden -v
@@ -1977,22 +1977,22 @@
 
   $ hg fatelogkw --hidden -q
   x  65b757b745b9
-  |    Obsfate: pruned by test (at 1970-01-01 00:00 +0000)
+  |    Obsfate: pruned (at 1970-01-01 00:00 +0000)
   | x  fdf9bde5129a
-  |/     Obsfate: pruned by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: pruned (at 1970-01-01 00:00 +0000)
   | @  471f378eab4c
-  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000)
-  |      Obsfate: rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a (at 1970-01-01 00:00 +0000)
+  |      Obsfate: rewritten using amend as 3:65b757b745b9 (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden
   x  65b757b745b9
-  |    Obsfate: pruned by test (at 1970-01-01 00:00 +0000)
+  |    Obsfate: pruned (at 1970-01-01 00:00 +0000)
   | x  fdf9bde5129a
-  |/     Obsfate: pruned by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: pruned (at 1970-01-01 00:00 +0000)
   | @  471f378eab4c
-  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000)
-  |      Obsfate: rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a (at 1970-01-01 00:00 +0000)
+  |      Obsfate: rewritten using amend as 3:65b757b745b9 (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden -v
@@ -2101,20 +2101,20 @@
 
   $ hg fatelogkw --hidden -q
   @  0d0ef4bdf70e
-  |    Obsfate: pruned by test (at 1970-01-01 00:00 +0000)
+  |    Obsfate: pruned (at 1970-01-01 00:00 +0000)
   o  617adc3a144c
   |
   | x  471597cad322
-  |/     Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden
   @  0d0ef4bdf70e
-  |    Obsfate: pruned by test (at 1970-01-01 00:00 +0000)
+  |    Obsfate: pruned (at 1970-01-01 00:00 +0000)
   o  617adc3a144c
   |
   | x  471597cad322
-  |/     Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000)
+  |/     Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e (at 1970-01-01 00:00 +0000)
   o  ea207398892e
   
   $ hg fatelogkw --hidden -v
--- a/tests/test-obsolete-distributed.t	Fri Oct 06 16:23:47 2017 +0200
+++ b/tests/test-obsolete-distributed.t	Mon Oct 09 15:34:12 2017 +0200
@@ -51,7 +51,7 @@
   created new head
   $ hg debugobsolete `getid 'desc("c_A0")'` `getid 'desc("c_A1")'`
   obsoleted 1 changesets
-  $ hg log -G --hidden
+  $ hg log -G --hidden -v
   @  3:e5d7dda7cd28 c_B0
   |
   | o  2:7f6b0a6f5c25 c_A1
@@ -90,7 +90,7 @@
   |/
   o  0:e82fb8d02bbf ROOT
   
-  $ hg log -G --hidden
+  $ hg log -G --hidden -v
   @  4:391a2bf12b1b c_B1
   |
   | x  3:e5d7dda7cd28 c_B0 [rewritten as 4:391a2bf12b1b by server (at 1970-01-01 00:00 +0000)]
@@ -117,7 +117,7 @@
   |
   o  0:e82fb8d02bbf ROOT
   
-  $ hg log -G --hidden
+  $ hg log -G --hidden -v
   @  3:e5d7dda7cd28 c_B0
   |
   | x  2:7f6b0a6f5c25 c_A1 [rewritten as 3:e5d7dda7cd28 by client (at 1970-01-01 00:00 +0000)]
@@ -151,7 +151,7 @@
   |
   @  0:e82fb8d02bbf ROOT
   
-  $ hg log -G --hidden
+  $ hg log -G --hidden -v
   o  4:391a2bf12b1b c_B1
   |
   | x  3:e5d7dda7cd28 c_B0 [rewritten as 4:391a2bf12b1b by server (at 1970-01-01 00:00 +0000)]
@@ -187,7 +187,7 @@
   |
   o  0:e82fb8d02bbf ROOT
   
-  $ hg -R ../server/ log -G --hidden
+  $ hg -R ../server/ log -G --hidden -v
   @  4:391a2bf12b1b c_B1
   |
   | x  3:e5d7dda7cd28 c_B0 [rewritten as 4:391a2bf12b1b by server (at 1970-01-01 00:00 +0000)]
@@ -288,7 +288,7 @@
   |
   o  0:e82fb8d02bbf ROOT
   
-  $ hg log -G --hidden
+  $ hg log -G --hidden -v
   @  5:956063ac4557 c_B1
   |
   | x  4:5ffb9e311b35 c_B0 [rewritten using amend as 5:956063ac4557 by bob (at 1970-01-01 00:00 +0000)]
@@ -335,7 +335,7 @@
   |
   o  0:e82fb8d02bbf ROOT
   
-  $ hg log -G --hidden
+  $ hg log -G --hidden -v
   @  5:77ae25d99ff0 c_B2
   |
   | x  4:3cf8de21cc22 c_B1 [rewritten using amend as 5:77ae25d99ff0 by celeste (at 1970-01-01 00:00 +0000)]
@@ -461,7 +461,7 @@
   |
   @  0:e82fb8d02bbf ROOT
   
-  $ hg log -G --hidden
+  $ hg log -G --hidden -v
   x  6:956063ac4557 c_B1 [rewritten using amend, rebase as 4:77ae25d99ff0 by celeste (at 1970-01-01 00:00 +0000)]
   |
   x  5:5b5708a437f2 c_A1 [rewritten using amend as 3:9866d64649a5 by celeste (at 1970-01-01 00:00 +0000)]
--- a/tests/test-obsolete-divergent.t	Fri Oct 06 16:23:47 2017 +0200
+++ b/tests/test-obsolete-divergent.t	Mon Oct 09 15:34:12 2017 +0200
@@ -66,7 +66,7 @@
   |
   | o  2:82623d38b9ba A_1
   |/
-  | x  1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba by test (at 1970-01-01 00:00 +0000); rewritten as 3:392fd25390da by test (at 1970-01-01 00:00 +0000)]
+  | x  1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba (at 1970-01-01 00:00 +0000); rewritten as 3:392fd25390da (at 1970-01-01 00:00 +0000)]
   |/
   @  0:d20a80d4def3 base
   
@@ -127,11 +127,11 @@
   $ hg log -G --hidden
   @  4:01f36c5a8fda A_3
   |
-  | x  3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda by test (at 1970-01-01 00:00 +0000)]
+  | x  3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda (at 1970-01-01 00:00 +0000)]
   |/
   | o  2:82623d38b9ba A_1
   |/
-  | x  1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba by test (at 1970-01-01 00:00 +0000); rewritten as 3:392fd25390da by test (at 1970-01-01 00:00 +0000)]
+  | x  1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba (at 1970-01-01 00:00 +0000); rewritten as 3:392fd25390da (at 1970-01-01 00:00 +0000)]
   |/
   o  0:d20a80d4def3 base
   
@@ -185,7 +185,7 @@
   |
   | o  2:82623d38b9ba A_1
   |/
-  | x  1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba by test (at 1970-01-01 00:00 +0000); rewritten as 3:392fd25390da by test (at 1970-01-01 00:00 +0000)]
+  | x  1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba (at 1970-01-01 00:00 +0000); rewritten as 3:392fd25390da (at 1970-01-01 00:00 +0000)]
   |/
   @  0:d20a80d4def3 base
   
@@ -259,11 +259,11 @@
   $ hg log -G --hidden
   @  4:01f36c5a8fda A_3
   |
-  | x  3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda by test (at 1970-01-01 00:00 +0000)]
+  | x  3:392fd25390da A_2 [rewritten as 4:01f36c5a8fda (at 1970-01-01 00:00 +0000)]
   |/
-  | x  2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda by test (at 1970-01-01 00:00 +0000)]
+  | x  2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda (at 1970-01-01 00:00 +0000)]
   |/
-  | x  1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba by test (at 1970-01-01 00:00 +0000); rewritten as 3:392fd25390da by test (at 1970-01-01 00:00 +0000)]
+  | x  1:007dc284c1f8 A_0 [rewritten as 2:82623d38b9ba (at 1970-01-01 00:00 +0000); rewritten as 3:392fd25390da (at 1970-01-01 00:00 +0000)]
   |/
   o  0:d20a80d4def3 base
   
@@ -309,7 +309,7 @@
   |
   | o  2:82623d38b9ba A_1
   |/
-  | x  1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da by test (at 1970-01-01 00:00 +0000)]
+  | x  1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da (at 1970-01-01 00:00 +0000)]
   |/
   @  0:d20a80d4def3 base
   
@@ -361,15 +361,15 @@
   $ hg log -G --hidden
   @  6:e442cfc57690 A_5
   |
-  | x  5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690 by test (at 1970-01-01 00:00 +0000)]
+  | x  5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690 (at 1970-01-01 00:00 +0000)]
   |/
   | o  4:01f36c5a8fda A_3
   |/
-  | x  3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a by test (at 1970-01-01 00:00 +0000)]
+  | x  3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a (at 1970-01-01 00:00 +0000)]
   |/
-  | x  2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda by test (at 1970-01-01 00:00 +0000)]
+  | x  2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda (at 1970-01-01 00:00 +0000)]
   |/
-  | x  1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da by test (at 1970-01-01 00:00 +0000)]
+  | x  1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da (at 1970-01-01 00:00 +0000)]
   |/
   o  0:d20a80d4def3 base
   
@@ -437,19 +437,19 @@
   |/
   | o  8:7ae126973a96 A_7
   |/
-  | x  7:3750ebee865d B_0 [rewritten as 3:392fd25390da by test (at 1970-01-01 00:00 +0000)]
+  | x  7:3750ebee865d B_0 [rewritten as 3:392fd25390da (at 1970-01-01 00:00 +0000)]
   | |
-  | x  6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a by test (at 1970-01-01 00:00 +0000); split as 8:7ae126973a96, 9:14608b260df8 by test (at 1970-01-01 00:00 +0000)]
+  | x  6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a (at 1970-01-01 00:00 +0000); split as 8:7ae126973a96, 9:14608b260df8 (at 1970-01-01 00:00 +0000)]
   |/
-  | x  5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690 by test (at 1970-01-01 00:00 +0000)]
+  | x  5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690 (at 1970-01-01 00:00 +0000)]
   |/
   | o  4:01f36c5a8fda A_3
   |/
-  | x  3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a by test (at 1970-01-01 00:00 +0000)]
+  | x  3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a (at 1970-01-01 00:00 +0000)]
   |/
-  | x  2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda by test (at 1970-01-01 00:00 +0000)]
+  | x  2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda (at 1970-01-01 00:00 +0000)]
   |/
-  | x  1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da by test (at 1970-01-01 00:00 +0000)]
+  | x  1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da (at 1970-01-01 00:00 +0000)]
   |/
   @  0:d20a80d4def3 base
   
@@ -535,25 +535,25 @@
   $ hg log -G --hidden
   o  11:a139f71be9da A_A
   |
-  | x  10:bed64f5d2f5a A_9 [rewritten as 11:a139f71be9da by test (at 1970-01-01 00:00 +0000)]
+  | x  10:bed64f5d2f5a A_9 [rewritten as 11:a139f71be9da (at 1970-01-01 00:00 +0000)]
   |/
-  | x  9:14608b260df8 A_8 [rewritten as 11:a139f71be9da by test (at 1970-01-01 00:00 +0000)]
+  | x  9:14608b260df8 A_8 [rewritten as 11:a139f71be9da (at 1970-01-01 00:00 +0000)]
   |/
-  | x  8:7ae126973a96 A_7 [rewritten as 11:a139f71be9da by test (at 1970-01-01 00:00 +0000)]
+  | x  8:7ae126973a96 A_7 [rewritten as 11:a139f71be9da (at 1970-01-01 00:00 +0000)]
   |/
-  | x  7:3750ebee865d B_0 [rewritten as 3:392fd25390da by test (at 1970-01-01 00:00 +0000)]
+  | x  7:3750ebee865d B_0 [rewritten as 3:392fd25390da (at 1970-01-01 00:00 +0000)]
   | |
-  | x  6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a by test (at 1970-01-01 00:00 +0000); split as 8:7ae126973a96, 9:14608b260df8 by test (at 1970-01-01 00:00 +0000)]
+  | x  6:e442cfc57690 A_5 [rewritten as 10:bed64f5d2f5a (at 1970-01-01 00:00 +0000); split as 8:7ae126973a96, 9:14608b260df8 (at 1970-01-01 00:00 +0000)]
   |/
-  | x  5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690 by test (at 1970-01-01 00:00 +0000)]
+  | x  5:6a411f0d7a0a A_4 [rewritten as 6:e442cfc57690 (at 1970-01-01 00:00 +0000)]
   |/
   | o  4:01f36c5a8fda A_3
   |/
-  | x  3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a by test (at 1970-01-01 00:00 +0000)]
+  | x  3:392fd25390da A_2 [rewritten as 5:6a411f0d7a0a (at 1970-01-01 00:00 +0000)]
   |/
-  | x  2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda by test (at 1970-01-01 00:00 +0000)]
+  | x  2:82623d38b9ba A_1 [rewritten as 4:01f36c5a8fda (at 1970-01-01 00:00 +0000)]
   |/
-  | x  1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da by test (at 1970-01-01 00:00 +0000)]
+  | x  1:007dc284c1f8 A_0 [split as 2:82623d38b9ba, 3:392fd25390da (at 1970-01-01 00:00 +0000)]
   |/
   @  0:d20a80d4def3 base
   
--- a/tests/test-obsolete.t	Fri Oct 06 16:23:47 2017 +0200
+++ b/tests/test-obsolete.t	Mon Oct 09 15:34:12 2017 +0200
@@ -159,9 +159,9 @@
   5:5601fb93a350 (draft) [tip ] add new_3_c
   $ hg heads --hidden
   5:5601fb93a350 (draft) [tip ] add new_3_c
-  4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350 by test (between 1970-01-01 00:22 +0000 and 1970-01-01 00:22 +0000)]
-  3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9 by test (at 1970-01-01 00:22 +0000)]
-  2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163 by test (at 1970-01-01 00:00 -0002)]
+  4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350 (between 1970-01-01 00:22 +0000 and 1970-01-01 00:22 +0000)]
+  3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9 (at 1970-01-01 00:22 +0000)]
+  2:245bde4270cd (draft *obsolete*) [ ] add original_c [rewritten as 3:cdbce2fbb163 (at 1970-01-01 00:00 -0002)]
 
 
 check that summary does not report them
@@ -277,11 +277,11 @@
   $ hg log -G --hidden
   @  6:6f9641995072 (draft) [tip ] add n3w_3_c
   |
-  | x  5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072 by test (at 1970-01-01 00:22 +0000)]
+  | x  5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072 (at 1970-01-01 00:22 +0000)]
   |/
-  | x  4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350 by test (between 1970-01-01 00:22 +0000 and 1970-01-01 00:22 +0000)]
+  | x  4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350 (between 1970-01-01 00:22 +0000 and 1970-01-01 00:22 +0000)]
   |/
-  | x  3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9 by test (at 1970-01-01 00:22 +0000)]
+  | x  3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9 (at 1970-01-01 00:22 +0000)]
   |/
   | o  2:245bde4270cd (public) [ ] add original_c
   |/
@@ -435,11 +435,11 @@
   $ hg -R clone-dest log -G --hidden
   @  6:6f9641995072 (draft) [tip ] add n3w_3_c
   |
-  | x  5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072 by test (at 1970-01-01 00:22 +0000)]
+  | x  5:5601fb93a350 (draft *obsolete*) [ ] add new_3_c [rewritten as 6:6f9641995072 (at 1970-01-01 00:22 +0000)]
   |/
-  | x  4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350 by test (between 1970-01-01 00:22 +0000 and 1970-01-01 00:22 +0000)]
+  | x  4:ca819180edb9 (draft *obsolete*) [ ] add new_2_c [rewritten as 5:5601fb93a350 (between 1970-01-01 00:22 +0000 and 1970-01-01 00:22 +0000)]
   |/
-  | x  3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9 by test (at 1970-01-01 00:22 +0000)]
+  | x  3:cdbce2fbb163 (draft *obsolete*) [ ] add new_c [rewritten as 4:ca819180edb9 (at 1970-01-01 00:22 +0000)]
   |/
   | o  2:245bde4270cd (public) [ ] add original_c
   |/
@@ -520,7 +520,7 @@
   $ hg debugobsolete | grep `getid original_d`
   94b33453f93bdb8d457ef9b770851a618bf413e1 0 {6f96419950729f3671185b847352890f074f7557} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   $ hg log -r 'obsolete()'
-  4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned by test (at 1970-01-01 00:00 +0000)]
+  4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned (at 1970-01-01 00:00 +0000)]
   $ hg summary
   parent: 5:cda648ca50f5 tip (orphan)
    add original_e
@@ -532,7 +532,7 @@
   $ hg log -G -r '::orphan()'
   @  5:cda648ca50f5 (draft orphan) [tip ] add original_e
   |
-  x  4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned by test (at 1970-01-01 00:00 +0000)]
+  x  4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned (at 1970-01-01 00:00 +0000)]
   |
   o  3:6f9641995072 (draft) [ ] add n3w_3_c
   |
@@ -571,7 +571,7 @@
   1:7c3bad9141dc (public) [ ] add b
   2:245bde4270cd (public) [ ] add original_c
   3:6f9641995072 (draft) [ ] add n3w_3_c
-  4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned by test (at 1970-01-01 00:00 +0000)]
+  4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned (at 1970-01-01 00:00 +0000)]
   5:cda648ca50f5 (draft orphan) [tip ] add original_e
   $ hg push ../tmpf -f # -f because be push unstable too
   pushing to ../tmpf
@@ -595,7 +595,7 @@
   $ hg log -G
   @  5:cda648ca50f5 (draft orphan) [tip ] add original_e
   |
-  x  4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned by test (at 1970-01-01 00:00 +0000)]
+  x  4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned (at 1970-01-01 00:00 +0000)]
   |
   o  3:6f9641995072 (draft) [ ] add n3w_3_c
   |
@@ -638,7 +638,7 @@
   |
   | x  5:cda648ca50f5 (draft *obsolete*) [ ] add original_e [rewritten as 6:3de5eca88c00 by test <test@example.net> (at 1970-01-01 00:00 +0000)]
   | |
-  | x  4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned by test (at 1970-01-01 00:00 +0000)]
+  | x  4:94b33453f93b (draft *obsolete*) [ ] add original_d [pruned (at 1970-01-01 00:00 +0000)]
   |/
   o  3:6f9641995072 (draft) [ ] add n3w_3_c
   |
@@ -928,7 +928,7 @@
 test the "obsolete" templatekw
 
   $ hg log -r 'obsolete()'
-  6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned by test (at 1970-01-01 00:00 +0000)]
+  6:3de5eca88c00 (draft *obsolete*) [ ] add obsolete_e [pruned (at 1970-01-01 00:00 +0000)]
 
 test the "troubles" templatekw
 
@@ -1098,7 +1098,7 @@
   $ hg log -G
   @  2:323a9c3ddd91 (draft) [tip ] A
   |
-  | x  1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91 by test (at 1970-01-01 00:00 +0000)]
+  | x  1:29f0c6921ddd (draft *obsolete*) [visible ] A [rewritten using amend as 2:323a9c3ddd91 (at 1970-01-01 00:00 +0000)]
   |/
   o  0:d20a80d4def3 (draft) [ ] base
   
@@ -1152,7 +1152,7 @@
   $ hg log -G --hidden
   @  2:b7d587542d40 (draft) [tip ] B+
   |
-  | x  1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40 by test (at 1970-01-01 00:00 +0000)]
+  | x  1:44526ebb0f98 (draft *obsolete*) [ ] B [rewritten using amend as 2:b7d587542d40 (at 1970-01-01 00:00 +0000)]
   |/
   o  0:4b34ecfb0d56 (draft) [ ] A
   
@@ -1279,7 +1279,7 @@
   $ hg commit --amend -m "message"
   $ hg book bookb -r 13bedc178fce --hidden
   $ hg log -r 13bedc178fce
-  4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753 by test (at 1970-01-01 00:00 +0000)]
+  4:13bedc178fce (draft *obsolete*) [ bookb] add b [rewritten using amend as 5:a9b1f8652753 (at 1970-01-01 00:00 +0000)]
   $ hg book -d bookb
   $ hg log -r 13bedc178fce
   abort: hidden revision '13bedc178fce'!
@@ -1319,7 +1319,7 @@
   $ hg log -G --hidden
   @  3:b0551702f918 (draft) [tip ] 2
   |
-  | x  2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918 by test (at 1970-01-01 00:00 +0000)]
+  | x  2:e008cf283490 (draft *obsolete*) [ ] 2 [rewritten using amend as 3:b0551702f918 (at 1970-01-01 00:00 +0000)]
   |/
   o  1:e016b03fd86f (draft) [ ] 1
   |