Package org.eclipse.jgit.merge
Class MergeFormatter
- java.lang.Object
-
- org.eclipse.jgit.merge.MergeFormatter
-
public class MergeFormatter extends Object
A class to convert merge results into a Git conformant textual presentation
-
-
Constructor Summary
Constructors Constructor Description MergeFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
formatMerge(OutputStream out, MergeResult<RawText> res, List<String> seqName, String charsetName)
Deprecated.void
formatMerge(OutputStream out, MergeResult<RawText> res, List<String> seqName, Charset charset)
Formats the results of a merge ofRawText
objects in a Git conformant way.void
formatMerge(OutputStream out, MergeResult res, String baseName, String oursName, String theirsName, String charsetName)
Deprecated.void
formatMerge(OutputStream out, MergeResult res, String baseName, String oursName, String theirsName, Charset charset)
Formats the results of a merge of exactly twoRawText
objects in a Git conformant way.
-
-
-
Method Detail
-
formatMerge
@Deprecated public void formatMerge(OutputStream out, MergeResult<RawText> res, List<String> seqName, String charsetName) throws IOException
Deprecated.Formats the results of a merge ofRawText
objects in a Git conformant way. This method also assumes that theRawText
objects being merged are line oriented files which use LF as delimiter. This method will also use LF to separate chunks and conflict metadata, therefore it fits only to texts that are LF-separated lines.- Parameters:
out
- the output stream where to write the textual presentationres
- the merge result which should be presentedseqName
- When a conflict is reported each conflicting range will get a name. This name is following the "<<<<<<< " or ">>>>>>> " conflict markers. The names for the sequences are given in this listcharsetName
- the name of the character set used when writing conflict metadata- Throws:
IOException
-
formatMerge
public void formatMerge(OutputStream out, MergeResult<RawText> res, List<String> seqName, Charset charset) throws IOException
Formats the results of a merge ofRawText
objects in a Git conformant way. This method also assumes that theRawText
objects being merged are line oriented files which use LF as delimiter. This method will also use LF to separate chunks and conflict metadata, therefore it fits only to texts that are LF-separated lines.- Parameters:
out
- the output stream where to write the textual presentationres
- the merge result which should be presentedseqName
- When a conflict is reported each conflicting range will get a name. This name is following the "<<<<<<< " or ">>>>>>> " conflict markers. The names for the sequences are given in this listcharset
- the character set used when writing conflict metadata- Throws:
IOException
- Since:
- 5.2
-
formatMerge
@Deprecated public void formatMerge(OutputStream out, MergeResult res, String baseName, String oursName, String theirsName, String charsetName) throws IOException
Deprecated.Formats the results of a merge of exactly twoRawText
objects in a Git conformant way. This convenience method accepts the names for the three sequences (base and the two merged sequences) as explicit parameters and doesn't require the caller to specify a List- Parameters:
out
- theOutputStream
where to write the textual presentationres
- the merge result which should be presentedbaseName
- the name ranges from the base should getoursName
- the name ranges from ours should gettheirsName
- the name ranges from theirs should getcharsetName
- the name of the character set used when writing conflict metadata- Throws:
IOException
-
formatMerge
public void formatMerge(OutputStream out, MergeResult res, String baseName, String oursName, String theirsName, Charset charset) throws IOException
Formats the results of a merge of exactly twoRawText
objects in a Git conformant way. This convenience method accepts the names for the three sequences (base and the two merged sequences) as explicit parameters and doesn't require the caller to specify a List- Parameters:
out
- theOutputStream
where to write the textual presentationres
- the merge result which should be presentedbaseName
- the name ranges from the base should getoursName
- the name ranges from ours should gettheirsName
- the name ranges from theirs should getcharset
- the character set used when writing conflict metadata- Throws:
IOException
- Since:
- 5.2
-
-