Mercurial > hg
comparison tests/test-strip.t @ 29952:44ef21621ad7
strip: report both bundle files in case of exception (issue5368)
If strip fails while recovering the temporary bundle (e.g. because a
hook fails), we tell the user only about the backup bundle, not about
the temporary bundle. Since the user did not ask to strip the commits
in the temporary bundle, that's the more important bundle to mention,
so let's do that (and also mention the backup bundle as usual).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 15 Sep 2016 09:45:29 -0700 |
parents | 953839de96ab |
children | 94ebf56db04e |
comparison
equal
deleted
inserted
replaced
29951:e7acbe538baf | 29952:44ef21621ad7 |
---|---|
365 o changeset: 0:9ab35a2d17cb | 365 o changeset: 0:9ab35a2d17cb |
366 user: test | 366 user: test |
367 date: Thu Jan 01 00:00:00 1970 +0000 | 367 date: Thu Jan 01 00:00:00 1970 +0000 |
368 summary: a | 368 summary: a |
369 | 369 |
370 Failed hook while applying "saveheads" bundle. | |
371 | |
372 $ hg strip 2 --config hooks.pretxnchangegroup.bad=false | |
373 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
374 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | |
375 transaction abort! | |
376 rollback completed | |
377 strip failed, full bundle stored in '$TESTTMP/test/.hg/strip-backup/*-backup.hg' (glob) | |
378 strip failed, partial bundle stored in '$TESTTMP/test/.hg/strip-backup/*-temp.hg' (glob) | |
379 abort: pretxnchangegroup.bad hook exited with status 1 | |
380 [255] | |
381 $ restore | |
382 $ hg log -G | |
383 o changeset: 4:443431ffac4f | |
384 | tag: tip | |
385 | user: test | |
386 | date: Thu Jan 01 00:00:00 1970 +0000 | |
387 | summary: e | |
388 | | |
389 o changeset: 3:65bd5f99a4a3 | |
390 | parent: 1:ef3a871183d7 | |
391 | user: test | |
392 | date: Thu Jan 01 00:00:00 1970 +0000 | |
393 | summary: d | |
394 | | |
395 | o changeset: 2:264128213d29 | |
396 |/ user: test | |
397 | date: Thu Jan 01 00:00:00 1970 +0000 | |
398 | summary: c | |
399 | | |
400 @ changeset: 1:ef3a871183d7 | |
401 | user: test | |
402 | date: Thu Jan 01 00:00:00 1970 +0000 | |
403 | summary: b | |
404 | | |
405 o changeset: 0:9ab35a2d17cb | |
406 user: test | |
407 date: Thu Jan 01 00:00:00 1970 +0000 | |
408 summary: a | |
409 | |
370 | 410 |
371 2 different branches: 2 strips | 411 2 different branches: 2 strips |
372 | 412 |
373 $ hg strip 2 4 | 413 $ hg strip 2 4 |
374 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
375 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) | 414 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
376 $ hg log -G | 415 $ hg log -G |
377 o changeset: 2:65bd5f99a4a3 | 416 o changeset: 2:65bd5f99a4a3 |
378 | tag: tip | 417 | tag: tip |
379 | user: test | 418 | user: test |