Mercurial > evolve
annotate tests/test-evolve-interrupted.t @ 5592:95949b06bd48
evolvecmd: simplify code for moving bookmarks when relocating node
We had very similar code for updating bookmarks to handle the case
when the relocation resulted in no changes and for the normal
case. This restructures the code a bit so the common part is better
reused.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 24 Sep 2020 16:34:04 -0700 |
parents | 7a184d29fff5 |
children | ae4dbbf2b929 16ab2cc74b4b ad80552c706c |
rev | line source |
---|---|
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 |
5542
7a184d29fff5
tests: graphlog now only shows '%' if there are unresolved conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
5270
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 |
5542
7a184d29fff5
tests: graphlog now only shows '%' if there are unresolved conflicts
Anton Shestakov <av6@dwimlabs.net>
parents:
5270
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 |
5270
a799f5d228f1
tests: check for file existance in a portable way
Joerg Sonnenberger <joerg@bec.de>
parents:
5151
diff
changeset
|
92 $ test -f .hg/evolvestate |
a799f5d228f1
tests: check for file existance in a portable way
Joerg Sonnenberger <joerg@bec.de>
parents:
5151
diff
changeset
|
93 [1] |
4848
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
94 $ cat b |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
95 blueberry |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
96 $ hg l |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
97 @ 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
|
98 |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
99 * 1 banana |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
100 | |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
101 x 0 apricot |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
102 |
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 $ 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
|
105 move:[1] banana |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
106 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
|
107 transaction abort! |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
108 rollback completed |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
109 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
|
110 [255] |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
111 $ cat b |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
112 banana |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
113 $ hg evolve --stop |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
114 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
|
115 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
|
116 $ cat .hg/evolvestate |
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: 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
|
118 [1] |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
119 $ cat b |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
120 blueberry |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
121 $ hg l |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
122 @ 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
|
123 |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
124 * 1 banana |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
125 | |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
126 x 0 apricot |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
127 |
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 $ 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
|
130 move:[1] banana |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
131 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
|
132 transaction abort! |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
133 rollback completed |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
134 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
|
135 [255] |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
136 $ hg evolve --continue |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
137 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
|
138 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
|
139 $ cat .hg/evolvestate |
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: 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
|
141 [1] |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
142 $ cat b |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
143 banana |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
144 $ hg l |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
145 @ 3 banana |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
146 | |
535ab2609e45
cmdstate: introduce a "saver" contextmanager and use it in place of save()
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
147 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
|
148 |