Subversion or Mercurial SPI – What API shall a server implement?

I’m trying to evaluate a product idea that (besides the main, non-disclosed functionality) would provide a “revision control”-style secondary view of the content/changes. I expect many users, and I wouldn’t create real repositories, I would like to store my internal data as I see fit – I would like to just emulate the Subversion or the Mercurial server.

I’ve quickly search for APIs, and although Subversion and Mercurial is rich on client API documentation, I couldn’t find decent server-side API/SPI docs/specification.

I’m going to use Java, but any format in any language could be helpful to decide on the complexity and required effort. Git might be an option, but I have no experience with it.

Update #1: I am not seeking popularity of a given tool. I need the binary/REST/whatever protocol description of the given type of server that need to be implemented to “be” that kind of server.

  • For a shared git repo served over SSH and HTTPS, how to control access for both protocols?
  • How to deploy git-versioned web apps through WebDAV?
  • What is the cause of “svn: E195019: Redirect cycle detected for URL”?
  • Git push over webdav hangs
  • Git fails to clone repo from ownCloud's webdav interface
  • What are the drawbacks to hosting a git repository with WebDAV instead of SSH?
  • git http push via WebDAV - what if my username has an “@” in it?
  • Using WebDav with Git - good or bad idea?
  • 3 Solutions collect form web for “Subversion or Mercurial SPI – What API shall a server implement?”

    Perhaps this could help, it is the server side implementation of svn written in java.

    If git is an option you should have a look at the jgit-http-server:

    Subversion’s webdav and autoversioning support might be the closest one what you are seeking, although I wouldn’t bet on that it will be easy 🙂

    You can find some information about Mercurial “API” in the following links :

    1. https://www.mercurial-scm.org/wiki/WireProtocol
    2. https://www.mercurial-scm.org/wiki/HttpCommandProtocol
    3. https://www.mercurial-scm.org/wiki/SshCommandProtocol

    The CategoryInternals page is also maybe worth reading.

    If you want more information, I’m afraid you will have to read the code.

    Git Baby is a git and github fan, let's start git clone.