tests/test-evolve-noupdate.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 06 Apr 2020 07:26:40 +0200
branchstable
changeset 5273 f560d23639e1
parent 4577 bcd52ce0916d
child 4675 79bc0f1a832e
permissions -rw-r--r--
head-checking: ignore obsoleted section when checking head creation locally Same as for the server side check, these do not need to be taken in account.
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
4577
bcd52ce0916d evolve: don't update after instability resolution by default (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 4122
diff changeset
     4
There is an `--update` flag to `hg evolve` command which defaults to False. The
bcd52ce0916d evolve: don't update after instability resolution by default (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 4122
diff changeset
     5
`--update` flag updates to the head of the evolved revisions. If you don't want
3774
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
4577
bcd52ce0916d evolve: don't update after instability resolution by default (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 4122
diff changeset
     7
successor after hg evolve, `hg evolve --no-update` is the thing for you.
3774
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
4577
bcd52ce0916d evolve: don't update after instability resolution by default (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 4122
diff changeset
    40
Making sure we stay where we were if current wdir parent was not obsoleted
3774
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
4577
bcd52ce0916d evolve: don't update after instability resolution by default (BC)
Anton Shestakov <av6@dwimlabs.net>
parents: 4122
diff changeset
    62
There is no 'working directory is now at' message because we didn't update
3774
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