Interface ISVNReporter
ISVNReporter objects are used by ISVNReporterBaton implementations, provided by callers of the SVNRepository's update, switch, status, diff operations.
Paths for report calls are relative to the target of the operation (that is the
directory where the command was run). Report calls must be made in depth-first
order: parents before children, all children of a parent before any
siblings of the parent. The first report call must be a
setPath() with a path argument of
"" and a valid revision. If the target of the operation
is locally deleted or missing, use the root path's revision. If the target of the operation is
deleted or switched relative to the root path, follow up the initial
setPath() call with a
linkPath()
or deletePath() call with a path argument of
"" to
indicate that. In no other case may there be two report
descriptions for the same path. If the target of the operation is
a locally added file or directory (which previously did not exist),
it may be reported as having revision 0 or as having the parent
directory's revision.
For more information on using reporters, please, read these on-line article:
Using ISVNReporter/ISVNEditor in update-related operations
- Since:
- 1.2
- Version:
- 1.3
- Author:
- TMate Software Ltd.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidAborts the current running report due to errors occured.voiddeletePath(String path) Describes a working copypathas deleted or missing.voidFinalizes the report.voidDeprecated.voidlinkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) Describes a local path as being at a particular revision to switch the path to a different repository location.voidDeprecated.usesetPath(String, String, long, SVNDepth, boolean)insteadvoidDescribes a working copypathas being at a particularrevisionand having depthdepth.
-
Method Details
-
setPath
Deprecated.usesetPath(String, String, long, SVNDepth, boolean)insteadDescribes a local path as being at a particular revision.
If
startEmptyis true and thepathis a directory, an implementor should assume the directory has no entries or properties (used in checkouts and aborted updates).A next call to this method will "override" any previous
setPath()calls made on parent paths. Thepathis relative to the repository location specified for an SVNRepository driver.- Parameters:
path- a local item's pathlockToken- if not null, it is a lock token for thepathrevision- the local item's revision numberstartEmpty- if true and if thepathis a directory, then means there're no entries yet- Throws:
SVNException- in case the repository could not be connected
-
setPath
void setPath(String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException Describes a working copypathas being at a particularrevisionand having depthdepth.revisionmay be invalid (<0) if (for example)pathrepresents a locally-added path with no revision number, ordepthisSVNDepth.EXCLUDE.pathmay not be underneath a path on whichsetPath()was previously called withSVNDepth.EXCLUDEin this report. IfstartEmptyis set andpathis a directory, this will mean that the directory has no entries or properties. This will *override* any previoussetPath()calls made on parent paths.pathis relative to thelocationof the repository access object. IflockTokenis non-null, it is the lock token forpathin the local tree.- Parameters:
path- a local item's pathlockToken- if not null, it is a lock token for thepathrevision- the local item's revision numberdepth- depth ofpathstartEmpty- if true and if thepathis a directory, then means there're no entries yet- Throws:
SVNException- in case the repository could not be connected- Since:
- 1.2.0, New in Subversion 1.5.0
-
deletePath
Describes a working copypathas deleted or missing.- Parameters:
path- a path relative to the root of the report- Throws:
SVNException- in case the repository could not be connected
-
linkPath
void linkPath(SVNURL url, String path, String lockToken, long revision, boolean startEmpty) throws SVNException Deprecated.Describes a local path as being at a particular revision to switch the path to a different repository location. LikesetPath(), but differs in that the local item'spath(relative to the root of the report driver) isn't a reflection of the path in the repository, but is instead a reflection of a different repository path at arevision. IfstartEmptyis set and thepathis a directory, the implementor should assume the directory has no entries or properties.- Parameters:
url- a new repository location to switch topath- the local item's pathlockToken- if not null, it is a lock token for thepathrevision- the local item's revision numberstartEmpty- if true and if thepathis a directory, then means there're no entries yet- Throws:
SVNException- in case the repository could not be connected
-
linkPath
void linkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException Describes a local path as being at a particular revision to switch the path to a different repository location. LikesetPath(String, String, long, SVNDepth, boolean), but differs in that the local item'spath(relative to the root of the report driver) isn't a reflection of the path in the repository, but is instead a reflection of a different repositoryurlatrevision, and has depthdepth.pathmay not be underneath a path on whichsetPath(String, String, long, SVNDepth, boolean)was previously called withSVNDepth.EXCLUDEin this report. IfstartEmptyis set andpathis a directory, that will mean that the directory has no entries or props. IflockTokenis non-null, it is the lock token forpathin the local tree.- Parameters:
url- a new repository location to switch topath- the local item's pathlockToken- if not null, it is a lock token for thepathrevision- the local item's revision numberdepth- depth ofpathstartEmpty- if true and if thepathis a directory, then means there're no entries yet- Throws:
SVNException- in case the repository could not be connected- Since:
- 1.2.0, New in Subversion 1.5.0
-
finishReport
Finalizes the report. Must be called when having traversed a local tree of paths.Any directories or files not explicitly set (described) are assumed to be at the baseline revision.
- Throws:
SVNException- in case the repository could not be connected
-
abortReport
Aborts the current running report due to errors occured.If an error occurs during a report, call this method to abort the reporter correctly.
- Throws:
SVNException- in case the repository could not be connected
-
linkPath(SVNURL, String, String, long, SVNDepth, boolean)instead