subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1679139 [4/7] - in /subversion/branches/1.10-cache-improvements: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ subversion/bindings/javahl/ subversion/bindings/javahl/native/ subversion/bindings/javahl/native/jniwra...
Date Wed, 13 May 2015 04:51:28 GMT
Modified: subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/diff_local.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/diff_local.c Wed May
13 04:51:26 2015
@@ -281,7 +281,8 @@ diff_status_callback(void *baton,
       {
         local_only = TRUE; /* Only report additions */
       }
-    else if (db_status == svn_wc__db_status_normal)
+    else if (db_status == svn_wc__db_status_normal
+             || db_status == svn_wc__db_status_incomplete)
       {
         /* Simple diff */
         base_kind = db_kind;
@@ -297,7 +298,8 @@ diff_status_callback(void *baton,
                                          eb->db, local_abspath,
                                          scratch_pool, scratch_pool));
 
-        if (base_status != svn_wc__db_status_normal)
+        if (base_status != svn_wc__db_status_normal
+            && base_status != svn_wc__db_status_incomplete)
           return SVN_NO_ERROR;
       }
     else
@@ -312,7 +314,8 @@ diff_status_callback(void *baton,
                                          eb->db, local_abspath,
                                          scratch_pool, scratch_pool));
 
-        if (base_status != svn_wc__db_status_normal)
+        if (base_status != svn_wc__db_status_normal
+            && base_status != svn_wc__db_status_incomplete)
           local_only = TRUE;
         else if (base_kind != db_kind || !eb->ignore_ancestry)
           {

Modified: subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc-metadata.sql?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc-metadata.sql Wed May
13 04:51:26 2015
@@ -598,27 +598,32 @@ CREATE UNIQUE INDEX I_EXTERNALS_DEFINED
 ANALYZE sqlite_master; /* Creates empty sqlite_stat1 if necessary */
 
 DELETE FROM sqlite_stat1
-WHERE tbl in ('NODES', 'ACTUAL_NODE', 'LOCK', 'WC_LOCK');
+WHERE tbl in ('NODES', 'ACTUAL_NODE', 'LOCK', 'WC_LOCK', 'EXTERNALS');
 
-INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES
     ('NODES', 'sqlite_autoindex_NODES_1',               '8000 8000 2 1');
-INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES
     ('NODES', 'I_NODES_PARENT',                         '8000 8000 10 2 1');
 /* Tell a lie: We ignore that 99.9% of all moved_to values are NULL */
-INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES
     ('NODES', 'I_NODES_MOVED',                          '8000 8000 1 1');
 
-INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES
     ('ACTUAL_NODE', 'sqlite_autoindex_ACTUAL_NODE_1',   '8000 8000 1');
-INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES
     ('ACTUAL_NODE', 'I_ACTUAL_PARENT',                  '8000 8000 10 1');
 
-INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES
     ('LOCK', 'sqlite_autoindex_LOCK_1',                 '100 100 1');
 
-INSERT OR REPLACE INTO sqlite_stat1(tbl, idx, stat) VALUES
+INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES
     ('WC_LOCK', 'sqlite_autoindex_WC_LOCK_1',           '100 100 1');
 
+INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES
+    ('EXTERNALS','sqlite_autoindex_EXTERNALS_1',        '100 100 1');
+INSERT INTO sqlite_stat1(tbl, idx, stat) VALUES
+    ('EXTERNALS','I_EXTERNALS_DEFINED',                 '100 100 3 1');
+
 /* sqlite_autoindex_WORK_QUEUE_1 doesn't exist because WORK_QUEUE is
    a INTEGER PRIMARY KEY AUTOINCREMENT table */
 

Modified: subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc_db.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc_db.c Wed May 13 04:51:26
2015
@@ -9434,8 +9434,8 @@ read_children_info(svn_wc__db_wcroot_t *
                                                            moved_to_relpath,
                                                            result_pool);
 
-              shadow_op_relpath = svn_relpath_limit(child_relpath, op_depth,
-                                                    scratch_pool);
+              shadow_op_relpath = svn_relpath_prefix(child_relpath, op_depth,
+                                                     scratch_pool);
 
               moved_to->shadow_op_root_abspath =
                         svn_dirent_join(wcroot->abspath, shadow_op_relpath,
@@ -9624,8 +9624,8 @@ read_single_info(const struct svn_wc__db
                                                    moved_to_relpath,
                                                    result_pool);
 
-          cur_relpath = svn_relpath_limit(local_relpath, op_depth,
-                                          scratch_pool);
+          cur_relpath = svn_relpath_prefix(local_relpath, op_depth,
+                                           scratch_pool);
 
           move->shadow_op_root_abspath = svn_dirent_join(wcroot->abspath,
                                                          cur_relpath,
@@ -12700,7 +12700,8 @@ scan_addition(svn_wc__db_status_t *statu
 
 
     /* Calculate the op root local path components */
-    op_root_relpath = svn_relpath_limit(local_relpath, op_depth, scratch_pool);
+    op_root_relpath = svn_relpath_prefix(local_relpath, op_depth,
+                                         scratch_pool);
     repos_prefix_path = svn_relpath_skip_ancestor(op_root_relpath,
                                                   local_relpath);
 
@@ -12819,8 +12820,8 @@ scan_addition(svn_wc__db_status_t *statu
             /* Skip to op_depth */
             tmp = op_root_relpath;
 
-            op_root_relpath = svn_relpath_limit(op_root_relpath, op_depth,
-                                                scratch_pool);
+            op_root_relpath = svn_relpath_prefix(op_root_relpath, op_depth,
+                                                 scratch_pool);
             repos_prefix_path = svn_relpath_join(
                                                  svn_relpath_skip_ancestor(op_root_relpath,
tmp),
                                                  repos_prefix_path, scratch_pool);
@@ -13029,8 +13030,8 @@ svn_wc__db_scan_moved(const char **moved
   /* The deleted node is either where we moved from, or one of its ancestors */
   if (moved_from_delete_abspath)
     {
-      const char *tmp = svn_relpath_limit(moved_from_op_root_relpath,
-                                          moved_from_op_depth, scratch_pool);
+      const char *tmp = svn_relpath_prefix(moved_from_op_root_relpath,
+                                           moved_from_op_depth, scratch_pool);
 
       *moved_from_delete_abspath = svn_dirent_join(wcroot->abspath, tmp,
                                                    scratch_pool);
@@ -13236,8 +13237,8 @@ svn_wc__db_scan_moved_to_internal(const
         *move_dst_relpath = apr_pstrdup(result_pool, dst_relpath);
 
       if (delete_relpath)
-        *delete_relpath = svn_relpath_limit(local_relpath, delete_op_depth,
-                                            result_pool);
+        *delete_relpath = svn_relpath_prefix(local_relpath, delete_op_depth,
+                                             result_pool);
     }
 
   return SVN_NO_ERROR;

Modified: subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc_db_update_move.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/libsvn_wc/wc_db_update_move.c Wed
May 13 04:51:26 2015
@@ -490,9 +490,9 @@ create_node_tree_conflict(svn_skel_t **c
 {
   update_move_baton_t *umb = nmb->umb;
   const char *dst_repos_relpath;
-  const char *dst_root_relpath = svn_relpath_limit(nmb->dst_relpath,
-                                                   nmb->umb->dst_op_depth,
-                                                   scratch_pool);
+  const char *dst_root_relpath = svn_relpath_prefix(nmb->dst_relpath,
+                                                    nmb->umb->dst_op_depth,
+                                                    scratch_pool);
 
   dst_repos_relpath =
             svn_relpath_join(nmb->umb->old_version->path_in_repos,
@@ -504,9 +504,9 @@ create_node_tree_conflict(svn_skel_t **c
 
   return svn_error_trace(
             create_tree_conflict(conflict_p, umb->wcroot, dst_local_relpath,
-                                 svn_relpath_limit(dst_local_relpath,
-                                                   umb->dst_op_depth,
-                                                   scratch_pool),
+                                 svn_relpath_prefix(dst_local_relpath,
+                                                    umb->dst_op_depth,
+                                                    scratch_pool),
                                  umb->db,
                                  umb->old_version, umb->new_version,
                                  umb->operation, old_kind, new_kind,
@@ -2083,8 +2083,8 @@ bump_moved_layer(svn_boolean_t *recurse,
         can_bump = FALSE;
     }
 
-  src_root_relpath = svn_relpath_limit(src_relpath, src_del_depth,
-                                       scratch_pool);
+  src_root_relpath = svn_relpath_prefix(src_relpath, src_del_depth,
+                                        scratch_pool);
 
   if (!can_bump)
     {
@@ -2404,9 +2404,9 @@ svn_wc__db_op_raise_moved_away_internal(
                                  src_repos_relpath,
                                  svn_wc_conflict_reason_moved_away,
                                  action,
-                                 svn_relpath_limit(src_relpath,
-                                                   delete_op_depth,
-                                                   iterpool),
+                                 svn_relpath_prefix(src_relpath,
+                                                    delete_op_depth,
+                                                    iterpool),
                                  iterpool, iterpool);
 
       if (!err)

Modified: subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/liveprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/liveprops.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/liveprops.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/liveprops.c Wed May
13 04:51:26 2015
@@ -787,20 +787,30 @@ insert_prop_internal(const dav_resource
 
     case SVN_PROPID_deadprop_count:
       {
-        unsigned int propcount;
-        apr_hash_t *proplist;
+        svn_boolean_t has_props;
 
         if (resource->type != DAV_RESOURCE_TYPE_REGULAR)
           return DAV_PROP_INSERT_NOTSUPP;
 
-        serr = svn_fs_node_proplist(&proplist,
-                                    resource->info->root.root,
-                                    resource->info->repos_path, scratch_pool);
+        /* Retrieving the actual properties is quite expensive while
+           svn clients only want to know if there are properties, by
+           using this svn defined property.
+
+           Our and and SvnKit's implementation of the ra layer check
+           for '> 0' to provide the boolean if the node has custom
+           properties or not, so starting with 1.9 we just provide
+           "1" or "0".
+         */
+        serr = svn_fs_node_has_props(&has_props,
+                                      resource->info->root.root,
+                                      resource->info->repos_path,
+                                      scratch_pool);
+
         if (serr != NULL)
           {
             ap_log_rerror(APLOG_MARK, APLOG_ERR, serr->apr_err,
                           resource->info->r,
-                          "Can't fetch proplist of '%s': "
+                          "Can't fetch has properties on '%s': "
                           "%s",
                           resource->info->repos_path,
                           serr->message);
@@ -809,8 +819,7 @@ insert_prop_internal(const dav_resource
             break;
           }
 
-        propcount = apr_hash_count(proplist);
-        value = apr_psprintf(scratch_pool, "%u", propcount);
+        value = has_props ? "1" : "0";
         break;
       }
 

Modified: subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/repos.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/repos.c Wed May 13
04:51:26 2015
@@ -1948,7 +1948,7 @@ do_out_of_date_check(dav_resource_combin
                                       r->pool);
         }
 
-      if (node_relation != svn_fs_node_same)
+      if (node_relation != svn_fs_node_unchanged)
         {
           serr = svn_error_createf(SVN_ERR_RA_OUT_OF_DATE, NULL,
                                    "Directory '%s' is out of date",
@@ -2126,6 +2126,16 @@ get_resource(request_rec *r,
   xslt_uri = dav_svn__get_xslt_uri(r);
   fs_parent_path = dav_svn__get_fs_parent_path(r);
 
+  if (r->method_number == M_COPY)
+    {
+      /* Workaround for issue #4531: Avoid a depth-infinity walk on
+         the copy source by overriding the Depth header here.
+         mod_dav defaults to infinite depth if this header is not set
+         which makes copies O(size of source) rather than the desired O(1).
+         ### Should be fixed by an explicit provider API feature in mod_dav. */
+      apr_table_setn(r->headers_in, "Depth", "0");
+    }
+
   /* Special case: detect and build the SVNParentPath as a unique type
      of private resource, iff the SVNListParentPath directive is 'on'. */
   if (dav_svn__is_parentpath_list(r))

Modified: subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/util.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/util.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/util.c Wed May 13 04:51:26
2015
@@ -217,7 +217,7 @@ dav_svn__get_safe_cr(svn_fs_root_t *root
       return revision;
     }
 
-  if (node_relation == svn_fs_node_same)
+  if (node_relation == svn_fs_node_unchanged)
     return history_rev;  /* the history rev is safe!  the same node
                             exists at the same path in both revisions. */
 

Modified: subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/version.c?rev=1679139&r1=1679138&r2=1679139&view=diff
==============================================================================
--- subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/1.10-cache-improvements/subversion/mod_dav_svn/version.c Wed May 13
04:51:26 2015
@@ -751,7 +751,7 @@ dav_svn__checkout(dav_resource *resource
                   svn_error_clear(serr);
                   return err;
                 }
-              if (node_relation != svn_fs_node_same)
+              if (node_relation != svn_fs_node_unchanged)
                 {
                   return dav_svn__new_error_svn
                     (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT,



Mime
View raw message