a question about testing hgweb (concerning spawndetached on windows)
simohe at besonet.ch
Fri Feb 7 17:35:23 CST 2014
Am Donnerstag, den 06.02.2014, 14:47 -0600 schrieb Matt Mackall:
> On Mon, 2014-02-03 at 14:09 +0100, Simon Heimberg wrote:
> > Do we test "hgweb writing on output socket" (in the test suite)?
> > If we do, this comment from mercurial.win32.spawndetached is not totally
> > true. It works for me with python 2.6.6 on windows 7 x64, when running
> > under MinGW/MSYS.
> > # Not running the command in shell mode makes Python 2.6 hang when
> > # writing to hgweb output socket.
> > comspec = os.environ.get("COMSPEC", "cmd.exe")
> > args = comspec + " /c " + arg
> > copied from mercurial.win32.spawndetached,
> > see http://selenic.com/repo/hg/file/a959f7167077/mercurial/win32.py#l330
> > This comment originates from 2f7a38f336f4, submitted by Patrick Mezard
> > <pmezard at gmail.com>.
> > see http://selenic.com/repo/hg/rev/2f7a38f336f4/#l3.16
> I'd be wary of changing this sort of thing without a really good reason.
> For our purposes, bugs in Python or operating systems or whatever never
> really go away. There's always going to be someone out there running
> Win98 with Python 2.6.0, and the cost of messing up their day outweighs
> the benefit of tidying up the code.
In this case I will try to fix the other end. Teach win32.spawndetached
to return the pid of hg.exe and not of cmd.exe. (The pid of hg.exe is
necessary to kill "hg serve" later, instead of only killing cmd.exe.)
More information about the Mercurial-devel