public class SvnDiffUtils extends java.lang.Object implements ISvnDiffProcessor
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
BINARY_TYPE |
protected static java.lang.String |
INDEX_MARKER |
protected ISvnProcessor |
processor |
protected static java.lang.String |
PROPERTY_CHANGE |
protected static java.lang.String |
PROPERTY_NAME |
protected static int |
PROPERTY_NAME_LINE |
static int |
RESULT_SIZE |
Constructor and Description |
---|
SvnDiffUtils(ISvnProcessor processor)
Invokes diffs using the svn diff command line.
|
Modifier and Type | Method and Description |
---|---|
protected void |
appendResults(java.util.Vector answer,
java.lang.String currFile,
java.lang.StringBuffer sb)
Append results to answer vector.
|
protected ProcessUtils |
callSvnDiff(java.lang.String newRevNr)
Calls svn diff on all files for given revision and revision-1.
|
protected ProcessUtils |
callSvnDiff(java.lang.String oldRevNr,
java.lang.String newRevNr,
java.lang.String filename)
Calls svn diff for the filename and revisions given.
|
java.util.Vector |
getLineDiff(java.lang.String newRevNr)
Returns line count differences for all files in a particular revision.
|
int[] |
getLineDiff(java.lang.String oldRevNr,
java.lang.String newRevNr,
java.lang.String filename)
Returns line count differences between two revisions of a file.
|
protected ISvnProcessor |
getProcessor() |
protected boolean |
isBinaryErrorMessage(java.lang.String msg)
Returns true if msg is an error message display that the file is binary.
|
protected int[] |
parseDiff(net.sf.statcvs.util.LookaheadReader diffReader)
Returns line count differences between two revisions of a file.
|
protected void |
parseMultipleDiffStream(java.util.Vector answer,
java.io.InputStream diffStream) |
protected int[] |
parseSingleDiffStream(java.io.InputStream diffStream) |
protected void |
verifyOutput(ProcessUtils pUtils)
Verifies the process error stream.
|
public static final int RESULT_SIZE
protected static final int PROPERTY_NAME_LINE
protected static final java.lang.String PROPERTY_CHANGE
protected static final java.lang.String PROPERTY_NAME
protected static final java.lang.String BINARY_TYPE
protected static final java.lang.String INDEX_MARKER
protected ISvnProcessor processor
public SvnDiffUtils(ISvnProcessor processor)
protected ISvnProcessor getProcessor()
protected ProcessUtils callSvnDiff(java.lang.String oldRevNr, java.lang.String newRevNr, java.lang.String filename) throws java.io.IOException
oldRevNr
- old revision numbernewRevNr
- new revision numberfilename
- filename.java.io.IOException
protected ProcessUtils callSvnDiff(java.lang.String newRevNr) throws java.io.IOException
newRevNr
- revision numberjava.io.IOException
public int[] getLineDiff(java.lang.String oldRevNr, java.lang.String newRevNr, java.lang.String filename) throws java.io.IOException, BinaryDiffException
ISvnDiffProcessor
getLineDiff
in interface ISvnDiffProcessor
oldRevNr
- old revision numbernewRevNr
- new revision numberfilename
- the filenamejava.io.IOException
- problem parsing the streamBinaryDiffException
- if the error message is due to trying to diff binary files.protected int[] parseSingleDiffStream(java.io.InputStream diffStream) throws java.io.IOException, BinaryDiffException
java.io.IOException
BinaryDiffException
protected void verifyOutput(ProcessUtils pUtils) throws java.io.IOException, BinaryDiffException
pUtils
- the process calljava.io.IOException
- problem parsing the streamBinaryDiffException
- if the error message is due to trying to diff binary files.public java.util.Vector getLineDiff(java.lang.String newRevNr) throws java.io.IOException, BinaryDiffException
ISvnDiffProcessor
getLineDiff
in interface ISvnDiffProcessor
newRevNr
- new revision numberjava.io.IOException
- problem parsing the streamBinaryDiffException
- if the error message is due to trying to diff binary files.protected void parseMultipleDiffStream(java.util.Vector answer, java.io.InputStream diffStream) throws java.io.IOException
java.io.IOException
protected void appendResults(java.util.Vector answer, java.lang.String currFile, java.lang.StringBuffer sb) throws java.io.IOException
answer
- the current answerscurrFile
- the current file being added.sb
- the diff for this individual file.java.io.IOException
- problem parsing the streamBinaryDiffException
- if the error message is due to trying to diff binary files.protected boolean isBinaryErrorMessage(java.lang.String msg)
msg
- the error message given by ProcessUtils.getErrorMessage();protected int[] parseDiff(net.sf.statcvs.util.LookaheadReader diffReader) throws java.io.IOException, BinaryDiffException
diffReader
- the stream reader for svn diffjava.io.IOException
- problem parsing the streamBinaryDiffException