Author: rhuijben
Date: Tue Apr 12 12:08:34 2011
New Revision: 1091382

URL: http://svn.apache.org/viewvc?rev=1091382&view=rev
Log:
Remove several unused functions which exposed pristine handling internal
details or used wc-1.0 concepts to describe which pristine they needed.

* subversion/libsvn_wc/adm_files.c
  (svn_wc__ultimate_base_text_path,
   svn_wc__ultimate_base_text_path_to_read,
   svn_wc__get_ultimate_base_contents,
   svn_wc__get_ultimate_base_checksums,
   svn_wc__get_working_checksums): Remove functions.

* subversion/libsvn_wc/adm_files.h
  (svn_wc__get_ultimate_base_contents,
   svn_wc__ultimate_base_text_path,
   svn_wc__ultimate_base_text_path_to_read,
   svn_wc__get_ultimate_base_checksums,
   svn_wc__get_working_checksums): Remove functions.

Modified:
    subversion/trunk/subversion/libsvn_wc/adm_files.c
    subversion/trunk/subversion/libsvn_wc/adm_files.h

Modified: subversion/trunk/subversion/libsvn_wc/adm_files.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.c?rev=1091382&r1=1091381&r2=1091382&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_files.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_files.c Tue Apr 12 12:08:34 2011
@@ -214,91 +214,6 @@ svn_wc__text_base_path_to_read(const cha
   return SVN_NO_ERROR;
 }
 
-
-svn_error_t *
-svn_wc__ultimate_base_text_path(const char **result_abspath,
-                                svn_wc__db_t *db,
-                                const char *local_abspath,
-                                apr_pool_t *result_pool,
-                                apr_pool_t *scratch_pool)
-{
-  const svn_checksum_t *checksum;
-
-  SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL,
-                                   NULL, NULL, NULL, NULL, NULL, &checksum,
-                                   NULL, NULL, NULL, NULL,
-                                   db, local_abspath,
-                                   scratch_pool, scratch_pool));
-  if (checksum == NULL)
-    return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
-                             _("Node '%s' has no pristine base text"),
-                             svn_dirent_local_style(local_abspath,
-                                                    scratch_pool));
-  SVN_ERR(svn_wc__db_pristine_get_path(result_abspath, db, local_abspath,
-                                       checksum,
-                                       result_pool, scratch_pool));
-  return SVN_NO_ERROR;
-}
-
-svn_error_t *
-svn_wc__ultimate_base_text_path_to_read(const char **result_abspath,
-                                        svn_wc__db_t *db,
-                                        const char *local_abspath,
-                                        apr_pool_t *result_pool,
-                                        apr_pool_t *scratch_pool)
-{
-  SVN_ERR(svn_wc__ultimate_base_text_path(result_abspath, db, local_abspath,
-                                          result_pool, scratch_pool));
-  /* Return an error if the file does not exist */
-  {
-    svn_node_kind_t kind;
-
-    SVN_ERR(svn_io_check_path(*result_abspath, &kind, scratch_pool));
-    if (kind != svn_node_file)
-      return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
-                               _("File '%s' has no text base"),
-                               svn_dirent_local_style(local_abspath,
-                                                      scratch_pool));
-  }
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__get_ultimate_base_contents(svn_stream_t **contents,
-                                   svn_wc__db_t *db,
-                                   const char *local_abspath,
-                                   apr_pool_t *result_pool,
-                                   apr_pool_t *scratch_pool)
-{
-  svn_wc__db_kind_t kind;
-  svn_wc__db_status_t status;
-  const svn_checksum_t *checksum;
-
-  SVN_ERR(svn_wc__db_base_get_info(&status, &kind, NULL, NULL, NULL, NULL,
-                                   NULL, NULL, NULL, NULL, NULL, &checksum,
-                                   NULL, NULL, NULL, NULL,
-                                   db, local_abspath,
-                                   scratch_pool, scratch_pool));
-  if (kind != svn_wc__db_kind_file)
-    return svn_error_createf(SVN_ERR_WC_NOT_FILE, NULL,
-                             _("Base node of '%s' is not a file"),
-                             svn_dirent_local_style(local_abspath,
-                                                    scratch_pool));
-  if (status != svn_wc__db_status_normal)
-    {
-      SVN_ERR_ASSERT(checksum == NULL);
-      *contents = NULL;
-      return SVN_NO_ERROR;
-    }
-  SVN_ERR_ASSERT(checksum != NULL);
-  SVN_ERR(svn_wc__db_pristine_read(contents, db, local_abspath,
-                                   checksum, result_pool, scratch_pool));
-  return SVN_NO_ERROR;
-}
-
-
 svn_error_t *
 svn_wc__get_pristine_contents(svn_stream_t **contents,
                               svn_wc__db_t *db,
@@ -368,93 +283,6 @@ svn_wc__get_pristine_contents(svn_stream
 }
 
 
-svn_error_t *
-svn_wc__get_ultimate_base_checksums(const svn_checksum_t **sha1_checksum,
-                                    const svn_checksum_t **md5_checksum,
-                                    svn_wc__db_t *db,
-                                    const char *local_abspath,
-                                    apr_pool_t *result_pool,
-                                    apr_pool_t *scratch_pool)
-{
-  svn_error_t *err;
-  const svn_checksum_t *checksum;
-
-  err = svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL,
-                                 NULL, NULL, NULL, NULL, NULL, &checksum,
-                                 NULL, NULL, NULL, NULL,
-                                 db, local_abspath,
-                                 result_pool, scratch_pool);
-  if ((err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
-      || checksum == NULL)
-    {
-      svn_error_clear(err);
-      if (sha1_checksum)
-        *sha1_checksum = NULL;
-      if (md5_checksum)
-        *md5_checksum = NULL;
-      return SVN_NO_ERROR;
-    }
-
-  if (checksum->kind == svn_checksum_sha1)
-    {
-      if (sha1_checksum)
-        *sha1_checksum = checksum;
-      if (md5_checksum)
-        SVN_ERR(svn_wc__db_pristine_get_md5(md5_checksum, db, local_abspath,
-                                            checksum,
-                                            result_pool, scratch_pool));
-    }
-  else
-    {
-      if (sha1_checksum)
-        SVN_ERR(svn_wc__db_pristine_get_sha1(sha1_checksum, db, local_abspath,
-                                             checksum,
-                                             result_pool, scratch_pool));
-      if (md5_checksum)
-        *md5_checksum = checksum;
-    }
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__get_working_checksums(const svn_checksum_t **sha1_checksum,
-                              const svn_checksum_t **md5_checksum,
-                              svn_wc__db_t *db,
-                              const char *local_abspath,
-                              apr_pool_t *result_pool,
-                              apr_pool_t *scratch_pool)
-{
-  const svn_checksum_t *checksum;
-
-  SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, &checksum,
-                               NULL, NULL, NULL, NULL, NULL, NULL,
-                               NULL, NULL, NULL, NULL, NULL, NULL,
-                               db, local_abspath,
-                               result_pool, scratch_pool));
-
-  if (checksum->kind == svn_checksum_sha1)
-    {
-      if (sha1_checksum)
-        *sha1_checksum = checksum;
-      if (md5_checksum)
-        SVN_ERR(svn_wc__db_pristine_get_md5(md5_checksum, db, local_abspath,
-                                            checksum,
-                                            result_pool, scratch_pool));
-    }
-  else
-    {
-      if (sha1_checksum)
-        SVN_ERR(svn_wc__db_pristine_get_sha1(sha1_checksum, db, local_abspath,
-                                             checksum,
-                                             result_pool, scratch_pool));
-      if (md5_checksum)
-        *md5_checksum = checksum;
-    }
-  return SVN_NO_ERROR;
-}
-
 /*** Opening and closing files in the adm area. ***/
 
 svn_error_t *

