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

login
register
mail settings
Submitter phabricator
Date July 18, 2017, 7:27 p.m.
Message ID <bd266db70ecb82179e72fa2501aa9185@localhost.localdomain>
Download mbox | patch
Permalink /patch/22516/
State Not Applicable, archived
Headers show

Comments

phabricator - July 18, 2017, 7:27 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG63f2445079da: run-tests: warn if --color=always and no pygments installed (authored by martinvonz).

REPOSITORY
  rHG Mercurial

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

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, krbullock
Cc: krbullock, 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')