Resolve Conflicts between Two Files (Team Explorer Everywhere)

By using Team Foundation version control to manage your files, you can work concurrently with a team member on an asset such as a source-code file. However, if multiple people work concurrently on the same file, sometimes they will have to resolve conflicts.

When you try to perform any of the following operations, a conflict can occur:

  • Get or check in a file: a conflict can occur between the version in your workspace and the version on the server.

  • Merge from one branch to another: a conflict can occur between the version of the file in the source branch and the version of the file in the target branch.

  • Unshelve changes: a conflict can occur between the version in your workspace that you want to unshelve and the version on the server.

While it can be frustrating to encounter conflicts when you are trying to complete an operation, Team Foundation version control provides you with information to help you understand the cause of the conflict, and tools that you can use to resolve the conflict. In many cases, you can use automatic operations such as AutoMerge All or AutoMerge to quickly resolve one or more conflicts.

Required Permissions

To perform these procedures, you must have the Read permission for the item in the source path and Check out permission for the item in the target path set to Allow. If you are renaming the item in the target path, you must have the Check out permission for both the source path and the target path set to Allow. If a lock is involved, you must have the Lock permission set to Allow. For more information, see the following topic on the Microsoft Web site: Team Foundation Server Permissions.

Resolve Conflicts

You must resolve conflicts before you can complete the operation that caused the Resolve Conflicts dialog box to appear. You can instruct the Team Foundation Server plug-in for Eclipse to attempt to automatically resolve all conflicts. Some conflicts must be manually resolved. If you try to automatically resolve one or more changes that cannot be resolved, an error appears.

Note

The procedures in this section assume that you have performed an action that caused the Resolve Conflicts dialog box to appear. If you close the dialog box, you can cause the dialog box to reappear if you retry the same operation.

To automatically resolve all conflicts

  • In the Resolve Conflicts dialog box, click AutoMerge All.

    The Team Foundation Server plug-in for Eclipse attempts to resolve the listed conflicts. If successful, your operation will complete. If the conflicts could not be resolved, an error appears and you must manually resolve the conflicts before your operation can complete.

To manually resolve a single conflict

  1. In the Resolve Conflicts dialog box, click a conflict, and then click Resolve.

    You can also double-click a listed conflict.

    The Resolve Version Conflict dialog box appears. It specifies the reason for the conflict and the local path of the file that is involved in the conflict.

    Warning

    You can also manually resolve multiple conflicts. In the Resolve Conflicts dialog box, select multiple conflicts, and then click Resolve. In the Resolve Selected Conflicts dialog box, click one of the following resolutions: AutoMerge local and server versions, Take Server Version, and Keep local version.

  2. To compare files before you resolve the conflict, click Compare. By default, the local version of the file is compared to the version on the server. You can also open the list on the Compare button to perform additional comparisons.

  3. Specify a resolution option. Your choices depend on the conflict type and the operation that caused the conflict.

    Note

    You can resolve the conflict by using a merge tool that is built in to Eclipse, or you can install an external merge tool. If you have an edit conflict and you have installed an external merge tool, the Merge changes in external merge tool (diffmerge.exe) option appears in the Resolve Version Conflict dialog box.

  4. Click OK to apply the specified resolution.

    The list of remaining changes in the Resolve Conflicts dialog box updates as you resolve each conflict.

  5. When you have resolved all conflicts, click Close.

See Also

Other Resources

Submitting and Undoing Pending Changes (Team Explorer Everywhere)

Getting a Local Copy of Files from the Version Control Server (Team Explorer Everywhere)

Placing Files under Version Control (Team Explorer Everywhere)