##// END OF EJS Templates
merge: use check_incompatible_arguments() for --abort...
Martin von Zweigbergk -
r44635:75c2ca09 default
parent child Browse files
Show More
@@ -4847,6 +4847,7 b' def merge(ui, repo, node=None, **opts):'
4847 abort = opts.get(b'abort')
4847 abort = opts.get(b'abort')
4848 if abort and repo.dirstate.p2() == nullid:
4848 if abort and repo.dirstate.p2() == nullid:
4849 cmdutil.wrongtooltocontinue(repo, _(b'merge'))
4849 cmdutil.wrongtooltocontinue(repo, _(b'merge'))
4850 cmdutil.check_incompatible_arguments(opts, b'abort', b'rev', b'preview')
4850 if abort:
4851 if abort:
4851 state = cmdutil.getunfinishedstate(repo)
4852 state = cmdutil.getunfinishedstate(repo)
4852 if state and state._opname != b'merge':
4853 if state and state._opname != b'merge':
@@ -4856,10 +4857,6 b' def merge(ui, repo, node=None, **opts):'
4856 )
4857 )
4857 if node:
4858 if node:
4858 raise error.Abort(_(b"cannot specify a node with --abort"))
4859 raise error.Abort(_(b"cannot specify a node with --abort"))
4859 if opts.get(b'rev'):
4860 raise error.Abort(_(b"cannot specify both --rev and --abort"))
4861 if opts.get(b'preview'):
4862 raise error.Abort(_(b"cannot specify --preview with --abort"))
4863 if opts.get(b'rev') and node:
4860 if opts.get(b'rev') and node:
4864 raise error.Abort(_(b"please specify just one revision"))
4861 raise error.Abort(_(b"please specify just one revision"))
4865 if not node:
4862 if not node:
@@ -60,7 +60,7 b' Testing the abort functionality first in'
60 abort: cannot specify a node with --abort
60 abort: cannot specify a node with --abort
61 [255]
61 [255]
62 $ hg merge --abort --rev e4501
62 $ hg merge --abort --rev e4501
63 abort: cannot specify both --rev and --abort
63 abort: cannot specify both --abort and --rev
64 [255]
64 [255]
65
65
66 #if abortcommand
66 #if abortcommand
@@ -144,7 +144,7 b' Testing the abort functionality in case '
144 (branch merge, don't forget to commit)
144 (branch merge, don't forget to commit)
145
145
146 $ hg merge --preview --abort
146 $ hg merge --preview --abort
147 abort: cannot specify --preview with --abort
147 abort: cannot specify both --abort and --preview
148 [255]
148 [255]
149
149
150 $ hg abort
150 $ hg abort
General Comments 0
You need to be logged in to leave comments. Login now