subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbu...@apache.org
Subject svn commit: r1154351 [2/3] - in /subversion/branches/issue-3975: ./ build/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/libsvn_client/ subversion/libsvn_ra_serf/ subversion/svn/ subversion/s...
Date Fri, 05 Aug 2011 18:49:30 GMT
Modified: subversion/branches/issue-3975/subversion/bindings/javahl/native/SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/bindings/javahl/native/SVNClient.cpp?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/bindings/javahl/native/SVNClient.cpp (original)
+++ subversion/branches/issue-3975/subversion/bindings/javahl/native/SVNClient.cpp Fri Aug  5 18:49:28 2011
@@ -70,7 +70,7 @@
 
 
 SVNClient::SVNClient(jobject jthis_in)
-    : context(jthis_in)
+    : context(jthis_in, pool), m_lastPath("", pool)
 {
 }
 
@@ -94,9 +94,9 @@ void SVNClient::dispose()
 
 jstring SVNClient::getAdminDirectoryName()
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     jstring name =
-        JNIUtil::makeJString(svn_wc_get_adm_dir(requestPool.pool()));
+        JNIUtil::makeJString(svn_wc_get_adm_dir(subPool.getPool()));
     if (JNIUtil::isJavaExceptionThrown())
         return NULL;
 
@@ -105,8 +105,8 @@ jstring SVNClient::getAdminDirectoryName
 
 jboolean SVNClient::isAdminDirectory(const char *name)
 {
-    SVN::Pool requestPool;
-    return svn_wc_is_adm_dir(name, requestPool.pool()) ? JNI_TRUE : JNI_FALSE;
+    SVN::Pool subPool(pool);
+    return svn_wc_is_adm_dir(name, subPool.getPool()) ? JNI_TRUE : JNI_FALSE;
 }
 
 const char *SVNClient::getLastPath()
@@ -122,14 +122,14 @@ void SVNClient::list(const char *url, Re
                      int direntFields, bool fetchLocks,
                      ListCallback *callback)
 {
-    SVN::Pool requestPool;
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_NULL_PTR_EX(url, "path or url", );
 
-    Path urlPath(url);
+    Path urlPath(url, subPool);
     SVN_JNI_ERR(urlPath.error_occured(), );
 
     SVN_JNI_ERR(svn_client_list2(urlPath.c_str(),
@@ -140,7 +140,7 @@ void SVNClient::list(const char *url, Re
                                  fetchLocks,
                                  ListCallback::callback,
                                  callback,
-                                 ctx, requestPool.pool()), );
+                                 ctx, subPool.getPool()), );
 }
 
 void
@@ -149,18 +149,18 @@ SVNClient::status(const char *path, svn_
                   bool ignoreExternals, StringArray &changelists,
                   StatusCallback *callback)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     svn_revnum_t youngest = SVN_INVALID_REVNUM;
     svn_opt_revision_t rev;
 
     SVN_JNI_NULL_PTR_EX(path, "path", );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
     callback->setWcCtx(ctx->wc_ctx);
 
-    Path checkedPath(path);
+    Path checkedPath(path, subPool);
     SVN_JNI_ERR(checkedPath.error_occured(), );
 
     rev.kind = svn_opt_revision_unspecified;
@@ -170,9 +170,9 @@ SVNClient::status(const char *path, svn_
                                    depth,
                                    getAll, onServer, noIgnore, FALSE,
                                    ignoreExternals,
-                                   changelists.array(requestPool),
+                                   changelists.array(subPool),
                                    StatusCallback::callback, callback,
-                                   requestPool.pool()), );
+                                   subPool.getPool()), );
 }
 
 void SVNClient::logMessages(const char *path, Revision &pegRevision,
@@ -181,32 +181,32 @@ void SVNClient::logMessages(const char *
                             bool includeMergedRevisions, StringArray &revProps,
                             long limit, LogMessageCallback *callback)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
 
     SVN_JNI_NULL_PTR_EX(path, "path", );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    Targets target(path);
-    const apr_array_header_t *targets = target.array(requestPool);
+    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(requestPool.pool(), logRanges.size(),
+        apr_array_make(subPool.getPool(), logRanges.size(),
                        sizeof(svn_opt_revision_range_t *));
 
     std::vector<RevisionRange>::const_iterator it;
     for (it = logRanges.begin(); it != logRanges.end(); ++it)
     {
-        if (it->toRange(requestPool)->start.kind
+        if (it->toRange(subPool)->start.kind
             == svn_opt_revision_unspecified
-            && it->toRange(requestPool)->end.kind
+            && it->toRange(subPool)->end.kind
             == svn_opt_revision_unspecified)
         {
             svn_opt_revision_range_t *range =
-                (svn_opt_revision_range_t *)apr_pcalloc(requestPool.pool(),
+                (svn_opt_revision_range_t *)apr_pcalloc(subPool.getPool(),
                                                         sizeof(*range));
             range->start.kind = svn_opt_revision_number;
             range->start.value.number = 1;
@@ -216,7 +216,7 @@ void SVNClient::logMessages(const char *
         else
         {
             APR_ARRAY_PUSH(ranges, const svn_opt_revision_range_t *) =
-                it->toRange(requestPool);
+                it->toRange(subPool);
         }
         if (JNIUtil::isExceptionThrown())
             return;
@@ -225,9 +225,9 @@ void SVNClient::logMessages(const char *
     SVN_JNI_ERR(svn_client_log5(targets, pegRevision.revision(), ranges,
                                 limit, discoverPaths, stopOnCopy,
                                 includeMergedRevisions,
-                                revProps.array(requestPool),
+                                revProps.array(subPool),
                                 LogMessageCallback::callback, callback, ctx,
-                                requestPool.pool()), );
+                                subPool.getPool()), );
 }
 
 jlong SVNClient::checkout(const char *moduleName, const char *destPath,
@@ -235,18 +235,18 @@ jlong SVNClient::checkout(const char *mo
                           svn_depth_t depth, bool ignoreExternals,
                           bool allowUnverObstructions)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool;
 
     SVN_JNI_NULL_PTR_EX(moduleName, "moduleName", -1);
     SVN_JNI_NULL_PTR_EX(destPath, "destPath", -1);
 
-    Path url(moduleName);
-    Path path(destPath);
+    Path url(moduleName, subPool);
+    Path path(destPath, subPool);
     SVN_JNI_ERR(url.error_occured(), -1);
     SVN_JNI_ERR(path.error_occured(), -1);
     svn_revnum_t rev;
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return -1;
 
@@ -258,7 +258,7 @@ jlong SVNClient::checkout(const char *mo
                                      ignoreExternals,
                                      allowUnverObstructions,
                                      ctx,
-                                     requestPool.pool()),
+                                     subPool.getPool()),
                 -1);
 
     return rev;
@@ -268,56 +268,56 @@ void SVNClient::remove(Targets &targets,
                        bool keep_local, RevpropTable &revprops,
                        CommitCallback *callback)
 {
-    SVN::Pool requestPool;
-    svn_client_ctx_t *ctx = context.getContext(message);
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
         return;
 
-    const apr_array_header_t *targets2 = targets.array(requestPool);
+    const apr_array_header_t *targets2 = targets.array(subPool);
     SVN_JNI_ERR(targets.error_occured(), );
 
     SVN_JNI_ERR(svn_client_delete4(targets2, force, keep_local,
-                                   revprops.hash(requestPool),
+                                   revprops.hash(subPool),
                                    CommitCallback::callback, callback,
-                                   ctx, requestPool.pool()), );
+                                   ctx, subPool.getPool()), );
 }
 
 void SVNClient::revert(const char *path, svn_depth_t depth,
                        StringArray &changelists)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
 
     SVN_JNI_NULL_PTR_EX(path, "path", );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    Targets target(path);
-    const apr_array_header_t *targets = target.array(requestPool);
+    Targets target(path, subPool);
+    const apr_array_header_t *targets = target.array(subPool);
     SVN_JNI_ERR(target.error_occured(), );
     SVN_JNI_ERR(svn_client_revert2(targets, depth,
-                                   changelists.array(requestPool), ctx,
-                                   requestPool.pool()), );
+                                   changelists.array(subPool), ctx,
+                                   subPool.getPool()), );
 }
 
 void SVNClient::add(const char *path,
                     svn_depth_t depth, bool force, bool no_ignore,
                     bool add_parents)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
 
     SVN_JNI_NULL_PTR_EX(path, "path", );
 
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), );
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_ERR(svn_client_add4(intPath.c_str(), depth, force,
                                 no_ignore, add_parents, ctx,
-                                requestPool.pool()), );
+                                subPool.getPool()), );
 }
 
 jlongArray SVNClient::update(Targets &targets, Revision &revision,
@@ -325,14 +325,14 @@ jlongArray SVNClient::update(Targets &ta
                              bool makeParents, bool ignoreExternals,
                              bool allowUnverObstructions)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     apr_array_header_t *revs;
     if (ctx == NULL)
         return NULL;
 
-    const apr_array_header_t *array = targets.array(requestPool);
+    const apr_array_header_t *array = targets.array(subPool);
     SVN_JNI_ERR(targets.error_occured(), NULL);
     SVN_JNI_ERR(svn_client_update4(&revs, array,
                                    revision.revision(),
@@ -342,7 +342,7 @@ jlongArray SVNClient::update(Targets &ta
                                    allowUnverObstructions,
                                    TRUE /* adds_as_modification */,
                                    makeParents,
-                                   ctx, requestPool.pool()),
+                                   ctx, subPool.getPool()),
                 NULL);
 
     JNIEnv *env = JNIUtil::getEnv();
@@ -367,19 +367,19 @@ void SVNClient::commit(Targets &targets,
                        StringArray &changelists, RevpropTable &revprops,
                        CommitCallback *callback)
 {
-    SVN::Pool requestPool;
-    const apr_array_header_t *targets2 = targets.array(requestPool);
+    SVN::Pool subPool(pool);
+    const apr_array_header_t *targets2 = targets.array(subPool);
     SVN_JNI_ERR(targets.error_occured(), );
-    svn_client_ctx_t *ctx = context.getContext(message);
+    svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_ERR(svn_client_commit5(targets2, depth,
                                    noUnlock, keepChangelist, TRUE,
-                                   changelists.array(requestPool),
-                                   revprops.hash(requestPool),
+                                   changelists.array(subPool),
+                                   revprops.hash(subPool),
                                    CommitCallback::callback, callback,
-                                   ctx, requestPool.pool()),
+                                   ctx, subPool.getPool()),
                 );
 }
 
