|
SVNKit Home | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tmatesoft.svn.core.io.SVNRepository
The abstract class SVNRepository provides an interface for protocol specific drivers used for direct working with a Subversion repository. SVNRepository joins all low-level API methods needed for repository access operations.
In particular this low-level protocol driver is used by the high-level API (represented by the org.tmatesoft.svn.core.wc package) when an access to a repository is needed.
It is important to say that before using the library it must be configured
according to implimentations to be used. That is if a repository is assumed
to be accessed either via the WebDAV protocol (http:// or
https://), or a custom svn one (svn:// or svn+ssh://)
or immediately on the local machine (file:///) a user must initialize the library
in a proper way:
//import neccessary classes import org.tmatesoft.svn.core.internal.io.fs.FSRepositoryFactory; import org.tmatesoft.svn.core.internal.io.dav.DAVRepositoryFactory; import org.tmatesoft.svn.core.internal.io.svn.SVNRepositoryFactoryImpl; import org.tmatesoft.svn.core.SVNURL; import org.tmatesoft.svn.core.io.SVNRepository; import org.tmatesoft.svn.core.io.SVNRepositoryFactory; import import org.tmatesoft.svn.core.wc.SVNWCUtil; import import org.tmatesoft.svn.core.SVNException; ... //Set up connection protocols support: //http:// and https:// DAVRepositoryFactory.setup(); //svn://, svn+xxx:// (svn+ssh:// in particular) SVNRepositoryFactoryImpl.setup(); //file:/// FSRepositoryFactory.setup();
svn+xxx:// can be any tunnel scheme for tunneled working with a
repository. xxx URL scheme is looked up in the section tunnels of the
standard Subversion config file.
So, only after these setup steps the client can create http | svn | file protocol
implementations of the SVNRepository abstract class to access
the repository.
This is a general way how a user creates an SVNRepository driver object:
String url="http://svn.collab.net/svn/trunk"; String name="my name"; String password="my password"; repository = null; try { repository = SVNRepositoryFactory.create(SVNURL.parseURIDecoded(url)); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(name, password); repository.setAuthenticationManager(authManager); ... } catch (SVNException e){ e.printStackTrace(); System.exit(1); } //work with the repository ...
SVNRepository objects are not thread-safe, we're strongly recommend you not to use one SVNRepository object from within multiple threads.
Also methods of SVNRepository objects are not reenterable - that is,
you can not call operation methods of an SVNRepository driver neither
from within those handlers that are passed to some of the driver's methods, nor
during committing with the help of a commit editor (until the editor's closeEdit()
method is called).
To authenticate a user over network SVNRepository drivers use ISVNAuthenticationManager auth drivers.
SVNRepositoryFactory,
ISVNAuthenticationManager,
Examples| Field Summary | |
protected SVNURL |
myLocation
|
protected SVNURL |
myRepositoryRoot
|
protected String |
myRepositoryUUID
|
| Constructor Summary | |
protected |
SVNRepository(SVNURL location,
ISVNSession options)
|
| Method Summary | |
void |
addConnectionListener(ISVNConnectionListener listener)
|
protected static void |
assertValidRevision(long revision)
|
void |
checkout(long revision,
String target,
boolean recursive,
ISVNEditor editor)
Checks out a directory from a repository . |
abstract SVNNodeKind |
checkPath(String path,
long revision)
Returns the kind of an item located at the specified path in a particular revision. |
abstract void |
closeSession()
Closes the current session closing a socket connection used by this object. |
abstract void |
diff(SVNURL url,
long targetRevision,
long revision,
String target,
boolean ignoreAncestry,
boolean recursive,
boolean getContents,
ISVNReporterBaton reporter,
ISVNEditor editor)
Calculates the differences between two items. |
abstract void |
diff(SVNURL url,
long targetRevision,
long revision,
String target,
boolean ignoreAncestry,
boolean recursive,
ISVNReporterBaton reporter,
ISVNEditor editor)
Deprecated. |
abstract void |
diff(SVNURL url,
long revision,
String target,
boolean ignoreAncestry,
boolean recursive,
ISVNReporterBaton reporter,
ISVNEditor editor)
Deprecated. use diff(SVNURL, long, long, String, boolean, boolean, ISVNReporterBaton, ISVNEditor) instead |
protected void |
fireConnectionClosed()
|
protected void |
fireConnectionOpened()
|
ISVNAuthenticationManager |
getAuthenticationManager()
Returns the authentication driver registered for this object. |
ISVNCanceller |
getCanceller()
|
ISVNEditor |
getCommitEditor(String logMessage,
ISVNWorkspaceMediator mediator)
Gets an editor for committing changes to a repository. |
abstract ISVNEditor |
getCommitEditor(String logMessage,
Map locks,
boolean keepLocks,
ISVNWorkspaceMediator mediator)
Gets an editor for committing changes to a repository. |
abstract long |
getDatedRevision(Date date)
Returns the recent repository revision number for the particular moment in time - the closest one before or at the specified datestamp. |
org.tmatesoft.svn.util.ISVNDebugLog |
getDebugLog()
Returns the debug logger currently in use. |
abstract SVNDirEntry |
getDir(String path,
long revision,
boolean includeCommitMessages,
Collection entries)
Fetches the contents of a directory into the provided collection object and returns the directory entry itself. |
Collection |
getDir(String path,
long revision,
Map properties,
Collection dirEntries)
Fetches the contents and properties of a directory located at the specified path in a particular revision. |
abstract long |
getDir(String path,
long revision,
Map properties,
ISVNDirEntryHandler handler)
Fetches the contents and/or properties of a directory located at the specified path in a particular revision. |
abstract long |
getFile(String path,
long revision,
Map properties,
OutputStream contents)
Fetches the contents and/or properties of a file located at the specified path in a particular revision. |
Collection |
getFileRevisions(String path,
Collection revisions,
long sRevision,
long eRevision)
Retrieves and returns interesting file revisions for the specified file. |
abstract int |
getFileRevisions(String path,
long startRevision,
long endRevision,
ISVNFileRevisionHandler handler)
Retrieves interesting file revisions for the specified file. |
String |
getFullPath(String relativeOrRepositoryPath)
Resolves a path, relative either to the location to which this driver object is set or to the repository root directory, to a path, relative to the host. |
abstract long |
getLatestRevision()
Returns the number of the latest revision of the repository this driver is working with. |
SVNURL |
getLocation()
Returns the repository location to which this object is set. |
Collection |
getLocations(String path,
Collection entries,
long pegRevision,
long[] revisions)
Gets entry locations in time. |
abstract int |
getLocations(String path,
long pegRevision,
long[] revisions,
ISVNLocationEntryHandler handler)
Gets entry locations in time. |
Map |
getLocations(String path,
Map entries,
long pegRevision,
long[] revisions)
Gets entry locations in time. |
abstract SVNLock |
getLock(String path)
Gets the lock for the file located at the specified path. |
abstract SVNLock[] |
getLocks(String path)
Gets all locks on or below the path, that is if the repository
entry (located at the path) is a directory then the method
returns locks of all locked files (if any) in it.
|
ISVNSession |
getOptions()
Returns the session options object this driver is using. |
String |
getRepositoryPath(String relativePath)
Returns a path relative to the repository root directory given a path relative to the location to which this driver object is set. |
SVNURL |
getRepositoryRoot()
Deprecated. use #getRepositoryRoot(boolean) instead |
SVNURL |
getRepositoryRoot(boolean forceConnection)
Gets a repository's root directory location. |
String |
getRepositoryUUID()
Deprecated. use getRepositoryUUID(boolean) instead |
String |
getRepositoryUUID(boolean forceConnection)
Gets the Universal Unique IDentifier (UUID) of the repository this driver is created for. |
protected static Long |
getRevisionObject(long revision)
|
abstract Map |
getRevisionProperties(long revision,
Map properties)
Returns unversioned revision properties for a particular revision. |
abstract String |
getRevisionPropertyValue(long revision,
String propertyName)
Gets the value of an unversioned property. |
ISVNTunnelProvider |
getTunnelProvider()
Returns a tunnel provider. |
abstract SVNDirEntry |
info(String path,
long revision)
Gives information about an entry located at the specified path in a particular revision. |
protected static boolean |
isInvalidRevision(long revision)
|
protected static boolean |
isValidRevision(long revision)
|
protected void |
lock()
|
protected void |
lock(boolean force)
|
abstract void |
lock(Map pathsToRevisions,
String comment,
boolean force,
ISVNLockHandler handler)
Locks path(s) at definite revision(s). |
Collection |
log(String[] targetPaths,
Collection entries,
long startRevision,
long endRevision,
boolean changedPath,
boolean strictNode)
Traverses revisions history and returns a collection of log entries. |
long |
log(String[] targetPaths,
long startRevision,
long endRevision,
boolean changedPath,
boolean strictNode,
ISVNLogEntryHandler handler)
Traverses revisions history. |
abstract long |
log(String[] targetPaths,
long startRevision,
long endRevision,
boolean changedPath,
boolean strictNode,
long limit,
ISVNLogEntryHandler handler)
Traverses revisions history. |
void |
removeConnectionListener(ISVNConnectionListener listener)
|
abstract void |
replay(long lowRevision,
long revision,
boolean sendDeltas,
ISVNEditor editor)
Replays the changes from the specified revision through the given editor. |
void |
setAuthenticationManager(ISVNAuthenticationManager authManager)
Sets an authentication driver for this object. |
void |
setCanceller(ISVNCanceller canceller)
|
void |
setDebugLog(org.tmatesoft.svn.util.ISVNDebugLog log)
Sets a logger to write debug log information to. |
void |
setLocation(SVNURL url,
boolean forceReconnect)
Sets a new repository location for this object. |
protected void |
setRepositoryCredentials(String uuid,
SVNURL rootURL)
Caches identification parameters (UUID, rood directory location) of the repository with which this driver is working. |
abstract void |
setRevisionPropertyValue(long revision,
String propertyName,
String propertyValue)
Sets a revision property with the specified name to a new value. |
void |
setTunnelProvider(ISVNTunnelProvider tunnelProvider)
Sets a tunnel provider. |
abstract void |
status(long revision,
String target,
boolean recursive,
ISVNReporterBaton reporter,
ISVNEditor editor)
Gets status of a path. |
abstract void |
testConnection()
Tries to access a repository. |
protected void |
unlock()
|
abstract void |
unlock(Map pathToTokens,
boolean force,
ISVNLockHandler handler)
Removes lock(s) from the file(s). |
abstract void |
update(long revision,
String target,
boolean recursive,
ISVNReporterBaton reporter,
ISVNEditor editor)
Updates a path receiving changes from a repository. |
abstract void |
update(SVNURL url,
long revision,
String target,
boolean recursive,
ISVNReporterBaton reporter,
ISVNEditor editor)
Updates a path switching it to a new repository location. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String myRepositoryUUID
protected SVNURL myRepositoryRoot
protected SVNURL myLocation
| Constructor Detail |
protected SVNRepository(SVNURL location,
ISVNSession options)
| Method Detail |
public SVNURL getLocation()
SVNRepositoryFactory.create(SVNURL)), or the recent
one the object was set to.
setLocation(SVNURL, boolean)
public void setLocation(SVNURL url,
boolean forceReconnect)
throws SVNException
But you can not specify a new repository location url with a protocol different from the one used for the previous (essentially, the current) repository location, since SVNRepository objects are protocol dependent.
If a new url is located within the same repository, this object
just switches to that url not closing the current session (i.e.
not calling closeSession()).
If either a new url refers to the same host (including a port
number), or refers to an absolutely different host, or this object has got
no repository root location cached (hasn't ever accessed a repository yet),
or forceReconnect is true, then
the current session is closed, cached repository credentials (UUID and repository
root directory location ) are reset and this object is switched to a new
repository location.
url - a new repository location urlforceReconnect - if true then
forces to close the current session, resets the
cached repository credentials and switches this object to
a new location (doesn't matter whether it's on the same
host or not)
SVNException - if the old url and a new one has got different
protocolspublic String getRepositoryUUID()
getRepositoryUUID(boolean) instead
public String getRepositoryUUID(boolean forceConnection)
throws SVNException
forceConnection - if true then forces
this driver to test a connection - try to access a
repository
SVNExceptionpublic SVNURL getRepositoryRoot()
getRepositoryRoot(boolean)
public SVNURL getRepositoryRoot(boolean forceConnection)
throws SVNException
setLocation()),
the root directory location may be changed.
forceConnection - if true then forces
this driver to test a connection - try to access a
repository
SVNExceptiontestConnection()public void setAuthenticationManager(ISVNAuthenticationManager authManager)
SVNWCUtil class for more
details.
authManager - an authentication driver to provide user
credentialsgetAuthenticationManager()public ISVNAuthenticationManager getAuthenticationManager()
public void setTunnelProvider(ISVNTunnelProvider tunnelProvider)
svn+xxx:// scheme cases. The provider is responsible
for matching xxx to the tunnel command string.
If one would like to have a standard Subversion behaviour
(when tunnel commands are fetched from the config file
beneath the section named tunnels), he should provide a
default provider (default implementation of the ISVNOptions
interface). Refer to SVNWCUtil class
for more details on how to get a default options driver.
tunnelProvider - a tunnel providergetTunnelProvider()public ISVNTunnelProvider getTunnelProvider()
setTunnelProvider(ISVNTunnelProvider)public void setCanceller(ISVNCanceller canceller)
public ISVNCanceller getCanceller()
protected void setRepositoryCredentials(String uuid,
SVNURL rootURL)
uuid - the repository's Universal Unique IDentifier
(UUID)rootURL - the repository's root directory locationgetRepositoryRoot(boolean),
getRepositoryUUID(boolean)
public abstract void testConnection()
throws SVNException
SVNException - if a failure occured while connecting to a repository
or the user's authentication failed (see
SVNAuthenticationException)
public abstract long getLatestRevision()
throws SVNException
SVNException - if a failure occured while connecting to a repository
or the user's authentication failed (see
SVNAuthenticationException)
public abstract long getDatedRevision(Date date)
throws SVNException
Example: if you specify a single date without specifying a time of the day (e.g. 2002-11-27) the timestamp is assumed to 00:00:00 and the method won't return any revisions for the day you have specified but for the day just before it.
date - a datestamp for defining the needed
moment in time
SVNException - if a failure occured while connecting to a repository
or the user's authentication failed (see
SVNAuthenticationException)
public abstract Map getRevisionProperties(long revision,
Map properties)
throws SVNException
revision - a revision numberproperties - if not null then
properties will be placed in this map, otherwise
a new map will be created
SVNException - in the following cases:
revision number is invalid
revision at all
SVNAuthenticationException)
SVNRevisionProperty
public abstract void setRevisionPropertyValue(long revision,
String propertyName,
String propertyValue)
throws SVNException
NOTE: revision properties are not versioned. So, the old values may be lost forever.
revision - the number of the revision which property is to
be changedpropertyName - a revision property namepropertyValue - the value of the revision property
SVNException - in the following cases:
revision is invalid or doesn't
exist at all
SVNAuthenticationException)
SVNRevisionProperty
public abstract String getRevisionPropertyValue(long revision,
String propertyName)
throws SVNException
revision - a revision numberpropertyName - a property name
SVNException - in the following cases:
revision number is invalid or
if there's no such revision at all.
SVNAuthenticationException)
public abstract SVNNodeKind checkPath(String path,
long revision)
throws SVNException
path does not exist
under the specified revision, SVNNodeKind.NONE
will be returned.
The path arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
path - an item's pathrevision - a revision number
path at the given
revision
SVNException - if a failure occured while connecting to a repository
or the user's authentication failed (see
SVNAuthenticationException)
public abstract long getFile(String path,
long revision,
Map properties,
OutputStream contents)
throws SVNException
If contents arg is not null it
will be written with file contents.
If properties arg is not null it will
receive the properties of the file. This includes all properties: not just ones
controlled by a user and stored in the repository filesystem, but also non-tweakable
ones (e.g. 'wcprops', 'entryprops', etc.). Property names (keys) are mapped to property
values.
The path arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
If revision is invalid (negative), HEAD revision will be used.
path - a file pathrevision - a file revisionproperties - a file properties receiver mapcontents - an output stream to write the file contents to
SVNException - in the following cases:
path in revision
SVNAuthenticationException)
public abstract long getDir(String path,
long revision,
Map properties,
ISVNDirEntryHandler handler)
throws SVNException
If handler arg is not null it
will be dispatched information of each directory entry represented by an
SVNDirEntry object.
If properties arg is not null it will
receive the properties of the file. This includes all properties: not just ones
controlled by a user and stored in the repository filesystem, but also non-tweakable
ones (e.g. 'wcprops', 'entryprops', etc.). Property names (keys) are mapped to property
values.
The path arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
If revision is invalid (negative), HEAD revision will be used.
NOTE: you may not invoke operation methods of this SVNRepository
object from within the provided handler.
path - a directory pathrevision - a directory revisionproperties - a directory properties receiver maphandler - a handler to process directory entries
SVNException - in the following cases:
path not found in the specified revision
path is not a directory
SVNAuthenticationException)
getDir(String, long, Map, Collection),
getDir(String, long, boolean, Collection),
SVNDirEntry
public abstract int getFileRevisions(String path,
long startRevision,
long endRevision,
ISVNFileRevisionHandler handler)
throws SVNException
A file revision is represented by an SVNFileRevision object. Each
file revision is handled by the file revision handler provided. Only those
revisions will be retrieved in which the file was changed.
The iteration will begin at the first such revision starting from the
startRevision and so on - up to the endRevision.
If the method succeeds, the provided handler will have
been invoked at least once.
For the first interesting revision the file contents
will be provided to the handler as a text delta against an empty file.
For the following revisions, the delta will be against the fulltext contents of the
previous revision.
The path arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
NOTES:
handler
path - a file pathstartRevision - a revision to start fromendRevision - a revision to stop athandler - a handler that processes file revisions passed
SVNException - if a failure occured while connecting to a repository
or the user's authentication failed (see
SVNAuthenticationException)getFileRevisions(String, Collection, long, long),
SVNFileRevision
public long log(String[] targetPaths,
long startRevision,
long endRevision,
boolean changedPath,
boolean strictNode,
ISVNLogEntryHandler handler)
throws SVNException
handler.
This method invokes handler on each log entry from
startRevision to endRevision.
startRevision may be greater or less than
endRevision; this just controls whether the log messages are
processed in descending or ascending revision number order.
If startRevision or endRevision is invalid, it
defaults to the youngest.
If targetPaths has one or more elements, then
only those revisions are processed in which at least one of targetPaths was
changed (i.e., if a file text or properties changed; if dir properties
changed or an entry was added or deleted). Each path is relative
to the repository location that this object is set to.
If changedPath is true, then each
SVNLogEntry passed to the handler will contain info about all
paths changed in that revision it represents. To get them call
SVNLogEntry.getChangedPaths() that returns a map,
which keys are the changed paths and the values are SVNLogEntryPath objects.
If changedPath is false, changed paths
info will not be provided.
If strictNode is true, copy history will
not be traversed (if any exists) when harvesting the revision logs for each path.
Target paths can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
NOTE: you may not invoke methods of this SVNRepository
object from within the provided handler.
targetPaths - paths that mean only those revisions at which they were
changedstartRevision - a revision to start fromendRevision - a revision to end atchangedPath - if true then
revision information will also include all changed paths per
revision, otherwise notstrictNode - if true then copy history (if any) is not
to be traversedhandler - a caller's handler that will be dispatched log entry objects
SVNException - if a failure occured while connecting to a repository
or the user's authentication failed (see
SVNAuthenticationException)log(String[], Collection, long, long, boolean, boolean),
log(String[], long, long, boolean, boolean, long, ISVNLogEntryHandler),
ISVNLogEntryHandler,
SVNLogEntry,
SVNLogEntryPath
public abstract long log(String[] targetPaths,
long startRevision,
long endRevision,
boolean changedPath,
boolean strictNode,
long limit,
ISVNLogEntryHandler handler)
throws SVNException
handler.
This method invokes handler on each log entry from
startRevision to endRevision.
startRevision may be greater or less than
endRevision; this just controls whether the log messages are
processed in descending or ascending revision number order.
If startRevision or endRevision is invalid, it
defaults to the youngest.
If targetPaths has one or more elements, then
only those revisions are processed in which at least one of targetPaths was
changed (i.e., if a file text or properties changed; if dir properties
changed or an entry was added or deleted). Each path is relative
to the repository location that this object is set to.
If changedPath is true, then each
SVNLogEntry passed to the handler will contain info about all
paths changed in that revision it represents. To get them call
SVNLogEntry.getChangedPaths() that returns a map,
which keys are the changed paths and the values are SVNLogEntryPath objects.
If changedPath is false, changed paths
info will not be provided.
If strictNode is true, copy history will
not be traversed (if any exists) when harvesting the revision logs for each path.
If limit is > 0 then only the first limit log entries
will be handled. Otherwise (i.e. if limit is 0) this number is ignored.
Target paths can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
NOTE: you may not invoke methods of this SVNRepository
object from within the provided handler.
targetPaths - paths that mean only those revisions at which they were
changedstartRevision - a revision to start fromendRevision - a revision to end atchangedPath - if true then
revision information will also include all changed paths per
revision, otherwise notstrictNode - if true then copy history (if any) is not
to be traversedlimit - the maximum number of log entries to processhandler - a caller's handler that will be dispatched log entry objects
SVNException - if a failure occured while connecting to a repository
or the user's authentication failed (see
SVNAuthenticationException)log(String[], Collection, long, long, boolean, boolean),
log(String[], long, long, boolean, boolean, long, ISVNLogEntryHandler),
ISVNLogEntryHandler,
SVNLogEntry,
SVNLogEntryPath
public abstract int getLocations(String path,
long pegRevision,
long[] revisions,
ISVNLocationEntryHandler handler)
throws SVNException
For each interesting revision (taken from revisions) an entry location
is represented by an SVNLocationEntry object which is passed to the provided
handler. Each SVNLocationEntry object represents a repository path
in a definite revision.
The path arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
NOTES:
handler
path - an item's pathpegRevision - a revision in which path is first
looked uprevisions - an array of numbers of interesting revisions in which
locations are looked up. If path
doesn't exist in an interesting revision, that revision
will be ignored.handler - a location entry handler that will handle all found entry
locations
SVNException - in the following cases:
path not found in the specified pegRevision
pegRevision is not valid
SVNAuthenticationException)
getLocations(String, Collection, long, long[]),
getLocations(String, Map, long, long[]),
ISVNLocationEntryHandler,
SVNLocationEntry
public Collection getFileRevisions(String path,
Collection revisions,
long sRevision,
long eRevision)
throws SVNException
A file revision is represented by an SVNFileRevision object.
Only those revisions will be retrieved in which the file was changed.
The iteration will begin at the first such revision starting from the
startRevision and so on - up to the endRevision.
The path arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
NOTE: this functionality is not available in pre-1.1 servers
path - a file pathrevisions - if not null this collection
will receive all the fetched file revisionssRevision - a revision to start fromeRevision - a revision to stop at
SVNFileRevision instances
SVNException - if a failure occured while connecting to a repository
or the user's authentication failed (see
SVNAuthenticationException)getFileRevisions(String, long, long, ISVNFileRevisionHandler),
SVNFileRevision
public Collection getDir(String path,
long revision,
Map properties,
Collection dirEntries)
throws SVNException
The path arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
path - a directory pathrevision - a revision numberproperties - if not null then all
directory properties (including non-tweakable ones)
will be put into this map (where keys are property names
and mappings are property values)dirEntries - if not null then this
collection receives fetched dir entries (SVNDirEntry objects)
SVNException - in the following cases:
path not found in the specified revision
path is not a directory
SVNAuthenticationException)
getDir(String, long, Map, ISVNDirEntryHandler),
getDir(String, long, boolean, Collection),
SVNDirEntry
public abstract SVNDirEntry getDir(String path,
long revision,
boolean includeCommitMessages,
Collection entries)
throws SVNException
If entries arg is not null it
receives the directory entries. Information of each directory entry is
represented by an SVNDirEntry object.
The path arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
path - a directory pathrevision - a revision numberincludeCommitMessages - if true then
dir entries (SVNDirEntry objects) will be supplied
with commit log messages, otherwise notentries - a collection that receives fetched dir entries
entries
SVNException - in the following cases:
path not found in the specified revision
path is not a directory
SVNAuthenticationException)
getDir(String, long, Map, ISVNDirEntryHandler),
getDir(String, long, Map, Collection),
SVNDirEntry
public Collection log(String[] targetPaths,
Collection entries,
long startRevision,
long endRevision,
boolean changedPath,
boolean strictNode)
throws SVNException
startRevision may be greater or less than
endRevision; this just controls whether the log messages are
processed in descending or ascending revision number order.
If startRevision or endRevision is invalid, it
defaults to the youngest.
If targetPaths has one or more elements, then
only those revisions are processed in which at least one of targetPaths was
changed (i.e., if a file text or properties changed; if dir properties
changed or an entry was added or deleted). Each path is relative
to the repository location that this object is set to.
If changedPath is true, then each
SVNLogEntry object is supplied with info about all
paths changed in that revision it represents. To get them call
SVNLogEntry.getChangedPaths() that returns a map,
which keys are the changed paths and the mappings are SVNLogEntryPath objects.
If changedPath is false, changed paths
info will not be provided.
If strictNode is true, copy history will
not be traversed (if any exists) when harvesting the revision logs for each path.
Target paths can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
targetPaths - paths that mean only those revisions at which they were
changedentries - if not null then this collection
will receive log entriesstartRevision - a revision to start fromendRevision - a revision to end atchangedPath - if true then
revision information will also include all changed paths per
revision, otherwise notstrictNode - if true then copy history (if any) is not
to be traversed
SVNException - if a failure occured while connecting to a repository
or the user's authentication failed (see
SVNAuthenticationException)log(String[], long, long, boolean, boolean, ISVNLogEntryHandler),
log(String[], long, long, boolean, boolean, long, ISVNLogEntryHandler),
ISVNLogEntryHandler,
SVNLogEntry,
SVNLogEntryPath
public Collection getLocations(String path,
Collection entries,
long pegRevision,
long[] revisions)
throws SVNException
For each interesting revision (taken from revisions) an entry location
is represented by an SVNLocationEntry object. Each SVNLocationEntry
object represents a repository path in a definite revision.
The path arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
NOTE: this functionality is not available in pre-1.1 servers
path - an item's pathentries - if not null then this
collection object receives entry locationspegRevision - a revision in which path is first
looked uprevisions - an array of numbers of interesting revisions in which
locations are looked up. If path
doesn't exist in an interesting revision, that revision
will be ignored.
SVNException - in the following cases:
path not found in the specified pegRevision
pegRevision is not valid
SVNAuthenticationException)
getLocations(String, long, long[], ISVNLocationEntryHandler),
getLocations(String, Map, long, long[]),
SVNLocationEntry,
ISVNLocationEntryHandler
public Map getLocations(String path,
Map entries,
long pegRevision,
long[] revisions)
throws SVNException
For each interesting revision (taken from revisions) an entry location
is represented by an SVNLocationEntry object. Each SVNLocationEntry
object represents a repository path in a definite revision.
The path arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/").
NOTE: this functionality is not available in pre-1.1 servers