tests/test-evolve-noupdate.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 10 Apr 2019 21:03:56 +0200
changeset 4498 99dbe605fda5
parent 4122 4eb3877540f1
child 4173 e268f7fd7839
child 4577 bcd52ce0916d
permissions -rw-r--r--
test: add file cancelation scenario for phase-divergence This improve the test coverage for corner cases.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3774
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     1
Testing the `--no-update` flag to `hg evolve` command
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     2
=====================================================
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     3
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     4
There is an `--update` flag to `hg evolve` command which defaults to True. The
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     5
`--update` flag updates to the head of the evolved revisions. If you dont want
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     6
to change your working directory or update your working directory to its
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     7
sucessor after hg evolve, `hg evolve --no-update` is the thing for you.
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     8
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     9
This patch tests that flag.
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    10
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    11
Setup
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    12
-----
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    13
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    14
  $ cat >> $HGRCPATH <<EOF
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    15
  > [alias]
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    16
  > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    17
  > [extensions]
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    18
  > EOF
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    19
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    20
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    21
  $ hg init stoprepo
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    22
  $ cd stoprepo
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    23
  $ echo ".*\.orig" > .hgignore
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    24
  $ hg add .hgignore
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    25
  $ hg ci -m "added hgignore"
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    26
  $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    27
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    28
  $ hg glog
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    29
  @  4:c41c793e0ef1 added d
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    30
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    31
  o  3:ca1b80f7960a added c
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    32
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  o  2:b1661037fa25 added b
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
  o  1:c7586e2a9264 added a
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    36
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    37
  o  0:8fa14d15e168 added hgignore
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
      () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    40
Making sure we stay where we were is current wdir parent is not obsoleted
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
--------------------------------------------------------------------------
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    42
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    43
  $ hg up .^^
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    45
  $ echo bar > b
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    46
  $ hg amend
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    47
  2 new orphan changesets
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    48
  $ hg glog
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    49
  @  5:7ed0642d644b added b
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    50
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    51
  | *  4:c41c793e0ef1 added d
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    52
  | |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    53
  | *  3:ca1b80f7960a added c
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    54
  | |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    55
  | x  2:b1661037fa25 added b
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    56
  |/    () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    57
  o  1:c7586e2a9264 added a
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    58
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    59
  o  0:8fa14d15e168 added hgignore
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    60
      () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    61
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    62
There is 'working directory is now at' message because it didnt changed
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    63
  $ hg evolve --all --no-update
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    64
  move:[3] added c
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    65
  atop:[5] added b
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    66
  move:[4] added d
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    67
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    68
  $ hg glog
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    69
  o  7:b6b20b8eefdc added d
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    70
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    71
  o  6:7c46f743e62f added c
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    72
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    73
  @  5:7ed0642d644b added b
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    74
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    75
  o  1:c7586e2a9264 added a
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    76
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    77
  o  0:8fa14d15e168 added hgignore
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    78
      () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    79
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    80
Updating to successor when working directory parent is obsoleted by evolution
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    81
-----------------------------------------------------------------------------
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    82
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    83
  $ hg prev
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    84
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    85
  [1] added a
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    86
  $ echo bar > a
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    87
  $ hg amend
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    88
  3 new orphan changesets
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    89
  $ hg up 7ed0642d644b
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    90
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    91
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    92
  $ hg glog
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    93
  o  8:3d41537b44ca added a
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    94
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    95
  | *  7:b6b20b8eefdc added d
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    96
  | |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    97
  | *  6:7c46f743e62f added c
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    98
  | |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    99
  | @  5:7ed0642d644b added b
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   100
  | |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   101
  | x  1:c7586e2a9264 added a
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   102
  |/    () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   103
  o  0:8fa14d15e168 added hgignore
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   104
      () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   105
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   106
  $ hg evolve --all --any --no-update
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   107
  move:[5] added b
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   108
  atop:[8] added a
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   109
  move:[6] added c
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   110
  move:[7] added d
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   111
  working directory is now at 12c720cb3782
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   112
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   113
  $ hg glog
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   114
  o  11:a74d9f22ba3f added d
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   115
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   116
  o  10:958f5155e8cd added c
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   117
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   118
  @  9:12c720cb3782 added b
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   119
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   120
  o  8:3d41537b44ca added a
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   121
  |   () draft
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   122
  o  0:8fa14d15e168 added hgignore
4736d0bb81bf evolve: add an `--update` flag to `hg evolve` command
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
   123
      () draft