You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/01/27 16:58:32 UTC

svn commit: r1655066 - in /subversion/branches/dump-load-cross-check: ./ build/ subversion/include/private/ subversion/libsvn_client/ subversion/libsvn_fs_base/ subversion/libsvn_fs_fs/ subversion/libsvn_repos/ subversion/libsvn_subr/ subversion/libsvn...

Author: julianfoad
Date: Tue Jan 27 15:58:31 2015
New Revision: 1655066

URL: http://svn.apache.org/r1655066
Log:
On the 'dump-load-cross-check' branch: catch up with trunk@1655065.

Modified:
    subversion/branches/dump-load-cross-check/   (props changed)
    subversion/branches/dump-load-cross-check/build/run_tests.py
    subversion/branches/dump-load-cross-check/subversion/include/private/svn_repos_private.h
    subversion/branches/dump-load-cross-check/subversion/libsvn_client/deprecated.c
    subversion/branches/dump-load-cross-check/subversion/libsvn_client/mergeinfo.c
    subversion/branches/dump-load-cross-check/subversion/libsvn_fs_base/dag.c
    subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/structure
    subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/transaction.c
    subversion/branches/dump-load-cross-check/subversion/libsvn_repos/dump.c
    subversion/branches/dump-load-cross-check/subversion/libsvn_subr/checksum.c
    subversion/branches/dump-load-cross-check/subversion/libsvn_subr/stream.c
    subversion/branches/dump-load-cross-check/subversion/libsvn_wc/conflicts.c
    subversion/branches/dump-load-cross-check/subversion/libsvn_wc/merge.c
    subversion/branches/dump-load-cross-check/subversion/libsvn_wc/wc_db_update_move.c
    subversion/branches/dump-load-cross-check/subversion/svndumpfilter/svndumpfilter.c
    subversion/branches/dump-load-cross-check/subversion/svnmucc/svnmucc.c
    subversion/branches/dump-load-cross-check/subversion/svnrdump/dump_editor.c
    subversion/branches/dump-load-cross-check/subversion/tests/cmdline/svntest/verify.py
    subversion/branches/dump-load-cross-check/subversion/tests/libsvn_diff/parse-diff-test.c
    subversion/branches/dump-load-cross-check/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
    subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/auth-test.c
    subversion/branches/dump-load-cross-check/subversion/tests/libsvn_wc/conflict-data-test.c
    subversion/branches/dump-load-cross-check/subversion/tests/libsvn_wc/op-depth-test.c

Propchange: subversion/branches/dump-load-cross-check/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 27 15:58:31 2015
@@ -85,3 +85,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
+/subversion/trunk:1654853-1655065

Modified: subversion/branches/dump-load-cross-check/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/build/run_tests.py?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/build/run_tests.py (original)
+++ subversion/branches/dump-load-cross-check/build/run_tests.py Tue Jan 27 15:58:31 2015
@@ -209,15 +209,12 @@ class TestHarness:
     self._open_log('w')
     failed = 0
 
-    # Only run the C tests when testing ra_local
+    # If asked to skip C tests, remove non-Python tests from the list
     if self.skip_c_tests:
-      filtered_list = []
-      for cnt, prog in enumerate(list):
+      def is_py_test(prog):
         progpath, nums = self._split_nums(prog)
-        if not progpath.endswith('.py'):
-          continue
-        filtered_list.append(prog)
-      list = filtered_list
+        return progpath.endswith('.py')
+      list = filter(is_py_test, list)
 
     for cnt, prog in enumerate(list):
       failed = self._run_test(prog, cnt, len(list)) or failed

Modified: subversion/branches/dump-load-cross-check/subversion/include/private/svn_repos_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/include/private/svn_repos_private.h?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/include/private/svn_repos_private.h (original)
+++ subversion/branches/dump-load-cross-check/subversion/include/private/svn_repos_private.h Tue Jan 27 15:58:31 2015
@@ -363,6 +363,34 @@ svn_repos__dump_revision_record(svn_stre
                                 svn_boolean_t props_section_always,
                                 apr_pool_t *scratch_pool);
 
+/* Output node headers and props.
+ *
+ * Output HEADERS, content length headers, blank line, and
+ * then PROPS_STR (if non-null) to DUMP_STREAM.
+ *
+ * HEADERS is an array of headers as struct {const char *key, *val;}.
+ * Write them all in the given order.
+ *
+ * PROPS_STR is the property content block, including a terminating
+ * 'PROPS_END\n' line. Iff PROPS_STR is non-null, write a
+ * Prop-content-length header and the prop content block.
+ *
+ * Iff HAS_TEXT is true, write a Text-content length, using the value
+ * TEXT_CONTENT_LENGTH.
+ *
+ * Write a Content-length header, its value being the sum of the
+ * Prop- and Text- content length headers, if props and/or text are present
+ * or if CONTENT_LENGTH_ALWAYS is true.
+ */
+svn_error_t *
+svn_repos__dump_node_record(svn_stream_t *dump_stream,
+                            apr_array_header_t *headers,
+                            svn_stringbuf_t *props_str,
+                            svn_boolean_t has_text,
+                            svn_filesize_t text_content_length,
+                            svn_boolean_t content_length_always,
+                            apr_pool_t *scratch_pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_client/deprecated.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_client/deprecated.c Tue Jan 27 15:58:31 2015
@@ -2862,7 +2862,7 @@ svn_client_uuid_from_url(const char **uu
   /* destroy the RA session */
   svn_pool_destroy(subpool);
 
-  return svn_error_trace(err);;
+  return svn_error_trace(err);
 }
 
 svn_error_t *

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_client/mergeinfo.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_client/mergeinfo.c Tue Jan 27 15:58:31 2015
@@ -2130,7 +2130,7 @@ svn_client__mergeinfo_log(svn_boolean_t
         svn_rangelist__initialize(youngest_range->end - 1,
                                   youngest_range->end,
                                   youngest_range->inheritable,
-                                  scratch_pool);;
+                                  scratch_pool);
 
       for (hi = apr_hash_first(scratch_pool, source_history);
            hi;

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_fs_base/dag.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_fs_base/dag.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_fs_base/dag.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_fs_base/dag.c Tue Jan 27 15:58:31 2015
@@ -1028,12 +1028,14 @@ svn_fs_base__dag_delete_if_mutable(svn_f
               void *val;
               svn_fs_dirent_t *dirent;
 
+              svn_pool_clear(subpool);
               apr_hash_this(hi, NULL, NULL, &val);
               dirent = val;
               SVN_ERR(svn_fs_base__dag_delete_if_mutable(fs, dirent->id,
                                                          txn_id, trail,
                                                          subpool));
             }
+          svn_pool_destroy(subpool);
         }
     }
 

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/fs_fs.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/fs_fs.c Tue Jan 27 15:58:31 2015
@@ -26,6 +26,7 @@
 
 #include "svn_private_config.h"
 
+#include "svn_checksum.h"
 #include "svn_hash.h"
 #include "svn_props.h"
 #include "svn_time.h"
@@ -1370,10 +1371,45 @@ svn_fs_fs__file_length(svn_filesize_t *l
                        node_revision_t *noderev,
                        apr_pool_t *pool)
 {
-  if (noderev->data_rep)
-    *length = noderev->data_rep->expanded_size;
+  representation_t *data_rep = noderev->data_rep;
+  if (!data_rep)
+    {
+      /* Treat "no representation" as "empty file". */
+      *length = 0;
+    }
+  else if (data_rep->expanded_size)
+    {
+      /* Standard case: a non-empty file. */
+      *length = data_rep->expanded_size;
+    }
   else
-    *length = 0;
+    {
+      /* Work around a FSFS format quirk (see issue #4554).
+
+         A plain representation may specify its EXPANDED LENGTH as "0"
+         in which case, the SIZE value is what we want.
+
+         Because EXPANDED_LENGTH will also be 0 for empty files, while
+         SIZE is non-null, we need to check wether the content is
+         actually empty.  We simply compare with the MD5 checksum of
+         empty content (sha-1 is not always available).
+       */
+      svn_checksum_t *empty_md5
+        = svn_checksum_empty_checksum(svn_checksum_md5, pool);
+
+      if (memcmp(empty_md5->digest, data_rep->md5_digest,
+                 sizeof(data_rep->md5_digest)))
+        {
+          /* Contents is not empty, i.e. EXPANDED_LENGTH cannot be the
+             actual file length. */
+          *length = data_rep->size;
+        }
+      else
+        {
+          /* Contents is empty. */
+          *length = 0;
+        }
+    }
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/structure
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/structure?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/structure (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/structure Tue Jan 27 15:58:31 2015
@@ -560,8 +560,7 @@ defined:
   props     "<rev> <item_index> <length> <size> <digest>" for props rep
             <rev> and <item_index> give location of rep
             <length> gives length of rep, sans header and trailer
-            <size> gives size of expanded rep; for props only, it may be 0
-             if equal to the length
+            <size> gives size of expanded rep (*)
             <digest> gives hex MD5 digest of expanded rep
             ### in formats >=4, also present:
             <sha1-digest> gives hex SHA1 digest of expanded rep
@@ -573,6 +572,15 @@ defined:
              which have svn:mergeinfo.
   minfo-here Exists if this node itself has svn:mergeinfo.
 
+(*) Earlier versions of this document would state that <size> may be 0
+    if the actual value matches <length>.  This is only true for property
+    and directory representations and should be avoided in general.  File
+    representations may not be handled correctly by SVN before 1.7.20,
+    1.8.12 and 1.9.0, if they have 0 <size> fields for non-empty contents.
+    Releases 1.8.0 through 1.8.11 may have falsely created instances of
+    that (see issue #4554).  Finally, 0 <size> fields are NEVER legal for
+    DELTA representations.
+
 The predecessor of a node-rev crosses both soft and true copies;
 together with the count field, it allows efficient determination of
 the base for skip-deltas.  The first node-rev of a node contains no

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/transaction.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_fs_fs/transaction.c Tue Jan 27 15:58:31 2015
@@ -2210,10 +2210,21 @@ get_shared_rep(representation_t **old_re
         }
     }
 
-  /* Add information that is missing in the cached data. */
-  if (*old_rep)
+  if (!*old_rep)
+    return SVN_NO_ERROR;
+
+  /* We don't want 0-length PLAIN representations to replace non-0-length
+     ones (see issue #4554).  Also, this doubles as a simple guard against
+     general rep-cache induced corruption. */
+  if (   ((*old_rep)->expanded_size != rep->expanded_size)
+      || ((*old_rep)->size != rep->size))
+    {
+      *old_rep = NULL;
+    }
+  else
     {
-      /* Use the old rep for this content. */
+      /* Add information that is missing in the cached data.
+         Use the old rep for this content. */
       memcpy((*old_rep)->md5_digest, rep->md5_digest, sizeof(rep->md5_digest));
       (*old_rep)->uniquifier = rep->uniquifier;
     }

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_repos/dump.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_repos/dump.c Tue Jan 27 15:58:31 2015
@@ -563,6 +563,50 @@ svn_repos__dump_revision_record(svn_stre
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_repos__dump_node_record(svn_stream_t *dump_stream,
+                            apr_array_header_t *headers,
+                            svn_stringbuf_t *props_str,
+                            svn_boolean_t has_text,
+                            svn_filesize_t text_content_length,
+                            svn_boolean_t content_length_always,
+                            apr_pool_t *scratch_pool)
+{
+  svn_filesize_t content_length = 0;
+
+  /* add content-length headers */
+  if (props_str)
+    {
+      svn_repos__dumpfile_header_pushf(
+        headers, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH,
+        "%" APR_SIZE_T_FMT, props_str->len);
+      content_length += props_str->len;
+    }
+  if (has_text)
+    {
+      svn_repos__dumpfile_header_pushf(
+        headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
+        "%" SVN_FILESIZE_T_FMT, text_content_length);
+      content_length += text_content_length;
+    }
+  if (content_length_always || props_str || has_text)
+    {
+      svn_repos__dumpfile_header_pushf(
+        headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
+        "%" SVN_FILESIZE_T_FMT, content_length);
+    }
+
+  /* write the headers */
+  SVN_ERR(svn_repos__dump_headers(dump_stream, headers, TRUE, scratch_pool));
+
+  /* write the props */
+  if (props_str)
+    {
+      SVN_ERR(svn_stream_write(dump_stream, props_str->data, &props_str->len));
+    }
+  return SVN_NO_ERROR;
+}
+
 /*----------------------------------------------------------------------*/
 
 /** An editor which dumps node-data in 'dumpfile format' to a file. **/
@@ -1002,7 +1046,6 @@ check_mergeinfo_normalization(const char
 static svn_error_t *
 dump_node_delete(svn_stream_t *stream,
                  const char *node_relpath,
-                 svn_node_kind_t kind,
                  apr_pool_t *pool)
 {
   apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
@@ -1011,14 +1054,6 @@ dump_node_delete(svn_stream_t *stream,
   svn_repos__dumpfile_header_push(
     headers, SVN_REPOS_DUMPFILE_NODE_PATH, node_relpath);
 
-  /* Node-kind: "file" | "dir" */
-  if (kind == svn_node_file)
-    svn_repos__dumpfile_header_push(
-      headers, SVN_REPOS_DUMPFILE_NODE_KIND, "file");
-  else if (kind == svn_node_dir)
-    svn_repos__dumpfile_header_push(
-      headers, SVN_REPOS_DUMPFILE_NODE_KIND, "dir");
-
   /* Node-action: delete */
   svn_repos__dumpfile_header_push(
     headers, SVN_REPOS_DUMPFILE_NODE_ACTION, "delete");
@@ -1050,7 +1085,6 @@ dump_node(struct edit_baton *eb,
           apr_pool_t *pool)
 {
   svn_stringbuf_t *propstring;
-  svn_filesize_t content_length = 0;
   apr_size_t len;
   svn_boolean_t must_dump_text = FALSE, must_dump_props = FALSE;
   const char *compare_path = path;
@@ -1058,6 +1092,7 @@ dump_node(struct edit_baton *eb,
   svn_fs_root_t *compare_root = NULL;
   apr_file_t *delta_file = NULL;
   apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
+  svn_filesize_t textlen;
 
   /* Maybe validate the path. */
   if (eb->verify || eb->notify_func)
@@ -1184,7 +1219,7 @@ dump_node(struct edit_baton *eb,
 
           /* ### Unusually, we end this 'delete' node record with only a single
                  blank line after the header block -- no extra blank line. */
-          SVN_ERR(dump_node_delete(eb->stream, path, kind, pool));
+          SVN_ERR(dump_node_delete(eb->stream, path, pool));
 
           /* The remaining action is a non-replacing add-with-history */
           /* action = svn_node_action_add; */
@@ -1302,7 +1337,6 @@ dump_node(struct edit_baton *eb,
   if (must_dump_props)
     {
       apr_hash_t *prophash, *oldhash = NULL;
-      apr_size_t proplen;
       svn_stream_t *propstream;
 
       SVN_ERR(svn_fs_node_proplist(&prophash, eb->fs_root, path, pool));
@@ -1370,11 +1404,6 @@ dump_node(struct edit_baton *eb,
       SVN_ERR(svn_hash_write_incremental(prophash, oldhash, propstream,
                                          "PROPS-END", pool));
       SVN_ERR(svn_stream_close(propstream));
-      proplen = propstring->len;
-      content_length += proplen;
-      svn_repos__dumpfile_header_pushf(
-        headers, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH,
-        "%" APR_SIZE_T_FMT, proplen);
     }
 
   /* If we are supposed to dump text, write out a text length header
@@ -1383,7 +1412,6 @@ dump_node(struct edit_baton *eb,
     {
       svn_checksum_t *checksum;
       const char *hex_digest;
-      svn_filesize_t textlen;
 
       if (eb->use_deltas)
         {
@@ -1420,11 +1448,6 @@ dump_node(struct edit_baton *eb,
           SVN_ERR(svn_fs_file_length(&textlen, eb->fs_root, path, pool));
         }
 
-      content_length += textlen;
-      svn_repos__dumpfile_header_pushf(
-        headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
-        "%" SVN_FILESIZE_T_FMT, textlen);
-
       SVN_ERR(svn_fs_file_checksum(&checksum, svn_checksum_md5,
                                    eb->fs_root, path, FALSE, pool));
       hex_digest = svn_checksum_to_cstring(checksum, pool);
@@ -1443,18 +1466,12 @@ dump_node(struct edit_baton *eb,
   /* 'Content-length:' is the last header before we dump the content,
      and is the sum of the text and prop contents lengths.  We write
      this only for the benefit of non-Subversion RFC-822 parsers. */
-  svn_repos__dumpfile_header_pushf(
-    headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
-    "%" SVN_FILESIZE_T_FMT, content_length);
-
-  SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE, pool));
-
-  /* Dump property content if we're supposed to do so. */
-  if (must_dump_props)
-    {
-      len = propstring->len;
-      SVN_ERR(svn_stream_write(eb->stream, propstring->data, &len));
-    }
+  SVN_ERR(svn_repos__dump_node_record(eb->stream, headers,
+                                      must_dump_props ? propstring : NULL,
+                                      must_dump_text,
+                                      must_dump_text ? textlen : 0,
+                                      TRUE /*content_length_always*/,
+                                      pool));
 
   /* Dump text content */
   if (must_dump_text && (kind == svn_node_file))

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_subr/checksum.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_subr/checksum.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_subr/checksum.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_subr/checksum.c Tue Jan 27 15:58:31 2015
@@ -165,12 +165,15 @@ checksum_create_without_digest(svn_check
   return checksum;
 }
 
+/* Return a checksum object, allocated in POOL.  The checksum will be of
+ * type KIND and contain the given DIGEST.
+ */
 static svn_checksum_t *
 checksum_create(svn_checksum_kind_t kind,
-                apr_size_t digest_size,
                 const unsigned char *digest,
                 apr_pool_t *pool)
 {
+  apr_size_t digest_size = DIGESTSIZE(kind);
   svn_checksum_t *checksum = checksum_create_without_digest(kind, digest_size,
                                                             pool);
   memcpy((unsigned char *)checksum->digest, digest, digest_size);
@@ -206,32 +209,28 @@ svn_checksum_t *
 svn_checksum__from_digest_md5(const unsigned char *digest,
                               apr_pool_t *result_pool)
 {
-  return checksum_create(svn_checksum_md5, APR_MD5_DIGESTSIZE, digest,
-                         result_pool);
+  return checksum_create(svn_checksum_md5, digest, result_pool);
 }
 
 svn_checksum_t *
 svn_checksum__from_digest_sha1(const unsigned char *digest,
                                apr_pool_t *result_pool)
 {
-  return checksum_create(svn_checksum_sha1, APR_SHA1_DIGESTSIZE, digest,
-                         result_pool);
+  return checksum_create(svn_checksum_sha1, digest, result_pool);
 }
 
 svn_checksum_t *
 svn_checksum__from_digest_fnv1a_32(const unsigned char *digest,
                                    apr_pool_t *result_pool)
 {
-  return checksum_create(svn_checksum_fnv1a_32, sizeof(digest), digest,
-                         result_pool);
+  return checksum_create(svn_checksum_fnv1a_32, digest, result_pool);
 }
 
 svn_checksum_t *
 svn_checksum__from_digest_fnv1a_32x4(const unsigned char *digest,
                                      apr_pool_t *result_pool)
 {
-  return checksum_create(svn_checksum_fnv1a_32x4, sizeof(digest), digest,
-                         result_pool);
+  return checksum_create(svn_checksum_fnv1a_32x4, digest, result_pool);
 }
 
 svn_error_t *
@@ -428,10 +427,7 @@ svn_checksum_dup(const svn_checksum_t *c
       case svn_checksum_sha1:
       case svn_checksum_fnv1a_32:
       case svn_checksum_fnv1a_32x4:
-        return checksum_create(checksum->kind,
-                               digest_sizes[checksum->kind],
-                               checksum->digest,
-                               pool);
+        return checksum_create(checksum->kind, checksum->digest, pool);
 
       default:
         SVN_ERR_MALFUNCTION_NO_RETURN();
@@ -492,10 +488,7 @@ svn_checksum_empty_checksum(svn_checksum
       case svn_checksum_sha1:
       case svn_checksum_fnv1a_32:
       case svn_checksum_fnv1a_32x4:
-        return checksum_create(kind,
-                               digest_sizes[kind],
-                               empty_string_digests[kind],
-                               pool);
+        return checksum_create(kind, empty_string_digests[kind], pool);
 
       default:
         /* We really shouldn't get here, but if we do... */

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_subr/stream.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_subr/stream.c Tue Jan 27 15:58:31 2015
@@ -2071,7 +2071,7 @@ create_tempfile(HANDLE *hFile,
 
       if (h == INVALID_HANDLE_VALUE)
         {
-          apr_status_t status = apr_get_os_error();;
+          apr_status_t status = apr_get_os_error();
           if (i > 1000)
             return svn_error_createf(SVN_ERR_IO_UNIQUE_NAMES_EXHAUSTED,
                            svn_error_wrap_apr(status, NULL),

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_wc/conflicts.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_wc/conflicts.c Tue Jan 27 15:58:31 2015
@@ -2240,7 +2240,7 @@ svn_wc__read_conflicts(const apr_array_h
     {
       /* Some callers expect not NULL */
       *conflicts = apr_array_make(result_pool, 0,
-                                  sizeof(svn_wc_conflict_description2_t *));;
+                                  sizeof(svn_wc_conflict_description2_t *));
       return SVN_NO_ERROR;
     }
 

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_wc/merge.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_wc/merge.c Tue Jan 27 15:58:31 2015
@@ -180,7 +180,7 @@ detranslate_wc_file(const char **detrans
       = prop ? (prop->value ? prop->value->data : NULL) : old_mime_value;
 
     old_is_binary = old_mime_value && svn_mime_type_is_binary(old_mime_value);
-    new_is_binary = new_mime_value && svn_mime_type_is_binary(new_mime_value);;
+    new_is_binary = new_mime_value && svn_mime_type_is_binary(new_mime_value);
   }
 
   /* See what translations we want to do */

Modified: subversion/branches/dump-load-cross-check/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/libsvn_wc/wc_db_update_move.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/libsvn_wc/wc_db_update_move.c Tue Jan 27 15:58:31 2015
@@ -2230,6 +2230,19 @@ bump_moved_layer(svn_boolean_t *recurse,
        always have sufficient depth to bump subtree moves. */
     can_bump = TRUE;
 
+  /* Are we allowed to bump */
+  if (can_bump)
+    {
+      svn_boolean_t locked;
+
+      SVN_ERR(svn_wc__db_wclock_owns_lock_internal(&locked, wcroot,
+                                                   dst_relpath,
+                                                   FALSE, scratch_pool));
+
+      if (!locked)
+        can_bump = FALSE;
+    }
+
   if (!can_bump)
     {
       SVN_ERR(bump_mark_tree_conflict(wcroot, src_relpath,

Modified: subversion/branches/dump-load-cross-check/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/svndumpfilter/svndumpfilter.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/svndumpfilter/svndumpfilter.c Tue Jan 27 15:58:31 2015
@@ -660,66 +660,6 @@ new_node_record(void **node_baton,
 }
 
 
-/* Output node headers and props.
- *
- * Write HEADERS, content length headers, a blank line, and the properties
- * content section PROPS_STR (if non-null) to DUMP_STREAM.
- *
- * HEADERS is an array of headers as struct {const char *key, *val;}.
- * Write them all in the given order.
- *
- * PROPS_STR is the property content block, including a terminating
- * 'PROPS_END\n' line. Iff PROPS_STR is non-null, write a
- * Prop-content-length header and the prop content block.
- *
- * Iff HAS_TEXT is true, write a Text-content length, using the value
- * TEXT_CONTENT_LENGTH.
- *
- * Always write a Content-length header, its value being the sum of the
- * Prop- and Text- content length headers.
- * ### TODO: Make it optional (only written if props and/or text present).
- */
-static svn_error_t *
-output_node_record(svn_stream_t *dump_stream,
-                   apr_array_header_t *headers,
-                   svn_stringbuf_t *props_str,
-                   svn_boolean_t has_text,
-                   svn_filesize_t text_content_length,
-                   apr_pool_t *scratch_pool)
-{
-  svn_filesize_t content_length = 0;
-
-  /* add content-length headers */
-  if (props_str)
-    {
-      svn_repos__dumpfile_header_pushf(
-        headers, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH,
-        "%" APR_SIZE_T_FMT, props_str->len);
-      content_length += props_str->len;
-    }
-  if (has_text)
-    {
-      svn_repos__dumpfile_header_pushf(
-        headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
-        "%" SVN_FILESIZE_T_FMT, text_content_length);
-      content_length += text_content_length;
-    }
-  svn_repos__dumpfile_header_pushf(
-    headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
-    "%" SVN_FILESIZE_T_FMT, content_length);
-
-  /* write the headers */
-  SVN_ERR(svn_repos__dump_headers(dump_stream, headers, TRUE, scratch_pool));
-
-  /* write the props */
-  if (props_str)
-    {
-      SVN_ERR(svn_stream_write(dump_stream, props_str->data, &props_str->len));
-    }
-  return SVN_NO_ERROR;
-}
-
-
 /* Examine the mergeinfo in INITIAL_VAL, omitting missing merge
    sources or renumbering revisions in rangelists as appropriate, and
    return the (possibly new) mergeinfo in *FINAL_VAL (allocated from
@@ -924,12 +864,13 @@ set_fulltext(svn_stream_t **stream, void
             {
               svn_stringbuf_appendcstr(nb->props, "PROPS-END\n");
             }
-          SVN_ERR(output_node_record(nb->rb->pb->out_stream,
-                                     nb->headers,
-                                     nb->has_props ? nb->props : NULL,
-                                     nb->has_text,
-                                     nb->tcl,
-                                     nb->node_pool));
+          SVN_ERR(svn_repos__dump_node_record(nb->rb->pb->out_stream,
+                                              nb->headers,
+                                              nb->has_props ? nb->props : NULL,
+                                              nb->has_text,
+                                              nb->tcl,
+                                              TRUE /*content_length_always*/,
+                                              nb->node_pool));
         }
       *stream = nb->rb->pb->out_stream;
     }
@@ -957,12 +898,13 @@ close_node(void *node_baton)
         {
           svn_stringbuf_appendcstr(nb->props, "PROPS-END\n");
         }
-      SVN_ERR(output_node_record(nb->rb->pb->out_stream,
-                                 nb->headers,
-                                 nb->has_props ? nb->props : NULL,
-                                 nb->has_text,
-                                 nb->tcl,
-                                 nb->node_pool));
+      SVN_ERR(svn_repos__dump_node_record(nb->rb->pb->out_stream,
+                                          nb->headers,
+                                          nb->has_props ? nb->props : NULL,
+                                          nb->has_text,
+                                          nb->tcl,
+                                          TRUE /*content_length_always*/,
+                                          nb->node_pool));
     }
 
   /* put an end to node. */

Modified: subversion/branches/dump-load-cross-check/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/svnmucc/svnmucc.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/svnmucc/svnmucc.c Tue Jan 27 15:58:31 2015
@@ -222,7 +222,7 @@ execute(const apr_array_header_t *action
                                 mtcc, iterpool);
 
   svn_pool_destroy(iterpool);
-  return svn_error_trace(err);;
+  return svn_error_trace(err);
 }
 
 static svn_error_t *

Modified: subversion/branches/dump-load-cross-check/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/svnrdump/dump_editor.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/svnrdump/dump_editor.c Tue Jan 27 15:58:31 2015
@@ -57,6 +57,9 @@ struct dir_baton
   const char *copyfrom_path; /* a relpath */
   svn_revnum_t copyfrom_rev;
 
+  /* Headers accumulated so far for this directory */
+  apr_array_header_t *headers;
+
   /* Properties which were modified during change_dir_prop. */
   apr_hash_t *props;
 
@@ -136,11 +139,10 @@ struct dump_edit_baton {
   /* The revision we're currently dumping. */
   svn_revnum_t current_revision;
 
-  /* The kind (file or directory) and baton of the item whose block of
+  /* The baton of the directory node whose block of
      dump stream data has not been fully completed; NULL if there's no
      such item. */
-  svn_node_kind_t pending_kind;
-  void *pending_baton;
+  struct dir_baton *pending_db;
 };
 
 /* Make a directory baton to represent the directory at PATH (relative
@@ -185,6 +187,7 @@ make_dir_baton(const char *path,
                             ? svn_relpath_canonicalize(copyfrom_path, pool)
                             : NULL;
   new_db->copyfrom_rev = copyfrom_rev;
+  new_db->headers = NULL;
   new_db->props = apr_hash_make(pool);
   new_db->deleted_props = apr_hash_make(pool);
   new_db->deleted_entries = apr_hash_make(pool);
@@ -244,24 +247,6 @@ get_props_content(apr_array_header_t *he
   svn_repos__dumpfile_header_push(
     headers, SVN_REPOS_DUMPFILE_PROP_DELTA, "true");
 
-  /* Prop-content-length: 193 */
-  svn_repos__dumpfile_header_pushf(
-    headers, SVN_REPOS_DUMPFILE_PROP_CONTENT_LENGTH,
-    "%" APR_SIZE_T_FMT, (*content)->len);
-
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-do_dump_newlines(struct dump_edit_baton *eb,
-                 svn_boolean_t *trigger_var,
-                 apr_pool_t *pool)
-{
-  if (trigger_var && *trigger_var)
-    {
-      SVN_ERR(svn_stream_puts(eb->stream, "\n\n"));
-      *trigger_var = FALSE;
-    }
   return SVN_NO_ERROR;
 }
 
@@ -275,8 +260,6 @@ do_dump_newlines(struct dump_edit_baton
 static svn_error_t *
 dump_node_delete(svn_stream_t *stream,
                  const char *node_relpath,
-                 struct dir_baton *db,
-                 struct file_baton *fb,
                  apr_pool_t *pool)
 {
   apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
@@ -287,14 +270,6 @@ dump_node_delete(svn_stream_t *stream,
   svn_repos__dumpfile_header_push(
     headers, SVN_REPOS_DUMPFILE_NODE_PATH, node_relpath);
 
-  /* Node-kind: "file" | "dir" */
-  if (fb)
-    svn_repos__dumpfile_header_push(
-      headers, SVN_REPOS_DUMPFILE_NODE_KIND, "file");
-  else if (db)
-    svn_repos__dumpfile_header_push(
-      headers, SVN_REPOS_DUMPFILE_NODE_KIND, "dir");
-
   /* Node-action: delete */
   svn_repos__dumpfile_header_push(
     headers, SVN_REPOS_DUMPFILE_NODE_ACTION, "delete");
@@ -303,21 +278,26 @@ dump_node_delete(svn_stream_t *stream,
   return SVN_NO_ERROR;
 }
 
-/*
- * Write out a partial node record for PATH of type KIND.
+/* Set *HEADERS_P to contain some headers for the node at PATH of type KIND.
+ *
  * ACTION describes what is happening to the node (see enum
- * svn_node_action). Write record to writable EB->STREAM.
+ * svn_node_action).
  *
  * If the node was itself copied, IS_COPY is TRUE and the
  * path/revision of the copy source are in COPYFROM_PATH/COPYFROM_REV.
  * If IS_COPY is FALSE, yet COPYFROM_PATH/COPYFROM_REV are valid, this
  * node is part of a copied subtree.
-
- * Note: only when ACTION=delete, write a complete dumpfile record
- * terminated with blank lines.
+ *
+ * Iff ACTION is svn_node_action_replace and IS_COPY, then first write a
+ * complete deletion record to the dump stream.
+ *
+ * If ACTION is svn_node_action_delete, then the node record will be
+ * complete. (The caller may want to write two blank lines after the
+ * header block.)
  */
 static svn_error_t *
-dump_node(struct dump_edit_baton *eb,
+dump_node(apr_array_header_t **headers_p,
+          struct dump_edit_baton *eb,
           const char *repos_relpath,
           struct dir_baton *db,
           struct file_baton *fb,
@@ -369,13 +349,7 @@ dump_node(struct dump_edit_baton *eb,
       /* Node-action: delete */
       svn_repos__dumpfile_header_push(
         headers, SVN_REPOS_DUMPFILE_NODE_ACTION, "delete");
-
-      /* We can leave this routine quietly now. Nothing more to do-
-         print the headers terminated by one blank line, and an extra
-         blank line because we're not dumping props or text. */
-      SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE, pool));
-      SVN_ERR(svn_stream_puts(eb->stream, "\n"));
-      return SVN_NO_ERROR;
+      break;
 
     case svn_node_action_replace:
       if (! is_copy)
@@ -401,7 +375,7 @@ dump_node(struct dump_edit_baton *eb,
 
           /* ### Unusually, we end this 'delete' node record with only a single
                  blank line after the header block -- no extra blank line. */
-          SVN_ERR(dump_node_delete(eb->stream, repos_relpath, db, fb, pool));
+          SVN_ERR(dump_node_delete(eb->stream, repos_relpath, pool));
 
           /* The remaining action is a non-replacing add-with-history */
           /* action = svn_node_action_add; */
@@ -458,10 +432,10 @@ dump_node(struct dump_edit_baton *eb,
       break;
     }
 
-  /* Write the headers so far. We don't necessarily have all the headers
+  /* Return the headers so far. We don't necessarily have all the headers
      yet -- there may be property-related and content length headers to
-     come -- so don't write a terminating blank line. */
-  SVN_ERR(svn_repos__dump_headers(eb->stream, headers, FALSE, pool));
+     come, if this was not a 'delete' record. */
+  *headers_p = headers;
   return SVN_NO_ERROR;
 }
 
@@ -471,7 +445,6 @@ dump_mkdir(struct dump_edit_baton *eb,
            apr_pool_t *pool)
 {
   svn_stringbuf_t *prop_content;
-  apr_size_t len;
   apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
 
   /* Node-path: ... */
@@ -490,11 +463,9 @@ dump_mkdir(struct dump_edit_baton *eb,
   SVN_ERR(get_props_content(headers, &prop_content,
                             apr_hash_make(pool), apr_hash_make(pool),
                             pool, pool));
-  len = prop_content->len;
-  svn_repos__dumpfile_header_pushf(headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
-                                   "%" APR_SIZE_T_FMT, len);
-  SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE, pool));
-  SVN_ERR(svn_stream_write(eb->stream, prop_content->data, &len));
+  SVN_ERR(svn_repos__dump_node_record(eb->stream, headers, prop_content,
+                                      FALSE, 0, FALSE /*content_length_always*/,
+                                      pool));
 
   /* Newlines to tie it all off. */
   SVN_ERR(svn_stream_puts(eb->stream, "\n\n"));
@@ -502,88 +473,50 @@ dump_mkdir(struct dump_edit_baton *eb,
   return SVN_NO_ERROR;
 }
 
-/* Dump pending items from the specified node, to allow starting the dump
-   of a child node */
+/* Dump pending headers and properties for the directory EB->pending_db (if
+ * not null), to allow starting the dump of a child node */
 static svn_error_t *
-dump_pending(struct dump_edit_baton *eb,
-             apr_pool_t *scratch_pool)
+dump_pending_dir(struct dump_edit_baton *eb,
+                 apr_pool_t *scratch_pool)
 {
-  svn_boolean_t dump_props = FALSE;
-  apr_hash_t *props, *deleted_props;
+  struct dir_baton *db = eb->pending_db;
+  svn_stringbuf_t *prop_content = NULL;
 
-  if (! eb->pending_baton)
+  if (! db)
     return SVN_NO_ERROR;
 
   /* Some pending properties to dump? */
-  if (eb->pending_kind == svn_node_dir)
+  if (db->dump_props)
     {
-      struct dir_baton *db = eb->pending_baton;
-
-      if (db->dump_props)
-        {
-          dump_props = TRUE;
-          props = db->props;
-          deleted_props = db->deleted_props;
-
-          db->dump_props = FALSE;
-        }
-    }
-  else if (eb->pending_kind == svn_node_file)
-    {
-      struct file_baton *fb = eb->pending_baton;
-
-      if (fb->dump_props)
-        {
-          dump_props = TRUE;
-          props = fb->props;
-          deleted_props = fb->deleted_props;
-          fb->dump_props = FALSE;
-        }
-    }
-  else
-    abort();
-
-  if (dump_props)
-    {
-      apr_array_header_t *headers
-        = svn_repos__dumpfile_headers_create(scratch_pool);
-      svn_stringbuf_t *content;
-      apr_size_t len;
-
-      SVN_ERR(get_props_content(headers, &content, props, deleted_props,
+      SVN_ERR(get_props_content(db->headers, &prop_content,
+                                db->props, db->deleted_props,
                                 scratch_pool, scratch_pool));
-
-      /* Content-length: 14 */
-      svn_repos__dumpfile_header_pushf(
-        headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
-        "%" APR_SIZE_T_FMT, content->len);
-
-      SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE,
+    }
+  SVN_ERR(svn_repos__dump_node_record(eb->stream, db->headers, prop_content,
+                                      FALSE, 0, FALSE /*content_length_always*/,
                                       scratch_pool));
 
-      len = content->len;
-      SVN_ERR(svn_stream_write(eb->stream, content->data, &len));
-
+  if (db->dump_props)
+    {
       /* No text is going to be dumped. Write a couple of newlines and
          wait for the next node/ revision. */
       SVN_ERR(svn_stream_puts(eb->stream, "\n\n"));
 
       /* Cleanup so that data is never dumped twice. */
-      apr_hash_clear(props);
-      apr_hash_clear(deleted_props);
+      apr_hash_clear(db->props);
+      apr_hash_clear(db->deleted_props);
+      db->dump_props = FALSE;
     }
 
-  if (eb->pending_kind == svn_node_dir)
+  /* Some pending newlines to dump? */
+  if (db->dump_newlines)
     {
-      struct dir_baton *db = eb->pending_baton;
-
-      /* Some pending newlines to dump? */
-      SVN_ERR(do_dump_newlines(eb, &(db->dump_newlines), scratch_pool));
+      SVN_ERR(svn_stream_puts(eb->stream, "\n\n"));
+      db->dump_newlines = FALSE;
     }
 
   /* Anything that was pending is pending no longer. */
-  eb->pending_baton = NULL;
-  eb->pending_kind = svn_node_none;
+  eb->pending_db = NULL;
 
   return SVN_NO_ERROR;
 }
@@ -637,14 +570,14 @@ open_root(void *edit_baton,
                  to letting the typical plumbing handle this task. */
               new_db = make_dir_baton(NULL, NULL, SVN_INVALID_REVNUM,
                                       edit_baton, NULL, pool);
-              SVN_ERR(dump_node(eb, new_db->repos_relpath, new_db,
+              SVN_ERR(dump_node(&new_db->headers,
+                                eb, new_db->repos_relpath, new_db,
                                 NULL, svn_node_action_add, FALSE,
                                 NULL, SVN_INVALID_REVNUM, pool));
 
               /* Remember that we've started but not yet finished
                  handling this directory. */
-              eb->pending_baton = new_db;
-              eb->pending_kind = svn_node_dir;
+              eb->pending_db = new_db;
             }
         }
       svn_pool_destroy(iterpool);
@@ -668,7 +601,7 @@ delete_entry(const char *path,
 {
   struct dir_baton *pb = parent_baton;
 
-  SVN_ERR(dump_pending(pb->eb, pool));
+  SVN_ERR(dump_pending_dir(pb->eb, pool));
 
   /* We don't dump this deletion immediate.  Rather, we add this path
      to the deleted_entries of the parent directory baton.  That way,
@@ -692,7 +625,7 @@ add_directory(const char *path,
   struct dir_baton *new_db;
   svn_boolean_t is_copy;
 
-  SVN_ERR(dump_pending(pb->eb, pool));
+  SVN_ERR(dump_pending_dir(pb->eb, pool));
 
   new_db = make_dir_baton(path, copyfrom_path, copyfrom_rev, pb->eb,
                           pb, pb->pool);
@@ -704,7 +637,8 @@ add_directory(const char *path,
   is_copy = ARE_VALID_COPY_ARGS(copyfrom_path, copyfrom_rev);
 
   /* Dump the node */
-  SVN_ERR(dump_node(pb->eb, new_db->repos_relpath, new_db, NULL,
+  SVN_ERR(dump_node(&new_db->headers,
+                    pb->eb, new_db->repos_relpath, new_db, NULL,
                     was_deleted ? svn_node_action_replace : svn_node_action_add,
                     is_copy,
                     is_copy ? new_db->copyfrom_path : NULL,
@@ -717,8 +651,7 @@ add_directory(const char *path,
 
   /* Remember that we've started, but not yet finished handling this
      directory. */
-  pb->eb->pending_baton = new_db;
-  pb->eb->pending_kind = svn_node_dir;
+  pb->eb->pending_db = new_db;
 
   *child_baton = new_db;
   return SVN_NO_ERROR;
@@ -736,7 +669,7 @@ open_directory(const char *path,
   const char *copyfrom_path = NULL;
   svn_revnum_t copyfrom_rev = SVN_INVALID_REVNUM;
 
-  SVN_ERR(dump_pending(pb->eb, pool));
+  SVN_ERR(dump_pending_dir(pb->eb, pool));
 
   /* If the parent directory has explicit comparison path and rev,
      record the same for this one. */
@@ -764,9 +697,9 @@ close_directory(void *dir_baton,
   svn_boolean_t this_pending;
 
   /* Remember if this directory is the one currently pending. */
-  this_pending = (db->eb->pending_baton == db);
+  this_pending = (db->eb->pending_db == db);
 
-  SVN_ERR(dump_pending(db->eb, pool));
+  SVN_ERR(dump_pending_dir(db->eb, pool));
 
   /* If this directory was pending, then dump_pending() should have
      taken care of all the props and such.  Of course, the only way
@@ -779,12 +712,12 @@ close_directory(void *dir_baton,
      directory. */
   if ((! this_pending) && (db->dump_props))
     {
-      SVN_ERR(dump_node(db->eb, db->repos_relpath, db, NULL,
+      SVN_ERR(dump_node(&db->headers,
+                        db->eb, db->repos_relpath, db, NULL,
                         svn_node_action_change, FALSE,
                         NULL, SVN_INVALID_REVNUM, pool));
-      db->eb->pending_baton = db;
-      db->eb->pending_kind = svn_node_dir;
-      SVN_ERR(dump_pending(db->eb, pool));
+      db->eb->pending_db = db;
+      SVN_ERR(dump_pending_dir(db->eb, pool));
     }
 
   /* Dump the deleted directory entries */
@@ -793,8 +726,9 @@ close_directory(void *dir_baton,
     {
       const char *path = apr_hash_this_key(hi);
 
-      SVN_ERR(dump_node(db->eb, path, NULL, NULL, svn_node_action_delete,
-                        FALSE, NULL, SVN_INVALID_REVNUM, pool));
+      SVN_ERR(dump_node_delete(db->eb->stream, path, pool));
+      /* This deletion record is complete -- write an extra newline */
+      SVN_ERR(svn_stream_puts(db->eb->stream, "\n"));
     }
 
   /* ### should be unnecessary */
@@ -815,7 +749,7 @@ add_file(const char *path,
   struct file_baton *fb;
   void *was_deleted;
 
-  SVN_ERR(dump_pending(pb->eb, pool));
+  SVN_ERR(dump_pending_dir(pb->eb, pool));
 
   /* Make the file baton. */
   fb = make_file_baton(path, pb, pool);
@@ -850,7 +784,7 @@ open_file(const char *path,
   struct dir_baton *pb = parent_baton;
   struct file_baton *fb;
 
-  SVN_ERR(dump_pending(pb->eb, pool));
+  SVN_ERR(dump_pending_dir(pb->eb, pool));
 
   /* Make the file baton. */
   fb = make_file_baton(path, pb, pool);
@@ -880,9 +814,9 @@ change_dir_prop(void *parent_baton,
 
   /* This directory is not pending, but something else is, so handle
      the "something else".  */
-  this_pending = (db->eb->pending_baton == db);
+  this_pending = (db->eb->pending_db == db);
   if (! this_pending)
-    SVN_ERR(dump_pending(db->eb, pool));
+    SVN_ERR(dump_pending_dir(db->eb, pool));
 
   if (svn_property_kind2(name) != svn_prop_regular_kind)
     return SVN_NO_ERROR;
@@ -961,13 +895,13 @@ close_file(void *file_baton,
   struct file_baton *fb = file_baton;
   struct dump_edit_baton *eb = fb->eb;
   apr_finfo_t *info = apr_pcalloc(pool, sizeof(apr_finfo_t));
-  svn_stringbuf_t *propstring;
-  apr_array_header_t *headers = svn_repos__dumpfile_headers_create(pool);
+  svn_stringbuf_t *propstring = NULL;
+  apr_array_header_t *headers;
 
-  SVN_ERR(dump_pending(eb, pool));
+  SVN_ERR(dump_pending_dir(eb, pool));
 
-  /* Dump the node. */
-  SVN_ERR(dump_node(eb, fb->repos_relpath, NULL, fb,
+  /* Start dumping this node, by collecting some basic headers for it. */
+  SVN_ERR(dump_node(&headers, eb, fb->repos_relpath, NULL, fb,
                     fb->action, fb->is_copy, fb->copyfrom_path,
                     fb->copyfrom_rev, pool));
 
@@ -999,35 +933,19 @@ close_file(void *file_baton,
         svn_repos__dumpfile_header_push(
           headers, SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5, fb->base_checksum);
 
-      /* Text-content-length: 39 */
-      svn_repos__dumpfile_header_pushf(
-        headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
-        "%lu", (unsigned long)info->size);
-
       /* Text-content-md5: 82705804337e04dcd0e586bfa2389a7f */
       svn_repos__dumpfile_header_push(
         headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_MD5, text_checksum);
     }
 
-  /* Content-length: 1549 */
-  /* If both text and props are absent, skip this header */
-  if (fb->dump_props)
-    svn_repos__dumpfile_header_pushf(
-      headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
-      "%lu", (unsigned long)(info->size + propstring->len));
-  else if (fb->dump_text)
-    svn_repos__dumpfile_header_pushf(
-      headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH,
-      "%lu", (unsigned long)info->size);
-
-  SVN_ERR(svn_repos__dump_headers(eb->stream, headers, TRUE, pool));
+  /* Dump the headers and props now */
+  SVN_ERR(svn_repos__dump_node_record(eb->stream, headers, propstring,
+                                      fb->dump_text, info->size,
+                                      FALSE /*content_length_always*/,
+                                      pool));
 
-  /* Dump the props now */
   if (fb->dump_props)
     {
-      SVN_ERR(svn_stream_write(eb->stream, propstring->data,
-                               &(propstring->len)));
-
       /* Cleanup */
       fb->dump_props = FALSE;
       apr_hash_clear(fb->props);
@@ -1194,7 +1112,7 @@ svn_rdump__get_dump_editor(const svn_del
   eb->ra_session = ra_session;
   eb->update_anchor_relpath = update_anchor_relpath;
   eb->current_revision = revision;
-  eb->pending_kind = svn_node_none;
+  eb->pending_db = NULL;
 
   /* Create a special per-revision pool */
   eb->pool = svn_pool_create(pool);

Modified: subversion/branches/dump-load-cross-check/subversion/tests/cmdline/svntest/verify.py
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/cmdline/svntest/verify.py?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/tests/cmdline/svntest/verify.py (original)
+++ subversion/branches/dump-load-cross-check/subversion/tests/cmdline/svntest/verify.py Tue Jan 27 15:58:31 2015
@@ -497,9 +497,8 @@ class DumpParser:
     regex = '([^:]*): (.*)$'
     m = re.match(regex, self.lines[self.current])
     if not m:
-      raise SVNDumpParseError("expected a header '%s' at line %d, but found:\n%s"
-                              % (regex, self.current,
-                                 self.lines[self.current]))
+      raise SVNDumpParseError("expected a header at line %d, but found:\n%s"
+                              % (self.current, self.lines[self.current]))
     self.current += 1
     return m.groups()
 
@@ -510,6 +509,7 @@ class DumpParser:
       headers.append((key, val))
     return headers
 
+
   def parse_boolean(self, header, required):
     return self.parse_line(header + ': (false|true)$', required)
 
@@ -627,27 +627,42 @@ class DumpParser:
 
   def parse_one_node(self):
     node = {}
+
+    # optional 'kind' and required 'action' must be next
+    node['kind'] = self.parse_kind()
+    action = self.parse_action()
+
+    # read any remaining headers
     headers_list = self.parse_headers()
-    headers = { k:v for (k, v) in headers_list }
-    for key, header in [
-        ('kind', 'Node-kind'),
-        ('copyfrom_rev', 'Node-copyfrom-rev'),
-        ('copyfrom_path', 'Node-copyfrom-path'),
-        ('copy_md5', 'Text-copy-source-md5'),
-        ('copy_sha1', 'Text-copy-source-sha1'),
-        ('prop_delta', 'Prop-delta'),
-        ('prop_length', 'Prop-content-length'),
-        ('text_delta', 'Text-delta'),
-        ('text_delta_base_md5', 'Text-delta-base-md5'),
-        ('text_delta_base_sha1', 'Text-delta-base-sha1'),
-        ('text_length', 'Text-content-length'),
-        ('text_md5', 'Text-content-md5'),
-        ('text_sha1', 'Text-content-sha1'),
-        ('content_length', 'Content-length'),
-        ]:
-      node[key] = headers.get(header, None)
+    headers = dict(headers_list)
 
-    action = headers['Node-action']
+    # Content-length must be last, if present
+    if 'Content-length' in headers and headers_list[-1][0] != 'Content-length':
+      raise SVNDumpParseError("'Content-length' header is not last, "
+                              "in header block ending at line %d"
+                              % (self.current,))
+
+    # parse the remaining optional headers and store in specific keys in NODE
+    for key, header, regex in [
+        ('copyfrom_rev',    'Node-copyfrom-rev',    '([0-9]+)$'),
+        ('copyfrom_path',   'Node-copyfrom-path',   '(.*)$'),
+        ('copy_md5',        'Text-copy-source-md5', '([0-9a-z]+)$'),
+        ('copy_sha1',       'Text-copy-source-sha1','([0-9a-z]+)$'),
+        ('prop_length',     'Prop-content-length',  '([0-9]+)$'),
+        ('text_length',     'Text-content-length',  '([0-9]+)$'),
+        ('text_md5',        'Text-content-md5',     '([0-9a-z]+)$'),
+        ('text_sha1',       'Text-content-sha1',    '([0-9a-z]+)$'),
+        ('content_length',  'Content-length',       '([0-9]+)$'),
+        ]:
+      if not header in headers:
+        node[key] = None
+        continue
+      m = re.match(regex, headers[header])
+      if not m:
+        raise SVNDumpParseError("expected '%s' at line %d\n%s"
+                                % (regex, self.current,
+                                   self.lines[self.current]))
+      node[key] = m.group(1)
 
     self.parse_blank()
     if node['prop_length']:

Modified: subversion/branches/dump-load-cross-check/subversion/tests/libsvn_diff/parse-diff-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/libsvn_diff/parse-diff-test.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/tests/libsvn_diff/parse-diff-test.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/tests/libsvn_diff/parse-diff-test.c Tue Jan 27 15:58:31 2015
@@ -667,7 +667,7 @@ test_parse_property_diff(apr_pool_t *poo
   prop_patch = apr_hash_get(patch->prop_patches, "prop_add",
                             APR_HASH_KEY_STRING);
 
-  SVN_TEST_ASSERT(!strcmp("prop_add", prop_patch->name));
+  SVN_TEST_STRING_ASSERT(prop_patch->name, "prop_add");
   SVN_TEST_ASSERT(prop_patch->operation == svn_diff_op_added);
   hunks = prop_patch->hunks;
 

Modified: subversion/branches/dump-load-cross-check/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/tests/libsvn_fs_fs/fs-fs-pack-test.c Tue Jan 27 15:58:31 2015
@@ -25,8 +25,11 @@
 #include <apr_pools.h>
 
 #include "../svn_test.h"
+#include "../../libsvn_fs/fs-loader.h"
 #include "../../libsvn_fs_fs/fs.h"
 #include "../../libsvn_fs_fs/fs_fs.h"
+#include "../../libsvn_fs_fs/low_level.h"
+#include "../../libsvn_fs_fs/util.h"
 
 #include "svn_hash.h"
 #include "svn_pools.h"
@@ -1243,6 +1246,132 @@ id_parser_test(const svn_test_opts_t *op
 
 #undef REPO_NAME
 
+/* ------------------------------------------------------------------------ */
+
+#define REPO_NAME "test-repo-plain_0_length"
+
+static svn_error_t *
+receive_index(const svn_fs_fs__p2l_entry_t *entry,
+              void *baton,
+              apr_pool_t *scratch_pool)
+{
+  apr_array_header_t *entries = baton;
+  APR_ARRAY_PUSH(entries, svn_fs_fs__p2l_entry_t *)
+    = apr_pmemdup(entries->pool, entry, sizeof(*entry));
+
+  return SVN_NO_ERROR;
+}
+
+static apr_size_t
+stringbuf_find(svn_stringbuf_t *rev_contents,
+               const char *substring)
+{
+  apr_size_t i;
+  apr_size_t len = strlen(substring);
+
+  for (i = 0; i < rev_contents->len - len + 1; ++i)
+      if (!memcmp(rev_contents->data + i, substring, len))
+        return i;
+
+  return APR_SIZE_MAX;
+}
+
+static svn_error_t *
+plain_0_length(const svn_test_opts_t *opts,
+               apr_pool_t *pool)
+{
+  svn_fs_t *fs;
+  fs_fs_data_t *ffd;
+  svn_fs_txn_t *txn;
+  svn_fs_root_t *root;
+  svn_revnum_t rev;
+  const char *rev_path;
+  svn_stringbuf_t *rev_contents;
+  apr_hash_t *fs_config;
+  svn_filesize_t file_length;
+  apr_size_t offset;
+
+  if (strcmp(opts->fs_type, "fsfs") != 0)
+    return svn_error_create(SVN_ERR_TEST_SKIPPED, NULL, NULL);
+
+  /* Create a repo that does not deltify properties and does not share reps
+     on its own - makes it easier to do that later by hand. */
+  SVN_ERR(svn_test__create_fs(&fs, REPO_NAME, opts, pool));
+  ffd = fs->fsap_data;
+  ffd->deltify_properties = FALSE;
+  ffd->rep_sharing_allowed = FALSE;
+
+  /* Create one file node with matching contents and property reps. */
+  SVN_ERR(svn_fs_begin_txn(&txn, fs, 0, pool));
+  SVN_ERR(svn_fs_txn_root(&root, txn, pool));
+  SVN_ERR(svn_fs_make_file(root, "foo", pool));
+  SVN_ERR(svn_test__set_file_contents(root, "foo", "END\n", pool));
+  SVN_ERR(svn_fs_change_node_prop(root, "foo", "x", NULL, pool));
+  SVN_ERR(svn_fs_commit_txn(NULL, &rev, txn, pool));
+
+  /* Redirect text rep to props rep. */
+  rev_path = svn_fs_fs__path_rev_absolute(fs, rev, pool);
+  SVN_ERR(svn_stringbuf_from_file2(&rev_contents, rev_path, pool));
+
+  offset = stringbuf_find(rev_contents, "id: ");
+  if (offset != APR_SIZE_MAX)
+    {
+      node_revision_t *noderev;
+      svn_stringbuf_t *noderev_str;
+
+      /* Read the noderev. */
+      svn_stream_t *stream = svn_stream_from_stringbuf(rev_contents, pool);
+      SVN_ERR(svn_stream_skip(stream, offset));
+      SVN_ERR(svn_fs_fs__read_noderev(&noderev, stream, pool, pool));
+      SVN_ERR(svn_stream_close(stream));
+
+      /* Tweak the DATA_REP. */
+      noderev->data_rep->revision = noderev->prop_rep->revision;
+      noderev->data_rep->item_index = noderev->prop_rep->item_index;
+      noderev->data_rep->size = noderev->prop_rep->size;
+      noderev->data_rep->expanded_size = 0;
+
+      /* Serialize it back. */
+      noderev_str = svn_stringbuf_create_empty(pool);
+      stream = svn_stream_from_stringbuf(noderev_str, pool);
+      SVN_ERR(svn_fs_fs__write_noderev(stream, noderev, ffd->format,
+                                       svn_fs_fs__fs_supports_mergeinfo(fs),
+                                       pool));
+      SVN_ERR(svn_stream_close(stream));
+
+      /* Patch the revision contents */
+      memcpy(rev_contents->data + offset, noderev_str->data, noderev_str->len);
+    }
+
+  SVN_ERR(svn_io_write_atomic(rev_path, rev_contents->data,
+                              rev_contents->len, NULL, pool));
+
+  if (svn_fs_fs__use_log_addressing(fs))
+    {
+      /* Refresh index data (checksums). */
+      apr_array_header_t *entries = apr_array_make(pool, 4, sizeof(void *));
+      SVN_ERR(svn_fs_fs__dump_index(fs, rev, receive_index, entries,
+                                    NULL, NULL, pool));
+      SVN_ERR(svn_fs_fs__load_index(fs, rev, entries, pool));
+    }
+
+  /* Create an independent FS instances with separate caches etc. */
+  fs_config = apr_hash_make(pool);
+  svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_NS,
+                svn_uuid_generate(pool));
+  SVN_ERR(svn_fs_open2(&fs, REPO_NAME, fs_config, pool, pool));
+
+  /* Now, check that we get the correct file length. */
+  SVN_ERR(svn_fs_revision_root(&root, fs, rev, pool));
+  SVN_ERR(svn_fs_file_length(&file_length, root, "foo", pool));
+
+  SVN_TEST_ASSERT(file_length == 4);
+
+  return SVN_NO_ERROR;
+}
+
+#undef REPO_NAME
+
 
 /* The test table.  */
 
@@ -1285,6 +1414,8 @@ static struct svn_test_descriptor_t test
                        "change revprops with enabled and disabled caching"),
     SVN_TEST_OPTS_PASS(id_parser_test,
                        "id parser test"),
+    SVN_TEST_OPTS_PASS(plain_0_length,
+                       "file with 0 expanded-length, issue #4554"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/auth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/auth-test.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/auth-test.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/tests/libsvn_subr/auth-test.c Tue Jan 27 15:58:31 2015
@@ -220,8 +220,8 @@ cleanup_callback(svn_boolean_t *delete_c
 {
   svn_auth_baton_t *b = walk_baton;
 
-  SVN_TEST_ASSERT(strcmp(cred_kind, SVN_AUTH_CRED_SIMPLE) == 0);
-  SVN_TEST_ASSERT(strcmp(realmstring, "<http://my.host> My realm") == 0);
+  SVN_TEST_STRING_ASSERT(cred_kind, SVN_AUTH_CRED_SIMPLE);
+  SVN_TEST_STRING_ASSERT(realmstring, "<http://my.host> My realm");
 
   SVN_ERR(svn_auth_forget_credentials(b, cred_kind, realmstring, scratch_pool));
 
@@ -272,7 +272,7 @@ test_auth_clear(apr_pool_t *pool)
                                      pool));
 
   creds = credentials;
-  SVN_TEST_ASSERT(strcmp(creds->username, "jrandom") == 0);
+  SVN_TEST_STRING_ASSERT(creds->username, "jrandom");
   SVN_TEST_ASSERT(creds->may_save);
 
   /* And tell that they are ok and can be saved */
@@ -292,7 +292,7 @@ test_auth_clear(apr_pool_t *pool)
 
   SVN_TEST_ASSERT(credentials);
   creds = credentials;
-  SVN_TEST_ASSERT(strcmp(creds->username, "jrandom") == 0);
+  SVN_TEST_STRING_ASSERT(creds->username, "jrandom");
   SVN_TEST_ASSERT(creds->may_save);
 
   /* Use our walker function to delete credentials (and forget them

Modified: subversion/branches/dump-load-cross-check/subversion/tests/libsvn_wc/conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/tests/libsvn_wc/conflict-data-test.c Tue Jan 27 15:58:31 2015
@@ -621,8 +621,8 @@ test_serialize_tree_conflict(const svn_t
 
     SVN_TEST_ASSERT(reason == svn_wc_conflict_reason_moved_away);
     SVN_TEST_ASSERT(action == svn_wc_conflict_action_delete);
-    SVN_TEST_ASSERT(!strcmp(moved_away_op_root_abspath,
-                            sbox_wc_path(&sbox, "A/B")));
+    SVN_TEST_STRING_ASSERT(moved_away_op_root_abspath,
+                           sbox_wc_path(&sbox, "A/B"));
   }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/dump-load-cross-check/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/dump-load-cross-check/subversion/tests/libsvn_wc/op-depth-test.c?rev=1655066&r1=1655065&r2=1655066&view=diff
==============================================================================
--- subversion/branches/dump-load-cross-check/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/dump-load-cross-check/subversion/tests/libsvn_wc/op-depth-test.c Tue Jan 27 15:58:31 2015
@@ -5793,7 +5793,7 @@ check_tree_conflict_repos_path(svn_test_
 
       SVN_TEST_ASSERT(version != NULL);
 
-      SVN_TEST_ASSERT(!strcmp(version->path_in_repos, repos_path1));
+      SVN_TEST_STRING_ASSERT(version->path_in_repos, repos_path1);
     }
 
   if (repos_path2)
@@ -5803,7 +5803,7 @@ check_tree_conflict_repos_path(svn_test_
 
       SVN_TEST_ASSERT(version != NULL);
 
-      SVN_TEST_ASSERT(!strcmp(version->path_in_repos, repos_path2));
+      SVN_TEST_STRING_ASSERT(version->path_in_repos, repos_path2);
     }
 
   return SVN_NO_ERROR;
@@ -6808,10 +6808,25 @@ finite_move_update_bump(const svn_test_o
   SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
   SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_files, FALSE));
   SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_files, FALSE));
-  SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", NULL, NULL));
+  {
+    conflict_info_t conflicts[] = {
+      {"A/B", FALSE, FALSE, TRUE},
+      {"P/Q", FALSE, FALSE, TRUE},
+      {0}
+    };
+    SVN_ERR(check_db_conflicts(&b, "", conflicts));
+  }
+
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", "A/B", "A/B"));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "P/Q", "P/Q", "P/Q"));
   err = sbox_wc_resolve(&b, "A/B", svn_depth_empty,
                         svn_wc_conflict_choose_mine_conflict);
   SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+
+  /* sbox_wc_resolve() obtains a lock on the target path, so now it
+     will apply the change on the target */
+  SVN_ERR(sbox_wc_resolve(&b, "P/Q", svn_depth_empty,
+                          svn_wc_conflict_choose_mine_conflict));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
@@ -6840,10 +6855,21 @@ finite_move_update_bump(const svn_test_o
   SVN_ERR(sbox_wc_move(&b, "P", "P2"));
   SVN_ERR(sbox_wc_update_depth(&b, "A/B", 2, svn_depth_immediates, FALSE));
   SVN_ERR(sbox_wc_update_depth(&b, "P", 2, svn_depth_immediates, FALSE));
-  SVN_ERR(check_tree_conflict_repos_path(&b, "P", NULL, NULL));
+  {
+    conflict_info_t conflicts[] = {
+      {"A/B", FALSE, FALSE, TRUE},
+      {"P", FALSE, FALSE, TRUE},
+      {0}
+    };
+    SVN_ERR(check_db_conflicts(&b, "", conflicts));
+  }
+  SVN_ERR(check_tree_conflict_repos_path(&b, "P", "P", "P"));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A/B", "A/B", "A/B"));
   err = sbox_wc_resolve(&b, "P", svn_depth_empty,
                         svn_wc_conflict_choose_mine_conflict);
   SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+  SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_empty,
+                          svn_wc_conflict_choose_mine_conflict));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
@@ -6874,10 +6900,21 @@ finite_move_update_bump(const svn_test_o
   SVN_ERR(sbox_wc_move(&b, "P/Q", "Q2"));
   SVN_ERR(sbox_wc_update_depth(&b, "A/B/C", 2, svn_depth_empty, FALSE));
   SVN_ERR(sbox_wc_update_depth(&b, "P/Q", 2, svn_depth_empty, FALSE));
-  SVN_ERR(check_tree_conflict_repos_path(&b, "P/Q", NULL, NULL));
+  {
+    conflict_info_t conflicts[] = {
+      {"A/B/C", FALSE, FALSE, TRUE},
+      {"P/Q", FALSE, FALSE, TRUE},
+      {0}
+    };
+    SVN_ERR(check_db_conflicts(&b, "", conflicts));
+  }
+  SVN_ERR(check_tree_conflict_repos_path(&b, "A/B/C", "A/B/C", "A/B/C"));
+  SVN_ERR(check_tree_conflict_repos_path(&b, "P/Q", "P/Q", "P/Q"));
   err = sbox_wc_resolve(&b, "P/Q", svn_depth_empty,
                         svn_wc_conflict_choose_mine_conflict);
   SVN_TEST_ASSERT_ERROR(err, SVN_ERR_WC_CONFLICT_RESOLVER_FAILURE);
+  SVN_ERR(sbox_wc_resolve(&b, "A/B/C", svn_depth_empty,
+                          svn_wc_conflict_choose_mine_conflict));
   {
     nodes_row_t nodes[] = {
       {0, "",        "normal",       1, ""},
@@ -10058,7 +10095,7 @@ static struct svn_test_descriptor_t test
                        "commit_moved_descendant"),
     SVN_TEST_OPTS_XFAIL(commit_moved_away_descendant,
                         "commit_moved_away_descendant"),
-    SVN_TEST_OPTS_XFAIL(finite_move_update_bump,
+    SVN_TEST_OPTS_PASS(finite_move_update_bump,
                        "finite_move_update_bump"),
     SVN_TEST_OPTS_PASS(move_away_delete_update,
                        "move_away_delete_update"),