Class DAVRepository

java.lang.Object
org.tmatesoft.svn.core.io.SVNRepository
org.tmatesoft.svn.core.internal.io.dav.DAVRepository

public class DAVRepository extends SVNRepository
Version:
1.3
  • Field Details

    • myConnection

      private DAVConnection myConnection
    • myConnectionFactory

      private IHTTPConnectionFactory myConnectionFactory
    • myIsSpoolResponse

      private boolean myIsSpoolResponse
    • myHttpV2Enabled

      private boolean myHttpV2Enabled
    • ourIsKeepCredentials

      private static boolean ourIsKeepCredentials
    • ourHttpV2Enabled

      private static boolean ourHttpV2Enabled
    • mySpoolLocation

      private java.io.File mySpoolLocation
  • Constructor Details

  • Method Details

    • setKeepCredentials

      public static void setKeepCredentials(boolean keepCredentials)
    • setSpoolLocation

      public void setSpoolLocation(java.io.File spoolLocation)
    • getSpoolLocation

      public java.io.File getSpoolLocation()
    • testConnection

      public void testConnection() throws SVNException
      Description copied from class: SVNRepository
      Tries to access a repository. Used to check if there're no problems with accessing a repository and to cache a repository UUID and root directory location.
      Specified by:
      testConnection in class SVNRepository
      Throws:
      SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see SVNAuthenticationException)
    • hasRepositoryUUID

      public boolean hasRepositoryUUID()
    • setRepositoryUUID

      public void setRepositoryUUID(java.lang.String uuid)
    • hasRepositoryRoot

      public boolean hasRepositoryRoot()
    • setRepositoryRoot

      public void setRepositoryRoot(SVNURL root)
    • getRepositoryRoot

      public SVNURL getRepositoryRoot(boolean forceConnection) throws SVNException
      Description copied from class: SVNRepository
      Gets a repository's root directory location. If this driver object is switched to a different repository location during runtime (probably to an absolutely different repository, see setLocation()), the root directory location may be changed. This method may need to establish connection with the repository if the information on the repository's root location has not been received yet from the repository.
      Overrides:
      getRepositoryRoot in class SVNRepository
      Parameters:
      forceConnection - if true then forces this driver to test a connection - try to access a repository
      Returns:
      the repository root directory location url
      Throws:
      SVNException - in case the repository could not be connected
      SVNAuthenticationException - in case of authentication problems
      See Also:
    • getRepositoryUUID

      public java.lang.String getRepositoryUUID(boolean forceConnection) throws SVNException
      Description copied from class: SVNRepository
      Gets the Universal Unique IDentifier (UUID) of the repository this driver is created for.
      Overrides:
      getRepositoryUUID in class SVNRepository
      Parameters:
      forceConnection - if true then forces this driver to test a connection - try to access a repository
      Returns:
      the UUID of a repository
      Throws:
      SVNException - in case the repository could not be connected
      SVNAuthenticationException - in case of authentication problems
    • setSpoolResponse

      public void setSpoolResponse(boolean spool)
    • isSpoolResponse

      public boolean isSpoolResponse()
    • isHttpV2Enabled

      public boolean isHttpV2Enabled()
    • setHttpV2Enabled

      public void setHttpV2Enabled(boolean httpV2Enabled)
    • setAuthenticationManager

      public void setAuthenticationManager(ISVNAuthenticationManager authManager)
      Description copied from class: SVNRepository
      Sets an authentication driver for this object. The auth driver may be implemented to retrieve cached credentials, to prompt a user for credentials or something else (actually, this is up to an implementor). Also there's a default implementation - see the SVNWCUtil class for more details.
      Overrides:
      setAuthenticationManager in class SVNRepository
      Parameters:
      authManager - an authentication driver to provide user credentials
      See Also:
    • getLatestRevision

      public long getLatestRevision() throws SVNException
      Description copied from class: SVNRepository
      Returns the number of the latest revision of the repository this driver is working with.
      Specified by:
      getLatestRevision in class SVNRepository
      Returns:
      the latest revision number
      Throws:
      SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see SVNAuthenticationException)
    • getDatedRevision

      public long getDatedRevision(java.util.Date date) throws SVNException
      Description copied from class: SVNRepository
      Returns the recent repository revision number for the particular moment in time - the closest one before or at the specified datestamp.

      Example: if you specify a single date without specifying a time of the day (e.g. 2002-11-27) the timestamp is assumed to 00:00:00 and the method won't return any revisions for the day you have specified but for the day just before it.

      Specified by:
      getDatedRevision in class SVNRepository
      Parameters:
      date - a datestamp for defining the needed moment in time
      Returns:
      the revision of the repository for that time
      Throws:
      SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see SVNAuthenticationException)
    • checkPath

      public SVNNodeKind checkPath(java.lang.String path, long revision) throws SVNException
      Description copied from class: SVNRepository
      Returns the kind of an item located at the specified path in a particular revision. If the path does not exist under the specified revision, SVNNodeKind.NONE will be returned.

      The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

      Specified by:
      checkPath in class SVNRepository
      Parameters:
      path - an item's path
      revision - a revision number
      Returns:
      the node kind for the given path at the given revision
      Throws:
      SVNException - if a failure occured while connecting to a repository or the user's authentication failed (see SVNAuthenticationException)
    • getRevisionProperties

      public SVNProperties getRevisionProperties(long revision, SVNProperties properties) throws SVNException
      Description copied from class: SVNRepository
      Returns unversioned revision properties for a particular revision. Property names (keys) are mapped to their values. You may use SVNRevisionProperty constants to retrieve property values from the map.
      Specified by:
      getRevisionProperties in class SVNRepository
      Parameters:
      revision - a revision number
      properties - if not null then properties will be placed in this map, otherwise a new map will be created
      Returns:
      a map containing unversioned revision properties
      Throws:
      SVNException - in the following cases:
      • revision number is invalid
      • there's no such revision at all
      • a failure occured while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
      See Also:
    • getRevisionPropertyValue

      public SVNPropertyValue getRevisionPropertyValue(long revision, java.lang.String propertyName) throws SVNException
      Description copied from class: SVNRepository
      Gets the value of an unversioned property.
      Specified by:
      getRevisionPropertyValue in class SVNRepository
      Parameters:
      revision - a revision number
      propertyName - a property name
      Returns:
      a revision property value or null if there's no such revision property
      Throws:
      SVNException - in the following cases:
      • revision number is invalid or if there's no such revision at all.
      • a failure occured while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
    • getFile

      public long getFile(java.lang.String path, long revision, SVNProperties properties, java.io.OutputStream contents) throws SVNException
      Description copied from class: SVNRepository
      Fetches the contents and/or properties of a file located at the specified path in a particular revision.

      If contents arg is not null it will be written with file contents.

      If properties arg is not null it will receive the properties of the file. This includes all properties: not just ones controlled by a user and stored in the repository filesystem, but also non-tweakable ones (e.g. 'wcprops', 'entryprops', etc.). Property names (keys) are mapped to property values.

      The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

      If revision is invalid (negative), HEAD revision will be used.

      Specified by:
      getFile in class SVNRepository
      Parameters:
      path - a file path
      revision - a file revision
      properties - a file properties receiver map
      contents - an output stream to write the file contents to
      Returns:
      the revision the file has been taken at
      Throws:
      SVNException - in the following cases:
      • there's no such path in revision
      • a failure occured while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
    • getFile

      public long getFile(java.lang.String path, long revision, SVNProperties properties, java.io.OutputStream contents, ISVNWorkingCopyContentMediator workingCopyContentMediator) throws SVNException
      Throws:
      SVNException
    • getDir

      public long getDir(java.lang.String path, long revision, SVNProperties properties, ISVNDirEntryHandler handler) throws SVNException
      Description copied from class: SVNRepository
      Fetches the contents and/or properties of a directory located at the specified path in a particular revision.

      This method is the same as SVNRepository.getDir(String, long, SVNProperties, int, ISVNDirEntryHandler) with entryFields parameter set to DIRENT_ALL.

      Specified by:
      getDir in class SVNRepository
      Parameters:
      path - a directory path
      revision - a directory revision
      properties - a directory properties receiver map
      handler - a handler to process directory entries
      Returns:
      the revision of the directory
      Throws:
      SVNException - in the following cases:
      • path not found in the specified revision
      • path is not a directory
      • a failure occured while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
      See Also:
    • getDir

      public long getDir(java.lang.String path, long revision, SVNProperties properties, int entryFields, ISVNDirEntryHandler handler) throws SVNException
      Description copied from class: SVNRepository
      Fetches the contents and/or properties of a directory located at the specified path in a particular revision with the possibility to specify fields of the entry to fetch.

      If handler arg is not null it will be dispatched information of each directory entry represented by an SVNDirEntry object.

      If properties arg is not null it will receive the properties of the file. This includes all properties: not just ones controlled by a user and stored in the repository filesystem, but also non-tweakable ones (e.g. 'wcprops', 'entryprops', etc.). Property names (keys) are mapped to property values.

      The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

      If revision is invalid (negative), HEAD revision will be used. NOTE: you may not invoke operation methods of this SVNRepository object from within the provided handler.

      Specified by:
      getDir in class SVNRepository
      Parameters:
      path - a directory path
      revision - a directory revision
      properties - a directory properties receiver map
      entryFields - a combination of fields for the entry
      handler - a handler to process directory entries
      Returns:
      the revision of the directory
      Throws:
      SVNException - in the following cases:
      • path not found in the specified revision
      • path is not a directory
      • a failure occured while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
      See Also:
    • getDir

      public SVNDirEntry getDir(java.lang.String path, long revision, boolean includeComments, java.util.Collection entries) throws SVNException
      Description copied from class: SVNRepository
      Fetches the contents of a directory into the provided collection object and returns the directory entry itself.

      If entries arg is not null it receives the directory entries. Information of each directory entry is represented by an SVNDirEntry object.

      The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

      Specified by:
      getDir in class SVNRepository
      Parameters:
      path - a directory path
      revision - a revision number
      includeComments - if true then dir entries (SVNDirEntry objects) will be supplied with commit log messages, otherwise not
      entries - a collection that receives fetched dir entries
      Returns:
      the directory entry itself which contents are fetched into entries
      Throws:
      SVNException - in the following cases:
      • path not found in the specified revision
      • path is not a directory
      • a failure occured while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
      See Also:
    • replay

      public void replay(long lowRevision, long highRevision, boolean sendDeltas, ISVNEditor editor) throws SVNException
      Description copied from class: SVNRepository
      Replays the changes from the specified revision through the given editor.

      Changes will be limited to those that occur under a session's URL, and the server will assume that the client has no knowledge of revisions prior to a lowRevision. These two limiting factors define the portion of the tree that the server will assume the client already has knowledge of, and thus any copies of data from outside that part of the tree will be sent in their entirety, not as simple copies or deltas against a previous version.

      If sendDeltas is true, the actual text and property changes in the revision will be sent, otherwise no text deltas and null property changes will be sent instead.

      If lowRevision is invalid, it defaults to 0.

      Specified by:
      replay in class SVNRepository
      Parameters:
      lowRevision - a low revision point beyond which a client has no knowledge of paths history
      highRevision - a revision to replay
      sendDeltas - controls whether text and property changes are to be sent
      editor - a commit editor to receive changes
      Throws:
      SVNException - in case the repository could not be connected
      SVNAuthenticationException - in case of authentication problems
    • setRevisionPropertyValue

      public void setRevisionPropertyValue(long revision, java.lang.String propertyName, SVNPropertyValue propertyValue) throws SVNException
      Description copied from class: SVNRepository
      Sets a revision property with the specified name to a new value.

      NOTE: revision properties are not versioned. So, the old values may be lost forever.

      Specified by:
      setRevisionPropertyValue in class SVNRepository
      Parameters:
      revision - the number of the revision which property is to be changed
      propertyName - a revision property name
      propertyValue - the value of the revision property
      Throws:
      SVNException - in the following cases:
      • the repository is configured not to allow clients to modify revision properties (e.g. a pre-revprop-change-hook program is not found or failed)
      • revision is invalid or doesn't exist at all
      • a failure occured while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
      See Also:
    • getCommitEditor

      public ISVNEditor getCommitEditor(java.lang.String logMessage, java.util.Map locks, boolean keepLocks, ISVNWorkspaceMediator mediator) throws SVNException
      Description copied from class: SVNRepository
      Gets an editor for committing changes to a repository. Having got the editor traverse a local tree of dirs and/or files to be committed, handling them with corresponding methods of the editor.

      locks is a map used to provide lock tokens on the locked paths. Keys are locked paths in a local tree, and each value for a key is a lock token. locks must live during the whole commit operation.

      If keepLocks is true, then the locked paths won't be unlocked after a successful commit. Otherwise, if false, locks will be automatically released.

      mediator is used for temporary delta data storage allocations.

      The root path of the commit is the current repository location to which this object is set.

      After the commit has succeeded ISVNEditor.closeEdit() returns an SVNCommitInfo object that contains a new revision number, the commit date, commit author.

      NOTE: you may not invoke methods of this SVNRepository object from within the returned commit editor.

      Specified by:
      getCommitEditor in class SVNRepository
      Parameters:
      logMessage - a commit log message
      locks - a map containing locked paths mapped to lock tokens
      keepLocks - true to keep existing locks; false to release locks after the commit
      mediator - temp delta storage provider; used also to cache wcprops while committing
      Returns:
      an editor to commit a local tree of dirs and/or files
      Throws:
      SVNException - in the following cases:
      • the repository location this object is set to is not a directory
      • a failure occured while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
      See Also:
    • getLock

      public SVNLock getLock(java.lang.String path) throws SVNException
      Description copied from class: SVNRepository
      Gets the lock for the file located at the specified path. If the file has no lock the method returns null.

      The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

      Specified by:
      getLock in class SVNRepository
      Parameters:
      path - a file path
      Returns:
      an SVNLock instance (representing the lock) or null if there's no lock
      Throws:
      SVNException - in the following cases:
      See Also:
    • getLocks

      public SVNLock[] getLocks(java.lang.String path) throws SVNException
      Description copied from class: SVNRepository
      Gets all locks on or below the path, that is if the repository entry (located at the path) is a directory then the method returns locks of all locked files (if any) in it.

      The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

      Specified by:
      getLocks in class SVNRepository
      Parameters:
      path - a path under which locks are to be retrieved
      Returns:
      an array of SVNLock objects (representing locks)
      Throws:
      SVNException - in the following cases:
      See Also:
    • lock

      public void lock(java.util.Map pathsToRevisions, java.lang.String comment, boolean force, ISVNLockHandler handler) throws SVNException
      Description copied from class: SVNRepository
      Locks path(s) at definite revision(s).

      Note that locking is never anonymous, so any server implementing this function will have to "pull" a username from the client, if it hasn't done so already.

      Each path to be locked is handled with the provided handler. If a path was successfully locked, the handler's handleLock() is called that receives the path and either a lock object (representing the lock that was set on the path) or an error exception, if locking failed for that path.

      If any path is already locked by a different user and the force flag is false, then this call fails with throwing an SVNException. But if force is true, then the existing lock(s) will be "stolen" anyway, even if the user name does not match the current lock's owner.

      Paths can be both relative to the location of this driver and absolute to the repository root (starting with "/").

      Specified by:
      lock in class SVNRepository
      Parameters:
      pathsToRevisions - a map which keys are paths and values are revision numbers (as Longs); paths are strings and revision numbers are Long objects
      comment - a comment string for the lock (optional)
      force - true if the file is to be locked in any way (even if it's already locked by someone else)
      handler - if not null, the lock handler is invoked on each path to be locked
      Throws:
      SVNException - in the following cases:
      • force is false and a path is already locked by someone else
      • a revision of a path is less than its last changed revision
      • a path does not exist in the latest revision
      • a failure occured while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
      See Also:
    • unlock

      public void unlock(java.util.Map pathToTokens, boolean force, ISVNLockHandler handler) throws SVNException
      Description copied from class: SVNRepository
      Removes lock(s) from the file(s).

      Note that unlocking is never anonymous, so any server implementing this function will have to "pull" a username from the client, if it hasn't done so already.

      Each path to be unlocked is handled with the provided handler. If a path was successfully unlocked, the handler's handleUnlock() is called that receives the path and either a lock object (representing the lock that was removed from the path) or an error exception, if unlocking failed for that path.

      If the username doesn't match the lock's owner and force is false, this method call fails with throwing an SVNException. But if the force flag is true, the lock will be "broken" by the current user.

      Also if the lock token is incorrect or null and force is false, the method fails with throwing a SVNException. However, if force is true the lock will be removed anyway.

      Paths can be both relative to the location of this driver and absolute to the repository root (starting with "/").

      Specified by:
      unlock in class SVNRepository
      Parameters:
      pathToTokens - a map which keys are file paths and values are file lock tokens (both keys and values are strings)
      force - true to remove the lock in any case - i.e. to "break" the lock
      handler - if not null, the lock handler is invoked on each path to be unlocked
      Throws:
      SVNException - in the following cases:
      • force is false and the name of the user who tries to unlock a path does not match the lock owner
      • a lock token is incorrect for a path
      • a failure occurred while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
      See Also:
    • info

      public SVNDirEntry info(java.lang.String path, long revision) throws SVNException
      Description copied from class: SVNRepository
      Gives information about an entry located at the specified path in a particular revision.

      The path arg can be both relative to the location of this driver and absolute to the repository root (starts with "/").

      Specified by:
      info in class SVNRepository
      Parameters:
      path - an item's path
      revision - a revision of the entry; defaults to the latest revision (HEAD)
      Returns:
      an SVNDirEntry containing information about the entry or null if there's no entry with at the specified path under the specified revision
      Throws:
      SVNException - in the following cases:
    • closeSession

      public void closeSession()
      Description copied from class: SVNRepository
      Closes the current session closing a socket connection used by this object. If this driver object keeps a single connection for all the data i/o, this method helps to reset the connection.
      Specified by:
      closeSession in class SVNRepository
    • doGetFullPath

      public java.lang.String doGetFullPath(java.lang.String relativeOrRepositoryPath) throws SVNException
      Throws:
      SVNException
    • diff

      public void diff(SVNURL url, long targetRevision, long revision, java.lang.String target, boolean ignoreAncestry, SVNDepth depth, boolean getContents, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
      Description copied from class: SVNRepository
      Asks this repository access object to 'diff' a working copy against targetRevision.

      Note: this method cannot be used to diff a single file, only a directory. See the SVNRepository.update(SVNURL, long, String, SVNDepth, ISVNReporterBaton, ISVNEditor) method for more details.

      The client initially provides an editor; this editor contains knowledge of where the common diff root is in the working copy (when ISVNEditor.openRoot(long) is called).

      In return, the client receives a ISVNReporter object in his ISVNReporterBaton implementation. The client then describes its working copy by making calls into the reporter object.

      When finished, the client calls ISVNReporter.finishReport(). This SVNRepository object then does a complete drive of editor, ending with ISVNEditor.closeEdit(), to transmit the diff.

      target is an optional single path component that will restrict the scope of things affected by the switch to an entry in the directory represented by the location of this object, or null if the entire directory is meant to be switched.

      The working copy will be diffed against url as it exists in revision targeRevision, or as it is in HEAD if targetRevision is invalid (<0).

      Use ignoreAncestry to control whether or not items being diffed will be checked for relatedness first. Unrelated items are typically transmitted to the editor as a deletion of one thing and the addition of another, but if this flag is true, unrelated items will be diffed as if they were related.

      Diffs only as deeply as depth indicates.

      The caller may not perform any repository access operations using this SVNRepository object before finishing the report, and may not perform any repository access operations using this SVNRepository object from within the editing operations of editor.

      getContents instructs the driver of the editor to enable the generation of text deltas. If getContents is false the editor's ISVNDeltaConsumer.textDeltaChunk(String, SVNDiffWindow) method will be called once with SVNDiffWindow.EMPTY.

      Note: the reporter provided by this function does NOT supply copy-from information to the diff editor callbacks.

      Note: in order to prevent pre-1.5 servers from doing more work than needed, and sending too much data back, a pre-1.5 'recurse' directive may be sent to the server, based on depth.

      Specified by:
      diff in class SVNRepository
      Parameters:
      url - a repository location of the entry against which differences are calculated
      targetRevision - a revision number of the entry located at the specified url; defaults to the latest revision (HEAD) if this arg is invalid
      revision - a revision number of the repository location to which this driver object is set
      target - a target entry name (optional)
      ignoreAncestry - if true then the ancestry of the two entries to be diffed is ignored, otherwise not
      depth - tree depth to process
      getContents - if false contents (diff windows) will not be sent to the editor
      reporter - a caller's reporter
      editor - a caller's editor
      Throws:
      SVNException - in the following cases:
      • url not found neither in the specified revision nor in the HEAD revision
      • a failure occured while connecting to a repository
      • the user authentication failed (see SVNAuthenticationException)
    • status

      public void status(long revision, java.lang.String target, SVNDepth depth, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
      Description copied from class: SVNRepository
      Gets status of a path to the particular depth as a scope. SVNRepository.status(long, String, boolean, ISVNReporterBaton, ISVNEditor)
      Specified by:
      status in class SVNRepository
      Parameters:
      revision - a desired revision to get status against; defaults to the latest revision (HEAD)
      target - an entry name (optional)
      depth - defines the status scope
      reporter - a client's reporter-baton
      editor - a client's status editor
      Throws:
      SVNException - in the following cases:
      See Also:
    • update

      public void update(SVNURL url, long revision, java.lang.String target, SVNDepth depth, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
      Description copied from class: SVNRepository
      Asks this repository access object to 'switch' a versioned tree to a new url.

      The client initially provides an editor; this editor contains knowledge of where the change will begin in the working copy (ISVNEditor.openRoot(long) is called).

      In return, the client receives a ISVNReporter object in his ISVNReporterBaton implementation. The client then describes its working copy by making calls into the reporter object.

      When finished, the client calls ISVNReporter.finishReport(). This SVNRepository object then does a complete drive of editor, ending with ISVNEditor.closeEdit(), to switch the working copy.

      target is an optional single path component that will restrict the scope of things affected by the switch to an entry in the directory represented by the location of this object, or null if the entire directory is meant to be switched.

      Switches the target only as deeply as depth indicates.

      The local tree will be switched to revision, or the HEAD revision if this arg is invalid.

      The caller may not perform any repository access operations using this SVNRepository object before finishing the report, and may not perform any repository access operations using this SVNRepository object from within the editing operations of editor.

      Note: the reporter provided by this function does NOT supply copy-from information to the diff editor callbacks.

      Note: in order to prevent pre-1.5 servers from doing more work than needed, and sending too much data back, a pre-1.5 'recurse' directive may be sent to the server, based on depth.

      Specified by:
      update in class SVNRepository
      Parameters:
      url - a new location in the repository to switch to
      revision - a desired revision to make update to; defaults to the latest revision (HEAD)
      target - an entry name (optional)
      depth - the depth for update operation
      reporter - a caller's reporter
      editor - a caller's editor
      Throws:
      SVNException
      See Also:
    • update

      public void update(long revision, java.lang.String target, SVNDepth depth, boolean sendCopyFromArgs, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
      Description copied from class: SVNRepository
      Updates a path receiving changes from a repository.

      target is the name (one-level path component) of an entry that will restrict the scope of the update to this entry. In other words target is a child entry of the directory represented by the repository location to which this object is set. For example, if we have something like "/dirA/dirB" in a repository, then this object's repository location may be set to "svn://host:port/path/to/repos/dirA", and target may be "dirB".

      If target is null or empty ("") then the scope of the update operation is the repository location to which this object is set.

      The reporter is used to describe the state of the local item(s) (i.e. items' revision numbers, deleted, switched items). All the paths described by the reporter should be relative to the repository location to which this object is set.

      After that the editor is used to carry out all the work on updating. This editor contains knowledge of where the change will begin (when ISVNEditor.openRoot() is called).

      NOTE: you may not invoke methods of this SVNRepository object from within the provided reporter and editor.

      Specified by:
      update in class SVNRepository
      Parameters:
      revision - a desired revision to make update to; defaults to the latest revision (HEAD)
      target - an entry name (optional)
      depth - a depth for update operation, determines the scope of the update
      reporter - a caller's reporter
      editor - a caller's editor
      Throws:
      SVNException - in case the repository could not be connected
      SVNAuthenticationException - in case of authentication problems
      See Also:
    • hasCapability

      public boolean hasCapability(SVNCapability capability) throws SVNException
      Description copied from class: SVNRepository
      Returns true if the repository has specified capability. This method may need to establish connection with the repository if information on capabilities has not been received yet from the repository.
      Specified by:
      hasCapability in class SVNRepository
      Parameters:
      capability - one of SVNCapability
      Returns:
      boolean if the repository has specified capability
      Throws:
      SVNException - in case the repository could not be connected
      SVNAuthenticationException - in case of authentication problems
      See Also:
    • getFileRevisionsImpl

      protected int getFileRevisionsImpl(java.lang.String path, long startRevision, long endRevision, boolean includeMergedRevisions, ISVNFileRevisionHandler handler) throws SVNException
      Specified by:
      getFileRevisionsImpl in class SVNRepository
      Throws:
      SVNException
    • logImpl

      protected long logImpl(java.lang.String[] targetPaths, long startRevision, long endRevision, boolean changedPath, boolean strictNode, long limit, boolean includeMergedRevisions, java.lang.String[] revPropNames, ISVNLogEntryHandler handler) throws SVNException
      Specified by:
      logImpl in class SVNRepository
      Throws:
      SVNException
    • openConnection

      protected void openConnection() throws SVNException
      Throws:
      SVNException
    • createDAVConnection

      protected DAVConnection createDAVConnection(IHTTPConnectionFactory connectionFactory, DAVRepository repo)
    • closeConnection

      protected void closeConnection()
    • getLocationsImpl

      protected int getLocationsImpl(java.lang.String path, long pegRevision, long[] revisions, ISVNLocationEntryHandler handler) throws SVNException
      Specified by:
      getLocationsImpl in class SVNRepository
      Throws:
      SVNException
    • getLocationSegmentsImpl

      protected long getLocationSegmentsImpl(java.lang.String path, long pegRevision, long startRevision, long endRevision, ISVNLocationSegmentHandler handler) throws SVNException
      Specified by:
      getLocationSegmentsImpl in class SVNRepository
      Throws:
      SVNException
    • doGetRepositoryPath

      protected java.lang.String doGetRepositoryPath(java.lang.String relativePath) throws SVNException
      Throws:
      SVNException
    • getMergeInfoImpl

      protected java.util.Map getMergeInfoImpl(java.lang.String[] paths, long revision, SVNMergeInfoInheritance inherit, boolean includeDescendants) throws SVNException
      Specified by:
      getMergeInfoImpl in class SVNRepository
      Throws:
      SVNException
    • replayRangeImpl

      protected void replayRangeImpl(long startRevision, long endRevision, long lowRevision, boolean sendDeltas, ISVNReplayHandler handler) throws SVNException
      Specified by:
      replayRangeImpl in class SVNRepository
      Throws:
      SVNException
    • getCommitEditorInternal

      protected ISVNEditor getCommitEditorInternal(java.util.Map locks, boolean keepLocks, SVNProperties revProps, ISVNWorkspaceMediator mediator) throws SVNException
      Specified by:
      getCommitEditorInternal in class SVNRepository
      Throws:
      SVNException
    • getDeletedRevisionImpl

      protected long getDeletedRevisionImpl(java.lang.String path, long pegRevision, long endRevision) throws SVNException
      Specified by:
      getDeletedRevisionImpl in class SVNRepository
      Throws:
      SVNException
    • getConnection

      protected DAVConnection getConnection()
    • getConnectionFactory

      protected IHTTPConnectionFactory getConnectionFactory()
    • doGetMergeInfo

      private java.util.Map doGetMergeInfo(java.lang.String[] paths, long revision, SVNMergeInfoInheritance inherit, boolean includeDescendants) throws SVNException
      Throws:
      SVNException
    • runReport

      private void runReport(SVNURL url, long targetRevision, java.lang.String target, java.lang.String dstPath, SVNDepth depth, boolean ignoreAncestry, boolean resourceWalk, boolean fetchContents, boolean sendCopyFromArgs, boolean sendAll, boolean closeEditorOnException, boolean spool, ISVNWorkingCopyContentMediator workingCopyContentMediator, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
      Throws:
      SVNException
    • createDirEntry

      private SVNDirEntry createDirEntry(java.lang.String fullPath, DAVProperties child) throws SVNException
      Throws:
      SVNException
    • getInheritedPropertiesImpl

      protected void getInheritedPropertiesImpl(java.lang.String path, long revision, java.lang.String propertyName, ISVNInheritedPropertiesHandler handler) throws SVNException
      Specified by:
      getInheritedPropertiesImpl in class SVNRepository
      Throws:
      SVNException