java.lang.Objectorg.tmatesoft.svn.core.wc.SVNBasicClient
org.tmatesoft.svn.core.wc.SVNStatusClient
public class SVNStatusClient
extends
SVNBasicClient
The SVNStatusClient class provides methods for obtaining information on the status of Working Copy items. The functionality of SVNStatusClient corresponds to the 'svn status' command of the native SVN command line client.
One of the main advantages of SVNStatusClient lies in that fact that for each processed item the status information is collected and put into an SVNStatus object. Further there are two ways how this object can be passed to a developer (depending on the version of the doStatus() method that was invoked):
- the SVNStatus can be passed to a developer's status handler (that should implement ISVNStatusHandler) in which the developer retrieves status information and decides how to interprete that info;
- another way is that an appropriate doStatus() method just returns that SVNStatus object.
-
Since:
- 1.2 See Also:
-
ISVNStatusHandler,SVNStatus, Examples
| Constructor Summary | |
|---|---|
SVNStatusClient(ISVNAuthenticationManager authManager, ISVNOptions options) Constructs and initializes an SVNStatusClient object with the specified run-time configuration and authentication drivers. | |
SVNStatusClient(ISVNRepositoryPool repositoryPool, ISVNOptions options) Constructs and initializes an SVNStatusClient object with the specified run-time configuration and repository pool object. | |
| Method Summary | |
|---|---|
SVNStatus | doStatus(java.io.File path, boolean remote) Collects status information on a single Working Copy item. |
SVNStatus | doStatus(java.io.File path, boolean remote, boolean collectParentExternals) Collects status information on a single Working Copy item. |
long | doStatus(java.io.File path, boolean recursive, boolean remote, boolean reportAll, boolean includeIgnored, boolean collectParentExternals, ISVNStatusHandler handler) Deprecated. use doStatus(File, SVNRevision, SVNDepth, boolean, boolean, boolean, boolean, ISVNStatusHandler, Collection) instead |
long | doStatus(java.io.File path, boolean recursive, boolean remote, boolean reportAll, boolean includeIgnored, ISVNStatusHandler handler) Deprecated. use doStatus(File, SVNRevision, SVNDepth, boolean, boolean, boolean, boolean, ISVNStatusHandler, Collection) instead |
long | doStatus(java.io.File path, SVNRevision revision, boolean recursive, boolean remote, boolean reportAll, boolean includeIgnored, boolean collectParentExternals, ISVNStatusHandler handler) Deprecated. use doStatus(File, SVNRevision, SVNDepth, boolean, boolean, boolean, boolean, ISVNStatusHandler, Collection) instead |
long | doStatus(java.io.File path, SVNRevision revision, SVNDepth depth, boolean remote, boolean reportAll, boolean includeIgnored, boolean collectParentExternals, ISVNStatusHandler handler, java.util.Collection<java.lang.String> changeLists) Given a path to a working copy directory (or single file), calls handler with a set of SVNStatus objects which describe the status of the path, and its children (recursing according to depth). |
void | setFilesProvider(ISVNStatusFileProvider filesProvider) |
| Methods inherited from class org.tmatesoft.svn.core.wc.SVNBasicClient |
|---|
dontWC17Support, getDebugLog, getOperationsFactory, getOptions, getPathListHandler, getReposRoot, getReposRoot, isIgnoreExternals, isLeaveConflictsUnresolved, isWC17Supported, setDebugLog,setEventHandler, setEventPathPrefix, setIgnoreExternals, setLeaveConflictsUnresolved, setOptions, setPathListHandler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
SVNStatusClient
public SVNStatusClient(ISVNAuthenticationManager authManager, ISVNOptions options)
-
Constructs and initializes an
SVNStatusClient object with the specified run-time configuration and authentication drivers.
If
optionsis null, then this SVNStatusClient 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 onISVNOptionsandSVNWCUtil).If
authManageris null, then this SVNStatusClient will be using a default authentication and network layers driver (seeSVNWCUtil.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
-
SVNStatusClient
public SVNStatusClient(ISVNRepositoryPool repositoryPool, ISVNOptions options)
-
Constructs and initializes an
SVNStatusClient object with the specified run-time configuration and repository pool object.
If
optionsis null, then this SVNStatusClient 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 onISVNOptionsandSVNWCUtil).If
repositoryPoolis null, thenSVNRepositoryFactorywill be used to createrepository access objects.-
Parameters:
-
repositoryPool- a repository pool object -
options- a run-time configuration options driver
-
| Method Detail |
|---|
doStatus
public long doStatus(java.io.File path,
boolean recursive,
boolean remote,
boolean reportAll,
boolean includeIgnored,
ISVNStatusHandler handler)
throws SVNException
-
Deprecated.
use
doStatus(File, SVNRevision, SVNDepth, boolean, boolean, boolean, boolean, ISVNStatusHandler, Collection)instead -
Collects status information on Working Copy items and passes it to a
handler. -
-
Parameters:
-
path- local item's path -
recursive- relevant only ifpathdenotes a directory: true to obtain status info recursively for all child entries, false only for items located immediately in the directory itself -
remote- true to check up the status of the item in the repository, that will tell if the local item is out-of-date (like '-u' option in the SVN client's'svn status'command), otherwise false -
reportAll- true to collect status information on those items that are in a 'normal' state (unchanged), otherwise false -
includeIgnored- true to force the operation to collect information on items that were set to be ignored (like '--no-ignore' option in the SVN client's 'svn status' command to disregard default and 'svn:ignore' property ignores), otherwise false -
handler- a caller's status handler that will be involved in processing status information
Returns:
- the revision number the status information was collected against Throws:
-
SVNException
See Also:
-
ISVNStatusHandler
-
doStatus
public long doStatus(java.io.File path,
boolean recursive,
boolean remote,
boolean reportAll,
boolean includeIgnored,
boolean collectParentExternals,
ISVNStatusHandler handler)
throws SVNException
-
Deprecated.
use
doStatus(File, SVNRevision, SVNDepth, boolean, boolean, boolean, boolean, ISVNStatusHandler, Collection)instead -
Collects status information on Working Copy items and passes it to a
handler.Calling this method is equivalent to
doStatus(path, SVNRevision.HEAD, recursive, remote, reportAll, includeIgnored, collectParentExternals, handler). -
-
Parameters:
-
path- local item's path -
recursive- relevant only ifpathdenotes a directory: true to obtain status info recursively for all child entries, false only for items located immediately in the directory itself -
remote- true to check up the status of the item in the repository, that will tell if the local item is out-of-date (like '-u' option in the SVN client's'svn status'command), otherwise false -
reportAll- true to collect status information on all items including those ones that are in a 'normal' state (unchanged), otherwise false -
includeIgnored- true to force the operation to collect information on items that were set to be ignored (like '--no-ignore' option in the SVN client's'svn status'command to disregard default and 'svn:ignore' property ignores), otherwise false -
collectParentExternals- false to make the operation ignore information on externals definitions (like '--ignore-externals' option in the SVN client's'svn status'command), otherwise true -
handler- a caller's status handler that will be involved in processing status information
Returns:
- the revision number the status information was collected against Throws:
-
SVNException
-
doStatus
public long doStatus(java.io.File path,
SVNRevision revision,
boolean recursive,
boolean remote,
boolean reportAll,
boolean includeIgnored,
boolean collectParentExternals,
ISVNStatusHandler handler)
throws SVNException
-
Deprecated.
use
doStatus(File, SVNRevision, SVNDepth, boolean, boolean, boolean, boolean, ISVNStatusHandler, Collection)instead -
Collects status information on Working Copy items and passes it to a
handler. -
-
Parameters:
-
path- local item's path -
revision- ifremoteis true this revision is used to calculate status against -
recursive- relevant only ifpathdenotes a directory: true to obtain status info recursively for all child entries, false only for items located immediately in the directory itself -
remote- true to check up the status of the item in the repository, that will tell if the local item is out-of-date (like '-u' option in the SVN client's'svn status'command), otherwise false -
reportAll- true to collect status information on all items including those ones that are in a 'normal' state (unchanged), otherwise false -
includeIgnored- true to force the operation to collect information on items that were set to be ignored (like '--no-ignore' option in the SVN client's'svn status'command to disregard default and 'svn:ignore' property ignores), otherwise false -
collectParentExternals- false to make the operation ignore information on externals definitions (like '--ignore-externals' option in the SVN client's'svn status'command), otherwise true -
handler- a caller's status handler that will be involved in processing status information
Returns:
- the revision number the status information was collected against Throws:
-
SVNException
-
doStatus
public long doStatus(java.io.File path,
SVNRevision revision,
SVNDepth depth,
boolean remote,
boolean reportAll,
boolean includeIgnored,
boolean collectParentExternals,
ISVNStatusHandler handler,
java.util.Collection<java.lang.String> changeLists)
throws SVNException
-
Given a
pathto a working copy directory (or single file), callshandlerwith a set ofSVNStatusobjects which describe the status of thepath, and its children (recursing according todepth).If
reportAllis set, retrieves all entries; otherwise, retrieves only "interesting" entries (local modifications and/or out of date).If
remoteis set, contacts the repository and augments the status objects with information about out-of-dateness (with respect torevision).If
SVNBasicClient.isIgnoreExternals()returns false, then recurses into externals definitions (if any exist anddepthis eitherSVNDepth.INFINITYorSVNDepth.UNKNOWN) after handling the main target. This calls the client notification handler (ISVNEventHandler) with theSVNEventAction.STATUS_EXTERNALaction before handling each externals definition, and withSVNEventAction.STATUS_COMPLETEDafter each.changeListsis a collection ofStringchangelist names, used as a restrictive filter on items whose statuses are reported; that is, doesn't report status about any item unless it's a member of one of those changelists. IfchangeListsis empty (or null), no changelist filtering occurs. -
-
Parameters:
-
path- working copy path -
revision- ifremoteis true, status is calculated against this revision -
depth- tree depth to process -
remote- true to check up the status of the item in the repository, that will tell if the local item is out-of-date (like '-u' option in the SVN client's'svn status'command), otherwise false -
reportAll- true to collect status information on all items including those ones that are in a 'normal' state (unchanged), otherwise false -
includeIgnored- true to force the operation to collect information on items that were set to be ignored (like '--no-ignore' option in the SVN client's'svn status'command to disregard default and 'svn:ignore' property ignores), otherwise false -
collectParentExternals- obsolete (not used) -
handler- a caller's status handler that will be involved in processing status information -
changeLists- collection with changelist names
Returns:
-
returns the actual revision against which the working copy was compared; the return value is not meaningful (-1) unless
remoteis set
Throws:
-
SVNException
Since:
- 1.2, SVN 1.5
-
doStatus
public SVNStatus doStatus(java.io.File path, boolean remote) throws SVNException
- Collects status information on a single Working Copy item.
-
-
Parameters:
-
path- local item's path -
remote- true to check up the status of the item in the repository, that will tell if the local item is out-of-date (like '-u' option in the SVN client's'svn status'command), otherwise false
Returns:
- an SVNStatus object representing status information for the item Throws:
-
SVNException
-
doStatus
public SVNStatus doStatus(java.io.File path, boolean remote, boolean collectParentExternals) throws SVNException
- Collects status information on a single Working Copy item.
-
-
Parameters:
-
path- local item's path -
remote- true to check up the status of the item in the repository, that will tell if the local item is out-of-date (like '-u' option in the SVN client's'svn status'command), otherwise false -
collectParentExternals- false to make the operation ignore information on externals definitions (like '--ignore-externals' option in the SVN client's'svn status'command), otherwise false
Returns:
- an SVNStatus object representing status information for the item Throws:
-
SVNException
-
setFilesProvider
public void setFilesProvider(ISVNStatusFileProvider filesProvider)
本文详细介绍了SVNStatusClient类的功能及使用方法,包括如何获取工作副本的状态信息,并提供了多种方法来处理这些信息。


1107

被折叠的 条评论
为什么被折叠?



