com.starbase.diff
Class StarTeamMerge

java.lang.Object
  |
  +--com.starbase.diff.StarTeamMerge

public class StarTeamMerge
extends java.lang.Object


Method Summary
static boolean merge(java.io.File mine, java.io.File common, java.io.File yours, DiffCompare compare, java.io.File output, java.lang.String mineLabel, java.lang.String commonLabel, java.lang.String yoursLabel, boolean showFromCommon, boolean overlapOnly)
          Performs a three-way merge of two text files and their common ancestor.
static boolean merge(java.io.File mine, java.io.File common, java.io.File yours, DiffCompare compare, java.io.OutputStream output, java.lang.String mineLabel, java.lang.String commonLabel, java.lang.String yoursLabel, boolean showFromCommon, boolean overlapOnly)
          Performs a three-way merge of two text files and their common ancestor.
static boolean merge(java.io.File mine, java.io.File common, java.io.File yours, DiffCompare compare, java.io.OutputStream output, java.lang.String mineLabel, java.lang.String commonLabel, java.lang.String yoursLabel, boolean showFromCommon, boolean overlapOnly, java.lang.String eol)
          Performs a three-way merge of two text files and their common ancestor.
static boolean merge(java.io.File mine, java.lang.String mineEncoding, java.io.File common, java.lang.String commonEncoding, java.io.File yours, java.lang.String yoursEncoding, DiffCompare compare, java.io.OutputStream output, java.lang.String outputEncoding, java.lang.String mineLabel, java.lang.String commonLabel, java.lang.String yoursLabel, boolean showFromCommon, boolean overlapOnly, java.lang.String eol)
          Performs a three-way merge of two text files and their common ancestor.
static boolean mergeToFile(java.io.File mine, java.io.File common, java.io.File yours, DiffCompare compare, java.io.File output, java.lang.String mineLabel, java.lang.String commonLabel, java.lang.String yoursLabel, boolean showFromCommon, boolean overlapOnly, java.lang.String eol)
          Performs a three-way merge of two text files and their common ancestor.
static boolean mergeToFile(java.io.File mine, java.lang.String mineEncoding, java.io.File common, java.lang.String commonEncoding, java.io.File yours, java.lang.String yoursEncoding, DiffCompare compare, java.io.File output, java.lang.String outputEncoding, java.lang.String mineLabel, java.lang.String commonLabel, java.lang.String yoursLabel, boolean showFromCommon, boolean overlapOnly, java.lang.String eol)
          Performs a three-way merge of two text files and their common ancestor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

merge

public static boolean merge(java.io.File mine,
                            java.io.File common,
                            java.io.File yours,
                            DiffCompare compare,
                            java.io.File output,
                            java.lang.String mineLabel,
                            java.lang.String commonLabel,
                            java.lang.String yoursLabel,
                            boolean showFromCommon,
                            boolean overlapOnly)
                     throws java.io.IOException,
                            DiffException
Performs a three-way merge of two text files and their common ancestor. It uses the platform's default end-of-line sequence for the output.

Parameters:
mine - The first file to be merged.
common - The common ancestor of the two files to be merged.
yours - The second file to be merged.
compare - the method by which lines are compared for equality when computing changes between two files
output - The output file where the merged results are written.
mineLabel - A label to be used to identify the first file in the markup text.
commonLabel - A label to be used to identify the common ancestor in the markup text.
yoursLabel - A label to be used to identify the second file in the markup text.
showFromCommon - if true output will include changed lines from the common file. Typically you'll set this to false.
overlapOnly - if true, do not output information for non-overlapping changes. Typically you'll set this to false.
Returns:
true if conflicts were found; false otherwise.
java.io.IOException
DiffException

mergeToFile

public static boolean mergeToFile(java.io.File mine,
                                  java.io.File common,
                                  java.io.File yours,
                                  DiffCompare compare,
                                  java.io.File output,
                                  java.lang.String mineLabel,
                                  java.lang.String commonLabel,
                                  java.lang.String yoursLabel,
                                  boolean showFromCommon,
                                  boolean overlapOnly,
                                  java.lang.String eol)
                           throws java.io.IOException,
                                  DiffException
Performs a three-way merge of two text files and their common ancestor. All input an output files are assumed to use the ISO-8859-1 encoding.

Parameters:
mine - The first file to be merged.
common - The common ancestor of the two files to be merged.
yours - The second file to be merged.
compare - the method by which lines are compared for equality when computing changes between two files
output - The output file where the merged results are written.
mineLabel - A label to be used to identify the first file in the markup text.
commonLabel - A label to be used to identify the common ancestor in the markup text.
yoursLabel - A label to be used to identify the second file in the markup text.
showFromCommon - if true output will include changed lines from the common file. Typically you'll set this to false.
overlapOnly - if true, do not output information for non-overlapping changes. Typically you'll set this to false.
eol - the end-of-line sequence to use in the output
Returns:
true if conflicts were found; false otherwise.
java.io.IOException
DiffException

mergeToFile

