<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener("load", function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <iframe src="http://www.blogger.com/navbar.g?targetBlogID=12803833&amp;blogName=thomasnguyen.com&amp;publishMode=PUBLISH_MODE_FTP&amp;navbarType=TAN&amp;layoutType=CLASSIC&amp;homepageUrl=http%3A%2F%2Fwww.thomasnguyen.com%2Fblog%2F&amp;searchRoot=http%3A%2F%2Fblogsearch.google.com%2F" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" height="30px" width="100%" id="navbar-iframe" title="Blogger Navigation and Search"></iframe> <div></div>
home blog contact

SVNMigration Project.
Monday, June 02, 2008
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/trac-admin.py 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.

Labels: , , , , , ,



0 Comments

Add a comment





Recent Posts
Santa Marta, Colombia - 5/5.
Santa Marta, Colombia - 4/5.
Santa Marta, Colombia - 3/5.
Santa Marta, Colombia - 2/5.
Santa Marta, Colombia - 1/5.
MMS2008 - Las Vegas, NV.
Getting Involved Again.
Infragistics and Visual Studio 2008.
Got Podcasts?
discountasp.net's Subdomains Suck.

Archives
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
July 2008
August 2008
September 2008
October 2008

Blogger
copyright 2006-2008 | thomasnguyen.com

Google Reader flickr del.icio.us nike+