Welcome to MSDN Blogs Sign in | Join | Help

How to undo a pending change in a workspace you no longer have

Not that it’s a huge deal to have stale workspaces lying around, but if you’ve ever wondered how to undo a pending change on a workspace you no longer have (e.g. if you repaved your computer to install Windows 7 and didn’t delete your TFS workspaces first), here’s how to do it:

1. Fire up the Visual Studio command prompt (Start –> Visual Studio –> Visual Studio Tools, Visual Studio Command Prompt)

2. If you have a valid workspace against the server of interest, change into that directory.

3. Run the following tf.exe command:

tf undo /workspace:OLDWORKSPACENAME <filespec…>

For example:

tf undo /workspace:VistaLaptop $/Spark/WidgetBox/ /r

In this example, the name of the old workspace I’m trying to undo changes from is “VistaLaptop”.  The filespec for the changes I’m undoing is “$/Spark/WidgetBox”, which is a folder name.  To undo all the changes I had pending against that tree, I added the “/r” (recursive) switch.

If you don’t have a valid workspace against that server anymore, you can just add the /server switch to specify the server name or URL.

Published Monday, August 10, 2009 11:05 AM by JasonBa

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Monday, August 10, 2009 12:02 PM by Nick

# re: How to undo a pending change in a workspace you no longer have

You could also do the undo from the result screen of the "Find by status" power toy, directly inside of Visual Studio.

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker