subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r920424 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_wc/lock.c libsvn_wc/util.c libsvn_wc/wc.h
Date Mon, 08 Mar 2010 18:05:19 GMT
Author: philip
Date: Mon Mar  8 18:05:19 2010
New Revision: 920424

URL: http://svn.apache.org/viewvc?rev=920424&view=rev
Log:
Remove some svn_wc_entry_t using code.

* subversion/include/private/svn_wc_private.h
  (svn_wc__path_switched): Remove SVN_ERR_ENTRY_MISSING_URL from doc
   string, the caller wasn't taking advantage of it.
  (svn_wc__adm_open_anchor_in_context): Delete.

* subversion/libsvn_wc/wc.h
  (svn_wc__internal_path_switched): Delete.

* subversion/libsvn_wc/util.c
  (svn_wc__internal_path_switched): Delete.
  (svn_wc__path_switched): Move to lock.c.

* subversion/libsvn_wc/lock.c
  (child_is_disjoint): Check for SVN_ERR_WC_NOT_DIRECTORY.
  (svn_wc__adm_open_anchor_in_context): Delete.
  (svn_wc__path_switched): Copied from util.c, just call child_is_disjoint.

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_wc/lock.c
    subversion/trunk/subversion/libsvn_wc/util.c
    subversion/trunk/subversion/libsvn_wc/wc.h

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=920424&r1=920423&r2=920424&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Mon Mar  8 18:05:19 2010
@@ -77,9 +77,7 @@
 
 /** Given a @a local_abspath with a @a wc_ctx, set @a *switched to
  * TRUE if @a local_abspath is switched, otherwise set @a *switched to FALSE.
- * If neither @a local_abspath or its parent have valid URLs, return
- * @c SVN_ERR_ENTRY_MISSING_URL.  All temporaryallocations are done in
- * @a scratch_pool.
+ * All temporary allocations are done in * @a scratch_pool.
  */
 svn_error_t *
 svn_wc__path_switched(svn_boolean_t *switched,
@@ -250,22 +248,6 @@
                              void *cancel_baton,
                              apr_pool_t *pool);
 
-/** Like svn_wc_adm_open_anchor(), but with a svn_wc_context_t * to use
- * when opening the access batons.
- *
- * NOT FOR NEW DEVELOPMENT!  (See note to svn_wc__adm_open_in_context().)
- */
-svn_error_t *
-svn_wc__adm_open_anchor_in_context(svn_wc_adm_access_t **anchor_access,
-                                   svn_wc_adm_access_t **target_access,
-                                   const char **target,
-                                   svn_wc_context_t *wc_ctx,
-                                   const char *path,
-                                   svn_boolean_t write_lock,
-                                   int levels_to_lock,
-                                   svn_cancel_func_t cancel_func,
-                                   void *cancel_baton,
-                                   apr_pool_t *pool);
 
 
 /**

Modified: subversion/trunk/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/lock.c?rev=920424&r1=920423&r2=920424&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/lock.c (original)
+++ subversion/trunk/subversion/libsvn_wc/lock.c Mon Mar  8 18:05:19 2010
@@ -1045,7 +1045,7 @@
   err = svn_wc__db_read_children(&children, db, parent_abspath, scratch_pool,
                                  scratch_pool);
 
-  if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+  if (err && err->apr_err == SVN_ERR_WC_NOT_DIRECTORY)
     {
       svn_error_clear(err);
       *disjoint = TRUE;
@@ -1329,23 +1329,6 @@
                                       cancel_baton, pool));
 }
 
-svn_error_t *
-svn_wc__adm_open_anchor_in_context(svn_wc_adm_access_t **anchor_access,
-                                   svn_wc_adm_access_t **target_access,
-                                   const char **target,
-                                   svn_wc_context_t *wc_ctx,
-                                   const char *path,
-                                   svn_boolean_t write_lock,
-                                   int levels_to_lock,
-                                   svn_cancel_func_t cancel_func,
-                                   void *cancel_baton,
-                                   apr_pool_t *pool)
-{
-  return svn_error_return(open_anchor(anchor_access, target_access, target,
-                                      wc_ctx->db, TRUE, path, write_lock,
-                                      levels_to_lock, cancel_func,
-                                      cancel_baton, pool));
-}
 
 svn_error_t *
 svn_wc__adm_retrieve_from_context(svn_wc_adm_access_t **adm_access,
@@ -1881,3 +1864,15 @@
   err2 = svn_wc__release_write_lock(wc_ctx, local_abspath, scratch_pool);
   return svn_error_compose_create(err1, err2);
 }
+
+svn_error_t *
+svn_wc__path_switched(svn_boolean_t *switched,
+                      svn_wc_context_t *wc_ctx,
+                      const char *local_abspath,
+                      apr_pool_t *scratch_pool)
+{
+  return svn_error_return(child_is_disjoint(switched, wc_ctx->db,
+					    local_abspath, scratch_pool));
+}
+
+

Modified: subversion/trunk/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/util.c?rev=920424&r1=920423&r2=920424&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/util.c (original)
+++ subversion/trunk/subversion/libsvn_wc/util.c Mon Mar  8 18:05:19 2010
@@ -247,78 +247,6 @@
   return svn_cstring_match_glob_list(str, list);
 }
 
-svn_error_t *
-svn_wc__internal_path_switched(svn_boolean_t *switched,
-                               svn_wc__db_t *db,
-                               const char *local_abspath,
-                               apr_pool_t *scratch_pool)
-{
-  const char *parent_abspath;
-  const char *parent_child_url;
-  const svn_wc_entry_t *parent_entry;
-  const svn_wc_entry_t *entry;
-  svn_error_t *err;
-
-  SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
-
-  if (svn_dirent_is_root(local_abspath, strlen(local_abspath)))
-    {
-      *switched = FALSE;
-      return SVN_NO_ERROR;
-    }
-
-  SVN_ERR(svn_wc__get_entry(&entry, db, local_abspath, FALSE, svn_node_unknown,
-                            FALSE, scratch_pool, scratch_pool));
-
-  parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
-  err = svn_wc__get_entry(&parent_entry, db, parent_abspath, FALSE,
-                          svn_node_dir, FALSE, scratch_pool, scratch_pool);
-
-  if (err && (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY
-        || err->apr_err == SVN_ERR_WC_MISSING))
-    {
-      svn_error_clear(err);
-      *switched = FALSE;
-      return SVN_NO_ERROR;
-    }
-  else if (err)
-    return err;
-
-  /* Without complete entries (and URLs) for WC_PATH and it's parent
-     we return SVN_ERR_ENTRY_MISSING_URL. */
-  if (!parent_entry->url || !entry->url)
-    {
-      const char *no_url_path = parent_entry->url ?
-                            local_abspath : parent_abspath;
-      return svn_error_createf(SVN_ERR_ENTRY_MISSING_URL, NULL,
-                               _("Cannot find a URL for '%s'"),
-                               svn_dirent_local_style(no_url_path,
-                                                      scratch_pool));
-    }
-
-  parent_child_url
-    = svn_path_url_add_component2(parent_entry->url,
-                                  svn_dirent_basename(local_abspath,
-                                                      scratch_pool),
-                                  scratch_pool);
-  *switched = strcmp(parent_child_url, entry->url) != 0;
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__path_switched(svn_boolean_t *switched,
-                      svn_wc_context_t *wc_ctx,
-                      const char *local_abspath,
-                      apr_pool_t *scratch_pool)
-{
-  return svn_error_return(svn_wc__internal_path_switched(switched, wc_ctx->db,
-                                                         local_abspath,
-                                                         scratch_pool));
-}
-
-
 svn_wc_conflict_description2_t *
 svn_wc_conflict_description_create_text2(const char *local_abspath,
                                          apr_pool_t *result_pool)

Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=920424&r1=920423&r2=920424&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Mon Mar  8 18:05:19 2010
@@ -400,14 +400,6 @@
                                     svn_wc__db_t *db,
                                     apr_pool_t *pool);
 
-/* Similar to svn_wc__path_switched(), but with a wc_db parameter instead of
- * a wc_context. */
-svn_error_t *
-svn_wc__internal_path_switched(svn_boolean_t *switched,
-                               svn_wc__db_t *wc_db,
-                               const char *local_abspath,
-                               apr_pool_t *scratch_pool);
-
 
 /* Similar to svn_wc_conflicted_p3(), but with a wc_db parameter in place of
  * a wc_context. */



Mime
View raw message