SOURCE CODE MANAGEMENT is about keeping track of all the places you've been during development and finding your way back there should the need arise. Your path through project-space is
littered with historical snapshots of your source code and each one is as accessible as the version you delivered yesterday. If you fixed a bug last year you can instantly tell who did what to which files. You can merge
the same changes into today's code or unwind a change that went wrong. You never lose code and your developers don't overwrite each other's changes. If you have more than one developer and have to make more
than a single delivery of your software you probably need to manage your source code. Effective source code management is essential for any non-trivial project and the choice of supporting software can have a big impact
on how effective that management is. The products examined here are all suitable for Visual Basic projects, but the clear leader is Microsoft's new Visual SourceSafe 4.0. Microsoft acquired SourceSafe,
along with the development team from One Tree Software, on the rebound from the great Delta debacle and are now shipping their new polished version along with VB4. Microsoft Visual SourceSafe Visual SourceSafe, a.k.a. SourceSafe 4.0, is two things: a modestly re-engineered SourceSafe 3.1 and a new add-in that makes a
subset of SourceSafe functions available from Visual Basic and Visual C++. There are no functional changes from the short-lived SourceSafe 3.1, and since 3.1 was almost identical to the pre-Microsoft version 3.0,
established SourceSafe users will have nothing to worry about (unless, of course, they bought the OS/2 version). The SourceSafe GUI, renamed SourceSafe Explorer, has lost its gaudy appearance and acquired a
more sober Microsoft visage with smaller toolbar buttons and a 3D appearance. Button captions are no longer an option, but the buttons now have tool-tips and come in two different sizes. The basic two-pane file and
project window remains but the file pane now has resizable columns. It is also drag-and-drop enabled, with the result that multi-select by dragging no longer works. Otherwise the screen is unchanged except for the
redistribution of some of the status bar information. If the Explorer's new clothes are uninspiring, changes to the menu structure are a significant improvement. SourceSafe's Setup and Info
menus have gone and the familiar Microsoft Edit and Tools
menus have been added with considerable shuffling of the remaining options. This may disorient SourceSafe old hands, but the result is a more rational menu structure with some of the configuration details packaged up into a new 'Properties' tabbed dialog.
Aficionados may be disappointed by the superficial changes made to the new SourceSafe, but there really wasn't much wrong with the old one. SourceSafe has a rich feature set and a user interface that, for routine
operations anyway, is straightforward and easy to pick up. The screen is refreshingly uncluttered with the File Manager-style project display is topped off by a toolbar that permits one-touch operation of routine
functions. The act of checking a file out, which systems such as PVCS or VB ProjectWorks make such a song and dance about, is restored to the simple operation that it should be. Simply click on a file in the window,
press a button on the toolbar and you get immediate visual feedback as your name and working directory appear next to the file on the display. SourceSafe sports many of the advanced features of a serious SCM,
including branching of files into parallel development streams (the 'branch' function was called 'separate' in earlier versions of SourceSafe). Branching is implemented at the file level but since projects can be nested
and SourceSafe allows recursive operations, projects can also be branched. The branch operation is messy because unlike other SCMs such as PVCS SourceSafe creates a new copy of the structure being branched. Files are
branched by performing a dual operation to first 'share' the file across two projects and then 'branch' it into two copies. Branching projects and non-tip revisions is a non-intuitive process as the 'share' function
must be invoked from the History display, which common sense suggests should be a simple report. Old hands may become confused becaue the 'share' function has now been renamed 'pin' where it appears in the History
display for an individual file. The ability to share files with equal status between projects if one of SourceSafe's nicer features. Sharing is achieved by using virtual 'links' to a file from an arbitrary number of
projects, an idea that will be familiar to veterans of the UNIX file system. A shared file appears in both projects and can be manipulated like any other file. In particular, it can be labelled in one project as part of
a release and the label will appear in all other projects that share the file. As we have seen, shared files can later be branched into distinct copies.
Visual SourceSafe and Visual Basic 4 The big news for VB programmers is that SourceSafe 4.0 comes with a VB4 add-in that allows programmers to work with source control from within the Visual Basic
environment. The style of integration is uninspired, with a 'SourceSafe' entry in VB4's add-ins menu, four new items in the Tools menu and a couple in the Project window's pop-up menu (right mouse button). The only
other sign of SourceSafe is a column of tiny check-boxes in the Project window to denote the check-out status of each file. With the SourceSafe add-in loaded, opening an existing VB project prompts to see if you want
to add the project to the source control database. Projects already in the database are accessed via the 'Open new SourceSafe Project...' menu option, which builds you a private local copy of any project you join. Once
you've joined a project you must check out any file you want to work on by choosing 'check out' from the Tools menu or the Project window pop-up. There is also an option to refresh your local copies of all files when
you open a project. Other than checking files in and out your work in Visual Basic is unchanged by SourceSafe. VB files are still cached as they were in VB3, but whenever you obtain a new copy of a file using
SourceSafe's 'get' or 'check-out' functions the file is reloaded immediately. The 'check-out' and 'get' functions are helpful in suggesting which files have changed, although this does necessitate an extra dialog even
when you only want a single file. FRM and FRX pairs are treated as a unit. For routine operations the VB add-in is straightforward and offers most of the SourceSafe functionality you are likely to need. You won't be
able to branch projects or manipulate non-VB files, but access to more advanced operations such as 'share' mean that it's possible to maintain projects entirely from VB if you don't get too ambitious. There
are a few rough edges, of course. SourceSafe's irritating Results Window makes an appearance but unlike in the Explorer it can't be turned off. Checking a file out is not a single-click operation as it is in the
Explorer, and the dialog for adding a project to source control is so confusing that it's easy to end up with a project called 'this project is not under source control'! Inevitably there are some bugs - if you wire
your favourite editor into the Options dialog it seems impossible to remove it, whilst the program sometimes GPFs when adding an existing project to the database. None of the bugs appear to be data-threatening. |