Author: brane
Date: Wed Feb  4 17:22:29 2015
New Revision: 1657330

URL: http://svn.apache.org/r1657330
Log:
On the reuse-ra-session branch: Sync with trunk up to r1657328.

Removed:
    
subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.expected.dump
Modified:
    subversion/branches/reuse-ra-session/   (props changed)
    subversion/branches/reuse-ra-session/Makefile.in
    subversion/branches/reuse-ra-session/build/run_tests.py
    subversion/branches/reuse-ra-session/subversion/include/svn_string.h
    subversion/branches/reuse-ra-session/subversion/libsvn_client/mtcc.c
    subversion/branches/reuse-ra-session/subversion/libsvn_client/repos_diff.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/tree.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/   (props 
changed)
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/cached_data.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.h
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.h
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.h
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/noderevs.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.h
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.h
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/tree.c
    subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/verify.c
    subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/commit.c
    subversion/branches/reuse-ra-session/subversion/libsvn_repos/log.c
    subversion/branches/reuse-ra-session/subversion/libsvn_repos/reporter.c
    subversion/branches/reuse-ra-session/subversion/libsvn_subr/string.c
    subversion/branches/reuse-ra-session/subversion/libsvn_wc/diff_editor.c
    subversion/branches/reuse-ra-session/subversion/libsvn_wc/externals.c
    subversion/branches/reuse-ra-session/subversion/libsvn_wc/props.c
    subversion/branches/reuse-ra-session/subversion/libsvn_wc/update_editor.c
    subversion/branches/reuse-ra-session/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/reuse-ra-session/subversion/libsvn_wc/wc_db.c
    subversion/branches/reuse-ra-session/subversion/svnrdump/load_editor.c
    subversion/branches/reuse-ra-session/subversion/svnsync/sync.c
    subversion/branches/reuse-ra-session/subversion/tests/cmdline/authz_tests.py
    
subversion/branches/reuse-ra-session/subversion/tests/cmdline/davautocheck.sh
    
subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnadmin_tests.py
    
subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_authz_tests.py
    
subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_tests.py
    
subversion/branches/reuse-ra-session/subversion/tests/cmdline/svnsync_tests_data/mergeinfo-contains-r0.dump
    
subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/main.py
    
subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/sandbox.py
    
subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/testcase.py
    
subversion/branches/reuse-ra-session/subversion/tests/cmdline/svntest/verify.py
    subversion/branches/reuse-ra-session/subversion/tests/libsvn_fs_x/   (props 
changed)
    
subversion/branches/reuse-ra-session/subversion/tests/libsvn_wc/op-depth-test.c

Propchange: subversion/branches/reuse-ra-session/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb  4 17:22:29 2015
@@ -11,6 +11,7 @@
 /subversion/branches/diff-optimizations-bytes:1037353-1067789
 /subversion/branches/dont-save-plaintext-passwords-by-default:870728-871118
 /subversion/branches/double-delete:870511-872970
+/subversion/branches/dump-load-cross-check:1654853-1657295
 /subversion/branches/ev2-export:1325914,1332738,1413107
 
/subversion/branches/explore-wc:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997
 /subversion/branches/file-externals:871779-873302
@@ -86,4 +87,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1501802-1657111
+/subversion/trunk:1501802-1657328

Modified: subversion/branches/reuse-ra-session/Makefile.in
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/Makefile.in?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/Makefile.in (original)
+++ subversion/branches/reuse-ra-session/Makefile.in Wed Feb  4 17:22:29 2015
@@ -529,6 +529,9 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $
          if test "$(SKIP_C_TESTS)" != ""; then                              \
            flags="--skip-c-tests $$flags";                                  \
          fi;                                                                \
+         if test "$(DUMP_LOAD_CROSS_CHECK)" != ""; then                     \
+           flags="--dump-load-cross-check $$flags";                         \
+         fi;                                                                \
          if test "$(FS_TYPE)" != ""; then                                   \
            flags="--fs-type $(FS_TYPE) $$flags";                            \
          fi;                                                                \

Modified: subversion/branches/reuse-ra-session/build/run_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/build/run_tests.py?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/build/run_tests.py (original)
+++ subversion/branches/reuse-ra-session/build/run_tests.py Wed Feb  4 17:22:29 
2015
@@ -130,7 +130,8 @@ class TestHarness:
                http_proxy=None, http_proxy_username=None,
                http_proxy_password=None, httpd_version=None,
                exclusive_wc_locks=None,
