##// END OF EJS Templates
openvms: make process spawning works on OpenVMS...
Jean-Francois Pieronne -
r51890:def6f1a4 default
parent child Browse files
Show More
@@ -181,7 +181,7 b' if pycompat.iswindows:'
181 # Work around Windows bugs.
181 # Work around Windows bugs.
182 stdout = platform.winstdout(stdout) # pytype: disable=module-attr
182 stdout = platform.winstdout(stdout) # pytype: disable=module-attr
183 stderr = platform.winstdout(stderr) # pytype: disable=module-attr
183 stderr = platform.winstdout(stderr) # pytype: disable=module-attr
184 if isatty(stdout):
184 if isatty(stdout) and pycompat.sysplatform != b'OpenVMS':
185 # The standard library doesn't offer line-buffered binary streams.
185 # The standard library doesn't offer line-buffered binary streams.
186 stdout = make_line_buffered(stdout)
186 stdout = make_line_buffered(stdout)
187
187
@@ -208,7 +208,7 b' try:'
208 except AttributeError:
208 except AttributeError:
209 pass
209 pass
210
210
211 closefds = pycompat.isposix
211 closefds = pycompat.isposix and pycompat.sysplatform != b'OpenVMS'
212
212
213
213
214 def explainexit(code):
214 def explainexit(code):
@@ -338,8 +338,6 b' def tempfilter(s, cmd):'
338 cmd = cmd.replace(b'INFILE', inname)
338 cmd = cmd.replace(b'INFILE', inname)
339 cmd = cmd.replace(b'OUTFILE', outname)
339 cmd = cmd.replace(b'OUTFILE', outname)
340 code = system(cmd)
340 code = system(cmd)
341 if pycompat.sysplatform == b'OpenVMS' and code & 1:
342 code = 0
343 if code:
341 if code:
344 raise error.Abort(
342 raise error.Abort(
345 _(b"command '%s' failed: %s") % (cmd, explainexit(code))
343 _(b"command '%s' failed: %s") % (cmd, explainexit(code))
@@ -383,8 +381,10 b' def hgexecutable():'
383 Defaults to $HG or 'hg' in the search path.
381 Defaults to $HG or 'hg' in the search path.
384 """
382 """
385 if _hgexecutable is None:
383 if _hgexecutable is None:
386 hg = encoding.environ.get(b'HG')
384 hg = encoding.environ.get(b'HG', '')
387 mainmod = sys.modules['__main__']
385 mainmod = sys.modules['__main__']
386 if pycompat.sysplatform == b'OpenVMS' and hg[0:1] == '$':
387 hg = 'mcr ' + hg[1:]
388 if hg:
388 if hg:
389 _sethgexecutable(hg)
389 _sethgexecutable(hg)
390 elif resourceutil.mainfrozen():
390 elif resourceutil.mainfrozen():
@@ -533,8 +533,6 b' def system(cmd, environ=None, cwd=None, '
533 out.write(line)
533 out.write(line)
534 proc.wait()
534 proc.wait()
535 rc = proc.returncode
535 rc = proc.returncode
536 if pycompat.sysplatform == b'OpenVMS' and rc & 1:
537 rc = 0
538 return rc
536 return rc
539
537
540
538
General Comments 0
You need to be logged in to leave comments. Login now