Show More
@@ -276,9 +276,9 b' class commandline(object):' | |||||
276 | pass |
|
276 | pass | |
277 | cmdline = [util.shellquote(arg) for arg in cmdline] |
|
277 | cmdline = [util.shellquote(arg) for arg in cmdline] | |
278 | if not self.ui.debugflag: |
|
278 | if not self.ui.debugflag: | |
279 |
cmdline += ['2>', |
|
279 | cmdline += ['2>', os.devnull] | |
280 | if closestdin: |
|
280 | if closestdin: | |
281 |
cmdline += ['<', |
|
281 | cmdline += ['<', os.devnull] | |
282 | cmdline = ' '.join(cmdline) |
|
282 | cmdline = ' '.join(cmdline) | |
283 | return cmdline |
|
283 | return cmdline | |
284 |
|
284 |
@@ -184,7 +184,7 b' class gnuarch_source(converter_source, c' | |||||
184 | cmdline = [self.execmd, cmd] |
|
184 | cmdline = [self.execmd, cmd] | |
185 | cmdline += args |
|
185 | cmdline += args | |
186 | cmdline = [util.shellquote(arg) for arg in cmdline] |
|
186 | cmdline = [util.shellquote(arg) for arg in cmdline] | |
187 |
cmdline += ['>', |
|
187 | cmdline += ['>', os.devnull, '2>', os.devnull] | |
188 | cmdline = util.quotecommand(' '.join(cmdline)) |
|
188 | cmdline = util.quotecommand(' '.join(cmdline)) | |
189 | self.ui.debug(cmdline, '\n') |
|
189 | self.ui.debug(cmdline, '\n') | |
190 | return os.system(cmdline) |
|
190 | return os.system(cmdline) |
@@ -515,7 +515,7 b' def service(opts, parentfn=None, initfn=' | |||||
515 | sys.stdout.flush() |
|
515 | sys.stdout.flush() | |
516 | sys.stderr.flush() |
|
516 | sys.stderr.flush() | |
517 |
|
517 | |||
518 |
nullfd = os.open( |
|
518 | nullfd = os.open(os.devnull, os.O_RDWR) | |
519 | logfilefd = nullfd |
|
519 | logfilefd = nullfd | |
520 | if logfile: |
|
520 | if logfile: | |
521 | logfilefd = os.open(logfile, os.O_RDWR | os.O_CREAT | os.O_APPEND) |
|
521 | logfilefd = os.open(logfile, os.O_RDWR | os.O_CREAT | os.O_APPEND) |
@@ -10,7 +10,6 b' import encoding' | |||||
10 | import os, sys, errno, stat, getpass, pwd, grp, tempfile, unicodedata |
|
10 | import os, sys, errno, stat, getpass, pwd, grp, tempfile, unicodedata | |
11 |
|
11 | |||
12 | posixfile = open |
|
12 | posixfile = open | |
13 | nulldev = '/dev/null' |
|
|||
14 | normpath = os.path.normpath |
|
13 | normpath = os.path.normpath | |
15 | samestat = os.path.samestat |
|
14 | samestat = os.path.samestat | |
16 | oslink = os.link |
|
15 | oslink = os.link |
@@ -45,7 +45,6 b' makedir = platform.makedir' | |||||
45 | nlinks = platform.nlinks |
|
45 | nlinks = platform.nlinks | |
46 | normpath = platform.normpath |
|
46 | normpath = platform.normpath | |
47 | normcase = platform.normcase |
|
47 | normcase = platform.normcase | |
48 | nulldev = platform.nulldev |
|
|||
49 | openhardlinks = platform.openhardlinks |
|
48 | openhardlinks = platform.openhardlinks | |
50 | oslink = platform.oslink |
|
49 | oslink = platform.oslink | |
51 | parsepatchoutput = platform.parsepatchoutput |
|
50 | parsepatchoutput = platform.parsepatchoutput |
@@ -24,7 +24,6 b' termwidth = win32.termwidth' | |||||
24 | testpid = win32.testpid |
|
24 | testpid = win32.testpid | |
25 | unlink = win32.unlink |
|
25 | unlink = win32.unlink | |
26 |
|
26 | |||
27 | nulldev = 'NUL:' |
|
|||
28 | umask = 0022 |
|
27 | umask = 0022 | |
29 |
|
28 | |||
30 | # wrap osutil.posixfile to provide friendlier exceptions |
|
29 | # wrap osutil.posixfile to provide friendlier exceptions | |
@@ -174,7 +173,7 b" def popen(command, mode='r'):" | |||||
174 | # Work around "popen spawned process may not write to stdout |
|
173 | # Work around "popen spawned process may not write to stdout | |
175 | # under windows" |
|
174 | # under windows" | |
176 | # http://bugs.python.org/issue1366 |
|
175 | # http://bugs.python.org/issue1366 | |
177 |
command += " 2> %s" % null |
|
176 | command += " 2> %s" % os.devnull | |
178 | return os.popen(quotecommand(command), mode) |
|
177 | return os.popen(quotecommand(command), mode) | |
179 |
|
178 | |||
180 | def explainexit(code): |
|
179 | def explainexit(code): |
General Comments 0
You need to be logged in to leave comments.
Login now