SVNMigration Project.

Before MMS, we streamlined our product line, revamped our website, and now it’s time to re-align our source code and build processes. Our old development environment consisted of three different source repositories: VSS, Subversion, and a shared folder. I piloted Subversion/Trac since started here and we’ve decided to move all of our source code into Subversion/Trac.

The hardest part about this entire process was making sure we didn’t lose anything while we’re doing our house cleaning. Even though we only have four people working on projects that will be moving to Subversion, we needed to make sure we didn’t delete something someone else was working on in the shared folder. This painful process shined a light on Subversion and is one of the reasons why we’re (finally) migrating.

It was surprisingly very simple to do, and with only one hurdle.

1. Backing up the SVN and Trac Repositories:
Our SVN/Trac system sits on a VM and our biggest concern was if the VM passed out, so I created a script that would backup all of our stuff and copy it over to a physical machine.

svnadmin dump –quiet C:/SVNRepos/_Template > C:/Backup/SvnDump/_Template
C:/Python24/Scripts/ C:/Trac/_Template hotcopy C:/Backup/TracDump/_Template

2. Load them back into the revamped projects list:
With our new product line and consolidated projects, we needed to load the projects up one at a time. Man, the repository is so fresh and so clean!

svnadmin create C:/SVNRepos/template
svnadmin load C:/SVNRepos/template < C:/Backup/SvnDump/_Template

In order to load up Trac again, I stopped the Trac service and copy/pasted the hotcopy (just a copied snapshot) and restarted the service again. I hope they’ll create a command for it soon.

One Roadblock/Hurdle, whatever you want to call it:
I had dumped all of my projects, backed them up, and started to loaded them back up in Subversion. Here’s the scenario:

I have two repositories, ProjA and ProjB. ProjA is the main one, and ProjB is the prototype. Yes, I wrongfully treated them as seperate repositories. So now that I have two dumps, I want to load ProjA and then ProjB into the ProjA/branches folder. After properly loading ProjA, I took a look at the documentation for svnadmin load and went at it:

Try One:

svnadmin load –parent-dir C:\SVNRepos\ProjA\branches\prototype-ProjB C:\SVNRepos\ProjA < C:\Backup\SvnDump\ProjBDump

Twitter to call on help, and James to the rescue:
(2:54:51 PM) James: yeah that’ll fail

Try Two, after James fix:

svnadmin load –parent-dir branches\prototype-ProjB C:\SVNRepos\ProjA < C:\Backup\SvnDump\ProjBDumpK

Still get a file not found error for ‘branches\prototype-ProjB’, gah!

After playing around, I found the problem. It was telling me exactly what was wrong. All I had to do was add the folder ‘branches\prototype-ProjB’ and commit it BEFORE loading ProjB, der der. I assumed that Subversion would automatically add the folder for me, shame on me. No wait, shame on the documentation for not telling me. Or should I shift the blame to Subversion for not implementing that for me? Actually, I really shouldn’t have made two seperate repositories in the first place. Oh well, it’s done and I’m happy.

3. Sit back, relax, and enjoy.
Not really, next week I’ll start working full time, hardcore, and heads down on a BETA for our Audit Collection Admin. Supposedly, a lot of buzz is going around about the demos I created for MMS.

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve this: Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.