Branching the Project
I have used an SVN repository for the project, hosted on unfuddle, enabling versioned source control on
all files in the project. I can use the trusty TortoiseSVN Windows application to send and
receive files to the remote repository directly from Windows Explorer. After each work
session I commit the changes to source control. Apart from the obvious advantages of
maintaining backups, if at any stage I realise that I have made a mistake, then the
changes can be rolled back to the previous commit.
The source control recently came in useful when I needed to upgrade the version of Sharp
Architecture used on the project. I won t go into detail about the reasons for me
upgrading, suffice to say most of the technology stack in Sharp Architecture had
benefitted from version updates and I was limiting myself by using a pre version 1.0
release.
These are the steps I took to upgrade the Sharp Architecture version of the
project:
-
Use TortoiseSVN to Branch the code in source control from /trunk to /branches/recipebookV1
-
Rename the working folder (ie. the local folder in Windows Explorer) to recipebookV1 and switch it to the branch.
-
Update the Sharp Architecture project to fetch v1.0 from source control and copy the new project template into the Visual Studio templates folder.
-
Generate a new Visual Studio project, named recipebook, from the v1.0 Sharp Architecture templates.
-
Use Beyond Compare to copy all the files that I have manually added / changed in the recipebookV1 project to the new recipebook project
-
Add the files to the recipebook project in Visual Studio, cross fingers, compile and run!
-
Use the TortoiseSVN repo browser to delete all files from the Trunk yes, I really deleted them all!
-
Import the new recipebook folder back into the trunk
After completing the upgrade I realised that there may be an easier way to upgrade,
without the scary and somewhat bad practice of deleting all the old files from the
trunk, only to upload most of them again. I will list them below so I can try them out
later:
-
Use TortoiseSVN to Branch the code in source control from /trunk to /branches/recipebookV1
-
Rename the working folder (ie. the local folder in Windows Explorer) to recipebookN. This enables a new visual studio project of the same name to be created, with namespaces which are the same as the working project.
-
Update the Sharp Architecture project to fetch v1.0 from source control and copy the new project template into the Visual Studio templates folder.
-
Generate a new Visual Studio project named recipebook from the V1.0 Sharp Architecture templates.
-
Use Beyond Compare to copy all updated Sharp Architecture files from the new recipebook project to the working recipebookn folder
-
Add any extra files to the working recipebook project in Visual Studio, cross fingers, compile and run!
-
Commit the changes to the trunk, remove the new recipebook project and rename the existing recipebook project folder to recipebook.