Submitter | phabricator |
---|---|
Date | Dec. 19, 2019, 5:57 p.m. |
Message ID | <8d28c212fc68b65d281d7c0607e7f919@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/43996/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -265,13 +265,17 @@ Returns the unique argument or None if none of them were specified. """ + + def to_display(name): + return name.replace(b'_', b'-') + previous = None for x in args: if opts.get(x): - x = x.replace(b'_', b'-') if previous: raise error.Abort( - _(b'cannot specify both --%s and --%s') % (previous, x) + _(b'cannot specify both --%s and --%s') + % (to_display(previous), to_display(x)) ) previous = x return previous