diff -r 7abea6ea172c -r 22c05418ca71 tests/test-evolve-templates.t --- a/tests/test-evolve-templates.t Wed May 31 14:28:14 2017 +0200 +++ b/tests/test-evolve-templates.t Fri Jun 16 11:54:01 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 @@ -77,23 +76,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 +95,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 +125,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 +234,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 +261,6 @@ | x 471597cad322 |/ Successors: [337fec4d2edc, f257fde29c7a] | semi-colon: [337fec4d2edc, f257fde29c7a] - | Fate: superseed as 337fec4d2edc,f257fde29c7a o ea207398892e Test templates with folded commit @@ -344,32 +333,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 +365,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 @@ -462,7 +438,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 @@ -475,7 +451,6 @@ | @ 471f378eab4c |/ Successors: [fdf9bde5129a], [019fadeab383] | semi-colon: [fdf9bde5129a]; [019fadeab383] - | Fate: superseed as fdf9bde5129a + superseed as 019fadeab383 o ea207398892e $ hg up 'desc(A1)' @@ -489,26 +464,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 =========================================== @@ -590,54 +545,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 @@ -645,18 +556,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 ============================================== @@ -740,7 +647,6 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: ROOT - Check templates --------------- @@ -751,23 +657,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 -