comparison tests/test-histedit-obsolete.t @ 42584:db5560c07a28

abort: added support for histedit This patch adds the support for `histedit` in `hg abort` plan. As seperate `hgaborthistedit()` function is created to handle independent calls for abortion of `histedit`. This function is then registered as `abortfunc` for state detection API. hg abort in case of `histedit` also supports ` history-editing-backup` config option. Results are shown as tests. Differential Revision: https://phab.mercurial-scm.org/D6582
author Taapas Agrawal <taapas2897@gmail.com>
date Fri, 28 Jun 2019 00:35:52 +0530
parents 15d2afa31e57
children bde97bee321f
comparison
equal deleted inserted replaced
42583:b9bc47211cf5 42584:db5560c07a28
1 #testcases abortcommand abortflag
2
3 #if abortflag
4 $ cat >> $HGRCPATH <<EOF
5 > [alias]
6 > abort = histedit --abort
7 > EOF
8 #endif
9
1 $ . "$TESTDIR/histedit-helpers.sh" 10 $ . "$TESTDIR/histedit-helpers.sh"
2 11
3 Enable obsolete 12 Enable obsolete
4 13
5 $ cat >> $HGRCPATH << EOF 14 $ cat >> $HGRCPATH << EOF
520 > EOF 529 > EOF
521 Editing (ee118ab9fa44), you may commit or record as needed now. 530 Editing (ee118ab9fa44), you may commit or record as needed now.
522 (hg histedit --continue to resume) 531 (hg histedit --continue to resume)
523 [1] 532 [1]
524 533
525 $ hg histedit --abort 534 #if abortcommand
535 when in dry-run mode
536 $ hg abort --dry-run
537 histedit in progress, will be aborted
538 #endif
539
540 $ hg abort
526 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 541 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
527 saved backup bundle to $TESTTMP/abort/.hg/strip-backup/4dc06258baa6-dff4ef05-backup.hg 542 saved backup bundle to $TESTTMP/abort/.hg/strip-backup/4dc06258baa6-dff4ef05-backup.hg
528 543
529 $ hg log -G 544 $ hg log -G
530 @ 18:ee118ab9fa44 (secret) k 545 @ 18:ee118ab9fa44 (secret) k