comparison tests/test-completion.t @ 42581:bb135a784b70

abort: added logic for of hg abort This is part of `GSoC19` project `Implement abort and continue commands`. This patch is part of the `abort plan`. This adds the basic logic for `hg abort`. This command aborts an multistep operation like graft, histedit, rebase, merge and unshelve if they are in an unfinished state. The first part of the logic is determining the unfinished operation from the state detection API under `statemod`. This API is extended to support `hg abort` by adding a method to register the abort logic as a function (here `abortfunc`). Once the unfinished operation is determined the registered logic is used to abort the command. The benefit of this kind of framework is that any new extension developed can support `hg abort` by registering the command and logic under statedetection API. `hg abort` currently supports `--dry-run/-n` flag only. It is used to dry run `hg abort` Further patches sequentially add support for `graft`, `rebase`, `unshelve`, `histedit` and `merge`. Differential Revision: https://phab.mercurial-scm.org/D6566
author Taapas Agrawal <taapas2897@gmail.com>
date Sun, 23 Jun 2019 20:58:01 +0530
parents 2e1d9414ff71
children 3c16b9c0b099
comparison
equal deleted inserted replaced
42580:eb7bd7d64a9d 42581:bb135a784b70
1 Show all commands except debug commands 1 Show all commands except debug commands
2 $ hg debugcomplete 2 $ hg debugcomplete
3 abort
3 add 4 add
4 addremove 5 addremove
5 annotate 6 annotate
6 archive 7 archive
7 backout 8 backout
57 verify 58 verify
58 version 59 version
59 60
60 Show all commands that start with "a" 61 Show all commands that start with "a"
61 $ hg debugcomplete a 62 $ hg debugcomplete a
63 abort
62 add 64 add
63 addremove 65 addremove
64 annotate 66 annotate
65 archive 67 archive
66 68
233 serve shelve showconfig status summary 235 serve shelve showconfig status summary
234 [255] 236 [255]
235 237
236 Show all commands + options 238 Show all commands + options
237 $ hg debugcommands 239 $ hg debugcommands
240 abort: dry-run
238 add: include, exclude, subrepos, dry-run 241 add: include, exclude, subrepos, dry-run
239 addremove: similarity, subrepos, include, exclude, dry-run 242 addremove: similarity, subrepos, include, exclude, dry-run
240 annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, skip, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, include, exclude, template 243 annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, skip, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, include, exclude, template
241 archive: no-decode, prefix, rev, type, subrepos, include, exclude 244 archive: no-decode, prefix, rev, type, subrepos, include, exclude
242 backout: merge, commit, no-commit, parent, rev, edit, tool, include, exclude, message, logfile, date, user 245 backout: merge, commit, no-commit, parent, rev, edit, tool, include, exclude, message, logfile, date, user