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