有什么方法可以从Web增量克隆存储库吗?

编程入门 行业动态 更新时间:2024-10-27 06:27:33
本文介绍了有什么方法可以从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增量克隆存储库吗?

本文发布于:2023-10-07 10:49:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1469190.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:有什么   增量   方法   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!