Converting any repository from Svn to Hg on Windows

There’s been a lot of blather of late about this supposedly-fiddly conversion process. Personally I’ve found that working on the Windows operating system, the transition is a lot smoother. Simply first install Cygwin, cd to the root of your repository, and then:

find . -name .svn -exec rm -fr {} \;
hg init
hg add .

and you’re done. There may be a few nuances this doesn’t address, but come on, let’s not expect miracles.

6 thoughts on “Converting any repository from Svn to Hg on Windows

  1. Danger danger! If you have spaces in the wrong place you’ll wipe too much.

    Correct ways:

    find . -name .svn -exec rm -fr {} \;

    find . -name .svn -print0 | xargs -0 rm -fr

Leave a Reply