I was struggling when I need to undo lock by another developer who leave the team but check out every single line of my code.
Due to this, I send few hours to find ways to undo the lock. So to do this, I need 2 things.
1) User Name (very simple...since I already have this)
2) Workspace name (damn... I need to call the developer to get this)
For the 2nd item, it is kinda hard to get since the developer is living on the other part of the world. So to do this, I found out that there is one command we can use to find out.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC> tf workspaces /owner:[username] /s:https://tfs.codeplex.com/tfs/tfs20
With the command above you will get the output like below...
Collection: tfs.codeplex.com\TFS20
Workspace Owner Computer Comment
--------- ----------- -------- ------------------------------------------------
(clipped)
From this, I manage to get the workspace name (which is the first field) from the listing.
Then I just need to type another command to undo everything
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>tf undo /workspace:[workspace name];[user id] /recursive $/simweb /s:https://tfs.codeplex.com/tfs/tfs20
Then its done!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment