|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.tmatesoft.svn.core.wc2.SvnOperation<T>
org.tmatesoft.svn.core.wc2.SvnReceivingOperation<SVNCommitInfo>
org.tmatesoft.svn.core.wc2.AbstractSvnCommit
org.tmatesoft.svn.core.wc2.SvnImport
public class SvnImport
Imports file or directory source into repository directory
defined in operation's target at HEAD revision. If some components of
operations' target does not exist, then creates parent directories as
necessary. The target of the operation should represent URL.
event handler is not null it will be called as the import
progresses with SVNEventAction.COMMIT_ADDED action. If the commit
succeeds, the handler will be called with
SVNEventAction.COMMIT_COMPLETED event action.
If non-null,
revisionProperties holds additional, custom revision
properties (String names mapped to SVNPropertyValue
values) to be set on the new revision. This table cannot contain any
standard Subversion properties.
commitHandler will be asked for a commit log message.
If depth is SVNDepth.EMPTY, imports just
source and nothing below it. If SVNDepth.FILES,
imports source and any file children of source. If
SVNDepth.IMMEDIATES, imports source, any file
children, and any immediate subdirectories (but nothing underneath those
subdirectories). If SVNDepth.INFINITY, imports source
and everything under it fully recursively.
SvnOperation.run() method returns SVNCommitInfo information about the new committed revision.
This method throws SVNException in the following cases:
SVNErrorCode.ENTRY_NOT_FOUND
error code - if source does not existSVNErrorCode.ENTRY_EXISTS error code -
if operation's target already exists and source is a fileSVNErrorCode.CL_ADM_DIR_RESERVED error code - if
trying to import an item with a reserved SVN name (like
'.svn' or '_svn')
| Constructor Summary | |
|---|---|
protected |
SvnImport(SvnOperationFactory factory)
|
| Method Summary | |
|---|---|
protected void |
ensureArgumentsAreValid()
|
java.io.File |
getSource()
Returns import operation's source. |
boolean |
isApplyAutoProperties()
Gets whether to enable automatic properties |
boolean |
isChangesWorkingCopy()
Gets whether the operation changes working copy |
boolean |
isForce()
Gets whether to ignore files of unknown node types or not. |
boolean |
isUseGlobalIgnores()
Gets whether to adds files or directories that match ignore patterns. |
void |
setApplyAutoProperties(boolean applyAutoProperties)
Sets whether to enable automatic properties |
void |
setForce(boolean force)
Sets whether to ignore files of unknown node types or not. |
void |
setSource(java.io.File source)
Sets source of the import. |
void |
setUseGlobalIgnores(boolean useGlobalIgnores)
Sets whether to adds files or directories that match ignore patterns. |
| Methods inherited from class org.tmatesoft.svn.core.wc2.AbstractSvnCommit |
|---|
getCommitHandler, getCommitMessage, getRevisionProperties, setCommitHandler, setCommitMessage, setRevisionProperties, setRevisionProperty |
| Methods inherited from class org.tmatesoft.svn.core.wc2.SvnReceivingOperation |
|---|
first, getReceiver, initDefaults, last, receive, run, setReceiver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected SvnImport(SvnOperationFactory factory)
| Method Detail |
|---|
public boolean isApplyAutoProperties()
true if automatic properties should be enabled, otherwise falsepublic void setApplyAutoProperties(boolean applyAutoProperties)
applyAutoProperties - true if automatic properties should be enabled, otherwise falsepublic java.io.File getSource()
getSource()public void setSource(java.io.File source)
source is a directory, the contents of that directory are
imported directly into the directory identified by target.
Note that the directory itself is not imported -- that
is, the base name of directory is not part of the import.
If source is a file, then the parent of operation's target is
the directory receiving the import. The base name of source
is the filename in the repository. In this case if this filename already exists, throws SVNException.
source - source of the import operationpublic boolean isForce()
true if files of unknown node types should be ignored, otherwise falsesetForce(boolean)public void setForce(boolean force)
force is true.
force - true if files of unknown node types should be ignored, otherwise falsepublic boolean isUseGlobalIgnores()
true adds files or directories that match ignore patterns, otherwise falsepublic void setUseGlobalIgnores(boolean useGlobalIgnores)
useGlobalIgnores - true adds files or directories that match ignore patterns, otherwise false
protected void ensureArgumentsAreValid()
throws SVNException
ensureArgumentsAreValid in class SvnOperation<SVNCommitInfo>SVNExceptionpublic boolean isChangesWorkingCopy()
isChangesWorkingCopy in class SvnOperation<SVNCommitInfo>true if the operation changes the working copy, otherwise false
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||