Labeling a version

When your project has reached a certain milestone (such as a build candidate) and you wish to identify a version at a particular point in time you can use the Label task to isolate a set of files. A label set does not have to be comprised of files from a single directory location-you may select files or folders from across versions or locations to add to the label.

To label a set of files complete the following tasks:

  1. Locate a project directory or file in your Source Control view. Right-click it and from the context menu select Apply Label...

  2. In the Chose Item Version dialog, select a server folder or file you want to add to your label (you can add more later). Select the version. In our example, we select Latest Version . For an explanation of other version types and their associated dialogs, see the User Guide section, Selecting a Version Type from the version drop-down menu.

  3. The Apply Label dialog lists all the files in the selected project. The Item lists a path to the changeset in the source control repository. The Version, in this instance, indicates you are marking the latest version. When you retrieve this label and open the dialog the Version value is replaced by the actual changeset number in the repository. (See image below.)

  4. If you have additional directories that you want to add, select Add.

  5. In the Chose Item Version, make another selection. Since our project ships with documentation, we add to the label set, the documentation project, help.mediamill.com. When you complete adding all the projects, click OK. TFS stores the label markers on the files.

Retrieving a label

You can retrieve a Label set using the Teamprise Find Label task. The Find Label task is also available from the Get Specific task for developers who want to retrieve a label set to a workspace. To retrieve a label from the Team menu complete the following:

  1. Right-click a source-controlled file in your Eclipse resource view and click Find Label.

  2. In the Find Label dialog, enter a project or user name and select Find. If there is more than one Team project on your TFS server, the Project drop down menu displays these.

Editing a label

If you wish to modify a label you have retrieved, click Edit in the Find Label dialog. You can add to or remove files from the label set (though you cannot change the label name.)

Note: The number in the Version column refers to the changeset number of the file on which the version was labeled. A "latest" project in your repository may be comprised of any number of changesets. For example, if you rarely modify a file, the changeset number rarely increases. But if you modify a file and check it in often the number increases; TFS creates a new changeset with each check-in. You can view a history of changesets on a single file using the Teamprise View History task.


Related Tasks:

Comparing versions
Viewing history