|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.statsvn.util.SvnDiffUtils
public class SvnDiffUtils
Utilities class that manages calls to svn diff.
Field Summary | |
---|---|
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 Summary | |
---|---|
SvnDiffUtils(ISvnProcessor processor)
Invokes diffs using the svn diff command line. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public SvnDiffUtils(ISvnProcessor processor)
Method Detail |
---|
protected ISvnProcessor getProcessor()
protected ProcessUtils callSvnDiff(java.lang.String oldRevNr, java.lang.String newRevNr, java.lang.String filename) throws java.io.IOException
java.io.IOException
oldRevNr
- old revision numbernewRevNr
- new revision numberfilename
- filename.
protected ProcessUtils callSvnDiff(java.lang.String newRevNr) throws java.io.IOException
java.io.IOException
newRevNr
- revision number
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
java.io.IOException
- problem parsing the stream
BinaryDiffException
- if the error message is due to trying to diff binary files.oldRevNr
- old revision numbernewRevNr
- new revision numberfilename
- the filename
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
java.io.IOException
- problem parsing the stream
BinaryDiffException
- if the error message is due to trying to diff binary files.pUtils
- the process callpublic java.util.Vector getLineDiff(java.lang.String newRevNr) throws java.io.IOException, BinaryDiffException
ISvnDiffProcessor
getLineDiff
in interface ISvnDiffProcessor
java.io.IOException
- problem parsing the stream
BinaryDiffException
- if the error message is due to trying to diff binary files.newRevNr
- new revision number
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
java.io.IOException
- problem parsing the stream
BinaryDiffException
- if the error message is due to trying to diff binary files.answer
- the current answerscurrFile
- the current file being added.sb
- the diff for this individual file.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
java.io.IOException
- problem parsing the stream
BinaryDiffException
diffReader
- the stream reader for svn diff
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |