Reputation: 3281
Scenario. Team foundation server 2010 source control:
I was not having tfs credentials hence was accessing tfs using another users credentials to get projects ,map it to local directory and it was working okay.
Now the question is, I have got my own tfs credentials hence is it possible that I just switch my already mapped projects in local to my own user credentials?
Upvotes: 0
Views: 773
Reputation: 10080
MSDN definition for workspace "A workspace for Visual Studio Team Foundation Server comprises a set of working folder mappings. These mappings represent the location of your client-side folders on your local disk and the corresponding Repository Folders. In addition, the name of the workspace owner and the name of the computer on which the workspace is used are also stored in Team Foundation Server.
"
So a workspace has information about the username, machine name and the local folder which together forms the workspace mapping. By default TFS does not allow two users to be mapped to the same folder on a machine (and rightly so!). There are ways to overcome this default behaviour wiht option 1.
Option 1: Is to make use of the Public workspace functionality. You read more about that: PUBLIC WORKSPACES
Option 2: To make use of the /UpdatUserName option in the WORKSPACES COMMAND. But this option would only work if the username has been renamed (the Security Identification Information SID remains the same). SO in your case this wont work, as it is a different user altogether.
Option 3: Use Shelveset: you simply shelve the entire workspace of the old user and unshelve it over the new workspace for the new user, this will make sure that you have all the changes preserved.
Option 4: If you want to just delete the old workspace and map it to the new user ID. You can always make use tf workspace /delete <DEVBoxName>;<OldUser> /server:http://<SERVERName>
. Read more about it TF WORKSPACE Command. Deleting the workspace wont preserve your old changes.
I would personally use the Shelveset option as it makes sure that my changes are shelved onto the server and wont lose it regardless.
Upvotes: 1