|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tmatesoft.svn.core.io.SVNRepository
public abstract class 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
,
ExamplesField Summary | |
---|---|
static long |
INVALID_REVISION
Is used as an initialization value in cases, when revision is not defined, often represents HEAD revision |
protected SVNURL |
myLocation
|
protected SVNURL |
myRepositoryRoot
|
protected java.lang.String |
myRepositoryUUID
|
Constructor Summary | |
---|---|
protected |
SVNRepository(SVNURL location,
ISVNSession options)
|
Method Summary | |
---|---|
void |
addConnectionListener(ISVNConnectionListener listener)
Adds a connection listener to this object. |
void |
assertServerIsMergeInfoCapable(java.lang.String pathOrURL)
Checks that this object is connected to a mergeinfo capable repository. |
protected static void |
assertValidRevision(long revision)
|
void |
checkout(long revision,
java.lang.String target,
boolean recursive,
ISVNEditor editor)
Checks out a directory from a repository. |
void |
checkout(long revision,
java.lang.String target,
SVNDepth depth,
ISVNEditor editor)
Checks out a directory from a repository to define depth . |
void |
checkoutFiles(long revision,
java.lang.String[] paths,
ISVNFileCheckoutTarget fileCheckoutHandler)
Recursively checks out only files from the repository at revision invoking
fileCheckoutHandler on every file received. |
abstract SVNNodeKind |
checkPath(java.lang.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. |
void |
diff(SVNURL url,
long targetRevision,
long revision,
java.lang.String target,
boolean ignoreAncestry,
boolean recursive,
boolean getContents,
ISVNReporterBaton reporter,
ISVNEditor editor)
Deprecated. use diff(SVNURL, long, long, String, boolean, SVNDepth, boolean, ISVNReporterBaton, ISVNEditor)
instead |
void |
diff(SVNURL url,
long targetRevision,
long revision,
java.lang.String target,
boolean ignoreAncestry,
boolean recursive,
ISVNReporterBaton reporter,
ISVNEditor editor)
Deprecated. use diff(SVNURL, long, long, String, boolean, SVNDepth, boolean, ISVNReporterBaton, ISVNEditor)
instead |
abstract void |
diff(SVNURL url,
long targetRevision,
long revision,
java.lang.String target,
boolean ignoreAncestry,
SVNDepth depth,
boolean getContents,
ISVNReporterBaton reporter,
ISVNEditor editor)
Asks this repository access object to 'diff' a working copy against targetRevision . |
void |
diff(SVNURL url,
long revision,
java.lang.String target,
boolean ignoreAncestry,
boolean recursive,
ISVNReporterBaton reporter,
ISVNEditor editor)
Deprecated. use diff(SVNURL, long, long, String, boolean, SVNDepth, boolean, ISVNReporterBaton, ISVNEditor)
instead |
protected void |
fireConnectionClosed()
|
protected void |
fireConnectionOpened()
|
ISVNAuthenticationManager |
getAuthenticationManager()
Returns the authentication driver registered for this object. |
ISVNCanceller |
getCanceller()
Returns the canceller, stored in this object. |
ISVNEditor |
getCommitEditor(java.lang.String logMessage,
ISVNWorkspaceMediator mediator)
Gets an editor for committing changes to a repository. |
abstract ISVNEditor |
getCommitEditor(java.lang.String logMessage,
java.util.Map locks,
boolean keepLocks,
ISVNWorkspaceMediator mediator)
Gets an editor for committing changes to a repository. |
ISVNEditor |
getCommitEditor(java.lang.String logMessage,
java.util.Map locks,
boolean keepLocks,
SVNProperties revisionProperties,
ISVNWorkspaceMediator mediator)
Returns an editor for committing changes to the repository ession, setting the revision properties from revisionProperties table. |
protected abstract ISVNEditor |
getCommitEditorInternal(java.util.Map locks,
boolean keepLocks,
SVNProperties revProps,
ISVNWorkspaceMediator mediator)
|
abstract long |
getDatedRevision(java.util.Date date)
Returns the recent repository revision number for the particular moment in time - the closest one before or at the specified datestamp. |
ISVNDebugLog |
getDebugLog()
Returns the debug logger currently in use. |
long |
getDeletedRevision(java.lang.String path,
long pegRevision,
long endRevision)
Returns the revision where the path was first deleted within the inclusive revision range defined by pegRevision and endRevision . |
protected abstract long |
getDeletedRevisionImpl(java.lang.String path,
long pegRevision,
long endRevision)
|
abstract SVNDirEntry |
getDir(java.lang.String path,
long revision,
boolean includeCommitMessages,
java.util.Collection entries)
Fetches the contents of a directory into the provided collection object and returns the directory entry itself. |
java.util.Collection |
getDir(java.lang.String path,
long revision,
SVNProperties properties,
java.util.Collection dirEntries)
Fetches the contents and properties of a directory located at the specified path in a particular revision. |
java.util.Collection<SVNDirEntry> |
getDir(java.lang.String path,
long revision,
SVNProperties properties,
int entryFields,
java.util.Collection dirEntries)
Fetches the contents and properties of a directory located at the specified path in a particular revision with the possibility to specify fields of the entry to fetch. |
abstract long |
getDir(java.lang.String path,
long revision,
SVNProperties properties,
int entryFields,
ISVNDirEntryHandler handler)
Fetches the contents and/or properties of a directory located at the specified path in a particular revision with the possibility to specify fields of the entry to fetch. |
abstract long |
getDir(java.lang.String path,
long revision,
SVNProperties properties,
ISVNDirEntryHandler handler)
Fetches the contents and/or properties of a directory located at the specified path in a particular revision. |
abstract long |
getFile(java.lang.String path,
long revision,
SVNProperties properties,
java.io.OutputStream contents)
Fetches the contents and/or properties of a file located at the specified path in a particular revision. |
java.util.Collection |
getFileRevisions(java.lang.String path,
java.util.Collection revisions,
long sRevision,
long eRevision)
Retrieves and returns interesting file revisions for the specified file. |
int |
getFileRevisions(java.lang.String path,
long startRevision,
long endRevision,
boolean includeMergedRevisions,
ISVNFileRevisionHandler handler)
Retrieves interesting file revisions for the specified file with possibility to include merged revisions. |
int |
getFileRevisions(java.lang.String path,
long startRevision,
long endRevision,
ISVNFileRevisionHandler handler)
Retrieves interesting file revisions for the specified file. |
protected abstract int |
getFileRevisionsImpl(java.lang.String path,
long startRevision,
long endRevision,
boolean includeMergedRevisions,
ISVNFileRevisionHandler handler)
|
java.lang.String |
getFullPath(java.lang.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. |
protected java.lang.String |
getLocationRelativePath(java.lang.String relativeOrAbsolutePath)
|
java.util.Collection |
getLocations(java.lang.String path,
java.util.Collection entries,
long pegRevision,
long[] revisions)
Gets entry locations in time. |
int |
getLocations(java.lang.String path,
long pegRevision,
long[] revisions,
ISVNLocationEntryHandler handler)
Gets entry locations in time. |
java.util.Map |
getLocations(java.lang.String path,
java.util.Map entries,
long pegRevision,
long[] revisions)
Gets entry locations in time. |
java.util.List<SVNLocationSegment> |
getLocationSegments(java.lang.String path,
long pegRevision,
long startRevision,
long endRevision)
Calls handler for each segment in the location history of path in
pegRevision , working backwards in time from startRevision to
endRevision . |
long |
getLocationSegments(java.lang.String path,
long pegRevision,
long startRevision,
long endRevision,
ISVNLocationSegmentHandler handler)
Calls handler for each segment in the location history of path in
pegRevision , working backwards in time from startRevision to
endRevision . |
protected abstract long |
getLocationSegmentsImpl(java.lang.String path,
long pegRevision,
long startRevision,
long endRevision,
ISVNLocationSegmentHandler handler)
|
protected abstract int |
getLocationsImpl(java.lang.String path,
long pegRevision,
long[] revisions,
ISVNLocationEntryHandler handler)
|
abstract SVNLock |
getLock(java.lang.String path)
Gets the lock for the file located at the specified path. |
abstract SVNLock[] |
getLocks(java.lang.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. |
java.util.Map<java.lang.String,SVNMergeInfo> |
getMergeInfo(java.lang.String[] paths,
long revision,
SVNMergeInfoInheritance inherit,
boolean includeDescendants)
Returns merge information for the repository entries in paths
for paricular revision , if the repository supports merge-tracking information |
protected abstract java.util.Map |
getMergeInfoImpl(java.lang.String[] paths,
long revision,
SVNMergeInfoInheritance inherit,
boolean includeDescendants)
|
ISVNSession |
getOptions()
Returns the session options object this driver is using. |
java.lang.String |
getRepositoryPath(java.lang.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. |
java.lang.String |
getRepositoryUUID()
Deprecated. use getRepositoryUUID(boolean) instead |
java.lang.String |
getRepositoryUUID(boolean forceConnection)
Gets the Universal Unique IDentifier (UUID) of the repository this driver is created for. |
protected static java.lang.Long |
getRevisionObject(long revision)
|
abstract SVNProperties |
getRevisionProperties(long revision,
SVNProperties properties)
Returns unversioned revision properties for a particular revision. |
abstract SVNPropertyValue |
getRevisionPropertyValue(long revision,
java.lang.String propertyName)
Gets the value of an unversioned property. |
ISVNTunnelProvider |
getTunnelProvider()
Returns a tunnel provider. |
abstract boolean |
hasCapability(SVNCapability capability)
Returns true if the repository has specified capability . |
abstract SVNDirEntry |
info(java.lang.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(java.util.Map pathsToRevisions,
java.lang.String comment,
boolean force,
ISVNLockHandler handler)
Locks path(s) at definite revision(s). |
java.util.Collection |
log(java.lang.String[] targetPaths,
java.util.Collection entries,
long startRevision,
long endRevision,
boolean changedPath,
boolean strictNode)
Traverses revisions history and returns a collection of log entries. |
long |
log(java.lang.String[] targetPaths,
long startRevision,
long endRevision,
boolean changedPath,
boolean strictNode,
ISVNLogEntryHandler handler)
Traverses revisions history. |
long |
log(java.lang.String[] targetPaths,
long startRevision,
long endRevision,
boolean discoverChangedPaths,
boolean strictNodeHistory,
long limit,
boolean includeMergedRevisions,
java.lang.String[] revisionProperties,
ISVNLogEntryHandler handler)
Invokes handler on each log message from startRevision to
endRevision . |
long |
log(java.lang.String[] targetPaths,
long startRevision,
long endRevision,
boolean changedPath,
boolean strictNode,
long limit,
ISVNLogEntryHandler handler)
Traverses revisions history. |
protected abstract long |
logImpl(java.lang.String[] targetPaths,
long startRevision,
long endRevision,
boolean changedPath,
boolean strictNode,
long limit,
boolean includeMergedRevisions,
java.lang.String[] revisionProperties,
ISVNLogEntryHandler handler)
|
void |
removeConnectionListener(ISVNConnectionListener listener)
Removes the specified connection listener from the collection of connection listeners held by this object. |
abstract void |
replay(long lowRevision,
long revision,
boolean sendDeltas,
ISVNEditor editor)
Replays the changes from the specified revision through the given editor. |
void |
replayRange(long startRevision,
long endRevision,
long lowRevision,
boolean sendDeltas,
ISVNReplayHandler handler)
Replays the changes from a range of revisions between startRevision
and endRevision . |
protected abstract void |
replayRangeImpl(long startRevision,
long endRevision,
long lowRevision,
boolean sendDeltas,
ISVNReplayHandler handler)
|
void |
setAuthenticationManager(ISVNAuthenticationManager authManager)
Sets an authentication driver for this object. |
void |
setCanceller(ISVNCanceller canceller)
Sets a canceller to this object. |
void |
setDebugLog(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(java.lang.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,
java.lang.String propertyName,
SVNPropertyValue propertyValue)
Sets a revision property with the specified name to a new value. |
void |
setTunnelProvider(ISVNTunnelProvider tunnelProvider)
Sets a tunnel provider. |
void |
status(long revision,
java.lang.String target,
boolean recursive,
ISVNReporterBaton reporter,
ISVNEditor editor)
Gets status of a path. |
abstract void |
status(long revision,
java.lang.String target,
SVNDepth depth,
ISVNReporterBaton reporter,
ISVNEditor editor)
Gets status of a path to the particular depth as a scope. |
abstract void |
testConnection()
Tries to access a repository. |
protected void |
unlock()
|
abstract void |
unlock(java.util.Map pathToTokens,
boolean force,
ISVNLockHandler handler)
Removes lock(s) from the file(s). |
void |
update(long revision,
java.lang.String target,
boolean recursive,
ISVNReporterBaton reporter,
ISVNEditor editor)
Updates a path receiving changes from a repository. |
abstract void |
update(long revision,
java.lang.String target,
SVNDepth depth,
boolean sendCopyFromArgs,
ISVNReporterBaton reporter,
ISVNEditor editor)
Updates a path receiving changes from a repository. |
void |
update(SVNURL url,
long revision,
java.lang.String target,
boolean recursive,
ISVNReporterBaton reporter,
ISVNEditor editor)
Deprecated. use update(SVNURL, long, String, SVNDepth, ISVNReporterBaton, ISVNEditor)
instead |
abstract void |
update(SVNURL url,
long revision,
java.lang.String target,
SVNDepth depth,
ISVNReporterBaton reporter,
ISVNEditor editor)
Asks this repository access object to 'switch' a versioned tree to a new url . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long INVALID_REVISION
protected java.lang.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 java.lang.String getRepositoryUUID()
getRepositoryUUID(boolean)
instead
public java.lang.String getRepositoryUUID(boolean forceConnection) throws SVNException
forceConnection
- if true then forces
this driver to test a connection - try to access a
repository
SVNException
- in case the repository could not be connected
SVNAuthenticationException
- in case of authentication problemspublic SVNURL getRepositoryRoot()
getRepositoryRoot(boolean)
public SVNURL getRepositoryRoot(boolean forceConnection) throws SVNException
setLocation()
),
the root directory location may be changed.
This method may need to establish connection with the repository
if the information on the repository's root location has not been received yet from the repository.
forceConnection
- if true then forces
this driver to test a connection - try to access a
repository
SVNException
- in case the repository could not be connected
SVNAuthenticationException
- in case of authentication problemstestConnection()
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)
canceller
- canceller objectpublic ISVNCanceller getCanceller()
protected void setRepositoryCredentials(java.lang.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(java.util.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 SVNProperties getRevisionProperties(long revision, SVNProperties 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, java.lang.String propertyName, SVNPropertyValue 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 SVNPropertyValue getRevisionPropertyValue(long revision, java.lang.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(java.lang.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(java.lang.String path, long revision, SVNProperties properties, java.io.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(java.lang.String path, long revision, SVNProperties properties, ISVNDirEntryHandler handler) throws SVNException
This method is the same as getDir(String, long, SVNProperties, int, ISVNDirEntryHandler)
with entryFields
parameter set to DIRENT_ALL
.
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, boolean, Collection)
,
getDir(String, long, SVNProperties, int, Collection)
,
SVNDirEntry
public abstract long getDir(java.lang.String path, long revision, SVNProperties properties, int entryFields, 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 mapentryFields
- a combination of fields for the entryhandler
- 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, boolean, Collection)
,
getDir(String, long, SVNProperties, int, Collection)
,
SVNDirEntry
public int getFileRevisions(java.lang.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 int getFileRevisions(java.lang.String path, long startRevision, long endRevision, boolean includeMergedRevisions, ISVNFileRevisionHandler handler) throws SVNException
A file revision is represented by an SVNFileRevision object. Each
file revision is handled by the file revision handler provided.
The iteration will begin at the first such revision starting from the
startRevision
and so on - up to the endRevision
.
If includeMergedRevisions
is true
, then revisions which
were result of a merge will be included as well.
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 atincludeMergedRevisions
- if is true
, merged revisions will be returned as wellhandler
- 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 void assertServerIsMergeInfoCapable(java.lang.String pathOrURL) throws SVNException
SVNException
is thrown with the error code SVNErrorCode.UNSUPPORTED_FEATURE
.
pathOrURL
is used only in an error message. If pathOrURL
is
null, it defaults to the location
of this
object.
pathOrURL
- path or URl string for an error message
SVNException
- exception with SVNErrorCode.UNSUPPORTED_FEATURE
error code - if
the repository does not support merge-trackingpublic long log(java.lang.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 long log(java.lang.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 can be either absolute or 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 long log(java.lang.String[] targetPaths, long startRevision, long endRevision, boolean discoverChangedPaths, boolean strictNodeHistory, long limit, boolean includeMergedRevisions, java.lang.String[] revisionProperties, ISVNLogEntryHandler handler) throws SVNException
handler
on each log message 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 (<0
), it defaults
to youngest.
If targetPaths
is non-null and has one or more elements,
then shows only revisions in which at least one of targetPaths
was changed (i.e., if
file, text or props changed; if dir, props changed or an entry was added or deleted). Each path may be
either absolut (starts with '/') or relative to this object's location
.
If limit
is non-zero only invokes handler
on the first limit
logs.
If discoverChangedPaths
is set, then each call to handler
passes an
SVNLogEntry
object with non-empty
changed paths map
;
the hash's keys are all the paths committed in that revision.
Otherwise, each call to handler
passes null for changed paths.
If strictNodeHistory
is set, copy history will not be traversed (if any exists) when
harvesting the revision logs for each path.
If includeMergedRevisions
is set, log information for revisions which have been merged to
targetPahts
will also be returned.
Refer to SVNLogEntry.hasChildren()
for additional information on how
to handle mergeinfo information during a log operation.
If revisionProperties
is null, retrieves all revprops; else,
retrieves only the revprops named in the array (i.e. retrieves none if the array is empty).
If any invocation of handler
throws an exception, then throws that exception immediately and
without wrapping it.
Note: the caller may not invoke any repository access operations using from within handler
.
Note: if targetPahts
is null or empty, the result depends
on the server. Pre-1.5 servers will send nothing; 1.5 servers will effectively perform the log operation
on the root of the repository. This behavior may be changed in the future to ensure consistency across
all pedigrees of server.
Note: pre-1.5 servers do not support custom revision properties retrieval; if
revisionProperties
is null or contains a revision property
other than SVNRevisionProperty.AUTHOR
, SVNRevisionProperty.DATE
,
SVNRevisionProperty.LOG
, an exception with the SVNErrorCode.RA_NOT_IMPLEMENTED
error code
is thrown.
targetPaths
- paths that mean only those revisions at which they were
changedstartRevision
- a revision to start fromendRevision
- a revision to end atdiscoverChangedPaths
- if true then revision information will
also include all changed paths per revision, otherwise notstrictNodeHistory
- if true then copy history (if any) is not
to be traversedlimit
- the maximum number of log entries to processincludeMergedRevisions
- whether mergeinfo information should be taken into account or notrevisionProperties
- revision properties to fetch with log entrieshandler
- a caller's handler that will be dispatched log entry objects
SVNException
- in the following cases:
SVNErrorCode.FS_NO_SUCH_REVISION
error code -
if startRevision
or endRevision
is a
non-existent revision
exception with SVNErrorCode.RA_NOT_IMPLEMENTED
error code -
in case of a pre-1.5 server and custom revision properties requested
public int getLocations(java.lang.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 long getLocationSegments(java.lang.String path, long pegRevision, long startRevision, long endRevision, ISVNLocationSegmentHandler handler) throws SVNException
handler
for each segment in the location history of path
in
pegRevision
, working backwards in time from startRevision
to
endRevision
.
endRevision
may be invalid (<0
) to indicate that you want to trace the
history of the object to its origin.
startRevision
may be invalid to indicate "the HEAD revision".
Otherwise, startRevision
must be younger than endRevision
(unless
endRevision
is invalid).
pegRevision
may be invalid to indicate "the HEAD revision", and must evaluate to be at
least as young as startRevision
.
path
- repository pathpegRevision
- revision in which path
is validstartRevision
- revision range startendRevision
- revision range endhandler
- caller's segment handler implementation
SVNException
public java.util.List<SVNLocationSegment> getLocationSegments(java.lang.String path, long pegRevision, long startRevision, long endRevision) throws SVNException
handler
for each segment in the location history of path
in
pegRevision
, working backwards in time from startRevision
to
endRevision
.
The same as getLocationSegments(String, long, long, long, ISVNLocationSegmentHandler)
except for
this method returns a list of all the segments fetched for path
. The list will be sorted
into an ascenging order (segments with greater start revisions will be placed in the head of the list).
path
- repository pathpegRevision
- revision in which path
is validstartRevision
- revision range startendRevision
- revision range end
SVNException
public java.util.Collection getFileRevisions(java.lang.String path, java.util.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 java.util.Collection getDir(java.lang.String path, long revision, SVNProperties properties, java.util.Collection dirEntries) throws SVNException
This method is the same as getDir(String, long, SVNProperties, int, Collection)
with
entryFields
parameter set to DIRENT_ALL
.
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, SVNProperties, int, Collection)
,
getDir(String, long, boolean, Collection)
,
SVNDirEntry
public java.util.Collection<SVNDirEntry> getDir(java.lang.String path, long revision, SVNProperties properties, int entryFields, java.util.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)entryFields
- a combination of fields for the entrydirEntries
- 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, SVNProperties, int, Collection)
,
getDir(String, long, boolean, Collection)
,
SVNDirEntry
public abstract SVNDirEntry getDir(java.lang.String path, long revision, boolean includeCommitMessages, java.util.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, SVNProperties, ISVNDirEntryHandler)
,
getDir(String, long, SVNProperties, Collection)
,
SVNDirEntry
public java.util.Collection log(java.lang.String[] targetPaths, java.util.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 java.util.Collection getLocations(java.lang.String path, java.util.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 java.util.Map getLocations(java.lang.String path, java.util.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
path
- an item's pathentries
- if not null then this
map object receives entry locations (which keys are revision
numbers as Longs and mappings are entry locations objects)pegRevision
- 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, Collection, long, long[])
,
SVNLocationEntry
,
ISVNLocationEntryHandler
public void diff(SVNURL url, long targetRevision, long revision, java.lang.String target, boolean ignoreAncestry, boolean recursive, boolean getContents, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
diff(SVNURL, long, long, String, boolean, SVNDepth, boolean, ISVNReporterBaton, ISVNEditor)
instead
target
is the name (one-level path component) of an entry that will restrict
the scope of the diff operation to this entry. In other words target
is a child entry of the
directory represented by the repository location to which this object is set. For
example, if we have something like "/dirA/dirB"
in a repository, then
this object's repository location may be set to "svn://host:port/path/to/repos/dirA"
,
and target
may be "dirB"
.
If target
is null or empty (""
)
then the scope of the diff operation is the repository location to which
this object is set.
The reporter
is used to describe the state of the target item(s) (i.e.
items' revision numbers). All the paths described by the reporter
should be relative to the repository location to which this object is set.
After that the editor
is used to carry out all the work on
evaluating differences against url
. This editor
contains
knowledge of where the change will begin (when ISVNEditor.openRoot()
is called).
If ignoreAncestry
is false then
the ancestry of the paths being diffed is taken into consideration - they
are treated as related. In this case, for example, if calculating differences between
two files with identical contents but different ancestry,
the entire contents of the target file is considered as having been removed and
added again.
If ignoreAncestry
is true
then the two paths are merely compared ignoring the ancestry.
NOTE: you may not invoke methods of this SVNRepository
object from within the provided reporter
and editor
.
diff(url, targetRevision, revision, target, ignoreAncestry, SVNDepth.fromRecurse(recursive), getContents, reporter, editor)
.
url
- a repository location of the entry against which
differences are calculatedtargetRevision
- a revision number of the entry located at the
specified url
; defaults to the
latest revision (HEAD) if this arg is invalidrevision
- a revision number of the repository location to which
this driver object is settarget
- a target entry name (optional)ignoreAncestry
- if true then
the ancestry of the two entries to be diffed is
ignored, otherwise notrecursive
- if true and the diff scope
is a directory, descends recursively, otherwise notgetContents
- if false contents (diff windows) will not be sent to
the editor.reporter
- a caller's reportereditor
- a caller's editor
SVNException
- in the following cases:
url
not found neither in the specified
revision
nor in the HEAD revision
SVNAuthenticationException
)
public abstract void diff(SVNURL url, long targetRevision, long revision, java.lang.String target, boolean ignoreAncestry, SVNDepth depth, boolean getContents, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
targetRevision
.
Note: this method cannot be used to diff a single file, only a directory.
See the update(SVNURL, long, String, SVNDepth, ISVNReporterBaton, ISVNEditor)
method for more
details.
The client initially provides an editor
; this editor contains knowledge of where the common
diff root is in the working copy (when ISVNEditor.openRoot(long)
is called).
In return, the client receives a ISVNReporter
object in his ISVNReporterBaton
implementation. The client then describes its working copy by making calls into the reporter object.
When finished, the client calls ISVNReporter.finishReport()
. This SVNRepository
object then does a complete drive of editor
, ending with ISVNEditor.closeEdit()
, to
transmit the diff.
target
is an optional single path component that will restrict the scope of things affected
by the switch to an entry in the directory represented by the location
of this
object, or null if the entire directory is meant to be switched.
The working copy will be diffed against url
as it exists in revision
targeRevision
, or as it is in HEAD if targetRevision
is invalid (<0
).
Use ignoreAncestry
to control whether or not items being diffed will be checked for
relatedness first. Unrelated items are typically transmitted to the editor as a deletion of one thing
and the addition of another, but if this flag is true,
unrelated items will be diffed as if they were related.
Diffs only as deeply as depth
indicates.
The caller may not perform any repository access operations using this SVNRepository
object
before finishing the report, and may not perform any repository access operations using this
SVNRepository
object from within the editing operations of editor
.
getContents
instructs the driver of the editor
to enable the generation of
text deltas. If getContents
is false the editor
's
ISVNDeltaConsumer.textDeltaChunk(String, SVNDiffWindow)
method will be called once with
SVNDiffWindow.EMPTY
.
Note: the reporter provided by this function does NOT supply copy-from information to the diff editor
callbacks.
Note: in order to prevent pre-1.5 servers from doing more work than needed, and sending too much data
back, a pre-1.5 'recurse' directive may be sent to the server, based on depth
.
url
- a repository location of the entry against which
differences are calculatedtargetRevision
- a revision number of the entry located at the
specified url
; defaults to the
latest revision (HEAD) if this arg is invalidrevision
- a revision number of the repository location to which
this driver object is settarget
- a target entry name (optional)ignoreAncestry
- if true then
the ancestry of the two entries to be diffed is
ignored, otherwise notdepth
- tree depth to processgetContents
- if false contents (diff windows) will not be sent to
the editorreporter
- a caller's reportereditor
- a caller's editor
SVNException
- in the following cases:
url
not found neither in the specified
revision
nor in the HEAD revision
SVNAuthenticationException
)
public void diff(SVNURL url, long targetRevision, long revision, java.lang.String target, boolean ignoreAncestry, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
diff(SVNURL, long, long, String, boolean, SVNDepth, boolean, ISVNReporterBaton, ISVNEditor)
instead
diff(SVNURL, long, long, String, boolean, boolean, boolean, ISVNReporterBaton, ISVNEditor)
.
url
- targetRevision
- revision
- target
- ignoreAncestry
- recursive
- reporter
- editor
-
SVNException
public void diff(SVNURL url, long revision, java.lang.String target, boolean ignoreAncestry, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
diff(SVNURL, long, long, String, boolean, SVNDepth, boolean, ISVNReporterBaton, ISVNEditor)
instead
target
is the name (one-level path component) of an entry that will restrict
the scope of the diff operation to this entry. In other words target
is a child entry of the
directory represented by the repository location to which this object is set. For
example, if we have something like "/dirA/dirB"
in a repository, then
this object's repository location may be set to "svn://host:port/path/to/repos/dirA"
,
and target
may be "dirB"
.
If target
is null or empty (""
)
then the scope of the diff operation is the repository location to which
this object is set.
The reporter
is used to describe the state of the target item(s) (i.e.
items' revision numbers). All the paths described by the reporter
should be relative to the repository location to which this object is set.
After that the editor
is used to carry out all the work on
evaluating differences against url
. This editor
contains
knowledge of where the change will begin (when ISVNEditor.openRoot()
is called).
If ignoreAncestry
is false then
the ancestry of the paths being diffed is taken into consideration - they
are treated as related. In this case, for example, if calculating differences between
two files with identical contents but different ancestry,
the entire contents of the target file is considered as having been removed and
added again.
If ignoreAncestry
is true
then the two paths are merely compared ignoring the ancestry.
NOTE: you may not invoke methods of this SVNRepository
object from within the provided reporter
and editor
.
diff(url, revision, revision, target, ignoreAncestry, SVNDepth.fromRecurse(recursive), true, reporter, editor)
.
url
- a repository location of the entry against which
differences are calculatedrevision
- a revision number of the repository location to which
this driver object is settarget
- a target entry name (optional)ignoreAncestry
- if true then
the ancestry of the two entries to be diffed is
ignored, otherwise notrecursive
- if true and the diff scope
is a directory, descends recursively, otherwise notreporter
- a caller's reportereditor
- a caller's editor
SVNException
- in the following cases:
url
not found neither in the specified
revision
nor in the HEAD revision
SVNAuthenticationException
)
public void update(SVNURL url, long revision, java.lang.String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
update(SVNURL, long, String, SVNDepth, ISVNReporterBaton, ISVNEditor)
instead
Updates a path as it's described for the update()
method using the provided reporter
and editor
, and switching
it to a new repository location.
NOTE: you may not invoke methods of this SVNRepository
object from within the provided reporter
and editor
.
url
- a new location in the repository to switch torevision
- a desired revision to make update to; defaults
to the latest revision (HEAD)target
- an entry name (optional)recursive
- if true and the switch scope
is a directory, descends recursively, otherwise notreporter
- a caller's reportereditor
- a caller's editor
SVNException
- in the following cases:
SVNAuthenticationException
)
public abstract void update(SVNURL url, long revision, java.lang.String target, SVNDepth depth, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
url
.
The client initially provides an editor
; this editor contains knowledge of where the
change will begin in the working copy (ISVNEditor.openRoot(long)
is called).
In return, the client receives a ISVNReporter
object in his ISVNReporterBaton
implementation. The client then describes its working copy by making calls into the reporter object.
When finished, the client calls ISVNReporter.finishReport()
. This SVNRepository
object then does a complete drive of editor
, ending with ISVNEditor.closeEdit()
, to
switch the working copy.
target
is an optional single path component that will restrict the scope of things affected
by the switch to an entry in the directory represented by the location
of this
object, or null if the entire directory is meant to be switched.
Switches the target only as deeply as depth
indicates.
The local tree will be switched to revision
, or the HEAD revision if this arg is
invalid.
The caller may not perform any repository access operations using this SVNRepository
object
before finishing the report, and may not perform any repository access operations using this
SVNRepository
object from within the editing operations of editor
.
Note: the reporter provided by this function does NOT supply copy-from information to the diff editor
callbacks.
Note: in order to prevent pre-1.5 servers from doing more work than needed, and sending too much data
back, a pre-1.5 'recurse' directive may be sent to the server, based on depth
.
url
- a new location in the repository to switch torevision
- a desired revision to make update to; defaults
to the latest revision (HEAD)target
- an entry name (optional)depth
- the depth for update operationreporter
- a caller's reportereditor
- a caller's editor
SVNException
ISVNReporterBaton
,
ISVNReporter
,
ISVNEditor
,
Using ISVNReporter/ISVNEditor in update-related operationspublic void update(long revision, java.lang.String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
target
is the name (one-level path component) of an entry that will
restrict the scope of the update to this entry. In other words target
is a child entry of the
directory represented by the repository location to which this object is set. For
example, if we have something like "/dirA/dirB"
in a repository, then
this object's repository location may be set to "svn://host:port/path/to/repos/dirA"
,
and target
may be "dirB"
.
If target
is null or empty (""
)
then the scope of the update operation is the repository location to which
this object is set.
The reporter
is used to describe the state of the local item(s) (i.e.
items' revision numbers, deleted, switched items). All the paths described by the
reporter
should be relative to the repository location to which this
object is set.
After that the editor
is used to carry out all the work on
updating. This editor
contains
knowledge of where the change will begin (when ISVNEditor.openRoot()
is called).
NOTE: you may not invoke methods of this SVNRepository
object from within the provided reporter
and editor
.
revision
- a desired revision to make update to; defaults to
the latest revision (HEAD)target
- an entry name (optional)recursive
- if true and the update scope
is a directory, descends recursively, otherwise notreporter
- a caller's reportereditor
- a caller's editor
SVNException
- in the following cases:
SVNAuthenticationException
)
update(SVNURL, long, String, boolean, ISVNReporterBaton, ISVNEditor)
,
ISVNReporterBaton
,
ISVNReporter
,
ISVNEditor
,
Using ISVNReporter/ISVNEditor in update-related operationspublic abstract void update(long revision, java.lang.String target, SVNDepth depth, boolean sendCopyFromArgs, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
target
is the name (one-level path component) of an entry that will
restrict the scope of the update to this entry. In other words target
is a child entry of the
directory represented by the repository location to which this object is set. For
example, if we have something like "/dirA/dirB"
in a repository, then
this object's repository location may be set to "svn://host:port/path/to/repos/dirA"
,
and target
may be "dirB"
.
If target
is null or empty (""
)
then the scope of the update operation is the repository location to which
this object is set.
The reporter
is used to describe the state of the local item(s) (i.e.
items' revision numbers, deleted, switched items). All the paths described by the
reporter
should be relative to the repository location to which this
object is set.
After that the editor
is used to carry out all the work on
updating. This editor
contains
knowledge of where the change will begin (when ISVNEditor.openRoot()
is called).
NOTE: you may not invoke methods of this SVNRepository
object from within the provided reporter
and editor
.
revision
- a desired revision to make update to; defaults to
the latest revision (HEAD)target
- an entry name (optional)depth
- a depth for update operation, determines the scope of the updatesendCopyFromArgs
- reporter
- a caller's reportereditor
- a caller's editor
SVNException
- in case the repository could not be connected
SVNAuthenticationException
- in case of authentication problemsupdate(long, String, boolean, ISVNReporterBaton, ISVNEditor)
,
ISVNReporterBaton
,
ISVNReporter
,
ISVNEditor
,
Using ISVNReporter/ISVNEditor in update-related operationspublic void status(long revision, java.lang.String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
target
is the name (one-level path component) of an entry that will
restrict the scope of the status to this entry. In other words target
is a child entry of the
directory represented by the repository location to which this object is set. For
example, if we have something like "/dirA/dirB"
in a repository, then
this object's repository location may be set to "svn://host:port/path/to/repos/dirA"
,
and target
may be "dirB"
.
If target
is null or empty (""
)
then the scope of the update operation is the repository location to which
this object is set.
The reporter
is used to describe the state of the local item(s) (i.e.
items' revision numbers, deleted, switched items). All the paths described by the
reporter
should be relative to the repository location to which this
object is set.
After that the editor
is used to carry out all the work on
performing status. This editor
contains
knowledge of where the change will begin (when ISVNEditor.openRoot()
is called).
NOTE: you may not invoke methods of this SVNRepository
object from within the provided reporter
and editor
.
revision
- a desired revision to get status against; defaults to
the latest revision (HEAD)target
- an entry name (optional)recursive
- if true and the status scope
is a directory, descends recursively, otherwise notreporter
- a client's reporter-batoneditor
- a client's status editor
SVNException
- in the following cases:
SVNAuthenticationException
)
ISVNReporterBaton
,
ISVNEditor
public abstract void status(long revision, java.lang.String target, SVNDepth depth, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException
depth
as a scope.
status(long, String, boolean, ISVNReporterBaton, ISVNEditor)
revision
- a desired revision to get status against; defaults to
the latest revision (HEAD)target
- an entry name (optional)depth
- defines the status scopereporter
- a client's reporter-batoneditor
- a client's status editor
SVNException
- in the following cases:
SVNAuthenticationException
)
status(long, String, boolean, ISVNReporterBaton, ISVNEditor)
,
ISVNReporterBaton
,
ISVNEditor
public void checkout(long revision, java.lang.String target, boolean recursive, ISVNEditor editor) throws SVNException
target
is the name (one-level path component) of an entry that will
restrict the scope of the checkout to this entry. In other words target
is a child entry of the
directory represented by the repository location to which this object is set. For
example, if we have something like "/dirA/dirB"
in a repository, then
this object's repository location may be set to "svn://host:port/path/to/repos/dirA"
,
and target
may be "dirB"
.
If target
is null or empty (""
)
then the scope of the checkout operation is the repository location to which
this object is set.
The provided editor
is used to carry out all the work on
building a local tree of dirs and files being checked out.
NOTE: you may not invoke methods of this SVNRepository
object from within the provided editor
.
revision
- a desired revision of a dir to check out; defaults
to the latest revision (HEAD)target
- an entry name (optional)recursive
- if true and the checkout
scope is a directory, descends recursively, otherwise noteditor
- a caller's checkout editor
SVNException
- in the following cases:
SVNAuthenticationException
)
update(long, String, boolean, ISVNReporterBaton, ISVNEditor)
,
ISVNEditor
public void checkout(long revision, java.lang.String target, SVNDepth depth, ISVNEditor editor) throws SVNException
depth
.
target
is the name (one-level path component) of an entry that will
restrict the scope of the checkout to this entry. In other words target
is a child entry of the
directory represented by the repository location to which this object is set. For
example, if we have something like "/dirA/dirB"
in a repository, then
this object's repository location may be set to "svn://host:port/path/to/repos/dirA"
,
and target
may be "dirB"
.
If target
is null or empty (""
)
then the scope of the checkout operation is the repository location to which
this object is set.
The provided editor
is used to carry out all the work on
building a local tree of dirs and files being checked out.
NOTE: you may not invoke methods of this SVNRepository
object from within the provided editor
.
revision
- a desired revision of a dir to check out; defaults
to the latest revision (HEAD)target
- an entry name (optional)depth
- the checkout operation scopeeditor
- a caller's checkout editor
SVNException
- in the following cases:
SVNAuthenticationException
)
update(long, String, SVNDepth, boolean, ISVNReporterBaton, ISVNEditor)
,
ISVNEditor
public void checkoutFiles(long revision, java.lang.String[] paths, ISVNFileCheckoutTarget fileCheckoutHandler) throws SVNException
revision
invoking
fileCheckoutHandler
on every file received.
Instead of multiple calls to getFileRevisions(String, long, long, boolean, ISVNFileRevisionHandler)
which lead to multiple requests to the repository server a user may use this method to get all interesting
files.
If paths
is not null and not empty, checks out only those
paths
. It means if a path is from paths
and is a file - checks out that file;
if a directory - checks out every file under the directory and down the tree.
Otherwise if paths
is null or empty, checks out files
from the entire tree under this object's getLocation()
.
paths
does not have to be sorted; it will be sorted automatically.
revision
- revision of files to checkoutpaths
- paths to check outfileCheckoutHandler
- caller's file data receiver
SVNException
public abstract void replay(long lowRevision, long revision, boolean sendDeltas, ISVNEditor editor) throws SVNException
Changes will be limited to those that occur under a session's URL, and
the server will assume that the client has no knowledge of revisions
prior to a lowRevision
. These two limiting factors define the portion
of the tree that the server will assume the client already has knowledge of,
and thus any copies of data from outside that part of the tree will be
sent in their entirety, not as simple copies or deltas against a previous
version.
If sendDeltas
is true, the actual text
and property changes in the revision will be sent, otherwise no text deltas and
null property changes will be sent instead.
If lowRevision
is invalid, it defaults to 0.
lowRevision
- a low revision point beyond which a client has no
knowledge of paths historyrevision
- a revision to replaysendDeltas
- controls whether text and property changes are to be
senteditor
- a commit editor to receive changes
SVNException
- in case the repository could not be connected
SVNAuthenticationException
- in case of authentication problemspublic void replayRange(long startRevision, long endRevision, long lowRevision, boolean sendDeltas, ISVNReplayHandler handler) throws SVNException
startRevision
and endRevision
.
When receiving information for one revision,
ISVNReplayHandler.handleStartRevision(long, SVNProperties)
is called; this method will provide
an editor through which the revision will be replayed.
When replaying the revision is finished,
ISVNReplayHandler.handleEndRevision(long, SVNProperties, ISVNEditor)
will be called so the
editor can be closed.
Changes will be limited to those that occur under this object's getLocation()
, and
the server will assume that the client has no knowledge of revisions prior to lowRevision
.
These two limiting factors define the portion of the tree that the server will assume the client already
has knowledge of, and thus any copies of data from outside that part of the tree will be sent in their
entirety, not as simple copies or deltas against a previous version.
If sendDeltas
is true, the actual text and property
changes in the revision will be sent, otherwise dummy text deltas and null
property changes will be sent instead.
If the server does not support revision range replication, then invokes replay(long, long, boolean, ISVNEditor)
on each revision between startRevision
and endRevision
inclusively.
startRevision
- revision range startendRevision
- revision range endlowRevision
- low water mark revisionsendDeltas
- whether to ask the server send text and propertieshandler
- caller's handler
SVNException
- in the following cases:
SVNErrorCode.RA_NOT_IMPLEMENTED
error code - if
the server does not support revision range replication
public ISVNEditor getCommitEditor(java.lang.String logMessage, ISVNWorkspaceMediator mediator) throws SVNException
mediator
is used for temporary delta data storage allocations.
The root path of the commit is the current repository location to which this object is set.
After the commit has succeeded ISVNEditor.closeEdit()
returns an SVNCommitInfo object
that contains a new revision number, the commit date, commit author.
This method should be rather used with pre-1.2 repositories.
NOTE: you may not invoke methods of this SVNRepository object from within the returned commit editor.
logMessage
- a commit log messagemediator
- temp delta storage provider; used also to cache
wcprops while committing
SVNException
- in the following cases:
SVNAuthenticationException
)
ISVNEditor
,
ISVNWorkspaceMediator
,
Using ISVNEditor in commit operationspublic abstract SVNDirEntry info(java.lang.String path, long revision) throws SVNException
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 of the entry; defaults to the latest
revision (HEAD)
path
under the specified revision
SVNException
- in the following cases:
SVNAuthenticationException
)
public abstract ISVNEditor getCommitEditor(java.lang.String logMessage, java.util.Map locks, boolean keepLocks, ISVNWorkspaceMediator mediator) throws SVNException
locks
is a map used to provide lock tokens on the locked paths.
Keys are locked paths in a local tree, and each value for a key is a lock
token. locks
must live during the whole commit operation.
If keepLocks
is true, then the locked
paths won't be unlocked after a successful commit. Otherwise, if
false, locks will be automatically released.
mediator
is used for temporary delta data storage allocations.
The root path of the commit is the current repository location to which this object is set.
After the commit has succeeded ISVNEditor.closeEdit()
returns an SVNCommitInfo object
that contains a new revision number, the commit date, commit author.
NOTE: you may not invoke methods of this SVNRepository object from within the returned commit editor.
logMessage
- a commit log messagelocks
- a map containing locked paths mapped to lock
tokenskeepLocks
- true to keep
existing locks; false
to release locks after the commitmediator
- temp delta storage provider; used also to cache
wcprops while committing
SVNException
- in the following cases:
SVNAuthenticationException
)
getCommitEditor(String, ISVNWorkspaceMediator)
,
Using ISVNEditor in commit operationspublic ISVNEditor getCommitEditor(java.lang.String logMessage, java.util.Map locks, boolean keepLocks, SVNProperties revisionProperties, ISVNWorkspaceMediator mediator) throws SVNException
revisionProperties
table. The revisions being committed
against are passed to the editor methods, starting with the revision
argument to
ISVNEditor.openRoot(long)
. The path root of the commit is this object's
location
.
revisionProperties
maps String
property names to SVNPropertyValue
property values. revisionProperties
can not contain either of
SVNRevisionProperty.LOG
, SVNRevisionProperty.DATE
or SVNRevisionProperty.AUTHOR
.
locks
, if non-null, is a hash mapping String
paths (relative to the location
of this object) to String
lock tokens.
The server checks that the correct token is provided for each committed, locked path.
If keepLocks
is true, then does not release locks on
committed objects. Else, automatically releasees such locks.
The caller may not perform any repository access operations using this SVNRepository
object
before finishing the edit.
logMessage
- commit log messagelocks
- local locks on fileskeepLocks
- whether to unlock locked files after the commit or notrevisionProperties
- custom revision propertiesmediator
- temp delta storage provider; used also to cache
wcprops while committing
SVNException
- in the following cases:
SVNErrorCode.CLIENT_PROPERTY_NAME
error code -
if revisionProperties
contains any svn:
namespace
property
protected abstract ISVNEditor getCommitEditorInternal(java.util.Map locks, boolean keepLocks, SVNProperties revProps, ISVNWorkspaceMediator mediator) throws SVNException
SVNException
public abstract SVNLock getLock(java.lang.String path) 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 file path
SVNException
- in the following cases:
SVNAuthenticationException
)
lock(Map, String, boolean, ISVNLockHandler)
,
unlock(Map, boolean, ISVNLockHandler)
,
getLocks(String)
,
SVNLock
public abstract SVNLock[] getLocks(java.lang.String path) throws SVNException
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.
The path
arg can be both relative to the location of
this driver and absolute to the repository root (starts with "/"
).
path
- a path under which locks are to be retrieved
SVNException
- in the following cases:
SVNAuthenticationException
)
lock(Map, String, boolean, ISVNLockHandler)
,
unlock(Map, boolean, ISVNLockHandler)
,
getLock(String)
,
SVNLock
public java.util.Map<java.lang.String,SVNMergeInfo> getMergeInfo(java.lang.String[] paths, long revision, SVNMergeInfoInheritance inherit, boolean includeDescendants) throws SVNException
paths
for paricular revision
, if the repository supports merge-tracking information
paths
- paths under which merge information is to be retrievedrevision
- revision for which merge information is to be retrievedinherit
- indicates whether explicit, explicit or inherited, or only inherited merge info is retrievedincludeDescendants
- indicates whether merge info is retrieved for descendants of elements in paths
paths
SVNException
- in case the repository could not be connected
SVNAuthenticationException
- in case of authentication problemspublic abstract void lock(java.util.Map pathsToRevisions, java.lang.String comment, boolean force, ISVNLockHandler handler) throws SVNException
Note that locking is never anonymous, so any server implementing this function will have to "pull" a username from the client, if it hasn't done so already.
Each path to be locked is handled with the provided handler
.
If a path was successfully locked, the handler
's
handleLock()
is called that receives the path and either a lock object (representing the lock
that was set on the path) or an error exception, if locking failed for that path.
If any path is already locked by a different user and the
force
flag is false, then this call fails
with throwing an SVNException. But if force
is
true, then the existing lock(s) will be "stolen" anyway,
even if the user name does not match the current lock's owner.
Paths can be both relative to the location of this driver and absolute to
the repository root (starting with "/"
).
pathsToRevisions
- a map which keys are paths and values are
revision numbers (as Longs); paths are strings and revision
numbers are Long objectscomment
- a comment string for the lock (optional)force
- true if the file is to be
locked in any way (even if it's already locked by someone else)handler
- if not null, the lock
handler is invoked on each path to be locked
SVNException
- in the following cases:
force
is false
and a path is already locked by someone else
SVNAuthenticationException
)
unlock(Map, boolean, ISVNLockHandler)
,
getLocks(String)
,
getLock(String)
,
SVNLock
public abstract void unlock(java.util.Map pathToTokens, boolean force, ISVNLockHandler handler) throws SVNException
Note that unlocking is never anonymous, so any server implementing this function will have to "pull" a username from the client, if it hasn't done so already.
Each path to be unlocked is handled with the provided handler
.
If a path was successfully unlocked, the handler
's
handleUnlock()
is called that receives the path and either a lock object (representing the lock
that was removed from the path) or an error exception, if unlocking failed for
that path.
If the username doesn't match the lock's owner and force
is
false, this method call fails with
throwing an SVNException. But if the force
flag is true, the lock will be "broken"
by the current user.
Also if the lock token is incorrect or null
and force
is false, the method
fails with throwing a SVNException. However, if force
is
true the lock will be removed anyway.
Paths can be both relative to the location of this driver and absolute to
the repository root (starting with "/"
).
pathToTokens
- a map which keys are file paths and values are file lock
tokens (both keys and values are strings)force
- true to remove the
lock in any case - i.e. to "break" the lockhandler
- if not null, the lock
handler is invoked on each path to be unlocked
SVNException
- in the following cases:
force
is false
and the name of the user who tries to unlock a path does not match
the lock owner
SVNAuthenticationException
)
lock(Map, String, boolean, ISVNLockHandler)
,
getLocks(String)
,
getLock(String)
,
SVNLock
public abstract void closeSession()
public abstract boolean hasCapability(SVNCapability capability) throws SVNException
true
if the repository has specified capability
.
This method may need to establish connection with the repository if information on capabilities
has not been received yet from the repository.
capability
- one of SVNCapability
SVNException
- in case the repository could not be connected
SVNAuthenticationException
- in case of authentication problemsSVNCapability
public ISVNSession getOptions()
ISVNSession.DEFAULT
.
public void addConnectionListener(ISVNConnectionListener listener)
SVNRepository
object.
All the provided listeners will be notified each time by this object about a new connection which it's
opening.
Note: listeners are not notified in case of the file:///
repository access protocol.
listener
- caller's connection listenerpublic void removeConnectionListener(ISVNConnectionListener listener)
listener
- connection listener to removepublic long getDeletedRevision(java.lang.String path, long pegRevision, long endRevision) throws SVNException
pegRevision
and endRevision
.
If path
does not exist at pegRevision
or was not deleted within
the specified range, then returns an invalid revision (<0
).
path
- relative or absolute repository pathpegRevision
- peg revision to start the search fromendRevision
- end revision to end the search at
path
is first deleted
SVNException
- if pegRevision
or endRevision
are invalid or
if pegRevision
is greater than endRevision
, then
the exception is set SVNErrorCode.CLIENT_BAD_REVISION
error code;
if path
is the repository root ("/"
).protected abstract long getDeletedRevisionImpl(java.lang.String path, long pegRevision, long endRevision) throws SVNException
SVNException
protected abstract long getLocationSegmentsImpl(java.lang.String path, long pegRevision, long startRevision, long endRevision, ISVNLocationSegmentHandler handler) throws SVNException
SVNException
protected abstract int getLocationsImpl(java.lang.String path, long pegRevision, long[] revisions, ISVNLocationEntryHandler handler) throws SVNException
SVNException
protected abstract long logImpl(java.lang.String[] targetPaths, long startRevision, long endRevision, boolean changedPath, boolean strictNode, long limit, boolean includeMergedRevisions, java.lang.String[] revisionProperties, ISVNLogEntryHandler handler) throws SVNException
SVNException
protected abstract int getFileRevisionsImpl(java.lang.String path, long startRevision, long endRevision, boolean includeMergedRevisions, ISVNFileRevisionHandler handler) throws SVNException
SVNException
protected abstract java.util.Map getMergeInfoImpl(java.lang.String[] paths, long revision, SVNMergeInfoInheritance inherit, boolean includeDescendants) throws SVNException
SVNException
protected abstract void replayRangeImpl(long startRevision, long endRevision, long lowRevision, boolean sendDeltas, ISVNReplayHandler handler) throws SVNException
SVNException
protected void fireConnectionOpened()
protected void fireConnectionClosed()
protected void lock()
protected void lock(boolean force)
protected void unlock()
protected static boolean isInvalidRevision(long revision)
protected static boolean isValidRevision(long revision)
protected static java.lang.Long getRevisionObject(long revision)
protected static void assertValidRevision(long revision) throws SVNException
SVNException
public java.lang.String getRepositoryPath(java.lang.String relativePath) throws SVNException
relativePath
- a path relative to the location to which
this SVNRepository is set
SVNException
- in case the repository could not be connected
SVNAuthenticationException
- in case of authentication problemsprotected java.lang.String getLocationRelativePath(java.lang.String relativeOrAbsolutePath) throws SVNException
SVNException
public java.lang.String getFullPath(java.lang.String relativeOrRepositoryPath) throws SVNException
relativeOrRepositoryPath
- a relative path within the
repository
SVNException
- in case the repository could not be connected
SVNAuthenticationException
- in case of authentication problemspublic void setDebugLog(ISVNDebugLog log)
log
- a debug loggerpublic ISVNDebugLog getDebugLog()
If no debug logger has been specified by the time this call occurs,
a default one (returned by org.tmatesoft.svn.util.SVNDebugLog.getDefaultLog()
)
will be created and used.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |