Package org.tmatesoft.svn.core.wc2
Class SvnCat
java.lang.Object
org.tmatesoft.svn.core.wc2.SvnOperation<java.lang.Void>
org.tmatesoft.svn.core.wc2.SvnCat
- All Implemented Interfaces:
ISvnOperationOptionsProvider
Represents cat operation. Outputs the content of file identified by
target and
revision to the output streams.
The actual node
revision selected is determined by the target as it exists in
target's pegRevision.
If target is URL and its pegRevision is
SVNRevision.UNDEFINED, then it defaults to SVNRevision.HEAD.
If target is local and its pegRevision is
SVNRevision.UNDEFINED, then it defaults to SVNRevision.WORKING.
If revision is one of:
then the file contents are taken from the working copy file item (no
network connection is needed). Otherwise the file item's contents are
taken from the repository at a particular revision.
SvnOperation.run() throws SVNException in the following cases:
- exception with
SVNErrorCode.CLIENT_IS_DIRECTORYerror code - iftargetrefers to a directory - exception with
SVNErrorCode.UNVERSIONED_RESOURCEerror code - iftargetis not under version control - it's impossible to create temporary files (
createTempFile()fails) necessary for file translating (used whentargetis URL)
- Version:
- 1.7
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate java.io.OutputStream -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidjava.io.OutputStreamGets the output stream of the operation.booleanGets whether the operation changes working copybooleanGets whether or not all keywords presenting in the file and listed in the file'sSVNProperty.KEYWORDSproperty (if set) should be substituted.voidsetExpandKeywords(boolean expandKeywords) Sets whether or not all keywords presenting in the file and listed in the file'sSVNProperty.KEYWORDSproperty (if set) should be substituted.voidsetOutput(java.io.OutputStream output) Sets the output stream of the operation.Methods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation
addTarget, cancel, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMaximumTargetsCount, getMinimumTargetsCount, getOperationalWorkingCopy, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, initDefaults, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalModeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
expandKeywords
private boolean expandKeywords -
output
private java.io.OutputStream output
-
-
Constructor Details
-
SvnCat
-
-
Method Details
-
isExpandKeywords
public boolean isExpandKeywords()Gets whether or not all keywords presenting in the file and listed in the file'sSVNProperty.KEYWORDSproperty (if set) should be substituted.- Returns:
trueif keywords should expanded, otherwisefalse
-
setExpandKeywords
public void setExpandKeywords(boolean expandKeywords) Sets whether or not all keywords presenting in the file and listed in the file'sSVNProperty.KEYWORDSproperty (if set) should be substituted.- Parameters:
expandKeywords-trueif keywords should expanded, otherwisefalse
-
getOutput
public java.io.OutputStream getOutput()Gets the output stream of the operation.- Returns:
- output stream
-
setOutput
public void setOutput(java.io.OutputStream output) Sets the output stream of the operation.- Parameters:
output- output stream
-
ensureArgumentsAreValid
- Overrides:
ensureArgumentsAreValidin classSvnOperation<java.lang.Void>- Throws:
SVNException
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopyin classSvnOperation<java.lang.Void>- Returns:
trueif the operation changes the working copy, otherwisefalse
-