subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1333324 - in /subversion/trunk/subversion: include/ include/private/ libsvn_client/ libsvn_fs/ libsvn_fs_fs/ libsvn_repos/ libsvn_subr/ libsvn_wc/ svnrdump/
Date Thu, 03 May 2012 06:58:27 GMT
Author: stefan2
Date: Thu May  3 06:58:26 2012
New Revision: 1333324

URL: http://svn.apache.org/viewvc?rev=1333324&view=rev
Log:
Move private svn_hash API to a private header.

* subversion/include/svn_hash.h
  (svn_hash__clear, svn_hash__get_cstring, svn_hash__get_bool):
   move from here ...
* subversion/include/private/svn_hash_private.h
  ... to here; new file

* subversion/libsvn_client/merge.c,
  subversion/libsvn_client/patch.c,
  subversion/libsvn_fs/fs-loader.c,
  subversion/libsvn_fs_fs/caching.c,
  subversion/libsvn_fs_fs/fs_fs.c,
  subversion/libsvn_repos/repos.c,
  subversion/libsvn_subr/hash.c,
  subversion/libsvn_wc/adm_ops.c,
  subversion/svnrdump/dump_editor.c: include new private header

Added:
    subversion/trunk/subversion/include/private/svn_hash_private.h
      - copied, changed from r1325958, subversion/trunk/subversion/include/svn_hash.h
Modified:
    subversion/trunk/subversion/include/svn_hash.h
    subversion/trunk/subversion/libsvn_client/merge.c
    subversion/trunk/subversion/libsvn_client/patch.c
    subversion/trunk/subversion/libsvn_fs/fs-loader.c
    subversion/trunk/subversion/libsvn_fs_fs/caching.c
    subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
    subversion/trunk/subversion/libsvn_repos/repos.c
    subversion/trunk/subversion/libsvn_subr/hash.c
    subversion/trunk/subversion/libsvn_wc/adm_ops.c
    subversion/trunk/subversion/svnrdump/dump_editor.c

Copied: subversion/trunk/subversion/include/private/svn_hash_private.h (from r1325958, subversion/trunk/subversion/include/svn_hash.h)
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_hash_private.h?p2=subversion/trunk/subversion/include/private/svn_hash_private.h&p1=subversion/trunk/subversion/include/svn_hash.h&r1=1325958&r2=1333324&rev=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_hash.h (original)
+++ subversion/trunk/subversion/include/private/svn_hash_private.h Thu May  3 06:58:26 2012
@@ -20,13 +20,13 @@
  * ====================================================================
  * @endcopyright
  *
- * @file svn_hash.h
- * @brief Dumping and reading hash tables to/from files.
+ * @file svn_hash_private.h
+ * @brief Hash table related private functions.
  */
 
 
-#ifndef SVN_HASH_H
-#define SVN_HASH_H
+#ifndef SVN_HASH_PRIVATE_H
+#define SVN_HASH_PRIVATE_H
 
 #include <apr.h>
 #include <apr_pools.h>
@@ -53,194 +53,12 @@ extern "C" {
 
 /*----------------------------------------------------*/
 
-/** Reading/writing hashtables to disk
- *
- * @defgroup svn_hash_read_write Reading and writing hashtables to disk
- * @{
- */
-
-/**
- * The conventional terminator for hash dumps.
- *
- * @since New in 1.1.
- */
-#define SVN_HASH_TERMINATOR "END"
-
-/**
- * Read a hash table from @a stream, storing the resultants names and
- * values in @a hash.  Use a @a pool for all allocations.  @a hash will
- * have <tt>const char *</tt> keys and <tt>svn_string_t *</tt> values.
- * If @a terminator is NULL, expect the hash to be terminated by the
- * end of the stream; otherwise, expect the hash to be terminated by a
- * line containing @a terminator.  Pass @c SVN_HASH_TERMINATOR to use
- * the conventional terminator "END".
- *
- * @since New in 1.1.
- */
-svn_error_t *
-svn_hash_read2(apr_hash_t *hash,
-               svn_stream_t *stream,
-               const char *terminator,
-               apr_pool_t *pool);
-
-/**
- * Dump @a hash to @a stream.  Use @a pool for all allocations.  @a
- * hash has <tt>const char *</tt> keys and <tt>svn_string_t *</tt>
- * values.  If @a terminator is not NULL, terminate the hash with a
- * line containing @a terminator.
- *
- * @since New in 1.1.
- */
-svn_error_t *
-svn_hash_write2(apr_hash_t *hash,
-                svn_stream_t *stream,
-                const char *terminator,
-                apr_pool_t *pool);
-
-/**
- * Similar to svn_hash_read2(), but allows @a stream to contain
- * deletion lines which remove entries from @a hash as well as adding
- * to it.
- *
- * @since New in 1.1.
- */
-svn_error_t *
-svn_hash_read_incremental(apr_hash_t *hash,
-                          svn_stream_t *stream,
-                          const char *terminator,
-                          apr_pool_t *pool);
-
-/**
- * Similar to svn_hash_write2(), but only writes out entries for
- * keys which differ between @a hash and @a oldhash, and also writes
- * out deletion lines for keys which are present in @a oldhash but not
- * in @a hash.
- *
- * @since New in 1.1.
- */
-svn_error_t *
-svn_hash_write_incremental(apr_hash_t *hash,
-                           apr_hash_t *oldhash,
-                           svn_stream_t *stream,
-                           const char *terminator,
-                           apr_pool_t *pool);
-
-/**
- * This function behaves like svn_hash_read2(), but it only works
- * on an apr_file_t input, empty files are accepted, and the hash is
- * expected to be terminated with a line containing "END" or
- * "PROPS-END".
- *
- * @deprecated Provided for backward compatibility with the 1.0 API.
- */
-SVN_DEPRECATED
-svn_error_t *
-svn_hash_read(apr_hash_t *hash,
-              apr_file_t *srcfile,
-              apr_pool_t *pool);
-
-/**
- * This function behaves like svn_hash_write2(), but it only works
- * on an apr_file_t output, and the terminator is always "END".
- *
- * @deprecated Provided for backward compatibility with the 1.0 API.
- */
-SVN_DEPRECATED
-svn_error_t *
-svn_hash_write(apr_hash_t *hash,
-               apr_file_t *destfile,
-               apr_pool_t *pool);
-
-/** @} */
-
-
-/** Taking the "diff" of two hash tables.
- *
- * @defgroup svn_hash_diff Taking the diff of two hash tables.
- * @{
- */
-
-/** Hash key status indicator for svn_hash_diff_func_t.  */
-enum svn_hash_diff_key_status
-  {
-    /* Key is present in both hashes. */
-    svn_hash_diff_key_both,
-
-    /* Key is present in first hash only. */
-    svn_hash_diff_key_a,
-
-    /* Key is present in second hash only. */
-    svn_hash_diff_key_b
-  };
-
-
-/** Function type for expressing a key's status between two hash tables. */
-typedef svn_error_t *(*svn_hash_diff_func_t)
-  (const void *key, apr_ssize_t klen,
-   enum svn_hash_diff_key_status status,
-   void *baton);
-
-
-/** Take the diff of two hashtables.
- *
- * For each key in the union of @a hash_a's and @a hash_b's keys, invoke
- * @a diff_func exactly once, passing the key, the key's length, an enum
- * @c svn_hash_diff_key_status indicating which table(s) the key appears
- * in, and @a diff_func_baton.
- *
- * Process all keys of @a hash_a first, then all remaining keys of @a hash_b.
- *
- * If @a diff_func returns error, return that error immediately, without
- * applying @a diff_func to anything else.
- *
- * @a hash_a or @a hash_b or both may be NULL; treat a null table as though
- * empty.
- *
- * Use @a pool for temporary allocation.
- */
-svn_error_t *
-svn_hash_diff(apr_hash_t *hash_a,
-              apr_hash_t *hash_b,
-              svn_hash_diff_func_t diff_func,
-              void *diff_func_baton,
-              apr_pool_t *pool);
-
-/** @} */
-
-
 /**
  * @defgroup svn_hash_misc Miscellaneous hash APIs
  * @{
  */
 
 /**
- * Return the keys to @a hash in @a *array.  The keys are assumed to be
- * (const char *).  The keys are in no particular order.
- *
- * @a *array itself is allocated in @a pool; however, the keys are not
- * copied from the hash.
- *
- * @since New in 1.5.
- */
-svn_error_t *
-svn_hash_keys(apr_array_header_t **array,
-              apr_hash_t *hash,
-              apr_pool_t *pool);
-
-/**
- * Set @a *hash to a new hash whose keys come from the items in @a keys
- * (an array of <tt>const char *</tt> items), and whose values are
- * match their corresponding key.  Use @a pool for all allocations
- * (including @a *hash, its keys, and its values).
- *
- * @since New in 1.5.
- */
-svn_error_t *
-svn_hash_from_cstring_keys(apr_hash_t **hash,
-                           const apr_array_header_t *keys,
-                           apr_pool_t *pool);
-
-/**
  * Clear any key/value pairs in the hash table.  A wrapper for a
  * apr_hash_clear(), which isn't available until APR 1.3.0.
  *
@@ -290,4 +108,4 @@ svn_hash__get_bool(apr_hash_t *hash,
 }
 #endif /* __cplusplus */
 
-#endif /* SVN_HASH_H */
+#endif /* SVN_HASH_PRIVATE_H */

Modified: subversion/trunk/subversion/include/svn_hash.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_hash.h?rev=1333324&r1=1333323&r2=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_hash.h (original)
+++ subversion/trunk/subversion/include/svn_hash.h Thu May  3 06:58:26 2012
@@ -240,48 +240,6 @@ svn_hash_from_cstring_keys(apr_hash_t **
                            const apr_array_header_t *keys,
                            apr_pool_t *pool);
 
-/**
- * Clear any key/value pairs in the hash table.  A wrapper for a
- * apr_hash_clear(), which isn't available until APR 1.3.0.
- *
- * @since New in 1.5.
- */
-svn_error_t *
-svn_hash__clear(apr_hash_t *hash, apr_pool_t *pool);
-
-/** @} */
-
-
-/**
- * @defgroup svn_hash_getters Specialized getter APIs for hashes
- * @{
- */
-
-/** Find the value of a @a key in @a hash, return the value.
- *
- * If @a hash is @c NULL or if the @a key cannot be found, the
- * @a default_value will be returned.
- *
- * @since New in 1.7.
- */
-const char *
-svn_hash__get_cstring(apr_hash_t *hash,
-                      const char *key,
-                      const char *default_value);
-
-/** Like svn_hash_get_cstring(), but for boolean values.
- *
- * Parses the value as a boolean value. The recognized representations
- * are 'TRUE'/'FALSE', 'yes'/'no', 'on'/'off', '1'/'0'; case does not
- * matter.
- *
- * @since New in 1.7.
- */
-svn_boolean_t
-svn_hash__get_bool(apr_hash_t *hash,
-                   const char *key,
-                   svn_boolean_t default_value);
-
 /** @} */
 
 /** @} */

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1333324&r1=1333323&r2=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Thu May  3 06:58:26 2012
@@ -59,6 +59,7 @@
 #include "private/svn_fspath.h"
 #include "private/svn_ra_private.h"
 #include "private/svn_client_private.h"
+#include "private/svn_hash_private.h"
 
 #include "svn_private_config.h"
 

Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=1333324&r1=1333323&r2=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Thu May  3 06:58:26 2012
@@ -47,6 +47,7 @@
 #include "private/svn_wc_private.h"
 #include "private/svn_dep_compat.h"
 #include "private/svn_string_private.h"
+#include "private/svn_hash_private.h"
 
 typedef struct hunk_info_t {
   /* The hunk. */

Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.c?rev=1333324&r1=1333323&r2=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Thu May  3 06:58:26 2012
@@ -44,6 +44,7 @@
 #include "private/svn_fs_util.h"
 #include "private/svn_utf_private.h"
 #include "private/svn_mutex.h"
+#include "private/svn_hash_private.h"
 
 #include "fs-loader.h"
 #include "svn_hash.h"

Modified: subversion/trunk/subversion/libsvn_fs_fs/caching.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/caching.c?rev=1333324&r1=1333323&r2=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/caching.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/caching.c Thu May  3 06:58:26 2012
@@ -33,6 +33,7 @@
 #include "svn_private_config.h"
 #include "svn_hash.h"
 #include "private/svn_debug.h"
+#include "private/svn_hash_private.h"
 
 /* Return a memcache in *MEMCACHE_P for FS if it's configured to use
    memcached, or NULL otherwise.  Also, sets *FAIL_STOP to a boolean

Modified: subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c?rev=1333324&r1=1333323&r2=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/fs_fs.c Thu May  3 06:58:26 2012
@@ -61,6 +61,7 @@
 
 #include "private/svn_string_private.h"
 #include "private/svn_fs_util.h"
+#include "private/svn_hash_private.h"
 #include "../libsvn_fs/fs-loader.h"
 
 #include "svn_private_config.h"

Modified: subversion/trunk/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/repos.c?rev=1333324&r1=1333323&r2=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/repos.c (original)
+++ subversion/trunk/subversion/libsvn_repos/repos.c Thu May  3 06:58:26 2012
@@ -36,6 +36,7 @@
 #include "svn_version.h"
 
 #include "private/svn_repos_private.h"
+#include "private/svn_hash_private.h"
 #include "svn_private_config.h" /* for SVN_TEMPLATE_ROOT_DIR */
 
 #include "repos.h"

Modified: subversion/trunk/subversion/libsvn_subr/hash.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/hash.c?rev=1333324&r1=1333323&r2=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/hash.c (original)
+++ subversion/trunk/subversion/libsvn_subr/hash.c Thu May  3 06:58:26 2012
@@ -40,6 +40,7 @@
 #include "svn_pools.h"
 
 #include "private/svn_dep_compat.h"
+#include "private/svn_hash_private.h"
 
 #include "svn_private_config.h"
 

Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1333324&r1=1333323&r2=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Thu May  3 06:58:26 2012
@@ -59,7 +59,7 @@
 #include "svn_private_config.h"
 #include "private/svn_io_private.h"
 #include "private/svn_wc_private.h"
-
+#include "private/svn_hash_private.h"
 
 
 struct svn_wc_committed_queue_t

Modified: subversion/trunk/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dump_editor.c?rev=1333324&r1=1333323&r2=1333324&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/dump_editor.c Thu May  3 06:58:26 2012
@@ -31,6 +31,7 @@
 #include "svn_dirent_uri.h"
 
 #include "private/svn_fspath.h"
+#include "private/svn_hash_private.h"
 
 #include "svnrdump.h"
 



Mime
View raw message