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

login
register
mail settings
Submitter phabricator
Date July 18, 2017, 12:06 a.m.
Message ID <differential-rev-PHID-DREV-h3tt7avm6mkgiebfwng5-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/22463/
State Superseded, archived
Headers show

Comments

phabricator - July 18, 2017, 12:06 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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: mercurial-devel
phabricator - July 18, 2017, 2:54 p.m.
yuja added inline comments.

INLINE COMMENTS

> run-tests.py:427
> +                             'pygments is not installed\n')
>  
>      global useipv6

Nit: missing space after "because".

REPOSITORY
  rHG Mercurial

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

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

To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel
phabricator - July 18, 2017, 3:37 p.m.
martinvonz marked an inline comment as done.
martinvonz added inline comments.

INLINE COMMENTS

> yuja wrote in run-tests.py:427
> Nit: missing space after "because".

Good catch. I had fixed that, but then lost it in a rebase.

REPOSITORY
  rHG Mercurial

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

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

To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel
phabricator - July 18, 2017, 7:19 p.m.
krbullock accepted this revision.
krbullock added a comment.
This revision is now accepted and ready to land.


  Queued, thanks.

REPOSITORY
  rHG Mercurial

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

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
@@ -421,6 +421,9 @@ 
         options.color = False
     else: # 'always', for testing purposes
         options.color = pygmentspresent
+        if not pygmentspresent:
+            sys.stderr.write('warning: --color=always ignored because'
+                             'pygments is not installed\n')
 
     global useipv6
     if options.ipv6: