subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1408772 - in /subversion/trunk/subversion: include/private/svn_wc_private.h libsvn_client/revisions.c libsvn_wc/node.c libsvn_wc/wc.h
Date Tue, 13 Nov 2012 15:02:56 GMT
Author: rhuijben
Date: Tue Nov 13 15:02:55 2012
New Revision: 1408772

URL: http://svn.apache.org/viewvc?rev=1408772&view=rev
Log:
Update the last caller of an entry based revision api, to use the more well
defined get origin information function.

* subversion/include/private/svn_wc_private.h
  (svn_wc__node_get_commit_base): Remove unused function.

* subversion/libsvn_client/revisions.c
  (svn_client__get_revision_number): Get the revision using the origin function.

* subversion/libsvn_wc/node.c
  (svn_wc__internal_get_commit_base,
   svn_wc__node_get_commit_base): Remove now unused functions.

* subversion/libsvn_wc/wc.h
  (svn_wc__internal_get_commit_base): Remove unused function.

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_client/revisions.c
    subversion/trunk/subversion/libsvn_wc/node.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=1408772&r1=1408771&r2=1408772&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Tue Nov 13 15:02:55 2012
@@ -669,35 +669,6 @@ svn_wc__node_get_pre_ng_status_data(svn_
                                     apr_pool_t *result_pool,
                                     apr_pool_t *scratch_pool);
 
-
-/**
- * Return the location of the base for this node's next commit,
- * reflecting any local tree modifications affecting this node.
- *
- * Get the base location of @a local_abspath using @a wc_ctx.  If @a
- * local_abspath is not in the working copy, return @c
- * SVN_ERR_WC_PATH_NOT_FOUND.
- *
- * If this node has no uncommitted changes, return the same location as
- * svn_wc__node_get_base().
- *
- * If this node is moved-here or copied-here (possibly as part of a replace),
- * return the location of the copy/move source. Do the same even when the node
- * has been removed from a recursive copy (subpath excluded from the copy).
- *
- * Else, if this node is locally added, return SVN_INVALID_REVNUM/NULL, or
- * if locally deleted or replaced, return the revert-base location.
- */
-svn_error_t *
-svn_wc__node_get_commit_base(svn_revnum_t *revision,
-                             const char **repos_relpath,
-                             const char **repos_root_url,
-                             const char **repos_uuid,
-                             svn_wc_context_t *wc_ctx,
-                             const char *local_abspath,
-                             apr_pool_t *result_pool,
-                             apr_pool_t *scratch_pool);
-
 /**
  * Fetch lock information (if any) for @a local_abspath using @a wc_ctx:
  *

Modified: subversion/trunk/subversion/libsvn_client/revisions.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/revisions.c?rev=1408772&r1=1408771&r2=1408772&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/revisions.c (original)
+++ subversion/trunk/subversion/libsvn_client/revisions.c Tue Nov 13 15:02:55 2012
@@ -91,9 +91,9 @@ svn_client__get_revision_number(svn_revn
         if (svn_path_is_url(local_abspath))
           goto invalid_rev_arg;
 
-        err = svn_wc__node_get_commit_base(revnum, NULL, NULL, NULL,
-                                           wc_ctx, local_abspath,
-                                           scratch_pool, scratch_pool);
+        err = svn_wc__node_get_origin(NULL, revnum, NULL, NULL, NULL, NULL,
+                                      wc_ctx, local_abspath, TRUE,
+                                      scratch_pool, scratch_pool);
 
         /* Return the same error as older code did (before and at r935091).
            At least svn_client_proplist4 promises SVN_ERR_ENTRY_NOT_FOUND. */

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1408772&r1=1408771&r2=1408772&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Tue Nov 13 15:02:55 2012
@@ -796,134 +796,6 @@ svn_wc__node_get_pre_ng_status_data(svn_
   return SVN_NO_ERROR;
 }
 
-
-svn_error_t *
-svn_wc__internal_get_commit_base(svn_revnum_t *commit_base_revision,
-                                 const char **repos_relpath,
-                                 const char **repos_root_url,
-                                 const char **repos_uuid,
-                                 svn_wc__db_t *db,
-                                 const char *local_abspath,
-                                 apr_pool_t *result_pool,
-                                 apr_pool_t *scratch_pool)
-{
-  svn_wc__db_status_t status;
-  svn_boolean_t have_base;
-  svn_boolean_t have_more_work;
-  svn_revnum_t revision;
-  svn_revnum_t orig_revision;
-  const char *orig_repos_relpath;
-  const char *orig_repos_root_url;
-  const char *orig_repos_uuid;
-
-  *commit_base_revision = SVN_INVALID_REVNUM;
-
-  SVN_ERR(svn_wc__db_read_info(&status, NULL,
-                               &revision, repos_relpath,
-                               repos_root_url, repos_uuid,
-                               NULL, NULL, NULL, NULL, NULL, NULL,
-                               &orig_repos_relpath, &orig_repos_root_url,
-                               &orig_repos_uuid, &orig_revision,
-                               NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                               &have_base, &have_more_work, NULL,
-                               db, local_abspath, scratch_pool, scratch_pool));
-
-  if (SVN_IS_VALID_REVNUM(revision))
-    {
-      /* We are looking directly at BASE */
-      if (commit_base_revision)
-        *commit_base_revision = revision;
-      return SVN_NO_ERROR;
-    }
-  else if (SVN_IS_VALID_REVNUM(orig_revision))
-    {
-      /* We are looking at a copied node */
-      if (commit_base_revision)
-        *commit_base_revision = orig_revision;
-      if (repos_relpath)
-        *repos_relpath = orig_repos_relpath;
-      if (repos_root_url)
-        *repos_root_url = orig_repos_root_url;
-      if (repos_uuid)
-        *repos_uuid = orig_repos_uuid;
-      return SVN_NO_ERROR;
-    }
-
-  if (status == svn_wc__db_status_added)
-    {
-      /* If the node was copied/moved-here, return the copy/move source
-         revision (not this node's base revision). */
-      SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL, NULL, NULL,
-                                       repos_relpath, repos_root_url,
-                                       repos_uuid, commit_base_revision,
-                                       NULL, NULL, db, local_abspath,
-                                       scratch_pool, scratch_pool));
-
-
-      if (SVN_IS_VALID_REVNUM(*commit_base_revision))
-        return SVN_NO_ERROR;
-      /* Fall through to handle simple replacements */
-    }
-  else if (status == svn_wc__db_status_deleted)
-    {
-      const char *work_del_abspath;
-
-      SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
-                                       &work_del_abspath, NULL,
-                                       db, local_abspath,
-                                       scratch_pool, scratch_pool));
-      if (work_del_abspath != NULL)
-        {
-          /* This is a deletion within a copied subtree. Get the copied-from
-           * revision. */
-          SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL, NULL, NULL,
-                                           repos_relpath, repos_root_url,
-                                           repos_uuid, commit_base_revision,
-                                           NULL, NULL, db,
-                                           svn_dirent_dirname(work_del_abspath,
-                                                              scratch_pool),
-                                           scratch_pool, scratch_pool));
-
-          SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(*commit_base_revision));
-
-          return SVN_NO_ERROR;
-        }
-      /* else deletion of BASE node, fall through */
-    }
-
-  /* Catch replacement by local addition and deleted BASE nodes. */
-  if (have_base && !have_more_work)
-    {
-      SVN_ERR(svn_wc__db_base_get_info(&status, NULL, commit_base_revision,
-                                       repos_relpath, repos_root_url,
-                                       repos_uuid, NULL, NULL, NULL, NULL,
-                                       NULL, NULL, NULL, NULL, NULL,
-                                       db, local_abspath,
-                                       scratch_pool, scratch_pool));
-
-      if (status == svn_wc__db_status_not_present)
-        *commit_base_revision = SVN_INVALID_REVNUM; /* No replacement */
-    }
-
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__node_get_commit_base(svn_revnum_t *revision,
-                             const char **repos_relpath,
-                             const char **repos_root_url,
-                             const char **repos_uuid,
-                             svn_wc_context_t *wc_ctx,
-                             const char *local_abspath,
-                             apr_pool_t *result_pool,
-                             apr_pool_t *scratch_pool)
-{
-  return svn_error_trace(svn_wc__internal_get_commit_base(
-                           revision, repos_relpath, repos_root_url, repos_uuid,
-                           wc_ctx->db, local_abspath,
-                           result_pool, scratch_pool));
-}
-
 svn_error_t *
 svn_wc__node_get_lock_info(const char **lock_token,
                            const char **lock_owner,

Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1408772&r1=1408771&r2=1408772&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Tue Nov 13 15:02:55 2012
@@ -590,18 +590,6 @@ svn_wc__internal_get_origin(svn_boolean_
                             apr_pool_t *result_pool,
                             apr_pool_t *scratch_pool);
 
-/* Internal version of svn_wc__node_get_commit_base() */
-svn_error_t *
-svn_wc__internal_get_commit_base(svn_revnum_t *commit_base_revision,
-                                 const char **repos_relpath,
-                                 const char **repos_root_url,
-                                 const char **repos_uuid,
-                                 svn_wc__db_t *db,
-                                 const char *local_abspath,
-                                 apr_pool_t *result_pool,
-                                 apr_pool_t *scratch_pool);
-
-
 /* Internal version of svn_wc__node_get_repos_info() */
 svn_error_t *
 svn_wc__internal_get_repos_info(const char **repos_root_url,



Mime
View raw message