comparison mercurial/util.py @ 8299:edd676eae7d7

util: kill unused Popen3
author Matt Mackall <mpm@selenic.com>
date Mon, 04 May 2009 14:22:33 -0500
parents 7f27e69dd27f
children d2ad8c066676
comparison
equal deleted inserted replaced
8298:9542f4c3fa1b 8299:edd676eae7d7
46 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, 46 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
47 close_fds=closefds, 47 close_fds=closefds,
48 stdin=subprocess.PIPE, stdout=subprocess.PIPE, 48 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
49 stderr=subprocess.PIPE) 49 stderr=subprocess.PIPE)
50 return p.stdin, p.stdout, p.stderr 50 return p.stdin, p.stdout, p.stderr
51 def Popen3(cmd, capturestderr=False, bufsize=-1):
52 stderr = capturestderr and subprocess.PIPE or None
53 p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
54 close_fds=closefds,
55 stdin=subprocess.PIPE, stdout=subprocess.PIPE,
56 stderr=stderr)
57 p.fromchild = p.stdout
58 p.tochild = p.stdin
59 p.childerr = p.stderr
60 return p
61 51
62 def version(): 52 def version():
63 """Return version information if available.""" 53 """Return version information if available."""
64 try: 54 try:
65 import __version__ 55 import __version__