com.starteam.diff
Class StarTeamMerge

java.lang.Object
  extended by com.starteam.diff.StarTeamMerge

public final class StarTeamMerge
extends java.lang.Object

Run a simple merge


Nested Class Summary
static class StarTeamMerge.FileDetails
          Details of the file involved in the merge.
 
Constructor Summary
StarTeamMerge()
           
 
Method Summary
 DiffCompare getComparer()
          Returns the comparer being used; defaults to the BasicCompare
 File.EOLFormat getEOL()
          Returns the eolFormat being used; defaults to the platform EOL
 boolean getOverlapOnly()
          return true if overlapping content is being output
 boolean getShowFromCommon()
          return true to include changed lines from the common file
 boolean merge(StarTeamMerge.FileDetails mine, StarTeamMerge.FileDetails common, StarTeamMerge.FileDetails yours, StarTeamMerge.FileDetails output)
          Performs a three-way merge of two text files and their common ancestor.
static EditCollection rollback(java.io.File tip, java.io.File skipRevision, java.io.File reference, java.lang.String encoding, java.io.File merged)
          rollback a revision of a file 'somewhere in the middle' of the set of all revisions
 void setComparer(DiffCompare comparer)
          Set the comparer to use
 void setEOL(File.EOLFormat eol)
          Set the eolFormat to use
 void setOverlapOnly(boolean overlap)
          set to True to output overlapping content
 void setShowFromCommon(boolean show)
          set to True to include changed lines from the common file defaults to false
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StarTeamMerge

public StarTeamMerge()
Method Detail

setComparer

public void setComparer(DiffCompare comparer)
Set the comparer to use

Parameters:
comparer - the comparer

getComparer

public DiffCompare getComparer()
Returns the comparer being used; defaults to the BasicCompare

Returns:
the comparer being used

setEOL

public void setEOL(File.EOLFormat eol)
Set the eolFormat to use

Parameters:
eol - the eolFormat in use

getEOL

public File.EOLFormat getEOL()
Returns the eolFormat being used; defaults to the platform EOL

Returns:
the eolFormat being used

setShowFromCommon

public void setShowFromCommon(boolean show)
set to True to include changed lines from the common file defaults to false

Parameters:
show - to include changed lines from the common file

getShowFromCommon

public boolean getShowFromCommon()
return true to include changed lines from the common file

Returns:
true to include changed lines from the common file

setOverlapOnly

public void setOverlapOnly(boolean overlap)
set to True to output overlapping content

Parameters:
overlap - to output overlapping content

getOverlapOnly

public boolean getOverlapOnly()
return true if overlapping content is being output

Returns:
true if overlapping content is being output

merge

public boolean merge(StarTeamMerge.FileDetails mine,
                     StarTeamMerge.FileDetails common,
                     StarTeamMerge.FileDetails yours,
                     StarTeamMerge.FileDetails output)
              throws java.io.IOException,
                     DiffException
Performs a three-way merge of two text files and their common ancestor.

Parameters:
mine - Details of the first file to be merged.
common - Details of the common ancestor of the two files to be merged.
yours - Details of the second file to be merged.
output - Details of the output file where the merged results are written.
Returns:
true if conflicts were found; false otherwise.
Throws:
java.io.IOException
DiffException
See Also:
BasicCompare

rollback

public static EditCollection rollback(java.io.File tip,
                                      java.io.File skipRevision,
                                      java.io.File reference,
                                      java.lang.String encoding,
                                      java.io.File merged)
                               throws java.io.IOException
rollback a revision of a file 'somewhere in the middle' of the set of all revisions

Parameters:
tip, - the 'tip' content of the file w.r.t. which the revision needs to be rolled back
skipRevision - the revision of the file representing the content to be rolled back
reference - the revision of the file not containing the revision to be skipped, (this would be expectedly the revision prior to the revision to be skipped)
encoding - an encoding specified by the caller, or null to signify the platform encoding
merged - the tip file with the relevant content removed
Returns:
a reference to the edit collection of unresolved, unmatched edits
Throws:
java.io.IOException


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.