You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/03/17 21:54:27 UTC
svn commit: r1082690 - in /subversion/trunk/subversion: libsvn_wc/wc_db.c
libsvn_wc/wc_db.h tests/libsvn_wc/db-test.c
Author: julianfoad
Date: Thu Mar 17 20:54:27 2011
New Revision: 1082690
URL: http://svn.apache.org/viewvc?rev=1082690&view=rev
Log:
Remove unused single-prop-get functions from the WC DB API, because they
were just clutter in the API. The "read all props" and "write all props"
APIs make a sensible interface by themselves and there are no "write one
prop" interfaces at this level.
* subversion/libsvn_wc/wc_db.h,
subversion/libsvn_wc/wc_db.c
(svn_wc__db_base_get_prop, svn_wc__db_read_prop): Remove.
* subversion/tests/libsvn_wc/db-test.c
(validate_node): Remove the testing of svn_wc__db_base_get_prop(). It
still tests svn_wc__db_base_get_props(). There were no tests for
svn_wc__db_read_prop().
Modified:
subversion/trunk/subversion/libsvn_wc/wc_db.c
subversion/trunk/subversion/libsvn_wc/wc_db.h
subversion/trunk/subversion/tests/libsvn_wc/db-test.c
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1082690&r1=1082689&r2=1082690&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Mar 17 20:54:27 2011
@@ -1994,31 +1994,6 @@ svn_wc__db_base_get_children_info(apr_ha
return SVN_NO_ERROR;
}
-svn_error_t *
-svn_wc__db_base_get_prop(const svn_string_t **propval,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *propname,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- apr_hash_t *props;
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- SVN_ERR_ASSERT(propname != NULL);
-
- /* Note: maybe one day, we'll have internal caches of this stuff, but
- for now, we just grab all the props and pick out the requested prop. */
-
- /* ### should: fetch into scratch_pool, then dup into result_pool. */
- SVN_ERR(svn_wc__db_base_get_props(&props, db, local_abspath,
- result_pool, scratch_pool));
-
- *propval = apr_hash_get(props, propname, APR_HASH_KEY_STRING);
-
- return SVN_NO_ERROR;
-}
-
svn_error_t *
svn_wc__db_base_get_props(apr_hash_t **props,
@@ -5346,32 +5321,6 @@ svn_wc__db_read_url(const char **url,
svn_error_t *
-svn_wc__db_read_prop(const svn_string_t **propval,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *propname,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- apr_hash_t *props;
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- SVN_ERR_ASSERT(propname != NULL);
-
- /* Note: maybe one day, we'll have internal caches of this stuff, but
- for now, we just grab all the props and pick out the requested prop. */
-
- /* ### should: fetch into scratch_pool, then dup into result_pool. */
- SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath,
- result_pool, scratch_pool));
-
- *propval = apr_hash_get(props, propname, APR_HASH_KEY_STRING);
-
- return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
svn_wc__db_read_props(apr_hash_t **props,
svn_wc__db_t *db,
const char *local_abspath,
Modified: subversion/trunk/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.h?rev=1082690&r1=1082689&r2=1082690&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.h Thu Mar 17 20:54:27 2011
@@ -771,22 +771,6 @@ svn_wc__db_base_get_children_info(apr_ha
apr_pool_t *scratch_pool);
-/* Set *PROPVAL to the value of the property named PROPNAME of the node
- LOCAL_ABSPATH in the BASE tree.
-
- If the node has no property named PROPNAME, set *PROPVAL to NULL.
- If the node is not present in the BASE tree, return an error.
- Allocate *PROPVAL in RESULT_POOL.
-*/
-svn_error_t *
-svn_wc__db_base_get_prop(const svn_string_t **propval,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *propname,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-
/* Set *PROPS to the properties of the node LOCAL_ABSPATH in the BASE tree.
*PROPS maps "const char *" names to "const svn_string_t *" values.
@@ -1599,23 +1583,6 @@ svn_wc__db_read_url(const char **url,
apr_pool_t *scratch_pool);
-/* Set *PROPVAL to the value of the property named PROPNAME of the node
- LOCAL_ABSPATH in the ACTUAL tree (looking through to the WORKING or BASE
- tree as required).
-
- If the node has no property named PROPNAME, set *PROPVAL to NULL.
- If the node is not present, return an error.
- Allocate *PROPVAL in RESULT_POOL.
-*/
-svn_error_t *
-svn_wc__db_read_prop(const svn_string_t **propval,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *propname,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-
/* Set *PROPS to the properties of the node LOCAL_ABSPATH in the ACTUAL
tree (looking through to the WORKING or BASE tree as required).
Modified: subversion/trunk/subversion/tests/libsvn_wc/db-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_wc/db-test.c?rev=1082690&r1=1082689&r2=1082690&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_wc/db-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_wc/db-test.c Thu Mar 17 20:54:27 2011
@@ -615,15 +615,9 @@ validate_node(svn_wc__db_t *db,
value = apr_hash_get(props, "p1", APR_HASH_KEY_STRING);
SVN_TEST_STRING_ASSERT(value->data, "v1");
- SVN_ERR(svn_wc__db_base_get_prop(&value, db, path, "p1",
- scratch_pool, scratch_pool));
- SVN_TEST_STRING_ASSERT(value->data, "v1");
value = apr_hash_get(props, "for-file", APR_HASH_KEY_STRING);
SVN_TEST_STRING_ASSERT(value->data, relpath);
- SVN_ERR(svn_wc__db_base_get_prop(&value, db, path, "for-file",
- scratch_pool, scratch_pool));
- SVN_TEST_STRING_ASSERT(value->data, relpath);
SVN_ERR(svn_wc__db_read_props(&props, db, path,
scratch_pool, scratch_pool));