@@ -388,9 +388,9 @@ void SVNClient::copy(CopySources &copySo
                      bool makeParents, bool ignoreExternals,
                      RevpropTable &revprops, CommitCallback *callback)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
 
-    apr_array_header_t *srcs = copySources.array(requestPool);
+    apr_array_header_t *srcs = copySources.array(subPool);
     if (srcs == NULL)
     {
         JNIUtil::throwNativeException(JAVA_PACKAGE "/ClientException",
@@ -398,18 +398,18 @@ void SVNClient::copy(CopySources &copySo
         return;
     }
     SVN_JNI_NULL_PTR_EX(destPath, "destPath", );
-    Path destinationPath(destPath);
+    Path destinationPath(destPath, subPool);
     SVN_JNI_ERR(destinationPath.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(message);
+    svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_ERR(svn_client_copy6(srcs, destinationPath.c_str(),
                                  copyAsChild, makeParents, ignoreExternals,
-                                 revprops.hash(requestPool),
+                                 revprops.hash(subPool),
                                  CommitCallback::callback, callback,
-                                 ctx, requestPool.pool()), );
+                                 ctx, subPool.getPool()), );
 }
 
 void SVNClient::move(Targets &srcPaths, const char *destPath,
@@ -417,70 +417,70 @@ void SVNClient::move(Targets &srcPaths, 
                      bool makeParents, RevpropTable &revprops,
                      CommitCallback *callback)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
 
-    const apr_array_header_t *srcs = srcPaths.array(requestPool);
+    const apr_array_header_t *srcs = srcPaths.array(subPool);
     SVN_JNI_ERR(srcPaths.error_occured(), );
     SVN_JNI_NULL_PTR_EX(destPath, "destPath", );
-    Path destinationPath(destPath);
+    Path destinationPath(destPath, subPool);
     SVN_JNI_ERR(destinationPath.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(message);
+    svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_ERR(svn_client_move6((apr_array_header_t *) srcs,
                                  destinationPath.c_str(), moveAsChild,
-                                 makeParents, revprops.hash(requestPool),
+                                 makeParents, revprops.hash(subPool),
                                  CommitCallback::callback, callback, ctx,
-                                 requestPool.pool()), );
+                                 subPool.getPool()), );
 }
 
 void SVNClient::mkdir(Targets &targets, CommitMessage *message,
                       bool makeParents, RevpropTable &revprops,
                       CommitCallback *callback)
 {
-    SVN::Pool requestPool;
-    svn_client_ctx_t *ctx = context.getContext(message);
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
         return;
 
-    const apr_array_header_t *targets2 = targets.array(requestPool);
+    const apr_array_header_t *targets2 = targets.array(subPool);
     SVN_JNI_ERR(targets.error_occured(), );
 
     SVN_JNI_ERR(svn_client_mkdir4(targets2, makeParents,
-                                  revprops.hash(requestPool),
+                                  revprops.hash(subPool),
                                   CommitCallback::callback, callback,
-                                  ctx, requestPool.pool()), );
+                                  ctx, subPool.getPool()), );
 }
 
 void SVNClient::cleanup(const char *path)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    SVN_JNI_ERR(svn_client_cleanup(intPath.c_str(), ctx, requestPool.pool()),);
+    SVN_JNI_ERR(svn_client_cleanup(intPath.c_str(), ctx, subPool.getPool()),);
 }
 
 void SVNClient::resolve(const char *path, svn_depth_t depth,
                         svn_wc_conflict_choice_t choice)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), );
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_ERR(svn_client_resolve(intPath.c_str(), depth, choice,
-                                   ctx, requestPool.pool()), );
+                                   ctx, subPool.getPool()), );
 }
 
 jlong SVNClient::doExport(const char *srcPath, const char *destPath,
@@ -488,15 +488,15 @@ jlong SVNClient::doExport(const char *sr
                           bool force, bool ignoreExternals,
                           svn_depth_t depth, const char *nativeEOL)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(srcPath, "srcPath", -1);
     SVN_JNI_NULL_PTR_EX(destPath, "destPath", -1);
-    Path sourcePath(srcPath);
+    Path sourcePath(srcPath, subPool);
     SVN_JNI_ERR(sourcePath.error_occured(), -1);
-    Path destinationPath(destPath);
+    Path destinationPath(destPath, subPool);
     SVN_JNI_ERR(destinationPath.error_occured(), -1);
     svn_revnum_t rev;
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return -1;
 
@@ -507,7 +507,7 @@ jlong SVNClient::doExport(const char *sr
                                    ignoreExternals, FALSE,
                                    depth,
                                    nativeEOL, ctx,
-                                   requestPool.pool()),
+                                   subPool.getPool()),
                 -1);
 
     return rev;
@@ -521,16 +521,16 @@ jlong SVNClient::doSwitch(const char *pa
                           bool allowUnverObstructions,
                           bool ignoreAncestry)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", -1);
     SVN_JNI_NULL_PTR_EX(url, "url", -1);
-    Path intUrl(url);
+    Path intUrl(url, subPool);
     SVN_JNI_ERR(intUrl.error_occured(), -1);
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), -1);
 
     svn_revnum_t rev;
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return -1;
 
@@ -544,7 +544,7 @@ jlong SVNClient::doSwitch(const char *pa
                                    allowUnverObstructions,
                                    ignoreAncestry,
                                    ctx,
-                                   requestPool.pool()),
+                                   subPool.getPool()),
                 -1);
 
     return rev;
@@ -555,37 +555,37 @@ void SVNClient::doImport(const char *pat
                          bool noIgnore, bool ignoreUnknownNodeTypes,
                          RevpropTable &revprops, CommitCallback *callback)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(url, "url", );
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), );
-    Path intUrl(url);
+    Path intUrl(url, subPool);
     SVN_JNI_ERR(intUrl.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(message);
+    svn_client_ctx_t *ctx = context.getContext(message, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_ERR(svn_client_import4(intPath.c_str(), intUrl.c_str(), depth,
                                    noIgnore, ignoreUnknownNodeTypes,
-                                   revprops.hash(requestPool),
+                                   revprops.hash(subPool),
                                    CommitCallback::callback, callback,
-                                   ctx, requestPool.pool()), );
+                                   ctx, subPool.getPool()), );
 }
 
 jobject
 SVNClient::suggestMergeSources(const char *path, Revision &pegRevision)
 {
-    SVN::Pool requestPool;
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return NULL;
 
     apr_array_header_t *sources;
     SVN_JNI_ERR(svn_client_suggest_merge_sources(&sources, path,
                                                  pegRevision.revision(),
-                                                 ctx, requestPool.pool()),
+                                                 ctx, subPool.getPool()),
                 NULL);
 
     return CreateJ::StringSet(sources);
@@ -596,20 +596,20 @@ void SVNClient::merge(const char *path1,
                       const char *localPath, bool force, svn_depth_t depth,
                       bool ignoreAncestry, bool dryRun, bool recordOnly)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path1, "path1", );
     SVN_JNI_NULL_PTR_EX(path2, "path2", );
     SVN_JNI_NULL_PTR_EX(localPath, "localPath", );
-    Path intLocalPath(localPath);
+    Path intLocalPath(localPath, subPool);
     SVN_JNI_ERR(intLocalPath.error_occured(), );
 
-    Path srcPath1(path1);
+    Path srcPath1(path1, subPool);
     SVN_JNI_ERR(srcPath1.error_occured(), );
 
-    Path srcPath2 = path2;
+    Path srcPath2(path2, subPool);
     SVN_JNI_ERR(srcPath2.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
@@ -618,7 +618,7 @@ void SVNClient::merge(const char *path1,
                                   intLocalPath.c_str(),
                                   depth,
                                   ignoreAncestry, force, recordOnly, dryRun,
-                                  TRUE, NULL, ctx, requestPool.pool()), );
+                                  TRUE, NULL, ctx, subPool.getPool()), );
 }
 
 void SVNClient::merge(const char *path, Revision &pegRevision,
@@ -626,33 +626,33 @@ void SVNClient::merge(const char *path, 
                       const char *localPath, bool force, svn_depth_t depth,
                       bool ignoreAncestry, bool dryRun, bool recordOnly)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(localPath, "localPath", );
-    Path intLocalPath(localPath);
+    Path intLocalPath(localPath, subPool);
     SVN_JNI_ERR(intLocalPath.error_occured(), );
 
-    Path srcPath(path);
+    Path srcPath(path, subPool);
     SVN_JNI_ERR(srcPath.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
     apr_array_header_t *ranges =
-      apr_array_make(requestPool.pool(), rangesToMerge.size(),
+      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(requestPool)->start.kind
+        if (it->toRange(subPool)->start.kind
             == svn_opt_revision_unspecified
-            && it->toRange(requestPool)->end.kind
+            && it->toRange(subPool)->end.kind
             == svn_opt_revision_unspecified)
         {
             svn_opt_revision_range_t *range =
-                (svn_opt_revision_range_t *)apr_pcalloc(requestPool.pool(),
+                (svn_opt_revision_range_t *)apr_pcalloc(subPool.getPool(),
                                                         sizeof(*range));
             range->start.kind = svn_opt_revision_number;
             range->start.value.number = 1;
@@ -662,7 +662,7 @@ void SVNClient::merge(const char *path, 
         else
         {
             APR_ARRAY_PUSH(ranges, const svn_opt_revision_range_t *) =
-                it->toRange(requestPool);
+                it->toRange(subPool);
         }
         if (JNIUtil::isExceptionThrown())
             return;
@@ -675,22 +675,22 @@ void SVNClient::merge(const char *path, 
                                       depth,
                                       ignoreAncestry, force, recordOnly,
                                       dryRun, TRUE, NULL, ctx,
-                                      requestPool.pool()), );
+                                      subPool.getPool()), );
 }
 
 void SVNClient::mergeReintegrate(const char *path, Revision &pegRevision,
                                  const char *localPath, bool dryRun)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(localPath, "localPath", );
-    Path intLocalPath(localPath);
+    Path intLocalPath(localPath, subPool);
     SVN_JNI_ERR(intLocalPath.error_occured(), );
 
-    Path srcPath(path);
+    Path srcPath(path, subPool);
     SVN_JNI_ERR(srcPath.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
@@ -698,26 +698,26 @@ void SVNClient::mergeReintegrate(const c
                                              pegRevision.revision(),
                                              intLocalPath.c_str(),
                                              dryRun, NULL, ctx,
-                                             requestPool.pool()), );
+                                             subPool.getPool()), );
 }
 
 jobject
 SVNClient::getMergeinfo(const char *target, Revision &pegRevision)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     JNIEnv *env = JNIUtil::getEnv();
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return NULL;
 
     svn_mergeinfo_t mergeinfo;
-    Path intLocalTarget(target);
+    Path intLocalTarget(target, subPool);
     SVN_JNI_ERR(intLocalTarget.error_occured(), NULL);
     SVN_JNI_ERR(svn_client_mergeinfo_get_merged(&mergeinfo,
                                                 intLocalTarget.c_str(),
                                                 pegRevision.revision(), ctx,
-                                                requestPool.pool()),
+                                                subPool.getPool()),
                 NULL);
     if (mergeinfo == NULL)
         return NULL;
@@ -750,7 +750,7 @@ SVNClient::getMergeinfo(const char *targ
         return NULL;
 
     apr_hash_index_t *hi;
-    for (hi = apr_hash_first(requestPool.pool(), mergeinfo);
+    for (hi = apr_hash_first(subPool.getPool(), mergeinfo);
          hi;
          hi = apr_hash_next(hi))
     {
@@ -782,18 +782,18 @@ void SVNClient::getMergeinfoLog(int type
                                 StringArray &revProps,
                                 LogMessageCallback *callback)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_NULL_PTR_EX(pathOrURL, "path or url", );
-    Path urlPath(pathOrURL);
+    Path urlPath(pathOrURL, subPool);
     SVN_JNI_ERR(urlPath.error_occured(), );
 
     SVN_JNI_NULL_PTR_EX(mergeSourceURL, "merge source url", );
-    Path srcURL(mergeSourceURL);
+    Path srcURL(mergeSourceURL, subPool);
     SVN_JNI_ERR(srcURL.error_occured(), );
 
     SVN_JNI_ERR(svn_client_mergeinfo_log((type == 1),
@@ -805,9 +805,9 @@ void SVNClient::getMergeinfoLog(int type
                                          callback,
                                          discoverChangedPaths,
                                          depth,
-                                         revProps.array(requestPool),
+                                         revProps.array(subPool),
                                          ctx,
-                                         requestPool.pool()), );
+                                         subPool.getPool()), );
 
     return;
 }
@@ -818,13 +818,13 @@ void SVNClient::getMergeinfoLog(int type
 jbyteArray SVNClient::propertyGet(const char *path, const char *name,
                                   Revision &revision, Revision &pegRevision)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
     SVN_JNI_NULL_PTR_EX(name, "name", NULL);
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), NULL);
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return NULL;
 
@@ -832,12 +832,12 @@ jbyteArray SVNClient::propertyGet(const 
     SVN_JNI_ERR(svn_client_propget3(&props, name,
                                     intPath.c_str(), pegRevision.revision(),
                                     revision.revision(), NULL, svn_depth_empty,
-                                    NULL, ctx, requestPool.pool()),
+                                    NULL, ctx, subPool.getPool()),
                 NULL);
 
     apr_hash_index_t *hi;
     // only one element since we disabled recurse
-    hi = apr_hash_first(requestPool.pool(), props);
+    hi = apr_hash_first(subPool.getPool(), props);
     if (hi == NULL)
         return NULL; // no property with this name
 
@@ -855,20 +855,20 @@ void SVNClient::properties(const char *p
                            Revision &pegRevision, svn_depth_t depth,
                            StringArray &changelists, ProplistCallback *callback)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_ERR(svn_client_proplist3(intPath.c_str(), pegRevision.revision(),
                                      revision.revision(), depth,
-                                     changelists.array(requestPool),
+                                     changelists.array(subPool),
                                      ProplistCallback::callback, callback,
-                                     ctx, requestPool.pool()), );
+                                     ctx, subPool.getPool()), );
 
     return;
 }
@@ -877,7 +877,7 @@ void SVNClient::propertySetLocal(Targets
                                  JNIByteArray &value, svn_depth_t depth,
                                  StringArray &changelists, bool force)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(name, "name", );
 
     svn_string_t *val;
