Using Visual SourceSafe – Label

This article is a part of SourceSafe / VSS Tutorial

Label Introduction

Visual SourceSafe allows you to define a label for a file or project version. A label is a short and concise description given for purposes of identification, for example, “3.0Beta” or “Release”. Label is one way in Visual SourceSafe that allows us to keep track of the file and project versions. By using Label, we can smoothly manage version releases/builds and easily find the previous versions, especially the project versions. You must have the Add/Rename/Delete permission to use the Label command.

Label is a very useful and important feature in any version control system. If we just released version 3.1.2 yesterday, we may be able to find the release version of 3.1.2. But how about 1 month or even 1 year later, can we still find that particular version? Without a label, it is not likely.

 

How to Label a File/Project

We can label the current version and a historical version of a file or project.
To label the current version of a file or project:

  1. Select the file or project to label in Visual SourceSafe Explorer.
  2. Click Label on the menu File.
  3. Input a label text in the Label edit box in the Label dialog box, as seen in the following screen shot:

Label File
(Label File)

Label Project
(Label Project)

To label an historical version of a file or project:

  1. Select the file or project to label in Visual SourceSafe Explorer.
  2. Click Show History on the Tools menu.
  3. Click OK in the History Options dialog box.
  4. Select the version of file or project to be labeled.
  5. Click Details in the History of File/Project dialog box.
  6. Input a label text in the Label edit box in the History Details dialog box, as seen in the following screen shot:

Label History Version of a Project
(Label History Version of a Project)

 

Please note that when we label a project, all the files and subprojects in that project inherit the label.

 

How to Modify a Label

We can modify the label of a file or project in the History Details dialog box, as seen in the following screen shot:

History Details
(History Details)

 

If we modify the label of a project, the label of the files and subprojects in that project will be changed accordingly.

 

How to Get Files/Projects by Label

We can get a file with specific label. To do so, we can follow steps below:

  1. Select the file to get in the Visual SourceSafe Explorer.
  2. Click Show History on the menu Tools.
  3. Set options as seen in the following screenshot to show file versions only between label 2 and label 3 in the History Options dialog box.

    History Options
    (History Options)

  4. Click Get to retrieve the selected version of the file in the History of <file name> dialog box, as seen in the following screen shot:

History of <file name>
(History of <file name>)

 

Scenarios When Label May Be Performed

  • Assign a label to a new version of the file or project to keep track of the file and project versions.
  • Edit a label in the History Details dialog box to assign a new label to an existing version.
  • Get by label on the labeled files or projects.

 

SourceAnywhere - the SQL Server-based SourceSafe Replacement The SQL Server-based Source Control Software Designed to be a SourceSafe Replacement SourceAnywhere for VSS - the Fastest SourceSafe Remote Access Tool Recommended by Microsoft The Fastest SourceSafe Remote Access Tool Recommeded by Microsoft

Links:
Previous article <<<<: Cloak in SourceSafe / VSS
Next article >>>>: Pin in SourceSafe / VSS
SourceSafe How To series home page: VSS / SourceSafe Tutorial

15 thoughts on “Using Visual SourceSafe – Label

  1. A quick question, can you somehow search all files which have been checked in WITHOUT a label being added?

  2. that’s pretty informative and have elaborateness and get lots benefit from the VSS article.

  3. Really helpful tutorial.

    Bit of an issue/query I hope someone can help with.

    I apply a label to a project (and therefore subprojects and files) and immediately go to History and try to recursively check out using the label. The folder structure is created in the check out folder but no files are checked out. Instead I get the message “Cannot check out an old version of a file” for seemingly every file.

    I understand that for obvious reasons I cant check out old versions of files, only the latest but having applied the label immediately before trying to check out surely the label is on the latest versions.

    Any advice would be appreciated.

    Thanks.

  4. Hi!!

    I am trying to get some folders that have labelled in VSS. What I ahve done is:
    $
    Product
    ACCESSORIES A
    Accessories A1 -> Labelled as “For_Product_A”
    Accessories A2 -> Labelled as “For_Product_A”
    ACCESSORIES B
    Accessories B1 -> Labelled as “For_Product_A”
    Accessories B2 -> Labelled as “For_Product_B”

    Now, when I do a Show History (Included Recursive, Include Labels) and then do a GET by selecting the Label “For_Product_A”, i find that that Get is retreiving all the files from ACCESSORIES A & ACCESSORIES B. Why is it so. Can u tell me why this is happening.

    I have also tried by writing a batch file:
    “C:\Program Files\Microsoft Visual Studio\VSS\win32\SS.exe” GET $/Product/*.* -r “-VLFor_Product_A” -yGuest

    This also does not give me any result.

    Can u help me with the labelling issue?
    Thanks in Advance for your help

    Kabini

  5. If I create a label on a project which has subprojects beneath it with files contained in the subprojects, the label is correctly applied to the projects, subprojects and files. If I try to do a get or checkout at the project level by label using the history view, it does not retrieve any subprojects or any of the files under the subprojects. It is possible to get VSS to retrieve any file or subproject underneath a project by label where the label was applied???

  6. Hi Robert,

    No. Only one label can exist on a single file revision. Assigning a new label creates a new version of the file associated with that label, although the file remains the same.

  7. I was hoping you could answer the following. Can a single revision carry more than one label? I realize that labels are unique identifiers so it would be impossible for the same text string to be assigned more than once as a lable on a given revision. But I have used systems in the past where multiple, distinct labels can exist on a single file revision. Is this possible with source safe?

  8. Hi,

    This tutorial is excellent. Before any one starts using VSS if they go thru this tutorial it will be very useful.

    Regards,
    Krishna

Comments are closed.