mercurial/util.py
changeset 9085 4858f2cacb4d
parent 9029 0001e49f1c11
parent 9084 9f191931c859
child 9090 6cf043b1aa14
--- a/mercurial/util.py	Wed Jul 08 17:14:24 2009 +0200
+++ b/mercurial/util.py	Wed Jul 08 17:03:50 2009 -0700
@@ -38,12 +38,14 @@
 
 import subprocess
 closefds = os.name == 'posix'
-def popen2(cmd):
-    p = subprocess.Popen(cmd, shell=True, close_fds=closefds,
+def popen2(cmd, bufsize=-1):
+    p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
+                         close_fds=closefds,
                          stdin=subprocess.PIPE, stdout=subprocess.PIPE)
     return p.stdin, p.stdout
-def popen3(cmd):
-    p = subprocess.Popen(cmd, shell=True, close_fds=closefds,
+def popen3(cmd, bufsize=-1):
+    p = subprocess.Popen(cmd, shell=True, bufsize=bufsize,
+                         close_fds=closefds,
                          stdin=subprocess.PIPE, stdout=subprocess.PIPE,
                          stderr=subprocess.PIPE)
     return p.stdin, p.stdout, p.stderr