Overview | Package | Class | Tree | Deprecated | Index | Help
| SVNKit Home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.tmatesoft.svn.core.wc
Class SVNWCClient

    java.lang.Object
      org.tmatesoft.svn.core.wc.SVNBasicClient
          org.tmatesoft.svn.core.wc.SVNWCClient

All Implemented Interfaces:
  ISVNCanceller, ISVNEventHandler

public class SVNWCClient
extends SVNBasicClient

The SVNWCClient class combines a number of version control operations mainly intended for local work with Working Copy items. This class includes those operations that are destined only for local work on a Working Copy as well as those that are moreover able to access a repository.

Here's a list of the SVNWCClient's methods matched against corresponing commands of the SVN command line client:

SVNKit | Subversion
doAdd() | 'svn add'
doDelete() | 'svn delete'
doCleanup() | 'svn cleanup'
doInfo() | 'svn info'
doLock() | 'svn lock'
doUnlock() | 'svn unlock'
doSetProperty() | 'svn propset PROPNAME PROPVAL PATH' 'svn propdel PROPNAME PATH' 'svn propedit PROPNAME PATH'
doSetRevisionProperty() | 'svn propset PROPNAME --revprop -r REV PROPVAL [URL]' 'svn propdel PROPNAME --revprop -r REV [URL]' 'svn propedit PROPNAME --revprop -r REV [URL]'
doGetProperty() | 'svn propget PROPNAME PATH' 'svn proplist PATH'
doGetRevisionProperty() | 'svn propget PROPNAME --revprop -r REV [URL]' 'svn proplist --revprop -r REV [URL]'
doResolve() | 'svn resolved'
doRevert() | 'svn revert'

Version:
  1.1.1
Author:
  TMate Software Ltd.
See Also:
  Examples

Nested Class Summary

Nested classes inherited from class org.tmatesoft.svn.core.wc.SVNBasicClient
`SVNBasicClient.RepositoryReference, SVNBasicClient.SVNRepositoryLocation`

Field Summary
`static ISVNAddParameters` | `DEFAULT_ADD_PARAMETERS`

Fields inherited from interface org.tmatesoft.svn.core.wc.ISVNEventHandler
`UNKNOWN`

Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller
`NULL`

Constructor Summary
`SVNWCClient(ISVNAuthenticationManager authManager, ISVNOptions options)` Constructs and initializes an SVNWCClient object with the specified run-time configuration and authentication drivers.
`SVNWCClient(ISVNRepositoryPool repositoryPool, ISVNOptions options)`

