I wan开发者_如何学Pythont 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?
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.
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.
精彩评论