tests/test-topic-stack.t
author Anton Shestakov <av6@dwimlabs.net>
Fri, 06 Sep 2019 12:16:34 +0700
branchstable
changeset 4828 aaf8742e09a0
parent 4712 e2c548cc83b5
child 4863 5cd7d16b8733
child 5123 900668a93629
permissions -rw-r--r--
stack: demonstrate that not reusing cached property gives different results Instead of using self._dependencies, which is a cached property, let's get fresh deps and rdeps in stack.revs method using a newly introduced stack.builddependencies method (will be removed in the next patch). This makes it easier to explain why the next patch is correct.
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
3770
eb928f5728c4 topic: suggest to clear a topic that becomes empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 3769
diff changeset
    67
  (use 'hg topic --clear' to clear it if needed)
2911
8874e65343a4 tests: add more explicit test about empty topic from publishing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2805
diff changeset
    68
8874e65343a4 tests: add more explicit test about empty topic from publishing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2805
diff changeset
    69
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
    70
8874e65343a4 tests: add more explicit test about empty topic from publishing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2805
diff changeset
    71
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3018
diff changeset
    72
     foo   (4 changesets)
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3018
diff changeset
    73
   * 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
    74
  $ 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
    75
  ### 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
    76
  ### target: default (branch)
2937
b54abc7e80e2 topics: improve the description if topic is not touched
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2936
diff changeset
    77
  (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
    78
  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
    79
1961
d9c7fced94fc stack: prevent crash when topic is rooted on nullid
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1960
diff changeset
    80
  $ 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
    81
  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
    82
  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
    83
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
    84
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
    85
-----------
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
    86
1973
e97458bf53be stack: introduce and explicite command to display the stack
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1961
diff changeset
    87
'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
    88
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
    89
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3018
diff changeset
    90
   * 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
    91
  $ 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
    92
  ### 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
    93
  ### 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
    94
  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
    95
  s3: c_e
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    96
  s2: c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    97
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
    98
  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
    99
  $ hg stack -v
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   100
  ### 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
   101
  ### 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
   102
  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
   103
  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
   104
  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
   105
  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
   106
  s0(ea705abc4f51)^ c_b (base)
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   107
  $ hg stack -Tjson | python -m json.tool
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
      {
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   110
          "desc": "c_f",
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   111
          "isentry": true,
4656
dbf676c86244 stack: always provide (full) node hash to non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4655
diff changeset
   112
          "node": "6559e6d93aeadba940874f54f106c61931b5b8cf",
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   113
          "stack_index": 4,
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   114
          "state": [
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
   115
              "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
   116
          ],
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   117
          "symbol": "@"
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   118
      },
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   119
      {
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   120
          "desc": "c_e",
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   121
          "isentry": true,
4656
dbf676c86244 stack: always provide (full) node hash to non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4655
diff changeset
   122
          "node": "0f9ac936c87d1d991011862aff4e86d0c3300a89",
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   123
          "stack_index": 3,
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   124
          "state": [
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
   125
              "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
   126
          ],
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   127
          "symbol": ":"
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   128
      },
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   129
      {
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   130
          "desc": "c_d",
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   131
          "isentry": true,
4656
dbf676c86244 stack: always provide (full) node hash to non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4655
diff changeset
   132
          "node": "e629654d70505107cca3d12782d9c5a50d8fb9c8",
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   133
          "stack_index": 2,
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   134
          "state": [
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
   135
              "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
   136
          ],
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   137
          "symbol": ":"
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   138
      },
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   139
      {
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   140
          "desc": "c_c",
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   141
          "isentry": true,
4656
dbf676c86244 stack: always provide (full) node hash to non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4655
diff changeset
   142
          "node": "8522f9e3fee92d4ec4e688ac3fbd2ee0f8fd5036",
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   143
          "stack_index": 1,
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   144
          "state": [
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
   145
              "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
   146
          ],
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   147
          "symbol": ":"
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   148
      },
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   149
      {
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   150
          "desc": "c_b",
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   151
          "isentry": false,
4656
dbf676c86244 stack: always provide (full) node hash to non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4655
diff changeset
   152
          "node": "ea705abc4f51e26d356ed94b3443e8c19b76cedf",
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   153
          "stack_index": 0,
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   154
          "state": [
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
   155
              "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
   156
          ],
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   157
          "symbol": "^"
2341
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   158
      }
a5117a5becf8 ui: Fix hg stack json output
Boris Feld <boris.feld@octobus.net>
parents: 2045
diff changeset
   159
  ]
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   160
  $ 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
   161
  [
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   162
      {
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   163
          "desc": "c_f",
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   164
          "isentry": true,
4656
dbf676c86244 stack: always provide (full) node hash to non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4655
diff changeset
   165
          "node": "6559e6d93aeadba940874f54f106c61931b5b8cf",
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   166
          "stack_index": 4,
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   167
          "state": [
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   168
              "current"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   169
          ],
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   170
          "symbol": "@"
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   171
      },
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   172
      {
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   173
          "desc": "c_e",
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   174
          "isentry": true,
4656
dbf676c86244 stack: always provide (full) node hash to non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4655
diff changeset
   175
          "node": "0f9ac936c87d1d991011862aff4e86d0c3300a89",
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   176
          "stack_index": 3,
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   177
          "state": [
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   178
              "clean"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   179
          ],
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   180
          "symbol": ":"
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   181
      },
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   182
      {
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   183
          "desc": "c_d",
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   184
          "isentry": true,
4656
dbf676c86244 stack: always provide (full) node hash to non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4655
diff changeset
   185
          "node": "e629654d70505107cca3d12782d9c5a50d8fb9c8",
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   186
          "stack_index": 2,
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   187
          "state": [
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   188
              "clean"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   189
          ],
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   190
          "symbol": ":"
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   191
      },
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   192
      {
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   193
          "desc": "c_c",
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   194
          "isentry": true,
4656
dbf676c86244 stack: always provide (full) node hash to non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4655
diff changeset
   195
          "node": "8522f9e3fee92d4ec4e688ac3fbd2ee0f8fd5036",
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   196
          "stack_index": 1,
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   197
          "state": [
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   198
              "clean"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   199
          ],
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   200
          "symbol": ":"
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   201
      },
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   202
      {
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   203
          "desc": "c_b",
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   204
          "isentry": false,
4656
dbf676c86244 stack: always provide (full) node hash to non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4655
diff changeset
   205
          "node": "ea705abc4f51e26d356ed94b3443e8c19b76cedf",
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   206
          "stack_index": 0,
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   207
          "state": [
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   208
              "base"
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   209
          ],
4655
bb0a5beb0ad8 stack: remove unnecessary prefix from stack output with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4654
diff changeset
   210
          "symbol": "^"
2750
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   211
      }
bd3824d1b795 stack: show short node of changesets in `hg stack -v`
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2712
diff changeset
   212
  ]
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
   213
