Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"stream ended unexpectedly" on clone

I try to clone but I get a rollback. I could clone at another computer previously but now I get a rollback and I don't know why:

C:\Users\Niklas\montao>hg clone https://[email protected]/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>

Currently I'm just trying to do it over again but I suspect that it wil ltime out, can you tell me how to debug more what's happening and possibly resolve the issue? I ran it in debug mode and this is what happens.

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!
like image 503
Niklas Rosencrantz Avatar asked Feb 09 '14 05:02

Niklas Rosencrantz


3 Answers

Your TCP connection to bitbucket is dying before the whole repo is downloaded -- probably a flaky net connection or a full disk. If it's the former you can do it in small chunks using -r like this:

hg init montao
cd montao
hg pull -r 50 https://[email protected]/niklasr/montao  # get the first 50 changesets
hg pull -r 100 https://[email protected]/niklasr/montao  # get the next 50 changesets
...

That should only be necessary if something's wrong with your network route to bitbucket or the repository is incredibly huge.

like image 89
Ry4an Brase Avatar answered Oct 17 '22 09:10

Ry4an Brase


An easier syntax compared to Ry4an Brase's answer:

hg clone -r 1 https://[email protected]/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
like image 31
Codeguard Avatar answered Oct 17 '22 09:10

Codeguard


If you're using TortoiseHg Workbench, I found checking "Use compressed transfer" under Options in the Clone dialog worked for me.

like image 1
Nick Gallant Avatar answered Oct 17 '22 09:10

Nick Gallant