1

Is there a mercurial server written purely in Java?

I found libraries (Hg4J, JavaHg) but these libraries use the Python hg command. I'm searching for a library that provide functions like org.eclipse.jgit (example: org.eclipse.jgit.http.server.GitServlet and org.eclipse.jgit.transport.ReceivePack).

1 Answer 1

1

The Hg4J project is a pure Java re-implementation of Mercurial — it does not require any other Mercurial installation. However, it's still a young project and the version 0.1.0 release only supports read-only operations.

You're correct that JavaHg requires a Mercurial installation. I'm one of the authors and we wrote it like that since it's the officially recommended way to interact with a Mercurial repository from another language. We get all the benefits of new Mercurial versions for free and we have a full read/write API.

I agree that a pure Java version is interesting and I wish the Hg4J project good luck. But I also hope it isn't too difficult to install Mercurial to use JavaHg.

Sign up to request clarification or add additional context in comments.

2 Comments

Yep, you're right. The hg4j project is a pure Java re-implementation, but many of features not implement yet.
hmm, if I want save all mercurial repository objects in DB(like jgit-mongodb), I must be write python code(gasp).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.