You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/12/11 01:16:08 UTC

svn commit: r1044548 [17/39] - in /subversion/branches/ignore-mergeinfo: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/ contrib/hook-scripts/ contrib/server-side/ notes/api-errata/ notes/api-err...

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db.h?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/wc_db.h Sat Dec 11 00:15:55 2010
@@ -46,6 +46,8 @@
 #include "private/svn_skel.h"
 #include "private/svn_sqlite.h"
 
+#include "svn_private_config.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
@@ -353,9 +355,6 @@ svn_wc__db_init(svn_wc__db_t *db,
 
    LOCAL_RELPATH will be allocated in RESULT_POOL. All other (temporary)
    allocations will be made in SCRATCH_POOL.
-
-   ### note: with per-dir .svn directories, these relpaths will effectively
-   ### be the basename. it gets interesting in single-db mode
 */
 svn_error_t *
 svn_wc__db_to_relpath(const char **local_relpath,
@@ -679,10 +678,14 @@ svn_wc__db_base_add_not_present_node(svn
    Note that no changes are made to the local filesystem; LOCAL_ABSPATH
    is merely the key to figure out which BASE node to remove.
 
-   If the node is a directory, then ALL child nodes will be removed
-   from the BASE tree, too.
+   To maintain a consistent database this function will also remove
+   any working node that marks LOCAL_ABSPATH as base-deleted.  If this
+   results in there being no working node for LOCAL_ABSPATH then any
+   actual node will be removed if the actual node does not mark a
+   conflict.
 
-   All temporary allocations will be made in SCRATCH_POOL.
+   Note the caller is responsible for removing base node
+   children before calling this function (this may change).
 */
 svn_error_t *
 svn_wc__db_base_remove(svn_wc__db_t *db,
@@ -757,27 +760,6 @@ svn_wc__db_base_get_info(svn_wc__db_stat
                          apr_pool_t *result_pool,
                          apr_pool_t *scratch_pool);
 
-/* Just like svn_wc__db_base_get_info, but always reads information
-   from inside the parent of LOCAL_ABSPATH, to allow reading the
-   information of a node that is obstructed by a separate working
-   copy.
-   
-   ### BH: This information is necessary for svn_wc_add3()'s
-   ###     checkout integration support. Even after we switch to
-   ###     a single db.
-   */
-svn_error_t *
-svn_wc__db_base_get_info_from_parent(svn_wc__db_status_t *status,
-                                     svn_wc__db_kind_t *kind,
-                                     svn_revnum_t *revision,
-                                     const char **repos_relpath,
-                                     const char **repos_root_url,
-                                     const char **repos_uuid,
-                                     svn_wc__db_t *db,
-                                     const char *local_abspath,
-                                     apr_pool_t *result_pool,
-                                     apr_pool_t *scratch_pool);
-
 
 /* Set *PROPVAL to the value of the property named PROPNAME of the node
    LOCAL_ABSPATH in the BASE tree.
@@ -936,9 +918,8 @@ svn_wc__db_pristine_get_tempdir(const ch
 
 /* Install the file TEMPFILE_ABSPATH (which is sitting in a directory given by
    svn_wc__db_pristine_get_tempdir()) into the pristine data store, to be
-   identified by the SHA-1 checksum of its contents, SHA1_CHECKSUM.
-
-   ### the md5_checksum parameter is temporary. */
+   identified by the SHA-1 checksum of its contents, SHA1_CHECKSUM, and whose
+   MD-5 checksum is MD5_CHECKSUM. */
 svn_error_t *
 svn_wc__db_pristine_install(svn_wc__db_t *db,
                             const char *tempfile_abspath,
@@ -1009,41 +990,6 @@ svn_wc__db_pristine_check(svn_boolean_t 
                           apr_pool_t *scratch_pool);
 
 
-/* ### if _check() returns "corrupted pristine file", then this function
-   ### can be used to repair it. It will attempt to restore integrity
-   ### between the SQLite database and the filesystem. Failing that, then
-   ### it will attempt to clean out the record and/or file. Failing that,
-   ### then it will return SOME_ERROR. */
-/* ### dlr: What is this the checksum of? */
-svn_error_t *
-svn_wc__db_pristine_repair(svn_wc__db_t *db,
-                           const char *wri_abspath,
-                           const svn_checksum_t *sha1_checksum,
-                           apr_pool_t *scratch_pool);
-
-
-/* @} */
-
-
-/* @defgroup svn_wc__db_repos  Repository information management
-   @{
-*/
-
-/* Ensure an entry for the repository at REPOS_ROOT_URL with UUID exists
-   in DB for LOCAL_ABSPATH, either by finding the correct row, or inserting
-   a new row.  In either case return the id in *REPOS_ID.
-
-   Use SCRATCH_POOL for temporary allocations.
-*/
-svn_error_t *
-svn_wc__db_repos_ensure(apr_int64_t *repos_id,
-                        svn_wc__db_t *db,
-                        const char *local_abspath,
-                        const char *repos_root_url,
-                        const char *repos_uuid,
-                        apr_pool_t *scratch_pool);
-
-
 /* @} */
 
 
@@ -1051,11 +997,19 @@ svn_wc__db_repos_ensure(apr_int64_t *rep
    @{
 */
 
-/* ### svn cp WCPATH WCPATH ... can copy mixed base/working around */
+/* Copy the node at SRC_ABSPATH (in NODES and ACTUAL_NODE tables) to
+ * DST_ABSPATH, both in DB but not necessarily in the same WC.  The parent
+ * of DST_ABSPATH must be a versioned directory.
+ *
+ * This copy is NOT recursive. It simply establishes this one node, plus
+ * incomplete nodes for the children.
+ *
+ * Add WORK_ITEMS to the work queue. */
 svn_error_t *
 svn_wc__db_op_copy(svn_wc__db_t *db,
                    const char *src_abspath,
                    const char *dst_abspath,
+                   const char *dst_op_root_abspath,
                    const svn_skel_t *work_items,
                    apr_pool_t *scratch_pool);
 
@@ -1163,6 +1117,9 @@ svn_wc__db_op_add_symlink(svn_wc__db_t *
    To specify no properties, PROPS must be an empty hash, not NULL.
    If the node is not present, return an error.
 
+   If PROPS is NULL, set the properties to be the same as the pristine
+   properties.
+
    CONFLICT is used to register a conflict on this node at the same time
    the properties are changed.
 
@@ -1275,6 +1232,16 @@ svn_wc__db_op_mark_resolved(svn_wc__db_t
                             apr_pool_t *scratch_pool);
 
 
+/* Revert all local changes which are being maintained in the database,
+ * including conflict storage, properties and text modification status.
+ */
+svn_error_t *
+svn_wc__db_op_revert_actual(svn_wc__db_t *db,
+                            const char *local_abspath,
+                            apr_pool_t *scratch_pool);
+
+
+
 svn_error_t *
 svn_wc__db_op_revert(svn_wc__db_t *db,
                      const char *local_abspath,
@@ -1515,6 +1482,41 @@ svn_wc__db_read_info(svn_wc__db_status_t
                      apr_pool_t *result_pool,
                      apr_pool_t *scratch_pool);
 
+/* Structure returned by svn_wc__db_read_children_info.  Only has the
+   fields needed by status. */
+struct svn_wc__db_info_t {
+  svn_wc__db_status_t status;
+  svn_wc__db_kind_t kind;
+  svn_revnum_t revnum;
+  const char *repos_relpath;
+  const char *repos_root_url;
+  svn_revnum_t changed_rev;
+  const char *changed_author;
+  apr_time_t changed_date;
+  apr_time_t last_mod_time;
+  svn_depth_t depth;
+  svn_filesize_t translated_size;
+  const char *changelist;
+  svn_boolean_t has_props;
+#ifdef HAVE_SYMLINK
+  svn_boolean_t special;
+#endif
+  svn_boolean_t props_mod;
+  svn_boolean_t have_base;
+  svn_boolean_t conflicted;
+  svn_wc__db_lock_t *lock;
+};
+
+/* Return in *NODES a hash mapping name->struct svn_wc__db_info_t for
+   the children of DIR_ABSPATH, and in *CONFLICTS a hash of names in
+   conflict.  */
+svn_error_t *
+svn_wc__db_read_children_info(apr_hash_t **nodes,
+                              apr_hash_t **conflicts,
+                              svn_wc__db_t *db,
+                              const char *dir_abspath,
+                              apr_pool_t *result_pool,
+                              apr_pool_t *scratch_pool);
 
 /* Set *PROPVAL to the value of the property named PROPNAME of the node
    LOCAL_ABSPATH in the ACTUAL tree (looking through to the WORKING or BASE
@@ -1845,12 +1847,7 @@ svn_wc__db_lock_remove(svn_wc__db_t *db,
    @{
 */
 
-/* Scan for a BASE node's repository information.
-
-   In the typical case, a BASE node has unspecified repository information,
-   meaning that it is implied by its parent's information. When the info is
-   needed, this function can be used to scan up the BASE tree to find
-   the data.
+/* Read a BASE node's repository information.
 
    For the BASE node implied by LOCAL_ABSPATH, its location in the repository
    returned in *REPOS_ROOT_URL and *REPOS_UUID will be returned in
@@ -1946,8 +1943,7 @@ svn_wc__db_scan_addition(svn_wc__db_stat
    the deleted node.
 
    In this example, BASE_DEL_ABSPATH will bet set to B/W. That is the root of
-   the BASE tree (implicitly) deleted by the replacement. BASE_REPLACED will
-   be set to TRUE since B/W replaces the BASE node at B/W. WORK_DEL_ABSPATH
+   the BASE tree (implicitly) deleted by the replacement. WORK_DEL_ABSPATH
    will be set to the subtree deleted within the replacement; in this case,
    B/W/D. No move-away took place, so MOVED_TO_ABSPATH is set to NULL.
 
@@ -1957,14 +1953,12 @@ svn_wc__db_scan_addition(svn_wc__db_stat
    post-move, but that is not known or reported by this function.
 
    If BASE does not have a B/W, then the WORKING B/W is not a replacement,
-   but a simple add/copy/move-here. BASE_DEL_ABSPATH will be set to NULL,
-   and BASE_REPLACED will be set to FALSE.
+   but a simple add/copy/move-here. BASE_DEL_ABSPATH will be set to NULL.
 
    If B/W/D does not exist in the WORKING tree (we're only talking about a
    deletion of nodes of the BASE tree), then deleting B/W/D would have marked
    the subtree for deletion. BASE_DEL_ABSPATH will refer to B/W/D,
-   BASE_REPLACED will be FALSE, MOVED_TO_ABSPATH will be NULL, and
-   WORK_DEL_ABSPATH will be NULL.
+   MOVED_TO_ABSPATH will be NULL, and WORK_DEL_ABSPATH will be NULL.
 
    If the BASE node B/W/D was moved instead of deleted, then MOVED_TO_ABSPATH
    would indicate the target location (and other OUT values as above).
@@ -2012,11 +2006,6 @@ svn_wc__db_scan_addition(svn_wc__db_stat
    BASE_DEL_ABSPATH will specify the nearest ancestor of the explicit or
    implicit deletion (if any) that applies to the BASE tree.
 
-   BASE_REPLACED will specify whether the node at BASE_DEL_ABSPATH has
-   been replaced (shadowed) by nodes in the WORKING tree. If no BASE
-   deletion has occurred (BASE_DEL_ABSPATH is NULL, meaning the deletion
-   is confined to the WORKING TREE), then BASE_REPLACED will be FALSE.
-
    MOVED_TO_ABSPATH will specify the nearest ancestor that has moved-away,
    if any. If no ancestors have been moved-away, then this is set to NULL.
 
@@ -2036,7 +2025,6 @@ svn_wc__db_scan_addition(svn_wc__db_stat
 */
 svn_error_t *
 svn_wc__db_scan_deletion(const char **base_del_abspath,
-                         svn_boolean_t *base_replaced,
                          const char **moved_to_abspath,
                          const char **work_del_abspath,
                          svn_wc__db_t *db,
@@ -2339,24 +2327,23 @@ svn_wc__db_temp_op_start_directory_updat
                                           svn_revnum_t new_rev,
                                           apr_pool_t *scratch_pool);
 
-/* Update WORKING_NODE to make it represent a copy of the current working
-   copy. Leaving additions and copies as-is, but making a copy of all the
-   required BASE_NODE data to WORKING_NODE, to allow removing and/or
-   updating the BASE_NODE without changing the contents of the current
-   working copy */
+/* Copy the base tree at LOCAL_ABSPATH into the working tree as copy,
+   leaving any subtree additions and copies as-is.  This allows the
+   base node tree to be removed. */
 svn_error_t *
 svn_wc__db_temp_op_make_copy(svn_wc__db_t *db,
                              const char *local_abspath,
-                             svn_boolean_t remove_base,
                              apr_pool_t *scratch_pool);
 
 
+#ifndef SVN_WC__OP_DEPTH
 /* Elide the copyfrom information for LOCAL_ABSPATH if it can be derived
    from the parent node.  */
 svn_error_t *
 svn_wc__db_temp_elide_copyfrom(svn_wc__db_t *db,
                                const char *local_abspath,
                                apr_pool_t *scratch_pool);
+#endif
 
 
 /* Return the serialized file external info (from BASE) for LOCAL_ABSPATH.
@@ -2440,6 +2427,9 @@ svn_wc__db_drop_root(svn_wc__db_t *db,
                      const char *local_abspath,
                      apr_pool_t *scratch_pool);
 
+/* Return the OP_DEPTH for LOCAL_RELPATH. */
+int svn_wc__db_op_depth_for_upgrade(const char *local_relpath);
+
 /* @} */
 
 

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.c Sat Dec 11 00:15:55 2010
@@ -181,18 +181,23 @@ run_revert(svn_wc__db_t *db,
 {
   const svn_skel_t *arg1 = work_item->children->next;
   const char *local_abspath;
-  svn_boolean_t replaced;
   svn_wc__db_kind_t kind;
   svn_wc__db_status_t status;
   const char *parent_abspath;
   svn_boolean_t conflicted;
   apr_int64_t val;
+  svn_boolean_t reinstall_working;
+  svn_boolean_t remove_working;
 
   /* We need a NUL-terminated path, so copy it out of the skel.  */
   local_abspath = apr_pstrmemdup(scratch_pool, arg1->data, arg1->len);
+
   SVN_ERR(svn_skel__parse_int(&val, arg1->next, scratch_pool));
-  replaced = (val != 0);
-  /* magic_changed is extracted further below.  */
+  remove_working = (val != 0);
+
+  SVN_ERR(svn_skel__parse_int(&val, arg1->next->next, scratch_pool));
+  reinstall_working = (val != 0);
+
   /* use_commit_times is extracted further below.  */
 
   /* NOTE: we can read KIND here since uncommitted kind changes are not
@@ -206,73 +211,50 @@ run_revert(svn_wc__db_t *db,
             db, local_abspath,
             scratch_pool, scratch_pool));
 
-  SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, NULL, NULL, NULL,
-                                  scratch_pool));
-
-  /* Deal with the working file, as needed.  */
-  if (kind == svn_wc__db_kind_file)
+  if (kind == svn_wc__db_kind_dir)
     {
-      svn_boolean_t magic_changed;
-      svn_boolean_t reinstall_working;
+      parent_abspath = local_abspath;
+    }
+  else
+    {
+      parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
+    }
 
-      SVN_ERR(svn_skel__parse_int(&val, arg1->next->next, scratch_pool));
-      magic_changed = (val != 0);
+  if (conflicted)
+    {
+      const apr_array_header_t *conflicts;
+      int i;
 
-      /* If there was a magic property change, then we'll reinstall the
-         working-file to pick up any/all appropriate changes. If there was
-         a replacement, then we definitely want to reinstall the working-file
-         using the original base.  */
-      reinstall_working = magic_changed || replaced;
-
-      /* ### This "if (replaced)" looks very likely to be an artifact of the
-         old WC-1 "revert-base and normal-base" system, and if so then it
-         should go away. */
-      if (replaced)
-        {
-          /* With the Pristine Store, there is no longer a "revert-base"
-             text that needs to be moved to a "normal text-base" location.
+      SVN_ERR(svn_wc__db_read_conflicts(&conflicts, db, local_abspath,
+                                        scratch_pool, scratch_pool));
 
-             ### JAF: I wonder why the "revert-base" properties weren't being
-             handled the same way in this same code path.  An oversight? */
-        }
-      else if (!reinstall_working)
+      for (i = 0; i < conflicts->nelts; i++)
         {
-          svn_node_kind_t check_kind;
+          const svn_wc_conflict_description2_t *cd;
 
-          /* If the working file is missing, we need to reinstall it.  */
-          SVN_ERR(svn_io_check_path(local_abspath, &check_kind,
-                                    scratch_pool));
-          reinstall_working = (check_kind == svn_node_none);
+          cd = APR_ARRAY_IDX(conflicts, i,
+                             const svn_wc_conflict_description2_t *);
 
-          if (!reinstall_working)
-            {
-              /* ### can we optimize this call? we already fetched some
-                 ### info about the node. and *definitely* never want a
-                 ### full file-scan.  */
-
-              /* ### for now, just always reinstall. without some extra work,
-                 ### we could end up in a situation where the file is copied
-                 ### from the base, but then something fails immediately
-                 ### after that. on the second time through here, we would
-                 ### see the file is "the same" and fail to complete those
-                 ### follow-on actions. in some future work, examine the
-                 ### points of failure, and possibly precompue the
-                 ### "reinstall_working" flag, or maybe do some follow-on
-                 ### actions unconditionally.  */
-#if 1
-              reinstall_working = TRUE;
-#endif
-#if 0
-              /* ### try to avoid altering the timestamp if the intended
-                 ### contents are the same as current-contents.  */
-              SVN_ERR(svn_wc__text_modified_internal_p(&reinstall_working,
-                                                       db, local_abspath,
-                                                       FALSE, FALSE,
-                                                       scratch_pool));
-#endif
-            }
+          SVN_ERR(maybe_remove_conflict(parent_abspath, cd->base_file,
+                                        local_abspath, scratch_pool));
+          SVN_ERR(maybe_remove_conflict(parent_abspath, cd->their_file,
+                                        local_abspath, scratch_pool));
+          SVN_ERR(maybe_remove_conflict(parent_abspath, cd->my_file,
+                                        local_abspath, scratch_pool));
+          SVN_ERR(maybe_remove_conflict(parent_abspath, cd->merged_file,
+                                        local_abspath, scratch_pool));
         }
+    }
 
+  /* Reverting the actual node destroys conflict markers and local props.
+     Don't use svn_wc__db_op_set_props() and svn_wc__db_op_mark_resolved()
+     because those leave a record in the ACTUALS table, which is a
+     performance issue.  Besides, this does all that in one blow. */
+  SVN_ERR(svn_wc__db_op_revert_actual(db, local_abspath, scratch_pool));
+
+  /* Deal with the working file, as needed.  */
+  if (kind == svn_wc__db_kind_file)
+    {
       if (reinstall_working)
         {
           svn_boolean_t use_commit_times;
@@ -296,79 +278,25 @@ run_revert(svn_wc__db_t *db,
     {
       SVN__NOT_IMPLEMENTED();
     }
-  else if (kind == svn_wc__db_kind_dir)
+  else if (reinstall_working && kind == svn_wc__db_kind_dir)
     {
-      svn_node_kind_t disk_kind;
-      SVN_ERR(svn_io_check_path(local_abspath, &disk_kind, scratch_pool));
+      svn_node_kind_t on_disk;
 
-      if (disk_kind == svn_node_none)
+      /* Unfortunately we need another stat(), because I don't want
+         to resort to APR error macros to see if we're creating a
+         directory on top of an existing path */
+      SVN_ERR(svn_io_check_path(local_abspath, &on_disk, scratch_pool));
+      if (on_disk == svn_node_none)
         SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
     }
 
-  if (kind == svn_wc__db_kind_dir)
-    parent_abspath = local_abspath;
-  else
-    parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
 
-  /* ### in wc-ng: the following block clears ACTUAL_NODE.  */
-  if (conflicted)
+  if (remove_working)
     {
-      const apr_array_header_t *conflicts;
-      int i;
-
-      SVN_ERR(svn_wc__db_read_conflicts(&conflicts, db, local_abspath,
-                                        scratch_pool, scratch_pool));
-
-      for (i = 0; i < conflicts->nelts; i++)
-        {
-          const svn_wc_conflict_description2_t *cd;
-
-          cd = APR_ARRAY_IDX(conflicts, i,
-                             const svn_wc_conflict_description2_t *);
-
-          SVN_ERR(maybe_remove_conflict(parent_abspath, cd->base_file,
-                                        local_abspath, scratch_pool));
-          SVN_ERR(maybe_remove_conflict(parent_abspath, cd->their_file,
-                                        local_abspath, scratch_pool));
-          SVN_ERR(maybe_remove_conflict(parent_abspath, cd->my_file,
-                                        local_abspath, scratch_pool));
-          SVN_ERR(maybe_remove_conflict(parent_abspath, cd->merged_file,
-                                        local_abspath, scratch_pool));
-        }
-
-      SVN_ERR(svn_wc__db_op_mark_resolved(db, local_abspath,
-                                          TRUE, TRUE, FALSE,
-                                          scratch_pool));
+      SVN_ERR(svn_wc__db_temp_op_remove_working(db, local_abspath,
+                                                scratch_pool));
     }
 
-  {
-    svn_boolean_t is_wc_root;
-
-    SVN_ERR(svn_wc__check_wc_root(&is_wc_root, NULL, NULL,
-                                  db, local_abspath, scratch_pool));
-
-    /* Remove the WORKING_NODE from the node and (if there) its parent stub */
-    /* ### A working copy root can't have a working node and trying
-       ### to delete it fails because the root doesn't have a stub. */
-    if (!is_wc_root)
-      {
-        const char *op_root_abspath = NULL;
-
-        /* If the node is not the operation root, we should not delete
-           the working node */
-        if (status == svn_wc__db_status_added)
-          SVN_ERR(svn_wc__db_scan_addition(NULL, &op_root_abspath, NULL, NULL,
-                                           NULL, NULL, NULL, NULL, NULL,
-                                           db, local_abspath,
-                                           scratch_pool, scratch_pool));
-
-        if (!op_root_abspath
-            || (strcmp(op_root_abspath, local_abspath) == 0))
-          SVN_ERR(svn_wc__db_temp_op_remove_working(db, local_abspath,
-                                                    scratch_pool));
-      }
-  }
-
   return SVN_NO_ERROR;
 }
 
@@ -417,6 +345,7 @@ verify_pristine_present(svn_wc__db_t *db
 svn_error_t *
 svn_wc__wq_add_revert(svn_boolean_t *will_revert,
                       svn_wc__db_t *db,
+                      const char *revert_root,
                       const char *local_abspath,
                       svn_boolean_t use_commit_times,
                       apr_pool_t *scratch_pool)
@@ -424,7 +353,8 @@ svn_wc__wq_add_revert(svn_boolean_t *wil
   svn_wc__db_status_t status;
   svn_wc__db_kind_t kind;
   svn_boolean_t replaced;
-  svn_boolean_t magic_changed = FALSE;
+  svn_boolean_t remove_working = FALSE;
+  svn_boolean_t reinstall_working;
 
   SVN_ERR(svn_wc__db_read_info(
             &status, &kind, NULL, NULL, NULL, NULL,
@@ -434,8 +364,11 @@ svn_wc__wq_add_revert(svn_boolean_t *wil
             db, local_abspath,
             scratch_pool, scratch_pool));
 
-  /* Special handling for issue #2101.  */
-  if (kind == svn_wc__db_kind_file)
+  /* Special handling for issue #2101, which is specifically
+     about reverting copies of 'deleted' files and dirs, being inserted
+     in the copy as a schedule-delete files, yet can't be reverted. */
+  if (kind == svn_wc__db_kind_file
+      && status == svn_wc__db_status_deleted)
     SVN_ERR(verify_pristine_present(db, local_abspath, scratch_pool));
 
   /* Gather a few items *before* the revert work-item has a chance to run.
@@ -446,9 +379,9 @@ svn_wc__wq_add_revert(svn_boolean_t *wil
                                        scratch_pool));
 
   /* If a replacement has occurred, then a revert definitely happens.  */
-  *will_revert = replaced;
+  *will_revert = reinstall_working = replaced;
 
-  if (!replaced)
+  if (status == svn_wc__db_status_normal)
     {
       apr_hash_t *base_props;
       apr_hash_t *working_props;
@@ -462,51 +395,65 @@ svn_wc__wq_add_revert(svn_boolean_t *wil
                                        scratch_pool, scratch_pool));
       SVN_ERR(svn_prop_diffs(&prop_diffs, working_props, base_props,
                              scratch_pool));
-      magic_changed = svn_wc__has_magic_property(prop_diffs);
+      if (svn_wc__has_magic_property(prop_diffs))
+        reinstall_working = TRUE;
 
       if (prop_diffs->nelts > 0)
         {
           /* Property changes cause a revert to occur.  */
           *will_revert = TRUE;
         }
-      else
-        {
-          /* There is nothing to do for NORMAL or ADDED nodes. Typically,
-             we won't even be called for added nodes (since a revert
-             simply removes it from version control), but it is possible
-             that a parent replacement was turned from a replaced copy
-             into a normal node, and the (broken) old ENTRY->COPIED logic
-             then turns the copied children into typical ADDED nodes.
-             Since the recursion has already started, these children are
-             visited (unlike most added nodes).  */
-          if (status != svn_wc__db_status_normal
-              && status != svn_wc__db_status_added)
-            {
-              *will_revert = TRUE;
-            }
+    }
+  else
+    {
+      *will_revert = TRUE;
+      if (status != svn_wc__db_status_added)
+        reinstall_working = TRUE;
+    }
 
-          /* We may need to restore a missing working file.  */
-          if (! *will_revert)
-            {
-              svn_node_kind_t on_disk;
+  /* We may need to restore a missing working file.  */
+  if (! reinstall_working
+      && status != svn_wc__db_status_added)
+    {
+      svn_node_kind_t on_disk;
 
-              SVN_ERR(svn_io_check_path(local_abspath, &on_disk,
-                                        scratch_pool));
-              *will_revert = on_disk == svn_node_none;
-            }
+      SVN_ERR(svn_io_check_path(local_abspath, &on_disk, scratch_pool));
+      reinstall_working = on_disk == svn_node_none;
+      *will_revert = *will_revert || reinstall_working;
+    }
 
-          if (! *will_revert)
-            {
-              /* ### there may be ways to simplify this test, rather than
-                 ### doing file comparisons and junk... */
-              SVN_ERR(svn_wc__internal_text_modified_p(will_revert,
-                                                       db, local_abspath,
-                                                       FALSE, FALSE,
-                                                       scratch_pool));
-            }
-        }
+  if (! reinstall_working
+      && status == svn_wc__db_status_normal)
+    {
+      /* ### there may be ways to simplify this test, rather than
+         ### doing file comparisons and junk... */
+      SVN_ERR(svn_wc__internal_text_modified_p(&reinstall_working,
+                                               db, local_abspath,
+                                               FALSE, FALSE,
+                                               scratch_pool));
+      *will_revert = *will_revert || reinstall_working;
     }
 
+
+  if (status == svn_wc__db_status_added)
+    {
+      /* When looking at an added, non-replacing node, it's entry
+         will have to be removed after revert: if not, it'll look
+         like it's still under version control. */
+      const char *op_root_abspath;
+
+      SVN_ERR(svn_wc__db_scan_addition(NULL, &op_root_abspath, NULL, NULL,
+                                       NULL, NULL, NULL, NULL, NULL,
+                                       db, local_abspath,
+                                       scratch_pool, scratch_pool));
+
+      if (svn_dirent_is_ancestor(revert_root, op_root_abspath))
+        remove_working = TRUE;
+    }
+  else
+    remove_working = TRUE;
+
+
   /* Don't even bother to queue a work item if there is nothing to do.  */
   if (*will_revert)
     {
@@ -517,8 +464,8 @@ svn_wc__wq_add_revert(svn_boolean_t *wil
       /* These skel atoms hold references to very transitory state, but
          we only need the work_item to survive for the duration of wq_add.  */
       svn_skel__prepend_int(use_commit_times, work_item, scratch_pool);
-      svn_skel__prepend_int(magic_changed, work_item, scratch_pool);
-      svn_skel__prepend_int(replaced, work_item, scratch_pool);
+      svn_skel__prepend_int(reinstall_working, work_item, scratch_pool);
+      svn_skel__prepend_int(remove_working, work_item, scratch_pool);
       svn_skel__prepend_str(local_abspath, work_item, scratch_pool);
       svn_skel__prepend_str(OP_REVERT, work_item, scratch_pool);
 
@@ -622,21 +569,9 @@ remove_base_node(svn_wc__db_t *db,
           else
             SVN_ERR(err);
         }
-
-      /* This should remove just BASE and ACTUAL, but for now also remove
-         not existing WORKING_NODE data. */
-      SVN_ERR(svn_wc__db_temp_op_remove_entry(db, local_abspath, scratch_pool));
-    }
-  else if (wrk_status == svn_wc__db_status_added
-           || (have_work && wrk_status == svn_wc__db_status_excluded))
-    /* ### deletes of working additions should fall in this case, but
-       ### we can't express these without the 4th tree */
-    {
-      /* Just remove the BASE_NODE data */
-      SVN_ERR(svn_wc__db_base_remove(db, local_abspath, scratch_pool));
     }
-  else
-    SVN_ERR(svn_wc__db_temp_op_remove_entry(db, local_abspath, scratch_pool));
+
+  SVN_ERR(svn_wc__db_base_remove(db, local_abspath, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -673,12 +608,6 @@ run_base_remove(svn_wc__db_t *db,
                                        NULL, NULL,
                                        db, local_abspath,
                                        scratch_pool, scratch_pool));
-
-      if (!repos_relpath)
-        SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url,
-                                           &repos_uuid,
-                                           db, local_abspath, scratch_pool,
-                                           scratch_pool));
     }
 
   SVN_ERR(remove_base_node(db, local_abspath,
@@ -1587,12 +1516,14 @@ run_file_install(svn_wc__db_t *db,
                                       FALSE /* ignore_enoent */,
                                       scratch_pool));
 
+#ifndef SVN_WC__OP_DEPTH
       /* ### there used to be a call to entry_modify() above, to set the
          ### TRANSLATED_SIZE and LAST_MOD_TIME values. that function elided
          ### copyfrom information that snuck into the database. it should
          ### not be there in the first place, but we can manually get rid
          ### of the erroneous, inheritable copyfrom data.  */
       SVN_ERR(svn_wc__db_temp_elide_copyfrom(db, local_abspath, scratch_pool));
+#endif
     }
 
   return SVN_NO_ERROR;
@@ -1917,7 +1848,7 @@ svn_error_t *
 svn_wc__wq_build_prej_install(svn_skel_t **work_item,
                               svn_wc__db_t *db,
                               const char *local_abspath,
-                              const svn_skel_t *conflict_skel,
+                              svn_skel_t *conflict_skel,
                               apr_pool_t *result_pool,
                               apr_pool_t *scratch_pool)
 {
@@ -1927,8 +1858,7 @@ svn_wc__wq_build_prej_install(svn_skel_t
   SVN_ERR_ASSERT(conflict_skel != NULL);
 
   if (conflict_skel != NULL)
-    /* ### woah! this needs to dup the skel into RESULT_POOL  */
-    svn_skel__prepend((svn_skel_t *)conflict_skel, *work_item);
+    svn_skel__prepend(conflict_skel, *work_item);
   svn_skel__prepend_str(apr_pstrdup(result_pool, local_abspath),
                         *work_item, result_pool);
   svn_skel__prepend_str(OP_PREJ_INSTALL, *work_item, result_pool);
@@ -2307,7 +2237,6 @@ svn_wc__wq_run(svn_wc__db_t *db,
 
   while (TRUE)
     {
-      svn_wc__db_kind_t kind;
       apr_uint64_t id;
       svn_skel_t *work_item;
 
@@ -2318,14 +2247,6 @@ svn_wc__wq_run(svn_wc__db_t *db,
 
       svn_pool_clear(iterpool);
 
-      /* ### right now, we expect WRI_ABSPATH to exist. this section should
-         ### disappear in single-db. also, note that db_wq_fetch() will
-         ### watch out for missing/obstructed subdirs (ie. wq is gone)  */
-      SVN_ERR(svn_wc__db_read_kind(&kind, db, wri_abspath, TRUE,
-                                   scratch_pool));
-      if (kind == svn_wc__db_kind_unknown)
-        break;
-
       SVN_ERR(svn_wc__db_wq_fetch(&id, &work_item, db, wri_abspath,
                                   iterpool, iterpool));
       if (work_item == NULL)

Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.h?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_wc/workqueue.h Sat Dec 11 00:15:55 2010
@@ -162,14 +162,22 @@ svn_wc__wq_build_sync_file_flags(svn_ske
 
 
 /* Set *WORK_ITEM to a new work item that will install a property reject
-   file for LOCAL_ABSPATH into the working copy. The propety conflicts will
-   be taken from CONFLICT_SKEL, or if NULL, then from wc_db for the
-   given DB/LOCAL_ABSPATH.  */
+   file for LOCAL_ABSPATH into the working copy. The property conflicts will
+   be taken from CONFLICT_SKEL.
+
+   ### Caution: Links CONFLICT_SKEL into the *WORK_ITEM, which involves
+       modifying *CONFLICT_SKEL.
+
+   ### TODO: Make CONFLICT_SKEL 'const' and dup it into RESULT_POOL.
+
+   ### TODO: If CONFLICT_SKEL is NULL, take property conflicts from wc_db
+       for the given DB/LOCAL_ABSPATH.
+ */
 svn_error_t *
 svn_wc__wq_build_prej_install(svn_skel_t **work_item,
                               svn_wc__db_t *db,
                               const char *local_abspath,
-                              const svn_skel_t *conflict_skel,
+                              svn_skel_t *conflict_skel,
                               apr_pool_t *result_pool,
                               apr_pool_t *scratch_pool);
 
@@ -188,10 +196,12 @@ svn_wc__wq_build_record_fileinfo(svn_ske
                                  apr_pool_t *result_pool);
 
 
-/* Record a work item to revert LOCAL_ABSPATH.  */
+/* Record a work item to revert LOCAL_ABSPATH;
+   REVERT_ROOT designates the root of the entire revert operation. */
 svn_error_t *
 svn_wc__wq_add_revert(svn_boolean_t *will_revert,
                       svn_wc__db_t *db,
+                      const char *revert_root,
                       const char *local_abspath,
                       svn_boolean_t use_commit_times,
                       apr_pool_t *scratch_pool);

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_authz_svn/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_authz_svn/INSTALL?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_authz_svn/INSTALL (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_authz_svn/INSTALL Sat Dec 11 00:15:55 2010
@@ -79,6 +79,26 @@ II.   Configuration
          though AuthzSVNAnonymous was set to 'No'.  The AuthzSVNAnonymous
          directive prevents the anonymous access check from being run.
 
+      D. Example 4: Per-repository access file
+
+         This configuration allows to use SVNParentPath but have
+         different authz files per repository.
+
+         <Location /svn>
+           DAV svn
+           SVNParentPath /path/to/reposparent
+
+           AuthType Basic
+           AuthName "Subversion repository"
+           AuthUserFile /path/to/htpasswd/file
+
+           AuthzSVNReposRelativeAccessFile filename
+
+           Require valid-user
+         </Location>
+
+         NOTE: AuthzSVNReposRelativeAccessFile filename causes the authz file
+         to be read from <repo path>/conf/<filename>
 
    2. Specifying permissions
 

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_authz_svn/mod_authz_svn.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_authz_svn/mod_authz_svn.c Sat Dec 11 00:15:55 2010
@@ -52,6 +52,7 @@ typedef struct {
   int no_auth_when_anon_ok;
   const char *base_path;
   const char *access_file;
+  const char *repo_relative_access_file;
   const char *force_username_case;
 } authz_svn_config_rec;
 
@@ -76,6 +77,37 @@ create_authz_svn_dir_config(apr_pool_t *
   return conf;
 }
 
+static const char *
+AuthzSVNAccessFile_cmd(cmd_parms *cmd, void *config, const char *arg1)
+{
+  authz_svn_config_rec *conf = config;
+
+  if (conf->repo_relative_access_file != NULL)
+    return "AuthzSVNAccessFile cannot be defined at "
+           "same time as AuthzSVNReposRelativeAccessFile.";
+
+  conf->access_file = ap_server_root_relative(cmd->pool, arg1);
+
+  return NULL;
+}
+
+
+static const char *
+AuthzSVNReposRelativeAccessFile_cmd(cmd_parms *cmd,
+                                    void *config,
+                                    const char *arg1)
+{
+  authz_svn_config_rec *conf = config;
+
+  if (conf->access_file != NULL)
+    return "AuthzSVNReposRelativeAccessFile cannot be defined at "
+           "same time as AuthzSVNAccessFile.";
+
+  conf->repo_relative_access_file = arg1;
+
+  return NULL;
+}
+
 /* Implements the #cmds member of Apache's #module vtable. */
 static const command_rec authz_svn_cmds[] =
 {
@@ -84,10 +116,17 @@ static const command_rec authz_svn_cmds[
                OR_AUTHCFG,
                "Set to 'Off' to allow access control to be passed along to "
                "lower modules. (default is On.)"),
-  AP_INIT_TAKE1("AuthzSVNAccessFile", ap_set_file_slot,
-                (void *)APR_OFFSETOF(authz_svn_config_rec, access_file),
+  AP_INIT_TAKE1("AuthzSVNAccessFile", AuthzSVNAccessFile_cmd,
+                NULL,
+                OR_AUTHCFG,
+                "Path to text file containing permissions of repository "
+                "paths."),
+  AP_INIT_TAKE1("AuthzSVNReposRelativeAccessFile",
+                AuthzSVNReposRelativeAccessFile_cmd,
+                NULL,
                 OR_AUTHCFG,
-                "Text file containing permissions of repository paths."),
+                "Path (relative to repository 'conf' directory) to text "
+                "file containing permissions of repository paths. "),
   AP_INIT_FLAG("AuthzSVNAnonymous", ap_set_flag_slot,
                (void *)APR_OFFSETOF(authz_svn_config_rec, anonymous),
                OR_AUTHCFG,
@@ -119,18 +158,40 @@ static svn_authz_t *
 get_access_conf(request_rec *r, authz_svn_config_rec *conf)
 {
   const char *cache_key = NULL;
+  const char *access_file;
+  const char *repos_path;
   void *user_data = NULL;
   svn_authz_t *access_conf = NULL;
   svn_error_t *svn_err;
+  dav_error *dav_err;
   char errbuf[256];
 
+  if (conf->repo_relative_access_file) 
+    {
+      dav_err = dav_svn_get_repos_path(r, conf->base_path, &repos_path);
+      if (dav_err) {
+        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, dav_err->desc);
+        return NULL;
+      }
+      access_file = svn_dirent_join_many(r->pool, repos_path, "conf",
+                                         conf->repo_relative_access_file,
+                                         NULL);
+    } 
+  else
+    {
+      access_file = conf->access_file;
+    }
+  
+  ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+                "Path to authz file is %s", access_file);
+
   cache_key = apr_pstrcat(r->pool, "mod_authz_svn:",
-                          conf->access_file, NULL);
+                          access_file, (char *)NULL);
   apr_pool_userdata_get(&user_data, cache_key, r->connection->pool);
   access_conf = user_data;
   if (access_conf == NULL)
     {
-      svn_err = svn_repos_authz_read(&access_conf, conf->access_file,
+      svn_err = svn_repos_authz_read(&access_conf, access_file,
                                      TRUE, r->connection->pool);
       if (svn_err)
         {
@@ -298,7 +359,8 @@ req_check_access(request_rec *r,
   if (repos_path)
     repos_path = svn_path_join("/", repos_path, r->pool);
 
-  *repos_path_ref = apr_pstrcat(r->pool, repos_name, ":", repos_path, NULL);
+  *repos_path_ref = apr_pstrcat(r->pool, repos_name, ":", repos_path,
+                                (char *)NULL);
 
   if (r->method_number == M_MOVE || r->method_number == M_COPY)
     {
@@ -346,7 +408,7 @@ req_check_access(request_rec *r,
         dest_repos_path = svn_path_join("/", dest_repos_path, r->pool);
 
       *dest_repos_path_ref = apr_pstrcat(r->pool, dest_repos_name, ":",
-                                         dest_repos_path, NULL);
+                                         dest_repos_path, (char *)NULL);
     }
 
   /* Retrieve/cache authorization file */
@@ -515,7 +577,8 @@ subreq_bypass(request_rec *r,
   username_to_authorize = get_username_to_authorize(r, conf);
 
   /* If configured properly, this should never be true, but just in case. */
-  if (!conf->anonymous || !conf->access_file)
+  if (!conf->anonymous || !conf->access_file
+      || !conf->repo_relative_access_file)
     {
       log_access_verdict(APLOG_MARK, r, 0, repos_path, NULL);
       return HTTP_FORBIDDEN;
@@ -579,7 +642,8 @@ access_checker(request_rec *r)
   int status;
 
   /* We are not configured to run */
-  if (!conf->anonymous || !conf->access_file)
+  if (!conf->anonymous
+      || (!conf->access_file && !conf->repo_relative_access_file))
     return DECLINED;
 
   if (ap_some_auth_required(r))
@@ -637,7 +701,8 @@ check_user_id(request_rec *r)
 
   /* We are not configured to run, or, an earlier module has already
    * authenticated this request. */
-  if (!conf->access_file || !conf->no_auth_when_anon_ok || r->user)
+  if ((!conf->access_file && !conf->repo_relative_access_file)
+      || !conf->no_auth_when_anon_ok || r->user)
     return DECLINED;
 
   /* If anon access is allowed, return OK, preventing later modules
@@ -664,7 +729,7 @@ auth_checker(request_rec *r)
   int status;
 
   /* We are not configured to run */
-  if (!conf->access_file)
+  if (!conf->access_file && !conf->repo_relative_access_file)
     return DECLINED;
 
   /* Previous hook (check_user_id) already did all the work,

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/activity.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/activity.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/activity.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/activity.c Sat Dec 11 00:15:55 2010
@@ -164,8 +164,8 @@ dav_svn__delete_activity(const dav_svn_r
   txn_name = read_txn(pathname, repos->pool);
   if (txn_name == NULL)
     {
-      return dav_new_error(repos->pool, HTTP_NOT_FOUND, 0,
-                           "could not find activity.");
+      return dav_svn__new_error(repos->pool, HTTP_NOT_FOUND, 0,
+                                "could not find activity.");
     }
 
   /* After this point, we have to cleanup the value and database. */

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/authz.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/authz.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/authz.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/authz.c Sat Dec 11 00:15:55 2010
@@ -60,7 +60,7 @@ dav_svn__allow_read(request_rec *r,
   allow_read_bypass = dav_svn__get_pathauthz_bypass(r);
   if (allow_read_bypass != NULL)
     {
-      if (allow_read_bypass(r,path, repos->repo_name) == OK)
+      if (allow_read_bypass(r, path, repos->repo_basename) == OK)
         return TRUE;
       else
         return FALSE;

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/dav_svn.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/dav_svn.h?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/dav_svn.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/dav_svn.h Sat Dec 11 00:15:55 2010
@@ -723,6 +723,19 @@ dav_svn__new_error_tag(apr_pool_t *pool,
                        const char *tagname);
 
 
+/* A wrapper around mod_dav's dav_new_error, mod_dav_svn uses this
+   instead of the mod_dav function to enable special mod_dav_svn specific
+   processing.  See dav_new_error for parameter documentation.
+   Note that DESC may be null (it's hard to track this down from
+   dav_new_error()'s documentation, but see the dav_error type,
+   which says that its desc field may be NULL). */
+dav_error *
+dav_svn__new_error(apr_pool_t *pool,
+                   int status,
+                   int errno_id,
+                   const char *desc);
+
+
 /* Convert an svn_error_t into a dav_error, pushing another error based on
    MESSAGE if MESSAGE is not NULL.  Use the provided HTTP status for the
    DAV errors.  Allocate new DAV errors from POOL.

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/deadprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/deadprops.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/deadprops.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/deadprops.c Sat Dec 11 00:15:55 2010
@@ -161,7 +161,9 @@ get_value(dav_db *db, const dav_prop_nam
 
 
 static dav_error *
-save_value(dav_db *db, const dav_prop_name *name, const svn_string_t *value)
+save_value(dav_db *db, const dav_prop_name *name,
+           const svn_string_t *const *old_value_p,
+           const svn_string_t *value)
 {
   const char *propname;
   svn_error_t *serr;
@@ -176,10 +178,10 @@ save_value(dav_db *db, const dav_prop_na
         /* ignore the unknown namespace of the incoming prop. */
         propname = name->name;
       else
-        return dav_new_error(db->p, HTTP_CONFLICT, 0,
-                             "Properties may only be defined in the "
-                             SVN_DAV_PROP_NS_SVN " and " SVN_DAV_PROP_NS_CUSTOM
-                             " namespaces.");
+        return dav_svn__new_error(db->p, HTTP_CONFLICT, 0,
+                                  "Properties may only be defined in the "
+                                  SVN_DAV_PROP_NS_SVN " and " 
+                                  SVN_DAV_PROP_NS_CUSTOM " namespaces.");
     }
 
   /* We've got three different types of properties (node, txn, and
@@ -210,10 +212,11 @@ save_value(dav_db *db, const dav_prop_na
         }
       else
         {
-          serr = svn_repos_fs_change_rev_prop3(resource->info->repos->repos,
+          serr = svn_repos_fs_change_rev_prop4(resource->info->repos->repos,
                                                resource->info->root.rev,
                                                resource->info->repos->username,
-                                               propname, value, TRUE, TRUE,
+                                               propname, old_value_p, value,
+                                               TRUE, TRUE,
                                                db->authz_read_func,
                                                db->authz_read_baton,
                                                resource->pool);
@@ -297,9 +300,9 @@ db_open(apr_pool_t *p,
          changing unversioned rev props.  Remove this someday: see IZ #916. */
       if (! (resource->baselined
              && resource->type == DAV_RESOURCE_TYPE_VERSION))
-        return dav_new_error(p, HTTP_CONFLICT, 0,
-                             "Properties may only be changed on working "
-                             "resources.");
+        return dav_svn__new_error(p, HTTP_CONFLICT, 0,
+                                  "Properties may only be changed on working "
+                                  "resources.");
     }
 
   db = apr_pcalloc(p, sizeof(*db));
@@ -425,6 +428,7 @@ db_map_namespaces(dav_db *db,
 
 static dav_error *
 decode_property_value(const svn_string_t **out_propval_p,
+                      svn_boolean_t *absent,
                       const svn_string_t *maybe_encoded_propval,
                       const apr_xml_elem *elem,
                       apr_pool_t *pool)
@@ -432,6 +436,7 @@ decode_property_value(const svn_string_t
   apr_xml_attr *attr = elem->attr;
 
   /* Default: no "encoding" attribute. */
+  *absent = FALSE;
   *out_propval_p = maybe_encoded_propval;
 
   /* Check for special encodings of the property value. */
@@ -443,12 +448,21 @@ decode_property_value(const svn_string_t
 
           /* Handle known encodings here. */
           if (enc_type && (strcmp(enc_type, "base64") == 0))
-            *out_propval_p = svn_base64_decode_string(maybe_encoded_propval, pool);
+            *out_propval_p = svn_base64_decode_string(maybe_encoded_propval,
+                                                      pool);
           else
-            return dav_new_error(pool, HTTP_INTERNAL_SERVER_ERROR, 0,
-                                 "Unknown property encoding");
+            return dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+                                      "Unknown property encoding");
           break;
         }
+
+      if (strcmp(attr->name, SVN_DAV__OLD_VALUE__ABSENT) == 0)
+        {
+          /* ### parse attr->value */
+          *absent = TRUE;
+          *out_propval_p = NULL;
+        }
+
       /* Next attribute, please. */
       attr = attr->next;
     }
@@ -462,7 +476,10 @@ db_store(dav_db *db,
          const apr_xml_elem *elem,
          dav_namespace_map *mapping)
 {
+  const svn_string_t *const *old_propval_p;
+  const svn_string_t *old_propval;
   const svn_string_t *propval;
+  svn_boolean_t absent;
   apr_pool_t *pool = db->p;
   dav_error *derr;
 
@@ -475,11 +492,42 @@ db_store(dav_db *db,
   propval = svn_string_create
     (dav_xml_get_cdata(elem, pool, 0 /* strip_white */), pool);
 
-  derr = decode_property_value(&propval, propval, elem, pool);
+  derr = decode_property_value(&propval, &absent, propval, elem, pool);
   if (derr)
     return derr;
 
-  return save_value(db, name, propval);
+  if (absent && ! elem->first_child)
+    /* ### better error check */
+    return dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+                              apr_psprintf(pool, 
+                                           "'%s' cannot be specified on the "
+                                           "value without specifying an "
+                                           "expectation",
+                                           SVN_DAV__OLD_VALUE__ABSENT));
+
+  /* ### namespace check? */
+  if (elem->first_child && !strcmp(elem->first_child->name, SVN_DAV__OLD_VALUE))
+    {
+      const char *propname;
+
+      get_repos_propname(db, name, &propname);
+
+      /* Parse OLD_PROPVAL. */
+      old_propval = svn_string_create(dav_xml_get_cdata(elem->first_child, pool,
+                                                        0 /* strip_white */),
+                                      pool);
+      derr = decode_property_value(&old_propval, &absent,
+                                   old_propval, elem->first_child, pool);
+      if (derr)
+        return derr;
+
+      old_propval_p = (const svn_string_t *const *) &old_propval;
+    }
+  else
+    old_propval_p = NULL;
+
+
+  return save_value(db, name, old_propval_p, propval);
 }
 
 
@@ -506,10 +554,10 @@ db_remove(dav_db *db, const dav_prop_nam
          not a working resource!  But this is how we currently
          (hackily) allow the svn client to change unversioned rev
          props.  See issue #916. */
-      serr = svn_repos_fs_change_rev_prop3(db->resource->info->repos->repos,
+      serr = svn_repos_fs_change_rev_prop4(db->resource->info->repos->repos,
                                            db->resource->info->root.rev,
                                            db->resource->info->repos->username,
-                                           propname, NULL, TRUE, TRUE,
+                                           propname, NULL, NULL, TRUE, TRUE,
                                            db->authz_read_func,
                                            db->authz_read_baton,
                                            db->resource->pool);

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/lock.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/lock.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/lock.c Sat Dec 11 00:15:55 2010
@@ -91,7 +91,7 @@ svn_lock_to_dav_lock(dav_lock **dlock,
                                     "<D:owner xmlns:D=\"DAV:\">",
                                     apr_xml_quote_string(pool,
                                                          slock->comment, 1),
-                                    "</D:owner>", NULL);
+                                    "</D:owner>", (char *)NULL);
         }
       else
         {
@@ -133,7 +133,7 @@ unescape_xml(const char **output,
   apr_xml_doc *xml_doc;
   apr_status_t apr_err;
   const char *xml_input = apr_pstrcat
-    (pool, "<?xml version=\"1.0\" encoding=\"utf-8\"?>", input, NULL);
+    (pool, "<?xml version=\"1.0\" encoding=\"utf-8\"?>", input, (char *)NULL);
 
   apr_err = apr_xml_parser_feed(xml_parser, xml_input, strlen(xml_input));
   if (!apr_err)
@@ -143,8 +143,8 @@ unescape_xml(const char **output,
     {
       char errbuf[1024];
       (void)apr_xml_parser_geterror(xml_parser, errbuf, sizeof(errbuf));
-      return dav_new_error(pool, HTTP_INTERNAL_SERVER_ERROR,
-                           DAV_ERR_LOCK_SAVE_LOCK, errbuf);
+      return dav_svn__new_error(pool, HTTP_INTERNAL_SERVER_ERROR,
+                                DAV_ERR_LOCK_SAVE_LOCK, errbuf);
     }
 
   apr_xml_to_text(pool, xml_doc->root, APR_XML_X2T_INNER,
@@ -166,14 +166,14 @@ dav_lock_to_svn_lock(svn_lock_t **slock,
 
   /* Sanity checks */
   if (dlock->type != DAV_LOCKTYPE_WRITE)
-    return dav_new_error(pool, HTTP_BAD_REQUEST,
-                         DAV_ERR_LOCK_SAVE_LOCK,
-                         "Only 'write' locks are supported.");
+    return dav_svn__new_error(pool, HTTP_BAD_REQUEST,
+                              DAV_ERR_LOCK_SAVE_LOCK,
+                              "Only 'write' locks are supported.");
 
   if (dlock->scope != DAV_LOCKSCOPE_EXCLUSIVE)
-    return dav_new_error(pool, HTTP_BAD_REQUEST,
-                         DAV_ERR_LOCK_SAVE_LOCK,
-                         "Only exclusive locks are supported.");
+    return dav_svn__new_error(pool, HTTP_BAD_REQUEST,
+                              DAV_ERR_LOCK_SAVE_LOCK,
+                              "Only exclusive locks are supported.");
 
   lock = svn_lock_create(pool);
   lock->path = apr_pstrdup(pool, path);
@@ -460,9 +460,9 @@ get_locks(dav_lockdb *lockdb,
      anything about locks attached to it.*/
   if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
                                      resource->pool))
-    return dav_new_error(resource->pool, HTTP_FORBIDDEN,
-                         DAV_ERR_LOCK_SAVE_LOCK,
-                         "Path is not accessible.");
+    return dav_svn__new_error(resource->pool, HTTP_FORBIDDEN,
+                              DAV_ERR_LOCK_SAVE_LOCK,
+                              "Path is not accessible.");
 
   serr = svn_fs_get_lock(&slock,
                          resource->info->repos->fs,
@@ -521,9 +521,9 @@ find_lock(dav_lockdb *lockdb,
      anything about locks attached to it.*/
   if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
                                      resource->pool))
-    return dav_new_error(resource->pool, HTTP_FORBIDDEN,
-                         DAV_ERR_LOCK_SAVE_LOCK,
-                         "Path is not accessible.");
+    return dav_svn__new_error(resource->pool, HTTP_FORBIDDEN,
+                              DAV_ERR_LOCK_SAVE_LOCK,
+                              "Path is not accessible.");
 
   serr = svn_fs_get_lock(&slock,
                          resource->info->repos->fs,
@@ -538,9 +538,10 @@ find_lock(dav_lockdb *lockdb,
     {
       /* Sanity check. */
       if (strcmp(locktoken->uuid_str, slock->token) != 0)
-        return dav_new_error(resource->pool, HTTP_BAD_REQUEST,
-                             DAV_ERR_LOCK_SAVE_LOCK,
-                             "Incoming token doesn't match existing lock.");
+        return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST,
+                                  DAV_ERR_LOCK_SAVE_LOCK,
+                                  "Incoming token doesn't match existing "
+                                  "lock.");
 
       svn_lock_to_dav_lock(&dlock, slock, FALSE,
                            resource->exists, resource->pool);
@@ -600,9 +601,9 @@ has_locks(dav_lockdb *lockdb, const dav_
      anything about locks attached to it.*/
   if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
                                      resource->pool))
-    return dav_new_error(resource->pool, HTTP_FORBIDDEN,
-                         DAV_ERR_LOCK_SAVE_LOCK,
-                         "Path is not accessible.");
+    return dav_svn__new_error(resource->pool, HTTP_FORBIDDEN,
+                              DAV_ERR_LOCK_SAVE_LOCK,
+                              "Path is not accessible.");
 
   serr = svn_fs_get_lock(&slock,
                          resource->info->repos->fs,
@@ -644,14 +645,14 @@ append_locks(dav_lockdb *lockdb,
      be created on it. */
   if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
                                      resource->pool))
-    return dav_new_error(resource->pool, HTTP_FORBIDDEN,
-                         DAV_ERR_LOCK_SAVE_LOCK,
-                         "Path is not accessible.");
+    return dav_svn__new_error(resource->pool, HTTP_FORBIDDEN,
+                              DAV_ERR_LOCK_SAVE_LOCK,
+                              "Path is not accessible.");
 
   if (lock->next)
-    return dav_new_error(resource->pool, HTTP_BAD_REQUEST,
-                         DAV_ERR_LOCK_SAVE_LOCK,
-                         "Tried to attach multiple locks to a resource.");
+    return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST,
+                              DAV_ERR_LOCK_SAVE_LOCK,
+                              "Tried to attach multiple locks to a resource.");
 
   /* RFC2518bis (section 7.4) doesn't require us to support
      'lock-null' resources at all.  Instead, it asks that we treat
@@ -669,16 +670,16 @@ append_locks(dav_lockdb *lockdb,
                                                           resource->pool));
 
       if (resource->info->repos->is_svn_client)
-        return dav_new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED,
-                             DAV_ERR_LOCK_SAVE_LOCK,
-                             "Subversion clients may not lock "
-                             "nonexistent paths.");
+        return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED,
+                                  DAV_ERR_LOCK_SAVE_LOCK,
+                                  "Subversion clients may not lock "
+                                  "nonexistent paths.");
 
       else if (! resource->info->repos->autoversioning)
-        return dav_new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED,
-                             DAV_ERR_LOCK_SAVE_LOCK,
-                             "Attempted to lock non-existent path;"
-                             " turn on autoversioning first.");
+        return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED,
+                                  DAV_ERR_LOCK_SAVE_LOCK,
+                                  "Attempted to lock non-existent path; "
+                                  "turn on autoversioning first.");
 
       /* Commit a 0-byte file: */
 
@@ -746,9 +747,9 @@ append_locks(dav_lockdb *lockdb,
   if (serr && serr->apr_err == SVN_ERR_FS_NO_USER)
     {
       svn_error_clear(serr);
-      return dav_new_error(resource->pool, HTTP_UNAUTHORIZED,
-                           DAV_ERR_LOCK_SAVE_LOCK,
-                           "Anonymous lock creation is not allowed.");
+      return dav_svn__new_error(resource->pool, HTTP_UNAUTHORIZED,
+                                DAV_ERR_LOCK_SAVE_LOCK,
+                                "Anonymous lock creation is not allowed.");
     }
   else if (serr)
     return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
@@ -812,9 +813,9 @@ remove_lock(dav_lockdb *lockdb,
      be removed from it. */
   if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
                                      resource->pool))
-    return dav_new_error(resource->pool, HTTP_FORBIDDEN,
-                         DAV_ERR_LOCK_SAVE_LOCK,
-                         "Path is not accessible.");
+    return dav_svn__new_error(resource->pool, HTTP_FORBIDDEN,
+                              DAV_ERR_LOCK_SAVE_LOCK,
+                              "Path is not accessible.");
 
   if (locktoken == NULL)
     {
@@ -849,9 +850,9 @@ remove_lock(dav_lockdb *lockdb,
       if (serr && serr->apr_err == SVN_ERR_FS_NO_USER)
         {
           svn_error_clear(serr);
-          return dav_new_error(resource->pool, HTTP_UNAUTHORIZED,
-                               DAV_ERR_LOCK_SAVE_LOCK,
-                               "Anonymous lock removal is not allowed.");
+          return dav_svn__new_error(resource->pool, HTTP_UNAUTHORIZED,
+                                    DAV_ERR_LOCK_SAVE_LOCK,
+                                    "Anonymous lock removal is not allowed.");
         }
       else if (serr)
         return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
@@ -898,9 +899,9 @@ refresh_locks(dav_lockdb *lockdb,
      anything about locks attached to it.*/
   if (! dav_svn__allow_read_resource(resource, SVN_INVALID_REVNUM,
                                      resource->pool))
-    return dav_new_error(resource->pool, HTTP_FORBIDDEN,
-                         DAV_ERR_LOCK_SAVE_LOCK,
-                         "Path is not accessible.");
+    return dav_svn__new_error(resource->pool, HTTP_FORBIDDEN,
+                              DAV_ERR_LOCK_SAVE_LOCK,
+                              "Path is not accessible.");
 
   /* Convert the path into an svn_lock_t. */
   serr = svn_fs_get_lock(&slock,
@@ -916,9 +917,10 @@ refresh_locks(dav_lockdb *lockdb,
      current lock on the incoming resource? */
   if ((! slock)
       || (strcmp(token->uuid_str, slock->token) != 0))
-    return dav_new_error(resource->pool, HTTP_UNAUTHORIZED,
-                         DAV_ERR_LOCK_SAVE_LOCK,
-                         "Lock refresh request doesn't match existing lock.");
+    return dav_svn__new_error(resource->pool, HTTP_UNAUTHORIZED,
+                              DAV_ERR_LOCK_SAVE_LOCK,
+                              "Lock refresh request doesn't match existing "
+                              "lock.");
 
   /* Now use the tweaked svn_lock_t to 'refresh' the existing lock. */
   serr = svn_repos_fs_lock(&slock,
@@ -936,9 +938,9 @@ refresh_locks(dav_lockdb *lockdb,
   if (serr && serr->apr_err == SVN_ERR_FS_NO_USER)
     {
       svn_error_clear(serr);
-      return dav_new_error(resource->pool, HTTP_UNAUTHORIZED,
-                           DAV_ERR_LOCK_SAVE_LOCK,
-                           "Anonymous lock refreshing is not allowed.");
+      return dav_svn__new_error(resource->pool, HTTP_UNAUTHORIZED,
+                                DAV_ERR_LOCK_SAVE_LOCK,
+                                "Anonymous lock refreshing is not allowed.");
     }
   else if (serr)
     return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/mirror.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/mirror.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/mirror.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/mirror.c Sat Dec 11 00:15:55 2010
@@ -49,7 +49,8 @@ static void proxy_request_fixup(request_
     r->filename = (char *) svn_path_uri_encode(apr_pstrcat(r->pool, "proxy:",
                                                            master_uri,
                                                            uri_segment,
-                                                           NULL), r->pool);
+                                                           (char *)NULL),
+                                               r->pool);
     r->handler = "proxy-server";
     ap_add_output_filter("LocationRewrite", NULL, r, r->connection);
     ap_add_output_filter("ReposRewrite", NULL, r, r->connection);
@@ -83,11 +84,11 @@ int dav_svn__proxy_request_fixup(request
             r->method_number == M_GET) {
             if ((seg = ap_strstr(r->uri, root_dir))) {
                 if (ap_strstr_c(seg, apr_pstrcat(r->pool, special_uri,
-                                                 "/wrk/", NULL))
+                                                 "/wrk/", (char *)NULL))
                     || ap_strstr_c(seg, apr_pstrcat(r->pool, special_uri,
-                                                    "/txn/", NULL))
+                                                    "/txn/", (char *)NULL))
                     || ap_strstr_c(seg, apr_pstrcat(r->pool, special_uri,
-                                                    "/txr/", NULL))) {
+                                                    "/txr/", (char *)NULL))) {
                     seg += strlen(root_dir);
                     proxy_request_fixup(r, master_uri, seg);
                 }
@@ -239,7 +240,7 @@ apr_status_t dav_svn__location_header_fi
         new_uri = ap_construct_url(r->pool,
                                    apr_pstrcat(r->pool,
                                                dav_svn__get_root_dir(r), "/",
-                                               start_foo, NULL),
+                                               start_foo, (char *)NULL),
                                    r);
         new_uri = svn_path_uri_encode(new_uri, r->pool);
         apr_table_set(r->headers_out, "Location", new_uri);

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/mod_dav_svn.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/mod_dav_svn.c Sat Dec 11 00:15:55 2010
@@ -311,18 +311,24 @@ SVNPathAuthz_cmd(cmd_parms *cmd, void *c
   dir_conf_t *conf = config;
 
   if (apr_strnatcasecmp("off", arg1) == 0)
-    conf->path_authz_method = CONF_PATHAUTHZ_OFF;
-  else if (apr_strnatcasecmp(PATHAUTHZ_BYPASS_ARG,arg1) == 0)
+    {
+      conf->path_authz_method = CONF_PATHAUTHZ_OFF;
+    }
+  else if (apr_strnatcasecmp(PATHAUTHZ_BYPASS_ARG, arg1) == 0)
     {
       conf->path_authz_method = CONF_PATHAUTHZ_BYPASS;
       if (pathauthz_bypass_func == NULL)
-        pathauthz_bypass_func=ap_lookup_provider(
-                                          AUTHZ_SVN__SUBREQ_BYPASS_PROV_GRP,
-                                          AUTHZ_SVN__SUBREQ_BYPASS_PROV_NAME,
-                                          AUTHZ_SVN__SUBREQ_BYPASS_PROV_VER);
+        {
+          pathauthz_bypass_func =
+            ap_lookup_provider(AUTHZ_SVN__SUBREQ_BYPASS_PROV_GRP,
+                               AUTHZ_SVN__SUBREQ_BYPASS_PROV_NAME,
+                               AUTHZ_SVN__SUBREQ_BYPASS_PROV_VER);
+        }
     }
   else
-    conf->path_authz_method = CONF_PATHAUTHZ_ON;
+    {
+      conf->path_authz_method = CONF_PATHAUTHZ_ON;
+    }
 
   return NULL;
 }
@@ -525,35 +531,39 @@ dav_svn__get_special_uri(request_rec *r)
 const char *
 dav_svn__get_me_resource_uri(request_rec *r)
 {
-  return apr_pstrcat(r->pool, dav_svn__get_special_uri(r), "/me", NULL);
+  return apr_pstrcat(r->pool, dav_svn__get_special_uri(r), "/me",
+                     (char *)NULL);
 }
 
 
 const char *
 dav_svn__get_rev_stub(request_rec *r)
 {
-  return apr_pstrcat(r->pool, dav_svn__get_special_uri(r), "/rev", NULL);
+  return apr_pstrcat(r->pool, dav_svn__get_special_uri(r), "/rev",
+                     (char *)NULL);
 }
 
 
 const char *
 dav_svn__get_rev_root_stub(request_rec *r)
 {
-  return apr_pstrcat(r->pool, dav_svn__get_special_uri(r), "/rvr", NULL);
+  return apr_pstrcat(r->pool, dav_svn__get_special_uri(r), "/rvr",
+                     (char *)NULL);
 }
 
 
 const char *
 dav_svn__get_txn_stub(request_rec *r)
 {
-  return apr_pstrcat(r->pool, dav_svn__get_special_uri(r), "/txn", NULL);
+  return apr_pstrcat(r->pool, dav_svn__get_special_uri(r), "/txn",
+                     (char *)NULL);
 }
 
 
 const char *
 dav_svn__get_txn_root_stub(request_rec *r)
 {
-  return apr_pstrcat(r->pool, dav_svn__get_special_uri(r), "/txr", NULL);
+  return apr_pstrcat(r->pool, dav_svn__get_special_uri(r), "/txr", (char *)NULL);
 }
 
 
@@ -608,7 +618,7 @@ dav_svn__get_pathauthz_bypass(request_re
 
   conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
 
-  if (conf->path_authz_method==CONF_PATHAUTHZ_BYPASS)
+  if (conf->path_authz_method == CONF_PATHAUTHZ_BYPASS)
     return pathauthz_bypass_func;
   return NULL;
 }

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/dated-rev.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/dated-rev.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/dated-rev.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/dated-rev.c Sat Dec 11 00:15:55 2010
@@ -80,9 +80,9 @@ dav_svn__dated_rev_report(const dav_reso
 
   if (tm == (apr_time_t) -1)
     {
-      return dav_new_error(resource->pool, HTTP_BAD_REQUEST, 0,
-                           "The request does not contain a valid "
-                           "'DAV:" SVN_DAV__CREATIONDATE "' element.");
+      return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+                                "The request does not contain a valid "
+                                "'DAV:" SVN_DAV__CREATIONDATE "' element.");
     }
 
   /* Do the actual work of finding the revision by date. */
@@ -90,8 +90,8 @@ dav_svn__dated_rev_report(const dav_reso
                                       resource->pool)) != SVN_NO_ERROR)
     {
       svn_error_clear(err);
-      return dav_new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
-                           "Could not access revision times.");
+      return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+                                "Could not access revision times.");
     }
 
   bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/deleted-rev.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/deleted-rev.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/deleted-rev.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/deleted-rev.c Sat Dec 11 00:15:55 2010
@@ -110,8 +110,8 @@ dav_svn__get_deleted_rev_report(const da
   if (err)
     {
       svn_error_clear(err);
-      return dav_new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
-                           "Could not find revision path was deleted.");
+      return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+                                "Could not find revision path was deleted.");
     }
 
   bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/get-locks.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/get-locks.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/get-locks.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/get-locks.c Sat Dec 11 00:15:55 2010
@@ -192,9 +192,9 @@ dav_svn__get_locks_report(const dav_reso
   /* The request URI should be a public one representing an fs path. */
   if ((! resource->info->repos_path)
       || (! resource->info->repos->repos))
-    return dav_new_error(resource->pool, HTTP_BAD_REQUEST, 0,
-                         "get-locks-report run on resource which doesn't "
-                         "represent a path within a repository.");
+    return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+                              "get-locks-report run on resource which doesn't "
+                              "represent a path within a repository.");
 
   arb.r = resource->info->r;
   arb.repos = resource->info->repos;
@@ -209,9 +209,9 @@ dav_svn__get_locks_report(const dav_reso
               (depth != svn_depth_files) &&
               (depth != svn_depth_immediates) &&
               (depth != svn_depth_infinity))
-            return dav_new_error(resource->pool, HTTP_BAD_REQUEST, 0,
-                                 "Invalid 'depth' specified in "
-                                 "get-locks-report request.");
+            return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+                                      "Invalid 'depth' specified in "
+                                      "get-locks-report request.");
           continue;
         }
     }

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/mergeinfo.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/mergeinfo.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/mergeinfo.c Sat Dec 11 00:15:55 2010
@@ -50,6 +50,7 @@ dav_svn__get_mergeinfo_report(const dav_
   dav_error *derr = NULL;
   apr_xml_elem *child;
   svn_mergeinfo_catalog_t catalog;
+  svn_boolean_t validate_inherited_mergeinfo = FALSE;
   svn_boolean_t include_descendants = FALSE;
   dav_svn__authz_read_baton arb;
   const dav_svn_repos *repos = resource->info->repos;
@@ -99,6 +100,12 @@ dav_svn__get_mergeinfo_report(const dav_
                                  resource->pool);
           (*((const char **)(apr_array_push(paths)))) = target;
         }
+      else if (strcmp(child->name, SVN_DAV__VALIDATE_INHERITED) == 0)
+        {
+          const char *word = dav_xml_get_cdata(child, resource->pool, 1);
+          if (strcmp(word, "yes") == 0)
+            validate_inherited_mergeinfo = TRUE;
+        }
       else if (strcmp(child->name, SVN_DAV__INCLUDE_DESCENDANTS) == 0)
         {
           const char *word = dav_xml_get_cdata(child, resource->pool, 1);
@@ -117,10 +124,11 @@ dav_svn__get_mergeinfo_report(const dav_
   /* Build mergeinfo brigade */
   bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
 
-  serr = svn_repos_fs_get_mergeinfo(&catalog, repos->repos, paths, rev,
-                                    inherit, include_descendants,
-                                    dav_svn__authz_read_func(&arb),
-                                    &arb, resource->pool);
+  serr = svn_repos_fs_get_mergeinfo2(&catalog, repos->repos, paths, rev,
+                                     inherit, validate_inherited_mergeinfo,
+                                     include_descendants,
+                                     dav_svn__authz_read_func(&arb),
+                                     &arb, resource->pool);
   if (serr)
     {
       derr = dav_svn__convert_err(serr, HTTP_BAD_REQUEST, serr->message,
@@ -197,6 +205,22 @@ dav_svn__get_mergeinfo_report(const dav_
         }
     }
 
+  if (validate_inherited_mergeinfo)
+    {
+      serr = dav_svn__brigade_puts(bb, output,
+                                   "<S:" SVN_DAV__VALIDATE_INHERITED ">"
+                                   "yes"
+                                   "</S:" SVN_DAV__VALIDATE_INHERITED ">"
+                                   DEBUG_CR);
+      if (serr)
+        {
+          derr = dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
+                                      "Error ending REPORT response.",
+                                      resource->pool);
+          goto cleanup;
+        }
+    }
+
   if ((serr = dav_svn__brigade_puts(bb, output,
                                     "</S:" SVN_DAV__MERGEINFO_REPORT ">"
                                     DEBUG_CR)))

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/replay.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/replay.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/replay.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/replay.c Sat Dec 11 00:15:55 2010
@@ -402,7 +402,7 @@ malformed_element_error(const char *tagn
                                             "The request's '", tagname,
                                             "' element is malformed; there "
                                             "is a problem with the client.",
-                                            NULL),
+                                            (char *)NULL),
                                 SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
 }
 

Modified: subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/update.c?rev=1044548&r1=1044547&r2=1044548&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/mod_dav_svn/reports/update.c Sat Dec 11 00:15:55 2010
@@ -250,7 +250,7 @@ absent_helper(svn_boolean_t is_dir,
                "<S:absent-%s name=\"%s\"/>" DEBUG_CR,
                DIR_OR_FILE(is_dir),
                apr_xml_quote_string(pool,
-                                    svn_relpath_basename(path, pool),
+                                    svn_relpath_basename(path, NULL),
                                     1)));
     }
 
@@ -409,8 +409,6 @@ open_helper(svn_boolean_t is_dir,
 static svn_error_t *
 close_helper(svn_boolean_t is_dir, item_baton_t *baton)
 {
-  int i;
-
   if (baton->uc->resource_walk)
     return SVN_NO_ERROR;
 
@@ -419,6 +417,7 @@ close_helper(svn_boolean_t is_dir, item_
   if (baton->removed_props && (! baton->added || baton->copyfrom))
     {
       const char *qname;
+      int i;
 
       for (i = 0; i < baton->removed_props->nelts; i++)
         {
@@ -589,7 +588,7 @@ upd_delete_entry(const char *path,
 {
   item_baton_t *parent = parent_baton;
   const char *qname = apr_xml_quote_string(pool,
-                                           svn_relpath_basename(path, pool),
+                                           svn_relpath_basename(path, NULL),
                                            1);
   return dav_svn__brigade_printf(parent->uc->bb, parent->uc->output,
                                  "<S:delete-entry name=\"%s\"/>" DEBUG_CR,
@@ -918,7 +917,8 @@ malformed_element_error(const char *tagn
 {
   const char *errstr = apr_pstrcat(pool, "The request's '", tagname,
                                    "' element is malformed; there "
-                                   "is a problem with the client.", NULL);
+                                   "is a problem with the client.",
+                                   (char *)NULL);
   return dav_svn__new_error_tag(pool, HTTP_BAD_REQUEST, 0, errstr,
                                 SVN_DAV_ERROR_NAMESPACE, SVN_DAV_ERROR_TAG);
 }