Method Summary
`void` | `doAdd(File path, boolean force, boolean mkdir, boolean climbUnversionedParents, boolean recursive)` Schedules an unversioned item for addition to a repository thus putting it under version control.
`void` | `doAdd(File path, boolean force, boolean mkdir, boolean climbUnversionedParents, boolean recursive, boolean includeIgnored)` Schedules an unversioned item for addition to a repository thus putting it under version control.
`void` | `doCleanup(File path)` Recursively cleans up the working copy, removing locks and resuming unfinished operations.
`void` | `doCleanup(File path, boolean deleteWCProperties)`
`void` | `doCleanupWCProperties(File directory)`
`void` | `doDelete(File path, boolean force, boolean dryRun)` Schedules a Working Copy item for deletion.
`void` | `doDelete(File path, boolean force, boolean deleteFiles, boolean dryRun)` Schedules a Working Copy item for deletion.
`void` | `doGetFileContents(File path, SVNRevision pegRevision, SVNRevision revision, boolean expandKeywords, OutputStream dst)` Gets contents of a file.
`void` | `doGetFileContents(SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean expandKeywords, OutputStream dst)` Gets contents of a file of a particular revision from a repository.
`SVNPropertyData` | `doGetProperty(File path, String propName, SVNRevision pegRevision, SVNRevision revision, boolean recursive)` Gets an item's versioned property.
`void` | `doGetProperty(File path, String propName, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNPropertyHandler handler)` Gets an item's versioned property and passes it to a provided property handler.
`SVNPropertyData` | `doGetProperty(SVNURL url, String propName, SVNRevision pegRevision, SVNRevision revision, boolean recursive)` Gets an item's versioned property from a repository.
`void` | `doGetProperty(SVNURL url, String propName, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNPropertyHandler handler)` Gets an item's versioned property from a repository and passes it to a provided property handler.
`void` | `doGetRevisionProperty(File path, String propName, SVNRevision revision, ISVNPropertyHandler handler)` Gets an unversioned revision property from a repository (getting a repository URL from a Working Copy) and passes it to a provided property handler.
`void` | `doGetRevisionProperty(SVNURL url, String propName, SVNRevision revision, ISVNPropertyHandler handler)` Gets an unversioned revision property from a repository and passes it to a provided property handler.
`String` | `doGetWorkingCopyID(File path, String trailURL)` Returns the current Working Copy min- and max- revisions as well as changes and switch status within a single string.
`String` | `doGetWorkingCopyID(File path, String trailURL, boolean committed)`
`SVNInfo` | `doInfo(File path, SVNRevision revision)` Collects and returns information on a single Working Copy item.
`void` | `doInfo(File path, SVNRevision revision, boolean recursive, ISVNInfoHandler handler)` Collects information about Working Copy item(s) and passes it to an info handler.
`void` | `doInfo(File path, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNInfoHandler handler)` Collects information about Working Copy item(s) and passes it to an info handler.
`SVNInfo` | `doInfo(SVNURL url, SVNRevision pegRevision, SVNRevision revision)` Collects and returns information on a single item in a repository.
`void` | `doInfo(SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean recursive, ISVNInfoHandler handler)` Collects information about item(s) in a repository and passes it to an info handler.
`void` | `doLock(File[] paths, boolean stealLock, String lockMessage)` Locks file items in a Working Copy as well as in a repository so that no other user can commit changes to them.
`void` | `doLock(SVNURL[] urls, boolean stealLock, String lockMessage)` Locks file items in a repository so that no other user can commit changes to them.
`void` | `doResolve(File path, boolean recursive)` Resolves a 'conflicted' state on a Working Copy item.
`void` | `doRevert(File[] paths, boolean recursive)` Reverts all local changes made to a Working Copy item(s) thus bringing it to a 'pristine' state.
`void` | `doRevert(File path, boolean recursive)` Reverts all local changes made to a Working Copy item(s) thus bringing it to a 'pristine' state.
`void` | `doSetProperty(File path, String propName, String propValue, boolean force, boolean recursive, ISVNPropertyHandler handler)` Sets, edits or deletes a property on a file or directory item(s).
`void` | `doSetRevisionProperty(File path, SVNRevision revision, String propName, String propValue, boolean force, ISVNPropertyHandler handler)` Sets, edits or deletes an unversioned revision property.
`void` | `doSetRevisionProperty(SVNURL url, SVNRevision revision, String propName, String propValue, boolean force, ISVNPropertyHandler handler)` Sets, edits or deletes an unversioned revision property.
`void` | `doUnlock(File[] paths, boolean breakLock)` Unlocks file items in a Working Copy as well as in a repository.
`void` | `doUnlock(SVNURL[] urls, boolean breakLock)` Unlocks file items in a repository.
`protected ISVNAddParameters` | `getAddParameters()`
`void` | `setAddParameters(ISVNAddParameters addParameters)`

Methods inherited from class org.tmatesoft.svn.core.wc.SVNBasicClient
`checkCancelled, createRepository, createRepository, createRepository, createWCAccess, createWCAccess, dispatchEvent, dispatchEvent, getDebugLog, getEventDispatcher, getLocations, getOptions, getRepositoryPool, getRevisionNumber, getURL, handleEvent, isIgnoreExternals, isLeaveConflictsUnresolved, setDebugLog, setEventHandler, setEventPathPrefix, setIgnoreExternals, setLeaveConflictsUnresolved, setOptions, sleepForTimeStamp`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_ADD_PARAMETERS

    public static ISVNAddParameters DEFAULT_ADD_PARAMETERS

Constructor Detail

### SVNWCClient

    public SVNWCClient(ISVNAuthenticationManager authManager,
                       ISVNOptions options)

  Constructs and initializes an SVNWCClient object with the specified run-time configuration and authentication drivers.

  If `options` is null, then this SVNWCClient will be using a default run-time configuration driver which takes client-side settings from the default SVN's run-time configuration area but is not able to change those settings (read more on `ISVNOptions` and `SVNWCUtil`).

  If `authManager` is null, then this SVNWCClient will be using a default authentication and network layers driver (see `SVNWCUtil.createDefaultAuthenticationManager()`) which uses server-side settings and auth storage from the default SVN's run-time configuration area (or system properties if that area is not found).

