Introduction
Visual SourceSafe (VSS) is the version control (VCS) and source-code management system provided by the Microsoft Visual Studio product family.
A version control system basically lets you manage the source programs within a development group, maintaining the entire modification history of each component, controlling the developers' access to them, etc.
Before starting, I want to thank for the help given by Fernando Bacci.
What do we need a VCS for?
I will try to answer this question with some examples.
Surely this has already happened, or was about to happen. And probably, you resolved your problem recovering a backup that was on some magnetic or optical media, and for this purpose, you had to go to your backup library, to see which was the CD or tape, or the fireproof bank safe, and after some processes which cost a lot of hours, moneyand mental health, you managed to return to the state previous to the problem.
One of the functions of a VCS is to help for this kind of problems. You only have to discard the changes made, or review the change history in the version, to see which is most similar to the one you currently need.
Another very important function of a VCS is the administration of development groups, working on the same project, without having to use methods like the following:
VSS fulfills the function of a central database, which records which user has taken out which program, form, report, etc., for modifications, and which (unless you specify otherwise) doesn't allow others to modify it until the one who took it out frees it.
VSS lets you manage projects containing different kinds of files, like text files, graphic files, binary files, etc.
You can also share a file among different projects, having a single version, and when you modify something for a specific project, the change will propagate to all who share the file.
VSS is a truly multiplatform product; it is available for Windows, Macintosh and UNIX.
Working with VSS
VSS has an administration interface, and a separate client interface, that integrate perfectly into products such as Visual FoxPro (versions 5.0, 6.0, 7.0 and 8.0), Visual Interdev and Visual Basic version 6.0, as well as the .NET version. In this latter case, you need to run VSS version 6.0c.
Illustration 1: Server interface
With the administration program, you create the users and give them permissions; the users can be the same as the users defined in the operating system; if the user name is the same as the logged-in user, no password will be required.
With the client, you manage projects, files, versions, etc.
Illustration 2: Client interface
Specifically, talking about project administration, VSS uses a very simple, yet effective, method. When you add a project to VSS, what it does is create a copy in the VSS database, and keep a copy on your local disk. Each one of the files of the local copy will have the read-only attribute; this will give a warning in case there is any attempt to modify the file, even without using VSS.
Besides, if you add VSS as source control provider to any of the previously mentioned products, this will add a mark to the files, with an icon of a closed lock, indicating that the file is protected. When a user asks to modify a file, VSS will change the read-only attribute and will keep a record of which user selected this file for modification.
To better see this functionality, we will use a few examples created in Visual FoxPro, and we will purposely use different versions, to see how well VSS integrates with Visual FoxPro 6.0, 7.0 and 8.0 (beta).
Visual FoxPro and VSS
In the menu, option Tools, Options, in the "Project" tab, there is an option "Active Source Control Provider". In this option, we can select "Microsoft Visual SourceSafe". This allows us to interact with VSS from the Visual FoxPro interface.
Illustration 3: VFP menu
From this point on, in the menu option Projects, we will have the option "Add to source control" enabled. This will create a new project within VSS, which will manage it as a subdirectory structure.
The first thing we will note in our projects is an icon to the left of the name of each project component. This icon is a closed lock. Also, in the popup menu, and in the Project menu, we will have several options which correspond to VSS.
The most important ones are:
A very interesting option applies when two people modify the same component, when the second person wants to update, he will be informed that differences exist, and he will be given the option to merge among both changes, or leave one and lose the other one. In Illustration 4, we can observe:
Illustration 4: Example
VSS also gives us the possibility of assigning labels to different components of a certain version; this allows us to recover all components at a certain point in time, through a name.
Recommendations
Conclusions
Well, briefly, this is Visual SourceSafe, a tool which is simple to use, very powerful, and, adfater a while, addictive. I hope I awaked the interest of all of you, and that soon there are more Visual SourceSafe users.
Some links: