| java.lang.Object org.tmatesoft.svn.core.wc.SVNBasicClient org.tmatesoft.svn.core.wc.SVNUpdateClient
SVNUpdateClient | public class SVNUpdateClient extends SVNBasicClient (Code) | | 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:
SVNKit |
Subversion |
doCheckout() | 'svn checkout' |
doUpdate() | 'svn update' |
doSwitch() | 'svn switch' |
doRelocate() | 'svn switch --relocate oldURL newURL' |
doExport() | 'svn export' |
version: 1.1.1 author: TMate Software Ltd. See Also: Examples |
Method Summary | |
public void | doCanonicalizeURLs(File dst, boolean omitDefaultPort, boolean recursive) Canonicalizes all urls in the specified Working Copy. | public long | doCheckout(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, boolean recursive) 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. | public 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.
If eolStyle is not null then it should denote
a specific End-Of-Line marker for the files to be exported. | public 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.
How this method works:
| public void | doRelocate(File dst, SVNURL oldURL, SVNURL newURL, boolean recursive) Substitutes the beginning part of a Working Copy's URL with a new one. | public long | doSwitch(File file, SVNURL url, SVNRevision revision, boolean recursive) Updates the Working Copy item to mirror a new URL. | public long | doSwitch(File file, SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean recursive) Updates the Working Copy item to mirror a new URL. | public long | doUpdate(File file, SVNRevision revision, boolean recursive) 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. | protected SVNRevision | getExternalRevision(File file, SVNURL newURL) |
SVNUpdateClient | public SVNUpdateClient(ISVNAuthenticationManager authManager, ISVNOptions options)(Code) | | 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 Parameters: options - a run-time configuration options driver |
doCanonicalizeURLs | public void doCanonicalizeURLs(File dst, boolean omitDefaultPort, boolean recursive) throws SVNException(Code) | | Canonicalizes all urls in the specified Working Copy.
Parameters: dst - a WC path Parameters: omitDefaultPort - if true then removes allport numbers from urls which equal to default ones, otherwisedoes not Parameters: recursive - recurses an operation throws: SVNException - |
doCheckout | public long doCheckout(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, boolean recursive) throws SVNException(Code) | | 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
SVNRevision.HEAD HEAD .
Parameters: url - a repository location from where a Working Copy will be checked out Parameters: dstPath - the local path where the Working Copy will be placed Parameters: pegRevision - the revision at which url will be firstly seenin the repository to make sure it's the one that is needed Parameters: revision - the desired revision of the Working Copy to be checked out Parameters: recursive - if true and url isa directory then the entire tree will be checked out, otherwise if false - only items located immediatelyin the directory itself 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 alreadyexists and is a versioned directory but has a different URL (repository locationagainst 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(Code) | | 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 SVNKit is run.
Parameters: url - a repository location from where the unversioned directory/file willbe exported Parameters: dstPath - the local path where the repository items will be exported to Parameters: pegRevision - the revision at which url will be firstly seenin the repository to make sure it's the one that is needed Parameters: revision - the desired revision of the directory/file to be exported Parameters: eolStyle - a string that denotes a specific End-Of-Line charecter; Parameters: force - true to fore the operation evenif there are local files with the same names as those in the repository(local ones will be replaced) Parameters: recursive - if true and url isa directory then the entire tree will be exported, otherwise if false - only items located immediatelyin the directory itself 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(Code) | | Exports a clean directory or single file from eihter a source Working Copy or
a repository.
How this method works:
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 SVNKit is run.
Parameters: srcPath - a repository location from where the unversioned directory/file willbe exported Parameters: dstPath - the local path where the repository items will be exported to Parameters: pegRevision - the revision at which url will be firstly seenin the repository to make sure it's the one that is needed Parameters: revision - the desired revision of the directory/file to be exported Parameters: eolStyle - a string that denotes a specific End-Of-Line charecter; Parameters: force - true to fore the operation evenif there are local files with the same names as those in the repository(local ones will be replaced) Parameters: recursive - if true and url isa directory then the entire tree will be exported, otherwise if false - only items located immediatelyin the directory itself the revision number of the exported directory/file throws: SVNException - |
doRelocate | public void doRelocate(File dst, SVNURL oldURL, SVNURL newURL, boolean recursive) throws SVNException(Code) | | 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 Parameters: oldURL - the old beginning part of the repository's URL that shouldbe overwritten Parameters: newURL - a new beginning part for the repository location thatwill overwrite oldURL Parameters: recursive - if true and dst isa directory then the entire tree will be relocated, otherwise if false - only dst itself throws: SVNException - |
doSwitch | public long doSwitch(File file, SVNURL url, SVNRevision revision, boolean recursive) throws SVNException(Code) | | 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
SVNRevision.HEAD HEAD .
Calling this method is equivalent to
doSwitch(file, url, SVNRevision.UNDEFINED, revision, recursive) .
Parameters: file - the Working copy item to be switched Parameters: url - the repository location as a target against which the item will be switched Parameters: revision - the desired revision of the repository target Parameters: recursive - if true and file isa directory then the entire tree will be updated, otherwise if false - only items located immediatelyin the directory itself the revision number to which file was updated to throws: SVNException - |
doSwitch | public long doSwitch(File file, SVNURL url, SVNRevision pegRevision, SVNRevision revision, boolean recursive) throws SVNException(Code) | | 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
SVNRevision.HEAD HEAD .
Parameters: file - the Working copy item to be switched Parameters: url - the repository location as a target against which the item will be switched Parameters: pegRevision - a revision in which file is first looked upin the repository Parameters: revision - the desired revision of the repository target Parameters: recursive - if true and file isa directory then the entire tree will be updated, otherwise if false - only items located immediatelyin the directory itself the revision number to which file was updated to throws: SVNException - |
doUpdate | public long doUpdate(File file, SVNRevision revision, boolean recursive) throws SVNException(Code) | | 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
SVNRevision.HEAD HEAD .
Parameters: file - the Working copy item to be updated Parameters: revision - the desired revision against which the item will be updated Parameters: recursive - if true and file isa directory then the entire tree will be updated, otherwise if false - only items located immediatelyin the directory itself the revision number to which file was updated to throws: SVNException - |
Methods inherited from org.tmatesoft.svn.core.wc.SVNBasicClient | public void checkCancelled() throws SVNCancelException(Code)(Java Doc) protected SVNRepository createRepository(SVNURL url, boolean mayReuse) throws SVNException(Code)(Java Doc) protected SVNRepository createRepository(SVNURL url, File path, SVNRevision pegRevision, SVNRevision revision) throws SVNException(Code)(Java Doc) protected SVNRepository createRepository(SVNURL url, File path, SVNRevision pegRevision, SVNRevision revision, long[] pegRev) throws SVNException(Code)(Java Doc) protected SVNWCAccess createWCAccess()(Code)(Java Doc) protected SVNWCAccess createWCAccess(String pathPrefix)(Code)(Java Doc) protected void dispatchEvent(SVNEvent event) throws SVNException(Code)(Java Doc) protected void dispatchEvent(SVNEvent event, double progress) throws SVNException(Code)(Java Doc) public ISVNDebugLog getDebugLog()(Code)(Java Doc) protected ISVNEventHandler getEventDispatcher()(Code)(Java Doc) protected SVNRepositoryLocation[] getLocations(SVNURL url, File path, SVNRepository repository, SVNRevision revision, SVNRevision start, SVNRevision end) throws SVNException(Code)(Java Doc) public ISVNOptions getOptions()(Code)(Java Doc) protected ISVNRepositoryPool getRepositoryPool()(Code)(Java Doc) protected long getRevisionNumber(SVNRevision revision, SVNRepository repository, File path) throws SVNException(Code)(Java Doc) protected SVNURL getURL(File path) throws SVNException(Code)(Java Doc) public void handleEvent(SVNEvent event, double progress) throws SVNException(Code)(Java Doc) public boolean isIgnoreExternals()(Code)(Java Doc) public boolean isLeaveConflictsUnresolved()(Code)(Java Doc) public void setDebugLog(ISVNDebugLog log)(Code)(Java Doc) public void setEventHandler(ISVNEventHandler dispatcher)(Code)(Java Doc) public void setEventPathPrefix(String prefix)(Code)(Java Doc) public void setIgnoreExternals(boolean ignore)(Code)(Java Doc) public void setLeaveConflictsUnresolved(boolean leave)(Code)(Java Doc) public void setOptions(ISVNOptions options)(Code)(Java Doc) protected void sleepForTimeStamp()(Code)(Java Doc)
|
|
|