克隆时"流意外结束"

Nik*_*ntz 24 mercurial bitbucket

我尝试克隆但是我得到了回滚.我以前可以在另一台计算机上克隆,但现在我得到了回滚,我不知道为什么:

C:\Users\Niklas\montao>hg clone https://niklasr@bitbucket.org/niklasr/montao
http authorization required
realm: Bitbucket.org HTTP
user: niklasr
password:
destination directory: montao
requesting all changes
adding changesets
adding manifests
adding file changes
transaction abort!
rollback completed
abort: connection ended unexpectedly

C:\Users\Niklas\montao>
Run Code Online (Sandbox Code Playgroud)

目前我只是想再次尝试,但我怀疑它会失败,你能告诉我如何调试更多正在发生的事情并可能解决问题吗?我在调试模式下运行它,这就是发生的事情.

adding google_appengine/lib/django_1_3/django/contrib/localflavor/locale/mn/LC_M
ESSAGES/django.mo revisions
files: 10223/50722 chunks (20.15%)
transaction abort!
Run Code Online (Sandbox Code Playgroud)

Ry4*_*ase 37

在下载整个repo之前,你与bitbucket的TCP连接正在消亡 - 可能是一个片状的网络连接或一个完整的磁盘.如果它是前者,你可以使用-r这样的小块来完成它:

hg init montao
cd montao
hg pull -r 50 https://niklasr@bitbucket.org/niklasr/montao  # get the first 50 changesets
hg pull -r 100 https://niklasr@bitbucket.org/niklasr/montao  # get the next 50 changesets
...
Run Code Online (Sandbox Code Playgroud)

只有在您的网络路由到bitbucket或存储库出错的情况下,这应该是必要的.

  • 250MB并不大.你的网络不是你的电脑有问题. (2认同)

Cod*_*ard 9

Ry4an Brase答案相比,语法更简单:

hg clone -r 1 https://niklasr@bitbucket.org/niklasr/montao  # get the first 1 changeset
cd montao
hg pull -r 50    # first 50 changesets
hg pull -r 100   # first 100 changesets
...
hg pull          # all remaining changesets
hg update        # create working copy
Run Code Online (Sandbox Code Playgroud)

  • 因为你可能不想手动添加所有这些,你可以使用简单的脚本:`hg clone -r 1 https://niklasr@bitbucket.org/niklasr/montao; cd montao; 我在{1..100}; 做hg pull -r $ {i} 00; 完成; hg update` (3认同)