@@ -885,17 +885,17 @@ void SVNClient::propertySetLocal(Targets
       val = NULL;
     else
       val = svn_string_ncreate((const char *)value.getBytes(), value.getLength(),
-                               requestPool.pool());
+                               subPool.getPool());
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    const apr_array_header_t *targetsApr = targets.array(requestPool);
+    const apr_array_header_t *targetsApr = targets.array(subPool);
     SVN_JNI_ERR(svn_client_propset_local(name, val, targetsApr,
                                          depth, force,
-                                         changelists.array(requestPool),
-                                         ctx, requestPool.pool()), );
+                                         changelists.array(subPool),
+                                         ctx, subPool.getPool()), );
 }
 
 void SVNClient::propertySetRemote(const char *path, const char *name,
@@ -903,7 +903,7 @@ void SVNClient::propertySetRemote(const 
                                   RevpropTable &revprops,
                                   CommitCallback *callback)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(name, "name", );
 
     svn_string_t *val;
@@ -911,20 +911,20 @@ void SVNClient::propertySetRemote(const 
       val = NULL;
     else
       val = svn_string_ncreate((const char *)value.getBytes(), value.getLength(),
-                               requestPool.pool());
+                               subPool.getPool());
 
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_ERR(svn_client_propset_remote(name, val, intPath.c_str(),
                                           force, SVN_INVALID_REVNUM,
-                                          revprops.hash(requestPool),
+                                          revprops.hash(subPool),
                                           CommitCallback::callback, callback,
-                                          ctx, requestPool.pool()), );
+                                          ctx, subPool.getPool()), );
 }
 
 void SVNClient::diff(const char *target1, Revision &revision1,
@@ -936,9 +936,9 @@ void SVNClient::diff(const char *target1
                      bool showCopiesAsAdds)
 {
     svn_error_t *err;
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     const char *c_relToDir = relativeToDir ?
-      svn_dirent_canonicalize(relativeToDir, requestPool.pool()) :
+      svn_dirent_canonicalize(relativeToDir, subPool.getPool()) :
       relativeToDir;
 
     SVN_JNI_NULL_PTR_EX(target1, "target", );
@@ -947,20 +947,20 @@ void SVNClient::diff(const char *target1
         SVN_JNI_NULL_PTR_EX(target2, "target2", );
 
     SVN_JNI_NULL_PTR_EX(outfileName, "outfileName", );
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    Path path1(target1);
+    Path path1(target1, subPool);
     SVN_JNI_ERR(path1.error_occured(), );
 
     apr_file_t *outfile = NULL;
     apr_status_t rv =
         apr_file_open(&outfile,
                       svn_dirent_internal_style(outfileName,
-                                                requestPool.pool()),
+                                                subPool.getPool()),
                       APR_CREATE|APR_WRITE|APR_TRUNCATE , APR_OS_DEFAULT,
-                      requestPool.pool());
+                      subPool.getPool());
     if (rv != APR_SUCCESS)
     {
         SVN_JNI_ERR(svn_error_createf(rv, NULL, _("Cannot open file '%s'"),
@@ -968,7 +968,7 @@ void SVNClient::diff(const char *target1
     }
 
     // We don't use any options to diff.
-    apr_array_header_t *diffOptions = apr_array_make(requestPool.pool(),
+    apr_array_header_t *diffOptions = apr_array_make(subPool.getPool(),
                                                      0, sizeof(char *));
 
     if (pegRevision)
@@ -988,14 +988,14 @@ void SVNClient::diff(const char *target1
                                    SVN_APR_LOCALE_CHARSET,
                                    outfile,
                                    NULL /* error file */,
-                                   changelists.array(requestPool),
+                                   changelists.array(subPool),
                                    ctx,
-                                   requestPool.pool());
+                                   subPool.getPool());
     }
     else
     {
         // "Regular" diff (without a peg revision).
-        Path path2(target2);
+        Path path2(target2, subPool);
         err = path2.error_occured();
         if (err)
         {
@@ -1020,9 +1020,9 @@ void SVNClient::diff(const char *target1
                                SVN_APR_LOCALE_CHARSET,
                                outfile,
                                NULL /* error file */,
-                               changelists.array(requestPool),
+                               changelists.array(subPool),
                                ctx,
-                               requestPool.pool());
+                               subPool.getPool());
     }
 
 cleanup:
@@ -1069,28 +1069,28 @@ SVNClient::diffSummarize(const char *tar
                          bool ignoreAncestry,
                          DiffSummaryReceiver &receiver)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
 
     SVN_JNI_NULL_PTR_EX(target1, "target1", );
     SVN_JNI_NULL_PTR_EX(target2, "target2", );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    Path path1(target1);
+    Path path1(target1, subPool);
     SVN_JNI_ERR(path1.error_occured(), );
-    Path path2(target2);
+    Path path2(target2, subPool);
     SVN_JNI_ERR(path2.error_occured(), );
 
     SVN_JNI_ERR(svn_client_diff_summarize2(path1.c_str(), revision1.revision(),
                                            path2.c_str(), revision2.revision(),
                                            depth,
                                            ignoreAncestry,
-                                           changelists.array(requestPool),
+                                           changelists.array(subPool),
                                            DiffSummaryReceiver::summarize,
                                            &receiver,
-                                           ctx, requestPool.pool()), );
+                                           ctx, subPool.getPool()), );
 }
 
 void
@@ -1099,15 +1099,15 @@ SVNClient::diffSummarize(const char *tar
                          svn_depth_t depth, StringArray &changelists,
                          bool ignoreAncestry, DiffSummaryReceiver &receiver)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
 
     SVN_JNI_NULL_PTR_EX(target, "target", );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    Path path(target);
+    Path path(target, subPool);
     SVN_JNI_ERR(path.error_occured(), );
 
     SVN_JNI_ERR(svn_client_diff_summarize_peg2(path.c_str(),
@@ -1116,41 +1116,41 @@ SVNClient::diffSummarize(const char *tar
                                                endRevision.revision(),
                                                depth,
                                                ignoreAncestry,
-                                               changelists.array(requestPool),
+                                               changelists.array(subPool),
                                                DiffSummaryReceiver::summarize,
                                                &receiver, ctx,
-                                               requestPool.pool()), );
+                                               subPool.getPool()), );
 }
 
 void SVNClient::streamFileContent(const char *path, Revision &revision,
                                   Revision &pegRevision,
                                   OutputStream &outputStream)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    SVN_JNI_ERR(svn_client_cat2(outputStream.getStream(requestPool),
+    SVN_JNI_ERR(svn_client_cat2(outputStream.getStream(subPool),
                                 path, pegRevision.revision(),
-                                revision.revision(), ctx, requestPool.pool()),
+                                revision.revision(), ctx, subPool.getPool()),
                 );
 }
 
 jbyteArray SVNClient::revProperty(const char *path,
                                   const char *name, Revision &rev)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
     SVN_JNI_NULL_PTR_EX(name, "name", NULL);
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), NULL);
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return NULL;
 
@@ -1158,8 +1158,8 @@ jbyteArray SVNClient::revProperty(const 
     svn_string_t *propval;
     svn_revnum_t set_rev;
     SVN_JNI_ERR(svn_client_url_from_path2(&URL, intPath.c_str(), ctx,
-                                          requestPool.pool(),
-                                          requestPool.pool()),
+                                          subPool.getPool(),
+                                          subPool.getPool()),
                 NULL);
 
     if (URL == NULL)
@@ -1171,7 +1171,7 @@ jbyteArray SVNClient::revProperty(const 
 
     SVN_JNI_ERR(svn_client_revprop_get(name, &propval, URL,
                                        rev.revision(), &set_rev, ctx,
-                                       requestPool.pool()),
+                                       subPool.getPool()),
                 NULL);
     if (propval == NULL)
         return NULL;
@@ -1182,26 +1182,26 @@ jbyteArray SVNClient::revProperty(const 
 void SVNClient::relocate(const char *from, const char *to, const char *path,
                          bool ignoreExternals)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(from, "from", );
     SVN_JNI_NULL_PTR_EX(to, "to", );
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), );
 
-    Path intFrom(from);
+    Path intFrom(from, subPool);
     SVN_JNI_ERR(intFrom.error_occured(), );
 
-    Path intTo(to);
+    Path intTo(to, subPool);
     SVN_JNI_ERR(intTo.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
     SVN_JNI_ERR(svn_client_relocate2(intPath.c_str(), intFrom.c_str(),
                                      intTo.c_str(), ignoreExternals, ctx,
-                                     requestPool.pool()), );
+                                     subPool.getPool()), );
 }
 
 void SVNClient::blame(const char *path, Revision &pegRevision,
@@ -1209,13 +1209,13 @@ void SVNClient::blame(const char *path, 
                       bool ignoreMimeType, bool includeMergedRevisions,
                       BlameCallback *callback)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
-    apr_pool_t *pool = requestPool.pool();
-    Path intPath(path);
+    apr_pool_t *pool = subPool.getPool();
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
@@ -1232,29 +1232,29 @@ void SVNClient::blame(const char *path, 
 void SVNClient::addToChangelist(Targets &srcPaths, const char *changelist,
                                 svn_depth_t depth, StringArray &changelists)
 {
-    SVN::Pool requestPool;
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
 
-    const apr_array_header_t *srcs = srcPaths.array(requestPool);
+    const apr_array_header_t *srcs = srcPaths.array(subPool);
     SVN_JNI_ERR(srcPaths.error_occured(), );
 
     SVN_JNI_ERR(svn_client_add_to_changelist(srcs, changelist, depth,
-                                             changelists.array(requestPool),
-                                             ctx, requestPool.pool()), );
+                                             changelists.array(subPool),
+                                             ctx, subPool.getPool()), );
 }
 
 void SVNClient::removeFromChangelists(Targets &srcPaths, svn_depth_t depth,
                                       StringArray &changelists)
 {
-    SVN::Pool requestPool;
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
 
-    const apr_array_header_t *srcs = srcPaths.array(requestPool);
+    const apr_array_header_t *srcs = srcPaths.array(subPool);
     SVN_JNI_ERR(srcPaths.error_occured(), );
 
     SVN_JNI_ERR(svn_client_remove_from_changelists(srcs, depth,
-                                                changelists.array(requestPool),
-                                                ctx, requestPool.pool()), );
+                                                changelists.array(subPool),
+                                                ctx, subPool.getPool()), );
 }
 
 void SVNClient::getChangelists(const char *rootPath,
@@ -1262,56 +1262,56 @@ void SVNClient::getChangelists(const cha
                                svn_depth_t depth,
                                ChangelistCallback *callback)
 {
-    SVN::Pool requestPool;
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
 
     SVN_JNI_ERR(svn_client_get_changelists(rootPath,
-                                           changelists.array(requestPool),
+                                           changelists.array(subPool),
                                            depth, ChangelistCallback::callback,
-                                           callback, ctx, requestPool.pool()),
+                                           callback, ctx, subPool.getPool()),
                 );
 }
 
 void SVNClient::lock(Targets &targets, const char *comment, bool force)
 {
-    SVN::Pool requestPool;
-    const apr_array_header_t *targetsApr = targets.array(requestPool);
+    SVN::Pool subPool(pool);
+    const apr_array_header_t *targetsApr = targets.array(subPool);
     SVN_JNI_ERR(targets.error_occured(), );
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
 
     SVN_JNI_ERR(svn_client_lock(targetsApr, comment, force, ctx,
-                                requestPool.pool()), );
+                                subPool.getPool()), );
 }
 
 void SVNClient::unlock(Targets &targets, bool force)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
 
