How to: Label an Item

Visual SourceSafe Explorer uses the Label command on the File menu for associating a label with a version of a file or project. As described in Version Control, labeling is one way that Visual SourceSafe keeps track of file and project versions. You must have the Add/Rename/Delete access right to use the Label command.

Note

You can also enter a label from the History Details dialog box.

Visual SourceSafe defines a label as a string of up to 31 characters. Any of the following is a valid label: "1.0", "2.01b", "Final Beta", and "Approved for QA". Label names cannot start with a capital "L" or "#s".

Consider the following when you use the Label command:

  • Assigning a new label creates a new version of the file or project associated with that label. However, the file or project itself remains the same.

  • Assigning a label to a version that already has a label overwrites the old label. Visual SourceSafe issues a warning before removing the old label.

  • Adding a label to a version in a case where the label was assigned to an earlier version causes Visual SourceSafe to prompt you to remove the old label.

  • Editing a label in the History Details dialog box simply assigns a new label to an existing version.

At a project level, you will probably want to define special descriptive labels, instead of internal version numbers. If you use descriptive text for a label, all the files and subprojects in that project inherit the label. Only rarely should you need to label individual files

Here are some examples of descriptive labels. You might want to identify the beta2 release of a version or component to customers using the label "Beta2PrivateBuildCustomerA". Another example is the label "BugFix:SortOrder_8210" that you might use to highlight the inclusion of a notable bug fix in a component before code integration.

If you want to identify a certain version of a project so that you can come back to it, do not assign a label to every file in the project. Instead, assign the label to the project itself. Even if you add, delete, or rename files in the future, Visual SourceSafe can accurately restore that version of the project based on the project label.

After you apply labels, you can perform a get by label operation on the labeled items. See How to: Get an Item to Your Working Folder.

Note

Labeling is a good mechanism to mark the current snapshot of a development project. Some software development groups label the database with every build.

To label the current version of a file or project:

  1. In Visual SourceSafe Explorer, select the file or project to label.

  2. On the File menu, click Label.

  3. In the Label dialog box, enter descriptive text in the Label box.

  4. Optionally enter a comment for the label in the Comment box.

  5. Click OK.

To label an older version of a file or project:

  1. In Visual SourceSafe Explorer, select the file or project of interest.

  2. On the Tools menu, click Show History.

  3. In the History Options dialog box (for a file) or the Project History Options dialog box (for a project), click OK.

  4. In the History of <name> dialog box (for a file) or the History of Project dialog box (for a project), click Details.

  5. In the History Details dialog box, use the Label box to enter a descriptive label.

  6. Optionally enter a comment for the label in the Comment box.

  7. Click OK.

See Also

Tasks

How to: Get an Item to Your Working Folder
How to: Label an Item Using a SourceSafe Plug-in

Reference

History Details Dialog Box (Explorer and Plug-in)
History of <name> Dialog Box (Explorer and Plug-in)
History of Project Dialog Box (Explorer and Plug-in)
History Options Dialog Box (Explorer and Plug-in)
Label Dialog Box (Explorer)
Project History Options Dialog Box (Explorer and Plug-in)

Concepts

Version Control