tests/test-topic-stack-complex.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 11 Apr 2019 22:44:53 +0200
branchmercurial-4.4
changeset 4516 f54bb6eaf5e6
parent 4363 a2fdbece7ce1
parent 4513 d70db7e455dc
child 4675 79bc0f1a832e
permissions -rw-r--r--
test-compat: merge mercurial-4.5 into mercurial-4.4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3277
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     1
Testing `hg stack` on complex cases when we have multiple successors because of
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     2
divergence, split etc.
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     3
  $ . "$TESTDIR/testlib/topic_setup.sh"
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     4
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     5
Setup
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     6
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     7
  $ cat << EOF >> $HGRCPATH
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     8
  > [experimental]
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     9
  > evolution = all
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    10
  > [ui]
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    11
  > interactive = True
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    12
  > [extensions]
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    13
  > show =
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    14
  > EOF
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    15
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    16
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    17
  $ hg init test
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    18
  $ cd test
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    19
  $ echo foo > foo
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    20
  $ hg add foo
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    21
  $ hg ci -m "Added foo"
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    22
  $ hg phase -r . --public
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    23
  $ hg topic foo
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    24
  marked working directory as topic: foo
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    25
  $ echo a > a
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    26
  $ echo b > b
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    27
  $ hg ci -Aqm "Added a and b"
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    28
  $ echo c > c
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    29
  $ echo d > d
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    30
  $ hg ci -Aqm "Added c and d"
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    31
  $ echo e > e
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    32
  $ echo f > f
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  $ hg ci -Aqm "Added e and f"
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
  $ hg show work
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
  @  f1d3 (foo) Added e and f
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    36
  o  8e82 (foo) Added c and d
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    37
  o  002b (foo) Added a and b
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
  o  f360 Added foo
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    40
Testing in case of split within the topic
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    42
  $ hg stack
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    43
  ### topic: foo
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
  ### target: default (branch)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
    45
  s3@ Added e and f (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
    46
  s2: Added c and d
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
    47
  s1: Added a and b
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
    48
  s0^ Added foo (base)
3277
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    49
  $ hg prev
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    50
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
4161
3c28f8a3a5a5 prev: also use stack shortcut in output when possible
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4067
diff changeset
    51
  [s2] Added c and d
3277
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    52
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    53
  $ echo 0 > num
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    54
  $ cat > editor.sh << '__EOF__'
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    55
  > NUM=$(cat num)
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    56
  > NUM=`expr "$NUM" + 1`
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    57
  > echo "$NUM" > num
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    58
  > echo "split$NUM" > "$1"
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    59
  > __EOF__
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    60
  $ export HGEDITOR="\"sh\" \"editor.sh\""
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    61
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    62
  $ hg split << EOF
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    63
  > y
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    64
  > y
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    65
  > n
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
    66
  > c
3277
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    67
  > EOF
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    68
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    69
  adding c
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    70
  adding d
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    71
  diff --git a/c b/c
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    72
  new file mode 100644
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    73
  examine changes to 'c'? [Ynesfdaq?] y
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    74
  
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    75
  @@ -0,0 +1,1 @@
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    76
  +c
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    77
  record change 1/2 to 'c'? [Ynesfdaq?] y
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    78
  
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    79
  diff --git a/d b/d
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    80
  new file mode 100644
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    81
  examine changes to 'd'? [Ynesfdaq?] n
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    82
  
4294
8974a05a49fa split: rework the prompt to be more standard
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4293
diff changeset
    83
  continue splitting? [Ycdq?] c
3277
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    84
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    85
  $ hg stack
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    86
  ### topic: foo
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    87
  ### target: default (branch)
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4294
diff changeset
    88
  s4$ Added e and f (orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
    89
  s3@ split2 (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
    90
  s2: split1
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
    91
  s1: Added a and b
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
    92
  s0^ Added foo (base)
3277
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    93
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    94
  $ hg show work
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    95
  @  5cce (foo) split2
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    96
  o  f26c (foo) split1
3590
d5adce52cef4 test-compat: merge stable into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
    97
  | o  f1d3 (foo) Added e and f
3277
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    98
  | x  8e82 (foo) Added c and d
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    99
  |/
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   100
  o  002b (foo) Added a and b
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   101
  o  f360 Added foo
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   102
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   103
  $ hg prev
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   104
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
4161
3c28f8a3a5a5 prev: also use stack shortcut in output when possible
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4067
diff changeset
   105
  [s2] split1
3277
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   106
  $ echo foo > c
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   107
  $ hg diff
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   108
  diff -r f26c1b9addde c
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   109
  --- a/c	Thu Jan 01 00:00:00 1970 +0000
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   110
  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   111
  @@ -1,1 +1,1 @@
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   112
  -c
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   113
  +foo
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   114
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   115
  $ hg amend
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   116
  $ hg show work
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   117
  @  7d94 (foo) split1
3590
d5adce52cef4 test-compat: merge stable into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
   118
  | o  5cce (foo) split2
3277
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   119
  | x  f26c (foo) split1
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   120
  |/
3590
d5adce52cef4 test-compat: merge stable into mercurial-4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
   121
  | o  f1d3 (foo) Added e and f
3277
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   122
  | x  8e82 (foo) Added c and d
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   123
  |/
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   124
  o  002b (foo) Added a and b
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   125
  o  f360 Added foo
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   126
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   127
  $ hg stack
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   128
  ### topic: foo (2 heads)
0a6954bd6502 tests: add a test showing traceback on `hg stack` in case of split
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   129
  ### target: default (branch), 2 behind
4432
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4294
diff changeset
   130
  s4$ Added e and f (orphan)
5da1d162ad50 stack: rename unstable -> orphan
Anton Shestakov <av6@dwimlabs.net>
parents: 4294
diff changeset
   131
  s3$ split2 (orphan)
4067
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
   132
  s2@ split1 (current)
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
   133
  s1: Added a and b
fb4801478d5d stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3431
diff changeset
   134
  s0^ Added foo (base)
4189
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   135
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   136
Test case with divergence
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   137
-------------------------
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   138
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   139
  $ hg evolve --all
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   140
  move:[s3] split2
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   141
  atop:[s2] split1
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   142
  move:[s4] Added e and f
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   143
  working directory is now at ec94a1ed1330
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   144
  $ hg up s4
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   145
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   146
  $ hg id -r .
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   147
  ec94a1ed1330 tip
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   148
  $ hg up --hidden 'min(precursors(.))'
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   149
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   150
  working directory parent is obsolete! (f1d3649d6a8b)
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   151
  (use 'hg evolve' to update to its successor: ec94a1ed1330)
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   152
  $ hg amend -d '0 1'
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   153
  $ hg rebase -r . -d ec94a1ed1330~1
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   154
  rebasing 9:eb3b16fef8ea "Added e and f" (tip foo)
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   155
  $ hg stack
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   156
  ### topic: foo (2 heads)
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   157
  ### target: default (branch)
4435
7915aef191ff stack: show content and phase divergent state and symbol
Anton Shestakov <av6@dwimlabs.net>
parents: 4432
diff changeset
   158
  s5$ Added e and f (content divergent)
4189
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   159
  s3^ split2 (base)
4436
ef155f624670 stack: make @ (current) more important than $ (some sort of unstable)
Anton Shestakov <av6@dwimlabs.net>
parents: 4435
diff changeset
   160
  s4@ Added e and f (content divergent current)
4189
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   161
  s3: split2
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   162
  s2: split1
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   163
  s1: Added a and b
36d559ca5332 stack-index: add some test featuring content diversion
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4161
diff changeset
   164
  s0^ Added foo (base)
4190
883e75e0a810 topicidx: stop assigning index number to obsolete changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4189
diff changeset
   165
883e75e0a810 topicidx: stop assigning index number to obsolete changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4189
diff changeset
   166
  $ hg evolve --content-divergent -r ec94a1ed1330
883e75e0a810 topicidx: stop assigning index number to obsolete changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4189
diff changeset
   167
  merge:[s5] Added e and f
883e75e0a810 topicidx: stop assigning index number to obsolete changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4189
diff changeset
   168
  with: [s4] Added e and f
4210
470ba668687a evolve: do not try to display stack index of changeset who do not have one
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4190
diff changeset
   169
  base: [3] Added e and f
4190
883e75e0a810 topicidx: stop assigning index number to obsolete changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4189
diff changeset
   170
  updating to "local" side of the conflict: ec94a1ed1330
883e75e0a810 topicidx: stop assigning index number to obsolete changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4189
diff changeset
   171
  merging "other" content-divergent changeset 'f2eff98490d2'
883e75e0a810 topicidx: stop assigning index number to obsolete changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4189
diff changeset
   172
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
883e75e0a810 topicidx: stop assigning index number to obsolete changesets
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4189
diff changeset
   173
  working directory is now at 8faad6276dc6