subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1713637 - /subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
Date Tue, 10 Nov 2015 13:45:32 GMT
Author: philip
Date: Tue Nov 10 13:45:32 2015
New Revision: 1713637

URL: http://svn.apache.org/viewvc?rev=1713637&view=rev
Log:
On move-tracking-2 branch: fix a pool lifetime issue similar to r1690654.

* subversion/svnmover/svnmover.c
  (commit): Allocate subpool from svnmover_wc_t pool.

Modified:
    subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c

Modified: subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c?rev=1713637&r1=1713636&r2=1713637&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Tue Nov 10 13:45:32
2015
@@ -2415,6 +2415,8 @@ commit(svn_revnum_t *new_rev_p,
        apr_hash_t *revprops,
        apr_pool_t *scratch_pool)
 {
+  apr_pool_t *subpool;
+  
   if (svnmover_any_conflicts(wc->conflicts))
     {
       return svn_error_createf(SVN_ERR_BRANCHING, NULL,
@@ -2425,8 +2427,10 @@ commit(svn_revnum_t *new_rev_p,
   /* Complete the old edit drive (into the 'WC') */
   SVN_ERR(svn_branch_txn_sequence_point(wc->edit_txn, scratch_pool));
 
-  /* Commit */
-  SVN_ERR(wc_commit(new_rev_p, wc, revprops, scratch_pool));
+  /* Just as in execute() the pool must be a subpool of wc->pool. */
+  subpool = svn_pool_create(wc->pool);
+  SVN_ERR(wc_commit(new_rev_p, wc, revprops, subpool));
+  svn_pool_destroy(subpool);
 
   return SVN_NO_ERROR;
 }



Mime
View raw message