SVN to Mercurial
SVN + branching + renaming directories (in eclipse) has been killing me so I decided to move to Mercurial, why not Git? Most comparisons break down the differences to Mercurial is simple and doesn’t have some the weird parts of Git, but Git is cool.
I want simple.
The conversion from SVN to Mercurial process was complicated and annoying, then it was very simple.
Using StackOverflow I got the gist of the solution.
My attempt path:
- Spend ages trying to get my remote repository to convert straight to Mercurial to no avail, not sure why…
- Set up a VisualSVN server on my local box, clone my SVN repo using svnsync then spend ages trying to get Mercurial convert to accept the invalid cert – lack of experience/knowledge failure
- Use hg (Mercurial) to convert straight from the subversion repo files to Mercurial – minor success, Mercurial doesn’t like tree based repositories with lots of projects in them without the use of an extension
- Use hg to convert each project from SVN to individual repositories – Winrar!
Path to success:
- Download Mercurial and TortoiseHg
- Set up a local SVN server (I used Visual SVN Server
for this because it was there from my previous attempt and I don’t know how to work svnserve. Also make a repo (e.g. temp-repo) - Sync your SVN repo to your local machine (if it isn’t already there):
svnsync init https://local-svn-server/svn/temp-repo/ svn://old-svn-path
- For every project in your repository, make a new directory (project-name) and run the following command:
hg convert file:///c:/path/to/local/repository/and/project-name project-name/
The only other complication I ran into was importing the new repository into eclipse threw an error, something about dotnetcode (abort: requirement ‘dotencode’ not supported!. Command line: etc). Just go into Preferences->Team-Mercurial and override the Hg executable to use TortoiseHg rather than the built-in one.
Good luck!
1 Comment to SVN to Mercurial
Leave a Reply
What I'm Doing...
- Try the new Android Agenda Widget dev version, new color customizations and refresh on event completion! http://goo.gl/QD11 2010-11-02
- @GamesParadise is the special launch price for Mansions of Madness $99? in reply to GamesParadise 2010-10-27
- Froyo users, I've been playing with C2DM (notifications), check out http://goo.gl/xRXm (Cloud2SMS) and let me know what you think! 2010-10-23
- More updates...
Posting tweet...
Powered by Twitter Tools
Hi!
Thanks for the hint to use the TortoiseHg executable in Eclipse. I ran into the same problem. Now everything works fine.
Greetings from Germany, Jan