Parameters:
  `authManager` - an authentication and network layers driver
  `options` - a run-time configuration options driver

### SVNWCClient

    public SVNWCClient(ISVNRepositoryPool repositoryPool,
                       ISVNOptions options)

Method Detail

### setAddParameters

    public void setAddParameters(ISVNAddParameters addParameters)

### getAddParameters

    protected ISVNAddParameters getAddParameters()

### doGetFileContents

    public void doGetFileContents(File path,
                                  SVNRevision pegRevision,
                                  SVNRevision revision,
                                  boolean expandKeywords,
                                  OutputStream dst)
                           throws SVNException

  Gets contents of a file. If revision is one of:
  - `BASE`
  - `WORKING`
  - `COMMITTED`
  then the file contents are taken from the Working Copy file item. Otherwise the file item's contents are taken from the repository at a particular revision.

  Parameters:
    `path` - a Working Copy file item
    `pegRevision` - a revision in which the file item is first looked up
    `revision` - a target revision
    `expandKeywords` - if true then all keywords presenting in the file and listed in the file's `svn:keywords` property (if set) will be substituted, otherwise not
    `dst` - the destination where the file contents will be written to
  Throws:
    `SVNException` - if one of the following is true:
    - `path` refers to a directory
    - `path` does not exist
    - `path` is not under version control
  See Also:
    `doGetFileContents(SVNURL, SVNRevision, SVNRevision, boolean, OutputStream)`

### doGetFileContents

    public void doGetFileContents(SVNURL url,
                                  SVNRevision pegRevision,
                                  SVNRevision revision,
                                  boolean expandKeywords,
                                  OutputStream dst)
                           throws SVNException

  Gets contents of a file of a particular revision from a repository.

  Parameters:
    `url` - a file item's repository location
    `pegRevision` - a revision in which the file item is first looked up
    `revision` - a target revision
    `expandKeywords` - if true then all keywords presenting in the file and listed in the file's `svn:keywords` property (if set) will be substituted, otherwise not
    `dst` - the destination where the file contents will be written to
  Throws:
    `SVNException` - if one of the following is true:
    - `url` refers to a directory
    - it's impossible to create temporary files (`createTempFile()` fails) necessary for file translating
  See Also:
    `doGetFileContents(File, SVNRevision, SVNRevision, boolean, OutputStream)`

### doCleanup

    public void doCleanup(File path)
                   throws SVNException

  Recursively cleans up the working copy, removing locks and resuming unfinished operations.

  If you ever get a "working copy locked" error, use this method to remove stale locks and get your working copy into a usable state again.

  Parameters:
    `path` - a WC path to start a cleanup from
  Throws:
    `SVNException` - if one of the following is true:
    - `path` does not exist
    - `path`'s parent directory is not under version control

### doCleanup

    public void doCleanup(File path,
                          boolean deleteWCProperties)
                   throws SVNException

  Throws:
    `SVNException`

### doSetProperty

    public void doSetProperty(File path,
                              String propName,
                              String propValue,
                              boolean force,
                              boolean recursive,
                              ISVNPropertyHandler handler)
                       throws SVNException

  Sets, edits or deletes a property on a file or directory item(s).

  To set or edit a property simply provide a `propName` and a `propValue`. To delete a property set `propValue` to null and the property `propName` will be deleted.

  Parameters:
    `path` - a WC item which properties are to be modified
    `propName` - a property name
    `propValue` - a property value
    `force` - true to force the operation to run
    `recursive` - true to descend recursively
    `handler` - a caller's property handler
  Throws:
    `SVNException` - if one of the following is true:
    - `propName` is a revision property
    - `propName` starts with the `svn:wc:` prefix
  See Also:
    `doSetRevisionProperty(File, SVNRevision, String, String, boolean, ISVNPropertyHandler)`, `doGetProperty(File, String, SVNRevision, SVNRevision, boolean)`, `doGetRevisionProperty(File, String, SVNRevision, ISVNPropertyHandler)`

