[PATCH] Issue937: error messages from hooks not sent over HTTP

Jesse Glick jesse.glick at sun.com
Mon Feb 25 08:55:39 CST 2008


Dirkjan Ochtman wrote:
> Nitpicking: maybe you could do it more like this?
> 
> oldio = sys.stdout, sys.stderr
> sys.stdout = sys.stderr = cstringIO.StringIO()

Sure, it seems to work, will resubmit accordingly.

> maybe we need some provisions for exceptions throwing their output in
> there where the client cannot necessarily deal with it first. I think
> there are some bug reports to that effect in the bts (see issue996
> for discussion).

I'm not sure how this is related. By the point in the code affected by 
the patch, the server has already sent the HTTP request header. The 
patch simply ensures that the body of the response, after the integer 
code, contains stderr as well as stdout from whatever was run in the 
meantime by the server.



More information about the Mercurial-devel mailing list