D118: run-tests: remove unnecessary 'with_color' variable
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Tue Jul 18 12:13:31 EDT 2017
martinvonz updated this revision to Diff 255.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D118?vs=234&id=255
REVISION DETAIL
https://phab.mercurial-scm.org/D118
AFFECTED FILES
tests/run-tests.py
CHANGE DETAILS
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -88,15 +88,13 @@
osenvironb = getattr(os, 'environb', os.environ)
processlock = threading.Lock()
-with_color = False
pygmentspresent = False
# ANSI color is unsupported prior to Windows 10
if os.name != 'nt':
try: # is pygments installed
import pygments
import pygments.lexers as lexers
import pygments.formatters as formatters
- with_color = True
pygmentspresent = True
except ImportError:
pass
@@ -1571,7 +1569,7 @@
if not self.stream.isatty(): # check if the terminal is capable
options.color = False
elif options.color == 'auto':
- options.color = with_color
+ options.color = pygmentspresent
elif options.color == 'never':
options.color = False
else: # 'always', for testing purposes
EMAIL PREFERENCES
https://phab.mercurial-scm.org/settings/panel/emailpreferences/
To: martinvonz, #hg-reviewers
Cc: quark, mercurial-devel
More information about the Mercurial-devel
mailing list