Converting a company from SVN to Hg?

mercurial, svn, version-control

Solution

There's a free book available at http://hgbook.red-bean.com/ and published by O'Reilly in 2009.

As of release 0.9.5, Mercurial comes with a conversion tool.

I must admit I switched to Git instead of Mercurial. That said, with Git you can import branches, tags and trunk at the same time in the same repository. Git takes care of everyone and gracefully stores tags as tags, branches as branches and the trunk as the master branch. I'm confident it's almost the same with Mercurial.

I recommend you to switch to Mercurial (or Git or any other DVCS) as soon as you can. Do not continue to work on two different repositories. When I switched, I kept svn as long as I was confident enough with Git (git-svn enables yout to interact from git to svn and viceversa). Then I made the switch and I locked the SVN repos.

Problem

We're a heavy user of SVN here. While the advantages of GIT over SVN made us want to change, the advantages of Hg over SVN mean it's now time to change and we need to start doing so very soon. I'm not so worried on the client side, but here are my questions. There are some excellent books on setting file metaproperties, properly organizing projects, etc on SVN. What is that book(s) for Hg? Is there a way to convert an SVN repository (that you've used) and can report how well it went? We don't want to lose years of commit logs if possible. When you DO convert, how did you split up the old code? Did you commit trunk as one project, and tags/forks as another? If you used SVN for legacy work, did you check in updates to SVN or something else?

Original source