Using TortoiseMerge when upgrading Sitecore

Upgrading Sitecore has become a lot easier since the release of Sitecore 6.0.1 featuring the Update Installation Wizard.
With the UIW we get a clear overview of what files will be updated or removed, also the affected files are copied to a separate directory under the temp-folder where it is available to us should we need them. When examining the folders further there also seems to be some kind of rollback feature but I have yet to find the documentation for this, so far I have never needed to rollback an upgrade though (knock on wood).

Upgrading Sitecore is as easy as one, two, three… until you get to the web.config

Even after introducing the include-files for web.config it still consists of 3000+ lines of code. Often there are changes made here and there by developers overloading Sitecore functionality or optimizing caching and such.

Today I started to upgrade a solution from Sitecore 6.2.0 rev.091012 to 6.3.0 rev.100716, i was following the very clear instructions at SDN. Basically it is done by first changing a few rows in web.config then running UIW (around 5400 items and files affected) then doing a lot of more changes in web.config. I kind of gave up when I opened the last page of changes and my right-hand scroll quickly was shrunk to about 1/10 of the screen height.

And this was only the developing environment; I also had to do the stage and live servers with their specific web.config’s.

There should be some kind of tool for merging code-filled files… well how about TortoiseMerge? I use it all the time when my colleagues and I make changes to the same files and my commit to subversion fails. I did not know however that I could feed the program with any files I wanted. Well IT JUST WORKS!

Here’s how I did it:

First I downloaded the complete web.config for the version I was upgrading to.

Then opening TortoiseMerge without any parameters brings up this dialog

TortoiseMerge Open File Dialog

TortoiseMerge Open File Dialog

Given the fact that most of the changes was made to the new web.config I used this one as “My File” and my old web.config as “Their file”. I didn’t bother using a base file. I clicked “Ok” and started merging my changes with the new file. Basically everything marked red to the left is worth having a closer look at.

Merging files

Merging files

Then I saved the file and moved it to the web-directory restarted IIS and it worked right away.

This will save me a lot of the frustration and time when upgrading Sitecore solutions in the future.

Link to TortoiseSVN

Share