future of HgKit

marco gaddoni marco.gaddoni at gmail.com
Mon Oct 5 01:55:34 CDT 2009


On Sun, Oct 4, 2009 at 23:09, Andrey Somov <py4fun at gmail.com> wrote:
> Andrei Loskutov wrote:
>> I think this would be the best option ever.
>> Make sure Jython can run "native" hg python code with no issues and
>> provide a Java API on top of that.
>> Then start a "deamon" Jython/hg thread in the same VM as Eclipse and use
>> plain Java API to access hg data.
>> No erroneous hg status caches, no parsing of specific output/error
>> messages from the command line, a "native" Java Changeset class... Sounds
>> like a dream ;-)
>>
> I am sorry I do not like to be a dream-breaker...
>
> - it is unclear whether Jython will ever be able to run Mercurial

well, it not too far from running.
i did play with it for some time, and found a
couple of bugs in jython.
fixing that and changing mercurial to not use
buffer() [literally a ~10 lines patch] got me
to commit, push, pull, checkout & co.

jython still misses a bz2 module to work
with bundles

> - Jython runs at least a few times slower the CPython
> - currently Mercurial is heavily using C modules to improve performance,
> since Jython has to stick to pure Python modules the performance
> degradation will be even worse

hm.. jython in jitted and has diferent libraries.
moreover, i think that most of the operiations
are disk limited, not cpu.

> - talking to a socket will allow to overcome the license restriction but
>  anyway developers have to install Jython with Mercurial (Eclipse
> cannot include it as CVS or EGit)
>
> I think using CPython through a socket may already improve the
> situation. Anyway this is the first (and the only) step we can do.
>

i dont understand what the socket interface change
from the direct hg invocation.
it does get away with the startup, but hg is
really pretty fast already.
it does offer a more parse friendly output?
that maybe can be got with more templates?

-- 
"Reality continues to ruin my life." - Calvin.



More information about the Mercurial mailing list