comparison tests/test-strip.t @ 45840:527ce85c2e60

errors: introduce StateError and use it from commands and cmdutil This very similar to an earlier patch (which was for `InputError`). In this patch, I also updated the transplant extension only because `test-transplant.t` would otherwise have needed a `#if continueflag`. Differential Revision: https://phab.mercurial-scm.org/D9310
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 12 Oct 2020 12:44:18 -0700
parents 2bc978921e8a
children d7a508a75d72
comparison
equal deleted inserted replaced
45839:ebee234d952a 45840:527ce85c2e60
315 315
316 ##strip not allowed with merge in progress 316 ##strip not allowed with merge in progress
317 $ hg strip 4 317 $ hg strip 4
318 abort: outstanding uncommitted merge 318 abort: outstanding uncommitted merge
319 (use 'hg commit' or 'hg merge --abort') 319 (use 'hg commit' or 'hg merge --abort')
320 [255] 320 [20]
321 ##strip allowed --force with merge in progress 321 ##strip allowed --force with merge in progress
322 $ hg strip 4 --force 322 $ hg strip 4 --force
323 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 323 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
324 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) 324 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
325 325
604 summary: a 604 summary: a
605 605
606 $ echo c > b 606 $ echo c > b
607 $ hg strip tip 607 $ hg strip tip
608 abort: uncommitted changes 608 abort: uncommitted changes
609 [255] 609 [20]
610 $ hg strip tip --keep 610 $ hg strip tip --keep
611 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) 611 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
612 $ hg log --graph 612 $ hg log --graph
613 @ changeset: 0:9ab35a2d17cb 613 @ changeset: 0:9ab35a2d17cb
614 tag: tip 614 tag: tip
756 (activating bookmark B) 756 (activating bookmark B)
757 $ echo a > a 757 $ echo a > a
758 $ hg add a 758 $ hg add a
759 $ hg strip -B B 759 $ hg strip -B B
760 abort: uncommitted changes 760 abort: uncommitted changes
761 [255] 761 [20]
762 $ hg bookmarks 762 $ hg bookmarks
763 * B 6:ff43616e5d0f 763 * B 6:ff43616e5d0f
764 764
765 Make sure no one adds back a -b option: 765 Make sure no one adds back a -b option:
766 766