subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1670997 - in /subversion/branches/1.9.x: ./ subversion/include/ subversion/libsvn_fs/ subversion/libsvn_fs_base/ subversion/libsvn_fs_fs/ subversion/libsvn_fs_x/ subversion/libsvn_repos/ subversion/tests/libsvn_fs/
Date Fri, 03 Apr 2015 04:00:24 GMT
Author: svn-role
Date: Fri Apr  3 04:00:24 2015
New Revision: 1670997

URL: http://svn.apache.org/r1670997
Log:
Merge r1669749 from trunk:

 * r1669749
   Make the new svn_fs_dir_optimal_order use two pools.
   Justification:
     New code should use the two-pool paradigm.  Hence, all new API should
     allow users to do so.
   Notes:
     This is not strictly blocking 1.9 but if we don't merge it, we need to
     revert it on /trunk as well.
   Votes:
     +1: stefan2, rhuijben, brane

Modified:
    subversion/branches/1.9.x/   (props changed)
    subversion/branches/1.9.x/STATUS
    subversion/branches/1.9.x/subversion/include/svn_fs.h
    subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.c
    subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.h
    subversion/branches/1.9.x/subversion/libsvn_fs_base/tree.c
    subversion/branches/1.9.x/subversion/libsvn_fs_fs/pack.c
    subversion/branches/1.9.x/subversion/libsvn_fs_fs/pack.h
    subversion/branches/1.9.x/subversion/libsvn_fs_fs/tree.c
    subversion/branches/1.9.x/subversion/libsvn_fs_x/   (props changed)
    subversion/branches/1.9.x/subversion/libsvn_fs_x/pack.c
    subversion/branches/1.9.x/subversion/libsvn_fs_x/pack.h
    subversion/branches/1.9.x/subversion/libsvn_fs_x/tree.c
    subversion/branches/1.9.x/subversion/libsvn_repos/reporter.c
    subversion/branches/1.9.x/subversion/tests/libsvn_fs/fs-test.c

Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Apr  3 04:00:24 2015
@@ -89,4 +89,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663697,1663706,1663738,1663749,1663791,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664653,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665318,1665437-1665438,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666270,1666272,1666379,1666449,1666690,1666851,1667101,1667106-1667107,1667941,1667976,1668598,1668600,1668602-1668603,1670329
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663697,1663706,1663738,1663749,1663791,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664653,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665318,1665437-1665438,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666270,1666272,1666379,1666449,1666690,1666851,1667101,1667106-1667107,1667941,1667976,1668598,1668600,1668602-1668603,1669749,1670329

Modified: subversion/branches/1.9.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Fri Apr  3 04:00:24 2015
@@ -215,14 +215,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1669749
-   Make the new svn_fs_dir_optimal_order use two pools.
-   Justification:
-     New code should use the two-pool paradigm.  Hence, all new API should
-     allow users to do so.
-   Notes:
-     This is not strictly blocking 1.9 but if we don't merge it, we need to
-     revert it on /trunk as well.
-   Votes:
-     +1: stefan2, rhuijben, brane

Modified: subversion/branches/1.9.x/subversion/include/svn_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_fs.h?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_fs.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_fs.h Fri Apr  3 04:00:24 2015
@@ -2086,7 +2086,8 @@ svn_fs_dir_entries(apr_hash_t **entries_
  * #svn_fs_dir_entries for @a root and determine an optimized ordering
  * in which data access would most likely be efficient.  Set @a *ordered_p
  * to a newly allocated APR array of pointers to these #svn_fs_dirent_t
- * structures.  Allocate the array (but not its contents) in @a pool.
+ * structures.  Allocate the array (but not its contents) in @a result_pool
+ * and use @a scratch_pool for temporaries.
  *
  * @since New in 1.9.
  */
@@ -2094,7 +2095,8 @@ svn_error_t *
 svn_fs_dir_optimal_order(apr_array_header_t **ordered_p,
                          svn_fs_root_t *root,
                          apr_hash_t *entries,
-                         apr_pool_t *pool);
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool);
 
 /** Create a new directory named @a path in @a root.  The new directory has
  * no entries, and no properties.  @a root must be the root of a transaction,

Modified: subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.c?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.c Fri Apr  3 04:00:24 2015
@@ -1321,10 +1321,13 @@ svn_error_t *
 svn_fs_dir_optimal_order(apr_array_header_t **ordered_p,
                          svn_fs_root_t *root,
                          apr_hash_t *entries,
-                         apr_pool_t *pool)
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool)
 {
   return svn_error_trace(root->vtable->dir_optimal_order(ordered_p, root,
-                                                         entries, pool));
+                                                         entries,
+                                                         result_pool,
+                                                         scratch_pool));
 }
 
 svn_error_t *

Modified: subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.h?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.h (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs/fs-loader.h Fri Apr  3 04:00:24 2015
@@ -361,7 +361,8 @@ typedef struct root_vtable_t
   svn_error_t *(*dir_optimal_order)(apr_array_header_t **ordered_p,
                                     svn_fs_root_t *root,
                                     apr_hash_t *entries,
-                                    apr_pool_t *pool);
+                                    apr_pool_t *result_pool,
+                                    apr_pool_t *scratch_pool);
   svn_error_t *(*make_dir)(svn_fs_root_t *root, const char *path,
                            apr_pool_t *pool);
 

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_base/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_base/tree.c?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_base/tree.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_base/tree.c Fri Apr  3 04:00:24 2015
@@ -1608,13 +1608,15 @@ static svn_error_t *
 base_dir_optimal_order(apr_array_header_t **ordered_p,
                        svn_fs_root_t *root,
                        apr_hash_t *entries,
-                       apr_pool_t *pool)
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool)
 {
   /* 1:1 copy of entries with no differnce in ordering */
   apr_hash_index_t *hi;
-  apr_array_header_t *result = apr_array_make(pool, apr_hash_count(entries),
-                                              sizeof(svn_fs_dirent_t *));
-  for (hi = apr_hash_first(pool, entries); hi; hi = apr_hash_next(hi))
+  apr_array_header_t *result
+    = apr_array_make(result_pool, apr_hash_count(entries),
+                     sizeof(svn_fs_dirent_t *));
+  for (hi = apr_hash_first(scratch_pool, entries); hi; hi = apr_hash_next(hi))
     APR_ARRAY_PUSH(result, svn_fs_dirent_t *) = apr_hash_this_val(hi);
 
   *ordered_p = result;

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_fs/pack.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_fs/pack.c?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_fs/pack.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_fs/pack.c Fri Apr  3 04:00:24 2015
@@ -643,17 +643,18 @@ compare_dir_entries_format6(const svn_so
 apr_array_header_t *
 svn_fs_fs__order_dir_entries(svn_fs_t *fs,
                              apr_hash_t *directory,
-                             apr_pool_t *pool)
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool)
 {
   apr_array_header_t *ordered
     = svn_sort__hash(directory,
                      svn_fs_fs__use_log_addressing(fs)
                        ? compare_dir_entries_format7
                        : compare_dir_entries_format6,
-                     pool);
+                     scratch_pool);
 
   apr_array_header_t *result
-    = apr_array_make(pool, ordered->nelts, sizeof(svn_fs_dirent_t *));
+    = apr_array_make(result_pool, ordered->nelts, sizeof(svn_fs_dirent_t *));
 
   int i;
   for (i = 0; i < ordered->nelts; ++i)

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_fs/pack.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_fs/pack.h?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_fs/pack.h (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_fs/pack.h Fri Apr  3 04:00:24 2015
@@ -51,13 +51,14 @@ svn_fs_fs__get_packed_offset(apr_off_t *
                              apr_pool_t *pool);
 
 /* Return the svn_dir_entry_t* objects of DIRECTORY in an APR array
- * allocated in POOL with entries added in storage (on-disk) order.
- * FS format will be used to pick the optimal ordering strategy.
+ * allocated in RESULT_POOL with entries added in storage (on-disk) order.
+ * FS' format will be used to pick the optimal ordering strategy.  Use
+ * SCRATCH_POOL for temporary allocations.
  */
 apr_array_header_t *
 svn_fs_fs__order_dir_entries(svn_fs_t *fs,
                              apr_hash_t *directory,
-                             apr_pool_t *pool);
-
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool);
 
 #endif

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_fs/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_fs/tree.c?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_fs/tree.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_fs/tree.c Fri Apr  3 04:00:24 2015
@@ -2392,9 +2392,11 @@ static svn_error_t *
 fs_dir_optimal_order(apr_array_header_t **ordered_p,
                      svn_fs_root_t *root,
                      apr_hash_t *entries,
-                     apr_pool_t *pool)
+                     apr_pool_t *result_pool,
+                     apr_pool_t *scratch_pool)
 {
-  *ordered_p = svn_fs_fs__order_dir_entries(root->fs, entries, pool);
+  *ordered_p = svn_fs_fs__order_dir_entries(root->fs, entries, result_pool,
+                                            scratch_pool);
 
   return SVN_NO_ERROR;
 }

Propchange: subversion/branches/1.9.x/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Apr  3 04:00:24 2015
@@ -90,4 +90,4 @@
 /subversion/branches/verify-keep-going/subversion/libsvn_fs_x:1439280-1492639,1546002-1546110
 /subversion/branches/wc-collate-path/subversion/libsvn_fs_x:1402685-1480384
 /subversion/trunk/subversion/libsvn_fs_fs:1415133-1596500,1596567,1597414,1597989,1598273,1599140,1600872,1601633,1603485-1603487,1603499,1603605,1604128,1604188,1604413-1604414,1604416-1604417,1604421,1604442,1604700,1604717,1604720,1604726,1604755,1604794,1604802,1604824,1604836,1604844,1604902-1604903,1604911,1604925,1604933,1604947,1605059-1605060,1605064-1605065,1605068,1605071-1605073,1605075,1605123,1605188-1605189,1605191,1605197,1605444,1605633,1606132,1606142,1606144,1606514,1606526,1606528,1606551,1606554,1606564,1606598-1606599,1606656,1606658,1606662,1606744,1606840,1607085,1607572,1612407,1612810,1613339,1613872,1614611,1615348,1615351-1615352,1615356,1616338-1616339,1616613,1617586,1617688,1618138,1618151,1618153,1618226,1618641,1618653,1618662,1619068,1619358,1619413,1619769,1619774,1620602,1620909,1620912,1620928,1620930,1621275,1621635,1622931,1622937,1622942,1622946,1622959-1622960,1622963,1622987,1623007,1623368,1623373,1623377,1623379,1623381,1623398,1623402,162
 4011,1624265,1624512,1626246,1626871,1626873,1626886,1627497-1627498,1627502,1627947-1627949,1627966,1628083,1628093,1628158-1628159,1628161,1628392-1628393,1628415,1628427,1628676,1628738,1628762,1628764,1629854-1629855,1629857,1629865,1629873,1629875,1629879,1630067,1630070,1631049-1631051,1631075,1631115,1631171,1631180,1631185-1631186,1631196-1631197,1631239-1631240,1631548,1631550,1631563,1631567,1631588,1631598,1632646,1632776,1632849,1632851-1632853,1632856-1632857,1632868,1632908,1632926,1633232,1633617-1633618,1634872,1634875,1634879-1634880,1634920,1636478,1636483,1636629,1636644,1637184,1637186,1637330,1637358,1637363,1637393,1639319,1639322,1639335,1639348,1639352,1639355,1639358,1639414,1639419,1639426,1639430,1639436,1639440,1639549,1640061-1640062,1640197,1640915,1640966,1641013,1643139,1643233,1645567,1646021,1646712,1646716,1647537,1647540-1647541,1647820,1647905,1648230,1648238,1648241-1648243,1648253,1648272,1648532,1648537-1648539,1648542,1648591,1648612,1653608,
 1658482
-/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1665318,1665894,1667101
+/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1665318,1665894,1667101,1669749

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_x/pack.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_x/pack.c?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_x/pack.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_x/pack.c Fri Apr  3 04:00:24 2015
@@ -625,13 +625,14 @@ compare_dir_entries(const svn_sort__item
 apr_array_header_t *
 svn_fs_x__order_dir_entries(svn_fs_t *fs,
                             apr_hash_t *directory,
-                            apr_pool_t *pool)
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool)
 {
   apr_array_header_t *ordered
-    = svn_sort__hash(directory, compare_dir_entries, pool);
+    = svn_sort__hash(directory, compare_dir_entries, scratch_pool);
 
   apr_array_header_t *result
-    = apr_array_make(pool, ordered->nelts, sizeof(svn_fs_dirent_t *));
+    = apr_array_make(result_pool, ordered->nelts, sizeof(svn_fs_dirent_t *));
 
   int i;
   for (i = 0; i < ordered->nelts; ++i)

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_x/pack.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_x/pack.h?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_x/pack.h (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_x/pack.h Fri Apr  3 04:00:24 2015
@@ -51,13 +51,15 @@ svn_fs_x__get_packed_offset(apr_off_t *r
                             apr_pool_t *scratch_pool);
 
 /* Return the svn_dir_entry_t* objects of DIRECTORY in an APR array
- * allocated in POOL with entries added in storage (on-disk) order.
- * FS format will be used to pick the optimal ordering strategy.
+ * allocated in RESULT_POOL with entries added in storage (on-disk) order.
+ * FS' format will be used to pick the optimal ordering strategy.  Use
+ * SCRATCH_POOL for temporary allocations.
  */
 apr_array_header_t *
 svn_fs_x__order_dir_entries(svn_fs_t *fs,
                             apr_hash_t *directory,
-                            apr_pool_t *pool);
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
 
 
 #endif

Modified: subversion/branches/1.9.x/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_fs_x/tree.c?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_fs_x/tree.c Fri Apr  3 04:00:24 2015
@@ -2411,9 +2411,11 @@ static svn_error_t *
 x_dir_optimal_order(apr_array_header_t **ordered_p,
                     svn_fs_root_t *root,
                     apr_hash_t *entries,
-                    apr_pool_t *pool)
+                    apr_pool_t *result_pool,
+                    apr_pool_t *scratch_pool)
 {
-  *ordered_p = svn_fs_x__order_dir_entries(root->fs, entries, pool);
+  *ordered_p = svn_fs_x__order_dir_entries(root->fs, entries, result_pool,
+                                           scratch_pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/1.9.x/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_repos/reporter.c?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_repos/reporter.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_repos/reporter.c Fri Apr  3 04:00:24 2015
@@ -1282,7 +1282,7 @@ delta_dirs(report_baton_t *b, svn_revnum
 
       /* Loop over the dirents in the target. */
       SVN_ERR(svn_fs_dir_optimal_order(&t_ordered_entries, b->t_root,
-                                       t_entries, subpool));
+                                       t_entries, subpool, iterpool));
       for (i = 0; i < t_ordered_entries->nelts; ++i)
         {
           const svn_fs_dirent_t *t_entry

Modified: subversion/branches/1.9.x/subversion/tests/libsvn_fs/fs-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/tests/libsvn_fs/fs-test.c?rev=1670997&r1=1670996&r2=1670997&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/tests/libsvn_fs/fs-test.c (original)
+++ subversion/branches/1.9.x/subversion/tests/libsvn_fs/fs-test.c Fri Apr  3 04:00:24 2015
@@ -6510,7 +6510,7 @@ test_dir_optimal_order(const svn_test_op
 
   /* Call the API function we are interested in. */
   SVN_ERR(svn_fs_dir_entries(&unordered, root, "A", pool));
-  SVN_ERR(svn_fs_dir_optimal_order(&ordered, root, unordered, pool));
+  SVN_ERR(svn_fs_dir_optimal_order(&ordered, root, unordered, pool, pool));
 
   /* Verify that all entries are returned. */
   SVN_TEST_ASSERT(ordered->nelts == apr_hash_count(unordered));



Mime
View raw message