tests/test-obsmarker-template.t
author Pulkit Goyal <7895pulkit@gmail.com>
Tue, 10 Oct 2017 02:25:03 +0530
changeset 34846 f05a6e015ecc
parent 34661 eb586ed5d8ce
child 34848 6a6371d2970e
permissions -rw-r--r--
copies: add a config to limit the number of candidates to check in heuristics The heuristics algorithm find possible candidates for move/copy and then check whether they are actually a copy or move. In some cases, there can be lot of candidates possible which can actually slow down the algorithm. This patch introduces a config option `experimental.copytrace.movecandidateslimit` using which one can limit the candidates to check. The limit defaults to 100. Thanks to Yuya for suggesting to skip copytracing for that file with a warning. Differential Revision: https://phab.mercurial-scm.org/D987
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     1
This test file test the various templates related to obsmarkers.
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     2
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     3
Global setup
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     4
============
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     5
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     6
  $ . $TESTDIR/testlib/obsmarker-common.sh
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     7
  $ cat >> $HGRCPATH <<EOF
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     8
  > [ui]
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
     9
  > interactive = true
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    10
  > [phases]
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    11
  > publish=False
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    12
  > [experimental]
33773
6c1a9fd8361b test: update evolution config
Boris Feld <boris.feld@octobus.net>
parents: 33688
diff changeset
    13
  > stabilization=all
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
    14
  > [templates]
33996
98fa777cd7a1 template: better prune support in obsfate
Boris Feld <boris.feld@octobus.net>
parents: 33995
diff changeset
    15
  > obsfatesuccessors = "{if(successors, " as ")}{join(successors, ", ")}"
33993
3d0f8918351b template: compute verb in obsfateverb
Boris Feld <boris.feld@octobus.net>
parents: 33912
diff changeset
    16
  > obsfateverb = "{obsfateverb(successors)}"
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
    17
  > obsfateoperations = "{if(obsfateoperations(markers), " using {join(obsfateoperations(markers), ", ")}")}"
33994
38f08eaba6b0 template: compute user in obsfateusers
Boris Feld <boris.feld@octobus.net>
parents: 33993
diff changeset
    18
  > obsfateusers = "{if(obsfateusers(markers), " by {join(obsfateusers(markers), ", ")}")}"
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
    19
  > obsfatedate = "{if(obsfatedate(markers), "{ifeq(min(obsfatedate(markers)), max(obsfatedate(markers)), " (at {min(obsfatedate(markers))|isodate})", " (between {min(obsfatedate(markers))|isodate} and {max(obsfatedate(markers))|isodate})")}")}"
34576
50b46054b869 test: rename obsfate template alias
Boris Feld <boris.feld@octobus.net>
parents: 34575
diff changeset
    20
  > obsfatetempl = "{obsfateverb}{obsfateoperations}{obsfatesuccessors}{obsfateusers}{obsfatedate}; "
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    21
  > [alias]
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    22
  > tlog = log -G -T '{node|short}\
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    23
  >     {if(predecessors, "\n  Predecessors: {predecessors}")}\
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    24
  >     {if(predecessors, "\n  semi-colon: {join(predecessors, "; ")}")}\
32909
89610c586fa2 templatekw: reference predecessor node id as {node} in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32879
diff changeset
    25
  >     {if(predecessors, "\n  json: {predecessors|json}")}\
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
    26
  >     {if(predecessors, "\n  map: {join(predecessors % "{rev}:{node}", " ")}")}\
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
    27
  >     {if(successorssets, "\n  Successors: {successorssets}")}\
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
    28
  >     {if(successorssets, "\n  multi-line: {join(successorssets, "\n  multi-line: ")}")}\
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
    29
  >     {if(successorssets, "\n  json: {successorssets|json}")}\n'
34576
50b46054b869 test: rename obsfate template alias
Boris Feld <boris.feld@octobus.net>
parents: 34575
diff changeset
    30
  > fatelog = log -G -T '{node|short}\n{if(succsandmarkers, "  Obsfate: {succsandmarkers % "{obsfatetempl}"} \n" )}'
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
    31
  > fatelogjson = log -G -T '{node|short}\n{if(succsandmarkers, "  Obsfate: {succsandmarkers|json}\n")}'
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    32
  > EOF
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    33
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    34
Test templates on amended commit
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    35
================================
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    36
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    37
Test setup
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    38
----------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    39
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    40
  $ hg init $TESTTMP/templates-local-amend
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    41
  $ cd $TESTTMP/templates-local-amend
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    42
  $ mkcommit ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    43
  $ mkcommit A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    44
  $ echo 42 >> A0
34578
794018ed8af0 test: use current user in the multi-user amend scenario
Boris Feld <boris.feld@octobus.net>
parents: 34577
diff changeset
    45
  $ hg commit --amend -m "A1" --config devel.default-date="1234567890 0"
34575
dc91580a0a88 obsolete: add a devel.user.obsmarker
Boris Feld <boris.feld@octobus.net>
parents: 34287
diff changeset
    46
  $ hg commit --amend -m "A2" --config devel.default-date="987654321 0" --config devel.user.obsmarker=test2
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    47
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    48
  $ hg log --hidden -G
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
    49
  @  changeset:   3:d004c8f274b9
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    50
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    51
  |  parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    52
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    53
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    54
  |  summary:     A2
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    55
  |
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
    56
  | x  changeset:   2:a468dc9b3633
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    57
  |/   parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    58
  |    user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    59
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    60
  |    summary:     A1
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    61
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    62
  | x  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    63
  |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    64
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    65
  |    summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    66
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    67
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    68
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    69
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    70
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    71
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    72
Check templates
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    73
---------------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    74
  $ hg up 'desc(A0)' --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    75
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    76
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    77
Predecessors template should show current revision as it is the working copy
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    78
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    79
  o  d004c8f274b9
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
    80
  |    Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
    81
  |    semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    82
  |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
    83
  |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    84
  | @  471f378eab4c
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
    85
  |/     Successors: 3:d004c8f274b9
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
    86
  |      multi-line: 3:d004c8f274b9
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
    87
  |      json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    88
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    89
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
    90
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
    91
  o  d004c8f274b9
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
    92
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
    93
  | @  471f378eab4c
34578
794018ed8af0 test: use current user in the multi-user amend scenario
Boris Feld <boris.feld@octobus.net>
parents: 34577
diff changeset
    94
  |/     Obsfate: rewritten using amend as 3:d004c8f274b9 by test, test2 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
    95
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
    96
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    97
  $ hg up 'desc(A1)' --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    98
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
    99
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   100
Predecessors template should show current revision as it is the working copy
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   101
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   102
  o  d004c8f274b9
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   103
  |    Predecessors: 2:a468dc9b3633
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   104
  |    semi-colon: 2:a468dc9b3633
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   105
  |    json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   106
  |    map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   107
  | @  a468dc9b3633
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   108
  |/     Successors: 3:d004c8f274b9
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   109
  |      multi-line: 3:d004c8f274b9
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   110
  |      json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   111
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   112
  
34577
3c1bb8a4275d test: cleanup verbosity variant from fatelog test
Boris Feld <boris.feld@octobus.net>
parents: 34576
diff changeset
   113
  $ hg fatelog
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   114
  o  d004c8f274b9
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   115
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   116
  | @  a468dc9b3633
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
   117
  |/     Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   118
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   119
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   120
Predecessors template should show all the predecessors as we force their display
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   121
with --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   122
  $ hg tlog --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   123
  o  d004c8f274b9
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   124
  |    Predecessors: 2:a468dc9b3633
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   125
  |    semi-colon: 2:a468dc9b3633
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   126
  |    json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   127
  |    map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   128
  | @  a468dc9b3633
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   129
  |/     Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   130
  |      semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   131
  |      json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   132
  |      map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   133
  |      Successors: 3:d004c8f274b9
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   134
  |      multi-line: 3:d004c8f274b9
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   135
  |      json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   136
  | x  471f378eab4c
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   137
  |/     Successors: 2:a468dc9b3633
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   138
  |      multi-line: 2:a468dc9b3633
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   139
  |      json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   140
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   141
  
34577
3c1bb8a4275d test: cleanup verbosity variant from fatelog test
Boris Feld <boris.feld@octobus.net>
parents: 34576
diff changeset
   142
  $ hg fatelog --hidden
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   143
  o  d004c8f274b9
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   144
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   145
  | @  a468dc9b3633
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
   146
  |/     Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   147
  | x  471f378eab4c
