EOB
EOB

Reputation: 3085

Using hgsubversion to convert SVN to Mercurial?

I want to know how to convert a SVN repository to a Mercurial repository using the HgSubversion tool. I tried the hg convert command (from ConvertExtension), but it fails for my repository.

Any ideas how the syntax loks for hgsubversion to convert from SVN to Mercurial?

Upvotes: 3

Views: 401

Answers (1)

s.m.
s.m.

Reputation: 8043

Simply clone the repository with the hgsubversion extension enabled, and chances are you're good to go.

There are, however, a few...

Things you should pay attention to

Non-standard SVN repo layout

You might have some tweaking to do if you don't have the classic trunk / branches / tags layout.

Large SVN repo (lots of commits)

The initial clone is time consuming, and it isn't an operation you can resume should the connection with the repo go down, meaning that all the work will be rolled back.

The solution here is to only clone the first revision with

hg clone -r1 svn://repo

Then you can

hg pull

which you can resume, and will pull all of the other commits.

Misc

Once the clone is complete, adjust the [paths] section of .hg/hgrc to make it point to the right repo, or get rid of it if your clone is going to act as the central repo.

Upvotes: 8

Related Questions