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

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

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

All Implemented Interfaces:
  ISVNEventHandler

public class SVNUpdateClient
extends SVNBasicClient

This class provides methods which allow to check out, update, switch and relocate a Working Copy as well as export an unversioned directory or file from a repository.

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

JavaSVN | Subversion
doCheckout() | 'svn checkout'
doUpdate() | 'svn update'
doSwitch() | 'svn switch'
doRelocate() | 'svn switch --relocate oldURL newURL'
doExport() | 'svn export'

Version:
  1.0
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

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

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

Method Summary
`void` | `doCanonicalizeURLs(File dst, boolean omitDefaultPort, boolean recursive)`
`long` | `doCheckout(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, boolean recursive)` Checks out a Working Copy from a repository.
`long` | `doExport(File srcPath, File dstPath, SVNRevision pegRevision, SVNRevision revision, String eolStyle, boolean force, boolean recursive)` Exports a clean directory or single file from eihter a source Working Copy or a repository.
`long` | `doExport(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, String eolStyle, boolean force, boolean recursive)` Exports a clean directory or single file from a repository.
`void` | `doRelocate(File dst, SVNURL oldURL, SVNURL newURL, boolean recursive)` Substitutes the beginning part of a Working Copy's URL with a new one.
`long` | `doSwitch(File file, SVNURL url, SVNRevision revision, boolean recursive)` Updates the Working Copy item to mirror a new URL.
`long` | `doUpdate(File file, SVNRevision revision, boolean recursive)` Brings the Working Copy item up-to-date with repository changes at the specified revision.

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

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

Constructor Detail

### SVNUpdateClient

    public SVNUpdateClient(ISVNAuthenticationManager authManager,
                           ISVNOptions options)

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

  If `options` is null, then this SVNUpdateClient 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 SVNUpdateClient 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

### SVNUpdateClient

    protected SVNUpdateClient(ISVNRepositoryPool repositoryPool,
                              ISVNOptions options)

Method Detail

### doUpdate

    public long doUpdate(File file,
                         SVNRevision revision,
                         boolean recursive)
                  throws SVNException

  Brings the Working Copy item up-to-date with repository changes at the specified revision.

  As a revision SVNRevision's pre-defined constant fields can be used. For example, to update the Working Copy to the latest revision of the repository use `HEAD`.

  Parameters:
    `file` - the Working copy item to be updated
    `revision` - the desired revision against which the item will be updated
    `recursive` - if true and `file` is a directory then the entire tree will be updated, otherwise if false - only items located immediately in the directory itself
  Returns:
    the revision number to which `file` was updated to
  Throws:
    `SVNException`

### doSwitch

    public long doSwitch(File file,
                         SVNURL url,
                         SVNRevision revision,
                         boolean recursive)
                  throws SVNException

  Updates the Working Copy item to mirror a new URL.

  As a revision SVNRevision's pre-defined constant fields can be used. For example, to update the Working Copy to the latest revision of the repository use `HEAD`.

  Parameters:
    `file` - the Working copy item to be switched
    `url` - the repository location as a target against which the item will be switched
    `revision` - the desired revision of the repository target
    `recursive` - if true and `file` is a directory then the entire tree will be updated, otherwise if false - only items located immediately in the directory itself
  Returns:
    the revision number to which `file` was updated to
  Throws:
    `SVNException`

### doCheckout

    public long doCheckout(SVNURL url,
                           File dstPath,
                           SVNRevision pegRevision,
                           SVNRevision revision,
                           boolean recursive)
                    throws SVNException

  Checks out a Working Copy from a repository.

  If the destination path (`dstPath`) is null then the last component of `url` is used for the local directory name.

  As a revision SVNRevision's pre-defined constant fields can be used. For example, to check out a Working Copy at the latest revision of the repository use `HEAD`.

  Parameters:
    `url` - a repository location from where a Working Copy will be checked out
    `dstPath` - the local path where the Working Copy will be placed
    `pegRevision` - the revision at which `url` will be firstly seen in the repository to make sure it's the one that is needed
    `revision` - the desired revision of the Working Copy to be checked out
    `recursive` - if true and `url` is a directory then the entire tree will be checked out, otherwise if false - only items located immediately in the directory itself
  Returns:
    the revision number of the Working Copy
  Throws:
    `SVNException` - `url` refers to a file, not a directory; `dstPath` already exists but it is a file, not a directory; `dstPath` already exists and is a versioned directory but has a different URL (repository location against which the directory is controlled)

