mercurial/hook.py
changeset 36841 9c636ec1ef37
parent 36108 c4146cf4dd20
child 37119 d4a2e0d5d042
equal deleted inserted replaced
36840:ef68493d652b 36841:9c636ec1ef37
   263             else:
   263             else:
   264                 r = _exthook(ui, repo, htype, hname, cmd, args, throw)
   264                 r = _exthook(ui, repo, htype, hname, cmd, args, throw)
   265                 raised = False
   265                 raised = False
   266 
   266 
   267             res[hname] = r, raised
   267             res[hname] = r, raised
   268 
       
   269             # The stderr is fully buffered on Windows when connected to a pipe.
       
   270             # A forcible flush is required to make small stderr data in the
       
   271             # remote side available to the client immediately.
       
   272             util.stderr.flush()
       
   273     finally:
   268     finally:
       
   269         # The stderr is fully buffered on Windows when connected to a pipe.
       
   270         # A forcible flush is required to make small stderr data in the
       
   271         # remote side available to the client immediately.
       
   272         util.stderr.flush()
       
   273 
   274         if _redirect and oldstdout >= 0:
   274         if _redirect and oldstdout >= 0:
   275             util.stdout.flush()  # write hook output to stderr fd
   275             util.stdout.flush()  # write hook output to stderr fd
   276             os.dup2(oldstdout, stdoutno)
   276             os.dup2(oldstdout, stdoutno)
   277             os.close(oldstdout)
   277             os.close(oldstdout)
   278 
   278