Fickle Bits

You're doing it wrong.

Upgrading Code Camp Server to Preview 4 - Part 2

Last time I went through some steps to upgrade Code Camp Server to the latest version of the ASP.NET MVC Framework.  I had to stop because MVCContrib hadn’t been upgraded yet.  Now that their 4.0 release is out, I can continue.

Final Changes

I updated the mvccontrib binaries in our /bin folder and then ran all of the tests.  All of the tests passed.  Running the site I came to find a few errors in our views that referenced ComponentController (which should have been caught with tests… Note to self:  precompile the site in the NAnt build…).

 

….And the site is alive again!

site-live

We’re now done with the upgrade, all tests are passing, and we need to commit our final changes to the branch we created in part 1.

svn-commit

Now we’re ready to merge our changes back into the trunk. 

Merging the branch back to the trunk

To do this we will switch back over to the trunk with TortoiseSVN.

switch-back-to-trunk

Next, we open the Merge dialog from within the trunk.  With TortoiseSVN you’re always merging from another branch to your current working copy.

TortoiseSVN asks you how you want to merge your changes.  What we’ve done is directly described in the second option, so we’ll choose that.

merge-options1

Next we select the branch from where we’d like to pull the changes…

merge-options2 

The last dialog has some other options for you, but the defaults will be fine for us.

image 

Now click on merge & cross your fingers!

merge-error

Doh!

We get an error because googlecode doesn’t yet support subversion 1.5.  Well that sucks, who planned this blog post anyway?

Time to drop down to command line to do the merge.  That’s right, don’t be afraid of the command line.  The first thing to do is to find out the revision that the code was branched.  You can do that with a command on the branch working copy itself, by typing:

1
svn log --stop-on-copy

or I can cheat and look at the screen shot of the merge in part 1.  I can see that the revision is 265.  Now, back on the trunk I can type:

1
svn merge -r 265:HEAD href="http://codecampserver.googlecode.com/svn/branches/mvcpreview4upgrade

The result:

cmd-line-merge

Running the tests again just to make sure everything worked, and it does!

Now to commit our changes into the trunk…

1
svn commit -m "integrating preview4 branch"

…And we’re done!

I hope that my play-by-play upgrade has been helpful.  Dealing with frequent updates to the projects we use is a price that we pay for the rapidly changing environment that we live in.  Now, off to play with Preview 4 new features and hopefully get to delete some of our newly obsoleted code!

Comments