Mercurial > hg
comparison tests/test-histedit-arguments.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 | 21733e8c924f |
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 Test argument handling and various data parsing | 10 Test argument handling and various data parsing |
2 ================================================== | 11 ================================================== |
3 | 12 |
4 | 13 |
5 Enable extensions used by this test. | 14 Enable extensions used by this test. |
45 -------------------------------------------------- | 54 -------------------------------------------------- |
46 | 55 |
47 $ hg histedit --continue | 56 $ hg histedit --continue |
48 abort: no histedit in progress | 57 abort: no histedit in progress |
49 [255] | 58 [255] |
50 $ hg histedit --abort | 59 $ hg abort |
51 abort: no histedit in progress | 60 abort: no histedit in progress (abortflag !) |
61 abort: no operation in progress (abortcommand !) | |
52 [255] | 62 [255] |
53 | 63 |
54 Run a dummy edit to make sure we get tip^^ correctly via revsingle. | 64 Run a dummy edit to make sure we get tip^^ correctly via revsingle. |
55 -------------------------------------------------------------------- | 65 -------------------------------------------------------------------- |
56 | 66 |
356 (hg histedit --continue to resume) | 366 (hg histedit --continue to resume) |
357 [1] | 367 [1] |
358 Corrupt histedit state file | 368 Corrupt histedit state file |
359 $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit | 369 $ sed 's/8fda0c726bf2/123456789012/' .hg/histedit-state > ../corrupt-histedit |
360 $ mv ../corrupt-histedit .hg/histedit-state | 370 $ mv ../corrupt-histedit .hg/histedit-state |
361 $ hg histedit --abort | 371 $ hg abort |
362 warning: encountered an exception during histedit --abort; the repository may not have been completely cleaned up | 372 warning: encountered an exception during histedit --abort; the repository may not have been completely cleaned up |
363 abort: $TESTTMP/foo/.hg/strip-backup/*-histedit.hg: $ENOENT$ (glob) (windows !) | 373 abort: $TESTTMP/foo/.hg/strip-backup/*-histedit.hg: $ENOENT$ (glob) (windows !) |
364 abort: $ENOENT$: '$TESTTMP/foo/.hg/strip-backup/*-histedit.hg' (glob) (no-windows !) | 374 abort: $ENOENT$: '$TESTTMP/foo/.hg/strip-backup/*-histedit.hg' (glob) (no-windows !) |
365 [255] | 375 [255] |
366 Histedit state has been exited | 376 Histedit state has been exited |