[PATCH] bisect: improve option validation message
Yuya Nishihara
yuya at tcha.org
Sun Jun 11 01:14:28 EDT 2017
On Sat, 10 Jun 2017 18:45:45 -0400, Augie Fackler wrote:
>
> > On Jun 10, 2017, at 5:43 PM, Brandon McCaig <bamccaig at gmail.com> wrote:
> >
> > # HG changeset patch
> > # User Brandon McCaig <bamccaig at gmail.com>
> > # Date 1497053559 14400
> > # Fri Jun 09 20:12:39 2017 -0400
> > # Node ID d1f2ee1cefc15f9043139c835487917d0831485c
> > # Parent 7e9d0d8ff938dcf8ca193c17db5321a05a48e718
> > bisect: Make option validation message more consistent with hg
>
> This looks great, queued.
>
> I’m about to wander away from my laptop for supper, so if you’d rather I push the two patches as one folded-together patch let me know. If I don’t hear anything in the next few hours I’ll just push as-is with two commits.
Folded them as fbe9c4dcc8a0 "bisect: improve option validation message".
> > + incompatibles = {
> > + '--bad': bad,
> > + '--command': bool(command),
> > + '--extend': extend,
> > + '--good': good,
> > + '--reset': reset,
> > + '--skip': skip,
> > + }
> > +
> > + for left, right in itertools.combinations(sorted(incompatibles), 2):
> > + if incompatibles[left] and incompatibles[right]:
> > + raise error.Abort(_('%s and %s are incompatible') % (left, right))
Perhaps we can filter out False elements first and just take the first two?
More information about the Mercurial-devel
mailing list