Can't Redirect Mercurial stdout/stderr Under Windows 2012 R2 Noninteractive Session

Yuya Nishihara yuya at tcha.org
Wed Sep 24 11:04:17 UTC 2014


On Tue, 23 Sep 2014 21:53:09 +0000, Jensen, Aaron wrote:
> > I would also suggest that this might be the sort of job that would be 
> > better written as a (wx)python script - using hglib or the command 
> > server in python you can control mercurial quite thoroughly and if 
> > you use wxPython you can even have a GUI to show the progress, 
> > number of errors, etc.

> I'm not sure if the command server will work. I'll play around with it.

It can at least help to avoid deadlock of stdout and stderr.

> How does it handle situations where Mercurial is asking/prompting for
> a question?

You'll need to handle 'L'-channel request.  The last 'o'-channel line can
be assumed as a prompt message.

http://mercurial.selenic.com/wiki/CommandServer#Channels

See also test-commandserver.py, which has minimal client implementation.

http://selenic.com/repo/hg/file/e6e7ef68c879/tests/test-commandserver.py

Regards,



More information about the Mercurial mailing list