Author: hwright
Date: Tue Sep 21 10:37:35 2010
New Revision: 999304

URL: http://svn.apache.org/viewvc?rev=999304&view=rev
Log:
On the object-model branch:
Bring up-to-date with trunk (for JavaHL test fixes).

Added:
    
subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests_data/copy-from-previous-version-and-modify.dump
      - copied unchanged from r999302, 
subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/copy-from-previous-version-and-modify.dump
    
subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests_data/copy-parent-modify-prop.dump
      - copied unchanged from r999302, 
subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/copy-parent-modify-prop.dump
    
subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump
      - copied unchanged from r999302, 
subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump
    
subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests_data/modified-in-place.dump
      - copied unchanged from r999302, 
subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/modified-in-place.dump
    
subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests_data/move-and-modify.dump
      - copied unchanged from r999302, 
subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/move-and-modify.dump
    
subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests_data/no-author.dump
      - copied unchanged from r999302, 
subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/no-author.dump
    
subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests_data/revprops.dump
      - copied unchanged from r999302, 
subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/revprops.dump
    
subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests_data/tag-empty-trunk.dump
      - copied unchanged from r999302, 
subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/tag-empty-trunk.dump
    
subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests_data/url-encoding-bug.dump
      - copied unchanged from r999302, 
subversion/trunk/subversion/tests/cmdline/svnrdump_tests_data/url-encoding-bug.dump
Modified:
    subversion/branches/object-model/   (props changed)
    
subversion/branches/object-model/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
    
subversion/branches/object-model/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
    subversion/branches/object-model/subversion/include/svn_error_codes.h
    subversion/branches/object-model/subversion/include/svn_fs.h
    subversion/branches/object-model/subversion/libsvn_fs_base/revs-txns.c
    subversion/branches/object-model/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/object-model/subversion/libsvn_ra_serf/replay.c
    subversion/branches/object-model/subversion/libsvn_ra_serf/util.c
    subversion/branches/object-model/subversion/libsvn_wc/adm_crawler.c
    subversion/branches/object-model/subversion/libsvn_wc/entries.c
    subversion/branches/object-model/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/object-model/subversion/libsvn_wc/wc_db.c
    subversion/branches/object-model/subversion/libsvn_wc/wc_db.h
    subversion/branches/object-model/subversion/svnrdump/dump_editor.c
    subversion/branches/object-model/subversion/svnrdump/load_editor.c
    subversion/branches/object-model/subversion/svnsync/main.c
    subversion/branches/object-model/subversion/tests/cmdline/patch_tests.py
    subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests.py
    subversion/branches/object-model/subversion/tests/cmdline/svntest/verify.py
    subversion/branches/object-model/subversion/tests/libsvn_fs/fs-test.c

Propchange: subversion/branches/object-model/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 21 10:37:35 2010
@@ -37,4 +37,4 @@
 /subversion/branches/tc_url_rev:874351-874483
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
-/subversion/trunk:997486-998437
+/subversion/trunk:997486-999302

Modified: 
subversion/branches/object-model/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- 
subversion/branches/object-model/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
 (original)
+++ 
subversion/branches/object-model/subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java
 Tue Sep 21 10:37:35 2010
@@ -3118,10 +3118,9 @@ public class BasicTests extends SVNTests
                 tcTest.getWc().getItemContent("A/B/E/alpha"));
         tcTest.getWc().setItemWorkingCopyRevision("A/B/F/alpha", 2);
         // we expect the tree conflict to turn the existing item into
-        // a scheduled-add with history.  We expect the modifications in
-        // the local file to have been copied to the new file.
+        // a scheduled-add with history.
         tcTest.getWc().setItemTextStatus("A/B/E/alpha", Status.Kind.added);
-        tcTest.getWc().setItemTextStatus("A/B/F/alpha", Status.Kind.modified);
+        tcTest.getWc().setItemTextStatus("A/B/F/alpha", Status.Kind.normal);
 
         // check the status of the working copy of the tc test
         tcTest.checkStatus();

Modified: 
subversion/branches/object-model/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- 
subversion/branches/object-model/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
 (original)
+++ 
subversion/branches/object-model/subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java
 Tue Sep 21 10:37:35 2010
@@ -3010,10 +3010,9 @@ public class BasicTests extends SVNTests
                 tcTest.getWc().getItemContent("A/B/E/alpha"));
         tcTest.getWc().setItemWorkingCopyRevision("A/B/F/alpha", 2);
         // we expect the tree conflict to turn the existing item into
-        // a scheduled-add with history.  We expect the modifications in
-        // the local file to have been copied to the new file.
+        // a scheduled-add with history.
         tcTest.getWc().setItemTextStatus("A/B/E/alpha", StatusKind.added);
-        tcTest.getWc().setItemTextStatus("A/B/F/alpha", StatusKind.modified);
+        tcTest.getWc().setItemTextStatus("A/B/F/alpha", StatusKind.normal);
 
         // check the status of the working copy of the tc test
         tcTest.checkStatus();

Modified: subversion/branches/object-model/subversion/include/svn_error_codes.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/include/svn_error_codes.h?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/include/svn_error_codes.h 
(original)
+++ subversion/branches/object-model/subversion/include/svn_error_codes.h Tue 
Sep 21 10:37:35 2010
@@ -738,6 +738,12 @@ SVN_ERROR_START
              SVN_ERR_FS_CATEGORY_START + 48,
              "Filesystem has no such checksum-representation index record")
 
