How to: Edit Labels
In Team Foundation version control, a label is a name applied to a specific set of revisions, which are also known as a snapshot build. For more information, see How to: Apply Labels. Team Foundation version control includes functionality for adding or removing items from these labels as described in the following procedure.
To perform these procedures, you must own the label or have the Administer shelved changes permission set to Allow. For more information, see Team Foundation Server Permissions.
To edit labels
Locate the label you wish to edit. For more information, see How to: Find Labels.
Select the label you want to edit, and click Edit.
The Edit Label for <label name> dialog box appears.
In the Edit Label dialog box, add any notes in the Comment text box.
In the Items list, select the items in the changeset you want to remove, and then click Remove.
Click Add to add more items to the label.
The Choose Item Version dialog box appears.
Use the Look in list to find the team project or folder that contains the item or items you want to add.
Use the Items of type box to filter on the type of items you want to add.
Use the Version box to select one of the following:
If you select Latest Version, the latest version of the file or files is added to the Item name box. Click OK and the item or items in the latest version are added to the label.
If you select Changeset, you can either type the changeset name in the Changeset box, or click the ellipses (…) to find a changeset. The Find Changesets dialog box appears. For more information about finding a changeset, see How to: Find a Changeset.
Select a changeset in the Results list and click OK. Then click OK on the Choose Item Version dialog box and the items in the changeset you selected are added to the label.
If you select Date, you can either type a date, or select a date from a calendar. Click OK and the item or items corresponding to the date version are added to the label.
If you select Label, you can either type the label name in the Label box, or click the ellipses (…) to find a label. The Find Label dialog box appears. For more information about finding labels, see How to: Find Labels.
Select a label in the Results list and click OK. Then click OK on the Choose Item Version dialog box and the items in the label you selected are added to the label.
If you select Workspace Version, the current workspace is filled in the Workspace Version box by default in server name; owner format.
Click OK to add the workspace version of items to the label
In the Edit Label dialog box, click OK.
To edit a label from the command line
Click Start, click All Programs and point to Microsoft Visual Studio 2008.
Point to Visual Studio Tools and then click Visual Studio 2008 Command Prompt.
Type cd path, where path is the directory containing the applicable workspace. If the path or the label contain spaces, enclose it in quotes.
Type tf label mylabel path /recursive.
This command attaches the "mylabel" label to an existing label in the workspace version of the "path" folder and all of the files and folders it contains.
Note For a complete listing of the syntax for the label command, see Label Command (Team Foundation Version Control).