Class DefaultSVNGNUDiffGenerator
java.lang.Object
org.tmatesoft.svn.core.wc.DefaultSVNDiffGenerator
org.tmatesoft.svn.core.internal.wc.DefaultSVNGNUDiffGenerator
- All Implemented Interfaces:
ISVNGNUDiffGenerator,ISVNDiffGenerator
public class DefaultSVNGNUDiffGenerator
extends DefaultSVNDiffGenerator
implements ISVNGNUDiffGenerator
- Version:
- 1.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate java.lang.Stringprivate booleanprivate booleanprivate java.lang.Stringprivate FSRootprivate java.lang.Stringprivate FSRootFields inherited from class org.tmatesoft.svn.core.wc.DefaultSVNDiffGenerator
EMPTY_FILE_IS, HEADER_SEPARATOR, PROPERTIES_SEPARATOR, WC_REVISION_LABEL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddisplayBinary(java.io.OutputStream os, java.lang.String mimeType1, java.lang.String mimeType2) voiddisplayFileDiff(java.lang.String path, java.io.File file1, java.io.File file2, java.lang.String rev1, java.lang.String rev2, java.lang.String mimeType1, java.lang.String mimeType2, java.io.OutputStream result) Writes the difference betweenfile1andfile2as they are seen inrev1andrev2toresult.voiddisplayHeader(int type, java.lang.String path, java.lang.String copyFromPath, long copyFromRevision, java.io.OutputStream result) Informs this diff generator about a change to a path.protected booleandisplayHeader(java.io.OutputStream os, java.lang.String path, boolean deleted) protected voiddisplayHeaderFields(java.io.OutputStream os, java.lang.String label1, java.lang.String label2) private java.lang.StringgenerateLabel(FSRoot root, java.lang.String path) booleanvoidprintHeader(java.io.OutputStream os) voidsetDiffWritten(boolean b) voidsetHeaderWritten(boolean written) protected voidsetNewFile(FSRoot newRoot, java.lang.String newPath) protected voidsetOriginalFile(FSRoot originalRoot, java.lang.String originalPath) protected booleanMethods inherited from class org.tmatesoft.svn.core.wc.DefaultSVNDiffGenerator
createTempDirectory, displayAddedDirectory, displayDeletedDirectory, displayPropDiff, getBasePath, getDiffOptions, getDisplayPath, getEncoding, getEOL, getExternalDiffCommand, getGlobalEncoding, getLabel, getOptions, hasEncoding, hasEOL, init, isDiffAdded, isDiffCopied, isDiffDeleted, isDiffUnversioned, isForcedBinaryDiff, isHeaderForced, setBasePath, setDiffAdded, setDiffCopied, setDiffDeleted, setDiffOptions, setDiffUnversioned, setEncoding, setEOL, setExternalDiffCommand, setFallbackToAbsolutePath, setForcedBinaryDiff, setOptions, setRawDiffOptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tmatesoft.svn.core.wc.ISVNDiffGenerator
createTempDirectory, displayAddedDirectory, displayDeletedDirectory, displayPropDiff, getEncoding, getEOL, init, isDiffAdded, isDiffCopied, isDiffDeleted, isDiffUnversioned, isForcedBinaryDiff, setBasePath, setDiffAdded, setDiffCopied, setDiffDeleted, setDiffUnversioned, setEncoding, setEOL, setForcedBinaryDiff
-
Field Details
-
myHeader
private java.lang.String myHeader -
myIsHeaderWritten
private boolean myIsHeaderWritten -
myOriginalRoot
-
myOriginalPath
private java.lang.String myOriginalPath -
myNewRoot
-
myNewPath
private java.lang.String myNewPath -
myIsDiffWritten
private boolean myIsDiffWritten
-
-
Constructor Details
-
DefaultSVNGNUDiffGenerator
public DefaultSVNGNUDiffGenerator()
-
-
Method Details
-
displayHeader
public void displayHeader(int type, java.lang.String path, java.lang.String copyFromPath, long copyFromRevision, java.io.OutputStream result) throws SVNException Description copied from interface:ISVNGNUDiffGeneratorInforms this diff generator about a change to a path.- Specified by:
displayHeaderin interfaceISVNGNUDiffGenerator- Parameters:
type- one of static fields of this interfacepath- a changed pathcopyFromPath- a copy-from source path ifpathis the result of a copycopyFromRevision- a copy-from source revision ifpathis the result of a copyresult- an output stream where a header is to be written- Throws:
SVNException
-
displayFileDiff
public void displayFileDiff(java.lang.String path, java.io.File file1, java.io.File file2, java.lang.String rev1, java.lang.String rev2, java.lang.String mimeType1, java.lang.String mimeType2, java.io.OutputStream result) throws SVNException Description copied from class:DefaultSVNDiffGeneratorWrites the difference betweenfile1andfile2as they are seen inrev1andrev2toresult.- Specified by:
displayFileDiffin interfaceISVNDiffGenerator- Overrides:
displayFileDiffin classDefaultSVNDiffGenerator- Parameters:
path- a file path on which the differences are generated and written to the outputfile1- a file with old contentsfile2- a file with new contentsrev1- the first diff revision offile1rev2- the second diff revision offile2mimeType1- the MIME-type offile1mimeType2- the MIME-type offile2result- the targetOutputStreamwhere the differences will be written to- Throws:
SVNException- in the following cases:-
exception with
SVNErrorCode.EXTERNAL_PROGRAMerror code - if an external diff program exited with an error code value different from0and1exception withSVNErrorCode.IO_ERRORerror code - if an I\O error occurred
-
setHeaderWritten
public void setHeaderWritten(boolean written) -
displayHeader
protected boolean displayHeader(java.io.OutputStream os, java.lang.String path, boolean deleted) throws java.io.IOException - Overrides:
displayHeaderin classDefaultSVNDiffGenerator- Throws:
java.io.IOException
-
displayBinary
protected void displayBinary(java.io.OutputStream os, java.lang.String mimeType1, java.lang.String mimeType2) throws java.io.IOException - Overrides:
displayBinaryin classDefaultSVNDiffGenerator- Throws:
java.io.IOException
-
displayHeaderFields
protected void displayHeaderFields(java.io.OutputStream os, java.lang.String label1, java.lang.String label2) throws java.io.IOException - Overrides:
displayHeaderFieldsin classDefaultSVNDiffGenerator- Throws:
java.io.IOException
-
setOriginalFile
-
setNewFile
-
generateLabel
- Throws:
SVNException
-
useLocalFileSeparatorChar
protected boolean useLocalFileSeparatorChar()- Overrides:
useLocalFileSeparatorCharin classDefaultSVNDiffGenerator
-
setDiffWritten
public void setDiffWritten(boolean b) -
isDiffWritten
public boolean isDiffWritten() -
printHeader
- Throws:
SVNException
-