Modified: subversion/trunk/subversion/libsvn_wc/adm_files.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_files.h?rev=1091382&r1=1091381&r2=1091382&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_files.h (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_files.h Tue Apr 12 12:08:34 2011
@@ -70,26 +70,6 @@ svn_wc__get_pristine_contents(svn_stream
                               apr_pool_t *result_pool,
                               apr_pool_t *scratch_pool);
 
-
-/* Set *CONTENTS to a readonly stream on the pristine text of the base
- * version of LOCAL_ABSPATH in DB.  If LOCAL_ABSPATH is locally replaced,
- * this is distinct from svn_wc__get_pristine_contents(), otherwise it is
- * the same.
- *
- * (In WC-1 terminology, this was known as "the revert base" if the node is
- * replaced by a copy, otherwise simply as "the base".)
- *
- * If the base version of LOCAL_ABSPATH is not present (e.g. because the
- * file is locally added), set *CONTENTS to NULL.
- * The base version of LOCAL_ABSPATH must be a file. */
-svn_error_t *
-svn_wc__get_ultimate_base_contents(svn_stream_t **contents,
-                                   svn_wc__db_t *db,
-                                   const char *local_abspath,
-                                   apr_pool_t *result_pool,
-                                   apr_pool_t *scratch_pool);
-
-
 /* Set *RESULT_ABSPATH to the absolute path to a readable file containing
    the WC-1 "normal text-base" of LOCAL_ABSPATH in DB.
 
@@ -116,56 +96,6 @@ svn_wc__text_base_path_to_read(const cha
                                apr_pool_t *result_pool,
                                apr_pool_t *scratch_pool);
 
-/* Set *RESULT_ABSPATH to the path of the ultimate base text of the
-   versioned file LOCAL_ABSPATH in DB.  In WC-1 terms this means the
-   "normal text-base" or, if the node is replaced by a copy or move, the
-   "revert-base".  */
-svn_error_t *
-svn_wc__ultimate_base_text_path(const char **result_abspath,
-                                svn_wc__db_t *db,
-                                const char *local_abspath,
-                                apr_pool_t *result_pool,
-                                apr_pool_t *scratch_pool);
-
-/* Set *RESULT_ABSPATH to the path of the ultimate base text of the
-   versioned file LOCAL_ABSPATH in DB.  In WC-1 terms this means the
-   "normal text-base" or, if the node is replaced by a copy or move, the
-   "revert-base".
-
-   If the node LOCAL_ABSPATH has no such pristine text, return an error of
-   type SVN_ERR_WC_PATH_UNEXPECTED_STATUS.  */
-svn_error_t *
-svn_wc__ultimate_base_text_path_to_read(const char **result_abspath,
-                                        svn_wc__db_t *db,
-                                        const char *local_abspath,
-                                        apr_pool_t *result_pool,
-                                        apr_pool_t *scratch_pool);
-
-/* Set *SHA1_CHECKSUM and *MD5_CHECKSUM to the SHA-1 and MD-5 checksums of
- * the BASE_NODE pristine text of LOCAL_ABSPATH in DB, or to NULL if it has
- * no BASE_NODE.  SHA1_CHECKSUM or MD5_CHECKSUM may be NULL if not required.
- * Allocate the checksums in RESULT_POOL. */
-svn_error_t *
-svn_wc__get_ultimate_base_checksums(const svn_checksum_t **sha1_checksum,
-                                    const svn_checksum_t **md5_checksum,
-                                    svn_wc__db_t *db,
-                                    const char *local_abspath,
-                                    apr_pool_t *result_pool,
-                                    apr_pool_t *scratch_pool);
-
-/* Set *SHA1_CHECKSUM and *MD5_CHECKSUM to the SHA-1 and MD-5 checksums of
- * the WORKING_NODE pristine text of LOCAL_ABSPATH in DB, or to NULL if it has
- * no WORKING_NODE.  SHA1_CHECKSUM or MD5_CHECKSUM may be NULL if not required.
- * Allocate the checksums in RESULT_POOL. */
-svn_error_t *
-svn_wc__get_working_checksums(const svn_checksum_t **sha1_checksum,
-                              const svn_checksum_t **md5_checksum,
-                              svn_wc__db_t *db,
-                              const char *local_abspath,
-                              apr_pool_t *result_pool,
-                              apr_pool_t *scratch_pool);
-
-
 
 /*** Opening all kinds of adm files ***/
 


Reply via email to