-    const apr_array_header_t *targetsApr = targets.array(requestPool);
+    const apr_array_header_t *targetsApr = targets.array(subPool);
     SVN_JNI_ERR(targets.error_occured(), );
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     SVN_JNI_ERR(svn_client_unlock((apr_array_header_t*)targetsApr, force,
-                                  ctx, requestPool.pool()), );
+                                  ctx, subPool.getPool()), );
 }
 void SVNClient::setRevProperty(const char *path,
                                const char *name, Revision &rev,
                                const char *value, const char *original_value,
                                bool force)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
     SVN_JNI_NULL_PTR_EX(name, "name", );
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
     const char *URL;
     SVN_JNI_ERR(svn_client_url_from_path2(&URL, intPath.c_str(), ctx,
-                                          requestPool.pool(),
-                                          requestPool.pool()), );
+                                          subPool.getPool(),
+                                          subPool.getPool()), );
 
     if (URL == NULL)
     {
@@ -1320,41 +1320,41 @@ void SVNClient::setRevProperty(const cha
             );
     }
 
-    svn_string_t *val = svn_string_create(value, requestPool.pool());
+    svn_string_t *val = svn_string_create(value, subPool.getPool());
     svn_string_t *orig_val;
     if (original_value != NULL)
-      orig_val = svn_string_create(original_value, requestPool.pool());
+      orig_val = svn_string_create(original_value, subPool.getPool());
     else
       orig_val = NULL;
 
     svn_revnum_t set_revision;
     SVN_JNI_ERR(svn_client_revprop_set2(name, val, orig_val, URL, rev.revision(),
                                         &set_revision, force, ctx,
-                                        requestPool.pool()), );
+                                        subPool.getPool()), );
 }
 
 jstring SVNClient::getVersionInfo(const char *path, const char *trailUrl,
                                   bool lastChanged)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
 
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), NULL);
 
     int wc_format;
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return NULL;
     SVN_JNI_ERR(svn_wc_check_wc2(&wc_format, ctx->wc_ctx, intPath.c_str(),
-                                 requestPool.pool()),
+                                 subPool.getPool()),
                 NULL);
 
     if (! wc_format)
     {
         svn_node_kind_t kind;
         SVN_JNI_ERR(svn_io_check_path(intPath.c_str(), &kind,
-                                      requestPool.pool()),
+                                      subPool.getPool()),
                     NULL);
         if (kind == svn_node_dir)
         {
@@ -1373,12 +1373,12 @@ jstring SVNClient::getVersionInfo(const 
     const char *local_abspath;
 
     SVN_JNI_ERR(svn_dirent_get_absolute(&local_abspath, intPath.c_str(),
-                                        requestPool.pool()), NULL);
+                                        subPool.getPool()), NULL);
     SVN_JNI_ERR(svn_wc_revision_status2(&result, ctx->wc_ctx, local_abspath,
                                         trailUrl, lastChanged,
                                         ctx->cancel_func, ctx->cancel_baton,
-                                        requestPool.pool(),
-                                        requestPool.pool()), NULL);
+                                        subPool.getPool(),
+                                        subPool.getPool()), NULL);
 
     std::ostringstream value;
     value << result->min_rev;
@@ -1399,40 +1399,40 @@ jstring SVNClient::getVersionInfo(const 
 
 void SVNClient::upgrade(const char *path)
 {
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", );
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    Path checkedPath(path);
+    Path checkedPath(path, subPool);
     SVN_JNI_ERR(checkedPath.error_occured(), );
 
-    SVN_JNI_ERR(svn_client_upgrade(path, ctx, requestPool.pool()), );
+    SVN_JNI_ERR(svn_client_upgrade(path, ctx, subPool.getPool()), );
 }
 
 jobject SVNClient::revProperties(const char *path, Revision &revision)
 {
     apr_hash_t *props;
-    SVN::Pool requestPool;
+    SVN::Pool subPool(pool);
     SVN_JNI_NULL_PTR_EX(path, "path", NULL);
-    Path intPath(path);
+    Path intPath(path, subPool);
     SVN_JNI_ERR(intPath.error_occured(), NULL);
 
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     const char *URL;
     svn_revnum_t set_rev;
     SVN_JNI_ERR(svn_client_url_from_path2(&URL, intPath.c_str(), ctx,
-                                          requestPool.pool(),
-                                          requestPool.pool()),
+                                          subPool.getPool(),
+                                          subPool.getPool()),
                 NULL);
 
     if (ctx == NULL)
         return NULL;
 
     SVN_JNI_ERR(svn_client_revprop_list(&props, URL, revision.revision(),
-                                        &set_rev, ctx, requestPool.pool()),
+                                        &set_rev, ctx, subPool.getPool()),
                 NULL);
 
     return CreateJ::PropertyMap(props);
@@ -1451,21 +1451,21 @@ SVNClient::info2(const char *path, Revis
 {
     SVN_JNI_NULL_PTR_EX(path, "path", );
 
-    SVN::Pool requestPool;
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    Path checkedPath(path);
+    Path checkedPath(path, subPool);
     SVN_JNI_ERR(checkedPath.error_occured(), );
 
     SVN_JNI_ERR(svn_client_info3(checkedPath.c_str(),
                                  pegRevision.revision(),
                                  revision.revision(),
                                  depth, FALSE, TRUE,
-                                 changelists.array(requestPool),
+                                 changelists.array(subPool),
                                  InfoCallback::callback, callback,
-                                 ctx, requestPool.pool()), );
+                                 ctx, subPool.getPool()), );
 }
 
 void
@@ -1476,14 +1476,14 @@ SVNClient::patch(const char *patchPath, 
     SVN_JNI_NULL_PTR_EX(patchPath, "patchPath", );
     SVN_JNI_NULL_PTR_EX(targetPath, "targetPath", );
 
-    SVN::Pool requestPool;
-    svn_client_ctx_t *ctx = context.getContext(NULL);
+    SVN::Pool subPool(pool);
+    svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
     if (ctx == NULL)
         return;
 
-    Path checkedPatchPath(patchPath);
+    Path checkedPatchPath(patchPath, subPool);
     SVN_JNI_ERR(checkedPatchPath.error_occured(), );
-    Path checkedTargetPath(targetPath);
+    Path checkedTargetPath(targetPath, subPool);
     SVN_JNI_ERR(checkedTargetPath.error_occured(), );
 
     // Should parameterize the following, instead of defaulting to FALSE
@@ -1492,7 +1492,7 @@ SVNClient::patch(const char *patchPath, 
                                  dryRun, stripCount, reverse,
                                  ignoreWhitespace, removeTempfiles,
                                  PatchCallback::callback, callback,
-                                 ctx, requestPool.pool()), );
+                                 ctx, subPool.getPool()), );
 }
 
 ClientContext &

Modified: subversion/branches/issue-3975/subversion/bindings/javahl/native/SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/bindings/javahl/native/SVNRepos.cpp?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/bindings/javahl/native/SVNRepos.cpp (original)
+++ subversion/branches/issue-3975/subversion/bindings/javahl/native/SVNRepos.cpp Fri Aug  5 18:49:28 2011
@@ -83,7 +83,7 @@ void SVNRepos::create(File &path, bool d
   SVN::Pool requestPool;
   svn_repos_t *repos;
   apr_hash_t *config;
-  apr_hash_t *fs_config = apr_hash_make(requestPool.pool());
+  apr_hash_t *fs_config = apr_hash_make(requestPool.getPool());
 
   if (path.isNull())
     {
@@ -103,10 +103,10 @@ void SVNRepos::create(File &path, bool d
 
   SVN_JNI_ERR(svn_config_get_config(&config,
                                     configPath.getInternalStyle(requestPool),
-                                    requestPool.pool()),);
+                                    requestPool.getPool()),);
   SVN_JNI_ERR(svn_repos_create(&repos, path.getInternalStyle(requestPool),
                                NULL, NULL, config, fs_config,
-                               requestPool.pool()), );
+                               requestPool.getPool()), );
 }
 
 void SVNRepos::deltify(File &path, Revision &revStart, Revision &revEnd)
@@ -125,9 +125,9 @@ void SVNRepos::deltify(File &path, Revis
     }
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), );
+                              NULL, requestPool.getPool()), );
   fs = svn_repos_fs(repos);
-  SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool.pool()), );
+  SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool.getPool()), );
 
   if (revStart.revision()->kind == svn_opt_revision_number)
     /* ### We only handle revision numbers right now, not dates. */
@@ -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.pool()),
+      SVN_JNI_ERR(svn_fs_deltify_revision (fs, revision, revisionPool.getPool()),
                   );
     }
 
@@ -194,9 +194,9 @@ void SVNRepos::dump(File &path, OutputSt
     }
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), );
+                              NULL, requestPool.getPool()), );
   fs = svn_repos_fs(repos);
