我正在糟糕的地方进行拨号(是的,这种情况在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增量克隆存储库吗?
发布评论