|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sf.statsvn.util.SvnDiffUtils
Utilities class that manages calls to svn diff.
| Field Summary | |
protected static String |
BINARY_TYPE
|
protected static String |
INDEX_MARKER
|
protected ISvnProcessor |
processor
|
protected static String |
PROPERTY_CHANGE
|
protected static 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(Vector answer,
String currFile,
StringBuffer sb)
Append results to answer vector. |
protected ProcessUtils |
callSvnDiff(String newRevNr)
Calls svn diff on all files for given revision and revision-1. |
protected ProcessUtils |
callSvnDiff(String oldRevNr,
String newRevNr,
String filename)
Calls svn diff for the filename and revisions given. |
Vector |
getLineDiff(String newRevNr)
Returns line count differences for all files in a particular revision. |
int[] |
getLineDiff(String oldRevNr,
String newRevNr,
String filename)
Returns line count differences between two revisions of a file. |
protected ISvnProcessor |
getProcessor()
|
protected boolean |
isBinaryErrorMessage(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(Vector answer,
InputStream diffStream)
|
protected int[] |
parseSingleDiffStream(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 String PROPERTY_CHANGE
protected static final String PROPERTY_NAME
protected static final String BINARY_TYPE
protected static final String INDEX_MARKER
protected ISvnProcessor processor
| Constructor Detail |
public SvnDiffUtils(ISvnProcessor processor)
| Method Detail |
protected ISvnProcessor getProcessor()
protected ProcessUtils callSvnDiff(String oldRevNr,
String newRevNr,
String filename)
throws IOException
oldRevNr - old revision numbernewRevNr - new revision numberfilename - filename.
IOException
protected ProcessUtils callSvnDiff(String newRevNr)
throws IOException
newRevNr - revision number
IOException
public int[] getLineDiff(String oldRevNr,
String newRevNr,
String filename)
throws IOException,
BinaryDiffException
ISvnDiffProcessor
getLineDiff in interface ISvnDiffProcessoroldRevNr - old revision numbernewRevNr - new revision numberfilename - the filename
BinaryDiffException - if the error message is due to trying to diff binary files.
IOException - problem parsing the stream
protected int[] parseSingleDiffStream(InputStream diffStream)
throws IOException,
BinaryDiffException
IOException
BinaryDiffException
protected void verifyOutput(ProcessUtils pUtils)
throws IOException,
BinaryDiffException
pUtils - the process call
IOException - problem parsing the stream
BinaryDiffException - if the error message is due to trying to diff binary files.
public Vector getLineDiff(String newRevNr)
throws IOException,
BinaryDiffException
ISvnDiffProcessor
getLineDiff in interface ISvnDiffProcessornewRevNr - new revision number
IOException - problem parsing the stream
BinaryDiffException - if the error message is due to trying to diff binary files.
protected void parseMultipleDiffStream(Vector answer,
InputStream diffStream)
throws IOException
IOException
protected void appendResults(Vector answer,
String currFile,
StringBuffer sb)
throws IOException
answer - the current answerscurrFile - the current file being added.sb - the diff for this individual file.
IOException - problem parsing the stream
BinaryDiffException - if the error message is due to trying to diff binary files.protected boolean isBinaryErrorMessage(String msg)
msg - the error message given by ProcessUtils.getErrorMessage();
protected int[] parseDiff(net.sf.statcvs.util.LookaheadReader diffReader)
throws IOException,
BinaryDiffException
diffReader - the stream reader for svn diff
IOException - problem parsing the stream
BinaryDiffException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||