# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1507168281 25200
#      Wed Oct 04 18:51:21 2017 -0700
# Node ID 149109c969049422bf0460f4dc3326561e5c3758
# Parent  d817bf1fc675c0dea379641768b3f5b95f8dedf4
run-tests: set HGPLAIN=1 when bisecting

Otherwise a customized template may break the regex matching the bisect
output.

Differential Revision: https://phab.mercurial-scm.org/D949

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2104,8 +2104,10 @@
         if bisectrepo:
             bisectcmd.extend(['-R', os.path.abspath(bisectrepo)])
         def pread(args):
+            env = os.environ.copy()
+            env['HGPLAIN'] = '1'
             p = subprocess.Popen(args, stderr=subprocess.STDOUT,
-                                 stdout=subprocess.PIPE)
+                                 stdout=subprocess.PIPE, env=env)
             data = p.stdout.read()
             p.wait()
             return data