Visual SourceSafe 2005 Software Configuration Management in Practice
上QQ阅读APP看书,第一时间看更新

The Visual SourceSafe Database

The central repository for project resources is the Visual SourceSafe database. The physical database storage is the file system on the SourceSafe server machine. The database is accessed by the clients through a Universal Naming Convention (UNC) file share on the server, for example:

\\VssServer\VssDatabase

The structure of a typical SourceSafe database uses the following file and folder organization:

The Visual SourceSafe DatabaseVisual SourceSafe serverXML Web service

User and database options are kept in initialization (.ini) files.

Data Folder

The data folder holds the database data. It contains many physical files with obfuscated names like DCBAAAA that store the real source files added to the database and their history. The data folder is organized in a series of folders from a to z and additional labels, locks, and loggedin folders containing database metadata.

Data Folder

For every file in the project, Visual SourceSafe creates a pair of files in the a to z folders, one with an extension and one without an extension. The file without an extension is the log file for the stored file, containing internal information about which user added the file, the file location, and the differences between file versions (history). The file with an extension (.A or .B) represents the most recent version of the file. Each time the file is checked in, the extension alternates between .A and .B using the extension that doesn't exist at that moment. After the check in, Visual SourceSafe calculates the difference (the delta) between the two file versions and adds the difference to the log file. After adding the difference to the log file, it deletes the old file so at any given time, under normal conditions, there aren't two files with both .A and .B extensions.

The labels folder contains a label cache for the labels applied to projects and files in the database.

The locks folder contains lock files with the .LCK extension for every file locked by SourceSafe. Files are locked during update operations to prevent other users from making modifications while they are being updated.

The loggedin folder contains a file for each logged-in user and an Admin.lck file if the database is locked by an administrator. The database can be locked by an administrator during backup and restore operations or during database maintenance.

The aaaaaaaa.cnt file contains the physical name of the last file added to the database.

The crcs.dat file contains Cyclic Redundancy Check (CRC) information used to speed up the get and check out operations.

The ddcerr.log file contains errors generated by the DDCONV utility. The utility is used to convert different database formats.

The names.dat file contains the names of the files whose full name is longer than 34 characters.

The rights.dat file contains user and project security information and specifies the relationships between users and project rights.

The status.dat file is a cache file that contains check out status information for database files and is used to speed up the display of Visual SourceSafe Explorer.

The um.dat file contains user management information (names and passwords) and a unique database identifier. The database identifier is a Globally Unique Identifier (GUID) .

The version.dat file contains the Visual SourceSafe database version information.

Temp Folder

The temp folder is used by Visual SourceSafe 2005 for older databases to place temporary files while it is running. These files are deleted when SourceSafe closes. For databases created with SourceSafe 2005, a local temporary folder is used instead of a shared network folder. For security reasons it is recommended to use a personalized temporary local folder instead of a folder shared between all SourceSafe users.

Users Folder

The users folder contains a folder for each user configured to use the database. These folders are named as much as possible like the user's name (users\<username>). If the username exceeds eight characters it is truncated. The folder holds user-specific initialization and customization files. Each folder contains an ss.ini file. Each time a user logs from a different computer, this file is used to save window positions and other computer-specific information:

; Your current SourceSafe project.
Project = $/
Checkout_LocalVer_Default = Yes
mssccprj = *.sln, *.vbproj, *.vbp, *.csproj, *.vcproj, *.dsp, *.mdp,
*.mak, *.vfpproj, *.vdp, *.vdproj, *.dbp, *.vsmproj, *.vsmacros,
*.hwproj, *.etp, *.etpproxy, *.actproj, *.atp, *.dmp, *.mdmp, *.dsw,
*.vjsproj, *.csdproj, *.vbdproj
Columns (UI) = 150,85,135,100
Dock_Toolbar (ALEXS) = Yes
Maximized (ALEXS) = Yes
OutputHeight (ALEXS) = 150
Position_Toolbar (ALEXS) = 0, 44, 468, 71, 976, 658
PrjWidth (ALEXS) = 204
Toolbar (ALEXS) = Yes
Toolbar_DockSite (ALEXS) = 59419
Window (ALEXS) = 44, 44, 776, 499, 976, 658

The administrator will also have an ssadmin.ini file, stored in users\admin. This file contains the window and toolbar settings for Visual SourceSafe Administrator:

; ssadmin.ini
;
; This file contains all the variables that "customize" the
; SourceSafe
; Administrator program to your particular needs.
Columns_UI (UI) = 124, 259
Columns (UI) = 150,135,100
Maximized (ALEXS) = Yes
Window (ALEXS) = 223, 103, 701, 380, 984, 657

The users folder also contains a template.ini file used to store default values for new ss.ini files. When new users are created, this file is used to create the default settings for them. If we need to make common settings for new users, we make changes to this file once.

VssWebDownload Folder

The VssWebDownload folder is used as a virtual directory in Internet Information Server (IIS). This folder is used by the SourceSafe internet plug-in, which communicates with the HTTP Web service, to download files from the SourceSafe database.

VssWebUpload Folder

The VssWebUpload folder is used as a virtual directory in IIS. This folder is used by the SourceSafe internet plug-in, which communicates with the HTTP Web service, to upload files to the SourceSafe database.

Srcsafe.ini File

The srcsafe.ini file is used to store global database settings and configuration information for all users. When opening a database, this is the file we have to browse for.

Note

The srcsafe.ini file is read by Visual SourceSafe only when the database is opened (which is generally done at start-up), therefore any configuration changes that occur after that do not affect the client operation. For reconfiguration, the clients have to be restarted.

An example of the contents of srcsafe.ini:

; The two important paths used by SourceSafe.
Data_Path = data
Temp_Path = temp
; This tells admin where to put personal directories for new users.
Users_Path = users
; From this, find users.txt; from that, in turn, find ss.ini for a
; user.
Users_Txt = users.txt
PrjEntryTimeout = 15
Multiple_Checkouts = Yes
Checkout_LocalVer_Disabled = Yes
UseHelperService = Yes
DownloadVDir = VssDownload_db1
UploadVDir = VssUpload_db1
Web_Service = http://win2003e/SourceSafe/VssService.asmx

A closer look at these configuration files is provided in the administration appendixes at the end of the book.

Users.txt File

The users.txt file contains the users configured to use the SourceSafe database and the path to their ss.ini files:

Admin = users\admin\ss.ini
Guest = users\guest\ss.ini
Alexandru = users\alexandr\ss.ini

The file maps the full username with the corresponding folder in the users folder (which is truncated if the username exceeds eight characters).