tests/test-topic-stack.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 21 Dec 2018 20:14:21 +0100
branchmercurial-4.5
changeset 4307 add4c12a9c37
parent 4075 dc247e648f43
parent 4290 09337aae08d4
child 4308 c06301c5b3e2
child 4362 8bd60e09dfb4
permissions -rw-r--r--
test-compat: merge mercurial-4.6 into mercurial-4.5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2045
db617700d318 tests: move "test setup" script into a 'testlib' directory
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1998
diff changeset
     1
  $ . "$TESTDIR/testlib/topic_setup.sh"
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
Initial setup
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
  $ cat << EOF >> $HGRCPATH
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
  > [ui]
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
  > logtemplate = {rev} {branch} \{{get(namespaces, "topics")}} {phase} {desc|firstline}\n
1896
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
     9
  > [experimental]
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
    10
  > evolution=all
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
  > EOF
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
  $ hg init main
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
  $ cd main
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
    15
  $ hg topic other
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2939
diff changeset
    16
  marked working directory as topic: other
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
  $ echo aaa > aaa
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
  $ hg add aaa
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
  $ hg commit -m c_a
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
    20
  active topic 'other' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3567
diff changeset
    21
  (see 'hg help topics' for more information)
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
  $ echo aaa > bbb
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
  $ hg add bbb
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
  $ hg commit -m c_b
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
  $ hg topic foo
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
  $ echo aaa > ccc
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
  $ hg add ccc
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
  $ hg commit -m c_c
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
    29
  active topic 'foo' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3567
diff changeset
    30
  (see 'hg help topics' for more information)
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
  $ echo aaa > ddd
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  $ hg add ddd
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  $ hg commit -m c_d
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  $ echo aaa > eee
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  $ hg add eee
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ hg commit -m c_e
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  $ echo aaa > fff
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  $ hg add fff
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  $ hg commit -m c_f
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  $ hg log -G
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  @  5 default {foo} draft c_f
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  |
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  o  4 default {foo} draft c_e
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  |
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  o  3 default {foo} draft c_d
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  |
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  o  2 default {foo} draft c_c
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
    49
  o  1 default {other} draft c_b
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
    51
  o  0 default {other} draft c_a
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
1961
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    54
Check that topic without any parent does not crash --list
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    55
---------------------------------------------------------
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    56
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    57
  $ hg up other
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    58
  switching to topic other
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    59
  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    60
  $ hg topic --list
