tests/test-evolve-topic.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 05 May 2016 20:14:39 +0200
changeset 1690 52cda77949f5
parent 1629 548195454683
child 1691 2ed06153217f
permissions -rw-r--r--
test: improve skipped message for topic The skipped message should point people to a way to solve the situation.
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
1690
52cda77949f5 test: improve skipped message for topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1629
diff changeset
     4
  $ [ -z "$TOPICROOT" ] && echo 'skipped: $TOPICROOT not set' >&2 && exit 80
52cda77949f5 test: improve skipped message for topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1629
diff changeset
     5
  [1]
52cda77949f5 test: improve skipped message for topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1629
diff changeset
     6
  $ [ ! -e $TOPICROOT/hgext3rd/topic/__init__.py ] && echo 'skipped: no topic repo found at $TOPICROOT' >&2 && exit 80
52cda77949f5 test: improve skipped message for topic
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1629
diff changeset
     7
  [1]
1626
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
  $ 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
     9
  > [defaults]
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
  > 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
    11
  > 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
    12
  > [phases]
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
  > publish = False
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
  > [ui]
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
  > 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
    16
  > [diff]
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
  > git = 1
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
  > unified = 0
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
  > [extensions]
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
  > rebase = 
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
  > topic = $TOPICROOT/hgext3rd/topic/
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
  > EOF
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
  $ mkcommit() {
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
  >    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
    27
  >    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
    28
  >    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
    29
  > }
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
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
    32
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  $ 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
    34
  $ cd repoa
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  $ mkcommit aaa
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ mkcommit bbb
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  $ hg topic foo
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  $ mkcommit ccc
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  $ mkcommit ddd
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  created new head
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  $ mkcommit eee
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  created new head
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  $ mkcommit fff
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  created new head
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  $ 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
    46
  $ mkcommit ggg
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  created new head
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  $ mkcommit hhh
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  created new head
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  $ mkcommit iii
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  created new head
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  $ mkcommit jjj
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  created new head
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  $ 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
    56
  @  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
    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  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
    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  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
    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  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
    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  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
    65
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  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
    67
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  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
    69
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  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
    71
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  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
    73
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  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
    75
  
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
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
    78
-----------------------------------------------
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
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
    81
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  $ 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
    83
  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
    84
  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
    85
  $ hg topic -l 
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
    _ add bbb
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  t0: add ccc
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  t1: add ddd
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  t2: add eee
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  t3@ add fff (current)
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  $ 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
    92
  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
    93
  $ 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
    94
  $ hg amend
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  6 new unstable changesets
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  $ 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
    97
  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
    98
  $ 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
    99
  $ hg amend
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  $ 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
   102
  @  13 - {foo} e104f49bab28 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
   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  11 - {foo} d9cacd156ffc 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
   105
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  | | 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
   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  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
   109
  | | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   110
  | | 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
   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  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
   113
  | | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   114
  +---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
   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 |  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
   117
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   118
  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
   119
  |/
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   120
  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
   121
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   122
  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
   123
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   124
  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
   125
  
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   126
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   127
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
   128
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   129
  $ 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
   130
  move:[4] add eee
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   131
  atop:[11] add ddd
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   132
  move:[13] add fff
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   133
  atop:[14] add eee
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   134
  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
   135
  $ 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
   136
  @  15 - {foo} 070c5573d8f9 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
   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  14 - {foo} 42b49017ff90 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
   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  11 - {foo} d9cacd156ffc 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
   141
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   142
  | 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
   143
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   144
  | 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
   145
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   146
  | 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
   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  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
   149
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   150
  | 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
   151
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   152
  | 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
   153
  | |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   154
  | 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
   155
  |/
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   156
  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
   157
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   158
  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
   159
  |
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   160
  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
   161
  
0edb545503fe topic: 'hg evolve --all' pick all trouble within current topic
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   162
1627
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   163
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
   164
-------------------------------------------------
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   165
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   166
  $ hg evolve --rev 'topic(bar)'
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   167
  move:[6] add ggg
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   168
  atop:[15] add fff
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   169
  move:[7] add hhh
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   170
  atop:[16] add ggg
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   171
  move:[8] add iii
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   172
  atop:[17] add hhh
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   173
  move:[9] add jjj
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   174
  atop:[18] add iii
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   175
  working directory is now at 9bf430c106b7
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   176
  $ hg log -G
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   177
  @  19 - {bar} 9bf430c106b7 add jjj (draft)
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   178
  |
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   179
  o  18 - {bar} d2dc89c57700 add iii (draft)
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   180
  |
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   181
  o  17 - {bar} 20bc4d02aa62 add hhh (draft)
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  16 - {bar} 16d6f664b17c add ggg (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  15 - {foo} 070c5573d8f9 add fff (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  14 - {foo} 42b49017ff90 add eee (draft)
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   188
  |
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   189
  o  11 - {foo} d9cacd156ffc add ddd (draft)
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   190
  |
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   191
  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
   192
  |
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   193
  o  1 - {} a4dbed0837ea add bbb (draft)
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   194
  |
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   195
  o  0 - {} 199cc73e9a0b add aaa (draft)
a91115687a7e topic: preserve topic during evolve
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1626
diff changeset
   196
  
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
   197
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
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
   199
============================
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
   200
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
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
   202
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
   203
  $ 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
   204
  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
   205
  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
   206
  $ 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
   207
  0 files updated, 0 files merged, 1 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
   208
  [14] add eee
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
  $ 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
   210
  1 files updated, 0 files merged, 0 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
   211
  [15] add fff
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
   212
  $ 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
   213
  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
   214
  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
   215
  [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
   216
  $ 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
   217
  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
   218
  1 files updated, 0 files merged, 0 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
   219
  [16] 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
   220
  $ hg prev
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
  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
   222
  (do you want --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
   223
  $ 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
   224
  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
   225
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
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
   226
  [15] add fff