private void conflictResolved()

in src/org/jetbrains/tfsIntegration/core/tfs/conflicts/ResolveConflictHelper.java [214:255]


  private void conflictResolved(final Conflict conflict, final Resolution resolution, final @NotNull String newLocalPath, boolean sendPath)
    throws TfsException, VcsException {
    WorkspaceInfo workspace = myConflict2Workspace.get(conflict);

    VersionControlServer.ResolveConflictParams resolveConflictParams =
      new VersionControlServer.ResolveConflictParams(conflict.getCid(), resolution, LockLevel.Unchanged, -2,
                                                     sendPath ? VersionControlPath.toTfsRepresentation(newLocalPath) : null);

    ResolveResponse response =
      workspace.getServer().getVCS().resolveConflict(workspace.getName(), workspace.getOwnerName(), resolveConflictParams, myProject,
                                                     TFSBundle.message("reporting.conflict.resolved"));

    final UpdatedFiles updatedFiles = resolution != Resolution.AcceptMerge ? myUpdatedFiles : null;

    if (response.getResolveResult().getGetOperation() != null) {
      ApplyGetOperations.DownloadMode downloadMode =
        resolution == Resolution.AcceptTheirs ? ApplyGetOperations.DownloadMode.FORCE : ApplyGetOperations.DownloadMode.MERGE;

      final Collection<VcsException> applyErrors = ApplyGetOperations
        .execute(myProject, workspace, Arrays.asList(response.getResolveResult().getGetOperation()), ApplyProgress.EMPTY, updatedFiles,
                 downloadMode);
      if (!applyErrors.isEmpty()) {
        throw TfsUtil.collectExceptions(applyErrors);
      }
    }

    if (response.getUndoOperations().getGetOperation() != null) {
      final Collection<VcsException> applyErrors = ApplyGetOperations
        .execute(myProject, workspace, Arrays.asList(response.getUndoOperations().getGetOperation()), ApplyProgress.EMPTY, updatedFiles,
                 ApplyGetOperations.DownloadMode.FORCE);
      if (!applyErrors.isEmpty()) {
        throw TfsUtil.collectExceptions(applyErrors);
      }
    }

    if (resolution == Resolution.AcceptMerge) {
      if (myUpdatedFiles != null) {
        myUpdatedFiles.getGroupById(FileGroup.MERGED_ID).add(newLocalPath, TFSVcs.getKey(), null);
      }
    }
    myConflict2Workspace.remove(conflict);
  }