### doSetRevisionProperty

    public void doSetRevisionProperty(File path,
                                      SVNRevision revision,
                                      String propName,
                                      String propValue,
                                      boolean force,
                                      ISVNPropertyHandler handler)
                               throws SVNException

  Sets, edits or deletes an unversioned revision property. This method uses a Working Copy item to obtain the URL of the repository which revision properties are to be changed.

  To set or edit a property simply provide a `propName` and a `propValue`. To delete a revision property set `propValue` to null and the property `propName` will be deleted.

  Parameters:
    `path` - a Working Copy item
    `revision` - a revision which properties are to be modified
    `propName` - a property name
    `propValue` - a property value
    `force` - true to force the operation to run
    `handler` - a caller's property handler
  Throws:
    `SVNException` - if one of the following is true:
    - the operation can not be performed without forcing
    - `propName` starts with the `svn:wc:` prefix
  See Also:
    `doSetRevisionProperty(SVNURL, SVNRevision, String, String, boolean, ISVNPropertyHandler)`, `doSetProperty(File, String, String, boolean, boolean, ISVNPropertyHandler)`, `doGetProperty(File, String, SVNRevision, SVNRevision, boolean)`, `doGetRevisionProperty(File, String, SVNRevision, ISVNPropertyHandler)`

### doSetRevisionProperty

    public void doSetRevisionProperty(SVNURL url,
                                      SVNRevision revision,
                                      String propName,
                                      String propValue,
                                      boolean force,
                                      ISVNPropertyHandler handler)
                               throws SVNException

  Sets, edits or deletes an unversioned revision property. This method uses a URL pointing to a repository which revision properties are to be changed.

  To set or edit a property simply provide a `propName` and a `propValue`. To delete a revision property set `propValue` to null and the property `propName` will be deleted.

  Parameters:
    `url` - a URL pointing to a repository location
    `revision` - a revision which properties are to be modified
    `propName` - a property name
    `propValue` - a property value
    `force` - true to force the operation to run
    `handler` - a caller's property handler
  Throws:
    `SVNException` - if one of the following is true:
    - the operation can not be performed without forcing
    - `propName` starts with the `svn:wc:` prefix
  See Also:
    `doSetRevisionProperty(File, SVNRevision, String, String, boolean, ISVNPropertyHandler)`, `doSetProperty(File, String, String, boolean, boolean, ISVNPropertyHandler)`, `doGetProperty(File, String, SVNRevision, SVNRevision, boolean)`, `doGetRevisionProperty(File, String, SVNRevision, ISVNPropertyHandler)`

### doGetProperty

    public SVNPropertyData doGetProperty(File path,
                                         String propName,
                                         SVNRevision pegRevision,
                                         SVNRevision revision,
                                         boolean recursive)
                                  throws SVNException

  Gets an item's versioned property. It's possible to get either a local property (from a Working Copy) or a remote one (located in a repository). If revision is one of:
  - `BASE`
  - `WORKING`
  - `COMMITTED`
  then the result is a WC item's property. Otherwise the property is taken from a repository (using the item's URL).

  Parameters:
    `path` - a WC item's path
    `propName` - an item's property name; if it's null then all the item's properties will be retrieved but only the first of them returned
    `pegRevision` - a revision in which the item is first looked up
    `revision` - a target revision;
    `recursive` - true to descend recursively
  Returns:
    the item's property
  Throws:
    `SVNException` - if one of the following is true:
    - `propName` starts with the `svn:wc:` prefix
    - `path` is not under version control
  See Also:
    `doGetProperty(File, String, SVNRevision, SVNRevision, boolean, ISVNPropertyHandler)`, `doSetProperty(File, String, String, boolean, boolean, ISVNPropertyHandler)`

### doGetProperty

    public SVNPropertyData doGetProperty(SVNURL url,
                                         String propName,
                                         SVNRevision pegRevision,
                                         SVNRevision revision,
                                         boolean recursive)
                                  throws SVNException

  Gets an item's versioned property from a repository. This method is useful when having no Working Copy at all.

  Parameters:
    `url` - an item's repository location
    `propName` - an item's property name; if it's null then all the item's properties will be retrieved but only the first of them returned
    `pegRevision` - a revision in which the item is first looked up
    `revision` - a target revision
    `recursive` - true to descend recursively
  Returns:
    the item's property
  Throws:
    `SVNException` - if `propName` starts with the `svn:wc:` prefix
  See Also:
    `doGetProperty(SVNURL, String, SVNRevision, SVNRevision, boolean, ISVNPropertyHandler)`, `doSetProperty(File, String, String, boolean, boolean, ISVNPropertyHandler)`

