Oct 28 2008

Label in SourceSafe / VSS

Published by Kevin Gao at 12:39 pm under SourceSafe

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

9 responses so far

9 Responses to “Label in SourceSafe / VSS”

  1. Fabioon 12 Nov 2008 at 1:00 am

    Hello, Good Afternoon!

    Very good!
    You Helped me plenty of with this article. Thanks!

  2. Krishnaon 20 Jan 2009 at 7:55 pm

    Hi,

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

    Regards,
    Krishna

  3. Robert Bourneon 31 Jan 2009 at 6:20 am

    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?

  4. Kevin Gaoon 02 Feb 2009 at 6:49 pm

    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.

  5. Eddieon 02 Feb 2009 at 8:58 pm

    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. Sreejithon 03 Feb 2009 at 8:21 pm

    Excellent article. It helped me a lot.

  7. kabinion 02 Sep 2009 at 3:23 am

    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

  8. Azeemon 23 Jan 2010 at 12:57 am

    That’s great.

  9. annon 06 Jun 2010 at 11:38 pm

    don’t forget recursive.

Trackback URI | Comments RSS

Leave a Reply

Version Control Software/System | Source Control Software/System | Software Configuration Management | SCM Hosting Solution | Bug Tracking System
SourceSafe (VSS) Replacement/Alternative | SourceSafe (VSS) Hosting | SourceSafe (VSS) Remote/Web/Internet Access | Scanner COM
Customer Service Software | Live Chat | Live Help | Forum Software | Knowledge Base Software | Newsletter Email Marketing Software