subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject svn commit: r1204374 [21/29] - in /subversion/branches/svn-bisect: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/ contrib/client-side/emacs/ notes/ notes/wc-ng/ subversion/bindings/javahl/native...
Date Mon, 21 Nov 2011 07:08:07 GMT
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=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/wc_db.h Mon Nov 21 07:07:56 2011
@@ -128,37 +128,6 @@ extern "C" {
 typedef struct svn_wc__db_t svn_wc__db_t;
 
 
-/* Enum indicating what kind of versioned object we're talking about.
-
-   ### KFF: That is, my understanding is that this is *not* an enum
-   ### indicating what kind of storage the DB is using, even though
-   ### one might think that from its name.  Rather, the "svn_wc__db_"
-   ### is a generic prefix, and this "_kind_t" type indicates the kind
-   ### of something that's being stored in the DB.
-
-   ### KFF: Does this overlap too much with what svn_node_kind_t does?
-
-   ### gjs: possibly. but that doesn't have a symlink kind. and that
-   ###   cannot simply be added. it would surprise too much code.
-   ###   (we could probably create svn_node_kind2_t though)
-*/
-typedef enum svn_wc__db_kind_t {
-    /* The node is a directory. */
-    svn_wc__db_kind_dir,
-
-    /* The node is a file. */
-    svn_wc__db_kind_file,
-
-    /* The node is a symbolic link. */
-    svn_wc__db_kind_symlink,
-
-    /* The type of the node is not known, due to its absence, exclusion,
-       deletion, or incomplete status. */
-    svn_wc__db_kind_unknown,
-
-} svn_wc__db_kind_t;
-
-
 /* Enumerated values describing the state of a node. */
 typedef enum svn_wc__db_status_t {
     /* The node is present and has no known modifications applied to it. */
@@ -630,7 +599,7 @@ svn_wc__db_base_add_excluded_node(svn_wc
                                   const char *repos_root_url,
                                   const char *repos_uuid,
                                   svn_revnum_t revision,
-                                  svn_wc__db_kind_t kind,
+                                  svn_kind_t kind,
                                   svn_wc__db_status_t status,
                                   const svn_skel_t *conflict,
                                   const svn_skel_t *work_items,
@@ -661,7 +630,7 @@ svn_wc__db_base_add_not_present_node(svn
                                      const char *repos_root_url,
                                      const char *repos_uuid,
                                      svn_revnum_t revision,
-                                     svn_wc__db_kind_t kind,
+                                     svn_kind_t kind,
                                      const svn_skel_t *conflict,
                                      const svn_skel_t *work_items,
                                      apr_pool_t *scratch_pool);
@@ -740,7 +709,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
 */
 svn_error_t *
 svn_wc__db_base_get_info(svn_wc__db_status_t *status,
-                         svn_wc__db_kind_t *kind,
+                         svn_kind_t *kind,
                          svn_revnum_t *revision,
                          const char **repos_relpath,
                          const char **repos_root_url,
@@ -763,7 +732,7 @@ svn_wc__db_base_get_info(svn_wc__db_stat
    fields needed by the adm crawler. */
 struct svn_wc__db_base_info_t {
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_revnum_t revnum;
   const char *repos_relpath;
   const char *repos_root_url;
@@ -1148,7 +1117,7 @@ svn_wc__db_external_remove(svn_wc__db_t 
  */
 svn_error_t *
 svn_wc__db_external_read(svn_wc__db_status_t *status,
-                         svn_wc__db_kind_t *kind,
+                         svn_kind_t *kind,
                          const char **defining_abspath,
 
                          const char **repos_root_url,
@@ -1164,6 +1133,37 @@ svn_wc__db_external_read(svn_wc__db_stat
                          apr_pool_t *result_pool,
                          apr_pool_t *scratch_pool);
 
+/* Return in *EXTERNALS a list of svn_wc__committable_external_info_t *
+ * containing info on externals defined to be checked out below LOCAL_ABSPATH,
+ * returning only those externals that are not fixed to a specific revision.
+ *
+ * If IMMEDIATES_ONLY is TRUE, only those externals defined to be checked out
+ * as immediate children of LOCAL_ABSPATH are returned (this is useful for
+ * treating user requested depth < infinity).
+ *
+ * If there are no externals to be returned, set *EXTERNALS to NULL. Otherwise
+ * set *EXTERNALS to an APR array newly cleated in RESULT_POOL.
+ *
+ * NOTE: This only returns the externals known by the immediate WC root for
+ * LOCAL_ABSPATH; i.e.:
+ * - If there is a further parent WC "above" the immediate WC root, and if
+ *   that parent WC defines externals to live somewhere within this WC, these
+ *   externals will appear to be foreign/unversioned and won't be picked up.
+ * - Likewise, only the topmost level of externals nestings (externals
+ *   defined within a checked out external dir) is picked up by this function.
+ *   (For recursion, see svn_wc__committable_externals_below().)
+ *
+ * ###TODO: Add a WRI_ABSPATH (wc root indicator) separate from LOCAL_ABSPATH,
+ * to allow searching any wc-root for externals under LOCAL_ABSPATH, not only
+ * LOCAL_ABSPATH's most immediate wc-root. */
+svn_error_t *
+svn_wc__db_committable_externals_below(apr_array_header_t **externals,
+                                       svn_wc__db_t *db,
+                                       const char *local_abspath,
+                                       svn_boolean_t immediates_only,
+                                       apr_pool_t *result_pool,
+                                       apr_pool_t *scratch_pool);
+
 /* Gets a mapping from const char * local abspaths of externals to the const
    char * local abspath of where they are defined for all externals defined
    at or below LOCAL_ABSPATH.
@@ -1260,6 +1260,7 @@ svn_wc__db_op_copy_dir(svn_wc__db_t *db,
                        const char *original_uuid,
                        svn_revnum_t original_revision,
                        const apr_array_header_t *children,
+                       svn_boolean_t is_move,
                        svn_depth_t depth,
                        const svn_skel_t *conflict,
                        const svn_skel_t *work_items,
@@ -1281,6 +1282,7 @@ svn_wc__db_op_copy_file(svn_wc__db_t *db
                         const char *original_uuid,
                         svn_revnum_t original_revision,
                         const svn_checksum_t *checksum,
+                        svn_boolean_t is_move,
                         const svn_skel_t *conflict,
                         const svn_skel_t *work_items,
                         apr_pool_t *scratch_pool);
@@ -1436,6 +1438,32 @@ svn_wc__db_op_delete(svn_wc__db_t *db,
                      apr_pool_t *scratch_pool);
 
 
+/* Mark all LOCAL_ABSPATH in the TARGETS array, and all of their children,
+ * for deletion.
+ *
+ * This function is more efficient than svn_wc__db_op_delete() because
+ * only one sqlite transaction is used for all targets.
+ * It currently lacks support for moves (though this could be changed,
+ * at which point svn_wc__db_op_delete() becomes redundant).
+ *
+ * If NOTIFY_FUNC is not NULL, then it will be called (with NOTIFY_BATON)
+ * for each node deleted. While this processing occurs, if CANCEL_FUNC is
+ * not NULL, then it will be called (with CANCEL_BATON) to detect cancellation
+ * during the processing.
+ *
+ * Note: the notification (and cancellation) occur outside of a SQLite
+ * transaction.
+ */
+svn_error_t *
+svn_wc__db_op_delete_many(svn_wc__db_t *db,
+                          apr_array_header_t *targets,
+                          svn_cancel_func_t cancel_func,
+                          void *cancel_baton,
+                          svn_wc_notify_func2_t notify_func,
+                          void *notify_baton,
+                          apr_pool_t *scratch_pool);
+
+
 /* ### mark PATH as (possibly) modified. "svn edit" ... right API here? */
 svn_error_t *
 svn_wc__db_op_modified(svn_wc__db_t *db,
@@ -1506,6 +1534,10 @@ svn_wc__db_op_revert(svn_wc__db_t *db,
  * path was reverted.  Set *CONFLICT_OLD, *CONFLICT_NEW,
  * *CONFLICT_WORKING and *PROP_REJECT to the names of the conflict
  * files, or NULL if the names are not stored.
+ * 
+ * Set *COPIED_HERE if the reverted node was copied here and is the
+ * operation root of the copy.
+ * Set *KIND to the node kind of the reverted node.
  *
  * Removes the row for LOCAL_ABSPATH from the revert list.
  */
@@ -1515,11 +1547,32 @@ svn_wc__db_revert_list_read(svn_boolean_
                             const char **conflict_new,
                             const char **conflict_working,
                             const char **prop_reject,
+                            svn_boolean_t *copied_here,
+                            svn_kind_t *kind,
                             svn_wc__db_t *db,
                             const char *local_abspath,
                             apr_pool_t *result_pool,
                             apr_pool_t *scratch_pool);
 
+/* The type of elements in the array returned by
+ * svn_wc__db_revert_list_read_copied_children(). */
+typedef struct svn_wc__db_revert_list_copied_child_info_t {
+  const char *abspath;
+  svn_kind_t kind;
+} svn_wc__db_revert_list_copied_child_info_t ;
+
+/* Return in *CHILDREN a list of reverted copied nodes at or within
+ * LOCAL_ABSPATH (which is a reverted file or a reverted directory).
+ * Allocate *COPIED_CHILDREN and its elements in RESULT_POOL.
+ * The elements are of type svn_wc__db_revert_list_copied_child_info_t. */
+svn_error_t *
+svn_wc__db_revert_list_read_copied_children(const apr_array_header_t **children,
+                                            svn_wc__db_t *db,
+                                            const char *local_abspath,
+                                            apr_pool_t *result_pool,
+                                            apr_pool_t *scratch_pool);
+
+
 /* Make revert notifications for all paths in the revert list that are
  * equal to LOCAL_ABSPATH or below LOCAL_ABSPATH.
  *
@@ -1616,7 +1669,7 @@ svn_wc__db_op_set_tree_conflict(svn_wc__
 
    The OUT parameters, and their "not available" values are:
      STATUS                  n/a (always available)
-     KIND                    svn_wc__db_kind_unknown   (For ACTUAL only nodes)
+     KIND                    svn_kind_unknown   (For ACTUAL only nodes)
      REVISION                SVN_INVALID_REVNUM
      REPOS_RELPATH           NULL
      REPOS_ROOT_URL          NULL
@@ -1684,8 +1737,8 @@ svn_wc__db_op_set_tree_conflict(svn_wc__
        node's revision.
 
      svn_wc__db_status_incomplete
-       The BASE or WORKING node is incomplete due to an interrupted
-       operation.
+       The BASE is incomplete due to an interrupted operation.  An
+       incomplete WORKING node will be svn_wc__db_status_added.
 
    If REVISION is requested, it will be set to the revision of the
    unmodified (BASE) node, or to SVN_INVALID_REVNUM if any structural
@@ -1765,7 +1818,7 @@ svn_wc__db_op_set_tree_conflict(svn_wc__
 */
 svn_error_t *
 svn_wc__db_read_info(svn_wc__db_status_t *status,  /* ### derived */
-                     svn_wc__db_kind_t *kind,
+                     svn_kind_t *kind,
                      svn_revnum_t *revision,
                      const char **repos_relpath,
                      const char **repos_root_url,
@@ -1813,7 +1866,7 @@ svn_wc__db_read_info(svn_wc__db_status_t
    fields needed by status. */
 struct svn_wc__db_info_t {
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
   svn_revnum_t revnum;
   const char *repos_relpath;
   const char *repos_root_url;
@@ -1842,6 +1895,12 @@ struct svn_wc__db_info_t {
 
   svn_boolean_t locked;     /* WC directory lock */
   svn_wc__db_lock_t *lock;  /* Repository file lock */
+  svn_boolean_t incomplete; /* TRUE if a working node is incomplete */
+
+  const char *moved_to_abspath; /* Only on op-roots. See svn_wc_status3_t. */
+  svn_boolean_t moved_here;     /* On both op-roots and children. */
+
+  svn_boolean_t file_external;
 };
 
 /* Return in *NODES a hash mapping name->struct svn_wc__db_info_t for
@@ -1865,7 +1924,7 @@ svn_wc__db_read_children_info(apr_hash_t
    fields needed by svn_wc__internal_walk_children(). */
 struct svn_wc__db_walker_info_t {
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
+  svn_kind_t kind;
 };
 
 /* When a node is deleted in WORKING, some of its information is no longer
@@ -1884,7 +1943,7 @@ struct svn_wc__db_walker_info_t {
  */
 svn_error_t *
 svn_wc__db_read_pristine_info(svn_wc__db_status_t *status,
-                              svn_wc__db_kind_t *kind,
+                              svn_kind_t *kind,
                               svn_revnum_t *changed_rev,
                               apr_time_t *changed_date,
                               const char **changed_author,
@@ -2091,13 +2150,13 @@ svn_wc__db_read_conflicts(const apr_arra
 
 /* Return the kind of the node in DB at LOCAL_ABSPATH. The WORKING tree will
    be examined first, then the BASE tree. If the node is not present in either
-   tree and ALLOW_MISSING is TRUE, then svn_wc__db_kind_unknown is returned.
+   tree and ALLOW_MISSING is TRUE, then svn_kind_unknown is returned.
    If the node is missing and ALLOW_MISSING is FALSE, then it will return
    SVN_ERR_WC_PATH_NOT_FOUND.
 
    Uses SCRATCH_POOL for temporary allocations.  */
 svn_error_t *
-svn_wc__db_read_kind(svn_wc__db_kind_t *kind,
+svn_wc__db_read_kind(svn_kind_t *kind,
                      svn_wc__db_t *db,
                      const char *local_abspath,
                      svn_boolean_t allow_missing,
@@ -2257,7 +2316,7 @@ svn_wc__db_global_commit(svn_wc__db_t *d
 svn_error_t *
 svn_wc__db_global_update(svn_wc__db_t *db,
                          const char *local_abspath,
-                         svn_wc__db_kind_t new_kind,
+                         svn_kind_t new_kind,
                          const char *new_repos_relpath,
                          svn_revnum_t new_revision,
                          const apr_hash_t *new_props,
@@ -2410,6 +2469,8 @@ svn_wc__db_scan_base_repos(const char **
        ancestor unshadowed BASE node. ORIGINAL_* will indicate the source
        of the copy.
 
+     svn_wc__db_status_incomplete -- this NODE is copied but incomplete.
+
      svn_wc__db_status_moved_here -- this NODE arrived as a result of a move.
        The root of the moved nodes will be stored in OP_ROOT_ABSPATH.
        Similar to the copied state, its parent may be a WORKING node or a
@@ -2577,14 +2638,20 @@ svn_wc__db_scan_deletion(const char **ba
    @{
 */
 
+/* Create a new wc.db file for LOCAL_DIR_ABSPATH, which is going to be a
+   working copy for the repository REPOS_ROOT_URL with uuid REPOS_UUID.
+   Return the raw sqlite handle, repository id and working copy id
+   and store the database in WC_DB.
+
+   Perform temporary allocations in SCRATCH_POOL. */
 svn_error_t *
 svn_wc__db_upgrade_begin(svn_sqlite__db_t **sdb,
                          apr_int64_t *repos_id,
                          apr_int64_t *wc_id,
+                         svn_wc__db_t *wc_db,
                          const char *local_dir_abspath,
                          const char *repos_root_url,
                          const char *repos_uuid,
-                         apr_pool_t *result_pool,
                          apr_pool_t *scratch_pool);
 
 
@@ -2615,6 +2682,19 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
                                apr_int64_t wc_id,
                                apr_pool_t *scratch_pool);
 
+/* Simply insert (or replace) one row in the EXTERNALS table. */
+svn_error_t *
+svn_wc__db_upgrade_insert_external(svn_wc__db_t *db,
+                                   const char *local_abspath,
+                                   svn_kind_t kind,
+                                   const char *parent_abspath,
+                                   const char *def_local_abspath,
+                                   const char *repos_relpath,
+                                   const char *repos_root_url,
+                                   const char *repos_uuid,
+                                   svn_revnum_t def_peg_revision,
+                                   svn_revnum_t def_revision,
+                                   apr_pool_t *scratch_pool);
 
 /* Get the repository identifier corresponding to REPOS_ROOT_URL from the
    database in SDB. The value is returned in *REPOS_ID. All allocations
@@ -2734,7 +2814,7 @@ svn_error_t *
 svn_wc__db_op_remove_node(svn_wc__db_t *db,
                           const char *local_abspath,
                           svn_revnum_t not_present_revision,
-                          svn_wc__db_kind_t not_present_kind,
+                          svn_kind_t not_present_kind,
                           apr_pool_t *scratch_pool);
 
 /* Remove the WORKING_NODE row of LOCAL_ABSPATH in DB. */

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=1204374&r1=1204373&r2=1204374&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 Nov 21 07:07:56
2011
@@ -100,11 +100,13 @@ 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.  */
+   Right Answer, we should be happy.
+
+   Sets *KIND to svn_node_dir for symlinks. */
 static svn_error_t *
-get_path_kind(svn_wc__db_t *db,
+get_path_kind(svn_node_kind_t *kind,
+              svn_wc__db_t *db,
               const char *local_abspath,
-              svn_node_kind_t *kind,
               apr_pool_t *scratch_pool)
 {
   svn_boolean_t special;
@@ -132,7 +134,11 @@ get_path_kind(svn_wc__db_t *db,
     }
 
   SVN_ERR(svn_io_check_special_path(local_abspath, &db->parse_cache.kind,
-                                    &special /* unused */, scratch_pool));
+                                    &special, scratch_pool));
+
+  /* The wcroot could be a symlink to a directory. (Issue #2557, #3987) */
+  if (special)
+    db->parse_cache.kind = svn_node_dir;
   *kind = db->parse_cache.kind;
 
   return SVN_NO_ERROR;
@@ -395,7 +401,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
      ### rid of this stat() call. it is going to happen for EVERY call
      ### 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(db, local_abspath, &kind, scratch_pool));
+  SVN_ERR(get_path_kind(&kind, db, local_abspath, scratch_pool));
   if (kind != svn_node_dir)
     {
       /* If the node specified by the path is NOT present, then it cannot

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=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.c Mon Nov 21 07:07:56 2011
@@ -109,7 +109,7 @@ remove_base_node(svn_wc__db_t *db,
                  apr_pool_t *scratch_pool)
 {
   svn_wc__db_status_t base_status, wrk_status;
-  svn_wc__db_kind_t base_kind, wrk_kind;
+  svn_kind_t base_kind, wrk_kind;
   svn_boolean_t have_base, have_work;
   svn_error_t *err;
 
@@ -148,8 +148,9 @@ remove_base_node(svn_wc__db_t *db,
                                      scratch_pool, scratch_pool));
 
   /* Children first */
-  if (base_kind == svn_wc__db_kind_dir
-      && base_status == svn_wc__db_status_normal)
+  if (base_kind == svn_kind_dir
+      && (base_status == svn_wc__db_status_normal
+          || base_status == svn_wc__db_status_incomplete))
     {
       const apr_array_header_t *children;
       apr_pool_t *iterpool = svn_pool_create(scratch_pool);
@@ -179,12 +180,12 @@ remove_base_node(svn_wc__db_t *db,
       && wrk_status != svn_wc__db_status_excluded)
     {
       if (wrk_status != svn_wc__db_status_deleted
-          && (base_kind == svn_wc__db_kind_file
-              || base_kind == svn_wc__db_kind_symlink))
+          && (base_kind == svn_kind_file
+              || base_kind == svn_kind_symlink))
         {
           SVN_ERR(svn_io_remove_file2(local_abspath, TRUE, scratch_pool));
         }
-      else if (base_kind == svn_wc__db_kind_dir
+      else if (base_kind == svn_kind_dir
                && wrk_status != svn_wc__db_status_deleted)
         {
           err = svn_io_dir_remove_nonrecursive(local_abspath, scratch_pool);
@@ -218,7 +219,7 @@ run_base_remove(svn_wc__db_t *db,
   const char *local_relpath;
   const char *local_abspath;
   svn_revnum_t not_present_rev = SVN_INVALID_REVNUM;
-  svn_wc__db_kind_t not_present_kind;
+  svn_kind_t not_present_kind;
   const char *repos_relpath, *repos_root_url, *repos_uuid;
   apr_int64_t val;
 
@@ -232,7 +233,7 @@ run_base_remove(svn_wc__db_t *db,
       not_present_rev = (svn_revnum_t)val;
 
       SVN_ERR(svn_skel__parse_int(&val, arg1->next->next, scratch_pool));
-      not_present_kind = (svn_wc__db_kind_t)val;
+      not_present_kind = (svn_kind_t)val;
 
       if (SVN_IS_VALID_REVNUM(not_present_rev))
         {
@@ -295,7 +296,7 @@ svn_wc__wq_build_base_remove(svn_skel_t 
                              svn_wc__db_t *db,
                              const char *local_abspath,
                              svn_revnum_t not_present_revision,
-                             svn_wc__db_kind_t not_present_kind,
+                             svn_kind_t not_present_kind,
                              apr_pool_t *result_pool,
                              apr_pool_t *scratch_pool)
 {
@@ -733,10 +734,7 @@ run_file_install(svn_wc__db_t *db,
                            cancel_func, cancel_baton,
                            scratch_pool));
 
-  /* ### post-commit feature: avoid overwrite if same as working file.  */
-
   /* All done. Move the file into place.  */
-  /* ### fix this. we should delay the rename.  */
 
   {
     svn_error_t *err;
@@ -750,7 +748,7 @@ run_file_install(svn_wc__db_t *db,
       {
         svn_error_t *err2;
 
-        err2 = svn_io_make_dir_recursively(svn_dirent_dirname(dst_abspath,
+        err2 = svn_io_make_dir_recursively(svn_dirent_dirname(local_abspath,
                                                               scratch_pool),
                                            scratch_pool);
 

Modified: subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.h?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/svn-bisect/subversion/libsvn_wc/workqueue.h Mon Nov 21 07:07:56 2011
@@ -212,7 +212,7 @@ svn_wc__wq_build_base_remove(svn_skel_t 
                              svn_wc__db_t *db,
                              const char *local_abspath,
                              svn_revnum_t not_present_revision,
-                             svn_wc__db_kind_t not_present_kind,
+                             svn_kind_t not_present_kind,
                              apr_pool_t *result_pool,
                              apr_pool_t *scratch_pool);
 

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=1204374&r1=1204373&r2=1204374&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 Nov 21 07:07:56 2011
@@ -808,7 +808,8 @@ enum dav_svn__build_what {
   DAV_SVN__BUILD_URI_BC,         /* a Baseline Collection */
   DAV_SVN__BUILD_URI_PUBLIC,     /* the "public" VCR */
   DAV_SVN__BUILD_URI_VERSION,    /* a Version Resource */
-  DAV_SVN__BUILD_URI_VCC         /* a Version Controlled Configuration */
+  DAV_SVN__BUILD_URI_VCC,        /* a Version Controlled Configuration */
+  DAV_SVN__BUILD_URI_REVROOT     /* HTTPv2: Revision Root resource */
 };
 
 const char *

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=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/liveprops.c Mon Nov 21 07:07:56
2011
@@ -483,6 +483,8 @@ insert_prop_internal(const dav_resource 
                    there's no point even checking.  No matter what the
                    error is, we can't claim to have a mime type for
                    this resource. */
+                ap_log_rerror(APLOG_MARK, APLOG_WARNING, serr->apr_err, 
+                              resource->info->r, "%s", serr->message);
                 svn_error_clear(serr);
                 return DAV_PROP_INSERT_NOTDEF;
               }

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=1204374&r1=1204373&r2=1204374&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 Nov 21 07:07:56
2011
@@ -215,8 +215,15 @@ merge_dir_config(apr_pool_t *p, void *ba
   newconf->list_parentpath = INHERIT_VALUE(parent, child, list_parentpath);
   newconf->txdelta_cache = INHERIT_VALUE(parent, child, txdelta_cache);
   newconf->fulltext_cache = INHERIT_VALUE(parent, child, fulltext_cache);
-  /* Prefer our parent's value over our new one - hence the swap. */
-  newconf->root_dir = INHERIT_VALUE(child, parent, root_dir);
+  newconf->root_dir = INHERIT_VALUE(parent, child, root_dir);
+
+  if (parent->fs_path)
+    ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
+                 "mod_dav_svn: nested Location '%s' hinders access to '%s' "
+                 "in SVNPath Location '%s'",
+                 child->root_dir,
+                 svn_urlpath__skip_ancestor(parent->root_dir, child->root_dir),
+                 parent->root_dir);
 
   return newconf;
 }
@@ -902,13 +909,17 @@ merge_xml_in_filter(ap_filter_t *f,
 /* Response handler for POST requests (protocol-v2 commits).  */
 static int dav_svn__handler(request_rec *r)
 {
-  /* HTTP-defined Methods we handle */
-  r->allowed = 0
-    | (AP_METHOD_BIT << M_POST);
-
-  if (r->method_number == M_POST) {
-    return dav_svn__method_post(r);
-  }
+  dir_conf_t *conf = ap_get_module_config(r->per_dir_config, &dav_svn_module);
+
+  if (conf->fs_path || conf->fs_parent_path)
+    {
+      /* HTTP-defined Methods we handle */
+      r->allowed = 0
+        | (AP_METHOD_BIT << M_POST);
+
+      if (r->method_number == M_POST)
+        return dav_svn__method_post(r);
+    }
 
   return DECLINED;
 }
@@ -1000,7 +1011,7 @@ static const command_rec cmds[] =
   /* per server */
   AP_INIT_TAKE1("SVNInMemoryCacheSize", SVNInMemoryCacheSize_cmd, NULL,
                 RSRC_CONF,
-                "specifies the maximum size im kB per process of Subversion's "
+                "specifies the maximum size in kB per process of Subversion's "
                 "in-memory object cache (default value is 16384; 0 deactivates "
                 "the cache)."),
   /* per server */

Modified: subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/mergeinfo.c?rev=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/mergeinfo.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/reports/mergeinfo.c Mon Nov 21 07:07:56
2011
@@ -52,7 +52,6 @@ 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;
@@ -108,12 +107,6 @@ 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);
@@ -132,11 +125,10 @@ 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_mergeinfo2(&catalog, repos->repos, paths, rev,
-                                     inherit, validate_inherited_mergeinfo,
-                                     include_descendants,
-                                     dav_svn__authz_read_func(&arb),
-                                     &arb, resource->pool);
+  serr = svn_repos_fs_get_mergeinfo(&catalog, repos->repos, paths, rev,
+                                    inherit, include_descendants,
+                                    dav_svn__authz_read_func(&arb),
+                                    &arb, resource->pool);
   if (serr)
     {
       derr = dav_svn__convert_err(serr, HTTP_BAD_REQUEST, serr->message,

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=1204374&r1=1204373&r2=1204374&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 Nov 21 07:07:56
2011
@@ -82,6 +82,11 @@ typedef struct update_ctx_t {
 
   /* SVNDIFF version to send to client.  */
   int svndiff_version;
+
+  /* Did the client submit this REPORT request via the HTTPv2 "me
+     resource" and are we advertising support for as much? */
+  svn_boolean_t enable_v2_response;
+
 } update_ctx_t;
 
 typedef struct item_baton_t {
@@ -219,9 +224,18 @@ send_vsn_url(item_baton_t *baton, apr_po
   path = get_real_fs_path(baton, pool);
   revision = dav_svn__get_safe_cr(baton->uc->rev_root, path, pool);
 
-  href = dav_svn__build_uri(baton->uc->resource->info->repos,
-                            DAV_SVN__BUILD_URI_VERSION,
-                            revision, path, 0 /* add_href */, pool);
+  if (baton->uc->enable_v2_response)
+    {
+      href = dav_svn__build_uri(baton->uc->resource->info->repos,
+                                DAV_SVN__BUILD_URI_REVROOT,
+                                revision, path, 0 /* add_href */, pool);
+    }
+  else
+    {
+      href = dav_svn__build_uri(baton->uc->resource->info->repos,
+                                DAV_SVN__BUILD_URI_VERSION,
+                                revision, path, 0 /* add_href */, pool);
+    }
 
   return dav_svn__brigade_printf(baton->uc->bb, baton->uc->output,
                                  "<D:checked-in><D:href>%s</D:href>"
@@ -1073,6 +1087,9 @@ dav_svn__update_report(const dav_resourc
   uc.target = target;
   uc.bb = apr_brigade_create(resource->pool, output->c->bucket_alloc);
   uc.pathmap = NULL;
+  uc.enable_v2_response = ((resource->info->restype == DAV_SVN_RESTYPE_ME)
+                           && (resource->info->repos->v2_protocol));
+
   if (dst_path) /* we're doing a 'switch' */
     {
       if (*target)

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=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/util.c Mon Nov 21 07:07:56 2011
@@ -264,6 +264,11 @@ dav_svn__build_uri(const dav_svn_repos *
                           href1, root_path, special_uri,
                           revision, path_uri, href2);
 
+    case DAV_SVN__BUILD_URI_REVROOT:
+      return apr_psprintf(pool, "%s%s/%s/rvr/%ld%s%s",
+                          href1, root_path, special_uri,
+                          revision, path_uri, href2);
+
     case DAV_SVN__BUILD_URI_VCC:
       return apr_psprintf(pool, "%s%s/%s/vcc/" DAV_SVN__DEFAULT_VCC_NAME "%s",
                           href1, root_path, special_uri, href2);
@@ -704,7 +709,7 @@ request_body_to_string(svn_string_t **re
     }
   else
     {
-      buf = svn_stringbuf_create("", pool);
+      buf = svn_stringbuf_create_empty(pool);
     }
 
   brigade = apr_brigade_create(r->pool, r->connection->bucket_alloc);
@@ -760,7 +765,7 @@ request_body_to_string(svn_string_t **re
   apr_brigade_destroy(brigade);
 
   /* Make an svn_string_t from our svn_stringbuf_t. */
-  *request_str = svn_string_create("", pool);
+  *request_str = svn_string_create_empty(pool);
   (*request_str)->data = buf->data;
   (*request_str)->len = buf->len;
   return OK;

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=1204374&r1=1204373&r2=1204374&view=diff
==============================================================================
--- subversion/branches/svn-bisect/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/svn-bisect/subversion/mod_dav_svn/version.c Mon Nov 21 07:07:56 2011
@@ -147,8 +147,8 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_ATOMIC_REVPROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY);
   /* Mergeinfo is a special case: here we merely say that the server
-   * knows how to handle mergeinfo and validate inherited
-   * mergeinfo -- whether the repository does too is a separate matter.
+   * knows how to handle mergeinfo -- whether the repository does too
+   * is a separate matter.
    *
    * Think of it as offering the client an early out: if the server
    * can't do merge-tracking, there's no point finding out of the
@@ -159,7 +159,6 @@ get_vsn_options(apr_pool_t *p, apr_text_
    * server capability and remain agnostic about the repository).
    */
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_MERGEINFO);
-  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_MERGEINFO_VALIDATION);
 
   /* ### fork-control? */
 }



Mime
View raw message