Xiao Rookie
Source: http://www.cnblogs.com/52XF/p/4239056.html
When using TFS for source control, the VS default allows multiple checkouts, but in team development it is often necessary to set up exclusive locks (exclusive locks) to avoid collisions, and setting up exclusive locks does not need to be set on the TFS Web page, just set it in vs.
One, cancel enable multiple checkout
1. Open vs2013--Team--team project Settings--source Control--Checkout settings--Remove the Tick "enable multiple checkout". Note here that the "enable get Latest version on checkout" option is not checked by default, for convenience, we check it on, check out the code later, the system will automatically get the latest version, click "OK" to save the settings. (Note: checking the "Enable get Latest version on checkout" option setting will affect the rollback version of the operation!) because the normal rollback version of the operation is: Right-click on the file-source control-get a specific version-check out-check-in-resolve conflicts when the local version is preserved. )
To set the result diagram:
2, in order to facilitate the viewing effect, we set the check-out window prompt lock, specific steps: Open vs--Tool--------------------------------check-in item--edit--Prompt to lock on checkout-OK
VS2013 setting the prompt to lock the interface diagram when checking out:
3, set up after we check out a file to see the effect.
Well, why not "check out-prohibit other users from checking out and checking in"? This is because we are missing a very important step in the setup, and we continue to look down.
Second, set up the work area
1. Open the vs--team--Connect to Team Foundation server--double-click the project you want to set on the Team Explorer-Home page-click Source Code Manager.
2. Source Control Explorer--click "Workspace" drop-down box, select "Workspace"--click "Edit" in the "Manage Workspace" pop-up box.
3. Edit Workspace-Advanced (A) >>.
4. Go to "edit Workspace", the "location" option in TFS defaults to "local", and if you want to check out exclusively, you must set it to "server".
5. Click "OK" and wait for the operation to complete.
"Edit Workspace"
Once setup is complete, we'll check out a file to see the effect.
"Check out exclusive lock":
After the above settings can achieve exclusive checkout, but need to each team member manually set up VS, do not know if there is no better way, if there is, please leave a message, thank you!
In addition, if you want the siege lions to write comments when they check in the code, just click on "Team--team project Settings-source Control-check-in policy-add-change set annotation policy-ok-OK".
TFS2013 Set Check out exclusive lock (reprint)