Freigeben über


Destroy: A new feature for Orcas

Brian Harry mentioned the new Destroy feature in his TFS roadmap post. I thought I would go into a little bit more detail on how destroy works in Orcas. Please do keep in mind that any of this might change / be removed before Orcas ships - so there are no guarantees.

Destroy gives you the ability to permanently delete version control files/folders from TFS.  It can also be used to destroy the file contents while preserving the change set history. Destroy can only be invoked from the command line and here is the syntax for the command line:

tf destroy [/keephistory] <filespec1>[;<VersionSpec>]  <filespec2 ... filespec3> [/stopat:<VersionSpec>] [/preview] [/StartCleanup] [/i]

All filespecs must be server paths. Local file paths aren’t allowed. Destroy is a very dangerous operation, so removing all possible ambiguity about which items will be destroyed is a good idea. Additionally, the user must posess the AdminProjectRights permission in order to destroy items.

If /keephistory is specified then /stopat becomes optional. /stopat is not allowed if /keephistory is not specified. /stopat is the version including and after that destroy will preserve the file contents for. /stopat defaults to tip (the latest version checked in of an item). The command line does not support version ranges and does support DeletionId version specs (‘X’). When /preview is specified the destroy is not actually committed but the output is displayed any way. /stopat is not allowed to take label or workspace version specs.

TFS stores versioned file content orthogonally from the versioned item histories. Destroy removes all of the non-content data when it is invoked. If you immediately want to have the content garbage collected then you should use the /StartCleanup option to destroy. If /StartCleanup is not specified then the content garbage collection will occur when the TFS database maintenance job runs. The job is scheduled to run one once per day by default.

If you have any additional questions about Destroy, feel free to ask.

Bill

Comments

  • Anonymous
    March 30, 2007
    The Version Control Server blog has shown some signs of life. Bill Tutt has written a couple of posts.

  • Anonymous
    March 30, 2007
    The Version Control Server blog has shown some signs of life. Bill Tutt has written a couple of posts

  • Anonymous
    April 13, 2007
    I have a question about such scenario. I have created a source folder names $TP1/Lib1. Then I decided it was all wrong and i deleted it. Because my teammate is still waiting for this Library I created a new one with the same name. Right now I have sometimes problems with getting latest version. I would like to destroy the old folder while keeping the new one. How will I go about it? Your answer will be extremely important to me, as I have many such folders on production server.

  • Anonymous
    May 19, 2007
    Will the Destroy option work even if the destroyed folders and files had participated in branch or merge operations with folders and files that are not destroyed?  (Or will it only work on completely autonomous folders and files?)  I would think that you had thought of these scenarios, but it would be nice to know whether there will be limitations in this regard. I'm also unclear on what is meant by "content" vs. "non-content" data.  Some clarification would be appreciated.

  • Anonymous
    May 21, 2007
    The comment has been removed

  • Anonymous
    December 04, 2007
    Como muchos ya sabr&#233;is hace poco Microsoft lanz&#243; al mercado Visual Studio 2008. Si est&#225;is