Search code examples
visual-studio-2010gitsvnmercurial

Migrating an SVN repository to some distributed VCS (Git or Mercurial)


From my previous question I understood that I have to change my SVN repository to a distributed VCS.

So, currently, I:

  • have an existing SVN repository,
  • use Visual Studio 2010,
  • use VisualSVN for both client and server.

I want to:

  • convert both client and server sides to a distributed VCS,
  • keep the history,
  • still have a handy Visual Studio plugin for the new VCS.

My questions:

  • What VCS is better to use?
  • How to convert the repository from SVN to another VCS?
  • On client side, I should likely just "recheckout" using new VCS plugin?

Solution

  • I have a positive experience of transitioning from a centralized VCS (Team Foundation Server) to Mercurial, via SVN. So I guess this is applicable to your case.

    hg convert can convert your SVN repository into a Mercurial one, keeping history and branches (provided you were sticking to the usual branch/tag layout in SVN).

    TortoiseHg provides excellent integration of Mercurial features into Windows Explorer, along with the visual tools like DAG renderer, source tree browsing, and annotate/blame tools. And the same time, TortoiseHg keeps the command-line hg program, so you're free to mix the GUI and the CLI.

    VisualHG, being based on TortoiseHg, integrates Mercurial repository support into Visual Studio 2008/2010, adding, removing and renaming your solution files as you make changes in the Solution Explorer.

    This set of tools provides quite good support for most medium-to-large projects. However, if your project is very large, or it contains a lot of big (tens on megabytes) binary files (say, media), or you plan to regularly put built binaries under source control, this might render Mercurial hard to use.

    In this case, you might want to use additional tools, like Mercurial subrepositories and largefiles extensions, or consider another VCS (Git).