public static boolean mergeToFile(java.io.File mine,
                                  java.lang.String mineEncoding,
                                  java.io.File common,
                                  java.lang.String commonEncoding,
                                  java.io.File yours,
                                  java.lang.String yoursEncoding,
                                  DiffCompare compare,
                                  java.io.File output,
                                  java.lang.String outputEncoding,
                                  java.lang.String mineLabel,
                                  java.lang.String commonLabel,
                                  java.lang.String yoursLabel,
                                  boolean showFromCommon,
                                  boolean overlapOnly,
                                  java.lang.String eol)
                           throws java.io.IOException,
                                  DiffException
Performs a three-way merge of two text files and their common ancestor.

Parameters:
mine - The first file to be merged.
mineEncoding - The first file's encoding.
common - The common ancestor of the two files to be merged.
commonEncoding - The common file's encoding.
yours - The second file to be merged.
yoursEncoding - The second file's encoding.
compare - the method by which lines are compared for equality when computing changes between two files
output - The output file where the merged results are written.
outputEncoding - The output file's encoding.
mineLabel - A label to be used to identify the first file in the markup text.
commonLabel - A label to be used to identify the common ancestor in the markup text.
yoursLabel - A label to be used to identify the second file in the markup text.
showFromCommon - if true output will include changed lines from the common file. Typically you'll set this to false.
overlapOnly - if true, do not output information for non-overlapping changes. Typically you'll set this to false.
eol - the end-of-line sequence to use in the output
Returns:
true if conflicts were found; false otherwise.
java.io.IOException
DiffException

merge

public static boolean merge(java.io.File mine,
                            java.io.File common,
                            java.io.File yours,
                            DiffCompare compare,
                            java.io.OutputStream output,
                            java.lang.String mineLabel,
                            java.lang.String commonLabel,
                            java.lang.String yoursLabel,
                            boolean showFromCommon,
                            boolean overlapOnly)
                     throws java.io.IOException,
                            DiffException
Performs a three-way merge of two text files and their common ancestor. It uses the platform's default end-of-line sequence for the output.

Parameters:
mine - The first file to be merged.
common - The common ancestor of the two files to be merged.
yours - The second file to be merged.
compare - the method by which lines are compared for equality when computing changes between two files
output - The output stream where the merged results are written.
mineLabel - A label to be used to identify the first file in the markup text.
commonLabel - A label to be used to identify the common ancestor in the markup text.
yoursLabel - A label to be used to identify the second file in the markup text.
showFromCommon - if true output will include changed lines from the common file. Typically you'll set this to false.
overlapOnly - if true, do not output information for non-overlapping diffs. Typically you'll set this to false.
Returns:
true if conflicts were found; false otherwise.
java.io.IOException
DiffException

merge

public static boolean merge(java.io.File mine,
                            java.io.File common,
                            java.io.File yours,
                            DiffCompare compare,
                            java.io.OutputStream output,
                            java.lang.String mineLabel,
                            java.lang.String commonLabel,
                            java.lang.String yoursLabel,
                            boolean showFromCommon,
                            boolean overlapOnly,
                            java.lang.String eol)
                     throws java.io.IOException,
                            DiffException
Performs a three-way merge of two text files and their common ancestor. All input an output files are assumed to use the ISO-8859-1 encoding.

Parameters:
mine - The first file to be merged.
common - The common ancestor of the two files to be merged.
yours - The second file to be merged.
compare - the method by which lines are compared for equality when computing changes between two files
output - The output stream where the merged results are written.
mineLabel - A label to be used to identify the first file in the markup text.
commonLabel - A label to be used to identify the common ancestor in the markup text.
yoursLabel - A label to be used to identify the second file in the markup text.
showFromCommon - if true output will include changed lines from the common file. Typically you'll set this to false.
overlapOnly - if true, do not output information for non-overlapping diffs. Typically you'll set this to false.
eol - the end-of-line sequence to use in the output
Returns:
true if conflicts were found; false otherwise.
java.io.IOException
DiffException

merge

public static boolean merge(java.io.File mine,
                            java.lang.String mineEncoding,
                            java.io.File common,
                            java.lang.String commonEncoding,
                            java.io.File yours,
                            java.lang.String yoursEncoding,
                            DiffCompare compare,
                            java.io.OutputStream output,
                            java.lang.String outputEncoding,
                            java.lang.String mineLabel,
                            java.lang.String commonLabel,
                            java.lang.String yoursLabel,
                            boolean showFromCommon,
                            boolean overlapOnly,
                            java.lang.String eol)
                     throws java.io.IOException,
                            DiffException
Performs a three-way merge of two text files and their common ancestor.

Parameters:
mine - The first file to be merged.
mineEncoding - The first file's encoding.
common - The common ancestor of the two files to be merged.
commonEncoding - The common file's encoding.
yours - The second file to be merged.
yoursEncoding - The second file's encoding.
compare - the method by which lines are compared for equality when computing changes between two files
output - The output stream where the merged results are written.
outputEncoding - The output file's encoding.
mineLabel - A label to be used to identify the first file in the markup text.
commonLabel - A label to be used to identify the common ancestor in the markup text.
yoursLabel - A label to be used to identify the second file in the markup text.
showFromCommon - if true output will include changed lines from the common file. Typically you'll set this to false.
overlapOnly - if true, do not output information for non-overlapping diffs. Typically you'll set this to false.
eol - the end-of-line sequence to use in the output
Returns:
true if conflicts were found; false otherwise.
java.io.IOException
DiffException


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.