subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1128441 - in /subversion/trunk/subversion: libsvn_client/externals.c libsvn_wc/wc_db.c
Date Fri, 27 May 2011 20:13:25 GMT
Author: rhuijben
Date: Fri May 27 20:13:25 2011
New Revision: 1128441

URL: http://svn.apache.org/viewvc?rev=1128441&view=rev
Log:
Fix two small issues in the format 29 externals processing. After this patch
the externals processing works on the EXTERNALS store when the format 29
code is enabled.

* subversion/libsvn_client/externals.c
  (handle_external_item_change): Pass the right parent directory.

* subversion/libsvn_wc/wc_db.c
  (insert_external_node): Allow recording (directory) externals in unversioned
    subdirectories.

Modified:
    subversion/trunk/subversion/libsvn_client/externals.c
    subversion/trunk/subversion/libsvn_wc/wc_db.c

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1128441&r1=1128440&r2=1128441&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Fri May 27 20:13:25 2011
@@ -920,7 +920,6 @@ handle_external_item_change(const struct
   if (! old_url)
     {
       /* This branch is only used during a checkout or an export. */
-      const char *parent_abspath;
 
       /* First notify that we're about to handle an external. */
       if (eb->ctx->notify_func2)
@@ -934,8 +933,9 @@ handle_external_item_change(const struct
         case svn_node_dir:
           /* The target dir might have multiple components.  Guarantee
              the path leading down to the last component. */
-          parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
-          SVN_ERR(svn_io_make_dir_recursively(parent_abspath, scratch_pool));
+          SVN_ERR(svn_io_make_dir_recursively(svn_dirent_dirname(local_abspath,
+                                                                 scratch_pool),
+                                              scratch_pool));
 
           /* If we were handling renames the fancy way, then before
              checking out a new subdir here, we would somehow learn if
@@ -961,7 +961,7 @@ handle_external_item_change(const struct
             SVN_ERR(switch_dir_external(
                      local_abspath, new_url,
                      &(new_item->peg_revision), &(new_item->revision),
-                     parent_abspath, eb->timestamp_sleep, eb->ctx,
+                     parent_dir_abspath, eb->timestamp_sleep, eb->ctx,
                      scratch_pool));
           break;
         case svn_node_file:

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1128441&r1=1128440&r2=1128441&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Fri May 27 20:13:25 2011
@@ -2581,12 +2581,13 @@ insert_external_node(void *baton,
 {
   const insert_external_baton_t *ieb = baton;
   svn_wc__db_status_t status;
-  svn_wc__db_kind_t kind;
   svn_error_t *err;
   svn_boolean_t update_root;
   apr_int64_t repos_id;
 #if SVN_WC__VERSION >= SVN_WC__HAS_EXTERNALS_STORE
   svn_sqlite__stmt_t *stmt;
+#else
+  svn_wc__db_kind_t kind;
 #endif
 
   if (ieb->repos_id != INVALID_REPOS_ID)
@@ -2595,6 +2596,7 @@ insert_external_node(void *baton,
     SVN_ERR(create_repos_id(&repos_id, ieb->repos_root_url, ieb->repos_uuid,
                             wcroot->sdb, scratch_pool));
 
+#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
   /* Currently externals can only be added under an existing directory */
   SVN_ERR(read_info(&status, &kind, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                     NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -2605,6 +2607,7 @@ insert_external_node(void *baton,
   if ((status != svn_wc__db_status_normal && status != svn_wc__db_status_added)
       || kind != svn_wc__db_kind_dir)
     return svn_error_create(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL, NULL);
+#endif
 
   /* And there must be no existing BASE node or it must be a file external */
   err = base_get_info(&status, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,



Mime
View raw message