Is it possible to switch repository in Mercurial Command Server protocol?

50 Views Asked by At

I'm batch processing lots of Mercurial repositories and I want to save CPU time by avoiding fork.

I can use internal Mercurial API: https://www.mercurial-scm.org/wiki/MercurialApi to create objects operating on several repositories simultaneously in a single Python process address space. But this method is discouraged by Hg maintainers: they consider Python Hg API unstable...

https://www.mercurial-scm.org/wiki/CommandServer is a recommended approach but it requires starting a server per repository: hg --config ui.interactive=True serve --cmdserver pipe. Meaning lots of forks that I wanted to avoid...

Is there a way to utilize a single hg serve --cmdserver pipe and switch repositories? What is the control command name for switching, what is the signature/args?

0

There are 0 best solutions below