34578
794018ed8af0 test: use current user in the multi-user amend scenario
Boris Feld <boris.feld@octobus.net>
parents: 34577
diff changeset
   148
  |/     Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   149
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   150
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   151
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   152
Predecessors template shouldn't show anything as all obsolete commit are not
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   153
visible.
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   154
  $ hg up 'desc(A2)'
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   155
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   156
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   157
  @  d004c8f274b9
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   158
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   159
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   160
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   161
  $ hg tlog --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   162
  @  d004c8f274b9
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   163
  |    Predecessors: 2:a468dc9b3633
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   164
  |    semi-colon: 2:a468dc9b3633
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   165
  |    json: ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   166
  |    map: 2:a468dc9b36338b14fdb7825f55ce3df4e71517ad
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   167
  | x  a468dc9b3633
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   168
  |/     Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   169
  |      semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   170
  |      json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   171
  |      map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   172
  |      Successors: 3:d004c8f274b9
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   173
  |      multi-line: 3:d004c8f274b9
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   174
  |      json: [["d004c8f274b9ec480a47a93c10dac5eee63adb78"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   175
  | x  471f378eab4c
34085
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   176
  |/     Successors: 2:a468dc9b3633
e8a7c1a0565a cmdutil: remove the redundant commit during amend
Saurabh Singh <singhsrb@fb.com>
parents: 33997
diff changeset
   177
  |      multi-line: 2:a468dc9b3633
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   178
  |      json: [["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   179
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   180
  
34577
3c1bb8a4275d test: cleanup verbosity variant from fatelog test
Boris Feld <boris.feld@octobus.net>
parents: 34576
diff changeset
   181
  $ hg fatelog
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   182
  @  d004c8f274b9
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   183
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   184
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   185
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   186
34577
3c1bb8a4275d test: cleanup verbosity variant from fatelog test
Boris Feld <boris.feld@octobus.net>
parents: 34576
diff changeset
   187
  $ hg fatelog --hidden
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   188
  @  d004c8f274b9
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   189
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   190
  | x  a468dc9b3633
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
   191
  |/     Obsfate: rewritten using amend as 3:d004c8f274b9 by test2 (at 2001-04-19 04:25 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   192
  | x  471f378eab4c
34578
794018ed8af0 test: use current user in the multi-user amend scenario
Boris Feld <boris.feld@octobus.net>
parents: 34577
diff changeset
   193
  |/     Obsfate: rewritten using amend as 2:a468dc9b3633 by test (at 2009-02-13 23:31 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   194
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   195
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   196
  $ hg fatelogjson --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   197
  @  d004c8f274b9
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   198
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   199
  | x  a468dc9b3633
34286
ecc96506c49d obsmarker: track operation by default
Martin von Zweigbergk <martinvonz@google.com>
parents: 34085
diff changeset
   200
  |/     Obsfate: [{"markers": [["a468dc9b36338b14fdb7825f55ce3df4e71517ad", ["d004c8f274b9ec480a47a93c10dac5eee63adb78"], 0, [["operation", "amend"], ["user", "test2"]], [987654321.0, 0], null]], "successors": ["d004c8f274b9ec480a47a93c10dac5eee63adb78"]}]
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   201
  | x  471f378eab4c
34578
794018ed8af0 test: use current user in the multi-user amend scenario
Boris Feld <boris.feld@octobus.net>
parents: 34577
diff changeset
   202
  |/     Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"], 0, [["operation", "amend"], ["user", "test"]], [1234567890.0, 0], null]], "successors": ["a468dc9b36338b14fdb7825f55ce3df4e71517ad"]}]
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   203
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   204
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   205
Test templates with splitted commit
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   206
===================================
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   207
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   208
  $ hg init $TESTTMP/templates-local-split
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   209
  $ cd $TESTTMP/templates-local-split
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   210
  $ mkcommit ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   211
  $ echo 42 >> a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   212
  $ echo 43 >> b
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   213
  $ hg commit -A -m "A0"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   214
  adding a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   215
  adding b
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   216
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   217
  @  changeset:   1:471597cad322
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   218
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   219
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   220
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   221
  |  summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   222
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   223
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   224
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   225
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   226
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   227
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   228
# Simulate split
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   229
  $ hg up -r "desc(ROOT)"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   230
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   231
  $ echo 42 >> a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   232
  $ hg commit -A -m "A0"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   233
  adding a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   234
  created new head
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   235
  $ echo 43 >> b
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   236
  $ hg commit -A -m "A0"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   237
  adding b
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   238
  $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33276
diff changeset
   239
  obsoleted 1 changesets
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   240
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   241
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   242
  @  changeset:   3:f257fde29c7a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   243
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   244
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   245
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   246
  |  summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   247
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   248
  o  changeset:   2:337fec4d2edc
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   249
  |  parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   250
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   251
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   252
  |  summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   253
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   254
  | x  changeset:   1:471597cad322
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   255
  |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   256
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   257
  |    summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   258
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   259
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   260
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   261
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   262
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   263
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   264
Check templates
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   265
---------------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   266
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   267
  $ hg up 'obsolete()' --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   268
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   269
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   270
Predecessors template should show current revision as it is the working copy
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   271
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   272
  o  f257fde29c7a
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   273
  |    Predecessors: 1:471597cad322
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   274
  |    semi-colon: 1:471597cad322
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   275
  |    json: ["471597cad322d1f659bb169751be9133dad92ef3"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   276
  |    map: 1:471597cad322d1f659bb169751be9133dad92ef3
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   277
  o  337fec4d2edc
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   278
  |    Predecessors: 1:471597cad322
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   279
  |    semi-colon: 1:471597cad322
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   280
  |    json: ["471597cad322d1f659bb169751be9133dad92ef3"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   281
  |    map: 1:471597cad322d1f659bb169751be9133dad92ef3
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   282
  | @  471597cad322
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   283
  |/     Successors: 2:337fec4d2edc 3:f257fde29c7a
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   284
  |      multi-line: 2:337fec4d2edc 3:f257fde29c7a
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   285
  |      json: [["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   286
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   287
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   288
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   289
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   290
  o  f257fde29c7a
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   291
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   292
  o  337fec4d2edc
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   293
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   294
  | @  471597cad322
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   295
  |/     Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   296
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   297
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   298
  $ hg up f257fde29c7a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   299
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   300
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   301
Predecessors template should not show a predecessor as it's not displayed in
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   302
the log
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   303
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   304
  @  f257fde29c7a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   305
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   306
  o  337fec4d2edc
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   307
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   308
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   309
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   310
Predecessors template should show both predecessors as we force their display
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   311
with --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   312
  $ hg tlog --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   313
  @  f257fde29c7a
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   314
  |    Predecessors: 1:471597cad322
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   315
  |    semi-colon: 1:471597cad322
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   316
  |    json: ["471597cad322d1f659bb169751be9133dad92ef3"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   317
  |    map: 1:471597cad322d1f659bb169751be9133dad92ef3
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   318
  o  337fec4d2edc
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   319
  |    Predecessors: 1:471597cad322
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   320
  |    semi-colon: 1:471597cad322
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   321
  |    json: ["471597cad322d1f659bb169751be9133dad92ef3"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   322
  |    map: 1:471597cad322d1f659bb169751be9133dad92ef3
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   323
  | x  471597cad322
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   324
  |/     Successors: 2:337fec4d2edc 3:f257fde29c7a
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   325
  |      multi-line: 2:337fec4d2edc 3:f257fde29c7a
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   326
  |      json: [["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   327
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   328
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   329
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   330
  $ hg fatelog --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   331
  @  f257fde29c7a
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   332
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   333
  o  337fec4d2edc
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   334
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   335
  | x  471597cad322
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   336
  |/     Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   337
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   338
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   339
  $ hg fatelogjson --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   340
  @  f257fde29c7a
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   341
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   342
  o  337fec4d2edc
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   343
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   344
  | x  471597cad322
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   345
  |/     Obsfate: [{"markers": [["471597cad322d1f659bb169751be9133dad92ef3", ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["337fec4d2edcf0e7a467e35f818234bc620068b5", "f257fde29c7a847c9b607f6e958656d0df0fb15c"]}]
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   346
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   347
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   348
Test templates with folded commit
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   349
=================================
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   350
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   351
Test setup
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   352
----------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   353
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   354
  $ hg init $TESTTMP/templates-local-fold
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   355
  $ cd $TESTTMP/templates-local-fold
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   356
  $ mkcommit ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   357
  $ mkcommit A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   358
  $ mkcommit B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   359
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   360
  @  changeset:   2:0dec01379d3b
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   361
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   362
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   363
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   364
  |  summary:     B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   365
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   366
  o  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   367
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   368
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   369
  |  summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   370
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   371
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   372
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   373
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   374
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   375
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   376
Simulate a fold
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   377
  $ hg up -r "desc(ROOT)"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   378
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   379
  $ echo "A0" > A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   380
  $ echo "B0" > B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   381
  $ hg commit -A -m "C0"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   382
  adding A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   383
  adding B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   384
  created new head
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   385
  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33276
diff changeset
   386
  obsoleted 1 changesets
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   387
  $ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33276
diff changeset
   388
  obsoleted 1 changesets
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   389
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   390
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   391
  @  changeset:   3:eb5a0daa2192
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   392
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   393
  |  parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   394
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   395
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   396
  |  summary:     C0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   397
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   398
  | x  changeset:   2:0dec01379d3b
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   399
  | |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   400
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   401
  | |  summary:     B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   402
  | |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   403
  | x  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   404
  |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   405
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   406
  |    summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   407
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   408
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   409
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   410
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   411
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   412
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   413
Check templates
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   414
---------------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   415
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   416
  $ hg up 'desc(A0)' --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   417
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   418
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   419
Predecessors template should show current revision as it is the working copy
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   420
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   421
  o  eb5a0daa2192
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   422
  |    Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   423
  |    semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   424
  |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   425
  |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   426
  | @  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   427
  |/     Successors: 3:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   428
  |      multi-line: 3:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   429
  |      json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   430
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   431
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   432
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   433
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   434
  o  eb5a0daa2192
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   435
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   436
  | @  471f378eab4c
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   437
  |/     Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   438
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   439
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   440
  $ hg up 'desc(B0)' --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   441
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   442
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   443
Predecessors template should show both predecessors as they should be both
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   444
displayed
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   445
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   446
  o  eb5a0daa2192
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   447
  |    Predecessors: 2:0dec01379d3b 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   448
  |    semi-colon: 2:0dec01379d3b; 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   449
  |    json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   450
  |    map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   451
  | @  0dec01379d3b
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   452
  | |    Successors: 3:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   453
  | |    multi-line: 3:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   454
  | |    json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   455
  | x  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   456
  |/     Successors: 3:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   457
  |      multi-line: 3:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   458
  |      json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   459
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   460
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   461
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   462
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   463
  o  eb5a0daa2192
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   464
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   465
  | @  0dec01379d3b
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   466
  | |    Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   467
  | x  471f378eab4c
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   468
  |/     Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   469
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   470
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   471
  $ hg up 'desc(C0)'
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   472
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   473
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   474
Predecessors template should not show predecessors as they are not displayed in
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   475
the log
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   476
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   477
  @  eb5a0daa2192
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   478
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   479
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   480
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   481
Predecessors template should show both predecessors as we force their display
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   482
with --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   483
  $ hg tlog --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   484
  @  eb5a0daa2192
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   485
  |    Predecessors: 2:0dec01379d3b 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   486
  |    semi-colon: 2:0dec01379d3b; 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   487
  |    json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   488
  |    map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   489
  | x  0dec01379d3b
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   490
  | |    Successors: 3:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   491
  | |    multi-line: 3:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   492
  | |    json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   493
  | x  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   494
  |/     Successors: 3:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   495
  |      multi-line: 3:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   496
  |      json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   497
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   498
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   499
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   500
  $ hg fatelog --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   501
  @  eb5a0daa2192
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   502
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   503
  | x  0dec01379d3b
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   504
  | |    Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   505
  | x  471f378eab4c
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   506
  |/     Obsfate: rewritten as 3:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   507
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   508
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   509
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   510
  $ hg fatelogjson --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   511
  @  eb5a0daa2192
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   512
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   513
  | x  0dec01379d3b
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   514
  | |    Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}]
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   515
  | x  471f378eab4c
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   516
  |/     Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}]
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   517
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   518
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   519
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   520
Test templates with divergence
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   521
==============================
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   522
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   523
Test setup
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   524
----------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   525
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   526
  $ hg init $TESTTMP/templates-local-divergence
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   527
  $ cd $TESTTMP/templates-local-divergence
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   528
  $ mkcommit ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   529
  $ mkcommit A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   530
  $ hg commit --amend -m "A1"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   531
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   532
  @  changeset:   2:fdf9bde5129a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   533
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   534
  |  parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   535
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   536
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   537
  |  summary:     A1
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   538
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   539
  | x  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   540
  |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   541
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   542
  |    summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   543
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   544
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   545
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   546
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   547
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   548
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   549
  $ hg update --hidden 'desc(A0)'
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   550
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   551
  $ hg commit --amend -m "A2"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   552
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   553
  @  changeset:   3:65b757b745b9
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   554
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   555
  |  parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   556
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   557
  |  date:        Thu Jan 01 00:00:00 1970 +0000
33688
2194a8723138 evolution: rename divergent to content-divergent
Boris Feld <boris.feld@octobus.net>
parents: 33667
diff changeset
   558
  |  instability: content-divergent
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   559
  |  summary:     A2
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   560
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   561
  | o  changeset:   2:fdf9bde5129a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   562
  |/   parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   563
  |    user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   564
  |    date:        Thu Jan 01 00:00:00 1970 +0000
33688
2194a8723138 evolution: rename divergent to content-divergent
Boris Feld <boris.feld@octobus.net>
parents: 33667
diff changeset
   565
  |    instability: content-divergent
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   566
  |    summary:     A1
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   567
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   568
  | x  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   569
  |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   570
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   571
  |    summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   572
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   573
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   574
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   575
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   576
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   577
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   578
  $ hg commit --amend -m 'A3'
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   579
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   580
  @  changeset:   4:019fadeab383
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   581
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   582
  |  parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   583
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   584
  |  date:        Thu Jan 01 00:00:00 1970 +0000
33688
2194a8723138 evolution: rename divergent to content-divergent
Boris Feld <boris.feld@octobus.net>
parents: 33667
diff changeset
   585
  |  instability: content-divergent
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   586
  |  summary:     A3
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   587
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   588
  | x  changeset:   3:65b757b745b9
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   589
  |/   parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   590
  |    user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   591
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   592
  |    summary:     A2
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   593
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   594
  | o  changeset:   2:fdf9bde5129a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   595
  |/   parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   596
  |    user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   597
  |    date:        Thu Jan 01 00:00:00 1970 +0000
33688
2194a8723138 evolution: rename divergent to content-divergent
Boris Feld <boris.feld@octobus.net>
parents: 33667
diff changeset
   598
  |    instability: content-divergent
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   599
  |    summary:     A1
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   600
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   601
  | x  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   602
  |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   603
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   604
  |    summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   605
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   606
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   607
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   608
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   609
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   610
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   611
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   612
Check templates
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   613
---------------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   614
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   615
  $ hg up 'desc(A0)' --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   616
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   617
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   618
Predecessors template should show current revision as it is the working copy
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   619
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   620
  o  019fadeab383
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   621
  |    Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   622
  |    semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   623
  |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   624
  |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   625
  | o  fdf9bde5129a
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   626
  |/     Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   627
  |      semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   628
  |      json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   629
  |      map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   630
  | @  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   631
  |/     Successors: 2:fdf9bde5129a; 4:019fadeab383
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   632
  |      multi-line: 2:fdf9bde5129a
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   633
  |      multi-line: 4:019fadeab383
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   634
  |      json: [["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   635
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   636
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   637
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   638
  o  019fadeab383
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   639
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   640
  | o  fdf9bde5129a
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   641
  |/
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   642
  | @  471f378eab4c
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
   643
  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   644
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   645
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   646
  $ hg up 'desc(A1)'
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   647
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   648
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   649
Predecessors template should not show predecessors as they are not displayed in
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   650
the log
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   651
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   652
  o  019fadeab383
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   653
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   654
  | @  fdf9bde5129a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   655
  |/
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   656
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   657
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   658
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   659
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   660
  o  019fadeab383
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   661
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   662
  | @  fdf9bde5129a
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   663
  |/
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   664
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   665
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   666
Predecessors template should the predecessors as we force their display with
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   667
--hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   668
  $ hg tlog --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   669
  o  019fadeab383
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   670
  |    Predecessors: 3:65b757b745b9
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   671
  |    semi-colon: 3:65b757b745b9
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   672
  |    json: ["65b757b745b935093c87a2bccd877521cccffcbd"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   673
  |    map: 3:65b757b745b935093c87a2bccd877521cccffcbd
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   674
  | x  65b757b745b9
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   675
  |/     Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   676
  |      semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   677
  |      json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   678
  |      map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   679
  |      Successors: 4:019fadeab383
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   680
  |      multi-line: 4:019fadeab383
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   681
  |      json: [["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   682
  | @  fdf9bde5129a
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   683
  |/     Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   684
  |      semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   685
  |      json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   686
  |      map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   687
  | x  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   688
  |/     Successors: 2:fdf9bde5129a; 3:65b757b745b9
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   689
  |      multi-line: 2:fdf9bde5129a
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   690
  |      multi-line: 3:65b757b745b9
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   691
  |      json: [["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], ["65b757b745b935093c87a2bccd877521cccffcbd"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   692
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   693
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   694
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   695
  $ hg fatelog --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   696
  o  019fadeab383
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   697
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   698
  | x  65b757b745b9
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
   699
  |/     Obsfate: rewritten using amend as 4:019fadeab383 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   700
  | @  fdf9bde5129a
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   701
  |/
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   702
  | x  471f378eab4c
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
   703
  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   704
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   705
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   706
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   707
  $ hg fatelogjson --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   708
  o  019fadeab383
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   709
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   710
  | x  65b757b745b9
34286
ecc96506c49d obsmarker: track operation by default
Martin von Zweigbergk <martinvonz@google.com>
parents: 34085
diff changeset
   711
  |/     Obsfate: [{"markers": [["65b757b745b935093c87a2bccd877521cccffcbd", ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["019fadeab383f6699fa83ad7bdb4d82ed2c0e5ab"]}]
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   712
  | @  fdf9bde5129a
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   713
  |/
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   714
  | x  471f378eab4c
34286
ecc96506c49d obsmarker: track operation by default
Martin von Zweigbergk <martinvonz@google.com>
parents: 34085
diff changeset
   715
  |/     Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e"]}, {"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["65b757b745b935093c87a2bccd877521cccffcbd"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["65b757b745b935093c87a2bccd877521cccffcbd"]}]
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   716
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   717
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   718
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   719
Test templates with amended + folded commit
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   720
===========================================
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   721
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   722
Test setup
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   723
----------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   724
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   725
  $ hg init $TESTTMP/templates-local-amend-fold
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   726
  $ cd $TESTTMP/templates-local-amend-fold
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   727
  $ mkcommit ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   728
  $ mkcommit A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   729
  $ mkcommit B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   730
  $ hg commit --amend -m "B1"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   731
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   732
  @  changeset:   3:b7ea6d14e664
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   733
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   734
  |  parent:      1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   735
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   736
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   737
  |  summary:     B1
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   738
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   739
  | x  changeset:   2:0dec01379d3b
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   740
  |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   741
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   742
  |    summary:     B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   743
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   744
  o  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   745
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   746
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   747
  |  summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   748
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   749
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   750
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   751
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   752
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   753
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   754
# Simulate a fold
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   755
  $ hg up -r "desc(ROOT)"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   756
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   757
  $ echo "A0" > A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   758
  $ echo "B0" > B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   759
  $ hg commit -A -m "C0"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   760
  adding A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   761
  adding B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   762
  created new head
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   763
  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(C0)"`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33276
diff changeset
   764
  obsoleted 1 changesets
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   765
  $ hg debugobsolete `getid "desc(B1)"` `getid "desc(C0)"`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33276
diff changeset
   766
  obsoleted 1 changesets
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   767
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   768
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   769
  @  changeset:   4:eb5a0daa2192
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   770
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   771
  |  parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   772
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   773
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   774
  |  summary:     C0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   775
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   776
  | x  changeset:   3:b7ea6d14e664
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   777
  | |  parent:      1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   778
  | |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   779
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   780
  | |  summary:     B1
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   781
  | |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   782
  | | x  changeset:   2:0dec01379d3b
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   783
  | |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   784
  | |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   785
  | |    summary:     B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   786
  | |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   787
  | x  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   788
  |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   789
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   790
  |    summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   791
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   792
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   793
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   794
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   795
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   796
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   797
Check templates
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   798
---------------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   799
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   800
  $ hg up 'desc(A0)' --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   801
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   802
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   803
Predecessors template should show current revision as it is the working copy
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   804
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   805
  o  eb5a0daa2192
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   806
  |    Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   807
  |    semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   808
  |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   809
  |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   810
  | @  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   811
  |/     Successors: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   812
  |      multi-line: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   813
  |      json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   814
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   815
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   816
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   817
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   818
  o  eb5a0daa2192
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   819
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   820
  | @  471f378eab4c
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   821
  |/     Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   822
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   823
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   824
  $ hg up 'desc(B0)' --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   825
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   826
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   827
Predecessors template should both predecessors as they are visible
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   828
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   829
  o  eb5a0daa2192
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   830
  |    Predecessors: 2:0dec01379d3b 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   831
  |    semi-colon: 2:0dec01379d3b; 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   832
  |    json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", "471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   833
  |    map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   834
  | @  0dec01379d3b
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   835
  | |    Successors: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   836
  | |    multi-line: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   837
  | |    json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   838
  | x  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   839
  |/     Successors: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   840
  |      multi-line: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   841
  |      json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   842
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   843
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   844
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   845
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   846
  o  eb5a0daa2192
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   847
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   848
  | @  0dec01379d3b
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
   849
  | |    Obsfate: rewritten using amend as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   850
  | x  471f378eab4c
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   851
  |/     Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   852
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   853
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   854
  $ hg up 'desc(B1)' --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   855
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   856
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   857
Predecessors template should both predecessors as they are visible
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   858
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   859
  o  eb5a0daa2192
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   860
  |    Predecessors: 1:471f378eab4c 3:b7ea6d14e664
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   861
  |    semi-colon: 1:471f378eab4c; 3:b7ea6d14e664
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   862
  |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   863
  |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   864
  | @  b7ea6d14e664
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   865
  | |    Successors: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   866
  | |    multi-line: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   867
  | |    json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   868
  | x  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   869
  |/     Successors: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   870
  |      multi-line: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   871
  |      json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   872
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   873
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   874
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   875
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   876
  o  eb5a0daa2192
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   877
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   878
  | @  b7ea6d14e664
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   879
  | |    Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   880
  | x  471f378eab4c
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   881
  |/     Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   882
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   883
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   884
  $ hg up 'desc(C0)'
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   885
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   886
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   887
Predecessors template should show no predecessors as they are both non visible
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   888
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   889
  @  eb5a0daa2192
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   890
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   891
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   892
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   893
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   894
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   895
  @  eb5a0daa2192
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   896
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   897
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   898
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   899
Predecessors template should show all predecessors as we force their display
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   900
with --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   901
  $ hg tlog --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   902
  @  eb5a0daa2192
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   903
  |    Predecessors: 1:471f378eab4c 3:b7ea6d14e664
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   904
  |    semi-colon: 1:471f378eab4c; 3:b7ea6d14e664
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   905
  |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874", "b7ea6d14e664bdc8922221f7992631b50da3fb07"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   906
  |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874 3:b7ea6d14e664bdc8922221f7992631b50da3fb07
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   907
  | x  b7ea6d14e664
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   908
  | |    Predecessors: 2:0dec01379d3b
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
   909
  | |    semi-colon: 2:0dec01379d3b
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   910
  | |    json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
   911
  | |    map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   912
  | |    Successors: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   913
  | |    multi-line: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   914
  | |    json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   915
  | | x  0dec01379d3b
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   916
  | |/     Successors: 3:b7ea6d14e664
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   917
  | |      multi-line: 3:b7ea6d14e664
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   918
  | |      json: [["b7ea6d14e664bdc8922221f7992631b50da3fb07"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   919
  | x  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   920
  |/     Successors: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   921
  |      multi-line: 4:eb5a0daa2192
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
   922
  |      json: [["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   923
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   924
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   925
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   926
  $ hg fatelog --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   927
  @  eb5a0daa2192
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   928
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   929
  | x  b7ea6d14e664
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   930
  | |    Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   931
  | | x  0dec01379d3b
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
   932
  | |/     Obsfate: rewritten using amend as 3:b7ea6d14e664 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   933
  | x  471f378eab4c
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
   934
  |/     Obsfate: rewritten as 4:eb5a0daa2192 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   935
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   936
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   937
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   938
  $ hg fatelogjson --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   939
  @  eb5a0daa2192
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   940
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   941
  | x  b7ea6d14e664
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   942
  | |    Obsfate: [{"markers": [["b7ea6d14e664bdc8922221f7992631b50da3fb07", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}]
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   943
  | | x  0dec01379d3b
34286
ecc96506c49d obsmarker: track operation by default
Martin von Zweigbergk <martinvonz@google.com>
parents: 34085
diff changeset
   944
  | |/     Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["b7ea6d14e664bdc8922221f7992631b50da3fb07"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["b7ea6d14e664bdc8922221f7992631b50da3fb07"]}]
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   945
  | x  471f378eab4c
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   946
  |/     Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["eb5a0daa21923bbf8caeb2c42085b9e463861fd0"]}]
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   947
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   948
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
   949
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   950
Test template with pushed and pulled obs markers
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   951
================================================
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   952
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   953
Test setup
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   954
----------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   955
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   956
  $ hg init $TESTTMP/templates-local-remote-markers-1
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   957
  $ cd $TESTTMP/templates-local-remote-markers-1
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   958
  $ mkcommit ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   959
  $ mkcommit A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   960
  $ hg clone $TESTTMP/templates-local-remote-markers-1 $TESTTMP/templates-local-remote-markers-2
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   961
  updating to branch default
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   962
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   963
  $ cd $TESTTMP/templates-local-remote-markers-2
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   964
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   965
  @  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   966
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   967
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   968
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   969
  |  summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   970
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   971
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   972
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   973
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   974
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   975
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   976
  $ cd $TESTTMP/templates-local-remote-markers-1
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   977
  $ hg commit --amend -m "A1"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   978
  $ hg commit --amend -m "A2"
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   979
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   980
  @  changeset:   3:7a230b46bf61
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   981
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   982
  |  parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   983
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   984
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   985
  |  summary:     A2
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   986
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   987
  | x  changeset:   2:fdf9bde5129a
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   988
  |/   parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   989
  |    user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   990
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   991
  |    summary:     A1
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   992
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   993
  | x  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   994
  |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   995
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   996
  |    summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   997
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   998
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
   999
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1000
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1001
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1002
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1003
  $ cd $TESTTMP/templates-local-remote-markers-2
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1004
  $ hg pull
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1005
  pulling from $TESTTMP/templates-local-remote-markers-1 (glob)
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1006
  searching for changes
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1007
  adding changesets
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1008
  adding manifests
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1009
  adding file changes
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1010
  added 1 changesets with 0 changes to 1 files (+1 heads)
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1011
  2 new obsolescence markers
33252
53b3a1968aa6 obsolete: reports the number of local changeset obsoleted when unbundling
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32911
diff changeset
  1012
  obsoleted 1 changesets
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34578
diff changeset
  1013
  new changesets 7a230b46bf61
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1014
  (run 'hg heads' to see heads, 'hg merge' to merge)
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1015
  $ hg log --hidden -G
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1016
  o  changeset:   2:7a230b46bf61
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1017
  |  tag:         tip
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1018
  |  parent:      0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1019
  |  user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1020
  |  date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1021
  |  summary:     A2
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1022
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1023
  | @  changeset:   1:471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1024
  |/   user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1025
  |    date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1026
  |    summary:     A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1027
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1028
  o  changeset:   0:ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1029
     user:        test
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1030
     date:        Thu Jan 01 00:00:00 1970 +0000
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1031
     summary:     ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1032
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1033
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1034
  $ hg debugobsolete
34286
ecc96506c49d obsmarker: track operation by default
Martin von Zweigbergk <martinvonz@google.com>
parents: 34085
diff changeset
  1035
  471f378eab4c5e25f6c77f785b27c936efb22874 fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
ecc96506c49d obsmarker: track operation by default
Martin von Zweigbergk <martinvonz@google.com>
parents: 34085
diff changeset
  1036
  fdf9bde5129a28d4548fadd3f62b265cdd3b7a2e 7a230b46bf61e50b30308c6cfd7bd1269ef54702 0 (Thu Jan 01 00:00:00 1970 +0000) {'operation': 'amend', 'user': 'test'}
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1037
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1038
Check templates
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1039
---------------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1040
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1041
Predecessors template should show current revision as it is the working copy
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1042
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1043
  o  7a230b46bf61
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1044
  |    Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1045
  |    semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1046
  |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
  1047
  |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1048
  | @  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1049
  |/     Successors: 2:7a230b46bf61
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1050
  |      multi-line: 2:7a230b46bf61
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1051
  |      json: [["7a230b46bf61e50b30308c6cfd7bd1269ef54702"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1052
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1053
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1054
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1055
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1056
  o  7a230b46bf61
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1057
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1058
  | @  471f378eab4c
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
  1059
  |/     Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1060
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1061
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1062
  $ hg up 'desc(A2)'
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1063
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1064
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1065
Predecessors template should show no predecessors as they are non visible
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1066
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1067
  @  7a230b46bf61
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1068
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1069
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1070
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1071
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1072
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1073
  @  7a230b46bf61
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1074
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1075
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1076
  
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1077
Predecessors template should show all predecessors as we force their display
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1078
with --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1079
  $ hg tlog --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1080
  @  7a230b46bf61
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1081
  |    Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1082
  |    semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1083
  |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
  1084
  |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1085
  | x  471f378eab4c
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1086
  |/     Successors: 2:7a230b46bf61
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1087
  |      multi-line: 2:7a230b46bf61
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1088
  |      json: [["7a230b46bf61e50b30308c6cfd7bd1269ef54702"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1089
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1090
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1091
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1092
  $ hg fatelog --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1093
  @  7a230b46bf61
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1094
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1095
  | x  471f378eab4c
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
  1096
  |/     Obsfate: rewritten using amend as 2:7a230b46bf61 by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1097
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1098
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1099
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1100
Test template with obsmarkers cycle
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1101
===================================
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1102
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1103
Test setup
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1104
----------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1105
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1106
  $ hg init $TESTTMP/templates-local-cycle
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1107
  $ cd $TESTTMP/templates-local-cycle
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1108
  $ mkcommit ROOT
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1109
  $ mkcommit A0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1110
  $ mkcommit B0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1111
  $ hg up -r 0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1112
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1113
  $ mkcommit C0
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1114
  created new head
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1115
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1116
Create the cycle
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1117
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1118
  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(B0)"`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33276
diff changeset
  1119
  obsoleted 1 changesets
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1120
  $ hg debugobsolete `getid "desc(B0)"` `getid "desc(C0)"`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33276
diff changeset
  1121
  obsoleted 1 changesets
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1122
  $ hg debugobsolete `getid "desc(B0)"` `getid "desc(A0)"`
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1123
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1124
Check templates
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1125
---------------
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1126
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1127
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1128
  @  f897c6137566
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1129
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1130
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1131
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1132
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1133
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1134
  @  f897c6137566
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1135
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1136
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1137
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1138
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1139
  $ hg up -r "desc(B0)" --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1140
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1141
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1142
  o  f897c6137566
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1143
  |    Predecessors: 2:0dec01379d3b
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1144
  |    semi-colon: 2:0dec01379d3b
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1145
  |    json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
  1146
  |    map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1147
  | @  0dec01379d3b
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1148
  | |    Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1149
  | |    semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1150
  | |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
  1151
  | |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1152
  | |    Successors: 3:f897c6137566; 1:471f378eab4c
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1153
  | |    multi-line: 3:f897c6137566
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1154
  | |    multi-line: 1:471f378eab4c
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1155
  | |    json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1156
  | x  471f378eab4c
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1157
  |/     Predecessors: 2:0dec01379d3b
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1158
  |      semi-colon: 2:0dec01379d3b
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1159
  |      json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
  1160
  |      map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1161
  |      Successors: 2:0dec01379d3b
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1162
  |      multi-line: 2:0dec01379d3b
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1163
  |      json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1164
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1165
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1166
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1167
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1168
  o  f897c6137566
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1169
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1170
  | @  0dec01379d3b
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
  1171
  | |    Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000); rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1172
  | x  471f378eab4c
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
  1173
  |/     Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1174
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1175
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1176
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1177
  $ hg up -r "desc(A0)" --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1178
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1179
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1180
  o  f897c6137566
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1181
  |    Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1182
  |    semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1183
  |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
  1184
  |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1185
  | @  471f378eab4c
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1186
  |/
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1187
  o  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1188
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1189
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1190
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1191
  o  f897c6137566
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1192
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1193
  | @  471f378eab4c
33996
98fa777cd7a1 template: better prune support in obsfate
Boris Feld <boris.feld@octobus.net>
parents: 33995
diff changeset
  1194
  |/     Obsfate: pruned;
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1195
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1196
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1197
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1198
  $ hg up -r "desc(ROOT)" --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1199
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1200
  $ hg tlog
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1201
  o  f897c6137566
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1202
  |
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1203
  @  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1204
  
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1205
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1206
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1207
  o  f897c6137566
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1208
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1209
  @  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1210
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1211
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1212
  $ hg tlog --hidden
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1213
  o  f897c6137566
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1214
  |    Predecessors: 2:0dec01379d3b
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1215
  |    semi-colon: 2:0dec01379d3b
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1216
  |    json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
  1217
  |    map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1218
  | x  0dec01379d3b
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1219
  | |    Predecessors: 1:471f378eab4c
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1220
  | |    semi-colon: 1:471f378eab4c
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1221
  | |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
  1222
  | |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1223
  | |    Successors: 3:f897c6137566; 1:471f378eab4c
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1224
  | |    multi-line: 3:f897c6137566
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1225
  | |    multi-line: 1:471f378eab4c
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1226
  | |    json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1227
  | x  471f378eab4c
32911
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1228
  |/     Predecessors: 2:0dec01379d3b
7f1d07d2c8f8 templatekw: use common "rev:node" format as the default of predecessors
Yuya Nishihara <yuya@tcha.org>
parents: 32910
diff changeset
  1229
  |      semi-colon: 2:0dec01379d3b
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1230
  |      json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]
32910
498e9dcc5fa9 templatekw: populate all keywords depending on predecessor in map operation
Yuya Nishihara <yuya@tcha.org>
parents: 32909
diff changeset
  1231
  |      map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1232
  |      Successors: 2:0dec01379d3b
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1233
  |      multi-line: 2:0dec01379d3b
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1234
  |      json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]]
32879
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1235
  @  ea207398892e
1858fc2327ef template: add predecessors template
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
  1236
  
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1237
Test template with split + divergence with cycles
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1238
=================================================
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1239
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1240
  $ hg log -G
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1241
  o  changeset:   3:f897c6137566
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1242
  |  tag:         tip
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1243
  |  parent:      0:ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1244
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1245
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1246
  |  summary:     C0
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1247
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1248
  @  changeset:   0:ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1249
     user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1250
     date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1251
     summary:     ROOT
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1252
  
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1253
  $ hg up
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1254
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1255
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1256
Create a commit with three files
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1257
  $ touch A B C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1258
  $ hg commit -A -m "Add A,B,C" A B C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1259
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1260
Split it
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1261
  $ hg up 3
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1262
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1263
  $ touch A
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1264
  $ hg commit -A -m "Add A,B,C" A
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1265
  created new head
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1266
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1267
  $ touch B
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1268
  $ hg commit -A -m "Add A,B,C" B
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1269
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1270
  $ touch C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1271
  $ hg commit -A -m "Add A,B,C" C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1272
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1273
  $ hg log -G
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1274
  @  changeset:   7:ba2ed02b0c9a
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1275
  |  tag:         tip
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1276
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1277
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1278
  |  summary:     Add A,B,C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1279
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1280
  o  changeset:   6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1281
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1282
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1283
  |  summary:     Add A,B,C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1284
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1285
  o  changeset:   5:dd800401bd8c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1286
  |  parent:      3:f897c6137566
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1287
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1288
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1289
  |  summary:     Add A,B,C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1290
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1291
  | o  changeset:   4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1292
  |/   user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1293
  |    date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1294
  |    summary:     Add A,B,C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1295
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1296
  o  changeset:   3:f897c6137566
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1297
  |  parent:      0:ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1298
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1299
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1300
  |  summary:     C0
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1301
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1302
  o  changeset:   0:ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1303
     user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1304
     date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1305
     summary:     ROOT
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1306
  
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1307
  $ hg debugobsolete `getid "4"` `getid "5"` `getid "6"` `getid "7"`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33276
diff changeset
  1308
  obsoleted 1 changesets
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1309
  $ hg log -G
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1310
  @  changeset:   7:ba2ed02b0c9a
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1311
  |  tag:         tip
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1312
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1313
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1314
  |  summary:     Add A,B,C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1315
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1316
  o  changeset:   6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1317
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1318
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1319
  |  summary:     Add A,B,C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1320
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1321
  o  changeset:   5:dd800401bd8c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1322
  |  parent:      3:f897c6137566
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1323
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1324
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1325
  |  summary:     Add A,B,C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1326
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1327
  o  changeset:   3:f897c6137566
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1328
  |  parent:      0:ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1329
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1330
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1331
  |  summary:     C0
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1332
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1333
  o  changeset:   0:ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1334
     user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1335
     date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1336
     summary:     ROOT
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1337
  
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1338
Diverge one of the splitted commit
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1339
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1340
  $ hg up 6
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1341
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1342
  $ hg commit --amend -m "Add only B"
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1343
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1344
  $ hg up 6 --hidden
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1345
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1346
  $ hg commit --amend -m "Add B only"
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1347
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1348
  $ hg log -G
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1349
  @  changeset:   9:0b997eb7ceee
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1350
  |  tag:         tip
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1351
  |  parent:      5:dd800401bd8c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1352
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1353
  |  date:        Thu Jan 01 00:00:00 1970 +0000
33688
2194a8723138 evolution: rename divergent to content-divergent
Boris Feld <boris.feld@octobus.net>
parents: 33667
diff changeset
  1354
  |  instability: content-divergent
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1355
  |  summary:     Add B only
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1356
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1357
  | o  changeset:   8:b18bc8331526
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1358
  |/   parent:      5:dd800401bd8c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1359
  |    user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1360
  |    date:        Thu Jan 01 00:00:00 1970 +0000
33688
2194a8723138 evolution: rename divergent to content-divergent
Boris Feld <boris.feld@octobus.net>
parents: 33667
diff changeset
  1361
  |    instability: content-divergent
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1362
  |    summary:     Add only B
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1363
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1364
  | o  changeset:   7:ba2ed02b0c9a
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1365
  | |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1366
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
33688
2194a8723138 evolution: rename divergent to content-divergent
Boris Feld <boris.feld@octobus.net>
parents: 33667
diff changeset
  1367
  | |  instability: orphan, content-divergent
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1368
  | |  summary:     Add A,B,C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1369
  | |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1370
  | x  changeset:   6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1371
  |/   user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1372
  |    date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1373
  |    summary:     Add A,B,C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1374
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1375
  o  changeset:   5:dd800401bd8c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1376
  |  parent:      3:f897c6137566
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1377
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1378
  |  date:        Thu Jan 01 00:00:00 1970 +0000
33688
2194a8723138 evolution: rename divergent to content-divergent
Boris Feld <boris.feld@octobus.net>
parents: 33667
diff changeset
  1379
  |  instability: content-divergent
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1380
  |  summary:     Add A,B,C
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1381
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1382
  o  changeset:   3:f897c6137566
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1383
  |  parent:      0:ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1384
  |  user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1385
  |  date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1386
  |  summary:     C0
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1387
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1388
  o  changeset:   0:ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1389
     user:        test
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1390
     date:        Thu Jan 01 00:00:00 1970 +0000
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1391
     summary:     ROOT
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1392
  
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1393
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1394
Check templates
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1395
---------------
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1396
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1397
  $ hg tlog
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1398
  @  0b997eb7ceee
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1399
  |    Predecessors: 6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1400
  |    semi-colon: 6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1401
  |    json: ["4a004186e63889f20cb16434fcbd72220bd1eace"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1402
  |    map: 6:4a004186e63889f20cb16434fcbd72220bd1eace
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1403
  | o  b18bc8331526
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1404
  |/     Predecessors: 6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1405
  |      semi-colon: 6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1406
  |      json: ["4a004186e63889f20cb16434fcbd72220bd1eace"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1407
  |      map: 6:4a004186e63889f20cb16434fcbd72220bd1eace
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1408
  | o  ba2ed02b0c9a
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1409
  | |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1410
  | x  4a004186e638
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1411
  |/     Successors: 8:b18bc8331526; 9:0b997eb7ceee
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1412
  |      multi-line: 8:b18bc8331526
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1413
  |      multi-line: 9:0b997eb7ceee
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1414
  |      json: [["b18bc8331526a22cbb1801022bd1555bf291c48b"], ["0b997eb7ceeee06200a02f8aab185979092d514e"]]
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1415
  o  dd800401bd8c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1416
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1417
  o  f897c6137566
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1418
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1419
  o  ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1420
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1421
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1422
  @  0b997eb7ceee
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1423
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1424
  | o  b18bc8331526
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1425
  |/
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1426
  | o  ba2ed02b0c9a
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1427
  | |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1428
  | x  4a004186e638
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
  1429
  |/     Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1430
  o  dd800401bd8c
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1431
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1432
  o  f897c6137566
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1433
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1434
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1435
  
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1436
  $ hg tlog --hidden
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1437
  @  0b997eb7ceee
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1438
  |    Predecessors: 6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1439
  |    semi-colon: 6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1440
  |    json: ["4a004186e63889f20cb16434fcbd72220bd1eace"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1441
  |    map: 6:4a004186e63889f20cb16434fcbd72220bd1eace
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1442
  | o  b18bc8331526
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1443
  |/     Predecessors: 6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1444
  |      semi-colon: 6:4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1445
  |      json: ["4a004186e63889f20cb16434fcbd72220bd1eace"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1446
  |      map: 6:4a004186e63889f20cb16434fcbd72220bd1eace
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1447
  | o  ba2ed02b0c9a
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1448
  | |    Predecessors: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1449
  | |    semi-colon: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1450
  | |    json: ["9bd10a0775e478708cada5f176ec6de654359ce7"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1451
  | |    map: 4:9bd10a0775e478708cada5f176ec6de654359ce7
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1452
  | x  4a004186e638
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1453
  |/     Predecessors: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1454
  |      semi-colon: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1455
  |      json: ["9bd10a0775e478708cada5f176ec6de654359ce7"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1456
  |      map: 4:9bd10a0775e478708cada5f176ec6de654359ce7
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1457
  |      Successors: 8:b18bc8331526; 9:0b997eb7ceee
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1458
  |      multi-line: 8:b18bc8331526
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1459
  |      multi-line: 9:0b997eb7ceee
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1460
  |      json: [["b18bc8331526a22cbb1801022bd1555bf291c48b"], ["0b997eb7ceeee06200a02f8aab185979092d514e"]]
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1461
  o  dd800401bd8c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1462
  |    Predecessors: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1463
  |    semi-colon: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1464
  |    json: ["9bd10a0775e478708cada5f176ec6de654359ce7"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1465
  |    map: 4:9bd10a0775e478708cada5f176ec6de654359ce7
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1466
  | x  9bd10a0775e4
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1467
  |/     Successors: 5:dd800401bd8c 6:4a004186e638 7:ba2ed02b0c9a
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1468
  |      multi-line: 5:dd800401bd8c 6:4a004186e638 7:ba2ed02b0c9a
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1469
  |      json: [["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"]]
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1470
  o  f897c6137566
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1471
  |    Predecessors: 2:0dec01379d3b
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1472
  |    semi-colon: 2:0dec01379d3b
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1473
  |    json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1474
  |    map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1475
  | x  0dec01379d3b
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1476
  | |    Predecessors: 1:471f378eab4c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1477
  | |    semi-colon: 1:471f378eab4c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1478
  | |    json: ["471f378eab4c5e25f6c77f785b27c936efb22874"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1479
  | |    map: 1:471f378eab4c5e25f6c77f785b27c936efb22874
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1480
  | |    Successors: 3:f897c6137566; 1:471f378eab4c
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1481
  | |    multi-line: 3:f897c6137566
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1482
  | |    multi-line: 1:471f378eab4c
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1483
  | |    json: [["f897c6137566320b081514b4c7227ecc3d384b39"], ["471f378eab4c5e25f6c77f785b27c936efb22874"]]
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1484
  | x  471f378eab4c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1485
  |/     Predecessors: 2:0dec01379d3b
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1486
  |      semi-colon: 2:0dec01379d3b
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1487
  |      json: ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1488
  |      map: 2:0dec01379d3be6318c470ead31b1fe7ae7cb53d5
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1489
  |      Successors: 2:0dec01379d3b
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1490
  |      multi-line: 2:0dec01379d3b
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1491
  |      json: [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]]
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1492
  o  ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1493
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1494
  $ hg fatelog --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1495
  @  0b997eb7ceee
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1496
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1497
  | o  b18bc8331526
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1498
  |/
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1499
  | o  ba2ed02b0c9a
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1500
  | |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1501
  | x  4a004186e638
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
  1502
  |/     Obsfate: rewritten using amend as 8:b18bc8331526 by test (at 1970-01-01 00:00 +0000); rewritten using amend as 9:0b997eb7ceee by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1503
  o  dd800401bd8c
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1504
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1505
  | x  9bd10a0775e4
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
  1506
  |/     Obsfate: split as 5:dd800401bd8c, 6:4a004186e638, 7:ba2ed02b0c9a by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1507
  o  f897c6137566
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1508
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1509
  | x  0dec01379d3b
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
  1510
  | |    Obsfate: rewritten as 3:f897c6137566 by test (at 1970-01-01 00:00 +0000); rewritten as 1:471f378eab4c by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1511
  | x  471f378eab4c
33995
c35c0f54f420 template: compute dates in obsfatedate
Boris Feld <boris.feld@octobus.net>
parents: 33994
diff changeset
  1512
  |/     Obsfate: rewritten as 2:0dec01379d3b by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1513
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1514
  
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1515
  $ hg fatelogjson --hidden
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1516
  @  0b997eb7ceee
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1517
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1518
  | o  b18bc8331526
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1519
  |/
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1520
  | o  ba2ed02b0c9a
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1521
  | |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1522
  | x  4a004186e638
34286
ecc96506c49d obsmarker: track operation by default
Martin von Zweigbergk <martinvonz@google.com>
parents: 34085
diff changeset
  1523
  |/     Obsfate: [{"markers": [["4a004186e63889f20cb16434fcbd72220bd1eace", ["b18bc8331526a22cbb1801022bd1555bf291c48b"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["b18bc8331526a22cbb1801022bd1555bf291c48b"]}, {"markers": [["4a004186e63889f20cb16434fcbd72220bd1eace", ["0b997eb7ceeee06200a02f8aab185979092d514e"], 0, [["operation", "amend"], ["user", "test"]], [0.0, 0], null]], "successors": ["0b997eb7ceeee06200a02f8aab185979092d514e"]}]
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1524
  o  dd800401bd8c
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1525
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1526
  | x  9bd10a0775e4
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1527
  |/     Obsfate: [{"markers": [["9bd10a0775e478708cada5f176ec6de654359ce7", ["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["dd800401bd8c79d815329277739e433e883f784e", "4a004186e63889f20cb16434fcbd72220bd1eace", "ba2ed02b0c9a56b9fdbc4e79c7e57866984d8a1f"]}]
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1528
  o  f897c6137566
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1529
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1530
  | x  0dec01379d3b
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1531
  | |    Obsfate: [{"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["f897c6137566320b081514b4c7227ecc3d384b39"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["f897c6137566320b081514b4c7227ecc3d384b39"]}, {"markers": [["0dec01379d3be6318c470ead31b1fe7ae7cb53d5", ["471f378eab4c5e25f6c77f785b27c936efb22874"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["471f378eab4c5e25f6c77f785b27c936efb22874"]}]
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1532
  | x  471f378eab4c
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1533
  |/     Obsfate: [{"markers": [["471f378eab4c5e25f6c77f785b27c936efb22874", ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"], 0, [["user", "test"]], [0.0, 0], null]], "successors": ["0dec01379d3be6318c470ead31b1fe7ae7cb53d5"]}]
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1534
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1535
  
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1536
  $ hg up --hidden 4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1537
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1538
  $ hg rebase -r 7 -d 8 --config extensions.rebase=
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1539
  rebasing 7:ba2ed02b0c9a "Add A,B,C"
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1540
  $ hg tlog
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1541
  o  eceed8f98ffc
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1542
  |    Predecessors: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1543
  |    semi-colon: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1544
  |    json: ["9bd10a0775e478708cada5f176ec6de654359ce7"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1545
  |    map: 4:9bd10a0775e478708cada5f176ec6de654359ce7
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1546
  | o  0b997eb7ceee
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1547
  | |    Predecessors: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1548
  | |    semi-colon: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1549
  | |    json: ["9bd10a0775e478708cada5f176ec6de654359ce7"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1550
  | |    map: 4:9bd10a0775e478708cada5f176ec6de654359ce7
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1551
  o |  b18bc8331526
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1552
  |/     Predecessors: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1553
  |      semi-colon: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1554
  |      json: ["9bd10a0775e478708cada5f176ec6de654359ce7"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1555
  |      map: 4:9bd10a0775e478708cada5f176ec6de654359ce7
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1556
  o  dd800401bd8c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1557
  |    Predecessors: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1558
  |    semi-colon: 4:9bd10a0775e4
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1559
  |    json: ["9bd10a0775e478708cada5f176ec6de654359ce7"]
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1560
  |    map: 4:9bd10a0775e478708cada5f176ec6de654359ce7
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1561
  | @  9bd10a0775e4
33276
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1562
  |/     Successors: 5:dd800401bd8c 9:0b997eb7ceee 10:eceed8f98ffc; 5:dd800401bd8c 8:b18bc8331526 10:eceed8f98ffc
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1563
  |      multi-line: 5:dd800401bd8c 9:0b997eb7ceee 10:eceed8f98ffc
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1564
  |      multi-line: 5:dd800401bd8c 8:b18bc8331526 10:eceed8f98ffc
89796a25d4bb template: add successors template
Boris Feld <boris.feld@octobus.net>
parents: 33275
diff changeset
  1565
  |      json: [["dd800401bd8c79d815329277739e433e883f784e", "0b997eb7ceeee06200a02f8aab185979092d514e", "eceed8f98ffc4186032e29a6542ab98888ebf68d"], ["dd800401bd8c79d815329277739e433e883f784e", "b18bc8331526a22cbb1801022bd1555bf291c48b", "eceed8f98ffc4186032e29a6542ab98888ebf68d"]]
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1566
  o  f897c6137566
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1567
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1568
  o  ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1569
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1570
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1571
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1572
  o  eceed8f98ffc
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1573
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1574
  | o  0b997eb7ceee
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1575
  | |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1576
  o |  b18bc8331526
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1577
  |/
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1578
  o  dd800401bd8c
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1579
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1580
  | @  9bd10a0775e4
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
  1581
  |/     Obsfate: split using amend, rebase as 5:dd800401bd8c, 9:0b997eb7ceee, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000); split using amend, rebase as 5:dd800401bd8c, 8:b18bc8331526, 10:eceed8f98ffc by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1582
  o  f897c6137566
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1583
  |
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1584
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1585
  
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1586
Test templates with pruned commits
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1587
==================================
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1588
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1589
Test setup
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1590
----------
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1591
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1592
  $ hg init $TESTTMP/templates-local-prune
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1593
  $ cd $TESTTMP/templates-local-prune
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1594
  $ mkcommit ROOT
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1595
  $ mkcommit A0
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1596
  $ hg debugobsolete --record-parent `getid "."`
33542
b11e8c67fb0f debugobsolete: also report the number of obsoleted changesets
Boris Feld <boris.feld@octobus.net>
parents: 33276
diff changeset
  1597
  obsoleted 1 changesets
33275
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1598
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1599
Check output
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1600
------------
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1601
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1602
  $ hg up "desc(A0)" --hidden
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1603
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1604
  $ hg tlog
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1605
  @  471f378eab4c
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1606
  |
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1607
  o  ea207398892e
4cf60d5894b5 template: add tests for more complex cases
Boris Feld <boris.feld@octobus.net>
parents: 33252
diff changeset
  1608
  
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1609
  $ hg fatelog
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1610
  @  471f378eab4c
33996
98fa777cd7a1 template: better prune support in obsfate
Boris Feld <boris.feld@octobus.net>
parents: 33995
diff changeset
  1611
  |    Obsfate: pruned by test (at 1970-01-01 00:00 +0000);
33912
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1612
  o  ea207398892e
e278d6d2d7d2 template: add minimal obsfate template function
Boris Feld <boris.feld@octobus.net>
parents: 33773
diff changeset
  1613
  
33997
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1614
Test templates with multiple pruned commits
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1615
===========================================
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1616
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1617
Test setup
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1618
----------
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1619
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1620
  $ hg init $TESTTMP/multiple-local-prune
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1621
  $ cd $TESTTMP/multiple-local-prune
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1622
  $ mkcommit ROOT
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1623
  $ mkcommit A0
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1624
  $ hg commit --amend -m "A1"
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1625
  $ hg debugobsolete --record-parent `getid "."`
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1626
  obsoleted 1 changesets
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1627
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1628
  $ hg up -r "desc(A0)" --hidden
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1629
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1630
  $ hg commit --amend -m "A2"
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1631
  $ hg debugobsolete --record-parent `getid "."`
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1632
  obsoleted 1 changesets
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1633
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1634
Check output
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1635
------------
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1636
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1637
  $ hg up "desc(A0)" --hidden
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1638
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1639
  $ hg tlog
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1640
  @  471f378eab4c
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1641
  |
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1642
  o  ea207398892e
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1643
  
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1644
# todo: the obsfate output is not ideal
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1645
  $ hg fatelog
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1646
  @  471f378eab4c
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1647
  |    Obsfate: pruned;
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1648
  o  ea207398892e
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1649
  
34577
3c1bb8a4275d test: cleanup verbosity variant from fatelog test
Boris Feld <boris.feld@octobus.net>
parents: 34576
diff changeset
  1650
  $ hg fatelog --hidden
33997
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1651
  x  65b757b745b9
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1652
  |    Obsfate: pruned by test (at 1970-01-01 00:00 +0000);
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1653
  | x  fdf9bde5129a
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1654
  |/     Obsfate: pruned by test (at 1970-01-01 00:00 +0000);
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1655
  | @  471f378eab4c
34287
7cdc8c5a481a templates: introduce a obsfateoperation() function
Martin von Zweigbergk <martinvonz@google.com>
parents: 34286
diff changeset
  1656
  |/     Obsfate: rewritten using amend as 2:fdf9bde5129a by test (at 1970-01-01 00:00 +0000); rewritten using amend as 3:65b757b745b9 by test (at 1970-01-01 00:00 +0000);
33997
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1657
  o  ea207398892e
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1658
  
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1659
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1660
Test templates with splitted and pruned commit
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1661
==============================================
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1662
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1663
  $ hg init $TESTTMP/templates-local-split-prune
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1664
  $ cd $TESTTMP/templates-local-split-prune
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1665
  $ mkcommit ROOT
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1666
  $ echo 42 >> a
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1667
  $ echo 43 >> b
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1668
  $ hg commit -A -m "A0"
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1669
  adding a
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1670
  adding b
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1671
  $ hg log --hidden -G
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1672
  @  changeset:   1:471597cad322
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1673
  |  tag:         tip
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1674
  |  user:        test
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1675
  |  date:        Thu Jan 01 00:00:00 1970 +0000
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1676
  |  summary:     A0
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1677
  |
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1678
  o  changeset:   0:ea207398892e
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1679
     user:        test
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1680
     date:        Thu Jan 01 00:00:00 1970 +0000
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1681
     summary:     ROOT
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1682
  
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1683
# Simulate split
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1684
  $ hg up -r "desc(ROOT)"
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1685
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1686
  $ echo 42 >> a
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1687
  $ hg commit -A -m "A1"
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1688
  adding a
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1689
  created new head
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1690
  $ echo 43 >> b
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1691
  $ hg commit -A -m "A2"
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1692
  adding b
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1693
  $ hg debugobsolete `getid "1"` `getid "2"` `getid "3"`
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1694
  obsoleted 1 changesets
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1695
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1696
# Simulate prune
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1697
  $ hg debugobsolete --record-parent `getid "."`
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1698
  obsoleted 1 changesets
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1699
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1700
  $ hg log --hidden -G
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1701
  @  changeset:   3:0d0ef4bdf70e
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1702
  |  tag:         tip
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1703
  |  user:        test
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1704
  |  date:        Thu Jan 01 00:00:00 1970 +0000
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1705
  |  summary:     A2
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1706
  |
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1707
  o  changeset:   2:617adc3a144c
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1708
  |  parent:      0:ea207398892e
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1709
  |  user:        test
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1710
  |  date:        Thu Jan 01 00:00:00 1970 +0000
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1711
  |  summary:     A1
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1712
  |
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1713
  | x  changeset:   1:471597cad322
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1714
  |/   user:        test
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1715
  |    date:        Thu Jan 01 00:00:00 1970 +0000
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1716
  |    summary:     A0
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1717
  |
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1718
  o  changeset:   0:ea207398892e
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1719
     user:        test
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1720
     date:        Thu Jan 01 00:00:00 1970 +0000
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1721
     summary:     ROOT
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1722
  
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1723
Check templates
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1724
---------------
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1725
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1726
  $ hg up 'desc("A0")' --hidden
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1727
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1728
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1729
# todo: the obsfate output is not ideal
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1730
  $ hg fatelog
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1731
  o  617adc3a144c
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1732
  |
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1733
  | @  471597cad322
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1734
  |/     Obsfate: pruned;
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1735
  o  ea207398892e
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1736
  
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1737
  $ hg up -r 'desc("A2")' --hidden
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1738
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1739
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1740
  $ hg fatelog --hidden
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1741
  @  0d0ef4bdf70e
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1742
  |    Obsfate: pruned by test (at 1970-01-01 00:00 +0000);
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1743
  o  617adc3a144c
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1744
  |
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1745
  | x  471597cad322
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1746
  |/     Obsfate: split as 2:617adc3a144c, 3:0d0ef4bdf70e by test (at 1970-01-01 00:00 +0000);
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1747
  o  ea207398892e
d0f1e3d3ef4d test: add more obsmarker tests for pruning scenarios
Boris Feld <boris.feld@octobus.net>
parents: 33996
diff changeset
  1748