Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/commands.py (51 lines) | |||
M | tests/test-graft-interrupted.t (10 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
opts, | opts, | ||||
b'no_commit', | b'no_commit', | ||||
[b'edit', b'currentuser', b'currentdate', b'log'], | [b'edit', b'currentuser', b'currentdate', b'log'], | ||||
) | ) | ||||
graftstate = statemod.cmdstate(repo, b'graftstate') | graftstate = statemod.cmdstate(repo, b'graftstate') | ||||
if opts.get(b'stop'): | if opts.get(b'stop'): | ||||
if any( | cmdutil.check_incompatible_arguments( | ||||
( | opts, | ||||
opts.get(b'edit'), | b'stop', | ||||
opts.get(b'log'), | [ | ||||
opts.get(b'user'), | b'edit', | ||||
opts.get(b'date'), | b'log', | ||||
opts.get(b'currentdate'), | b'user', | ||||
opts.get(b'currentuser'), | b'date', | ||||
opts.get(b'rev'), | b'currentdate' b'currentuser', | ||||
b'rev', | |||||
], | |||||
) | ) | ||||
): | |||||
raise error.Abort(_(b"cannot specify any other flag with '--stop'")) | |||||
return _stopgraft(ui, repo, graftstate) | return _stopgraft(ui, repo, graftstate) | ||||
elif opts.get(b'abort'): | elif opts.get(b'abort'): | ||||
if any( | cmdutil.check_incompatible_arguments( | ||||
( | opts, | ||||
opts.get(b'edit'), | b'abort', | ||||
opts.get(b'log'), | [ | ||||
opts.get(b'user'), | b'edit', | ||||
opts.get(b'date'), | b'log', | ||||
opts.get(b'currentdate'), | b'user', | ||||
opts.get(b'currentuser'), | b'date', | ||||
opts.get(b'rev'), | b'currentdate' b'currentuser', | ||||
) | b'rev', | ||||
): | ], | ||||
raise error.Abort( | |||||
_(b"cannot specify any other flag with '--abort'") | |||||
) | ) | ||||
return cmdutil.abortgraft(ui, repo, graftstate) | return cmdutil.abortgraft(ui, repo, graftstate) | ||||
elif opts.get(b'continue'): | elif opts.get(b'continue'): | ||||
cont = True | cont = True | ||||
if revs: | if revs: | ||||
raise error.Abort(_(b"can't specify --continue and revisions")) | raise error.Abort(_(b"can't specify --continue and revisions")) | ||||
# read in unfinished revisions | # read in unfinished revisions | ||||
if graftstate.exists(): | if graftstate.exists(): | ||||
statedata = cmdutil.readgraftstate(repo, graftstate) | statedata = cmdutil.readgraftstate(repo, graftstate) |
(use 'hg resolve' and 'hg graft --continue') | (use 'hg resolve' and 'hg graft --continue') | ||||
[1] | [1] | ||||
$ hg graft --stop --continue | $ hg graft --stop --continue | ||||
abort: cannot specify both --stop and --continue | abort: cannot specify both --stop and --continue | ||||
[255] | [255] | ||||
$ hg graft --stop -U | $ hg graft --stop -U | ||||
abort: cannot specify any other flag with '--stop' | abort: cannot specify both --stop and --user | ||||
[255] | [255] | ||||
$ hg graft --stop --rev 4 | $ hg graft --stop --rev 4 | ||||
abort: cannot specify any other flag with '--stop' | abort: cannot specify both --stop and --rev | ||||
[255] | [255] | ||||
$ hg graft --stop --log | $ hg graft --stop --log | ||||
abort: cannot specify any other flag with '--stop' | abort: cannot specify both --stop and --log | ||||
[255] | [255] | ||||
$ hg graft --stop | $ hg graft --stop | ||||
stopped the interrupted graft | stopped the interrupted graft | ||||
working directory is now at a0deacecd59d | working directory is now at a0deacecd59d | ||||
$ hg diff | $ hg diff | ||||
abort: cannot specify both --abort and --continue | abort: cannot specify both --abort and --continue | ||||
[255] | [255] | ||||
$ hg graft --abort --stop | $ hg graft --abort --stop | ||||
abort: cannot specify both --abort and --stop | abort: cannot specify both --abort and --stop | ||||
[255] | [255] | ||||
$ hg graft --abort --currentuser | $ hg graft --abort --currentuser | ||||
abort: cannot specify any other flag with '--abort' | abort: cannot specify both --abort and --user | ||||
[255] | [255] | ||||
$ hg graft --abort --edit | $ hg graft --abort --edit | ||||
abort: cannot specify any other flag with '--abort' | abort: cannot specify both --abort and --edit | ||||
[255] | [255] | ||||
#if abortcommand | #if abortcommand | ||||
when in dry-run mode | when in dry-run mode | ||||
$ hg abort --dry-run | $ hg abort --dry-run | ||||
graft in progress, will be aborted | graft in progress, will be aborted | ||||
#endif | #endif | ||||