You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ar...@apache.org on 2012/07/30 08:39:38 UTC

svn commit: r1367002 [13/21] - in /subversion/branches/svn-bisect: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/client-side/emacs/ contrib/server-side/mod_dontdothat/ notes/ notes/api-errata/1.7/ notes/http-and-webdav/...

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/update_editor.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/update_editor.c Mon Jul 30 06:39:28 2012
@@ -4715,59 +4715,9 @@ close_edit(void *edit_baton,
   return SVN_NO_ERROR;
 }
 
-
 
 /*** Returning editors. ***/
 
-struct fetch_baton
-{
-  svn_wc__db_t *db;
-  const char *target_abspath;
-};
-
-static svn_error_t *
-fetch_props_func(apr_hash_t **props,
-                 void *baton,
-                 const char *path,
-                 apr_pool_t *result_pool,
-                 apr_pool_t *scratch_pool)
-{
-  struct fetch_baton *fpb = baton;
-  const char *local_abspath = svn_dirent_join(fpb->target_abspath, path,
-                                              scratch_pool);
-  svn_error_t *err;
-
-  err = svn_wc__db_read_props(props, fpb->db, local_abspath,
-                              result_pool, scratch_pool);
-
-  /* If the path doesn't exist, just return an empty set of props. */
-  if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-    {
-      svn_error_clear(err);
-      *props = apr_hash_make(result_pool);
-    }
-  else if (err)
-    return svn_error_trace(err);
-
-  return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-fetch_kind_func(svn_kind_t *kind,
-                void *baton,
-                const char *path,
-                apr_pool_t *scratch_pool)
-{
-  struct fetch_baton *fpb = baton;
-  const char *local_abspath = svn_dirent_join(fpb->target_abspath, path,
-                                              scratch_pool);
-
-  SVN_ERR(svn_wc__db_read_kind(kind, fpb->db, local_abspath, FALSE,
-                               scratch_pool));
-  
-  return SVN_NO_ERROR;
-}
-
 /* Helper for the three public editor-supplying functions. */
 static svn_error_t *
 make_editor(svn_revnum_t *target_revision,
@@ -4805,7 +4755,7 @@ make_editor(svn_revnum_t *target_revisio
   svn_delta_editor_t *tree_editor = svn_delta_default_editor(edit_pool);
   const svn_delta_editor_t *inner_editor;
   const char *repos_root, *repos_uuid;
-  struct fetch_baton *fpb;
+  struct svn_wc__shim_fetch_baton_t *sfb;
   svn_delta_shim_callbacks_t *shim_callbacks =
                                 svn_delta_shim_callbacks_default(edit_pool);
 
@@ -5035,14 +4985,15 @@ make_editor(svn_revnum_t *target_revisio
                                             edit_baton,
                                             result_pool));
 
-  fpb = apr_palloc(result_pool, sizeof(*fpb));
-  fpb->db = db;
-  fpb->target_abspath = eb->target_abspath;
-
-  shim_callbacks->fetch_kind_func = fetch_kind_func;
-  shim_callbacks->fetch_kind_baton = fpb;
-  shim_callbacks->fetch_props_func = fetch_props_func;
-  shim_callbacks->fetch_props_baton = fpb;
+  sfb = apr_palloc(result_pool, sizeof(*sfb));
+  sfb->db = db;
+  sfb->base_abspath = eb->anchor_abspath;
+  sfb->fetch_base = TRUE;
+
+  shim_callbacks->fetch_kind_func = svn_wc__fetch_kind_func;
+  shim_callbacks->fetch_props_func = svn_wc__fetch_props_func;
+  shim_callbacks->fetch_base_func = svn_wc__fetch_base_func;
+  shim_callbacks->fetch_baton = sfb;
 
   SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
                                    shim_callbacks, result_pool, scratch_pool));
@@ -5052,7 +5003,7 @@ make_editor(svn_revnum_t *target_revisio
 
 
 svn_error_t *
-svn_wc_get_update_editor4(const svn_delta_editor_t **editor,
+svn_wc__get_update_editor(const svn_delta_editor_t **editor,
                           void **edit_baton,
                           svn_revnum_t *target_revision,
                           svn_wc_context_t *wc_ctx,
@@ -5095,7 +5046,7 @@ svn_wc_get_update_editor4(const svn_delt
 }
 
 svn_error_t *
-svn_wc_get_switch_editor4(const svn_delta_editor_t **editor,
+svn_wc__get_switch_editor(const svn_delta_editor_t **editor,
                           void **edit_baton,
                           svn_revnum_t *target_revision,
                           svn_wc_context_t *wc_ctx,

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/util.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/util.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/util.c Mon Jul 30 06:39:28 2012
@@ -533,3 +533,94 @@ svn_wc__status2_from_3(svn_wc_status2_t 
 
   return SVN_NO_ERROR;
 }
+
+
+svn_error_t *
+svn_wc__fetch_kind_func(svn_kind_t *kind,
+                        void *baton,
+                        const char *path,
+                        svn_revnum_t base_revision,
+                        apr_pool_t *scratch_pool)
+{
+  struct svn_wc__shim_fetch_baton_t *sfb = baton;
+  const char *local_abspath = svn_dirent_join(sfb->base_abspath, path,
+                                              scratch_pool);
+
+  SVN_ERR(svn_wc__db_read_kind(kind, sfb->db, local_abspath, FALSE,
+                               scratch_pool));
+  
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
+svn_wc__fetch_props_func(apr_hash_t **props,
+                         void *baton,
+                         const char *path,
+                         svn_revnum_t base_revision,
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool)
+{
+  struct svn_wc__shim_fetch_baton_t *sfb = baton;
+  const char *local_abspath = svn_dirent_join(sfb->base_abspath, path,
+                                              scratch_pool);
+  svn_error_t *err;
+
+  if (sfb->fetch_base)
+    err = svn_wc__db_base_get_props(props, sfb->db, local_abspath, result_pool,
+                                    scratch_pool);
+  else
+    err = svn_wc__db_read_props(props, sfb->db, local_abspath,
+                                result_pool, scratch_pool);
+
+  /* If the path doesn't exist, just return an empty set of props. */
+  if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+    {
+      svn_error_clear(err);
+      *props = apr_hash_make(result_pool);
+    }
+  else if (err)
+    return svn_error_trace(err);
+
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
+svn_wc__fetch_base_func(const char **filename,
+                        void *baton,
+                        const char *path,
+                        svn_revnum_t base_revision,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
+{
+  struct svn_wc__shim_fetch_baton_t *sfb = baton;
+  const svn_checksum_t *checksum;
+  svn_error_t *err;
+  const char *local_abspath = svn_dirent_join(sfb->base_abspath, path,
+                                              scratch_pool);
+
+  err = svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL,
+                                 NULL, NULL, NULL, NULL, &checksum,
+                                 NULL, NULL, NULL, NULL, sfb->db,
+                                 local_abspath, scratch_pool, scratch_pool);
+  if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+    {
+      svn_error_clear(err);
+      *filename = NULL;
+      return SVN_NO_ERROR;
+    }
+  else if (err)
+    return svn_error_trace(err);
+
+  if (checksum == NULL)
+    {
+      *filename = NULL;
+      return SVN_NO_ERROR;
+    }
+
+  SVN_ERR(svn_wc__db_pristine_get_path(filename, sfb->db, local_abspath,
+                                       checksum, scratch_pool, scratch_pool));
+
+  return SVN_NO_ERROR;
+}

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/wc-metadata.sql?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc-metadata.sql Mon Jul 30 06:39:28 2012
@@ -383,8 +383,9 @@ CREATE TABLE NODES (
      perhaps add a column called "moved_from". */
 
   /* Boolean value, specifying if this node was moved here (rather than just
-     copied). The source of the move is implied by a different node with
-     a moved_to column pointing at this node. */
+     copied). This is set on all the nodes in the moved tree.  The source of
+     the move is implied by a different node with a moved_to column pointing
+     at the root node of the moved tree. */
   moved_here  INTEGER,
 
   /* If the underlying node was moved away (rather than just deleted), this

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/wc.h?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc.h Mon Jul 30 06:39:28 2012
@@ -620,6 +620,7 @@ svn_wc__internal_get_origin(svn_boolean_
                             const char **repos_relpath,
                             const char **repos_root_url,
                             const char **repos_uuid,
+                            const char **copy_root_abspath,
                             svn_wc__db_t *db,
                             const char *local_abspath,
                             svn_boolean_t scan_deleted,
@@ -724,6 +725,41 @@ svn_wc__perform_file_merge(svn_skel_t **
                            apr_pool_t *scratch_pool);
 
 
+/* Couple of random helpers for the Ev2 shims.
+   ### These will eventually be obsoleted and removed. */
+struct svn_wc__shim_fetch_baton_t
+{
+  svn_wc__db_t *db;
+  const char *base_abspath;
+  svn_boolean_t fetch_base;
+};
+
+/* Using a BATON of struct shim_fetch_baton, return KIND for PATH. */
+svn_error_t *
+svn_wc__fetch_kind_func(svn_kind_t *kind,
+                        void *baton,
+                        const char *path,
+                        svn_revnum_t base_revision,
+                        apr_pool_t *scratch_pool);
+
+/* Using a BATON of struct shim_fetch_baton, return PROPS for PATH. */
+svn_error_t *
+svn_wc__fetch_props_func(apr_hash_t **props,
+                         void *baton,
+                         const char *path,
+                         svn_revnum_t base_revision,
+                         apr_pool_t *result_pool,
+                         apr_pool_t *scratch_pool);
+
+/* Using a BATON of struct shim_fetch_baton, return a delta base for PATH. */
+svn_error_t *
+svn_wc__fetch_base_func(const char **filename,
+                        void *baton,
+                        const char *path,
+                        svn_revnum_t base_revision,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.c Mon Jul 30 06:39:28 2012
@@ -3781,6 +3781,7 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr
                           apr_int64_t repos_id,
                           const char *repos_relpath,
                           svn_revnum_t revision,
+                          svn_boolean_t is_move,
                           apr_pool_t *scratch_pool)
 {
   const apr_array_header_t *children;
@@ -3898,13 +3899,15 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr
         SVN_ERR(svn_sqlite__get_statement(&stmt, src_wcroot->sdb,
                              STMT_INSERT_WORKING_NODE_COPY_FROM_BASE));
 
+      /* Perhaps we should avoid setting moved_here to 0 and leave it
+         null instead? */
       SVN_ERR(svn_sqlite__bindf(stmt, "issisti",
                         src_wcroot->wc_id, src_relpath,
                         dst_relpath,
                         dst_op_depth,
                         svn_relpath_dirname(dst_relpath, iterpool),
                         presence_map, dst_presence,
-                        (apr_int64_t)0));
+                        (apr_int64_t)(is_move ? 1 : 0)));
 
       if (src_op_depth > 0)
         SVN_ERR(svn_sqlite__bind_int64(stmt, 8, src_op_depth));
@@ -3965,7 +3968,7 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr
                          src_wcroot, child_src_relpath, src_op_depth,
                          dst_wcroot, child_dst_relpath, dst_op_depth,
                          del_op_depth,
-                         repos_id, child_repos_relpath, revision,
+                         repos_id, child_repos_relpath, revision, is_move,
                          scratch_pool));
     }
 
@@ -4040,7 +4043,7 @@ op_copy_shadowed_layer_txn(void * baton,
                         ocb->src_wcroot, ocb->src_relpath, src_op_depth,
                         ocb->dst_wcroot, ocb->dst_relpath, dst_op_depth,
                         del_op_depth,
-                        repos_id, repos_relpath, revision,
+                        repos_id, repos_relpath, revision, ocb->is_move,
                         scratch_pool));
 
   return SVN_NO_ERROR;
@@ -4050,6 +4053,7 @@ svn_error_t *
 svn_wc__db_op_copy_shadowed_layer(svn_wc__db_t *db,
                                   const char *src_abspath,
                                   const char *dst_abspath,
+                                  svn_boolean_t is_move,
                                   apr_pool_t *scratch_pool)
 {
   struct op_copy_baton ocb = {0};
@@ -4069,6 +4073,7 @@ svn_wc__db_op_copy_shadowed_layer(svn_wc
                                                 scratch_pool, scratch_pool));
   VERIFY_USABLE_WCROOT(ocb.dst_wcroot);
 
+  ocb.is_move = is_move;
   ocb.work_items = NULL;
 
   /* Call with the sdb in src_wcroot. It might call itself again to
@@ -6355,11 +6360,8 @@ delete_node(void *baton,
           /* The node has already been moved, possibly along with a parent,
            * and is being moved again. Update the existing moved_to path
            * in the BASE node. */
-          SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                            STMT_UPDATE_MOVED_TO_RELPATH));
-          SVN_ERR(svn_sqlite__bindf(stmt, "iss", wcroot->wc_id,
-                                    moved_from_relpath, b->moved_to_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
+          SVN_ERR(delete_update_movedto(wcroot, moved_from_relpath,
+                                        b->moved_to_relpath, scratch_pool));
         }
 
       /* If a subtree is being moved-away, we need to update moved-to
@@ -6548,12 +6550,8 @@ delete_node(void *baton,
       if (b->moved_to_relpath)
         {
           /* Record moved-to relpath in BASE. */
-          SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
-                                            STMT_UPDATE_MOVED_TO_RELPATH));
-          SVN_ERR(svn_sqlite__bindf(stmt, "iss",
-                                    wcroot->wc_id, local_relpath,
-                                    b->moved_to_relpath));
-          SVN_ERR(svn_sqlite__step_done(stmt));
+          SVN_ERR(delete_update_movedto(wcroot, local_relpath,
+                                        b->moved_to_relpath, scratch_pool));
         }
 
       /* Delete the node and possible descendants. */
