Class DefaultSVNMerger
- java.lang.Object
-
- org.tmatesoft.svn.core.internal.wc.AbstractSVNMerger
-
- org.tmatesoft.svn.core.internal.wc.DefaultSVNMerger
-
- All Implemented Interfaces:
ISVNMerger
public class DefaultSVNMerger extends AbstractSVNMerger implements ISVNMerger
- Since:
- 1.2.0
- Version:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description private ISVNConflictHandlermyConflictCallbackprivate SVNDiffConflictChoiceStylemyDiffConflictStyleprivate static java.util.ListSTATUS_ORDERING
-
Constructor Summary
Constructors Constructor Description DefaultSVNMerger(byte[] start, byte[] sep, byte[] end)Deprecated.DefaultSVNMerger(byte[] start, byte[] sep, byte[] end, ISVNConflictHandler callback)Deprecated.DefaultSVNMerger(byte[] start, byte[] sep, byte[] end, ISVNConflictHandler callback, SVNDiffConflictChoiceStyle style)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private SVNStatusTypeapplySingleGenericPropertyChange(java.lang.String localPath, boolean isDir, SVNStatusType status, SVNProperties workingProps, java.lang.String propName, SVNPropertyValue baseValue, SVNPropertyValue oldValue, SVNPropertyValue newValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, java.util.Collection conflicts, boolean dryRun)private SVNStatusTypeapplySingleMergeInfoPropertyChange(java.lang.String localPath, boolean isDir, SVNStatusType status, SVNProperties workingProps, java.lang.String propName, SVNPropertyValue baseValue, SVNPropertyValue oldValue, SVNPropertyValue newValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, java.util.Collection conflicts, boolean dryRun)private SVNStatusTypeapplySinglePropertyAdd(java.lang.String localPath, boolean isDir, SVNStatusType status, SVNProperties workingProps, java.lang.String propName, SVNPropertyValue baseValue, SVNPropertyValue newValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, java.util.Collection conflicts, boolean dryRun)private SVNStatusTypeapplySinglePropertyChange(java.lang.String localPath, boolean isDir, SVNStatusType status, SVNProperties workingProps, java.lang.String propName, SVNPropertyValue baseValue, SVNPropertyValue oldValue, SVNPropertyValue newValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, java.util.Collection conflicts, boolean dryRun)private SVNStatusTypeapplySinglePropertyDelete(java.lang.String localPath, boolean isDir, SVNStatusType status, SVNProperties workingProps, java.lang.String propName, SVNPropertyValue baseValue, SVNPropertyValue oldValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, java.util.Collection conflicts, boolean dryRun)private voidchangeProperty(SVNProperties properties, java.lang.String propName, SVNPropertyValue propValue)SVNDiffConflictChoiceStylegetDiffConflictStyle()protected DefaultSVNMergerActiongetMergeAction(SVNMergeFileSet files, SVNMergeResult mergeResult)private static SVNStatusTypegetPropMergeStatus(SVNStatusType status, SVNStatusType newStatus)protected SVNMergeResulthandleChooseBase(SVNMergeFileSet files)protected SVNMergeResulthandleChooseConflicted(boolean chooseMine, SVNMergeFileSet files)protected SVNMergeResulthandleChooseMerged(SVNMergeFileSet files, SVNMergeResult mergeResult)protected SVNMergeResulthandleChooseRepository(SVNMergeFileSet files)protected SVNMergeResulthandleChooseWorking(SVNMergeFileSet files)protected SVNMergeResulthandleMarkBinaryConflicted(SVNMergeFileSet files)protected SVNMergeResulthandleMarkConflicted(SVNMergeFileSet files)protected SVNMergeResulthandleMarkResolved(SVNMergeFileSet files, SVNMergeResult mergeResult)protected SVNMergeResulthandleMarkTextConflicted(SVNMergeFileSet files)protected voidmakeBinaryConflictEntry(SVNMergeFileSet files, java.lang.String newFilePath, java.lang.String oldFilePath)protected voidmakeTextConflictEntry(SVNMergeFileSet files, java.lang.String mineFilePath, java.lang.String newFilePath, java.lang.String oldFilePath)private booleanmaybeGeneratePropConflict(java.lang.String localPath, java.lang.String propName, SVNProperties workingProps, SVNPropertyValue oldValue, SVNPropertyValue newValue, SVNPropertyValue baseValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, boolean isDir, boolean dryRun)protected SVNStatusTypemergeBinary(java.io.File baseFile, java.io.File localFile, java.io.File repositoryFile, SVNDiffOptions options, java.io.File resultFile)SVNMergeResultmergeProperties(java.lang.String localPath, SVNProperties workingProperties, SVNProperties baseProperties, SVNProperties serverBaseProps, SVNProperties propDiff, SVNAdminArea adminArea, SVNLog log, boolean baseMerge, boolean dryRun)GivenadminArea/localPathand property changes (propDiff) based onserverBaseProps, merges the changes into the working copy.protected SVNStatusTypemergeText(java.io.File baseFile, java.io.File localFile, java.io.File latestFile, SVNDiffOptions options, java.io.File resultFile)protected voidpostMergeCleanup(SVNMergeFileSet files)protected SVNMergeResultprocessMergedFiles(SVNMergeFileSet files, SVNMergeResult mergeResult)voidsetDiffConflictStyle(SVNDiffConflictChoiceStyle diffConflictStyle)-
Methods inherited from class org.tmatesoft.svn.core.internal.wc.AbstractSVNMerger
getConflictEndMarker, getConflictSeparatorMarker, getConflictStartMarker, getDiffOptions, mergeText
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.tmatesoft.svn.core.wc.ISVNMerger
mergeText
-
-
-
-
Field Detail
-
STATUS_ORDERING
private static java.util.List STATUS_ORDERING
-
myConflictCallback
private ISVNConflictHandler myConflictCallback
-
myDiffConflictStyle
private SVNDiffConflictChoiceStyle myDiffConflictStyle
-
-
Constructor Detail
-
DefaultSVNMerger
public DefaultSVNMerger(byte[] start, byte[] sep, byte[] end)Deprecated.- Parameters:
start-sep-end-callback-
-
DefaultSVNMerger
public DefaultSVNMerger(byte[] start, byte[] sep, byte[] end, ISVNConflictHandler callback)Deprecated.- Parameters:
start-sep-end-callback-
-
DefaultSVNMerger
public DefaultSVNMerger(byte[] start, byte[] sep, byte[] end, ISVNConflictHandler callback, SVNDiffConflictChoiceStyle style)
-
-
Method Detail
-
mergeProperties
public SVNMergeResult mergeProperties(java.lang.String localPath, SVNProperties workingProperties, SVNProperties baseProperties, SVNProperties serverBaseProps, SVNProperties propDiff, SVNAdminArea adminArea, SVNLog log, boolean baseMerge, boolean dryRun) throws SVNException
Description copied from interface:ISVNMergerGivenadminArea/localPathand property changes (propDiff) based onserverBaseProps, merges the changes into the working copy.- Specified by:
mergePropertiesin interfaceISVNMerger- Parameters:
localPath- working copy path base nameworkingProperties- working propertiesbaseProperties- pristine propertiesserverBaseProps- properties that come from the serverpropDiff- property changes that come from the repositoryadminArea- admin area object representing the.svn<./code> admin area of the target which properties are mergedlog- loggerbaseMerge- if false, then changes only working properties; otherwise, changes both the base and working propertiesdryRun- if true, merge is simulated only, no real changes are done- Returns:
- result of merging
- Throws:
SVNException
-
getDiffConflictStyle
public SVNDiffConflictChoiceStyle getDiffConflictStyle()
-
setDiffConflictStyle
public void setDiffConflictStyle(SVNDiffConflictChoiceStyle diffConflictStyle)
-
mergeBinary
protected SVNStatusType mergeBinary(java.io.File baseFile, java.io.File localFile, java.io.File repositoryFile, SVNDiffOptions options, java.io.File resultFile) throws SVNException
- Specified by:
mergeBinaryin classAbstractSVNMerger- Throws:
SVNException
-
mergeText
protected SVNStatusType mergeText(java.io.File baseFile, java.io.File localFile, java.io.File latestFile, SVNDiffOptions options, java.io.File resultFile) throws SVNException
- Specified by:
mergeTextin classAbstractSVNMerger- Throws:
SVNException
-
processMergedFiles
protected SVNMergeResult processMergedFiles(SVNMergeFileSet files, SVNMergeResult mergeResult) throws SVNException
- Specified by:
processMergedFilesin classAbstractSVNMerger- Throws:
SVNException
-
getMergeAction
protected DefaultSVNMergerAction getMergeAction(SVNMergeFileSet files, SVNMergeResult mergeResult) throws SVNException
- Throws:
SVNException
-
handleChooseBase
protected SVNMergeResult handleChooseBase(SVNMergeFileSet files) throws SVNException
- Throws:
SVNException
-
handleChooseRepository
protected SVNMergeResult handleChooseRepository(SVNMergeFileSet files) throws SVNException
- Throws:
SVNException
-
handleChooseConflicted
protected SVNMergeResult handleChooseConflicted(boolean chooseMine, SVNMergeFileSet files) throws SVNException
- Throws:
SVNException
-
handleChooseWorking
protected SVNMergeResult handleChooseWorking(SVNMergeFileSet files) throws SVNException
- Throws:
SVNException
-
handleMarkConflicted
protected SVNMergeResult handleMarkConflicted(SVNMergeFileSet files) throws SVNException
- Throws:
SVNException
-
handleMarkBinaryConflicted
protected SVNMergeResult handleMarkBinaryConflicted(SVNMergeFileSet files) throws SVNException
- Throws:
SVNException
-
makeBinaryConflictEntry
protected void makeBinaryConflictEntry(SVNMergeFileSet files, java.lang.String newFilePath, java.lang.String oldFilePath) throws SVNException
- Throws:
SVNException
-
handleMarkTextConflicted
protected SVNMergeResult handleMarkTextConflicted(SVNMergeFileSet files) throws SVNException
- Throws:
SVNException
-
makeTextConflictEntry
protected void makeTextConflictEntry(SVNMergeFileSet files, java.lang.String mineFilePath, java.lang.String newFilePath, java.lang.String oldFilePath) throws SVNException
- Throws:
SVNException
-
handleChooseMerged
protected SVNMergeResult handleChooseMerged(SVNMergeFileSet files, SVNMergeResult mergeResult) throws SVNException
- Throws:
SVNException
-
handleMarkResolved
protected SVNMergeResult handleMarkResolved(SVNMergeFileSet files, SVNMergeResult mergeResult) throws SVNException
- Throws:
SVNException
-
postMergeCleanup
protected void postMergeCleanup(SVNMergeFileSet files) throws SVNException
- Throws:
SVNException
-
applySinglePropertyAdd
private SVNStatusType applySinglePropertyAdd(java.lang.String localPath, boolean isDir, SVNStatusType status, SVNProperties workingProps, java.lang.String propName, SVNPropertyValue baseValue, SVNPropertyValue newValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, java.util.Collection conflicts, boolean dryRun) throws SVNException
- Throws:
SVNException
-
changeProperty
private void changeProperty(SVNProperties properties, java.lang.String propName, SVNPropertyValue propValue)
-
applySinglePropertyChange
private SVNStatusType applySinglePropertyChange(java.lang.String localPath, boolean isDir, SVNStatusType status, SVNProperties workingProps, java.lang.String propName, SVNPropertyValue baseValue, SVNPropertyValue oldValue, SVNPropertyValue newValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, java.util.Collection conflicts, boolean dryRun) throws SVNException
- Throws:
SVNException
-
applySingleMergeInfoPropertyChange
private SVNStatusType applySingleMergeInfoPropertyChange(java.lang.String localPath, boolean isDir, SVNStatusType status, SVNProperties workingProps, java.lang.String propName, SVNPropertyValue baseValue, SVNPropertyValue oldValue, SVNPropertyValue newValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, java.util.Collection conflicts, boolean dryRun) throws SVNException
- Throws:
SVNException
-
applySingleGenericPropertyChange
private SVNStatusType applySingleGenericPropertyChange(java.lang.String localPath, boolean isDir, SVNStatusType status, SVNProperties workingProps, java.lang.String propName, SVNPropertyValue baseValue, SVNPropertyValue oldValue, SVNPropertyValue newValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, java.util.Collection conflicts, boolean dryRun) throws SVNException
- Throws:
SVNException
-
applySinglePropertyDelete
private SVNStatusType applySinglePropertyDelete(java.lang.String localPath, boolean isDir, SVNStatusType status, SVNProperties workingProps, java.lang.String propName, SVNPropertyValue baseValue, SVNPropertyValue oldValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, java.util.Collection conflicts, boolean dryRun) throws SVNException
- Throws:
SVNException
-
getPropMergeStatus
private static SVNStatusType getPropMergeStatus(SVNStatusType status, SVNStatusType newStatus)
-
maybeGeneratePropConflict
private boolean maybeGeneratePropConflict(java.lang.String localPath, java.lang.String propName, SVNProperties workingProps, SVNPropertyValue oldValue, SVNPropertyValue newValue, SVNPropertyValue baseValue, SVNPropertyValue workingValue, SVNAdminArea adminArea, SVNLog log, boolean isDir, boolean dryRun) throws SVNException- Throws:
SVNException
-
-