# HG changeset patch # User Pierre-Yves David # Date 1432139385 18000 # Node ID 504ef9c49f4a214910143d31702408e3db9af3c8 # Parent cf90764f40a48a7292c8ad8c83cc969331811362 util: allow to specify buffer size in popen4 We will need unbuffered IO to restore real time output with ssh peer. Changeset ec171737aaf1 seems to indicate playing with this value could be dangerous, but does not indicate why. diff -r cf90764f40a4 -r 504ef9c49f4a mercurial/util.py --- a/mercurial/util.py Mon May 18 23:19:11 2015 -0500 +++ b/mercurial/util.py Wed May 20 11:29:45 2015 -0500 @@ -247,8 +247,8 @@ stdin, stdout, stderr, p = popen4(cmd, env, newlines) return stdin, stdout, stderr -def popen4(cmd, env=None, newlines=False): - p = subprocess.Popen(cmd, shell=True, bufsize=-1, +def popen4(cmd, env=None, newlines=False, bufsize=-1): + p = subprocess.Popen(cmd, shell=True, bufsize=bufsize, close_fds=closefds, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,