[PATCH] test-commandserver: use python instead of hg as the executable

Adrian Buehlmann adrian at cadifra.com
Thu Jun 21 17:21:16 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
>  

Matt, are you going to queue this change? Or is there something left I
can do?

(thanks again for finding this)


More information about the Mercurial-devel mailing list