### doGetProperty

    public void doGetProperty(File path,
                              String propName,
                              SVNRevision pegRevision,
                              SVNRevision revision,
                              boolean recursive,
                              ISVNPropertyHandler handler)
                       throws SVNException

  Gets an item's versioned property and passes it to a provided property handler. It's possible to get either a local property (from a Working Copy) or a remote one (located in a repository). If revision is one of:
  - `BASE`
  - `WORKING`
  - `COMMITTED`
  then the result is a WC item's property. Otherwise the property is taken from a repository (using the item's URL).

  Parameters:
    `path` - a WC item's path
    `propName` - an item's property name; if it's null then all the item's properties will be retrieved and passed to `handler` for processing
    `pegRevision` - a revision in which the item is first looked up
    `revision` - a target revision;
    `recursive` - true to descend recursively
    `handler` - a caller's property handler
  Throws:
    `SVNException` - if one of the following is true:
    - `propName` starts with the `svn:wc:` prefix
    - `path` is not under version control
  See Also:
    `doGetProperty(File, String, SVNRevision, SVNRevision, boolean)`, `doSetProperty(File, String, String, boolean, boolean, ISVNPropertyHandler)`

### doGetProperty

    public void doGetProperty(SVNURL url,
                              String propName,
                              SVNRevision pegRevision,
                              SVNRevision revision,
                              boolean recursive,
                              ISVNPropertyHandler handler)
                       throws SVNException

  Gets an item's versioned property from a repository and passes it to a provided property handler. This method is useful when having no Working Copy at all.

  Parameters:
    `url` - an item's repository location
    `propName` - an item's property name; if it's null then all the item's properties will be retrieved and passed to `handler` for processing
    `pegRevision` - a revision in which the item is first looked up
    `revision` - a target revision
    `recursive` - true to descend recursively
    `handler` - a caller's property handler
  Throws:
    `SVNException` - if `propName` starts with the `svn:wc:` prefix
  See Also:
    `doGetProperty(SVNURL, String, SVNRevision, SVNRevision, boolean)`, `doSetProperty(File, String, String, boolean, boolean, ISVNPropertyHandler)`

### doGetRevisionProperty

    public void doGetRevisionProperty(File path,
                                      String propName,
                                      SVNRevision revision,
                                      ISVNPropertyHandler handler)
                               throws SVNException

  Gets an unversioned revision property from a repository (getting a repository URL from a Working Copy) and passes it to a provided property handler.

  Parameters:
    `path` - a local Working Copy item which repository location is used to connect to a repository
    `propName` - a revision property name; if this parameter is null then all the revision properties will be retrieved and passed to `handler` for processing
    `revision` - a revision which property is to be retrieved
    `handler` - a caller's property handler
  Throws:
    `SVNException` - if one of the following is true:
    - `revision` is invalid
    - `propName` starts with the `svn:wc:` prefix
  See Also:
    `doGetRevisionProperty(SVNURL, String, SVNRevision, ISVNPropertyHandler)`, `doSetRevisionProperty(File, SVNRevision, String, String, boolean, ISVNPropertyHandler)`

### doGetRevisionProperty

    public void doGetRevisionProperty(SVNURL url,
                                      String propName,
                                      SVNRevision revision,
                                      ISVNPropertyHandler handler)
                               throws SVNException

  Gets an unversioned revision property from a repository and passes it to a provided property handler.

  Parameters:
    `url` - a URL pointing to a repository location which revision property is to be got
    `propName` - a revision property name; if this parameter is null then all the revision properties will be retrieved and passed to `handler` for processing
    `revision` - a revision which property is to be retrieved
    `handler` - a caller's property handler
  Throws:
    `SVNException` - if one of the following is true:
    - `revision` is invalid
    - `propName` starts with the `svn:wc:` prefix
  See Also:
    `doGetRevisionProperty(File, String, SVNRevision, ISVNPropertyHandler)`, `doSetRevisionProperty(SVNURL, SVNRevision, String, String, boolean, ISVNPropertyHandler)`

