[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1158688 [2/2] - in /subversion/branches/1.7.x-JavaHL-pools: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/

From: Mark Phippard <markphip_at_gmail.com>
Date: Wed, 17 Aug 2011 09:31:53 -0400

On Wed, Aug 17, 2011 at 9:11 AM, <rhuijben_at_apache.org> wrote:

> Modified:
> subversion/branches/1.7.x-JavaHL-pools/subversion/bindings/javahl/native/SVNClient.cpp
> URL:
> http://svn.apache.org/viewvc/subversion/branches/1.7.x-JavaHL-pools/subversion/bindings/javahl/native/SVNClient.cpp?rev=1158688&r1=1158687&r2=1158688&view=diff
>
> ==============================================================================
> ---
> subversion/branches/1.7.x-JavaHL-pools/subversion/bindings/javahl/native/SVNClient.cpp
> (original)
> +++
> subversion/branches/1.7.x-JavaHL-pools/subversion/bindings/javahl/native/SVNClient.cpp
> Wed Aug 17 13:11:53 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, long base_rev,
> @@ -905,7 +905,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;
> @@ -913,20 +913,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(message);
> + svn_client_ctx_t *ctx = context.getContext(NULL, subPool);
> if (ctx == NULL)
> return;
>

I think this is the conflict you had to resolve. Shouldn't the NULL be
message in the call to getContext?

svn_client_ctx_t *ctx = context.getContext(message, subPool);

>
> SVN_JNI_ERR(svn_client_propset_remote(name, val, intPath.c_str(),
> force, base_rev,
> - revprops.hash(requestPool),
> + revprops.hash(subPool),
> CommitCallback::callback,
> callback,
> - ctx, requestPool.pool()), );
> + ctx, subPool.getPool()), );
> }
>
>

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
Received on 2011-08-17 15:32:24 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.