template: skip "fate" in test output when empty
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 29 May 2017 17:16:15 +0200
changeset 2499 8abc7066e384
parent 2498 b765650b37ee
child 2500 2092007af205
template: skip "fate" in test output when empty This should clarify the test output a bit.
tests/test-evolve-templates.t
--- a/tests/test-evolve-templates.t	Mon May 29 17:13:21 2017 +0200
+++ b/tests/test-evolve-templates.t	Mon May 29 17:16:15 2017 +0200
@@ -15,7 +15,7 @@
   > tlog = log -G -T '{node|short}\
   >     {if(precursors, "\n  Precursors: {precursors}")}\
   >     {if(successors, "\n  Successors: {successors}")}\
-  >     \n  Fate: {obsfate_quiet}\n'
+  >     {if(successors, "\n  Fate: {obsfate_quiet}")}\n'
   > EOF
 
 Test templates on amended commit
@@ -71,12 +71,11 @@
   $ hg tlog
   o  d004c8f274b9
   |    Precursors: 471f378eab4c
-  |    Fate:
   | @  471f378eab4c
   |/     Successors: [d004c8f274b9]
   |      Fate: superseed as d004c8f274b9
   o  ea207398892e
-       Fate:
+  
   $ hg up 'desc(A1)' --hidden
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (a468dc9b3633)
@@ -86,52 +85,49 @@
   $ hg tlog
   o  d004c8f274b9
   |    Precursors: a468dc9b3633
-  |    Fate:
   | @  a468dc9b3633
   |/     Successors: [d004c8f274b9]
   |      Fate: superseed as d004c8f274b9
   o  ea207398892e
-       Fate:
+  
 Precursors template should show the precursor as we force its display with
 --hidden  
   $ hg tlog --hidden
   o  d004c8f274b9
   |    Precursors: a468dc9b3633
-  |    Fate:
   | @  a468dc9b3633
   |/     Precursors: 471f378eab4c
   |      Successors: [d004c8f274b9]
   |      Fate: superseed as d004c8f274b9
   | x  f137d23bb3e1
-  | |    Fate: pruned
+  | |
   | x  471f378eab4c
   |/     Successors: [a468dc9b3633]
   |      Fate: superseed as a468dc9b3633
   o  ea207398892e
-       Fate:
+  
 
   $ hg up 'desc(A2)'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg tlog
   @  d004c8f274b9
-  |    Fate:
+  |
   o  ea207398892e
-       Fate:
+  
   $ hg tlog --hidden
   @  d004c8f274b9
   |    Precursors: a468dc9b3633
-  |    Fate:
   | x  a468dc9b3633
   |/     Precursors: 471f378eab4c
   |      Successors: [d004c8f274b9]
   |      Fate: superseed as d004c8f274b9
   | x  f137d23bb3e1
-  | |    Fate: pruned
+  | |
   | x  471f378eab4c
   |/     Successors: [a468dc9b3633]
   |      Fate: superseed as a468dc9b3633
   o  ea207398892e
-       Fate:
+  
 
 Test templates with splitted commit
 ===================================
@@ -227,15 +223,13 @@
   $ hg tlog
   o  f257fde29c7a
   |    Precursors: 471597cad322
-  |    Fate:
   o  337fec4d2edc
   |    Precursors: 471597cad322
-  |    Fate:
   | @  471597cad322
   |/     Successors: [337fec4d2edc, f257fde29c7a]
   |      Fate: superseed as 337fec4d2edc,f257fde29c7a
   o  ea207398892e
-       Fate:
+  
   $ hg up f257fde29c7a
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
@@ -243,25 +237,23 @@
 log
   $ hg tlog
   @  f257fde29c7a
-  |    Fate:
+  |
   o  337fec4d2edc
-  |    Fate:
+  |
   o  ea207398892e
-       Fate:
+  
 Precursors template should show the precursor as we force its display with
 --hidden
   $ hg tlog --hidden
   @  f257fde29c7a
   |    Precursors: 471597cad322
-  |    Fate:
   o  337fec4d2edc
   |    Precursors: 471597cad322
-  |    Fate:
   | x  471597cad322
   |/     Successors: [337fec4d2edc, f257fde29c7a]
   |      Fate: superseed as 337fec4d2edc,f257fde29c7a
   o  ea207398892e
-       Fate:
+  
 Test templates with folded commit
 ==============================
 
@@ -328,12 +320,11 @@
   $ hg tlog
   o  eb5a0daa2192
   |    Precursors: 471f378eab4c
-  |    Fate:
   | @  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
-       Fate:
+  
   $ hg up 'desc(B0)' --hidden
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (0dec01379d3b)
@@ -344,7 +335,6 @@
   $ hg tlog
   o  eb5a0daa2192
   |    Precursors: 0dec01379d3b, 471f378eab4c
-  |    Fate:
   | @  0dec01379d3b
   | |    Successors: [eb5a0daa2192]
   | |    Fate: superseed as eb5a0daa2192
