Patchwork D117: run-tests: warn if --color=always and no pygments installed

login
register
mail settings
Submitter phabricator
Date July 18, 2017, 4:13 p.m.
Message ID <8da57de6dfc2f8956c72a02dd9136ceb@localhost.localdomain>
Download mbox | patch
Permalink /patch/22495/
State Not Applicable, archived
Headers show

Comments

phabricator - July 18, 2017, 4:13 p.m.
martinvonz updated this revision to Diff 254.
martinvonz marked an inline comment as done.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D117?vs=228&id=254

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

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




EMAIL PREFERENCES
  https://phab.mercurial-scm.org/settings/panel/emailpreferences/

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

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -413,6 +413,10 @@ 
         parser.error('--chg does not work when --with-hg is specified '
                      '(use --with-chg instead)')
 
+    if options.color == 'always' and not pygmentspresent:
+        sys.stderr.write('warning: --color=always ignored because '
+                         'pygments is not installed\n')
+
     global useipv6
     if options.ipv6:
         useipv6 = checksocketfamily('AF_INET6')