locked
Team Foundation server undo checkout from a dead computer. RRS feed

  • Question

  • I use TFS 2010 in Visual Studio 2012.

    I checked out some files in workspace on a computer that died.

    I restarted my project on a new computer with a new computer name. How can I undo check out on a computer that does not exist anymore?


    Certified Geek

    Monday, August 26, 2013 7:31 PM

Answers

  • I just had this problem myself and found an easier way to clean up old workspaces.

    1) In visual studio, open source control explorer.

    2) From the 'Workspace' dropdown select 'Workspaces...'

    3) A dialog will appear showing the workspaces on your current PC. Select 'Show remote workspaces'

    4) You will now also see workspaces from your previous PC (as long as they are from the same user account). Select the old workspace(s) and click 'Remove'. This should delete the old workspace from from TFS along with any persisting checkouts.

    I'm sure Arne has found a solution but I hope this helps others who google the issue.

    • Proposed as answer by alexrobinson Sunday, September 8, 2013 11:58 PM
    • Marked as answer by Arne MN Monday, September 9, 2013 11:47 AM
    Sunday, September 8, 2013 11:57 PM
  • The check-outs are still part of the workspace that you used on your old computer. If you remove that old workspace the check-outs will automatically be gone. This is what I recommend in your case since that workspace should be removed anyway. You can achieve this using the following command:

    tf.exe workspace /delete /collection:<url> <workspacename;workspaceowner

    If you do not know the name of the workspace (or the owner) you can query TFS for existing workspaces using the following command (notice the plural, i.e. workspaces instead of workspace:

    tf.exe workspaces /collection:<url>

    Note that the workspaces you see depends on your permissions so you might need to use a different user account.

    • Marked as answer by Arne MN Tuesday, August 27, 2013 2:37 PM
    Tuesday, August 27, 2013 8:55 AM

All replies

  • Hi Arne,

    You can undo using tfs power tool:

    http://stackoverflow.com/questions/1690351/how-to-undo-another-users-checkout-in-tfs-via-the-gui

    Or you can undo command if you don't want power tools

    http://msdn.microsoft.com/en-us/library/c72skhw4.aspx

    Regards

    -------------

    Please use Mark as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Monday, August 26, 2013 7:37 PM
  • I tried Attrice.TeamFoundation.Sidekicks.10. All it does is put up a message box that says cannot read registry.

    Power less app. It can't even get out of bed.


    Certified Geek



    • Edited by Arne MN Monday, August 26, 2013 8:36 PM
    Monday, August 26, 2013 8:19 PM
  • I tried the TF undo command but I had no luck so far.


    Certified Geek

    Monday, August 26, 2013 8:34 PM
  • Try power tools, but consider that you have to be in the administration group of the collection.

    You can downloaded from here:

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

    http://stackoverflow.com/questions/1690351/how-to-undo-another-users-checkout-in-tfs-via-the-gui

    -------------

    Please use Mark as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    Monday, August 26, 2013 9:18 PM
  • Hi Arne, 

    Thanks for your post.

    First, find out that files be checked out under which Workspace, then execute tf undo command to undo them.

    How did execute the tf command line, and which detailed result you received? Please share the detailed information here.


    John Qiao [MSFT]
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, August 27, 2013 1:35 AM
    Moderator
  • The check-outs are still part of the workspace that you used on your old computer. If you remove that old workspace the check-outs will automatically be gone. This is what I recommend in your case since that workspace should be removed anyway. You can achieve this using the following command:

    tf.exe workspace /delete /collection:<url> <workspacename;workspaceowner

    If you do not know the name of the workspace (or the owner) you can query TFS for existing workspaces using the following command (notice the plural, i.e. workspaces instead of workspace:

    tf.exe workspaces /collection:<url>

    Note that the workspaces you see depends on your permissions so you might need to use a different user account.

    • Marked as answer by Arne MN Tuesday, August 27, 2013 2:37 PM
    Tuesday, August 27, 2013 8:55 AM
  • wonderful/wunderbar

    Certified Geek

    Tuesday, August 27, 2013 2:37 PM
  • I just had this problem myself and found an easier way to clean up old workspaces.

    1) In visual studio, open source control explorer.

    2) From the 'Workspace' dropdown select 'Workspaces...'

    3) A dialog will appear showing the workspaces on your current PC. Select 'Show remote workspaces'

    4) You will now also see workspaces from your previous PC (as long as they are from the same user account). Select the old workspace(s) and click 'Remove'. This should delete the old workspace from from TFS along with any persisting checkouts.

    I'm sure Arne has found a solution but I hope this helps others who google the issue.

    • Proposed as answer by alexrobinson Sunday, September 8, 2013 11:58 PM
    • Marked as answer by Arne MN Monday, September 9, 2013 11:47 AM
    Sunday, September 8, 2013 11:57 PM
  • Thanks @alexrobinson

    that was the easiest and the fastest way

    Monday, August 3, 2015 8:39 AM
  • Thanks for the answer

    Ashwin Bhagwat | My Blog | Twitter | E-Mail

    Tuesday, June 20, 2017 8:56 AM