Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to undo pending changes in TFS of users that no longer exist

Tags:

tfs

We have a few developers who don't work here anymore, but didn't check all theirs changes into Team Server before they left.
Now their usernames don't exists anymore, and I can't access their pending changes to undo them....

like image 481
Lea Cohen Avatar asked Jan 05 '11 08:01

Lea Cohen


2 Answers

I found a way, not needing command line.

With Power Tools installed (both in 2008 and in 2010 version), Visual Studio shows a node for Team Members in each project. If you right-click on one of the members, you can choose to view all their pending changes. Till now nothing new. BUT, I suddenly saw, in the right hand upper corner of the pending change list, a link that says "Modify Query".

I opened the window, and in it was an input field that let me change the username. I changed it to the username I wanted, and I got his list of pending changes!

Here's a link to the TFS 2008 Power Tools:

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=FBD14EEA-781F-45A1-8C46-9F6BA2F68BF0

and the TFS 2010 Power Tools:

http://visualstudiogallery.msdn.microsoft.com/en-us/c255a1e4-04ba-4f68-8f4e-cd473d6b971f

Edit by woppers:

I don't have enough Rep to comment so I have to make an edit. I had the same issue as the OP but I am working in TFS 2013 so the procedure is slightly different. Here's what I did.

Go to:

  1. Source Control Explorer
  2. right click on the collection you are working in
  3. Find
  4. Find Changesets...
  5. Enter your LanID in the “By user:” field
  6. Click search
  7. Click find
  8. That will show you all of your pending changes.
  9. Highlight one of them and click “Details...” to view the info in them.
like image 100
Lea Cohen Avatar answered Sep 22 '22 20:09

Lea Cohen


As an administrator of TFS you should have some option of global check in.

something like that in the command line: tf lock /lock:none /workspace:workspace;username $/code/foo.cs /s:http://server:8080

or better yet:

tf undo /workspace:workspace;username $/code/foo.cs /s:http://server:8080

like image 39
Rumplin Avatar answered Sep 24 '22 20:09

Rumplin