Show More
@@ -1,164 +1,218 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > [phases] |
|
4 | > [phases] | |
5 | > publish=False |
|
5 | > publish=False | |
6 | > [merge] |
|
6 | > [merge] | |
7 | > EOF |
|
7 | > EOF | |
8 |
|
8 | |||
9 | $ hg init repo |
|
9 | $ hg init repo | |
10 | $ cd repo |
|
10 | $ cd repo | |
11 | $ echo a > a |
|
11 | $ echo a > a | |
12 | $ echo b > b |
|
12 | $ echo b > b | |
13 | $ hg commit -qAm ab |
|
13 | $ hg commit -qAm ab | |
14 | $ echo c >> a |
|
14 | $ echo c >> a | |
15 | $ echo c >> b |
|
15 | $ echo c >> b | |
16 | $ hg commit -qAm c |
|
16 | $ hg commit -qAm c | |
17 | $ hg up -q ".^" |
|
17 | $ hg up -q ".^" | |
18 | $ echo d >> a |
|
18 | $ echo d >> a | |
19 | $ echo d >> b |
|
19 | $ echo d >> b | |
20 | $ hg commit -qAm d |
|
20 | $ hg commit -qAm d | |
21 |
|
21 | |||
22 | Testing on-failure=continue |
|
22 | Testing on-failure=continue | |
23 | $ echo on-failure=continue >> $HGRCPATH |
|
23 | $ echo on-failure=continue >> $HGRCPATH | |
24 | $ hg rebase -s 1 -d 2 --tool false |
|
24 | $ hg rebase -s 1 -d 2 --tool false | |
25 | rebasing 1:1f28a51c3c9b "c" |
|
25 | rebasing 1:1f28a51c3c9b "c" | |
26 | merging a |
|
26 | merging a | |
27 | merging b |
|
27 | merging b | |
28 | merging a failed! |
|
28 | merging a failed! | |
29 | merging b failed! |
|
29 | merging b failed! | |
30 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') |
|
30 | unresolved conflicts (see 'hg resolve', then 'hg rebase --continue') | |
31 | [240] |
|
31 | [240] | |
32 |
|
32 | |||
33 | $ hg resolve --list |
|
33 | $ hg resolve --list | |
34 | U a |
|
34 | U a | |
35 | U b |
|
35 | U b | |
36 |
|
36 | |||
37 | $ hg rebase --abort |
|
37 | $ hg rebase --abort | |
38 | rebase aborted |
|
38 | rebase aborted | |
39 |
|
39 | |||
40 | Testing on-failure=halt |
|
40 | Testing on-failure=halt | |
41 | $ echo on-failure=halt >> $HGRCPATH |
|
41 | $ echo on-failure=halt >> $HGRCPATH | |
42 | $ hg rebase -s 1 -d 2 --tool false |
|
42 | $ hg rebase -s 1 -d 2 --tool false | |
43 | rebasing 1:1f28a51c3c9b "c" |
|
43 | rebasing 1:1f28a51c3c9b "c" | |
44 | merging a |
|
44 | merging a | |
45 | merging b |
|
45 | merging b | |
46 | merging a failed! |
|
46 | merging a failed! | |
47 | merge halted after failed merge (see hg resolve) |
|
47 | merge halted after failed merge (see hg resolve) | |
48 | [240] |
|
48 | [240] | |
49 |
|
49 | |||
50 | $ hg resolve --list |
|
50 | $ hg resolve --list | |
51 | U a |
|
51 | U a | |
52 | U b |
|
52 | U b | |
53 |
|
53 | |||
54 | $ hg rebase --abort |
|
54 | $ hg rebase --abort | |
55 | rebase aborted |
|
55 | rebase aborted | |
56 |
|
56 | |||
57 | Testing on-failure=prompt |
|
57 | Testing on-failure=prompt | |
58 | $ cat <<EOS >> $HGRCPATH |
|
58 | $ cat <<EOS >> $HGRCPATH | |
59 | > [merge] |
|
59 | > [merge] | |
60 | > on-failure=prompt |
|
60 | > on-failure=prompt | |
61 | > [ui] |
|
61 | > [ui] | |
62 | > interactive=1 |
|
62 | > interactive=1 | |
63 | > EOS |
|
63 | > EOS | |
64 | $ cat <<EOS | hg rebase -s 1 -d 2 --tool false |
|
64 | $ cat <<EOS | hg rebase -s 1 -d 2 --tool false | |
65 | > y |
|
65 | > y | |
66 | > n |
|
66 | > n | |
67 | > EOS |
|
67 | > EOS | |
68 | rebasing 1:1f28a51c3c9b "c" |
|
68 | rebasing 1:1f28a51c3c9b "c" | |
69 | merging a |
|
69 | merging a | |
70 | merging b |
|
70 | merging b | |
71 | merging a failed! |
|
71 | merging a failed! | |
72 | continue merge operation (yn)? y |
|
72 | continue merge operation (yn)? y | |
73 | merging b failed! |
|
73 | merging b failed! | |
74 | continue merge operation (yn)? n |
|
74 | continue merge operation (yn)? n | |
75 | merge halted after failed merge (see hg resolve) |
|
75 | merge halted after failed merge (see hg resolve) | |
76 | [240] |
|
76 | [240] | |
77 |
|
77 | |||
78 | $ hg resolve --list |
|
78 | $ hg resolve --list | |
79 | U a |
|
79 | U a | |
80 | U b |
|
80 | U b | |
81 |
|
81 | |||
82 | $ hg rebase --abort |
|
82 | $ hg rebase --abort | |
83 | rebase aborted |
|
83 | rebase aborted | |
84 |
|
84 | |||
85 | Check that successful tool with failed post-check halts the merge |
|
85 | Check that successful tool with failed post-check halts the merge | |
86 | $ cat <<EOS >> $HGRCPATH |
|
86 | $ cat <<EOS >> $HGRCPATH | |
87 | > [merge-tools] |
|
87 | > [merge-tools] | |
88 | > true.check=changed |
|
88 | > true.check=changed | |
89 | > EOS |
|
89 | > EOS | |
90 | $ cat <<EOS | hg rebase -s 1 -d 2 --tool true |
|
90 | $ cat <<EOS | hg rebase -s 1 -d 2 --tool true | |
91 | > y |
|
91 | > y | |
92 | > n |
|
92 | > n | |
93 | > n |
|
93 | > n | |
94 | > EOS |
|
94 | > EOS | |
95 | rebasing 1:1f28a51c3c9b "c" |
|
95 | rebasing 1:1f28a51c3c9b "c" | |
96 | merging a |
|
96 | merging a | |
97 | merging b |
|
97 | merging b | |
98 | output file a appears unchanged |
|
98 | output file a appears unchanged | |
99 | was merge successful (yn)? y |
|
99 | was merge successful (yn)? y | |
100 | output file b appears unchanged |
|
100 | output file b appears unchanged | |
101 | was merge successful (yn)? n |
|
101 | was merge successful (yn)? n | |
102 | merging b failed! |
|
102 | merging b failed! | |
103 | continue merge operation (yn)? n |
|
103 | continue merge operation (yn)? n | |
104 | merge halted after failed merge (see hg resolve) |
|
104 | merge halted after failed merge (see hg resolve) | |
105 | [240] |
|
105 | [240] | |
106 |
|
106 | |||
107 | $ hg resolve --list |
|
107 | $ hg resolve --list | |
108 | R a |
|
108 | R a | |
109 | U b |
|
109 | U b | |
110 |
|
110 | |||
111 | $ hg rebase --abort |
|
111 | $ hg rebase --abort | |
112 | rebase aborted |
|
112 | rebase aborted | |
113 |
|
113 | |||
114 | Check that conflicts with conflict check also halts the merge |
|
114 | Check that conflicts with conflict check also halts the merge | |
115 | $ cat <<EOS >> $HGRCPATH |
|
115 | $ cat <<EOS >> $HGRCPATH | |
116 | > [merge-tools] |
|
116 | > [merge-tools] | |
117 | > true.check=conflicts |
|
117 | > true.check=conflicts | |
118 | > true.premerge=keep |
|
118 | > true.premerge=keep | |
119 | > [merge] |
|
119 | > [merge] | |
120 | > on-failure=halt |
|
120 | > on-failure=halt | |
121 | > EOS |
|
121 | > EOS | |
122 | $ hg rebase -s 1 -d 2 --tool true |
|
122 | $ hg rebase -s 1 -d 2 --tool true | |
123 | rebasing 1:1f28a51c3c9b "c" |
|
123 | rebasing 1:1f28a51c3c9b "c" | |
124 | merging a |
|
124 | merging a | |
125 | merging b |
|
125 | merging b | |
126 | merging a failed! |
|
126 | merging a failed! | |
127 | merge halted after failed merge (see hg resolve) |
|
127 | merge halted after failed merge (see hg resolve) | |
128 | [240] |
|
128 | [240] | |
129 |
|
129 | |||
130 | $ hg resolve --list |
|
130 | $ hg resolve --list | |
131 | U a |
|
131 | U a | |
132 | U b |
|
132 | U b | |
133 |
|
133 | |||
134 | $ hg rebase --abort |
|
134 | $ hg rebase --abort | |
135 | rebase aborted |
|
135 | rebase aborted | |
136 |
|
136 | |||
137 | Check that always-prompt also can halt the merge |
|
137 | Check that always-prompt also can halt the merge | |
138 | $ cat <<EOS | hg rebase -s 1 -d 2 --tool true --config merge-tools.true.check=prompt |
|
138 | $ cat <<EOS | hg rebase -s 1 -d 2 --tool true --config merge-tools.true.check=prompt | |
139 | > y |
|
139 | > y | |
140 | > n |
|
140 | > n | |
141 | > EOS |
|
141 | > EOS | |
142 | rebasing 1:1f28a51c3c9b "c" |
|
142 | rebasing 1:1f28a51c3c9b "c" | |
143 | merging a |
|
143 | merging a | |
144 | merging b |
|
144 | merging b | |
145 | was merge of 'a' successful (yn)? y |
|
145 | was merge of 'a' successful (yn)? y | |
146 | was merge of 'b' successful (yn)? n |
|
146 | was merge of 'b' successful (yn)? n | |
147 | merging b failed! |
|
147 | merging b failed! | |
148 | merge halted after failed merge (see hg resolve) |
|
148 | merge halted after failed merge (see hg resolve) | |
149 | [240] |
|
149 | [240] | |
150 |
|
150 | |||
151 | $ hg resolve --list |
|
151 | $ hg resolve --list | |
152 | R a |
|
152 | R a | |
153 | U b |
|
153 | U b | |
154 |
|
154 | |||
155 | $ hg rebase --abort |
|
155 | $ hg rebase --abort | |
156 | rebase aborted |
|
156 | rebase aborted | |
157 |
|
157 | |||
158 | Check that successful tool otherwise allows the merge to continue |
|
158 | Check that successful tool otherwise allows the merge to continue | |
159 | $ hg rebase -s 1 -d 2 --tool echo --keep --config merge-tools.echo.premerge=keep |
|
159 | $ hg rebase -s 1 -d 2 --tool echo --keep --config merge-tools.echo.premerge=keep | |
160 | rebasing 1:1f28a51c3c9b "c" |
|
160 | rebasing 1:1f28a51c3c9b "c" | |
161 | merging a |
|
161 | merging a | |
162 | merging b |
|
162 | merging b | |
163 | $TESTTMP/repo/a *a~base* *a~other* (glob) |
|
163 | $TESTTMP/repo/a *a~base* *a~other* (glob) | |
164 | $TESTTMP/repo/b *b~base* *b~other* (glob) |
|
164 | $TESTTMP/repo/b *b~base* *b~other* (glob) | |
|
165 | ||||
|
166 | Check that unshelve isn't broken by halting the merge | |||
|
167 | $ cat <<EOS >> $HGRCPATH | |||
|
168 | > [extensions] | |||
|
169 | > shelve = | |||
|
170 | > EOS | |||
|
171 | $ echo foo > shelve_file1 | |||
|
172 | $ echo foo > shelve_file2 | |||
|
173 | $ hg ci -qAm foo | |||
|
174 | $ echo bar >> shelve_file1 | |||
|
175 | $ echo bar >> shelve_file2 | |||
|
176 | $ hg shelve --list | |||
|
177 | $ hg shelve | |||
|
178 | shelved as default | |||
|
179 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
180 | $ echo baz >> shelve_file1 | |||
|
181 | $ echo baz >> shelve_file2 | |||
|
182 | $ hg ci -m baz | |||
|
183 | $ hg unshelve --tool false --config merge-tools.false.premerge=keep | |||
|
184 | unshelving change 'default' | |||
|
185 | rebasing shelved changes | |||
|
186 | merging shelve_file1 | |||
|
187 | merging shelve_file2 | |||
|
188 | merging shelve_file1 failed! | |||
|
189 | merge halted after failed merge (see hg resolve) | |||
|
190 | [240] | |||
|
191 | FIXME: This should claim it's in an 'unshelve' state | |||
|
192 | $ hg status --config commands.status.verbose=True | |||
|
193 | M shelve_file1 | |||
|
194 | M shelve_file2 | |||
|
195 | ? shelve_file1.orig | |||
|
196 | ? shelve_file2.orig | |||
|
197 | # The repository is in an unfinished *update* state. | |||
|
198 | ||||
|
199 | # Unresolved merge conflicts: | |||
|
200 | # | |||
|
201 | # shelve_file1 | |||
|
202 | # shelve_file2 | |||
|
203 | # | |||
|
204 | # To mark files as resolved: hg resolve --mark FILE | |||
|
205 | ||||
|
206 | # To continue: hg update . | |||
|
207 | ||||
|
208 | FIXME: This should not be referencing a stripped commit. | |||
|
209 | $ hg resolve --tool false --all --re-merge | |||
|
210 | abort: unknown revision '4a1d727ea5bb6aed9adfacb2a8f776bae44301d6' | |||
|
211 | [255] | |||
|
212 | Ensure the shelve is still around, since we haven't finished the operation yet. | |||
|
213 | $ hg shelve --list | |||
|
214 | default (* ago) changes to: foo (glob) | |||
|
215 | FIXME: `hg unshelve --abort` should work. | |||
|
216 | $ hg unshelve --abort | |||
|
217 | abort: no unshelve in progress | |||
|
218 | [20] |
General Comments 0
You need to be logged in to leave comments.
Login now