[英]Cloning a large svn repository from sourceforge with "git svn clone"
I'm trying to clone a large subversion repository from sourceforge using git svn clone
.我正在尝试使用
git svn clone
从 sourceforge 克隆一个大型 subversion 存储库。 The cloning process periodically gets stuck: SF just stops sending data.克隆过程会定期卡住:SF 只是停止发送数据。 Eventually it times out, but it takes forever .
最终它会超时,但需要永远。 After this, it's a cycle of:
在此之后,它是一个循环:
git svn fetch
git svn fetch
Looking at the git svn
man page, there doesn't appear to be an obvious way to set a timeout for i/o operations.查看
git svn
手册页,似乎没有明显的方法来设置 i/o 操作的超时时间。
Is there any way to make this process more efficient?有什么办法可以让这个过程更有效率吗?
Let's me give you some advice on speeding things up.让我给你一些关于加快速度的建议。 I just finished running them myself so I'm sure they work.
我刚刚自己完成了它们的运行,所以我确定它们可以工作。 The main trick is to copy Subversion repository to the local filesystem and then run
git svn
.主要技巧是将 Subversion 存储库复制到本地文件系统,然后运行
git svn
。
First, SourceForge allows to backup repositories using rsync
(see the last command at the very bottom).首先, SourceForge 允许使用
rsync
备份存储库(请参阅最底部的最后一个命令)。 So start with所以开始
rsync -ahPv svn.code.sf.net::p/vice-emu/code vice-emu.svn
In a general case where rsync
access is not available you can use svnrdump
to dump the repository:在
rsync
访问不可用的一般情况下,您可以使用svnrdump
转储存储库:
svnrdump dump --non-interactive https://svn.code.sf.net/p/vice-emu/code > vice-emu.svndump
and then load the dump into a local repository:然后将转储加载到本地存储库中:
svnadmin create vice-emu.svn
svnadmin load vice-emu.svn < vice-emu.svndump
Either way you can use git svn
on the local repository:无论哪种方式,您都可以在本地存储库上使用
git svn
:
git svn clone file://`pwd`/vice-emu.svn vice-emu
And finally yet another trick: offload the import to Github .最后还有一个技巧: 将导入卸载到 Github 。
My results are: https://github.com/phdru/vice-emu-ghi (Github Importer) and https://github.com/phdru/vice-emu-gitsvn ( rsync
+ git svn
+ postprocessing).我的结果是: https://github.com/phdru/vice-emu-ghi (Github的进口商)和https://github.com/phdru/vice-emu-gitsvn (
rsync
+ git svn
+后处理)。
PS.附注。 If you gonna fork one or both of my results please ping me afterward and I'll remove my temporary repositories.
如果你要分叉我的一个或两个结果,请在之后 ping 我,我将删除我的临时存储库。 Else I'll remove then soon.
否则我很快就会删除。
You can resume the process at the revision that you saw that it was able to pull fine (or say, 100 revisions before that) with -r您可以使用 -r 在您看到它能够很好地拉取(或者说之前的 100 个修订版)的修订版上恢复该过程
git svn fetch -r some-revision:HEAD
That way you don't restart from scratch.这样你就不会从头开始。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.