@@ -352,7 +342,7 @@
   |/     Successors: [eb5a0daa2192]
   |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
-       Fate:
+  
   $ hg up 'desc(C0)'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
@@ -360,15 +350,14 @@
 log
   $ hg tlog
   @  eb5a0daa2192
-  |    Fate:
+  |
   o  ea207398892e
-       Fate:
+  
 Precursors template should show both precursors as we force its display with
 --hidden
   $ hg tlog --hidden
   @  eb5a0daa2192
   |    Precursors: 0dec01379d3b, 471f378eab4c
-  |    Fate:
   | x  0dec01379d3b
   | |    Successors: [eb5a0daa2192]
   | |    Fate: superseed as eb5a0daa2192
@@ -376,7 +365,7 @@
   |/     Successors: [eb5a0daa2192]
   |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
-       Fate:
+  
 
 Test templates with divergence
 ==============================
@@ -453,43 +442,39 @@
   $ hg tlog
   o  019fadeab383
   |    Precursors: 471f378eab4c
-  |    Fate:
   | o  fdf9bde5129a
   |/     Precursors: 471f378eab4c
-  |      Fate:
   | @  471f378eab4c
   |/     Successors: [fdf9bde5129a], [019fadeab383]
   |      Fate: superseed as fdf9bde5129a + superseed as 019fadeab383
   o  ea207398892e
-       Fate:
+  
   $ 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
 log
   $ hg tlog
   o  019fadeab383
-  |    Fate:
+  |
   | @  fdf9bde5129a
-  |/     Fate:
+  |/
   o  ea207398892e
-       Fate:
+  
 Precursors template should a precursor as we force its display with --hidden
   $ hg tlog --hidden
   o  019fadeab383
   |    Precursors: 65b757b745b9
-  |    Fate:
   | x  65b757b745b9
   |/     Precursors: 471f378eab4c
   |      Successors: [019fadeab383]
   |      Fate: superseed as 019fadeab383
   | @  fdf9bde5129a
   |/     Precursors: 471f378eab4c
-  |      Fate:
   | x  471f378eab4c
   |/     Successors: [fdf9bde5129a], [65b757b745b9]
   |      Fate: superseed as fdf9bde5129a + superseed as 65b757b745b9
   o  ea207398892e
-       Fate:
+  
 Test templates with amended + folded commit
 ===========================================
 
@@ -567,12 +552,11 @@
   $ hg tlog
   o  eb5a0daa2192
   |    Precursors: 471f378eab4c
-  |    Fate:
   | @  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
-       Fate:
+  
   $ hg up 'desc(B0)' --hidden
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (0dec01379d3b)
@@ -580,7 +564,6 @@
   $ hg tlog
   o  eb5a0daa2192
   |    Precursors: 0dec01379d3b, 471f378eab4c
-  |    Fate:
   | @  0dec01379d3b
   | |    Successors: [eb5a0daa2192]
   | |    Fate: superseed as eb5a0daa2192
@@ -588,7 +571,7 @@
   |/     Successors: [eb5a0daa2192]
   |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
-       Fate:
+  
   $ hg up 'desc(B1)' --hidden
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (b7ea6d14e664)
@@ -596,7 +579,6 @@
   $ hg tlog
   o  eb5a0daa2192
   |    Precursors: 471f378eab4c, b7ea6d14e664
-  |    Fate:
   | @  b7ea6d14e664
   | |    Successors: [eb5a0daa2192]
   | |    Fate: superseed as eb5a0daa2192
@@ -604,18 +586,17 @@
   |/     Successors: [eb5a0daa2192]
   |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
-       Fate:
+  
   $ hg up 'desc(C0)'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg tlog
   @  eb5a0daa2192
-  |    Fate:
+  |
   o  ea207398892e
-       Fate:
+  
   $ hg tlog --hidden
   @  eb5a0daa2192
   |    Precursors: 471f378eab4c, b7ea6d14e664
-  |    Fate:
   | x  b7ea6d14e664
   | |    Precursors: 0dec01379d3b
   | |    Successors: [eb5a0daa2192]
@@ -627,7 +608,7 @@
   |/     Successors: [eb5a0daa2192]
   |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
-       Fate:
+  
 
 Test template with pushed and pulled obs markers
 ==============================================
@@ -719,25 +700,23 @@
   $ hg tlog
   o  7a230b46bf61
   |    Precursors: 471f378eab4c
-  |    Fate:
   | @  471f378eab4c
   |/     Successors: [7a230b46bf61]
   |      Fate: superseed as 7a230b46bf61
   o  ea207398892e
-       Fate:
+  
   $ hg up 'desc(A2)'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg tlog
   @  7a230b46bf61
-  |    Fate:
+  |
   o  ea207398892e
-       Fate:
+  
   $ hg tlog --hidden
   @  7a230b46bf61
   |    Precursors: 471f378eab4c
-  |    Fate:
   | x  471f378eab4c
   |/     Successors: [7a230b46bf61]
   |      Fate: superseed as 7a230b46bf61
   o  ea207398892e
-       Fate:
+