4654
0d05dcb8dd37 stack: provide context to formatter with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4436
diff changeset
   214
  $ hg stack -T '{rev}: [{branch}] [{topic}] {desc}\n'
0d05dcb8dd37 stack: provide context to formatter with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4436
diff changeset
   215
  5: [default] [foo] c_f
0d05dcb8dd37 stack: provide context to formatter with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4436
diff changeset
   216
  4: [default] [foo] c_e
0d05dcb8dd37 stack: provide context to formatter with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4436
diff changeset
   217
  3: [default] [foo] c_d
0d05dcb8dd37 stack: provide context to formatter with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4436
diff changeset
   218
  2: [default] [foo] c_c
0d05dcb8dd37 stack: provide context to formatter with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4436
diff changeset
   219
  1: [default] [] c_b
0d05dcb8dd37 stack: provide context to formatter with non-default --template
Anton Shestakov <av6@dwimlabs.net>
parents: 4436
diff changeset
   220
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
   221
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
   222
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
  $ hg topics
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3018
diff changeset
   224
   * 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
   225
  $ 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
   226
  ### 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
   227
  ### 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
   228
  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
   229
  s3: c_e
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   230
  s2: c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   231
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   232
  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
   233
  $ 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
   234
   * 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
   235
  $ 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
   236
  ### 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
   237
  ### 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
   238
  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
   239
  s3: c_e
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   240
  s2: c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   241
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   242
  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
   243
