Patchwork [08,of,11,V2] obsfate: filter out current user if not in verbose

login
register
mail settings
Submitter Boris Feld
Date Oct. 11, 2017, 12:09 p.m.
Message ID <0b833ca139b7afeaf63f.1507723794@FB>
Download mbox | patch
Permalink /patch/24729/
State Accepted
Headers show

Comments

Boris Feld - Oct. 11, 2017, 12:09 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1507556052 -7200
#      Mon Oct 09 15:34:12 2017 +0200
# Node ID 0b833ca139b7afeaf63f38e2a06474b5a9699457
# Parent  b6b6cb2b16cb2c44b10113134e212bae5b47adb0
# EXP-Topic obsfatekeyword
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 0b833ca139b7
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.

Patch

diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py
--- a/mercurial/obsutil.py
+++ b/mercurial/obsutil.py
@@ -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
diff --git a/tests/test-obsmarker-template.t b/tests/test-obsmarker-template.t
--- a/tests/test-obsmarker-template.t
+++ b/tests/test-obsmarker-template.t
@@ -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
@@ -1281,14 +1281,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
@@ -1444,20 +1444,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
@@ -1831,21 +1831,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
@@ -1856,21 +1856,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
@@ -1976,22 +1976,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
@@ -2100,20 +2100,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
diff --git a/tests/test-obsolete-divergent.t b/tests/test-obsolete-divergent.t
--- a/tests/test-obsolete-divergent.t
+++ b/tests/test-obsolete-divergent.t
@@ -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
   
diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
--- a/tests/test-obsolete.t
+++ b/tests/test-obsolete.t
@@ -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
   |/
@@ -434,11 +434,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
   |/
@@ -518,7 +518,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
@@ -530,7 +530,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
   |
@@ -569,7 +569,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
@@ -593,7 +593,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
   |
@@ -636,7 +636,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
   |
@@ -925,7 +925,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
 
@@ -1095,7 +1095,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
   
@@ -1148,7 +1148,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
   
@@ -1275,7 +1275,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'!
@@ -1315,7 +1315,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
   |