This is a mirror of official site: http://jasper-net.blogspot.com/

How to convert Subversion repository to Mercurial (Hg)–it’s easier than you think!

| Sunday, November 28, 2010
Converting SVN to Mercurial, while keeping all the commit history, might sound like a hard thing to do, but in fact it isn't! This functionality is already built into Mercurial, it’s just not enabled by default.

I will be using BitBucket as the Mercurial repository host for this example. You will also need the latest version of TortoiseHg.

Conversion is done using the command hg convert, however the Convert extension is not enabled by default. To enable it, locate the file Mercurial.ini, typically located in your %UserProfile% drectory (C:\Users\<username> in Windows 7). Open it in Notepad, and locate the following section:

[extensions]

Add it, if it doesn’t exist. Directly below the section name add the following line:

hgext.convert=

Save the file, and open a command prompt. Type hg convert, and if the output shows usage for the convert options, it means that the extension was enabled successfully.

To begin converting, simply type:

hg convert C:\YourProject

Where YourProject is the SVN root of your project. Mercurial will create a new directory, appending the suffix –hg (e.g. YourProject-hg), and will use it as a destination. Please note that this may take a long time, depending on the size of your SVN repository.

Read more: Typemock

Posted via email from .NET Info

0 comments: