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

svn commit: r1357976 - in /subversion/trunk/subversion/libsvn_wc: update_editor.c wc_db.c wc_db.h

Author: rhuijben
Date: Thu Jul  5 22:30:11 2012
New Revision: 1357976

URL: http://svn.apache.org/viewvc?rev=1357976&view=rev
Log:
Following up on r1357929, rename function to
svn_wc__db_base_add_incomplete_directory() and move to similar functions.

No functional changes.

* subversion/libsvn_wc/update_editor.c
  (add_directory): Update caller.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_base_add_incomplete_directory): Place function here ...
  (svn_wc__db_op_begin_update): ... that used to be here.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_base_add_incomplete_directory): Place function here ...
  (svn_wc__db_op_begin_update): ... that used to be here.

Modified:
    subversion/trunk/subversion/libsvn_wc/update_editor.c
    subversion/trunk/subversion/libsvn_wc/wc_db.c
    subversion/trunk/subversion/libsvn_wc/wc_db.h

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1357976&r1=1357975&r2=1357976&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Thu Jul  5 22:30:11 2012
@@ -2232,7 +2232,8 @@ add_directory(const char *path,
         }
     }
 
-  SVN_ERR(svn_wc__db_op_begin_update(eb->db, db->local_abspath,
+  SVN_ERR(svn_wc__db_base_add_incomplete_directory(
+                                     eb->db, db->local_abspath,
                                      db->new_relpath,
                                      eb->repos_root,
                                      eb->repos_uuid,

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1357976&r1=1357975&r2=1357976&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Jul  5 22:30:11 2012
@@ -1715,6 +1715,60 @@ svn_wc__db_base_add_directory(svn_wc__db
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_wc__db_base_add_incomplete_directory(svn_wc__db_t *db,
+                                         const char *local_abspath,
+                                         const char *repos_relpath,
+                                         const char *repos_root_url,
+                                         const char *repos_uuid,
+                                         svn_revnum_t revision,
+                                         svn_depth_t depth,
+                                         svn_boolean_t insert_base_deleted,
+                                         svn_boolean_t delete_working,
+                                         svn_skel_t *conflict,
+                                         svn_skel_t *work_items,
+                                         apr_pool_t *scratch_pool)
+{
+  svn_wc__db_wcroot_t *wcroot;
+  const char *local_relpath;
+  struct insert_base_baton_t ibb;
+
+  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+  SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(revision));
+  SVN_ERR_ASSERT(repos_relpath && repos_root_url && repos_uuid);
+
+  SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
+                                                db, local_abspath,
+                                                scratch_pool, scratch_pool));
+
+  VERIFY_USABLE_WCROOT(wcroot);
+
+  blank_ibb(&ibb);
+
+  /* Calculate repos_id in insert_base_node() to avoid extra transaction */
+  ibb.repos_root_url = repos_root_url;
+  ibb.repos_uuid = repos_uuid;
+
+  ibb.status = svn_wc__db_status_incomplete;
+  ibb.kind = svn_kind_dir;
+  ibb.repos_relpath = repos_relpath;
+  ibb.revision = revision;
+  ibb.depth = depth;
+  ibb.insert_base_deleted = insert_base_deleted;
+  ibb.delete_working = delete_working;
+
+  ibb.conflict = conflict;
+  ibb.work_items = work_items;
+
+  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath,
+                              insert_base_node,
+                              &ibb, scratch_pool));
+
+  SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_empty, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
 
 svn_error_t *
 svn_wc__db_base_add_file(svn_wc__db_t *db,
@@ -13033,61 +13087,6 @@ svn_wc__db_temp_op_make_copy(svn_wc__db_
 }
 
 svn_error_t *
-svn_wc__db_op_begin_update(svn_wc__db_t *db,
-                           const char *local_abspath,
-                           const char *repos_relpath,
-                           const char *repos_root_url,
-                           const char *repos_uuid,
-                           svn_revnum_t revision,
-                           svn_depth_t depth,
-                           svn_boolean_t insert_base_deleted,
-                           svn_boolean_t delete_working,
-                           svn_skel_t *conflict,
-                           svn_skel_t *work_items,
-                           apr_pool_t *scratch_pool)
-{
-  svn_wc__db_wcroot_t *wcroot;
-  const char *local_relpath;
-  struct insert_base_baton_t ibb;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-  SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(revision));
-  SVN_ERR_ASSERT(repos_relpath && repos_root_url && repos_uuid);
-
-  SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath,
-                                                db, local_abspath,
-                                                scratch_pool, scratch_pool));
-
-  VERIFY_USABLE_WCROOT(wcroot);
-
-  blank_ibb(&ibb);
-
-  /* Calculate repos_id in insert_base_node() to avoid extra transaction */
-  ibb.repos_root_url = repos_root_url;
-  ibb.repos_uuid = repos_uuid;
-
-  ibb.status = svn_wc__db_status_incomplete;
-  ibb.kind = svn_kind_dir;
-  ibb.repos_relpath = repos_relpath;
-  ibb.revision = revision;
-  ibb.depth = depth;
-  ibb.insert_base_deleted = insert_base_deleted;
-  ibb.delete_working = delete_working;
-
-  ibb.conflict = conflict;
-  ibb.work_items = work_items;
-
-  SVN_ERR(svn_wc__db_with_txn(wcroot, local_relpath,
-                              insert_base_node,
-                              &ibb, scratch_pool));
-
-  SVN_ERR(flush_entries(wcroot, local_abspath, svn_depth_empty, scratch_pool));
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
 svn_wc__db_info_below_working(svn_boolean_t *have_base,
                               svn_boolean_t *have_work,
                               svn_wc__db_status_t *status,

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1357976&r1=1357975&r2=1357976&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Thu Jul  5 22:30:11 2012
@@ -435,6 +435,25 @@ svn_wc__db_base_add_directory(svn_wc__db
                               const svn_skel_t *work_items,
                               apr_pool_t *scratch_pool);
 
+/* Add a new directory in BASE, whether WORKING nodes exist or not. Mark it
+   as incomplete and with revision REVISION. If REPOS_RELPATH is not NULL,
+   apply REPOS_RELPATH, REPOS_ROOT_URL and REPOS_UUID.
+   Perform all temporary allocations in SCRATCH_POOL.
+   */
+svn_error_t *
+svn_wc__db_base_add_incomplete_directory(svn_wc__db_t *db,
+                                         const char *local_abspath,
+                                         const char *repos_relpath,
+                                         const char *repos_root_url,
+                                         const char *repos_uuid,
+                                         svn_revnum_t revision,
+                                         svn_depth_t depth,
+                                         svn_boolean_t insert_base_deleted,
+                                         svn_boolean_t delete_working,
+                                         svn_skel_t *conflict,
+                                         svn_skel_t *work_items,
+                                         apr_pool_t *scratch_pool);
+
 
 /* Add or replace a file in the BASE tree.
 
@@ -2916,25 +2935,6 @@ svn_wc__db_temp_op_make_copy(svn_wc__db_
                              const char *local_abspath,
                              apr_pool_t *scratch_pool);
 
-/* Add a new directory in BASE, whether WORKING nodes exist or not. Mark it
-   as incomplete and with revision REVISION. If REPOS_RELPATH is not NULL,
-   apply REPOS_RELPATH, REPOS_ROOT_URL and REPOS_UUID.
-   Perform all temporary allocations in SCRATCH_POOL.
-   */
-svn_error_t *
-svn_wc__db_op_begin_update(svn_wc__db_t *db,
-                           const char *local_abspath,
-                           const char *repos_relpath,
-                           const char *repos_root_url,
-                           const char *repos_uuid,
-                           svn_revnum_t revision,
-                           svn_depth_t depth,
-                           svn_boolean_t insert_base_deleted,
-                           svn_boolean_t delete_working,
-                           svn_skel_t *conflict,
-                           svn_skel_t *work_items,
-                           apr_pool_t *scratch_pool);
-
 /* Close the wc root LOCAL_ABSPATH and remove any per-directory
    handles associated with it. */
 svn_error_t *