pesche
pesche

Reputation: 3134

Is it possible to clone with hgsubversion in steps?

I'm trying to clone a rather large subversion repository with hgsubversion.

hg clone --startrev 8890 svn+https://my.reposit.ory/trunk trunk_hg

After about an hour, the clone operation aborts with an out of memory message:

[r20097] user: description
abort: out of memory

Is it possible to specify an end revision for the clone operation and get the remaining revisions with a pull? Or somehow break up the clone in smaller steps?

Upvotes: 7

Views: 1564

Answers (4)

user2031839
user2031839

Reputation: 461

Here is a workaround to clone the whole svn repo:

  1. start cloning
  2. abort it immediately (Ctrl+C in windows)
  3. than hg pull
  4. you've got out of memory
  5. repeat step 3 until you check out all commits

Upvotes: 0

durin42
durin42

Reputation: 1467

You can specify a stop revision with -r for clone, as others have suggested. Another option (if you kept the clone where things crashed) would be to just run hg pull in the trunk_hg copy. You might have to edit/create .hg/hgrc yourself to add the [paths]\n default = svn+https://my.reposit.ory/trunk, since I think we add that at the end of the cloning process. Maybe run hg svn rebuildmeta before your pull just for good measure in case the tracking metadata for hgsubversion got hosed when the OOM happened.

I hope this helps!

Upvotes: 6

RandomSF
RandomSF

Reputation: 116

Cloning with a limited range of revisions and then pulling is the recommended method and I can confirm that it works flawlessly for svn repositories in the several GB size range.

Upvotes: 1

Amber
Amber

Reputation: 526523

http://www.selenic.com/mercurial/hg.1.html#clone

Could try using the -r <revid> flag to clone only a particular changeset. Though that may or may not work with hgsvn.

Upvotes: 1

Related Questions