[ANN] a thin wrapper for Mercurial command server
Idan Kamara
idankk86 at gmail.com
Mon Dec 19 17:09:35 UTC 2011
On Mon, Dec 19, 2011 at 6:33 PM, Yuya Nishihara <yuya at tcha.org> wrote:
>
> Idan Kamara wrote:
> > > It spawns monky-patched command server as a background daemon, and
> > > communicate with it via unix domain socket. Thanks to the running
> >
> > I haven't gone over everything yet but I think some of
> > those changes have a place in core, or at least a discussion on
> > how to eliminate the monkey patching.
>
> Thanks for the response.
> Maybe we can, as a start, consider how to extend the mode of the command
> server. Currently I instantiates it with mode='pipe' and overwrites
> every channel.
Sounds good, start by adding support for unix sockets in commandserver.py.
Deal with all the other hacks later.
>
> > On Mon, Dec 19, 2011 at 12:13 PM, Martin Geisler <mg at lazybytes.net> wrote:
> > > > I made a little C program which acts like a 'hg' command by
> > > > communicating with Mercurial command server.
> > >
> > > That's really cool! Can it run the normal Mercurial test suite?
> >
> > I used to run the test suite using a little Python wrapper that used
> > the cmdserver, but there were some issues with a few tests (such
> > as loading extensions on the fly, setting environment variables etc.).
>
> and 'chg serve' won't terminate the server...
>
> > But taking test-mq.t (which is a pretty heavy test) and running it
> > through chg takes half the time:
> >
> > $ CHG= time ./run-tests.py -l test-mq.t
> > .
> > # Ran 1 tests, 0 skipped, 0 failed.
> >
> > real 0m9.180s
> > user 0m1.828s
> > sys 0m0.720s
> >
> > $ time ./run-tests.py -l test-mq.t
> > .
> > # Ran 1 tests, 0 skipped, 0 failed.
> >
> > real 0m20.033s
> > user 0m15.069s
> > sys 0m3.900s
> >
> > That's pretty nice ;)
>
> Wow, thanks. I'm yet tried test-mq.t.
> BTW, doesn't it create and leave bunch of background processes?
>
> % ps aux | grep 'hg serve' | wc -l
> 22
>
> Maybe I need to shutdown them automatically in order to run whole test
> suites.
The test suite already kills all processes in $DAEMONPIDS at the
end of every test. I did something similar with the cmdserver processes.
>
> Regards,
> Yuya
More information about the Mercurial
mailing list