net.sf.statsvn.util
public class SvnPropgetUtils extends Object implements ISvnPropgetProcessor
Modifier and Type | Field and Description |
---|---|
protected List |
binaryFiles |
protected ISvnProcessor |
processor |
Constructor and Description |
---|
SvnPropgetUtils(ISvnProcessor processor)
Invokes propget via the svn propget via the command line.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getBinaryFilename(String currentLine,
boolean removeRoot)
Given a string such as: "lib\junit.jar - application/octet-stream" or
"svn:\\host\repo\lib\junit.jar - application/octet-stream" will return
the filename if the mime type is binary (doesn't end with text/*)
Will return the filename with / was a directory seperator.
|
List |
getBinaryFiles()
Returns the list of binary files in the working directory.
|
protected ProcessUtils |
getFileMimeTypes()
Get the svn:mime-types for all files, latest revision.
|
protected ProcessUtils |
getFileMimeTypes(String revision,
String filename)
Get the svn:mime-type for a certain file (leave null for all files).
|
protected ISvnProcessor |
getProcessor() |
boolean |
isBinaryFile(String revision,
String filename)
It was first thought that a the mime-type of a file's previous revision
could be found.
|
protected void |
loadBinaryFiles(ProcessUtils pUtils)
Loads the list of binary files from the input stream equivalent to an svn
propget command.
|
void |
loadBinaryFiles(String path)
Loads the list of binary files from the input stream equivalent to an svn
propget command.
|
protected List binaryFiles
protected ISvnProcessor processor
public SvnPropgetUtils(ISvnProcessor processor)
protected ISvnProcessor getProcessor()
protected ProcessUtils getFileMimeTypes()
protected ProcessUtils getFileMimeTypes(String revision, String filename)
revision
- revision for which to query;filename
- the filename (or null for all files)public List getBinaryFiles()
ISvnPropgetProcessor
getBinaryFiles
in interface ISvnPropgetProcessor
public void loadBinaryFiles(String path) throws IOException
loadBinaryFiles
in interface ISvnPropgetProcessor
path
- a file on disk which contains the results of an svn propgetIOException
protected void loadBinaryFiles(ProcessUtils pUtils)
stream
- stream equivalent to an svn propget commandpublic boolean isBinaryFile(String revision, String filename)
ISvnPropgetProcessor
isBinaryFile
in interface ISvnPropgetProcessor
revision
- the revision to queryfilename
- the filenameprotected String getBinaryFilename(String currentLine, boolean removeRoot)
currentLine
- the line obtained from svn propget svn:mime-typeremoveRoot
- if true, will remove any repository prefix