Fog Creek Software
Discussion Board




MS Visual SourceSafe usage question

I'm trying to manage vendor-supplied code for a Web-based intranet application. We're in system test right now, and are getting new versions every couple days as we report bugs and they get fixed (or not). Our vendor is not terribly disciplined (and neither are we) so I'm trying to advise on some config-management strategies. I know how I'd do this on *nix, but don't know how to handle some of the issues on Windows.

As a Web app, the app has a bunch of disparate parts: HTML & ASP pages, images, etc. which go in directories; DLLs that go in other directories; SQL scripts which reconstitute or patch the database (mainly with structure), config files (global.asa, etc.)....

The vendor usually sends us an installer; sometimes it's just a zip file with some changed objects, sometimes it's a full-blown build.

On *nix with something like CVS, I'd:

- create an 'installation' workarea
- update it with whatever the latest version is in source control
- run the installer against that workarea, overwriting some of the stuff that was updated
- check the contents of the workarea into source control, perhaps tagging the files. Now source control has a new version of the app
- run a report that tells me what files changed
- go to the testing environment
- update from source control, retreiving the files that were checked in from the installation workarea

update might run a script that does some environment-specific fixups or gets env-specific files (e.g. variants of gloabl.asa that contain the appropriate server names)

update might run a script that applies other changes like running the SQL scripts that were retrieved, to update the DB structure.

When it all passed testing, I'd do the same to install the production version -- move to that environment, and update it from source control.

On VSS, how much of this can I do? And, importantly, what about things an app installer might do beyond just copying files -- like creating or changing Registry entries? What does a Windows installer do to 'register' an app so it appears in the Add/Remove Programs? How does one do that with VSS?

Any info appreciated!

odinprotectsus
Tuesday, March 16, 2004

As someone well versed in version control, dump VSS.  It sux.  Big time.  IMHO, you're better off zipping up everything you get from them and stashing the dated zips (vendor-04-mar-16.zip) in a directory somewhere.

If you're a CVS guy then get Cygwin, grab CVS and any other tools you use.  I don't know if you can setup a CVS server under cygwin, but at least you have the client.  If management balks then feel free to stuff it into VSS, but use your CVS repository behind the scenes.

Snotnose
Tuesday, March 16, 2004

VSS - never had a problem ever, people winge about it, most of them have never experienced a problem either.

Weird, it's a great little tool for the small guy, even some of the big guys too.

Realist
Wednesday, March 17, 2004

You don't need cygwin if you want to use CVS on Windows.
http://www.cvsnt.org has the command line and the server, and http://www.tortoisecvs.org and http://www.cvsgui.org have different GUI clients.

Chris Tavares
Wednesday, March 17, 2004

Whoops, I always get that one wrong. http://www.wincvs.org is the other gui client.

Chris Tavares
Wednesday, March 17, 2004

If you have no legacy repository, you might also consider Subversion (which can be found at [ http://subversion.tigris.org ], which you should feel at home with given your CVS background. It's quickly getting all of the good CVS "additional" stuff (CVSTrac -> SVNTrac; TortoiseCVS -> TortoiseSVN; WinCVS -> RapidSVN; there's also Visual Studio integration whose name eludes me).

If all else fails, plain CVS (preferably CVSNT) works extremely well.

Problems with sourcesafe: It relies on CLIENT clocks, which works reasonably well if they are sufficiently synchronized (within a few seconds) but never works perfectly. It has braindead branching semantics (CVS has a braindead implementation, but the semantics are reasonable). It requires extensive SMB/CIFS access to work  - forget about using it through high latency WAN connections (unless you shell out some more for Source Offsite).

CVS and SVN are free, and though the setup is slightly more involved, they are significantly better. Why would anyone use SourceSafe at all?

Ori Berger
Wednesday, March 17, 2004

vote++ for subversion - I have been running it for a month on a largish multi-deleveloper project, and it is fantastic (coming from a 7 year diet of cvs).

Rhys Keepence
Wednesday, March 17, 2004

Realist>> VSS - never had a problem ever, people winge about it, most of them have never experienced a problem either.

Well, chalk me up as one of the people who have had problems with it - it completely trashed several source files when the disk it was on filled up during a checkin.

I also agree with the brain-dead branching/merging/etc. You don't have to use it to know that it's inferior, a simple product comparison will do.

My current company is using it, but mainly because it works (sort of) with the legacy FoxPro apps (Fox uses binary files to store some of the 'source' - screens, reports and such).

RocketJeff
Wednesday, March 17, 2004

I have used VSS, CVS, and PVCS Version manger, I can honstly say I have had issues with all three that I did not like.  If I were you I would use CVS under Cygwin or CVSNT to do what you want because you are familure with the interface.

If you do not mind scripting in (in a true scripting language) or writing  special executibles you can do every thing you mentioned with VSS commandline / COM interface.

As far as what an installer does to get an app in the a uninstall list is write a registry key to HKLM\SOFTWARE\Microsoft\Windows\Current Version\Unistal\ProgramName
Then it has to have a DisplayName Key and An UninstallString (which is the commad that actually uninstalls the software) I know for certain that the MSDN site has deeper information if you have the time.

A Software Build Guy
Wednesday, March 17, 2004

Meant to write "command" above

A Software Build Guy
Wednesday, March 17, 2004

Frist I noticed I misspelled several words above Namely "Manager" in "PVCS Version Manager" and  "uninstall in the Registry Key I mentioned

Rocket Jeff,
Binary support in CVS and VSS are about the same,  as far as I can tell (requires additional set in CVS but it can be done).  I would think some of the comerical porducts would work much better in that enviroment.  Would not Perforce or the like be more usable?  (I realize there is also tool expense and the like so I am more curious about this then any thing)

A Software Build Guy
Wednesday, March 17, 2004

A Software Build Guy,
Sorry, I didn't explain clearly enough - it isn't just supporting Binary files.

Visual FoxPro's IDE uses MS's source control integration to check in/out files from the IDE. It also has the feature of taking the Binary screen/report/... file and converting it to/from a plain text file for the source control system (enabling delta-storage and diffs).

It's because of this feature (binary/text conversion) that we devided on VSS. Yes, the feature would probably work with other source control programs - we just didn't want to have to try getting it to work or worry about it.

In a few years, FoxPro should be history here and then we can see what would be the best source control system (the next version of VSS does seem interesting).

RocketJeff
Wednesday, March 17, 2004

ACK! I should have mentioned this: It's NOT AN OPTION to dump MS VSS in our shop. We're wall-to-wall MS, VSS is our standard source control tool for all projects, internal and external. On the side, I've used CVS and I'm in the process of converting to Subversion (while still playing with arch and Perforce). I got burned a years back with VSS, and I've spent a lot of time in unix environments, so I have no love for VSS and know the arguments fairly well.

This wasn't meant to be a thread about pros and cons of VSS -- rather, since it's what I have to work with, I'm seeking to find how I'd do something with VSS that is fairly straightforward in CVS or Subversion.

Thanks!

odinprotectsus
Wednesday, March 17, 2004

Build Guy,
Thanks for the pointers -- I'll follow up the scripting capabilites and the Uninstall Registry key on MSDN.

odinprotectsus
Wednesday, March 17, 2004

*  Recent Topics

*  Fog Creek Home