[Python-checkins] hooks: Another try at disabling coloring
local-hg
python-checkins at python.org
Sun Mar 6 09:23:04 CET 2011
http://hg.python.org/hooks/rev/1aaf36cb51b6
changeset: 50:1aaf36cb51b6
user: Antoine Pitrou <solipsis at pitrou.net>
date: Sun Mar 06 09:23:04 2011 +0100
summary:
Another try at disabling coloring
files:
mail.py
diff --git a/mail.py b/mail.py
--- a/mail.py
+++ b/mail.py
@@ -11,6 +11,7 @@
from mercurial.encoding import fromlocal
import smtplib
import os
+import sys
BASE = 'http://hg.python.org/'
CSET_URL = BASE + '%s/rev/%s'
@@ -32,6 +33,12 @@
os.environ['TERM'] = 'dumb'
ui.setconfig('ui', 'interactive', 'False')
ui.setconfig('ui', 'formatted', 'False')
+ try:
+ colormod = sys.modules['hgext.color']
+ except KeyError:
+ pass
+ else:
+ colormod._styles.clear()
displayer = cmdutil.changeset_printer(ui, repo, False, False, True)
ctx = repo[kwargs['node']]
--
Repository URL: http://hg.python.org/hooks
More information about the Python-checkins
mailing list