Log message:
[[[
* subversion/libsvn_fs_fs/stats.c
* subversion/tests/libsvn_client/client-test.c
* subversion/tests/libsvn_repos/repos-test.c
* subversion/tests/libsvn_subr/stream-test.c
* subversion/tests/libsvn_subr/translate-test.c
* subversion/tests/libsvn_wc/conflict-data-test.c
(): Include svn_hash.h.
(add_change, test_elide_mergeinfo_catalog, patch_collection_func, test_patch,
rmlocks_change_prop, prop_validation_commit_with_revprop,
test_stream_seek_translated, substitute_and_verify,
test_serialize_prop_conflict): Use svn_hash_gets() instead of
apr_hash_get(APR_HASH_KEY_STRING).
]]]
--
Ivan Zhakov
Index: subversion/libsvn_fs_fs/stats.c
===================================================================
--- subversion/libsvn_fs_fs/stats.c (revision 1805933)
+++ subversion/libsvn_fs_fs/stats.c (working copy)
@@ -22,6 +22,7 @@
#include "svn_dirent_uri.h"
#include "svn_fs.h"
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_sorts.h"
@@ -338,7 +339,7 @@
extension = "(none)";
/* get / auto-insert entry for this extension */
- info = apr_hash_get(stats->by_extension, extension, APR_HASH_KEY_STRING);
+ info = svn_hash_gets(stats->by_extension, extension);
if (info == NULL)
{
apr_pool_t *pool = apr_hash_pool_get(stats->by_extension);
@@ -345,8 +346,7 @@
info = apr_pcalloc(pool, sizeof(*info));
info->extension = apr_pstrdup(pool, extension);
- apr_hash_set(stats->by_extension, info->extension,
- APR_HASH_KEY_STRING, info);
+ svn_hash_sets(stats->by_extension, info->extension, info);
}
/* update per-extension histogram */
Index: subversion/tests/libsvn_client/client-test.c
===================================================================
--- subversion/tests/libsvn_client/client-test.c (revision 1805933)
+++ subversion/tests/libsvn_client/client-test.c (working copy)
@@ -122,8 +122,7 @@
SVN_ERR(svn_mergeinfo_parse(&mergeinfo, item->unparsed_mergeinfo,
iterpool));
- apr_hash_set(mergeinfo_catalog, item->path, APR_HASH_KEY_STRING,
- mergeinfo);
+ svn_hash_sets(mergeinfo_catalog, item->path, mergeinfo);
}
SVN_ERR(svn_client__elide_mergeinfo_catalog(mergeinfo_catalog,
@@ -131,8 +130,8 @@
for (item = elide_testcases[i]; item->path; item++)
{
- apr_hash_t *mergeinfo = apr_hash_get(mergeinfo_catalog, item->path,
- APR_HASH_KEY_STRING);
+ apr_hash_t *mergeinfo = svn_hash_gets(mergeinfo_catalog, item->path);
+
if (item->remains && !mergeinfo)
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
"Elision for test case #%d incorrectly "
@@ -314,16 +313,14 @@
struct patch_collection_baton *pcb = baton;
if (patch_abspath)
- apr_hash_set(pcb->patched_tempfiles,
- apr_pstrdup(pcb->state_pool, canon_path_from_patchfile),
- APR_HASH_KEY_STRING,
- apr_pstrdup(pcb->state_pool, patch_abspath));
+ svn_hash_sets(pcb->patched_tempfiles,
+ apr_pstrdup(pcb->state_pool, canon_path_from_patchfile),
+ apr_pstrdup(pcb->state_pool, patch_abspath));
if (reject_abspath)
- apr_hash_set(pcb->reject_tempfiles,
- apr_pstrdup(pcb->state_pool, canon_path_from_patchfile),
- APR_HASH_KEY_STRING,
- apr_pstrdup(pcb->state_pool, reject_abspath));
+ svn_hash_sets(pcb->reject_tempfiles,
+ apr_pstrdup(pcb->state_pool, canon_path_from_patchfile),
+ apr_pstrdup(pcb->state_pool, reject_abspath));
if (filtered)
*filtered = FALSE;
@@ -418,14 +415,12 @@
SVN_TEST_ASSERT(apr_hash_count(pcb.patched_tempfiles) == 1);
key = "A/D/gamma";
- patched_tempfile_path = apr_hash_get(pcb.patched_tempfiles, key,
- APR_HASH_KEY_STRING);
+ patched_tempfile_path = svn_hash_gets(pcb.patched_tempfiles, key);
SVN_ERR(check_patch_result(patched_tempfile_path, expected_gamma, "\n",
EXPECTED_GAMMA_LINES, pool));
SVN_TEST_ASSERT(apr_hash_count(pcb.reject_tempfiles) == 1);
key = "A/D/gamma";
- reject_tempfile_path = apr_hash_get(pcb.reject_tempfiles, key,
- APR_HASH_KEY_STRING);
+ reject_tempfile_path = svn_hash_gets(pcb.reject_tempfiles, key);
SVN_ERR(check_patch_result(reject_tempfile_path, expected_gamma_reject,
APR_EOL_STR, EXPECTED_GAMMA_REJECT_LINES, pool));
Index: subversion/tests/libsvn_repos/repos-test.c
===================================================================
--- subversion/tests/libsvn_repos/repos-test.c (revision 1805933)
+++ subversion/tests/libsvn_repos/repos-test.c (working copy)
@@ -950,15 +950,13 @@
"Value for lock-token property not NULL");
/* We only want it removed once. */
- if (apr_hash_get(fb->main_baton->removed, fb->path,
- APR_HASH_KEY_STRING) != NULL)
+ if (svn_hash_gets(fb->main_baton->removed, fb->path) != NULL)
return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
"Lock token for '%s' already removed",
fb->path);
/* Mark as removed. */
- apr_hash_set(fb->main_baton->removed, fb->path, APR_HASH_KEY_STRING,
- (void *)1);
+ svn_hash_sets(fb->main_baton->removed, fb->path, (void *)1);
}
return SVN_NO_ERROR;
@@ -3315,15 +3313,13 @@
/* Set usual author and log props, if not set already */
if (strcmp(prop_key, SVN_PROP_REVISION_AUTHOR) != 0)
{
- apr_hash_set(revprop_table, SVN_PROP_REVISION_AUTHOR,
- APR_HASH_KEY_STRING,
- svn_string_create("plato", pool));
+ svn_hash_sets(revprop_table, SVN_PROP_REVISION_AUTHOR,
+ svn_string_create("plato", pool));
}
else if (strcmp(prop_key, SVN_PROP_REVISION_LOG) != 0)
{
- apr_hash_set(revprop_table, SVN_PROP_REVISION_LOG,
- APR_HASH_KEY_STRING,
- svn_string_create("revision log", pool));
+ svn_hash_sets(revprop_table, SVN_PROP_REVISION_LOG,
+ svn_string_create("revision log", pool));
}
/* Make an arbitrary change and commit using above values... */
Index: subversion/tests/libsvn_subr/stream-test.c
===================================================================
--- subversion/tests/libsvn_subr/stream-test.c (revision 1805933)
+++ subversion/tests/libsvn_subr/stream-test.c (working copy)
@@ -26,6 +26,7 @@
#include "svn_io.h"
#include "svn_subst.h"
#include "svn_base64.h"
+#include "svn_hash.h"
#include <apr_general.h>
#include "private/svn_io_private.h"
@@ -375,7 +376,7 @@
keywords = apr_hash_make(pool);
keyword_val = svn_string_create("my keyword was expanded", pool);
- apr_hash_set(keywords, "MyKeyword", APR_HASH_KEY_STRING, keyword_val);
+ svn_hash_sets(keywords, "MyKeyword", keyword_val);
stringbuf = svn_stringbuf_create("One$MyKeyword$Two", pool);
stream = svn_stream_from_stringbuf(stringbuf, pool);
translated_stream = svn_subst_stream_translated(stream, APR_EOL_STR,
Index: subversion/tests/libsvn_subr/translate-test.c
===================================================================
--- subversion/tests/libsvn_subr/translate-test.c (revision 1805933)
+++ subversion/tests/libsvn_subr/translate-test.c (working copy)
@@ -40,6 +40,7 @@
#include "../svn_test.h"
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_subst.h"
@@ -303,36 +304,27 @@
if (rev)
{
val = svn_string_create(rev, pool);
- apr_hash_set(keywords, SVN_KEYWORD_REVISION_LONG,
- APR_HASH_KEY_STRING, val);
- apr_hash_set(keywords, SVN_KEYWORD_REVISION_MEDIUM,
- APR_HASH_KEY_STRING, val);
- apr_hash_set(keywords, SVN_KEYWORD_REVISION_SHORT,
- APR_HASH_KEY_STRING, val);
+ svn_hash_sets(keywords, SVN_KEYWORD_REVISION_LONG, val);
+ svn_hash_sets(keywords, SVN_KEYWORD_REVISION_MEDIUM, val);
+ svn_hash_sets(keywords, SVN_KEYWORD_REVISION_SHORT, val);
}
if (date)
{
val = svn_string_create(date, pool);
- apr_hash_set(keywords, SVN_KEYWORD_DATE_LONG,
- APR_HASH_KEY_STRING, val);
- apr_hash_set(keywords, SVN_KEYWORD_DATE_SHORT,
- APR_HASH_KEY_STRING, val);
+ svn_hash_sets(keywords, SVN_KEYWORD_DATE_LONG, val);
+ svn_hash_sets(keywords, SVN_KEYWORD_DATE_SHORT, val);
}
if (author)
{
val = svn_string_create(author, pool);
- apr_hash_set(keywords, SVN_KEYWORD_AUTHOR_LONG,
- APR_HASH_KEY_STRING, val);
- apr_hash_set(keywords, SVN_KEYWORD_AUTHOR_SHORT,
- APR_HASH_KEY_STRING, val);
+ svn_hash_sets(keywords, SVN_KEYWORD_AUTHOR_LONG, val);
+ svn_hash_sets(keywords, SVN_KEYWORD_AUTHOR_SHORT, val);
}
if (url)
{
val = svn_string_create(url, pool);
- apr_hash_set(keywords, SVN_KEYWORD_URL_LONG,
- APR_HASH_KEY_STRING, val);
- apr_hash_set(keywords, SVN_KEYWORD_URL_SHORT,
- APR_HASH_KEY_STRING, val);
+ svn_hash_sets(keywords, SVN_KEYWORD_URL_LONG, val);
+ svn_hash_sets(keywords, SVN_KEYWORD_URL_SHORT, val);
}
err = svn_subst_copy_and_translate4(src_fname, dst_fname, dst_eol, repair,
Index: subversion/tests/libsvn_wc/conflict-data-test.c
===================================================================
--- subversion/tests/libsvn_wc/conflict-data-test.c (revision 1805933)
+++ subversion/tests/libsvn_wc/conflict-data-test.c (working copy)
@@ -394,16 +394,13 @@
apr_hash_t *conflicts = apr_hash_make(pool);
const char *marker_abspath;
- apr_hash_set(mine, "prop", APR_HASH_KEY_STRING,
- svn_string_create("Mine", pool));
+ svn_hash_sets(mine, "prop", svn_string_create("Mine", pool));
- apr_hash_set(their_old, "prop", APR_HASH_KEY_STRING,
- svn_string_create("Their-Old", pool));
+ svn_hash_sets(their_old, "prop", svn_string_create("Their-Old", pool));
- apr_hash_set(theirs, "prop", APR_HASH_KEY_STRING,
- svn_string_create("Theirs", pool));
+ svn_hash_sets(theirs, "prop", svn_string_create("Theirs", pool));
- apr_hash_set(conflicts, "prop", APR_HASH_KEY_STRING, "");
+ svn_hash_sets(conflicts, "prop", "");
SVN_ERR(svn_io_open_unique_file3(NULL, &marker_abspath, sbox.wc_abspath,
svn_io_file_del_on_pool_cleanup, pool,