TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Is there a defined open protocol for distributed version control?

13 点作者 parvenu74将近 7 年前
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;

2 条评论

noselasd将近 7 年前
&gt; 1. Is there a protocol specification for source control (like OStatus or ActivityPub but for communicating with a source control server)?<p>Yes - each SCM has at least one protocol. Here&#x27;s the spec for subversion, <a href="https:&#x2F;&#x2F;svn.apache.org&#x2F;repos&#x2F;asf&#x2F;subversion&#x2F;trunk&#x2F;subversion&#x2F;libsvn_ra_svn&#x2F;protocol" rel="nofollow">https:&#x2F;&#x2F;svn.apache.org&#x2F;repos&#x2F;asf&#x2F;subversion&#x2F;trunk&#x2F;subversion...</a> , here&#x27;s the spec for Git: <a href="https:&#x2F;&#x2F;github.com&#x2F;git&#x2F;git&#x2F;blob&#x2F;9bfa0f9be3e718f701200a242ea04259a4dc4dfc&#x2F;Documentation&#x2F;technical&#x2F;protocol-v2.txt" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;git&#x2F;git&#x2F;blob&#x2F;9bfa0f9be3e718f701200a242ea0...</a><p>&gt; 2. If not, can we create one with a name like Open Version Control (OVC for short)?<p>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.<p>&gt;3. Can we then agree on what constitutes the necessary data for a commit, push, user info, etc<p>Unlikely. See 2.
评论 #17255502 未加载
cosmojg将近 7 年前
I think you should do it! Have you made any progress as of yet?