Here’s a little internal Microsoft dirt: I’m the person behind the scenes who reviews and approves or rejects all gotdotnet User Samples submissions. For the record, this will not always be my job (things change) but for now, I actually look forward to completing at least one routine and manual task a day. Sure, I’ve considered automating the approval process. That’s the Microsoft way, right? For now though, I’ve decided that this task is a healthy and valuable exercise insofar as it forces me to evolve and broaden my technical skills and more importantly, it approximates me to the interests of gotdotnet users.
On Monday, a former teammate on the Visual SourceSafe Team (GDN handle: patmccor) uploaded a new source/version control utilities for VSS: VSSDATAWIZ. I saw and excitedly approved datawiz and a companion tool, fixref goes with datawiz within minutes. Unfortunately, patmccor’s description of the new VSS admin tools were not exactly illuminating. So I asked him for more details. Joila! He provides the following description.
What is DATAWIZ?
Datawiz is primarily used to remove “orphan projects” and fix file pathing problems in Visual SourceSafe. Orphan projects are created when:
- A deleted and destroy operation that does not complete due to an interruption in the destroy process
- Destroys on branched to projects never really remove the files (this is due to a link that exists from the branch from file which datawiz also cleans up)
Problem Datawiz solves: orphaned VSS projects take up lots of extra disk space and cause Analyze to run longer than needed. If you’ve ever run Analyze.exe on a big database, you know that “longer than needed” can be one heckuva long time.
When do you know that you should run Datawiz?
When running Analyze.exe, you receive an error message of the following type:
“The Parent Project for item index.htm (agypaaaa) is corrupt and the link to the child file has been lost until the project is recovered.”
“The project testproj references a child whose physical file (VOALAAAA) is missing or corrupted.”
Sometimes other errors can be cleaned up serendipitously because the files that contain the errors are also orphans.
Pathing problems can occur if a project is renamed or moved. The path information is hard coded into each project file.
This information only affects the labels directory. If the pathing information is inconsistent with the path, and you try to get the project files by label (SS Get proj1 -Llabelname), you might see the message “Version not found.”
Analyze does not always detect or fix this type of error. When analyze does detect this error it returns this error message:
“The parent project name was corrupt $/BASES/Finance/test/WinForms/WINFORMS the real name should be $/BASES/Finance/test/WinForms/WINFORMS1.”
Caution: Datawiz is a beta-quality tool and is officially unsupported by Microsoft. Use at your own risk.
Taking a backup of your VSS database is always a good idea.
Datawiz part 1 can be run against a live database and does not change anything. When your the datawiz batch file, it creates a backup of all the files it changes and it generates another batch file to undo the changes made.
To realize extra benefits, you should also run:
Ss physical $/ -r –ophysicalbefore.txt
Ss physical $/ -r –ophysicalafter.txt
Before and after running the datawiz batch file (you may need to set the ssdir variable to point to the database e.g set ssdir=//machine/vss), you can use VSS to diff your files and determine if there any changes were made. The two files should be identical.
Datawiz also includes a special query that provides a report of the file share links that exist in your database. This query is informational only.
Finally, and perhaps most importantly, a fully tested version of the datawiz utility will be bundled into the Visual SourceSafe 2005 Analyze.exe release.