4285
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   244
merge case (displaying info about external)
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   245
-------------------------------------------
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   246
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   247
  $ hg up default
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   248
  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   249
  $ hg topics zzz
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   250
  marked working directory as topic: zzz
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   251
  $ echo zzz > zzz
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   252
  $ hg add zzz
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   253
  $ hg commit -m zzz_a
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   254
  active topic 'zzz' grew its first changeset
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   255
  (see 'hg help topics' for more information)
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   256
  $ hg merge foo
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   257
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   258
  (branch merge, don't forget to commit)
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   259
  $ hg commit -m "merged foo"
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   260
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   261
stack -m display data about child
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   262
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   263
  $ hg stack foo
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   264
  ### topic: foo
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   265
  ### target: default (branch)
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   266
  s4: c_f
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   267
  s3: c_e
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   268
  s2: c_d
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   269
  s1: c_c
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   270
  s0^ c_b (base)
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   271
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   272
  $ hg stack foo --children
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   273
  ### topic: foo
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   274
  ### target: default (branch)
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   275
  s4: c_f (external-children)
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   276
  s3: c_e
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   277
  s2: c_d
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   278
  s1: c_c
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   279
  s0^ c_b (base)
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   280
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
   281
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
   282
4285
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   283
  $ hg strip --config extensions.strip= t1 --no-backup
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   284
  0 files updated, 0 files merged, 5 files removed, 0 files unresolved
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   285
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   286
  $ hg up foo
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   287
  switching to topic foo
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   288
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
69fb9e41ce2b stack: add a --children flag to stack
James Reynolds <jreynolds@backstage.com>
parents: 4268
diff changeset
   289
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
   290
  $ 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
   291
  $ 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
   292
  ### target: default (branch)
2937
b54abc7e80e2 topics: improve the description if topic is not touched
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2936
diff changeset
   293
  (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
   294
  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
   295
1904
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   296
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
   297
-------------------
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   298
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   299
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   300
  $ 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
   301
  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
   302
  [255]
f52c02bf47b7 stack: allow to refer to changeset using "t2" form
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1898
diff changeset
   303
  $ 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
   304
  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
   305
  $ 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
   306
  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
   307
  [255]
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   308
  $ hg up s42
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   309
  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
   310
  [255]
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   311
  $ 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
   312
  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
   313
  $ 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
   314
  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
   315
   c_d
62d5d4206840 stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1957
diff changeset
   316
  branch: default
62d5d4206840 stack: also change the indexing of the t# reference
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1957
diff changeset
   317
  commit: (clean)
4704
5f90eb8fd63c evolve: fix confusion in branch heads checking logic when topic in play
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4658
diff changeset
   318
  update: 2 new changesets (update)
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   319
  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
   320
  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
   321
1896
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   322
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
   323
------------------------------------
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   324
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   325
  $ echo bbb > ddd
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   326
  $ hg commit --amend
3431
2e703ed1c713 evolve: update output for wider reporting of troubled changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 3417
diff changeset
   327
  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
   328
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   329
  @  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
   330
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   331
  | *  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
   332
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   333
  | *  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
   334
  | |
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   335
  | 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
   336
  |/
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   337
  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
   338
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   339
  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
   340
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   341
  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
   342
  
4ae421cbb07c stack: exclude obsolete changeset from the set
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1895
diff changeset
   343
  $ 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
   344
  ### 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
   345
  ### target: default (branch)
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   346
  s4$ c_f (orphan)
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   347
  s3$ c_e (orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   348
  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
   349
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   350
  s0^ c_b (base)
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   351
  $ 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
   352
  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
   353
  $ 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
   354
  ### 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
   355
  ### target: default (branch)
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   356
  s4$ c_f (orphan)
4436
ef155f624670 stack: make @ (current) more important than $ (some sort of unstable)
Anton Shestakov <av6@dwimlabs.net>
parents: 4432
diff changeset
   357
  s3@ c_e (current orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   358
  s2: c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   359
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   360
  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
   361
  $ hg topic --list --color=debug
4658
89c1b739fabe stack: remove 'topic.' prefix from colors/labels
Anton Shestakov <av6@dwimlabs.net>
parents: 4657
diff changeset
   362
  [stack.summary.topic|### topic: [topic.active|foo]]
89c1b739fabe stack: remove 'topic.' prefix from colors/labels
Anton Shestakov <av6@dwimlabs.net>
parents: 4657
diff changeset
   363
  [stack.summary.branches|### target: default (branch)]
89c1b739fabe stack: remove 'topic.' prefix from colors/labels
Anton Shestakov <av6@dwimlabs.net>
parents: 4657
diff changeset
   364
  [stack.index stack.index.orphan|s4][stack.state stack.state.orphan|$] [stack.desc stack.desc.orphan|c_f][stack.state stack.state.orphan| (orphan)]
89c1b739fabe stack: remove 'topic.' prefix from colors/labels
Anton Shestakov <av6@dwimlabs.net>
parents: 4657
diff changeset
   365
  [stack.index stack.index.current stack.index.orphan|s3][stack.state stack.state.current stack.state.orphan|@] [stack.desc stack.desc.current stack.desc.orphan|c_e][stack.state stack.state.current stack.state.orphan| (current orphan)]
89c1b739fabe stack: remove 'topic.' prefix from colors/labels
Anton Shestakov <av6@dwimlabs.net>
parents: 4657
diff changeset
   366
  [stack.index stack.index.clean|s2][stack.state stack.state.clean|:] [stack.desc stack.desc.clean|c_d]
89c1b739fabe stack: remove 'topic.' prefix from colors/labels
Anton Shestakov <av6@dwimlabs.net>
parents: 4657
diff changeset
   367
  [stack.index stack.index.clean|s1][stack.state stack.state.clean|:] [stack.desc stack.desc.clean|c_c]
89c1b739fabe stack: remove 'topic.' prefix from colors/labels
Anton Shestakov <av6@dwimlabs.net>
parents: 4657
diff changeset
   368
  [stack.index stack.index.base|s0][stack.state stack.state.base|^] [stack.desc stack.desc.base|c_b][stack.state stack.state.base| (base)]
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   369
  $ 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
   370
  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
   371
1910
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   372
Also test the revset:
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   373
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   374
  $ hg log -r 'stack()'
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   375
  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
   376
  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
   377
  4 default {foo} draft c_e
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   378
  5 default {foo} draft c_f
24986e5a537c stack: add a 'stack()' revset
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1909
diff changeset
   379
2681
aa4db71a6224 topics: return a parse error if stack() revset is passed with argument
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2670
diff changeset
   380
  $ 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
   381
  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
   382
  [255]
aa4db71a6224 topics: return a parse error if stack() revset is passed with argument
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2670
diff changeset
   383
aa4db71a6224 topics: return a parse error if stack() revset is passed with argument
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2670
diff changeset
   384
  $ 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
   385
  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
   386
  [255]
aa4db71a6224 topics: return a parse error if stack() revset is passed with argument
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2670
diff changeset
   387
4322
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   388
Stack relation subscript:
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   389
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   390
  $ hg log -r 'foo#stack[0]'
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   391
  1 default {} public c_b
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   392
  $ hg log -r 's0 and foo#stack[0]'
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   393
  1 default {} public c_b
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   394
  $ hg log -r 'foo#stack[4]'
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   395
  5 default {foo} draft c_f
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   396
  $ hg log -r 's4 and foo#stack[4]'
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   397
  5 default {foo} draft c_f
41f38bf15b4c topic: make revsets like 'foo#stack[0]' work
Anton Shestakov <av6@dwimlabs.net>
parents: 4296
diff changeset
   398
1909
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   399
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
   400
-------------------------------------
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   401
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   402
Make things linear again
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   403
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   404
  $ 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
   405
  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
   406
  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
   407
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   408
  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
   409
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   410
  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
   411
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   412
  @  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
   413
  |
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   414
  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
   415
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   416
  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
   417
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   418
  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
   419
  
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   420
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
Create the second branch
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   423
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   424
  $ 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
   425
  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
   426
  $ echo aaa > ggg
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   427
  $ hg add ggg
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   428
  $ 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
   429
  $ echo aaa > hhh
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   430
  $ hg add hhh
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   431
  $ 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
   432
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   433
  @  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
   434
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   435
  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
   436
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   437
  | 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
   438
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   439
  | 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
   440
  |/
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   441
  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
   442
  |
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   443
  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
   444
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   445
  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
   446
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   447
  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
   448
  
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   449
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   450
Test output
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   451
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   452
  $ hg top -l
1998
302be26a3fd8 stack: add warning about multiple heads
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1996
diff changeset
   453
  ### 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
   454
  ### 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
   455
  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
   456
  s5: c_g
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   457
  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
   458
  s4: c_f
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   459
  s3: c_e
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   460
  s2: c_d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   461
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   462
  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
   463
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   464
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
   465
---------------------------------------------------------------
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   466
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   467
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
   468
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   469
  $ 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
   470
  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
   471
  $ echo ccc > ddd
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   472
  $ 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
   473
  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
   474
  $ 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
   475
  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
   476
  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
   477
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   478
  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
   479
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   480
  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
   481
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   482
  @  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
   483
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   484
  | *  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
   485
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   486
  | *  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
   487
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   488
  | 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
   489
  |/
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   490
  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
   491
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   492
  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
   493
  |
1960
a9a1abc7dd75 test: add topic on the first 2 changesets too
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1959
diff changeset
   494
  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
   495
  
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   496
36112e361ee4 stack: display the base of the stack
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1906
diff changeset
   497
  $ hg topic --list
1998
302be26a3fd8 stack: add warning about multiple heads
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1996
diff changeset
   498
  ### 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
   499
  ### 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
   500
  s6: c_h
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   501
  s5: c_g
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   502
  s2^ c_D (base current)
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   503
  s4$ c_f (orphan)
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   504
  s3$ c_e (orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   505
  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
   506
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   507
  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
   508
42abd3bd30ee topics: abort if user wants to show the stack of a non-existent topic
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2626
diff changeset
   509
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
   510
  $ 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
   511
  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
   512
  [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
   513
  $ 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
   514
  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
   515
  [255]
2684
90e11985d0cc topic: exclude public and topic changeset from branch stack
Boris Feld <boris.feld@octobus.net>
parents: 2681
diff changeset
   516
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   517
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
   518
==============================================================================
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   519
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   520
  $ hg log --graph
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   521
  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
   522
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   523
  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
   524
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   525
  @  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
   526
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   527
  | *  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
   528
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   529
  | *  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
   530
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   531
  | 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
   532
  |/
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   533
  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
   534
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   535
  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
   536
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   537
  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
   538
  
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   539
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
   540
  $ 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
   541
  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
   542
  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
   543
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   544
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   545
  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
   546
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   547
  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
   548
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   549
  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
   550
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   551
  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
   552
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   553
  @  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
   554
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   555
  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
   556
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   557
  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
   558
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   559
  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
   560
  
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   561
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
   562
  $ 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
   563
  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
   564
  4 new orphan changesets
4268
d5a2cc19903f topics: improve the message around topic changing
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 4067
diff changeset
   565
  changed topic on 2 changesets to "foobar"
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   566
  $ hg log -G
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   567
  @  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
   568
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   569
  | *  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
   570
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   571
  | | *  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
   572
  | | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   573
  | | 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
   574
  | |/
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   575
  | *  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
   576
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   577
  | *  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
   578
  | |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   579
  | 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
   580
  |/
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   581
  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
   582
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   583
  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
   584
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   585
  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
   586
  
2927
01cf426bd458 tests: abstract version number for test-topic-stack.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2919
diff changeset
   587
  $ 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
   588
  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
   589
  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
   590
  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
   591
  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
   592
  $ 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
   593
  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
   594
  switching to topic foo
3016
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   595
  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
   596
  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
   597
  switching to topic foobar
3016
d12c82fd1143 tests: update test output with commit 4f969b9e0cf5 in core
Pulkit Goyal <7895pulkit@gmail.com>
parents: 3013
diff changeset
   598
  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
   599
  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
   600
  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
   601
  $ hg up
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   602
  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
   603
  $ hg log --graph
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   604
  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
   605
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   606
  @  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
   607
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   608
  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
   609
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   610
  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
   611
  |
3013
945a0989e41b packaging: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   612
  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
   613
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   614
  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
   615
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   616
  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
   617
  |
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   618
  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
   619
  
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   620
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
   621
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
   622
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   623
  $ 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
   624
  ### 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
   625
  ### 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
   626
  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
   627
    ^ c_h
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   628
  s1: c_D
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   629
  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
   630
4657
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   631
  $ hg stack -v
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   632
  ### topic: foobar
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   633
  ### target: default (branch), 3 behind
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   634
  s2(ea0f882ce093)@ c_e (current)
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   635
                  ^ c_h
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   636
  s1(d2f548af67ab): c_D
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   637
  s0(8522f9e3fee9)^ c_c (base)
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   638
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   639
  $ hg stack --debug
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   640
  ### topic: foobar
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   641
  ### target: default (branch), 3 behind
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   642
  s2(ea0f882ce093a2ad63db49083c5cb98a24a9470e)@ c_e (current)
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   643
                                              ^ c_h
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   644
  s1(d2f548af67ab55b08452a3e00a539319490fcd5b): c_D
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   645
  s0(8522f9e3fee92d4ec4e688ac3fbd2ee0f8fd5036)^ c_c (base)
c24dabf8e848 stack: handle hash sizes when --debug flag is provided
Anton Shestakov <av6@dwimlabs.net>
parents: 4656
diff changeset
   646
2913
6b2ae9f2b9c4 tests: add tests for `hg stack` showing surprising behavior with gaps
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2911
diff changeset
   647
  $ 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
   648
  ### topic: foo
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3180
diff changeset
   649
  ### 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
   650
  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
   651
    ^ c_e
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   652
  s3: c_h
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   653
  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
   654
    ^ c_D
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   655
  s1: c_c
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   656
  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
   657
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   658
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
   659
----------------------
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   660
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   661
  $ cd ..
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   662
  $ 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
   663
  $ 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
   664
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   665
  $ 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
   666
  $ 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
   667
  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
   668
  $ 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
   669
  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
   670
  $ 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
   671
  $ 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
   672
  adding bbb
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
   673
  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
   674
  (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
   675
  $ 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
   676
  $ 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
   677
  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
   678
  $ 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
   679
  $ 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
   680
  $ 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
   681
  adding ddd
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2986
diff changeset
   682
  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
   683
  (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
   684
  $ 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
   685
  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
   686
  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
   687
  $ 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
   688
  $ 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
   689
  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
   690
  $ 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
   691
  $ 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
   692
  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
   693
  $ 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
   694
  $ 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
   695
  $ 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
   696
  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
   697
  $ 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
   698
  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
   699
  $ 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
   700
  $ 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
   701
  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
   702
  (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
   703
  $ 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
   704
  $ 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
   705
  $ 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
   706
  $ 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
   707
  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
   708
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   709
  $ 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
   710
  @  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
   711
  |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   712
  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
   713
  |\
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   714
  | 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
   715
  | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   716
  | 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
   717
  | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   718
  | 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
   719
  | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   720
  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
   721
  | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   722
  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
   723
  |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   724
  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
   725
  |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   726
  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
   727
  
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   728
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   729
  $ 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
   730
  ### 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
   731
  ### 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
   732
  s5: c_H
2918
0437158e0ed6 stack: display both parent with displaying merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2917
diff changeset
   733
    ^ c_G
0437158e0ed6 stack: display both parent with displaying merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2917
diff changeset
   734
    ^ c_D
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   735
  s4: c_C
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   736
  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
   737
  s3: c_F
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   738
  s2: c_E
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   739
  s1: c_B
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   740
  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
   741
  $ 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
   742
  ### topic: blue
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3180
diff changeset
   743
  ### 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
   744
  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
   745
    ^ c_H
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   746
  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
   747
    ^ c_C
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   748
  s1: c_G
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   749
  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
   750
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   751
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
   752
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   753
(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
   754
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
   755
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   756
  $ 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
   757
  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
   758
  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
   759
  $ 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
   760
  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
   761
  $ 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
   762
  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
   763
  $ 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
   764
  $ 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
   765
  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
   766
  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
   767
  $ 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
   768
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   769
  $ 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
   770
  @  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
   771
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   772
  | *  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
   773
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   774
  | *    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
   775
  | |\
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   776
  | | *  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
   777
  | | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   778
  | | *  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
   779
  | | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   780
  | | *  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
   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
  | 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
   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
  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
   785
  |/
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   786
  | *  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
   787
  |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   788
  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
   789
  |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   790
  | 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
   791
  |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   792
  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
   793
  
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   794
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   795
  $ 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
   796
  ### topic: red
4828
aaf8742e09a0 stack: demonstrate that not reusing cached property gives different results
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
   797
  ### target: default (branch), 7 behind
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   798
  s5$ c_H (orphan)
2918
0437158e0ed6 stack: display both parent with displaying merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2917
diff changeset
   799
    ^ 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
   800
    ^ c_D
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   801
  s4$ c_C (orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   802
  s1^ c_B (base)
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   803
  s3$ c_F (orphan)
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   804
  s2$ c_E (orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   805
  s1: c_B
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   806
  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
   807
  $ 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
   808
  ### topic: blue
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3180
diff changeset
   809
  ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   810
  s3$ c_I (orphan)
2919
5b514ab2ab4e stack: properly order stack when gaps existing inside it
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2918
diff changeset
   811
    ^ c_H
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   812
  s2$ c_G (orphan)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   813
    ^ c_F
4436
ef155f624670 stack: make @ (current) more important than $ (some sort of unstable)
Anton Shestakov <av6@dwimlabs.net>
parents: 4432
diff changeset
   814
  s1@ c_D (current orphan)
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   815
  s0^ c_C (base orphan)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   816
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   817
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
   818
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   819
  $ 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
   820
  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
   821
  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
   822
  $ 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
   823
  $ 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
   824
  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
   825
  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
   826
  $ 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
   827
  $ 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
   828
  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
   829
  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
   830
  $ 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
   831
  $ 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
   832
  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
   833
  $ 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
   834
  $ 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
   835
  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
   836
  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
   837
  $ 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
   838
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   839
  $ 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
   840
  @  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
   841
  |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   842
  | *  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
   843
  | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   844
  | | *    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
   845
  | | |\
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   846
  | | | | *  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
   847
  | | | | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   848
  | | +---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
   849
  | | | |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   850
  | +---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
   851
  | | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   852
  | * |  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
   853
  | | |
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   854
  | * |  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
   855
  | | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   856
  +---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
   857
  | |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   858
  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
   859
  |/
3417
d3a17c67f85c branching: merge stable back into default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3412
diff changeset
   860
  | *  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
   861
  |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   862
  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
   863
  |
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   864
  | 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
   865
  |/
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   866
  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
   867
  
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   868
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   869
  $ 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
   870
  ### topic: red
4828
aaf8742e09a0 stack: demonstrate that not reusing cached property gives different results
Anton Shestakov <av6@dwimlabs.net>
parents: 4712
diff changeset
   871
  ### target: default (branch), 7 behind
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   872
  s5$ c_H (orphan)
2918
0437158e0ed6 stack: display both parent with displaying merge
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2917
diff changeset
   873
    ^ 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
   874
    ^ c_D
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   875
  s4$ c_F (orphan)
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   876
  s3$ c_E (orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   877
  s1^ c_B (base)
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   878
  s2$ c_C (orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   879
  s1: c_B
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   880
  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
   881
  $ 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
   882
  ### topic: blue
3225
28fb347a5bf8 typos: fix typos in several locations
Kyle Lippincott <spectral@google.com>
parents: 3180
diff changeset
   883
  ### target: default (branch), ambiguous rebase destination - topic 'blue' has 3 heads
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   884
  s3$ c_I (orphan)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   885
    ^ c_H
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   886
  s2$ c_G (orphan)
2917
044686b25cf7 tests: add tests for showing stack when merge is involved
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2913
diff changeset
   887
    ^ c_F
4436
ef155f624670 stack: make @ (current) more important than $ (some sort of unstable)
Anton Shestakov <av6@dwimlabs.net>
parents: 4432
diff changeset
   888
  s1@ c_D (current orphan)
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   889
  s0^ c_C (base orphan)
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   890
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   891
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
   892
--------------------------------
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   893
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   894
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
   895
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   896
  $ hg rebase -r s1 -d default
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   897
  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
   898
  switching to topic blue
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   899
  $ hg rebase -r s2 -d s1
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   900
  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
   901
  $ hg rebase -r s3 -d s2
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   902
  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
   903
  $ hg stack
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   904
  ### topic: blue
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   905
  ### 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
   906
  s3: c_I
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   907
  s2: c_G
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   908
  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
   909
  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
   910
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   911
making a split
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   912
(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
   913
4065
fbc51e98cf13 alias: allow reference through 's#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3770
diff changeset
   914
  $ 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
   915
  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
   916
  $ hg status --change .
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   917
  A ggg
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   918
  $ echo zzz > Z
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   919
  $ hg add Z
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   920
  $ hg commit --amend
3431
2e703ed1c713 evolve: update output for wider reporting of troubled changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 3417
diff changeset
   921
  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
   922
  $ hg status --change .
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   923
  A Z
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   924
  A ggg
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   925
  $ hg stack
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   926
  ### topic: blue
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   927
  ### target: default (branch)
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
   928
  s3$ c_I (orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   929
  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
   930
  s1: c_D
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
   931
  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
   932
  $ 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
   933
  > y
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   934
  > y
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   935
  > n
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   936
  > c
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   937
  > EOF
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   938
  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
   939
  adding Z
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   940
  adding ggg
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   941
  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
   942
  new file mode 100644
4712
e2c548cc83b5 tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents: 4704
diff changeset
   943
  examine changes to 'Z'?
e2c548cc83b5 tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents: 4704
diff changeset
   944
  (enter ? for help) [Ynesfdaq?] y
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   945
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   946
  @@ -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
   947
  +zzz
4712
e2c548cc83b5 tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents: 4704
diff changeset
   948
  record change 1/2 to 'Z'?
e2c548cc83b5 tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents: 4704
diff changeset
   949
  (enter ? for help) [Ynesfdaq?] y
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   950
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   951
  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
   952
  new file mode 100644
4712
e2c548cc83b5 tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents: 4704
diff changeset
   953
  examine changes to 'ggg'?
e2c548cc83b5 tests: update output for shorted prompts from Mercurial
Martin von Zweigbergk <martinvonz@google.com>
parents: 4704
diff changeset
   954
  (enter ? for help) [Ynesfdaq?] n
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   955
  
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
   956
  continue splitting? [Ycdq?] c
3017
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   957
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   958
  $ hg --config extensions.evolve= obslog --all
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   959
  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
   960
  |
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   961
  | @  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
   962
  |/
3018
d9e998120771 merge with stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3016 3017
diff changeset
   963
  x  b24bab30ac12 (20) c_G
3567
5ddea3b8d2a4 split: include "operation" metadata in obsmarkers
Martin von Zweigbergk <martinvonz@google.com>
parents: 3519
diff changeset
   964
  |    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
   965
  |
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   966
  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
   967
  |    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
   968
  |
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   969
  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
   970
  |    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
   971
  |
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   972
  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
   973
       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
   974
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   975
  $ hg export .
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   976
  # HG changeset patch
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   977
  # User test3
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   978
  # Date 0 0
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   979
  #      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
   980
  # Node ID e7ea874afbd5c17aeee366d39a828dbcb01682ce
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   981
  # Parent  dde94df880e97f4a1ee8c5408254b429b3d90204
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   982
  # EXP-Topic blue
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   983
  c_G
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   984
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   985
  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
   986
  --- /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
   987
  +++ 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
   988
  @@ -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
   989
  +ggg
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   990
  $ hg export .^
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   991
  # HG changeset patch
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   992
  # User test3
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   993
  # Date 0 0
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   994
  #      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
   995
  # Node ID dde94df880e97f4a1ee8c5408254b429b3d90204
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   996
  # Parent  f3328cd199dc389b850ca952f65a15a8e6dbc79b
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   997
  # EXP-Topic blue
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   998
  c_G
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
   999
  
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
  1000
  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
  1001
  --- /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
  1002
  +++ 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
  1003
  @@ -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
  1004
  +zzz
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
  1005
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
  1006
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
  1007
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
  1008
  $ hg stack
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
  1009
  ### topic: blue
0884856a4143 stack: handle basic case of splitting with crash
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3000
diff changeset
  1010
  ### target: default (branch)
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4322
diff changeset
  1011
  s4$ c_I (orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
  1012
  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
  1013
  s2: c_G
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
  1014
  s1: c_D
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4066
diff changeset
  1015
  s0^ c_A (base)