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

Pierre-Yves David pierre-yves.david at logilab.fr
Thu Jun 21 02:37:57 CDT 2012


On Thu, Jun 21, 2012 at 02:33:06AM +0200, Adrian Buehlmann wrote:
> On 2012-06-21 00:42, Adrian Buehlmann wrote:
> > On 2012-06-21 00:22, Matt Mackall wrote:
> > diff --git a/tests/test-commandserver.py b/tests/test-commandserver.py
> > --- a/tests/test-commandserver.py
> > +++ b/tests/test-commandserver.py
> > @@ -5,7 +5,7 @@
> >      if path:
> >          cmdline += ['-R', path]
> > 
> > -    server = subprocess.Popen(cmdline, stdin=subprocess.PIPE,
> > +    server = subprocess.Popen(cmdline, shell=True, stdin=subprocess.PIPE,
> >                                stdout=subprocess.PIPE)
> > 
> >      return server
> > 
> > would be an acceptable change, then test-commandserver.py passes here
> > with a file hg.cmd in C:\Users\adi\hgrepos\hg-main containing:
> 
> On Ubuntu Linux, test-commandserver.py crashes here with that patch:
> 
> +Traceback (most recent call last):
> +  File "/home/adi/hgrepos/hg-main/tests/test-commandserver.py", line 242, in <module>
> +    check(hellomessage)
> +  File "/home/adi/hgrepos/hg-main/tests/test-commandserver.py", line 63, in check
> +    return func(server)
> +  File "/home/adi/hgrepos/hg-main/tests/test-commandserver.py", line 72, in hellomessage
> +    ch, data = readchannel(server)
> +  File "/home/adi/hgrepos/hg-main/tests/test-commandserver.py", line 26, in readchannel
> +    return channel, server.stdout.read(length)
> +MemoryError

They are tons of possible cause for a MemoryError, the most common one being
"Firefox is eating your ram with a Ladle".

I do not see why switching to shell=True should be the main suspect for such
error. I just tried on linux (debian squeeze) and it works great.

-- 
Pierre-Yves David

http://www.logilab.fr/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120621/9d340ed7/attachment.pgp>


More information about the Mercurial-devel mailing list