[PATCH] test-commandserver: use python instead of hg as the executable
Adrian Buehlmann
adrian at cadifra.com
Thu Jun 21 15:56:42 CDT 2012
On 2012-06-21 22:01, Matt Mackall wrote:
> That's very odd. I get weird behavior, but no MemoryError. I suspect
> what's happening is:
>
> - subprocess is doing something dumb with argument lists when shell mode
> is used
> - hg gets launched with no args
> - hg outputs some banner that gets interpreted as protocol
> - some ASCII characters get interpreted as "here comes a huge read"
> - test-commandserver tries to allocate a big buffer
> - MemoryError on small boxes
>
> This works here:
>
> $ hg diff
> diff -r 21e18c608b68 tests/test-commandserver.py
> --- a/tests/test-commandserver.py Thu Jun 14 11:43:48 2012 +0200
> +++ b/tests/test-commandserver.py Thu Jun 21 14:53:42 2012 -0500
> @@ -2,11 +2,12 @@
>
> def connect(path=None):
> cmdline = ['hg', 'serve', '--cmdserver', 'pipe']
> + cmdline = ' '.join(cmdline)
> if path:
> cmdline += ['-R', path]
>
> server = subprocess.Popen(cmdline, stdin=subprocess.PIPE,
> - stdout=subprocess.PIPE)
> + stdout=subprocess.PIPE, shell=True)
>
> return server
>
Awesome. Thanks.
I confirm this mpm patch to be working fine on both Ubuntii mentioned,
and with x86 & x64 mercurial combined with hg.cmd on Win7.
It's also compatible with running the test with the 32-bit exemaker
hg.exe (combined with x86 mercurial only, obviously).
Side note: So it looks like Pierre-Yves is using a superior version of
Python? (one that doesn't exhibit this dumb behavior?)
More information about the Mercurial-devel
mailing list