[PATCH 1 of 3] run-tests: allow --chg with --with-hg if --with-chg is set

Jun Wu quark at fb.com
Mon Jul 18 04:08:46 EDT 2016

# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1468828673 -3600
#      Mon Jul 18 08:57:53 2016 +0100
# Node ID 801ec794c36bcee6db09916311c62dff96729921
# Parent  1cc5a918b7d8acdc918809d74842fecc128c4ec4
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r 801ec794c36b
run-tests: allow --chg with --with-hg if --with-chg is set

Before this patch, --chg conflicts with --with-hg. But it makes sense with
--with-chg set. This patch changes the check.

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -322,7 +322,7 @@ def parseargs(args, parser):
         if not (os.path.isfile(options.with_chg) and
                 os.access(options.with_chg, os.X_OK)):
             parser.error('--with-chg must specify a chg executable')
-    if options.chg and options.with_hg:
+    if options.chg and options.with_hg and not options.with_chg:
         # chg shares installation location with hg
         parser.error('--chg does not work when --with-hg is specified '
                      '(use --with-chg instead)')

More information about the Mercurial-devel mailing list