CommandServer library for Scala is available

Martin Geisler mg at aragost.com
Mon Feb 6 13:36:34 UTC 2012


Andrey Somov <py4fun at gmail.com> writes:

> Hi Martin,
> yes, of course I have seen JavaHg. But I do not see this as re-inventing
> the wheel.
>
> 1) Scala API is very short (due to named and default arguments as in
> Python)
>
> 2) Scala makes it possible to use REPL (kind of interactive Python).
> Scala can also be used as a sripting language, which opens the door
> for a lot of applications.
>
> 3) Scala makes it possible to stay very close to the python-hglib API.
> This similarity gives a lot of advantages. For instance the test suite
> has been ported to Scala with minimum efforts. I have discovered and
> reported some places where python-hglib can be improved. Future
> changes in one library can be easily ported to the other.

Reusing the test suite is really nice!

> 4) Those developers who do not want to code Java may comfortably play
> with Scala. It is the very same reason as why to develop a Python
> library if we can have a C library and use it also in Python.

Sure, I've looked at tiny bit at Scala and I also find it much nicer
than Java :)

> I am open to join forces and further improve the support for Mercurial
> under the Java Virtual Machine !

That's cool! We're still expanding the API in JavaHg and it would be
cool if there were some higher-level API designs that could be reused
between the projects.

For example, we're representing the result of a merge command as a
MergeContext which is an object that allows you to manipulate the
indivual files that took part of the merge. This is quite similar to the
mergestate in Mercurial and also similar to how TortoiseHg 2.x runs the
merge without user interaction and then lets the user adjust the results
as needed. High-level concepts like that could be reused in differnet
libraries (if you also like them, of course).

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://www.aragost.com/mercurial/customer-projects/



More information about the Mercurial mailing list