### doDelete

    public void doDelete(File path,
                         boolean force,
                         boolean dryRun)
                  throws SVNException

  Schedules a Working Copy item for deletion.

  Parameters:
    `path` - a WC item to be deleted
    `force` - true to force the operation to run
    `dryRun` - true only to try the delete operation without actual deleting
  Throws:
    `SVNException` - if one of the following is true:
    - `path` is not under version control
    - can not delete `path` without forcing
  See Also:
    `doDelete(File, boolean, boolean, boolean)`

### doDelete

    public void doDelete(File path,
                         boolean force,
                         boolean deleteFiles,
                         boolean dryRun)
                  throws SVNException

  Schedules a Working Copy item for deletion. This method allows to choose - whether file item(s) are to be deleted from the filesystem or not. Another version of the `doDelete()` method is similar to the corresponding SVN client's command - `'svn delete'` as it always deletes files from the filesystem.

  Parameters:
    `path` - a WC item to be deleted
    `force` - true to force the operation to run
    `deleteFiles` - if true then files will be scheduled for deletion as well as deleted from the filesystem, otherwise files will be only scheduled for addition and still be present in the filesystem
    `dryRun` - true only to try the delete operation without actual deleting
  Throws:
    `SVNException` - if one of the following is true:
    - `path` is not under version control
    - can not delete `path` without forcing

### doAdd

    public void doAdd(File path,
                      boolean force,
                      boolean mkdir,
                      boolean climbUnversionedParents,
                      boolean recursive)
               throws SVNException

  Schedules an unversioned item for addition to a repository thus putting it under version control.

  To create and add to version control a new directory, set `mkdir` to true.

  Calling this method is equivalent to `doAdd(path, force, mkdir, climbUnversionedParents, recursive, false)`.

  Parameters:
    `path` - a path to be put under version control (will be added to a repository in next commit)
    `force` - when true forces the operation to run on already versioned files or directories without reporting error. When ran recursively, all unversioned files and directories in a tree will be scheduled for addition.
    `mkdir` - if true - creates a new directory and schedules it for addition
    `climbUnversionedParents` - if true and `path` is located in an unversioned parent directory then the parent will be automatically scheduled for addition, too
    `recursive` - true to descend recursively (relevant for directories)
  Throws:
    `SVNException` - if one of the following is true:
    - `path` doesn't belong to a Working Copy
    - `path` doesn't exist and `mkdir` is false
    - `path` is the root directory of the Working Copy

### doAdd

    public void doAdd(File path,
                      boolean force,
                      boolean mkdir,
                      boolean climbUnversionedParents,
                      boolean recursive,
                      boolean includeIgnored)
               throws SVNException

  Schedules an unversioned item for addition to a repository thus putting it under version control.

  To create and add to version control a new directory, set `mkdir` to true.

  Parameters:
    `path` - a path to be put under version control (will be added to a repository in next commit)
    `force` - when true forces the operation to run on already versioned files or directories without reporting error. When ran recursively, all unversioned files and directories in a tree will be scheduled for addition.
    `mkdir` - if true - creates a new directory and schedules it for addition
    `climbUnversionedParents` - if true and `path` is located in an unversioned parent directory then the parent will be automatically scheduled for addition, too
    `recursive` - true to descend recursively (relevant for directories)
    `includeIgnored` - controls whether ignored items must be also added
  Throws:
    `SVNException` - if one of the following is true:
    - `path` doesn't belong to a Working Copy
    - `path` doesn't exist and `mkdir` is false
    - `path` is the root directory of the Working Copy
  Since:
    1.1

### doRevert

    public void doRevert(File path,
                         boolean recursive)
                  throws SVNException

  Reverts all local changes made to a Working Copy item(s) thus bringing it to a 'pristine' state.

  Parameters:
    `path` - a WC path to perform a revert on
    `recursive` - true to descend recursively (relevant for directories)
  Throws:
    `SVNException` - if one of the following is true:
    - `path` is not under version control
    - when trying to revert an addition of a directory from within the directory itself
  See Also:
    `doRevert(File[], boolean)`

### doRevert

    public void doRevert(File[] paths,
                         boolean recursive)
                  throws SVNException

  Reverts all local changes made to a Working Copy item(s) thus bringing it to a 'pristine' state.

  Parameters:
    `paths` - a WC paths to perform a revert on
    `recursive` - true to descend recursively (relevant for directories)
  Throws:
    `SVNException` - if one of the following is true:
    - `path` is not under version control
    - when trying to revert an addition of a directory from within the directory itself
    Exception will not be thrown if there are multiple paths passed. Instead caller should process events received by `ISVNEventHandler` instance to get information on whether certain path was reverted or not.

