You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pr...@apache.org on 2013/03/18 10:35:29 UTC
svn commit: r1457684 [2/22] - in /subversion/branches/verify-keep-going: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/ notes/
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/ subve...
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNClient.cpp?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNClient.cpp Mon Mar 18 09:35:24 2013
@@ -35,6 +35,7 @@
#include "Revision.h"
#include "OutputStream.h"
#include "RevisionRange.h"
+#include "VersionExtended.h"
#include "BlameCallback.h"
#include "ProplistCallback.h"
#include "LogMessageCallback.h"
@@ -50,6 +51,7 @@
#include "EnumMapper.h"
#include "StringArray.h"
#include "RevpropTable.h"
+#include "DiffOptions.h"
#include "CreateJ.h"
#include "svn_auth.h"
#include "svn_dso.h"
@@ -93,6 +95,41 @@ void SVNClient::dispose(jobject jthis)
SVNBase::dispose(jthis, &fid, JAVA_PACKAGE"/SVNClient");
}
+jobject SVNClient::getVersionExtended(bool verbose)
+{
+ JNIEnv *const env = JNIUtil::getEnv();
+
+ jclass clazz = env->FindClass(JAVA_PACKAGE"/types/VersionExtended");
+ if (JNIUtil::isJavaExceptionThrown())
+ return NULL;
+
+ static volatile jmethodID ctor = 0;
+ if (!ctor)
+ {
+ ctor = env->GetMethodID(clazz, "<init>", "()V");
+ if (JNIUtil::isJavaExceptionThrown())
+ return NULL;
+ }
+
+ static volatile jfieldID fid = 0;
+ if (!fid)
+ {
+ fid = env->GetFieldID(clazz, "cppAddr", "J");
+ if (JNIUtil::isJavaExceptionThrown())
+ return NULL;
+ }
+
+ jobject j_ext_info = env->NewObject(clazz, ctor);
+ if (JNIUtil::isJavaExceptionThrown())
+ return NULL;
+
+ VersionExtended *vx = new VersionExtended(verbose);
+ env->SetLongField(j_ext_info, fid, vx->getCppAddr());
+
+ env->DeleteLocalRef(clazz);
+ return j_ext_info;
+}
+
jstring SVNClient::getAdminDirectoryName()
{
SVN::Pool subPool(pool);
@@ -133,12 +170,13 @@ void SVNClient::list(const char *url, Re
Path urlPath(url, subPool);
SVN_JNI_ERR(urlPath.error_occurred(), );
- SVN_JNI_ERR(svn_client_list2(urlPath.c_str(),
+ SVN_JNI_ERR(svn_client_list3(urlPath.c_str(),
pegRevision.revision(),
revision.revision(),
depth,
direntFields,
fetchLocks,
+ FALSE, // include_externals
ListCallback::callback,
callback,
ctx, subPool.getPool()), );
@@ -316,7 +354,8 @@ void SVNClient::revert(const char *path,
}
void SVNClient::add(const char *path,
- svn_depth_t depth, bool force, bool no_ignore,
+ svn_depth_t depth, bool force,
+ bool no_ignore, bool no_autoprops,
bool add_parents)
{
SVN::Pool subPool(pool);
@@ -329,8 +368,8 @@ void SVNClient::add(const char *path,
if (ctx == NULL)
return;
- SVN_JNI_ERR(svn_client_add4(intPath.c_str(), depth, force,
- no_ignore, add_parents, ctx,
+ SVN_JNI_ERR(svn_client_add5(intPath.c_str(), depth, force,
+ no_ignore, no_autoprops, add_parents, ctx,
subPool.getPool()), );
}
@@ -388,8 +427,11 @@ void SVNClient::commit(Targets &targets,
if (ctx == NULL)
return;
- SVN_JNI_ERR(svn_client_commit5(targets2, depth,
- noUnlock, keepChangelist, TRUE,
+ SVN_JNI_ERR(svn_client_commit6(targets2, depth,
+ noUnlock, keepChangelist,
+ TRUE,
+ FALSE, // include_file_externals
+ FALSE, // include_dir_externals
changelists.array(subPool),
revprops.hash(subPool),
CommitCallback::callback, callback,
@@ -428,8 +470,8 @@ void SVNClient::copy(CopySources ©So
void SVNClient::move(Targets &srcPaths, const char *destPath,
CommitMessage *message, bool force, bool moveAsChild,
- bool makeParents, RevpropTable &revprops,
- CommitCallback *callback)
+ bool makeParents, bool metadataOnly, bool allowMixRev,
+ RevpropTable &revprops, CommitCallback *callback)
{
SVN::Pool subPool(pool);
@@ -443,9 +485,12 @@ void SVNClient::move(Targets &srcPaths,
if (ctx == NULL)
return;
- SVN_JNI_ERR(svn_client_move6((apr_array_header_t *) srcs,
+ SVN_JNI_ERR(svn_client_move7((apr_array_header_t *) srcs,
destinationPath.c_str(), moveAsChild,
- makeParents, revprops.hash(subPool),
+ makeParents,
+ allowMixRev,
+ metadataOnly,
+ revprops.hash(subPool),
CommitCallback::callback, callback, ctx,
subPool.getPool()), );
}
@@ -566,7 +611,8 @@ jlong SVNClient::doSwitch(const char *pa
void SVNClient::doImport(const char *path, const char *url,
CommitMessage *message, svn_depth_t depth,
- bool noIgnore, bool ignoreUnknownNodeTypes,
+ bool noIgnore, bool noAutoProps,
+ bool ignoreUnknownNodeTypes,
RevpropTable &revprops,
ImportFilterCallback *ifCallback,
CommitCallback *commitCallback)
@@ -584,7 +630,7 @@ void SVNClient::doImport(const char *pat
return;
SVN_JNI_ERR(svn_client_import5(intPath.c_str(), intUrl.c_str(), depth,
- noIgnore, FALSE, ignoreUnknownNodeTypes,
+ noIgnore, noAutoProps, ignoreUnknownNodeTypes,
revprops.hash(subPool),
ImportFilterCallback::callback, ifCallback,
CommitCallback::callback, commitCallback,
@@ -849,7 +895,8 @@ jbyteArray SVNClient::propertyGet(const
void SVNClient::properties(const char *path, Revision &revision,
Revision &pegRevision, svn_depth_t depth,
- StringArray &changelists, ProplistCallback *callback)
+ StringArray &changelists,
+ ProplistCallback *callback)
{
SVN::Pool subPool(pool);
SVN_JNI_NULL_PTR_EX(path, "path", );
@@ -860,13 +907,12 @@ void SVNClient::properties(const char *p
if (ctx == NULL)
return;
- SVN_JNI_ERR(svn_client_proplist3(intPath.c_str(), pegRevision.revision(),
+ SVN_JNI_ERR(svn_client_proplist4(intPath.c_str(), pegRevision.revision(),
revision.revision(), depth,
changelists.array(subPool),
+ callback->inherited(),
ProplistCallback::callback, callback,
ctx, subPool.getPool()), );
-
- return;
}
void SVNClient::propertySetLocal(Targets &targets, const char *name,
@@ -935,7 +981,8 @@ void SVNClient::diff(const char *target1
OutputStream &outputStream, svn_depth_t depth,
StringArray &changelists,
bool ignoreAncestry, bool noDiffDelete, bool force,
- bool showCopiesAsAdds, bool ignoreProps, bool propsOnly)
+ bool showCopiesAsAdds, bool ignoreProps, bool propsOnly,
+ DiffOptions const& options)
{
SVN::Pool subPool(pool);
const char *c_relToDir = relativeToDir ?
@@ -955,9 +1002,7 @@ void SVNClient::diff(const char *target1
Path path1(target1, subPool);
SVN_JNI_ERR(path1.error_occurred(), );
- // We don't use any options to diff.
- apr_array_header_t *diffOptions = apr_array_make(subPool.getPool(),
- 0, sizeof(char *));
+ apr_array_header_t *diffOptions = options.optionsArray(subPool);
if (pegRevision)
{
@@ -975,7 +1020,7 @@ void SVNClient::diff(const char *target1
force,
ignoreProps,
propsOnly,
- FALSE, /* use_git_diff_format */
+ options.useGitDiffFormat(),
SVN_APR_LOCALE_CHARSET,
outputStream.getStream(subPool),
NULL /* error file */,
@@ -1004,7 +1049,7 @@ void SVNClient::diff(const char *target1
force,
ignoreProps,
propsOnly,
- FALSE, /* use_git_diff_format */
+ options.useGitDiffFormat(),
SVN_APR_LOCALE_CHARSET,
outputStream.getStream(subPool),
NULL /* error stream */,
@@ -1020,11 +1065,12 @@ void SVNClient::diff(const char *target1
const char *relativeToDir, OutputStream &outputStream,
svn_depth_t depth, StringArray &changelists,
bool ignoreAncestry, bool noDiffDelete, bool force,
- bool showCopiesAsAdds, bool ignoreProps, bool propsOnly)
+ bool showCopiesAsAdds, bool ignoreProps, bool propsOnly,
+ DiffOptions const& options)
{
diff(target1, revision1, target2, revision2, NULL, relativeToDir,
outputStream, depth, changelists, ignoreAncestry, noDiffDelete, force,
- showCopiesAsAdds, ignoreProps, propsOnly);
+ showCopiesAsAdds, ignoreProps, propsOnly, options);
}
void SVNClient::diff(const char *target, Revision &pegRevision,
@@ -1032,12 +1078,13 @@ void SVNClient::diff(const char *target,
const char *relativeToDir, OutputStream &outputStream,
svn_depth_t depth, StringArray &changelists,
bool ignoreAncestry, bool noDiffDelete, bool force,
- bool showCopiesAsAdds, bool ignoreProps, bool propsOnly)
+ bool showCopiesAsAdds, bool ignoreProps, bool propsOnly,
+ DiffOptions const& options)
{
diff(target, startRevision, NULL, endRevision, &pegRevision,
relativeToDir, outputStream, depth, changelists,
ignoreAncestry, noDiffDelete, force, showCopiesAsAdds,
- ignoreProps, propsOnly);
+ ignoreProps, propsOnly, options);
}
void
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNClient.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNClient.h?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNClient.h (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNClient.h Mon Mar 18 09:35:24 2013
@@ -54,6 +54,7 @@ class ChangelistCallback;
class CommitMessage;
class StringArray;
class RevpropTable;
+class DiffOptions;
#include "svn_types.h"
#include "svn_client.h"
#include "SVNBase.h"
@@ -107,7 +108,8 @@ class SVNClient :public SVNBase
void mergeReintegrate(const char *path, Revision &pegRevision,
const char *localPath, bool dryRun);
void doImport(const char *path, const char *url, CommitMessage *message,
- svn_depth_t depth, bool noIgnore, bool ignoreUnknownNodeTypes,
+ svn_depth_t depth, bool noIgnore, bool noAutoProps,
+ bool ignoreUnknownNodeTypes,
RevpropTable &revprops, ImportFilterCallback *ifCallback,
CommitCallback *commitCallback);
jlong doSwitch(const char *path, const char *url, Revision &revision,
@@ -125,7 +127,8 @@ class SVNClient :public SVNBase
RevpropTable &revprops, CommitCallback *callback);
void move(Targets &srcPaths, const char *destPath,
CommitMessage *message, bool force, bool moveAsChild,
- bool makeParents, RevpropTable &revprops, CommitCallback *callback);
+ bool makeParents, bool metadataOnly, bool allowMixRev,
+ RevpropTable &revprops, CommitCallback *callback);
void copy(CopySources ©Sources, const char *destPath,
CommitMessage *message, bool copyAsChild, bool makeParents,
bool ignoreExternals, RevpropTable &revprops,
@@ -137,8 +140,8 @@ class SVNClient :public SVNBase
jlongArray update(Targets &targets, Revision &revision, svn_depth_t depth,
bool depthIsSticky, bool makeParents, bool ignoreExternals,
bool allowUnverObstructions);
- void add(const char *path, svn_depth_t depth, bool force, bool no_ignore,
- bool add_parents);
+ void add(const char *path, svn_depth_t depth, bool force,
+ bool no_ignore, bool no_autoprops, bool add_parents);
void revert(const char *path, svn_depth_t depth, StringArray &changelists);
void remove(Targets &targets, CommitMessage *message, bool force,
bool keep_local, RevpropTable &revprops,
@@ -151,6 +154,7 @@ class SVNClient :public SVNBase
bool discoverPaths, bool includeMergedRevisions,
StringArray &revProps,
long limit, LogMessageCallback *callback);
+ jobject getVersionExtended(bool verbose);
jstring getAdminDirectoryName();
jboolean isAdminDirectory(const char *name);
void addToChangelist(Targets &srcPaths, const char *changelist,
@@ -180,13 +184,15 @@ class SVNClient :public SVNBase
const char *relativeToDir, OutputStream &outputStream,
svn_depth_t depth, StringArray &changelists,
bool ignoreAncestry, bool noDiffDelete, bool force,
- bool showCopiesAsAdds, bool ignoreProps, bool propsOnly);
+ bool showCopiesAsAdds, bool ignoreProps, bool propsOnly,
+ DiffOptions const& options);
void diff(const char *target, Revision &pegevision,
Revision &startRevision, Revision &endRevision,
const char *relativeToDir, OutputStream &outputStream,
svn_depth_t depth, StringArray &changelists,
bool ignoreAncestry, bool noDiffDelete, bool force,
- bool showCopiesAsAdds, bool ignoreProps, bool propsOnly);
+ bool showCopiesAsAdds, bool ignoreProps, bool propsOnly,
+ DiffOptions const& options);
void diffSummarize(const char *target1, Revision &revision1,
const char *target2, Revision &revision2,
svn_depth_t depth, StringArray &changelists,
@@ -215,7 +221,8 @@ class SVNClient :public SVNBase
OutputStream &outputStream, svn_depth_t depth,
StringArray &changelists,
bool ignoreAncestry, bool noDiffDelete, bool force,
- bool showCopiesAsAdds, bool ignoreProps, bool propsOnly);
+ bool showCopiesAsAdds, bool ignoreProps, bool propsOnly,
+ DiffOptions const& options);
Path m_lastPath;
ClientContext context;
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNRepos.cpp?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNRepos.cpp (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNRepos.cpp Mon Mar 18 09:35:24 2013
@@ -177,7 +177,7 @@ void SVNRepos::deltify(File &path, Revis
}
void SVNRepos::dump(File &path, OutputStream &dataOut,
- Revision &revsionStart, Revision &revisionEnd,
+ Revision &revisionStart, Revision &revisionEnd,
bool incremental, bool useDeltas,
ReposNotifyCallback *notifyCallback)
{
@@ -199,9 +199,9 @@ void SVNRepos::dump(File &path, OutputSt
SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool.getPool()), );
/* ### We only handle revision numbers right now, not dates. */
- if (revsionStart.revision()->kind == svn_opt_revision_number)
- lower = revsionStart.revision()->value.number;
- else if (revsionStart.revision()->kind == svn_opt_revision_head)
+ if (revisionStart.revision()->kind == svn_opt_revision_number)
+ lower = revisionStart.revision()->value.number;
+ else if (revisionStart.revision()->kind == svn_opt_revision_head)
lower = youngest;
else
lower = SVN_INVALID_REVNUM;
@@ -315,6 +315,8 @@ void SVNRepos::listUnusedDBLogs(File &pa
void SVNRepos::load(File &path,
InputStream &dataIn,
+ Revision &revisionStart,
+ Revision &revisionEnd,
bool ignoreUUID,
bool forceUUID,
bool usePreCommitHook,
@@ -324,6 +326,7 @@ void SVNRepos::load(File &path,
{
SVN::Pool requestPool;
svn_repos_t *repos;
+ svn_revnum_t lower = SVN_INVALID_REVNUM, upper = SVN_INVALID_REVNUM;
enum svn_repos_load_uuid uuid_action = svn_repos_load_uuid_default;
if (ignoreUUID)
uuid_action = svn_repos_load_uuid_ignore;
@@ -336,11 +339,25 @@ void SVNRepos::load(File &path,
return;
}
+ /* ### We only handle revision numbers right now, not dates. */
+ if (revisionStart.revision()->kind == svn_opt_revision_number)
+ lower = revisionStart.revision()->value.number;
+ if (revisionEnd.revision()->kind == svn_opt_revision_number)
+ upper = revisionEnd.revision()->value.number;
+ if (upper < lower
+ && lower != SVN_INVALID_REVNUM
+ && upper != SVN_INVALID_REVNUM)
+ {
+ SVN_JNI_ERR(svn_error_create
+ (SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+ _("First revision cannot be higher than second")), );
+ }
+
SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
NULL, requestPool.getPool()), );
- SVN_JNI_ERR(svn_repos_load_fs3(repos, dataIn.getStream(requestPool),
- uuid_action, relativePath,
+ SVN_JNI_ERR(svn_repos_load_fs4(repos, dataIn.getStream(requestPool),
+ lower, upper, uuid_action, relativePath,
usePreCommitHook, usePostCommitHook,
FALSE,
notifyCallback != NULL
@@ -408,6 +425,28 @@ jlong SVNRepos::recover(File &path, Repo
return youngest_rev;
}
+void SVNRepos::freeze(jobjectArray jpaths, ReposFreezeAction* action)
+{
+ JNIEnv *env = JNIUtil::getEnv();
+ SVN::Pool subPool(pool);
+ const jsize num_paths = env->GetArrayLength(jpaths);
+
+ apr_array_header_t *paths = apr_array_make(subPool.getPool(), num_paths,
+ sizeof(const char*));
+ for (jsize i = 0; i < num_paths; ++i)
+ {
+ jobject obj = env->GetObjectArrayElement(jpaths, i);
+ APR_ARRAY_PUSH(paths, const char*) =
+ apr_pstrdup(subPool.getPool(), File(obj).getAbsPath());
+ env->DeleteLocalRef(obj);
+ }
+
+ SVN_JNI_ERR(svn_repos_freeze(paths, action->callback, action,
+ subPool.getPool()),
+ );
+}
+
+
void SVNRepos::rmtxns(File &path, StringArray &transactions)
{
SVN::Pool requestPool;
@@ -694,7 +733,7 @@ void SVNRepos::rmlocks(File &path, Strin
SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
NULL, requestPool.getPool()), );
fs = svn_repos_fs(repos);
- const char *username;
+ const char *username = NULL;
/* svn_fs_unlock() demands that some username be associated with the
* filesystem, so just use the UID of the person running 'svnadmin'.*/
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNRepos.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNRepos.h?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNRepos.h (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/native/SVNRepos.h Mon Mar 18 09:35:24 2013
@@ -35,6 +35,7 @@
#include "InputStream.h"
#include "MessageReceiver.h"
#include "ReposNotifyCallback.h"
+#include "ReposFreezeAction.h"
#include "StringArray.h"
#include "File.h"
@@ -51,8 +52,11 @@ class SVNRepos : public SVNBase
bool usePostRevPropChangeHook);
void rmtxns(File &path, StringArray &transactions);
jlong recover(File &path, ReposNotifyCallback *notifyCallback);
+ void freeze(jobjectArray jpaths, ReposFreezeAction* action);
void lstxns(File &path, MessageReceiver &messageReceiver);
- void load(File &path, InputStream &dataIn, bool ignoreUUID, bool forceUUID,
+ void load(File &path, InputStream &dataIn,
+ Revision &revsionStart, Revision &revisionEnd,
+ bool ignoreUUID, bool forceUUID,
bool usePreCommitHook, bool usePostCommitHook,
const char *relativePath, ReposNotifyCallback *notifyCallback);
void listUnusedDBLogs(File &path,
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Mon Mar 18 09:35:24 2013
@@ -51,6 +51,8 @@
#include "ChangelistCallback.h"
#include "StringArray.h"
#include "RevpropTable.h"
+#include "VersionExtended.h"
+#include "DiffOptions.h"
#include "svn_version.h"
#include "svn_private_config.h"
#include "version.h"
@@ -89,6 +91,20 @@ Java_org_apache_subversion_javahl_SVNCli
cl->finalize();
}
+JNIEXPORT jobject JNICALL
+Java_org_apache_subversion_javahl_SVNClient_getVersionExtended(
+ JNIEnv *env, jobject jthis, jboolean verbose)
+{
+ JNIEntry(SVNClient, getVersionExtended);
+ SVNClient *cl = SVNClient::getCppObject(jthis);
+ if (cl == NULL)
+ {
+ JNIUtil::throwError(_("bad C++ this"));
+ return NULL;
+ }
+ return cl->getVersionExtended(!!verbose);
+}
+
JNIEXPORT jstring JNICALL
Java_org_apache_subversion_javahl_SVNClient_getAdminDirectoryName
(JNIEnv *env, jobject jthis)
@@ -403,7 +419,8 @@ Java_org_apache_subversion_javahl_SVNCli
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_add
(JNIEnv *env, jobject jthis, jstring jpath, jobject jdepth,
- jboolean jforce, jboolean jnoIgnore, jboolean jaddParents)
+ jboolean jforce, jboolean jnoIgnore, jboolean jnoAutoProps,
+ jboolean jaddParents)
{
JNIEntry(SVNClient, add);
SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -416,8 +433,11 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
- cl->add(path, EnumMapper::toDepth(jdepth), jforce ? true : false,
- jnoIgnore ? true : false, jaddParents ? true : false);
+ cl->add(path, EnumMapper::toDepth(jdepth),
+ jforce ? true : false,
+ jnoIgnore ? true : false,
+ jnoAutoProps ? true : false,
+ jaddParents ? true : false);
}
JNIEXPORT jlongArray JNICALL
@@ -533,7 +553,8 @@ JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_move
(JNIEnv *env, jobject jthis, jobject jsrcPaths, jstring jdestPath,
jboolean jforce, jboolean jmoveAsChild, jboolean jmakeParents,
- jobject jrevpropTable, jobject jmessage, jobject jcallback)
+ jboolean jmetadataOnly, jboolean jallowMixRev, jobject jrevpropTable,
+ jobject jmessage, jobject jcallback)
{
JNIEntry(SVNClient, move);
@@ -563,6 +584,7 @@ Java_org_apache_subversion_javahl_SVNCli
CommitCallback callback(jcallback);
cl->move(srcPaths, destPath, &message, jforce ? true : false,
jmoveAsChild ? true : false, jmakeParents ? true : false,
+ jmetadataOnly ? true: false, jallowMixRev ? true : false,
revprops, jcallback ? &callback : NULL);
}
@@ -713,7 +735,8 @@ Java_org_apache_subversion_javahl_SVNCli
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_doImport
(JNIEnv *env, jobject jthis, jstring jpath, jstring jurl, jobject jdepth,
- jboolean jnoIgnore, jboolean jignoreUnknownNodeTypes, jobject jrevpropTable,
+ jboolean jnoIgnore, jboolean jnoAutoProps,
+ jboolean jignoreUnknownNodeTypes, jobject jrevpropTable,
jobject jimportFilterCallback, jobject jmessage, jobject jcommitCallback)
{
JNIEntry(SVNClient, doImport);
@@ -743,7 +766,7 @@ Java_org_apache_subversion_javahl_SVNCli
CommitCallback commitCallback(jcommitCallback);
cl->doImport(path, url, &message, EnumMapper::toDepth(jdepth),
- jnoIgnore ? true : false,
+ jnoIgnore ? true : false, jnoAutoProps ? true : false,
jignoreUnknownNodeTypes ? true : false, revprops,
jimportFilterCallback ? &importFilterCallback : NULL,
jcommitCallback ? &commitCallback : NULL);
@@ -891,13 +914,11 @@ Java_org_apache_subversion_javahl_SVNCli
jdryRun ? true:false);
}
-JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_properties
+static void SVNClient_properties
(JNIEnv *env, jobject jthis, jstring jpath, jobject jrevision,
jobject jpegRevision, jobject jdepth, jobject jchangelists,
- jobject jproplistCallback)
+ jobject jproplistCallback, bool inherited)
{
- JNIEntry(SVNClient, properties);
SVNClient *cl = SVNClient::getCppObject(jthis);
if (cl == NULL)
{
@@ -920,12 +941,34 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
- ProplistCallback callback(jproplistCallback);
+ ProplistCallback callback(jproplistCallback, inherited);
cl->properties(path, revision, pegRevision, EnumMapper::toDepth(jdepth),
changelists, &callback);
}
JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_SVNClient_properties__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2Lorg_apache_subversion_javahl_callback_ProplistCallback_2
+(JNIEnv *env, jobject jthis, jstring jpath, jobject jrevision,
+ jobject jpegRevision, jobject jdepth, jobject jchangelists,
+ jobject jproplistCallback)
+{
+ JNIEntry(SVNClient, properties);
+ SVNClient_properties(env, jthis, jpath, jrevision, jpegRevision, jdepth,
+ jchangelists, jproplistCallback, false);
+}
+
+JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_SVNClient_properties__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2Lorg_apache_subversion_javahl_callback_InheritedProplistCallback_2
+(JNIEnv *env, jobject jthis, jstring jpath, jobject jrevision,
+ jobject jpegRevision, jobject jdepth, jobject jchangelists,
+ jobject jproplistCallback)
+{
+ JNIEntry(SVNClient, properties);
+ SVNClient_properties(env, jthis, jpath, jrevision, jpegRevision, jdepth,
+ jchangelists, jproplistCallback, true);
+}
+
+JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_propertySetRemote
(JNIEnv *env, jobject jthis, jstring jpath, jlong jbaseRev, jstring jname,
jbyteArray jval, jobject jmessage, jboolean jforce, jobject jrevpropTable,
@@ -1180,12 +1223,13 @@ JNIEXPORT void JNICALL Java_org_apache_s
}
JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Ljava_io_OutputStream_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZZZZZZ
+Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Ljava_io_OutputStream_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZZZZZZLorg_apache_subversion_javahl_types_DiffOptions_2
(JNIEnv *env, jobject jthis, jstring jtarget1, jobject jrevision1,
jstring jtarget2, jobject jrevision2, jstring jrelativeToDir,
jobject jstream, jobject jdepth, jobject jchangelists,
jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce,
- jboolean jcopiesAsAdds, jboolean jignoreProps, jboolean jpropsOnly)
+ jboolean jcopiesAsAdds, jboolean jignoreProps, jboolean jpropsOnly,
+ jobject jdiffOptions)
{
JNIEntry(SVNClient, diff);
SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1222,21 +1266,26 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
+ DiffOptions options(jdiffOptions);
+ if (JNIUtil::isExceptionThrown())
+ return;
+
cl->diff(target1, revision1, target2, revision2, relativeToDir, dataOut,
EnumMapper::toDepth(jdepth), changelists,
jignoreAncestry ? true:false,
jnoDiffDeleted ? true:false, jforce ? true:false,
jcopiesAsAdds ? true:false, jignoreProps ? true:false,
- jpropsOnly ? true:false);
+ jpropsOnly ? true:false, options);
}
JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Ljava_io_OutputStream_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZZZZZZ
+Java_org_apache_subversion_javahl_SVNClient_diff__Ljava_lang_String_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Lorg_apache_subversion_javahl_types_Revision_2Ljava_lang_String_2Ljava_io_OutputStream_2Lorg_apache_subversion_javahl_types_Depth_2Ljava_util_Collection_2ZZZZZZLorg_apache_subversion_javahl_types_DiffOptions_2
(JNIEnv *env, jobject jthis, jstring jtarget, jobject jpegRevision,
jobject jstartRevision, jobject jendRevision, jstring jrelativeToDir,
jobject jstream, jobject jdepth, jobject jchangelists,
jboolean jignoreAncestry, jboolean jnoDiffDeleted, jboolean jforce,
- jboolean jcopiesAsAdds, jboolean jignoreProps, jboolean jpropsOnly)
+ jboolean jcopiesAsAdds, jboolean jignoreProps, jboolean jpropsOnly,
+ jobject jdiffOptions)
{
JNIEntry(SVNClient, diff);
SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1273,12 +1322,16 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
+ DiffOptions options(jdiffOptions);
+ if (JNIUtil::isExceptionThrown())
+ return;
+
cl->diff(target, pegRevision, startRevision, endRevision, relativeToDir,
dataOut, EnumMapper::toDepth(jdepth), changelists,
jignoreAncestry ? true:false,
jnoDiffDeleted ? true:false, jforce ? true:false,
jcopiesAsAdds ? true:false, jignoreProps ? true:false,
- jpropsOnly ? true:false);
+ jpropsOnly ? true:false, options);
}
JNIEXPORT void JNICALL
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp Mon Mar 18 09:35:24 2013
@@ -241,6 +241,7 @@ Java_org_apache_subversion_javahl_SVNRep
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNRepos_load
(JNIEnv *env, jobject jthis, jobject jpath, jobject jinputData,
+ jobject jrevisionStart, jobject jrevisionEnd,
jboolean jignoreUUID, jboolean jforceUUID, jboolean jusePreCommitHook,
jboolean jusePostCommitHook, jstring jrelativePath, jobject jnotifyCallback)
{
@@ -264,12 +265,23 @@ Java_org_apache_subversion_javahl_SVNRep
if (JNIUtil::isExceptionThrown())
return;
+ Revision revisionStart(jrevisionStart);
+ if (JNIUtil::isExceptionThrown())
+ return;
+
+ Revision revisionEnd(jrevisionEnd, true);
+ if (JNIUtil::isExceptionThrown())
+ return;
+
ReposNotifyCallback notifyCallback(jnotifyCallback);
- cl->load(path, inputData, jignoreUUID ? true : false,
- jforceUUID ? true : false, jusePreCommitHook ? true : false,
- jusePostCommitHook ? true : false, relativePath,
- jnotifyCallback != NULL ? ¬ifyCallback : NULL);
+ cl->load(path, inputData, revisionStart, revisionEnd,
+ jignoreUUID ? true : false,
+ jforceUUID ? true : false,
+ jusePreCommitHook ? true : false,
+ jusePostCommitHook ? true : false,
+ relativePath,
+ (jnotifyCallback != NULL ? ¬ifyCallback : NULL));
}
JNIEXPORT void JNICALL
@@ -317,6 +329,28 @@ Java_org_apache_subversion_javahl_SVNRep
}
JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_SVNRepos_freeze
+(JNIEnv *env, jobject jthis, jobject jaction, jobjectArray jpaths)
+{
+ JNIEntry(SVNRepos, freeze);
+ SVNRepos *cl = SVNRepos::getCppObject(jthis);
+ if (cl == NULL)
+ {
+ JNIUtil::throwError(_("bad C++ this"));
+ return;
+ }
+
+ if (!jpaths || !env->GetArrayLength(jpaths))
+ {
+ JNIUtil::throwError(_("list of repository paths must not be empty"));
+ return;
+ }
+
+ ReposFreezeAction action(jaction);
+ cl->freeze(jpaths, &action);
+}
+
+JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNRepos_rmtxns
(JNIEnv *env, jobject jthis, jobject jpath, jobjectArray jtransactions)
{
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ConflictDescriptor.java Mon Mar 18 09:35:24 2013
@@ -244,11 +244,13 @@ public class ConflictDescriptor
/**
* Object is already added or schedule-add.
+ * @since 1.6
*/
added,
/**
* Object is already replaced.
+ * @since 1.7
*/
replaced,
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Mon Mar 18 09:35:24 2013
@@ -51,6 +51,12 @@ public interface ISVNClient
public Version getVersion();
/**
+ * @return Extended version information about the underlying
+ * native libraries and operating system.
+ */
+ public VersionExtended getVersionExtended(boolean verbose);
+
+ /**
* @return The name of the working copy's administrative
* directory, which is usually <code>.svn</code>.
* @see <a
@@ -223,12 +229,30 @@ public interface ISVNClient
* ignore patterns
* @param addParents add any intermediate parents to the working copy
* @throws ClientException
+ * @note this method behaves like the 1.8 version with noAutoProps=false
*/
void add(String path, Depth depth, boolean force, boolean noIgnores,
boolean addParents)
throws ClientException;
/**
+ * Adds a file to the repository.
+ * @param path path to be added.
+ * @param depth the depth to recurse into subdirectories
+ * @param force if adding a directory and recurse true and path is a
+ * directory, all not already managed files are added.
+ * @param noIgnores if false, don't add files or directories matching
+ * ignore patterns
+ * @param noAutoProps if true, ignore any auto-props configuration
+ * @param addParents add any intermediate parents to the working copy
+ * @throws ClientException
+ * @since 1.8
+ */
+ void add(String path, Depth depth, boolean force,
+ boolean noIgnores, boolean noAutoProps, boolean addParents)
+ throws ClientException;
+
+ /**
* Updates the directories or files from repository
* @param path array of target files.
* @param revision the revision number to update.
@@ -298,12 +322,27 @@ public interface ISVNClient
* @param moveAsChild Whether to move <code>srcPaths</code> as
* children of <code>destPath</code>.
* @param makeParents Whether to create intermediate parents.
+ * @param metadataOnly Move just the metadata and not the working files/dirs
+ * @param allowMixRev If true use copy and delete without move tracking
+ * when a srcPath is mixed-revision, if false return
+ * an error when a srcPath is mixed-revision.
* @param revpropTable A string-to-string mapping of revision properties
* to values which will be set if this operation
* results in a commit.
* @param handler the commit message callback, may be <code>null</code>
* if <code>destPath</code> is not a URL
* @throws ClientException If the move operation fails.
+ * @since 1.8
+ */
+ void move(Set<String> srcPaths, String destPath, boolean force,
+ boolean moveAsChild, boolean makeParents, boolean metadataOnly,
+ boolean allowMixRev, Map<String, String> revpropTable,
+ CommitMessageCallback handler, CommitCallback callback)
+ throws ClientException;
+
+ /**
+ * @deprecated Provided for backward compatibility with 1.7. Passes
+ * metadataOnly false and allowMixRev true.
*/
void move(Set<String> srcPaths, String destPath, boolean force,
boolean moveAsChild, boolean makeParents,
@@ -394,22 +433,45 @@ public interface ISVNClient
* @param url the target url
* @param depth depth to traverse into subdirectories
* @param noIgnore whether to add files matched by ignore patterns
+ * @param noAutoProps if true, ignore any auto-props configuration
* @param ignoreUnknownNodeTypes whether to ignore files which
* the node type is not konwn, just as pipes
* @param revpropTable A string-to-string mapping of revision properties
* to values which will be set if this operation
* results in a commit.
- * @param handler the commit message callback
+ * @param messageHandler the commit message callback
+ * @param commitCallback the commit status callback
* @throws ClientException
- *
+ * @since 1.8
*/
void doImport(String path, String url, Depth depth,
- boolean noIgnore, boolean ignoreUnknownNodeTypes,
+ boolean noIgnore, boolean noAutoProps,
+ boolean ignoreUnknownNodeTypes,
Map<String, String> revpropTable,
ImportFilterCallback importFilterCallback,
- CommitMessageCallback handler, CommitCallback commitCallback)
+ CommitMessageCallback messageHandler,
+ CommitCallback commitCallback)
throws ClientException;
+
+ /**
+ * Import a file or directory into a repository directory at
+ * head.
+ * @param path the local path
+ * @param url the target url
+ * @param depth depth to traverse into subdirectories
+ * @param noIgnore whether to add files matched by ignore patterns
+ * @param ignoreUnknownNodeTypes whether to ignore files which
+ * the node type is not konwn, just as pipes
+ * @param revpropTable A string-to-string mapping of revision properties
+ * to values which will be set if this operation
+ * results in a commit.
+ * @param handler the commit message callback
+ * @param callback the commit status callback
+ * @throws ClientException
+ * @note this method behaves like the 1.8 version with noAutoProps=false
+ * and without the filtering option.
+ */
void doImport(String path, String url, Depth depth,
boolean noIgnore, boolean ignoreUnknownNodeTypes,
Map<String, String> revpropTable,
@@ -530,6 +592,42 @@ public interface ISVNClient
* entirety, not as diffs from their sources
* @param ignoreProps don't show property diffs
* @param propsOnly show property changes only
+ * @param options additional options for controlling the output
+ * @throws ClientException
+ * @since 1.8
+ */
+ void diff(String target1, Revision revision1, String target2,
+ Revision revision2, String relativeToDir, OutputStream outStream,
+ Depth depth, Collection<String> changelists,
+ boolean ignoreAncestry, boolean noDiffDeleted, boolean force,
+ boolean copiesAsAdds, boolean ignoreProps, boolean propsOnly,
+ DiffOptions options)
+ throws ClientException;
+
+ 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, boolean ignoreProps, boolean propsOnly,
+ DiffOptions options)
+ throws ClientException;
+
+ /**
+ * Display the differences between two paths
+ * @param target1 first path or url
+ * @param revision1 first revision
+ * @param target2 second path or url
+ * @param revision2 second revision
+ * @param relativeToDir index path is relative to this path
+ * @param outFileName file name where difference are written
+ * @param depth how deep to traverse into subdirectories
+ * @param ignoreAncestry ignore if files are not related
+ * @param noDiffDeleted no output on deleted files
+ * @param force diff even on binary files
+ * @param copiesAsAdds if set, copied files will be shown in their
+ * entirety, not as diffs from their sources
+ * @param ignoreProps don't show property diffs
+ * @param propsOnly show property changes only
* @throws ClientException
*/
void diff(String target1, Revision revision1, String target2,
@@ -563,6 +661,43 @@ public interface ISVNClient
* entirety, not as diffs from their sources
* @param ignoreProps don't show property diffs
* @param propsOnly show property changes only
+ * @param options additional options for controlling the output
+ * @throws ClientException
+ * @since 1.8
+ */
+ void diff(String target, Revision pegRevision, Revision startRevision,
+ Revision endRevision, String relativeToDir, OutputStream outStream,
+ Depth depth, Collection<String> changelists,
+ boolean ignoreAncestry, boolean noDiffDeleted, boolean force,
+ boolean copiesAsAdds, boolean ignoreProps, boolean propsOnly,
+ DiffOptions options)
+ throws ClientException;
+
+ 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, boolean ignoreProps, boolean propsOnly,
+ DiffOptions options)
+ throws ClientException;
+
+ /**
+ * Display the differences between two paths.
+ * @param target path or url
+ * @param pegRevision revision tointerpret target
+ * @param startRevision first Revision to compare
+ * @param endRevision second Revision to compare
+ * @param relativeToDir index path is relative to this path
+ * @param outFileName file name where difference are written
+ * @param depth how deep to traverse into subdirectories
+ * @param changelists if non-null, filter paths using changelists
+ * @param ignoreAncestry ignore if files are not related
+ * @param noDiffDeleted no output on deleted files
+ * @param force diff even on binary files
+ * @param copiesAsAdds if set, copied files will be shown in their
+ * entirety, not as diffs from their sources
+ * @param ignoreProps don't show property diffs
+ * @param propsOnly show property changes only
* @throws ClientException
*/
void diff(String target, Revision pegRevision, Revision startRevision,
@@ -656,6 +791,23 @@ public interface ISVNClient
throws ClientException;
/**
+ * Retrieves the properties of an item, including inherited properties.
+ *
+ * @param path the path of the item
+ * @param revision the revision of the item
+ * @param pegRevision the revision to interpret path
+ * @param depth the depth to recurse into subdirectories
+ * @param changelists changelists to filter by
+ * @param callback the callback to use to return the properties
+ * @throws ClientException
+ * @since 1.8
+ */
+ void properties(String path, Revision revision, Revision pegRevision,
+ Depth depth, Collection<String> changelists,
+ InheritedProplistCallback callback)
+ throws ClientException;
+
+ /**
* Sets one property of an item with a String value
*
* @param paths paths of the items
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java Mon Mar 18 09:35:24 2013
@@ -29,6 +29,7 @@ import java.io.InputStream;
import java.io.File;
import org.apache.subversion.javahl.callback.ReposNotifyCallback;
+import org.apache.subversion.javahl.callback.ReposFreezeAction;
import org.apache.subversion.javahl.types.*;
public interface ISVNRepos {
@@ -136,10 +137,13 @@ public interface ISVNRepos {
public abstract void listUnusedDBLogs(File path, MessageReceiver receiver)
throws ClientException;
+
/**
- * load the data of a dump into a repository,
+ * load the data of a dump into a repository
* @param path the path to the repository
* @param dataInput the data input source
+ * @param start the first revision to load
+ * @param end the last revision to load
* @param ignoreUUID ignore any UUID found in the input stream
* @param forceUUID set the repository UUID to any found in the
* stream
@@ -149,6 +153,32 @@ public interface ISVNRepos {
* in put optional.
* @param callback the target for processing messages
* @throws ClientException throw in case of problem
+ * @since 1.8
+ */
+ public abstract void load(File path, InputStream dataInput,
+ Revision start, Revision end,
+ boolean ignoreUUID, boolean forceUUID,
+ boolean usePreCommitHook,
+ boolean usePostCommitHook,
+ String relativePath,
+ ReposNotifyCallback callback)
+ throws ClientException;
+
+ /**
+ * load the data of a dump into a repository
+ * @param path the path to the repository
+ * @param dataInput the data input source
+ * @param ignoreUUID ignore any UUID found in the input stream
+ * @param forceUUID set the repository UUID to any found in the
+ * stream
+ * @param usePreCommitHook use the pre-commit hook when processing commits
+ * @param usePostCommitHook use the post-commit hook when processing commits
+ * @param relativePath the directory in the repository, where the data
+ * in put optional.
+ * @param callback the target for processing messages
+ * @throws ClientException throw in case of problem
+ * @note behaves like the 1.8 vesion with the revision
+ * parameters set to Revision.START and Revision.HEAD.
*/
public abstract void load(File path, InputStream dataInput,
boolean ignoreUUID, boolean forceUUID, boolean usePreCommitHook,
@@ -166,14 +196,34 @@ public interface ISVNRepos {
throws ClientException;
/**
- * recover the berkeley db of a repository, returns youngest revision
+ * recover the filesystem backend of a repository
* @param path the path to the repository
+ * @return youngest revision
* @throws ClientException throw in case of problem
*/
public abstract long recover(File path, ReposNotifyCallback callback)
throws ClientException;
/**
+ * Take an exclusive lock on each of the listed repositories
+ * to prevent commits; then, while holding all the locks, call
+ * the action.invoke().
+ *
+ * The repositories may or may not be readable by Subversion
+ * while frozen, depending on implementation details of the
+ * repository's filesystem backend.
+ *
+ * Repositories are locked in the listed order.
+ * @param action describes the action to perform
+ * @param paths the set of repository paths
+ * @throws ClientException
+ * @since 1.8
+ */
+ public abstract void freeze(ReposFreezeAction action,
+ File... paths)
+ throws ClientException;
+
+ /**
* remove open transaction in a repository
* @param path the path to the repository
* @param transactions the transactions to be removed
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java Mon Mar 18 09:35:24 2013
@@ -188,7 +188,19 @@ public class ReposNotifyInformation exte
recover_start,
/** Upgrade has started. */
- upgrade_start;
+ upgrade_start,
+
+ /**
+ * A revision was skipped during loading.
+ * @since 1.8
+ */
+ load_skipped_rev,
+
+ /**
+ * The structure of a revision is being verified.
+ * @since 1.8
+ */
+ verify_struc_rev;
}
public enum NodeAction
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Mon Mar 18 09:35:24 2013
@@ -103,6 +103,8 @@ public class SVNClient implements ISVNCl
return NativeResources.getVersion();
}
+ public native VersionExtended getVersionExtended(boolean verbose);
+
public native String getAdminDirectoryName();
public native boolean isAdminDirectory(String name);
@@ -170,9 +172,17 @@ public class SVNClient implements ISVNCl
throws ClientException;
public native void add(String path, Depth depth, boolean force,
- boolean noIgnores, boolean addParents)
+ boolean noIgnores, boolean noAutoProps,
+ boolean addParents)
throws ClientException;
+ public void add(String path, Depth depth, boolean force,
+ boolean noIgnores, boolean addParents)
+ throws ClientException
+ {
+ add(path, depth, force, noIgnores, false, addParents);
+ }
+
public native long[] update(Set<String> paths, Revision revision,
Depth depth, boolean depthIsSticky,
boolean makeParents,
@@ -196,11 +206,23 @@ public class SVNClient implements ISVNCl
public native void move(Set<String> srcPaths, String destPath,
boolean force, boolean moveAsChild,
- boolean makeParents,
+ boolean makeParents, boolean metadataOnly,
+ boolean allowMixRev,
Map<String, String> revpropTable,
CommitMessageCallback handler, CommitCallback callback)
throws ClientException;
+ public void move(Set<String> srcPaths, String destPath,
+ boolean force, boolean moveAsChild,
+ boolean makeParents,
+ Map<String, String> revpropTable,
+ CommitMessageCallback handler, CommitCallback callback)
+ throws ClientException
+ {
+ move(srcPaths, destPath, force, moveAsChild, makeParents, false, true,
+ revpropTable, handler, callback);
+ }
+
public native void mkdir(Set<String> paths, boolean makeParents,
Map<String, String> revpropTable,
CommitMessageCallback handler, CommitCallback callback)
@@ -227,7 +249,7 @@ public class SVNClient implements ISVNCl
throws ClientException;
public native void doImport(String path, String url, Depth depth,
- boolean noIgnore,
+ boolean noIgnore, boolean noAutoProps,
boolean ignoreUnknownNodeTypes,
Map<String, String> revpropTable,
ImportFilterCallback importFilterCallback,
@@ -242,7 +264,7 @@ public class SVNClient implements ISVNCl
CommitCallback callback)
throws ClientException
{
- doImport(path, url, depth, noIgnore, ignoreUnknownNodeTypes,
+ doImport(path, url, depth, noIgnore, false, ignoreUnknownNodeTypes,
revpropTable, null, handler, callback);
}
@@ -291,7 +313,41 @@ public class SVNClient implements ISVNCl
OutputStream stream = new FileOutputStream(outFileName);
diff(target1, revision1, target2, revision2, relativeToDir,
stream, depth, changelists, ignoreAncestry, noDiffDeleted,
- force, copiesAsAdds, false, false);
+ force, copiesAsAdds, false, false, null);
+ } catch (FileNotFoundException ex) {
+ throw ClientException.fromException(ex);
+ }
+ }
+
+ public void diff(String target1, Revision revision1, String target2,
+ Revision revision2, String relativeToDir,
+ OutputStream stream, Depth depth,
+ Collection<String> changelists,
+ boolean ignoreAncestry, boolean noDiffDeleted,
+ boolean force, boolean copiesAsAdds,
+ boolean ignoreProps, boolean propsOnly)
+ throws ClientException
+ {
+ diff(target1, revision1, target2, revision2, relativeToDir,
+ stream, depth, changelists, ignoreAncestry, noDiffDeleted,
+ force, copiesAsAdds, ignoreProps, propsOnly, null);
+ }
+
+ 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,
+ boolean ignoreProps, boolean propsOnly,
+ DiffOptions options)
+ throws ClientException
+ {
+ try {
+ OutputStream stream = new FileOutputStream(outFileName);
+ diff(target1, revision1, target2, revision2, relativeToDir,
+ stream, depth, changelists, ignoreAncestry, noDiffDeleted,
+ force, copiesAsAdds, ignoreProps, propsOnly, options);
} catch (FileNotFoundException ex) {
throw ClientException.fromException(ex);
}
@@ -303,9 +359,12 @@ public class SVNClient implements ISVNCl
Collection<String> changelists,
boolean ignoreAncestry, boolean noDiffDeleted,
boolean force, boolean copiesAsAdds,
- boolean ignoreProps, boolean propsOnly)
+ boolean ignoreProps, boolean propsOnly,
+ DiffOptions options)
throws ClientException;
+
+
public void diff(String target, Revision pegRevision,
Revision startRevision, Revision endRevision,
String relativeToDir, String outFileName,
@@ -318,7 +377,41 @@ public class SVNClient implements ISVNCl
OutputStream stream = new FileOutputStream(outFileName);
diff(target, pegRevision, startRevision, endRevision,
relativeToDir, stream, depth, changelists, ignoreAncestry,
- noDiffDeleted, force, copiesAsAdds, false, false);
+ noDiffDeleted, force, copiesAsAdds, false, false, null);
+ } catch (FileNotFoundException ex) {
+ throw ClientException.fromException(ex);
+ }
+ }
+
+ public void diff(String target, Revision pegRevision,
+ Revision startRevision, Revision endRevision,
+ String relativeToDir, OutputStream stream,
+ Depth depth, Collection<String> changelists,
+ boolean ignoreAncestry, boolean noDiffDeleted,
+ boolean force, boolean copiesAsAdds,
+ boolean ignoreProps, boolean propsOnly)
+ throws ClientException
+ {
+ diff(target, pegRevision, startRevision, endRevision, relativeToDir,
+ stream, depth, changelists, ignoreAncestry, noDiffDeleted,
+ force, copiesAsAdds, ignoreProps, propsOnly, null);
+ }
+
+ 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,
+ boolean ignoreProps, boolean propsOnly,
+ DiffOptions options)
+ throws ClientException
+ {
+ try {
+ OutputStream stream = new FileOutputStream(outFileName);
+ diff(target, pegRevision, startRevision, endRevision, relativeToDir,
+ stream, depth, changelists, ignoreAncestry, noDiffDeleted,
+ force, copiesAsAdds, ignoreProps, propsOnly, options);
} catch (FileNotFoundException ex) {
throw ClientException.fromException(ex);
}
@@ -330,7 +423,8 @@ public class SVNClient implements ISVNCl
Depth depth, Collection<String> changelists,
boolean ignoreAncestry, boolean noDiffDeleted,
boolean force, boolean copiesAsAdds,
- boolean ignoreProps, boolean propsOnly)
+ boolean ignoreProps, boolean propsOnly,
+ DiffOptions options)
throws ClientException;
public native void diffSummarize(String target1, Revision revision1,
@@ -354,6 +448,12 @@ public class SVNClient implements ISVNCl
ProplistCallback callback)
throws ClientException;
+ public native void properties(String path, Revision revision,
+ Revision pegRevision, Depth depth,
+ Collection<String> changelists,
+ InheritedProplistCallback callback)
+ throws ClientException;
+
public native void propertySetLocal(Set<String> paths, String name,
byte[] value, Depth depth,
Collection<String> changelists,
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java Mon Mar 18 09:35:24 2013
@@ -29,6 +29,7 @@ import java.io.InputStream;
import java.io.File;
import org.apache.subversion.javahl.callback.ReposNotifyCallback;
+import org.apache.subversion.javahl.callback.ReposFreezeAction;
import org.apache.subversion.javahl.types.*;
/**
@@ -157,7 +158,19 @@ public class SVNRepos implements ISVNRep
public native void listUnusedDBLogs(File path, ISVNRepos.MessageReceiver receiver)
throws ClientException;
+ public void load(File path, InputStream dataInput,
+ boolean ignoreUUID, boolean forceUUID,
+ boolean usePreCommitHook, boolean usePostCommitHook,
+ String relativePath, ReposNotifyCallback callback)
+ throws ClientException
+ {
+ load(path, dataInput, Revision.START, Revision.HEAD,
+ ignoreUUID, forceUUID, usePreCommitHook, usePostCommitHook,
+ relativePath, callback);
+ }
+
public native void load(File path, InputStream dataInput,
+ Revision start, Revision end,
boolean ignoreUUID, boolean forceUUID,
boolean usePreCommitHook, boolean usePostCommitHook,
String relativePath, ReposNotifyCallback callback)
@@ -175,6 +188,9 @@ public class SVNRepos implements ISVNRep
public native long recover(File path, ReposNotifyCallback callback)
throws ClientException;
+ public native void freeze(ReposFreezeAction action, File... paths)
+ throws ClientException;
+
/**
* remove open transaction in a repository
* @param path the path to the repository
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ImportFilterCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ImportFilterCallback.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ImportFilterCallback.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ImportFilterCallback.java Mon Mar 18 09:35:24 2013
@@ -29,6 +29,7 @@ import org.apache.subversion.javahl.type
/**
* This interface is used to filter imported nodes in the
* {@link ISVNClient#import} call.
+ * @since 1.8
*/
public interface ImportFilterCallback
{
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ListCallback.java Mon Mar 18 09:35:24 2013
@@ -29,7 +29,7 @@ import org.apache.subversion.javahl.type
/**
* This interface is used to receive every single line for a file on a
- * the {@link ISVNClient#blame} call.
+ * the {@link ISVNClient#list} call.
*/
public interface ListCallback
{
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/ProplistCallback.java Mon Mar 18 09:35:24 2013
@@ -33,7 +33,7 @@ import org.apache.subversion.javahl.ISVN
public interface ProplistCallback
{
/**
- * the method will be called for every line in a file.
+ * the method will be called once for every file.
* @param path the path.
* @param properties the properties on the path.
*/
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/NodeKind.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/NodeKind.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/NodeKind.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/NodeKind.java Mon Mar 18 09:35:24 2013
@@ -28,17 +28,23 @@ package org.apache.subversion.javahl.typ
*/
public enum NodeKind
{
- /* absent */
+ /** absent */
none ("none"),
- /* regular file */
+ /** regular file */
file ("file"),
- /* directory */
+ /** directory */
dir ("dir"),
- /* something's here, but we don't know what */
- unknown ("unknown");
+ /** something's here, but we don't know what */
+ unknown ("unknown"),
+
+ /**
+ * symbolic link
+ * @since: 1.8
+ */
+ symlink ("symlink");
/**
* The description of the node kind.
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Status.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Status.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Status.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Status.java Mon Mar 18 09:35:24 2013
@@ -165,6 +165,10 @@ public class Status implements java.io.S
*/
private String changelist;
+ private String movedFromAbspath;
+
+ private String movedToAbspath;
+
/**
* this constructor should only called from JNI code
* @param path the file system path of item
@@ -203,6 +207,8 @@ public class Status implements java.io.S
* @param reposLastCmtAuthor the author of the last commit, if out of
* date
* @param changelist the changelist the item is a member of
+ * @param movedFromAbspath path moved from
+ * @param movedToAbspath path moved from
*/
public Status(String path, String url, NodeKind nodeKind, long revision,
long lastChangedRevision, long lastChangedDate,
@@ -212,7 +218,8 @@ public class Status implements java.io.S
boolean switched, boolean fileExternal, Lock localLock,
Lock reposLock, long reposLastCmtRevision,
long reposLastCmtDate, NodeKind reposKind,
- String reposLastCmtAuthor, String changelist)
+ String reposLastCmtAuthor, String changelist,
+ String movedFromAbspath, String movedToAbspath)
{
this.path = path;
this.url = url;
@@ -237,6 +244,8 @@ public class Status implements java.io.S
this.reposKind = reposKind;
this.reposLastCmtAuthor = reposLastCmtAuthor;
this.changelist = changelist;
+ this.movedFromAbspath = movedFromAbspath;
+ this.movedToAbspath = movedToAbspath;
}
/**
@@ -585,6 +594,16 @@ public class Status implements java.io.S
return isConflicted;
}
+ public String getMovedFromAbspath()
+ {
+ return movedFromAbspath;
+ }
+
+ public String getMovedToAbspath()
+ {
+ return movedToAbspath;
+ }
+
/**
* Converts microseconds since the epoch to a Date object.
*
Modified: subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java?rev=1457684&r1=1457683&r2=1457684&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/verify-keep-going/subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java Mon Mar 18 09:35:24 2013
@@ -795,6 +795,7 @@ public class SVNClient implements SVNCli
/**
* @since 1.5
*/
+ @SuppressWarnings("unchecked")
public void remove(String[] paths, String message, boolean force,
boolean keepLocal, Map revpropTable)
throws ClientException
@@ -964,6 +965,7 @@ public class SVNClient implements SVNCli
/**
* @since 1.5
*/
+ @SuppressWarnings("unchecked")
public long commit(String[] paths, String message, int depth,
boolean noUnlock, boolean keepChangelist,
String[] changelists, Map revpropTable)
@@ -998,6 +1000,7 @@ public class SVNClient implements SVNCli
/**
* @since 1.7
*/
+ @SuppressWarnings("unchecked")
public void copy(CopySource[] sources, String destPath, String message,
boolean copyAsChild, boolean makeParents,
boolean ignoreExternals, Map revpropTable)
@@ -1031,6 +1034,7 @@ public class SVNClient implements SVNCli
* boolean, boolean, Map)} instead.
* @since 1.5
*/
+ @SuppressWarnings("unchecked")
public void copy(CopySource[] sources, String destPath, String message,
boolean copyAsChild, boolean makeParents,
Map revpropTable)
@@ -1057,6 +1061,7 @@ public class SVNClient implements SVNCli
/**
* @since 1.5
*/
+ @SuppressWarnings("unchecked")
public void move(String[] srcPaths, String destPath, String message,
boolean force, boolean moveAsChild,
boolean makeParents, Map revpropTable)
@@ -1106,6 +1111,7 @@ public class SVNClient implements SVNCli
/**
* @since 1.5
*/
+ @SuppressWarnings("unchecked")
public void mkdir(String[] paths, String message,
boolean makeParents, Map revpropTable)
throws ClientException
@@ -1306,6 +1312,7 @@ public class SVNClient implements SVNCli
/**
* @since 1.5
*/
+ @SuppressWarnings("unchecked")
public void doImport(String path, String url, String message,
int depth, boolean noIgnore,
boolean ignoreUnknownNodeTypes, Map revpropTable)
@@ -1888,6 +1895,7 @@ public class SVNClient implements SVNCli
/**
* @since 1.5
*/
+ @SuppressWarnings("unchecked")
public void propertySet(String path, String name, String value, int depth,
String[] changelists, boolean force,
Map revpropTable)