Package org.tmatesoft.svn.core.wc2
Class SvnExport
- java.lang.Object
-
- org.tmatesoft.svn.core.wc2.SvnOperation<V>
-
- org.tmatesoft.svn.core.wc2.AbstractSvnUpdate<java.lang.Long>
-
- org.tmatesoft.svn.core.wc2.SvnExport
-
- All Implemented Interfaces:
ISvnOperationOptionsProvider
public class SvnExport extends AbstractSvnUpdate<java.lang.Long>
Represents export operation. Exports the contents of either a subversion repository or a subversion working copy (source) into atarget- 'clean' directory (meaning a directory with no administrative directories).source'spegRevisionis the revision where the path is first looked up when exporting from a repository. Ifsource'spegRevisionisSVNRevision.UNDEFINED, then it defaults toSVNRevision.WORKING. Ifrevisionis one of: then local export is performed. Otherwise exporting from the repository. IfrevisionisSVNRevision.UNDEFINEDit defaults toSVNRevision.WORKING. If externals are ignored (ignoreExternalsistrue), doesn't process externals definitions as part of this operation.eolStyleallows you to override the standard eol marker on the platform you are running on. Can be either "LF", "CR" or "CRLF" ornull. Ifnullwill use the standard eol marker. Any other value will cause an exception with the error codeSVNErrorCode.IO_UNKNOWN_EOLerror to be returned.If
depthisSVNDepth.INFINITY, exports fully recursively. Else if it isSVNDepth.IMMEDIATES, exportssourceand its immediate children (if any), but with subdirectories empty and atSVNDepth.EMPTY. Else ifSVNDepth.FILES, exportssourceand its immediate file children (if any) only. IfdepthisSVNDepth.EMPTY, then exports exactlysourceand none of its children.SvnOperation.run()method returns value of the revision actually exported.SvnOperation.run()throwsSVNExceptionin the following cases:-
exception with
SVNErrorCode.IO_ERRORerror code - iftarget's directory already exists andforceisfalseexception withSVNErrorCode.ILLEGAL_TARGETerror code - if destination file already exists andforceisfalse, or if destination directory exists and should be overridden by source file- Version:
- 1.7
- Author:
- TMate Software Ltd.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSvnExport(SvnOperationFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidensureArgumentsAreValid()java.lang.StringgetEolStyle()Returns the string that denotes a specific End-Of-Line character.protected java.io.FilegetOperationalWorkingCopy()SvnTargetgetSource()Returns export's source - working copy path or repository URL.protected voidinitDefaults()booleanisChangesWorkingCopy()Gets whether the operation changes working copybooleanisExpandKeywords()Gets whether or not all keywords presenting in the file and listed in the file'sSVNProperty.KEYWORDSproperty (if set) should be substituted.booleanisForce()Gets whether to overwrite files or directories.voidsetEolStyle(java.lang.String eolStyle)Sets the string that denotes a specific End-Of-Line character.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.voidsetForce(boolean force)Sets whether to overwrite files or directories.voidsetSource(SvnTarget source)Sets export's source - working copy path or repository URL.-
Methods inherited from class org.tmatesoft.svn.core.wc2.AbstractSvnUpdate
getExternalsHandler, isAllowUnversionedObstructions, isIgnoreExternals, isUpdateLocksOnDemand, setAllowUnversionedObstructions, setExternalsHandler, setIgnoreExternals, setUpdateLocksOnDemand
-
Methods inherited from class org.tmatesoft.svn.core.wc2.SvnOperation
addTarget, cancel, ensureEnoughTargets, ensureHomohenousTargets, getApplicableChangelists, getAuthenticationManager, getCanceller, getDepth, getEventHandler, getFirstTarget, getMaximumTargetsCount, getMinimumTargetsCount, getOperationFactory, getOptions, getRepositoryPool, getRevision, getSqliteJournalMode, getTargets, hasFileTargets, hasLocalTargets, hasRemoteTargets, isCancelled, isSleepForTimestamp, isUseParentWcFormat, needsHomohenousTargets, run, setApplicalbeChangelists, setDepth, setRevision, setSingleTarget, setSleepForTimestamp, setSqliteJournalMode
-
-
-
-
Constructor Detail
-
SvnExport
protected SvnExport(SvnOperationFactory factory)
-
-
Method Detail
-
isForce
public boolean isForce()
Gets whether to overwrite files or directories.- Returns:
trueif export should overwrite files or directories, otherwisefalse
-
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- Since:
- 1.7, SVN 1.7
-
getEolStyle
public java.lang.String getEolStyle()
Returns the string that denotes a specific End-Of-Line character.- Returns:
- specific End-Of-Line character of the operation
- See Also:
setEolStyle(String)
-
setForce
public void setForce(boolean force)
Sets whether to overwrite files or directories.- Parameters:
force-trueif export should overwrite files or directories, 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- Since:
- 1.7, SVN 1.7
-
setEolStyle
public void setEolStyle(java.lang.String eolStyle)
Sets the string that denotes a specific End-Of-Line character.eolStyleallows you to override the standard eol marker on the platform you are running on. Can be either "LF", "CR" or "CRLF" ornull. Ifnullwill use the standard eol marker. Any other value will cause an exception with the error codeSVNErrorCode.IO_UNKNOWN_EOLerror to be returned.- Parameters:
eolStyle- specific End-Of-Line character of the operation
-
getSource
public SvnTarget getSource()
Returns export's source - working copy path or repository URL.- Returns:
- source of the export
-
setSource
public void setSource(SvnTarget source)
Sets export's source - working copy path or repository URL.- Parameters:
source- source of the export
-
ensureArgumentsAreValid
protected void ensureArgumentsAreValid() throws SVNException- Overrides:
ensureArgumentsAreValidin classSvnOperation<java.lang.Long>- Throws:
SVNException
-
initDefaults
protected void initDefaults()
- Overrides:
initDefaultsin classSvnOperation<java.lang.Long>
-
getOperationalWorkingCopy
protected java.io.File getOperationalWorkingCopy()
- Overrides:
getOperationalWorkingCopyin classSvnOperation<java.lang.Long>
-
isChangesWorkingCopy
public boolean isChangesWorkingCopy()
Gets whether the operation changes working copy- Overrides:
isChangesWorkingCopyin classSvnOperation<java.lang.Long>- Returns:
trueif the operation changes the working copy, otherwisefalse
-
-