### doResolve

    public void doResolve(File path,
                          boolean recursive)
                   throws SVNException

  Resolves a 'conflicted' state on a Working Copy item.

  Parameters:
    `path` - a WC item to be resolved
    `recursive` - true to descend recursively (relevant for directories) - this will resolve the entire tree
  Throws:
    `SVNException` - if `path` is not under version control

### doLock

    public void doLock(File[] paths,
                       boolean stealLock,
                       String lockMessage)
                throws SVNException

  Locks file items in a Working Copy as well as in a repository so that no other user can commit changes to them.

  Parameters:
    `paths` - an array of local WC file paths that should be locked
    `stealLock` - if true then all existing locks on the specified `paths` will be "stolen"
    `lockMessage` - an optional lock comment
  Throws:
    `SVNException` - if one of the following is true:
    - a path to be locked is not under version control
    - can not obtain a URL of a local path to lock it in the repository - there's no such entry
    - `paths` to be locked belong to different repositories
  See Also:
    `doLock(SVNURL[], boolean, String)`

### doLock

    public void doLock(SVNURL[] urls,
                       boolean stealLock,
                       String lockMessage)
                throws SVNException

  Locks file items in a repository so that no other user can commit changes to them.

  Parameters:
    `urls` - an array of URLs to be locked
    `stealLock` - if true then all existing locks on the specified `urls` will be "stolen"
    `lockMessage` - an optional lock comment
  Throws:
    `SVNException`
  See Also:
    `doLock(File[], boolean, String)`

### doUnlock

    public void doUnlock(File[] paths,
                         boolean breakLock)
                  throws SVNException

  Unlocks file items in a Working Copy as well as in a repository.

  Parameters:
    `paths` - an array of local WC file paths that should be unlocked
    `breakLock` - if true and there are locks that belong to different users then those locks will be also unlocked - that is "broken"
  Throws:
    `SVNException` - if one of the following is true:
    - a path is not under version control
    - can not obtain a URL of a local path to unlock it in the repository - there's no such entry
    - if a path is not locked in the Working Copy and `breakLock` is false
    - `paths` to be unlocked belong to different repositories
  See Also:
    `doUnlock(SVNURL[], boolean)`

### doUnlock

    public void doUnlock(SVNURL[] urls,
                         boolean breakLock)
                  throws SVNException

  Unlocks file items in a repository.

  Parameters:
    `urls` - an array of URLs that should be unlocked
    `breakLock` - if true and there are locks that belong to different users then those locks will be also unlocked - that is "broken"
  Throws:
    `SVNException`
  See Also:
    `doUnlock(File[], boolean)`

### doInfo

    public void doInfo(File path,
                       SVNRevision revision,
                       boolean recursive,
                       ISVNInfoHandler handler)
                throws SVNException

  Collects information about Working Copy item(s) and passes it to an info handler.

  If `revision` is valid and not local, then information will be collected on remote items (that is taken from a repository). Otherwise information is gathered on local items not accessing a repository.

  Parameters:
    `path` - a WC item on which info should be obtained
    `revision` - a target revision
    `recursive` - true to descend recursively (relevant for directories)
    `handler` - a caller's info handler
  Throws:
    `SVNException` - if one of the following is true:
    - `path` is not under version control
    - can not obtain a URL corresponding to `path` to get its information from the repository - there's no such entry
    - if a remote info: `path` is an item that does not exist in the specified `revision`
  See Also:
    `doInfo(File, SVNRevision)`, `doInfo(SVNURL, SVNRevision, SVNRevision, boolean, ISVNInfoHandler)`

