有什么方法可以从Web增量克隆存储库吗? [英] Is there any way to clone a repository from the web incrementally?

查看:87
本文介绍了有什么方法可以从Web增量克隆存储库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在糟糕的地方进行拨号(是的,这种情况在2011年仍然会发生),并试图克隆一个巨大的存储库.它开始时没有问题,但是每次拨号断开时(似乎是不可避免的),!#%$ * hg都会回滚所有内容,而我又又得到一个空目录.

I'm on dialup in lousy place (yes, it still happens in 2011), and trying to clone a huge repository. It starts without problem, but every time the dialup disconnects (which is unavoidable, it seems), the !#%$* hg rolls everything back and I'm left again with an empty directory.

除了在远程PC上执行然后再通过FTP或其他方式下载整个内容之外,还有其他解决方案吗?

Is there a solution other than doing it on a remote PC and then downloading the whole thing by FTP or something?

推荐答案

在类似bash的shell中,您可以执行以下操作:

In a bash-like shell you could do something like this:

$ hg init myclone
$ cd myclone
$ for REV in `seq 10 10 100` ; do hg pull -r $REV <REMOTEREPO>; done

从10开始,每次拉动都会下载接下来的10个修订版本,最多100个.如果连接丢失,请将第一个参数调整为seq以匹配您已经拉回的内容.

Starting at 10, each pull downloads the next 10 revisions, up to 100. In case of a lost connection, adjust the first argument to seq to match what you've already pulled.

这篇关于有什么方法可以从Web增量克隆存储库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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