1995
54d6dff699f0 stack: add some header with the topic name
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1991
diff changeset
    61
  ### topic: other
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
    62
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    63
  s2@ c_b (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    64
  s1: c_a
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
    65
  $ hg phase --public 'topic("other")'
2986
4746b92cc1f8 topics/ui: signal when an operation entails voiding a topic
Aurélien Campéas
parents: 2985
diff changeset
    66
  active topic 'other' is now empty
2911
8874e65343a4 tests: add more explicit test about empty topic from publishing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2805
diff changeset
    67
8874e65343a4 tests: add more explicit test about empty topic from publishing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2805
diff changeset
    68
After changing the phase of all the changesets in "other" to public, the topic should still be active, but is empty. We should be better at informating the user about it and displaying good data in this case.
8874e65343a4 tests: add more explicit test about empty topic from publishing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2805
diff changeset
    69
8874e65343a4 tests: add more explicit test about empty topic from publishing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2805
diff changeset
    70
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3018
diff changeset
    71
     foo   (4 changesets)
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3018
diff changeset
    72
   * other (0 changesets)
2911
8874e65343a4 tests: add more explicit test about empty topic from publishing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2805
diff changeset
    73
  $ hg stack
8874e65343a4 tests: add more explicit test about empty topic from publishing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2805
diff changeset
    74
  ### topic: other
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
    75
  ### target: default (branch)
2937
b54abc7e80e2 topics: improve the description if topic is not touched
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2936
diff changeset
    76
  (stack is empty)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    77
  s0^ c_b (base current)
2911
8874e65343a4 tests: add more explicit test about empty topic from publishing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2805
diff changeset
    78
1961
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    79
  $ hg up foo
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    80
  switching to topic foo
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    81
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
    82
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
Simple test
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
-----------
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
1973
e97458bf53be stack: introduce and explicite command to display the stack
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1961
diff changeset
    86
'hg stack' list all changeset in the topic
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3018
diff changeset
    89
   * foo (4 changesets)
1973
e97458bf53be stack: introduce and explicite command to display the stack
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1961
diff changeset
    90
  $ hg stack
1995
54d6dff699f0 stack: add some header with the topic name
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1991
diff changeset
    91
  ### topic: foo
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
    92
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    93
  s4@ c_f (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    94
  s3: c_e
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    95
  s2: c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    96
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    97
  s0^ c_b (base)
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    98
  $ hg stack -v
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
    99
  ### topic: foo
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   100
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   101
  s4(6559e6d93aea)@ c_f (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   102
  s3(0f9ac936c87d): c_e
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   103
  s2(e629654d7050): c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   104
  s1(8522f9e3fee9): c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   105
  s0(ea705abc4f51)^ c_b (base)
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   106
  $ hg stack -Tjson | python -m json.tool
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   107
  [
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   108
      {
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   109
          "isentry": true,
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   110
          "topic.stack.desc": "c_f",
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   111
          "topic.stack.index": 4,
2348
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   112
          "topic.stack.state": [
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   113
              "current"
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   114
          ],
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   115
          "topic.stack.state.symbol": "@"
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   116
      },
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   117
      {
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   118
          "isentry": true,
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   119
          "topic.stack.desc": "c_e",
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   120
          "topic.stack.index": 3,
2348
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   121
          "topic.stack.state": [
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   122
              "clean"
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   123
          ],
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   124
          "topic.stack.state.symbol": ":"
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   125
      },
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   126
      {
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   127
          "isentry": true,
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   128
          "topic.stack.desc": "c_d",
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   129
          "topic.stack.index": 2,
2348
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   130
          "topic.stack.state": [
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   131
              "clean"
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   132
          ],
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   133
          "topic.stack.state.symbol": ":"
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   134
      },
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   135
      {
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   136
          "isentry": true,
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   137
          "topic.stack.desc": "c_c",
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   138
          "topic.stack.index": 1,
2348
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   139
          "topic.stack.state": [
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   140
              "clean"
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   141
          ],
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   142
          "topic.stack.state.symbol": ":"
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   143
      },
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   144
      {
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   145
          "isentry": false,
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   146
          "topic.stack.desc": "c_b",
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2684
diff changeset
   147
          "topic.stack.index": 0,
2348
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   148
          "topic.stack.state": [
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   149
              "base"
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   150
          ],
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   151
          "topic.stack.state.symbol": "^"
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   152
      }
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   153
  ]
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   154
  $ hg stack -v -Tjson | python -m json.tool
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   155
  [
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   156
      {
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   157
          "isentry": true,
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   158
          "topic.stack.desc": "c_f",
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   159
          "topic.stack.index": 4,
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   160
          "topic.stack.shortnode": "6559e6d93aea",
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   161
          "topic.stack.state": [
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   162
              "current"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   163
          ],
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   164
          "topic.stack.state.symbol": "@"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   165
      },
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   166
      {
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   167
          "isentry": true,
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   168
          "topic.stack.desc": "c_e",
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   169
          "topic.stack.index": 3,
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   170
          "topic.stack.shortnode": "0f9ac936c87d",
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   171
          "topic.stack.state": [
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   172
              "clean"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   173
          ],
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   174
          "topic.stack.state.symbol": ":"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   175
      },
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   176
      {
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   177
          "isentry": true,
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   178
          "topic.stack.desc": "c_d",
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   179
          "topic.stack.index": 2,
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   180
          "topic.stack.shortnode": "e629654d7050",
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   181
          "topic.stack.state": [
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   182
              "clean"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   183
          ],
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   184
          "topic.stack.state.symbol": ":"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   185
      },
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   186
      {
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   187
          "isentry": true,
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   188
          "topic.stack.desc": "c_c",
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   189
          "topic.stack.index": 1,
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   190
          "topic.stack.shortnode": "8522f9e3fee9",
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   191
          "topic.stack.state": [
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   192
              "clean"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   193
          ],
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   194
          "topic.stack.state.symbol": ":"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   195
      },
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   196
      {
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   197
          "isentry": false,
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   198
          "topic.stack.desc": "c_b",
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   199
          "topic.stack.index": 0,
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   200
          "topic.stack.shortnode": "ea705abc4f51",
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   201
          "topic.stack.state": [
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   202
              "base"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   203
          ],
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   204
          "topic.stack.state.symbol": "^"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   205
      }
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   206
  ]
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   207
2805
a789b9d5b60c topic: make command names valid as expected, even if ui.strict=true
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2750
diff changeset
   208
check that topics and stack are available even if ui.strict=true
a789b9d5b60c topic: make command names valid as expected, even if ui.strict=true
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2750
diff changeset
   209
a789b9d5b60c topic: make command names valid as expected, even if ui.strict=true
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2750
diff changeset
   210
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3018
diff changeset
   211
   * foo (4 changesets)
2805
a789b9d5b60c topic: make command names valid as expected, even if ui.strict=true
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2750
diff changeset
   212
  $ hg stack
a789b9d5b60c topic: make command names valid as expected, even if ui.strict=true
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2750
diff changeset
   213
  ### topic: foo
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   214
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   215
  s4@ c_f (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   216
  s3: c_e
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   217
  s2: c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   218
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   219
  s0^ c_b (base)
2805
a789b9d5b60c topic: make command names valid as expected, even if ui.strict=true
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2750
diff changeset
   220
  $ hg topics --config ui.strict=true
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3018
diff changeset
   221
   * foo (4 changesets)
2805
a789b9d5b60c topic: make command names valid as expected, even if ui.strict=true
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2750
diff changeset
   222
  $ hg stack --config ui.strict=true
a789b9d5b60c topic: make command names valid as expected, even if ui.strict=true
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2750
diff changeset
   223
  ### topic: foo
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   224
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   225
  s4@ c_f (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   226
  s3: c_e
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   227
  s2: c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   228
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   229
  s0^ c_b (base)
2805
a789b9d5b60c topic: make command names valid as expected, even if ui.strict=true
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 2750
diff changeset
   230
1895
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   231
error case, nothing to list
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   232
c8e4c6e03957 stack: add a very first version of stack display with 'hg topic --list'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   233
  $ hg topic --clear
1973
e97458bf53be stack: introduce and explicite command to display the stack
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1961
diff changeset
   234
  $ hg stack
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   235
  ### target: default (branch)
2937
b54abc7e80e2 topics: improve the description if topic is not touched
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2936
diff changeset
   236
  (stack is empty)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   237
  s0^ c_f (base current)
1896
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   238
1904
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   239
Test "t#" reference
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   240
-------------------
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   241
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   242
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   243
  $ hg up s2
4066
1aa5f851d2c0 stack: clarify s# error message in case of branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4065
diff changeset
   244
  abort: cannot resolve "s2": branch "default" has only 0 non-public changesets
1904
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   245
  [255]
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   246
  $ hg topic foo
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2939
diff changeset
   247
  marked working directory as topic: foo
1904
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   248
  $ hg up t42
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   249
  abort: cannot resolve "t42": topic "foo" has only 4 changesets
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   250
  [255]
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   251
  $ hg up s42
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   252
  abort: cannot resolve "s42": topic "foo" has only 4 changesets
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   253
  [255]
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   254
  $ hg up s2
1904
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   255
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
1958
62d5d4206840 stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1957
diff changeset
   256
  $ hg summary
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   257
  parent: 3:e629654d7050 
1958
62d5d4206840 stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1957
diff changeset
   258
   c_d
62d5d4206840 stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1957
diff changeset
   259
  branch: default
62d5d4206840 stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1957
diff changeset
   260
  commit: (clean)
62d5d4206840 stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1957
diff changeset
   261
  update: (current)
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   262
  phases: 4 draft
1958
62d5d4206840 stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1957
diff changeset
   263
  topic:  foo
1904
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   264
1896
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   265
Case with some of the topic unstable
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   266
------------------------------------
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   267
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   268
  $ echo bbb > ddd
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   269
  $ hg commit --amend
3431
2e703ed1c713 evolve: update output for wider reporting of troubled changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 3417
diff changeset
   270
  2 new orphan changesets
1896
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   271
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   272
  @  6 default {foo} draft c_d
1896
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   273
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   274
  | *  5 default {foo} draft c_f
1896
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   275
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   276
  | *  4 default {foo} draft c_e
1896
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   277
  | |
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   278
  | x  3 default {foo} draft c_d
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   279
  |/
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   280
  o  2 default {foo} draft c_c
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   281
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   282
  o  1 default {} public c_b
1896
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   283
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   284
  o  0 default {} public c_a
1896
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   285
  
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   286
  $ hg topic --list
1995
54d6dff699f0 stack: add some header with the topic name
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1991
diff changeset
   287
  ### topic: foo
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   288
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   289
  s4$ c_f (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   290
  s3$ c_e (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   291
  s2@ c_d (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   292
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   293
  s0^ c_b (base)
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   294
  $ hg up s3
2348
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   295
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   296
  $ hg topic --list
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   297
  ### topic: foo
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   298
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   299
  s4$ c_f (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   300
  s3$ c_e (current unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   301
  s2: c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   302
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   303
  s0^ c_b (base)
2348
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   304
  $ hg topic --list --color=debug
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   305
  [topic.stack.summary.topic|### topic: [topic.active|foo]]
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   306
  [topic.stack.summary.branches|### target: default (branch)]
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   307
  [topic.stack.index topic.stack.index.unstable|s4][topic.stack.state topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.unstable|c_f][topic.stack.state topic.stack.state.unstable| (unstable)]
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   308
  [topic.stack.index topic.stack.index.current topic.stack.index.unstable|s3][topic.stack.state topic.stack.state.current topic.stack.state.unstable|$] [topic.stack.desc topic.stack.desc.current topic.stack.desc.unstable|c_e][topic.stack.state topic.stack.state.current topic.stack.state.unstable| (current unstable)]
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   309
  [topic.stack.index topic.stack.index.clean|s2][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_d]
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   310
  [topic.stack.index topic.stack.index.clean|s1][topic.stack.state topic.stack.state.clean|:] [topic.stack.desc topic.stack.desc.clean|c_c]
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   311
  [topic.stack.index topic.stack.index.base|s0][topic.stack.state topic.stack.state.base|^] [topic.stack.desc topic.stack.desc.base|c_b][topic.stack.state topic.stack.state.base| (base)]
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   312
  $ hg up s2
2348
5737e0680f10 ui: hg topic now display if current revision is in bad state (issue5533)
Boris Feld <boris.feld@octobus.net>
parents: 2341
diff changeset
   313
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   314
1910
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   315
Also test the revset:
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   316
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   317
  $ hg log -r 'stack()'
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   318
  2 default {foo} draft c_c
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   319
  6 default {foo} draft c_d
1910
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   320
  4 default {foo} draft c_e
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   321
  5 default {foo} draft c_f
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   322
2681
aa4db71a6224 topics: return a parse error if stack() revset is passed with argument
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2670
diff changeset
   323
  $ hg log -r 'stack(foo)'
4290
09337aae08d4 topic: make revset argument messages be similar to such messages in core
Anton Shestakov <av6@dwimlabs.net>
parents: 4067
diff changeset
   324
  hg: parse error: stack takes no arguments, it works on current topic
2681
aa4db71a6224 topics: return a parse error if stack() revset is passed with argument
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2670
diff changeset
   325
  [255]
aa4db71a6224 topics: return a parse error if stack() revset is passed with argument
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2670
diff changeset
   326
aa4db71a6224 topics: return a parse error if stack() revset is passed with argument
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2670
diff changeset
   327
  $ hg log -r 'stack(foobar)'
4290
09337aae08d4 topic: make revset argument messages be similar to such messages in core
Anton Shestakov <av6@dwimlabs.net>
parents: 4067
diff changeset
   328
  hg: parse error: stack takes no arguments, it works on current topic
2681
aa4db71a6224 topics: return a parse error if stack() revset is passed with argument
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2670
diff changeset
   329
  [255]
aa4db71a6224 topics: return a parse error if stack() revset is passed with argument
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2670
diff changeset
   330
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   331
Case with multiple heads on the topic
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   332
-------------------------------------
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   333
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   334
Make things linear again
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   335
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   336
  $ hg rebase -s 'desc(c_e)' -d 'desc(c_d) - obsolete()'
3016
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   337
  rebasing 4:0f9ac936c87d "c_e" (foo)
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   338
  rebasing 5:6559e6d93aea "c_f" (foo)
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   339
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   340
  o  8 default {foo} draft c_f
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   341
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   342
  o  7 default {foo} draft c_e
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   343
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   344
  @  6 default {foo} draft c_d
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   345
  |
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   346
  o  2 default {foo} draft c_c
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   347
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   348
  o  1 default {} public c_b
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   349
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   350
  o  0 default {} public c_a
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   351
  
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   352
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   353
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   354
Create the second branch
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   355
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   356
  $ hg up 'desc(c_d)'
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   357
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   358
  $ echo aaa > ggg
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   359
  $ hg add ggg
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   360
  $ hg commit -m c_g
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   361
  $ echo aaa > hhh
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   362
  $ hg add hhh
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   363
  $ hg commit -m c_h
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   364
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   365
  @  10 default {foo} draft c_h
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   366
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   367
  o  9 default {foo} draft c_g
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   368
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   369
  | o  8 default {foo} draft c_f
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   370
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   371
  | o  7 default {foo} draft c_e
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   372
  |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   373
  o  6 default {foo} draft c_d
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   374
  |
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   375
  o  2 default {foo} draft c_c
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   376
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   377
  o  1 default {} public c_b
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   378
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   379
  o  0 default {} public c_a
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   380
  
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   381
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   382
Test output
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   383
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   384
  $ hg top -l
1998
302be26a3fd8 stack: add warning about multiple heads
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1996
diff changeset
   385
  ### topic: foo (2 heads)
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   386
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   387
  s6@ c_h (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   388
  s5: c_g
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   389
  s2^ c_d (base)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   390
  s4: c_f
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   391
  s3: c_e
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   392
  s2: c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   393
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   394
  s0^ c_b (base)
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   395
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   396
Case with multiple heads on the topic with unstability involved
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   397
---------------------------------------------------------------
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   398
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   399
We amend the message to make sure the display base pick the right changeset
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   400
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   401
  $ hg up 'desc(c_d)'
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   402
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   403
  $ echo ccc > ddd
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   404
  $ hg commit --amend -m 'c_D' 
3431
2e703ed1c713 evolve: update output for wider reporting of troubled changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 3417
diff changeset
   405
  4 new orphan changesets
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   406
  $ hg rebase -d . -s 'desc(c_g)'
3016
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   407
  rebasing 9:81264ae8a36a "c_g" (foo)
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   408
  rebasing 10:fde5f5941642 "c_h" (foo)
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   409
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   410
  o  13 default {foo} draft c_h
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   411
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   412
  o  12 default {foo} draft c_g
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   413
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   414
  @  11 default {foo} draft c_D
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   415
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   416
  | *  8 default {foo} draft c_f
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   417
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   418
  | *  7 default {foo} draft c_e
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   419
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   420
  | x  6 default {foo} draft c_d
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   421
  |/
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   422
  o  2 default {foo} draft c_c
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   423
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   424
  o  1 default {} public c_b
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   425
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   426
  o  0 default {} public c_a
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   427
  
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   428
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   429
  $ hg topic --list
1998
302be26a3fd8 stack: add warning about multiple heads
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1996
diff changeset
   430
  ### topic: foo (2 heads)
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   431
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   432
  s6: c_h
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   433
  s5: c_g
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   434
  s2^ c_D (base current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   435
  s4$ c_f (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   436
  s3$ c_e (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   437
  s2@ c_D (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   438
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   439
  s0^ c_b (base)
2627
42abd3bd30ee topics: abort if user wants to show the stack of a non-existent topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2626
diff changeset
   440
42abd3bd30ee topics: abort if user wants to show the stack of a non-existent topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2626
diff changeset
   441
Trying to list non existing topic
42abd3bd30ee topics: abort if user wants to show the stack of a non-existent topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2626
diff changeset
   442
  $ hg stack thisdoesnotexist
42abd3bd30ee topics: abort if user wants to show the stack of a non-existent topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2626
diff changeset
   443
  abort: cannot resolve "thisdoesnotexist": no such topic found
42abd3bd30ee topics: abort if user wants to show the stack of a non-existent topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2626
diff changeset
   444
  [255]
42abd3bd30ee topics: abort if user wants to show the stack of a non-existent topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2626
diff changeset
   445
  $ hg topic --list thisdoesnotexist
42abd3bd30ee topics: abort if user wants to show the stack of a non-existent topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2626
diff changeset
   446
  abort: cannot resolve "thisdoesnotexist": no such topic found
42abd3bd30ee topics: abort if user wants to show the stack of a non-existent topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2626
diff changeset
   447
  [255]
2684
90e11985d0cc topic: exclude public and topic changeset from branch stack
Boris Feld <boris.feld@octobus.net>
parents: 2681
diff changeset
   448
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   449
Complex cases where commits with same topic are not consecutive but are linear
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   450
==============================================================================
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   451
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   452
  $ hg log --graph
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   453
  o  13 default {foo} draft c_h
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   454
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   455
  o  12 default {foo} draft c_g
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   456
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   457
  @  11 default {foo} draft c_D
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   458
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   459
  | *  8 default {foo} draft c_f
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   460
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   461
  | *  7 default {foo} draft c_e
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   462
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   463
  | x  6 default {foo} draft c_d
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   464
  |/
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   465
  o  2 default {foo} draft c_c
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   466
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   467
  o  1 default {} public c_b
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   468
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   469
  o  0 default {} public c_a
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   470
  
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   471
Converting into a linear chain
2927
01cf426bd458 tests: abstract version number for test-topic-stack.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2919
diff changeset
   472
  $ hg rebase -s 'desc("c_e") - obsolete()' -d 'desc("c_h") - obsolete()'
3016
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   473
  rebasing 7:215bc359096a "c_e" (foo)
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   474
  rebasing 8:ec9267b3f33f "c_f" (foo)
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   475
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   476
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   477
  o  15 default {foo} draft c_f
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   478
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   479
  o  14 default {foo} draft c_e
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   480
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   481
  o  13 default {foo} draft c_h
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   482
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   483
  o  12 default {foo} draft c_g
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   484
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   485
  @  11 default {foo} draft c_D
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   486
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   487
  o  2 default {foo} draft c_c
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   488
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   489
  o  1 default {} public c_b
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   490
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   491
  o  0 default {} public c_a
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   492
  
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   493
Changing topics on some commits in between
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   494
  $ hg topic foobar -r 'desc(c_e) + desc(c_D)'
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   495
  switching to topic foobar
3431
2e703ed1c713 evolve: update output for wider reporting of troubled changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 3417
diff changeset
   496
  4 new orphan changesets
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   497
  changed topic on 2 changes
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   498
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   499
  @  17 default {foobar} draft c_D
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   500
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   501
  | *  16 default {foobar} draft c_e
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   502
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   503
  | | *  15 default {foo} draft c_f
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   504
  | | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   505
  | | x  14 default {foo} draft c_e
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   506
  | |/
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   507
  | *  13 default {foo} draft c_h
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   508
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   509
  | *  12 default {foo} draft c_g
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   510
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   511
  | x  11 default {foo} draft c_D
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   512
  |/
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   513
  o  2 default {foo} draft c_c
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   514
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   515
  o  1 default {} public c_b
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   516
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   517
  o  0 default {} public c_a
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   518
  
2927
01cf426bd458 tests: abstract version number for test-topic-stack.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2919
diff changeset
   519
  $ hg rebase -s 'desc("c_f") - obsolete()' -d 'desc("c_e") - obsolete()'
3016
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   520
  rebasing 15:77082e55de88 "c_f" (foo)
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   521
  switching to topic foo
3431
2e703ed1c713 evolve: update output for wider reporting of troubled changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 3417
diff changeset
   522
  1 new orphan changesets
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   523
  switching to topic foobar
2927
01cf426bd458 tests: abstract version number for test-topic-stack.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2919
diff changeset
   524
  $ hg rebase -s 'desc("c_g") - obsolete()' -d 'desc("c_D") - obsolete()'
3016
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   525
  rebasing 12:0c3e8aed985d "c_g" (foo)
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   526
  switching to topic foo
3016
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   527
  rebasing 13:b9e4f3709bc5 "c_h" (foo)
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   528
  rebasing 16:4bc813530301 "c_e" (foobar)
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   529
  switching to topic foobar
3016
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   530
  rebasing 18:4406ea4be852 "c_f" (tip foo)
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   531
  switching to topic foo
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   532
  switching to topic foobar
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   533
  $ hg up
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   534
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   535
  $ hg log --graph
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   536
  o  22 default {foo} draft c_f
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   537
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   538
  @  21 default {foobar} draft c_e
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   539
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   540
  o  20 default {foo} draft c_h
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   541
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   542
  o  19 default {foo} draft c_g
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   543
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   544
  o  17 default {foobar} draft c_D
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   545
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   546
  o  2 default {foo} draft c_c
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   547
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   548
  o  1 default {} public c_b
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   549
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   550
  o  0 default {} public c_a
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   551
  
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   552
XXX: The following should show single heads
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   553
XXX: The behind count is weird, because the topic are interleaved.
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   554
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   555
  $ hg stack
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   556
  ### topic: foobar
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   557
  ### target: default (branch), 3 behind
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   558
  s2@ c_e (current)
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   559
    ^ c_h
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   560
  s1: c_D
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   561
  s0^ c_c (base)
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   562
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   563
  $ hg stack foo
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   564
  ### topic: foo
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3180
diff changeset
   565
  ### target: default (branch), ambiguous rebase destination - topic 'foo' has 3 heads
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   566
  s4: c_f
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   567
    ^ c_e
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   568
  s3: c_h
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   569
  s2: c_g
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   570
    ^ c_D
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   571
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   572
  s0^ c_b (base)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   573
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   574
case involving a merge
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   575
----------------------
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   576
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   577
  $ cd ..
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   578
  $ hg init stack-gap-merge
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   579
  $ cd stack-gap-merge
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   580
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   581
  $ echo aaa > aaa
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   582
  $ hg commit -Am 'c_A'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   583
  adding aaa
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   584
  $ hg topic red
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2939
diff changeset
   585
  marked working directory as topic: red
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   586
  $ echo bbb > bbb
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   587
  $ hg commit -Am 'c_B'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   588
  adding bbb
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
   589
  active topic 'red' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3567
diff changeset
   590
  (see 'hg help topics' for more information)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   591
  $ echo ccc > ccc
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   592
  $ hg commit -Am 'c_C'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   593
  adding ccc
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   594
  $ hg topic blue
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   595
  $ echo ddd > ddd
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   596
  $ hg commit -Am 'c_D'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   597
  adding ddd
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
   598
  active topic 'blue' grew its first changeset
3769
1bc4b0807c37 topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3567
diff changeset
   599
  (see 'hg help topics' for more information)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   600
  $ hg up 'desc("c_B")'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   601
  switching to topic red
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   602
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   603
  $ echo eee > eee
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   604
  $ hg commit -Am 'c_E'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   605
  adding eee
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   606
  $ echo fff > fff
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   607
  $ hg commit -Am 'c_F'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   608
  adding fff
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   609
  $ hg topic blue
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   610
  $ echo ggg > ggg
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   611
  $ hg commit -Am 'c_G'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   612
  adding ggg
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   613
  $ hg up 'desc("c_D")'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   614
  2 files updated, 0 files merged, 3 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   615
  $ hg topic red
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   616
  $ hg merge 'desc("c_G")'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   617
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   618
  (branch merge, don't forget to commit)
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   619
  $ hg commit -Am 'c_H'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   620
  $ hg topic blue
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   621
  $ echo iii > iii
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   622
  $ hg ci -Am 'c_I'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   623
  adding iii
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   624
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   625
  $ hg log -G
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   626
  @  8 default {blue} draft c_I
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   627
  |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   628
  o    7 default {red} draft c_H
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   629
  |\
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   630
  | o  6 default {blue} draft c_G
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   631
  | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   632
  | o  5 default {red} draft c_F
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   633
  | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   634
  | o  4 default {red} draft c_E
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   635
  | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   636
  o |  3 default {blue} draft c_D
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   637
  | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   638
  o |  2 default {red} draft c_C
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   639
  |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   640
  o  1 default {red} draft c_B
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   641
  |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   642
  o  0 default {} draft c_A
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   643
  
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   644
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   645
  $ hg stack red
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   646
  ### topic: red
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
   647
  ### target: default (branch), 6 behind
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   648
  s5: c_H
2918
0437158e0ed6 stack: display both parent with displaying merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2917
diff changeset
   649
    ^ c_G
0437158e0ed6 stack: display both parent with displaying merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2917
diff changeset
   650
    ^ c_D
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   651
  s4: c_C
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   652
  s1^ c_B (base)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   653
  s3: c_F
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   654
  s2: c_E
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   655
  s1: c_B
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   656
  s0^ c_A (base)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   657
  $ hg stack blue
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   658
  ### topic: blue
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3180
diff changeset
   659
  ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   660
  s3@ c_I (current)
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   661
    ^ c_H
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   662
  s2: c_D
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   663
    ^ c_C
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   664
  s1: c_G
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   665
  s0^ c_F (base)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   666
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   667
Even with some obsolete and orphan changesets
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   668
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   669
(the ordering of each branch of "blue" change because their hash change. we
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   670
should stabilize this eventuelly)
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   671
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   672
  $ hg up 'desc("c_B")'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   673
  switching to topic red
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   674
  0 files updated, 0 files merged, 6 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   675
  $ hg commit --amend --user test2
3431
2e703ed1c713 evolve: update output for wider reporting of troubled changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 3417
diff changeset
   676
  7 new orphan changesets
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   677
  $ hg up 'desc("c_C")'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   678
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   679
  $ hg commit --amend --user test2
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   680
  $ hg up 'desc("c_D")'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   681
  switching to topic blue
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   682
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   683
  $ hg commit --amend --user test2
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   684
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   685
  $ hg log -G --rev 'sort(all(), "topo")'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   686
  @  11 default {blue} draft c_D
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   687
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   688
  | *  8 default {blue} draft c_I
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   689
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   690
  | *    7 default {red} draft c_H
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   691
  | |\
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   692
  | | *  6 default {blue} draft c_G
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   693
  | | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   694
  | | *  5 default {red} draft c_F
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   695
  | | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   696
  | | *  4 default {red} draft c_E
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   697
  | | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   698
  | x |  3 default {blue} draft c_D
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   699
  |/ /
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   700
  x /  2 default {red} draft c_C
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   701
  |/
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   702
  | *  10 default {red} draft c_C
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   703
  |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   704
  x  1 default {red} draft c_B
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   705
  |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   706
  | o  9 default {red} draft c_B
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   707
  |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   708
  o  0 default {} draft c_A
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   709
  
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   710
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   711
  $ hg stack red
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   712
  ### topic: red
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3180
diff changeset
   713
  ### target: default (branch), ambiguous rebase destination - topic 'red' has 3 heads
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   714
  s5$ c_H (unstable)
2918
0437158e0ed6 stack: display both parent with displaying merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2917
diff changeset
   715
    ^ c_G
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   716
    ^ c_D
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   717
  s4$ c_C (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   718
  s1^ c_B (base)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   719
  s3$ c_F (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   720
  s2$ c_E (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   721
  s1: c_B
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   722
  s0^ c_A (base)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   723
  $ hg stack blue
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   724
  ### topic: blue
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3180
diff changeset
   725
  ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   726
  s3$ c_I (unstable)
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   727
    ^ c_H
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   728
  s2$ c_G (unstable)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   729
    ^ c_F
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   730
  s1$ c_D (current unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   731
  s0^ c_C (base unstable)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   732
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   733
more obsolescence
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   734
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   735
  $ hg up 'max(desc("c_H"))'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   736
  switching to topic red
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   737
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   738
  $ hg commit --amend --user test3
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   739
  $ hg up 'max(desc("c_G"))'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   740
  switching to topic blue
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   741
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   742
  $ hg commit --amend --user test3
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   743
  $ hg up 'max(desc("c_B"))'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   744
  switching to topic red
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   745
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   746
  $ hg commit --amend --user test3
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   747
  $ hg up 'max(desc("c_C"))'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   748
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   749
  $ hg commit --amend --user test3
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   750
  $ hg up 'max(desc("c_D"))'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   751
  switching to topic blue
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   752
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   753
  $ hg commit --amend --user test3
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   754
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   755
  $ hg log -G --rev 'sort(all(), "topo")'
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   756
  @  16 default {blue} draft c_D
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   757
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   758
  | *  13 default {blue} draft c_G
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   759
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   760
  | | *    12 default {red} draft c_H
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   761
  | | |\
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   762
  | | | | *  8 default {blue} draft c_I
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   763
  | | | | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   764
  | | +---x  7 default {red} draft c_H
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   765
  | | | |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   766
  | +---x  6 default {blue} draft c_G
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   767
  | | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   768
  | * |  5 default {red} draft c_F
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   769
  | | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   770
  | * |  4 default {red} draft c_E
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   771
  | | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   772
  +---x  3 default {blue} draft c_D
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   773
  | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   774
  x |  2 default {red} draft c_C
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   775
  |/
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   776
  | *  15 default {red} draft c_C
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   777
  |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   778
  x  1 default {red} draft c_B
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   779
  |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   780
  | o  14 default {red} draft c_B
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   781
  |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   782
  o  0 default {} draft c_A
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   783
  
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   784
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   785
  $ hg stack red
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   786
  ### topic: red
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3180
diff changeset
   787
  ### target: default (branch), ambiguous rebase destination - topic 'red' has 3 heads
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   788
  s5$ c_H (unstable)
2918
0437158e0ed6 stack: display both parent with displaying merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2917
diff changeset
   789
    ^ c_G
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   790
    ^ c_D
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   791
  s4$ c_F (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   792
  s3$ c_E (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   793
  s1^ c_B (base)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   794
  s2$ c_C (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   795
  s1: c_B
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   796
  s0^ c_A (base)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   797
  $ hg stack blue
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   798
  ### topic: blue
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3180
diff changeset
   799
  ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   800
  s3$ c_I (unstable)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   801
    ^ c_H
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   802
  s2$ c_G (unstable)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   803
    ^ c_F
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   804
  s1$ c_D (current unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   805
  s0^ c_C (base unstable)
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   806
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   807
Test stack behavior with a split
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   808
--------------------------------
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   809
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   810
get things linear again
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   811
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   812
  $ hg rebase -r s1 -d default
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   813
  rebasing 16:1d84ec948370 "c_D" (tip blue)
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   814
  switching to topic blue
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   815
  $ hg rebase -r s2 -d s1
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   816
  rebasing 13:3ab2eedae500 "c_G" (blue)
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   817
  $ hg rebase -r s3 -d s2
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   818
  rebasing 8:3bfe800e0486 "c_I" (blue)
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   819
  $ hg stack
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   820
  ### topic: blue
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   821
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   822
  s3: c_I
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   823
  s2: c_G
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   824
  s1@ c_D (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   825
  s0^ c_A (base)
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   826
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   827
making a split
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   828
(first get something to split)
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   829
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   830
  $ hg up s2
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   831
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   832
  $ hg status --change .
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   833
  A ggg
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   834
  $ echo zzz > Z
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   835
  $ hg add Z
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   836
  $ hg commit --amend
3431
2e703ed1c713 evolve: update output for wider reporting of troubled changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 3417
diff changeset
   837
  1 new orphan changesets
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   838
  $ hg status --change .
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   839
  A Z
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   840
  A ggg
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   841
  $ hg stack
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   842
  ### topic: blue
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   843
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   844
  s3$ c_I (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   845
  s2@ c_G (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   846
  s1: c_D
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   847
  s0^ c_A (base)
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   848
  $ hg --config extensions.evolve=  --config ui.interactive=yes split << EOF
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   849
  > y
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   850
  > y
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   851
  > n
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   852
  > y
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   853
  > EOF
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   854
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   855
  adding Z
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   856
  adding ggg
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   857
  diff --git a/Z b/Z
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   858
  new file mode 100644
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   859
  examine changes to 'Z'? [Ynesfdaq?] y
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   860
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   861
  @@ -0,0 +1,1 @@
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   862
  +zzz
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   863
  record change 1/2 to 'Z'? [Ynesfdaq?] y
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   864
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   865
  diff --git a/ggg b/ggg
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   866
  new file mode 100644
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   867
  examine changes to 'ggg'? [Ynesfdaq?] n
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   868
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   869
  Done splitting? [yN] y
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   870
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   871
  $ hg --config extensions.evolve= obslog --all
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   872
  o  dde94df880e9 (21) c_G
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   873
  |
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   874
  | @  e7ea874afbd5 (22) c_G
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   875
  |/
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   876
  x  b24bab30ac12 (20) c_G
3567
5ddea3b8d2a4 split: include "operation" metadata in obsmarkers
Martin von Zweigbergk <martinvonz@google.com>
parents: 3519
diff changeset
   877
  |    rewritten(parent, content) as dde94df880e9, e7ea874afbd5 using split by test (Thu Jan 01 00:00:00 1970 +0000)
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   878
  |
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   879
  x  907f7d3c2333 (18) c_G
3519
2823c82ad8a4 obslog: add the operation to the Obslog output
Boris Feld <boris.feld@octobus.net>
parents: 3431
diff changeset
   880
  |    rewritten(content) as b24bab30ac12 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   881
  |
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   882
  x  3ab2eedae500 (13) c_G
3519
2823c82ad8a4 obslog: add the operation to the Obslog output
Boris Feld <boris.feld@octobus.net>
parents: 3431
diff changeset
   883
  |    rewritten(parent) as 907f7d3c2333 using rebase by test (Thu Jan 01 00:00:00 1970 +0000)
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   884
  |
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   885
  x  c7d60a180d05 (6) c_G
3519
2823c82ad8a4 obslog: add the operation to the Obslog output
Boris Feld <boris.feld@octobus.net>
parents: 3431
diff changeset
   886
       rewritten(user) as 3ab2eedae500 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   887
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   888
  $ hg export .
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   889
  # HG changeset patch
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   890
  # User test3
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   891
  # Date 0 0
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   892
  #      Thu Jan 01 00:00:00 1970 +0000
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   893
  # Node ID e7ea874afbd5c17aeee366d39a828dbcb01682ce
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   894
  # Parent  dde94df880e97f4a1ee8c5408254b429b3d90204
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   895
  # EXP-Topic blue
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   896
  c_G
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   897
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   898
  diff -r dde94df880e9 -r e7ea874afbd5 ggg
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   899
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   900
  +++ b/ggg	Thu Jan 01 00:00:00 1970 +0000
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   901
  @@ -0,0 +1,1 @@
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   902
  +ggg
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   903
  $ hg export .^
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   904
  # HG changeset patch
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   905
  # User test3
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   906
  # Date 0 0
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   907
  #      Thu Jan 01 00:00:00 1970 +0000
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   908
  # Node ID dde94df880e97f4a1ee8c5408254b429b3d90204
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   909
  # Parent  f3328cd199dc389b850ca952f65a15a8e6dbc79b
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   910
  # EXP-Topic blue
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   911
  c_G
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   912
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   913
  diff -r f3328cd199dc -r dde94df880e9 Z
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   914
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   915
  +++ b/Z	Thu Jan 01 00:00:00 1970 +0000
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   916
  @@ -0,0 +1,1 @@
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   917
  +zzz
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   918
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   919
Check that stack ouput still make sense
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   920
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   921
  $ hg stack
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   922
  ### topic: blue
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   923
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   924
  s4$ c_I (unstable)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   925
  s3@ c_G (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   926
  s2: c_G
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   927
  s1: c_D
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   928
  s0^ c_A (base)