##// END OF EJS Templates
tests: demonstrate how continuing rebase after upgrade can result in merge...
Martin von Zweigbergk -
r45156:e89b3603 default
parent child Browse files
Show More
@@ -1,480 +1,545 b''
1 $ cat >> $HGRCPATH <<EOF
1 $ cat >> $HGRCPATH <<EOF
2 > [extensions]
2 > [extensions]
3 > rebase=
3 > rebase=
4 >
4 >
5 > [phases]
5 > [phases]
6 > publish=False
6 > publish=False
7 >
7 >
8 > [alias]
8 > [alias]
9 > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n"
9 > tglog = log -G --template "{rev}: {node|short} '{desc}' {branches}\n"
10 > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n"
10 > tglogp = log -G --template "{rev}: {node|short} {phase} '{desc}' {branches}\n"
11 > EOF
11 > EOF
12
12
13
13
14 $ hg init a
14 $ hg init a
15 $ cd a
15 $ cd a
16
16
17 $ echo A > A
17 $ echo A > A
18 $ hg ci -Am A
18 $ hg ci -Am A
19 adding A
19 adding A
20
20
21 $ echo B > B
21 $ echo B > B
22 $ hg ci -Am B
22 $ hg ci -Am B
23 adding B
23 adding B
24
24
25 $ echo C >> A
25 $ echo C >> A
26 $ hg ci -m C
26 $ hg ci -m C
27
27
28 $ hg up -q -C 0
28 $ hg up -q -C 0
29
29
30 $ echo D >> A
30 $ echo D >> A
31 $ hg ci -m D
31 $ hg ci -m D
32 created new head
32 created new head
33
33
34 $ echo E > E
34 $ echo E > E
35 $ hg ci -Am E
35 $ hg ci -Am E
36 adding E
36 adding E
37
37
38 $ cd ..
38 $ cd ..
39
39
40
40
41 Changes during an interruption - continue:
41 Changes during an interruption - continue:
42
42
43 $ hg clone -q -u . a a1
43 $ hg clone -q -u . a a1
44 $ cd a1
44 $ cd a1
45
45
46 $ hg tglog
46 $ hg tglog
47 @ 4: ae36e8e3dfd7 'E'
47 @ 4: ae36e8e3dfd7 'E'
48 |
48 |
49 o 3: 46b37eabc604 'D'
49 o 3: 46b37eabc604 'D'
50 |
50 |
51 | o 2: 965c486023db 'C'
51 | o 2: 965c486023db 'C'
52 | |
52 | |
53 | o 1: 27547f69f254 'B'
53 | o 1: 27547f69f254 'B'
54 |/
54 |/
55 o 0: 4a2df7238c3b 'A'
55 o 0: 4a2df7238c3b 'A'
56
56
57 Rebasing B onto E:
57 Rebasing B onto E:
58
58
59 $ hg rebase -s 1 -d 4
59 $ hg rebase -s 1 -d 4
60 rebasing 1:27547f69f254 "B"
60 rebasing 1:27547f69f254 "B"
61 rebasing 2:965c486023db "C"
61 rebasing 2:965c486023db "C"
62 merging A
62 merging A
63 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
63 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
64 unresolved conflicts (see hg resolve, then hg rebase --continue)
64 unresolved conflicts (see hg resolve, then hg rebase --continue)
65 [1]
65 [1]
66
66
67 Force a commit on C during the interruption:
67 Force a commit on C during the interruption:
68
68
69 $ hg up -q -C 2 --config 'extensions.rebase=!'
69 $ hg up -q -C 2 --config 'extensions.rebase=!'
70
70
71 $ echo 'Extra' > Extra
71 $ echo 'Extra' > Extra
72 $ hg add Extra
72 $ hg add Extra
73 $ hg ci -m 'Extra' --config 'extensions.rebase=!'
73 $ hg ci -m 'Extra' --config 'extensions.rebase=!'
74
74
75 Force this commit onto secret phase
75 Force this commit onto secret phase
76
76
77 $ hg phase --force --secret 6
77 $ hg phase --force --secret 6
78
78
79 $ hg tglogp
79 $ hg tglogp
80 @ 6: deb5d2f93d8b secret 'Extra'
80 @ 6: deb5d2f93d8b secret 'Extra'
81 |
81 |
82 | o 5: 45396c49d53b draft 'B'
82 | o 5: 45396c49d53b draft 'B'
83 | |
83 | |
84 | o 4: ae36e8e3dfd7 draft 'E'
84 | o 4: ae36e8e3dfd7 draft 'E'
85 | |
85 | |
86 | o 3: 46b37eabc604 draft 'D'
86 | o 3: 46b37eabc604 draft 'D'
87 | |
87 | |
88 o | 2: 965c486023db draft 'C'
88 o | 2: 965c486023db draft 'C'
89 | |
89 | |
90 o | 1: 27547f69f254 draft 'B'
90 o | 1: 27547f69f254 draft 'B'
91 |/
91 |/
92 o 0: 4a2df7238c3b draft 'A'
92 o 0: 4a2df7238c3b draft 'A'
93
93
94 Resume the rebasing:
94 Resume the rebasing:
95
95
96 $ hg rebase --continue
96 $ hg rebase --continue
97 already rebased 1:27547f69f254 "B" as 45396c49d53b
97 already rebased 1:27547f69f254 "B" as 45396c49d53b
98 rebasing 2:965c486023db "C"
98 rebasing 2:965c486023db "C"
99 merging A
99 merging A
100 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
100 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
101 unresolved conflicts (see hg resolve, then hg rebase --continue)
101 unresolved conflicts (see hg resolve, then hg rebase --continue)
102 [1]
102 [1]
103
103
104 Solve the conflict and go on:
104 Solve the conflict and go on:
105
105
106 $ echo 'conflict solved' > A
106 $ echo 'conflict solved' > A
107 $ rm A.orig
107 $ rm A.orig
108 $ hg resolve -m A
108 $ hg resolve -m A
109 (no more unresolved files)
109 (no more unresolved files)
110 continue: hg rebase --continue
110 continue: hg rebase --continue
111
111
112 $ hg rebase --continue
112 $ hg rebase --continue
113 already rebased 1:27547f69f254 "B" as 45396c49d53b
113 already rebased 1:27547f69f254 "B" as 45396c49d53b
114 rebasing 2:965c486023db "C"
114 rebasing 2:965c486023db "C"
115 warning: orphaned descendants detected, not stripping 27547f69f254, 965c486023db
115 warning: orphaned descendants detected, not stripping 27547f69f254, 965c486023db
116
116
117 $ hg tglogp
117 $ hg tglogp
118 o 7: d2d25e26288e draft 'C'
118 o 7: d2d25e26288e draft 'C'
119 |
119 |
120 | o 6: deb5d2f93d8b secret 'Extra'
120 | o 6: deb5d2f93d8b secret 'Extra'
121 | |
121 | |
122 o | 5: 45396c49d53b draft 'B'
122 o | 5: 45396c49d53b draft 'B'
123 | |
123 | |
124 @ | 4: ae36e8e3dfd7 draft 'E'
124 @ | 4: ae36e8e3dfd7 draft 'E'
125 | |
125 | |
126 o | 3: 46b37eabc604 draft 'D'
126 o | 3: 46b37eabc604 draft 'D'
127 | |
127 | |
128 | o 2: 965c486023db draft 'C'
128 | o 2: 965c486023db draft 'C'
129 | |
129 | |
130 | o 1: 27547f69f254 draft 'B'
130 | o 1: 27547f69f254 draft 'B'
131 |/
131 |/
132 o 0: 4a2df7238c3b draft 'A'
132 o 0: 4a2df7238c3b draft 'A'
133
133
134 $ cd ..
134 $ cd ..
135
135
136
136
137 Changes during an interruption - abort:
137 Changes during an interruption - abort:
138
138
139 $ hg clone -q -u . a a2
139 $ hg clone -q -u . a a2
140 $ cd a2
140 $ cd a2
141
141
142 $ hg tglog
142 $ hg tglog
143 @ 4: ae36e8e3dfd7 'E'
143 @ 4: ae36e8e3dfd7 'E'
144 |
144 |
145 o 3: 46b37eabc604 'D'
145 o 3: 46b37eabc604 'D'
146 |
146 |
147 | o 2: 965c486023db 'C'
147 | o 2: 965c486023db 'C'
148 | |
148 | |
149 | o 1: 27547f69f254 'B'
149 | o 1: 27547f69f254 'B'
150 |/
150 |/
151 o 0: 4a2df7238c3b 'A'
151 o 0: 4a2df7238c3b 'A'
152
152
153 Rebasing B onto E:
153 Rebasing B onto E:
154
154
155 $ hg rebase -s 1 -d 4
155 $ hg rebase -s 1 -d 4
156 rebasing 1:27547f69f254 "B"
156 rebasing 1:27547f69f254 "B"
157 rebasing 2:965c486023db "C"
157 rebasing 2:965c486023db "C"
158 merging A
158 merging A
159 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
159 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
160 unresolved conflicts (see hg resolve, then hg rebase --continue)
160 unresolved conflicts (see hg resolve, then hg rebase --continue)
161 [1]
161 [1]
162
162
163 Force a commit on B' during the interruption:
163 Force a commit on B' during the interruption:
164
164
165 $ hg up -q -C 5 --config 'extensions.rebase=!'
165 $ hg up -q -C 5 --config 'extensions.rebase=!'
166
166
167 $ echo 'Extra' > Extra
167 $ echo 'Extra' > Extra
168 $ hg add Extra
168 $ hg add Extra
169 $ hg ci -m 'Extra' --config 'extensions.rebase=!'
169 $ hg ci -m 'Extra' --config 'extensions.rebase=!'
170
170
171 $ hg tglog
171 $ hg tglog
172 @ 6: 402ee3642b59 'Extra'
172 @ 6: 402ee3642b59 'Extra'
173 |
173 |
174 o 5: 45396c49d53b 'B'
174 o 5: 45396c49d53b 'B'
175 |
175 |
176 o 4: ae36e8e3dfd7 'E'
176 o 4: ae36e8e3dfd7 'E'
177 |
177 |
178 o 3: 46b37eabc604 'D'
178 o 3: 46b37eabc604 'D'
179 |
179 |
180 | o 2: 965c486023db 'C'
180 | o 2: 965c486023db 'C'
181 | |
181 | |
182 | o 1: 27547f69f254 'B'
182 | o 1: 27547f69f254 'B'
183 |/
183 |/
184 o 0: 4a2df7238c3b 'A'
184 o 0: 4a2df7238c3b 'A'
185
185
186 Abort the rebasing:
186 Abort the rebasing:
187
187
188 $ hg rebase --abort
188 $ hg rebase --abort
189 warning: new changesets detected on destination branch, can't strip
189 warning: new changesets detected on destination branch, can't strip
190 rebase aborted
190 rebase aborted
191
191
192 $ hg tglog
192 $ hg tglog
193 @ 6: 402ee3642b59 'Extra'
193 @ 6: 402ee3642b59 'Extra'
194 |
194 |
195 o 5: 45396c49d53b 'B'
195 o 5: 45396c49d53b 'B'
196 |
196 |
197 o 4: ae36e8e3dfd7 'E'
197 o 4: ae36e8e3dfd7 'E'
198 |
198 |
199 o 3: 46b37eabc604 'D'
199 o 3: 46b37eabc604 'D'
200 |
200 |
201 | o 2: 965c486023db 'C'
201 | o 2: 965c486023db 'C'
202 | |
202 | |
203 | o 1: 27547f69f254 'B'
203 | o 1: 27547f69f254 'B'
204 |/
204 |/
205 o 0: 4a2df7238c3b 'A'
205 o 0: 4a2df7238c3b 'A'
206
206
207 $ cd ..
207 $ cd ..
208
208
209 Changes during an interruption - abort (again):
209 Changes during an interruption - abort (again):
210
210
211 $ hg clone -q -u . a a3
211 $ hg clone -q -u . a a3
212 $ cd a3
212 $ cd a3
213
213
214 $ hg tglogp
214 $ hg tglogp
215 @ 4: ae36e8e3dfd7 draft 'E'
215 @ 4: ae36e8e3dfd7 draft 'E'
216 |
216 |
217 o 3: 46b37eabc604 draft 'D'
217 o 3: 46b37eabc604 draft 'D'
218 |
218 |
219 | o 2: 965c486023db draft 'C'
219 | o 2: 965c486023db draft 'C'
220 | |
220 | |
221 | o 1: 27547f69f254 draft 'B'
221 | o 1: 27547f69f254 draft 'B'
222 |/
222 |/
223 o 0: 4a2df7238c3b draft 'A'
223 o 0: 4a2df7238c3b draft 'A'
224
224
225 Rebasing B onto E:
225 Rebasing B onto E:
226
226
227 $ hg rebase -s 1 -d 4
227 $ hg rebase -s 1 -d 4
228 rebasing 1:27547f69f254 "B"
228 rebasing 1:27547f69f254 "B"
229 rebasing 2:965c486023db "C"
229 rebasing 2:965c486023db "C"
230 merging A
230 merging A
231 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
231 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
232 unresolved conflicts (see hg resolve, then hg rebase --continue)
232 unresolved conflicts (see hg resolve, then hg rebase --continue)
233 [1]
233 [1]
234
234
235 Change phase on B and B'
235 Change phase on B and B'
236
236
237 $ hg up -q -C 5 --config 'extensions.rebase=!'
237 $ hg up -q -C 5 --config 'extensions.rebase=!'
238 $ hg phase --public 1
238 $ hg phase --public 1
239 $ hg phase --public 5
239 $ hg phase --public 5
240 $ hg phase --secret -f 2
240 $ hg phase --secret -f 2
241
241
242 $ hg tglogp
242 $ hg tglogp
243 @ 5: 45396c49d53b public 'B'
243 @ 5: 45396c49d53b public 'B'
244 |
244 |
245 o 4: ae36e8e3dfd7 public 'E'
245 o 4: ae36e8e3dfd7 public 'E'
246 |
246 |
247 o 3: 46b37eabc604 public 'D'
247 o 3: 46b37eabc604 public 'D'
248 |
248 |
249 | o 2: 965c486023db secret 'C'
249 | o 2: 965c486023db secret 'C'
250 | |
250 | |
251 | o 1: 27547f69f254 public 'B'
251 | o 1: 27547f69f254 public 'B'
252 |/
252 |/
253 o 0: 4a2df7238c3b public 'A'
253 o 0: 4a2df7238c3b public 'A'
254
254
255 Abort the rebasing:
255 Abort the rebasing:
256
256
257 $ hg rebase --abort
257 $ hg rebase --abort
258 warning: can't clean up public changesets 45396c49d53b
258 warning: can't clean up public changesets 45396c49d53b
259 rebase aborted
259 rebase aborted
260
260
261 $ hg tglogp
261 $ hg tglogp
262 @ 5: 45396c49d53b public 'B'
262 @ 5: 45396c49d53b public 'B'
263 |
263 |
264 o 4: ae36e8e3dfd7 public 'E'
264 o 4: ae36e8e3dfd7 public 'E'
265 |
265 |
266 o 3: 46b37eabc604 public 'D'
266 o 3: 46b37eabc604 public 'D'
267 |
267 |
268 | o 2: 965c486023db secret 'C'
268 | o 2: 965c486023db secret 'C'
269 | |
269 | |
270 | o 1: 27547f69f254 public 'B'
270 | o 1: 27547f69f254 public 'B'
271 |/
271 |/
272 o 0: 4a2df7238c3b public 'A'
272 o 0: 4a2df7238c3b public 'A'
273
273
274 Test rebase interrupted by hooks
274 Test rebase interrupted by hooks
275
275
276 $ hg up 2
276 $ hg up 2
277 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
277 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
278 $ echo F > F
278 $ echo F > F
279 $ hg add F
279 $ hg add F
280 $ hg ci -m F
280 $ hg ci -m F
281
281
282 $ cd ..
282 $ cd ..
283
283
284 Continue rebase after upgrading from an hg version before 9c9cfecd4600:
285
286 $ hg clone -q -u . a a4
287 $ cd a4
288
289 $ hg tglog
290 @ 4: ae36e8e3dfd7 'E'
291 |
292 o 3: 46b37eabc604 'D'
293 |
294 | o 2: 965c486023db 'C'
295 | |
296 | o 1: 27547f69f254 'B'
297 |/
298 o 0: 4a2df7238c3b 'A'
299
300 $ hg rebase -s 1 -d 4
301 rebasing 1:27547f69f254 "B"
302 rebasing 2:965c486023db "C"
303 merging A
304 warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
305 unresolved conflicts (see hg resolve, then hg rebase --continue)
306 [1]
307 $ hg tglog
308 @ 5: 45396c49d53b 'B'
309 |
310 o 4: ae36e8e3dfd7 'E'
311 |
312 o 3: 46b37eabc604 'D'
313 |
314 | % 2: 965c486023db 'C'
315 | |
316 | o 1: 27547f69f254 'B'
317 |/
318 o 0: 4a2df7238c3b 'A'
319
320 Simulate having run the above with an older hg version by manually setting
321 two dirstate parents. We should not get a merge commit when we continue.
322 $ hg debugsetparents 5 2
323 $ echo 'conflict solved' > A
324 $ hg resolve -m A
325 (no more unresolved files)
326 continue: hg rebase --continue
327 $ hg rebase --continue
328 already rebased 1:27547f69f254 "B" as 45396c49d53b
329 rebasing 2:965c486023db "C"
330 warning: orphaned descendants detected, not stripping 27547f69f254, 965c486023db
331 BROKEN: we should not have a merge commit here
332 $ hg tglog
333 o 6: 567335b578a0 'C'
334 |\
335 | o 5: 45396c49d53b 'B'
336 | |
337 | @ 4: ae36e8e3dfd7 'E'
338 | |
339 | o 3: 46b37eabc604 'D'
340 | |
341 o | 2: 965c486023db 'C'
342 | |
343 o | 1: 27547f69f254 'B'
344 |/
345 o 0: 4a2df7238c3b 'A'
346
347 $ cd ..
348
284 (precommit version)
349 (precommit version)
285
350
286 $ cp -R a3 hook-precommit
351 $ cp -R a3 hook-precommit
287 $ cd hook-precommit
352 $ cd hook-precommit
288 $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.precommit=hg status | grep "M A"'
353 $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.precommit=hg status | grep "M A"'
289 rebasing 2:965c486023db "C"
354 rebasing 2:965c486023db "C"
290 M A
355 M A
291 rebasing 6:a0b2430ebfb8 "F" (tip)
356 rebasing 6:a0b2430ebfb8 "F" (tip)
292 abort: precommit hook exited with status 1
357 abort: precommit hook exited with status 1
293 [255]
358 [255]
294 $ hg tglogp
359 $ hg tglogp
295 @ 7: 401ccec5e39f secret 'C'
360 @ 7: 401ccec5e39f secret 'C'
296 |
361 |
297 | o 6: a0b2430ebfb8 secret 'F'
362 | o 6: a0b2430ebfb8 secret 'F'
298 | |
363 | |
299 o | 5: 45396c49d53b public 'B'
364 o | 5: 45396c49d53b public 'B'
300 | |
365 | |
301 o | 4: ae36e8e3dfd7 public 'E'
366 o | 4: ae36e8e3dfd7 public 'E'
302 | |
367 | |
303 o | 3: 46b37eabc604 public 'D'
368 o | 3: 46b37eabc604 public 'D'
304 | |
369 | |
305 | o 2: 965c486023db secret 'C'
370 | o 2: 965c486023db secret 'C'
306 | |
371 | |
307 | o 1: 27547f69f254 public 'B'
372 | o 1: 27547f69f254 public 'B'
308 |/
373 |/
309 o 0: 4a2df7238c3b public 'A'
374 o 0: 4a2df7238c3b public 'A'
310
375
311 $ hg rebase --continue
376 $ hg rebase --continue
312 already rebased 2:965c486023db "C" as 401ccec5e39f
377 already rebased 2:965c486023db "C" as 401ccec5e39f
313 rebasing 6:a0b2430ebfb8 "F"
378 rebasing 6:a0b2430ebfb8 "F"
314 saved backup bundle to $TESTTMP/hook-precommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg
379 saved backup bundle to $TESTTMP/hook-precommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg
315 $ hg tglogp
380 $ hg tglogp
316 @ 6: 6e92a149ac6b secret 'F'
381 @ 6: 6e92a149ac6b secret 'F'
317 |
382 |
318 o 5: 401ccec5e39f secret 'C'
383 o 5: 401ccec5e39f secret 'C'
319 |
384 |
320 o 4: 45396c49d53b public 'B'
385 o 4: 45396c49d53b public 'B'
321 |
386 |
322 o 3: ae36e8e3dfd7 public 'E'
387 o 3: ae36e8e3dfd7 public 'E'
323 |
388 |
324 o 2: 46b37eabc604 public 'D'
389 o 2: 46b37eabc604 public 'D'
325 |
390 |
326 | o 1: 27547f69f254 public 'B'
391 | o 1: 27547f69f254 public 'B'
327 |/
392 |/
328 o 0: 4a2df7238c3b public 'A'
393 o 0: 4a2df7238c3b public 'A'
329
394
330 $ cd ..
395 $ cd ..
331
396
332 (pretxncommit version)
397 (pretxncommit version)
333
398
334 $ cp -R a3 hook-pretxncommit
399 $ cp -R a3 hook-pretxncommit
335 $ cd hook-pretxncommit
400 $ cd hook-pretxncommit
336 $ hg rebase --source 2 --dest 5 --tool internal:other \
401 $ hg rebase --source 2 --dest 5 --tool internal:other \
337 > --config 'hooks.tonative.pretxncommit=True' --config 'hooks.pretxncommit=hg log -r $HG_NODE | grep "summary: C"'
402 > --config 'hooks.tonative.pretxncommit=True' --config 'hooks.pretxncommit=hg log -r $HG_NODE | grep "summary: C"'
338 rebasing 2:965c486023db "C"
403 rebasing 2:965c486023db "C"
339 summary: C
404 summary: C
340 rebasing 6:a0b2430ebfb8 "F" (tip)
405 rebasing 6:a0b2430ebfb8 "F" (tip)
341 transaction abort!
406 transaction abort!
342 rollback completed
407 rollback completed
343 abort: pretxncommit hook exited with status 1
408 abort: pretxncommit hook exited with status 1
344 [255]
409 [255]
345 $ hg tglogp
410 $ hg tglogp
346 @ 7: 401ccec5e39f secret 'C'
411 @ 7: 401ccec5e39f secret 'C'
347 |
412 |
348 | o 6: a0b2430ebfb8 secret 'F'
413 | o 6: a0b2430ebfb8 secret 'F'
349 | |
414 | |
350 o | 5: 45396c49d53b public 'B'
415 o | 5: 45396c49d53b public 'B'
351 | |
416 | |
352 o | 4: ae36e8e3dfd7 public 'E'
417 o | 4: ae36e8e3dfd7 public 'E'
353 | |
418 | |
354 o | 3: 46b37eabc604 public 'D'
419 o | 3: 46b37eabc604 public 'D'
355 | |
420 | |
356 | o 2: 965c486023db secret 'C'
421 | o 2: 965c486023db secret 'C'
357 | |
422 | |
358 | o 1: 27547f69f254 public 'B'
423 | o 1: 27547f69f254 public 'B'
359 |/
424 |/
360 o 0: 4a2df7238c3b public 'A'
425 o 0: 4a2df7238c3b public 'A'
361
426
362 $ hg rebase --continue
427 $ hg rebase --continue
363 already rebased 2:965c486023db "C" as 401ccec5e39f
428 already rebased 2:965c486023db "C" as 401ccec5e39f
364 rebasing 6:a0b2430ebfb8 "F"
429 rebasing 6:a0b2430ebfb8 "F"
365 saved backup bundle to $TESTTMP/hook-pretxncommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg
430 saved backup bundle to $TESTTMP/hook-pretxncommit/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg
366 $ hg tglogp
431 $ hg tglogp
367 @ 6: 6e92a149ac6b secret 'F'
432 @ 6: 6e92a149ac6b secret 'F'
368 |
433 |
369 o 5: 401ccec5e39f secret 'C'
434 o 5: 401ccec5e39f secret 'C'
370 |
435 |
371 o 4: 45396c49d53b public 'B'
436 o 4: 45396c49d53b public 'B'
372 |
437 |
373 o 3: ae36e8e3dfd7 public 'E'
438 o 3: ae36e8e3dfd7 public 'E'
374 |
439 |
375 o 2: 46b37eabc604 public 'D'
440 o 2: 46b37eabc604 public 'D'
376 |
441 |
377 | o 1: 27547f69f254 public 'B'
442 | o 1: 27547f69f254 public 'B'
378 |/
443 |/
379 o 0: 4a2df7238c3b public 'A'
444 o 0: 4a2df7238c3b public 'A'
380
445
381 $ cd ..
446 $ cd ..
382
447
383 (pretxnclose version)
448 (pretxnclose version)
384
449
385 $ cp -R a3 hook-pretxnclose
450 $ cp -R a3 hook-pretxnclose
386 $ cd hook-pretxnclose
451 $ cd hook-pretxnclose
387 $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxnclose=hg log -r tip | grep "summary: C"'
452 $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxnclose=hg log -r tip | grep "summary: C"'
388 rebasing 2:965c486023db "C"
453 rebasing 2:965c486023db "C"
389 summary: C
454 summary: C
390 rebasing 6:a0b2430ebfb8 "F" (tip)
455 rebasing 6:a0b2430ebfb8 "F" (tip)
391 transaction abort!
456 transaction abort!
392 rollback completed
457 rollback completed
393 abort: pretxnclose hook exited with status 1
458 abort: pretxnclose hook exited with status 1
394 [255]
459 [255]
395 $ hg tglogp
460 $ hg tglogp
396 @ 7: 401ccec5e39f secret 'C'
461 @ 7: 401ccec5e39f secret 'C'
397 |
462 |
398 | o 6: a0b2430ebfb8 secret 'F'
463 | o 6: a0b2430ebfb8 secret 'F'
399 | |
464 | |
400 o | 5: 45396c49d53b public 'B'
465 o | 5: 45396c49d53b public 'B'
401 | |
466 | |
402 o | 4: ae36e8e3dfd7 public 'E'
467 o | 4: ae36e8e3dfd7 public 'E'
403 | |
468 | |
404 o | 3: 46b37eabc604 public 'D'
469 o | 3: 46b37eabc604 public 'D'
405 | |
470 | |
406 | o 2: 965c486023db secret 'C'
471 | o 2: 965c486023db secret 'C'
407 | |
472 | |
408 | o 1: 27547f69f254 public 'B'
473 | o 1: 27547f69f254 public 'B'
409 |/
474 |/
410 o 0: 4a2df7238c3b public 'A'
475 o 0: 4a2df7238c3b public 'A'
411
476
412 $ hg rebase --continue
477 $ hg rebase --continue
413 already rebased 2:965c486023db "C" as 401ccec5e39f
478 already rebased 2:965c486023db "C" as 401ccec5e39f
414 rebasing 6:a0b2430ebfb8 "F"
479 rebasing 6:a0b2430ebfb8 "F"
415 saved backup bundle to $TESTTMP/hook-pretxnclose/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg
480 saved backup bundle to $TESTTMP/hook-pretxnclose/.hg/strip-backup/965c486023db-aa6250e7-rebase.hg
416 $ hg tglogp
481 $ hg tglogp
417 @ 6: 6e92a149ac6b secret 'F'
482 @ 6: 6e92a149ac6b secret 'F'
418 |
483 |
419 o 5: 401ccec5e39f secret 'C'
484 o 5: 401ccec5e39f secret 'C'
420 |
485 |
421 o 4: 45396c49d53b public 'B'
486 o 4: 45396c49d53b public 'B'
422 |
487 |
423 o 3: ae36e8e3dfd7 public 'E'
488 o 3: ae36e8e3dfd7 public 'E'
424 |
489 |
425 o 2: 46b37eabc604 public 'D'
490 o 2: 46b37eabc604 public 'D'
426 |
491 |
427 | o 1: 27547f69f254 public 'B'
492 | o 1: 27547f69f254 public 'B'
428 |/
493 |/
429 o 0: 4a2df7238c3b public 'A'
494 o 0: 4a2df7238c3b public 'A'
430
495
431 $ cd ..
496 $ cd ..
432
497
433 Make sure merge state is cleaned up after a no-op rebase merge (issue5494)
498 Make sure merge state is cleaned up after a no-op rebase merge (issue5494)
434 $ hg init repo
499 $ hg init repo
435 $ cd repo
500 $ cd repo
436 $ echo a > a
501 $ echo a > a
437 $ hg commit -qAm base
502 $ hg commit -qAm base
438 $ echo b >> a
503 $ echo b >> a
439 $ hg commit -qm b
504 $ hg commit -qm b
440 $ hg up '.^'
505 $ hg up '.^'
441 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
506 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
442 $ echo c >> a
507 $ echo c >> a
443 $ hg commit -qm c
508 $ hg commit -qm c
444 $ hg rebase -s 1 -d 2 --noninteractive
509 $ hg rebase -s 1 -d 2 --noninteractive
445 rebasing 1:fdaca8533b86 "b"
510 rebasing 1:fdaca8533b86 "b"
446 merging a
511 merging a
447 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
512 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
448 unresolved conflicts (see hg resolve, then hg rebase --continue)
513 unresolved conflicts (see hg resolve, then hg rebase --continue)
449 [1]
514 [1]
450 $ echo a > a
515 $ echo a > a
451 $ echo c >> a
516 $ echo c >> a
452 $ hg resolve --mark a
517 $ hg resolve --mark a
453 (no more unresolved files)
518 (no more unresolved files)
454 continue: hg rebase --continue
519 continue: hg rebase --continue
455 $ hg rebase --continue
520 $ hg rebase --continue
456 rebasing 1:fdaca8533b86 "b"
521 rebasing 1:fdaca8533b86 "b"
457 note: not rebasing 1:fdaca8533b86 "b", its destination already has all its changes
522 note: not rebasing 1:fdaca8533b86 "b", its destination already has all its changes
458 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg
523 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg
459 $ hg resolve --list
524 $ hg resolve --list
460 $ test -d .hg/merge
525 $ test -d .hg/merge
461 [1]
526 [1]
462 Now try again with --collapse
527 Now try again with --collapse
463 $ hg unbundle -q .hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg
528 $ hg unbundle -q .hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg
464 $ hg rebase -s 2 -d 1 --noninteractive --collapse
529 $ hg rebase -s 2 -d 1 --noninteractive --collapse
465 rebasing 2:fdaca8533b86 "b" (tip)
530 rebasing 2:fdaca8533b86 "b" (tip)
466 merging a
531 merging a
467 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
532 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
468 unresolved conflicts (see hg resolve, then hg rebase --continue)
533 unresolved conflicts (see hg resolve, then hg rebase --continue)
469 [1]
534 [1]
470 $ echo a > a
535 $ echo a > a
471 $ echo c >> a
536 $ echo c >> a
472 $ hg resolve --mark a
537 $ hg resolve --mark a
473 (no more unresolved files)
538 (no more unresolved files)
474 continue: hg rebase --continue
539 continue: hg rebase --continue
475 $ hg rebase --continue
540 $ hg rebase --continue
476 rebasing 2:fdaca8533b86 "b" (tip)
541 rebasing 2:fdaca8533b86 "b" (tip)
477 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg
542 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/fdaca8533b86-7fd70513-rebase.hg
478 $ hg resolve --list
543 $ hg resolve --list
479 $ test -d .hg/merge
544 $ test -d .hg/merge
480 [1]
545 [1]
General Comments 0
You need to be logged in to leave comments. Login now