|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.subversion.javahl.SVNClient
public class SVNClient
This is the main client class. All Subversion client APIs are implemented in this class. This class is not threadsafe; if you need threadsafe access, use ClientSynchronized.
Nested Class Summary | |
---|---|
static class |
SVNClient.ClientLogLevel
enum for the constants of the logging levels. |
Field Summary | |
---|---|
protected long |
cppAddr
slot for the adress of the native peer. |
Constructor Summary | |
---|---|
SVNClient()
Standard empty contructor, builds just the native peer. |
Method Summary | |
---|---|
void |
add(String path,
Depth depth,
boolean force,
boolean noIgnores,
boolean addParents)
Adds a file to the repository. |
void |
addToChangelist(Set<String> paths,
String changelist,
Depth depth,
Collection<String> changelists)
Add paths to a changelist |
void |
blame(String path,
Revision pegRevision,
Revision revisionStart,
Revision revisionEnd,
boolean ignoreMimeType,
boolean includeMergedRevisions,
BlameCallback callback)
Retrieve the content together with the author, the revision and the date of the last change of each line |
void |
cancelOperation()
cancel the active operation |
long |
checkout(String moduleName,
String destPath,
Revision revision,
Revision pegRevision,
Depth depth,
boolean ignoreExternals,
boolean allowUnverObstructions)
Executes a revision checkout. |
void |
cleanup(String path)
Recursively cleans up a local directory, finishing any incomplete operations, removing lockfiles, etc. |
void |
commit(Set<String> paths,
Depth depth,
boolean noUnlock,
boolean keepChangelist,
Collection<String> changelists,
Map<String,String> revpropTable,
CommitMessageCallback handler,
CommitCallback callback)
Commits changes to the repository. |
void |
copy(List<CopySource> sources,
String destPath,
boolean copyAsChild,
boolean makeParents,
boolean ignoreExternals,
Map<String,String> revpropTable,
CommitMessageCallback handler,
CommitCallback callback)
Copy versioned paths with the history preserved. |
void |
diff(String target,
Revision pegRevision,
Revision startRevision,
Revision endRevision,
String relativeToDir,
String outFileName,
Depth depth,
Collection<String> changelists,
boolean ignoreAncestry,
boolean noDiffDeleted,
boolean force,
boolean copiesAsAdds)
Display the differences between two paths. |
void |
diff(String target1,
Revision revision1,
String target2,
Revision revision2,
String relativeToDir,
String outFileName,
Depth depth,
Collection<String> changelists,
boolean ignoreAncestry,
boolean noDiffDeleted,
boolean force,
boolean copiesAsAdds)
Display the differences between two paths |
void |
diffSummarize(String target,
Revision pegRevision,
Revision startRevision,
Revision endRevision,
Depth depth,
Collection<String> changelists,
boolean ignoreAncestry,
DiffSummaryCallback receiver)
Produce a diff summary which lists the items changed between path and revision pairs. |
void |
diffSummarize(String target1,
Revision revision1,
String target2,
Revision revision2,
Depth depth,
Collection<String> changelists,
boolean ignoreAncestry,
DiffSummaryCallback receiver)
Produce a diff summary which lists the items changed between path and revision pairs. |
void |
dispose()
release the native peer (should not depend on finalize) |
long |
doExport(String srcPath,
String destPath,
Revision revision,
Revision pegRevision,
boolean force,
boolean ignoreExternals,
Depth depth,
String nativeEOL)
Exports the contents of either a subversion repository into a 'clean' directory (meaning a directory with no administrative directories). |
void |
doImport(String path,
String url,
Depth depth,
boolean noIgnore,
boolean ignoreUnknownNodeTypes,
Map<String,String> revpropTable,
CommitMessageCallback handler,
CommitCallback callback)
Import a file or directory into a repository directory at head. |
long |
doSwitch(String path,
String url,
Revision revision,
Revision pegRevision,
Depth depth,
boolean depthIsSticky,
boolean ignoreExternals,
boolean allowUnverObstructions,
boolean ignoreAncestry)
Update local copy to mirror a new url. |
static void |
enableLogging(SVNClient.ClientLogLevel logLevel,
String logFilePath)
Enable logging in the JNI-code |
byte[] |
fileContent(String path,
Revision revision,
Revision pegRevision)
Retrieve the content of a file |
void |
finalize()
release the native peer (should use dispose instead) |
String |
getAdminDirectoryName()
|
void |
getChangelists(String rootPath,
Collection<String> changelists,
Depth depth,
ChangelistCallback callback)
Recursively get the paths which belong to a changelist |
String |
getConfigDirectory()
Get the configuration directory |
String |
getLastPath()
Deprecated. |
Mergeinfo |
getMergeinfo(String path,
Revision pegRevision)
Get mergeinfo for path at pegRevision . |
void |
getMergeinfoLog(Mergeinfo.LogKind kind,
String pathOrUrl,
Revision pegRevision,
String mergeSourceUrl,
Revision srcPegRevision,
boolean discoverChangedPaths,
Depth depth,
Set<String> revProps,
LogMessageCallback callback)
Retrieve either merged or eligible-to-be-merged revisions. |
Version |
getVersion()
|
String |
getVersionInfo(String path,
String trailUrl,
boolean lastChanged)
Produce a compact "version number" for a working copy |
void |
info2(String pathOrUrl,
Revision revision,
Revision pegRevision,
Depth depth,
Collection<String> changelists,
InfoCallback callback)
Retrieve information about repository or working copy items. |
boolean |
isAdminDirectory(String name)
|
void |
list(String url,
Revision revision,
Revision pegRevision,
Depth depth,
int direntFields,
boolean fetchLocks,
ListCallback callback)
Lists the directory entries of an url on the server. |
void |
lock(Set<String> paths,
String comment,
boolean force)
Lock a working copy item |
void |
logMessages(String path,
Revision pegRevision,
List<RevisionRange> revisionRanges,
boolean stopOnCopy,
boolean discoverPath,
boolean includeMergedRevisions,
Set<String> revProps,
long limit,
LogMessageCallback callback)
Retrieve the log messages for an item. |
void |
merge(String path,
Revision pegRevision,
List<RevisionRange> revisions,
String localPath,
boolean force,
Depth depth,
boolean ignoreAncestry,
boolean dryRun,
boolean recordOnly)
Merge set of revisions into a new local path. |
void |
merge(String path1,
Revision revision1,
String path2,
Revision revision2,
String localPath,
boolean force,
Depth depth,
boolean ignoreAncestry,
boolean dryRun,
boolean recordOnly)
Merge changes from two paths into a new local path. |
void |
mergeReintegrate(String path,
Revision pegRevision,
String localPath,
boolean dryRun)
Perform a reintegration merge of path into localPath. |
void |
mkdir(Set<String> paths,
boolean makeParents,
Map<String,String> revpropTable,
CommitMessageCallback handler,
CommitCallback callback)
Creates a directory directly in a repository or creates a directory on disk and schedules it for addition. |
void |
move(Set<String> srcPaths,
String destPath,
boolean force,
boolean moveAsChild,
boolean makeParents,
Map<String,String> revpropTable,
CommitMessageCallback handler,
CommitCallback callback)
Move or rename versioned paths. |
void |
notification2(ClientNotifyCallback notify)
Sets the notification callback used to send processing information back to the calling program. |
void |
password(String password)
Sets the password used for authentication. |
void |
patch(String patchPath,
String targetPath,
boolean dryRun,
int stripCount,
boolean reverse,
boolean ignoreWhitespace,
boolean removeTempfiles,
PatchCallback callback)
Apply a unidiff patch. |
void |
properties(String path,
Revision revision,
Revision pegRevision,
Depth depth,
Collection<String> changelists,
ProplistCallback callback)
Retrieves the properties of an item |
byte[] |
propertyGet(String path,
String name,
Revision revision,
Revision pegRevision)
Retrieve one property of one item |
void |
propertySetLocal(Set<String> paths,
String name,
byte[] value,
Depth depth,
Collection<String> changelists,
boolean force)
Sets one property of an item with a String value |
void |
propertySetRemote(String path,
long baseRev,
String name,
byte[] value,
CommitMessageCallback handler,
boolean force,
Map<String,String> revpropTable,
CommitCallback callback)
|
void |
relocate(String from,
String to,
String path,
boolean ignoreExternals)
Rewrite the url's in the working copy |
void |
remove(Set<String> paths,
boolean force,
boolean keepLocal,
Map<String,String> revpropTable,
CommitMessageCallback handler,
CommitCallback callback)
Sets a file for deletion. |
void |
removeFromChangelists(Set<String> paths,
Depth depth,
Collection<String> changelists)
Remove paths from a changelist |
void |
resolve(String path,
Depth depth,
ConflictResult.Choice conflictResult)
Resolves the conflicted state on a WC path (or tree). |
void |
revert(String path,
Depth depth,
Collection<String> changelists)
Reverts a file to a pristine state. |
Map<String,byte[]> |
revProperties(String path,
Revision rev)
Retrieve all revsision properties of one item |
byte[] |
revProperty(String path,
String name,
Revision rev)
Retrieve one revsision property of one item |
void |
setConfigDirectory(String configDir)
Set directory for the configuration information, taking the usual steps to ensure that Subversion's config file templates exist in the specified location.. |
void |
setConflictResolver(ConflictResolverCallback listener)
Set the conflict resolution callback. |
void |
setProgressCallback(ProgressCallback listener)
Set the progress callback. |
void |
setPrompt(UserPasswordCallback prompt)
Register callback interface to supply username and password on demand. |
void |
setRevProperty(String path,
String name,
Revision rev,
String value,
String originalValue,
boolean force)
set one revsision property of one item |
void |
status(String path,
Depth depth,
boolean onServer,
boolean getAll,
boolean noIgnore,
boolean ignoreExternals,
Collection<String> changelists,
StatusCallback callback)
List a directory or file of the working copy. |
void |
streamFileContent(String path,
Revision revision,
Revision pegRevision,
OutputStream stream)
Write the file's content to the specified output stream. |
Set<String> |
suggestMergeSources(String path,
Revision pegRevision)
Return an ordered list of suggested merge source URLs. |
void |
unlock(Set<String> paths,
boolean force)
Unlock a working copy item |
long[] |
update(Set<String> paths,
Revision revision,
Depth depth,
boolean depthIsSticky,
boolean makeParents,
boolean ignoreExternals,
boolean allowUnverObstructions)
Updates the directories or files from repository |
void |
upgrade(String path)
Recursively upgrade a working copy to a new metadata storage format. |
void |
username(String username)
Sets the username used for authentication. |
static String |
version()
Returns version information of subversion and the javahl binding |
static int |
versionMajor()
Returns the major version of the javahl binding. |
static int |
versionMicro()
Returns the micro (patch) version of the javahl binding. |
static int |
versionMinor()
Returns the minor version of the javahl binding. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected long cppAddr
Constructor Detail |
---|
public SVNClient()
Method Detail |
---|
public void dispose()
dispose
in interface ISVNClient
public void finalize()
finalize
in class Object
public Version getVersion()
getVersion
in interface ISVNClient
public String getAdminDirectoryName()
getAdminDirectoryName
in interface ISVNClient
.svn
.public boolean isAdminDirectory(String name)
isAdminDirectory
in interface ISVNClient
name
- The name of the directory to compare.
name
is that of a working copy
administrative directory.public String getLastPath()
public void status(String path, Depth depth, boolean onServer, boolean getAll, boolean noIgnore, boolean ignoreExternals, Collection<String> changelists, StatusCallback callback) throws ClientException
ISVNClient
status
in interface ISVNClient
path
- Path to explore.depth
- How deep to recurse into subdirectories.onServer
- Request status information from server.getAll
- get status for uninteresting (unchanged) files.noIgnore
- get status for normaly ignored files and directories.ignoreExternals
- if externals are ignored during statuschangelists
- changelists to filter by
ClientException
public void list(String url, Revision revision, Revision pegRevision, Depth depth, int direntFields, boolean fetchLocks, ListCallback callback) throws ClientException
ISVNClient
list
in interface ISVNClient
url
- the url to listrevision
- the revision to listpegRevision
- the revision to interpret urldepth
- the depth to recurse into subdirectoriesdirentFields
- the fields to retrievefetchLocks
- whether to fetch lock informationcallback
- the callback to receive the directory entries
ClientException
public void username(String username)
ISVNClient
username
in interface ISVNClient
username
- The username, ignored if the empty string. Set
to the empty string to clear it.ISVNClient.password(String)
public void password(String password)
ISVNClient
password
in interface ISVNClient
password
- The password, ignored if the empty string. Set
to the empty string to clear it.ISVNClient.username(String)
public void setPrompt(UserPasswordCallback prompt)
ISVNClient
--no-auth-cache
and --non-interactive
arguments
accepted by the command-line client.
setPrompt
in interface ISVNClient
prompt
- the callback interfacepublic void logMessages(String path, Revision pegRevision, List<RevisionRange> revisionRanges, boolean stopOnCopy, boolean discoverPath, boolean includeMergedRevisions, Set<String> revProps, long limit, LogMessageCallback callback) throws ClientException
ISVNClient
logMessages
in interface ISVNClient
path
- path or url to get the log message for.pegRevision
- revision to interpret pathrevisionRanges
- an array of revision ranges to showstopOnCopy
- do not continue on copy operationsdiscoverPath
- returns the paths of the changed items in the
returned objectsincludeMergedRevisions
- include log messages for revisions which
were merged.revProps
- the revprops to retrievelimit
- limit the number of log messages (if 0 or less no
limit)callback
- the object to receive the log messages
ClientException
public long checkout(String moduleName, String destPath, Revision revision, Revision pegRevision, Depth depth, boolean ignoreExternals, boolean allowUnverObstructions) throws ClientException
ISVNClient
checkout
in interface ISVNClient
moduleName
- name of the module to checkout.destPath
- destination directory for checkout.revision
- the revision to checkout.pegRevision
- the peg revision to interpret the pathdepth
- how deep to checkout files recursively.ignoreExternals
- if externals are ignored during checkoutallowUnverObstructions
- allow unversioned paths that obstruct adds
ClientException
public void notification2(ClientNotifyCallback notify)
ISVNClient
notification2
in interface ISVNClient
notify
- listener that the SVN library should call on many
file operations.public void setConflictResolver(ConflictResolverCallback listener)
ISVNClient
setConflictResolver
in interface ISVNClient
listener
- The conflict resolution callback.public void setProgressCallback(ProgressCallback listener)
ISVNClient
setProgressCallback
in interface ISVNClient
listener
- The progress callback.public void remove(Set<String> paths, boolean force, boolean keepLocal, Map<String,String> revpropTable, CommitMessageCallback handler, CommitCallback callback) throws ClientException
ISVNClient
remove
in interface ISVNClient
paths
- path or url to be deletedforce
- delete even when there are local modifications.keepLocal
- only remove the paths from the repository.revpropTable
- A string-to-string mapping of revision properties
to values which will be set if this operation
results in a commit.handler
- the commit message callback
ClientException
public void revert(String path, Depth depth, Collection<String> changelists) throws ClientException
ISVNClient
revert
in interface ISVNClient
path
- path of the file.depth
- the depth to recurse into subdirectorieschangelists
- changelists to filter by
ClientException
public void add(String path, Depth depth, boolean force, boolean noIgnores, boolean addParents) throws ClientException
ISVNClient
add
in interface ISVNClient
path
- path to be added.depth
- the depth to recurse into subdirectoriesforce
- if adding a directory and recurse true and path is a
directory, all not already managed files are added.noIgnores
- if false, don't add files or directories matching
ignore patternsaddParents
- add any intermediate parents to the working copy
ClientException
public long[] update(Set<String> paths, Revision revision, Depth depth, boolean depthIsSticky, boolean makeParents, boolean ignoreExternals, boolean allowUnverObstructions) throws ClientException
ISVNClient
update
in interface ISVNClient
paths
- array of target files.revision
- the revision number to update.
Revision.HEAD will update to the
latest revision.depth
- the depth to recursively update.depthIsSticky
- if set, and depth is not Depth.unknown
,
then also set the ambient depth value to depth.ignoreExternals
- if externals are ignored during updateallowUnverObstructions
- allow unversioned paths that obstruct adds
ClientException
public void commit(Set<String> paths, Depth depth, boolean noUnlock, boolean keepChangelist, Collection<String> changelists, Map<String,String> revpropTable, CommitMessageCallback handler, CommitCallback callback) throws ClientException
ISVNClient
commit
in interface ISVNClient
paths
- files to commit.depth
- how deep to recurse in subdirectoriesnoUnlock
- do remove any lockskeepChangelist
- keep changelist associations after the commit.changelists
- if non-null, filter paths using changelistsrevpropTable
- A string-to-string mapping of revision properties
to values which will be set if this operation
results in a commit.handler
- the commit message callback
ClientException
public void copy(List<CopySource> sources, String destPath, boolean copyAsChild, boolean makeParents, boolean ignoreExternals, Map<String,String> revpropTable, CommitMessageCallback handler, CommitCallback callback) throws ClientException
ISVNClient
copy
in interface ISVNClient
sources
- A list of CopySource
objects.destPath
- Destination path or URL.copyAsChild
- Whether to copy srcPaths
as
children of destPath
.makeParents
- Whether to create intermediate parentsignoreExternals
- Whether or not to process external definitions
as part of this operation.revpropTable
- A string-to-string mapping of revision properties
to values which will be set if this operation
results in a commit.handler
- the commit message callback, may be null
if destPath
is not a URL
ClientException
- If the copy operation fails.public void move(Set<String> srcPaths, String destPath, boolean force, boolean moveAsChild, boolean makeParents, Map<String,String> revpropTable, CommitMessageCallback handler, CommitCallback callback) throws ClientException
ISVNClient
move
in interface ISVNClient
srcPaths
- Source paths or URLs.destPath
- Destination path or URL.force
- Whether to perform the move even if local
modifications exist.moveAsChild
- Whether to move srcPaths
as
children of destPath
.makeParents
- Whether to create intermediate parents.revpropTable
- A string-to-string mapping of revision properties
to values which will be set if this operation
results in a commit.handler
- the commit message callback, may be null
if destPath
is not a URL
ClientException
- If the move operation fails.public void mkdir(Set<String> paths, boolean makeParents, Map<String,String> revpropTable, CommitMessageCallback handler, CommitCallback callback) throws ClientException
ISVNClient
mkdir
in interface ISVNClient
paths
- directories to be createdmakeParents
- Whether to create intermediate parentsrevpropTable
- A string-to-string mapping of revision properties
to values which will be set if this operation
results in a commit.handler
- the handler to use if paths contains URLs
ClientException
public void cleanup(String path) throws ClientException
ISVNClient
cleanup
in interface ISVNClient
path
- a local directory.
ClientException
public void resolve(String path, Depth depth, ConflictResult.Choice conflictResult) throws SubversionException
ISVNClient
resolve
in interface ISVNClient
path
- The path to resolve.depth
- How deep to recurse into child paths.conflictResult
- Which version to choose in the event of a
conflict.
SubversionException
- If an error occurs.public long doExport(String srcPath, String destPath, Revision revision, Revision pegRevision, boolean force, boolean ignoreExternals, Depth depth, String nativeEOL) throws ClientException
ISVNClient
doExport
in interface ISVNClient
srcPath
- the url of the repository path to be exporteddestPath
- a destination path that must not already exist.revision
- the revsion to be exportedpegRevision
- the revision to interpret srcPathforce
- set if it is ok to overwrite local filesignoreExternals
- ignore external during exportdepth
- how deep to recurse in subdirectoriesnativeEOL
- which EOL characters to use during export
ClientException
public long doSwitch(String path, String url, Revision revision, Revision pegRevision, Depth depth, boolean depthIsSticky, boolean ignoreExternals, boolean allowUnverObstructions, boolean ignoreAncestry) throws ClientException
ISVNClient
doSwitch
in interface ISVNClient
path
- the working copy pathurl
- the new url for the working copyrevision
- the new base revision of working copypegRevision
- the revision at which to interpret path
depth
- how deep to traverse into subdirectoriesdepthIsSticky
- if set, and depth is not Depth.unknown
,
then also set the ambient depth value to depth.ignoreExternals
- whether to process externals definitionsallowUnverObstructions
- allow unversioned paths that obstruct addsignoreAncestry
- whether to skip common ancestry sanity check between
path
and url
ClientException
public void doImport(String path, String url, Depth depth, boolean noIgnore, boolean ignoreUnknownNodeTypes, Map<String,String> revpropTable, CommitMessageCallback handler, CommitCallback callback) throws ClientException
ISVNClient
doImport
in interface ISVNClient
path
- the local pathurl
- the target urldepth
- depth to traverse into subdirectoriesnoIgnore
- whether to add files matched by ignore patternsignoreUnknownNodeTypes
- whether to ignore files which
the node type is not konwn, just as pipesrevpropTable
- A string-to-string mapping of revision properties
to values which will be set if this operation
results in a commit.handler
- the commit message callback
ClientException
public Set<String> suggestMergeSources(String path, Revision pegRevision) throws SubversionException
ISVNClient
suggestMergeSources
in interface ISVNClient
path
- The merge target path for which to suggest sources.pegRevision
- Peg revision used to interpret path.
ClientException
- If an error occurs.
SubversionException
public void merge(String path1, Revision revision1, String path2, Revision revision2, String localPath, boolean force, Depth depth, boolean ignoreAncestry, boolean dryRun, boolean recordOnly) throws ClientException
ISVNClient
merge
in interface ISVNClient
path1
- first path or urlrevision1
- first revisionpath2
- second path or urlrevision2
- second revisionlocalPath
- target local pathforce
- overwrite local changesdepth
- how deep to traverse into subdirectoriesignoreAncestry
- ignore if files are not relateddryRun
- do not change anythingrecordOnly
- record mergeinfo but do not run merge
ClientException
public void merge(String path, Revision pegRevision, List<RevisionRange> revisions, String localPath, boolean force, Depth depth, boolean ignoreAncestry, boolean dryRun, boolean recordOnly) throws ClientException
ISVNClient
merge
in interface ISVNClient
path
- path or urlpegRevision
- revision to interpret pathrevisions
- revisions to mergelocalPath
- target local pathforce
- overwrite local changesdepth
- how deep to traverse into subdirectoriesignoreAncestry
- ignore if files are not relateddryRun
- do not change anythingrecordOnly
- record mergeinfo but do not run merge
ClientException
public void mergeReintegrate(String path, Revision pegRevision, String localPath, boolean dryRun) throws ClientException
ISVNClient
mergeReintegrate
in interface ISVNClient
path
- path or urlpegRevision
- revision to interpret pathlocalPath
- target local pathdryRun
- do not change anything
ClientException
public Mergeinfo getMergeinfo(String path, Revision pegRevision) throws SubversionException
ISVNClient
path
at pegRevision
.
getMergeinfo
in interface ISVNClient
path
- WC path or URL.pegRevision
- peg revision at which to get the merge info for
path
.
path
.
SubversionException
public void getMergeinfoLog(Mergeinfo.LogKind kind, String pathOrUrl, Revision pegRevision, String mergeSourceUrl, Revision srcPegRevision, boolean discoverChangedPaths, Depth depth, Set<String> revProps, LogMessageCallback callback) throws ClientException
ISVNClient
getMergeinfoLog
in interface ISVNClient
kind
- kind of revisions to receivepathOrUrl
- target of mergepegRevision
- peg rev for pathOrUrlmergeSourceUrl
- the source of the mergesrcPegRevision
- peg rev for mergeSourceUrldiscoverChangedPaths
- return paths of changed itemsdepth
- the depth to recurse torevProps
- the revprops to retrievecallback
- the object to receive the log messages
ClientException
public void diff(String target1, Revision revision1, String target2, Revision revision2, String relativeToDir, String outFileName, Depth depth, Collection<String> changelists, boolean ignoreAncestry, boolean noDiffDeleted, boolean force, boolean copiesAsAdds) throws ClientException
ISVNClient
diff
in interface ISVNClient
target1
- first path or urlrevision1
- first revisiontarget2
- second path or urlrevision2
- second revisionrelativeToDir
- index path is relative to this pathoutFileName
- file name where difference are writtendepth
- how deep to traverse into subdirectoriesignoreAncestry
- ignore if files are not relatednoDiffDeleted
- no output on deleted filesforce
- diff even on binary filescopiesAsAdds
- if set, copied files will be shown in their
entirety, not as diffs from their sources
ClientException
public void diff(String target, Revision pegRevision, Revision startRevision, Revision endRevision, String relativeToDir, String outFileName, Depth depth, Collection<String> changelists, boolean ignoreAncestry, boolean noDiffDeleted, boolean force, boolean copiesAsAdds) throws ClientException
ISVNClient
diff
in interface ISVNClient
target
- path or urlpegRevision
- revision tointerpret targetstartRevision
- first Revision to compareendRevision
- second Revision to comparerelativeToDir
- index path is relative to this pathoutFileName
- file name where difference are writtendepth
- how deep to traverse into subdirectorieschangelists
- if non-null, filter paths using changelistsignoreAncestry
- ignore if files are not relatednoDiffDeleted
- no output on deleted filesforce
- diff even on binary filescopiesAsAdds
- if set, copied files will be shown in their
entirety, not as diffs from their sources
ClientException
public void diffSummarize(String target1, Revision revision1, String target2, Revision revision2, Depth depth, Collection<String> changelists, boolean ignoreAncestry, DiffSummaryCallback receiver) throws ClientException
ISVNClient
diffSummarize
in interface ISVNClient
target1
- Path or URL.revision1
- Revision of target1
.target2
- Path or URL.revision2
- Revision of target2
.depth
- how deep to recurse.changelists
- if non-null, filter paths using changelistsignoreAncestry
- Whether to ignore unrelated files during
comparison. False positives may potentially be reported if
this parameter false
, since a file might have been
modified between two revisions, but still have the same
contents.receiver
- As each is difference is found, this callback
is invoked with a description of the difference.
ClientException
public void diffSummarize(String target, Revision pegRevision, Revision startRevision, Revision endRevision, Depth depth, Collection<String> changelists, boolean ignoreAncestry, DiffSummaryCallback receiver) throws ClientException
ISVNClient
diffSummarize
in interface ISVNClient
target
- Path or URL.pegRevision
- Revision at which to interpret
target
. If Revision.Kind#unspecified
or
null
, behave identically to ISVNClient.diffSummarize(String, Revision, String, Revision, Depth,
Collection, boolean, DiffSummaryCallback)
, using
path
for both of that method's targets.startRevision
- Beginning of range for comparsion of
target
.endRevision
- End of range for comparsion of
target
.depth
- how deep to recurse.changelists
- if non-null, filter paths using changelistsignoreAncestry
- Whether to ignore unrelated files during
comparison. False positives may potentially be reported if
this parameter false
, since a file might have been
modified between two revisions, but still have the same
contents.receiver
- As each is difference is found, this callback
is invoked with a description of the difference.
ClientException
public void properties(String path, Revision revision, Revision pegRevision, Depth depth, Collection<String> changelists, ProplistCallback callback) throws ClientException
ISVNClient
properties
in interface ISVNClient
path
- the path of the itemrevision
- the revision of the itempegRevision
- the revision to interpret pathdepth
- the depth to recurse into subdirectorieschangelists
- changelists to filter bycallback
- the callback to use to return the properties
ClientException
public void propertySetLocal(Set<String> paths, String name, byte[] value, Depth depth, Collection<String> changelists, boolean force) throws ClientException
ISVNClient
propertySetLocal
in interface ISVNClient
paths
- paths of the itemsname
- name of the propertyvalue
- new value of the property. Set value to
null
to delete a propertydepth
- the depth to recurse into subdirectorieschangelists
- changelists to filter byforce
- do not check if the value is valid
ClientException
public void propertySetRemote(String path, long baseRev, String name, byte[] value, CommitMessageCallback handler, boolean force, Map<String,String> revpropTable, CommitCallback callback) throws ClientException
propertySetRemote
in interface ISVNClient
ClientException
public byte[] revProperty(String path, String name, Revision rev) throws ClientException
ISVNClient
revProperty
in interface ISVNClient
path
- path of the itemname
- name of the propertyrev
- revision to retrieve
ClientException
public Map<String,byte[]> revProperties(String path, Revision rev) throws ClientException
ISVNClient
revProperties
in interface ISVNClient
path
- path of the itemrev
- revision to retrieve
ClientException
public void setRevProperty(String path, String name, Revision rev, String value, String originalValue, boolean force) throws ClientException
ISVNClient
setRevProperty
in interface ISVNClient
path
- path of the itemname
- name of the propertyrev
- revision to retrievevalue
- value of the propertyoriginalValue
- the original value of the property.force
- use force to set
ClientException
public byte[] propertyGet(String path, String name, Revision revision, Revision pegRevision) throws ClientException
ISVNClient
propertyGet
in interface ISVNClient
path
- path of the itemname
- name of propertyrevision
- revision of the itempegRevision
- the revision to interpret path
ClientException
public byte[] fileContent(String path, Revision revision, Revision pegRevision) throws ClientException
ISVNClient
fileContent
in interface ISVNClient
path
- the path of the filerevision
- the revision to retrievepegRevision
- the revision to interpret path
ClientException
public void streamFileContent(String path, Revision revision, Revision pegRevision, OutputStream stream) throws ClientException
ISVNClient
streamFileContent
in interface ISVNClient
path
- the path of the filerevision
- the revision to retrievepegRevision
- the revision at which to interpret the pathstream
- the stream to write the file's content to
ClientException
PipedOutputStream
,
PipedInputStream
public void relocate(String from, String to, String path, boolean ignoreExternals) throws ClientException
ISVNClient
relocate
in interface ISVNClient
from
- old urlto
- new urlpath
- working copy pathignoreExternals
- if externals are ignored during relocate
ClientException
public void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean ignoreMimeType, boolean includeMergedRevisions, BlameCallback callback) throws ClientException
ISVNClient
blame
in interface ISVNClient
path
- the pathpegRevision
- the revision to interpret the pathrevisionStart
- the first revision to showrevisionEnd
- the last revision to showignoreMimeType
- whether or not to ignore the mime-typeincludeMergedRevisions
- whether or not to include extra merge
informationcallback
- callback to receive the file content and the other
information
ClientException
public void setConfigDirectory(String configDir) throws ClientException
ISVNClient
null
value will override lookup of
configuration in the registry.
setConfigDirectory
in interface ISVNClient
configDir
- Path of the directory, or null
for the platform's default.
ClientException
public String getConfigDirectory() throws ClientException
ISVNClient
getConfigDirectory
in interface ISVNClient
ClientException
public void cancelOperation() throws ClientException
ISVNClient
cancelOperation
in interface ISVNClient
ClientException
public void addToChangelist(Set<String> paths, String changelist, Depth depth, Collection<String> changelists) throws ClientException
ISVNClient
addToChangelist
in interface ISVNClient
paths
- paths to add to the changelistchangelist
- changelist namedepth
- the depth to recursechangelists
- changelists to filter by
ClientException
public void removeFromChangelists(Set<String> paths, Depth depth, Collection<String> changelists) throws ClientException
ISVNClient
removeFromChangelists
in interface ISVNClient
paths
- paths to remove from the changelistdepth
- the depth to recursechangelists
- changelists to filter by
ClientException
public void getChangelists(String rootPath, Collection<String> changelists, Depth depth, ChangelistCallback callback) throws ClientException
ISVNClient
getChangelists
in interface ISVNClient
rootPath
- the wc path under which to checkchangelists
- the changelists to look underdepth
- the depth to recursecallback
- the callback to return the changelists through
ClientException
public String getVersionInfo(String path, String trailUrl, boolean lastChanged) throws ClientException
ISVNClient
getVersionInfo
in interface ISVNClient
path
- path of the working copytrailUrl
- to detect switches of the whole working copylastChanged
- last changed rather than current revisions
ClientException
public void upgrade(String path) throws ClientException
ISVNClient
upgrade
in interface ISVNClient
path
- path of the working copy
ClientException
public static void enableLogging(SVNClient.ClientLogLevel logLevel, String logFilePath)
logLevel
- the level of information to log (See
ClientLogLevel)logFilePath
- path of the log filepublic static String version()
public static int versionMajor()
public static int versionMinor()
public static int versionMicro()
public void lock(Set<String> paths, String comment, boolean force) throws ClientException
ISVNClient
lock
in interface ISVNClient
paths
- path of the itemforce
- break an existing lock
ClientException
public void unlock(Set<String> paths, boolean force) throws ClientException
ISVNClient
unlock
in interface ISVNClient
paths
- path of the itemforce
- break an existing lock
ClientException
public void info2(String pathOrUrl, Revision revision, Revision pegRevision, Depth depth, Collection<String> changelists, InfoCallback callback) throws ClientException
ISVNClient
info2
in interface ISVNClient
pathOrUrl
- the path or the url of the itemrevision
- the revision of the item to returnpegRevision
- the revision to interpret pathOrUrldepth
- the depth to recursechangelists
- if non-null, filter paths using changelistscallback
- a callback to receive the infos retrieved
ClientException
public void patch(String patchPath, String targetPath, boolean dryRun, int stripCount, boolean reverse, boolean ignoreWhitespace, boolean removeTempfiles, PatchCallback callback) throws ClientException
ISVNClient
patch
in interface ISVNClient
patchPath
- the path of the patchtargetPath
- the path to be patcheddryRun
- whether to actually modify the local contentstripCount
- how many leading path components should be removedreverse
- whether to reverse the patchignoreWhitespace
- whether to ignore whitespaceremoveTempfiles
- whether to remove temp filescallback
- a handler to receive information as files are patched
ClientException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |