恢复git-svn克隆 [英] Resuming git-svn clone
问题描述
我使用git-svn的克隆操作开始克隆SVN存储库。大约6个小时的进口(这是一个大回购)后,我的电脑去睡了。有没有一种方法可以在不重做所有初始工作的情况下恢复操作? git svn clone
由几个来源确认:
< (顺便说一下,如果在最初的克隆步骤中,连接失败或者需要停止连接,那么恢复克隆就只需运行上面的命令恢复下载历史记录)。
-
lockquote
$ b
在 -
git-svn
教程 通过克隆现有的Subversion存储库,您可以使用
git-svn
中似乎有内存泄漏。 git-svn
进程的大小增长缓慢,大约两周后,它的容量为1.2 GB,此时操作系统拒绝让它分叉。事情是,这是一个伪装的祝福。
我可以通过一个简单的
git svn fetch
>恢复被中断的克隆 ,而且现在它的运行速度要快得多,而且现在已经变得更小了。事实上,我工作得很好,因此我养成了每天晚上和每天早上中断和重新启动进程的习惯。几天后,它完成了。
git-svn
开始您的冒险活动。 :
git svn克隆网址://路径/ to / repo -s
-s
标志假定您的存储库使用主干,分支,标记约定。如果没有,你必须手动指定哪些目录代表分支和标签,如果你想Git知道它们的话。
这将需要很长时间,因为它会获取来自SVN的每一个修订版都在本地提交。如果因任何原因停止,您可以继续
git svn fetch
。
I started cloning an SVN repository using the git-svn's clone operation. After about 6 hours of importing (it's a big repo), my computer went and slept on me. Is there a way to resume the operation without redoing all of the initial work?
The git svn fetch
command to resume a git svn clone
is confirmed by several sources:
- Git svn and Gnome blog entry
(Incidentally, if during the initial clone step your connection dies or you need to stop it then to resume the clone you just have to run the above command to resume downloading the history).
There seems to be a memory leak in
git-svn
. The size of thegit-svn
process grew slowly and after about two weeks it was at 1.2 GB resident size, at which point the OS refused to let it fork.
Thing is, this was a blessing in disguise.
I was able to resume the interrupted clone with a simple "git svn fetch
", and it ran much faster with the now radically smaller heap.
This, worked so well, in fact, that I got into the habit of interrupting and restarting the process every evening and every morning. A few days later it was done.
You start your adventures with
git-svn
by cloning an existing Subversion repository:
git svn clone url://path/to/repo -s
The
-s
flag assumes that your repository uses the "trunk, branches, tags" convention. If not, you have to specify manually which directories represent branches and tags, if you want Git to know about them.This will take a long time, as it will fetch every single revision from SVN and commit locally. If for any reason it stops, you can resume with
git svn fetch
.
这篇关于恢复git-svn克隆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!