SourceSafe–getting project snapshot

SourceSafe

When I first encountered SourceSafe I was accustomed to working with CVS and later Subversion. Being the GUI application it is, SourceSafe is very file oriented and I believe it works best when used from within IDEs like Visual Studio (in reality you should upgrade to Team Foundation which is a completely different game!).

Even from within VS I still would like to be able to get or compare projects based on timestamp and not only on those labels. It has all the features I need, but seemingly just for files.

Branches, diffs and merges

SourceSafe does not have the same easy way of creating and tagging branches and releases. It has Share – to allow source code to appear in several places in the source trees and it has Labels which kind of works like tags, but you can re-label with the same label for different versions of a file and there is no easy way to merge “branches”.

I always label when I release and usually the source within the labels are correct, but sometimes for example the solution file itself didn’t get labeled and I have to find different ways of recreating the code. So to recreate for a given release I usually end up getting the project given the time of the label in question.

Get project from a point in time

From command line one can use ss.exe to do this using the following command;

‘ss.exe get $/CsProjects/SimulatorX/source -R -Vd24-02-2011;3:00p’

which will check out the SimulatorX source code recursively to the current location (‘.’) and changes made up until 24. February 2011 at 3pm.

For this command to work the SourceSafe directory must be on the path and the SSDIR environmnet variable must be set to the directory containing the SourceSafe.ini file. To set the environment variable do this:

‘set SSDIR=\\MyServer\VSS-Share’ or ‘set SSDIR=c:\vss_data’

So to compare my current source code for the project with the code from 3pm the 24. February I now check out the Feb. source to a new directory and run i.e. WinDiff on the folders. This method can then be used to handle branches. For merging branches I suggest using tools like WinMerge.

It works and gives you full control, but it is a bit tedious.

Advertisements

About skattefuten

Check my about page :-)
This entry was posted in Computers and Internet, SourceSafe, Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s