1

Getting some zlib error in the middle of cloning big (4 GB) repo from Mercurial (Kiln).

What should(may) I do next? Delete and try from the beginning, or can I just hg pull -u?

Will local repository be in consistent state after some error in the middle of cloning?

update to clarify question: clone of repository was successful, but clone of some subrepository failed. Does this change anything?

1 Answers1

2

If you encounter an error while cloning a big repository, then Mercurial will automatically abort the transaction. When a transaction is rolled back, Mercurial will clean up everything. For hg clone, this unfortunately means that the changesets that were already downloaded are gone. So you can safely re-clone.

However, from the way you put your question, it sounds like there is something left after the abort. So I guess you started a hg pull that was aborted mid-way? The same applied to pull: an abort will roll back the transaction and you can safely re-start the hg pull.

An aborted pull looks like this:

$ hg pull http://localhost:8000
pulling from http://localhost:8000/
searching for changes
adding changesets
transaction abort!                                                              
rollback completed                                                              
abort: stream ended unexpectedly (got 12 bytes, expected 503)                   

I started hg serve on my machine and started a pull from that server. I then killed hg serve in the middle of the pull. The client aborted and rolled back the transaction.

Martin Geisler
  • 72,968
  • 25
  • 171
  • 229
  • Thanks. **update to clarify question:** clone of repository was successful, but clone of some subrepository failed. Does this change anything? – Alexander Gornik Jan 20 '12 at 15:06
  • Not really. The subrepo will either be completely cloned or the transaction will be rolled back. You should be able to redo the `hg update` in the outer repo. – Martin Geisler Jan 20 '12 at 16:41