diff options
Diffstat (limited to 'subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java')
-rw-r--r-- | subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java | 232 |
1 files changed, 197 insertions, 35 deletions
diff --git a/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java b/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java index 1af9102..4a11889 100644 --- a/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java +++ b/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java @@ -32,6 +32,7 @@ import java.io.FileNotFoundException; import java.io.ByteArrayOutputStream; import java.util.Collection; +import java.util.Collections; import java.util.Set; import java.util.List; import java.util.Map; @@ -52,7 +53,7 @@ public class SVNClient implements ISVNClient } /** - * Standard empty contructor, builds just the native peer. + * Standard empty constructor, builds just the native peer. */ public SVNClient() { @@ -103,6 +104,11 @@ public class SVNClient implements ISVNClient return NativeResources.getVersion(); } + public RuntimeVersion getRuntimeVersion() + { + return NativeResources.getRuntimeVersion(); + } + public native VersionExtended getVersionExtended(boolean verbose); public native String getAdminDirectoryName(); @@ -112,15 +118,29 @@ public class SVNClient implements ISVNClient /** * @deprecated */ + @Deprecated public native String getLastPath(); - public native void status(String path, Depth depth, boolean onServer, + public native void status(String path, Depth depth, + boolean onServer, boolean onDisk, boolean getAll, boolean noIgnore, - boolean ignoreExternals, + boolean ignoreExternals, boolean depthAsSticky, Collection<String> changelists, StatusCallback callback) throws ClientException; + @Deprecated + public void status(String path, Depth depth, boolean onServer, + boolean getAll, boolean noIgnore, + boolean ignoreExternals, + Collection<String> changelists, + StatusCallback callback) + throws ClientException + { + status(path, depth, onServer, true, getAll, noIgnore, + ignoreExternals, false, changelists, callback); + } + public native void list(String url, Revision revision, Revision pegRevision, Depth depth, int direntFields, boolean fetchLocks, ListCallback callback) @@ -130,8 +150,13 @@ public class SVNClient implements ISVNClient public native void password(String password); + public native void setPrompt(AuthnCallback prompt); + + @SuppressWarnings("deprecation") public native void setPrompt(UserPasswordCallback prompt); + public native void setTunnelAgent(TunnelAgent tunnelAgent); + public native void logMessages(String path, Revision pegRevision, List<RevisionRange> revisionRanges, boolean stopOnCopy, boolean discoverPath, @@ -151,14 +176,14 @@ public class SVNClient implements ISVNClient clientContext.notify = notify; } - public void setConflictResolver(ConflictResolverCallback listener) + public void setConflictResolver(ConflictResolverCallback resolver) { - clientContext.resolver = listener; + clientContext.resolver = resolver; } - public void setProgressCallback(ProgressCallback listener) + public void setProgressCallback(ProgressCallback progress) { - clientContext.listener = listener; + clientContext.setProgressCallback(progress); } public native void remove(Set<String> paths, boolean force, @@ -167,10 +192,26 @@ public class SVNClient implements ISVNClient CommitMessageCallback handler, CommitCallback callback) throws ClientException; - public native void revert(String path, Depth depth, - Collection<String> changelists) + public native void revert(Set<String> paths, Depth depth, + Collection<String> changelists, + boolean clearChangelists, + boolean metadataOnly) throws ClientException; + public void revert(Set<String> paths, Depth depth, + Collection<String> changelists) + throws ClientException + { + revert(paths, depth, changelists, false, false); + } + + public void revert(String path, Depth depth, + Collection<String> changelists) + throws ClientException + { + revert(Collections.singleton(path), depth, changelists, false, false); + } + public native void add(String path, Depth depth, boolean force, boolean noIgnores, boolean noAutoProps, boolean addParents) @@ -199,11 +240,24 @@ public class SVNClient implements ISVNClient public native void copy(List<CopySource> sources, String destPath, boolean copyAsChild, boolean makeParents, - boolean ignoreExternals, + boolean ignoreExternals, boolean metadataOnly, + boolean pinExternals, + Map<String, List<ExternalItem>> externalsToPin, Map<String, String> revpropTable, CommitMessageCallback handler, CommitCallback callback) throws 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 + { + copy(sources, destPath, copyAsChild, makeParents, ignoreExternals, + false, false, null, revpropTable, handler, callback); + } + public native void move(Set<String> srcPaths, String destPath, boolean force, boolean moveAsChild, boolean makeParents, boolean metadataOnly, @@ -213,6 +267,7 @@ public class SVNClient implements ISVNClient throws ClientException; /** @deprecated */ + @Deprecated public void move(Set<String> srcPaths, String destPath, boolean force, boolean moveAsChild, boolean makeParents, @@ -229,8 +284,18 @@ public class SVNClient implements ISVNClient CommitMessageCallback handler, CommitCallback callback) throws ClientException; - public native void cleanup(String path) - throws ClientException; + public native void cleanup(String path, + boolean breakLocks, + boolean fixRecordedTimestamps, + boolean clearDavCache, + boolean removeUnusedPristines, + boolean includeExternals) + throws ClientException; + + public void cleanup(String path) throws ClientException + { + cleanup(path, true, true, true, true, false); + } public native void resolve(String path, Depth depth, ConflictResult.Choice conflictResult) @@ -239,9 +304,20 @@ public class SVNClient implements ISVNClient public native long doExport(String srcPath, String destPath, Revision revision, Revision pegRevision, boolean force, boolean ignoreExternals, + boolean ignorKeywords, Depth depth, String nativeEOL) throws ClientException; + public long doExport(String srcPath, String destPath, + Revision revision, Revision pegRevision, + boolean force, boolean ignoreExternals, + Depth depth, String nativeEOL) + throws ClientException + { + return doExport(srcPath, destPath, revision, pegRevision, + force, ignoreExternals, false, depth, nativeEOL); + } + public native long doSwitch(String path, String url, Revision revision, Revision pegRevision, Depth depth, boolean depthIsSticky, boolean ignoreExternals, @@ -276,11 +352,24 @@ public class SVNClient implements ISVNClient public native void merge(String path1, Revision revision1, String path2, Revision revision2, String localPath, boolean force, Depth depth, - boolean ignoreMergeinfo, boolean diffIgnoreAncestry, - boolean dryRun, boolean recordOnly) + boolean ignoreMergeinfo, + boolean diffIgnoreAncestry, + boolean dryRun, boolean allowMixedRev, + boolean recordOnly) throws ClientException; public void merge(String path1, Revision revision1, String path2, + Revision revision2, String localPath, + boolean force, Depth depth, + boolean ignoreMergeinfo, boolean diffIgnoreAncestry, + boolean dryRun, boolean recordOnly) + throws ClientException + { + merge(path1, revision1, path2, revision2, localPath, force, depth, + ignoreMergeinfo, diffIgnoreAncestry, dryRun, true, recordOnly); + } + + public void merge(String path1, Revision revision1, String path2, Revision revision2, String localPath, boolean force, Depth depth, boolean ignoreAncestry, boolean dryRun, @@ -294,12 +383,25 @@ public class SVNClient implements ISVNClient public native void merge(String path, Revision pegRevision, List<RevisionRange> revisions, String localPath, boolean force, Depth depth, - boolean ignoreMergeinfo, boolean diffIgnoreAncestry, - boolean dryRun, boolean recordOnly) + boolean ignoreMergeinfo, + boolean diffIgnoreAncestry, + boolean dryRun, boolean allowMixedRev, + boolean recordOnly) throws ClientException; public void merge(String path, Revision pegRevision, List<RevisionRange> revisions, String localPath, + boolean force, Depth depth, + boolean ignoreMergeinfo, boolean diffIgnoreAncestry, + boolean dryRun, boolean recordOnly) + throws ClientException + { + merge(path, pegRevision, revisions, localPath, force, depth, + ignoreMergeinfo, diffIgnoreAncestry, dryRun, true, recordOnly); + } + + public void merge(String path, Revision pegRevision, + List<RevisionRange> revisions, String localPath, boolean force, Depth depth, boolean ignoreAncestry, boolean dryRun, boolean recordOnly) throws ClientException @@ -310,6 +412,7 @@ public class SVNClient implements ISVNClient /** @deprecated */ + @Deprecated public native void mergeReintegrate(String path, Revision pegRevision, String localPath, boolean dryRun) throws ClientException; @@ -539,24 +642,46 @@ public class SVNClient implements ISVNClient { ByteArrayOutputStream stream = new ByteArrayOutputStream(); - streamFileContent(path, revision, pegRevision, stream); + streamFileContent(path, revision, pegRevision, true, false, stream); return stream.toByteArray(); } - public native void streamFileContent(String path, Revision revision, - Revision pegRevision, - OutputStream stream) + public native Map<String, byte[]> + streamFileContent(String path, + Revision revision, Revision pegRevision, + boolean expandKeywords, boolean returnProps, + OutputStream stream) throws ClientException; + public void streamFileContent(String path, Revision revision, + Revision pegRevision, + OutputStream stream) + throws ClientException + { + streamFileContent(path, revision, pegRevision, true, false, stream); + } + public native void relocate(String from, String to, String path, boolean ignoreExternals) throws ClientException; + public void blame(String path, Revision pegRevision, + Revision revisionStart, + Revision revisionEnd, boolean ignoreMimeType, + boolean includeMergedRevisions, + BlameCallback callback) + throws ClientException + { + blame(path, pegRevision, revisionStart, revisionEnd, ignoreMimeType, + includeMergedRevisions, callback, null); + } + public native void blame(String path, Revision pegRevision, Revision revisionStart, Revision revisionEnd, boolean ignoreMimeType, boolean includeMergedRevisions, - BlameCallback callback) + BlameCallback callback, + DiffOptions options) throws ClientException; public native void setConfigDirectory(String configDir) @@ -565,6 +690,12 @@ public class SVNClient implements ISVNClient public native String getConfigDirectory() throws ClientException; + public native void setConfigEventHandler(ConfigEvent configHandler) + throws ClientException; + + public native ConfigEvent getConfigEventHandler() + throws ClientException; + public native void cancelOperation() throws ClientException; @@ -649,28 +780,65 @@ public class SVNClient implements ISVNClient public native void unlock(Set<String> paths, boolean force) throws ClientException; - public native void info2(String pathOrUrl, Revision revision, - Revision pegRevision, Depth depth, - Collection<String> changelists, - InfoCallback callback) + public native void info(String pathOrUrl, Revision revision, + Revision pegRevision, Depth depth, + boolean fetchExcluded, boolean fetchActualOnly, + boolean includeExternals, + Collection<String> changelists, + InfoCallback callback) throws ClientException; + public void info2(String pathOrUrl, Revision revision, + Revision pegRevision, Depth depth, + Collection<String> changelists, + InfoCallback callback) + throws ClientException + { + info(pathOrUrl, revision, pegRevision, depth, + false, true, false, changelists, callback); + } + public native void patch(String patchPath, String targetPath, boolean dryRun, int stripCount, boolean reverse, boolean ignoreWhitespace, boolean removeTempfiles, PatchCallback callback) throws ClientException; + public native void vacuum(String wcPath, + boolean removeUnversionedItems, + boolean removeIgnoredItems, + boolean fixRecordedTimestamps, + boolean removeUnusedPristines, + boolean includeExternals) + throws ClientException; + + public ISVNRemote openRemoteSession(String pathOrUrl) + throws ClientException, SubversionException + { + return nativeOpenRemoteSession(pathOrUrl, 1); + } + + public ISVNRemote openRemoteSession(String pathOrUrl, int retryAttempts) + throws ClientException, SubversionException + { + if (retryAttempts <= 0) + throw new IllegalArgumentException( + "retryAttempts must be positive"); + return nativeOpenRemoteSession(pathOrUrl, retryAttempts); + } + + private native ISVNRemote nativeOpenRemoteSession( + String pathOrUrl, int retryAttempts) + throws ClientException, SubversionException; + /** * A private class to hold the contextual information required to * persist in this object, such as notification handlers. */ - private class ClientContext - implements ClientNotifyCallback, ProgressCallback, - ConflictResolverCallback + private class ClientContext extends OperationContext + implements ClientNotifyCallback, ConflictResolverCallback { public ClientNotifyCallback notify = null; - public ProgressCallback listener = null; public ConflictResolverCallback resolver = null; public void onNotify(ClientNotifyInformation notifyInfo) @@ -679,12 +847,6 @@ public class SVNClient implements ISVNClient notify.onNotify(notifyInfo); } - public void onProgress(ProgressEvent event) - { - if (listener != null) - listener.onProgress(event); - } - public ConflictResult resolve(ConflictDescriptor conflict) throws SubversionException { |