Files and Projects in Visual SourceSafe
A Visual SourceSafe database stores its data in the form of files, for example, text files. Visual SourceSafe can maintain multiple versions of a file, including a record of the changes to the file from version to version. You never work with the master copy of a file that is stored in a Visual SourceSafe database except when comparing another copy to it. A file is shown in the file list in the file pane of Visual SourceSafe Explorer.
Visual SourceSafe groups files into projects within the database. Projects are shown in the project list in the project pane of Visual SourceSafe Explorer.
How Visual SourceSafe Identifies File Type
When you add a file to a Visual SourceSafe database, it is automatically assigned a type, either text or binary. Visual SourceSafe identifies a text file as a file that contains only characters, and considers Unicode and XML characters to be text. Visual SourceSafe considers all other types of files as binary.
To determine file type, Visual SourceSafe scans a file for NULL characters (bytes with value 0). If it finds such a character, it identifies the file as binary. Although generally accurate, this method can incorrectly assign the text file type to a binary file. Therefore, Visual SourceSafe lets you explicitly set the file type when you add a file to a database. After you add a file, it retains the type you have assigned, unless you explicitly change it. For more information, see How to: Add Files to a Database.
Although Visual SourceSafe can use its reverse delta storage on all files, both text and binary, there are significant differences in how the files are treated internally.
Storing changes. It is important for Visual SourceSafe to correctly identify file type. Text files have distinct lines as units of comparison, while binary files have no obvious line delimiters. Therefore Visual SourceSafe must use different mechanisms for storing changes for text files and binary files.
Show Differences command. Visual SourceSafe stores each change to a binary file as a small record of bytes that have moved. This is useful for reconstructing earlier versions, but not for display. Visual SourceSafe can tell you if the file has changed, but cannot display how the file has changed.
Merging binary files. Visual SourceSafe cannot perform this operation.
Multiple checkouts on binary files. Visual SourceSafe cannot perform this operation.
End-of-line (EOL) characters. For a text file, Visual SourceSafe automatically translates EOL characters between different operating systems. For a binary file, Visual SourceSafe does not change the contents of the file except with keyword expansion. For more information, see Keyword Expansion Support.
Text File Encoding
Visual SourceSafe supports several types of encoding for text files: ANSI (MBCS), Unicode, Unicode Big Endian, and Unicode (UTF-8). By default, Visual SourceSafe uses Unicode (UTF-8) encoding for text files. For more information, see How to: Set Text Encoding for a File.
Visual SourceSafe Projects
A Visual SourceSafe project is a group of related files in a database, for example, all the files required to develop a specific software component. You can define a project in any way that is meaningful to you and your team. For example, you can define one project per version, or one project per development language. For more information about defining projects, see Designing Projects for Your Team.
A Visual SourceSafe database organizes projects just like Windows organizes file directories, using date/time stamps. You can group files in subprojects within a parent project. The database displays all available projects and the project hierarchy in the project pane of Visual SourceSafe Explorer.
File and Project Tracking
The primary function of Visual SourceSafe is the control of different copies of database files and projects. Each copy of a particular item is known as a version. Visual SourceSafe maintains file and project versions as described in Version Control.