+  /** @since New in 1.7. */
+  SVN_ERRDEF(SVN_ERR_FS_PROP_BASEVALUE_MISMATCH,
+             SVN_ERR_FS_CATEGORY_START + 49,
+             "Property value in filesystem differs from the provided "
+             "base value")
+
   /* repos errors */
 
   SVN_ERRDEF(SVN_ERR_REPOS_LOCKED,

Modified: subversion/branches/object-model/subversion/include/svn_fs.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/include/svn_fs.h?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/include/svn_fs.h (original)
+++ subversion/branches/object-model/subversion/include/svn_fs.h Tue Sep 21 
10:37:35 2010
@@ -1896,8 +1896,8 @@ svn_fs_revision_proplist(apr_hash_t **ta
  * - @a name is the name of the property to change.
  * - if @a old_value_p is not @c NULL, then @a *old_value_p is the expected old
  *   value of the property, and changing the value will fail with error
- *   #SVN_ERR_BAD_PROPERTY_VALUE if the present value of the property is not @a
- *   *old_value_p.
+ *   #SVN_ERR_FS_PROP_BASEVALUE_MISMATCH if the present value of the property
+ *   is not @a *old_value_p.  (This is an atomic test-and-set).
  * - @a value is the new value of the property, or zero if the property should
  *   be removed altogether.
  *

Modified: subversion/branches/object-model/subversion/libsvn_fs_base/revs-txns.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_fs_base/revs-txns.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_fs_base/revs-txns.c 
(original)
+++ subversion/branches/object-model/subversion/libsvn_fs_base/revs-txns.c Tue 
Sep 21 10:37:35 2010
@@ -270,7 +270,7 @@ svn_fs_base__set_rev_prop(svn_fs_t *fs,
               && !svn_string_compare(wanted_value, present_value)))
         {
           /* What we expected isn't what we found. */
-          return svn_error_createf(SVN_ERR_BAD_PROPERTY_VALUE, NULL,
+          return svn_error_createf(SVN_ERR_FS_PROP_BASEVALUE_MISMATCH, NULL,
                                    _("revprop '%s' has unexpected value in "
                                      "filesystem"),
                                    name);

Modified: subversion/branches/object-model/subversion/libsvn_fs_fs/fs_fs.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_fs_fs/fs_fs.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/object-model/subversion/libsvn_fs_fs/fs_fs.c Tue Sep 21 
10:37:35 2010
@@ -7312,7 +7312,7 @@ change_rev_prop_body(void *baton, apr_po
               && !svn_string_compare(wanted_value, present_value)))
         {
           /* What we expected isn't what we found. */
-          return svn_error_createf(SVN_ERR_BAD_PROPERTY_VALUE, NULL,
+          return svn_error_createf(SVN_ERR_FS_PROP_BASEVALUE_MISMATCH, NULL,
                                    _("revprop '%s' has unexpected value in "
                                      "filesystem"),
                                    cb->name);

Modified: subversion/branches/object-model/subversion/libsvn_ra_serf/replay.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_serf/replay.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_serf/replay.c 
(original)
+++ subversion/branches/object-model/subversion/libsvn_ra_serf/replay.c Tue Sep 
21 10:37:35 2010
@@ -90,7 +90,7 @@ typedef struct {
   replay_info_t *parent;
 } prop_info_t;
 
-typedef struct {
+typedef struct replay_context_t {
   apr_pool_t *src_rev_pool;
   apr_pool_t *dst_rev_pool;
 
@@ -125,6 +125,9 @@ typedef struct {
   /* Keep a reference to the XML parser ctx to report any errors. */
   svn_ra_serf__xml_parser_t *parser_ctx;
 
+  /* The propfind for the revision properties of the current revision */
+  svn_ra_serf__propfind_context_t *prop_ctx;
+
 } replay_context_t;
 
 
@@ -180,6 +183,10 @@ start_replay(svn_ra_serf__xml_parser_t *
     {
       push_state(parser, ctx, REPORT);
 
+      /* Before we can continue, we need the revision properties. */
+      SVN_ERR_ASSERT(!ctx->prop_ctx
+                     || svn_ra_serf__propfind_is_done(ctx->prop_ctx));
+
       /* Create a pool for the commit editor. */
       ctx->dst_rev_pool = svn_pool_create(ctx->src_rev_pool);
       ctx->props = apr_hash_make(ctx->dst_rev_pool);
@@ -758,6 +765,8 @@ svn_ra_serf__replay_range(svn_ra_session
                                              TRUE, NULL,
                                              replay_ctx->src_rev_pool));
 
+          replay_ctx->prop_ctx = prop_ctx;
+
           /* Send the replay report request. */
           handler = apr_pcalloc(replay_ctx->src_rev_pool, sizeof(*handler));
 

Modified: subversion/branches/object-model/subversion/libsvn_ra_serf/util.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_ra_serf/util.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/object-model/subversion/libsvn_ra_serf/util.c Tue Sep 
21 10:37:35 2010
@@ -1053,7 +1053,7 @@ svn_ra_serf__handle_multistatus_only(ser
           server_err->parser.cdata = cdata_207;
           server_err->parser.done = &ctx->done;
           server_err->parser.ignore_errors = TRUE;
-    }
+        }
       else
         {
           ctx->done = TRUE;

Modified: subversion/branches/object-model/subversion/libsvn_wc/adm_crawler.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_wc/adm_crawler.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_wc/adm_crawler.c 
(original)
+++ subversion/branches/object-model/subversion/libsvn_wc/adm_crawler.c Tue Sep 
21 10:37:35 2010
@@ -748,52 +748,21 @@ svn_wc_crawl_revisions5(svn_wc_context_t
                                  db, local_abspath, scratch_pool,
                                  scratch_pool);
 
-  {
-    svn_boolean_t has_base = TRUE;
+  if (err)
+    {
+      if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+        return svn_error_return(err);
 
-    if (err)
-      {
-        if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
-          return svn_error_return(err);
+      svn_error_clear(err);
+      SVN_ERR(svn_wc__db_read_kind(&target_kind, db, local_abspath, TRUE,
+                                   scratch_pool));
 
-        svn_error_clear(err);
-        has_base = FALSE;
-        SVN_ERR(svn_wc__db_read_kind(&target_kind, db, local_abspath, TRUE,
-                                     scratch_pool));
-
-        if (target_kind == svn_wc__db_kind_file
-            || target_kind == svn_wc__db_kind_symlink)
-          status = svn_wc__db_status_absent; /* Crawl via parent dir */
-        else
-          status = svn_wc__db_status_not_present; /* As checkout */
-      }
-
-    /* ### Check the parentstub if we don't find a BASE. But don't
-           do this if we already have the info we want or we break
-           some copy scenarios. */
-    if (!has_base && target_kind == svn_wc__db_kind_dir)
-      {
-        svn_boolean_t not_present;
-        svn_revnum_t rev = SVN_INVALID_REVNUM;
-        err = svn_wc__db_temp_is_dir_deleted(&not_present, &rev,
-                                             db, local_abspath, scratch_pool);
-
-        if (err && (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND
-                    || err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY))
-          {
-            svn_error_clear(err);
-            not_present = FALSE;
-          }
-        else
-          SVN_ERR(err);
-
-        if (not_present)
-          status = svn_wc__db_status_not_present;
-
-        if (!SVN_IS_VALID_REVNUM(target_rev))
-          target_rev = rev;
-      }
-  }
+      if (target_kind == svn_wc__db_kind_file
+          || target_kind == svn_wc__db_kind_symlink)
+        status = svn_wc__db_status_absent; /* Crawl via parent dir */
+      else
+        status = svn_wc__db_status_not_present; /* As checkout */
+    }
 
   if ((status == svn_wc__db_status_not_present)
       || (target_kind == svn_wc__db_kind_dir

Modified: subversion/branches/object-model/subversion/libsvn_wc/entries.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_wc/entries.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/object-model/subversion/libsvn_wc/entries.c Tue Sep 21 
10:37:35 2010
@@ -709,44 +709,16 @@ read_one_entry(const svn_wc_entry_t **ne
         }
       else
         {
-          /* If we are reading child directories, then we need to
-             correctly populate the DELETED flag. WC_DB normally
-             wants to provide all of a directory's metadata from
-             its own area. But this information is stored only in
-             the parent directory, so we need to call a custom API
-             to fetch this value.
-
-             ### we should start generating BASE_NODE rows for THIS_DIR
-             ### in the subdir. future step because it is harder.  */
-          if (kind == svn_wc__db_kind_dir && *entry->name != '\0')
-            {
-              SVN_ERR(svn_wc__db_temp_is_dir_deleted(&entry->deleted,
-                                                     &entry->revision,
-                                                     db, entry_abspath,
-                                                     scratch_pool));
-            }
-          if (entry->deleted)
-            {
-              /* There was a DELETED marker in the parent, meaning
-                 that we truly are shadowing a base node. It isn't
-                 called a 'replace' though (the BASE is pretending
-                 not to exist).  */
-              entry->schedule = svn_wc_schedule_add;
-            }
-          else
-            {
-              /* There was NOT a 'not-present' BASE_NODE in the parent
-                 directory. And there is no BASE_NODE in this directory.
-                 Therefore, we are looking at some kind of add/copy
-                 rather than a replace.  */
-
-              /* ### if this looks like a plain old add, then rev=0.  */
-              if (!SVN_IS_VALID_REVNUM(entry->copyfrom_rev)
-                  && !SVN_IS_VALID_REVNUM(entry->cmt_rev))
-                entry->revision = 0;
+          /* There is NO 'not-present' BASE_NODE for this node.
+             Therefore, we are looking at some kind of add/copy
+             rather than a replace.  */
+
+          /* ### if this looks like a plain old add, then rev=0.  */
+          if (!SVN_IS_VALID_REVNUM(entry->copyfrom_rev)
+              && !SVN_IS_VALID_REVNUM(entry->cmt_rev))
+            entry->revision = 0;
 
-              entry->schedule = svn_wc_schedule_add;
-            }
+          entry->schedule = svn_wc_schedule_add;
         }
 
       /* If we don't have "real" data from the entry (obstruction),
@@ -1755,7 +1727,8 @@ insert_working_node(svn_sqlite__db_t *sd
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_INSERT_NODE));
   SVN_ERR(svn_sqlite__bindf(stmt, "isisnnnnsnrisnnni",
                             working_node->wc_id, working_node->local_relpath,
-                            (working_node->parent_relpath == NULL ? 1 : 2),
+                            (working_node->parent_relpath == NULL
+                             ? (apr_int64_t)1 : (apr_int64_t)2),
                             working_node->parent_relpath,
                             /* Setting depth for files? */
                             svn_depth_to_word(working_node->depth),

Modified: subversion/branches/object-model/subversion/libsvn_wc/wc-queries.sql
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_wc/wc-queries.sql?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_wc/wc-queries.sql 
(original)
+++ subversion/branches/object-model/subversion/libsvn_wc/wc-queries.sql Tue 
Sep 21 10:37:35 2010
@@ -231,10 +231,6 @@ left outer join base_node on base_node.w
   and base_node.local_relpath = working_node.local_relpath
 where working_node.wc_id = ?1 and working_node.local_relpath = ?2;
 
--- STMT_SELECT_PARENT_STUB_INFO
-select presence = 'not-present', revnum from base_node
-where wc_id = ?1 and local_relpath = ?2;
-
 -- STMT_DELETE_LOCK
 delete from lock
 where repos_id = ?1 and repos_relpath = ?2;
@@ -654,6 +650,15 @@ SELECT 0 FROM BASE_NODE WHERE wc_id = ?1
 UNION
 SELECT 1 FROM WORKING_NODE WHERE wc_id = ?1 AND local_relpath = ?2;
 
+-- STMT_DETERMINE_TREE_FOR_RECORDING_1
+SELECT 0 FROM NODES WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
+UNION
+SELECT 1 FROM NODES WHERE wc_id = ?1 AND local_relpath = ?2
+  AND op_depth IN (SELECT op_depth FROM nodes
+                   WHERE wc_id = ?1 AND local_relpath = ?2
+                   ORDER BY op_depth DESC
+                   LIMIT 1);
+
 
 /* ### Why can't this query not just use the BASE repository
    location values, instead of taking 3 additional parameters?! */

Modified: subversion/branches/object-model/subversion/libsvn_wc/wc_db.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_wc/wc_db.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/object-model/subversion/libsvn_wc/wc_db.c Tue Sep 21 
10:37:35 2010
@@ -608,6 +608,10 @@ scan_upwards_for_repos(apr_int64_t *repo
                                      stmt, data_stmt,
                                      current_relpath,
                                      scratch_pool));
+      SVN_ERR(svn_sqlite__reset(data_stmt));
+#else
+      have_row = have_data_row;
+      stmt = data_stmt;
 #endif
 #endif
 
@@ -633,7 +637,6 @@ scan_upwards_for_repos(apr_int64_t *repo
             }
 
 #ifdef SVN_WC__NODES
-          SVN_ERR(svn_sqlite__reset(data_stmt));
 #endif
           return svn_error_compose_create(err, svn_sqlite__reset(stmt));
         }
@@ -654,14 +657,8 @@ scan_upwards_for_repos(apr_int64_t *repo
                                                                       NULL),
                                               relpath_suffix,
                                               result_pool);
-#ifdef SVN_WC__NODES
-          SVN_ERR(svn_sqlite__reset(data_stmt));
-#endif
           return svn_sqlite__reset(stmt);
         }
-#ifdef SVN_WC__NODES
-      SVN_ERR(svn_sqlite__reset(data_stmt));
-#endif
 #ifndef SVN_WC__NODES_ONLY
       SVN_ERR(svn_sqlite__reset(stmt));
 #endif
@@ -1460,15 +1457,34 @@ which_trees_exist(svn_boolean_t *base_ex
 {
   svn_sqlite__stmt_t *stmt;
   svn_boolean_t have_row;
+#ifdef SVN_WC__NODES
+  svn_sqlite__stmt_t *stmt_nodes;
+  svn_boolean_t have_nodes_row;
+#endif
 
   *base_exists = FALSE;
   *working_exists = FALSE;
 
+#ifndef SVN_WC__NODES_ONLY
   SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
                                     STMT_DETERMINE_TREE_FOR_RECORDING));
   SVN_ERR(svn_sqlite__bindf(stmt, "is", wc_id, local_relpath));
-
   SVN_ERR(svn_sqlite__step(&have_row, stmt));
+#endif
+
+#ifdef SVN_WC__NODES
+  SVN_ERR(svn_sqlite__get_statement(&stmt_nodes, sdb,
+                                    STMT_DETERMINE_TREE_FOR_RECORDING_1));
+  SVN_ERR(svn_sqlite__bindf(stmt_nodes, "is", wc_id, local_relpath));
+  SVN_ERR(svn_sqlite__step(&have_nodes_row, stmt_nodes));
+#ifndef SVN_WC__NODES_ONLY
+  SVN_ERR(svn_sqlite__reset(stmt_nodes));
+#else
+  stmt = stmt_nodes;
+  have_row = have_nodes_row;
+#endif
+#endif
+
   if (have_row)
     {
       int value = svn_sqlite__column_int(stmt, 0);
@@ -7568,58 +7584,6 @@ svn_wc__db_temp_borrow_sdb(svn_sqlite__d
   return SVN_NO_ERROR;
 }
 
-
-svn_error_t *
-svn_wc__db_temp_is_dir_deleted(svn_boolean_t *not_present,
-                               svn_revnum_t *base_revision,
-                               svn_wc__db_t *db,
-                               const char *local_dir_abspath,
-                               apr_pool_t *scratch_pool)
-{
-  const char *parent_abspath;
-  const char *base_name;
-  svn_wc__db_pdh_t *pdh;
-  const char *local_relpath;
-  svn_sqlite__stmt_t *stmt;
-  svn_boolean_t have_row;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_dir_abspath));
-  SVN_ERR_ASSERT(not_present != NULL);
-  SVN_ERR_ASSERT(base_revision != NULL);
-
-  svn_dirent_split(&parent_abspath, &base_name, local_dir_abspath,
-                   scratch_pool);
-
-  /* The parent should be a working copy if this function is called.
-     Basically, the child is in an "added" state, which is not possible
-     for a working copy root.  */
-  SVN_ERR(svn_wc__db_pdh_parse_local_abspath(&pdh, &local_relpath, db,
-                              parent_abspath, svn_sqlite__mode_readonly,
-                              scratch_pool, scratch_pool));
-  VERIFY_USABLE_PDH(pdh);
-
-  /* Build the local_relpath for the requested directory.  */
-  local_relpath = svn_dirent_join(local_relpath, base_name, scratch_pool);
-
-  SVN_ERR(svn_sqlite__get_statement(&stmt, pdh->wcroot->sdb,
-                                    STMT_SELECT_PARENT_STUB_INFO));
-  SVN_ERR(svn_sqlite__bindf(stmt, "is", pdh->wcroot->wc_id, local_relpath));
-
-  /* There MAY be a BASE_NODE row in the parent directory. It is entirely
-     possible the parent only has WORKING_NODE rows. If there is no BASE_NODE,
-     then we certainly aren't looking at a 'not-present' row.  */
-  SVN_ERR(svn_sqlite__step(&have_row, stmt));
-
-  *not_present = have_row && svn_sqlite__column_int(stmt, 0);
-  if (*not_present)
-    {
-      *base_revision = svn_sqlite__column_revnum(stmt, 1);
-    }
-  /* else don't touch *BASE_REVISION.  */
-
-  return svn_error_return(svn_sqlite__reset(stmt));
-}
-
 svn_error_t *
 svn_wc__db_read_conflict_victims(const apr_array_header_t **victims,
                                  svn_wc__db_t *db,
@@ -8410,7 +8374,11 @@ svn_wc__db_temp_op_set_base_incomplete(s
   SVN_ERR(svn_sqlite__bind_text(stmt, 3, incomplete ? "incomplete" : 
"normal"));
   SVN_ERR(svn_sqlite__update(&affected_node_rows, stmt));
 
+#ifndef SVN_WC__NODES_ONLY
   SVN_ERR_ASSERT(affected_rows == affected_node_rows);
+#else
+  affected_rows = affected_node_rows;
+#endif
 #endif
 
   if (affected_rows > 0)
@@ -8715,7 +8683,8 @@ make_copy_txn(void *baton,
       SVN_ERR(svn_sqlite__bindf(stmt, "isi",
                                 mcb->pdh->wcroot->wc_id,
                                 mcb->local_relpath,
-                                (*mcb->local_relpath == '\0') ? 1 : 2));
+                                (*mcb->local_relpath == '\0'
+                                 ? (apr_int64_t)1 : (apr_int64_t)2)));
 
       SVN_ERR(svn_sqlite__step_done(stmt));
 #endif
@@ -8745,7 +8714,8 @@ make_copy_txn(void *baton,
       SVN_ERR(svn_sqlite__bindf(stmt, "isi",
                                 mcb->pdh->wcroot->wc_id,
                                 mcb->local_relpath,
-                                (*mcb->local_relpath == '\0') ? 1 : 2));
+                                (*mcb->local_relpath == '\0'
+                                 ? (apr_int64_t)1 : (apr_int64_t)2)));
 
       SVN_ERR(svn_sqlite__step_done(stmt));
 #endif

Modified: subversion/branches/object-model/subversion/libsvn_wc/wc_db.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/libsvn_wc/wc_db.h?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/object-model/subversion/libsvn_wc/wc_db.h Tue Sep 21 
10:37:35 2010
@@ -2227,14 +2227,6 @@ svn_wc__db_temp_forget_directory(svn_wc_
                                  const char *local_dir_abspath,
                                  apr_pool_t *scratch_pool);
 
-
-svn_error_t *
-svn_wc__db_temp_is_dir_deleted(svn_boolean_t *not_present,
-                               svn_revnum_t *base_revision,
-                               svn_wc__db_t *db,
-                               const char *local_abspath,
-                               apr_pool_t *scratch_pool);
-
 /* Removes all references of LOCAL_ABSPATH from its working copy
    using DB. */
 svn_error_t *

Modified: subversion/branches/object-model/subversion/svnrdump/dump_editor.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/svnrdump/dump_editor.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/svnrdump/dump_editor.c 
(original)
+++ subversion/branches/object-model/subversion/svnrdump/dump_editor.c Tue Sep 
21 10:37:35 2010
@@ -33,6 +33,12 @@
 
 #define ARE_VALID_COPY_ARGS(p,r) ((p) && SVN_IS_VALID_REVNUM(r))
 
+#ifdef SVN_DEBUG
+#define LDR_DBG(x) SVN_DBG(x)
+#else
+#define LDR_DBG(x) while(0)
+#endif
+
 /* The baton used by the dump editor. */
 struct dump_edit_baton {
   /* The output stream we write the dumpfile to */
@@ -113,7 +119,7 @@ make_dir_baton(const char *path,
   new_db->copyfrom_rev = copyfrom_rev;
   new_db->added = added;
   new_db->written_out = FALSE;
-  new_db->deleted_entries = apr_hash_make(pool);
+  new_db->deleted_entries = apr_hash_make(eb->pool);
 
   return new_db;
 }
@@ -197,10 +203,10 @@ dump_node(struct dump_edit_baton *eb,
           apr_pool_t *pool)
 {
   /* Remove leading slashes from path and copyfrom_path */
-  if (path && strcmp(path, "/"))
+  if (path)
     path = ((*path == '/') ? path + 1 : path);
   
-  if (copyfrom_path && strcmp(copyfrom_path, "/"))
+  if (copyfrom_path)
     copyfrom_path = ((*copyfrom_path == '/') ?
                      copyfrom_path + 1 : copyfrom_path);
 
@@ -315,6 +321,7 @@ open_root(void *edit_baton,
   struct dump_edit_baton *eb = edit_baton;
   /* Allocate a special pool for the edit_baton to avoid pool
      lifetime issues */
+
   eb->pool = svn_pool_create(pool);
   eb->props = apr_hash_make(eb->pool);
   eb->deleted_props = apr_hash_make(eb->pool);
@@ -322,6 +329,8 @@ open_root(void *edit_baton,
 
   *root_baton = make_dir_baton(NULL, NULL, SVN_INVALID_REVNUM,
                                edit_baton, NULL, FALSE, pool);
+  LDR_DBG(("open_root %p\n", *root_baton));
+
   return SVN_NO_ERROR;
 }
 
@@ -332,14 +341,15 @@ delete_entry(const char *path,
              apr_pool_t *pool)
 {
   struct dir_baton *pb = parent_baton;
-  const char *mypath = apr_pstrdup(pool, path);
+
+  LDR_DBG(("delete_entry %s\n", path));
 
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE, pool));
 
   /* Add this path to the deleted_entries of the parent directory
      baton. */
-  apr_hash_set(pb->deleted_entries, mypath, APR_HASH_KEY_STRING, pb);
+  apr_hash_set(pb->deleted_entries, path, APR_HASH_KEY_STRING, pb);
 
   return SVN_NO_ERROR;
 }
@@ -358,6 +368,8 @@ add_directory(const char *path,
     = make_dir_baton(path, copyfrom_path, copyfrom_rev, pb->eb, pb, TRUE, 
pool);
   svn_boolean_t is_copy;
 
+  LDR_DBG(("add_directory %s\n", path));
+
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE, pool));
 
@@ -398,6 +410,8 @@ open_directory(const char *path,
   const char *copyfrom_path = NULL;
   svn_revnum_t copyfrom_rev = SVN_INVALID_REVNUM;
 
+  LDR_DBG(("open_directory %s\n", path));
+
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE, pool));
 
@@ -423,14 +437,19 @@ close_directory(void *dir_baton,
 {
   struct dir_baton *db = dir_baton;
   struct dump_edit_baton *eb = db->eb;
+  apr_pool_t *iterpool;
   apr_hash_index_t *hi;
-  apr_pool_t *iterpool = svn_pool_create(pool);
+
+  LDR_DBG(("close_directory %p\n", dir_baton));
+
+  /* Create a pool just for iterations to allocate a loop variable */
+  iterpool = svn_pool_create(pool);
 
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(eb, &(eb->dump_props_pending), TRUE, pool));
 
-  /* Dump the directory entries */
-  for (hi = apr_hash_first(pool, db->deleted_entries); hi;
+  /* Dump the deleted directory entries */
+  for (hi = apr_hash_first(iterpool, db->deleted_entries); hi;
        hi = apr_hash_next(hi))
     {
       const void *key;
@@ -438,12 +457,11 @@ close_directory(void *dir_baton,
       apr_hash_this(hi, &key, NULL, NULL);
       path = key;
 
-      svn_pool_clear(iterpool);
-
       SVN_ERR(dump_node(db->eb, path, svn_node_unknown, svn_node_action_delete,
-                        FALSE, NULL, SVN_INVALID_REVNUM, iterpool));
+                        FALSE, NULL, SVN_INVALID_REVNUM, pool));
     }
 
+  svn_hash__clear(db->deleted_entries, pool);
   svn_pool_destroy(iterpool);
   return SVN_NO_ERROR;
 }
@@ -460,6 +478,8 @@ add_file(const char *path,
   void *val;
   svn_boolean_t is_copy;
 
+  LDR_DBG(("add_file %s\n", path));
+
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE, pool));
 
@@ -500,6 +520,8 @@ open_file(const char *path,
   const char *copyfrom_path = NULL;
   svn_revnum_t copyfrom_rev = SVN_INVALID_REVNUM;
 
+  LDR_DBG(("open_file %s\n", path));
+
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(pb->eb, &(pb->eb->dump_props_pending), TRUE, pool));
 
@@ -530,6 +552,8 @@ change_dir_prop(void *parent_baton,
 {
   struct dir_baton *db = parent_baton;
 
+  LDR_DBG(("change_dir_prop %p\n", parent_baton));
+
   if (svn_property_kind(NULL, name) != svn_prop_regular_kind)
     return SVN_NO_ERROR;
 
@@ -566,6 +590,8 @@ change_file_prop(void *file_baton,
 {
   struct dump_edit_baton *eb = file_baton;
 
+  LDR_DBG(("change_file_prop %p\n", file_baton));
+
   if (svn_property_kind(NULL, name) != svn_prop_regular_kind)
     return SVN_NO_ERROR;
 
@@ -620,6 +646,8 @@ apply_textdelta(void *file_baton, const 
   hb->pool = handler_pool;
   hb->eb = eb;
 
+  LDR_DBG(("apply_textdelta %p\n", file_baton));
+
   /* Use a temporary file to measure the text-content-length */
   SVN_ERR(svn_stream_open_unique(&(hb->delta_filestream), &hb->delta_abspath,
                                  NULL, svn_io_file_del_none, hb->pool,
@@ -650,6 +678,8 @@ close_file(void *file_baton,
   svn_stream_t *delta_filestream;
   apr_finfo_t *info = apr_pcalloc(pool, sizeof(apr_finfo_t));
 
+  LDR_DBG(("close_file %p\n", file_baton));
+
   /* Some pending properties to dump? */
   SVN_ERR(dump_props(eb, &(eb->dump_props_pending), FALSE, pool));
 
@@ -737,6 +767,7 @@ static svn_error_t *
 close_edit(void *edit_baton, apr_pool_t *pool)
 {
   struct dump_edit_baton *eb = edit_baton;
+  LDR_DBG(("close_edit\n"));
   svn_pool_destroy(eb->pool);
 
   return SVN_NO_ERROR;

Modified: subversion/branches/object-model/subversion/svnrdump/load_editor.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/svnrdump/load_editor.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/svnrdump/load_editor.c 
(original)
+++ subversion/branches/object-model/subversion/svnrdump/load_editor.c Tue Sep 
21 10:37:35 2010
@@ -30,9 +30,15 @@
 #include "svn_path.h"
 #include "svn_ra.h"
 #include "svn_io.h"
+#include "svn_private_config.h"
+
+#include <apr_network_io.h>
 
 #include "load_editor.h"
 
+#define SVNRDUMP_PROP_LOCK SVN_PROP_PREFIX "rdump-lock"
+#define LOCK_RETRIES 10
+
 #ifdef SVN_DEBUG
 #define LDR_DBG(x) SVN_DBG(x)
 #else
@@ -50,6 +56,66 @@ commit_callback(const svn_commit_info_t 
   return SVN_NO_ERROR;
 }
 
+/* Acquire a lock (of sorts) on the repository associated with the
+ * given RA SESSION. This lock is just a revprop change attempt in a
+ * time-delay loop. This function is duplicated by svnsync in main.c.
+ *
+ * ### TODO: Make this function more generic and
+ * expose it through a header for use by other Subversion
+ * applications to avoid duplication.
+ */
+static svn_error_t *
+get_lock(svn_ra_session_t *session, apr_pool_t *pool)
+{
+  char hostname_str[APRMAXHOSTLEN + 1] = { 0 };
+  svn_string_t *mylocktoken, *reposlocktoken;
+  apr_status_t apr_err;
+  apr_pool_t *subpool;
+  int i;
+
+  apr_err = apr_gethostname(hostname_str, sizeof(hostname_str), pool);
+  if (apr_err)
+    return svn_error_wrap_apr(apr_err, _("Can't get local hostname"));
+
+  mylocktoken = svn_string_createf(pool, "%s:%s", hostname_str,
+                                   svn_uuid_generate(pool));
+
+  subpool = svn_pool_create(pool);
+
+  for (i = 0; i < LOCK_RETRIES; ++i)
+    {
+      svn_pool_clear(subpool);
+
+      SVN_ERR(svn_ra_rev_prop(session, 0, SVNRDUMP_PROP_LOCK, &reposlocktoken,
+                              subpool));
+
+      if (reposlocktoken)
+        {
+          /* Did we get it? If so, we're done, otherwise we sleep. */
+          if (strcmp(reposlocktoken->data, mylocktoken->data) == 0)
+            return SVN_NO_ERROR;
+          else
+            {
+              SVN_ERR(svn_cmdline_printf
+                      (pool, _("Failed to get lock on destination "
+                               "repos, currently held by '%s'\n"),
+                       reposlocktoken->data));
+
+              apr_sleep(apr_time_from_sec(1));
+            }
+        }
+      else if (i < LOCK_RETRIES - 1)
+        {
+          /* Except in the very last iteration, try to set the lock. */
+          SVN_ERR(svn_ra_change_rev_prop(session, 0, SVNRDUMP_PROP_LOCK,
+                                         mylocktoken, subpool));
+        }
+    }
+
+  return svn_error_createf(APR_EINVAL, NULL,
+                           _("Couldn't get lock on destination repos "
+                             "after %d attempts"), i);
+}
 
 static svn_error_t *
 new_revision_record(void **revision_baton,
@@ -539,13 +605,11 @@ drive_dumpstream_loader(svn_stream_t *st
   struct parse_baton *pb;
   pb = parse_baton;
 
-  /* ### TODO: Figure out if we're allowed to set revprops before
-     ### we're too late and mess up the repository. svnsync uses some
-     ### sort of locking mechanism. */
-
+  SVN_ERR(get_lock(session, pool));
   SVN_ERR(svn_ra_get_repos_root2(session, &(pb->root_url), pool));
   SVN_ERR(svn_repos_parse_dumpstream2(stream, parser, parse_baton,
                                       NULL, NULL, pool));
+  SVN_ERR(svn_ra_change_rev_prop(session, 0, SVNRDUMP_PROP_LOCK, NULL, pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/object-model/subversion/svnsync/main.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/svnsync/main.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/svnsync/main.c (original)
+++ subversion/branches/object-model/subversion/svnsync/main.c Tue Sep 21 
10:37:35 2010
@@ -285,7 +285,13 @@ check_lib_versions(void)
 
 
 /* Acquire a lock (of sorts) on the repository associated with the
- * given RA SESSION.
+ * given RA SESSION. This lock is just a revprop change attempt in a
+ * time-delay loop. This function is duplicated by svnrdump in
+ * load_editor.c.
+ *
+ * ### TODO: Make this function more generic and
+ * expose it through a header for use by other Subversion
+ * applications to avoid duplication.
  */
 static svn_error_t *
 get_lock(svn_ra_session_t *session, apr_pool_t *pool)

Modified: 
subversion/branches/object-model/subversion/tests/cmdline/patch_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/cmdline/patch_tests.py?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/tests/cmdline/patch_tests.py 
(original)
+++ subversion/branches/object-model/subversion/tests/cmdline/patch_tests.py 
Tue Sep 21 10:37:35 2010
@@ -3189,7 +3189,7 @@ def patch_reverse_revert(sbox):
   ]
 
   # Set mu contents
-  svntest.main.file_write(mu_path, ''.join(mu_contents_pre_patch))
+  svntest.main.file_write(mu_path, ''.join(mu_contents_pre_patch), 'wb')
   expected_output = svntest.wc.State(wc_dir, {
     'A/mu'       : Item(verb='Sending'),
     })
@@ -3256,7 +3256,7 @@ def patch_reverse_revert(sbox):
     "-This is the file 'beta'.\n",
   ]
 
-  svntest.main.file_write(patch_file_path, ''.join(unidiff_patch))
+  svntest.main.file_write(patch_file_path, ''.join(unidiff_patch), 'wb')
 
   gamma_contents = "It is the file 'gamma'.\n"
   iota_contents = "This is the file 'iota'.\nSome more bytes\n"

Modified: 
subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests.py?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests.py 
(original)
+++ subversion/branches/object-model/subversion/tests/cmdline/svnrdump_tests.py 
Tue Sep 21 10:37:35 2010
@@ -41,6 +41,18 @@ XFail = svntest.testcase.XFail
 Item = svntest.wc.StateItem
 Wimp = svntest.testcase.Wimp
 
+## Mismatched headers during dumping operation
+# Text-copy-source-* and *-sha1 headers are not provided by the RA
+# layer. `svnadmin dump` is able to provide them because it works on
+# the FS layer. Also, svnrdump attaches "Prop-delta: true" with
+# everything whether it's really a delta or a new prop (delta from
+# /dev/null). This is really harmless, but `svnadmin dump` contains
+# the logic for differentiating between these two cases.
+
+mismatched_headers_re = \
+    "Prop-delta: |Text-content-sha1: |Text-copy-source-md5: |" \
+    "Text-copy-source-sha1: |Text-delta-base-sha1: .*"
+
 ######################################################################
 # Helper routines
 
@@ -80,7 +92,8 @@ def run_dump_test(sbox, dumpfile_name):
 
   # Compare the output from stdout
   svntest.verify.compare_and_display_lines(
-    "Dump files", "DUMP", svnadmin_dumpfile, svnrdump_dumpfile)
+    "Dump files", "DUMP", svnadmin_dumpfile, svnrdump_dumpfile,
+    None, mismatched_headers_re)
 
 def run_load_test(sbox, dumpfile_name):
   """Load a dumpfile using 'svnrdump load', dump it with 'svnadmin
@@ -125,7 +138,7 @@ def run_load_test(sbox, dumpfile_name):
 # Tests
 
 def basic_dump(sbox):
-  "dump the standard sbox repos"
+  "dump: standard sbox repos"
   sbox.build(read_only = True, create_wc = False)
 
   out = \
@@ -137,11 +150,11 @@ def basic_dump(sbox):
     raise svntest.Failure('No valid output')
 
 def revision_0_dump(sbox):
-  "dump revision zero"
+  "dump: revision zero"
   run_dump_test(sbox, "revision-0.dump")
 
 def revision_0_load(sbox):
-  "load revision zero"
+  "load: revision zero"
   run_load_test(sbox, "revision-0.dump")
 
 # skeleton.dump repository layout
@@ -155,17 +168,89 @@ def revision_0_load(sbox):
 #       README      (Added r6)
 
 def skeleton_load(sbox):
-  "skeleton repository"
+  "load: skeleton repository"
   run_load_test(sbox, "skeleton.dump")
 
 def copy_and_modify_dump(sbox):
-  "copy and modify dump"
+  "dump: copy and modify"
   run_dump_test(sbox, "copy-and-modify.dump")
 
 def copy_and_modify_load(sbox):
-  "copy and modify load"
+  "load: copy and modify"
   run_load_test(sbox, "copy-and-modify.dump")
   
+def no_author_dump(sbox):
+  "dump: copy revs with no svn:author revprops"
+  run_dump_test(sbox, "no-author.dump")
+
+def no_author_load(sbox):
+  "load: copy revs with no svn:author revprops"
+  run_load_test(sbox, "no-author.dump")
+
+def copy_from_previous_version_and_modify_dump(sbox):
+  "dump: copy from previous version and modify"
+  run_dump_test(sbox, "copy-from-previous-version-and-modify.dump")
+  
+def copy_from_previous_version_and_modify_load(sbox):
+  "load: copy from previous version and modify"
+  run_load_test(sbox, "copy-from-previous-version-and-modify.dump")
+
+def modified_in_place_dump(sbox):
+  "dump: modified in place"
+  run_dump_test(sbox, "modified-in-place.dump")
+
+def modified_in_place_load(sbox):
+  "load: modified in place"
+  run_load_test(sbox, "modified-in-place.dump")
+
+def move_and_modify_in_the_same_revision_dump(sbox):
+  "dump: move parent & modify child file in same rev"
+  run_dump_test(sbox, "move-and-modify.dump")
+
+def move_and_modify_in_the_same_revision_load(sbox):
+  "load: move parent & modify child file in same rev"
+  run_load_test(sbox, "move-and-modify.dump")
+
+def tag_empty_trunk_dump(sbox):
+  "dump: tag empty trunk"
+  run_dump_test(sbox, "tag-empty-trunk.dump")
+
+def tag_empty_trunk_load(sbox):
+  "load: tag empty trunk"
+  run_load_test(sbox, "tag-empty-trunk.dump")
+
+def dir_prop_change_dump(sbox):
+  "dump: directory property changes"
+  run_dump_test(sbox, "dir-prop-change.dump")
+  
+def dir_prop_change_load(sbox):
+  "load: directory property changes"
+  run_load_test(sbox, "dir-prop-change.dump")
+
+def copy_parent_modify_prop_dump(sbox):
+  "dump: copy parent and modify prop"
+  run_dump_test(sbox, "copy-parent-modify-prop.dump")
+
+def copy_parent_modify_prop_load(sbox):
+  "load: copy parent and modify prop"
+  run_load_test(sbox, "copy-parent-modify-prop.dump")
+
+def copy_revprops_dump(sbox):
+  "dump: copy revprops other than svn:*"
+  run_dump_test(sbox, "revprops.dump")
+
+def copy_revprops_load(sbox):
+  "load: copy revprops other than svn:*"
+  run_load_test(sbox, "revprops.dump")
+
+def url_encoding_dump(sbox):
+  "dump: url encoding issues"
+  run_dump_test(sbox, "url-encoding-bug.dump")
+
+def url_encoding_load(sbox):
+  "load: url encoding issues"
+  run_load_test(sbox, "url-encoding-bug.dump")
+
 ########################################################################
 # Run the tests
 
@@ -176,8 +261,26 @@ test_list = [ None,
               revision_0_dump,
               revision_0_load,
               skeleton_load,
+              copy_and_modify_dump,
               copy_and_modify_load,
-              Wimp("Need to fix headers in RA layer", copy_and_modify_dump),
+              copy_from_previous_version_and_modify_dump,
+              copy_from_previous_version_and_modify_load,
+              modified_in_place_dump,
+              modified_in_place_load,
+              tag_empty_trunk_dump,
+              tag_empty_trunk_load,
+              dir_prop_change_dump,
+              dir_prop_change_load,
+              copy_parent_modify_prop_dump,
+              copy_parent_modify_prop_load,
+              url_encoding_dump,
+              url_encoding_load,
+              copy_revprops_dump,
+              Wimp("TODO", copy_revprops_load),
+              no_author_dump,
+              no_author_load,
+              Wimp("TODO", move_and_modify_in_the_same_revision_dump),
+              Wimp("TODO", move_and_modify_in_the_same_revision_load),
              ]
 
 if __name__ == '__main__':

Modified: 
subversion/branches/object-model/subversion/tests/cmdline/svntest/verify.py
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/cmdline/svntest/verify.py?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/tests/cmdline/svntest/verify.py 
(original)
+++ subversion/branches/object-model/subversion/tests/cmdline/svntest/verify.py 
Tue Sep 21 10:37:35 2010
@@ -108,7 +108,7 @@ class ExpectedOutput:
   def __cmp__(self, other):
     raise 'badness'
 
-  def matches(self, other):
+  def matches(self, other, except_re=None):
     """Return whether SELF.output matches OTHER (which may be a list
     of newline-terminated lines, or a single string).  Either value
     may be None."""
@@ -126,7 +126,31 @@ class ExpectedOutput:
     if not isinstance(expected, list):
       expected = [expected]
 
-    return self.is_equivalent_list(expected, actual)
+    if except_re:
+      return self.matches_except(expected, actual, except_re)
+    else:
+      return self.is_equivalent_list(expected, actual)
+
+  def matches_except(self, expected, actual, except_re):
+    "Return whether EXPECTED and ACTUAL match except for except_re."
+    if not self.is_regex:
+      i_expected = 0
+      i_actual = 0
+      while i_expected < len(expected) and i_actual < len(actual):
+        if re.match(except_re, actual[i_actual]):
+          i_actual += 1
+        elif re.match(except_re, expected[i_expected]):
+          i_expected += 1
+        elif expected[i_expected] == actual[i_actual]:
+          i_expected += 1
+          i_actual += 1
+        else:
+          return False
+      if i_expected == len(expected) and i_actual == len(actual):
+            return True
+      return False
+    else:
+      raise Exception("is_regex and except_re are mutually exclusive")
 
   def is_equivalent_list(self, expected, actual):
     "Return whether EXPECTED and ACTUAL are equivalent."
@@ -308,7 +332,7 @@ def display_lines(message, label, expect
       sys.stdout.write(x)
 
 def compare_and_display_lines(message, label, expected, actual,
-                              raisable=None):
+                              raisable=None, except_re=None):
   """Compare two sets of output lines, and print them if they differ,
   preceded by MESSAGE iff not None.  EXPECTED may be an instance of
   ExpectedOutput (and if not, it is wrapped as such).  RAISABLE is an
@@ -325,7 +349,7 @@ def compare_and_display_lines(message, l
     actual = [actual]
   actual = [line for line in actual if not line.startswith('DBG:')]
 
-  if not expected.matches(actual):
+  if not expected.matches(actual, except_re):
     expected.display_differences(message, label, actual)
     raise raisable
 

Modified: subversion/branches/object-model/subversion/tests/libsvn_fs/fs-test.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/object-model/subversion/tests/libsvn_fs/fs-test.c?rev=999304&r1=999303&r2=999304&view=diff
==============================================================================
--- subversion/branches/object-model/subversion/tests/libsvn_fs/fs-test.c 
(original)
+++ subversion/branches/object-model/subversion/tests/libsvn_fs/fs-test.c Tue 
Sep 21 10:37:35 2010
@@ -586,12 +586,12 @@ list_directory(const svn_test_opts_t *op
 }
 
 
-/* If EXPR raises SVN_ERR_BAD_PROPERTY_VALUE, continue; else, fail
+/* If EXPR raises SVN_ERR_FS_PROP_BASEVALUE_MISMATCH, continue; else, fail
  * the test. */
-#define FAILS_WITH_BPV(expr) \
+#define FAILS_WITH_BOV(expr) \
   do { \
       svn_error_t *__err = (expr); \
-      if (!__err || __err->apr_err != SVN_ERR_BAD_PROPERTY_VALUE) \
+      if (!__err || __err->apr_err != SVN_ERR_FS_PROP_BASEVALUE_MISMATCH) \
         return svn_error_create(SVN_ERR_TEST_FAILED, __err, \
                                 "svn_fs_change_rev_prop2() failed to " \
                                 "detect unexpected old value"); \
@@ -662,18 +662,18 @@ revision_props(const svn_test_opts_t *op
 
       /* Value of "flower" is 's1'. */
 
-      FAILS_WITH_BPV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, 
pool));
+      FAILS_WITH_BOV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, 
pool));
       s1_dup = svn_string_dup(&s1, pool);
       SVN_ERR(svn_fs_change_rev_prop2(fs, 0, "flower", &s1_dup, s2_p, pool));
 
       /* Value of "flower" is 's2'. */
 
-      FAILS_WITH_BPV(svn_fs_change_rev_prop2(fs, 0, "flower", &s1_p, NULL, 
pool));
+      FAILS_WITH_BOV(svn_fs_change_rev_prop2(fs, 0, "flower", &s1_p, NULL, 
pool));
       SVN_ERR(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, NULL, pool));
 
       /* Value of "flower" is <not set>. */
 
-      FAILS_WITH_BPV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, 
pool));
+      FAILS_WITH_BOV(svn_fs_change_rev_prop2(fs, 0, "flower", &s2_p, s1_p, 
pool));
       SVN_ERR(svn_fs_change_rev_prop2(fs, 0, "flower", &unset, s1_p, pool));
 
       /* Value of "flower" is 's1'. */


Reply via email to