-  SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool.pool()), );
+  SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, fs, requestPool.getPool()), );
 
   /* ### We only handle revision numbers right now, not dates. */
   if (revsionStart.revision()->kind == svn_opt_revision_number)
@@ -244,7 +244,7 @@ void SVNRepos::dump(File &path, OutputSt
                                     ? ReposNotifyCallback::notify
                                     : NULL,
                                  notifyCallback,
-                                 checkCancel, this, requestPool.pool()), );
+                                 checkCancel, this, requestPool.getPool()), );
 }
 
 void SVNRepos::hotcopy(File &path, File &targetPath,
@@ -266,7 +266,7 @@ void SVNRepos::hotcopy(File &path, File 
 
   SVN_JNI_ERR(svn_repos_hotcopy(path.getInternalStyle(requestPool),
                                 targetPath.getInternalStyle(requestPool),
-                                cleanLogs, requestPool.pool()), );
+                                cleanLogs, requestPool.getPool()), );
 }
 
 static void
@@ -283,7 +283,7 @@ list_dblogs (File &path, MessageReceiver
 
   SVN_JNI_ERR(svn_repos_db_logfiles(&logfiles,
                                     path.getInternalStyle(requestPool),
-                                    only_unused, requestPool.pool()), );
+                                    only_unused, requestPool.getPool()), );
 
   /* Loop, printing log files.  We append the log paths to the
    * repository path, making sure to return everything to the native
@@ -293,8 +293,8 @@ list_dblogs (File &path, MessageReceiver
       const char *log_utf8;
       log_utf8 = svn_dirent_join(path.getInternalStyle(requestPool),
                                  APR_ARRAY_IDX(logfiles, i, const char *),
-                                 requestPool.pool());
-      log_utf8 = svn_dirent_local_style (log_utf8, requestPool.pool());
+                                 requestPool.getPool());
+      log_utf8 = svn_dirent_local_style (log_utf8, requestPool.getPool());
       receiver.receiveMessage(log_utf8);
     }
 }
@@ -334,7 +334,7 @@ void SVNRepos::load(File &path,
     }
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), );
+                              NULL, requestPool.getPool()), );
 
   SVN_JNI_ERR(svn_repos_load_fs3(repos, dataIn.getStream(requestPool),
                                  uuid_action, relativePath,
@@ -344,7 +344,7 @@ void SVNRepos::load(File &path,
                                     ? ReposNotifyCallback::notify
                                     : NULL,
                                  notifyCallback,
-                                 checkCancel, this, requestPool.pool()), );
+                                 checkCancel, this, requestPool.getPool()), );
 }
 
 void SVNRepos::lstxns(File &path, MessageReceiver &messageReceiver)
@@ -361,9 +361,9 @@ void SVNRepos::lstxns(File &path, Messag
     }
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), );
+                              NULL, requestPool.getPool()), );
   fs = svn_repos_fs (repos);
-  SVN_JNI_ERR(svn_fs_list_transactions(&txns, fs, requestPool.pool()), );
+  SVN_JNI_ERR(svn_fs_list_transactions(&txns, fs, requestPool.getPool()), );
 
   /* Loop, printing revisions. */
   for (int i = 0; i < txns->nelts; ++i)
@@ -391,16 +391,16 @@ jlong SVNRepos::recover(File &path, Repo
                                     ? ReposNotifyCallback::notify
                                     : NULL,
                                  notifyCallback,
-                                 checkCancel, this, requestPool.pool()),
+                                 checkCancel, this, requestPool.getPool()),
               -1);
 
   /* Since db transactions may have been replayed, it's nice to tell
    * people what the latest revision is.  It also proves that the
    * recovery actually worked. */
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), -1);
+                              NULL, requestPool.getPool()), -1);
   SVN_JNI_ERR(svn_fs_youngest_rev(&youngest_rev, svn_repos_fs (repos),
-                                  requestPool.pool()),
+                                  requestPool.getPool()),
               -1);
   return youngest_rev;
 }
@@ -422,7 +422,7 @@ void SVNRepos::rmtxns(File &path, String
     }
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), );
+                              NULL, requestPool.getPool()), );
   fs = svn_repos_fs (repos);
 
   args = transactions.array(requestPool);
@@ -433,9 +433,9 @@ void SVNRepos::rmtxns(File &path, String
       svn_error_t *err;
 
       /* Try to open the txn.  If that succeeds, try to abort it. */
-      err = svn_fs_open_txn(&txn, fs, txn_name, transactionPool.pool());
+      err = svn_fs_open_txn(&txn, fs, txn_name, transactionPool.getPool());
       if (! err)
-        err = svn_fs_abort_txn(txn, transactionPool.pool());
+        err = svn_fs_abort_txn(txn, transactionPool.getPool());
 
       /* If either the open or the abort of the txn fails because that
        * transaction is dead, just try to purge the thing.  Else,
@@ -444,7 +444,7 @@ void SVNRepos::rmtxns(File &path, String
       if (err && (err->apr_err == SVN_ERR_FS_TRANSACTION_DEAD))
         {
           svn_error_clear (err);
-          err = svn_fs_purge_txn(fs, txn_name, transactionPool.pool());
+          err = svn_fs_purge_txn(fs, txn_name, transactionPool.getPool());
         }
 
       /* If we had a real from the txn open, abort, or purge, we clear
@@ -479,13 +479,13 @@ void SVNRepos::setRevProp(File &path, Re
   /* Open the filesystem. */
   svn_repos_t *repos;
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), );
+                              NULL, requestPool.getPool()), );
 
   /* If we are bypassing the hooks system, we just hit the filesystem
    * directly. */
   svn_error_t *err;
   svn_string_t *propValStr = svn_string_create(propValue,
-                                               requestPool.pool());
+                                               requestPool.getPool());
   if (usePreRevPropChangeHook || usePostRevPropChangeHook)
     {
       err = svn_repos_fs_change_rev_prop4(repos,
@@ -493,14 +493,14 @@ void SVNRepos::setRevProp(File &path, Re
                                           NULL, propName, NULL, propValStr,
                                           usePreRevPropChangeHook,
                                           usePostRevPropChangeHook, NULL,
-                                          NULL, requestPool.pool());
+                                          NULL, requestPool.getPool());
     }
   else
     {
       svn_fs_t *fs = svn_repos_fs (repos);
       err = svn_fs_change_rev_prop2(fs, revision.revision()->value.number,
                                     propName, NULL, propValStr,
-                                    requestPool.pool());
+                                    requestPool.getPool());
     }
   SVN_JNI_ERR(err, );
 }
@@ -553,15 +553,15 @@ SVNRepos::verify(File &path, Revision &r
   /* This whole process is basically just a dump of the repository
    * with no interest in the output. */
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), );
+                              NULL, requestPool.getPool()), );
   SVN_JNI_ERR(svn_fs_youngest_rev(&youngest, svn_repos_fs (repos),
-                                  requestPool.pool()), );
+                                  requestPool.getPool()), );
 
   /* Find the revision numbers at which to start and end. */
   SVN_JNI_ERR(getRevnum(&lower, revisionStart.revision(),
-                        youngest, repos, requestPool.pool()), );
+                        youngest, repos, requestPool.getPool()), );
   SVN_JNI_ERR(getRevnum(&upper, revisionEnd.revision(),
-                        youngest, repos, requestPool.pool()), );
+                        youngest, repos, requestPool.getPool()), );
 
   // Fill in implied revisions if necessary.
   if (lower == SVN_INVALID_REVNUM)
@@ -585,7 +585,7 @@ SVNRepos::verify(File &path, Revision &r
                                     : NULL,
                                    notifyCallback,
                                    checkCancel, this /* cancel callback/baton */,
-                                   requestPool.pool()), );
+                                   requestPool.getPool()), );
 }
 
 void SVNRepos::pack(File &path, ReposNotifyCallback *notifyCallback)
@@ -600,7 +600,7 @@ void SVNRepos::pack(File &path, ReposNot
     }
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), );
+                              NULL, requestPool.getPool()), );
 
   SVN_JNI_ERR(svn_repos_fs_pack2(repos,
                                  notifyCallback != NULL
@@ -608,7 +608,7 @@ void SVNRepos::pack(File &path, ReposNot
                                     : NULL,
                                  notifyCallback,
                                  checkCancel, this,
-                                 requestPool.pool()),
+                                 requestPool.getPool()),
               );
 }
 
@@ -627,7 +627,7 @@ void SVNRepos::upgrade(File &path, Repos
                                     ? ReposNotifyCallback::notify
                                     : NULL,
                                  notifyCallback,
-                                 requestPool.pool()),
+                                 requestPool.getPool()),
               );
 }
 
@@ -645,10 +645,10 @@ jobject SVNRepos::lslocks(File &path, sv
     }
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), NULL);
+                              NULL, requestPool.getPool()), NULL);
   /* Fetch all locks on or below the root directory. */
   SVN_JNI_ERR(svn_repos_fs_get_locks2(&locks, repos, "/", depth, NULL, NULL,
-                                      requestPool.pool()),
+                                      requestPool.getPool()),
               NULL);
 
   JNIEnv *env = JNIUtil::getEnv();
@@ -658,7 +658,7 @@ jobject SVNRepos::lslocks(File &path, sv
 
   std::vector<jobject> jlocks;
 
-  for (hi = apr_hash_first (requestPool.pool(), locks);
+  for (hi = apr_hash_first (requestPool.getPool(), locks);
        hi;
        hi = apr_hash_next (hi))
     {
@@ -678,7 +678,7 @@ jobject SVNRepos::lslocks(File &path, sv
 void SVNRepos::rmlocks(File &path, StringArray &locks)
 {
   SVN::Pool requestPool;
-  apr_pool_t *pool = requestPool.pool();
+  apr_pool_t *pool = requestPool.getPool();
   svn_repos_t *repos;
   svn_fs_t *fs;
   svn_fs_access_t *access;
@@ -690,7 +690,7 @@ void SVNRepos::rmlocks(File &path, Strin
     }
 
   SVN_JNI_ERR(svn_repos_open2(&repos, path.getInternalStyle(requestPool),
-                              NULL, requestPool.pool()), );
+                              NULL, requestPool.getPool()), );
   fs = svn_repos_fs (repos);
   const char *username;
 
@@ -724,7 +724,7 @@ void SVNRepos::rmlocks(File &path, Strin
       svn_lock_t *lock;
 
       /* Fetch the path's svn_lock_t. */
-      svn_error_t *err = svn_fs_get_lock(&lock, fs, lock_path, subpool.pool());
+      svn_error_t *err = svn_fs_get_lock(&lock, fs, lock_path, subpool.getPool());
       if (err)
         goto move_on;
       if (! lock)
@@ -732,7 +732,7 @@ void SVNRepos::rmlocks(File &path, Strin
 
       /* Now forcibly destroy the lock. */
       err = svn_fs_unlock (fs, lock_path,
-                           lock->token, 1 /* force */, subpool.pool());
+                           lock->token, 1 /* force */, subpool.getPool());
       if (err)
         goto move_on;
 

Modified: subversion/branches/issue-3975/subversion/bindings/javahl/native/StringArray.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/bindings/javahl/native/StringArray.cpp?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/bindings/javahl/native/StringArray.cpp (original)
+++ subversion/branches/issue-3975/subversion/bindings/javahl/native/StringArray.cpp Fri Aug  5 18:49:28 2011
@@ -39,7 +39,7 @@ StringArray::~StringArray()
 const apr_array_header_t *StringArray::array(const SVN::Pool &pool)
 {
   apr_array_header_t *strings
-    = apr_array_make(pool.pool(), m_strings.size(), sizeof(char *));
+    = apr_array_make(pool.getPool(), m_strings.size(), sizeof(char *));
 
   std::vector<std::string>::const_iterator it;
   for (it = m_strings.begin(); it < m_strings.end(); ++it)

Modified: subversion/branches/issue-3975/subversion/bindings/javahl/native/Targets.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/bindings/javahl/native/Targets.cpp?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/bindings/javahl/native/Targets.cpp (original)
+++ subversion/branches/issue-3975/subversion/bindings/javahl/native/Targets.cpp Fri Aug  5 18:49:28 2011
@@ -36,10 +36,11 @@ Targets::~Targets()
 {
 }
 
-Targets::Targets(const char *path)
+Targets::Targets(const char *path, SVN::Pool &in_pool)
+    : m_subpool(in_pool)
 {
   m_strArray = NULL;
-  m_targets.push_back (path);
+  m_targets.push_back (apr_pstrdup(m_subpool.getPool(), path));
   m_error_occured = NULL;
 }
 
@@ -58,7 +59,7 @@ const apr_array_header_t *Targets::array
       for (it = vec.begin(); it < vec.end(); ++it)
         {
           const char *tt = it->c_str();
-          svn_error_t *err = JNIUtil::preprocessPath(tt, pool.pool());
+          svn_error_t *err = JNIUtil::preprocessPath(tt, pool.getPool());
           if (err != NULL)
             {
               m_error_occured = err;
@@ -68,25 +69,31 @@ const apr_array_header_t *Targets::array
         }
     }
 
-  std::vector<Path>::const_iterator it;
+  std::vector<const char*>::const_iterator it;
 
-  apr_pool_t *apr_pool = pool.pool ();
+  apr_pool_t *apr_pool = pool.getPool();
   apr_array_header_t *apr_targets = apr_array_make (apr_pool,
                                                     m_targets.size(),
                                                     sizeof(const char *));
 
   for (it = m_targets.begin(); it != m_targets.end(); ++it)
     {
-      const Path &path = *it;
-      const char *target =
-        apr_pstrdup (apr_pool, path.c_str());
-      (*((const char **) apr_array_push (apr_targets))) = target;
+      const char *target = *it;
+
+      svn_error_t *err = JNIUtil::preprocessPath(target, pool.getPool());
+      if (err != NULL)
+        {
+            m_error_occured = err;
+            break;
+        }
+      APR_ARRAY_PUSH(apr_targets, const char *) = *it;
     }
 
   return apr_targets;
 }
 
-Targets::Targets(StringArray &strArray)
+Targets::Targets(StringArray &strArray, SVN::Pool &in_pool)
+    : m_subpool(in_pool)
 {
   m_strArray = &strArray;
   m_error_occured = NULL;

Modified: subversion/branches/issue-3975/subversion/bindings/javahl/native/Targets.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/bindings/javahl/native/Targets.h?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/bindings/javahl/native/Targets.h (original)
+++ subversion/branches/issue-3975/subversion/bindings/javahl/native/Targets.h Fri Aug  5 18:49:28 2011
@@ -34,17 +34,19 @@
 struct apr_array_header_t;
 
 #include "Path.h"
+#include "Pool.h"
 #include <vector>
 
 class Targets
 {
  private:
-  std::vector<Path> m_targets;
+  SVN::Pool m_subpool;
+  std::vector<const char*> m_targets;
   StringArray *m_strArray;
   svn_error_t *m_error_occured;
  public:
-  Targets(StringArray &strArray);
-  Targets(const char *path);
+  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);

Modified: subversion/branches/issue-3975/subversion/bindings/javahl/native/libsvnjavahl.la.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/bindings/javahl/native/libsvnjavahl.la.c?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/bindings/javahl/native/libsvnjavahl.la.c (original)
+++ subversion/branches/issue-3975/subversion/bindings/javahl/native/libsvnjavahl.la.c Fri Aug  5 18:49:28 2011
@@ -30,3 +30,8 @@ JNI_OnLoad(JavaVM *vm, void *reserved)
 {
     return JNI_VERSION_1_2;
 }
+
+JNIEXPORT void JNICALL
+JNI_OnUnload(JavaVM *vm, void *reserved)
+{
+}

Modified: subversion/branches/issue-3975/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp (original)
+++ subversion/branches/issue-3975/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp Fri Aug  5 18:49:28 2011
@@ -356,8 +356,9 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return;
     }
+  SVN::Pool tmpPool;
   StringArray targetsArr(jtargets);
-  Targets targets(targetsArr);
+  Targets targets(targetsArr, tmpPool);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -434,8 +435,9 @@ Java_org_apache_subversion_javahl_SVNCli
   if (JNIUtil::isExceptionThrown())
     return NULL;
 
+  SVN::Pool tmpPool;
   StringArray targetsArr(jtargets);
-  Targets targets(targetsArr);
+  Targets targets(targetsArr, tmpPool);
   if (JNIUtil::isExceptionThrown())
     return NULL;
 
@@ -459,8 +461,9 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return;
     }
+  SVN::Pool tmpPool;
   StringArray targetsArr(jtargets);
-  Targets targets(targetsArr);
+  Targets targets(targetsArr, tmpPool);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -538,8 +541,9 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return;
     }
+  SVN::Pool tmpPool;
   StringArray srcPathArr(jsrcPaths);
-  Targets srcPaths(srcPathArr);
+  Targets srcPaths(srcPathArr, tmpPool);
   if (JNIUtil::isExceptionThrown())
     return;
   JNIStringHolder destPath(jdestPath);
@@ -572,8 +576,9 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return;
     }
+  SVN::Pool tmpPool;
   StringArray targetsArr(jtargets);
-  Targets targets(targetsArr);
+  Targets targets(targetsArr, tmpPool);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -960,8 +965,9 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError(_("bad C++ this"));
       return;
     }
+  SVN::Pool tmpPool;
   StringArray targetsArr(jtargets);
-  Targets targets(targetsArr);
+  Targets targets(targetsArr, tmpPool);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1575,8 +1581,9 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError("bad C++ this");
       return;
     }
+  SVN::Pool tmpPool;
   StringArray targetsArr(jtargets);
-  Targets targets(targetsArr);
+  Targets targets(targetsArr, tmpPool);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1604,8 +1611,9 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError("bad C++ this");
       return;
     }
+  SVN::Pool tmpPool;
   StringArray targetsArr(jtargets);
-  Targets targets(targetsArr);
+  Targets targets(targetsArr, tmpPool);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1654,8 +1662,9 @@ Java_org_apache_subversion_javahl_SVNCli
       JNIUtil::throwError("bad C++ this");
       return;
     }
+  SVN::Pool tmpPool;
   StringArray targetsArr(jtargets);
-  Targets targets(targetsArr);
+  Targets targets(targetsArr, tmpPool);
   if (JNIUtil::isExceptionThrown())
     return;
 
@@ -1678,8 +1687,9 @@ Java_org_apache_subversion_javahl_SVNCli
       return;
     }
 
+  SVN::Pool tmpPool;
   StringArray targetsArr(jtargets);
-  Targets targets(targetsArr);
+  Targets targets(targetsArr, tmpPool);
   if (JNIUtil::isExceptionThrown())
     return;
 

Modified: subversion/branches/issue-3975/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java (original)
+++ subversion/branches/issue-3975/subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java Fri Aug  5 18:49:28 2011
@@ -131,10 +131,10 @@ public class NativeResources
     {
         initNativeLibrary();
         version = new Version();
-        if (!version.isAtLeast(1, 5, 0))
+        if (!version.isAtLeast(1, 7, 0))
         {
             throw new LinkageError("Native library version must be at least " +
-                                   "1.5.0, but is only " + version);
+                                   "1.7.0, but is only " + version);
         }
     }
 

Modified: subversion/branches/issue-3975/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/libsvn_client/cmdline.c?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/libsvn_client/cmdline.c (original)
+++ subversion/branches/issue-3975/subversion/libsvn_client/cmdline.c Fri Aug  5 18:49:28 2011
@@ -292,7 +292,9 @@ svn_client_args_to_target_array2(apr_arr
                                                   original_target, pool));
                   err2 = svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath,
                                           FALSE, pool);
-                  if (err2 && err2->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
+                  if (err2
+                      && (err2->apr_err == SVN_ERR_WC_NOT_WORKING_COPY
+                          || err2->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED))
                     {
                       svn_error_clear(err2);
                     }

Modified: subversion/branches/issue-3975/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/libsvn_client/merge.c?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/issue-3975/subversion/libsvn_client/merge.c Fri Aug  5 18:49:28 2011
@@ -7756,6 +7756,9 @@ record_mergeinfo_for_dir_merge(svn_merge
 
    DEPTH, NOTIFY_B, MERGE_B, and SQUELCH_MERGEINFO_NOTIFICATIONS, are
    cascaded from do_directory_merge's arguments of the same names.
+
+   Note: This is intended to support forward merges only, i.e.
+   MERGED_RANGE->START must be older than MERGED_RANGE->END.
 */
 static svn_error_t *
 record_mergeinfo_for_added_subtrees(
@@ -7774,6 +7777,8 @@ record_mergeinfo_for_added_subtrees(
   if (!notify_b->added_abspaths)
     return SVN_NO_ERROR;
 
+  SVN_ERR_ASSERT(merged_range->start < merged_range->end);
+
   iterpool = svn_pool_create(pool);
   for (hi = apr_hash_first(pool, notify_b->added_abspaths); hi;
        hi = apr_hash_next(hi))
@@ -8610,7 +8615,9 @@ do_directory_merge(svn_mergeinfo_catalog
          So here we look at the root path of each subtree added during the
          merge and set explicit mergeinfo on it if it meets the aforementioned
          conditions. */
-      if (err == SVN_NO_ERROR)
+      if (err == SVN_NO_ERROR
+          && (range.start < range.end)) /* Nothing to record on added subtrees
+                                           resulting from reverse merges. */
         {
           err = record_mergeinfo_for_added_subtrees(
                   &range, mergeinfo_path, depth,

Modified: subversion/branches/issue-3975/subversion/libsvn_ra_serf/ra_serf.h
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/libsvn_ra_serf/ra_serf.h?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/libsvn_ra_serf/ra_serf.h (original)
+++ subversion/branches/issue-3975/subversion/libsvn_ra_serf/ra_serf.h Fri Aug  5 18:49:28 2011
@@ -179,6 +179,9 @@ struct svn_ra_serf__session_t {
   /* Connection timeout value */
   long timeout;
 
+  /* HTTPv1 flags */
+  svn_tristate_t supports_deadprop_count;
+
   /*** HTTP v2 protocol stuff. ***
    *
    * We assume that if mod_dav_svn sends one of the special v2 OPTIONs

Modified: subversion/branches/issue-3975/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/libsvn_ra_serf/serf.c?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/issue-3975/subversion/libsvn_ra_serf/serf.c Fri Aug  5 18:49:28 2011
@@ -386,6 +386,8 @@ svn_ra_serf__open(svn_ra_session_t *sess
   serf_sess->session_url_str = apr_pstrdup(serf_sess->pool, repos_URL);
   serf_sess->using_ssl = (svn_cstring_casecmp(url.scheme, "https") == 0);
 
+  serf_sess->supports_deadprop_count = svn_tristate_unknown;
+
   serf_sess->capabilities = apr_hash_make(serf_sess->pool);
 
   SVN_ERR(load_config(serf_sess, config, serf_sess->pool));
@@ -660,6 +662,8 @@ struct dirent_walker_baton_t {
   /* Update the fields in this entry.  */
   svn_dirent_t *entry;
 
+  svn_tristate_t *supports_deadprop_count;
+
   /* If allocations are necessary, then use this pool.  */
   apr_pool_t *result_pool;
 };
@@ -685,9 +689,16 @@ dirent_walker(void *baton,
     {
       if(strcmp(name, "deadprop-count") == 0)
         {
-          apr_int64_t deadprop_count;
-          SVN_ERR(svn_cstring_atoi64(&deadprop_count, val->data));
-          dwb->entry->has_props = deadprop_count > 0;
+          if (*val->data)
+            {
+              apr_int64_t deadprop_count;
+              SVN_ERR(svn_cstring_atoi64(&deadprop_count, val->data));
+              dwb->entry->has_props = deadprop_count > 0;
+              if (dwb->supports_deadprop_count)
+                *dwb->supports_deadprop_count = svn_tristate_true;
+            }
+          else if (dwb->supports_deadprop_count)
+            *dwb->supports_deadprop_count = svn_tristate_false;
         }
     }
   else if (strcmp(ns, "DAV:") == 0)
@@ -734,6 +745,8 @@ struct path_dirent_visitor_t {
   apr_hash_t *full_paths;
   apr_hash_t *base_paths;
   const char *orig_path;
+  svn_tristate_t supports_deadprop_count;
+  apr_pool_t *result_pool;
 };
 
 static svn_error_t *
@@ -771,7 +784,8 @@ path_dirent_walker(void *baton,
     }
 
   dwb.entry = entry;
-  dwb.result_pool = pool;  /* ### fix this!  */
+  dwb.supports_deadprop_count = &dirents->supports_deadprop_count;
+  dwb.result_pool = dirents->result_pool;
   return svn_error_trace(dirent_walker(&dwb, ns, name, val, pool));
 }
 
@@ -862,7 +876,8 @@ svn_ra_serf__stat(svn_ra_session_t *ra_s
     }
 
   dwb.entry = apr_pcalloc(pool, sizeof(*dwb.entry));
-  dwb.result_pool = pool;  /* ### fix this  */
+  dwb.supports_deadprop_count = NULL;
+  dwb.result_pool = pool;
   SVN_ERR(svn_ra_serf__walk_all_props(props, path, fetched_rev,
                                       dirent_walker, &dwb,
                                       pool));
@@ -956,11 +971,15 @@ svn_ra_serf__get_dir(svn_ra_session_t *r
       dirent_walk.full_paths = apr_hash_make(pool);
       dirent_walk.base_paths = apr_hash_make(pool);
       dirent_walk.orig_path = svn_urlpath__canonicalize(path, pool);
+      dirent_walk.supports_deadprop_count = svn_tristate_unknown;
+      dirent_walk.result_pool = pool;
 
       SVN_ERR(svn_ra_serf__walk_all_paths(props, revision, path_dirent_walker,
                                           &dirent_walk, pool));
 
       *dirents = dirent_walk.base_paths;
+      if (dirent_walk.supports_deadprop_count != svn_tristate_unknown)
+        session->supports_deadprop_count = dirent_walk.supports_deadprop_count;
     }
 
   /* If we're asked for the directory properties, fetch them too. */

Modified: subversion/branches/issue-3975/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/svn/main.c?rev=1154351&r1=1154350&r2=1154351&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/svn/main.c (original)
+++ subversion/branches/issue-3975/subversion/svn/main.c Fri Aug  5 18:49:28 2011
@@ -932,7 +932,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  Display information related to merges (or potential merges) between\n"
      "  SOURCE and TARGET (default: '.').  Display the type of information\n"
      "  specified by the --show-revs option.  If --show-revs isn't passed,\n"
-     "  it defaults to --show-revs='merged'.\n"),
+     "  it defaults to --show-revs='merged'.\n"
+     "\n"
+     "  The depth can be 'empty' or 'infinity'; the default is 'empty'.\n"),
     {'r', 'R', opt_depth, opt_show_revs} },
 
   { "mkdir", svn_cl__mkdir, {0}, N_



Mime
View raw message