|
SVNKit 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:
SVNKit | 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 |
Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller |
NULL |
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)
Constructs and initializes an SVNUpdateClient object with the specified run-time configuration and authentication drivers. |
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)
Deprecated. use doCheckout(SVNURL, File, SVNRevision, SVNRevision, SVNDepth, boolean) instead |
long |
doCheckout(SVNURL url,
File dstPath,
SVNRevision pegRevision,
SVNRevision revision,
boolean recursive,
boolean force)
Deprecated. use doCheckout(SVNURL, File, SVNRevision, SVNRevision, SVNDepth, boolean) instead |
long |
doCheckout(SVNURL url,
File dstPath,
SVNRevision pegRevision,
SVNRevision revision,
SVNDepth depth,
boolean allowUnversionedObstructions)
Checks out a working copy of url at revision , looked up at
pegRevision , using dstPath as the root directory of the newly
checked out working copy.
|
long |
doExport(File srcPath,
File dstPath,
SVNRevision pegRevision,
SVNRevision revision,
String eolStyle,
boolean force,
boolean recursive)
Deprecated. use doExport(File, File, SVNRevision, SVNRevision, String, boolean, SVNDepth) |
long |
doExport(File srcPath,
File dstPath,
SVNRevision pegRevision,
SVNRevision revision,
String eolStyle,
boolean overwrite,
SVNDepth depth)
Exports the contents of either a subversion repository or a subversion working copy into a 'clean' directory (meaning a directory with no administrative directories). |
long |
doExport(SVNURL url,
File dstPath,
SVNRevision pegRevision,
SVNRevision revision,
String eolStyle,
boolean force,
boolean recursive)
Deprecated. use doExport(SVNURL, File, SVNRevision, SVNRevision, String, boolean, SVNDepth) |
long |
doExport(SVNURL url,
File dstPath,
SVNRevision pegRevision,
SVNRevision revision,
String eolStyle,
boolean overwrite,
SVNDepth depth)
Exports the contents of a subversion repository into a 'clean' directory (meaning a directory with no administrative directories). |
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)
Deprecated. use doSwitch(File, SVNURL, SVNRevision, SVNRevision, SVNDepth, boolean, boolean) instead |
long |
doSwitch(File file,
SVNURL url,
SVNRevision pegRevision,
SVNRevision revision,
boolean recursive)
Deprecated. use doSwitch(File, SVNURL, SVNRevision, SVNRevision, SVNDepth, boolean, boolean) instead |
long |
doSwitch(File file,
SVNURL url,
SVNRevision pegRevision,
SVNRevision revision,
boolean recursive,
boolean force)
Deprecated. use doSwitch(File, SVNURL, SVNRevision, SVNRevision, SVNDepth, boolean, boolean) instead |
long |
doSwitch(File path,
SVNURL url,
SVNRevision pegRevision,
SVNRevision revision,
SVNDepth depth,
boolean allowUnversionedObstructions,
boolean depthIsSticky)
Switches working tree path to url \pegRevision at
revision .
|
long[] |
doUpdate(File[] paths,
SVNRevision revision,
SVNDepth depth,
boolean allowUnversionedObstructions,
boolean depthIsSticky)
Updates working trees paths to revision .
|
long |
doUpdate(File file,
SVNRevision revision,
boolean recursive)
Deprecated. use doUpdate(File, SVNRevision, SVNDepth, boolean, boolean) instead |
long |
doUpdate(File file,
SVNRevision revision,
boolean recursive,
boolean force)
Deprecated. use doUpdate(File, SVNRevision, SVNDepth, boolean, boolean) instead |
long |
doUpdate(File path,
SVNRevision revision,
SVNDepth depth,
boolean allowUnversionedObstructions,
boolean depthIsSticky)
Updates working copy to revision .
|
ISVNExternalsHandler |
getExternalsHandler()
Returns an externals handler used by this update client. |
boolean |
isUpdateLocksOnDemand()
Says whether the entire working copy should be locked while updating or not. |
void |
setExternalsHandler(ISVNExternalsHandler externalsHandler)
Sets an externals handler to be used by this client object. |
void |
setUpdateLocksOnDemand(boolean locksOnDemand)
Sets whether working copies should be locked on demand or not during an update process. |
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 driverpublic SVNUpdateClient(ISVNRepositoryPool repositoryPool, ISVNOptions options)
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 repositoryPool
is null,
then SVNRepositoryFactory
will be used to create repository access objects
.
repositoryPool
- a repository pool objectoptions
- a run-time configuration options driverMethod Detail |
public void setExternalsHandler(ISVNExternalsHandler externalsHandler)
externalsHandler
- user's implementation of ISVNExternalsHandler
getExternalsHandler()
public ISVNExternalsHandler getExternalsHandler()
ISVNExternalsHandler.DEFAULT
is returned and
used by this client object by default.
For more information what externals handlers are for, please, refer to ISVNExternalsHandler
.
setExternalsHandler(ISVNExternalsHandler)
public long doUpdate(File file, SVNRevision revision, boolean recursive) throws SVNException
doUpdate(File, SVNRevision, SVNDepth, boolean, boolean)
instead
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 doUpdate(File file, SVNRevision revision, boolean recursive, boolean force) throws SVNException
doUpdate(File, SVNRevision, SVNDepth, boolean, boolean)
instead
file
- revision
- recursive
- force
-
SVNException
public long[] doUpdate(File[] paths, SVNRevision revision, SVNDepth depth, boolean allowUnversionedObstructions, boolean depthIsSticky) throws SVNException
paths
to revision
.
Unversioned paths that are direct children of a versioned path will cause an update that
attempts to add that path, other unversioned paths are skipped.
revision
must represent a valid revision number (SVNRevision.getNumber()
>= 0),
or date (SVNRevision.getDate()
!= true), or be equal to
SVNRevision.HEAD
. If revision
does not meet these requirements, an exception with
the error code SVNErrorCode.CLIENT_BAD_REVISION
is thrown.
The paths in paths
can be from multiple working copies from multiple
repositories, but even if they all come from the same repository there
is no guarantee that revision represented by SVNRevision.HEAD
will remain the same as each path is updated.
If externals are ignored
, doesn't process externals definitions
as part of this operation.
If depth
is SVNDepth.INFINITY
, updates fully recursively.
Else if it is SVNDepth.IMMEDIATES
or SVNDepth.FILES
, updates
each target and its file entries, but not its subdirectories. Else if SVNDepth.EMPTY
,
updates exactly each target, nonrecursively (essentially, updates the target's properties).
If depth
is SVNDepth.UNKNOWN
, takes the working depth from
paths
and then behaves as described above.
If depthIsSticky
is set and depth
is not SVNDepth.UNKNOWN
,
then in addition to updating paths
, also sets
their sticky ambient depth value to depth.
If allowUnversionedObstructions
is true then the update
tolerates existing unversioned items that obstruct added paths. Only obstructions of the same type
(file or dir) as the added item are tolerated. The text of obstructing files is left as-is, effectively
treating it as a user modification after the update. Working properties of obstructing items are set
equal to the base properties. If allowUnversionedObstructions
is
false then the update will abort if there are any unversioned
obstructing items.
If the caller's ISVNEventHandler
is non-null, it is invoked for
each item handled by the update, and also for files restored from text-base. Also
ISVNCanceller.checkCancelled()
will be used at various places during the update to check
whether the caller wants to stop the update.
Before updating a next path from paths
this method calls SVNBasicClient.handlePathListItem(File)
passing the path to it.
This operation requires repository access (in case the repository is not on the same machine, network
connection is established).
- Parameters:
paths
- working copy pathsrevision
- revision to update todepth
- tree depth to updateallowUnversionedObstructions
- flag that allows tollerating unversioned items
during updatedepthIsSticky
- flag that controls whether the requested depth
should be written to the working copy
- Returns:
- an array of
long
revisions with each
element set to the revision to which revision
was resolved
- Throws:
SVNException
- Since:
- 1.2, SVN 1.5
public long doUpdate(File path, SVNRevision revision, SVNDepth depth, boolean allowUnversionedObstructions, boolean depthIsSticky) throws SVNException
to revision
.
Unversioned paths that are direct children of a versioned path will cause an update that
attempts to add that path, other unversioned paths are skipped.
revision
must represent a valid revision number (SVNRevision.getNumber()
>= 0),
or date (SVNRevision.getDate()
!= true), or be equal to
SVNRevision.HEAD
. If revision
does not meet these requirements, an exception with
the error code SVNErrorCode.CLIENT_BAD_REVISION
is thrown.
If externals are ignored
, doesn't process externals definitions
as part of this operation.
If depth
is SVNDepth.INFINITY
, updates fully recursively.
Else if it is SVNDepth.IMMEDIATES
or SVNDepth.FILES
, updates
path
and its file entries, but not its subdirectories. Else if SVNDepth.EMPTY
,
updates exactly path
, nonrecursively (essentially, updates the target's properties).
If depth
is SVNDepth.UNKNOWN
, takes the working depth from
path
and then behaves as described above.
If depthIsSticky
is set and depth
is not SVNDepth.UNKNOWN
,
then in addition to updating path
, also sets its sticky ambient depth value to
depth.
If allowUnversionedObstructions
is true then the update
tolerates existing unversioned items that obstruct added paths. Only obstructions of the same type
(file or dir) as the added item are tolerated. The text of obstructing files is left as-is, effectively
treating it as a user modification after the update. Working properties of obstructing items are set
equal to the base properties. If allowUnversionedObstructions
is
false then the update will abort if there are any unversioned
obstructing items.
If the caller's ISVNEventHandler
is non-null, it is invoked for
each item handled by the update, and also for files restored from text-base. Also
ISVNCanceller.checkCancelled()
will be used at various places during the update to check
whether the caller wants to stop the update.
This operation requires repository access (in case the repository is not on the same machine, network
connection is established).
- Parameters:
path
- working copy pathrevision
- revision to update todepth
- tree depth to updateallowUnversionedObstructions
- flag that allows tollerating unversioned items
during updatedepthIsSticky
- flag that controls whether the requested depth
should be written to the working copy
- Returns:
- revision to which
revision
was resolved
- Throws:
SVNException
- Since:
- 1.2, SVN 1.5
public void setUpdateLocksOnDemand(boolean locksOnDemand)
For additional description, please, refer to isUpdateLocksOnDemand()
.
locksOnDemand
- true to make update lock a working copy tree on
demand only (for those subdirectories only which will be changed by update)public boolean isUpdateLocksOnDemand()
public long doSwitch(File file, SVNURL url, SVNRevision revision, boolean recursive) throws SVNException
doSwitch(File, SVNURL, SVNRevision, SVNRevision, SVNDepth, boolean, boolean)
instead
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)
.
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
doSwitch(File, SVNURL, SVNRevision, SVNRevision, SVNDepth, boolean, boolean)
instead
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 switchedpegRevision
- a revision in which file
is first looked up
in the repositoryrevision
- 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, boolean force) throws SVNException
doSwitch(File, SVNURL, SVNRevision, SVNRevision, SVNDepth, boolean, boolean)
instead
file
- url
- pegRevision
- revision
- recursive
- force
-
SVNException
public long doSwitch(File path, SVNURL url, SVNRevision pegRevision, SVNRevision revision, SVNDepth depth, boolean allowUnversionedObstructions, boolean depthIsSticky) throws SVNException
path
to url
\pegRevision
at
revision
.
Summary of purpose: this is normally used to switch a working
directory over to another line of development, such as a branch or
a tag. Switching an existing working directory is more efficient
than checking out url
from scratch.
revision
must represent a valid revision number (SVNRevision.getNumber()
>= 0),
or date (SVNRevision.getDate()
!= true), or be equal to
SVNRevision.HEAD
. If revision
does not meet these requirements, an exception with
the error code SVNErrorCode.CLIENT_BAD_REVISION
is thrown.
If depth
is SVNDepth.INFINITY
, switches fully recursively.
Else if it is SVNDepth.IMMEDIATES
, switches path
and its file
children (if any), and switches subdirectories but does not update
them. Else if SVNDepth.FILES
, switches just file children,
ignoring subdirectories completely. Else if SVNDepth.EMPTY
,
switches just path
and touches nothing underneath it.
If depthIsSticky
is set and depth
is not
SVNDepth.UNKNOWN
, then in addition to switching path
, also sets
its sticky ambient depth value to depth
.
If externals are ignored
, doesn't process externals definitions
as part of this operation.
If allowUnversionedObstructions
is true then the switch
tolerates existing unversioned items that obstruct added paths. Only
obstructions of the same type (file or dir) as the added item are
tolerated. The text of obstructing files is left as-is, effectively
treating it as a user modification after the switch. Working
properties of obstructing items are set equal to the base properties.
If allowUnversionedObstructions
is false then the switch
will abort if there are any unversioned obstructing items.
If the caller's ISVNEventHandler
is non-null, it is invoked for
paths affected by the switch, and also for files restored from text-base. Also
ISVNCanceller.checkCancelled()
will be used at various places during the switch to check
whether the caller wants to stop the switch.
This operation requires repository access (in case the repository is not on the same machine, network
connection is established).
path
- the Working copy item to be switchedurl
- the repository location as a target against which the item will
be switchedpegRevision
- a revision in which path
is first looked up
in the repositoryrevision
- the desired revision of the repository targetdepth
- tree depth to updateallowUnversionedObstructions
- flag that allows tollerating unversioned items
during updatedepthIsSticky
- flag that controls whether the requested depth
should be written into the working copy
SVNException
public long doCheckout(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, boolean recursive) throws SVNException
doCheckout(SVNURL, File, SVNRevision, SVNRevision, SVNDepth, boolean)
instead
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 doCheckout(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, boolean recursive, boolean force) throws SVNException
doCheckout(SVNURL, File, SVNRevision, SVNRevision, SVNDepth, boolean)
instead
url
- dstPath
- pegRevision
- revision
- recursive
- force
-
SVNException
public long doCheckout(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, SVNDepth depth, boolean allowUnversionedObstructions) throws SVNException
url
at revision
, looked up at
pegRevision
, using dstPath
as the root directory of the newly
checked out working copy.
If pegRevision
is SVNRevision.UNDEFINED
, then it
defaults to SVNRevision.HEAD
.
revision
must represent a valid revision number (SVNRevision.getNumber()
>= 0),
or date (SVNRevision.getDate()
!= true), or be equal to
SVNRevision.HEAD
. If revision
does not meet these requirements, an exception with
the error code SVNErrorCode.CLIENT_BAD_REVISION
is thrown.
If depth
is SVNDepth.INFINITY
, checks out fully recursively.
Else if it is SVNDepth.IMMEDIATES
, checks out url
and its
immediate entries (subdirectories will be present, but will be at
depth SVNDepth.EMPTY
themselves); else SVNDepth.FILES
,
checks out url
and its file entries, but no subdirectories; else
if SVNDepth.EMPTY
, checks out url
as an empty directory at
that depth, with no entries present.
If depth
is SVNDepth.UNKNOWN
, then behave as if for
SVNDepth.INFINITY
, except in the case of resuming a previous
checkout of dstPath
(i.e., updating), in which case uses the depth
of the existing working copy.
If externals are ignored
, doesn't process externals definitions
as part of this operation.
If allowUnversionedObstructions
is true then the checkout
tolerates existing unversioned items that obstruct added paths from url
. Only
obstructions of the same type (file or dir) as the added item are tolerated. The text of obstructing
files is left as-is, effectively treating it as a user modification after the checkout. Working
properties of obstructing items are set equal to the base properties. If
allowUnversionedObstructions
is false then the checkout
will abort if there are any unversioned obstructing items.
If the caller's ISVNEventHandler
is non-null, it is invoked
as the checkout processes. Also ISVNCanceller.checkCancelled()
will be used at various places
during the checkout to check whether the caller wants to stop the checkout.
This operation requires repository access (in case the repository is not on the same machine, network
connection is established).
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 outdepth
- tree depthallowUnversionedObstructions
- flag that allows tollerating unversioned items
during
SVNException
- SVNErrorCode.UNSUPPORTED_FEATURE
- if url
refers to a
file rather than a directory
SVNErrorCode.RA_ILLEGAL_URL
- if url
does not exist
public long doExport(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, String eolStyle, boolean force, boolean recursive) throws SVNException
doExport(SVNURL, File, SVNRevision, SVNRevision, String, boolean, SVNDepth)
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(SVNURL url, File dstPath, SVNRevision pegRevision, SVNRevision revision, String eolStyle, boolean overwrite, SVNDepth depth) throws SVNException
pegRevision
is the revision where the path is first looked up.
If pegRevision
is SVNRevision.UNDEFINED
,
then it defaults to SVNRevision.HEAD
.
If externals are ignored
, doesn't process externals definitions
as part of this operation.
eolStyle
allows you to override the standard eol marker on the platform
you are running on. Can be either "LF", "CR" or "CRLF" or null.
If null will use the standard eol marker. Any other value will cause
an exception with the error code SVNErrorCode.IO_UNKNOWN_EOL
error to be returned.
If depth
is SVNDepth.INFINITY
, exports fully recursively.
Else if it is SVNDepth.IMMEDIATES
, exports url
and its immediate
children (if any), but with subdirectories empty and at
SVNDepth.EMPTY
. Else if SVNDepth.FILES
, exports url
and
its immediate file children (if any) only. If depth
is SVNDepth.EMPTY
,
then exports exactly url
and none of its children.
url
- repository url to export fromdstPath
- path to export 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 charecteroverwrite
- if true, will cause the export to overwrite
files or directoriesdepth
- tree depth
SVNException
public long doExport(File srcPath, File dstPath, SVNRevision pegRevision, SVNRevision revision, String eolStyle, boolean force, boolean recursive) throws SVNException
doExport(File, File, SVNRevision, SVNRevision, String, boolean, SVNDepth)
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 long doExport(File srcPath, File dstPath, SVNRevision pegRevision, SVNRevision revision, String eolStyle, boolean overwrite, SVNDepth depth) throws SVNException
pegRevision
is the revision where the path is first looked up
when exporting from a repository. If pegRevision
is SVNRevision.UNDEFINED
,
then it defaults to SVNRevision.WORKING
.
If revision
is one of:
SVNRevision.BASE
SVNRevision.WORKING
SVNRevision.COMMITTED
SVNRevision.UNDEFINED
ignored
, doesn't process externals definitions
as part of this operation.
eolStyle
allows you to override the standard eol marker on the platform
you are running on. Can be either "LF", "CR" or "CRLF" or null.
If null will use the standard eol marker. Any other value will cause
an exception with the error code SVNErrorCode.IO_UNKNOWN_EOL
error to be returned.
If depth
is SVNDepth.INFINITY
, exports fully recursively.
Else if it is SVNDepth.IMMEDIATES
, exports srcPath
and its immediate
children (if any), but with subdirectories empty and at
SVNDepth.EMPTY
. Else if SVNDepth.FILES
, exports srcPath
and
its immediate file children (if any) only. If depth
is SVNDepth.EMPTY
,
then exports exactly srcPath
and none of its children.
srcPath
- working copy pathdstPath
- path to export 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 exported; used only
when exporting from a repositoryeolStyle
- a string that denotes a specific End-Of-Line charecteroverwrite
- if true, will cause the export to overwrite
files or directoriesdepth
- tree depth
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
dst
- a WC pathomitDefaultPort
- if true then removes all
port numbers from urls which equal to default ones, otherwise
does notrecursive
- recurses an operation
SVNException
|
SVNKit Home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |