views:

326

answers:

2

If i make a label in TFS, and later make a new label with the same name... then the old label is replaced by the new one.

How do I prevent TFS from overwriting a label?

+1  A: 

The following MSDN article covers using the Scope of a label to try and minimize the occurrences of these mishaps:

Using the /Child Option to Avoid Labeling Mishaps

If you issue a label command together with a pre-existing label name and an itemspec that includes files that are already marked by the same label, the value of the /child option determines whether the marked files are updated with new revision information. That is, the files are labeled by the same name, but have different scope.

sixlettervariables
A: 

Thanks, that led me on the right track.

It seems that the label overwrite is a "feature" and not a bug. It's working as designed sixletter's link above explains it, and below are two more with info about it.

http://msdn.microsoft.com/en-us/library/ms181439(VS.80).aspx http://msdn.microsoft.com/en-us/library/ms181440(VS.80).aspx

Apparently TFS labels are not a snaphot of a point in time like in other VCS's , though i do not fully understand the explanation.

Sebastian