org.tmatesoft.svn.core.wc
public class SVNUpdateClient extends SVNBasicClient
Here's a list of the SVNUpdateClient's methods matched against corresponing commands of the SVN command line client:
SVNKit | Subversion |
doCheckout() | 'svn checkout' |
doUpdate() | 'svn update' |
doSwitch() | 'svn switch' |
doRelocate() | 'svn switch --relocate oldURL newURL' |
doExport() | 'svn export' |
Version: 1.1.1
See Also: Examples
Constructor Summary | |
---|---|
SVNUpdateClient(ISVNAuthenticationManager authManager, ISVNOptions options)
Constructs and initializes an SVNUpdateClient object
with the specified run-time configuration and authentication
drivers.
| |
SVNUpdateClient(ISVNRepositoryPool repositoryPool, ISVNOptions options) |
Method Summary | |
---|---|
void | doCanonicalizeURLs(File dst, boolean omitDefaultPort, boolean recursive)
Canonicalizes all urls in the specified Working Copy.
|
long | doCheckout(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, boolean recursive)
Checks out a Working Copy from 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.
|
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.
|
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 | doSwitch(File file, SVNURL url, SVNRevision pegRevision, 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.
|
protected SVNRevision | getExternalRevision(File file, SVNURL newURL) |
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 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
Parameters: dst a WC path omitDefaultPort if true then removes all port numbers from urls which equal to default ones, otherwise does not recursive recurses an operation
Throws: SVNException
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)
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:
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
How this method works:
revision
is different from BASE
,
WORKING
, COMMITTED
,
UNDEFINED
- then the repository origin of srcPath
will be exported (what is done by "remote"
doExport()
).
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:
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
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
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
.
Calling this method is equivalent to
doSwitch(file, url, SVNRevision.UNDEFINED, revision, recursive)
.
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
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 pegRevision a revision in which file
is first looked up
in the repository 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
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