6

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....

Lea Cohen
  • 7,990
  • 18
  • 73
  • 99

3 Answers3

14

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.
PhillyStafford
  • 627
  • 1
  • 7
  • 18
Lea Cohen
  • 7,990
  • 18
  • 73
  • 99
  • 2
    In case anyone gets a bit lost, the Team Members node appears in the Team Explorer window in VS2010 after installing the Power Tools. – DeanOC Feb 07 '12 at 21:44
  • You can also accomplish this by right clicking your Team Project or folder in Source Control Explorer > Find In Source Control > Status. This opens the same window as the Modify Query link. – xr280xr Dec 04 '13 at 21:25
5

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

Rumplin
  • 2,703
  • 21
  • 45
1

To expand a bit on the awesome answer provided by xr280xr... I needed to undo pending changes of a former employee, and this worked for me on a TFS 2013 server, using VS2015 on my own desktop:

  1. Right click the folder in Source Control Explorer > Find > Find by Status and enter * as a wild card. You can reduce the results to a specific user if you know the user name.
  2. When the results appear, you can right-click and select Undo. The Output window should confirm success.

Note that if the former employees' workspace is on another PC, you'll continue to see the pending changes they have, but they will no longer prevent checkout, build, etc. I'm guessing that deleting the former employees workspace will get rid of the pending (now-undone) changes, but I haven't tried it yet.

help-info.de
  • 6,695
  • 16
  • 39
  • 41