|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISVNReporter
The ISVNReporter interface provides methods to describe the state of local paths in order to get the differences in revisions between those local paths and what is actually in the repository.
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
ISVNReporterBaton
,
SVNRepository
,
ExamplesMethod Summary | |
---|---|
void |
abortReport()
Aborts the current running report due to errors occured. |
void |
deletePath(java.lang.String path)
Describes a working copy path as deleted or missing. |
void |
finishReport()
Finalizes the report. |
void |
linkPath(SVNURL url,
java.lang.String path,
java.lang.String lockToken,
long revision,
boolean startEmpty)
Deprecated. use linkPath(SVNURL, String, String, long, SVNDepth, boolean) instead |
void |
linkPath(SVNURL url,
java.lang.String path,
java.lang.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. |
void |
setPath(java.lang.String path,
java.lang.String lockToken,
long revision,
boolean startEmpty)
Deprecated. use setPath(String, String, long, SVNDepth, boolean) instead |
void |
setPath(java.lang.String path,
java.lang.String lockToken,
long revision,
SVNDepth depth,
boolean startEmpty)
Describes a working copy path as being at a particular
revision and having depth depth . |
Method Detail |
---|
void setPath(java.lang.String path, java.lang.String lockToken, long revision, boolean startEmpty) throws SVNException
setPath(String, String, long, SVNDepth, boolean)
instead
Describes a local path as being at a particular revision.
If startEmpty
is true and the
path
is 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. The path
is relative to the repository location specified for an
SVNRepository driver.
path
- a local item's pathlockToken
- if not null, it is a lock token
for the path
revision
- the local item's revision numberstartEmpty
- if true and if the path
is a
directory, then means there're no entries yet
SVNException
- in case the repository could not be connectedvoid setPath(java.lang.String path, java.lang.String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException
path
as being at a particular
revision
and having depth depth
.
revision
may be invalid (<0
) if (for example) path
represents a locally-added path with no revision number, or depth
is SVNDepth.EXCLUDE
.
path
may not be underneath a path on which setPath()
was
previously called with SVNDepth.EXCLUDE
in this report.
If startEmpty
is set and path
is a directory, this will mean that
the directory has no entries or properties.
This will *override* any previous setPath()
calls made on parent
paths.
path
is relative to the location
of the repository access
object.
If lockToken
is non-null, it is the lock token for
path
in the local tree.
path
- a local item's pathlockToken
- if not null, it is a lock token
for the path
revision
- the local item's revision numberdepth
- depth of path
startEmpty
- if true and if the path
is a
directory, then means there're no entries yet
SVNException
- in case the repository could not be connectedvoid deletePath(java.lang.String path) throws SVNException
path
as deleted or missing.
path
- a path relative to the root of the report
SVNException
- in case the repository could not be connectedvoid linkPath(SVNURL url, java.lang.String path, java.lang.String lockToken, long revision, boolean startEmpty) throws SVNException
linkPath(SVNURL, String, String, long, SVNDepth, boolean)
instead
setPath()
, but differs in
that the local item's path
(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 a
revision
.
If startEmpty
is set and the path
is a directory,
the implementor should assume the directory has no entries or properties.
url
- a new repository location to switch topath
- the local item's pathlockToken
- if not null, it is a lock token
for the path
revision
- the local item's revision numberstartEmpty
- if true and if the path
is a
directory, then means there're no entries yet
SVNException
- in case the repository could not be connectedvoid linkPath(SVNURL url, java.lang.String path, java.lang.String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException
setPath(String, String, long, SVNDepth, boolean)
, but differs in
that the local item's path
(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 url
at
revision
, and has depth depth
.
path
may not be underneath a path on which setPath(String, String, long, SVNDepth, boolean)
was previously called with SVNDepth.EXCLUDE
in this report.
If startEmpty
is set and path
is a directory, that will mean that
the directory has no entries or props.
If lockToken
is non-null, it is the lock token for
path
in the local tree.
url
- a new repository location to switch topath
- the local item's pathlockToken
- if not null, it is a lock token
for the path
revision
- the local item's revision numberdepth
- depth of path
startEmpty
- if true and if the path
is a
directory, then means there're no entries yet
SVNException
- in case the repository could not be connectedvoid finishReport() throws SVNException
Any directories or files not explicitly set (described) are assumed to be at the baseline revision.
SVNException
- in case the repository could not be connectedvoid abortReport() throws SVNException
If an error occurs during a report, call this method to abort the reporter correctly.
SVNException
- in case the repository could not be connected
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |