Class SvnPropgetUtils
java.lang.Object
net.sf.statsvn.util.SvnPropgetUtils
- All Implemented Interfaces:
ISvnPropgetProcessor
- Direct Known Subclasses:
SvnKitPropget
Utilities class that manages calls to svn propget. Used to find binary files.
- Version:
- $Id: SvnPropgetUtils.java 394 2009-08-10 20:08:46Z jkealey $
- Author:
- Jason Kealey invalid input: '<'jkealey@shade.ca>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSvnPropgetUtils(ISvnProcessor processor) Invokes propget via the svn propget via the command line. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetBinaryFilename(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.Returns the list of binary files in the working directory.protected ProcessUtilsGet the svn:mime-types for all files, latest revision.protected ProcessUtilsgetFileMimeTypes(String revision, String filename) Get the svn:mime-type for a certain file (leave null for all files).protected ISvnProcessorbooleanisBinaryFile(String revision, String filename) It was first thought that a the mime-type of a file's previous revision could be found.voidloadBinaryFiles(String path) Loads the list of binary files from the input stream equivalent to an svn propget command.protected voidloadBinaryFiles(ProcessUtils pUtils) Loads the list of binary files from the input stream equivalent to an svn propget command.
-
Field Details
-
binaryFiles
-
processor
-
-
Constructor Details
-
SvnPropgetUtils
Invokes propget via the svn propget via the command line.
-
-
Method Details
-
getProcessor
-
getFileMimeTypes
Get the svn:mime-types for all files, latest revision.- Returns:
- the inputstream from which to read the information.
-
getFileMimeTypes
Get the svn:mime-type for a certain file (leave null for all files).- Parameters:
revision- revision for which to query;filename- the filename (or null for all files)- Returns:
- the inputstream from which to read the information.
-
getBinaryFiles
Description copied from interface:ISvnPropgetProcessorReturns the list of binary files in the working directory.- Specified by:
getBinaryFilesin interfaceISvnPropgetProcessor- Returns:
- the list of binary files
-
loadBinaryFiles
Loads the list of binary files from the input stream equivalent to an svn propget command.- Specified by:
loadBinaryFilesin interfaceISvnPropgetProcessor- Parameters:
path- a file on disk which contains the results of an svn propget- Throws:
IOException
-
loadBinaryFiles
Loads the list of binary files from the input stream equivalent to an svn propget command.- Parameters:
stream- stream equivalent to an svn propget command
-
isBinaryFile
Description copied from interface:ISvnPropgetProcessorIt was first thought that a the mime-type of a file's previous revision could be found. This is not the case. Leave revision null until future upgrade of svn propget command line.- Specified by:
isBinaryFilein interfaceISvnPropgetProcessor- Parameters:
revision- the revision to queryfilename- the filename- Returns:
- if that version of a file is binary
-
getBinaryFilename
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.- Parameters:
currentLine- the line obtained from svn propget svn:mime-typeremoveRoot- if true, will remove any repository prefix- Returns:
- should return lib\junit.jar in both cases, given that removeRoot==true in the second case.
-