Author: hwright
Date: Tue Jul 13 09:40:34 2010
New Revision: 963632

URL: http://svn.apache.org/viewvc?rev=963632&view=rev
Log:
Remove the public libsvn_wc file and stream translation APIs (while leaving
their deprecated predecessors).  These APIs are not consumed by the client.
See: http://svn.haxx.se/dev/archive-2010-07/0100.shtml

* subversion/include/svn_wc.h
  (svn_wc_translated_file3, svn_wc_translated_stream2): Remove.
  (svn_wc_translated_file2, svn_wc_translated_stream): Restore the docs to
    their pre-rev state.

* subversion/libsvn_wc/deprecated.c
  (svn_wc_translated_stream, svn_wc_translated_file2): Use the library-internal
    APIs, rather than the now-removed public ones.

* subversion/libsvn_wc/translate.c
  (svn_wc_translated_stream2, svn_wc_translated_file3): Remove.

Modified:
    subversion/trunk/subversion/include/svn_wc.h
    subversion/trunk/subversion/libsvn_wc/deprecated.c
    subversion/trunk/subversion/libsvn_wc/translate.c

Modified: subversion/trunk/subversion/include/svn_wc.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=963632&r1=963631&r2=963632&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Tue Jul 13 09:40:34 2010
@@ -6984,10 +6984,10 @@ svn_wc_create_tmp_file(apr_file_t **fp,
 
 /* EOL conversion and keyword expansion. */
 
-/** Set @a xlated_abspath to a translated copy of @a src
+/** Set @a xlated_path to a translated copy of @a src
  * or to @a src itself if no translation is necessary.
- * That is, if @a versioned_abspath's properties indicate newline conversion
- * or keyword expansion, point @a *xlated_abspath to a copy of @a src
+ * That is, if @a versioned_file's properties indicate newline conversion or
+ * keyword expansion, point @a *xlated_path to a copy of @a src
  * whose newlines and keywords are converted using the translation
  * as requested by @a flags.
  *
@@ -7004,40 +7004,20 @@ svn_wc_create_tmp_file(apr_file_t **fp,
  * #SVN_WC_TRANSLATE_FORCE_COPY flag in @a flags.
  *
  * This function is generally used to get a file that can be compared
- * meaningfully against @a versioned_abspath's text base, if
- * #SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_abspath itself
- * if #SVN_WC_TRANSLATE_FROM_NF is specified.
- *
- * The output file is created in the temp file area belonging to
- * @a versioned_abspath. By default it will be deleted at result_pool
- * cleanup. If @a flags includes #SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP,
- * the default result_pool cleanup handler to remove @a *xlated_abspath is
- * not registered.
+ * meaningfully against @a versioned_file's text base, if
+ * @c SVN_WC_TRANSLATE_TO_NF is specified, against @a versioned_file itself
+ * if @c SVN_WC_TRANSLATE_FROM_NF is specified.
  *
- * If an error is returned, the effect on @a *xlated_abspath is undefined.
+ * Output files are created in the temp file area belonging to
+ * @a versioned_file.  By default they will be deleted at pool cleanup.
  *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_wc_translated_file3(const char **xlated_abspath,
-                        const char *src,
-                        svn_wc_context_t *wc_ctx,
-                        const char *versioned_abspath,
-                        apr_uint32_t flags,
-                        svn_cancel_func_t cancel_func,
-                        void *cancel_baton,
-                        apr_pool_t *result_pool,
-                        apr_pool_t *scratch_pool);
-
-
-/** Similar to svn_wc_translated_file3(), but with an adm_access baton
- * and relative paths instead of a wc_context and absolute paths, with
- * a single pool, and no cancellation func/baton.
+ * If @c SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP is specified, the default
+ * pool cleanup handler to remove @a *xlated_path is not registered.
  *
- * @since New in 1.4.
- * @deprecated Provided for compatibility with the 1.6 API
+ * If an error is returned, the effect on @a *xlated_path is undefined.
+ *
+ * @since New in 1.4
  */
-SVN_DEPRECATED
 svn_error_t *
 svn_wc_translated_file2(const char **xlated_path,
                         const char *src,
@@ -7061,10 +7041,9 @@ svn_wc_translated_file(const char **xlat
                        apr_pool_t *pool);
 
 
-/** Set @a stream to a stream allocated in @a result_pool, that will
- * translate *to* normal form while reading, or *from* normal form while
- * writing @a local_abspath.  The translation will take the file properties
- * from @a versioned_abspath using @a wc_ctx.
+/** Returns a @a stream allocated in @a pool with access to the given
+ * @a path taking the file properties from @a versioned_file using
+ * @a adm_access.
  *
  * If @a flags includes #SVN_WC_TRANSLATE_FROM_NF, the stream will
  * translate from Normal Form to working copy form while writing to
@@ -7076,26 +7055,8 @@ svn_wc_translated_file(const char **xlat
  * The @a flags are the same constants as those used for
  * svn_wc_translated_file().
  *
- * Use @a scratch_pool for temporary allocations.
- *
- * @since New in 1.7.
- */
-svn_error_t *
-svn_wc_translated_stream2(svn_stream_t **stream,
-                          svn_wc_context_t *wc_ctx,
-                          const char *local_abspath,
-                          const char *versioned_abspath,
-                          apr_uint32_t flags,
-                          apr_pool_t *result_pool,
-                          apr_pool_t *scratch_pool);
-
-/** Similar to svn_wc_translated_stream2(), but with an adm_access baton
- * and relative paths instead of a wc_context and absolute paths.
- *
  * @since New in 1.5.
- * @deprecated Provided for compatibility with the 1.6 API
  */
-SVN_DEPRECATED
 svn_error_t *
 svn_wc_translated_stream(svn_stream_t **stream,
                          const char *path,

Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=963632&r1=963631&r2=963632&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Tue Jul 13 09:40:34 2010
@@ -42,6 +42,7 @@
 #include "entries.h"
 #include "lock.h"
 #include "props.h"
+#include "translate.h"
 #include "workqueue.h"
 
 #include "svn_private_config.h"
@@ -3293,19 +3294,14 @@ svn_wc_translated_stream(svn_stream_t **
 {
   const char *local_abspath;
   const char *versioned_abspath;
-  svn_wc_context_t *wc_ctx;
 
   SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
   SVN_ERR(svn_dirent_get_absolute(&versioned_abspath, versioned_file, pool));
-  SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL /* config */,
-                                         svn_wc__adm_get_db(adm_access),
-                                         pool));
 
-  SVN_ERR(svn_wc_translated_stream2(stream, wc_ctx, local_abspath,
-                                    versioned_abspath, flags,
-                                    pool, pool));
-
-  return svn_error_return(svn_wc_context_destroy(wc_ctx));
+  return svn_error_return(
+    svn_wc__internal_translated_stream(stream, svn_wc__adm_get_db(adm_access),
+                                       local_abspath, versioned_abspath, flags,
+                                       pool, pool));
 }
 
 svn_error_t *
@@ -3319,15 +3315,13 @@ svn_wc_translated_file2(const char **xla
   const char *versioned_abspath;
   const char *root;
   const char *tmp_root;
-  svn_wc_context_t *wc_ctx;
 
   SVN_ERR(svn_dirent_get_absolute(&versioned_abspath, versioned_file, pool));
-  SVN_ERR(svn_wc__context_create_with_db(&wc_ctx, NULL,
-                                         svn_wc__adm_get_db(adm_access),
-                                         pool));
 
-  SVN_ERR(svn_wc_translated_file3(xlated_path, src, wc_ctx, versioned_abspath,
-                                  flags, NULL, NULL, pool, pool));
+  SVN_ERR(svn_wc__internal_translated_file(xlated_path, src,
+                                           svn_wc__adm_get_db(adm_access),
+                                           versioned_abspath,
+                                           flags, NULL, NULL, pool, pool));
   if (! svn_dirent_is_absolute(versioned_file))
     {
       SVN_ERR(svn_io_temp_dir(&tmp_root, pool));
@@ -3338,7 +3332,7 @@ svn_wc_translated_file2(const char **xla
         }
     }
 
-  return svn_error_return(svn_wc_context_destroy(wc_ctx));
+  return SVN_NO_ERROR;
 }
 
 /*** From relocate.c ***/

Modified: subversion/trunk/subversion/libsvn_wc/translate.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/translate.c?rev=963632&r1=963631&r2=963632&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/translate.c (original)
+++ subversion/trunk/subversion/libsvn_wc/translate.c Tue Jul 13 09:40:34 2010
@@ -152,25 +152,6 @@ svn_wc__internal_translated_stream(svn_s
 
 
 svn_error_t *
-svn_wc_translated_stream2(svn_stream_t **stream,
-                          svn_wc_context_t *wc_ctx,
-                          const char *local_abspath,
-                          const char *versioned_abspath,
-                          apr_uint32_t flags,
-                          apr_pool_t *result_pool,
-                          apr_pool_t *scratch_pool)
-{
-  return svn_error_return(svn_wc__internal_translated_stream(stream,
-                                                             wc_ctx->db,
-                                                             local_abspath,
-                                                             versioned_abspath,
-                                                             flags,
-                                                             result_pool,
-                                                             scratch_pool));
-}
-
-
-svn_error_t *
 svn_wc__internal_translated_file(const char **xlated_abspath,
                                  const char *src,
                                  svn_wc__db_t *db,
@@ -259,23 +240,6 @@ svn_wc__internal_translated_file(const c
   return SVN_NO_ERROR;
 }
 
-svn_error_t *
-svn_wc_translated_file3(const char **xlated_abspath,
-                        const char *src,
-                        svn_wc_context_t *wc_ctx,
-                        const char *versioned_abspath,
-                        apr_uint32_t flags,
-                        svn_cancel_func_t cancel_func,
-                        void *cancel_baton,
-                        apr_pool_t *result_pool,
-                        apr_pool_t *scratch_pool)
-{
-  return svn_wc__internal_translated_file(xlated_abspath, src, wc_ctx->db,
-                                          versioned_abspath, flags,
-                                          cancel_func, cancel_baton,
-                                          result_pool, scratch_pool);
-}
-
 
 svn_error_t *
 svn_wc__get_eol_style(svn_subst_eol_style_t *style,


Reply via email to