mercurial/hook.py
changeset 30364 ad56204f733e
parent 30363 a1259e502bdf
child 30365 5564fcd031df
--- a/mercurial/hook.py	Thu Oct 20 22:39:59 2016 +0900
+++ b/mercurial/hook.py	Tue Nov 08 22:22:22 2016 +0900
@@ -258,6 +258,7 @@
             sys.stderr.flush()
     finally:
         if _redirect and oldstdout >= 0:
+            sys.__stdout__.flush()  # write hook output to stderr fd
             os.dup2(oldstdout, stdoutno)
             os.close(oldstdout)