VC hg backend that use mercurial command server.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

VC hg backend that use mercurial command server.

Andrii Kolomoiets
Hello.

I'm finally ready to present you VC hg backend that uses mercurial
command server. It allows to communicate with single mercurial process
over pipe rather than execute hg process for every command.

Also there is a possibility to answer to hg questions interactively.
It's useful during merge when hg is in doubt about right action.

Besides that it has some changes and improvements described in
commentary section of the package.

Hg process can be controlled via pipe (Linux, MacOS) or pty (TRAMP,
Windows).

I think this package can make working with hg repositories more
pleasant :)

I want to contribute to improve built-in hg support.

May I ask which way it can be done better?

I see that all other backends are process based, so can this
single-process backend be acceptable? If so then is it better to replace
hg backend (saving customizable options as much as possible) or provide
two backends which share same options?

Source code is here:
https://github.com/muffinmad/emacs-vc-hgcmd/blob/master/vc-hgcmd.el

Hope you'll find it useful ;)


Andrii

Reply | Threaded
Open this post in threaded view
|

Re: VC hg backend that use mercurial command server.

Dmitry Gutov
Hi Andrii,

On 13.04.2019 23:08, Andrii Kolomoiets wrote:

> I'm finally ready to present you VC hg backend that uses mercurial
> command server. It allows to communicate with single mercurial process
> over pipe rather than execute hg process for every command.
>
> Also there is a possibility to answer to hg questions interactively.
> It's useful during merge when hg is in doubt about right action.
>
> Besides that it has some changes and improvements described in
> commentary section of the package.

Thank you for this proposal.

> Hg process can be controlled via pipe (Linux, MacOS) or pty (TRAMP,
> Windows).
>
> I think this package can make working with hg repositories more
> pleasant :)

I've tried it out briefly, but I hope others on this list who use
Mercurial would share their impressions with us as well.

FWIW, my main brief impression is that it's prettier (which is a good
thing, of course). The benefits of the approach alone didn't overcome
the sluggishness of the monster that is the Mozilla repository (the only
Hg repo I have).

> I want to contribute to improve built-in hg support.
>
> May I ask which way it can be done better?
>
> I see that all other backends are process based, so can this
> single-process backend be acceptable?

I don't think "process based" is a requirement, so on that front we're
good. But speaking of conventions, like other backends, it will need a
list of implemented/unimplemented backend commands in the commentary at
the top.

> If so then is it better to replace
> hg backend (saving customizable options as much as possible) or provide
> two backends which share same options?

Generally speaking, we'd first add it as an option and then see about
removing the older one.

But, again, I wonder what others think.

> Source code is here:
> https://github.com/muffinmad/emacs-vc-hgcmd/blob/master/vc-hgcmd.el
>
> Hope you'll find it useful ;)

Thanks again.