@@ -7134,6 +7132,49 @@ read_info(svn_wc__db_status_t *status,
 
 
 svn_error_t *
+svn_wc__db_read_info_internal(svn_wc__db_status_t *status,
+                              svn_kind_t *kind,
+                              svn_revnum_t *revision,
+                              const char **repos_relpath,
+                              apr_int64_t *repos_id,
+                              svn_revnum_t *changed_rev,
+                              apr_time_t *changed_date,
+                              const char **changed_author,
+                              svn_depth_t *depth,
+                              const svn_checksum_t **checksum,
+                              const char **target,
+                              const char **original_repos_relpath,
+                              apr_int64_t *original_repos_id,
+                              svn_revnum_t *original_revision,
+                              svn_wc__db_lock_t **lock,
+                              svn_filesize_t *recorded_size,
+                              apr_time_t *recorded_mod_time,
+                              const char **changelist,
+                              svn_boolean_t *conflicted,
+                              svn_boolean_t *op_root,
+                              svn_boolean_t *had_props,
+                              svn_boolean_t *props_mod,
+                              svn_boolean_t *have_base,
+                              svn_boolean_t *have_more_work,
+                              svn_boolean_t *have_work,
+                              svn_wc__db_wcroot_t *wcroot,
+                              const char *local_relpath,
+                              apr_pool_t *result_pool,
+                              apr_pool_t *scratch_pool)
+{
+  return svn_error_trace(
+           read_info(status, kind, revision, repos_relpath, repos_id,
+                     changed_rev, changed_date, changed_author,
+                     depth, checksum, target, original_repos_relpath,
+                     original_repos_id, original_revision, lock,
+                     recorded_size, recorded_mod_time, changelist, conflicted,
+                     op_root, had_props, props_mod,
+                     have_base, have_more_work, have_work,
+                     wcroot, local_relpath, result_pool, scratch_pool));
+}
+
+
+svn_error_t *
 svn_wc__db_read_info(svn_wc__db_status_t *status,
                      svn_kind_t *kind,
                      svn_revnum_t *revision,
@@ -7226,7 +7267,7 @@ read_children_info(void *baton,
   svn_boolean_t have_row;
   const char *repos_root_url = NULL;
   const char *repos_uuid = NULL;
-  apr_int64_t last_repos_id;
+  apr_int64_t last_repos_id = INVALID_REPOS_ID;
   apr_hash_t *nodes = rci->nodes;
   apr_hash_t *conflicts = rci->conflicts;
   apr_pool_t *result_pool = rci->result_pool;
@@ -7294,20 +7335,34 @@ read_children_info(void *baton,
             }
           else
             {
+              const char *last_repos_root_url = NULL;
+
               apr_int64_t repos_id = svn_sqlite__column_int64(stmt, 1);
-              if (!repos_root_url)
+              if (!repos_root_url ||
+                  (last_repos_id != INVALID_REPOS_ID &&
+                   repos_id != last_repos_id))
                 {
+                  last_repos_root_url = repos_root_url;
                   err = fetch_repos_info(&repos_root_url, &repos_uuid,
                                          wcroot->sdb, repos_id, result_pool);
                   if (err)
                     SVN_ERR(svn_error_compose_create(err,
-                                                     svn_sqlite__reset(stmt)));
-                  last_repos_id = repos_id;
+                                                 svn_sqlite__reset(stmt)));
                 }
 
+              if (last_repos_id == INVALID_REPOS_ID)
+                last_repos_id = repos_id;
+
               /* Assume working copy is all one repos_id so that a
                  single cached value is sufficient. */
-              SVN_ERR_ASSERT(repos_id == last_repos_id);
+              if (repos_id != last_repos_id)
+                return svn_error_createf(
+                         SVN_ERR_WC_DB_ERROR, NULL,
+                         _("The node '%s' comes from unexpected repository "
+                           "'%s', expected '%s'; if this node is a file "
+                           "external using the correct URL in the external "
+                           "definition can fix the problem, see issue #4087"),
+                         child_relpath, repos_root_url, last_repos_root_url);
               child->repos_root_url = repos_root_url;
               child->repos_uuid = repos_uuid;
             }
@@ -7407,7 +7462,6 @@ read_children_info(void *baton,
       struct svn_wc__db_info_t *child;
       const char *child_relpath = svn_sqlite__column_text(stmt, 7, NULL);
       const char *name = svn_relpath_basename(child_relpath, NULL);
-      svn_error_t *err;
 
       child_item = apr_hash_get(nodes, name, APR_HASH_KEY_STRING);
       if (!child_item)
@@ -7424,6 +7478,7 @@ read_children_info(void *baton,
 #ifdef HAVE_SYMLINK
       if (child->props_mod)
         {
+          svn_error_t *err;
           apr_hash_t *properties;
 
           err = svn_sqlite__column_properties(&properties, stmt, 6,
@@ -10163,9 +10218,6 @@ scan_deletion_txn(void *baton,
           else
             {
               const char *moved_child_relpath;
-              svn_wc__db_status_t moved_child_status;
-              svn_boolean_t found_child;
-              svn_error_t *err;
 
               /* The CURRENT_RELPATH is the op_root of the delete-half of
                * the move. LOCAL_RELPATH is a child that was moved along.
@@ -10178,67 +10230,19 @@ scan_deletion_txn(void *baton,
                                                   moved_child_relpath,
                                                   scratch_pool);
               
-              /* Figure out what happened to the child after it was moved
-               * along. Maybe the child was moved-away further, either by
-               * itself, or along with some intermediate parent node.
-               *
-               * If the child was deleted instead of moved-away,
-               * the resulting MOVED_TO_RELPATH is NULL. */
-              err = read_info(&moved_child_status, NULL, NULL, NULL, NULL,
-                              NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                              NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                              NULL, NULL, NULL, NULL, NULL, NULL, wcroot,
-                              moved_to_relpath, scratch_pool, scratch_pool);
-              if (err)
-                {
-                  if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-                    {
-                      /* Tolerate missing children. A likely cause is that
-                       * the moved-to information in BASE is incorrect.
-                       * Just treat this as a normal deletion. */
-                      svn_error_clear(err); 
-                      moved_to_relpath = NULL;
-                      moved_to_op_root_relpath = NULL;
-                      if (sd_baton->moved_to_relpath)
-                        *sd_baton->moved_to_relpath = NULL;
-                      found_child = FALSE;
-                    }
-                  else
-                    return svn_error_compose_create(err,
-                                                    svn_sqlite__reset(stmt));
-                }
-              else
-                found_child = TRUE;
-
-              if (found_child &&
-                  moved_child_status == svn_wc__db_status_deleted)
-                {
-                  err = scan_deletion(NULL, &moved_to_relpath, NULL,
-                                      NULL, wcroot, moved_to_relpath,
-                                      scratch_pool, scratch_pool);
-                  if (err)
-                   return svn_error_compose_create(err,
-                                                   svn_sqlite__reset(stmt));
-                }
               if (sd_baton->moved_to_relpath)
                 *sd_baton->moved_to_relpath = moved_to_relpath ? 
                   apr_pstrdup(sd_baton->result_pool, moved_to_relpath) : NULL;
             }
 
-          /* CURRENT_RELPATH is the op_root of the delete-half of the move,
-           * so it's the BASE_DEL_RELPATH. */
-          if (sd_baton->base_del_relpath)
-            *sd_baton->base_del_relpath =
-              apr_pstrdup(sd_baton->result_pool, current_relpath);
-
           if (sd_baton->moved_to_op_root_relpath)
             *sd_baton->moved_to_op_root_relpath = moved_to_op_root_relpath ?
               apr_pstrdup(sd_baton->result_pool, moved_to_op_root_relpath)
               : NULL;
 
-          /* If all other out parameters are irrelevant, stop scanning.
-           * Happens to be only WORK_DEL_RELPATH. */
-          if (sd_baton->work_del_relpath == NULL)
+          /* If all other out parameters are irrelevant, stop scanning. */
+          if (sd_baton->work_del_relpath == NULL
+              && sd_baton->base_del_relpath == NULL)
             break;
 
           found_moved_to = TRUE;
@@ -12436,8 +12440,8 @@ svn_wc__db_min_max_revisions(svn_revnum_
 }
 
 
-/* Like svn_wc__db_is_sparse_checkout,
- * but accepts a WCROOT/LOCAL_RELPATH pair. */
+/* Set *IS_SPARSE_CHECKOUT TRUE if LOCAL_RELPATH or any of the nodes
+ * within LOCAL_RELPATH is sparse, FALSE otherwise. */
 static svn_error_t *
 is_sparse_checkout_internal(svn_boolean_t *is_sparse_checkout,
                             svn_wc__db_wcroot_t *wcroot,
@@ -12461,28 +12465,6 @@ is_sparse_checkout_internal(svn_boolean_
 }
 
 
-svn_error_t *
-svn_wc__db_is_sparse_checkout(svn_boolean_t *is_sparse_checkout,
-                              svn_wc__db_t *db,
-                              const char *local_abspath,
-                              apr_pool_t *scratch_pool)
-{
-  svn_wc__db_wcroot_t *wcroot;
-  const char *local_relpath;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
-  SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
-                                                db, local_abspath,
-                                                scratch_pool, scratch_pool));
-  VERIFY_USABLE_WCROOT(wcroot);
-
-  return svn_error_trace(is_sparse_checkout_internal(is_sparse_checkout,
-                                                     wcroot, local_relpath,
-                                                     scratch_pool));
-}
-
-
 /* Like svn_wc__db_has_switched_subtrees(),
  * but accepts a WCROOT/LOCAL_RELPATH pair. */
 static svn_error_t *

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.h?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.h Mon Jul 30 06:39:28 2012
@@ -1238,6 +1238,7 @@ svn_error_t *
 svn_wc__db_op_copy_shadowed_layer(svn_wc__db_t *db,
                                   const char *src_abspath,
                                   const char *dst_abspath,
+                                  svn_boolean_t is_move,
                                   apr_pool_t *scratch_pool);
 
 
@@ -2564,7 +2565,8 @@ svn_wc__db_scan_addition(svn_wc__db_stat
 
    If the user moves-away B/W/D from the WORKING tree, then behavior is
    again dependent upon the origination of B/W. For a plain add, the nodes
-   simply move to the destination. For a copy, a deletion is made at B/W/D,
+   simply move to the destination; this means that B/W/D ceases to be a
+   node and so cannot be scanned. For a copy, a deletion is made at B/W/D,
    and a new copy (of a subtree of the original source) is made at the
    destination. For a move-here, a deletion is made, and a copy is made at
    the destination (we do not track multiple moves; the source is moved to
@@ -2574,13 +2576,6 @@ svn_wc__db_scan_addition(svn_wc__db_stat
 
    There are three further considerations when resolving a deleted node:
 
-     If the BASE B/W/D was moved-away, then BASE_DEL_ABSPATH will specify
-     B/W/D as the root of the BASE deletion (not necessarily B/W as an
-     implicit delete caused by a replacement; only the closest ancestor is
-     reported). The other parameters will operate as normal, based on what
-     is happening in the WORKING tree. Also note that ancestors of B/W/D
-     may report additional, explicit moved-away status.
-
      If the BASE B/W/D was deleted explicitly *and* B/W is a replacement,
      then the explicit deletion is subsumed by the implicit deletion that
      occurred with the B/W replacement. Thus, BASE_DEL_ABSPATH will point
@@ -3045,19 +3040,6 @@ svn_wc__db_min_max_revisions(svn_revnum_
                              svn_boolean_t committed,
                              apr_pool_t *scratch_pool);
 
-/* Indicate in *IS_SPARSE_CHECKOUT whether any of the nodes within
- * LOCAL_ABSPATH is sparse, using DB.
- * Use SCRATCH_POOL for temporary allocations.
- *
- * This function provides a subset of the functionality of
- * svn_wc__db_revision_status() and is more efficient if the caller
- * doesn't need all information returned by svn_wc__db_revision_status(). */
-svn_error_t *
-svn_wc__db_is_sparse_checkout(svn_boolean_t *is_sparse_checkout,
-                              svn_wc__db_t *db,
-                              const char *local_abspath,
-                              apr_pool_t *scratch_pool);
-
 /* Indicate in *IS_SWITCHED whether any node beneath LOCAL_ABSPATH
  * is switched, using DB. Use SCRATCH_POOL for temporary allocations.
  *

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_pristine.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_pristine.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_pristine.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_pristine.c Mon Jul 30 06:39:28 2012
@@ -225,7 +225,15 @@ svn_wc__db_pristine_read(svn_stream_t **
 
   SVN_ERR_ASSERT(contents != NULL);
   SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
-  SVN_ERR_ASSERT(sha1_checksum != NULL);
+
+  /* Some 1.6-to-1.7 wc upgrades created rows without checksums and
+     updating such a row passes NULL here. */
+  if (!sha1_checksum)
+    return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
+                             _("Can't read '%s' from pristine store "
+                               "because no checksum supplied"),
+                             svn_dirent_local_style(wri_abspath, scratch_pool));
+
   SVN_ERR_ASSERT(sha1_checksum->kind == svn_checksum_sha1);
 
   SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_private.h?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_private.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_private.h Mon Jul 30 06:39:28 2012
@@ -54,7 +54,7 @@ struct svn_wc__db_t {
   struct
   {
     svn_stringbuf_t *abspath;
-    svn_node_kind_t kind;
+    svn_kind_t kind;
   } parse_cache;
 
   /* As we grow the state of this DB, allocate that state here. */
@@ -174,6 +174,39 @@ svn_wc__db_util_open_db(svn_sqlite__db_t
                         apr_pool_t *result_pool,
                         apr_pool_t *scratch_pool);
 
+/* Like svn_wc__db_read_info(), but taking WCROOT+LOCAL_RELPATH instead of
+   DB+LOCAL_ABSPATH, and outputting repos ids instead of URL+UUID. */
+svn_error_t *
+svn_wc__db_read_info_internal(svn_wc__db_status_t *status,
+                              svn_kind_t *kind,
+                              svn_revnum_t *revision,
+                              const char **repos_relpath,
+                              apr_int64_t *repos_id,
+                              svn_revnum_t *changed_rev,
+                              apr_time_t *changed_date,
+                              const char **changed_author,
+                              svn_depth_t *depth,
+                              const svn_checksum_t **checksum,
+                              const char **target,
+                              const char **original_repos_relpath,
+                              apr_int64_t *original_repos_id,
+                              svn_revnum_t *original_revision,
+                              svn_wc__db_lock_t **lock,
+                              svn_filesize_t *recorded_size,
+                              apr_time_t *recorded_mod_time,
+                              const char **changelist,
+                              svn_boolean_t *conflicted,
+                              svn_boolean_t *op_root,
+                              svn_boolean_t *had_props,
+                              svn_boolean_t *props_mod,
+                              svn_boolean_t *have_base,
+                              svn_boolean_t *have_more_work,
+                              svn_boolean_t *have_work,
+                              svn_wc__db_wcroot_t *wcroot,
+                              const char *local_relpath,
+                              apr_pool_t *result_pool,
+                              apr_pool_t *scratch_pool);
+
 
 /* Transaction handling */
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_wcroot.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db_wcroot.c Mon Jul 30 06:39:28 2012
@@ -100,16 +100,15 @@ get_old_version(int *version,
    of LOCAL_ABSPATH, using DB and SCRATCH_POOL as needed.
 
    This function may do strange things, but at long as it comes up with the
-   Right Answer, we should be happy.
-
-   Sets *KIND to svn_node_dir for symlinks. */
+   Right Answer, we should be happy. */
 static svn_error_t *
-get_path_kind(svn_node_kind_t *kind,
+get_path_kind(svn_kind_t *kind,
               svn_wc__db_t *db,
               const char *local_abspath,
               apr_pool_t *scratch_pool)
 {
   svn_boolean_t special;
+  svn_node_kind_t node_kind;
 
   /* This implements a *really* simple LRU cache, where "simple" is defined
      as "only one element".  In other words, we remember the most recently
@@ -133,19 +132,17 @@ get_path_kind(svn_node_kind_t *kind,
       svn_stringbuf_set(db->parse_cache.abspath, local_abspath);
     }
 
-  SVN_ERR(svn_io_check_special_path(local_abspath, &db->parse_cache.kind,
+  SVN_ERR(svn_io_check_special_path(local_abspath, &node_kind,
                                     &special, scratch_pool));
 
-  /* The wcroot could be a symlink to a directory. (Issue #2557, #3987) */
-  if (special)
-    db->parse_cache.kind = svn_node_dir;
+  db->parse_cache.kind = svn__kind_from_node_kind(node_kind, special);
   *kind = db->parse_cache.kind;
 
   return SVN_NO_ERROR;
 }
 
 
-/* */
+/* Return an error if the work queue in SDB is non-empty. */
 static svn_error_t *
 verify_no_work(svn_sqlite__db_t *sdb)
 {
@@ -366,7 +363,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
 {
   const char *local_dir_abspath;
   const char *original_abspath = local_abspath;
-  svn_node_kind_t kind;
+  svn_kind_t kind;
   const char *build_relpath;
   svn_wc__db_wcroot_t *probe_wcroot;
   svn_wc__db_wcroot_t *found_wcroot = NULL;
@@ -402,7 +399,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
      ### into wc_db which references a file. calls for directories could
      ### get an early-exit in the hash lookup just above.  */
   SVN_ERR(get_path_kind(&kind, db, local_abspath, scratch_pool));
-  if (kind != svn_node_dir)
+  if (kind != svn_kind_dir)
     {
       /* If the node specified by the path is NOT present, then it cannot
          possibly be a directory containing ".svn/wc.db".
@@ -437,7 +434,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
          many ancestors need to be scanned until we start hitting content
          on the disk. Set ALWAYS_CHECK to keep looking for .svn/entries
          rather than bailing out after the first check.  */
-      if (kind == svn_node_none)
+      if (kind == svn_kind_none)
         always_check = TRUE;
 
       /* Start the scanning at LOCAL_DIR_ABSPATH.  */
@@ -511,6 +508,38 @@ svn_wc__db_wcroot_parse_local_abspath(sv
       if (svn_dirent_is_root(local_abspath, strlen(local_abspath)))
         {
           /* Hit the root without finding a wcroot. */
+
+          /* The wcroot could be a symlink to a directory.
+           * (Issue #2557, #3987). If so, try again, this time scanning
+           * for a db within the directory the symlink points to,
+           * rather than within the symlink's parent directory. */
+          if (kind == svn_kind_symlink)
+            {
+              svn_node_kind_t resolved_kind;
+
+              local_abspath = original_abspath;
+
+              SVN_ERR(svn_io_check_resolved_path(local_abspath,
+                                                 &resolved_kind,
+                                                 scratch_pool));
+              if (resolved_kind == svn_node_dir)
+                {
+                  /* Is this directory recorded in our hash?  */
+                  found_wcroot = apr_hash_get(db->dir_data, local_abspath,
+                                              APR_HASH_KEY_STRING);
+                  if (found_wcroot)
+                    break;
+
+try_symlink_as_dir:
+                  kind = svn_kind_dir;
+                  moved_upwards = FALSE;
+                  local_dir_abspath = local_abspath;
+                  build_relpath = "";
+
+                  continue;
+                }
+            }
+
           return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
                                    _("'%s' is not a working copy"),
                                    svn_dirent_local_style(original_abspath,
@@ -584,6 +613,61 @@ svn_wc__db_wcroot_parse_local_abspath(sv
     *local_relpath = svn_relpath_join(dir_relpath, build_relpath, result_pool);
   }
 
+  if (kind == svn_kind_symlink)
+    {
+      svn_boolean_t retry_if_dir = FALSE;
+      svn_wc__db_status_t status;
+      svn_boolean_t conflicted;
+      svn_error_t *err;
+
+      /* Check if the symlink is versioned or obstructs a versioned node
+       * in this DB -- in that case, use this wcroot. Else, if the symlink
+       * points to a directory, try to find a wcroot in that directory
+       * instead. */
+      
+      err = svn_wc__db_read_info_internal(&status, NULL, NULL, NULL, NULL,
+                                          NULL, NULL, NULL, NULL, NULL, NULL,
+                                          NULL, NULL, NULL, NULL, NULL, NULL,
+                                          NULL, &conflicted, NULL, NULL, NULL,
+                                          NULL, NULL, NULL,
+                                          *wcroot, *local_relpath,
+                                          scratch_pool, scratch_pool);
+      if (err)
+        {
+          if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND
+              && !SVN_WC__ERR_IS_NOT_CURRENT_WC(err))
+            return svn_error_trace(err);
+
+          svn_error_clear(err);
+          retry_if_dir = TRUE; /* The symlink is unversioned. */
+        }
+      else
+        {
+          /* The symlink is versioned, or obstructs a versioned node.
+           * Ignore non-conflicted not-present/excluded nodes.
+           * This allows the symlink to redirect the wcroot query to a
+           * directory, regardless of 'invisible' nodes in this WC. */
+          retry_if_dir = ((status == svn_wc__db_status_not_present ||
+                           status == svn_wc__db_status_excluded ||
+                           status == svn_wc__db_status_server_excluded)
+                          && !conflicted);
+        }
+
+      if (retry_if_dir)
+        {
+          svn_node_kind_t resolved_kind;
+
+          SVN_ERR(svn_io_check_resolved_path(original_abspath,
+                                             &resolved_kind,
+                                             scratch_pool));
+          if (resolved_kind == svn_node_dir)
+            {
+              local_abspath = original_abspath;
+              goto try_symlink_as_dir;
+            }
+        }
+    } 
+
   /* We've found the appropriate WCROOT for the requested path. Stash
      it into that path's directory.  */
   apr_hash_set(db->dir_data,

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.c Mon Jul 30 06:39:28 2012
@@ -668,9 +668,24 @@ run_file_install(svn_wc__db_t *db,
                                       local_relpath,
                                       scratch_pool, scratch_pool));
     }
+  else if (! checksum)
+    {
+      /* This error replaces a previous assertion. Reporting an error from here
+         leaves the workingqueue operation in place, so the working copy is
+         still broken!
+
+         But when we report this error the user at least knows what node has
+         this specific problem, so maybe we can find out why users see this
+         error */
+      return svn_error_createf(SVN_ERR_WC_CORRUPT_TEXT_BASE, NULL,
+                               _("Can't install '%s' from pristine store, "
+                                 "because no checksum is recorded for this "
+                                 "file"),
+                               svn_dirent_local_style(local_abspath,
+                                                      scratch_pool));
+    }
   else
     {
-      SVN_ERR_ASSERT(checksum != NULL);
       SVN_ERR(svn_wc__db_pristine_get_future_path(&source_abspath,
                                                   wcroot_abspath,
                                                   checksum,

Modified: subversion/branches/svn-bisect/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_authz_svn/mod_authz_svn.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_authz_svn/mod_authz_svn.c Mon Jul 30 06:39:28 2012
@@ -48,10 +48,11 @@
 #include "private/svn_fspath.h"
 
 
-extern module AP_MODULE_DECLARE_DATA authz_svn_module;
-
 #ifdef APLOG_USE_MODULE
 APLOG_USE_MODULE(authz_svn);
+#else
+/* This is part of the APLOG_USE_MODULE() macro in httpd-2.3 */
+extern module AP_MODULE_DECLARE_DATA authz_svn_module;
 #endif
 
 typedef struct authz_svn_config_rec {

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/dav_svn.h?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/dav_svn.h Mon Jul 30 06:39:28 2012
@@ -385,6 +385,9 @@ const char *dav_svn__get_root_dir(reques
 /* Return the data compression level to be used over the wire. */
 int dav_svn__get_compression_level(void);
 
+/* Return the hook script environment parsed from the configuration. */
+apr_hash_t *dav_svn__get_hooks_env(request_rec *r);
+
 /** For HTTP protocol v2, these are the new URIs and URI stubs
     returned to the client in our OPTIONS response.  They all depend
     on the 'special uri', which is configurable in httpd.conf.  **/
@@ -737,7 +740,7 @@ dav_svn__authz_read_func(dav_svn__authz_
 dav_error *
 dav_svn__new_error_tag(apr_pool_t *pool,
                        int status,
-                       int errno_id,
+                       int error_id,
                        const char *desc,
                        const char *namespace,
                        const char *tagname);
@@ -752,7 +755,7 @@ dav_svn__new_error_tag(apr_pool_t *pool,
 dav_error *
 dav_svn__new_error(apr_pool_t *pool,
                    int status,
-                   int errno_id,
+                   int error_id,
                    const char *desc);
 
 
@@ -950,6 +953,14 @@ dav_svn__final_flush_or_error(request_re
                               ap_filter_t *output, dav_error *preferred_err,
                               apr_pool_t *pool);
 
+/* Log a DAV error response.
+ *
+ * NOTE: Copied from mod_dav's dav_log_err which is not public.
+ */
+void dav_svn__log_err(request_rec *r,
+                      dav_error *err,
+                      int level);
+
 /* Send a "standardized" DAV error response based on the ERR's
  * namespace and tag.
  *

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/liveprops.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/liveprops.c Mon Jul 30 06:39:28 2012
@@ -25,6 +25,7 @@
 
 #include <httpd.h>
 #include <http_core.h>
+#include <http_log.h>
 #include <util_xml.h>
 #include <mod_dav.h>
 
@@ -281,6 +282,9 @@ insert_prop_internal(const dav_resource 
   int global_ns;
   svn_error_t *serr;
 
+  /* ### TODO proper errors */
+  static const char *const error_value = "###error###";
+
   /*
   ** Almost none of the SVN provider properties are defined if the
   ** resource does not exist.  We do need to return the one VCC
@@ -377,9 +381,14 @@ insert_prop_internal(const dav_resource 
                                            scratch_pool);
             if (serr != NULL)
               {
-                /* ### what to do? */
+                ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                              resource->info->r,
+                              "Can't get created-rev of '%s': "
+                              "%s",
+                              resource->info->repos_path,
+                              serr->message);
                 svn_error_clear(serr);
-                value = "###error###";
+                value = error_value;
                 break;
               }
           }
@@ -395,9 +404,14 @@ insert_prop_internal(const dav_resource 
                                 scratch_pool);
         if (serr)
           {
-            /* ### what to do? */
+            ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                          resource->info->r,
+                          "Can't get author of r%ld: "
+                          "%s",
+                          committed_rev,
+                          serr->message);
             svn_error_clear(serr);
-            value = "###error###";
+            value = error_value;
             break;
           }
 
@@ -425,8 +439,14 @@ insert_prop_internal(const dav_resource 
                                   resource->info->repos_path, scratch_pool);
         if (serr != NULL)
           {
+            ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                          resource->info->r,
+                          "Can't get filesize of '%s': "
+                          "%s",
+                          resource->info->repos_path,
+                          serr->message);
             svn_error_clear(serr);
-            value = "0";  /* ### what to do? */
+            value = error_value;
             break;
           }
 
@@ -538,9 +558,15 @@ insert_prop_internal(const dav_resource 
                                      scratch_pool);
           if (serr != NULL)
             {
-              /* ### what to do? */
+              ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                            resource->info->r,
+                            "Can't get youngest revision in '%s': "
+                            "%s",
+                            svn_fs_path(resource->info->repos->fs,
+                                        scratch_pool),
+                            serr->message);
               svn_error_clear(serr);
-              value = "###error###";
+              value = error_value;
               break;
             }
           s = dav_svn__build_uri(resource->info->repos,
@@ -612,9 +638,14 @@ insert_prop_internal(const dav_resource 
                                          scratch_pool);
           if (serr != NULL)
             {
-              /* ### what to do? */
+              ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                            resource->info->r,
+                            "Can't get created-rev of '%s': "
+                            "%s",
+                            resource->info->repos_path,
+                            serr->message);
               svn_error_clear(serr);
-              value = "###error###";
+              value = error_value;
               break;
             }
 
@@ -643,20 +674,32 @@ insert_prop_internal(const dav_resource 
               || resource->type == DAV_RESOURCE_TYPE_WORKING
               || resource->type == DAV_RESOURCE_TYPE_VERSION))
         {
+          svn_node_kind_t kind;
           svn_checksum_t *checksum;
 
-          serr = svn_fs_file_checksum(&checksum, svn_checksum_md5,
-                                      resource->info->root.root,
-                                      resource->info->repos_path, TRUE,
-                                      scratch_pool);
+          serr = svn_fs_check_path(&kind, resource->info->root.root,
+                                   resource->info->repos_path, scratch_pool);
+          if (!serr && kind == svn_node_file)
+            serr = svn_fs_file_checksum(&checksum, svn_checksum_md5,
+                                        resource->info->root.root,
+                                        resource->info->repos_path, TRUE,
+                                        scratch_pool);
           if (serr != NULL)
             {
-              /* ### what to do? */
+              ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                            resource->info->r,
+                            "Can't fetch or compute MD5 checksum of '%s': "
+                            "%s",
+                            resource->info->repos_path,
+                            serr->message);
               svn_error_clear(serr);
-              value = "###error###";
+              value = error_value;
               break;
             }
 
+          if (kind != svn_node_file)
+            return DAV_PROP_INSERT_NOTSUPP;
+
           value = svn_checksum_to_cstring(checksum, scratch_pool);
 
           if (! value)
@@ -671,9 +714,14 @@ insert_prop_internal(const dav_resource 
       serr = svn_fs_get_uuid(resource->info->repos->fs, &value, scratch_pool);
       if (serr != NULL)
         {
-          /* ### what to do? */
+          ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                        resource->info->r,
+                        "Can't fetch UUID of '%s': "
+                        "%s",
+                        svn_fs_path(resource->info->repos->fs, scratch_pool),
+                        serr->message);
           svn_error_clear(serr);
-          value = "###error###";
+          value = error_value;
           break;
         }
       break;
@@ -691,9 +739,14 @@ insert_prop_internal(const dav_resource 
                                     resource->info->repos_path, scratch_pool);
         if (serr != NULL)
           {
-            /* ### what to do? */
+            ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err, 
+                          resource->info->r,
+                          "Can't fetch proplist of '%s': "
+                          "%s",
+                          resource->info->repos_path,
+                          serr->message);
             svn_error_clear(serr);
-            value = "###error###";
+            value = error_value;
             break;
           }
 

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/lock.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/lock.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/lock.c Mon Jul 30 06:39:28 2012
@@ -149,7 +149,7 @@ unescape_xml(const char **output,
 
   apr_xml_to_text(pool, xml_doc->root, APR_XML_X2T_INNER,
                   xml_doc->namespaces, NULL, output, NULL);
-  return SVN_NO_ERROR;
+  return NULL;
 }
 
 

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/merge.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/merge.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/merge.c Mon Jul 30 06:39:28 2012
@@ -362,5 +362,5 @@ dav_svn__merge_response(ap_filter_t *out
   /* send whatever is left in the brigade */
   (void) ap_pass_brigade(output, bb);
 
-  return SVN_NO_ERROR;
+  return NULL;
 }

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/mod_dav_svn.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/mod_dav_svn.c Mon Jul 30 06:39:28 2012
@@ -22,7 +22,10 @@
  * ====================================================================
  */
 
+#include <stdlib.h>
+
 #include <apr_strings.h>
+#include <apr_hash.h>
 
 #include <httpd.h>
 #include <http_config.h>
@@ -55,6 +58,7 @@
 /* per-server configuration */
 typedef struct server_conf_t {
   const char *special_uri;
+  svn_boolean_t use_utf8;
 } server_conf_t;
 
 
@@ -91,6 +95,7 @@ typedef struct dir_conf_t {
   const char *activities_db;         /* path to activities database(s) */
   enum conf_flag txdelta_cache;      /* whether to enable txdelta caching */
   enum conf_flag fulltext_cache;     /* whether to enable fulltext caching */
+  apr_hash_t *hooks_env;             /* environment for hook scripts */
 } dir_conf_t;
 
 
@@ -111,6 +116,8 @@ static int
 init(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 {
   svn_error_t *serr;
+  server_conf_t *conf;
+
   ap_add_version_component(p, "SVN/" SVN_VER_NUMBER);
 
   serr = svn_fs_initialize(p);
@@ -123,7 +130,8 @@ init(apr_pool_t *p, apr_pool_t *plog, ap
     }
 
   /* This returns void, so we can't check for error. */
-  svn_utf_initialize(p);
+  conf = ap_get_module_config(s->module_config, &dav_svn_module);
+  svn_utf_initialize2(p, conf->use_utf8);
 
   return OK;
 }
@@ -187,6 +195,7 @@ create_dir_config(apr_pool_t *p, char *d
     conf->root_dir = svn_urlpath__canonicalize(dir, p);
   conf->bulk_updates = CONF_FLAG_ON;
   conf->v2_protocol = CONF_FLAG_ON;
+  conf->hooks_env = apr_hash_make(p);
 
   return conf;
 }
@@ -216,6 +225,7 @@ merge_dir_config(apr_pool_t *p, void *ba
   newconf->txdelta_cache = INHERIT_VALUE(parent, child, txdelta_cache);
   newconf->fulltext_cache = INHERIT_VALUE(parent, child, fulltext_cache);
   newconf->root_dir = INHERIT_VALUE(parent, child, root_dir);
+  newconf->hooks_env = INHERIT_VALUE(parent, child, hooks_env);
 
   if (parent->fs_path)
     ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
@@ -510,6 +520,59 @@ SVNCompressionLevel_cmd(cmd_parms *cmd, 
   return NULL;
 }
 
+static const char *
+SVNUseUTF8_cmd(cmd_parms *cmd, void *config, int arg)
+{
+  server_conf_t *conf;
+
+  conf = ap_get_module_config(cmd->server->module_config,
+                              &dav_svn_module);
+  conf->use_utf8 = arg;
+
+  return NULL;
+}
+
+static const char *
+SVNHooksEnv_cmd(cmd_parms *cmd, void *config, const char *arg1)
+{
+  apr_array_header_t *var;
+
+  var = svn_cstring_split(arg1, "=", TRUE, cmd->pool);
+  if (var && var->nelts >= 2)
+    {
+      dir_conf_t *conf = config;
+      const char *name;
+      const char *val;
+
+      name = apr_pstrdup(apr_hash_pool_get(conf->hooks_env),
+                         APR_ARRAY_IDX(var, 0, const char *));
+
+      /* Special case for values which contain '='. */
+      if (var->nelts > 2)
+        {
+          svn_stringbuf_t *buf;
+          int i;
+
+          buf = svn_stringbuf_create(APR_ARRAY_IDX(var, 1, const char *),
+                                     cmd->pool);
+          for (i = 2; i < var->nelts; i++)
+            {
+              svn_stringbuf_appendbyte(buf, '=');
+              svn_stringbuf_appendcstr(buf, APR_ARRAY_IDX(var, i, const char *));
+            } 
+
+          val = apr_pstrdup(apr_hash_pool_get(conf->hooks_env), buf->data);
+        }
+      else
+        val = apr_pstrdup(apr_hash_pool_get(conf->hooks_env),
+                          APR_ARRAY_IDX(var, 1, const char *));
+
+      apr_hash_set(conf->hooks_env, name, APR_HASH_KEY_STRING, val);
+    }
+
+  return NULL;
+}
+
 
 /** Accessor functions for the module's configuration state **/
 
@@ -787,6 +850,15 @@ dav_svn__get_compression_level(void)
   return svn__compression_level;
 }
 
+apr_hash_t *
+dav_svn__get_hooks_env(request_rec *r)
+{
+  dir_conf_t *conf;
+
+  conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
+  return conf->hooks_env;
+}
+
 static void
 merge_xml_filter_insert(request_rec *r)
 {
@@ -1021,6 +1093,17 @@ static const command_rec cmds[] =
                 "content over the network (0 for no compression, 9 for "
                 "maximum, 5 is default)."),
 
+  /* per server */
+  AP_INIT_FLAG("SVNUseUTF8",
+               SVNUseUTF8_cmd, NULL,
+               RSRC_CONF,
+               "use UTF-8 as native character encoding (default is ASCII)."),
+
+  /* per directory/location */
+  AP_INIT_ITERATE("SVNHooksEnv", SVNHooksEnv_cmd, NULL,
+                  ACCESS_CONF|RSRC_CONF,
+                  "Set the environment of hook scripts via any number of "
+                  "VAR=VAL arguments (the default hook environment is empty)."),
   { NULL }
 };
 

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/log.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/log.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/log.c Mon Jul 30 06:39:28 2012
@@ -30,6 +30,7 @@
 #include "svn_repos.h"
 #include "svn_string.h"
 #include "svn_types.h"
+#include "svn_base64.h"
 #include "svn_xml.h"
 #include "svn_path.h"
 #include "svn_dav.h"
@@ -61,6 +62,9 @@ struct log_receiver_baton
 
   /* whether the client requested any custom revprops */
   svn_boolean_t requested_custom_revprops;
+
+  /* whether the client can handle encoded binary property values */
+  svn_boolean_t encode_binary_props;
 };
 
 
@@ -119,35 +123,50 @@ log_receiver(void *baton,
            hi = apr_hash_next(hi))
         {
           char *name;
-          svn_string_t *value;
+          void *val;
+          const svn_string_t *value;
+          const char *encoding_str = "";
 
           svn_pool_clear(iterpool);
-          apr_hash_this(hi, (void *)&name, NULL, (void *)&value);
+          apr_hash_this(hi, (void *)&name, NULL, &val);
+          value = val;
+
+          /* If the client is okay with us encoding binary (or really,
+             any non-XML-safe) property values, do so as necessary. */
+          if (lrb->encode_binary_props)
+            {
+              if (! svn_xml_is_xml_safe(value->data, value->len))
+                {
+                  value = svn_base64_encode_string2(value, TRUE, iterpool);
+                  encoding_str = " encoding=\"base64\"";
+                }
+            }
+
           if (strcmp(name, SVN_PROP_REVISION_AUTHOR) == 0)
             SVN_ERR(dav_svn__brigade_printf
                     (lrb->bb, lrb->output,
-                     "<D:creator-displayname>%s</D:creator-displayname>"
-                     DEBUG_CR,
+                     "<D:creator-displayname%s>%s</D:creator-displayname>"
+                     DEBUG_CR, encoding_str,
                      apr_xml_quote_string(iterpool, value->data, 0)));
           else if (strcmp(name, SVN_PROP_REVISION_DATE) == 0)
             /* ### this should be DAV:creation-date, but we need to format
                ### that date a bit differently */
             SVN_ERR(dav_svn__brigade_printf
                     (lrb->bb, lrb->output,
-                     "<S:date>%s</S:date>" DEBUG_CR,
+                     "<S:date%s>%s</S:date>" DEBUG_CR, encoding_str,
                      apr_xml_quote_string(iterpool, value->data, 0)));
           else if (strcmp(name, SVN_PROP_REVISION_LOG) == 0)
             SVN_ERR(dav_svn__brigade_printf
                     (lrb->bb, lrb->output,
-                     "<D:comment>%s</D:comment>" DEBUG_CR,
+                     "<D:comment%s>%s</D:comment>" DEBUG_CR, encoding_str,
                      apr_xml_quote_string(pool,
                                           svn_xml_fuzzy_escape(value->data,
                                                                iterpool), 0)));
           else
             SVN_ERR(dav_svn__brigade_printf
                     (lrb->bb, lrb->output,
-                     "<S:revprop name=\"%s\">%s</S:revprop>" DEBUG_CR,
-                     apr_xml_quote_string(iterpool, name, 0),
+                     "<S:revprop name=\"%s\"%s>%s</S:revprop>" DEBUG_CR,
+                     apr_xml_quote_string(iterpool, name, 0), encoding_str,
                      apr_xml_quote_string(iterpool, value->data, 0)));
         }
     }
@@ -305,6 +324,7 @@ dav_svn__log_report(const dav_resource *
   seen_revprop_element = FALSE;
 
   lrb.requested_custom_revprops = FALSE;
+  lrb.encode_binary_props = FALSE;
   for (child = doc->root->first_child; child != NULL; child = child->next)
     {
       /* if this element isn't one of ours, then skip it */
@@ -333,6 +353,8 @@ dav_svn__log_report(const dav_resource *
         strict_node_history = TRUE; /* presence indicates positivity */
       else if (strcmp(child->name, "include-merged-revisions") == 0)
         include_merged_revisions = TRUE; /* presence indicates positivity */
+      else if (strcmp(child->name, "encode-binary-props") == 0)
+        lrb.encode_binary_props = TRUE; /* presence indicates positivity */
       else if (strcmp(child->name, "all-revprops") == 0)
         {
           revprops = NULL; /* presence indicates fetch all revprops */

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/update.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/update.c Mon Jul 30 06:39:28 2012
@@ -955,8 +955,8 @@ dav_svn__update_report(const dav_resourc
           cdata = dav_xml_get_cdata(child, resource->pool, 0);
           if (! *cdata)
             return malformed_element_error(child->name, resource->pool);
-          if ((derr = dav_svn__test_canonical(cdata, resource->pool)))
-            return derr;
+          if (svn_path_is_url(cdata))
+            cdata = svn_uri_canonicalize(cdata, resource->pool);
           if ((serr = dav_svn__simple_parse_uri(&this_info, resource,
                                                 cdata, resource->pool)))
             return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
@@ -970,8 +970,8 @@ dav_svn__update_report(const dav_resourc
           cdata = dav_xml_get_cdata(child, resource->pool, 0);
           if (! *cdata)
             return malformed_element_error(child->name, resource->pool);
-          if ((derr = dav_svn__test_canonical(cdata, resource->pool)))
-            return derr;
+          if (svn_path_is_url(cdata))
+            cdata = svn_uri_canonicalize(cdata, resource->pool);
           if ((serr = dav_svn__simple_parse_uri(&this_info, resource,
                                                 cdata, resource->pool)))
             return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/repos.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/repos.c Mon Jul 30 06:39:28 2012
@@ -1161,6 +1161,7 @@ create_private_resource(const dav_resour
 static void log_warning(void *baton, svn_error_t *err)
 {
   request_rec *r = baton;
+  const char *continuation = "";
 
   /* ### hmm. the FS is cleaned up at request cleanup time. "r" might
      ### not really be valid. we should probably put the FS into a
@@ -1170,7 +1171,15 @@ static void log_warning(void *baton, svn
      ### of our functions ... ??
   */
 
-  ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r, "%s", err->message);
+  /* Not showing file/line so no point in tracing */
+  err = svn_error_purge_tracing(err);
+  while (err)
+    {
+      ap_log_rerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, r, "%s%s",
+                    continuation, err->message);
+      continuation = "-";
+      err = err->child;
+    }
 }
 
 
@@ -1807,6 +1816,8 @@ parse_querystring(request_rec *r, const 
 
   if (prevstr)
     {
+      while (*prevstr == 'r')
+        prevstr++;
       peg_rev = SVN_STR_TO_REV(prevstr);
       if (!SVN_IS_VALID_REVNUM(peg_rev))
         return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
@@ -1824,6 +1835,8 @@ parse_querystring(request_rec *r, const 
   wrevstr = apr_table_get(pairs, "r");
   if (wrevstr)
     {
+      while (*wrevstr == 'r')
+        wrevstr++;
       working_rev = SVN_STR_TO_REV(wrevstr);
       if (!SVN_IS_VALID_REVNUM(working_rev))
         return dav_svn__new_error(pool, HTTP_BAD_REQUEST, 0,
@@ -1904,8 +1917,6 @@ parse_querystring(request_rec *r, const 
   return NULL;
 }
 
-
-
 static dav_error *
 get_resource(request_rec *r,
              const char *root_path,
@@ -2175,6 +2186,9 @@ get_resource(request_rec *r,
                                          "in repos object",
                                          HTTP_INTERNAL_SERVER_ERROR, r);
         }
+
+      /* Configure the hooks environment, if not empty. */
+      svn_repos_hooks_setenv(repos->repos, dav_svn__get_hooks_env(r));
     }
 
   /* cache the filesystem object */
@@ -3231,8 +3245,8 @@ deliver(const dav_resource *resource, ap
                                      resource->pool, resource->pool);
           if (serr != NULL)
             return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
-                                        "couldn't fetch dirents of SVNParentPath",
-                                        resource->pool);
+                                        "could not fetch dirents of "
+                                        "SVNParentPath", resource->pool);
 
           /* convert an io dirent hash to an fs dirent hash. */
           entries = apr_hash_make(resource->pool);
@@ -3250,18 +3264,21 @@ deliver(const dav_resource *resource, ap
               if (dirent->kind == svn_node_file && dirent->special)
                 {
                   svn_node_kind_t resolved_kind;
-                  const char *name = key;
+                  const char *link_path = 
+                    svn_dirent_join(fs_parent_path, key, resource->pool);
 
-                  serr = svn_io_check_resolved_path(name, &resolved_kind,
+                  serr = svn_io_check_resolved_path(link_path, &resolved_kind,
                                                     resource->pool);
-                  if (serr != NULL)
+                  if (serr)
                     return dav_svn__convert_err(serr,
                                                 HTTP_INTERNAL_SERVER_ERROR,
-                                                "couldn't fetch dirents "
-                                                "of SVNParentPath",
+                                                "could not resolve symlink "
+                                                "dirent of SVNParentPath",
                                                 resource->pool);
                   if (resolved_kind != svn_node_dir)
                     continue;
+                  
+                  dirent->kind = svn_node_dir;
                 }
               else if (dirent->kind != svn_node_dir)
                 continue;
@@ -4458,7 +4475,12 @@ int dav_svn__method_post(request_rec *r)
   /* If something went wrong above, we'll generate a response back to
      the client with (hopefully) some helpful information. */
   if (derr)
-    return dav_svn__error_response_tag(r, derr);
+    {
+      /* POST is not a DAV method and so mod_dav isn't involved and
+         won't log this error.  Do it explicitly. */
+      dav_svn__log_err(r, derr, APLOG_ERR);
+      return dav_svn__error_response_tag(r, derr);
+    }
 
   return OK;
 }

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/util.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/util.c Mon Jul 30 06:39:28 2012
@@ -53,9 +53,11 @@ dav_svn__new_error(apr_pool_t *pool,
  * > 2.2 below perpetuates this.
  */
 #if AP_MODULE_MAGIC_AT_LEAST(20091119,0)
-  /* old code assumed errno was valid; keep assuming */
-  return dav_new_error(pool, status, error_id, errno, desc);
+  return dav_new_error(pool, status, error_id, 0, desc);
 #else
+
+  errno = 0; /* For the same reason as in dav_svn__new_error_tag */
+
   return dav_new_error(pool, status, error_id, desc);
 #endif
 }
@@ -620,6 +622,31 @@ dav_svn__final_flush_or_error(request_re
   return derr;
 }
 
+void dav_svn__log_err(request_rec *r,
+                      dav_error *err,
+                      int level)
+{
+    dav_error *errscan;
+
+    /* Log the errors */
+    /* ### should have a directive to log the first or all */
+    for (errscan = err; errscan != NULL; errscan = errscan->prev) {
+        apr_status_t status;
+
+        if (errscan->desc == NULL)
+            continue;
+
+#if AP_MODULE_MAGIC_AT_LEAST(20091119,0)
+        status = errscan->aprerr;
+#else
+        status = errscan->save_errno;
+#endif
+
+        ap_log_rerror(APLOG_MARK, level, status, r,
+                      "%s  [%d, #%d]",
+                      errscan->desc, errscan->status, errscan->error_id);
+    }
+}
 
 int
 dav_svn__error_response_tag(request_rec *r,
@@ -639,8 +666,10 @@ dav_svn__error_response_tag(request_rec 
   if (err->namespace != NULL)
     ap_rprintf(r, " xmlns:C=\"%s\">" DEBUG_CR "<C:%s/>" DEBUG_CR,
                err->namespace, err->tagname);
-  else
+  else if (err->tagname != NULL)
     ap_rprintf(r, ">" DEBUG_CR "<D:%s/>" DEBUG_CR, err->tagname);
+  else
+    ap_rputs(">" DEBUG_CR, r);
 
   /* here's our mod_dav specific tag: */
   if (err->desc != NULL)

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/version.c?rev=1367002&r1=1367001&r2=1367002&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/version.c Mon Jul 30 06:39:28 2012
@@ -1180,7 +1180,7 @@ dav_svn__build_lock_hash(apr_hash_t **lo
   if (! doc)
     {
       *locks = hash;
-      return SVN_NO_ERROR;
+      return NULL;
     }
 
   /* Sanity check. */
@@ -1191,7 +1191,7 @@ dav_svn__build_lock_hash(apr_hash_t **lo
          definitely no lock-tokens to harvest.  This is likely a
          request from an old client. */
       *locks = hash;
-      return SVN_NO_ERROR;
+      return NULL;
     }
 
   if ((doc->root->ns == ns)
@@ -1217,7 +1217,7 @@ dav_svn__build_lock_hash(apr_hash_t **lo
   if (! child)
     {
       *locks = hash;
-      return SVN_NO_ERROR;
+      return NULL;
     }
 
   /* Then look for N different <lock> structures within. */
@@ -1262,7 +1262,7 @@ dav_svn__build_lock_hash(apr_hash_t **lo
     }
 
   *locks = hash;
-  return SVN_NO_ERROR;
+  return NULL;
 }