diff -r 48463d889d4e -r d724a69309e0 mercurial/util.py --- a/mercurial/util.py Fri Feb 18 03:34:47 2011 +0100 +++ b/mercurial/util.py Fri Feb 18 03:35:01 2011 +0100 @@ -386,6 +386,10 @@ if out is specified, it is assumed to be a file-like object that has a write() method. stdout and stderr will be redirected to out.''' + try: + sys.stdout.flush() + except Exception: + pass def py2shell(val): 'convert python object into string that is useful to shell' if val is None or val is False: