使用svnsync&将SVN同步到Mercurial hg convert-错过了svn:externals吗? [英] Syncing SVN to Mercurial using svnsync & hg convert -- misses svn:externals?

查看:89
本文介绍了使用svnsync&将SVN同步到Mercurial hg convert-错过了svn:externals吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了SVN存储库的Mercurial镜像(使用本教程: http://oreilly.com/opensource/excerpts/opensource-mercurial/migrating-to-mercurial.html ).同步效果很好,但我注意到它没有选择主要SVN存储库中引用的外部存储库...

I've created a Mercurial mirror of an SVN repository (using this tutorial: http://oreilly.com/opensource/excerpts/opensource-mercurial/migrating-to-mercurial.html). The sync works great, except I've noticed it's not picking up an external repository that is referenced in the main SVN repo...

理想情况下,我希望能够将所有内容作为单个回购拉入Mercurial(如果可能,还包含变更集).

I'd ideally like to be able to pull everything as a single repo into Mercurial (along with changesets if possible).

我不确定的是:缺少的外部设备是svnsync的限制还是hg convert的限制?

What I'm not sure of is: is the missing external a limitation of svnsync, or a limitation of hg convert?

有什么办法可以强制将外部设备同步到同一个Mercurial存储库中?

Is there any way I can force the external to be synced as well, into the same Mercurial repo?

我认为一个好的解决方案是重新为外部设置同步过程. 创建当前汞镜镜像的分支,并将外部同步到汞镜分支.

I'm thinking a good solution would be to set up the sync process all over again, for the external. Create a fork of the current hg mirror, and sync the external into the hg mirror fork.

要注意的是,外部主干用于进入第一个镜像的子文件夹,那么如何使用convert复制它呢?我怀疑我能否告诉convert导入子文件夹...

The catch with that is, the external's trunk is intended to go into a subfolder of the first mirror, so how can I replicate that with convert? I doubt I could tell convert to import into a subfolder...

推荐答案

缺少外部是svnsync的限制还是hg convert的限制?

is the missing external a limitation of svnsync or a limitation of hg convert?

svnsync用于创建SVN存储库的镜像.这包括任何 svn:externals 属性.因此,它必须是hg convert的限制.

svnsync is used to create a mirror of a SVN repository. This includes any svn:externals properties. Therefore it must be a limitation of hg convert.

请注意,您实际上并不需要使用svnsync创建镜像.本文之所以建议这样做,是因为拥有本地副本可能会加快转换过程.

Note that you don't really need to create a mirror with svnsync. The article recommends this only because having a local copy might speed up the conversion process.

有什么办法可以强制将外部设备同步到同一个Mercurial存储库中?

Is there any way I can force the external to be synced as well, into the same Mercurial repo?

SVN存储库通常包含多个松散相关的项目,每个项目都有自己的分支和标签.但是Mercurial不能那样工作:分支时,将分支存储库中的所有内容.您应该为SVN中的每个项目创建一个单独的Mercurial存储库,每个存储库都有自己的主干/分支/标签.为什么hg convert会忽略外部对象,即使它们位于同一SVN存储库中也是最可能的原因.

It is common for a SVN repository to contain multiple loosely related projects, each with their own branches and tags. But Mercurial doesn't work that way: when you branch, you branch everything that is in the repository. You should create a separate mercurial repository for each project in SVN that has its own trunk/branches/tags. This different approach is most likely why hg convert ignores externals, even if they are in the same SVN repository.

在水银中等于svn:externals;它称为子存储库".您没有一个或多个svn:externals属性,而是在项目的根目录中只有一个内容相似的.hgsub文件.您应该首先将每个SVN项目转换为单独的Merurial存储库,然后将它们与子存储库连接.有关更多详细信息,请参见 mercurial Wiki页面中的子存储库.

There is an equivalent of svn:externals in mercurial; it's called "subrepositories". Instead of having one or more svn:externals properties, you have a single .hgsub file with similar content in the root of your project. You should first convert each SVN project to a seperate mercurial repository, and then connect them with subrepositories. See the mercurial wiki page for subrepositories for more details.

这篇关于使用svnsync&将SVN同步到Mercurial hg convert-错过了svn:externals吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