views:

32

answers:

2

I want to delete one file, e.g. Foo1.aspx, then rename another, Foo2.aspx, as Foo1.aspx. However, even after the deletion, I can't rename Foo2.aspx, presumably because TFS keeps around the original for recovery purposes.

Is there a way to do this, other than selecting the contents of Foo2. aspx and pasting it into Foo1.aspx?

+1  A: 

You can use the tf destroy command, you can specify to keep the historical data associated with the file even if you do destroy it.

fletcher
+1 thanks - Larry
Larry Watanabe
+2  A: 

Did you check in the deletion? With TFS, whenever you rename or delete files, it's vital to check them in before you try to make any other edits to the file.

You could also use the "tf destroy" command line utility to permanently delete the "deleted" file. Fully destroying it will lose its history, however.

The simplest is as you've already suggested: just overwrite the text in the file with the new contents.

Jason Williams
+1 thanks - Larry
Larry Watanabe
The key is checking in the delete of Foo1.aspx before renaming Foo2.aspx to Foo1.aspx. After that you'll be ok.
Ryan Cromwell
Jason - thanks! +1
Larry Watanabe