mercurial/commands.py
changeset 44174 75c2ca094d3a
parent 44134 e96ed3a61899
child 44176 6744859ff3ee
equal deleted inserted replaced
44168:1cb7ae9b0071 44174:75c2ca094d3a
  4845 
  4845 
  4846     opts = pycompat.byteskwargs(opts)
  4846     opts = pycompat.byteskwargs(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':
  4853             raise error.Abort(
  4854             raise error.Abort(
  4854                 _(b'cannot abort merge with %s in progress') % (state._opname),
  4855                 _(b'cannot abort merge with %s in progress') % (state._opname),
  4855                 hint=state.hint(),
  4856                 hint=state.hint(),
  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:
  4866         node = opts.get(b'rev')
  4863         node = opts.get(b'rev')
  4867 
  4864