vss to svn – 7 steps to svn goodness

Using Subversion for source control is all the rage these days. Everyone’s doing the svn dance. In fact, my most popular blog posting is about vss to svn migration, so at least it’s a hot topic here anyway. I assumed there’s lots of people making the switch out there, and figured I’d write up a few things to think about if you’re considering the move.

Why subversion? Mostly because svn just works. It’s a great little tool for doing what you’d expect of a solid source control system. It’s lightweight, so you can use it just about anywhere. Also – it’s free, which is always nice. There are plenty of other options out there, and each have their merits. This particular post is about the journey from vss to subversion.

1. Why? Are you sure?  Switching source control systems can be a real pain, especially if you’ve got a boatload of source. It’s definitely worth the effort in 99% of the cases, but sometimes the payoff just isn’t worth the disruption. If you’re a heavy Microsoft shop for example, you might want to consider jumping in with both feet and just moving on to the whole Team Foundation thing.

That being said, subversion rocks. Use it. 🙂

2. Preparing the new repo – You’ve got to install subversion somewhere, and create your new repository.  You’ll need to decide if you want to use the svn: or http: protocol to access your repo remotely, most people just tunnel it thru apache over http:.

You’ll want to start off with a nice clean, standardized layout for your new repo.  A safe bet is to use the old “trunk, tags, branches” route, with some default dirs in place (src, web, db, qa, lib, whatever).

If you’re not sure about installing/hosting it yourself, there are a handful of places that’ll do it for ya (dreamhost, cvsdude, … )

3. Exporting the stuff from vss –  The trick here is to do it cleanly.  You’ll most likely end up needing to delete all the .vssver files and whatnot.  Also, decide if you really need the entire history of files in your new repo… that could get hairy. Migrating to svn AND keeping all of your checkin history intact in svn is outside the scope of this posting. We decided we didn’t and kept a backup (read only) copy of the old vss db around “just in case”. You know, in case we ever needed to refer to something 3 or 4 years old.

Guess what? We never looked back. 🙂

4. Importing the stuff to svn – This is where it can get fun.  You’ll want to map your existing vss repository’s directory layout to your shiny new one. I ended up using a little perl script to get them all added into svn correctly. (vss2svn.zip)

5. Updating other various things and people –  You may have some existing systems already pointing to your vss repo, make sure to list them all out and get em updated. We had a handful of build scripts that needed to be update to point to the new repo.

Also, be sure to communicate effectively to your team. You might even need to do a little PR for the effort, so make sure you’re clear on #1 above. Provide your users with ample docs and support info to make the transition easier. Maybe host a couple “svn how to” sessions, to get things moving.

6. Testing This needn’t be too complicated, just walk through a handful of typical use cases. For example, do a few svn checkouts, make sure you can connect and everything’s cool, try a build or 2 from svn, etc.

The key here is to find and address (or figure out workarounds to) the most likely issues, and be ready to help your users get around em.

7. Relax and have a beer You’re off! Now just relax, watch your source get modified, and start forgetting about “vss analyze and fix”



7 Responses to “vss to svn – 7 steps to svn goodness”

  1. cem Says:

    First of all thanks for your entry.
    I am using VSS and I want to swtich it tp SNV.
    But there is a little problem. Our developers are using Label’s in VSS. But as far as I know SVN has tags and other stuff but not labels.
    Do you have any suggestions for me? How can I use SVNwith minimum change in my flow?
    Thanks in advance.

  2. theReleaseGuy Says:

    Hi Cem,

    You are correct, there aren’t “labels” in SVN as such. However, a svn tag will get you the same thing.

    Both tags and branches in svn are really nothing more than “copies” of the repo (or a path in the repo). So to accomplish the same thing a vss label does, you can simply make an svn tag (using the svn copy command).

    The nice thing about svn is that copies are very cheap/light, so feel free to use them the same way you would use labels.

    Where else in your workflow do you anticipate issues with the switch? I’d be happy to provide a recommendation for ya if you’ve got a specific challenge.

  3. cem Says:

    The main difficulty is my developers 🙂
    They are very strict with their working flow.
    We have automated VSS scripts on our IDEs we use. These scripts Labels the codes in VSS but for the SVN taging it can be little complicated for me.
    Also do you have any suggestions about the SVN clients?


  4. Arengin Says:

    Well I just jump in here 🙂
    I’m preparing the same thing, only that I got to work with SVN before.

    As a client I would suggest TortoiseSVN it is much used and all SVN help FAQs use it as a config help. I use it too and an very happy with it.

  5. JBrooks Says:

    Here is my experience with moving from VSS to SVN:

    Given the reasons why VSS can become corrupt and the fact that we were now using it remote I saw no way I could stay with it. Yes, VS2005 solves some of the problems but not all.

  6. vinay Says:

    When migrating from VSS to SVN is it possible to migrate the users (rights by projects) automatically or do we need to manually create users in SVN and provide folder level access to each?


    • theReleaseGuy Says:

      I’m pretty sure you’ll need to recreate that user info and then grant them folder level access in svn. As far as I know, there’s no simple way to map vss users to svn users…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: