tests/test-evolve-interrupted.t
author Anton Shestakov <av6@dwimlabs.net>
Wed, 11 Mar 2020 16:11:04 +0700
changeset 5195 85640f1feced
parent 5151 e78926a1a473
child 5318 a799f5d228f1
permissions -rw-r--r--
readme: mention compat string format
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4848
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     1
Quitting an evolve in the middle (via ctrl-c or something) can leave things in a
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     2
weird intermediate state where hg thinks we're in the middle of an update
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     3
operation (or even just leave the 'merge' directory around without actually
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     4
indicating we're in the middle of *any* operation).
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     5
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     6
  $ . $TESTDIR/testlib/common.sh
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     7
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     8
  $ cat << EOF >> $HGRCPATH
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
     9
  > [extensions]
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    10
  > rebase =
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    11
  > evolve =
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    12
  > [alias]
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    13
  > l = log -G -T'{rev} {desc}'
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    14
  > EOF
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    15
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    16
  $ hg init interrupted-orphan
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    17
  $ cd interrupted-orphan
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    18
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    19
  $ echo apricot > a
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    20
  $ hg ci -qAm apricot
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    21
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    22
  $ echo banana > b
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    23
  $ hg ci -qAm banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    24
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    25
Let's go back to amend 0 and make an orphan out of 1 (and a merge conflict to
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    26
test with)
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    27
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    28
  $ hg up -q 0
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    29
  $ echo blueberry > b
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    30
  $ hg l
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    31
  o  1 banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    32
  |
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    33
  @  0 apricot
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    34
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    35
  $ hg ci --amend -qAm 'apricot and blueberry'
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    36
  1 new orphan changesets
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    37
  $ hg l
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    38
  @  2 apricot and blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    39
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    40
  *  1 banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    41
  |
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    42
  x  0 apricot
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    43
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    44
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    45
  $ hg evolve --update --config hooks.precommit=false --config ui.merge=:other
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    46
  move:[1] banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    47
  atop:[2] apricot and blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    48
  transaction abort!
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    49
  rollback completed
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    50
  abort: precommit hook exited with status 1
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    51
  [255]
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    52
  $ hg l
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    53
  @  2 apricot and blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    54
  
5151
e78926a1a473 branching: preserve test change on stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5146
diff changeset
    55
  %  1 banana
4848
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    56
  |
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    57
  x  0 apricot
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    58
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    59
  $ cat b
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    60
  banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    61
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    62
  $ hg status --config commands.status.verbose=True
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    63
  M b
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    64
  # The repository is in an unfinished *evolve* state.
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    65
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    66
  # No unresolved merge conflicts.
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    67
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    68
  # To continue:    hg evolve --continue
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    69
  # To abort:       hg evolve --abort
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    70
  # To stop:        hg evolve --stop
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    71
  # (also see `hg help evolve.interrupted`)
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    72
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    73
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    74
  $ ls .hg/evolvestate
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    75
  .hg/evolvestate
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    76
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    77
  $ cat b
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    78
  banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    79
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    80
  $ hg l
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    81
  @  2 apricot and blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    82
  
5151
e78926a1a473 branching: preserve test change on stable
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5146
diff changeset
    83
  %  1 banana
4848
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    84
  |
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    85
  x  0 apricot
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    86
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    87
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    88
Test various methods of handling that unfinished state
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    89
  $ hg evolve --abort
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    90
  evolve aborted
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    91
  working directory is now at e1989e4b1526
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    92
  $ ls .hg/evolvestate
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    93
  ls: cannot access '?.hg/evolvestate'?: No such file or directory (re)
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    94
  [2]
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    95
  $ cat b
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    96
  blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    97
  $ hg l
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    98
  @  2 apricot and blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
    99
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   100
  *  1 banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   101
  |
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   102
  x  0 apricot
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   103
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   104
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   105
  $ hg evolve --update --config hooks.precommit=false --config ui.merge=:other
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   106
  move:[1] banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   107
  atop:[2] apricot and blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   108
  transaction abort!
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   109
  rollback completed
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   110
  abort: precommit hook exited with status 1
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   111
  [255]
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   112
  $ cat b
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   113
  banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   114
  $ hg evolve --stop
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   115
  stopped the interrupted evolve
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   116
  working directory is now at e1989e4b1526
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   117
  $ cat .hg/evolvestate
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   118
  cat: .hg/evolvestate: No such file or directory
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   119
  [1]
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   120
  $ cat b
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   121
  blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   122
  $ hg l
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   123
  @  2 apricot and blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   124
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   125
  *  1 banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   126
  |
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   127
  x  0 apricot
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   128
  
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   129
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   130
  $ hg evolve --update --config hooks.precommit=false --config ui.merge=:other
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   131
  move:[1] banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   132
  atop:[2] apricot and blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   133
  transaction abort!
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   134
  rollback completed
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   135
  abort: precommit hook exited with status 1
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   136
  [255]
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   137
  $ hg evolve --continue
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   138
  evolving 1:e0486f65907d "banana"
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   139
  working directory is now at bd5ec7dfc2af
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   140
  $ cat .hg/evolvestate
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   141
  cat: .hg/evolvestate: No such file or directory
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   142
  [1]
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   143
  $ cat b
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   144
  banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   145
  $ hg l
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   146
  @  3 banana
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   147
  |
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   148
  o  2 apricot and blueberry
535ab2609e45 cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff changeset
   149