### doExport

    public long doExport(SVNURL url,
                         File dstPath,
                         SVNRevision pegRevision,
                         SVNRevision revision,
                         String eolStyle,
                         boolean force,
                         boolean recursive)
                  throws SVNException

  Exports a clean directory or single file from a repository.

  If `eolStyle` is not null then it should denote a specific End-Of-Line marker for the files to be exported. Significant values for `eolStyle` are:

  - "CRLF" (Carriage Return Line Feed) - this causes files to contain '\r\n' line ending sequences for EOL markers, regardless of the operating system in use (for instance, this EOL marker is used by software on the Windows platform).
  - "LF" (Line Feed) - this causes files to contain '\n' line ending sequences for EOL markers, regardless of the operating system in use (for instance, this EOL marker is used by software on the Unix platform).
  - "CR" (Carriage Return) - this causes files to contain '\r' line ending sequences for EOL markers, regardless of the operating system in use (for instance, this EOL marker was used by software on older Macintosh platforms).
  - "native" - this causes files to contain the EOL markers that are native to the operating system on which JavaSVN is run.

  Parameters:
    `url` - a repository location from where the unversioned directory/file will be exported
    `dstPath` - the local path where the repository items will be exported to
    `pegRevision` - the revision at which `url` will be firstly seen in the repository to make sure it's the one that is needed
    `revision` - the desired revision of the directory/file to be exported
    `eolStyle` - a string that denotes a specific End-Of-Line charecter;
    `force` - true to fore the operation even if there are local files with the same names as those in the repository (local ones will be replaced)
    `recursive` - if true and `url` is a directory then the entire tree will be exported, otherwise if false - only items located immediately in the directory itself
  Returns:
    the revision number of the exported directory/file
  Throws:
    `SVNException`

### doExport

    public long doExport(File srcPath,
                         File dstPath,
                         SVNRevision pegRevision,
                         SVNRevision revision,
                         String eolStyle,
                         boolean force,
                         boolean recursive)
                  throws SVNException

  Exports a clean directory or single file from eihter a source Working Copy or a repository.

  How this method works:

  - If `revision` is different from `BASE`, `WORKING`, `COMMITTED`, `UNDEFINED` - then the repository origin of `srcPath` will be exported (what is done by "remote" `doExport()`).
  - In other cases a clean unversioned copy of `srcPath` - either a directory or a single file - is exported to `dstPath`.

  If `eolStyle` is not null then it should denote a specific End-Of-Line marker for the files to be exported. Significant values for `eolStyle` are:

  - "CRLF" (Carriage Return Line Feed) - this causes files to contain '\r\n' line ending sequences for EOL markers, regardless of the operating system in use (for instance, this EOL marker is used by software on the Windows platform).
  - "LF" (Line Feed) - this causes files to contain '\n' line ending sequences for EOL markers, regardless of the operating system in use (for instance, this EOL marker is used by software on the Unix platform).
  - "CR" (Carriage Return) - this causes files to contain '\r' line ending sequences for EOL markers, regardless of the operating system in use (for instance, this EOL marker was used by software on older Macintosh platforms).
  - "native" - this causes files to contain the EOL markers that are native to the operating system on which JavaSVN is run.

  Parameters:
    `srcPath` - a repository location from where the unversioned directory/file will be exported
    `dstPath` - the local path where the repository items will be exported to
    `pegRevision` - the revision at which `url` will be firstly seen in the repository to make sure it's the one that is needed
    `revision` - the desired revision of the directory/file to be exported
    `eolStyle` - a string that denotes a specific End-Of-Line charecter;
    `force` - true to fore the operation even if there are local files with the same names as those in the repository (local ones will be replaced)
    `recursive` - if true and `url` is a directory then the entire tree will be exported, otherwise if false - only items located immediately in the directory itself
  Returns:
    the revision number of the exported directory/file
  Throws:
    `SVNException`

### doRelocate

    public void doRelocate(File dst,
                           SVNURL oldURL,
                           SVNURL newURL,
                           boolean recursive)
                    throws SVNException

  Substitutes the beginning part of a Working Copy's URL with a new one.

  When a repository root location or a URL schema is changed the old URL of the Working Copy which starts with `oldURL` should be substituted for a new URL beginning - `newURL`.

  Parameters:
    `dst` - a Working Copy item's path
    `oldURL` - the old beginning part of the repository's URL that should be overwritten
    `newURL` - a new beginning part for the repository location that will overwrite `oldURL`
    `recursive` - if true and `dst` is a directory then the entire tree will be relocated, otherwise if false - only `dst` itself
  Throws:
    `SVNException`

### doCanonicalizeURLs

    public void doCanonicalizeURLs(File dst,
                                   boolean omitDefaultPort,
                                   boolean recursive)
                            throws SVNException

  Throws:
    `SVNException`

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

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