You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/11/23 02:12:45 UTC

svn commit: r1412731 [2/10] - in /subversion/branches/ev2-export: ./ build/ build/ac-macros/ contrib/client-side/svnmerge/ contrib/server-side/svncutter/ notes/ subversion/ subversion/bindings/javahl/native/ subversion/bindings/swig/perl/native/ subver...

Modified: subversion/branches/ev2-export/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/javahl/native/SVNClient.cpp?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/ev2-export/subversion/bindings/javahl/native/SVNClient.cpp Fri Nov 23 01:12:18 2012
@@ -131,7 +131,7 @@ void SVNClient::list(const char *url, Re
     SVN_JNI_NULL_PTR_EX(url, "path or url", );
 
     Path urlPath(url, subPool);
-    SVN_JNI_ERR(urlPath.error_occured(), );
+    SVN_JNI_ERR(urlPath.error_occurred(), );
 
     SVN_JNI_ERR(svn_client_list2(urlPath.c_str(),
                                  pegRevision.revision(),
@@ -162,7 +162,7 @@ SVNClient::status(const char *path, svn_
     callback->setWcCtx(ctx->wc_ctx);
 
     Path checkedPath(path, subPool);
-    SVN_JNI_ERR(checkedPath.error_occured(), );
+    SVN_JNI_ERR(checkedPath.error_occurred(), );
 
     rev.kind = svn_opt_revision_unspecified;
 
@@ -176,30 +176,18 @@ SVNClient::status(const char *path, svn_
                                    subPool.getPool()), );
 }
 
-void SVNClient::logMessages(const char *path, Revision &pegRevision,
-                            std::vector<RevisionRange> &logRanges,
-                            bool stopOnCopy, bool discoverPaths,
-                            bool includeMergedRevisions, StringArray &revProps,
-                            long limit, LogMessageCallback *callback)
+/* Convert a vector of revision ranges to an APR array of same. */
+static apr_array_header_t *
+rev_range_vector_to_apr_array(std::vector<RevisionRange> &revRanges,
+                              SVN::Pool &subPool)
 {
-    SVN::Pool subPool(pool);
-
-    SVN_JNI_NULL_PTR_EX(path, "path", );
-
-    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
-    if (ctx == NULL)
-        return;
-
-    Targets target(path, subPool);
-    const apr_array_header_t *targets = target.array(subPool);
-    SVN_JNI_ERR(target.error_occured(), );
-
     apr_array_header_t *ranges =
-        apr_array_make(subPool.getPool(), logRanges.size(),
-                       sizeof(svn_opt_revision_range_t *));
+      apr_array_make(subPool.getPool(),
+                     static_cast<int>(revRanges.size()),
+                     sizeof(svn_opt_revision_range_t *));
 
     std::vector<RevisionRange>::const_iterator it;
-    for (it = logRanges.begin(); it != logRanges.end(); ++it)
+    for (it = revRanges.begin(); it != revRanges.end(); ++it)
     {
         if (it->toRange(subPool)->start.kind
             == svn_opt_revision_unspecified
@@ -207,8 +195,8 @@ void SVNClient::logMessages(const char *
             == svn_opt_revision_unspecified)
         {
             svn_opt_revision_range_t *range =
-                (svn_opt_revision_range_t *)apr_pcalloc(subPool.getPool(),
-                                                        sizeof(*range));
+                reinterpret_cast<svn_opt_revision_range_t *>
+                    (apr_pcalloc(subPool.getPool(), sizeof(*range)));
             range->start.kind = svn_opt_revision_number;
             range->start.value.number = 1;
             range->end.kind = svn_opt_revision_head;
@@ -220,8 +208,33 @@ void SVNClient::logMessages(const char *
                 it->toRange(subPool);
         }
         if (JNIUtil::isExceptionThrown())
-            return;
+            return NULL;
     }
+    return ranges;
+}
+
+void SVNClient::logMessages(const char *path, Revision &pegRevision,
+                            std::vector<RevisionRange> &logRanges,
+                            bool stopOnCopy, bool discoverPaths,
+                            bool includeMergedRevisions, StringArray &revProps,
+                            long limit, LogMessageCallback *callback)
+{
+    SVN::Pool subPool(pool);
+
+    SVN_JNI_NULL_PTR_EX(path, "path", );
+
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
+    if (ctx == NULL)
+        return;
+
+    Targets target(path, subPool);
+    const apr_array_header_t *targets = target.array(subPool);
+    SVN_JNI_ERR(target.error_occurred(), );
+
+    apr_array_header_t *ranges =
+      rev_range_vector_to_apr_array(logRanges, subPool);
+    if (JNIUtil::isExceptionThrown())
+        return;
 
     SVN_JNI_ERR(svn_client_log5(targets, pegRevision.revision(), ranges,
                                 limit, discoverPaths, stopOnCopy,
@@ -243,8 +256,8 @@ jlong SVNClient::checkout(const char *mo
 
     Path url(moduleName, subPool);
     Path path(destPath, subPool);
-    SVN_JNI_ERR(url.error_occured(), -1);
-    SVN_JNI_ERR(path.error_occured(), -1);
+    SVN_JNI_ERR(url.error_occurred(), -1);
+    SVN_JNI_ERR(path.error_occurred(), -1);
     svn_revnum_t rev;
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
@@ -275,7 +288,7 @@ void SVNClient::remove(Targets &targets,
         return;
 
     const apr_array_header_t *targets2 = targets.array(subPool);
-    SVN_JNI_ERR(targets.error_occured(), );
+    SVN_JNI_ERR(targets.error_occurred(), );
 
     SVN_JNI_ERR(svn_client_delete4(targets2, force, keep_local,
                                    revprops.hash(subPool),
@@ -296,7 +309,7 @@ void SVNClient::revert(const char *path,
 
     Targets target(path, subPool);
     const apr_array_header_t *targets = target.array(subPool);
-    SVN_JNI_ERR(target.error_occured(), );
+    SVN_JNI_ERR(target.error_occurred(), );
     SVN_JNI_ERR(svn_client_revert2(targets, depth,
                                    changelists.array(subPool), ctx,
                                    subPool.getPool()), );
@@ -311,7 +324,7 @@ void SVNClient::add(const char *path,
     SVN_JNI_NULL_PTR_EX(path, "path", );
 
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), );
+    SVN_JNI_ERR(intPath.error_occurred(), );
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
@@ -334,7 +347,7 @@ jlongArray SVNClient::update(Targets &ta
         return NULL;
 
     const apr_array_header_t *array = targets.array(subPool);
-    SVN_JNI_ERR(targets.error_occured(), NULL);
+    SVN_JNI_ERR(targets.error_occurred(), NULL);
     SVN_JNI_ERR(svn_client_update4(&revs, array,
                                    revision.revision(),
                                    depth,
@@ -370,7 +383,7 @@ void SVNClient::commit(Targets &targets,
 {
     SVN::Pool subPool(pool);
     const apr_array_header_t *targets2 = targets.array(subPool);
-    SVN_JNI_ERR(targets.error_occured(), );
+    SVN_JNI_ERR(targets.error_occurred(), );
     svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
         return;
@@ -400,7 +413,7 @@ void SVNClient::copy(CopySources &copySo
     }
     SVN_JNI_NULL_PTR_EX(destPath, "destPath", );
     Path destinationPath(destPath, subPool);
-    SVN_JNI_ERR(destinationPath.error_occured(), );
+    SVN_JNI_ERR(destinationPath.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
@@ -421,10 +434,10 @@ void SVNClient::move(Targets &srcPaths, 
     SVN::Pool subPool(pool);
 
     const apr_array_header_t *srcs = srcPaths.array(subPool);
-    SVN_JNI_ERR(srcPaths.error_occured(), );
+    SVN_JNI_ERR(srcPaths.error_occurred(), );
     SVN_JNI_NULL_PTR_EX(destPath, "destPath", );
     Path destinationPath(destPath, subPool);
-    SVN_JNI_ERR(destinationPath.error_occured(), );
+    SVN_JNI_ERR(destinationPath.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
@@ -447,7 +460,7 @@ void SVNClient::mkdir(Targets &targets, 
         return;
 
     const apr_array_header_t *targets2 = targets.array(subPool);
-    SVN_JNI_ERR(targets.error_occured(), );
+    SVN_JNI_ERR(targets.error_occurred(), );
 
     SVN_JNI_ERR(svn_client_mkdir4(targets2, makeParents,
                                   revprops.hash(subPool),
@@ -460,7 +473,7 @@ void SVNClient::cleanup(const char *path
     SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), );
+    SVN_JNI_ERR(intPath.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -475,7 +488,7 @@ void SVNClient::resolve(const char *path
     SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), );
+    SVN_JNI_ERR(intPath.error_occurred(), );
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
@@ -493,9 +506,9 @@ jlong SVNClient::doExport(const char *sr
     SVN_JNI_NULL_PTR_EX(srcPath, "srcPath", -1);
     SVN_JNI_NULL_PTR_EX(destPath, "destPath", -1);
     Path sourcePath(srcPath, subPool);
-    SVN_JNI_ERR(sourcePath.error_occured(), -1);
+    SVN_JNI_ERR(sourcePath.error_occurred(), -1);
     Path destinationPath(destPath, subPool);
-    SVN_JNI_ERR(destinationPath.error_occured(), -1);
+    SVN_JNI_ERR(destinationPath.error_occurred(), -1);
     svn_revnum_t rev;
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -526,9 +539,9 @@ jlong SVNClient::doSwitch(const char *pa
     SVN_JNI_NULL_PTR_EX(path, "path", -1);
     SVN_JNI_NULL_PTR_EX(url, "url", -1);
     Path intUrl(url, subPool);
-    SVN_JNI_ERR(intUrl.error_occured(), -1);
+    SVN_JNI_ERR(intUrl.error_occurred(), -1);
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), -1);
+    SVN_JNI_ERR(intPath.error_occurred(), -1);
 
     svn_revnum_t rev;
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
@@ -562,16 +575,16 @@ void SVNClient::doImport(const char *pat
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(url, "url", );
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), );
+    SVN_JNI_ERR(intPath.error_occurred(), );
     Path intUrl(url, subPool);
-    SVN_JNI_ERR(intUrl.error_occured(), );
+    SVN_JNI_ERR(intUrl.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_ERR(svn_client_import5(intPath.c_str(), intUrl.c_str(), depth,
-                                   noIgnore, ignoreUnknownNodeTypes,
+                                   noIgnore, FALSE, ignoreUnknownNodeTypes,
                                    revprops.hash(subPool),
                                    ImportFilterCallback::callback, ifCallback,
                                    CommitCallback::callback, commitCallback,
@@ -605,13 +618,13 @@ void SVNClient::merge(const char *path1,
     SVN_JNI_NULL_PTR_EX(path2, "path2", );
     SVN_JNI_NULL_PTR_EX(localPath, "localPath", );
     Path intLocalPath(localPath, subPool);
-    SVN_JNI_ERR(intLocalPath.error_occured(), );
+    SVN_JNI_ERR(intLocalPath.error_occurred(), );
 
     Path srcPath1(path1, subPool);
-    SVN_JNI_ERR(srcPath1.error_occured(), );
+    SVN_JNI_ERR(srcPath1.error_occurred(), );
 
     Path srcPath2(path2, subPool);
-    SVN_JNI_ERR(srcPath2.error_occured(), );
+    SVN_JNI_ERR(srcPath2.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -634,43 +647,19 @@ void SVNClient::merge(const char *path, 
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(localPath, "localPath", );
     Path intLocalPath(localPath, subPool);
-    SVN_JNI_ERR(intLocalPath.error_occured(), );
+    SVN_JNI_ERR(intLocalPath.error_occurred(), );
 
     Path srcPath(path, subPool);
-    SVN_JNI_ERR(srcPath.error_occured(), );
+    SVN_JNI_ERR(srcPath.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
     apr_array_header_t *ranges =
-      apr_array_make(subPool.getPool(), rangesToMerge.size(),
-                     sizeof(const svn_opt_revision_range_t *));
-
-    std::vector<RevisionRange>::const_iterator it;
-    for (it = rangesToMerge.begin(); it != rangesToMerge.end(); ++it)
-    {
-        if (it->toRange(subPool)->start.kind
-            == svn_opt_revision_unspecified
-            && it->toRange(subPool)->end.kind
-            == svn_opt_revision_unspecified)
-        {
-            svn_opt_revision_range_t *range =
-                (svn_opt_revision_range_t *)apr_pcalloc(subPool.getPool(),
-                                                        sizeof(*range));
-            range->start.kind = svn_opt_revision_number;
-            range->start.value.number = 1;
-            range->end.kind = svn_opt_revision_head;
-            APR_ARRAY_PUSH(ranges, const svn_opt_revision_range_t *) = range;
-        }
-        else
-        {
-            APR_ARRAY_PUSH(ranges, const svn_opt_revision_range_t *) =
-                it->toRange(subPool);
-        }
-        if (JNIUtil::isExceptionThrown())
-            return;
-    }
+      rev_range_vector_to_apr_array(rangesToMerge, subPool);
+    if (JNIUtil::isExceptionThrown())
+        return;
 
     SVN_JNI_ERR(svn_client_merge_peg4(srcPath.c_str(),
                                       ranges,
@@ -689,10 +678,10 @@ void SVNClient::mergeReintegrate(const c
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(localPath, "localPath", );
     Path intLocalPath(localPath, subPool);
-    SVN_JNI_ERR(intLocalPath.error_occured(), );
+    SVN_JNI_ERR(intLocalPath.error_occurred(), );
 
     Path srcPath(path, subPool);
-    SVN_JNI_ERR(srcPath.error_occured(), );
+    SVN_JNI_ERR(srcPath.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -717,7 +706,7 @@ SVNClient::getMergeinfo(const char *targ
 
     svn_mergeinfo_t mergeinfo;
     Path intLocalTarget(target, subPool);
-    SVN_JNI_ERR(intLocalTarget.error_occured(), NULL);
+    SVN_JNI_ERR(intLocalTarget.error_occurred(), NULL);
     SVN_JNI_ERR(svn_client_mergeinfo_get_merged(&mergeinfo,
                                                 intLocalTarget.c_str(),
                                                 pegRevision.revision(), ctx,
@@ -762,9 +751,10 @@ SVNClient::getMergeinfo(const char *targ
         void *val;
         apr_hash_this(hi, &path, NULL, &val);
 
-        jstring jpath = JNIUtil::makeJString((const char *) path);
+        jstring jpath =
+            JNIUtil::makeJString(reinterpret_cast<const char *>(path));
         jobject jranges =
-            CreateJ::RevisionRangeList((svn_rangelist_t *) val);
+            CreateJ::RevisionRangeList(reinterpret_cast<svn_rangelist_t *>(val));
 
         env->CallVoidMethod(jmergeinfo, addRevisions, jpath, jranges);
 
@@ -794,11 +784,11 @@ void SVNClient::getMergeinfoLog(int type
 
     SVN_JNI_NULL_PTR_EX(pathOrURL, "path or url", );
     Path urlPath(pathOrURL, subPool);
-    SVN_JNI_ERR(urlPath.error_occured(), );
+    SVN_JNI_ERR(urlPath.error_occurred(), );
 
     SVN_JNI_NULL_PTR_EX(mergeSourceURL, "merge source url", );
     Path srcURL(mergeSourceURL, subPool);
-    SVN_JNI_ERR(srcURL.error_occured(), );
+    SVN_JNI_ERR(srcURL.error_occurred(), );
 
     SVN_JNI_ERR(svn_client_mergeinfo_log((type == 1),
                                          urlPath.c_str(),
@@ -827,7 +817,7 @@ jbyteArray SVNClient::propertyGet(const 
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
     SVN_JNI_NULL_PTR_EX(name, "name", NULL);
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), NULL);
+    SVN_JNI_ERR(intPath.error_occurred(), NULL);
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -848,13 +838,12 @@ jbyteArray SVNClient::propertyGet(const 
         return NULL; // no property with this name
 
     svn_string_t *propval;
-    apr_hash_this(hi, NULL, NULL, (void**)&propval);
+    apr_hash_this(hi, NULL, NULL, reinterpret_cast<void**>(&propval));
 
     if (propval == NULL)
         return NULL;
 
-    return JNIUtil::makeJByteArray((const signed char *)propval->data,
-                                   propval->len);
+    return JNIUtil::makeJByteArray(propval);
 }
 
 void SVNClient::properties(const char *path, Revision &revision,
@@ -864,7 +853,7 @@ void SVNClient::properties(const char *p
     SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), );
+    SVN_JNI_ERR(intPath.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -890,8 +879,10 @@ void SVNClient::propertySetLocal(Targets
     if (value.isNull())
       val = NULL;
     else
-      val = svn_string_ncreate((const char *)value.getBytes(), value.getLength(),
-                               subPool.getPool());
+      val = svn_string_ncreate
+               (reinterpret_cast<const char *>(value.getBytes()),
+                value.getLength(),
+                subPool.getPool());
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -918,11 +909,13 @@ void SVNClient::propertySetRemote(const 
     if (value.isNull())
       val = NULL;
     else
-      val = svn_string_ncreate((const char *)value.getBytes(), value.getLength(),
-                               subPool.getPool());
+      val = svn_string_ncreate
+               (reinterpret_cast<const char *>(value.getBytes()),
+                value.getLength(),
+                subPool.getPool());
 
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), );
+    SVN_JNI_ERR(intPath.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
@@ -958,7 +951,7 @@ void SVNClient::diff(const char *target1
         return;
 
     Path path1(target1, subPool);
-    SVN_JNI_ERR(path1.error_occured(), );
+    SVN_JNI_ERR(path1.error_occurred(), );
 
     // We don't use any options to diff.
     apr_array_header_t *diffOptions = apr_array_make(subPool.getPool(),
@@ -992,7 +985,7 @@ void SVNClient::diff(const char *target1
     {
         // "Regular" diff (without a peg revision).
         Path path2(target2, subPool);
-        SVN_JNI_ERR(path2.error_occured(), );
+        SVN_JNI_ERR(path2.error_occurred(), );
 
         SVN_JNI_ERR(svn_client_diff6(diffOptions,
                                path1.c_str(),
@@ -1060,9 +1053,9 @@ SVNClient::diffSummarize(const char *tar
         return;
 
     Path path1(target1, subPool);
-    SVN_JNI_ERR(path1.error_occured(), );
+    SVN_JNI_ERR(path1.error_occurred(), );
     Path path2(target2, subPool);
-    SVN_JNI_ERR(path2.error_occured(), );
+    SVN_JNI_ERR(path2.error_occurred(), );
 
     SVN_JNI_ERR(svn_client_diff_summarize2(path1.c_str(), revision1.revision(),
                                            path2.c_str(), revision2.revision(),
@@ -1089,7 +1082,7 @@ SVNClient::diffSummarize(const char *tar
         return;
 
     Path path(target, subPool);
-    SVN_JNI_ERR(path.error_occured(), );
+    SVN_JNI_ERR(path.error_occurred(), );
 
     SVN_JNI_ERR(svn_client_diff_summarize_peg2(path.c_str(),
                                                pegRevision.revision(),
@@ -1110,7 +1103,7 @@ void SVNClient::streamFileContent(const 
     SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), );
+    SVN_JNI_ERR(intPath.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -1129,7 +1122,7 @@ jbyteArray SVNClient::revProperty(const 
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
     SVN_JNI_NULL_PTR_EX(name, "name", NULL);
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), NULL);
+    SVN_JNI_ERR(intPath.error_occurred(), NULL);
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -1157,8 +1150,7 @@ jbyteArray SVNClient::revProperty(const 
     if (propval == NULL)
         return NULL;
 
-    return JNIUtil::makeJByteArray((const signed char *)propval->data,
-                                   propval->len);
+    return JNIUtil::makeJByteArray(propval);
 }
 void SVNClient::relocate(const char *from, const char *to, const char *path,
                          bool ignoreExternals)
@@ -1168,13 +1160,13 @@ void SVNClient::relocate(const char *fro
     SVN_JNI_NULL_PTR_EX(from, "from", );
     SVN_JNI_NULL_PTR_EX(to, "to", );
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), );
+    SVN_JNI_ERR(intPath.error_occurred(), );
 
     Path intFrom(from, subPool);
-    SVN_JNI_ERR(intFrom.error_occured(), );
+    SVN_JNI_ERR(intFrom.error_occurred(), );
 
     Path intTo(to, subPool);
-    SVN_JNI_ERR(intTo.error_occured(), );
+    SVN_JNI_ERR(intTo.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -1193,7 +1185,7 @@ void SVNClient::blame(const char *path, 
     SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), );
+    SVN_JNI_ERR(intPath.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -1215,7 +1207,7 @@ void SVNClient::addToChangelist(Targets 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
 
     const apr_array_header_t *srcs = srcPaths.array(subPool);
-    SVN_JNI_ERR(srcPaths.error_occured(), );
+    SVN_JNI_ERR(srcPaths.error_occurred(), );
 
     SVN_JNI_ERR(svn_client_add_to_changelist(srcs, changelist, depth,
                                              changelists.array(subPool),
@@ -1229,7 +1221,7 @@ void SVNClient::removeFromChangelists(Ta
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
 
     const apr_array_header_t *srcs = srcPaths.array(subPool);
-    SVN_JNI_ERR(srcPaths.error_occured(), );
+    SVN_JNI_ERR(srcPaths.error_occurred(), );
 
     SVN_JNI_ERR(svn_client_remove_from_changelists(srcs, depth,
                                                 changelists.array(subPool),
@@ -1255,7 +1247,7 @@ void SVNClient::lock(Targets &targets, c
 {
     SVN::Pool subPool(pool);
     const apr_array_header_t *targetsApr = targets.array(subPool);
-    SVN_JNI_ERR(targets.error_occured(), );
+    SVN_JNI_ERR(targets.error_occurred(), );
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
 
     SVN_JNI_ERR(svn_client_lock(targetsApr, comment, force, ctx,
@@ -1267,10 +1259,10 @@ void SVNClient::unlock(Targets &targets,
     SVN::Pool subPool(pool);
 
     const apr_array_header_t *targetsApr = targets.array(subPool);
-    SVN_JNI_ERR(targets.error_occured(), );
+    SVN_JNI_ERR(targets.error_occurred(), );
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
-    SVN_JNI_ERR(svn_client_unlock((apr_array_header_t*)targetsApr, force,
-                                  ctx, subPool.getPool()), );
+    SVN_JNI_ERR(svn_client_unlock(
+        targetsApr, force, ctx, subPool.getPool()), );
 }
 void SVNClient::setRevProperty(const char *path,
                                const char *name, Revision &rev,
@@ -1281,7 +1273,7 @@ void SVNClient::setRevProperty(const cha
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(name, "name", );
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), );
+    SVN_JNI_ERR(intPath.error_occurred(), );
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
@@ -1319,7 +1311,7 @@ jstring SVNClient::getVersionInfo(const 
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
 
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), NULL);
+    SVN_JNI_ERR(intPath.error_occurred(), NULL);
 
     int wc_format;
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
@@ -1386,7 +1378,7 @@ void SVNClient::upgrade(const char *path
         return;
 
     Path checkedPath(path, subPool);
-    SVN_JNI_ERR(checkedPath.error_occured(), );
+    SVN_JNI_ERR(checkedPath.error_occurred(), );
 
     SVN_JNI_ERR(svn_client_upgrade(path, ctx, subPool.getPool()), );
 }
@@ -1397,7 +1389,7 @@ jobject SVNClient::revProperties(const c
     SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
     Path intPath(path, subPool);
-    SVN_JNI_ERR(intPath.error_occured(), NULL);
+    SVN_JNI_ERR(intPath.error_occurred(), NULL);
 
     svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     const char *URL;
@@ -1436,7 +1428,7 @@ SVNClient::info2(const char *path, Revis
         return;
 
     Path checkedPath(path, subPool);
-    SVN_JNI_ERR(checkedPath.error_occured(), );
+    SVN_JNI_ERR(checkedPath.error_occurred(), );
 
     SVN_JNI_ERR(svn_client_info3(checkedPath.c_str(),
                                  pegRevision.revision(),
@@ -1461,9 +1453,9 @@ SVNClient::patch(const char *patchPath, 
         return;
 
     Path checkedPatchPath(patchPath, subPool);
-    SVN_JNI_ERR(checkedPatchPath.error_occured(), );
+    SVN_JNI_ERR(checkedPatchPath.error_occurred(), );
     Path checkedTargetPath(targetPath, subPool);
-    SVN_JNI_ERR(checkedTargetPath.error_occured(), );
+    SVN_JNI_ERR(checkedTargetPath.error_occurred(), );
 
     // Should parameterize the following, instead of defaulting to FALSE
     SVN_JNI_ERR(svn_client_patch(checkedPatchPath.c_str(),

Modified: subversion/branches/ev2-export/subversion/bindings/javahl/native/SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/javahl/native/SVNRepos.cpp?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/javahl/native/SVNRepos.cpp (original)
+++ subversion/branches/ev2-export/subversion/bindings/javahl/native/SVNRepos.cpp Fri Nov 23 01:12:18 2012
@@ -169,7 +169,7 @@ void SVNRepos::deltify(File &path, Revis
   for (revision = start; revision <= end; ++revision)
     {
       revisionPool.clear();
-      SVN_JNI_ERR(svn_fs_deltify_revision (fs, revision, revisionPool.getPool()),
+      SVN_JNI_ERR(svn_fs_deltify_revision(fs, revision, revisionPool.getPool()),
                   );
     }
 
@@ -273,7 +273,7 @@ void SVNRepos::hotcopy(File &path, File 
 }
 
 static void
-list_dblogs (File &path, MessageReceiver &receiver, bool only_unused)
+list_dblogs(File &path, MessageReceiver &receiver, bool only_unused)
 {
   SVN::Pool requestPool;
   apr_array_header_t *logfiles;
@@ -297,7 +297,7 @@ list_dblogs (File &path, MessageReceiver
       log_utf8 = svn_dirent_join(path.getInternalStyle(requestPool),
                                  APR_ARRAY_IDX(logfiles, i, const char *),
                                  requestPool.getPool());
-      log_utf8 = svn_dirent_local_style (log_utf8, requestPool.getPool());
+      log_utf8 = svn_dirent_local_style(log_utf8, requestPool.getPool());
       receiver.receiveMessage(log_utf8);
     }
 }
@@ -365,13 +365,13 @@ void SVNRepos::lstxns(File &path, Messag
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
                               NULL, requestPool.getPool()), );
-  fs = svn_repos_fs (repos);
+  fs = svn_repos_fs(repos);
   SVN_JNI_ERR(svn_fs_list_transactions(&txns, fs, requestPool.getPool()), );
 
   /* Loop, printing revisions. */
   for (int i = 0; i < txns->nelts; ++i)
     {
-      messageReceiver.receiveMessage(APR_ARRAY_IDX (txns, i, const char *));
+      messageReceiver.receiveMessage(APR_ARRAY_IDX(txns, i, const char *));
     }
 
 
@@ -402,7 +402,7 @@ jlong SVNRepos::recover(File &path, Repo
    * recovery actually worked. */
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
                               NULL, requestPool.getPool()), -1);
-  SVN_JNI_ERR(svn_fs_youngest_rev(&youngest_rev, svn_repos_fs (repos),
+  SVN_JNI_ERR(svn_fs_youngest_rev(&youngest_rev, svn_repos_fs(repos),
                                   requestPool.getPool()),
               -1);
   return youngest_rev;
@@ -426,13 +426,13 @@ void SVNRepos::rmtxns(File &path, String
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
                               NULL, requestPool.getPool()), );
-  fs = svn_repos_fs (repos);
+  fs = svn_repos_fs(repos);
 
   args = transactions.array(requestPool);
   /* All the rest of the arguments are transaction names. */
   for (i = 0; i < args->nelts; ++i)
     {
-      const char *txn_name = APR_ARRAY_IDX (args, i, const char *);
+      const char *txn_name = APR_ARRAY_IDX(args, i, const char *);
       svn_error_t *err;
 
       /* Try to open the txn.  If that succeeds, try to abort it. */
@@ -446,7 +446,7 @@ void SVNRepos::rmtxns(File &path, String
        * all.  */
       if (err && (err->apr_err == SVN_ERR_FS_TRANSACTION_DEAD))
         {
-          svn_error_clear (err);
+          svn_error_clear(err);
           err = svn_fs_purge_txn(fs, txn_name, transactionPool.getPool());
         }
 
@@ -500,7 +500,7 @@ void SVNRepos::setRevProp(File &path, Re
     }
   else
     {
-      svn_fs_t *fs = svn_repos_fs (repos);
+      svn_fs_t *fs = svn_repos_fs(repos);
       err = svn_fs_change_rev_prop2(fs, revision.revision()->value.number,
                                     propName, NULL, propValStr,
                                     requestPool.getPool());
@@ -557,7 +557,7 @@ SVNRepos::verify(File &path, Revision &r
    * with no interest in the output. */
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
                               NULL, requestPool.getPool()), );
-  SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, svn_repos_fs (repos),
+  SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, svn_repos_fs(repos),
                                   requestPool.getPool()), );
 
   /* Find the revision numbers at which to start and end. */
@@ -661,13 +661,13 @@ jobject SVNRepos::lslocks(File &path, sv
 
   std::vector<jobject> jlocks;
 
-  for (hi = apr_hash_first (requestPool.getPool(), locks);
+  for (hi = apr_hash_first(requestPool.getPool(), locks);
        hi;
-       hi = apr_hash_next (hi))
+       hi = apr_hash_next(hi))
     {
       void *val;
-      apr_hash_this (hi, NULL, NULL, &val);
-      svn_lock_t *lock = (svn_lock_t *)val;
+      apr_hash_this(hi, NULL, NULL, &val);
+      svn_lock_t *lock = reinterpret_cast<svn_lock_t *>(val);
       jobject jLock = CreateJ::Lock(lock);
 
       jlocks.push_back(jLock);
@@ -693,7 +693,7 @@ void SVNRepos::rmlocks(File &path, Strin
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
                               NULL, requestPool.getPool()), );
-  fs = svn_repos_fs (repos);
+  fs = svn_repos_fs(repos);
   const char *username;
 
   /* svn_fs_unlock() demands that some username be associated with the
@@ -702,12 +702,12 @@ void SVNRepos::rmlocks(File &path, Strin
     apr_uid_t uid;
     apr_gid_t gid;
     char *un;
-    if (apr_uid_current (&uid, &gid, requestPool.getPool()) == APR_SUCCESS &&
-        apr_uid_name_get (&un, uid, requestPool.getPool()) == APR_SUCCESS)
+    if (apr_uid_current(&uid, &gid, requestPool.getPool()) == APR_SUCCESS &&
+        apr_uid_name_get(&un, uid, requestPool.getPool()) == APR_SUCCESS)
       {
         svn_error_t *err = svn_utf_cstring_to_utf8(&username, un,
                                                    requestPool.getPool());
-        svn_error_clear (err);
+        svn_error_clear(err);
         if (err)
           username = "administrator";
       }
@@ -723,7 +723,7 @@ void SVNRepos::rmlocks(File &path, Strin
   const apr_array_header_t *args = locks.array(requestPool);
   for (int i = 0; i < args->nelts; ++i)
     {
-      const char *lock_path = APR_ARRAY_IDX (args, i, const char *);
+      const char *lock_path = APR_ARRAY_IDX(args, i, const char *);
       svn_lock_t *lock;
 
       /* Fetch the path's svn_lock_t. */
@@ -734,13 +734,13 @@ void SVNRepos::rmlocks(File &path, Strin
         continue;
 
       /* Now forcibly destroy the lock. */
-      err = svn_fs_unlock (fs, lock_path,
-                           lock->token, 1 /* force */, subpool.getPool());
+      err = svn_fs_unlock(fs, lock_path,
+                          lock->token, 1 /* force */, subpool.getPool());
       if (err)
         goto move_on;
 
     move_on:
-      svn_error_clear (err);
+      svn_error_clear(err);
       subpool.clear();
     }
 

Modified: subversion/branches/ev2-export/subversion/bindings/javahl/native/StringArray.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/javahl/native/StringArray.cpp?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/javahl/native/StringArray.cpp (original)
+++ subversion/branches/ev2-export/subversion/bindings/javahl/native/StringArray.cpp Fri Nov 23 01:12:18 2012
@@ -39,7 +39,8 @@ StringArray::~StringArray()
 const apr_array_header_t *StringArray::array(const SVN::Pool &pool)
 {
   apr_array_header_t *strings
-    = apr_array_make(pool.getPool(), m_strings.size(), sizeof(char *));
+    = apr_array_make(pool.getPool(), static_cast<int>(m_strings.size()),
+                     sizeof(char *));
 
   std::vector<std::string>::const_iterator it;
   for (it = m_strings.begin(); it < m_strings.end(); ++it)
@@ -69,7 +70,7 @@ StringArray::init(void)
       if (JNIUtil::isExceptionThrown())
         return;
 
-      m_strings.push_back(std::string((const char *)str));
+      m_strings.push_back(std::string(static_cast<const char *>(str)));
     }
 }
 

Modified: subversion/branches/ev2-export/subversion/bindings/javahl/native/Targets.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/javahl/native/Targets.cpp?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/javahl/native/Targets.cpp (original)
+++ subversion/branches/ev2-export/subversion/bindings/javahl/native/Targets.cpp Fri Nov 23 01:12:18 2012
@@ -40,13 +40,13 @@ Targets::Targets(const char *path, SVN::
     : m_subpool(in_pool)
 {
   m_strArray = NULL;
-  m_targets.push_back (apr_pstrdup(m_subpool.getPool(), path));
-  m_error_occured = NULL;
+  m_targets.push_back(apr_pstrdup(m_subpool.getPool(), path));
+  m_error_occurred = NULL;
 }
 
 void Targets::add(const char *path)
 {
-  m_targets.push_back (path);
+  m_targets.push_back(path);
 }
 
 const apr_array_header_t *Targets::array(const SVN::Pool &pool)
@@ -62,7 +62,7 @@ const apr_array_header_t *Targets::array
           svn_error_t *err = JNIUtil::preprocessPath(tt, pool.getPool());
           if (err != NULL)
             {
-              m_error_occured = err;
+              m_error_occurred = err;
               break;
             }
           m_targets.push_back(tt);
@@ -72,9 +72,9 @@ const apr_array_header_t *Targets::array
   std::vector<const char*>::const_iterator it;
 
   apr_pool_t *apr_pool = pool.getPool();
-  apr_array_header_t *apr_targets = apr_array_make (apr_pool,
-                                                    m_targets.size(),
-                                                    sizeof(const char *));
+  apr_array_header_t *apr_targets
+    = apr_array_make(apr_pool, static_cast<int>(m_targets.size()),
+                               sizeof(const char *));
 
   for (it = m_targets.begin(); it != m_targets.end(); ++it)
     {
@@ -83,7 +83,7 @@ const apr_array_header_t *Targets::array
       svn_error_t *err = JNIUtil::preprocessPath(target, pool.getPool());
       if (err != NULL)
         {
-            m_error_occured = err;
+            m_error_occurred = err;
             break;
         }
       APR_ARRAY_PUSH(apr_targets, const char *) = target;
@@ -96,10 +96,10 @@ Targets::Targets(StringArray &strArray, 
     : m_subpool(in_pool)
 {
   m_strArray = &strArray;
-  m_error_occured = NULL;
+  m_error_occurred = NULL;
 }
 
-svn_error_t *Targets::error_occured()
+svn_error_t *Targets::error_occurred()
 {
-  return m_error_occured;
+  return m_error_occurred;
 }

Modified: subversion/branches/ev2-export/subversion/bindings/javahl/native/Targets.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/javahl/native/Targets.h?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/javahl/native/Targets.h (original)
+++ subversion/branches/ev2-export/subversion/bindings/javahl/native/Targets.h Fri Nov 23 01:12:18 2012
@@ -43,14 +43,14 @@ class Targets
   SVN::Pool m_subpool;
   std::vector<const char*> m_targets;
   StringArray *m_strArray;
-  svn_error_t *m_error_occured;
+  svn_error_t *m_error_occurred;
  public:
   Targets(StringArray &strArray, SVN::Pool &in_pool);
   Targets(const char *path, SVN::Pool &in_pool);
   void add(const char *path);
   ~Targets();
   const apr_array_header_t *array(const SVN::Pool &pool);
-  svn_error_t *error_occured();
+  svn_error_t *error_occurred();
 };
 
 #endif // TARGETS_H

Modified: subversion/branches/ev2-export/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/ev2-export/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Fri Nov 23 01:12:18 2012
@@ -161,7 +161,8 @@ Java_org_apache_subversion_javahl_SVNCli
 
   ListCallback callback(jcallback);
   cl->list(url, revision, pegRevision, EnumMapper::toDepth(jdepth),
-           (int)jdirentFields, jfetchLocks ? true : false, &callback);
+           static_cast<int>(jdirentFields), jfetchLocks ? true : false,
+           &callback);
 }
 
 JNIEXPORT void JNICALL
@@ -306,7 +307,7 @@ Java_org_apache_subversion_javahl_SVNCli
   cl->logMessages(path, pegRevision, revisionRanges,
                   jstopOnCopy ? true: false, jdisoverPaths ? true : false,
                   jincludeMergedRevisions ? true : false,
-                  revProps, jlimit, &callback);
+                  revProps, static_cast<long>(jlimit), &callback);
 }
 
 JNIEXPORT jlong JNICALL
@@ -958,8 +959,8 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   CommitCallback callback(jcallback);
-  cl->propertySetRemote(path, jbaseRev, name, &message, value,
-                        jforce ? true:false,
+  cl->propertySetRemote(path, static_cast<svn_revnum_t>(jbaseRev),
+                        name, &message, value, jforce ? true : false,
                         revprops, jcallback ? &callback : NULL);
 }
 
@@ -1770,7 +1771,8 @@ Java_org_apache_subversion_javahl_SVNCli
     return;
 
   PatchCallback callback(jcallback);
-  cl->patch(patchPath, targetPath, jdryRun ? true : false, (int) jstripCount,
+  cl->patch(patchPath, targetPath,
+            jdryRun ? true : false, static_cast<int>(jstripCount),
             jreverse ? true : false, jignoreWhitespace ? true : false,
             jremoveTempfiles ? true : false, &callback);
 }

Modified: subversion/branches/ev2-export/subversion/bindings/swig/perl/native/Makefile.PL.in
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/perl/native/Makefile.PL.in?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/perl/native/Makefile.PL.in (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/perl/native/Makefile.PL.in Fri Nov 23 01:12:18 2012
@@ -53,6 +53,7 @@ my $includes = '@SVN_APR_INCLUDES@ @SVN_
 # https://sourceforge.net/tracker/?func=detail&aid=3571361&group_id=1645&atid=101645
 # SWIG is using C++ style comments in an extern "C" code.
 $cflags =~ s/-ansi\s+//g;
+$cflags =~ s/-std=c89\s+//g;
 
 # According to the log of r7937, the flags guarded by the conditional break
 # the build on FreeBSD if not conditionalized.

Modified: subversion/branches/ev2-export/subversion/bindings/swig/perl/native/Repos.pm
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/perl/native/Repos.pm?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/perl/native/Repos.pm (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/perl/native/Repos.pm Fri Nov 23 01:12:18 2012
@@ -183,11 +183,11 @@ of paths that have changed in this revis
 
 =item $rev
 
-The revision this change occured in.
+The revision this change occurred in.
 
 =item $date
 
-The date and time the revision occured.
+The date and time the revision occurred.
 
 =item $msg
 

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/svn/info.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/svn/info.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/svn/info.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/svn/info.rb Fri Nov 23 01:12:18 2012
@@ -229,7 +229,9 @@ module Svn
 
     def parse_diff_unified(entry)
       in_content = false
-      entry.body.each do |line|
+      # ruby 1.8 and ruby 1.9 compat
+      each_meth = entry.body.respond_to?(:each_line) ? :each_line : :each
+      entry.body.send(each_meth) do |line|
         case line
         when /^@@/
           in_content = true

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/svn/util.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/svn/util.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/svn/util.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/svn/util.rb Fri Nov 23 01:12:18 2012
@@ -36,7 +36,7 @@ module Svn
   module Util #:nodoc:
     module_function
     def to_ruby_class_name(name)
-      name.split("_").collect do |x|
+      name.to_s.split("_").collect do |x|
         "#{x[0,1].upcase}#{x[1..-1].downcase}"
       end.join("")
     end

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/my-assertions.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/my-assertions.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/my-assertions.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/my-assertions.rb Fri Nov 23 01:12:18 2012
@@ -24,20 +24,33 @@ module Test
   module Unit
     module Assertions
 
+      # make an intermediary assertion block handler
+      def _my_assert_block(&block)
+       if RUBY_VERSION > '1.9'
+         assert_block do
+           yield
+         end
+       else
+         _wrap_assertion do
+           yield
+         end
+       end
+      end
+
       def assert_true(boolean, message=nil)
-        _wrap_assertion do
+        _my_assert_block do
           assert_equal(true, boolean, message)
         end
       end
 
       def assert_false(boolean, message=nil)
-        _wrap_assertion do
+        _my_assert_block do
           assert_equal(false, boolean, message)
         end
       end
 
       def assert_nested_sorted_array(expected, actual, message=nil)
-        _wrap_assertion do
+        _my_assert_block do
           assert_equal(expected.collect {|elem| elem.sort},
                        actual.collect {|elem| elem.sort},
                        message)
@@ -45,7 +58,7 @@ module Test
       end
 
       def assert_equal_log_entries(expected, actual, message=nil)
-        _wrap_assertion do
+        _my_assert_block do
           actual = actual.collect do |entry|
             changed_paths = entry.changed_paths
             changed_paths.each_key do |path|

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test-unit-ext.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test-unit-ext.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test-unit-ext.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test-unit-ext.rb Fri Nov 23 01:12:18 2012
@@ -17,7 +17,7 @@
 #    under the License.
 # ====================================================================
 
-require "test-unit-ext/always-show-result"
+require "test-unit-ext/always-show-result" if RUBY_VERSION < '1.9.3'
 require "test-unit-ext/priority"
-require "test-unit-ext/backtrace-filter"
-require "test-unit-ext/long-display-for-emacs"
+require "test-unit-ext/backtrace-filter" if RUBY_VERSION < '1.9.3'
+require "test-unit-ext/long-display-for-emacs" if RUBY_VERSION < '1.9.3'

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test-unit-ext/priority.rb Fri Nov 23 01:12:18 2012
@@ -179,7 +179,7 @@ module Test
         apply_priority
         !@tests.empty?
       end
-    end
+    end if RUBY_VERSION < '1.9.3'
 
     class AutoRunner
       alias_method :original_options, :options

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_client.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_client.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_client.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_client.rb Fri Nov 23 01:12:18 2012
@@ -2203,7 +2203,10 @@ class SvnClientTest < Test::Unit::TestCa
 
     make_context(log) do |ctx|
       items = nil
-      ctx.set_log_msg_func do |items|
+      ctx.set_log_msg_func do |l_items|
+        # ruby 1.8 will carry the assignment of items out of the 
+        # scope of this block, 1.9 will not, so we must assign.
+        items = l_items
         [true, log]
       end
 

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_core.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_core.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_core.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_core.rb Fri Nov 23 01:12:18 2012
@@ -1,3 +1,4 @@
+# encoding = utf-8
 # ====================================================================
 #    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
@@ -52,7 +53,13 @@ class SvnCoreTest < Test::Unit::TestCase
     now = Time.now.gmtime
     str = now.strftime("%Y-%m-%dT%H:%M:%S.") + "#{now.usec}Z"
 
-    assert_equal(now, Time.from_svn_format(str))
+    if RUBY_VERSION > '1.9'
+      # ruby 1.9 Time comparison gets into the nano-seconds, strftime
+      # shaves these off. So we can compare epoch time instead
+      assert_equal(now.to_i, Time.from_svn_format(str).gmtime.to_i)
+    else
+      assert_equal(now, Time.from_svn_format(str).gmtime)
+    end
 
     apr_time = now.to_i * 1000000 + now.usec
     assert_equal(apr_time, now.to_apr_time)
@@ -244,7 +251,11 @@ class SvnCoreTest < Test::Unit::TestCase
       config_infos << [section, name, value]
     end
     assert_equal(infos.sort, config_infos.sort)
-    assert_equal(infos.sort, config.collect {|args| args}.sort)
+    if RUBY_VERSION > '1.9'
+      assert_equal(infos.sort, config.collect {|sect,name,val| [sect,name,val]}.sort)
+    else
+      assert_equal(infos.sort, config.collect {|args| args}.sort)
+    end
   end
 
   def test_config_find_group
@@ -532,7 +543,13 @@ EOD
     date_str = now.strftime("%Y-%m-%dT%H:%M:%S")
     date_str << ".#{now.usec}Z"
     info.date = date_str
-    assert_equal(now, info.date)
+    if RUBY_VERSION > '1.9'
+      # ruby 1.9 Time comparison gets into the nano-seconds, strftime
+      # shaves these off. So we can compare epoch time instead
+      assert_equal(now.to_i, info.date.gmtime.to_i)
+    else
+      assert_equal(now, info.date.gmtime)
+    end
   end
 
   def test_svn_prop

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_delta.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_delta.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_delta.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_delta.rb Fri Nov 23 01:12:18 2012
@@ -1,3 +1,4 @@
+# encoding: UTF-8
 # ====================================================================
 #    Licensed to the Apache Software Foundation (ASF) under one
 #    or more contributor license agreements.  See the NOTICE file
@@ -17,9 +18,10 @@
 #    under the License.
 # ====================================================================
 
+require "my-assertions"
 require "util"
 require "stringio"
-require 'md5'
+require 'digest/md5'
 require 'tempfile'
 
 require "svn/info"
@@ -46,8 +48,8 @@ class SvnDeltaTest < Test::Unit::TestCas
     target = StringIO.new(t)
     stream = Svn::Delta::TextDeltaStream.new(source, target)
     assert_nil(stream.md5_digest)
-    _wrap_assertion do
-      stream.each do |window|
+    _my_assert_block do
+      ret = stream.each do |window|
         window.ops.each do |op|
           op_size = op.offset + op.length
           case op.action_code
@@ -62,8 +64,9 @@ class SvnDeltaTest < Test::Unit::TestCas
           end
         end
       end
+      true if RUBY_VERSION > '1.9' # this block returns nil in > ruby '1.9'
     end
-    assert_equal(MD5.new(t).hexdigest, stream.md5_digest)
+    assert_equal(Digest::MD5.hexdigest(t), stream.md5_digest)
   end
 
   def test_txdelta_window_compose
@@ -81,7 +84,7 @@ class SvnDeltaTest < Test::Unit::TestCas
       end
     end
 
-    _wrap_assertion do
+    _my_assert_block do
       composed_window.ops.each do |op|
         op_size = op.offset + op.length
         case op.action_code
@@ -161,21 +164,33 @@ class SvnDeltaTest < Test::Unit::TestCas
     assert_equal(target_text * 3, apply_result.read)
   end
 
+  def get_regex(pattern, encoding='ASCII', options=0)
+    Regexp.new(pattern.encode(encoding),options)
+  end
+
   def test_svndiff
     source_text = "abcde"
     target_text = "abXde"
     source = StringIO.new(source_text)
     target = StringIO.new(target_text)
     stream = Svn::Delta::TextDeltaStream.new(source, target)
-
-    output = StringIO.new("")
+    
+    if RUBY_VERSION > '1.9' 
+      output = StringIO.new("".encode('ASCII-8BIT'))
+    else
+      output = StringIO.new("")
+    end
     handler = Svn::Delta.svndiff_handler(output)
 
     Svn::Delta.send(target_text, handler)
     output.rewind
     result = output.read
-    assert_match(/\ASVN.*#{target_text}\z/, result)
-
+    if RUBY_VERSION > '1.9' 
+      regex = get_regex("\\ASVN.*#{target_text}\\Z".encode('utf-8'),result.encoding,16)
+      assert_match(regex, result)
+    else
+      assert_match(/\ASVN.*#{target_text}\Z/, result)
+    end
     # skip svndiff window
     input = StringIO.new(result[4..-1])
     window = Svn::Delta.read_svndiff_window(input, 0)

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_fs.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_fs.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_fs.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_fs.rb Fri Nov 23 01:12:18 2012
@@ -20,7 +20,7 @@
 require "my-assertions"
 require "util"
 require "time"
-require "md5"
+require "digest/md5"
 
 require "svn/core"
 require "svn/fs"
@@ -49,14 +49,15 @@ class SvnFsTest < Test::Unit::TestCase
 
     assert(!File.exist?(path))
     fs = nil
-    callback = Proc.new do |fs|
+    callback = Proc.new do |t_fs|
       assert(File.exist?(path))
       assert_equal(fs_type, Svn::Fs.type(path))
-      fs.set_warning_func do |err|
+      t_fs.set_warning_func do |err|
         p err
         abort
       end
-      assert_equal(path, fs.path)
+      assert_equal(path, t_fs.path)
+      fs = t_fs
     end
     yield(:create, [path, config], callback)
 
@@ -162,7 +163,7 @@ class SvnFsTest < Test::Unit::TestCase
 
       assert_equal(src, @fs.root.file_contents(path_in_repos){|f| f.read})
       assert_equal(src.length, @fs.root.file_length(path_in_repos))
-      assert_equal(MD5.new(src).hexdigest,
+      assert_equal(Digest::MD5.hexdigest(src),
                    @fs.root.file_md5_checksum(path_in_repos))
 
       assert_equal([path_in_repos], @fs.root.paths_changed.keys)
@@ -364,7 +365,7 @@ class SvnFsTest < Test::Unit::TestCase
 
       File.open(path, "w") {|f| f.print(modified)}
       @fs.transaction do |txn|
-        checksum = MD5.new(normalize_line_break(result)).hexdigest
+        checksum = Digest::MD5.hexdigest(normalize_line_break(result))
         stream = txn.root.apply_text(path_in_repos, checksum)
         stream.write(normalize_line_break(result))
         stream.close
@@ -392,8 +393,8 @@ class SvnFsTest < Test::Unit::TestCase
 
       File.open(path, "w") {|f| f.print(modified)}
       @fs.transaction do |txn|
-        base_checksum = MD5.new(normalize_line_break(src)).hexdigest
-        checksum = MD5.new(normalize_line_break(result)).hexdigest
+        base_checksum = Digest::MD5.hexdigest(normalize_line_break(src))
+        checksum = Digest::MD5.hexdigest(normalize_line_break(result))
         handler = txn.root.apply_textdelta(path_in_repos,
                                            base_checksum, checksum)
         assert_raises(Svn::Error::ChecksumMismatch) do

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_repos.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_repos.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_repos.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_repos.rb Fri Nov 23 01:12:18 2012
@@ -98,11 +98,12 @@ class SvnReposTest < Test::Unit::TestCas
     fs_type = Svn::Fs::TYPE_FSFS
     fs_config = {Svn::Fs::CONFIG_FS_TYPE => fs_type}
     repos = nil
-    Svn::Repos.create(tmp_repos_path, {}, fs_config) do |repos|
+    Svn::Repos.create(tmp_repos_path, {}, fs_config) do |t_repos|
       assert(File.exist?(tmp_repos_path))
-      fs_type_path = File.join(repos.fs.path, Svn::Fs::CONFIG_FS_TYPE)
+      fs_type_path = File.join(t_repos.fs.path, Svn::Fs::CONFIG_FS_TYPE)
       assert_equal(fs_type, File.open(fs_type_path) {|f| f.read.chop})
-      repos.fs.set_warning_func(&warning_func)
+      t_repos.fs.set_warning_func(&warning_func)
+      repos = t_repos
     end
 
     assert(repos.closed?)

Modified: subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_wc.rb
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_wc.rb?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_wc.rb (original)
+++ subversion/branches/ev2-export/subversion/bindings/swig/ruby/test/test_wc.rb Fri Nov 23 01:12:18 2012
@@ -534,7 +534,7 @@ EOE
       ctx.ci(lf_path)
 
       Svn::Wc::AdmAccess.open(nil, @wc_path, true, 5) do |access|
-        _wrap_assertion do
+        _my_assert_block do
           File.open(src_path, "wb") {|f| f.print(source)}
           args = [method_name, src_path, crlf_path, Svn::Wc::TRANSLATE_FROM_NF]
           result = yield(access.send(*args), source)
@@ -1089,7 +1089,11 @@ EOE
         assert_not_nil context
         assert_kind_of Svn::Wc::Context, context
       end
-      assert_nil result;
+      if RUBY_VERSION > '1.9'
+        assert_equal(result,true)
+      else
+        assert_nil result
+      end
     end
   end
 

Modified: subversion/branches/ev2-export/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_client_private.h?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_client_private.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_client_private.h Fri Nov 23 01:12:18 2012
@@ -226,21 +226,6 @@ svn_client__wc_node_get_origin(svn_clien
                                apr_pool_t *result_pool,
                                apr_pool_t *scratch_pool);
 
-/* Set *YCA, *BASE, *RIGHT, *TARGET to the repository locations of the
- * youngest common ancestor of the branches, the base chosen for 3-way
- * merge, the right-hand side of the source diff, and the target WC.
- *
- * Any of the output pointers may be NULL if not wanted.
- */
-svn_error_t *
-svn_client__automatic_merge_get_locations(
-                                svn_client__pathrev_t **yca,
-                                svn_client__pathrev_t **base,
-                                svn_client__pathrev_t **right,
-                                svn_client__pathrev_t **target,
-                                const svn_client_automatic_merge_t *merge,
-                                apr_pool_t *result_pool);
-
 
 #ifdef __cplusplus
 }

Modified: subversion/branches/ev2-export/subversion/include/private/svn_named_atomic.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_named_atomic.h?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_named_atomic.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_named_atomic.h Fri Nov 23 01:12:18 2012
@@ -54,7 +54,7 @@ typedef struct svn_named_atomic__t svn_n
 /** Returns #FALSE when named atomics are not available to our process
  * and svn_atomic_namespace__create is likely to fail.
  *
- * Please note that the actual check will be performed only once and later
+ * @note The actual check will be performed only once and later
  * changes in process privileges will not reflect in the outcome of future
  * calls to this function.
  */
@@ -76,7 +76,7 @@ svn_named_atomic__is_efficient(void);
  * the same shared memory region but have independent lifetimes.
  *
  * The access object will be allocated in @a result_pool and atomics gotten
- * from this object will become invalid when the pool is being cleaned.
+ * from this object will become invalid when the pool is being cleared.
  */
 svn_error_t *
 svn_atomic_namespace__create(svn_atomic_namespace__t **ns,
@@ -104,7 +104,7 @@ svn_atomic_namespace__cleanup(const char
  * characters and an error will be returned if the specified name is longer
  * than supported.
  *
- * Please note that the lifetime of the atomic is bound to the lifetime
+ * @note The lifetime of the atomic is bound to the lifetime
  * of the @a ns object, i.e. the pool the latter was created in.
  */
 svn_error_t *
@@ -120,8 +120,8 @@ svn_error_t *
 svn_named_atomic__read(apr_int64_t *value,
                        svn_named_atomic__t *atomic);
 
-/** Set the data in @a atomic to @a NEW_VALUE and return its old content
- * in @a OLD_VALUE.  @a OLD_VALUE may be NULL.
+/** Set the data in @a atomic to @a new_value and return its old content
+ * in @a *old_value.  @a old_value may be NULL.
  *
  * An error will be returned if @a atomic is @c NULL.
  */
@@ -131,7 +131,7 @@ svn_named_atomic__write(apr_int64_t *old
                         svn_named_atomic__t *atomic);
 
 /** Add @a delta to the data in @a atomic and return its new value in
- * @a NEW_VALUE.  @a NEW_VALUE may be NULL.
+ * @a *new_value.  @a new_value may be null.
  *
  * An error will be returned if @a atomic is @c NULL.
  */
@@ -141,8 +141,8 @@ svn_named_atomic__add(apr_int64_t *new_v
                       svn_named_atomic__t *atomic);
 
 /** If the current data in @a atomic equals @a comperand, set it to
- * @a NEW_VALUE.  Return the initial value in @a OLD_VALUE.
- * @a OLD_VALUE may be NULL.
+ * @a new_value.  Return the initial value in @a *old_value.
+ * @a old_value may be NULL.
  *
  * An error will be returned if @a atomic is @c NULL.
  */

Modified: subversion/branches/ev2-export/subversion/include/private/svn_string_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_string_private.h?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_string_private.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_string_private.h Fri Nov 23 01:12:18 2012
@@ -46,6 +46,83 @@ extern "C" {
  * @{
  */
 
+
+/** A self-contained memory buffer of known size.
+ *
+ * Intended to be used where a single variable-sized buffer is needed
+ * within an iteration, a scratch pool is available and we want to
+ * avoid the cost of creating another pool just for the iteration.
+ */
+typedef struct svn_membuf_t
+{
+  /** The a pool from which this buffer was originally allocated, and is not
+   * necessarily specific to this buffer.  This is used only for allocating
+   * more memory from when the buffer needs to grow.
+   */
+  apr_pool_t *pool;
+
+  /** pointer to the memory */
+  void *data;
+
+  /** total size of buffer allocated */
+  apr_size_t size;
+} svn_membuf_t;
+
+
+/* Initialize a memory buffer of the given size */
+void
+svn_membuf__create(svn_membuf_t *membuf, apr_size_t size, apr_pool_t *pool);
+
+/* Ensure that the given memory buffer has at least the given size */
+void
+svn_membuf__ensure(svn_membuf_t *membuf, apr_size_t size);
+
+/* Resize the given memory buffer, preserving its contents. */
+void
+svn_membuf__resize(svn_membuf_t *membuf, apr_size_t size);
+
+/* Zero-fill the given memory */
+void
+svn_membuf__zero(svn_membuf_t *membuf);
+
+/* Zero-fill the given memory buffer up to the smaller of SIZE and the
+   current buffer size. */
+void
+svn_membuf__nzero(svn_membuf_t *membuf, apr_size_t size);
+
+/* Inline implementation of svn_membuf__zero.
+ * Note that PMEMBUF is evaluated only once.
+ */
+#define SVN_MEMBUF__ZERO(pmembuf)                \
+  do                                             \
+    {                                            \
+      svn_membuf_t *const _m_b_f_ = (pmembuf);   \
+      memset(_m_b_f_->data, 0, _m_b_f_->size);   \
+    }                                            \
+  while(0)
+
+/* Inline implementation of svn_membuf__nzero
+ * Note that PMEMBUF and PSIZE are evaluated only once.
+ */
+#define SVN_MEMBUF__NZERO(pmembuf, psize)        \
+  do                                             \
+    {                                            \
+      svn_membuf_t *const _m_b_f_ = (pmembuf);   \
+      const apr_size_t _s_z_ = (psize);          \
+      if (_s_z_ > _m_b_f_->size)                 \
+        memset(_m_b_f_->data, 0, _m_b_f_->size); \
+      else                                       \
+        memset(_m_b_f_->data, 0, _s_z_);         \
+    }                                            \
+  while(0)
+
+#ifndef SVN_DEBUG
+/* In non-debug mode, just use these inlie replacements */
+#define svn_membuf__zero(B) SVN_MEMBUF__ZERO((B))
+#define svn_membuf__nzero(B, S) SVN_MEMBUF__NZERO((B), (S))
+#endif
+
+
 /** Returns the #svn_string_t information contained in the data and
  * len members of @a strbuf. This is effectively a typecast, converting
  * @a strbuf into an #svn_string_t. This first will become invalid and must
@@ -90,6 +167,49 @@ svn__ui64toa_sep(apr_uint64_t number, ch
 char *
 svn__i64toa_sep(apr_int64_t number, char seperator, apr_pool_t *pool);
 
+/**
+ * Computes the similarity score of STRA and STRB. Returns the
+ * ratio of the length of their longest common subsequence and
+ * the length of the strings, normalized to the range [0..1000].
+ * The result is equivalent to Python's
+ *
+ *   difflib.SequenceMatcher.ratio
+ *
+ * Optionally sets *RLCS to the length of the longest common
+ * subsequence of STRA and STRB. Using BUFFER for temporary storage,
+ * requires memory proportional to the length of the shorter string.
+ *
+ * The LCS algorithm used is described in, e.g.,
+ *
+ *   http://en.wikipedia.org/wiki/Longest_common_subsequence_problem
+ *
+ * Q: Why another LCS when we already have one in libsvn_diff?
+ * A: svn_diff__lcs is too heavyweight and too generic for the
+ *    purposes of similarity testing. Whilst it would be possible
+ *    to use a character-based tokenizer with it, we really only need
+ *    the *length* of the LCS for the similarity score, not all the
+ *    other information that svn_diff__lcs produces in order to
+ *    make printing diffs possible.
+ *
+ * Q: Is there a limit on the length of the string parameters?
+ * A: Only available memory. But note that the LCS algorithm used
+ *    has O(strlen(STRA) * strlen(STRB)) worst-case performance,
+ *    so do keep a rein on your enthusiasm.
+ */
+unsigned int
+svn_cstring__similarity(const char *stra, const char *strb,
+                        svn_membuf_t *buffer, apr_size_t *rlcs);
+
+/**
+ * Like svn_cstring__similarity, but accepts svn_string_t's instead
+ * of NUL-terminated character strings.
+ */
+unsigned int
+svn_string__similarity(const svn_string_t *stringa,
+                       const svn_string_t *stringb,
+                       svn_membuf_t *buffer, apr_size_t *rlcs);
+
+
 /** @} */
 
 /** @} */

Modified: subversion/branches/ev2-export/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/private/svn_wc_private.h?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/private/svn_wc_private.h (original)
+++ subversion/branches/ev2-export/subversion/include/private/svn_wc_private.h Fri Nov 23 01:12:18 2012
@@ -546,6 +546,10 @@ svn_wc__node_is_status_deleted(svn_boole
  * and has no deleted ancestor, @a *deleted_ancestor_abspath will equal
  * @a local_abspath. If @a local_abspath was not deleted,
  * set @a *deleted_ancestor_abspath to @c NULL.
+ *
+ * A node is considered 'deleted' if it is deleted or moved-away, and is
+ * not replaced.
+ *
  * @a *deleted_ancestor_abspath is allocated in @a result_pool.
  * Use @a scratch_pool for all temporary allocations.
  */
@@ -669,35 +673,6 @@ svn_wc__node_get_pre_ng_status_data(svn_
                                     apr_pool_t *result_pool,
                                     apr_pool_t *scratch_pool);
 
-
-/**
- * Return the location of the base for this node's next commit,
- * reflecting any local tree modifications affecting this node.
- *
- * Get the base location of @a local_abspath using @a wc_ctx.  If @a
- * local_abspath is not in the working copy, return @c
- * SVN_ERR_WC_PATH_NOT_FOUND.
- *
- * If this node has no uncommitted changes, return the same location as
- * svn_wc__node_get_base().
- *
- * If this node is moved-here or copied-here (possibly as part of a replace),
- * return the location of the copy/move source. Do the same even when the node
- * has been removed from a recursive copy (subpath excluded from the copy).
- *
- * Else, if this node is locally added, return SVN_INVALID_REVNUM/NULL, or
- * if locally deleted or replaced, return the revert-base location.
- */
-svn_error_t *
-svn_wc__node_get_commit_base(svn_revnum_t *revision,
-                             const char **repos_relpath,
-                             const char **repos_root_url,
-                             const char **repos_uuid,
-                             svn_wc_context_t *wc_ctx,
-                             const char *local_abspath,
-                             apr_pool_t *result_pool,
-                             apr_pool_t *scratch_pool);
-
 /**
  * Fetch lock information (if any) for @a local_abspath using @a wc_ctx:
  *

Modified: subversion/branches/ev2-export/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_client.h?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_client.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_client.h Fri Nov 23 01:12:18 2012
@@ -1524,17 +1524,42 @@ svn_client_switch(svn_revnum_t *result_r
  * behaviour only when recursing into an already versioned directory with @a
  * force.)
  *
+ * If @a no_autoprops is TRUE, don't set any autoprops on added files. If
+ * @a no_autoprops is FALSE then all added files have autprops set as per
+ * the auto-props list in @a ctx->config and the value of any
+ * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest
+ * parents of @a path which are already under version control.
+ *
  * If @a add_parents is TRUE, recurse up @a path's directory and look for
  * a versioned directory.  If found, add all intermediate paths between it
  * and @a path.  If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT.
  *
+ * @a scratch_pool is used for temporary allocations only.
+ *
  * @par Important:
  * This is a *scheduling* operation.  No changes will
  * happen to the repository until a commit occurs.  This scheduling
  * can be removed with svn_client_revert2().
  *
- * @since New in 1.5.
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_client_add5(const char *path,
+                svn_depth_t depth,
+                svn_boolean_t force,
+                svn_boolean_t no_ignore,
+                svn_boolean_t no_autoprops,
+                svn_boolean_t add_parents,
+                svn_client_ctx_t *ctx,
+                apr_pool_t *scratch_pool);
+
+/**
+ * Similar to svn_client_add3(), but with @a no_autoprops always set to
+ * FALSE.
+ *
+ * @deprecated Provided for backward compatibility with the 1.7 API.
  */
+SVN_DEPRECATED
 svn_error_t *
 svn_client_add4(const char *path,
                 svn_depth_t depth,
@@ -1852,7 +1877,7 @@ typedef svn_error_t *(*svn_client_import
  * actions: #svn_wc_notify_commit_added,
  * #svn_wc_notify_commit_postfix_txdelta.
  *
- * Use @a pool for any temporary allocation.
+ * Use @a scratch_pool for any temporary allocation.
  *
  * If non-NULL, @a revprop_table is a hash table holding additional,
  * custom revision properties (<tt>const char *</tt> names mapped to
@@ -1879,6 +1904,13 @@ typedef svn_error_t *(*svn_client_import
  * if the target is part of a WC the import ignores any existing
  * properties.)
  *
+ * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If
+ * @a no_autoprops is FALSE then all imported files have autprops set as per
+ * the auto-props list in @a ctx->config and the value of any
+ * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set
+ * on @a url if @a url is already under versioned control, or the nearest parents
+ * of @a path which are already under version control if not.
+ *
  * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
  * node type is unknown, such as device files and pipes.
  *
@@ -1897,6 +1929,7 @@ svn_client_import5(const char *path,
                    const char *url,
                    svn_depth_t depth,
                    svn_boolean_t no_ignore,
+                   svn_boolean_t no_autoprops,
                    svn_boolean_t ignore_unknown_node_types,
                    const apr_hash_t *revprop_table,
                    svn_client_import_filter_func_t filter_callback,
@@ -1908,7 +1941,7 @@ svn_client_import5(const char *path,
 
 /**
  * Similar to svn_client_import5(), but without support for an optional
- * @a filter_callback.
+ * @a filter_callback and @a no_autoprops always set to FALSE.
  *
  * @since New in 1.7.
  * @deprecated Provided for backward compatibility with the 1.7 API.
@@ -2867,8 +2900,8 @@ svn_client_blame(const char *path_or_url
  * errstream.  @a path_or_url1 and @a path_or_url2 can be either
  * working-copy paths or URLs.
  *
- * If @a relative_to_dir is not @c NULL, the @a original_path and
- * @a modified_path will have the @a relative_to_dir stripped from the
+ * If @a relative_to_dir is not @c NULL, the original path and
+ * modified path will have the @a relative_to_dir stripped from the
  * front of the respective paths.  If @a relative_to_dir is @c NULL,
  * paths will not be modified.  If @a relative_to_dir is not
  * @c NULL but @a relative_to_dir is not a parent path of the target,
@@ -3376,19 +3409,42 @@ svn_client_diff_summarize_peg(const char
  * @{
  */
 
-/* Details of an automatic merge. */
+/** Details of an automatic merge.
+ *
+ * The information includes the locations of the youngest common ancestor,
+ * merge base, and such like.  The details are private to the implementation
+ * but some of the information can be retrieved through the public APIs
+ * svn_client_automatic_merge_is_reintegrate_like() and
+ * svn_client_automatic_merge_get_locations().
+ *
+ * @since New in 1.8.
+ */
 typedef struct svn_client_automatic_merge_t svn_client_automatic_merge_t;
 
-/* Find the information needed to merge all unmerged changes from a source
- * branch into a target branch.  The information is the locations of the
- * youngest common ancestor, merge base, and such like.
+/** Find the information needed to merge all unmerged changes from a source
+ * branch into a target branch.
+ *
+ * Set @a *merge_p to the information needed to merge all unmerged changes
+ * (up to @a source_revision) from the source branch @a source_path_or_url
+ * at @a source_revision into the target WC at @a target_wcpath.
+ *
+ * The flags @a allow_mixed_rev, @a allow_local_mods and
+ * @a allow_switched_subtrees enable merging into a WC that is in any or all
+ * of the states described by their names, but only if this function decides
+ * that the merge will be in the same direction as the last automatic merge.
+ * If, on the other hand, the merge turns out to be in the opposite
+ * direction (that is, if svn_client_automatic_merge_is_reintegrate_like()
+ * would return true), then such states of the WC are not allowed regardless
+ * of these flags.  This function merely records these flags in the
+ * @a *merge_p structure; svn_client_do_automatic_merge() checks the WC
+ * state for compliance.
+ *
+ * Allocate the @a *merge_p structure in @a result_pool.
  *
- * Set *MERGE to the information needed to merge all unmerged changes
- * (up to SOURCE_REVISION) from the source branch SOURCE_PATH_OR_URL @
- * SOURCE_REVISION into the target WC at TARGET_WCPATH.
+ * @since New in 1.8.
  */
 svn_error_t *
-svn_client_find_automatic_merge(svn_client_automatic_merge_t **merge,
+svn_client_find_automatic_merge(svn_client_automatic_merge_t **merge_p,
                                 const char *source_path_or_url,
                                 const svn_opt_revision_t *source_revision,
                                 const char *target_wcpath,
@@ -3399,18 +3455,22 @@ svn_client_find_automatic_merge(svn_clie
                                 apr_pool_t *result_pool,
                                 apr_pool_t *scratch_pool);
 
-/* Find out what kind of automatic merge would be needed, when the target
+/** Find out what kind of automatic merge would be needed, when the target
  * is only known as a repository location rather than a WC.
  *
- * Like svn_client_find_automatic_merge() except that SOURCE_PATH_OR_URL @
- * SOURCE_REVISION should refer to a repository location and not a WC.
+ * Like svn_client_find_automatic_merge() except that @a source_path_or_url
+ * at @a source_revision should refer to a repository location and not a WC.
+ *
+ * @note The result, @a *merge_p, is not intended for passing to
+ * svn_client_do_automatic_merge().
+ *   ### We should do something about this.  Perhaps ensure
+ *       svn_client_do_automatic_merge() will work iff given a WC that
+ *       matches the stored repo-location of the target branch and is an
+ *       unmodified single-rev WC.
+ *
+ * Allocate the @a *merge_p structure in @a result_pool.
  *
- * ### The result, *MERGE_P, may not be suitable for passing to
- * svn_client_do_automatic_merge().  The target WC state would not be
- * checked (as in the ALLOW_* flags).  We should resolve this problem:
- * perhaps add the allow_* params here, or provide another way of setting
- * them; and perhaps ensure __do_...() will accept the result iff given a
- * WC that matches the stored target location.
+ * @since New in 1.8.
  */
 svn_error_t *
 svn_client_find_automatic_merge_no_wc(
@@ -3423,19 +3483,15 @@ svn_client_find_automatic_merge_no_wc(
                                  apr_pool_t *result_pool,
                                  apr_pool_t *scratch_pool);
 
-/* Perform an automatic merge.
+/** Perform an automatic merge.
  *
- * Merge according to MERGE into the WC at TARGET_WCPATH.
+ * Perform a merge, according to the information stored in @a merge, into
+ * the WC at @a target_wcpath.  The @a merge structure would typically come
+ * from calling svn_client_find_automatic_merge().
  *
  * The other parameters are as in svn_client_merge4().
  *
- * ### TODO: There's little point in this function being the only way the
- * caller can use the result of svn_client_find_automatic_merge().  The
- * contents of MERGE should be more public, or there should be other ways
- * the caller can use it, or these two functions should be combined into
- * one.  I want to make it more public, and also possibly have more ways
- * to use it in future (for example, do_automatic_merge_with_step_by_-
- * step_confirmation).
+ * @since New in 1.8.
  */
 svn_error_t *
 svn_client_do_automatic_merge(const svn_client_automatic_merge_t *merge,
@@ -3448,17 +3504,49 @@ svn_client_do_automatic_merge(const svn_
                               svn_client_ctx_t *ctx,
                               apr_pool_t *scratch_pool);
 
-/* Return TRUE iff the automatic merge represented by MERGE is going to be
- * a reintegrate-like merge: that is, merging in the opposite direction
- * from the last full merge.
+/** Return TRUE iff the automatic merge represented by @a merge is going to
+ * be a reintegrate-like merge: that is, merging in the opposite direction
+ * from the last automatic merge.
  *
- * This function exists because the merge is NOT really automatic and the
+ * This function exists because the automatic merge is not symmetric and the
  * client can be more friendly if it knows something about the differences.
+ *
+ * @since New in 1.8.
  */
 svn_boolean_t
 svn_client_automatic_merge_is_reintegrate_like(
         const svn_client_automatic_merge_t *merge);
 
+/** Retrieve the repository coordinates involved in an automatic merge.
+ *
+ * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url,
+ * @a *right_rev, @a *target_url, @a *target_rev to the repository locations
+ * of, respectively: the youngest common ancestor of the branches, the base
+ * chosen for 3-way merge, the right-hand side of the source diff, and the
+ * target WC.
+ *
+ * Set @a repos_root_url to the URL of the repository root.  The four
+ * locations are necessarily in the same repository.
+ *
+ * Allocate the results in @a result_pool.  Any of the output pointers may
+ * be NULL if not wanted.
+ *
+ * @since New in 1.8.
+ */
+svn_error_t *
+svn_client_automatic_merge_get_locations(
+                                const char **yca_url,
+                                svn_revnum_t *yca_rev,
+                                const char **base_url,
+                                svn_revnum_t *base_rev,
+                                const char **right_url,
+                                svn_revnum_t *right_rev,
+                                const char **target_url,
+                                svn_revnum_t *target_rev,
+                                const char **repos_root_url,
+                                const svn_client_automatic_merge_t *merge,
+                                apr_pool_t *result_pool);
+
 
 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into
  * the working-copy path @a target_wcpath.

Modified: subversion/branches/ev2-export/subversion/include/svn_diff.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_diff.h?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_diff.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_diff.h Fri Nov 23 01:12:18 2012
@@ -279,6 +279,9 @@ svn_diff_contains_diffs(svn_diff_t *diff
  * Differences, similarities, and conflicts are described by lining up
  * "ranges" of data.
  *
+ * Any of the function pointers in this vtable may be NULL to ignore the
+ * corresponding kinds of output.
+ *
  * @note These callbacks describe data ranges in units of "tokens".
  * A "token" is whatever you've defined it to be in your datasource
  * @c svn_diff_fns_t vtable.
@@ -745,17 +748,21 @@ svn_diff_mem_string_diff4(svn_diff_t **d
 /** Outputs the @a diff object generated by svn_diff_mem_string_diff()
  * in unified diff format on @a output_stream, using @a original
  * and @a modified for the text in the output.
- * A diff header is only written to the output if @a with_diff_header
- * is TRUE.
+ *
+ * If @a with_diff_header is TRUE, write a diff header ("---" and "+++"
+ * lines), using @a original_header and @a modified_header to fill the field
+ * after the "---" and "+++" markers; otherwise @a original_header and
+ * @a modified_header are ignored and may be NULL.
  *
  * Outputs the header and hunk delimiters in @a header_encoding.
  * A @a hunk_delimiter can optionally be specified.
  * If @a hunk_delimiter is NULL, use the default hunk delimiter "@@".
  *
- * @a original_header and @a modified header are
- * used to fill the field after the "---" and "+++" header markers.
+ * As a special case, if the hunk delimiter is "##", then for an incomplete
+ * final line use the text "\ No newline at end of property" instead of
+ * "\ No newline at end of file".
  *
- * @since New in 1.7.
+ * @since New in 1.7. Hunk delimiter "##" has the special meaning since 1.8.
  */
 svn_error_t *
 svn_diff_mem_string_output_unified2(svn_stream_t *output_stream,
@@ -840,7 +847,6 @@ svn_diff_mem_string_output_merge(svn_str
                                  apr_pool_t *pool);
 
 
-
 
 /* Diff parsing. If you want to apply a patch to a working copy
  * rather than parse it, see svn_client_patch(). */

Modified: subversion/branches/ev2-export/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_error_codes.h?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_error_codes.h Fri Nov 23 01:12:18 2012
@@ -1244,7 +1244,7 @@ SVN_ERROR_START
              SVN_ERR_CLIENT_CATEGORY_START + 22,
              "Can't perform this operation without a valid lock token")
 
-/** @since New in 1.7. */
+  /** @since New in 1.7. */
   SVN_ERRDEF(SVN_ERR_CLIENT_FORBIDDEN_BY_SERVER,
              SVN_ERR_CLIENT_CATEGORY_START + 23,
              "The operation is forbidden by the server")
@@ -1425,6 +1425,11 @@ SVN_ERROR_START
              SVN_ERR_MISC_CATEGORY_START + 37,
              "failed to parse version number string")
 
+  /** @since New in 1.8. */
+  SVN_ERRDEF(SVN_ERR_CORRUPTED_ATOMIC_STORAGE,
+             SVN_ERR_MISC_CATEGORY_START + 38,
+             "Atomic data storage is corrupt")
+
   /* command-line client errors */
 
   SVN_ERRDEF(SVN_ERR_CL_ARG_PARSING_ERROR,

Modified: subversion/branches/ev2-export/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_fs.h?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_fs.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_fs.h Fri Nov 23 01:12:18 2012
@@ -88,6 +88,10 @@ typedef struct svn_fs_t svn_fs_t;
 
 /** Enable / disable revprop caching for a FSFS repository.
  *
+ * "2" is allowed, too and means "enable if efficient",
+ * i.e. this will not create warning at runtime if there
+ * if no efficient support for revprop caching.
+ *
  * @since New in 1.8.
  */
 #define SVN_FS_CONFIG_FSFS_CACHE_REVPROPS       "fsfs-cache-revprops"

Modified: subversion/branches/ev2-export/subversion/include/svn_props.h
URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_props.h?rev=1412731&r1=1412730&r2=1412731&view=diff
==============================================================================
--- subversion/branches/ev2-export/subversion/include/svn_props.h (original)
+++ subversion/branches/ev2-export/subversion/include/svn_props.h Fri Nov 23 01:12:18 2012
@@ -384,14 +384,11 @@ svn_prop_name_is_valid(const char *prop_
  */
 #define SVN_PROP_MERGEINFO SVN_PROP_PREFIX "mergeinfo"
 
-/** Prefix for all Subersion inhertiable properties. */
-#define SVN_PROP_INHERITABLE_PREFIX SVN_PROP_PREFIX "inheritable-"
-
 /** Property used to record inheritable configuration auto-props. */
-#define SVN_PROP_INHERITABLE_AUTO_PROPS SVN_PROP_INHERITABLE_PREFIX "auto-props"
+#define SVN_PROP_INHERITABLE_AUTO_PROPS SVN_PROP_PREFIX "auto-props"
 
 /** Property used to record inheritable configuration ignores. */
-#define SVN_PROP_INHERITABLE_IGNORES SVN_PROP_INHERITABLE_PREFIX "ignores"
+#define SVN_PROP_INHERITABLE_IGNORES SVN_PROP_PREFIX "global-ignores"
 
 /** Meta-data properties.
  *