4

In the context of the TFS version control SDK (Microsoft.TeamFoundation.VersionControl), what exactly is deletionID?

It is a property of Microsoft.TeamFoundation.VersionControl.Client.Item. It is also a parameter to some of the query methods on Microsoft.TeamFoundation.VersionControl.Client. I'm trying to figure out exactly what it means, and how it might impact queries.

Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130

2 Answers2

3

I feel your pain, the TFS API documentation is atrocious. That said, here's my best attempt at guessing what DeletionID is so far.

When TFS deletes an item it really just sets the DeletionID and keeps the item around. Items that aren't deleted have a DeletionID of 0.

Some methods accept a DeletionID to refer to the items that were previously deleted, in case you wanted to undelete them, for example.

phloopy
  • 5,563
  • 4
  • 26
  • 37
  • Thanks. Let me know if if you saw any way to query anything by DeletionID. – Frank Schwieterman Jun 08 '10 at 21:05
  • 2
    This is weird. I can see a folder/branch that is deleted but the DeletionId is still 0 (using `new ItemSpec(path, RecursionType.None)`). Similarly, `VersionControlServer.ServerItemExists` can return true for some paths even though they are deleted as well. – kamranicus Sep 15 '11 at 20:44
0

The docs for the tf command line utility include the only official documentation of deletionId I've found so far:

Quoted from Undelete Command:

deletionID: Specifies a unique identifier that disambiguates multiple deleted items with the same name.

PhilS
  • 1,634
  • 14
  • 23