Rod
Rod

Reputation: 15455

TFS Apply Label - label with name alreay exists

So I'm trying to apply a label to my source in TFS and I'm getting notification that the label name I'm supplying alreay exists.

Now, I agree, the same name exists in another directory in a different solution. So is the label name global to root of TFS?

Upvotes: 1

Views: 165

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51103

Label has a concept of scope.

Label names must be unique throughout a specified scope. When you add a label, you reserve the use of that label name at or under the specified or implied scope. The default value for the @scope parameter is the team project, for example, $/TeamProject1.

So under the same Team Project, the Label name is unique. However, you could use a tf label command to change the scope:

@scope</i></p></td>

Specifies a Team Foundation version control server directory within which the labelname is unique. This parameter lets you independently create, manage, retrieve, and delete one label or set of labeled items when two labels of the same name are in different parts of the Team Foundation version control server.

Upvotes: 1

Related Questions