comparison tests/test-rebase-interruptions.t @ 33122:918e7dcf8820 stable

rebase: provides test case for (issue5610) The 4.2 release introduces a regression regarding the behavior of rebase with some hook failures. We add the tests from the bug report from Henrik Stuart to our test base to prevent further regression on this.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 27 Jun 2017 17:45:58 +0200
parents 157675d0f600
children e7faa4a14d5d
comparison
equal deleted inserted replaced
33121:a5abaa81fad6 33122:918e7dcf8820
269 | | 269 | |
270 | o 1:public 'B' 270 | o 1:public 'B'
271 |/ 271 |/
272 o 0:public 'A' 272 o 0:public 'A'
273 273
274
275 Test rebase interrupted by hooks (pretxncommit)
276
277 $ hg up 2
278 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
279 $ echo F > F
280 $ hg add F
281 $ hg ci -m F
282 $ hg rebase --source 2 --dest 5 --tool internal:other --config 'hooks.pretxncommit=hg log -r $HG_NODE | grep "summary: C"'
283 rebasing 2:965c486023db "C"
284 summary: C
285 rebasing 6:a0b2430ebfb8 "F" (tip)
286 transaction abort!
287 rollback completed
288 abort: pretxncommit hook exited with status 1
289 [255]
290 $ hg tglogp
291 @ 7:secret 'C'
292 |
293 | @ 6:secret 'F'
294 | |
295 o | 5:public 'B'
296 | |
297 o | 4:public 'E'
298 | |
299 o | 3:public 'D'
300 | |
301 | o 2:secret 'C'
302 | |
303 | o 1:public 'B'
304 |/
305 o 0:public 'A'
306
307 $ hg rebase --continue
308 already rebased 2:965c486023db "C" as 401ccec5e39f
309 rebasing 6:a0b2430ebfb8 "F"
310 saved backup bundle to $TESTTMP/a3/.hg/strip-backup/965c486023db-aa6250e7-backup.hg (glob)
311 $ hg tglogp
312 @ 6:secret 'F'
313 |
314 o 5:secret 'C'
315 |
316 o 4:public 'B'
317 |
318 o 3:public 'E'
319 |
320 o 2:public 'D'
321 |
322 | o 1:public 'B'
323 |/
324 o 0:public 'A'
325
274 $ cd .. 326 $ cd ..