Class SvnImport

All Implemented Interfaces:
ISvnObjectReceiver<SVNCommitInfo>, ISvnOperationOptionsProvider

public class SvnImport extends AbstractSvnCommit
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.

If the caller's 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:

Version:
1.7
Author:
TMate Software Ltd.
  • Constructor Details

  • Method Details

    • isApplyAutoProperties

      public boolean isApplyAutoProperties()
      Gets whether to enable automatic properties
      Returns:
      true if automatic properties should be enabled, otherwise false
    • setApplyAutoProperties

      public void setApplyAutoProperties(boolean applyAutoProperties)
      Sets whether to enable automatic properties
      Parameters:
      applyAutoProperties - true if automatic properties should be enabled, otherwise false
    • getSource

      public File getSource()
      Returns import operation's source.
      Returns:
      return source of the import operation
      See Also:
    • setSource

      public void setSource(File source)
      Sets source of the import. If 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.

      Parameters:
      source - source of the import operation
    • isForce

      public boolean isForce()
      Gets whether to ignore files of unknown node types or not.
      Returns:
      true if files of unknown node types should be ignored, otherwise false
      See Also:
    • setForce

      public void setForce(boolean force)
      Sets whether to ignore files of unknown node types or not. Unversionable items such as device files and pipes are ignored if force is true.
      Parameters:
      force - true if files of unknown node types should be ignored, otherwise false
    • isUseGlobalIgnores

      public boolean isUseGlobalIgnores()
      Gets whether to adds files or directories that match ignore patterns.
      Returns:
      true adds files or directories that match ignore patterns, otherwise false
    • setUseGlobalIgnores

      public void setUseGlobalIgnores(boolean useGlobalIgnores)
      Sets whether to adds files or directories that match ignore patterns.
      Parameters:
      useGlobalIgnores - true adds files or directories that match ignore patterns, otherwise false
    • ensureArgumentsAreValid

      protected void ensureArgumentsAreValid() throws SVNException
      Overrides:
      ensureArgumentsAreValid in class SvnOperation<SVNCommitInfo>
      Throws:
      SVNException
    • isChangesWorkingCopy

      public boolean isChangesWorkingCopy()
      Gets whether the operation changes working copy
      Overrides:
      isChangesWorkingCopy in class SvnOperation<SVNCommitInfo>
      Returns:
      true if the operation changes the working copy, otherwise false
    • getFileFilter

      public ISVNFileFilter getFileFilter()
    • setFileFilter

      public void setFileFilter(ISVNFileFilter fileFilter)