Saturday, January 7, 2012

Convert Subversion to Mercurial Repository

Today I finally pulled the trigger to convert my Google Code project to use Mercurial instead of Subversion. Why not Git? :)

The process is quite simple, thanks to the hgsubversion extension which allow Mercurial to talk with Subversion repository.

1. Download the latest version of TortoiseHg
2. Download the hgsubversion extension
hg clone https://bitbucket.org/durin42/hgsubversion

3. Extract the hgsubversion sub-directory
4. Open TortoiseHg's setting file
%homepath%\mercurial.ini

5. Add the hgsubversion path
[extensions]
hgsubversion = c:\hgsubversion

6. Check if hgsubversion is installed correctly
hg help hgsubversion

7. Clone your Subversion repository with TortoiseHg
8. TortoiseHg Workbench -> Synchronize
9. Modify the Remote Repository to your new Mercurial repository
10. Pull incoming changesets (there should be no changes)
11. Push your local changes to the new repository


Ref:
Mercurial Kick Start Exercises

No comments: