tests/test-evolve-templates.t
branchstable
changeset 2594 a3fbe5293bf6
parent 2591 1991935fb603
child 2595 54ac473663ff
child 2613 3d432af2f6cd
--- a/tests/test-evolve-templates.t	Wed May 31 22:15:34 2017 +0200
+++ b/tests/test-evolve-templates.t	Fri Jun 16 11:32:21 2017 +0200
@@ -17,7 +17,9 @@
   >     {if(precursors, "\n  semi-colon: {join(precursors, "; ")}")}\
   >     {if(successors, "\n  Successors: {successors}")}\
   >     {if(successors, "\n  semi-colon: {join(successors, "; ")}")}\
-  >     {if(successors, "\n  Fate: {obsfate_quiet}")}\n'
+  >     {if(obsfate, "\n  Fate: {obsfate}")}\n'
+  > fatelog = log -G -T '{node|short}\n{if(obsfate, "  Obsfate: {obsfate}\n")}'
+  > fatelogjson = log -G -T '{node|short} {obsfate|json}\n'
   > EOF
 
 Test templates on amended commit
@@ -31,8 +33,8 @@
   $ mkcommit ROOT
   $ mkcommit A0
   $ echo 42 >> A0
-  $ hg amend -m "A1"
-  $ hg amend -m "A2"
+  $ HGUSER=test1 hg amend -m "A1" --config devel.default-date="1234567890 0"
+  $ HGUSER=test2 hg amend -m "A2" --config devel.default-date="987654321 0"
   $ hg log --hidden -G
   @  changeset:   4:d004c8f274b9
   |  tag:         tip
@@ -70,6 +72,15 @@
   (use 'hg evolve' to update to its successor: d004c8f274b9)
 
 Precursors template should show current revision as it is the working copy
+  $ hg olog tip
+  o  d004c8f274b9 (4) A2
+  |
+  x  a468dc9b3633 (3) A1
+  |    rewritten(description) by test2 (*) as d004c8f274b9 (glob)
+  |
+  @  471f378eab4c (1) A0
+       rewritten(description, content) by test1 (*) as a468dc9b3633 (glob)
+  
   $ hg tlog
   o  d004c8f274b9
   |    Precursors: 471f378eab4c
@@ -77,7 +88,33 @@
   | @  471f378eab4c
   |/     Successors: [d004c8f274b9]
   |      semi-colon: [d004c8f274b9]
-  |      Fate: superseed as d004c8f274b9
+  |      Fate: rewritten by test1, test2 as d004c8f274b9
+  |
+  o  ea207398892e
+  
+  $ hg fatelog -q
+  o  d004c8f274b9
+  |
+  | @  471f378eab4c
+  |/     Obsfate: rewritten as d004c8f274b9
+  |
+  o  ea207398892e
+  
+
+  $ hg fatelog
+  o  d004c8f274b9
+  |
+  | @  471f378eab4c
+  |/     Obsfate: rewritten by test1, test2 as d004c8f274b9
+  |
+  o  ea207398892e
+  
+  $ hg fatelog -v
+  o  d004c8f274b9
+  |
+  | @  471f378eab4c
+  |/     Obsfate: rewritten by test1, test2 as d004c8f274b9 (between * and *) (glob)
+  |
   o  ea207398892e
   
   $ hg up 'desc(A1)' --hidden
@@ -93,7 +130,8 @@
   | @  a468dc9b3633
   |/     Successors: [d004c8f274b9]
   |      semi-colon: [d004c8f274b9]
-  |      Fate: superseed as d004c8f274b9
+  |      Fate: rewritten by test2 as d004c8f274b9
+  |
   o  ea207398892e
   
 Precursors template should show the precursor as we force its display with
@@ -107,16 +145,26 @@
   |      semi-colon: 471f378eab4c
   |      Successors: [d004c8f274b9]
   |      semi-colon: [d004c8f274b9]
-  |      Fate: superseed as d004c8f274b9
+  |      Fate: rewritten by test2 as d004c8f274b9
+  |
   | x  f137d23bb3e1
+  | |    Fate: pruned
   | |
   | x  471f378eab4c
   |/     Successors: [a468dc9b3633]
   |      semi-colon: [a468dc9b3633]
-  |      Fate: superseed as a468dc9b3633
+  |      Fate: rewritten by test1 as a468dc9b3633
+  |
   o  ea207398892e
   
-
+  $ hg fatelog -v
+  o  d004c8f274b9
+  |
+  | @  a468dc9b3633
+  |/     Obsfate: rewritten by test2 as d004c8f274b9 (at *) (glob)
+  |
+  o  ea207398892e
+  
   $ hg up 'desc(A2)'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg tlog
@@ -133,16 +181,51 @@
   |      semi-colon: 471f378eab4c
   |      Successors: [d004c8f274b9]
   |      semi-colon: [d004c8f274b9]
-  |      Fate: superseed as d004c8f274b9
+  |      Fate: rewritten by test2 as d004c8f274b9
+  |
   | x  f137d23bb3e1
+  | |    Fate: pruned
   | |
   | x  471f378eab4c
   |/     Successors: [a468dc9b3633]
   |      semi-colon: [a468dc9b3633]
-  |      Fate: superseed as a468dc9b3633
+  |      Fate: rewritten by test1 as a468dc9b3633
+  |
+  o  ea207398892e
+  
+  $ hg fatelog -v
+  @  d004c8f274b9
+  |
   o  ea207398892e
   
 