-               memcached_server=None, skip_c_tests=None):
+               memcached_server=None, skip_c_tests=None,
+               dump_load_cross_check=None):
     '''Construct a TestHarness instance.
 
     ABS_SRCDIR and ABS_BUILDDIR are the source and build directories.
@@ -193,6 +194,7 @@ class TestHarness:
     if not sys.stdout.isatty() or sys.platform == 'win32':
       TextColors.disable()
     self.skip_c_tests = (not not skip_c_tests)
+    self.dump_load_cross_check = (not not dump_load_cross_check)
 
     # Parse out the FSFS version number
     if self.fs_type is not None and self.fs_type.startswith('fsfs-v'):
@@ -549,6 +551,8 @@ class TestHarness:
       svntest.main.options.exclusive_wc_locks = self.exclusive_wc_locks
     if self.memcached_server is not None:
       svntest.main.options.memcached_server = self.memcached_server
+    if self.dump_load_cross_check is not None:
+      svntest.main.options.dump_load_cross_check = self.dump_load_cross_check
 
     svntest.main.options.srcdir = self.srcdir
 
@@ -712,6 +716,7 @@ def main():
     opts, args = my_getopt(sys.argv[1:], 'u:f:vc',
                            ['url=', 'fs-type=', 'verbose', 'cleanup',
                             'skip-c-tests', 'skip-C-tests',
+                            'dump-load-cross-check',
                             'http-library=', 'server-minor-version=',
                             'fsfs-packing', 'fsfs-sharding=',
                             'enable-sasl', 'parallel=', 'config-file=',
@@ -733,10 +738,10 @@ def main():
     parallel, config_file, log_to_stdout, list_tests, mode_filter, \
     milestone_filter, set_log_level, ssl_cert, http_proxy, \
     http_proxy_username, http_proxy_password, httpd_version, \
-    exclusive_wc_locks, memcached_server = \
+    exclusive_wc_locks, memcached_server, dump_load_cross_check = \
             None, None, None, None, None, None, None, None, None, None, \
             None, None, None, None, None, None, None, None, None, None, \
-            None, None, None, None,
+            None, None, None, None, None
   for opt, val in opts:
     if opt in ['-u', '--url']:
       base_url = val
@@ -756,6 +761,8 @@ def main():
       cleanup = 1
     elif opt in ['--skip-c-tests', '--skip-C-tests']:
       skip_c_tests = 1
+    elif opt in ['--dump-load-cross-check']:
+      dump_load_cross_check = 1
     elif opt in ['--enable-sasl']:
       enable_sasl = 1
     elif opt in ['--parallel']:
@@ -808,7 +815,8 @@ def main():
                    httpd_version=httpd_version,
                    exclusive_wc_locks=exclusive_wc_locks,
                    memcached_server=memcached_server,
-                   skip_c_tests=skip_c_tests)
+                   skip_c_tests=skip_c_tests,
+                   dump_load_cross_check=dump_load_cross_check)
 
   failed = th.run(args[2:])
   if failed:

Modified: subversion/branches/reuse-ra-session/subversion/include/svn_string.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/include/svn_string.h?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/include/svn_string.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/include/svn_string.h Wed 
Feb  4 17:22:29 2015
@@ -170,7 +170,11 @@ svn_string_createv(apr_pool_t *pool, con
 svn_boolean_t
 svn_string_isempty(const svn_string_t *str);
 
-/** Return a duplicate of @a original_string. */
+/** Return a duplicate of @a original_string.
+ *
+ * @since Since 1.9, @a original_string can be NULL in which case NULL will
+ * be returned.
+ */
 svn_string_t *
 svn_string_dup(const svn_string_t *original_string, apr_pool_t *pool);
 

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_client/mtcc.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/mtcc.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_client/mtcc.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_client/mtcc.c Wed 
Feb  4 17:22:29 2015
@@ -710,8 +710,7 @@ mtcc_prop_getter(const svn_string_t **mi
 
               if (! strcmp(mod->name, SVN_PROP_MIME_TYPE))
                 {
-                  *mime_type = mod->value ? svn_string_dup(mod->value, pool)
-                                          : NULL;
+                  *mime_type = svn_string_dup(mod->value, pool);
                   mime_type = NULL;
                 }
             }

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_client/repos_diff.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/repos_diff.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_client/repos_diff.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_client/repos_diff.c 
Wed Feb  4 17:22:29 2015
@@ -1162,7 +1162,7 @@ change_file_prop(void *file_baton,
 
   propchange = apr_array_push(fb->propchanges);
   propchange->name = apr_pstrdup(fb->pool, name);
-  propchange->value = value ? svn_string_dup(value, fb->pool) : NULL;
+  propchange->value = svn_string_dup(value, fb->pool);
 
   return SVN_NO_ERROR;
 }
@@ -1192,7 +1192,7 @@ change_dir_prop(void *dir_baton,
 
   propchange = apr_array_push(db->propchanges);
   propchange->name = apr_pstrdup(db->pool, name);
-  propchange->value = value ? svn_string_dup(value, db->pool) : NULL;
+  propchange->value = svn_string_dup(value, db->pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/tree.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/tree.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/tree.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_base/tree.c Wed 
Feb  4 17:22:29 2015
@@ -1237,7 +1237,7 @@ base_node_prop(svn_string_t **value_p,
   args.propname = propname;
   SVN_ERR(svn_fs_base__retry_txn(root->fs, txn_body_node_prop, &args,
                                  FALSE, scratch_pool));
-  *value_p = value ? svn_string_dup(value, pool) : NULL;
+  *value_p = svn_string_dup(value, pool);
   svn_pool_destroy(scratch_pool);
   return SVN_NO_ERROR;
 }

Propchange: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb  4 17:22:29 2015
@@ -10,6 +10,7 @@
 
/subversion/branches/diff-optimizations-bytes/subversion/libsvn_fs_x:1037353-1067789
 
/subversion/branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_fs_x:870728-871118
 /subversion/branches/double-delete/subversion/libsvn_fs_x:870511-872970
+/subversion/branches/dump-load-cross-check/subversion/libsvn_fs_x:1654853-1657295
 /subversion/branches/ev2-export/subversion/libsvn_fs_x:1325914,1332738,1413107
 
/subversion/branches/explore-wc/subversion/libsvn_fs_x:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997
 /subversion/branches/file-externals/subversion/libsvn_fs_x:871779-873302
@@ -87,5 +88,5 @@
 /subversion/branches/verify-at-commit/subversion/libsvn_fs_x:1462039-1462408
 
/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
-/subversion/trunk/subversion/libsvn_fs_x:1414756-1656372
+/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
+/subversion/trunk/subversion/libsvn_fs_x:1414756-1657328

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/cached_data.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/cached_data.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/cached_data.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/cached_data.c 
Wed Feb  4 17:22:29 2015
@@ -3100,10 +3100,6 @@ block_read_noderev(svn_fs_x__noderev_t *
 
   SVN_ERR(svn_fs_x__read_noderev(noderev_p, stream, result_pool,
                                  scratch_pool));
-
-  /* Workaround issue #4031: is-fresh-txn-root in revision files. */
-  (*noderev_p)->is_fresh_txn_root = FALSE;
-
   if (ffd->node_revision_cache)
     SVN_ERR(svn_cache__set(ffd->node_revision_cache, key, *noderev_p,
                            scratch_pool));

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.c (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.c Wed Feb  
4 17:22:29 2015
@@ -245,7 +245,8 @@ svn_error_t *
 svn_fs_x__dag_get_node(dag_node_t **node,
                        svn_fs_t *fs,
                        const svn_fs_x__id_t *id,
-                       apr_pool_t *result_pool)
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool)
 {
   dag_node_t *new_node;
   svn_fs_x__noderev_t *noderev;
@@ -257,17 +258,19 @@ svn_fs_x__dag_get_node(dag_node_t **node
   new_node->hint = APR_SIZE_MAX;
 
   /* Grab the contents so we can inspect the node's kind and created path. */
+  SVN_ERR(svn_fs_x__get_node_revision(&noderev, fs, id,
+                                      result_pool, scratch_pool));
   new_node->node_pool = result_pool;
-  SVN_ERR(get_node_revision(&noderev, new_node));
+  new_node->node_revision = noderev;
 
   /* Initialize the KIND and CREATED_PATH attributes */
   new_node->kind = noderev->kind;
-  new_node->created_path = apr_pstrdup(result_pool, noderev->created_path);
+  new_node->created_path = noderev->created_path;
 
   /* Support our quirky svn_fs_node_created_rev API.
      Untouched txn roots report the base rev as theirs. */
   new_node->revision
-    = (  noderev->is_fresh_txn_root
+    = (  svn_fs_x__is_fresh_txn_root(noderev)
        ? svn_fs_x__get_revnum(noderev->predecessor_id.change_set)
        : svn_fs_x__get_revnum(id->change_set));
 
@@ -469,7 +472,8 @@ make_entry(dag_node_t **child_p,
 
   /* Create a new dag_node_t for our new node */
   SVN_ERR(svn_fs_x__dag_get_node(child_p, svn_fs_x__dag_get_fs(parent),
-                                 &new_noderev.noderev_id, result_pool));
+                                 &new_noderev.noderev_id, result_pool,
+                                 scratch_pool));
 
   /* We can safely call set_entry because we already know that
      PARENT is mutable, and we just created CHILD, so we know it has
@@ -618,7 +622,7 @@ svn_fs_x__dag_increment_mergeinfo_count(
     }
 
   /* Flush it out. */
-  return svn_fs_x__put_node_revision(node->fs, noderev, FALSE, scratch_pool);
+  return svn_fs_x__put_node_revision(node->fs, noderev, scratch_pool);
 }
 
 svn_error_t *
@@ -644,7 +648,7 @@ svn_fs_x__dag_set_has_mergeinfo(dag_node
   noderev->has_mergeinfo = has_mergeinfo;
 
   /* Flush it out. */
-  return svn_fs_x__put_node_revision(node->fs, noderev, FALSE, scratch_pool);
+  return svn_fs_x__put_node_revision(node->fs, noderev, scratch_pool);
 }
 
 
@@ -654,27 +658,14 @@ svn_error_t *
 svn_fs_x__dag_revision_root(dag_node_t **node_p,
                             svn_fs_t *fs,
                             svn_revnum_t rev,
-                            apr_pool_t *result_pool)
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool)
 {
-  dag_node_t *new_node;
-
-  /* Construct the node. */
-  new_node = apr_pcalloc(result_pool, sizeof(*new_node));
-  new_node->fs = fs;
-  new_node->revision = rev;
-  svn_fs_x__init_rev_root(&new_node->id, rev);
-
-  /* Grab the contents so we can inspect the node's kind and created path. */
-  new_node->node_pool = result_pool;
-
-  /* Initialize the KIND and CREATED_PATH attributes */
-  new_node->kind = svn_node_dir;
-  new_node->created_path = "/";
-  new_node->hint = APR_SIZE_MAX;
+  svn_fs_x__id_t root_id;
 
-  /* Return a fresh new node */
-  *node_p = new_node;
-  return SVN_NO_ERROR;
+  svn_fs_x__init_rev_root(&root_id, rev);
+  return svn_fs_x__dag_get_node(node_p, fs, &root_id, result_pool,
+                                scratch_pool);
 }
 
 
@@ -682,29 +673,14 @@ svn_error_t *
 svn_fs_x__dag_txn_root(dag_node_t **node_p,
                        svn_fs_t *fs,
                        svn_fs_x__txn_id_t txn_id,
-                       apr_pool_t *result_pool)
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool)
 {
   svn_fs_x__id_t root_id;
 
   svn_fs_x__init_txn_root(&root_id, txn_id);
-  return svn_fs_x__dag_get_node(node_p, fs, &root_id, result_pool);
-}
-
-
-svn_error_t *
-svn_fs_x__dag_txn_base_root(dag_node_t **node_p,
-                            svn_fs_t *fs,
-                            svn_fs_x__txn_id_t txn_id,
-                            apr_pool_t *result_pool,
-                            apr_pool_t *scratch_pool)
-{
-  svn_fs_x__id_t base_root_id;
-  svn_revnum_t base_rev;
-
-  SVN_ERR(svn_fs_x__get_base_rev(&base_rev, fs, txn_id, scratch_pool));
-
-  svn_fs_x__init_rev_root(&base_root_id, base_rev);
-  return svn_fs_x__dag_get_node(node_p, fs, &base_root_id, result_pool);
+  return svn_fs_x__dag_get_node(node_p, fs, &root_id, result_pool,
+                                scratch_pool);
 }
 
 
@@ -787,22 +763,8 @@ svn_fs_x__dag_clone_child(dag_node_t **c
     }
 
   /* Initialize the youngster. */
-  return svn_fs_x__dag_get_node(child_p, fs, new_node_id, result_pool);
-}
-
-
-
-svn_error_t *
-svn_fs_x__dag_clone_root(dag_node_t **root_p,
-                         svn_fs_t *fs,
-                         svn_fs_x__txn_id_t txn_id,
-                         apr_pool_t *result_pool)
-{
-  svn_fs_x__id_t root_id;
-  svn_fs_x__init_txn_root(&root_id, txn_id);
-
-  /* One way or another, root_id now identifies a cloned root node. */
-  return svn_fs_x__dag_get_node(root_p, fs, &root_id, result_pool);
+  return svn_fs_x__dag_get_node(child_p, fs, new_node_id, result_pool,
+                                scratch_pool);
 }
 
 
@@ -821,7 +783,7 @@ delete_if_mutable(svn_fs_t *fs,
   dag_node_t *node;
 
   /* Get the node. */
-  SVN_ERR(svn_fs_x__dag_get_node(&node, fs, id, scratch_pool));
+  SVN_ERR(svn_fs_x__dag_get_node(&node, fs, id, scratch_pool, scratch_pool));
 
   /* If immutable, do nothing and return immediately. */
   if (! svn_fs_x__dag_check_mutable(node))
@@ -1239,7 +1201,7 @@ svn_fs_x__dag_open(dag_node_t **child_p,
 
   /* Now get the node that was requested. */
   return svn_fs_x__dag_get_node(child_p, svn_fs_x__dag_get_fs(parent),
-                                &node_id, result_pool);
+                                &node_id, result_pool, scratch_pool);
 }
 
 
@@ -1401,6 +1363,6 @@ svn_fs_x__dag_update_ancestry(dag_node_t
   target_noderev->predecessor_count = source_noderev->predecessor_count;
   target_noderev->predecessor_count++;
 
-  return svn_fs_x__put_node_revision(target->fs, target_noderev, FALSE,
+  return svn_fs_x__put_node_revision(target->fs, target_noderev,
                                      scratch_pool);
 }

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.h?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.h (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/dag.h Wed Feb  
4 17:22:29 2015
@@ -65,12 +65,13 @@ extern "C" {
 typedef struct dag_node_t dag_node_t;
 
 /* Fill *NODE with a dag_node_t representing node revision ID in FS,
-   allocating in RESULT_POOL.  */
+   allocating in RESULT_POOL.  Use SCRATCH_POOL for temporaries. */
 svn_error_t *
 svn_fs_x__dag_get_node(dag_node_t **node,
                        svn_fs_t *fs,
                        const svn_fs_x__id_t *id,
-                       apr_pool_t *result_pool);
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
 
 
 /* Return a new dag_node_t object referring to the same node as NODE,
@@ -252,49 +253,24 @@ svn_fs_x__dag_set_has_mergeinfo(dag_node
 
 
 /* Open the root of revision REV of filesystem FS, allocating from
-   RESULT_POOL.  Set *NODE_P to the new node. */
+   RESULT_POOL.  Set *NODE_P to the new node.  Use SCRATCH_POOL for
+   temporary allocations.*/
 svn_error_t *
 svn_fs_x__dag_revision_root(dag_node_t **node_p,
                             svn_fs_t *fs,
                             svn_revnum_t rev,
-                            apr_pool_t *result_pool);
+                            apr_pool_t *result_pool,
+                            apr_pool_t *scratch_pool);
 
 
 /* Set *NODE_P to the root of transaction TXN_ID in FS, allocating
-   from RESULT_POOL.
-
-   Note that the root node of TXN_ID is not necessarily mutable.  If
-   no changes have been made in the transaction, then it may share its
-   root directory with its base revision.  To get a mutable root node
-   for a transaction, call svn_fs_x__dag_clone_root.  */
+   from RESULT_POOL.  Use SCRATCH_POOL for temporary allocations. */
 svn_error_t *
 svn_fs_x__dag_txn_root(dag_node_t **node_p,
                        svn_fs_t *fs,
                        svn_fs_x__txn_id_t txn_id,
-                       apr_pool_t *result_pool);
-
-
-/* Set *NODE_P to the base root of transaction TXN_ID in FS,
-   allocating from RESULT_POOL.  Allocate the node in TRAIL->pool.
-   Use SCRATCH_POOL for temporaries. */
-svn_error_t *
-svn_fs_x__dag_txn_base_root(dag_node_t **node_p,
-                            svn_fs_t *fs,
-                            svn_fs_x__txn_id_t txn_id,
-                            apr_pool_t *result_pool,
-                            apr_pool_t *scratch_pool);
-
-
-/* Clone the root directory of TXN_ID in FS, and update the
-   `transactions' table entry to point to it, unless this has been
-   done already.  In either case, set *ROOT_P to a reference to the
-   root directory clone.  Allocate *ROOT_P in RESULT_POOL.  */
-svn_error_t *
-svn_fs_x__dag_clone_root(dag_node_t **root_p,
-                         svn_fs_t *fs,
-                         svn_fs_x__txn_id_t txn_id,
-                         apr_pool_t *result_pool);
-
+                       apr_pool_t *result_pool,
+                       apr_pool_t *scratch_pool);
 
 
 /* Directories.  */

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.c (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.c Wed Feb  4 
17:22:29 2015
@@ -216,6 +216,23 @@ x_info(const void **fsx_info,
   return SVN_NO_ERROR;
 }
 
+/* Wrapper around svn_fs_x__revision_prop() adapting between function
+   signatures. */
+static svn_error_t *
+x_revision_prop(svn_string_t **value_p,
+                svn_fs_t *fs,
+                svn_revnum_t rev,
+                const char *propname,
+                apr_pool_t *pool)
+{
+  apr_pool_t *scratch_pool = svn_pool_create(pool);
+  SVN_ERR(svn_fs_x__revision_prop(value_p, fs, rev, propname, pool,
+                                  scratch_pool));
+  svn_pool_destroy(scratch_pool);
+
+  return SVN_NO_ERROR;
+}
+
 /* Wrapper around svn_fs_x__get_revision_proplist() adapting between function
    signatures. */
 static svn_error_t *
@@ -224,9 +241,14 @@ x_revision_proplist(apr_hash_t **proplis
                     svn_revnum_t rev,
                     apr_pool_t *pool)
 {
+  apr_pool_t *scratch_pool = svn_pool_create(pool);
+
   /* No need to bypass the caches for r/o access to revprops. */
-  return svn_error_trace(svn_fs_x__get_revision_proplist(proplist_p, fs,
-                                                         rev, FALSE, pool));
+  SVN_ERR(svn_fs_x__get_revision_proplist(proplist_p, fs, rev, FALSE,
+                                          pool, scratch_pool));
+  svn_pool_destroy(scratch_pool);
+
+  return SVN_NO_ERROR;
 }
 
 /* Wrapper around svn_fs_x__set_uuid() adapting between function
@@ -261,7 +283,7 @@ x_begin_txn(svn_fs_txn_t **txn_p,
 /* The vtable associated with a specific open filesystem. */
 static fs_vtable_t fs_vtable = {
   svn_fs_x__youngest_rev,
-  svn_fs_x__revision_prop,
+  x_revision_prop,
   x_revision_proplist,
   svn_fs_x__change_rev_prop,
   x_set_uuid,

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.h?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs.h Wed Feb  4 
17:22:29 2015
@@ -517,9 +517,6 @@ typedef struct svn_fs_x__noderev_t
   /* path at which this node first came into existence.  */
   const char *created_path;
 
-  /* is this the unmodified root of a transaction? */
-  svn_boolean_t is_fresh_txn_root;
-
   /* Does this node itself have svn:mergeinfo? */
   svn_boolean_t has_mergeinfo;
 

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.c Wed Feb  
4 17:22:29 2015
@@ -690,17 +690,6 @@ svn_fs_x__ensure_revision_exists(svn_rev
                            _("No such revision %ld"), rev);
 }
 
-svn_error_t *
-svn_fs_x__revision_proplist(apr_hash_t **proplist_p,
-                            svn_fs_t *fs,
-                            svn_revnum_t rev,
-                            apr_pool_t *pool)
-{
-  SVN_ERR(svn_fs_x__get_revision_proplist(proplist_p, fs, rev, FALSE, pool));
-
-  return SVN_NO_ERROR;
-}
-
 
 svn_error_t *
 svn_fs_x__file_length(svn_filesize_t *length,
@@ -1108,17 +1097,19 @@ svn_fs_x__ensure_dir_exists(const char *
 
 svn_error_t *
 svn_fs_x__revision_prop(svn_string_t **value_p,
-                         svn_fs_t *fs,
-                         svn_revnum_t rev,
-                         const char *propname,
-                         apr_pool_t *pool)
+                        svn_fs_t *fs,
+                        svn_revnum_t rev,
+                        const char *propname,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
 {
   apr_hash_t *table;
 
   SVN_ERR(svn_fs__check_fs(fs, TRUE));
-  SVN_ERR(svn_fs_x__revision_proplist(&table, fs, rev, pool));
+  SVN_ERR(svn_fs_x__get_revision_proplist(&table, fs, rev, FALSE,
+                                          scratch_pool, scratch_pool));
 
-  *value_p = svn_hash_gets(table, propname);
+  *value_p = svn_string_dup(svn_hash_gets(table, propname), result_pool);
 
   return SVN_NO_ERROR;
 }
@@ -1143,7 +1134,11 @@ change_rev_prop_body(void *baton,
   change_rev_prop_baton_t *cb = baton;
   apr_hash_t *table;
 
-  SVN_ERR(svn_fs_x__revision_proplist(&table, cb->fs, cb->rev, scratch_pool));
+  /* Read current revprop values from disk (never from cache).
+     Even if somehow the cache got out of sync, we want to make sure that
+     we read, update and write up-to-date data. */
+  SVN_ERR(svn_fs_x__get_revision_proplist(&table, cb->fs, cb->rev, TRUE,
+                                          scratch_pool, scratch_pool));
 
   if (cb->old_value_p)
     {

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.h?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/fs_x.h Wed Feb  
4 17:22:29 2015
@@ -69,15 +69,6 @@ svn_fs_x__ensure_revision_exists(svn_rev
                                  svn_fs_t *fs,
                                  apr_pool_t *scratch_pool);
 
-/* Set *PROPLIST to be an apr_hash_t containing the property list of
-   revision REV as seen in filesystem FS.  Use POOL for temporary
-   allocations. */
-svn_error_t *
-svn_fs_x__revision_proplist(apr_hash_t **proplist,
-                            svn_fs_t *fs,
-                            svn_revnum_t rev,
-                            apr_pool_t *pool);
-
 /* Set *LENGTH to the be fulltext length of the node revision
    specified by NODEREV. */
 svn_error_t *
@@ -167,15 +158,16 @@ svn_fs_x__write_format(svn_fs_t *fs,
                        svn_boolean_t overwrite,
                        apr_pool_t *scratch_pool);
 
-/* Find the value of the property named PROPNAME in transaction TXN.
-   Return the contents in *VALUE_P.  The contents will be allocated
-   from POOL. */
+/* Find the value of the property named PROPNAME in transaction REV.
+   Return the contents in *VALUE_P, allocated from RESULT_POOL.
+   Use SCRATCH_POOL for temporary allocations. */
 svn_error_t *
 svn_fs_x__revision_prop(svn_string_t **value_p,
                         svn_fs_t *fs,
                         svn_revnum_t rev,
                         const char *propname,
-                        apr_pool_t *pool);
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool);
 
 /* Change, add, or delete a property on a revision REV in filesystem
    FS.  NAME gives the name of the property, and value, if non-NULL,

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/low_level.c Wed 
Feb  4 17:22:29 2015
@@ -48,7 +48,6 @@
 #define HEADER_PRED        "pred"
 #define HEADER_COPYFROM    "copyfrom"
 #define HEADER_COPYROOT    "copyroot"
-#define HEADER_FRESHTXNRT  "is-fresh-txn-root"
 #define HEADER_MINFO_HERE  "minfo-here"
 #define HEADER_MINFO_CNT   "minfo-cnt"
 
@@ -560,10 +559,6 @@ svn_fs_x__read_noderev(svn_fs_x__noderev
                                                   result_pool);
     }
 
-  /* Get whether this is a fresh txn root. */
-  value = svn_hash_gets(headers, HEADER_FRESHTXNRT);
-  noderev->is_fresh_txn_root = (value != NULL);
-
   /* Get the mergeinfo count. */
   value = svn_hash_gets(headers, HEADER_MINFO_CNT);
   if (value)
@@ -691,9 +686,6 @@ svn_fs_x__write_noderev(svn_stream_t *ou
                               auto_escape_path(noderev->copyroot_path,
                                                scratch_pool)));
 
-  if (noderev->is_fresh_txn_root)
-    SVN_ERR(svn_stream_puts(outfile, HEADER_FRESHTXNRT ": y\n"));
-
   if (noderev->mergeinfo_count > 0)
     SVN_ERR(svn_stream_printf(outfile, scratch_pool, HEADER_MINFO_CNT ": %"
                               APR_INT64_T_FMT "\n",

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/noderevs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/noderevs.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/noderevs.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/noderevs.c Wed 
Feb  4 17:22:29 2015
@@ -49,28 +49,6 @@
 /* the noderev has copy-root path and revision */
 #define NODEREV_HAS_CPATH    0x00040
 
-/* Our internal representation of an representation.
- */
-typedef struct binary_representation_t
-{
-  /* Checksums digests for the contents produced by this representation.
-     If has_sha1 is FALSE, sha1_digest is not being used. */
-  svn_boolean_t has_sha1;
-  unsigned char sha1_digest[APR_SHA1_DIGESTSIZE];
-  unsigned char md5_digest[APR_MD5_DIGESTSIZE];
-
-  /* Location of this representation. */
-  svn_fs_x__id_t id;
-
-  /* The size of the representation in bytes as seen in the revision
-     file. */
-  svn_filesize_t size;
-
-  /* The size of the fulltext of the representation. If this is 0,
-   * the fulltext size is equal to representation size in the rev file, */
-  svn_filesize_t expanded_size;
-} binary_representation_t;
-
 /* Our internal representation of a svn_fs_x__noderev_t.
  * 
  * We will store path strings in a string container and reference them
@@ -181,7 +159,7 @@ svn_fs_x__noderevs_create(int initial_co
     = apr_array_make(result_pool, 2 * initial_count, sizeof(svn_fs_x__id_t));
   noderevs->reps
     = apr_array_make(result_pool, 2 * initial_count,
-                     sizeof(binary_representation_t));
+                     sizeof(svn_fs_x__representation_t));
   noderevs->noderevs
     = apr_array_make(result_pool, initial_count, sizeof(binary_noderev_t));
 
@@ -223,25 +201,17 @@ store_representation(apr_array_header_t
                      apr_hash_t *dict,
                      const svn_fs_x__representation_t *rep)
 {
-  binary_representation_t binary_rep = { 0 };
   int idx;
   void *idx_void;
 
   if (rep == NULL)
     return 0;
 
-  binary_rep.has_sha1 = rep->has_sha1;
-  memcpy(binary_rep.sha1_digest, rep->sha1_digest, sizeof(rep->sha1_digest));
-  memcpy(binary_rep.md5_digest, rep->md5_digest, sizeof(rep->md5_digest));
-  binary_rep.id = rep->id;
-  binary_rep.size = rep->size;
-  binary_rep.expanded_size = rep->expanded_size;
-
-  idx_void = apr_hash_get(dict, &binary_rep, sizeof(binary_rep));
+  idx_void = apr_hash_get(dict, rep, sizeof(*rep));
   idx = (int)(apr_uintptr_t)idx_void;
   if (idx == 0)
     {
-      APR_ARRAY_PUSH(reps, binary_representation_t) = binary_rep;
+      APR_ARRAY_PUSH(reps, svn_fs_x__representation_t) = *rep;
       idx = reps->nelts;
       apr_hash_set(dict, reps->elts + (idx-1) * reps->elt_size,
                    reps->elt_size, (void*)(apr_uintptr_t)idx);
@@ -365,8 +335,6 @@ get_representation(svn_fs_x__representat
                    int idx,
                    apr_pool_t *pool)
 {
-  binary_representation_t *binary_rep;
-
   /* handle NULL representations  */
   if (idx == 0)
     {
@@ -382,17 +350,9 @@ get_representation(svn_fs_x__representat
                              idx, reps->nelts);
 
   /* no translation required. Just duplicate the info */
-  binary_rep = &APR_ARRAY_IDX(reps, idx - 1, binary_representation_t);
-
-  *rep = apr_pcalloc(pool, sizeof(**rep));
-  (*rep)->has_sha1 = binary_rep->has_sha1;
-  memcpy((*rep)->sha1_digest, binary_rep->sha1_digest,
-         sizeof((*rep)->sha1_digest));
-  memcpy((*rep)->md5_digest, binary_rep->md5_digest,
-         sizeof((*rep)->md5_digest));
-  (*rep)->id = binary_rep->id;
-  (*rep)->size = binary_rep->size;
-  (*rep)->expanded_size = binary_rep->expanded_size;
+  *rep = apr_pmemdup(pool,
+                     &APR_ARRAY_IDX(reps, idx - 1, svn_fs_x__representation_t),
+                     sizeof(**rep));
 
   return SVN_NO_ERROR;
 }
@@ -517,8 +477,8 @@ write_reps(svn_packed__int_stream_t *rep
   int i;
   for (i = 0; i < reps->nelts; ++i)
     {
-      binary_representation_t *rep
-        = &APR_ARRAY_IDX(reps, i, binary_representation_t);
+      svn_fs_x__representation_t *rep
+        = &APR_ARRAY_IDX(reps, i, svn_fs_x__representation_t);
 
       svn_packed__add_uint(rep_stream, rep->has_sha1);
 
@@ -635,11 +595,11 @@ read_reps(apr_array_header_t **reps_p,
   apr_size_t count
     = svn_packed__int_count(svn_packed__first_int_substream(rep_stream));
   apr_array_header_t *reps
-    = apr_array_make(pool, (int)count, sizeof(binary_representation_t));
+    = apr_array_make(pool, (int)count, sizeof(svn_fs_x__representation_t));
 
   for (i = 0; i < count; ++i)
     {
-      binary_representation_t rep;
+      svn_fs_x__representation_t rep;
 
       rep.has_sha1 = (svn_boolean_t)svn_packed__get_uint(rep_stream);
 
@@ -674,7 +634,7 @@ read_reps(apr_array_header_t **reps_p,
           memcpy(rep.sha1_digest, bytes, sizeof(rep.sha1_digest));
         }
 
-      APR_ARRAY_PUSH(reps, binary_representation_t) = rep;
+      APR_ARRAY_PUSH(reps, svn_fs_x__representation_t) = rep;
     }
 
   *reps_p = reps;

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.c Wed 
Feb  4 17:22:29 2015
@@ -698,17 +698,18 @@ parse_revprop(apr_hash_t **properties,
  * If the data could not be read due to an otherwise recoverable error,
  * leave *PROPERTIES unchanged. No error will be returned in that case.
  *
- * Allocations will be done in POOL.
+ * Allocate *PROPERTIES in RESULT_POOL and temporaries in SCRATCH_POOL.
  */
 static svn_error_t *
 read_non_packed_revprop(apr_hash_t **properties,
                         svn_fs_t *fs,
                         svn_revnum_t rev,
                         apr_int64_t generation,
-                        apr_pool_t *pool)
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
 {
   svn_stringbuf_t *content = NULL;
-  apr_pool_t *iterpool = svn_pool_create(pool);
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   svn_boolean_t missing = FALSE;
   int i;
 
@@ -727,7 +728,7 @@ read_non_packed_revprop(apr_hash_t **pro
   if (content)
     SVN_ERR(parse_revprop(properties, fs, rev, generation,
                           svn_stringbuf__morph_into_string(content),
-                          pool, iterpool));
+                          result_pool, iterpool));
 
   svn_pool_clear(iterpool);
 
@@ -888,6 +889,7 @@ parse_packed_revprops(svn_fs_t *fs,
   apr_off_t offset;
   const char *header_end;
   apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+  svn_boolean_t cache_all = has_revprop_cache(fs, scratch_pool);
 
   /* decompress (even if the data is only "stored", there is still a
    * length header to remove) */
@@ -968,15 +970,24 @@ parse_packed_revprops(svn_fs_t *fs,
 
       if (revision == revprops->revision)
         {
+          /* Parse (and possibly cache) the one revprop list we care about. */
           SVN_ERR(parse_revprop(&revprops->properties, fs, revision,
                                 revprops->generation, &serialized,
                                 result_pool, iterpool));
           revprops->serialized_size = serialized.len;
 
           /* If we only wanted the revprops for REVISION then we are done. */
-          if (!read_all)
+          if (!read_all && !cache_all)
             break;
         }
+      else if (cache_all)
+        {
+          /* Parse and cache all other revprop lists. */
+          apr_hash_t *properties;
+          SVN_ERR(parse_revprop(&properties, fs, revision,
+                                revprops->generation, &serialized,
+                                iterpool, iterpool));
+        }
 
       if (read_all)
         {
@@ -996,7 +1007,8 @@ parse_packed_revprops(svn_fs_t *fs,
  * *REVPROPS.  Use GENERATION to populate the revprop cache, if enabled.
  * If you want to modify revprop contents / update REVPROPS, READ_ALL
  * must be set.  Otherwise, only the properties of REV are being provided.
- * Allocate data in POOL.
+ *
+ * Allocate *PROPERTIES in RESULT_POOL and temporaries in SCRATCH_POOL.
  */
 static svn_error_t *
 read_pack_revprop(packed_revprops_t **revprops,
@@ -1004,9 +1016,10 @@ read_pack_revprop(packed_revprops_t **re
                   svn_revnum_t rev,
                   apr_int64_t generation,
                   svn_boolean_t read_all,
-                  apr_pool_t *pool)
+                  apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool)
 {
-  apr_pool_t *iterpool = svn_pool_create(pool);
+  apr_pool_t *iterpool = svn_pool_create(scratch_pool);
   svn_boolean_t missing = FALSE;
   svn_error_t *err;
   packed_revprops_t *result;
@@ -1021,7 +1034,7 @@ read_pack_revprop(packed_revprops_t **re
                               _("No such packed revision %ld"), rev);
 
   /* initialize the result data structure */
-  result = apr_pcalloc(pool, sizeof(*result));
+  result = apr_pcalloc(result_pool, sizeof(*result));
   result->revision = rev;
   result->generation = generation;
 
@@ -1037,7 +1050,7 @@ read_pack_revprop(packed_revprops_t **re
       /* there might have been concurrent writes.
        * Re-read the manifest and the pack file.
        */
-      SVN_ERR(get_revprop_packname(fs, result, pool, iterpool));
+      SVN_ERR(get_revprop_packname(fs, result, result_pool, iterpool));
       file_path  = svn_dirent_join(result->folder,
                                    result->filename,
                                    iterpool);
@@ -1045,15 +1058,15 @@ read_pack_revprop(packed_revprops_t **re
                                 &missing,
                                 file_path,
                                 i + 1 < SVN_FS_X__RECOVERABLE_RETRY_COUNT,
-                                pool));
+                                result_pool));
 
       /* If we could not find the file, there was a write.
        * So, we should refresh our revprop generation info as well such
        * that others may find data we will put into the cache.  They would
        * consider it outdated, otherwise.
        */
-      if (missing && has_revprop_cache(fs, pool))
-        SVN_ERR(read_revprop_generation(&result->generation, fs, pool));
+      if (missing && has_revprop_cache(fs, iterpool))
+        SVN_ERR(read_revprop_generation(&result->generation, fs, iterpool));
     }
 
   /* the file content should be available now */
@@ -1062,7 +1075,7 @@ read_pack_revprop(packed_revprops_t **re
                   _("Failed to read revprop pack file for r%ld"), rev);
 
   /* parse it. RESULT will be complete afterwards. */
-  err = parse_packed_revprops(fs, result, read_all, pool, iterpool);
+  err = parse_packed_revprops(fs, result, read_all, result_pool, iterpool);
   svn_pool_destroy(iterpool);
   if (err)
     return svn_error_createf(SVN_ERR_FS_CORRUPT, err,
@@ -1082,7 +1095,8 @@ svn_fs_x__get_revision_proplist(apr_hash
                                 svn_fs_t *fs,
                                 svn_revnum_t rev,
                                 svn_boolean_t bypass_cache,
-                                apr_pool_t *pool)
+                                apr_pool_t *result_pool,
+                                apr_pool_t *scratch_pool)
 {
   svn_fs_x__data_t *ffd = fs->fsap_data;
   apr_int64_t generation = 0;
@@ -1091,20 +1105,20 @@ svn_fs_x__get_revision_proplist(apr_hash
   *proplist_p = NULL;
 
   /* should they be available at all? */
-  SVN_ERR(svn_fs_x__ensure_revision_exists(rev, fs, pool));
+  SVN_ERR(svn_fs_x__ensure_revision_exists(rev, fs, scratch_pool));
 
   /* Try cache lookup first. */
-  if (!bypass_cache && has_revprop_cache(fs, pool))
+  if (!bypass_cache && has_revprop_cache(fs, scratch_pool))
     {
       svn_boolean_t is_cached;
       svn_fs_x__pair_cache_key_t key = { 0 };
 
-      SVN_ERR(read_revprop_generation(&generation, fs, pool));
+      SVN_ERR(read_revprop_generation(&generation, fs, scratch_pool));
 
       key.revision = rev;
       key.second = generation;
       SVN_ERR(svn_cache__get((void **) proplist_p, &is_cached,
-                             ffd->revprop_cache, &key, pool));
+                             ffd->revprop_cache, &key, result_pool));
       if (is_cached)
         return SVN_NO_ERROR;
     }
@@ -1115,7 +1129,8 @@ svn_fs_x__get_revision_proplist(apr_hash
   if (!svn_fs_x__is_packed_revprop(fs, rev))
     {
       svn_error_t *err = read_non_packed_revprop(proplist_p, fs, rev,
-                                                 generation, pool);
+                                                 generation, result_pool,
+                                                 scratch_pool);
       if (err)
         {
           if (!APR_STATUS_IS_ENOENT(err->apr_err))
@@ -1132,7 +1147,8 @@ svn_fs_x__get_revision_proplist(apr_hash
   if (!*proplist_p)
     {
       packed_revprops_t *revprops;
-      SVN_ERR(read_pack_revprop(&revprops, fs, rev, generation, FALSE, pool));
+      SVN_ERR(read_pack_revprop(&revprops, fs, rev, generation, FALSE,
+                                result_pool, scratch_pool));
       *proplist_p = revprops->properties;
     }
 
@@ -1430,7 +1446,8 @@ write_packed_revprop(const char **final_
     SVN_ERR(read_revprop_generation(&generation, fs, pool));
 
   /* read contents of the current pack file */
-  SVN_ERR(read_pack_revprop(&revprops, fs, rev, generation, TRUE, pool));
+  SVN_ERR(read_pack_revprop(&revprops, fs, rev, generation, TRUE, pool,
+                            pool));
 
   /* serialize the new revprops */
   serialized = svn_stringbuf_create_empty(pool);

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.h?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/revprops.h Wed 
Feb  4 17:22:29 2015
@@ -75,17 +75,19 @@ svn_fs_x__upgrade_cleanup_pack_revprops(
                                         void *cancel_baton,
                                         apr_pool_t *scratch_pool);
 
-/* Read the revprops for revision REV in FS and return them in *PROPERTIES_P.
+/* Read the revprops for revision REV in FS and return them in *PROPLIST_P.
  * If BYPASS_CACHE is set, don't consult the disks but always read from disk.
  *
- * Allocations will be done in POOL.
+ * Allocate the *PROPLIST_P in RESULT_POOL and use SCRATCH_POOL for temporary
+ * allocations.
  */
 svn_error_t *
 svn_fs_x__get_revision_proplist(apr_hash_t **proplist_p,
                                 svn_fs_t *fs,
                                 svn_revnum_t rev,
                                 svn_boolean_t bypass_cache,
-                                apr_pool_t *pool);
+                                apr_pool_t *result_pool,
+                                apr_pool_t *scratch_pool);
 
 /* Set the revision property list of revision REV in filesystem FS to
    PROPLIST.  Use SCRATCH_POOL for temporary allocations. */

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.c 
Wed Feb  4 17:22:29 2015
@@ -758,17 +758,39 @@ purge_shared_txn(svn_fs_t *fs,
 }
 
 
+svn_boolean_t
+svn_fs_x__is_fresh_txn_root(svn_fs_x__noderev_t *noderev)
+{
+  /* Is it a root node? */
+  if (noderev->noderev_id.number != SVN_FS_X__ITEM_INDEX_ROOT_NODE)
+    return FALSE;
+
+  /* ... in a transaction? */
+  if (!svn_fs_x__is_txn(noderev->noderev_id.change_set))
+    return FALSE;
+
+  /* ... with no prop change in that txn?
+     (Once we set a property, the prop rep will never become NULL again.) */
+  if (noderev->prop_rep && svn_fs_x__is_txn(noderev->prop_rep->id.change_set))
+    return FALSE;
+
+  /* ... and no sub-tree change?
+     (Once we set a text, the data rep will never become NULL again.) */
+  if (noderev->data_rep && svn_fs_x__is_txn(noderev->data_rep->id.change_set))
+    return FALSE;
+
+  /* Root node of a txn with no changes. */
+  return TRUE;
+}
+
 svn_error_t *
 svn_fs_x__put_node_revision(svn_fs_t *fs,
                             svn_fs_x__noderev_t *noderev,
-                            svn_boolean_t fresh_txn_root,
                             apr_pool_t *scratch_pool)
 {
   apr_file_t *noderev_file;
   const svn_fs_x__id_t *id = &noderev->noderev_id;
 
-  noderev->is_fresh_txn_root = fresh_txn_root;
-
   if (! svn_fs_x__is_txn(id->change_set))
     return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
                              _("Attempted to write to non-transaction '%s'"),
@@ -1167,7 +1189,7 @@ create_new_txn_noderev_from_rev(svn_fs_t
   /* For the transaction root, the copyroot never changes. */
   svn_fs_x__init_txn_root(&noderev->noderev_id, txn_id);
 
-  return svn_fs_x__put_node_revision(fs, noderev, TRUE, scratch_pool);
+  return svn_fs_x__put_node_revision(fs, noderev, scratch_pool);
 }
 
 /* A structure used by get_and_increment_txn_key_body(). */
@@ -1650,7 +1672,7 @@ svn_fs_x__create_node(svn_fs_t *fs,
   SVN_ERR(allocate_item_index(&noderev->noderev_id.number, fs, txn_id,
                               scratch_pool));
 
-  SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, FALSE, scratch_pool));
+  SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -1746,8 +1768,7 @@ svn_fs_x__set_entry(svn_fs_t *fs,
       rep->id.number = SVN_FS_X__ITEM_INDEX_UNUSED;
 
       /* Save noderev to disk. */
-      SVN_ERR(svn_fs_x__put_node_revision(fs, parent_noderev, FALSE,
-                                          subpool));
+      SVN_ERR(svn_fs_x__put_node_revision(fs, parent_noderev, subpool));
     }
   else
     {
@@ -2390,8 +2411,7 @@ rep_write_contents_close(void *baton)
   apr_pool_cleanup_kill(b->local_pool, b, rep_write_cleanup);
 
   /* Write out the new node-rev information. */
-  SVN_ERR(svn_fs_x__put_node_revision(b->fs, b->noderev, FALSE,
-                                      b->local_pool));
+  SVN_ERR(svn_fs_x__put_node_revision(b->fs, b->noderev, b->local_pool));
   if (!old_rep)
     {
       svn_fs_x__p2l_entry_t entry;
@@ -2478,7 +2498,7 @@ svn_fs_x__create_successor(svn_fs_t *fs,
         = svn_fs_x__get_revnum(new_noderev->noderev_id.change_set);
     }
 
-  SVN_ERR(svn_fs_x__put_node_revision(fs, new_noderev, FALSE, scratch_pool));
+  SVN_ERR(svn_fs_x__put_node_revision(fs, new_noderev, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -2513,7 +2533,7 @@ svn_fs_x__set_proplist(svn_fs_t *fs,
       noderev->prop_rep->id.change_set = id->change_set;
       SVN_ERR(allocate_item_index(&noderev->prop_rep->id.number, fs,
                                   txn_id, scratch_pool));
-      SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, FALSE, scratch_pool));
+      SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, scratch_pool));
     }
 
   return SVN_NO_ERROR;
@@ -2983,9 +3003,6 @@ write_final_rev(svn_fs_x__id_t *new_id_p
   if (noderev->prop_rep)
     noderev->prop_rep->has_sha1 = FALSE;
 
-  /* Workaround issue #4031: is-fresh-txn-root in revision files. */
-  noderev->is_fresh_txn_root = FALSE;
-
   /* Write out our new node-revision. */
   if (at_root)
     SVN_ERR(validate_root_noderev(fs, noderev, rev, scratch_pool));

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.h?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.h 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/transaction.h 
Wed Feb  4 17:22:29 2015
@@ -73,13 +73,16 @@ svn_fs_x__with_all_locks(svn_fs_t *fs,
                          void *baton,
                          apr_pool_t *scratch_pool);
 
+/* Return TRUE, iff NODEREV is the root node of a transaction that has not
+   seen any modifications, yet. */
+svn_boolean_t
+svn_fs_x__is_fresh_txn_root(svn_fs_x__noderev_t *noderev);
+
 /* Store NODEREV as the node-revision in the transaction defined by NODEREV's
-   ID within FS, after setting its is_fresh_txn_root to FRESH_TXN_ROOT.  Do
-   any necessary temporary allocation in SCRATCH_POOL. */
+   ID within FS.  Do any necessary temporary allocation in SCRATCH_POOL. */
 svn_error_t *
 svn_fs_x__put_node_revision(svn_fs_t *fs,
                             svn_fs_x__noderev_t *noderev,
-                            svn_boolean_t fresh_txn_root,
                             apr_pool_t *scratch_pool);
 
 /* Find the paths which were changed in transaction TXN_ID of

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/tree.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/tree.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/tree.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/tree.c Wed Feb  
4 17:22:29 2015
@@ -564,42 +564,45 @@ root_txn_id(svn_fs_root_t *root)
 }
 
 /* Set *NODE_P to a freshly opened dag node referring to the root
-   directory of ROOT, allocating from RESULT_POOL.  */
+   directory of ROOT, allocating from RESULT_POOL.  Use SCRATCH_POOL
+   for temporary allocations.  */
 static svn_error_t *
 root_node(dag_node_t **node_p,
           svn_fs_root_t *root,
-          apr_pool_t *result_pool)
+          apr_pool_t *result_pool,
+          apr_pool_t *scratch_pool)
 {
   if (root->is_txn_root)
     {
       /* It's a transaction root.  Open a fresh copy.  */
       return svn_fs_x__dag_txn_root(node_p, root->fs, root_txn_id(root),
-                                    result_pool);
+                                    result_pool, scratch_pool);
     }
   else
     {
       /* It's a revision root, so we already have its root directory
          opened.  */
       return svn_fs_x__dag_revision_root(node_p, root->fs, root->rev,
-                                         result_pool);
+                                         result_pool, scratch_pool);
     }
 }
 
 
 /* Set *NODE_P to a mutable root directory for ROOT, cloning if
    necessary, allocating in RESULT_POOL.  ROOT must be a transaction root.
-   Use ERROR_PATH in error messages.  */
+   Use ERROR_PATH in error messages.  Use SCRATCH_POOL for temporaries.*/
 static svn_error_t *
 mutable_root_node(dag_node_t **node_p,
                   svn_fs_root_t *root,
                   const char *error_path,
-                  apr_pool_t *result_pool)
+                  apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool)
 {
   if (root->is_txn_root)
     {
       /* It's a transaction root.  Open a fresh copy.  */
-      return svn_fs_x__dag_clone_root(node_p, root->fs, root_txn_id(root),
-                                      result_pool);
+      return svn_fs_x__dag_txn_root(node_p, root->fs, root_txn_id(root),
+                                    result_pool, scratch_pool);
     }
   else
     /* If it's not a transaction root, we can't change its contents.  */
@@ -969,7 +972,7 @@ open_path(parent_path_t **parent_path_p,
     {
       /* Make a parent_path item for the root node, using its own current
          copy id.  */
-      SVN_ERR(root_node(&here, root, pool));
+      SVN_ERR(root_node(&here, root, pool, iterpool));
       rest = path + 1; /* skip the leading '/', it saves in iteration */
     }
 
@@ -990,6 +993,10 @@ open_path(parent_path_t **parent_path_p,
 
       svn_pool_clear(iterpool);
 
+      /* The NODE in PARENT_PATH always lives in POOL, i.e. it will
+       * survive the cleanup of ITERPOOL and the DAG cache.*/
+      here = parent_path->node;
+
       /* Parse out the next entry from the path.  */
       entry = svn_fs__next_entry_name(&next, rest, pool);
 
@@ -1083,10 +1090,6 @@ open_path(parent_path_t **parent_path_p,
                   apr_psprintf(iterpool, _("Failure opening '%s'"), path));
 
       rest = next;
-
-      /* The NODE in PARENT_PATH equals CHILD but lives in POOL, i.e.
-       * it will survive the cleanup of ITERPOOL.*/
-      here = parent_path->node;
     }
 
   svn_pool_destroy(iterpool);
@@ -1186,7 +1189,8 @@ make_path_mutable(svn_fs_root_t *root,
   else
     {
       /* We're trying to clone the root directory.  */
-      SVN_ERR(mutable_root_node(&clone, root, error_path, result_pool));
+      SVN_ERR(mutable_root_node(&clone, root, error_path, result_pool,
+                                scratch_pool));
     }
 
   /* Update the PARENT_PATH link to refer to the clone.  */
@@ -1698,9 +1702,9 @@ compare_dir_structure(svn_boolean_t *cha
 
           /* Modified but not copied / replaced or anything? */
           SVN_ERR(svn_fs_x__dag_get_node(&lhs_node, fs, &lhs_entry->id, 
-                                         iterpool));
+                                         iterpool, iterpool));
           SVN_ERR(svn_fs_x__dag_get_node(&rhs_node, fs, &rhs_entry->id, 
-                                         iterpool));
+                                         iterpool, iterpool));
           SVN_ERR(svn_fs_x__dag_same_line_of_history(&same_history,
                                                      lhs_node, rhs_node));
           if (same_history)
@@ -1949,7 +1953,7 @@ merge(svn_stringbuf_t *conflict_p,
 
           dag_node_t *t_ent_node;
           SVN_ERR(svn_fs_x__dag_get_node(&t_ent_node, fs, &t_entry->id,
-                                         iterpool));
+                                         iterpool, iterpool));
           SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_start,
                                                     t_ent_node));
           mergeinfo_increment -= mergeinfo_start;
@@ -1958,7 +1962,7 @@ merge(svn_stringbuf_t *conflict_p,
             {
               dag_node_t *s_ent_node;
               SVN_ERR(svn_fs_x__dag_get_node(&s_ent_node, fs, &s_entry->id,
-                                             iterpool));
+                                             iterpool, iterpool));
 
               SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_end,
                                                         s_ent_node));
@@ -2007,11 +2011,11 @@ merge(svn_stringbuf_t *conflict_p,
 
           /* Fetch DAG nodes to efficiently access ID parts. */
           SVN_ERR(svn_fs_x__dag_get_node(&s_ent_node, fs, &s_entry->id,
-                                         iterpool));
+                                         iterpool, iterpool));
           SVN_ERR(svn_fs_x__dag_get_node(&t_ent_node, fs, &t_entry->id,
-                                         iterpool));
+                                         iterpool, iterpool));
           SVN_ERR(svn_fs_x__dag_get_node(&a_ent_node, fs, &a_entry->id,
-                                         iterpool));
+                                         iterpool, iterpool));
 
           /* If either SOURCE-ENTRY or TARGET-ENTRY is not a direct
              modification of ANCESTOR-ENTRY, declare a conflict. */
@@ -2063,7 +2067,7 @@ merge(svn_stringbuf_t *conflict_p,
                                              iterpool));
 
       SVN_ERR(svn_fs_x__dag_get_node(&s_ent_node, fs, &s_entry->id,
-                                     iterpool));
+                                     iterpool, iterpool));
       SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&mergeinfo_s, s_ent_node));
       mergeinfo_increment += mergeinfo_s;
 
@@ -2107,11 +2111,14 @@ merge_changes(dag_node_t *ancestor_node,
   svn_fs_x__txn_id_t txn_id = svn_fs_x__txn_get_id(txn);
   svn_boolean_t related;
   
-  SVN_ERR(svn_fs_x__dag_txn_root(&txn_root_node, fs, txn_id, scratch_pool));
+  SVN_ERR(svn_fs_x__dag_txn_root(&txn_root_node, fs, txn_id, scratch_pool,
+                                 scratch_pool));
 
   if (ancestor_node == NULL)
     {
-      SVN_ERR(svn_fs_x__dag_txn_base_root(&ancestor_node, fs, txn_id,
+      svn_revnum_t base_rev;
+      SVN_ERR(svn_fs_x__get_base_rev(&base_rev, fs, txn_id, scratch_pool));
+      SVN_ERR(svn_fs_x__dag_revision_root(&ancestor_node, fs, base_rev,
                                           scratch_pool, scratch_pool));
     }
 
@@ -3625,7 +3632,8 @@ history_prev(svn_fs_history_t **prev_his
 
           /* Replace NODE and friends with the information from its
              predecessor. */
-          SVN_ERR(svn_fs_x__dag_get_node(&node, fs, &pred_id, scratch_pool));
+          SVN_ERR(svn_fs_x__dag_get_node(&node, fs, &pred_id, scratch_pool,
+                                         scratch_pool));
           commit_path = svn_fs_x__dag_get_created_path(node);
           commit_rev = svn_fs_x__dag_get_revision(node);
         }
@@ -4351,7 +4359,8 @@ verify_node(dag_node_t *node,
     {
       dag_node_t *pred;
       int pred_pred_count;
-      SVN_ERR(svn_fs_x__dag_get_node(&pred, fs, &pred_id, iterpool));
+      SVN_ERR(svn_fs_x__dag_get_node(&pred, fs, &pred_id, iterpool,
+                                     iterpool));
       SVN_ERR(svn_fs_x__dag_get_predecessor_count(&pred_pred_count, pred));
       if (pred_pred_count+1 != pred_count)
         return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
@@ -4402,7 +4411,7 @@ verify_node(dag_node_t *node,
           if (svn_fs_x__get_revnum(dirent->id.change_set) == rev)
             {
               SVN_ERR(svn_fs_x__dag_get_node(&child, fs, &dirent->id,
-                                             iterpool));
+                                             iterpool, iterpool));
               SVN_ERR(verify_node(child, rev, parent_nodes, iterpool));
               SVN_ERR(svn_fs_x__dag_get_mergeinfo_count(&child_mergeinfo,
                                                         child));
@@ -4452,7 +4461,7 @@ svn_fs_x__verify_root(svn_fs_root_t *roo
      When this code is called in the library, we want to ensure we
      use the on-disk data --- rather than some data that was read
      in the possibly-distance past and cached since. */
-  SVN_ERR(root_node(&root_dir, root, scratch_pool));
+  SVN_ERR(root_node(&root_dir, root, scratch_pool, scratch_pool));
 
   /* Recursively verify ROOT_DIR. */
   parent_nodes = apr_array_make(scratch_pool, 16, sizeof(dag_node_t *));

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/verify.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/verify.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/verify.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_fs_x/verify.c Wed 
Feb  4 17:22:29 2015
@@ -713,7 +713,8 @@ verify_revprops(svn_fs_t *fs,
       /* Access the svn:date revprop.
        * This implies parsing all revprops for that revision. */
       SVN_ERR(svn_fs_x__revision_prop(&date, fs, revision,
-                                      SVN_PROP_REVISION_DATE, iterpool));
+                                      SVN_PROP_REVISION_DATE,
+                                      iterpool, iterpool));
 
       /* The time stamp is the only revprop that, if given, needs to
        * have a valid content. */

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/commit.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/commit.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/commit.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_ra_serf/commit.c Wed 
Feb  4 17:22:29 2015
@@ -1609,7 +1609,7 @@ change_dir_prop(void *dir_baton,
   prop = apr_palloc(dir->pool, sizeof(*prop));
 
   prop->name = apr_pstrdup(dir->pool, name);
-  prop->value = value ? svn_string_dup(value, dir->pool) : NULL;
+  prop->value = svn_string_dup(value, dir->pool);
 
   svn_hash_sets(dir->prop_changes, prop->name, prop);
 
@@ -1879,7 +1879,7 @@ change_file_prop(void *file_baton,
   prop = apr_palloc(file->pool, sizeof(*prop));
 
   prop->name = apr_pstrdup(file->pool, name);
-  prop->value = value ? svn_string_dup(value, file->pool) : NULL;
+  prop->value = svn_string_dup(value, file->pool);
 
   svn_hash_sets(file->prop_changes, prop->name, prop);
 

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_repos/log.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_repos/log.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_repos/log.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_repos/log.c Wed Feb  
4 17:22:29 2015
@@ -168,18 +168,23 @@ svn_repos_check_revision_access(svn_repo
  * AUTHZ_READ_BATON and FS) to check whether each changed-path (and
  * copyfrom_path) is readable:
  *
+ *     - If absolutely every changed-path (and copyfrom_path) is
+ *     readable, then return the full CHANGED hash, and set
+ *     *ACCESS_LEVEL to svn_repos_revision_access_full.
+ *
  *     - If some paths are readable and some are not, then silently
- *     omit the unreadable paths from the CHANGED hash, and return
- *     SVN_ERR_AUTHZ_PARTIALLY_READABLE.
+ *     omit the unreadable paths from the CHANGED hash, and set
+ *     *ACCESS_LEVEL to svn_repos_revision_access_partial.
  *
  *     - If absolutely every changed-path (and copyfrom_path) is
- *     unreadable, then return an empty CHANGED hash and
- *     SVN_ERR_AUTHZ_UNREADABLE.  (This is to distinguish a revision
- *     which truly has no changed paths from a revision in which all
- *     paths are unreadable.)
+ *     unreadable, then return an empty CHANGED hash, and set
+ *     *ACCESS_LEVEL to svn_repos_revision_access_none.  (This is
+ *     to distinguish a revision which truly has no changed paths
+ *     from a revision in which all paths are unreadable.)
  */
 static svn_error_t *
-detect_changed(apr_hash_t **changed,
+detect_changed(svn_repos_revision_access_level_t *access_level,
+               apr_hash_t **changed,
                svn_fs_root_t *root,
                svn_fs_t *fs,
                apr_hash_t *prefetched_changes,
@@ -213,9 +218,12 @@ detect_changed(apr_hash_t **changed,
     }
 
   if (apr_hash_count(changes) == 0)
-    /* No paths changed in this revision?  Uh, sure, I guess the
-       revision is readable, then.  */
-    return SVN_NO_ERROR;
+    {
+      /* No paths changed in this revision?  Uh, sure, I guess the
+         revision is readable, then.  */
+      *access_level = svn_repos_revision_access_full;
+      return SVN_NO_ERROR;
+    }
 
   iterpool = svn_pool_create(pool);
   for (hi = apr_hash_first(pool, changes); hi; hi = apr_hash_next(hi))
@@ -364,16 +372,21 @@ detect_changed(apr_hash_t **changed,
   svn_pool_destroy(iterpool);
 
   if (! found_readable)
-    /* Every changed-path was unreadable. */
-    return svn_error_create(SVN_ERR_AUTHZ_UNREADABLE,
-                            NULL, NULL);
-
-  if (found_unreadable)
-    /* At least one changed-path was unreadable. */
-    return svn_error_create(SVN_ERR_AUTHZ_PARTIALLY_READABLE,
-                            NULL, NULL);
+    {
+      /* Every changed-path was unreadable. */
+      *access_level = svn_repos_revision_access_none;
+    }
+  else if (found_unreadable)
+    {
+      /* At least one changed-path was unreadable. */
+      *access_level = svn_repos_revision_access_partial;
+    }
+  else
+    {
+      /* Every changed-path was readable. */
+      *access_level = svn_repos_revision_access_full;
+    }
 
-  /* Every changed-path was readable. */
   return SVN_NO_ERROR;
 }
 
@@ -1078,33 +1091,27 @@ fill_log_entry(svn_log_entry_t *log_entr
       && (authz_read_func || discover_changed_paths))
     {
       svn_fs_root_t *newroot;
-      svn_error_t *patherr;
+      svn_repos_revision_access_level_t access_level;
 
       SVN_ERR(svn_fs_revision_root(&newroot, fs, rev, pool));
-      patherr = detect_changed(&changed_paths,
-                               newroot, fs, prefetched_changes,
-                               authz_read_func, authz_read_baton,
-                               pool);
+      SVN_ERR(detect_changed(&access_level, &changed_paths,
+                             newroot, fs, prefetched_changes,
+                             authz_read_func, authz_read_baton,
+                             pool));
 
-      if (patherr
-          && patherr->apr_err == SVN_ERR_AUTHZ_UNREADABLE)
+      if (access_level == svn_repos_revision_access_none)
         {
           /* All changed-paths are unreadable, so clear all fields. */
-          svn_error_clear(patherr);
           changed_paths = NULL;
           get_revprops = FALSE;
         }
-      else if (patherr
-               && patherr->apr_err == SVN_ERR_AUTHZ_PARTIALLY_READABLE)
+      else if (access_level == svn_repos_revision_access_partial)
         {
           /* At least one changed-path was unreadable, so censor all
              but author and date.  (The unreadable paths are already
              missing from the hash.) */
-          svn_error_clear(patherr);
           censor_revprops = TRUE;
         }
-      else if (patherr)
-        return patherr;
 
       /* It may be the case that an authz func was passed in, but
          the user still doesn't want to see any changed-paths. */

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_repos/reporter.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_repos/reporter.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_repos/reporter.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_repos/reporter.c Wed 
Feb  4 17:22:29 2015
@@ -495,8 +495,8 @@ get_revision_info(report_baton_t *b,
       /* Create a result object */
       info = apr_palloc(b->pool, sizeof(*info));
       info->rev = rev;
-      info->date = cdate ? svn_string_dup(cdate, b->pool) : NULL;
-      info->author = author ? svn_string_dup(author, b->pool) : NULL;
+      info->date = svn_string_dup(cdate, b->pool);
+      info->author = svn_string_dup(author, b->pool);
 
       /* Cache it */
       apr_hash_set(b->revision_infos, &info->rev, sizeof(info->rev), info);

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_subr/string.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_subr/string.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_subr/string.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_subr/string.c Wed 
Feb  4 17:22:29 2015
@@ -301,8 +301,9 @@ svn_string_isempty(const svn_string_t *s
 svn_string_t *
 svn_string_dup(const svn_string_t *original_string, apr_pool_t *pool)
 {
-  return (svn_string_ncreate(original_string->data,
-                             original_string->len, pool));
+  return (original_string ? svn_string_ncreate(original_string->data,
+                                               original_string->len, pool)
+                          : NULL);
 }
 
 

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_wc/diff_editor.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_wc/diff_editor.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_wc/diff_editor.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_wc/diff_editor.c Wed 
Feb  4 17:22:29 2015
@@ -2192,7 +2192,7 @@ change_file_prop(void *file_baton,
 
   propchange = apr_array_push(fb->propchanges);
   propchange->name = apr_pstrdup(fb->pool, name);
-  propchange->value = value ? svn_string_dup(value, fb->pool) : NULL;
+  propchange->value = svn_string_dup(value, fb->pool);
 
   return SVN_NO_ERROR;
 }
@@ -2217,7 +2217,7 @@ change_dir_prop(void *dir_baton,
 
   propchange = apr_array_push(db->propchanges);
   propchange->name = apr_pstrdup(db->pool, name);
-  propchange->value = value ? svn_string_dup(value, db->pool) : NULL;
+  propchange->value = svn_string_dup(value, db->pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_wc/externals.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_wc/externals.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_wc/externals.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_wc/externals.c Wed 
Feb  4 17:22:29 2015
@@ -602,7 +602,7 @@ change_file_prop(void *file_baton,
 
   propchange = apr_array_push(eb->propchanges);
   propchange->name = apr_pstrdup(eb->pool, name);
-  propchange->value = value ? svn_string_dup(value, eb->pool) : NULL;
+  propchange->value = svn_string_dup(value, eb->pool);
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_wc/props.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_wc/props.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_wc/props.c Wed Feb  
4 17:22:29 2015
@@ -1272,7 +1272,7 @@ svn_wc__merge_props(svn_skel_t **conflic
 
       svn_pool_clear(iterpool);
 
-      to_val = to_val ? svn_string_dup(to_val, result_pool) : NULL;
+      to_val = svn_string_dup(to_val, result_pool);
 
       svn_hash_sets(their_props, propname, to_val);
 

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_wc/update_editor.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_wc/update_editor.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_wc/update_editor.c 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_wc/update_editor.c 
Wed Feb  4 17:22:29 2015
@@ -2489,7 +2489,7 @@ change_dir_prop(void *dir_baton,
 
   propchange = apr_array_push(db->propchanges);
   propchange->name = apr_pstrdup(db->pool, name);
-  propchange->value = value ? svn_string_dup(value, db->pool) : NULL;
+  propchange->value = svn_string_dup(value, db->pool);
 
   if (!db->edited && svn_property_kind2(name) == svn_prop_regular_kind)
     SVN_ERR(mark_directory_edited(db, pool));
@@ -3805,7 +3805,7 @@ change_file_prop(void *file_baton,
   /* Push a new propchange to the file baton's array of propchanges */
   propchange = apr_array_push(fb->propchanges);
   propchange->name = apr_pstrdup(fb->pool, name);
-  propchange->value = value ? svn_string_dup(value, fb->pool) : NULL;
+  propchange->value = svn_string_dup(value, fb->pool);
 
   if (!fb->edited && svn_property_kind2(name) == svn_prop_regular_kind)
     SVN_ERR(mark_file_edited(fb, scratch_pool));

Modified: 
subversion/branches/reuse-ra-session/subversion/libsvn_wc/wc-queries.sql
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_wc/wc-queries.sql?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_wc/wc-queries.sql 
(original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_wc/wc-queries.sql 
Wed Feb  4 17:22:29 2015
@@ -452,16 +452,12 @@ WHERE wc_id = ?1 AND local_relpath = ?2
 ORDER BY op_depth DESC
 
 -- STMT_SELECT_OP_DEPTH_MOVED_TO
-SELECT n.op_depth, n.moved_to, p.repos_path, p.revision
-FROM nodes p
-LEFT JOIN nodes n
-  ON p.wc_id=n.wc_id AND p.local_relpath = n.local_relpath
- AND  n.op_depth = (SELECT MIN(d.op_depth)
-                    FROM nodes d
-                    WHERE d.wc_id = ?1
-                      AND d.local_relpath = n.local_relpath
-                      AND d.op_depth > ?3)
-WHERE p.wc_id = ?1 AND p.local_relpath = ?2 AND p.op_depth = ?3
+SELECT op_depth, moved_to
+FROM nodes
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > ?3
+  AND EXISTS(SELECT * from nodes
+             WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3)
+ORDER BY op_depth ASC
 LIMIT 1
 
 -- STMT_SELECT_MOVED_TO

Modified: subversion/branches/reuse-ra-session/subversion/libsvn_wc/wc_db.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_wc/wc_db.c?rev=1657330&r1=1657329&r2=1657330&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/reuse-ra-session/subversion/libsvn_wc/wc_db.c Wed Feb  
4 17:22:29 2015
@@ -12518,7 +12518,7 @@ svn_wc__db_scan_moved(const char **moved
   return SVN_NO_ERROR;
 }
 
-/* ###
+/* ### Recursive helper for svn_wc__db_follow_moved_to()
  */
 static svn_error_t *
 follow_moved_to(svn_wc__db_wcroot_t *wcroot,
@@ -12530,11 +12530,13 @@ follow_moved_to(svn_wc__db_wcroot_t *wcr
 {
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t have_row;
-  int working_op_depth;
+  int shadowing_op_depth;
   const char *ancestor_relpath;
   const char *node_moved_to = NULL;
   int i;
 
+  /* Obtain the depth of the node directly shadowing local_relpath
+     as it exists at OP_DEPTH, and perhaps moved to info */
   SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                     STMT_SELECT_OP_DEPTH_MOVED_TO));
   SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, local_relpath,
@@ -12542,7 +12544,7 @@ follow_moved_to(svn_wc__db_wcroot_t *wcr
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
   if (have_row)
     {
-      working_op_depth = svn_sqlite__column_int(stmt, 0);
+      shadowing_op_depth = svn_sqlite__column_int(stmt, 0);
       node_moved_to = svn_sqlite__column_text(stmt, 1, result_pool);
 
       if (node_moved_to)
@@ -12550,7 +12552,7 @@ follow_moved_to(svn_wc__db_wcroot_t *wcr
           struct svn_wc__db_moved_to_t *moved_to;
 
           moved_to = apr_palloc(result_pool, sizeof(*moved_to));
-          moved_to->op_depth = working_op_depth;
+          moved_to->op_depth = shadowing_op_depth;
           moved_to->local_relpath = node_moved_to;
           APR_ARRAY_PUSH(*moved_tos, struct svn_wc__db_moved_to_t *) = 
moved_to;
         }
@@ -12559,16 +12561,18 @@ follow_moved_to(svn_wc__db_wcroot_t *wcr
   SVN_ERR(svn_sqlite__reset(stmt));
 
   if (!have_row)
-    return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                             _("The node '%s' was not found."),
-                             path_for_error_message(wcroot, local_relpath,
-                                                    scratch_pool));
+    {
+      /* Node is not shadowed, so not moved */
+      return SVN_NO_ERROR;
+    }
   else if (node_moved_to)
-    return SVN_NO_ERROR;
-
+    {
+      /* Moved directly, so we have the final location */
+      return SVN_NO_ERROR;
+    }
   /* Need to handle being moved via an ancestor. */
   ancestor_relpath = local_relpath;
-  for (i = relpath_depth(local_relpath); i > working_op_depth; --i)
+  for (i = relpath_depth(local_relpath); i > shadowing_op_depth; --i)
     {
       const char *ancestor_moved_to;
 
@@ -12577,7 +12581,7 @@ follow_moved_to(svn_wc__db_wcroot_t *wcr
       SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
                                         STMT_SELECT_MOVED_TO));
       SVN_ERR(svn_sqlite__bindf(stmt, "isd", wcroot->wc_id, ancestor_relpath,
-                                working_op_depth));
+                                shadowing_op_depth));
       SVN_ERR(svn_sqlite__step_row(stmt));
 
       ancestor_moved_to = svn_sqlite__column_text(stmt, 0, scratch_pool);
@@ -12593,7 +12597,7 @@ follow_moved_to(svn_wc__db_wcroot_t *wcr
                                  result_pool);
 
           moved_to = apr_palloc(result_pool, sizeof(*moved_to));
-          moved_to->op_depth = working_op_depth;
+          moved_to->op_depth = shadowing_op_depth;
           moved_to->local_relpath = node_moved_to;
           APR_ARRAY_PUSH(*moved_tos, struct svn_wc__db_moved_to_t *) = 
moved_to;
 


Reply via email to