D4377: resolve: make condition clearer, and able to handle a new flag
valentin.gatienbaron (Valentin Gatien-Baron)
phabricator at mercurial-scm.org
Sun Aug 26 23:02:01 UTC 2018
valentin.gatienbaron created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4377
AFFECTED FILES
mercurial/commands.py
CHANGE DETAILS
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4558,7 +4558,7 @@
all, mark, unmark, show, nostatus = \
[opts.get(o) for o in flaglist]
- if (show and (mark or unmark)) or (mark and unmark):
+ if len(list(filter(None, [show, mark, unmark]))) > 1:
raise error.Abort(_("too many options specified"))
if pats and all:
raise error.Abort(_("can't specify --all and patterns"))
To: valentin.gatienbaron, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list