Share via


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.

Required Permissions

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

  1. Locate the label you wish to edit. For more information, see How to: Find Labels.

  2. Select the label you want to edit, and click Edit.

    The Edit Label for <label name> dialog box appears.

  3. In the Edit Label dialog box, add any notes in the Comment text box.

  4. In the Items list, select the items in the changeset you want to remove, and then click Remove.

  5. Click Add to add more items to the label.

    The Choose Item Version dialog box appears.

  6. Use the Look in list to find the team project or folder that contains the item or items you want to add.

  7. Use the Items of type box to filter on the type of items you want to add.

  8. Use the Version box to select one of the following:

    • Latest Version

      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.

    • Changeset

      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.

    • Date

      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.

    • 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.

    • Workspace Version

      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

  9. In the Edit Label dialog box, click OK.

To edit a label from the command line

  1. Click Start, click All Programs and point to Microsoft Visual Studio 2008.

  2. Point to Visual Studio Tools and then click Visual Studio 2008 Command Prompt.

  3. Type cd path, where path is the directory containing the applicable workspace. If the path or the label contain spaces, enclose it in quotes.

  4. 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).

See Also

Concepts

Working with Labels

Working with Version Control Changesets

Reference

Label Command (Team Foundation Version Control)