tests/test-evolve-topic.t
author Aurélien Campéas
Tue, 26 Sep 2017 12:29:15 +0200
changeset 2985 f63c97c01f92
parent 2929 06844693bb21
child 2988 62201935e1a7
permissions -rw-r--r--
topics/ui: signal when the topics command creates a new (empty) topic
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
Check we can find the topic extensions
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  $ cat >> $HGRCPATH <<EOF
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
  > [defaults]
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
  > amend=-d "0 0"
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
  > fold=-d "0 0"
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
  > [phases]
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
  > publish = False
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
  > [ui]
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
  > logtemplate = {rev} - \{{get(namespaces, "topics")}} {node|short} {desc} ({phase})\n
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
  > [diff]
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
  > git = 1
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
  > unified = 0
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
  > [extensions]
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
  > rebase = 
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
  > EOF
1806
9f42f819267b evolve: move the extensions to 'hgext3rd'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1723
diff changeset
    18
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
2020
143c8e4dc22d topic: merge the topic extension in the evolve repository
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1806
diff changeset
    19
  $ echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic/" >> $HGRCPATH
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
  $ mkcommit() {
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
  >    echo "$1" > "$1"
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
  >    hg add "$1"
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
  >    hg ci -m "add $1"
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
  > }
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
Create a simple setup
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
  $ hg init repoa
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
  $ cd repoa
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
  $ mkcommit aaa
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  $ mkcommit bbb
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  $ hg topic foo
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2929
diff changeset
    34
  marked working directory as topic: foo
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  $ mkcommit ccc
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ mkcommit ddd
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  $ mkcommit eee
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  $ mkcommit fff
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  $ hg topic bar
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  $ mkcommit ggg
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  $ mkcommit hhh
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  $ mkcommit iii
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  $ mkcommit jjj
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  $ hg log -G
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  @  9 - {bar} 1d964213b023 add jjj (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  o  8 - {bar} fcab990f3261 add iii (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  o  7 - {bar} b0c2554835ac add hhh (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  o  6 - {bar} c748293f1c1a add ggg (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  o  5 - {foo} 6a6b7365c751 add fff (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  o  4 - {foo} 3969ab847d9c add eee (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  o  3 - {foo} 4e3a154f38c7 add ddd (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  o  2 - {foo} cced9bac76e3 add ccc (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  o  1 - {} a4dbed0837ea add bbb (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  o  0 - {} 199cc73e9a0b add aaa (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
Test that evolve --all evolve the current topic
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
-----------------------------------------------
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
make a mess
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  $ hg up foo
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  switching to topic foo
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  $ hg topic -l 
1723
2672f36d668e test: adapt to topic changes
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1694
diff changeset
    76
  ### topic: foo (?)
2672f36d668e test: adapt to topic changes
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1694
diff changeset
    77
  ### branch: default (?)
1693
73acbc623830 test: update topic test output for order change
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1692
diff changeset
    78
  t4@ add fff (current)
73acbc623830 test: update topic test output for order change
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1692
diff changeset
    79
  t3: add eee
1692
2f328bcb27a8 test: update topic test output for indexing change
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1691
diff changeset
    80
  t2: add ddd
1693
73acbc623830 test: update topic test output for order change
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1692
diff changeset
    81
  t1: add ccc
2712
f19b314d8475 topics: add t0 and b0 to the stack
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2020
diff changeset
    82
  t0^ add bbb (base)
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
  $ hg up 'desc(ddd)'
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  $ echo ddd >> ddd
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  $ hg amend
2854
66796d7b5415 warning: rename unstable warning message
Boris Feld <boris.feld@octobus.net>
parents: 2745
diff changeset
    87
  6 new orphan changesets
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  $ hg up 'desc(fff)'
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  $ echo fff >> fff
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  $ hg amend
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
  $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
    94
  @  11 - {foo} e104f49bab28 add fff (draft)
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
    96
  | o  10 - {foo} d9cacd156ffc add ddd (draft)
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  | | o  9 - {bar} 1d964213b023 add jjj (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  | | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  | | o  8 - {bar} fcab990f3261 add iii (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  | | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  | | o  7 - {bar} b0c2554835ac add hhh (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  | | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  | | o  6 - {bar} c748293f1c1a add ggg (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  | | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  +---x  5 - {foo} 6a6b7365c751 add fff (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   108
  o |  4 - {foo} 3969ab847d9c add eee (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   109
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   110
  x |  3 - {foo} 4e3a154f38c7 add ddd (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111
  |/
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   112
  o  2 - {foo} cced9bac76e3 add ccc (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   113
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   114
  o  1 - {} a4dbed0837ea add bbb (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   115
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   116
  o  0 - {} 199cc73e9a0b add aaa (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   117
  
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   118
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   119
Run evolve --all
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   120
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   121
  $ hg evolve --all
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   122
  move:[4] add eee
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   123
  atop:[10] add ddd
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   124
  move:[11] add fff
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   125
  atop:[12] add eee
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   126
  working directory is now at 070c5573d8f9
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   127
  $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   128
  @  13 - {foo} 070c5573d8f9 add fff (draft)
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   129
  |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   130
  o  12 - {foo} 42b49017ff90 add eee (draft)
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   131
  |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   132
  o  10 - {foo} d9cacd156ffc add ddd (draft)
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   133
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   134
  | o  9 - {bar} 1d964213b023 add jjj (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   135
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   136
  | o  8 - {bar} fcab990f3261 add iii (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   137
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   138
  | o  7 - {bar} b0c2554835ac add hhh (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   139
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   140
  | o  6 - {bar} c748293f1c1a add ggg (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   141
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   142
  | x  5 - {foo} 6a6b7365c751 add fff (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   143
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   144
  | x  4 - {foo} 3969ab847d9c add eee (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   145
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   146
  | x  3 - {foo} 4e3a154f38c7 add ddd (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   147
  |/
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   148
  o  2 - {foo} cced9bac76e3 add ccc (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   149
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   150
  o  1 - {} a4dbed0837ea add bbb (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   151
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   152
  o  0 - {} 199cc73e9a0b add aaa (draft)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   153
  
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   154
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   155
Test that evolve does not loose topic information
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   156
-------------------------------------------------
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   157
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   158
  $ hg evolve --rev 'topic(bar)'
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   159
  move:[6] add ggg
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   160
  atop:[13] add fff
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   161
  move:[7] add hhh
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   162
  atop:[14] add ggg
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   163
  move:[8] add iii
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   164
  atop:[15] add hhh
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   165
  move:[9] add jjj
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   166
  atop:[16] add iii
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   167
  working directory is now at 9bf430c106b7
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   168
  $ hg log -G
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   169
  @  17 - {bar} 9bf430c106b7 add jjj (draft)
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   170
  |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   171
  o  16 - {bar} d2dc89c57700 add iii (draft)
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   172
  |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   173
  o  15 - {bar} 20bc4d02aa62 add hhh (draft)
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   174
  |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   175
  o  14 - {bar} 16d6f664b17c add ggg (draft)
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   176
  |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   177
  o  13 - {foo} 070c5573d8f9 add fff (draft)
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   178
  |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   179
  o  12 - {foo} 42b49017ff90 add eee (draft)
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   180
  |
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   181
  o  10 - {foo} d9cacd156ffc add ddd (draft)
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   182
  |
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   183
  o  2 - {foo} cced9bac76e3 add ccc (draft)
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   184
  |
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   185
  o  1 - {} a4dbed0837ea add bbb (draft)
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   186
  |
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   187
  o  0 - {} 199cc73e9a0b add aaa (draft)
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   188
  
1628
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   189
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   190
Tests next and prev behavior
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   191
============================
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   192
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   193
Basic move are restricted to the current topic
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   194
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   195
  $ hg up foo
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   196
  switching to topic foo
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   197
  0 files updated, 0 files merged, 4 files removed, 0 files unresolved
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   198
  $ hg prev
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   199
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   200
  [12] add eee
1628
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   201
  $ hg next
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   202
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   203
  [13] add fff
1628
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   204
  $ hg next
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   205
  no children on topic "foo"
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   206
  do you want --no-topic
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   207
  [1]
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   208
  $ hg next --no-topic
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   209
  switching to topic bar
db19b1dc5c45 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1627
diff changeset
   210
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   211
  [14] add ggg
1629
548195454683 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1628
diff changeset
   212
  $ hg prev
2745
b38112b43a27 prev: allow to update to 't0' from 't1'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2739
diff changeset
   213
  preserving the current topic 'bar'
b38112b43a27 prev: allow to update to 't0' from 't1'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2739
diff changeset
   214
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   215
  [13] add fff
2745
b38112b43a27 prev: allow to update to 't0' from 't1'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2739
diff changeset
   216
  $ hg prev
1629
548195454683 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1628
diff changeset
   217
  no parent in topic "bar"
548195454683 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1628
diff changeset
   218
  (do you want --no-topic)
2739
7d86594cb829 prev: extract the code computing the destination
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2712
diff changeset
   219
  [1]
1629
548195454683 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1628
diff changeset
   220
  $ hg prev --no-topic
548195454683 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1628
diff changeset
   221
  switching to topic foo
548195454683 topic: restrict 'hg prev' to current topic unless --no-topic is passed
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1628
diff changeset
   222
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2929
06844693bb21 tests: update after removing of redundant amend commit
Boris Feld <boris.feld@octobus.net>
parents: 2854
diff changeset
   223
  [12] add eee