多个源代码存储库
我使用 Mercurial 对源代码进行版本控制。但有些人更喜欢其他版本控制系统(如 git、Bazaar、SVN、CVS)。
我想知道,是否可以同时将一个存储库存储在多个系统下,以便人们可以使用他们想要的任何存储库?
I use Mercurial for version controlling my source code. But some people prefer other version control systems (like git, Bazaar, SVN, CVS).
I would like to know, is it possible to store a repository under multiple systems at once, so people can use whichever repository they want?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
GitHub 为 Mercurial 开发了 hg-git 扩展。此扩展允许您使用 Mercurial 从 git 存储库克隆,然后推回。因此,如果您不介意拥有一个中央 git 存储库,那么肯定可以使用 git 和 Mercurial 来访问它。
尽管正如另一个答案所指出的那样,您提到的大多数 VCS 工具在使用上都非常相似,所以与学习 VCS 所涉及的最小努力相比,是否值得付出努力让人们使用他们想要的任何东西是值得怀疑的。新系统。
GitHub developed the hg-git extension for Mercurial. This extension allows you to clone from git repositories using Mercurial, and then push back in. So if you didn't mind having a central git repository, then it would certainly be possible to access it using both git and mercurial.
Though as another answer has pointed out most of the VCS tools you mentioned are fairly similar to use, so it's questionable whether it would be worth putting in the effort to allow people to use whatever they want, compared to the minimal effort involved in learning a new system.
我认为答案是否定的,因为存储库具有与应用程序链接的特定格式。
如果客户端应用程序与您的工作流程兼容,最好授权其他开发人员使用适合他们需求的客户端应用程序。
示例:您有一个现有的 SVN 存储库和另一个 Git 存储库。
作为一名开发人员,我只想使用 BZR。我可以使用 bzr-svn 或 bzr-git 插件从 SVN 或 Git 分支,使用 BZR 进行本地提交(并受益于 BZR 功能),然后将结果推回 到 SVN 或 Git。
I think the answer is no, as a repository has a specific format linked to the application.
The best thing to do it to authorized other developer to use the client application that fit their needs, if it is compatible with your work process.
Example : You have an existing SVN repo and another Git repo.
As a developer, I would like to use only BZR. I can use the bzr-svn or bzr-git plugin to branch from SVN or Git, commit locally with BZR (and benefits from BZR features), and then push the result back to SVN or Git.
我不了解 Mercurial,但使用 AccuRev 可以在 AccuRev 和 Git 中维护源代码。 Kando 插件负责从 AccuRev 到 Git 的复制,反之亦然。有关更多详细信息,请参阅 http://www.accurev.com/kando
I don't know about Mercurial but with AccuRev it is possible to maintain your source code in AccuRev and Git. The plugin Kando takes care of replication from AccuRev to Git and vice-versa. For more details have look at http://www.accurev.com/kando
这并不容易 - 您必须通过大量的挂钩和事件脚本使每个脚本与另一个脚本保持同步。例如,可以从 subversion 签出,在该文件夹中执行
hg init
,并暂时使用 Mercurial 工作,然后在您满意时最终提交回 subversion(确保您不这样做) t 添加并提交.hg
文件)。另外,根据开发人员的数量,如果两个开发人员在不同的版本控制系统下提交同一个文件,您可能会遇到各种合并冲突问题。由于 Subversion(和 CVS)是集中式版本控制系统,而 git、bazaar 和 Mercurial 都是分布式的,因此保持它们同步需要为每个系统选择一个主副本。
您提到的 VCS 工具在命令行上都非常相似(尽管 CVS 确实不应该再使用),因此其他用户的学习曲线并不是特别陡峭。
Not easily - you would have to keep each one in sync with the other, via a multitude of hook and event scripts. It is possible, for example, to checkout from subversion, do an
hg init
in that folder, and temporarily work using mercurial, and then eventually commit back to subversion when you're happy (ensuring you don't add and commit and.hg
files). Also depending on the number of developers you could get into all sorts of problems with conflicts from merges if two developers commit to the same file under different version control systems.Since Subversion (and CVS) are centralised version control systems, and git, bazaar, and mercurial are all distributed, keeping them in sync would require choosing a master copy for each one.
The VCS tools you mention are all fairly similar on the command line (though CVS really shouldn't be used any more), so the learning curve for other users isn't particularly steep.
取决于转换工具是否易于选择和使用
例如
git:
git-svn 得到官方支持,它内置于 Windows 版本中,并且可以通过 deb 软件包轻松安装在 debian/ubuntu 中
:hg:
https://www.mercurial-scm.org/wiki/WorkingWithSubversion
https://www.mercurial-scm.org/wiki/RepositoryConversion#Subversion
有多种类型的转换器可供选择,其中许多需要一些设置
bzr:
bzr-svn Windows版本内置,官方支持
详细信息请参见:http://wiki.bazaar.canonical.com/ForeignBranches/Subversion
It depends whether the conversion tools is easy to choose and use
e.g.
git:
git-svn is officially supported, it is build-in in Windows version and easy to install in debian/ubuntu with deb packages
hg:
https://www.mercurial-scm.org/wiki/WorkingWithSubversion
https://www.mercurial-scm.org/wiki/RepositoryConversion#Subversion
with many types of converters to choose from, and many of them requires some setup
bzr:
bzr-svn is built-in in Windows version and it is officially supported
details here: http://wiki.bazaar.canonical.com/ForeignBranches/Subversion