|
JavaSVN Home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tmatesoft.svn.core.wc.SVNBasicClient
org.tmatesoft.svn.core.wc.SVNUpdateClient
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' |
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 |
doSwitch(File file,
SVNURL url,
SVNRevision pegRevision,
SVNRevision revision,
boolean recursive)
|
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 |
public SVNUpdateClient(ISVNAuthenticationManager authManager, ISVNOptions options)
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).
authManager
- an authentication and network layers driveroptions
- a run-time configuration options driverprotected SVNUpdateClient(ISVNRepositoryPool repositoryPool, ISVNOptions options)
Method Detail |
public long doUpdate(File file, SVNRevision revision, boolean recursive) 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
.
file
- the Working copy item to be updatedrevision
- the desired revision against which the item will be updatedrecursive
- 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
file
was updated to
SVNException
public long doSwitch(File file, SVNURL url, SVNRevision revision, boolean recursive) 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
.
file
- the Working copy item to be switchedurl
- the repository location as a target against which the item will
be switchedrevision
- the desired revision of the repository targetrecursive
- 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
file
was updated to
SVNException
public long doSwitch(File file, SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean recursive) throws SVNException
SVNException
public long doCheckout(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, boolean recursive) 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
.
url
- a repository location from where a Working Copy will be checked outdstPath
- the local path where the Working Copy will be placedpegRevision
- the revision at which url
will be firstly seen
in the repository to make sure it's the one that is neededrevision
- the desired revision of the Working Copy to be checked outrecursive
- 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
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)public long doExport(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, String eolStyle, boolean force, boolean recursive) throws SVNException
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:
url
- a repository location from where the unversioned directory/file will
be exporteddstPath
- the local path where the repository items will be exported topegRevision
- the revision at which url
will be firstly seen
in the repository to make sure it's the one that is neededrevision
- the desired revision of the directory/file to be exportedeolStyle
- 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
SVNException
public long doExport(File srcPath, File dstPath, SVNRevision pegRevision, SVNRevision revision, String eolStyle, boolean force, boolean recursive) 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:
srcPath
- a repository location from where the unversioned directory/file will
be exporteddstPath
- the local path where the repository items will be exported topegRevision
- the revision at which url
will be firstly seen
in the repository to make sure it's the one that is neededrevision
- the desired revision of the directory/file to be exportedeolStyle
- 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
SVNException
public void doRelocate(File dst, SVNURL oldURL, SVNURL newURL, boolean recursive) 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
.
dst
- a Working Copy item's patholdURL
- the old beginning part of the repository's URL that should
be overwrittennewURL
- 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
SVNException
public void doCanonicalizeURLs(File dst, boolean omitDefaultPort, boolean recursive) throws SVNException
SVNException
|
JavaSVN Home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |