Submitter | Brandon McCaig |
---|---|
Date | June 14, 2017, 5:54 a.m. |
Message ID | <20170614055410.GE18212@test-chamber-1.castopulence.org> |
Download | mbox | patch |
Permalink | /patch/21369/ |
State | Accepted |
Headers | show |
Comments
On Wed, 14 Jun 2017 01:54:10 -0400, Brandon McCaig wrote: > On Wed, Jun 14, 2017 at 01:51:46AM -0400, Brandon McCaig wrote: > # HG changeset patch > # User Brandon McCaig <bamccaig@gmail.com> > # Date 1497419027 14400 > # Wed Jun 14 01:43:47 2017 -0400 > # Node ID 630766ecca6c0df1256d25868778722f5e312353 > # Parent e65ff29dbeb02ce08e4a64f381ccd37949354dcf > bisect: Simpler approach for option validation message. Queued this, thanks.
Patch
diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -9,7 +9,6 @@ import difflib import errno -import itertools import os import re import sys @@ -781,9 +780,11 @@ '--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)) + enabled = [x for x in incompatibles if incompatibles[x]] + + if len(enabled) > 1: + raise error.Abort(_('%s and %s are incompatible') % + tuple(sorted(enabled)[0:2])) if reset: hbisect.resetstate(repo)