comparison mercurial/cmdutil.py @ 43926:daed70e95d60

rebase: use cmdutil.check_at_most_one_arg() for --confirm/--dry-run I've also updated the helper to work with the hyphenated --dry-run option. Differential Revision: https://phab.mercurial-scm.org/D7641
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 13 Dec 2019 14:49:48 -0800
parents fff21278554b
children 4ca89cc20d02
comparison
equal deleted inserted replaced
43925:7929bb58146f 43926:daed70e95d60
266 Returns the unique argument or None if none of them were specified. 266 Returns the unique argument or None if none of them were specified.
267 """ 267 """
268 previous = None 268 previous = None
269 for x in args: 269 for x in args:
270 if opts.get(x): 270 if opts.get(x):
271 x = x.replace(b'_', b'-')
271 if previous: 272 if previous:
272 raise error.Abort( 273 raise error.Abort(
273 _(b'cannot specify both --%s and --%s') % (previous, x) 274 _(b'cannot specify both --%s and --%s') % (previous, x)
274 ) 275 )
275 previous = x 276 previous = x