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 2013/07/03 01:12:44 UTC
svn commit: r1499145 [1/4] - in /subversion/branches/fsfs-format7: ./
build/ac-macros/ subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/...
Author: stefan2
Date: Tue Jul 2 23:12:42 2013
New Revision: 1499145
URL: http://svn.apache.org/r1499145
Log:
On the fsfs-format7 branch: sync with /trunk up to and including r1499143.
Resolved conflicts in fs_fs.c and mirrored changes into FSX.
Added:
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/EditorProxy.cpp
- copied unchanged from r1499143, subversion/trunk/subversion/bindings/javahl/native/EditorProxy.cpp
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/EditorProxy.h
- copied unchanged from r1499143, subversion/trunk/subversion/bindings/javahl/native/EditorProxy.h
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/StateReporter.cpp
- copied unchanged from r1499143, subversion/trunk/subversion/bindings/javahl/native/StateReporter.cpp
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/StateReporter.h
- copied unchanged from r1499143, subversion/trunk/subversion/bindings/javahl/native/StateReporter.h
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_StateReporter.cpp
- copied unchanged from r1499143, subversion/trunk/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_StateReporter.cpp
subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/RemoteStatus.java
- copied unchanged from r1499143, subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/callback/RemoteStatus.java
subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StateReporter.java
- copied unchanged from r1499143, subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StateReporter.java
subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StatusEditor.java
- copied unchanged from r1499143, subversion/trunk/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/StatusEditor.java
Removed:
subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/UpdateReporter.java
Modified:
subversion/branches/fsfs-format7/ (props changed)
subversion/branches/fsfs-format7/build.conf
subversion/branches/fsfs-format7/build/ac-macros/sqlite.m4
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CommitEditor.cpp
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CommitEditor.h
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CreateJ.cpp
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CreateJ.h
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/JNIUtil.cpp
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/JNIUtil.h
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/RemoteSession.cpp
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/RemoteSession.h
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_CommitEditor.cpp
subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp
subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java
subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java
subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java
subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java
subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
subversion/branches/fsfs-format7/subversion/include/private/svn_wc_private.h
subversion/branches/fsfs-format7/subversion/include/svn_error_codes.h
subversion/branches/fsfs-format7/subversion/libsvn_client/blame.c
subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c
subversion/branches/fsfs-format7/subversion/libsvn_client/log.c
subversion/branches/fsfs-format7/subversion/libsvn_client/merge.c
subversion/branches/fsfs-format7/subversion/libsvn_delta/compat.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/revprops.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h
subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c
subversion/branches/fsfs-format7/subversion/libsvn_fs_x/revprops.c
subversion/branches/fsfs-format7/subversion/libsvn_ra/util.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_local.h
subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_plugin.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blame.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/get_deleted_rev.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getdate.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocations.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocationsegments.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocks.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/inherited_props.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/log.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/merge.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/mergeinfo.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/options.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/property.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/ra_serf.h
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/update.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/util.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/xml.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_svn/client.c
subversion/branches/fsfs-format7/subversion/libsvn_ra_svn/protocol
subversion/branches/fsfs-format7/subversion/libsvn_subr/named_atomic.c
subversion/branches/fsfs-format7/subversion/libsvn_subr/pool.c
subversion/branches/fsfs-format7/subversion/libsvn_wc/deprecated.c
subversion/branches/fsfs-format7/subversion/libsvn_wc/entries.c
subversion/branches/fsfs-format7/subversion/libsvn_wc/info.c
subversion/branches/fsfs-format7/subversion/libsvn_wc/tree_conflicts.c
subversion/branches/fsfs-format7/subversion/libsvn_wc/tree_conflicts.h
subversion/branches/fsfs-format7/subversion/libsvn_wc/upgrade.c
subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db_update_move.c
subversion/branches/fsfs-format7/subversion/po/zh_CN.po
subversion/branches/fsfs-format7/subversion/svn/cleanup-cmd.c
subversion/branches/fsfs-format7/subversion/svn/status.c
subversion/branches/fsfs-format7/subversion/svn/svn.c
subversion/branches/fsfs-format7/subversion/svnserve/serve.c
subversion/branches/fsfs-format7/subversion/tests/cmdline/svnlook_tests.py
subversion/branches/fsfs-format7/subversion/tests/libsvn_client/ (props changed)
subversion/branches/fsfs-format7/subversion/tests/libsvn_fs/fs-test.c
subversion/branches/fsfs-format7/subversion/tests/libsvn_subr/config-test.c
subversion/branches/fsfs-format7/subversion/tests/libsvn_wc/conflict-data-test.c
subversion/branches/fsfs-format7/subversion/tests/svn_test_fs.c
subversion/branches/fsfs-format7/subversion/tests/svn_test_fs.h
subversion/branches/fsfs-format7/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
subversion/branches/fsfs-format7/tools/dev/po-merge.py
subversion/branches/fsfs-format7/tools/dev/unix-build/Makefile.svn
subversion/branches/fsfs-format7/tools/dist/backport.pl
Propchange: subversion/branches/fsfs-format7/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1498044-1498673,1498675-1499143
Modified: subversion/branches/fsfs-format7/build.conf
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/build.conf?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/build.conf (original)
+++ subversion/branches/fsfs-format7/build.conf Tue Jul 2 23:12:42 2013
@@ -71,6 +71,7 @@ private-built-includes =
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteSession.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteFactory.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_CommitEditor.h
+ subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_StateReporter.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_ConfigImpl_Category.h
test-scripts =
Modified: subversion/branches/fsfs-format7/build/ac-macros/sqlite.m4
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/build/ac-macros/sqlite.m4?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/build/ac-macros/sqlite.m4 (original)
+++ subversion/branches/fsfs-format7/build/ac-macros/sqlite.m4 Tue Jul 2 23:12:42 2013
@@ -78,6 +78,10 @@ AC_DEFUN(SVN_LIB_SQLITE,
SVN_SQLITE_FILE_CONFIG($abs_srcdir/sqlite-amalgamation/sqlite3.c)
if test -z "$svn_lib_sqlite"; then
+ SVN_SQLITE_FILE_CONFIG($abs_builddir/sqlite-amalgamation/sqlite3.c)
+ fi
+
+ if test -z "$svn_lib_sqlite"; then
dnl check the "standard" location of /usr
SVN_SQLITE_DIR_CONFIG()
fi
@@ -246,6 +250,8 @@ AC_DEFUN(SVN_DOWNLOAD_SQLITE,
echo "unpack the archive using unzip and rename the resulting"
echo "directory to:"
echo "$abs_srcdir/sqlite-amalgamation"
+ echo "or to:"
+ echo "$abs_builddir/sqlite-amalgamation"
echo ""
AC_MSG_ERROR([Subversion requires SQLite])
])
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CommitEditor.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CommitEditor.cpp?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CommitEditor.cpp (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CommitEditor.cpp Tue Jul 2 23:12:42 2013
@@ -126,36 +126,10 @@ void CommitEditor::dispose(jobject jthis
}
namespace {
-void throw_illegal_state(const char* msg)
-{
- JNIEnv *env = JNIUtil::getEnv();
-
- jclass clazz = env->FindClass("java/lang/IllegalStateException");
- if (JNIUtil::isJavaExceptionThrown())
- return;
-
- static jmethodID ctor_mid = 0;
- if (0 == ctor_mid)
- {
- ctor_mid = env->GetMethodID(clazz, "<init>", "(Ljava/lang/String;)V");
- if (JNIUtil::isJavaExceptionThrown())
- return;
- }
-
- jstring jmsg = JNIUtil::makeJString(msg);
- if (JNIUtil::isJavaExceptionThrown())
- return;
-
- jobject jexception = env->NewObject(clazz, ctor_mid, jmsg);
- if (JNIUtil::isJavaExceptionThrown())
- return;
-
- env->Throw((jthrowable)jexception);
-}
-
void throw_editor_inactive()
{
- throw_illegal_state(_("The editor is not active"));
+ JNIUtil::raiseThrowable("java/lang/IllegalStateException",
+ _("The editor is not active"));
}
void throw_not_implemented(const char* fname)
@@ -163,7 +137,7 @@ void throw_not_implemented(const char* f
std::string msg = _("Not implemented: ");
msg += "CommitEditor.";
msg += fname;
- throw_illegal_state(msg.c_str());
+ JNIUtil::raiseThrowable("java/lang/RuntimeException", msg.c_str());
}
const apr_array_header_t*
@@ -285,11 +259,7 @@ void CommitEditor::addDirectory(jstring
jobject jchildren, jobject jproperties,
jlong jreplaces_revision)
{
- if (!m_valid)
- {
- throw_editor_inactive();
- return;
- }
+ if (!m_valid) { throw_editor_inactive(); return; }
SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
Iterator children(jchildren);
@@ -316,11 +286,7 @@ void CommitEditor::addFile(jstring jrelp
jobject jproperties,
jlong jreplaces_revision)
{
- if (!m_valid)
- {
- throw_editor_inactive();
- return;
- }
+ if (!m_valid) { throw_editor_inactive(); return; }
SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
InputStream contents(jcontents);
@@ -353,11 +319,7 @@ void CommitEditor::addSymlink(jstring jr
void CommitEditor::addAbsent(jstring jrelpath, jobject jkind,
jlong jreplaces_revision)
{
- if (!m_valid)
- {
- throw_editor_inactive();
- return;
- }
+ if (!m_valid) { throw_editor_inactive(); return; }
SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
SVN::Pool subPool(pool);
@@ -374,11 +336,7 @@ void CommitEditor::addAbsent(jstring jre
void CommitEditor::alterDirectory(jstring jrelpath, jlong jrevision,
jobject jchildren, jobject jproperties)
{
- if (!m_valid)
- {
- throw_editor_inactive();
- return;
- }
+ if (!m_valid) { throw_editor_inactive(); return; }
SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
Iterator children(jchildren);
@@ -404,11 +362,7 @@ void CommitEditor::alterFile(jstring jre
jobject jchecksum, jobject jcontents,
jobject jproperties)
{
- if (!m_valid)
- {
- throw_editor_inactive();
- return;
- }
+ if (!m_valid) { throw_editor_inactive(); return; }
SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
InputStream contents(jcontents);
@@ -440,11 +394,7 @@ void CommitEditor::alterSymlink(jstring
void CommitEditor::remove(jstring jrelpath, jlong jrevision)
{
- if (!m_valid)
- {
- throw_editor_inactive();
- return;
- }
+ if (!m_valid) { throw_editor_inactive(); return; }
SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
SVN::Pool subPool(pool);
@@ -460,11 +410,7 @@ void CommitEditor::remove(jstring jrelpa
void CommitEditor::copy(jstring jsrc_relpath, jlong jsrc_revision,
jstring jdst_relpath, jlong jreplaces_revision)
{
- if (!m_valid)
- {
- throw_editor_inactive();
- return;
- }
+ if (!m_valid) { throw_editor_inactive(); return; }
SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
SVN::Pool subPool(pool);
@@ -487,11 +433,7 @@ void CommitEditor::copy(jstring jsrc_rel
void CommitEditor::move(jstring jsrc_relpath, jlong jsrc_revision,
jstring jdst_relpath, jlong jreplaces_revision)
{
- if (!m_valid)
- {
- throw_editor_inactive();
- return;
- }
+ if (!m_valid) { throw_editor_inactive(); return; }
SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
SVN::Pool subPool(pool);
@@ -511,13 +453,9 @@ void CommitEditor::move(jstring jsrc_rel
svn_revnum_t(jreplaces_revision)),);
}
-void CommitEditor::rotate(jobject jelements)
-{
-// if (!m_valid)
-// {
-// throw_editor_inactive();
-// return;
-// }
+// void CommitEditor::rotate(jobject jelements)
+// {
+// if (!m_valid) { throw_editor_inactive(); return; }
// SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
//
// SVN::Pool subPool(pool);
@@ -528,16 +466,11 @@ void CommitEditor::rotate(jobject jeleme
// return;
//
// SVN_JNI_ERR(svn_editor_rotate(m_editor, relpaths, revisions),);
- throw_not_implemented("rotate");
-}
+// }
void CommitEditor::complete()
{
- if (!m_valid)
- {
- throw_editor_inactive();
- return;
- }
+ if (!m_valid) { throw_editor_inactive(); return; }
SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
SVN_JNI_ERR(svn_editor_complete(m_editor),);
@@ -546,11 +479,7 @@ void CommitEditor::complete()
void CommitEditor::abort()
{
- if (!m_valid)
- {
- throw_editor_inactive();
- return;
- }
+ if (!m_valid) { throw_editor_inactive(); return; }
SVN_JNI_ERR(m_session->m_context->checkCancel(m_session->m_context),);
SVN_JNI_ERR(svn_editor_abort(m_editor),);
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CommitEditor.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CommitEditor.h?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CommitEditor.h (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CommitEditor.h Tue Jul 2 23:12:42 2013
@@ -81,7 +81,7 @@ public:
jstring jdst_relpath, jlong jreplaces_revision);
void move(jstring jsrc_relpath, jlong jsrc_revision,
jstring jdst_relpath, jlong jreplaces_revision);
- void rotate(jobject jelements);
+ // void rotate(jobject jelements);
void complete();
void abort();
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CreateJ.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CreateJ.cpp?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CreateJ.cpp (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CreateJ.cpp Tue Jul 2 23:12:42 2013
@@ -1124,7 +1124,7 @@ CreateJ::RevisionRangeList(svn_rangelist
}
jobject
-CreateJ::StringSet(apr_array_header_t *strings)
+CreateJ::StringSet(const apr_array_header_t *strings)
{
std::vector<jobject> jstrs;
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CreateJ.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CreateJ.h?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CreateJ.h (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/native/CreateJ.h Tue Jul 2 23:12:42 2013
@@ -84,7 +84,7 @@ class CreateJ
RevisionRangeList(svn_rangelist_t *ranges);
static jobject
- StringSet(apr_array_header_t *strings);
+ StringSet(const apr_array_header_t *strings);
static jobject
PropertyMap(apr_hash_t *prop_hash);
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/native/JNIUtil.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/native/JNIUtil.cpp?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/native/JNIUtil.cpp (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/native/JNIUtil.cpp Tue Jul 2 23:12:42 2013
@@ -705,11 +705,11 @@ bool JNIUtil::isJavaExceptionThrown()
return false;
}
-const char *
-JNIUtil::thrownExceptionToCString(SVN::Pool &in_pool)
+namespace {
+const char* exception_to_cstring(apr_pool_t* pool)
{
const char *msg;
- JNIEnv *env = getEnv();
+ JNIEnv *env = JNIUtil::getEnv();
if (env->ExceptionCheck())
{
jthrowable t = env->ExceptionOccurred();
@@ -718,12 +718,12 @@ JNIUtil::thrownExceptionToCString(SVN::P
{
jclass clazz = env->FindClass("java/lang/Throwable");
getMessage = env->GetMethodID(clazz, "getMessage",
- "(V)Ljava/lang/String;");
+ "()Ljava/lang/String;");
env->DeleteLocalRef(clazz);
}
jstring jmsg = (jstring) env->CallObjectMethod(t, getMessage);
JNIStringHolder tmp(jmsg);
- msg = tmp.pstrdup(in_pool.getPool());
+ msg = tmp.pstrdup(pool);
// ### Conditionally add t.printStackTrace() to msg?
}
else
@@ -732,6 +732,24 @@ JNIUtil::thrownExceptionToCString(SVN::P
}
return msg;
}
+} // anonymous namespace
+
+const char *
+JNIUtil::thrownExceptionToCString(SVN::Pool &in_pool)
+{
+ return exception_to_cstring(in_pool.getPool());
+}
+
+svn_error_t*
+JNIUtil::checkJavaException(apr_status_t errorcode)
+{
+ if (!getEnv()->ExceptionCheck())
+ return SVN_NO_ERROR;
+ svn_error_t* err = svn_error_create(errorcode, NULL, NULL);
+ err->message = apr_psprintf(err->pool, _("Java exception: %s"),
+ exception_to_cstring(err->pool));
+ return err;
+}
/**
* Create a Java string from a native UTF-8 string.
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/native/JNIUtil.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/native/JNIUtil.h?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/native/JNIUtil.h (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/native/JNIUtil.h Tue Jul 2 23:12:42 2013
@@ -40,6 +40,8 @@ class SVNBase;
#include <vector>
struct svn_error_t;
+#include "svn_error.h"
+
#define JAVA_PACKAGE "org/apache/subversion/javahl"
struct svn_string_t;
@@ -109,6 +111,12 @@ class JNIUtil
static const char *thrownExceptionToCString(SVN::Pool &in_pool);
/**
+ * Check if a Java exception was thrown and convert it to a
+ * Subversion error, using @a errorcode as the generic error code.
+ */
+ static svn_error_t* checkJavaException(apr_status_t errorcode);
+
+ /**
* Throw a Java exception corresponding to err, and run
* svn_error_clear() on err.
*/
@@ -301,4 +309,10 @@ class JNIUtil
} \
} while (0)
+#define SVN_JNI_CATCH(statement, errorcode) \
+ do { \
+ do { statement; } while(0); \
+ SVN_ERR(JNIUtil::checkJavaException((errorcode))); \
+ } while(0)
+
#endif // JNIUTIL_H
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/native/RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/native/RemoteSession.cpp?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/native/RemoteSession.cpp (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/native/RemoteSession.cpp Tue Jul 2 23:12:42 2013
@@ -25,6 +25,7 @@
*/
#include <cstring>
+#include <memory>
#include <set>
#include "JNIByteArray.h"
@@ -44,6 +45,8 @@
#include "Prompter.h"
#include "Revision.h"
#include "RemoteSession.h"
+#include "EditorProxy.h"
+#include "StateReporter.h"
#include <apr_strings.h>
#include "svn_private_config.h"
@@ -639,12 +642,112 @@ RemoteSession::getDirectory(jlong jrevis
// TODO: update
// TODO: switch
-jobject
-RemoteSession::status(jstring jstatus_target,
+namespace {
+svn_error_t*
+status_unlock_func(void* baton, const char* path, apr_pool_t* scratch_pool)
+{
+ //DEBUG:fprintf(stderr, " (n) status_unlock_func('%s')\n", path);
+ return SVN_NO_ERROR;
+}
+
+svn_error_t*
+status_fetch_props_func(apr_hash_t **props, void *baton,
+ const char *path, svn_revnum_t base_revision,
+ apr_pool_t *result_pool, apr_pool_t *scratch_pool)
+{
+ //DEBUG:fprintf(stderr, " (n) status_fetch_props_func('%s', r%lld)\n",
+ //DEBUG: path, static_cast<long long>(base_revision));
+ *props = apr_hash_make(scratch_pool);
+ return SVN_NO_ERROR;
+}
+
+svn_error_t*
+status_fetch_base_func(const char **filename, void *baton,
+ const char *path, svn_revnum_t base_revision,
+ apr_pool_t *result_pool, apr_pool_t *scratch_pool)
+{
+ //DEBUG:fprintf(stderr, " (n) status_fetch_base_func('%s', r%lld)\n",
+ //DEBUG: path, static_cast<long long>(base_revision));
+ *filename = NULL;
+ return SVN_NO_ERROR;
+}
+
+svn_error_t*
+status_start_edit_func(void* baton, svn_revnum_t start_revision)
+{
+ //DEBUG:fprintf(stderr, " (n) status_start_edit_func(r%lld)\n",
+ //DEBUG: static_cast<long long>(start_revision));
+ return SVN_NO_ERROR;
+}
+
+svn_error_t*
+status_target_revision_func(void* baton, svn_revnum_t target_revision,
+ apr_pool_t* scratch_pool)
+{
+ //DEBUG:fprintf(stderr, " (n) status_target_revision_func(r%lld)\n",
+ //DEBUG: static_cast<long long>(target_revision));
+ *static_cast<svn_revnum_t*>(baton) = target_revision;
+ return SVN_NO_ERROR;
+}
+
+const EditorProxyCallbacks template_status_editor_callbacks = {
+ status_unlock_func,
+ status_fetch_props_func,
+ status_fetch_base_func,
+ { status_start_edit_func, status_target_revision_func, NULL },
+ NULL
+};
+} // anonymous namespace
+
+void
+RemoteSession::status(jobject jthis, jstring jstatus_target,
jlong jrevision, jobject jdepth,
- jobject jstatus_editor)
+ jobject jstatus_editor, jobject jreporter)
{
- return NULL;
+ StateReporter *rp = StateReporter::getCppObject(jreporter);
+ CPPADDR_NULL_PTR(rp,);
+
+ SVN::Pool scratchPool(rp->get_report_pool());
+ Relpath status_target(jstatus_target, scratchPool);
+ if (JNIUtil::isExceptionThrown())
+ return;
+
+ apr_pool_t* scratch_pool = scratchPool.getPool();
+ const char* repos_root_url;
+ SVN_JNI_ERR(svn_ra_get_repos_root2(m_session, &repos_root_url,
+ scratch_pool),);
+ const char* session_root_url;
+ SVN_JNI_ERR(svn_ra_get_session_url(m_session, &session_root_url,
+ scratch_pool),);
+ const char* base_relpath;
+ SVN_JNI_ERR(svn_ra_get_path_relative_to_root(m_session, &base_relpath,
+ session_root_url,
+ scratch_pool),);
+
+ EditorProxyCallbacks proxy_callbacks =
+ template_status_editor_callbacks;
+ proxy_callbacks.m_extra_baton.baton = &rp->m_target_revision;
+
+ apr_pool_t* report_pool = rp->get_report_pool();
+ std::auto_ptr<EditorProxy> editor(
+ new EditorProxy(jstatus_editor, report_pool,
+ repos_root_url, base_relpath,
+ m_context->checkCancel, m_context,
+ proxy_callbacks));
+ if (JNIUtil::isExceptionThrown())
+ return;
+
+ const svn_ra_reporter3_t* raw_reporter;
+ void* report_baton;
+ SVN_JNI_ERR(svn_ra_do_status2(m_session,
+ &raw_reporter, &report_baton,
+ status_target.c_str(),
+ svn_revnum_t(jrevision),
+ EnumMapper::toDepth(jdepth),
+ editor->delta_editor(),
+ editor->delta_baton(),
+ report_pool),);
+ rp->set_reporter_data(raw_reporter, report_baton, editor.release());
}
// TODO: diff
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/native/RemoteSession.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/native/RemoteSession.h?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/native/RemoteSession.h (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/native/RemoteSession.h Tue Jul 2 23:12:42 2013
@@ -82,9 +82,9 @@ class RemoteSession : public SVNBase
// TODO: getMergeinfo
// TODO: update
// TODO: switch
- jobject status(jstring jstatus_target,
- jlong jrevision, jobject jdepth,
- jobject jstatus_editor);
+ void status(jobject jthis, jstring jstatus_target,
+ jlong jrevision, jobject jdepth,
+ jobject jstatus_editor, jobject jreporter);
// TODO: diff
void getLog(jobject jpaths, jlong jstartrev, jlong jendrev, jint jlimit,
jboolean jstrict_node_history, jboolean jdiscover_changed_paths,
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_CommitEditor.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_CommitEditor.cpp?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_CommitEditor.cpp (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_CommitEditor.cpp Tue Jul 2 23:12:42 2013
@@ -182,15 +182,15 @@ Java_org_apache_subversion_javahl_remote
editor->move(jsrc_relpath, jsrc_revision, jdst_relpath, jreplaces_revision);
}
-JNIEXPORT void JNICALL
-Java_org_apache_subversion_javahl_remote_CommitEditor_rotate(
- JNIEnv* env, jobject jthis, jobject jelements)
-{
- JNIEntry(CommitEditor, rotate);
- CommitEditor *editor = CommitEditor::getCppObject(jthis);
- CPPADDR_NULL_PTR(editor,);
- editor->rotate(jelements);
-}
+//JNIEXPORT void JNICALL
+//Java_org_apache_subversion_javahl_remote_CommitEditor_rotate(
+// JNIEnv* env, jobject jthis, jobject jelements)
+//{
+// JNIEntry(CommitEditor, rotate);
+// CommitEditor *editor = CommitEditor::getCppObject(jthis);
+// CPPADDR_NULL_PTR(editor,);
+// editor->rotate(jelements);
+//}
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_remote_CommitEditor_complete(
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/native/org_apache_subversion_javahl_remote_RemoteSession.cpp Tue Jul 2 23:12:42 2013
@@ -217,16 +217,17 @@ Java_org_apache_subversion_javahl_remote
// TODO: update
// TODO: switch
-JNIEXPORT jobject JNICALL
-Java_org_apache_subversion_javahl_remote_RemoteSession_status(
- JNIEnv *env, jobject jthis, jstring jstatus_target,
- jlong jrevision, jobject jdepth, jobject jstatus_editor)
+JNIEXPORT void JNICALL
+Java_org_apache_subversion_javahl_remote_RemoteSession_nativeStatus(
+ JNIEnv *env, jobject jthis, jstring jstatus_target, jlong jrevision,
+ jobject jdepth, jobject jstatus_editor, jobject jreporter)
{
- JNIEntry(SVNReposAccess, doStatus);
+ JNIEntry(SVNReposAccess, nativeStatus);
RemoteSession *ras = RemoteSession::getCppObject(jthis);
- CPPADDR_NULL_PTR(ras, NULL);
+ CPPADDR_NULL_PTR(ras,);
- return ras->status(jstatus_target, jrevision, jdepth, jstatus_editor);
+ ras->status(jthis, jstatus_target, jrevision, jdepth,
+ jstatus_editor, jreporter);
}
// TODO: diff
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNEditor.java Tue Jul 2 23:12:42 2013
@@ -273,40 +273,42 @@ public interface ISVNEditor
String destinationRelativePath,
long replacesRevision)
throws ClientException;
- /**
- * Perform a rotation among multiple nodes in the target tree.
- * <p>
- * The <code>elements</code> list specifies the nodes in the tree
- * which are located at a path and expected to be at a specific
- * revision. These nodes are simultaneously moved in a rotation
- * pattern. For example, the node at index 0
- * <code>elements</code> will be moved to the relative path
- * specified at index 1 of <code>elements</code>. The node at
- * index 1 will be moved to the location at index 2. The node at
- * index N-1 will be moved to the relative path specified at index 0.
- * <p>
- * The simplest form of this operation is to swap nodes A and
- * B. One may think to move A to a temporary location T, then move
- * B to A, then move T to B. However, this last move violations
- * the Once Rule by moving T (which had already by edited by the
- * move from A). In order to keep the restrictions against
- * multiple moves of a single node, the rotation operation is
- * needed for certain types of tree edits.
- *
- * @throws ClientException
- */
- void rotate(Iterable<RotatePair> elements) throws ClientException;
- public static final class RotatePair
- {
- public RotatePair(String relativePath, long revision)
- {
- this.relativePath = relativePath;
- this.revision = revision;
- }
- public final String relativePath;
- public final long revision;
- }
+// Not implemented in the native API
+// /**
+// * Perform a rotation among multiple nodes in the target tree.
+// * <p>
+// * The <code>elements</code> list specifies the nodes in the tree
+// * which are located at a path and expected to be at a specific
+// * revision. These nodes are simultaneously moved in a rotation
+// * pattern. For example, the node at index 0
+// * <code>elements</code> will be moved to the relative path
+// * specified at index 1 of <code>elements</code>. The node at
+// * index 1 will be moved to the location at index 2. The node at
+// * index N-1 will be moved to the relative path specified at index 0.
+// * <p>
+// * The simplest form of this operation is to swap nodes A and
+// * B. One may think to move A to a temporary location T, then move
+// * B to A, then move T to B. However, this last move violations
+// * the Once Rule by moving T (which had already by edited by the
+// * move from A). In order to keep the restrictions against
+// * multiple moves of a single node, the rotation operation is
+// * needed for certain types of tree edits.
+// *
+// * @throws ClientException
+// */
+// void rotate(Iterable<RotatePair> elements) throws ClientException;
+//
+// public static final class RotatePair
+// {
+// public RotatePair(String relativePath, long revision)
+// {
+// this.relativePath = relativePath;
+// this.revision = revision;
+// }
+// public final String relativePath;
+// public final long revision;
+// }
/**
* Signal that the edit has been completed successfully.
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRemote.java Tue Jul 2 23:12:42 2013
@@ -289,8 +289,8 @@ public interface ISVNRemote
* or the HEAD revision if <code>revision</code> is
* {@link org.apache.subversion.javahl.types.Revision#SVN_INVALID_REVNUM}.
* <p>
- * The client begins by providing a <code>statusEditor</code> to
- * the remote session; this editor must contain knowledge of where
+ * The client begins by providing a <code>receiver</code> to
+ * the remote session; this object must contain knowledge of where
* the change will begin in the working copy.
* <p>
* In return, the client receives an {@link ISVNReporter}
@@ -298,14 +298,12 @@ public interface ISVNRemote
* calls to its methods.
* <p>
* When finished, the client calls {@link ISVNReporter#finishReport}.
- * This results in a complete drive of <code>statusEditor</code>,
- * ending with {@link ISVNEditor#complete()}, to report,
- * essentially, what would be modified in the working copy were
- * the client to perform an update. <code>statusTarget</code> is
- * an optional single path component that restricts the scope of
- * the status report to an entry in the directory represented by
- * the session's URL, or empty if the entire directory is meant to
- * be examined.
+ * This results in <code>receiver</code> being called once for
+ * every path in the working copy that is different from the
+ * repository. <code>statusTarget</code> is an optional single
+ * path component that restricts the scope of the status report to
+ * an entry in the directory represented by the session's URL, or
+ * empty if the entire directory is meant to be examined.
* <p>
* Get status as deeply as <code>depth</code> indicates. If
* <code>depth</code> is
@@ -317,8 +315,8 @@ public interface ISVNRemote
* <p>
* The caller may not perform any operations using this session
* before finishing the report, and may not perform any operations
- * using this session from within the editing operations of
- * <code>statusEditor</code>.
+ * using this session from within the implementation of
+ * <code>receiver</code>.
* <p>
* <b>Note:</b> The reporter provided by this function does
* <em>not</em> supply copy-from information to the editor
@@ -332,7 +330,7 @@ public interface ISVNRemote
*/
ISVNReporter status(String statusTarget,
long revision, Depth depth,
- ISVNEditor statusEditor)
+ RemoteStatus receiver)
throws ClientException;
// TODO: diff
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNReporter.java Tue Jul 2 23:12:42 2013
@@ -134,16 +134,22 @@ public interface ISVNReporter
String lockToken)
throws ClientException;
-
/**
* The report driver calls this when the state report is finished.
* Any directories or files not explicitly "set" are assumed to be
* at the baseline revision originally passed into do_update(). No
* other reporting functions, including {@link abortReport()},
* should be called after calling this function.
+ *
+ * @return The target revision of the resulting editor drive. In
+ * the case of {@link ISVNRemote#status}, this is the
+ * revision against which the status call was performed;
+ * in the case of {@link ISVNRemote#update}, it is the
+ * revision updated to.
+ *
* @throws ClientException
*/
- void finishReport() throws ClientException;
+ long finishReport() throws ClientException;
/**
* If an error occurs during a report, this routine should cause
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/CommitEditor.java Tue Jul 2 23:12:42 2013
@@ -94,7 +94,7 @@ public class CommitEditor extends JNIObj
String target,
Map<String, byte[]> properties)
throws ClientException;
-
+
public native void delete(String relativePath,
long revision)
throws ClientException;
@@ -111,11 +111,8 @@ public class CommitEditor extends JNIObj
long replacesRevision)
throws ClientException;
- /**
- * <b>Note:</b> Not implemented.
- */
- public native void rotate(Iterable<RotatePair> elements)
- throws ClientException;
+// public native void rotate(Iterable<RotatePair> elements)
+// throws ClientException;
public native void complete() throws ClientException;
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/src/org/apache/subversion/javahl/remote/RemoteSession.java Tue Jul 2 23:12:42 2013
@@ -163,10 +163,24 @@ public class RemoteSession extends JNIOb
// TODO: update
// TODO: switch
- public native ISVNReporter status(String statusTarget,
- long revision, Depth depth,
- ISVNEditor statusEditor)
- throws ClientException;
+ public ISVNReporter status(String statusTarget,
+ long revision, Depth depth,
+ RemoteStatus receiver)
+ throws ClientException
+ {
+ check_inactive(editorReference, reporterReference);
+ StateReporter rp = StateReporter.createInstance(this);
+
+ // At this point, the reporter is not active/valid.
+ StatusEditor editor = new StatusEditor(receiver);
+ nativeStatus(statusTarget, revision, depth, editor, rp);
+ // Now it should be valid.
+
+ if (reporterReference != null)
+ reporterReference.clear();
+ reporterReference = new WeakReference<ISVNReporter>(rp);
+ return rp;
+ }
// TODO: diff
@@ -227,12 +241,16 @@ public class RemoteSession extends JNIOb
OutputStream contents,
Map<String, byte[]> properties)
throws ClientException;
-
private native long nativeGetDirectory(long revision, String path,
int direntFields,
Map<String, DirEntry> dirents,
Map<String, byte[]> properties)
throws ClientException;
+ private native void nativeStatus(String statusTarget,
+ long revision, Depth depth,
+ ISVNEditor statusEditor,
+ ISVNReporter reporter)
+ throws ClientException;
private native boolean nativeHasCapability(String capability)
throws ClientException;
Modified: subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java (original)
+++ subversion/branches/fsfs-format7/subversion/bindings/javahl/tests/org/apache/subversion/javahl/SVNRemoteTests.java Tue Jul 2 23:12:42 2013
@@ -649,8 +649,8 @@ public class SVNRemoteTests extends SVNT
ISVNRemote session = getSession();
HashMap<String, byte[]> props = new HashMap<String, byte[]>();
- ArrayList<ISVNEditor.RotatePair> rotation =
- new ArrayList<ISVNEditor.RotatePair>();
+ // ArrayList<ISVNEditor.RotatePair> rotation =
+ // new ArrayList<ISVNEditor.RotatePair>();
CommitContext cc = new CommitContext(session, "not implemented");
try {
@@ -659,7 +659,7 @@ public class SVNRemoteTests extends SVNT
try {
exmsg = "";
cc.editor.addSymlink("", "", props, 1);
- } catch (IllegalStateException ex) {
+ } catch (RuntimeException ex) {
exmsg = ex.getMessage();
}
assertEquals("Not implemented: CommitEditor.addSymlink", exmsg);
@@ -667,18 +667,18 @@ public class SVNRemoteTests extends SVNT
try {
exmsg = "";
cc.editor.alterSymlink("", 1, "", null);
- } catch (IllegalStateException ex) {
+ } catch (RuntimeException ex) {
exmsg = ex.getMessage();
}
assertEquals("Not implemented: CommitEditor.alterSymlink", exmsg);
- try {
- exmsg = "";
- cc.editor.rotate(rotation);
- } catch (IllegalStateException ex) {
- exmsg = ex.getMessage();
- }
- assertEquals("Not implemented: CommitEditor.rotate", exmsg);
+ // try {
+ // exmsg = "";
+ // cc.editor.rotate(rotation);
+ // } catch (RuntimeException ex) {
+ // exmsg = ex.getMessage();
+ // }
+ // assertEquals("Not implemented: CommitEditor.rotate", exmsg);
} finally {
cc.editor.dispose();
}
@@ -783,4 +783,121 @@ public class SVNRemoteTests extends SVNT
handler);
session.getLatestRevision(); // Make sure the configuration gets loaded
}
+
+ private static class RemoteStatusReceiver implements RemoteStatus
+ {
+ static class StatInfo
+ {
+ public String relpath = null;
+ public char kind = ' '; // F, D, L
+ public boolean textChanged = false;
+ public boolean propsChanged = false;
+ public boolean deleted = false;
+
+ StatInfo(String relpath, char kind, boolean added)
+ {
+ this.relpath = relpath;
+ this.kind = kind;
+ this.deleted = !added;
+ }
+
+ StatInfo(String relpath, char kind,
+ boolean textChanged, boolean propsChanged)
+ {
+ this.relpath = relpath;
+ this.kind = kind;
+ this.textChanged = textChanged;
+ this.propsChanged = propsChanged;
+ }
+ }
+
+ public ArrayList<StatInfo> status = new ArrayList<StatInfo>();
+
+ public void addedDirectory(String relativePath)
+ {
+ status.add(new StatInfo(relativePath, 'D', true));
+ }
+
+ public void addedFile(String relativePath)
+ {
+ status.add(new StatInfo(relativePath, 'F', true));
+ }
+
+ public void addedSymlink(String relativePath)
+ {
+ status.add(new StatInfo(relativePath, 'L', true));
+ }
+
+ public void modifiedDirectory(String relativePath,
+ boolean childrenModified, boolean propsModified)
+ {
+ status.add(new StatInfo(relativePath, 'D',
+ childrenModified, propsModified));
+ }
+
+ public void modifiedFile(String relativePath,
+ boolean textModified, boolean propsModified)
+ {
+ status.add(new StatInfo(relativePath, 'F',
+ textModified, propsModified));
+ }
+
+ public void modifiedSymlink(String relativePath,
+ boolean targetModified, boolean propsModified)
+ {
+ status.add(new StatInfo(relativePath, 'L',
+ targetModified, propsModified));
+ }
+
+ public void deleted(String relativePath)
+ {
+ status.add(new StatInfo(relativePath, ' ', false));
+ }
+ }
+
+ public void testSimpleStatus() throws Exception
+ {
+ ISVNRemote session = getSession();
+
+ RemoteStatusReceiver receiver = new RemoteStatusReceiver();
+ ISVNReporter rp = session.status(null, Revision.SVN_INVALID_REVNUM,
+ Depth.infinity, receiver);
+ try {
+ rp.setPath("", 0, Depth.infinity, true, null);
+ assertEquals(1, rp.finishReport());
+ } finally {
+ rp.dispose();
+ }
+ assertEquals(21, receiver.status.size());
+ }
+
+ public void testPropchangeStatus() throws Exception
+ {
+ ISVNRemote session = getSession();
+
+ CommitMessageCallback cmcb = new CommitMessageCallback() {
+ public String getLogMessage(Set<CommitItem> x) {
+ return "Property change on A/D/gamma";
+ }
+ };
+ client.propertySetRemote(getTestRepoUrl() + "/A/D/gamma",
+ 1L, "foo", "bar".getBytes(), cmcb,
+ false, null, null);
+
+ RemoteStatusReceiver receiver = new RemoteStatusReceiver();
+ ISVNReporter rp = session.status(null, Revision.SVN_INVALID_REVNUM,
+ Depth.infinity, receiver);
+ try {
+ rp.setPath("", 1, Depth.infinity, false, null);
+ assertEquals(2, rp.finishReport());
+ } finally {
+ rp.dispose();
+ }
+ assertEquals(4, receiver.status.size());
+ RemoteStatusReceiver.StatInfo mod = receiver.status.get(3);
+ assertEquals("A/D/gamma", mod.relpath);
+ assertEquals('F', mod.kind);
+ assertEquals(false, mod.textChanged);
+ assertEquals(true, mod.propsChanged);
+ }
}
Modified: subversion/branches/fsfs-format7/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/private/svn_wc_private.h?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/private/svn_wc_private.h Tue Jul 2 23:12:42 2013
@@ -293,7 +293,7 @@ svn_wc__close_db(const char *external_ab
* use @a scratch_pool for temporary allocations.
*/
svn_error_t *
-svn_wc__get_tree_conflict(const svn_wc_conflict_description2_t **tree_conflict,
+svn_wc__get_tree_conflict(const svn_wc_conflict_description3_t **tree_conflict,
svn_wc_context_t *wc_ctx,
const char *victim_abspath,
apr_pool_t *result_pool,
@@ -311,7 +311,7 @@ svn_wc__get_tree_conflict(const svn_wc_c
*/
svn_error_t *
svn_wc__add_tree_conflict(svn_wc_context_t *wc_ctx,
- const svn_wc_conflict_description2_t *conflict,
+ const svn_wc_conflict_description3_t *conflict,
apr_pool_t *scratch_pool);
/* Remove any tree conflict on victim @a victim_abspath using @a wc_ctx.
Modified: subversion/branches/fsfs-format7/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/include/svn_error_codes.h?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/fsfs-format7/subversion/include/svn_error_codes.h Tue Jul 2 23:12:42 2013
@@ -260,6 +260,11 @@ SVN_ERROR_START
SVN_ERR_XML_CATEGORY_START + 4,
"Data cannot be safely XML-escaped")
+ /** @since New in 1.9. */
+ SVN_ERRDEF(SVN_ERR_XML_UNEXPECTED_ELEMENT,
+ SVN_ERR_XML_CATEGORY_START + 5,
+ "Unexpected XML element found")
+
/* io errors */
SVN_ERRDEF(SVN_ERR_IO_INCONSISTENT_EOL,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/blame.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/blame.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/blame.c Tue Jul 2 23:12:42 2013
@@ -585,7 +585,6 @@ svn_client_blame5(const char *target,
struct file_rev_baton frb;
svn_ra_session_t *ra_session;
svn_revnum_t start_revnum, end_revnum;
- svn_client__pathrev_t *end_loc;
struct blame *walk, *walk_merged = NULL;
apr_pool_t *iterpool;
svn_stream_t *last_stream;
@@ -604,32 +603,33 @@ svn_client_blame5(const char *target,
SVN_ERR(svn_dirent_get_absolute(&target_abspath_or_url, target, pool));
/* Get an RA plugin for this filesystem object. */
- SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &end_loc,
- target, NULL, peg_revision, end,
+ SVN_ERR(svn_client__ra_session_from_path2(&ra_session, NULL,
+ target, NULL, peg_revision,
+ peg_revision,
ctx, pool));
- end_revnum = end_loc->rev;
SVN_ERR(svn_client__get_revision_number(&start_revnum, NULL, ctx->wc_ctx,
target_abspath_or_url, ra_session,
start, pool));
- if (start_revnum > end_revnum)
- {
- /* Repeat the last bit of svn_client__ra_session_from_path2(), to end
- up where we would have ended up if we had passed 'start' rather than
- 'end' to it.
- ### Should we try calling
- ### svn_client__open_ra_session_internal(peg_revision, start)
- ### if calling it with (peg_revision, end) fails?
- */
- svn_client__pathrev_t *start_loc;
- SVN_ERR(svn_client__resolve_rev_and_url(&start_loc, ra_session,
- target, peg_revision, start,
- ctx, pool));
-
- /* Make the session point to the real URL. */
- SVN_ERR(svn_ra_reparent(ra_session, start_loc->url, pool));
- }
+ SVN_ERR(svn_client__get_revision_number(&end_revnum, NULL, ctx->wc_ctx,
+ target_abspath_or_url, ra_session,
+ end, pool));
+
+ {
+ svn_client__pathrev_t *loc;
+ svn_opt_revision_t younger_end;
+ younger_end.kind = svn_opt_revision_number;
+ younger_end.value.number = MAX(start_revnum, end_revnum);
+
+ SVN_ERR(svn_client__resolve_rev_and_url(&loc, ra_session,
+ target, peg_revision,
+ &younger_end,
+ ctx, pool));
+
+ /* Make the session point to the real URL. */
+ SVN_ERR(svn_ra_reparent(ra_session, loc->url, pool));
+ }
/* We check the mime-type of the yougest revision before getting all
the older revisions. */
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/copy.c Tue Jul 2 23:12:42 2013
@@ -385,6 +385,7 @@ static svn_error_t *
verify_wc_dsts(const apr_array_header_t *copy_pairs,
svn_boolean_t make_parents,
svn_boolean_t is_move,
+ svn_boolean_t metadata_only,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -435,8 +436,11 @@ verify_wc_dsts(const apr_array_header_t
}
/* Check that there is no unversioned obstruction */
- SVN_ERR(svn_io_check_path(pair->dst_abspath_or_url, &dst_kind,
- iterpool));
+ if (metadata_only)
+ dst_kind = svn_node_none;
+ else
+ SVN_ERR(svn_io_check_path(pair->dst_abspath_or_url, &dst_kind,
+ iterpool));
if (dst_kind != svn_node_none)
{
@@ -527,6 +531,7 @@ static svn_error_t *
verify_wc_srcs_and_dsts(const apr_array_header_t *copy_pairs,
svn_boolean_t make_parents,
svn_boolean_t is_move,
+ svn_boolean_t metadata_only,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -557,7 +562,7 @@ verify_wc_srcs_and_dsts(const apr_array_
scratch_pool));
}
- SVN_ERR(verify_wc_dsts(copy_pairs, make_parents, is_move, ctx,
+ SVN_ERR(verify_wc_dsts(copy_pairs, make_parents, is_move, metadata_only, ctx,
result_pool, iterpool));
svn_pool_destroy(iterpool);
@@ -1727,8 +1732,8 @@ repos_to_wc_copy_locked(svn_boolean_t *t
/* We've already checked for physical obstruction by a working file.
But there could also be logical obstruction by an entry whose
working file happens to be missing.*/
- SVN_ERR(verify_wc_dsts(copy_pairs, FALSE, FALSE, ctx,
- scratch_pool, iterpool));
+ SVN_ERR(verify_wc_dsts(copy_pairs, FALSE, FALSE, FALSE /* metadata_only */,
+ ctx, scratch_pool, iterpool));
/* Decide whether the two repositories are the same or not. */
{
@@ -2210,7 +2215,7 @@ try_copy(svn_boolean_t *timestamp_sleep,
if ((! srcs_are_urls) && (! dst_is_url))
{
SVN_ERR(verify_wc_srcs_and_dsts(copy_pairs, make_parents, is_move,
- ctx, pool, pool));
+ metadata_only, ctx, pool, pool));
/* Copy or move all targets. */
if (is_move)
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/log.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/log.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/log.c Tue Jul 2 23:12:42 2013
@@ -837,7 +837,7 @@ svn_client_log5(const apr_array_header_t
SVN_ERR(resolve_log_targets(&relative_targets, &ra_target, &peg_rev,
targets, ctx, pool, pool));
- SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &actual_loc,
+ SVN_ERR(svn_client__ra_session_from_path2(&ra_session, NULL,
ra_target, NULL, &peg_rev, &peg_rev,
ctx, pool));
Modified: subversion/branches/fsfs-format7/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_client/merge.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_client/merge.c Tue Jul 2 23:12:42 2013
@@ -1198,7 +1198,7 @@ struct merge_dir_baton_t
apr_hash_t *pending_deletes;
/* NULL, or an hashtable mapping const char * LOCAL_ABSPATHs to
- a const svn_wc_conflict_description2_t * instance, describing the just
+ a const svn_wc_conflict_description3_t * instance, describing the just
installed conflict */
apr_hash_t *new_tree_conflicts;
@@ -1301,12 +1301,15 @@ record_tree_conflict(merge_cmd_baton_t *
svn_node_kind_t node_kind,
svn_wc_conflict_action_t action,
svn_wc_conflict_reason_t reason,
- const svn_wc_conflict_description2_t *existing_conflict,
+ const svn_wc_conflict_description3_t *existing_conflict,
svn_boolean_t notify_tc,
apr_pool_t *scratch_pool)
{
svn_wc_context_t *wc_ctx = merge_b->ctx->wc_ctx;
+ if (merge_b->record_only)
+ return SVN_NO_ERROR;
+
if (merge_b->merge_source.ancestral
|| merge_b->reintegrate_merge)
{
@@ -1316,10 +1319,9 @@ record_tree_conflict(merge_cmd_baton_t *
alloc_and_store_path(&merge_b->conflicted_paths, local_abspath,
merge_b->pool);
-
- if (!merge_b->record_only && !merge_b->dry_run)
+ if (!merge_b->dry_run)
{
- svn_wc_conflict_description2_t *conflict;
+ svn_wc_conflict_description3_t *conflict;
const svn_wc_conflict_version_t *left;
const svn_wc_conflict_version_t *right;
apr_pool_t *result_pool = parent_baton ? parent_baton->pool
@@ -1358,7 +1360,7 @@ record_tree_conflict(merge_cmd_baton_t *
if (existing_conflict != NULL && existing_conflict->src_left_version)
left = existing_conflict->src_left_version;
- conflict = svn_wc_conflict_description_create_tree2(
+ conflict = svn_wc_conflict_description_create_tree3(
local_abspath, node_kind, svn_wc_operation_merge,
left, right, result_pool);
@@ -1848,7 +1850,7 @@ merge_file_opened(void **new_file_baton,
}
else
{
- const svn_wc_conflict_description2_t *old_tc = NULL;
+ const svn_wc_conflict_description3_t *old_tc = NULL;
/* The node doesn't exist pre-merge: We have an addition */
fb->added = TRUE;
@@ -2605,7 +2607,7 @@ merge_dir_opened(void **new_dir_baton,
}
else
{
- const svn_wc_conflict_description2_t *old_tc = NULL;
+ const svn_wc_conflict_description3_t *old_tc = NULL;
/* The node doesn't exist pre-merge: We have an addition */
db->added = TRUE;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_delta/compat.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_delta/compat.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_delta/compat.c Tue Jul 2 23:12:42 2013
@@ -218,6 +218,7 @@ locate_change(struct ev2_edit_baton *eb,
change = apr_pcalloc(eb->edit_pool, sizeof(*change));
change->changing = SVN_INVALID_REVNUM;
change->deleting = SVN_INVALID_REVNUM;
+ change->kind = svn_node_unknown;
svn_hash_sets(eb->changes, relpath, change);
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/fs.h Tue Jul 2 23:12:42 2013
@@ -228,7 +228,11 @@ typedef struct fs_fs_shared_data_t
/* Data structure for the 1st level DAG node cache. */
typedef struct fs_fs_dag_cache_t fs_fs_dag_cache_t;
-/* Key type for all caches that use revision + offset / counter as key. */
+/* Key type for all caches that use revision + offset / counter as key.
+
+ NOTE: always initialize this using calloc() or '= {0};'! This is used
+ as a cahe key and the padding bytes on 32 bit archs should be zero for
+ cache effectiveness. */
typedef struct pair_cache_key_t
{
svn_revnum_t revision;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/low_level.c Tue Jul 2 23:12:42 2013
@@ -983,12 +983,9 @@ svn_fs_fs__write_changes(svn_stream_t *s
sorted_changed_paths = svn_sort__hash(changes,
svn_sort_compare_items_lexically, pool);
- /* Iterate through the changed paths one at a time, and convert the
- temporary node-id into a permanent one for each change entry. */
+ /* Write all items to disk in the new order. */
for (i = 0; i < sorted_changed_paths->nelts; ++i)
{
- node_revision_t *noderev;
- const svn_fs_id_t *id;
svn_fs_path_change2_t *change;
const char *path;
@@ -997,21 +994,6 @@ svn_fs_fs__write_changes(svn_stream_t *s
change = APR_ARRAY_IDX(sorted_changed_paths, i, svn_sort__item_t).value;
path = APR_ARRAY_IDX(sorted_changed_paths, i, svn_sort__item_t).key;
- id = change->node_rev_id;
-
- /* If this was a delete of a mutable node, then it is OK to
- leave the change entry pointing to the non-existent temporary
- node, since it will never be used. */
- if ((change->change_kind != svn_fs_path_change_delete) &&
- (! svn_fs_fs__id_is_txn(id)))
- {
- SVN_ERR(svn_fs_fs__get_node_revision(&noderev, fs, id, iterpool));
-
- /* noderev has the permanent node-id at this point, so we just
- substitute it for the temporary one. */
- change->node_rev_id = noderev->id;
- }
-
/* Write out the new entry into the final rev-file. */
SVN_ERR(write_change_entry(stream, path, change, include_node_kinds,
iterpool));
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/revprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/revprops.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/revprops.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/revprops.c Tue Jul 2 23:12:42 2013
@@ -282,7 +282,7 @@ ensure_revprop_generation(svn_fs_t *fs,
SVN_ERR(ensure_revprop_namespace(fs));
if (ffd->revprop_generation == NULL)
{
- apr_int64_t current = 0;
+ apr_int64_t current;
SVN_ERR(svn_named_atomic__get(&ffd->revprop_generation,
ffd->revprop_namespace,
@@ -702,7 +702,7 @@ get_revprop_packname(svn_fs_t *fs,
if (revprops->manifest->nelts <= idx)
return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
- _("Packed revprop manifest for rev %ld too "
+ _("Packed revprop manifest for r%ld too "
"small"), revprops->revision);
/* Now get the file name */
@@ -874,14 +874,14 @@ read_pack_revprop(packed_revprops_t **re
/* the file content should be available now */
if (!result->packed_revprops)
return svn_error_createf(SVN_ERR_FS_PACKED_REVPROP_READ_FAILURE, NULL,
- _("Failed to read revprop pack file for rev %ld"), rev);
+ _("Failed to read revprop pack file for r%ld"), rev);
/* parse it. RESULT will be complete afterwards. */
err = parse_packed_revprops(fs, result, pool, iterpool);
svn_pool_destroy(iterpool);
if (err)
return svn_error_createf(SVN_ERR_FS_CORRUPT, err,
- _("Revprop pack file for rev %ld is corrupt"), rev);
+ _("Revprop pack file for r%ld is corrupt"), rev);
*revprops = result;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/fs.h Tue Jul 2 23:12:42 2013
@@ -186,7 +186,11 @@ typedef struct fs_x_shared_data_t
/* Data structure for the 1st level DAG node cache. */
typedef struct fs_x_dag_cache_t fs_x_dag_cache_t;
-/* Key type for all caches that use revision + offset / counter as key. */
+/* Key type for all caches that use revision + offset / counter as key.
+
+ NOTE: always initialize this using calloc() or '= {0};'! This is used
+ as a cahe key and the padding bytes on 32 bit archs should be zero for
+ cache effectiveness. */
typedef struct pair_cache_key_t
{
svn_revnum_t revision;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/low_level.c Tue Jul 2 23:12:42 2013
@@ -959,12 +959,9 @@ svn_fs_x__write_changes(svn_stream_t *st
sorted_changed_paths = svn_sort__hash(changes,
svn_sort_compare_items_lexically, pool);
- /* Iterate through the changed paths one at a time, and convert the
- temporary node-id into a permanent one for each change entry. */
+ /* Write all items to disk in the new order. */
for (i = 0; i < sorted_changed_paths->nelts; ++i)
{
- node_revision_t *noderev;
- const svn_fs_id_t *id;
svn_fs_path_change2_t *change;
const char *path;
@@ -973,21 +970,6 @@ svn_fs_x__write_changes(svn_stream_t *st
change = APR_ARRAY_IDX(sorted_changed_paths, i, svn_sort__item_t).value;
path = APR_ARRAY_IDX(sorted_changed_paths, i, svn_sort__item_t).key;
- id = change->node_rev_id;
-
- /* If this was a delete of a mutable node, then it is OK to
- leave the change entry pointing to the non-existent temporary
- node, since it will never be used. */
- if ((change->change_kind != svn_fs_path_change_delete) &&
- (! svn_fs_x__id_is_txn(id)))
- {
- SVN_ERR(svn_fs_x__get_node_revision(&noderev, fs, id, iterpool));
-
- /* noderev has the permanent node-id at this point, so we just
- substitute it for the temporary one. */
- change->node_rev_id = noderev->id;
- }
-
/* Write out the new entry into the final rev-file. */
SVN_ERR(write_change_entry(stream, path, change, iterpool));
}
Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_x/revprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_x/revprops.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_x/revprops.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_x/revprops.c Tue Jul 2 23:12:42 2013
@@ -284,7 +284,7 @@ ensure_revprop_generation(svn_fs_t *fs,
SVN_ERR(ensure_revprop_namespace(fs));
if (ffd->revprop_generation == NULL)
{
- apr_int64_t current = 0;
+ apr_int64_t current;
SVN_ERR(svn_named_atomic__get(&ffd->revprop_generation,
ffd->revprop_namespace,
@@ -705,7 +705,7 @@ get_revprop_packname(svn_fs_t *fs,
if (revprops->manifest->nelts <= idx)
return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
- _("Packed revprop manifest for rev %ld too "
+ _("Packed revprop manifest for r%ld too "
"small"), revprops->revision);
/* Now get the file name */
@@ -879,14 +879,14 @@ read_pack_revprop(packed_revprops_t **re
/* the file content should be available now */
if (!result->packed_revprops)
return svn_error_createf(SVN_ERR_FS_PACKED_REVPROP_READ_FAILURE, NULL,
- _("Failed to read revprop pack file for rev %ld"), rev);
+ _("Failed to read revprop pack file for r%ld"), rev);
/* parse it. RESULT will be complete afterwards. */
err = parse_packed_revprops(fs, result, pool, iterpool);
svn_pool_destroy(iterpool);
if (err)
return svn_error_createf(SVN_ERR_FS_CORRUPT, err,
- _("Revprop pack file for rev %ld is corrupt"), rev);
+ _("Revprop pack file for r%ld is corrupt"), rev);
*revprops = result;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra/util.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra/util.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra/util.c Tue Jul 2 23:12:42 2013
@@ -38,6 +38,26 @@
#include "svn_private_config.h"
#include "private/svn_ra_private.h"
+static const char *
+get_path(const char *path_or_url,
+ svn_ra_session_t *ra_session,
+ apr_pool_t *pool)
+{
+ if (path_or_url == NULL)
+ {
+ svn_error_t *err = svn_ra_get_session_url(ra_session, &path_or_url,
+ pool);
+ if (err)
+ {
+ /* The SVN_ERR_UNSUPPORTED_FEATURE error in the caller is more
+ important, so dummy up the session's URL and chuck this error. */
+ svn_error_clear(err);
+ return _("<repository>");
+ }
+ }
+ return path_or_url;
+}
+
svn_error_t *
svn_ra__assert_mergeinfo_capable_server(svn_ra_session_t *ra_session,
const char *path_or_url,
@@ -48,18 +68,7 @@ svn_ra__assert_mergeinfo_capable_server(
SVN_RA_CAPABILITY_MERGEINFO, pool));
if (! mergeinfo_capable)
{
- if (path_or_url == NULL)
- {
- svn_error_t *err = svn_ra_get_session_url(ra_session, &path_or_url,
- pool);
- if (err)
- {
- /* The SVN_ERR_UNSUPPORTED_FEATURE error is more important,
- so dummy up the session's URL and chuck this error. */
- svn_error_clear(err);
- path_or_url = "<repository>";
- }
- }
+ path_or_url = get_path(path_or_url, ra_session, pool);
return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
_("Retrieval of mergeinfo unsupported by '%s'"),
svn_path_is_url(path_or_url)
@@ -84,12 +93,16 @@ svn_ra__assert_capable_server(svn_ra_ses
svn_boolean_t has;
SVN_ERR(svn_ra_has_capability(ra_session, &has, capability, pool));
if (! has)
- return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
- _("The '%s' feature is not supported by '%s'"),
- capability,
- svn_path_is_url(path_or_url)
- ? path_or_url
- : svn_dirent_local_style(path_or_url, pool));
+ {
+ path_or_url = get_path(path_or_url, ra_session, pool);
+ return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ _("The '%s' feature is not supported by '%s'"),
+ capability,
+ svn_path_is_url(path_or_url)
+ ? path_or_url
+ : svn_dirent_local_style(path_or_url,
+ pool));
+ }
}
return SVN_NO_ERROR;
}
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_local.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_local.h?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_local.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_local.h Tue Jul 2 23:12:42 2013
@@ -62,6 +62,8 @@ typedef struct svn_ra_local__session_bat
/* Callbacks/baton passed to svn_ra_open. */
const svn_ra_callbacks2_t *callbacks;
void *callback_baton;
+
+ const char *useragent;
} svn_ra_local__session_baton_t;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_plugin.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_plugin.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_local/ra_plugin.c Tue Jul 2 23:12:42 2013
@@ -541,6 +541,9 @@ ignore_warnings(void *baton,
return;
}
+#define USER_AGENT "SVN/" SVN_VER_NUMBER " (" SVN_BUILD_TARGET ")" \
+ " ra_local"
+
static svn_error_t *
svn_ra_local__open(svn_ra_session_t *session,
const char **corrected_url,
@@ -550,6 +553,7 @@ svn_ra_local__open(svn_ra_session_t *ses
apr_hash_t *config,
apr_pool_t *pool)
{
+ const char *client_string;
svn_ra_local__session_baton_t *sess;
const char *fs_path;
static volatile svn_atomic_t cache_init_state = 0;
@@ -592,6 +596,18 @@ svn_ra_local__open(svn_ra_session_t *ses
/* Be sure username is NULL so we know to look it up / ask for it */
sess->username = NULL;
+ if (sess->callbacks->get_client_string != NULL)
+ SVN_ERR(sess->callbacks->get_client_string(sess->callback_baton,
+ &client_string, pool));
+ else
+ client_string = NULL;
+
+ if (client_string)
+ sess->useragent = apr_pstrcat(pool, USER_AGENT " ",
+ client_string, (char *)NULL);
+ else
+ sess->useragent = USER_AGENT;
+
session->priv = sess;
return SVN_NO_ERROR;
}
@@ -765,6 +781,8 @@ svn_ra_local__get_commit_editor(svn_ra_s
svn_string_create(sess->username, pool));
svn_hash_sets(revprop_table, SVN_PROP_TXN_CLIENT_COMPAT_VERSION,
svn_string_create(SVN_VER_NUMBER, pool));
+ svn_hash_sets(revprop_table, SVN_PROP_TXN_USER_AGENT,
+ svn_string_create(sess->useragent, pool));
/* Get the repos commit-editor */
return svn_repos_get_commit_editor5
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blame.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/blame.c Tue Jul 2 23:12:42 2013
@@ -47,7 +47,7 @@
* This enum represents the current state of our XML parsing for a REPORT.
*/
typedef enum blame_state_e {
- INITIAL = 0,
+ INITIAL = XML_STATE_INITIAL,
FILE_REVS_REPORT,
FILE_REV,
REV_PROP,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/get_deleted_rev.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/get_deleted_rev.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/get_deleted_rev.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/get_deleted_rev.c Tue Jul 2 23:12:42 2013
@@ -36,7 +36,7 @@
* This enum represents the current state of our XML parsing for a REPORT.
*/
enum drev_state_e {
- INITIAL = 0,
+ INITIAL = XML_STATE_INITIAL,
REPORT,
VERSION_NAME
};
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getdate.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getdate.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getdate.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getdate.c Tue Jul 2 23:12:42 2013
@@ -44,7 +44,7 @@
* This enum represents the current state of our XML parsing for a REPORT.
*/
enum date_state_e {
- INITIAL = 0,
+ INITIAL = XML_STATE_INITIAL,
REPORT,
VERSION_NAME
};
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocations.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocations.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocations.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocations.c Tue Jul 2 23:12:42 2013
@@ -43,7 +43,7 @@
* This enum represents the current state of our XML parsing for a REPORT.
*/
enum loc_state_e {
- INITIAL = 0,
+ INITIAL = XML_STATE_INITIAL,
REPORT,
LOCATION
};
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocationsegments.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocationsegments.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocationsegments.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocationsegments.c Tue Jul 2 23:12:42 2013
@@ -52,8 +52,8 @@ typedef struct gls_context_t {
} gls_context_t;
-enum {
- INITIAL = 0,
+enum locseg_state_e {
+ INITIAL = XML_STATE_INITIAL,
REPORT,
SEGMENT
};
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocks.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocks.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocks.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/getlocks.c Tue Jul 2 23:12:42 2013
@@ -47,8 +47,8 @@
/*
* This enum represents the current state of our XML parsing for a REPORT.
*/
-enum {
- INITIAL = 0,
+enum getlocks_state_e {
+ INITIAL = XML_STATE_INITIAL,
REPORT,
LOCK,
PATH,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/inherited_props.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/inherited_props.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/inherited_props.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/inherited_props.c Tue Jul 2 23:12:42 2013
@@ -41,7 +41,7 @@
/* The current state of our XML parsing. */
typedef enum iprops_state_e {
- INITIAL = 0,
+ INITIAL = XML_STATE_INITIAL,
IPROPS_REPORT,
IPROPS_ITEM,
IPROPS_PATH,
@@ -243,7 +243,7 @@ svn_ra_serf__get_inherited_props(svn_ra_
NULL /* conn */,
NULL /* url */,
revision,
- result_pool, scratch_pool));
+ scratch_pool, scratch_pool));
SVN_ERR_ASSERT(session->repos_root_str);
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/log.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/log.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/log.c Tue Jul 2 23:12:42 2013
@@ -48,8 +48,8 @@
/*
* This enum represents the current state of our XML parsing for a REPORT.
*/
-enum {
- INITIAL = 0,
+enum log_state_e {
+ INITIAL = XML_STATE_INITIAL,
REPORT,
ITEM,
VERSION,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/merge.c?rev=1499145&r1=1499144&r2=1499145&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/merge.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_ra_serf/merge.c Tue Jul 2 23:12:42 2013
@@ -48,7 +48,7 @@
* This enum represents the current state of our XML parsing for a MERGE.
*/
typedef enum merge_state_e {
- INITIAL = 0,
+ INITIAL = XML_STATE_INITIAL,
MERGE_RESPONSE,
UPDATED_SET,
RESPONSE,