+  $ hg fatelog -v --hidden
+  @  d004c8f274b9
+  |
+  | x  a468dc9b3633
+  |/     Obsfate: rewritten by test2 as d004c8f274b9 (at *) (glob)
+  |
+  | x  f137d23bb3e1
+  | |    Obsfate: pruned
+  | |
+  | x  471f378eab4c
+  |/     Obsfate: rewritten by test1 as a468dc9b3633 (at *) (glob)
+  |
+  o  ea207398892e
+  
+
+  $ hg fatelogjson --hidden
+  @  d004c8f274b9 ""
+  |
+  | x  a468dc9b3633 [{"markers": [["\udca4h\u071b63\udc8b\u0014\udcfd\udcb7\udc82_U\udcce=\udcf4\udce7\u0015\u0017\udcad", ["\udcd0\u0004\udcc8\udcf2t\udcb9\udcecH\nG\udca9\u003c\u0010\udcda\udcc5\udcee\udce6:\udcdbx"], 0, [["ef1", "1"], ["user", "test2"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["\udcd0\u0004\udcc8\udcf2t\udcb9\udcecH\nG\udca9\u003c\u0010\udcda\udcc5\udcee\udce6:\udcdbx"], "users": ["test2"], "verb": "rewritten"}] (glob)
+  |/
+  | x  f137d23bb3e1 [{"markers": [], "successors": [], "verb": "pruned"}]
+  | |
+  | x  471f378eab4c [{"markers": [["G\u001f7\udc8e\udcabL^%\udcf6\udcc7\u007fx['\udcc96\udcef\udcb2(t", ["\udca4h\u071b63\udc8b\u0014\udcfd\udcb7\udc82_U\udcce=\udcf4\udce7\u0015\u0017\udcad"], 0, [["ef1", "9"], ["user", "test1"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["\udca4h\u071b63\udc8b\u0014\udcfd\udcb7\udc82_U\udcce=\udcf4\udce7\u0015\u0017\udcad"], "users": ["test1"], "verb": "rewritten"}] (glob)
+  |/
+  o  ea207398892e ""
+  
+
 Test templates with splitted commit
 ===================================
 
@@ -244,9 +327,21 @@
   | @  471597cad322
   |/     Successors: [337fec4d2edc, f257fde29c7a]
   |      semi-colon: [337fec4d2edc, f257fde29c7a]
-  |      Fate: superseed as 337fec4d2edc,f257fde29c7a
+  |      Fate: rewritten by test as 337fec4d2edc, f257fde29c7a
+  |
   o  ea207398892e
   
+  $ hg fatelog
+  o  f257fde29c7a
+  |
+  o  337fec4d2edc
+  |
+  | @  471597cad322
+  |/     Obsfate: rewritten by test as 337fec4d2edc, f257fde29c7a
+  |
+  o  ea207398892e
+  
+
   $ hg up f257fde29c7a
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
@@ -271,9 +366,31 @@
   | x  471597cad322
   |/     Successors: [337fec4d2edc, f257fde29c7a]
   |      semi-colon: [337fec4d2edc, f257fde29c7a]
-  |      Fate: superseed as 337fec4d2edc,f257fde29c7a
+  |      Fate: rewritten by test as 337fec4d2edc, f257fde29c7a
+  |
   o  ea207398892e
   
+  $ hg fatelog --hidden
+  @  f257fde29c7a
+  |
+  o  337fec4d2edc
+  |
+  | x  471597cad322
+  |/     Obsfate: rewritten by test as 337fec4d2edc, f257fde29c7a
+  |
+  o  ea207398892e
+  
+
+  $ hg fatelogjson --hidden
+  @  f257fde29c7a ""
+  |
+  o  337fec4d2edc ""
+  |
+  | x  471597cad322 [{"markers": [["G\\u0015\\udc97\\udcca\\udcd3\\"\\udcd1\\udcf6Y\\udcbb\\u0016\\udc97Q\\udcbe\\udc913\\udcda\\udcd9.\\udcf3", ["3\\u007f\\udcecM.\\udcdc\\udcf0\\udce7\\udca4g\\udce3_\\udc81\\udc824\\udcbcb\\u0000h\\udcb5", "\\udcf2W\\udcfd\\udce2\\udc9cz\\udc84|\\udc9b`\\u007fn\\udc95\\udc86V\\udcd0\\udcdf\\u000f\\udcb1\\\\"], 0, [["ef1", "12"], ["user", "test"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["3\\u007f\\udcecM.\\udcdc\\udcf0\\udce7\\udca4g\\udce3_\\udc81\\udc824\\udcbcb\\u0000h\\udcb5", "\\udcf2W\\udcfd\\udce2\\udc9cz\\udc84|\\udc9b`\\u007fn\\udc95\\udc86V\\udcd0\\udcdf\\u000f\\udcb1\\\\"], "users": ["test"], "verb": "rewritten"}] (glob)
+  |/
+  o  ea207398892e ""
+  
+
 Test templates with folded commit
 ==============================
 
@@ -344,7 +461,16 @@
   | @  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
+  |      Fate: rewritten by test as eb5a0daa2192
+  |
+  o  ea207398892e
+  
+  $ hg fatelog
+  o  eb5a0daa2192
+  |
+  | @  471f378eab4c
+  |/     Obsfate: rewritten by test as eb5a0daa2192
+  |
   o  ea207398892e
   
   $ hg up 'desc(B0)' --hidden
@@ -361,13 +487,27 @@
   | @  0dec01379d3b
   | |    Successors: [eb5a0daa2192]
   | |    semi-colon: [eb5a0daa2192]
-  | |    Fate: superseed as eb5a0daa2192
+  | |    Fate: rewritten by test as eb5a0daa2192
+  | |
   | x  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
+  |      Fate: rewritten by test as eb5a0daa2192
+  |
   o  ea207398892e
   
+  $ hg fatelog
+  o  eb5a0daa2192
+  |
+  | @  0dec01379d3b
+  | |    Obsfate: rewritten by test as eb5a0daa2192
+  | |
+  | x  471f378eab4c
+  |/     Obsfate: rewritten by test as eb5a0daa2192
+  |
+  o  ea207398892e
+  
+
   $ hg up 'desc(C0)'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
@@ -387,13 +527,36 @@
   | x  0dec01379d3b
   | |    Successors: [eb5a0daa2192]
   | |    semi-colon: [eb5a0daa2192]
-  | |    Fate: superseed as eb5a0daa2192
+  | |    Fate: rewritten by test as eb5a0daa2192
+  | |
   | x  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
+  |      Fate: rewritten by test as eb5a0daa2192
+  |
   o  ea207398892e
   
+  $ hg fatelog --hidden
+  @  eb5a0daa2192
+  |
+  | x  0dec01379d3b
+  | |    Obsfate: rewritten by test as eb5a0daa2192
+  | |
+  | x  471f378eab4c
+  |/     Obsfate: rewritten by test as eb5a0daa2192
+  |
+  o  ea207398892e
+  
+
+  $ hg fatelogjson --hidden
+  @  eb5a0daa2192 ""
+  |
+  | x  0dec01379d3b [{"markers": [["\r\udcec\u00017\udc9d;\udce61\udc8cG\u000e\udcad1\udcb1\udcfez\udce7\udccbS\udcd5", ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], 0, [["ef1", "13"], ["user", "test"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], "users": ["test"], "verb": "rewritten"}] (glob)
+  | |
+  | x  471f378eab4c [{"markers": [["G\u001f7\udc8e\udcabL^%\udcf6\udcc7\u007fx['\udcc96\udcef\udcb2(t", ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], 0, [["ef1", "9"], ["user", "test"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], "users": ["test"], "verb": "rewritten"}] (glob)
+  |/
+  o  ea207398892e ""
+  
 
 Test templates with divergence
 ==============================
@@ -477,9 +640,23 @@
   | @  471f378eab4c
   |/     Successors: [fdf9bde5129a], [019fadeab383]
   |      semi-colon: [fdf9bde5129a]; [019fadeab383]
-  |      Fate: superseed as fdf9bde5129a + superseed as 019fadeab383
+  |      Fate: rewritten by test as fdf9bde5129a
+  |    rewritten by test as 019fadeab383
+  |
   o  ea207398892e
   
+  $ hg fatelog
+  o  019fadeab383
+  |
+  | o  fdf9bde5129a
+  |/
+  | @  471f378eab4c
+  |/     Obsfate: rewritten by test as fdf9bde5129a
+  |    rewritten by test as 019fadeab383
+  |
+  o  ea207398892e
+  
+
   $ hg up 'desc(A1)'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 Precursors template should not show precursors as it's not displayed in the
@@ -491,6 +668,14 @@
   |/
   o  ea207398892e
   
+
+  $ hg fatelog
+  o  019fadeab383
+  |
+  | @  fdf9bde5129a
+  |/
+  o  ea207398892e
+  
 Precursors template should a precursor as we force its display with --hidden
   $ hg tlog --hidden
   o  019fadeab383
@@ -501,16 +686,46 @@
   |      semi-colon: 471f378eab4c
   |      Successors: [019fadeab383]
   |      semi-colon: [019fadeab383]
-  |      Fate: superseed as 019fadeab383
+  |      Fate: rewritten by test as 019fadeab383
+  |
   | @  fdf9bde5129a
   |/     Precursors: 471f378eab4c
   |      semi-colon: 471f378eab4c
   | x  471f378eab4c
   |/     Successors: [fdf9bde5129a], [65b757b745b9]
   |      semi-colon: [fdf9bde5129a]; [65b757b745b9]
-  |      Fate: superseed as fdf9bde5129a + superseed as 65b757b745b9
+  |      Fate: rewritten by test as fdf9bde5129a
+  |    rewritten by test as 65b757b745b9
+  |
   o  ea207398892e
   
+  $ hg fatelog --hidden
+  o  019fadeab383
+  |
+  | x  65b757b745b9
+  |/     Obsfate: rewritten by test as 019fadeab383
+  |
+  | @  fdf9bde5129a
+  |/
+  | x  471f378eab4c
+  |/     Obsfate: rewritten by test as fdf9bde5129a
+  |    rewritten by test as 65b757b745b9
+  |
+  o  ea207398892e
+  
+
+  $ hg fatelogjson --hidden
+  o  019fadeab383 ""
+  |
+  | x  65b757b745b9 [{"markers": [["e\udcb7W\udcb7E\udcb95\t\u003c\udc87\udca2\udcbc\u0347u!\udccc\udccf\udcfc\udcbd", ["\u0001\udc9f\udcad\uacc3\udcf6i\udc9f\udca8:\u05fd\udcb4\udcd8.\udcd2\udcc0\udce5\udcab"], 0, [["ef1", "1"], ["user", "test"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["\u0001\udc9f\udcad\uacc3\udcf6i\udc9f\udca8:\u05fd\udcb4\udcd8.\udcd2\udcc0\udce5\udcab"], "users": ["test"], "verb": "rewritten"}] (glob)
+  |/
+  | @  fdf9bde5129a ""
+  |/
+  | x  471f378eab4c [{"markers": [["G\\u001f7\\udc8e\\udcabL^%\\udcf6\\udcc7\\u007fx['\\udcc96\\udcef\\udcb2(t", ["\\udcfd\\udcf9\\udcbd\\udce5\\u0012\\udc9a(\\udcd4T\\udc8f\\udcad\\udcd3\\udcf6+&\\\\\\udcdd;z."], 0, [["ef1", "1"], ["user", "test"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["\\udcfd\\udcf9\\udcbd\\udce5\\u0012\\udc9a(\\udcd4T\\udc8f\\udcad\\udcd3\\udcf6+&\\\\\\udcdd;z."], "users": ["test"], "verb": "rewritten"}, {"markers": [["G\\u001f7\\udc8e\\udcabL^%\\udcf6\\udcc7\\u007fx['\\udcc96\\udcef\\udcb2(t", ["e\\udcb7W\\udcb7E\\udcb95\\t\\u003c\\udc87\\udca2\\udcbc\\u0347u!\\udccc\\udccf\\udcfc\\udcbd"], 0, [["ef1", "1"], ["user", "test"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["e\\udcb7W\\udcb7E\\udcb95\\t\\u003c\\udc87\\udca2\\udcbc\\u0347u!\\udccc\\udccf\\udcfc\\udcbd"], "users": ["test"], "verb": "rewritten"}] (glob)
+  |/
+  o  ea207398892e ""
+  
+
 Test templates with amended + folded commit
 ===========================================
 
@@ -592,7 +807,16 @@
   | @  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
+  |      Fate: rewritten by test as eb5a0daa2192
+  |
+  o  ea207398892e
+  
+  $ hg fatelog
+  o  eb5a0daa2192
+  |
+  | @  471f378eab4c
+  |/     Obsfate: rewritten by test as eb5a0daa2192
+  |
   o  ea207398892e
   
   $ hg up 'desc(B0)' --hidden
@@ -606,13 +830,27 @@
   | @  0dec01379d3b
   | |    Successors: [eb5a0daa2192]
   | |    semi-colon: [eb5a0daa2192]
-  | |    Fate: superseed as eb5a0daa2192
+  | |    Fate: rewritten by test as eb5a0daa2192
+  | |
   | x  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
+  |      Fate: rewritten by test as eb5a0daa2192
+  |
   o  ea207398892e
   
+  $ hg fatelog
+  o  eb5a0daa2192
+  |
+  | @  0dec01379d3b
+  | |    Obsfate: rewritten by test as eb5a0daa2192
+  | |
+  | x  471f378eab4c
+  |/     Obsfate: rewritten by test as eb5a0daa2192
+  |
+  o  ea207398892e
+  
+
   $ hg up 'desc(B1)' --hidden
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (b7ea6d14e664)
@@ -624,13 +862,27 @@
   | @  b7ea6d14e664
   | |    Successors: [eb5a0daa2192]
   | |    semi-colon: [eb5a0daa2192]
-  | |    Fate: superseed as eb5a0daa2192
+  | |    Fate: rewritten by test as eb5a0daa2192
+  | |
   | x  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
+  |      Fate: rewritten by test as eb5a0daa2192
+  |
   o  ea207398892e
   
+  $ hg fatelog
+  o  eb5a0daa2192
+  |
+  | @  b7ea6d14e664
+  | |    Obsfate: rewritten by test as eb5a0daa2192
+  | |
+  | x  471f378eab4c
+  |/     Obsfate: rewritten by test as eb5a0daa2192
+  |
+  o  ea207398892e
+  
+
   $ hg up 'desc(C0)'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg tlog
@@ -647,17 +899,45 @@
   | |    semi-colon: 0dec01379d3b
   | |    Successors: [eb5a0daa2192]
   | |    semi-colon: [eb5a0daa2192]
-  | |    Fate: superseed as eb5a0daa2192
+  | |    Fate: rewritten by test as eb5a0daa2192
+  | |
   | | x  0dec01379d3b
   | |/     Successors: [b7ea6d14e664]
   | |      semi-colon: [b7ea6d14e664]
-  | |      Fate: superseed as b7ea6d14e664
+  | |      Fate: rewritten by test as b7ea6d14e664
+  | |
   | x  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
+  |      Fate: rewritten by test as eb5a0daa2192
+  |
   o  ea207398892e
   
+  $ hg fatelog --hidden
+  @  eb5a0daa2192
+  |
+  | x  b7ea6d14e664
+  | |    Obsfate: rewritten by test as eb5a0daa2192
+  | |
+  | | x  0dec01379d3b
+  | |/     Obsfate: rewritten by test as b7ea6d14e664
+  | |
+  | x  471f378eab4c
+  |/     Obsfate: rewritten by test as eb5a0daa2192
+  |
+  o  ea207398892e
+  
+  $ hg fatelogjson --hidden
+  @  eb5a0daa2192 ""
+  |
+  | x  b7ea6d14e664 [{"markers": [["\udcb7\udceam\u0014\udce6d\udcbd\u0212\"!\udcf7\udc99&1\udcb5\r\udca3\udcfb\u0007", ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], 0, [["ef1", "13"], ["user", "test"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], "users": ["test"], "verb": "rewritten"}] (glob)
+  | |
+  | | x  0dec01379d3b [{"markers": [["\r\udcec\u00017\udc9d;\udce61\udc8cG\u000e\udcad1\udcb1\udcfez\udce7\udccbS\udcd5", ["\udcb7\udceam\u0014\udce6d\udcbd\u0212\"!\udcf7\udc99&1\udcb5\r\udca3\udcfb\u0007"], 0, [["ef1", "1"], ["user", "test"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["\udcb7\udceam\u0014\udce6d\udcbd\u0212\"!\udcf7\udc99&1\udcb5\r\udca3\udcfb\u0007"], "users": ["test"], "verb": "rewritten"}] (glob)
+  | |/
+  | x  471f378eab4c [{"markers": [["G\u001f7\udc8e\udcabL^%\udcf6\udcc7\u007fx['\udcc96\udcef\udcb2(t", ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], 0, [["ef1", "9"], ["user", "test"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["\udcebZ\r\udcaa!\udc92;\udcbf\udc8c\udcae\udcb2\udcc4 \udc85\udcb9\udce4c\udc86\u001f\udcd0"], "users": ["test"], "verb": "rewritten"}] (glob)
+  |/
+  o  ea207398892e ""
+  
 
 Test template with pushed and pulled obs markers
 ==============================================
@@ -742,7 +1022,6 @@
      date:        Thu Jan 01 00:00:00 1970 +0000
      summary:     ROOT
   
-
 Check templates
 ---------------
 
@@ -753,7 +1032,16 @@
   | @  471f378eab4c
   |/     Successors: [7a230b46bf61]
   |      semi-colon: [7a230b46bf61]
-  |      Fate: superseed as 7a230b46bf61
+  |      Fate: rewritten by test as 7a230b46bf61
+  |
+  o  ea207398892e
+  
+  $ hg fatelog --hidden -v
+  o  7a230b46bf61
+  |
+  | @  471f378eab4c
+  |/     Obsfate: rewritten by test as 7a230b46bf61 (between * and *) (glob)
+  |
   o  ea207398892e
   
   $ hg up 'desc(A2)'
@@ -763,6 +1051,11 @@
   |
   o  ea207398892e
   
+  $ hg fatelog -v
+  @  7a230b46bf61
+  |
+  o  ea207398892e
+  
   $ hg tlog --hidden
   @  7a230b46bf61
   |    Precursors: 471f378eab4c
@@ -770,6 +1063,58 @@
   | x  471f378eab4c
   |/     Successors: [7a230b46bf61]
   |      semi-colon: [7a230b46bf61]
-  |      Fate: superseed as 7a230b46bf61
+  |      Fate: rewritten by test as 7a230b46bf61
+  |
+  o  ea207398892e
+  
+  $ hg fatelog --hidden -v
+  @  7a230b46bf61
+  |
+  | x  471f378eab4c
+  |/     Obsfate: rewritten by test as 7a230b46bf61 (between * and *) (glob)
+  |
   o  ea207398892e
   
+
+  $ hg fatelogjson --hidden
+  @  7a230b46bf61 ""
+  |
+  | x  471f378eab4c [{"markers": [["G\\u001f7\\udc8e\\udcabL^%\\udcf6\\udcc7\\u007fx['\\udcc96\\udcef\\udcb2(t", ["\\udcfd\\udcf9\\udcbd\\udce5\\u0012\\udc9a(\\udcd4T\\udc8f\\udcad\\udcd3\\udcf6+&\\\\\\udcdd;z."], 0, [["ef1", "1"], ["user", "test"]], [*, 0], null], ["\\udcfd\\udcf9\\udcbd\\udce5\\u0012\\udc9a(\\udcd4T\\udc8f\\udcad\\udcd3\\udcf6+&\\\\\\udcdd;z.", ["z#\\u000bF\\udcbfa\\udce5\\u000b00\\udc8cl\\udcfd{\\udcd1&\\udc9e\\udcf5G\\u0002"], 0, [["ef1", "1"], ["user", "test"]], [*, 0], null]], "max_date": [*, 0], "min_date": [*, 0], "successors": ["z#\\u000bF\\udcbfa\\udce5\\u000b00\\udc8cl\\udcfd{\\udcd1&\\udc9e\\udcf5G\\u0002"], "users": ["test"], "verb": "rewritten"}] (glob)
+  |/
+  o  ea207398892e ""
+  
+
+Test templates with pruned commits
+==================================
+
+Test setup
+----------
+
+  $ hg init $TESTTMP/templates-local-prune
+  $ cd $TESTTMP/templates-local-prune
+  $ mkcommit ROOT
+  $ mkcommit A0
+  $ hg prune .
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  working directory now at ea207398892e
+  1 changesets pruned
+
+Check output
+------------
+
+  $ hg up "desc(A0)" --hidden
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  working directory parent is obsolete! (471f378eab4c)
+  (use 'hg evolve' to update to its parent successor)
+  $ hg tlog
+  @  471f378eab4c
+  |    Fate: pruned
+  |
+  o  ea207398892e
+  
+  $ hg fatelog -v
+  @  471f378eab4c
+  |    Obsfate: pruned
+  |
+  o  ea207398892e
+