You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2020/05/23 14:17:03 UTC
svn commit: r1878061 [5/43] - in /subversion/branches/addremove: ./ build/
build/ac-macros/ build/generator/ build/generator/swig/
build/generator/templates/ build/generator/util/ build/win32/
contrib/client-side/ contrib/client-side/svn_load_dirs/ con...
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/BlameCallback.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/BlameCallback.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/BlameCallback.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/BlameCallback.cpp Sat May 23 14:16:56 2020
@@ -28,14 +28,20 @@
#include "CreateJ.h"
#include "JNIUtil.h"
#include "svn_time.h"
+
+#include "svn_private_config.h"
+
/**
* Create a BlameCallback object
* @param jcallback the Java callback object.
*/
-BlameCallback::BlameCallback(jobject jcallback)
-{
- m_callback = jcallback;
-}
+BlameCallback::BlameCallback(jobject jrangeCallback, jobject jlineCallback)
+ : m_start_revnum(SVN_INVALID_REVNUM),
+ m_end_revnum(SVN_INVALID_REVNUM),
+ m_range_callback_invoked(false),
+ m_range_callback(jrangeCallback),
+ m_line_callback(jlineCallback)
+{}
/**
* Destroy a BlameCallback object
*/
@@ -48,36 +54,84 @@ BlameCallback::~BlameCallback()
/* implements svn_client_blame_receiver3_t */
svn_error_t *
BlameCallback::callback(void *baton,
- svn_revnum_t start_revnum,
- svn_revnum_t end_revnum,
apr_int64_t line_no,
svn_revnum_t revision,
apr_hash_t *rev_props,
svn_revnum_t merged_revision,
apr_hash_t *merged_rev_props,
const char *merged_path,
- const char *line,
+ const svn_string_t *line,
svn_boolean_t local_change,
apr_pool_t *pool)
{
- if (baton)
- return static_cast<BlameCallback *>(baton)->singleLine(start_revnum,
- end_revnum, line_no, revision, rev_props, merged_revision,
- merged_rev_props, merged_path, line, local_change, pool);
+ BlameCallback *const self = static_cast<BlameCallback *>(baton);
+ svn_error_t *err = SVN_NO_ERROR;
- return SVN_NO_ERROR;
+ if (self)
+ {
+ if (self->m_range_callback && !self->m_range_callback_invoked)
+ {
+ self->m_range_callback_invoked = true;
+ err = self->setRange();
+ }
+
+ if (self->m_line_callback && err == SVN_NO_ERROR)
+ {
+ err = self->singleLine(
+ line_no, revision, rev_props, merged_revision,
+ merged_rev_props, merged_path, line, local_change, pool);
+ }
+ }
+
+ return err;
}
+svn_error_t *
+BlameCallback::setRange()
+{
+ if (m_start_revnum == SVN_INVALID_REVNUM
+ || m_end_revnum == SVN_INVALID_REVNUM)
+ return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL,
+ _("Blame revision range was not resolved"));
+
+ JNIEnv *env = JNIUtil::getEnv();
+
+ // Create a local frame for our references
+ env->PushLocalFrame(LOCAL_FRAME_SIZE);
+ if (JNIUtil::isJavaExceptionThrown())
+ return SVN_NO_ERROR;
+
+ // The method id will not change during the time this library is
+ // loaded, so it can be cached.
+ static jmethodID mid = 0;
+ if (mid == 0)
+ {
+ jclass clazz = env->FindClass(JAVAHL_CLASS("/callback/BlameRangeCallback"));
+ if (JNIUtil::isJavaExceptionThrown())
+ POP_AND_RETURN(SVN_NO_ERROR);
+
+ mid = env->GetMethodID(clazz, "setRange", "(JJ)V");
+ if (JNIUtil::isJavaExceptionThrown() || mid == 0)
+ POP_AND_RETURN(SVN_NO_ERROR);
+ }
+
+ // call the Java method
+ env->CallVoidMethod(m_range_callback, mid,
+ (jlong)m_start_revnum, (jlong)m_end_revnum);
+
+ POP_AND_RETURN_EXCEPTION_AS_SVNERROR();
+}
+
+
/**
* Callback called for a single line in the file, for which the blame
* information was requested. See the Java-doc for more information.
*/
svn_error_t *
-BlameCallback::singleLine(svn_revnum_t start_revnum, svn_revnum_t end_revnum,
- apr_int64_t line_no, svn_revnum_t revision,
+BlameCallback::singleLine(apr_int64_t line_no, svn_revnum_t revision,
apr_hash_t *revProps, svn_revnum_t mergedRevision,
apr_hash_t *mergedRevProps, const char *mergedPath,
- const char *line, svn_boolean_t localChange,
+ const svn_string_t *line, svn_boolean_t localChange,
apr_pool_t *pool)
{
JNIEnv *env = JNIUtil::getEnv();
@@ -92,13 +146,13 @@ BlameCallback::singleLine(svn_revnum_t s
static jmethodID mid = 0;
if (mid == 0)
{
- jclass clazz = env->FindClass(JAVAHL_CLASS("/callback/BlameCallback"));
+ jclass clazz = env->FindClass(JAVAHL_CLASS("/callback/BlameLineCallback"));
if (JNIUtil::isJavaExceptionThrown())
POP_AND_RETURN(SVN_NO_ERROR);
mid = env->GetMethodID(clazz, "singleLine",
"(JJLjava/util/Map;JLjava/util/Map;"
- "Ljava/lang/String;Ljava/lang/String;Z)V");
+ "Ljava/lang/String;Z[B)V");
if (JNIUtil::isJavaExceptionThrown() || mid == 0)
POP_AND_RETURN(SVN_NO_ERROR);
}
@@ -120,14 +174,14 @@ BlameCallback::singleLine(svn_revnum_t s
if (JNIUtil::isJavaExceptionThrown())
POP_AND_RETURN(SVN_NO_ERROR);
- jstring jline = JNIUtil::makeJString(line);
+ jbyteArray jline = JNIUtil::makeJByteArray(line);
if (JNIUtil::isJavaExceptionThrown())
POP_AND_RETURN(SVN_NO_ERROR);
// call the Java method
- env->CallVoidMethod(m_callback, mid, (jlong)line_no, (jlong)revision,
+ env->CallVoidMethod(m_line_callback, mid, (jlong)line_no, (jlong)revision,
jrevProps, (jlong)mergedRevision, jmergedRevProps,
- jmergedPath, jline, (jboolean)localChange);
+ jmergedPath, (jboolean)localChange, jline);
POP_AND_RETURN_EXCEPTION_AS_SVNERROR();
}
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/BlameCallback.h
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/BlameCallback.h?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/BlameCallback.h (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/BlameCallback.h Sat May 23 14:16:56 2020
@@ -37,40 +37,44 @@
class BlameCallback
{
public:
- BlameCallback(jobject jcallback);
+ BlameCallback(jobject jrangeCallback, jobject jlineCallback);
~BlameCallback();
static svn_error_t *callback(void *baton,
- svn_revnum_t start_revnum,
- svn_revnum_t end_revnum,
apr_int64_t line_no,
svn_revnum_t revision,
apr_hash_t *rev_props,
svn_revnum_t merged_revision,
apr_hash_t *merged_rev_props,
const char *merged_path,
- const char *line,
+ const svn_string_t *line,
svn_boolean_t local_change,
apr_pool_t *pool);
+ svn_revnum_t *get_start_revnum_p() { return &m_start_revnum; }
+ svn_revnum_t *get_end_revnum_p() { return &m_end_revnum; }
+
protected:
- svn_error_t *singleLine(svn_revnum_t start_revnum,
- svn_revnum_t end_revnum,
- apr_int64_t line_no,
+ svn_error_t *setRange();
+ svn_error_t *singleLine(apr_int64_t line_no,
svn_revnum_t revision,
apr_hash_t *rev_props,
svn_revnum_t merged_revision,
apr_hash_t *merged_rev_props,
const char *merged_path,
- const char *line,
+ const svn_string_t *line,
svn_boolean_t local_change,
apr_pool_t *pool);
private:
- /**
- * This a local reference to the Java object.
- */
- jobject m_callback;
+ // Arguments for svn_client_blame6
+ svn_revnum_t m_start_revnum;
+ svn_revnum_t m_end_revnum;
+ bool m_range_callback_invoked;
+
+ // These are local references to the Java objects.
+ jobject m_range_callback;
+ jobject m_line_callback;
};
#endif // BLAMECALLBACK_H
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/CommitEditor.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/CommitEditor.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/CommitEditor.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/CommitEditor.cpp Sat May 23 14:16:56 2020
@@ -444,7 +444,8 @@ svn_error_t* open_callback_session(svn_r
if (!session)
{
const char* corrected_url = NULL;
- SVN_ERR(svn_ra_open4(&session, &corrected_url, url, uuid,
+ const char* redirect_url = NULL;
+ SVN_ERR(svn_ra_open5(&session, &corrected_url, &redirect_url, url, uuid,
context->getCallbacks(),
context->getCallbackBaton(),
context->getConfigData(),
@@ -459,8 +460,8 @@ svn_error_t* open_callback_session(svn_r
return svn_error_createf(
SVN_ERR_RA_ILLEGAL_URL, NULL,
_("Repository URL changed while session was open.\n"
- "Expected URL: %s\nApparent URL: %s"),
- url, corrected_url);
+ "Expected URL: %s\nRedirect URL:%s\nApparent URL: %s\n"),
+ url, redirect_url, corrected_url);
}
}
return SVN_NO_ERROR;
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/EditorProxy.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/EditorProxy.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/EditorProxy.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/EditorProxy.cpp Sat May 23 14:16:56 2020
@@ -132,7 +132,7 @@ get_editor_method(jmethodID& mid, const
jobject wrap_input_stream(svn_stream_t* stream)
{
- std::auto_ptr<JavaHL::NativeInputStream>
+ JavaHL::cxx::owned_ptr<JavaHL::NativeInputStream>
wrapped(new JavaHL::NativeInputStream());
apr_pool_t* const wrapped_pool = wrapped->get_pool().getPool();
wrapped->set_stream(svn_stream_disown(stream, wrapped_pool));
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/EditorProxy.h
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/EditorProxy.h?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/EditorProxy.h (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/EditorProxy.h Sat May 23 14:16:56 2020
@@ -33,6 +33,8 @@
#include "private/svn_editor.h"
#include "private/svn_delta_private.h"
+#include "CxxCompat.hpp"
+
/**
* These callbacks are needed by the delta-to-Ev2 shims.
*/
@@ -53,7 +55,7 @@ struct EditorProxyCallbacks
class EditorProxy
{
public:
- typedef std::auto_ptr<EditorProxy> UniquePtr;
+ typedef ::JavaHL::cxx::owned_ptr<EditorProxy> UniquePtr;
EditorProxy(jobject jeditor, apr_pool_t* edit_pool,
const char* repos_root_url, const char* base_relpath,
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/JNIStackElement.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/JNIStackElement.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/JNIStackElement.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/JNIStackElement.cpp Sat May 23 14:16:56 2020
@@ -66,7 +66,7 @@ JNIStackElement::JNIStackElement(JNIEnv
else
{
// This will call java.lang.Object.toString, even when it is
- // overriden.
+ // overridden.
jobject oStr = env->CallNonvirtualObjectMethod(jthis, jlo, mid);
if (JNIUtil::isJavaExceptionThrown())
return;
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/JNIUtil.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/JNIUtil.cpp Sat May 23 14:16:56 2020
@@ -578,16 +578,17 @@ jthrowable JNIUtil::wrappedCreateClientE
if (JNIUtil::isJavaExceptionThrown())
return NULL;
- const char *source = NULL;
+ std::string source;
#ifdef SVN_DEBUG
#ifndef SVN_ERR__TRACING
if (err->file)
{
- std::ostringstream buf;
- buf << err->file;
+ source = err->file;
if (err->line > 0)
- buf << ':' << err->line;
- source = buf.str().c_str();
+ {
+ source += ':';
+ source += err->line;
+ }
}
#endif
#endif
@@ -615,7 +616,7 @@ jthrowable JNIUtil::wrappedCreateClientE
JNICriticalSection cs(*g_logMutex);
g_logStream << "Subversion JavaHL exception thrown, message:<";
g_logStream << msg << ">";
- if (source)
+ if (!source.empty())
g_logStream << " source:<" << source << ">";
if (err->apr_err != -1)
g_logStream << " apr-err:<" << err->apr_err << ">";
@@ -624,7 +625,7 @@ jthrowable JNIUtil::wrappedCreateClientE
if (isJavaExceptionThrown())
POP_AND_RETURN_NULL;
- jstring jsource = makeJString(source);
+ jstring jsource = (source.empty() ? NULL : makeJString(source.c_str()));
if (isJavaExceptionThrown())
POP_AND_RETURN_NULL;
@@ -823,7 +824,7 @@ JNIUtil::checkJavaException(apr_status_t
else
err->message = _("Java exception");
-
+
/* ### TODO: Use apr_pool_userdata_set() on the pool we just created
for the error chain to keep track of the actual Java
exception while the error is inside Subversion.
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/JNIUtil.h
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/JNIUtil.h?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/JNIUtil.h (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/JNIUtil.h Sat May 23 14:16:56 2020
@@ -248,7 +248,7 @@ class JNIUtil
* A statement macro used for checking for errors, in the style of
* SVN_ERR().
*
- * Evalute @a expr. If it yields an error, handle the JNI error, and
+ * Evaluate @a expr. If it yields an error, handle the JNI error, and
* return @a ret_val. Otherwise, continue.
*
* Note that if the enclosing function returns <tt>void</tt>, @a ret_val may
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/NativeStream.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/NativeStream.hpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/NativeStream.hpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/NativeStream.hpp Sat May 23 14:16:56 2020
@@ -43,7 +43,7 @@ class NativeInputStream : public ::SVNBa
{
public:
/**
- * Construcs the native instance that will be wrapped in a Java obejct.
+ * Constructs the native instance that will be wrapped in a Java object.
* If @a stream is @c NULL, you must call #set_stream before creating
* the Java wrapper.
*/
@@ -141,7 +141,7 @@ class NativeOutputStream : public ::SVNB
{
public:
/**
- * Construcs the native instance that will be wrapped in a Java obejct.
+ * Constructs the native instance that will be wrapped in a Java object.
* If @a stream is @c NULL, you must call #set_stream before creating
* the Java wrapper.
*/
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/OperationContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/OperationContext.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/OperationContext.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/OperationContext.cpp Sat May 23 14:16:56 2020
@@ -43,7 +43,7 @@
OperationContext::OperationContext(SVN::Pool &pool)
: m_config(NULL),
- m_prompter(NULL),
+ m_prompter(),
m_cancelOperation(0),
m_pool(&pool),
m_jctx(NULL),
@@ -189,7 +189,7 @@ OperationContext::getAuthBaton(SVN::Pool
}
else
{
- // Not using hte native credentials store, start with an empty
+ // Not using the native credentials store, start with an empty
// providers array.
providers = apr_array_make(pool, 0, sizeof(svn_auth_provider_object_t *));
}
@@ -253,7 +253,7 @@ OperationContext::password(const char *p
void
OperationContext::setPrompt(Prompter::UniquePtr prompter)
{
- m_prompter = prompter;
+ m_prompter = JavaHL::cxx::move(prompter);
}
void
@@ -311,7 +311,7 @@ Prompter::UniquePtr OperationContext::cl
{
if (m_prompter.get())
return m_prompter->clone();
- return Prompter::UniquePtr(NULL);
+ return Prompter::UniquePtr();
}
void OperationContext::setTunnelCallback(jobject jtunnelcb)
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/OperationContext.h
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/OperationContext.h?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/OperationContext.h (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/OperationContext.h Sat May 23 14:16:56 2020
@@ -37,6 +37,7 @@
#include <jni.h>
#include "Pool.h"
#include "JNIStringHolder.h"
+#include "CxxCompat.hpp"
class Prompter;
@@ -52,7 +53,7 @@ class OperationContext
apr_hash_t * m_config;
- std::auto_ptr<Prompter> m_prompter;
+ JavaHL::cxx::owned_ptr<Prompter> m_prompter;
svn_atomic_t m_cancelOperation;
protected:
@@ -90,7 +91,7 @@ class OperationContext
virtual void username(const char *pi_username);
virtual void password(const char *pi_password);
- virtual void setPrompt(std::auto_ptr<Prompter> prompter);
+ virtual void setPrompt(JavaHL::cxx::owned_ptr<Prompter> prompter);
svn_auth_baton_t *getAuthBaton(SVN::Pool &in_pool);
void cancelOperation();
@@ -100,7 +101,7 @@ class OperationContext
const char *getConfigDirectory() const;
const char *getUsername() const;
const char *getPassword() const;
- std::auto_ptr<Prompter> clonePrompter() const;
+ JavaHL::cxx::owned_ptr<Prompter> clonePrompter() const;
/**
* Set the configuration directory, taking the usual steps to
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/Path.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/Path.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/Path.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/Path.cpp Sat May 23 14:16:56 2020
@@ -28,6 +28,7 @@
#include "Path.h"
#include "svn_path.h"
#include "svn_dirent_uri.h"
+#include "private/svn_dirent_uri_private.h"
#include "JNIUtil.h"
#include "JNIStringHolder.h"
#include "Pool.h"
@@ -164,6 +165,6 @@ URL::initfunc(const char*& path, SVN::Po
svn_error_t*
Relpath::initfunc(const char*& path, SVN::Pool& pool)
{
- path = svn_relpath__internal_style(path, pool.getPool());
- return SVN_NO_ERROR;
+ apr_pool_t *const p = pool.getPool();
+ return svn_error_trace(svn_relpath__make_internal(&path, path, p, p));
}
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/Prompter.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/Prompter.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/Prompter.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/Prompter.cpp Sat May 23 14:16:56 2020
@@ -45,7 +45,7 @@
Prompter::UniquePtr Prompter::create(jobject jprompter)
{
if (!jprompter)
- return UniquePtr(NULL);
+ return UniquePtr();
// Make sure no C++ exceptions are propagated from here.
const ::Java::Env jenv;
@@ -53,12 +53,12 @@ Prompter::UniquePtr Prompter::create(job
{
const jclass cls = ::Java::ClassCache::get_authn_cb(jenv)->get_class();
if (!jenv.IsInstanceOf(jprompter, cls))
- return UniquePtr(NULL);
+ return UniquePtr();
return UniquePtr(new Prompter(jenv, jprompter));
}
SVN_JAVAHL_JNI_CATCH;
- return UniquePtr(NULL);
+ return UniquePtr();
}
Prompter::UniquePtr Prompter::clone() const
@@ -342,8 +342,7 @@ svn_error_t *Prompter::dispatch_ssl_serv
svn_auth_cred_ssl_server_trust_t *cred =
static_cast<svn_auth_cred_ssl_server_trust_t*>(apr_pcalloc(pool, sizeof(*cred)));
cred->may_save = save;
- if (save)
- cred->accepted_failures = failures;
+ cred->accepted_failures = failures;
*cred_p = cred;
return SVN_NO_ERROR;
@@ -432,7 +431,7 @@ svn_error_t *Prompter::dispatch_plaintex
Prompter::UniquePtr CompatPrompter::create(jobject jprompter)
{
if (!jprompter)
- return UniquePtr(NULL);
+ return UniquePtr();
// Make sure no C++ exceptions are propagated from here.
const ::Java::Env jenv;
@@ -441,12 +440,12 @@ Prompter::UniquePtr CompatPrompter::crea
const jclass cls =
::Java::ClassCache::get_user_passwd_cb(jenv)->get_class();
if (!jenv.IsInstanceOf(jprompter, cls))
- return UniquePtr(NULL);
+ return UniquePtr();
return UniquePtr(new CompatPrompter(jenv, jprompter));
}
SVN_JAVAHL_JNI_CATCH;
- return UniquePtr(NULL);
+ return UniquePtr();
}
Prompter::UniquePtr CompatPrompter::clone() const
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/Prompter.h
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/Prompter.h?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/Prompter.h (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/Prompter.h Sat May 23 14:16:56 2020
@@ -35,10 +35,13 @@
#include "jniwrapper/jni_globalref.hpp"
+#include "CxxCompat.hpp"
+
+
class Prompter
{
public:
- typedef ::std::auto_ptr<Prompter> UniquePtr;
+ typedef ::JavaHL::cxx::owned_ptr<Prompter> UniquePtr;
/**
* Factory method; @a prompter is a local reference to the Java
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSession.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSession.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSession.cpp Sat May 23 14:16:56 2020
@@ -104,7 +104,9 @@ RemoteSession::open(jint jretryAttempts,
jobject jremoteSession = open(
jretryAttempts, url.c_str(), uuid,
(jconfigDirectory ? configDirectory.c_str() : NULL),
- usernameStr, passwordStr, prompter, jprogress, jcfgcb, jtunnelcb);
+ usernameStr, passwordStr,
+ JavaHL::cxx::move(prompter),
+ jprogress, jcfgcb, jtunnelcb);
if (JNIUtil::isExceptionThrown() || !jremoteSession)
jremoteSession = NULL;
return jremoteSession;
@@ -120,7 +122,9 @@ RemoteSession::open(jint jretryAttempts,
{
RemoteSession* session = new RemoteSession(
jretryAttempts, url, uuid, configDirectory,
- usernameStr, passwordStr, prompter, jcfgcb, jtunnelcb);
+ usernameStr, passwordStr,
+ JavaHL::cxx::move(prompter),
+ jcfgcb, jtunnelcb);
if (JNIUtil::isJavaExceptionThrown() || !session)
{
delete session;
@@ -169,7 +173,7 @@ RemoteSession::open(jint jretryAttempts,
namespace{
struct compare_c_strings
{
- bool operator()(const char* a, const char* b)
+ bool operator()(const char* a, const char* b) const
{
return (0 < std::strcmp(a, b));
}
@@ -187,18 +191,21 @@ RemoteSession::RemoteSession(int retryAt
: m_session(NULL), m_context(NULL)
{
m_context = new RemoteSessionContext(
- pool, configDirectory, username, password, prompter, jcfgcb, jtunnelcb);
+ pool, configDirectory, username, password,
+ JavaHL::cxx::move(prompter),
+ jcfgcb, jtunnelcb);
if (JNIUtil::isJavaExceptionThrown())
return;
const char* corrected_url = NULL;
+ const char* redirect_url = NULL;
bool cycle_detected = false;
attempt_set attempted;
while (retryAttempts-- >= 0)
{
SVN_JNI_ERR(
- svn_ra_open4(&m_session, &corrected_url,
+ svn_ra_open5(&m_session, &corrected_url, &redirect_url,
url, uuid, m_context->getCallbacks(),
m_context->getCallbackBaton(),
m_context->getConfigData(),
@@ -208,7 +215,7 @@ RemoteSession::RemoteSession(int retryAt
if (!corrected_url)
break;
- attempt_insert result = attempted.insert(corrected_url);
+ attempt_insert result = attempted.insert(redirect_url);
if (!result.second)
{
cycle_detected = true;
@@ -421,31 +428,31 @@ byte_array_to_svn_string(JNIByteArray& a
void
RemoteSession::changeRevisionProperty(
jlong jrevision, jstring jname,
- jbyteArray jold_value, jbyteArray jvalue)
+ jbyteArray jold_propval, jbyteArray jpropval)
{
JNIStringHolder name(jname);
if (JNIUtil::isExceptionThrown())
return;
- JNIByteArray old_value(jold_value);
+ JNIByteArray old_propval(jold_propval);
if (JNIUtil::isExceptionThrown())
return;
- JNIByteArray value(jvalue);
+ JNIByteArray propval(jpropval);
if (JNIUtil::isExceptionThrown())
return;
SVN::Pool subPool(pool);
- svn_string_t* const* p_old_value = NULL;
- svn_string_t* const str_old_value =
- byte_array_to_svn_string(old_value, subPool);
- if (str_old_value)
- p_old_value = &str_old_value;
+ svn_string_t* const* p_old_propval = NULL;
+ svn_string_t* const str_old_propval =
+ byte_array_to_svn_string(old_propval, subPool);
+ if (str_old_propval)
+ p_old_propval = &str_old_propval;
SVN_JNI_ERR(svn_ra_change_rev_prop2(m_session,
svn_revnum_t(jrevision),
- name, p_old_value,
- byte_array_to_svn_string(value, subPool),
+ name, p_old_propval,
+ byte_array_to_svn_string(propval, subPool),
subPool.getPool()), );
}
@@ -856,7 +863,8 @@ RemoteSession::status(jobject jthis, jst
editor->delta_editor(),
editor->delta_baton(),
report_pool),);
- rp->set_reporter_data(raw_reporter, report_baton, editor);
+ rp->set_reporter_data(raw_reporter, report_baton,
+ JavaHL::cxx::move(editor));
}
// TODO: diff
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSession.h
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSession.h?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSession.h (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSession.h Sat May 23 14:16:56 2020
@@ -71,8 +71,8 @@ class RemoteSession : public SVNBase
jlong getLatestRevision();
jlong getRevisionByTimestamp(jlong jtimestamp);
void changeRevisionProperty(jlong jrevision, jstring jname,
- jbyteArray jold_value,
- jbyteArray jvalue);
+ jbyteArray jold_propval,
+ jbyteArray jpropval);
jobject getRevisionProperties(jlong jrevision);
jbyteArray getRevisionProperty(jlong jrevision, jstring jname);
jlong getFile(jlong jrevision, jstring jpath,
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSessionContext.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSessionContext.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSessionContext.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSessionContext.cpp Sat May 23 14:16:56 2020
@@ -43,7 +43,7 @@ RemoteSessionContext::RemoteSessionConte
if (passwordStr != NULL)
password(passwordStr);
- setPrompt(prompter);
+ setPrompt(JavaHL::cxx::move(prompter));
setConfigEventHandler(jcfgcb);
setTunnelCallback(jtunnelcb);
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSessionContext.h
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSessionContext.h?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSessionContext.h (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/RemoteSessionContext.h Sat May 23 14:16:56 2020
@@ -30,6 +30,7 @@
#include "svn_ra.h"
#include "OperationContext.h"
+#include "CxxCompat.hpp"
class RemoteSessionContext : public OperationContext
{
@@ -37,7 +38,7 @@ class RemoteSessionContext : public Oper
RemoteSessionContext(SVN::Pool &pool,
const char* jconfigDirectory,
const char* jusername, const char* jpassword,
- std::auto_ptr<Prompter> prompter,
+ JavaHL::cxx::owned_ptr<Prompter> prompter,
jobject jcfgcb, jobject jtunnelcb);
virtual ~RemoteSessionContext();
void activate(jobject jremoteSession, jobject jprogress);
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/SVNClient.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/SVNClient.cpp Sat May 23 14:16:56 2020
@@ -1055,7 +1055,8 @@ void SVNClient::diff(const char *target1
options.useGitDiffFormat(),
SVN_APR_LOCALE_CHARSET,
outputStream.getStream(subPool),
- NULL /* error file */,
+ // Discard stderr; TODO: Update JavaHL API
+ svn_stream_empty(subPool.getPool()),
changelists.array(subPool),
ctx,
subPool.getPool()),
@@ -1084,7 +1085,8 @@ void SVNClient::diff(const char *target1
options.useGitDiffFormat(),
SVN_APR_LOCALE_CHARSET,
outputStream.getStream(subPool),
- NULL /* error stream */,
+ // Discard stderr; TODO: Update JavaHL API
+ svn_stream_empty(subPool.getPool()),
changelists.array(subPool),
ctx,
subPool.getPool()),
@@ -1282,7 +1284,9 @@ void SVNClient::blame(const char *path,
if (ctx == NULL)
return;
- SVN_JNI_ERR(svn_client_blame5(
+ SVN_JNI_ERR(svn_client_blame6(
+ callback->get_start_revnum_p(),
+ callback->get_end_revnum_p(),
intPath.c_str(), pegRevision.revision(), revisionStart.revision(),
revisionEnd.revision(),
options.fileOptions(subPool), ignoreMimeType,
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/SVNRepos.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/SVNRepos.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/SVNRepos.cpp Sat May 23 14:16:56 2020
@@ -332,6 +332,7 @@ void SVNRepos::load(File &path,
bool usePostCommitHook,
bool validateProps,
bool ignoreDates,
+ bool normalizeProps,
const char *relativePath,
ReposNotifyCallback *notifyCallback)
{
@@ -368,10 +369,10 @@ void SVNRepos::load(File &path,
path.getInternalStyle(requestPool), NULL,
requestPool.getPool(), requestPool.getPool()), );
- SVN_JNI_ERR(svn_repos_load_fs5(repos, dataIn.getStream(requestPool),
+ SVN_JNI_ERR(svn_repos_load_fs6(repos, dataIn.getStream(requestPool),
lower, upper, uuid_action, relativePath,
usePreCommitHook, usePostCommitHook,
- validateProps, ignoreDates,
+ validateProps, ignoreDates, normalizeProps,
notifyCallback != NULL
? ReposNotifyCallback::notify
: NULL,
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/SVNRepos.h
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/SVNRepos.h?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/SVNRepos.h (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/SVNRepos.h Sat May 23 14:16:56 2020
@@ -61,7 +61,7 @@ class SVNRepos : public SVNBase
Revision &revsionStart, Revision &revisionEnd,
bool ignoreUUID, bool forceUUID,
bool usePreCommitHook, bool usePostCommitHook,
- bool validateProps, bool ignoreDates,
+ bool validateProps, bool ignoreDates, bool normalizeProps,
const char *relativePath, ReposNotifyCallback *notifyCallback);
void listUnusedDBLogs(File &path,
MessageReceiver &messageReceiver);
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/StateReporter.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/StateReporter.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/StateReporter.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/StateReporter.cpp Sat May 23 14:16:56 2020
@@ -38,7 +38,7 @@ StateReporter::StateReporter()
: m_valid(false),
m_raw_reporter(NULL),
m_report_baton(NULL),
- m_editor(NULL),
+ m_editor(),
m_target_revision(SVN_INVALID_REVNUM)
{}
@@ -182,7 +182,7 @@ StateReporter::set_reporter_data(const s
{
//DEBUG:fprintf(stderr, " (n) StateReporter::set_reporter_data()\n");
- m_editor = editor;
+ m_editor = JavaHL::cxx::move(editor);
m_raw_reporter = raw_reporter;
m_report_baton = report_baton;
m_valid = true;
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_class_cache.cpp Sat May 23 14:16:56 2020
@@ -42,10 +42,11 @@
#include "../Credential.hpp"
#include "../ExternalItem.hpp"
#include "../EditorCallbacks.hpp"
+#include "../CxxCompat.hpp"
namespace
{
-/* This class behaves like a dumbed-down std:auto_ptr, but it
+/* This class behaves like a dumbed-down std:unique_ptr, but it
implements atomic access and modification of the wrapped
pointer. */
class ClassImplPtr
@@ -132,11 +133,11 @@ class ClassCacheImpl
// The statically initialized calss wrappers are always defined and
// therefore do not need atomic access.
-#define JNIWRAPPER_DEFINE_CACHED_CLASS(M, C) \
- std::auto_ptr<Object::ClassImpl> m_impl_##M; \
- const Object::ClassImpl* get_##M(Env) \
- { \
- return m_impl_##M.get(); \
+#define JNIWRAPPER_DEFINE_CACHED_CLASS(M, C) \
+ JavaHL::cxx::owned_ptr<Object::ClassImpl> m_impl_##M; \
+ const Object::ClassImpl* get_##M(Env) \
+ { \
+ return m_impl_##M.get(); \
}
JNIWRAPPER_DEFINE_CACHED_CLASS(object, Object)
@@ -153,7 +154,7 @@ class ClassCacheImpl
Object::ClassImpl* pimpl = m_impl_##M.get(); \
if (!pimpl) \
{ \
- std::auto_ptr<Object::ClassImpl> tmp( \
+ JavaHL::cxx::owned_ptr<Object::ClassImpl> tmp( \
new C::ClassImpl( \
env, env.FindClass(C::m_class_name))); \
pimpl = m_impl_##M.test_and_set(tmp.get()); \
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_io_stream.cpp Sat May 23 14:16:56 2020
@@ -27,6 +27,8 @@
#include "svn_private_config.h"
+#include "../CxxCompat.hpp"
+
// Stream-wrapper-specific mark object type
struct svn_stream_mark_t
{
@@ -197,7 +199,7 @@ InputStream::get_global_stream(Env env,
const bool has_mark = InputStream(env, jstream).mark_supported();
- std::auto_ptr<GlobalObject> baton(new GlobalObject(env, jstream));
+ JavaHL::cxx::owned_ptr<GlobalObject> baton(new GlobalObject(env, jstream));
svn_stream_t* const stream = svn_stream_create(baton.get(), pool.getPool());
svn_stream_set_read2(stream, global_stream_read,
@@ -268,7 +270,7 @@ OutputStream::get_global_stream(Env env,
if (!jstream)
return NULL;
- std::auto_ptr<GlobalObject> baton(new GlobalObject(env, jstream));
+ JavaHL::cxx::owned_ptr<GlobalObject> baton(new GlobalObject(env, jstream));
svn_stream_t* const stream = svn_stream_create(baton.get(), pool.getPool());
svn_stream_set_write(stream, global_stream_write);
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_list.hpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_list.hpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_list.hpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/jniwrapper/jni_list.hpp Sat May 23 14:16:56 2020
@@ -173,7 +173,10 @@ public:
{
Iterator iter(get_iterator());
while (iter.has_next())
- function(T(m_env, NativeT(iter.next())));
+ {
+ ::Java::LocalFrame frame(m_env);
+ function(T(m_env, NativeT(iter.next())));
+ }
return function;
}
};
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Sat May 23 14:16:56 2020
@@ -280,7 +280,7 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
- cl->getClientContext().setPrompt(prompter);
+ cl->getClientContext().setPrompt(JavaHL::cxx::move(prompter));
}
JNIEXPORT void JNICALL
@@ -298,7 +298,7 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
- cl->getClientContext().setPrompt(prompter);
+ cl->getClientContext().setPrompt(JavaHL::cxx::move(prompter));
}
JNIEXPORT void JNICALL
@@ -1656,10 +1656,11 @@ Java_org_apache_subversion_javahl_SVNCli
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_blame
-(JNIEnv *env, jobject jthis, jstring jpath, jobject jpegRevision,
+(JNIEnv *env, jobject jthis,
+ jstring jpath, jobject jpegRevision,
jobject jrevisionStart, jobject jrevisionEnd, jboolean jignoreMimeType,
- jboolean jincludeMergedRevisions, jobject jblameCallback,
- jobject jdiffOptions)
+ jboolean jincludeMergedRevisions, jobject jdiffOptions,
+ jobject jrangeCallback, jobject jlineCallback)
{
JNIEntry(SVNClient, blame);
SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -1688,7 +1689,7 @@ Java_org_apache_subversion_javahl_SVNCli
if (JNIUtil::isExceptionThrown())
return;
- BlameCallback callback(jblameCallback);
+ BlameCallback callback(jrangeCallback, jlineCallback);
cl->blame(path, pegRevision, revisionStart, revisionEnd,
jignoreMimeType ? true : false,
jincludeMergedRevisions ? true : false, &callback,
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp Sat May 23 14:16:56 2020
@@ -247,7 +247,7 @@ Java_org_apache_subversion_javahl_SVNRep
jobject jrevisionStart, jobject jrevisionEnd,
jboolean jignoreUUID, jboolean jforceUUID,
jboolean jusePreCommitHook, jboolean jusePostCommitHook,
- jboolean jvalidateProps, jboolean jignoreDates,
+ jboolean jvalidateProps, jboolean jignoreDates, jboolean jnormalizeProps,
jstring jrelativePath, jobject jnotifyCallback)
{
JNIEntry(SVNRepos, load);
@@ -287,6 +287,7 @@ Java_org_apache_subversion_javahl_SVNRep
jusePostCommitHook ? true : false,
jvalidateProps ? true : false,
jignoreDates ? true : false,
+ jnormalizeProps ? true : false,
relativePath,
(jnotifyCallback != NULL ? ¬ifyCallback : NULL));
}
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp Sat May 23 14:16:56 2020
@@ -157,13 +157,13 @@ Java_org_apache_subversion_javahl_remote
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_remote_RemoteSession_nativeChangeRevisionProperty(
JNIEnv *env, jobject jthis, jlong jrevision, jstring jname,
- jbyteArray jold_value, jbyteArray jvalue)
+ jbyteArray jold_propval, jbyteArray jpropval)
{
JNIEntry(RemoteSession, nativeChangeRevisionProperty);
RemoteSession *ras = RemoteSession::getCppObject(jthis);
CPPADDR_NULL_PTR(ras, );
- return ras->changeRevisionProperty(jrevision, jname, jold_value, jvalue);
+ return ras->changeRevisionProperty(jrevision, jname, jold_propval, jpropval);
}
JNIEXPORT jobject JNICALL
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_ConfigImpl_Category.cpp Sat May 23 14:16:56 2020
@@ -185,12 +185,12 @@ Java_org_apache_subversion_javahl_util_C
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_set_1str(
JNIEnv* env, jobject jthis, jstring jcategory, jlong jcontext,
- jstring jsection, jstring joption, jstring jvalue)
+ jstring jsection, jstring joption, jstring jconfigval)
{
JNIEntry(ConfigImpl$Category, set_str);
const ImplContext ctx(env, jthis, jcategory, jcontext, jsection, joption);
- JNIStringHolder value(jvalue);
+ JNIStringHolder value(jconfigval);
if (JNIUtil::isJavaExceptionThrown())
return;
@@ -202,27 +202,27 @@ Java_org_apache_subversion_javahl_util_C
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_set_1bool(
JNIEnv* env, jobject jthis, jstring jcategory, jlong jcontext,
- jstring jsection, jstring joption, jboolean jvalue)
+ jstring jsection, jstring joption, jboolean jconfigval)
{
JNIEntry(ConfigImpl$Category, set_bool);
const ImplContext ctx(env, jthis, jcategory, jcontext, jsection, joption);
svn_config_set_bool(ctx.m_config,
ctx.m_section.c_str(), ctx.m_option.c_str(),
- bool(jvalue));
+ bool(jconfigval));
}
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_util_ConfigImpl_00024Category_set_1long(
JNIEnv* env, jobject jthis, jstring jcategory, jlong jcontext,
- jstring jsection, jstring joption, jlong jvalue)
+ jstring jsection, jstring joption, jlong jconfigval)
{
JNIEntry(ConfigImpl$Category, set_long);
const ImplContext ctx(env, jthis, jcategory, jcontext, jsection, joption);
svn_config_set_int64(ctx.m_config,
ctx.m_section.c_str(), ctx.m_option.c_str(),
- apr_int64_t(jvalue));
+ apr_int64_t(jconfigval));
}
JNIEXPORT jobject JNICALL
@@ -287,16 +287,16 @@ Java_org_apache_subversion_javahl_util_C
jstring jname = JNIUtil::makeJString(name);
if (JNIUtil::isJavaExceptionThrown())
return false;
- jstring jvalue = JNIUtil::makeJString(value);
+ jstring jconfigval = JNIUtil::makeJString(value);
if (JNIUtil::isJavaExceptionThrown())
return false;
- e->CallVoidMethod(jh, mid, jname, jvalue);
+ e->CallVoidMethod(jh, mid, jname, jconfigval);
if (JNIUtil::isJavaExceptionThrown())
return false;
e->DeleteLocalRef(jname);
- e->DeleteLocalRef(jvalue);
+ e->DeleteLocalRef(jconfigval);
return true;
}
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_PropLib.cpp Sat May 23 14:16:56 2020
@@ -210,13 +210,13 @@ private:
const bool m_old_format;
SVN::Pool& m_iterpool;
};
-} // anoymous namespace
+} // anonymous namespace
JNIEXPORT jbyteArray JNICALL
Java_org_apache_subversion_javahl_util_PropLib_checkNodeProp(
JNIEnv* jenv, jobject jthis,
- jstring jname, jbyteArray jvalue, jstring jpath, jobject jkind,
+ jstring jname, jbyteArray jpropval, jstring jpath, jobject jkind,
jstring jmime_type, jobject jfile_contents,
jboolean jskip_some_checks)
{
@@ -228,7 +228,7 @@ Java_org_apache_subversion_javahl_util_P
SVN_JAVAHL_OLDSTYLE_EXCEPTION_CHECK(env);
const Java::String name_str(env, jname);
- const Java::ByteArray value(env, jvalue);
+ const Java::ByteArray value(env, jpropval);
const Java::String path_str(env, jpath);
const Java::String mime_type_str(env, jmime_type);
Java::InputStream file_contents(env, jfile_contents);
Modified: subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/native/org_apache_subversion_javahl_util_SubstLib.cpp Sat May 23 14:16:56 2020
@@ -37,6 +37,7 @@
#include "JNIUtil.h"
#include "NativeStream.hpp"
#include "Utility.hpp"
+#include "CxxCompat.hpp"
#include <apr_hash.h>
@@ -165,7 +166,7 @@ Java_org_apache_subversion_javahl_util_S
const Java::Env env(jenv);
// We'll allocate the stream in the bound object's pool.
- std::auto_ptr<JavaHL::NativeInputStream>
+ JavaHL::cxx::owned_ptr<JavaHL::NativeInputStream>
translated(new JavaHL::NativeInputStream());
svn_stream_t* source = Java::InputStream::get_global_stream(
env, jsource, translated->get_pool());
@@ -199,7 +200,7 @@ Java_org_apache_subversion_javahl_util_S
const Java::Env env(jenv);
// We'll allocate the stream in the bound object's pool.
- std::auto_ptr<JavaHL::NativeOutputStream>
+ JavaHL::cxx::owned_ptr<JavaHL::NativeOutputStream>
translated(new JavaHL::NativeOutputStream());
svn_stream_t* destination = Java::OutputStream::get_global_stream(
env, jdestination, translated->get_pool());
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ClientNotifyInformation.java Sat May 23 14:16:56 2020
@@ -199,7 +199,7 @@ public class ClientNotifyInformation ext
}
/**
- * @deprecated Constructor compatible with teh 1.8 API; uses
+ * @deprecated Constructor compatible with the 1.8 API; uses
* <code>null</code> URL and errMsgStack values.
*/
@Deprecated
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItemStateFlags.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItemStateFlags.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItemStateFlags.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/CommitItemStateFlags.java Sat May 23 14:16:56 2020
@@ -23,6 +23,8 @@
package org.apache.subversion.javahl;
+import java.lang.annotation.*;
+
/**
* The constants in this interface describe the changes to an item to
* be committed.
@@ -32,36 +34,43 @@ public interface CommitItemStateFlags
/**
* the item has been added
*/
+ @Native
public static final int Add=1;
/**
* the item has been deleted
*/
+ @Native
public static final int Delete=2;
/**
* the item has text modifications
*/
+ @Native
public static final int TextMods=4;
/**
* the item has property modifications
*/
+ @Native
public static final int PropMods=8;
/**
* the item has been copied
*/
+ @Native
public static final int IsCopy=16;
/**
* the item has a lock token
*/
+ @Native
public static final int LockToken = 32;
/**
* the item was moved to this location
* @since 1.8
*/
+ @Native
public static int MovedHere = 64;
}
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java Sat May 23 14:16:56 2020
@@ -33,7 +33,7 @@ import java.util.Set;
import java.util.Map;
/**
- * This interface is the commom interface for all subversion
+ * This interface is the common interface for all subversion
* operations. It is implemented by SVNClient
*
* @since 1.7
@@ -89,7 +89,7 @@ public interface ISVNClient
* has effect when <code>onServer</code> is
* <code>true</code>.
* @param getAll get status for uninteresting (unchanged) files.
- * @param noIgnore get status for normaly ignored files and directories.
+ * @param noIgnore get status for normally ignored files and directories.
* @param ignoreExternals if externals are ignored during status
* @param depthAsSticky When set, interpret <code>depth</code> as
* the ambient depth of the working copy.
@@ -633,7 +633,7 @@ public interface ISVNClient
* @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
+ * the node type is not known, 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.
@@ -664,7 +664,7 @@ public interface ISVNClient
* @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
+ * the node type is not known, 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.
@@ -1386,7 +1386,7 @@ public interface ISVNClient
/**
* Retrieve the content together with the author, the revision and the date
- * of the last change of each line
+ * of the last change of each line.
* @param path the path
* @param pegRevision the revision to interpret the path
* @param revisionStart the first revision to show
@@ -1394,17 +1394,37 @@ public interface ISVNClient
* @param ignoreMimeType whether or not to ignore the mime-type
* @param includeMergedRevisions whether or not to include extra merge
* information
- * @param callback callback to receive the file content and the other
- * information
* @param options additional options for controlling the output
+ * @param rangeCallback receives the resolved revision range; called
+ * exactly once before #lineCallback
+ * @param lineCallback callback to receive the file content and the other
+ * information for every line in the file
* @throws ClientException
- * @since 1.9
+ * @since 1.12
+ */
+ void blame(String path, Revision pegRevision, Revision revisionStart,
+ Revision revisionEnd, boolean ignoreMimeType,
+ boolean includeMergedRevisions, DiffOptions options,
+ BlameRangeCallback rangeCallback,
+ BlameLineCallback lineCallback)
+ throws ClientException;
+
+ /**
+ * Retrieve the content together with the author, the revision and the date
+ * of the last change of each line
+ * <p>
+ * Behaves like the 1.12 version but uses BlameCallback instead of
+ * BlameLineCallback. The former expects that file contents can be
+ * converted from UTF-8 to a String, which is not true in general
+ * and may throw exceptions.
+ * @deprecated Use the 1.12 version with BlameLineCallback
*/
+ @Deprecated
void blame(String path, Revision pegRevision, Revision revisionStart,
Revision revisionEnd, boolean ignoreMimeType,
boolean includeMergedRevisions,
BlameCallback callback, DiffOptions options)
- throws ClientException;
+ throws ClientException;
/**
* Retrieve the content together with the author, the revision and the date
@@ -1412,12 +1432,14 @@ public interface ISVNClient
* <p>
* Behaves like the 1.9 version with <code>options</code> set to
* their default values.
+ * @deprecated Use the 1.12 version with BlameLineCallback
*/
+ @Deprecated
void blame(String path, Revision pegRevision, Revision revisionStart,
Revision revisionEnd, boolean ignoreMimeType,
boolean includeMergedRevisions,
BlameCallback callback)
- throws ClientException;
+ throws ClientException;
/**
* Set directory for the configuration information, taking the
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java Sat May 23 14:16:56 2020
@@ -121,7 +121,7 @@ public interface ISVNRemote
*<p>
* <b>Note:</b> If the server has Capability.atomic_revprops and
* <code>oldValue</code> is not <code>null</code>, and the present
- * value of the propery is not <code>oldValue</code> (e.g., if
+ * value of the property is not <code>oldValue</code> (e.g., if
* another client changed the property), then the operation will
* fail.
*<p>
@@ -129,8 +129,8 @@ public interface ISVNRemote
* Capability.atomic_revprops, then <code>oldValue</code>
* <em>must</em> be <code>null</code>.
*<p>
- * @param revision The revision to which the propery is attached
- * @param propertyName The name of the propery
+ * @param revision The revision to which the property is attached
+ * @param propertyName The name of the property
* @param oldValue The previous value of the property (see note below)
* @param newValue The new value of the property. If <code>newValue</code>
* is <code>null</code>, the property will be deleted.
@@ -280,7 +280,7 @@ public interface ISVNRemote
* <p>
* <code>direntFields</code> controls which portions of the DirEntry
* objects are filled in. To have them completely filled in, just pass
- * DirEntry.Fields.all, othewise pass a bitwise OR of any of the
+ * DirEntry.Fields.all, otherwise pass a bitwise OR of any of the
* DirEntry.Fields flags you would like to have.
* <p>
* If <code>properties</code> is not <code>null</code>, set
@@ -405,8 +405,8 @@ public interface ISVNRemote
* <p>
* If <code>startRevision</code> or <code>endRevision</code> is
* {@link org.apache.subversion.javahl.types.Revision#SVN_INVALID_REVNUM},
- * the HEAD revision is uses for that argument. If eiter is an
- * invaild non-existent revision, an error will be returned.
+ * the HEAD revision is uses for that argument. If either is an
+ * invalid non-existent revision, an error will be returned.
* <p>
* If <code>paths</code> is not <code>null</code> and has one or
* more elements, then only show revisions in which at least one
@@ -519,7 +519,7 @@ public interface ISVNRemote
}
/**
- * @return The repository-relative path of the obejct in this
+ * @return The repository-relative path of the object in this
* history segment.
*/
public String getPath() { return path; }
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java Sat May 23 14:16:56 2020
@@ -96,7 +96,7 @@ public interface ISVNRepos {
* @param dataOut the data will be outputed here
* @param start the first revision to be dumped
* @param end the last revision to be dumped
- * @param incremental the dump will be incremantal
+ * @param incremental the dump will be incremental
* @param useDeltas the dump will contain deltas between nodes
* @param callback the callback to receive notifications
* @throws ClientException throw in case of problem
@@ -151,6 +151,39 @@ public interface ISVNRepos {
* 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
+ * @param usePreCommitHook use the pre-commit hook when processing commits
+ * @param usePostCommitHook use the post-commit hook when processing commits
+ * @param validateProps validate "svn:" revision and node properties
+ * @param ignoreDates ignore revision datestamps in the dump stream
+ * @param normalizeProps attempt to normalize invalid Subversion
+ * revision and node properties
+ * @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
+ * @since 1.10
+ */
+ public abstract void load(File path, InputStream dataInput,
+ Revision start, Revision end,
+ boolean ignoreUUID, boolean forceUUID,
+ boolean usePreCommitHook,
+ boolean usePostCommitHook,
+ boolean validateProps,
+ boolean ignoreDates,
+ boolean normalizeProps,
+ 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 start the first revision to load
* @param end the last revision to load
* @param ignoreUUID ignore any UUID found in the input stream
@@ -219,7 +252,7 @@ public interface ISVNRepos {
* 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
+ * @note behaves like the 1.8 version with the revision
* parameters set to Revision.START and Revision.HEAD.
*/
public abstract void load(File path, InputStream dataInput,
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java Sat May 23 14:16:56 2020
@@ -27,7 +27,7 @@ import org.apache.subversion.javahl.type
import org.apache.subversion.javahl.types.RuntimeVersion;
/**
- * Handles activities related to management of native resouces
+ * Handles activities related to management of native resources
* (e.g. loading of native libraries).
*
* Public for backward compat. This class may disappear in future versions
@@ -141,12 +141,15 @@ public class NativeResources
*/
private static final void init()
{
+ final int SVN_VER_MAJOR = 1;
+ final int SVN_VER_MINOR = 15;
initNativeLibrary();
version = new Version();
- if (!version.isAtLeast(1, 10, 0))
+ if (!version.isAtLeast(SVN_VER_MAJOR, SVN_VER_MINOR, 0))
{
throw new LinkageError("Native library version must be at least " +
- "1.10.0, but is only " + version);
+ SVN_VER_MAJOR + "." + SVN_VER_MINOR + ".0," +
+ "but is only " + version);
}
runtimeVersion = new RuntimeVersion();
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java Sat May 23 14:16:56 2020
@@ -30,6 +30,7 @@ import java.io.OutputStream;
import java.io.FileOutputStream;
import java.io.FileNotFoundException;
import java.io.ByteArrayOutputStream;
+import java.io.UnsupportedEncodingException;
import java.util.Collection;
import java.util.Collections;
@@ -77,7 +78,7 @@ public class SVNClient implements ISVNCl
/**
* Build the native peer
- * @return the adress of the peer
+ * @return the address of the peer
*/
private native long ctNative();
@@ -92,7 +93,7 @@ public class SVNClient implements ISVNCl
public native void finalize();
/**
- * slot for the adress of the native peer. The JNI code is the only user
+ * slot for the address of the native peer. The JNI code is the only user
* of this member
*/
protected long cppAddr;
@@ -705,6 +706,7 @@ public class SVNClient implements ISVNCl
boolean ignoreExternals)
throws ClientException;
+ @Deprecated
public void blame(String path, Revision pegRevision,
Revision revisionStart,
Revision revisionEnd, boolean ignoreMimeType,
@@ -716,13 +718,28 @@ public class SVNClient implements ISVNCl
includeMergedRevisions, callback, null);
}
+ @Deprecated
+ public void blame(String path, Revision pegRevision,
+ Revision revisionStart,
+ Revision revisionEnd, boolean ignoreMimeType,
+ boolean includeMergedRevisions,
+ BlameCallback callback,
+ DiffOptions options)
+ throws ClientException
+ {
+ blame(path, pegRevision, revisionStart, revisionEnd,
+ ignoreMimeType, includeMergedRevisions, options,
+ null, new BlameCallbackAdapter(callback));
+ }
+
public native void blame(String path, Revision pegRevision,
Revision revisionStart,
Revision revisionEnd, boolean ignoreMimeType,
boolean includeMergedRevisions,
- BlameCallback callback,
- DiffOptions options)
- throws ClientException;
+ DiffOptions options,
+ BlameRangeCallback rangeCallback,
+ BlameLineCallback lineCallback)
+ throws ClientException;
public native void setConfigDirectory(String configDir)
throws ClientException;
@@ -897,4 +914,42 @@ public class SVNClient implements ISVNCl
null);
}
}
+
+ /**
+ * A private class that adapts from BlameLineCallback to BlameCallback.
+ */
+ @Deprecated
+ private class BlameCallbackAdapter implements BlameLineCallback
+ {
+ private BlameCallback wrappedCallback = null;
+
+ public BlameCallbackAdapter(BlameCallback callback)
+ {
+ wrappedCallback = callback;
+ }
+
+ // Implementation of BlameLineCallback
+ public void singleLine(long lineNum, long revision,
+ Map<String, byte[]> revProps, long mergedRevision,
+ Map<String, byte[]> mergedRevProps,
+ String mergedPath, boolean localChange,
+ byte[] line)
+ throws ClientException
+ {
+ if (wrappedCallback == null)
+ return;
+
+ String convertedLine = null;
+ try {
+ convertedLine = new String(line, "UTF-8");
+ }
+ catch (UnsupportedEncodingException ex) {
+ throw ClientException.fromException(ex);
+ }
+
+ wrappedCallback.singleLine(lineNum, revision,
+ revProps, mergedRevision, mergedRevProps,
+ mergedPath, convertedLine, localChange);
+ }
+ }
}
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java Sat May 23 14:16:56 2020
@@ -65,7 +65,7 @@ public class SVNRepos implements ISVNRep
/**
* Build the native peer
- * @return the adress of the peer
+ * @return the address of the peer
*/
private native long ctNative();
@@ -81,7 +81,7 @@ public class SVNRepos implements ISVNRep
public native void finalize();
/**
- * slot for the adress of the native peer. The JNI code is the only user
+ * slot for the address of the native peer. The JNI code is the only user
* of this member
*/
protected long cppAddr;
@@ -160,6 +160,17 @@ public class SVNRepos implements ISVNRep
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,
+ false, false, false, relativePath, callback);
+ }
+
+ public void load(File path, InputStream dataInput,
Revision start, Revision end,
boolean ignoreUUID, boolean forceUUID,
boolean usePreCommitHook, boolean usePostCommitHook,
@@ -168,18 +179,20 @@ public class SVNRepos implements ISVNRep
{
load(path, dataInput, start, end,
ignoreUUID, forceUUID, usePreCommitHook, usePostCommitHook,
- false, false, relativePath, callback);
+ false, false, false, relativePath, callback);
}
public void load(File path, InputStream dataInput,
+ Revision start, Revision end,
boolean ignoreUUID, boolean forceUUID,
boolean usePreCommitHook, boolean usePostCommitHook,
+ boolean validateProps, boolean ignoreDates,
String relativePath, ReposNotifyCallback callback)
- throws ClientException
+ throws ClientException
{
- load(path, dataInput, Revision.START, Revision.HEAD,
+ load(path, dataInput, start, end,
ignoreUUID, forceUUID, usePreCommitHook, usePostCommitHook,
- false, false, relativePath, callback);
+ validateProps, ignoreDates, false, relativePath, callback);
}
public native void load(File path, InputStream dataInput,
@@ -187,6 +200,7 @@ public class SVNRepos implements ISVNRep
boolean ignoreUUID, boolean forceUUID,
boolean usePreCommitHook, boolean usePostCommitHook,
boolean validateProps, boolean ignoreDates,
+ boolean normalizeProps,
String relativePath, ReposNotifyCallback callback)
throws ClientException;
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNUtil.java Sat May 23 14:16:56 2020
@@ -66,7 +66,7 @@ public class SVNUtil
* remote.RemoteFactory#setPrompt}) will be called every time the
* underlying library needs access to the credentials.
* <p>
- * This mode is intented to support client implementations that
+ * This mode is intended to support client implementations that
* use their own credentials store.
* <p>
* The standard credentials store is enabled by default.
@@ -701,7 +701,7 @@ public class SVNUtil
* owns the property; only used for error messages
* @param kind The node kind of the file or dir that owns the property
* @param mimeType If <code>kind</code> is {@link NodeKind.file}, this is
- * tye file's mime-type, used for extra validation for the
+ * the file's mime-type, used for extra validation for the
* <code>svn:eol-style</code> property. If it is <code>null</code>,
* the extra validation will be skipped.
* @return a canonicalized representation of the property value
@@ -725,7 +725,7 @@ public class SVNUtil
* owns the property; only used for error messages
* @param kind The node kind of the file or dir that owns the property
* @param mimeType If <code>kind</code> is {@link NodeKind.file}, this is
- * tye file's mime-type, used for extra validation for the
+ * the file's mime-type, used for extra validation for the
* <code>svn:eol-style</code> property. If it is <code>null</code>,
* the extra validation will be skipped.
* @param fileContents A stream with the file's contents. Only used
@@ -752,7 +752,7 @@ public class SVNUtil
* parsed external items.
* @param description The externals description.
* @param parentDirectory Used to construct error messages.
- * @param canonicalizeUrl Whe <code>true</code>, canonicalize the
+ * @param canonicalizeUrl When <code>true</code>, canonicalize the
* <code>url</code> member of the returned objects. If the
* <code>url</code> member refers to an absolute URL, it will
* be canonicalized as URL consistent with the way URLs are
@@ -877,7 +877,7 @@ public class SVNUtil
* Build a dictionary of expanded keyword values, given the
* contents of a file's <code>svn:keywords</code> property, its
* revision, URL, the date it was committed on, the author of the
- * commit and teh URL of the repository root.
+ * commit and the URL of the repository root.
*<p>
* Custom keywords defined in <code>svn:keywords</code> properties
* are expanded using the provided parameters and in accordance
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/BlameCallback.java Sat May 23 14:16:56 2020
@@ -31,7 +31,9 @@ import org.apache.subversion.javahl.ISVN
/**
* This interface is used to receive every single line for a file on a
* the {@link ISVNClient#blame} call.
+ * @deprecated use {@link BlameLineCallback} instead.
*/
+@Deprecated
public interface BlameCallback
{
/**
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/TunnelAgent.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/TunnelAgent.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/TunnelAgent.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/TunnelAgent.java Sat May 23 14:16:56 2020
@@ -80,7 +80,7 @@ public interface TunnelAgent
* @param hostname the host part of the svn+tunnel:// URL
* @param port the port part of the svn+tunnel:// URL
*
- * @return an instance od {@link CloseTunnelCallback}, which will
+ * @return an instance of {@link CloseTunnelCallback}, which will
* be invoked when the connection is closed, or
* <code>null</code>.
*
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/UserPasswordCallback.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/UserPasswordCallback.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/UserPasswordCallback.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/UserPasswordCallback.java Sat May 23 14:16:56 2020
@@ -23,6 +23,8 @@
package org.apache.subversion.javahl.callback;
+import java.lang.annotation.*;
+
/**
* <p>The interface for requesting authentication credentials from the
* user. Should the javahl bindings need the matching information,
@@ -40,21 +42,24 @@ public interface UserPasswordCallback
/**
* Reject the connection to the server.
*/
+ @Native
public static final int Reject = 0;
/**
* Accept the connection to the server <i>once</i>.
*/
+ @Native
public static final int AcceptTemporary = 1;
/**
* Accept the connection to the server <i>forever</i>.
*/
+ @Native
public static final int AcceptPermanently = 2;
/**
- * If there are problems with the certifcate of the SSL-server, this
- * callback will be used to deside if the connection will be used.
+ * If there are problems with the certificate of the SSL-server, this
+ * callback will be used to decide if the connection will be used.
* @param info the probblems with the certificate.
* @param allowPermanently if AcceptPermantly is a legal answer
* @return one of Reject/AcceptTemporary/AcceptPermanently
Modified: subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Property.java
URL: http://svn.apache.org/viewvc/subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Property.java?rev=1878061&r1=1878060&r2=1878061&view=diff
==============================================================================
--- subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Property.java (original)
+++ subversion/branches/addremove/subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Property.java Sat May 23 14:16:56 2020
@@ -54,7 +54,7 @@ public class Property
public static final String KEYWORDS = "svn:keywords";
/**
- * flag if the file should be made excutable during retrieval
+ * flag if the file should be made executable during retrieval
*/
public static final String EXECUTABLE = "svn:executable";