Reputation: 9
Unknowingly i deleted a useraccount from TFS server where he doesn't checkin the checkout file.
Now i am facing the merging issue..
Unable to perform operation on $/ERPONCLOUD/Development/V1.5/Source/Presentation/WebUI/Script/ControlPanel/UserCreation.js. The item $/ERPONCLOUD/Development/V1.5/Source/Presentation/WebUI/Script/ControlPanel/UserCreation.js is locked in workspace NCWS054;Suganth.
Regards
Sundar
Upvotes: 0
Views: 437
Reputation: 30432
UPDATE:
Based on Sundaresan's comment below, resolved the issue via create another branch by eliminating the deleted user.
You can try below ways to unlock the file:
tf lock /lock: none
Please see Lock Command for details:To use the lock command, you must have the Lock permission set to Allow. Having the Unlock other user's changes permission set to Allow is required to remove a lock held by another user if you do not have Write permission for that user's workspace
tf lock /lock:none /workspace:workspacename [/recursive][/login:username,[password]] [/collection:TeamProjectCollectionUrl]
UPDATE:
In your case please try below command: (According to the error message,the file is locked in workspace NCWS054 and Suganth, So, you need to unlock in both workspace)
tf lock /lock:none /workspace:NCWS054 $/ERPONCLOUD/Development/V1.5/Source/Presentation/WebUI/Script/ControlPanel/UserCreation.js /login:Domain\user,password /collection:http://servername:8080/tfs/DefaultCollection
tf undo
The undo command removes any locks on the items. See Undo command
To unlock individual files run the command below in Visual Studio Command Prompt:
tf undo "file_path" /workspace:workspace_name
e.g.:
tf undo $/ERPONCLOUD/Development/V1.5/Source/Presentation/WebUI/Script/ControlPanel/UserCreation.js /workspace:NCWS054
To unlock the whole folder in one shot:
tf undo $/ERPONCLOUD/Development/V1.5/Source/Presentation/WebUI/Script/ControlPanel/* /workspace:NCWS054
here it will unlock all files which is inside ControlPanel folder.
UPDATE:
In your case, if it is a remote workspace, please try below command:
tf undo /collection:http://servername:8080/tfs/DefaultCollection /workspace:NCWS054;workspaceOwner $/ERPONCLOUD/Development/V1.5/Source/Presentation/WebUI/Script/ControlPanel/UserCreation.js
You can also unlock other users file using TFS Sidekick tools:
It gives you a graphical interface to do all these commands, which makes it much easier to perform these tasks.
You can also reference this thread: How to unlock a file from someone else in Team Foundation Server
Upvotes: 1
Reputation: 548
If you install TFS PowerTools for whatever version of TFS you have (e.g. TFS 2015 you should use https://marketplace.visualstudio.com/items?itemName=TFSPowerToolsTeam.MicrosoftVisualStudioTeamFoundationServer2015Power)
It adds many useful things, including ways to do this through the UI.
With Powertools installed:
I've had to use this many times because a developer's machine/hard-drive fails, or a mapped workspace folder was accidentally removed, an unused VM was reclaimed before properly disconnected from TFS, etc. I prefer doing it through the UI vs command line.
Upvotes: 0
Reputation: 397
Team Foundation Sidekicks from Attrice (just Google it) are very helpful here. You can find all workspaces and delete the ones that are locking the files you need.
Upvotes: 0