diff --git a/contrib/wix/dist.wxs b/contrib/wix/dist.wxs --- a/contrib/wix/dist.wxs +++ b/contrib/wix/dist.wxs @@ -15,7 +15,7 @@ - + diff --git a/hgext/convert/common.py b/hgext/convert/common.py --- a/hgext/convert/common.py +++ b/hgext/convert/common.py @@ -276,9 +276,9 @@ class commandline(object): pass cmdline = [util.shellquote(arg) for arg in cmdline] if not self.ui.debugflag: - cmdline += ['2>', util.nulldev] + cmdline += ['2>', os.devnull] if closestdin: - cmdline += ['<', util.nulldev] + cmdline += ['<', os.devnull] cmdline = ' '.join(cmdline) return cmdline diff --git a/hgext/convert/gnuarch.py b/hgext/convert/gnuarch.py --- a/hgext/convert/gnuarch.py +++ b/hgext/convert/gnuarch.py @@ -184,7 +184,7 @@ class gnuarch_source(converter_source, c cmdline = [self.execmd, cmd] cmdline += args cmdline = [util.shellquote(arg) for arg in cmdline] - cmdline += ['>', util.nulldev, '2>', util.nulldev] + cmdline += ['>', os.devnull, '2>', os.devnull] cmdline = util.quotecommand(' '.join(cmdline)) self.ui.debug(cmdline, '\n') return os.system(cmdline) diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -515,7 +515,7 @@ def service(opts, parentfn=None, initfn= sys.stdout.flush() sys.stderr.flush() - nullfd = os.open(util.nulldev, os.O_RDWR) + nullfd = os.open(os.devnull, os.O_RDWR) logfilefd = nullfd if logfile: logfilefd = os.open(logfile, os.O_RDWR | os.O_CREAT | os.O_APPEND) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1998,6 +1998,10 @@ def debuginstall(ui): ui.write(_(" (check that your locale is properly set)\n")) problems += 1 + # Python lib + ui.status(_("checking Python lib (%s)...\n") + % os.path.dirname(os.__file__)) + # compiled modules ui.status(_("checking installed modules (%s)...\n") % os.path.dirname(__file__)) diff --git a/mercurial/posix.py b/mercurial/posix.py --- a/mercurial/posix.py +++ b/mercurial/posix.py @@ -10,7 +10,6 @@ import encoding import os, sys, errno, stat, getpass, pwd, grp, tempfile, unicodedata posixfile = open -nulldev = '/dev/null' normpath = os.path.normpath samestat = os.path.samestat oslink = os.link diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -45,7 +45,6 @@ makedir = platform.makedir nlinks = platform.nlinks normpath = platform.normpath normcase = platform.normcase -nulldev = platform.nulldev openhardlinks = platform.openhardlinks oslink = platform.oslink parsepatchoutput = platform.parsepatchoutput diff --git a/mercurial/windows.py b/mercurial/windows.py --- a/mercurial/windows.py +++ b/mercurial/windows.py @@ -24,7 +24,6 @@ termwidth = win32.termwidth testpid = win32.testpid unlink = win32.unlink -nulldev = 'NUL:' umask = 0022 # wrap osutil.posixfile to provide friendlier exceptions @@ -174,7 +173,7 @@ def popen(command, mode='r'): # Work around "popen spawned process may not write to stdout # under windows" # http://bugs.python.org/issue1366 - command += " 2> %s" % nulldev + command += " 2> %s" % os.devnull return os.popen(quotecommand(command), mode) def explainexit(code): diff --git a/tests/test-install.t b/tests/test-install.t --- a/tests/test-install.t +++ b/tests/test-install.t @@ -1,6 +1,7 @@ hg debuginstall $ hg debuginstall checking encoding (ascii)... + checking Python lib (*lib*)... (glob) checking installed modules (*mercurial)... (glob) checking templates (*mercurial?templates)... (glob) checking commit editor... @@ -10,6 +11,7 @@ hg debuginstall hg debuginstall with no username $ HGUSER= hg debuginstall checking encoding (ascii)... + checking Python lib (*lib*)... (glob) checking installed modules (*mercurial)... (glob) checking templates (*mercurial?templates)... (glob) checking commit editor...