How to revert / undo unchanged files in TFS?

 

Questions


I would like to know if there is a usefull command for undoing unchanged files in TFS.

I have tried with the “tfpt uu” command. But it only undoes/reverts the files that was unchanged on the server and in my local workspace. Eg. all the files that was changed on the server but wasn’t touched in the workspace is left as checked out. What I want is to revert/undo all the files that was unchanged in my workspace. The tfpt uu-command seems to be useless for the scenario.

How can i revert/undo unchanged files in TFS, where the definiton of an unchanged file is a file that was not changed in the workspace.

Example:

I have two workspaces ws1 and ws2. Ws2 is for simulating an other user making source changes in TFS and ws1 represents my own workspace. We have 3 files A, B and C.

  1. Checkout all files on ws1. (A, B and C are checked out)
  2. Change file A in ws2.
  3. Check In file A in ws2.
  4. Change file B in ws1.
  5. Execute tfpt uu on ws1.

The only file reverted/undone is C. The files A and B are still checked out in ws1

I would expect that both A and C where reverted/undone, since they have not been changed in ws1.

 

 

————————————————-

Answer

Specify the /noget option on tfpt uu, and I think you will get the behavior you are after.

tfs,tfs2010

Facebook Comments

Post a comment