com.microsoft.tfs.core.clients.versioncontrol.conflicts
Class MergeConflictDescription

java.lang.Object
  extended by com.microsoft.tfs.core.clients.versioncontrol.conflicts.ConflictDescription
      extended by com.microsoft.tfs.core.clients.versioncontrol.conflicts.VersionConflictDescription
          extended by com.microsoft.tfs.core.clients.versioncontrol.conflicts.MergeConflictDescription

public class MergeConflictDescription
extends VersionConflictDescription

This is a merge conflict, occurring when you attempt to merge two branches, and a file has been changed in both branches. Note that in Visual Studio UI parlance, "accept theirs" means to accept the merge source; "accept yours" means to accept the merge target. Updated for TFS 2010.

Since:
TEE-SDK-10.1

Constructor Summary
protected MergeConflictDescription(Workspace workspace, Conflict conflict, ItemSpec[] conflictItemSpecs)
           
 
Method Summary
protected  boolean filesRenamed()
           
 ConflictCategory getConflictCategory()
          Gets the category of this conflict
 java.lang.String getDescription()
          A long description of this conflict, suitable for display to the user.
 java.lang.String getLocalFileDescription()
          The local file in a merge conflict is called the "source".
 java.lang.String getName()
          A short description of the conflict, eg "Version Conflict"
 java.lang.String getRemoteFileDescription()
          The server file in a merge conflict is called the "target".
 ConflictResolution[] getResolutions(ConflictResolutionContributor resolutionContributor)
          Gets the resolution options for this particular conflict with the available merge toolset.
 java.lang.String getServerPath()
          Gets the server filename affected by this conflict.
protected  boolean targetRenamed()
          Exists only to be overridden by merge.
 
Methods inherited from class com.microsoft.tfs.core.clients.versioncontrol.conflicts.VersionConflictDescription
analyzeConflict, clearAnalysis, filesRenamedOnly, getChangeDescription, hasAnalyzed, isEncodingChange, isResolutionEnabled, showChangeDescription
 
Methods inherited from class com.microsoft.tfs.core.clients.versioncontrol.conflicts.ConflictDescription
getConflict, getConflictItemSpecs, getLocalPath, getLocalPath, getWorkspace, isBaseless, loadContributedResolutions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeConflictDescription

protected MergeConflictDescription(Workspace workspace,
                                   Conflict conflict,
                                   ItemSpec[] conflictItemSpecs)
Method Detail

getConflictCategory

public ConflictCategory getConflictCategory()
Gets the category of this conflict

Overrides:
getConflictCategory in class VersionConflictDescription
Returns:
A ConflictCategory for this conflict

getName

public java.lang.String getName()
A short description of the conflict, eg "Version Conflict"

Overrides:
getName in class VersionConflictDescription
Returns:
A String representing the short description of the conflict

getDescription

public java.lang.String getDescription()
A long description of this conflict, suitable for display to the user. eg ("You have a conflicting pending change.")

Overrides:
getDescription in class VersionConflictDescription
Returns:
A string representing the description of the conflict

getLocalFileDescription

public java.lang.String getLocalFileDescription()
The local file in a merge conflict is called the "source". Gets the description of the local file. For most conflicts, this is generally called the "local" file.

Overrides:
getLocalFileDescription in class ConflictDescription
Returns:
A String representing the name of the server file

getRemoteFileDescription

public java.lang.String getRemoteFileDescription()
The server file in a merge conflict is called the "target". Gets the description of the server's file. For most conflicts, this is generally called the "server" file.

Overrides:
getRemoteFileDescription in class ConflictDescription
Returns:
A String representing the name of the server file

getServerPath

public java.lang.String getServerPath()
Description copied from class: ConflictDescription
Gets the server filename affected by this conflict. Defaults to the your server file, unless it does not exist, then tries base server file and finally their server file.

Overrides:
getServerPath in class ConflictDescription
Returns:
The server filename affected by this conflict.

filesRenamed

protected boolean filesRenamed()
Overrides:
filesRenamed in class VersionConflictDescription

targetRenamed

protected boolean targetRenamed()
Description copied from class: VersionConflictDescription
Exists only to be overridden by merge.

Overrides:
targetRenamed in class VersionConflictDescription
Returns:
true if the target was renamed

getResolutions

public ConflictResolution[] getResolutions(ConflictResolutionContributor resolutionContributor)
Gets the resolution options for this particular conflict with the available merge toolset. If the toolset is not null and contains a matching tool, external resolution options may be available.

Overrides:
getResolutions in class VersionConflictDescription
Parameters:
resolutionContributor - an object which contributes resolutions for conflicts. May be null, but external resolution options won't be available.
Returns:
An array of ConflictResolutions for this particular conflict.


© 2015 Microsoft. All rights reserved.