D7638: fix: use cmdutil.check_at_most_one_arg()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Dec 17 02:58:51 EST 2019


Closed by commit rHGdda49ec2b54a: fix: use cmdutil.check_at_most_one_arg() (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7638?vs=18764&id=18792

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7638/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7638

AFFECTED FILES
  hgext/fix.py

CHANGE DETAILS

diff --git a/hgext/fix.py b/hgext/fix.py
--- a/hgext/fix.py
+++ b/hgext/fix.py
@@ -249,9 +249,8 @@
     override this default behavior, though it is not usually desirable to do so.
     """
     opts = pycompat.byteskwargs(opts)
+    cmdutil.check_at_most_one_arg(opts, b'all', b'rev')
     if opts[b'all']:
-        if opts[b'rev']:
-            raise error.Abort(_(b'cannot specify both "--rev" and "--all"'))
         opts[b'rev'] = [b'not public() and not obsolete()']
         opts[b'working_dir'] = True
     with repo.wlock(), repo.lock(), repo.transaction(b'fix'):



To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-devel


More information about the Mercurial-devel mailing list