tests/test-evolve-templates.t
branchmercurial-4.1
changeset 2595 54ac473663ff
parent 2594 a3fbe5293bf6
child 2596 44dd9d76afb2
child 2614 9a1c92132519
--- a/tests/test-evolve-templates.t	Wed May 31 14:21:18 2017 +0200
+++ b/tests/test-evolve-templates.t	Fri Jun 16 11:42:00 2017 +0200
@@ -16,8 +16,7 @@
   >     {if(precursors, "\n  Precursors: {precursors}")}\
   >     {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(successors, "\n  semi-colon: {join(successors, "; ")}")}\n'
   > EOF
 
 Test templates on amended commit
@@ -31,8 +30,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 +69,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,23 +85,17 @@
   | @  471f378eab4c
   |/     Successors: [d004c8f274b9]
   |      semi-colon: [d004c8f274b9]
-  |      Fate: superseed as d004c8f274b9
   o  ea207398892e
   
-  $ hg up 'desc(A1)' --hidden
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (a468dc9b3633)
-  (use 'hg evolve' to update to its successor: d004c8f274b9)
 
 Precursors template should show current revision as it is the working copy
   $ hg tlog
   o  d004c8f274b9
-  |    Precursors: a468dc9b3633
-  |    semi-colon: a468dc9b3633
-  | @  a468dc9b3633
+  |    Precursors: 471f378eab4c
+  |    semi-colon: 471f378eab4c
+  | @  471f378eab4c
   |/     Successors: [d004c8f274b9]
   |      semi-colon: [d004c8f274b9]
-  |      Fate: superseed as d004c8f274b9
   o  ea207398892e
   
 Precursors template should show the precursor as we force its display with
@@ -102,30 +104,29 @@
   o  d004c8f274b9
   |    Precursors: a468dc9b3633
   |    semi-colon: a468dc9b3633
-  | @  a468dc9b3633
+  | x  a468dc9b3633
   |/     Precursors: 471f378eab4c
   |      semi-colon: 471f378eab4c
   |      Successors: [d004c8f274b9]
   |      semi-colon: [d004c8f274b9]
-  |      Fate: superseed as d004c8f274b9
   | x  f137d23bb3e1
   | |
-  | x  471f378eab4c
+  | @  471f378eab4c
   |/     Successors: [a468dc9b3633]
   |      semi-colon: [a468dc9b3633]
-  |      Fate: superseed as a468dc9b3633
   o  ea207398892e
   
-
-  $ hg up 'desc(A2)'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg tlog
-  @  d004c8f274b9
-  |
+  o  d004c8f274b9
+  |    Precursors: 471f378eab4c
+  |    semi-colon: 471f378eab4c
+  | @  471f378eab4c
+  |/     Successors: [d004c8f274b9]
+  |      semi-colon: [d004c8f274b9]
   o  ea207398892e
   
   $ hg tlog --hidden
-  @  d004c8f274b9
+  o  d004c8f274b9
   |    Precursors: a468dc9b3633
   |    semi-colon: a468dc9b3633
   | x  a468dc9b3633
@@ -133,13 +134,11 @@
   |      semi-colon: 471f378eab4c
   |      Successors: [d004c8f274b9]
   |      semi-colon: [d004c8f274b9]
-  |      Fate: superseed as d004c8f274b9
   | x  f137d23bb3e1
   | |
-  | x  471f378eab4c
+  | @  471f378eab4c
   |/     Successors: [a468dc9b3633]
   |      semi-colon: [a468dc9b3633]
-  |      Fate: superseed as a468dc9b3633
   o  ea207398892e
   
 
@@ -244,9 +243,9 @@
   | @  471597cad322
   |/     Successors: [337fec4d2edc, f257fde29c7a]
   |      semi-colon: [337fec4d2edc, f257fde29c7a]
-  |      Fate: superseed as 337fec4d2edc,f257fde29c7a
   o  ea207398892e
   
+
   $ hg up f257fde29c7a
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
@@ -271,7 +270,6 @@
   | x  471597cad322
   |/     Successors: [337fec4d2edc, f257fde29c7a]
   |      semi-colon: [337fec4d2edc, f257fde29c7a]
-  |      Fate: superseed as 337fec4d2edc,f257fde29c7a
   o  ea207398892e
   
 Test templates with folded commit
@@ -344,32 +342,21 @@
   | @  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
   
-  $ hg up 'desc(B0)' --hidden
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (0dec01379d3b)
-  (use 'hg evolve' to update to its successor: eb5a0daa2192)
-
 Precursors template should show both precursors as they should be both
 displayed
   $ hg tlog
   o  eb5a0daa2192
-  |    Precursors: 0dec01379d3b 471f378eab4c
-  |    semi-colon: 0dec01379d3b; 471f378eab4c
-  | @  0dec01379d3b
-  | |    Successors: [eb5a0daa2192]
-  | |    semi-colon: [eb5a0daa2192]
-  | |    Fate: superseed as eb5a0daa2192
-  | x  471f378eab4c
+  |    Precursors: 471f378eab4c
+  |    semi-colon: 471f378eab4c
+  | @  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
   
   $ hg up 'desc(C0)'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  1 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
@@ -387,11 +374,9 @@
   | x  0dec01379d3b
   | |    Successors: [eb5a0daa2192]
   | |    semi-colon: [eb5a0daa2192]
-  | |    Fate: superseed as eb5a0daa2192
   | x  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
   
 
@@ -464,7 +449,7 @@
   $ hg up 'desc(A0)' --hidden
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
-  (471f378eab4c has diverged, use 'hg evolve -list --divergent' to resolve the issue)
+  (471f378eab4c has diverged, use 'hg evolve --list --divergent' to resolve the issue)
 
 Precursors template should show current revision as it is the working copy
   $ hg tlog
@@ -477,7 +462,6 @@
   | @  471f378eab4c
   |/     Successors: [fdf9bde5129a], [019fadeab383]
   |      semi-colon: [fdf9bde5129a]; [019fadeab383]
-  |      Fate: superseed as fdf9bde5129a + superseed as 019fadeab383
   o  ea207398892e
   
   $ hg up 'desc(A1)'
@@ -491,26 +475,6 @@
   |/
   o  ea207398892e
   
-Precursors template should a precursor as we force its display with --hidden
-  $ hg tlog --hidden
-  o  019fadeab383
-  |    Precursors: 65b757b745b9
-  |    semi-colon: 65b757b745b9
-  | x  65b757b745b9
-  |/     Precursors: 471f378eab4c
-  |      semi-colon: 471f378eab4c
-  |      Successors: [019fadeab383]
-  |      semi-colon: [019fadeab383]
-  |      Fate: superseed as 019fadeab383
-  | @  fdf9bde5129a
-  |/     Precursors: 471f378eab4c
-  |      semi-colon: 471f378eab4c
-  | x  471f378eab4c
-  |/     Successors: [fdf9bde5129a], [65b757b745b9]
-  |      semi-colon: [fdf9bde5129a]; [65b757b745b9]
-  |      Fate: superseed as fdf9bde5129a + superseed as 65b757b745b9
-  o  ea207398892e
-  
 Test templates with amended + folded commit
 ===========================================
 
@@ -592,54 +556,10 @@
   | @  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
-  o  ea207398892e
-  
-  $ hg up 'desc(B0)' --hidden
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  working directory parent is obsolete! (0dec01379d3b)
-  (use 'hg evolve' to update to its successor: eb5a0daa2192)
-  $ hg tlog
-  o  eb5a0daa2192
-  |    Precursors: 0dec01379d3b 471f378eab4c
-  |    semi-colon: 0dec01379d3b; 471f378eab4c
-  | @  0dec01379d3b
-  | |    Successors: [eb5a0daa2192]
-  | |    semi-colon: [eb5a0daa2192]
-  | |    Fate: superseed as eb5a0daa2192
-  | x  471f378eab4c
-  |/     Successors: [eb5a0daa2192]
-  |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed 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)
-  (use 'hg evolve' to update to its successor: eb5a0daa2192)
-  $ hg tlog
-  o  eb5a0daa2192
-  |    Precursors: 471f378eab4c b7ea6d14e664
-  |    semi-colon: 471f378eab4c; b7ea6d14e664
-  | @  b7ea6d14e664
-  | |    Successors: [eb5a0daa2192]
-  | |    semi-colon: [eb5a0daa2192]
-  | |    Fate: superseed as eb5a0daa2192
-  | x  471f378eab4c
-  |/     Successors: [eb5a0daa2192]
-  |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
-  o  ea207398892e
-  
-  $ hg up 'desc(C0)'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg tlog
-  @  eb5a0daa2192
-  |
   o  ea207398892e
   
   $ hg tlog --hidden
-  @  eb5a0daa2192
+  o  eb5a0daa2192
   |    Precursors: 471f378eab4c b7ea6d14e664
   |    semi-colon: 471f378eab4c; b7ea6d14e664
   | x  b7ea6d14e664
@@ -647,18 +567,14 @@
   | |    semi-colon: 0dec01379d3b
   | |    Successors: [eb5a0daa2192]
   | |    semi-colon: [eb5a0daa2192]
-  | |    Fate: superseed as eb5a0daa2192
   | | x  0dec01379d3b
   | |/     Successors: [b7ea6d14e664]
   | |      semi-colon: [b7ea6d14e664]
-  | |      Fate: superseed as b7ea6d14e664
-  | x  471f378eab4c
+  | @  471f378eab4c
   |/     Successors: [eb5a0daa2192]
   |      semi-colon: [eb5a0daa2192]
-  |      Fate: superseed as eb5a0daa2192
   o  ea207398892e
   
-
 Test template with pushed and pulled obs markers
 ==============================================
 
@@ -742,7 +658,6 @@
      date:        Thu Jan 01 00:00:00 1970 +0000
      summary:     ROOT
   
-
 Check templates
 ---------------
 
@@ -753,23 +668,32 @@
   | @  471f378eab4c
   |/     Successors: [7a230b46bf61]
   |      semi-colon: [7a230b46bf61]
-  |      Fate: superseed as 7a230b46bf61
   o  ea207398892e
   
-  $ hg up 'desc(A2)'
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+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
-  @  7a230b46bf61
+  @  471f378eab4c
   |
   o  ea207398892e
   
-  $ hg tlog --hidden
-  @  7a230b46bf61
-  |    Precursors: 471f378eab4c
-  |    semi-colon: 471f378eab4c
-  | x  471f378eab4c
-  |/     Successors: [7a230b46bf61]
-  |      semi-colon: [7a230b46bf61]
-  |      Fate: superseed as 7a230b46bf61
-  o  ea207398892e
-