diff -r c0a6c19690ff -r 75979c8d4572 mercurial/color.py --- a/mercurial/color.py Thu Oct 12 19:20:04 2017 -0700 +++ b/mercurial/color.py Thu Oct 12 23:30:46 2017 -0700 @@ -210,7 +210,7 @@ mode = ui.config('color', 'pagermode', mode) realmode = mode - if pycompat.osname == 'nt': + if pycompat.iswindows: from . import win32 term = encoding.environ.get('TERM') @@ -379,7 +379,7 @@ return msg w32effects = None -if pycompat.osname == 'nt': +if pycompat.iswindows: import ctypes _kernel32 = ctypes.windll.kernel32