
Is there a defined open protocol for distributed version control? - parvenu74
In the wake of Microsoft&#x27;s acquisition of GitHub I briefly entertained the thought of writing my own GitHub replacement, at which point I realized for the first time that the concept of a Pull Request is a GitHub thing, not a Git thing.  Also at the same time we&#x27;re having a discussion at work about migrating from TFS to Git.  And I&#x27;ve always liked Mercurial best for my own development...  Which leads me to ask:<p>1. Is there a protocol specification for source control (like OStatus or ActivityPub but for communicating with a source control server)?<p>2. If not, can we create one with a name like Open Version Control (OVC for short)?<p>3. Can we then agree on what constitutes the necessary data for a commit, push, user info, etc (so we can make Linus happy[1]) so plugins&#x2F;extension can be made for Git, Mercurial, TFS, VSTS, SVN, etc such that I can use Mercurial for my local workflow and then use a command like `hg ovc push GitLab&#x2F;FeatureFoo` and my local Mercurial repo pushes the state of my branch to the FeatureFoo branch on the GitLab remote I&#x27;ve defined (and the fact that GitLab is running Git and not Hg would be irrelevant).<p>At that point I couldn&#x27;t care less how the hosting provider works internally; it also means an OVC-compliant host could give you the repo in any supported format you could want for local use (Hg for me; Git for Linux; VSS for Steve Ballmer, etc).<p>Would this be a useful development or would work on such a project be a waste of time?<p>[1] https:&#x2F;&#x2F;www.wired.com&#x2F;2012&#x2F;05&#x2F;torvalds-github&#x2F;
======
noselasd
> 1\. Is there a protocol specification for source control (like OStatus or
> ActivityPub but for communicating with a source control server)?

Yes - each SCM has at least one protocol. Here's the spec for subversion,
[https://svn.apache.org/repos/asf/subversion/trunk/subversion...](https://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_ra_svn/protocol)
, here's the spec for Git:
[https://github.com/git/git/blob/9bfa0f9be3e718f701200a242ea0...](https://github.com/git/git/blob/9bfa0f9be3e718f701200a242ea04259a4dc4dfc/Documentation/technical/protocol-v2.txt)

> 2\. If not, can we create one with a name like Open Version Control (OVC for
> short)?

Unlikely. Each SCM operates in their own way that might be completely at odds
with how another SCM works. Also the union of people that have the ability to
do it and the incentive to do it is pretty much zero.

>3\. Can we then agree on what constitutes the necessary data for a commit,
push, user info, etc

Unlikely. See 2.

~~~
parvenu74
Perhaps the nomenclature of "protocol specification" is ambiguous as it seems
you're referring to wire protocols. I was thinking more along the idea of
defining contracts for "What are the required data attributes for a merge?" or
"What are the required attributes -- both in terms of defining the changeset
and the user info for the user proposing the PR -- for a pull request?" The
reference to "Making Linus happy" is from an interview where he explained that
he won't take kernel PRs via GitHub because the user info metadata is
different. I don't see why this cannot all be standardized and the various
communities can write contract-compliant servers and clients for an agreed-
upon distributed version control system.

------
cosmojg
I think you should do it! Have you made any progress as of yet?