### doInfo

    public void doInfo(File path,
                       SVNRevision pegRevision,
                       SVNRevision revision,
                       boolean recursive,
                       ISVNInfoHandler handler)
                throws SVNException

  Collects information about Working Copy item(s) and passes it to an info handler.

  If `revision` & `pegRevision` are valid and not local, then information will be collected on remote items (that is taken from a repository). Otherwise information is gathered on local items not accessing a repository.

  Parameters:
    `path` - a WC item on which info should be obtained
    `pegRevision` - a revision in which `path` is first looked up
    `revision` - a target revision
    `recursive` - true to descend recursively (relevant for directories)
    `handler` - a caller's info handler
  Throws:
    `SVNException` - if one of the following is true:
    - `path` is not under version control
    - can not obtain a URL corresponding to `path` to get its information from the repository - there's no such entry
    - if a remote info: `path` is an item that does not exist in the specified `revision`
  See Also:
    `doInfo(File, SVNRevision)`, `doInfo(File, SVNRevision, boolean, ISVNInfoHandler)`

### doInfo

    public void doInfo(SVNURL url,
                       SVNRevision pegRevision,
                       SVNRevision revision,
                       boolean recursive,
                       ISVNInfoHandler handler)
                throws SVNException

  Collects information about item(s) in a repository and passes it to an info handler.

  Parameters:
    `url` - a URL of an item which information is to be obtained and processed
    `pegRevision` - a revision in which the item is first looked up
    `revision` - a target revision
    `recursive` - true to descend recursively (relevant for directories)
    `handler` - a caller's info handler
  Throws:
    `SVNException` - if `url` is an item that does not exist in the specified `revision`
  See Also:
    `doInfo(SVNURL, SVNRevision, SVNRevision)`, `doInfo(File, SVNRevision, boolean, ISVNInfoHandler)`

### doGetWorkingCopyID

    public String doGetWorkingCopyID(File path,
                                     String trailURL)
                              throws SVNException

  Returns the current Working Copy min- and max- revisions as well as changes and switch status within a single string.

  A return string has a form of `"minR[:maxR][M][S]"` where:

  - `minR` - is the smallest revision number met in the Working Copy
  - `maxR` - is the biggest revision number met in the Working Copy; appears only if there are different revision in the Working Copy
  - `M` - appears only if there're local edits to the Working Copy - that means 'Modified'
  - `S` - appears only if the Working Copy is switched against a different URL
  If `path` is a directory - this method recursively descends into the Working Copy, collects and processes local information.

  Parameters:
    `path` - a local path
    `trailURL` - optional: if not null specifies the name of the item that should be met in the URL corresponding to the repository location of the `path`; if that URL ends with something different than this optional parameter - the Working Copy will be considered "switched"
  Returns:
    brief info on the Working Copy or the string "exported" if `path` is a clean directory
  Throws:
    `SVNException` - if `path` is neither versioned nor even exported

### doGetWorkingCopyID

    public String doGetWorkingCopyID(File path,
                                     String trailURL,
                                     boolean committed)
                              throws SVNException

  Throws:
    `SVNException`

### doInfo

    public SVNInfo doInfo(File path,
                          SVNRevision revision)
                   throws SVNException

  Collects and returns information on a single Working Copy item.

  If `revision` is valid and not `WORKING` then information will be collected on remote items (that is taken from a repository). Otherwise information is gathered on local items not accessing a repository.

  Parameters:
    `path` - a WC item on which info should be obtained
    `revision` - a target revision
  Returns:
    collected info
  Throws:
    `SVNException` - if one of the following is true:
    - `path` is not under version control
    - can not obtain a URL corresponding to `path` to get its information from the repository - there's no such entry
    - if a remote info: `path` is an item that does not exist in the specified `revision`
  See Also:
    `doInfo(File, SVNRevision, boolean, ISVNInfoHandler)`, `doInfo(SVNURL, SVNRevision, SVNRevision)`

### doInfo

    public SVNInfo doInfo(SVNURL url,
                          SVNRevision pegRevision,
                          SVNRevision revision)
                   throws SVNException

  Collects and returns information on a single item in a repository.

  Parameters:
    `url` - a URL of an item which information is to be obtained
    `pegRevision` - a revision in which the item is first looked up
    `revision` - a target revision
  Returns:
    collected info
  Throws:
    `SVNException` - if `url` is an item that does not exist in the specified `revision`
  See Also:
    `doInfo(SVNURL, SVNRevision, SVNRevision, boolean, ISVNInfoHandler)`, `doInfo(File, SVNRevision)`

### doCleanupWCProperties

    public void doCleanupWCProperties(File directory)
                               throws SVNException

  Throws:
    `SVNException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| SVNKit Home
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 TMate Software Ltd. All Rights Reserved.