--- a/hgext/color.py Mon Dec 19 00:16:52 2016 +0530
+++ b/hgext/color.py Mon Dec 19 00:28:12 2016 +0530
@@ -164,8 +164,6 @@
from __future__ import absolute_import
-import os
-
from mercurial.i18n import _
from mercurial import (
cmdutil,
@@ -173,6 +171,7 @@
dispatch,
encoding,
extensions,
+ pycompat,
subrepo,
ui as uimod,
util,
@@ -257,7 +256,7 @@
realmode = mode
if mode == 'auto':
- if os.name == 'nt':
+ if pycompat.osname == 'nt':
term = encoding.environ.get('TERM')
# TERM won't be defined in a vanilla cmd.exe environment.
@@ -583,7 +582,7 @@
ui.write(', '.join(ui.label(e, e) for e in effects.split()))
ui.write('\n')
-if os.name != 'nt':
+if pycompat.osname != 'nt':
w32effects = None
else:
import ctypes