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

We have several developers who no longer work here, but did not check all their changes in Team Server before they were released.
Now their usernames no longer exist, and I can’t access their pending changes to undo them ....

+4
source share
3 answers

I found a way that does not need a command line.

With Power Tools installed (both in 2008 and in 2010), Visual Studio shows a node for team members in each project. If you right-click on one of the participants, you can view all their pending changes. So far, nothing new. BUT, I suddenly saw in the upper right corner of the pending list of changes a link that says "Change request."

I opened a window and it had an input field that allowed me to change the username. I changed it to the username I wanted and got a list of pending changes!

Here's a link to Power Tools TFS 2008:

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

and Power Tools TFS 2010:

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

Edit woppers:

I do not have enough Rep to comment, so I need to do the editing. I had the same problem as the OP, but I work in TFS 2013, so the procedure is slightly different. Here is what I did.

Switch to:

  • Version Control Explorer
  • Right-click the collection you are working in.
  • To find
  • Find changes ...
  • Enter your LanID in the "By user:" field
  • Click Search
  • Click Find
  • This will show you all your pending changes.
  • Highlight one of them and click "Details ..." to view the information in them.
+14
source

As a TFS administrator, you should have some kind of global validation option.

something like this on 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

+4
source

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

  • Right-click the folder in the source code explorer> Find> Find by Status and enter * as wild card. You can reduce the results to a specific user if you know the username.
  • When the results appear, you can right-click and select Cancel. The output window should confirm success.

Please note that if the workspace of former employees is on another PC, you will continue to view pending changes, but they will no longer interfere with verification, assembly, etc. I assume that deleting the workspace of former employees will save you from pending (now canceled) changes, but I have not tried it yet.

+1
source

Source: https://habr.com/ru/post/1334323/


All Articles