You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2013/03/23 15:58:27 UTC
svn commit: r1460168 - /subversion/trunk/subversion/libsvn_client/
Author: danielsh
Date: Sat Mar 23 14:58:26 2013
New Revision: 1460168
URL: http://svn.apache.org/r1460168
Log:
Use svn_hash_gets and svn_hash_sets.
* subversion/libsvn_client/add.c
* subversion/libsvn_client/cat.c
* subversion/libsvn_client/commit.c
* subversion/libsvn_client/commit_util.c
* subversion/libsvn_client/copy.c
* subversion/libsvn_client/copy_foreign.c
* subversion/libsvn_client/ctx.c
* subversion/libsvn_client/delete.c
* subversion/libsvn_client/deprecated.c
* subversion/libsvn_client/diff.c
* subversion/libsvn_client/diff_local.c
* subversion/libsvn_client/diff_summarize.c
* subversion/libsvn_client/export.c
* subversion/libsvn_client/externals.c
* subversion/libsvn_client/import.c
* subversion/libsvn_client/info.c
* subversion/libsvn_client/iprops.c
* subversion/libsvn_client/list.c
* subversion/libsvn_client/locking_commands.c
* subversion/libsvn_client/log.c
* subversion/libsvn_client/merge.c
* subversion/libsvn_client/mergeinfo.c
* subversion/libsvn_client/patch.c
* subversion/libsvn_client/prop_commands.c
* subversion/libsvn_client/ra.c
* subversion/libsvn_client/repos_diff.c
* subversion/libsvn_client/revert.c
* subversion/libsvn_client/status.c
* subversion/libsvn_client/switch.c
* subversion/libsvn_client/update.c
* subversion/libsvn_client/util.c
Modified:
subversion/trunk/subversion/libsvn_client/add.c
subversion/trunk/subversion/libsvn_client/cat.c
subversion/trunk/subversion/libsvn_client/commit.c
subversion/trunk/subversion/libsvn_client/commit_util.c
subversion/trunk/subversion/libsvn_client/copy.c
subversion/trunk/subversion/libsvn_client/copy_foreign.c
subversion/trunk/subversion/libsvn_client/ctx.c
subversion/trunk/subversion/libsvn_client/delete.c
subversion/trunk/subversion/libsvn_client/deprecated.c
subversion/trunk/subversion/libsvn_client/diff.c
subversion/trunk/subversion/libsvn_client/diff_local.c
subversion/trunk/subversion/libsvn_client/diff_summarize.c
subversion/trunk/subversion/libsvn_client/export.c
subversion/trunk/subversion/libsvn_client/externals.c
subversion/trunk/subversion/libsvn_client/import.c
subversion/trunk/subversion/libsvn_client/info.c
subversion/trunk/subversion/libsvn_client/iprops.c
subversion/trunk/subversion/libsvn_client/list.c
subversion/trunk/subversion/libsvn_client/locking_commands.c
subversion/trunk/subversion/libsvn_client/log.c
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/libsvn_client/mergeinfo.c
subversion/trunk/subversion/libsvn_client/patch.c
subversion/trunk/subversion/libsvn_client/prop_commands.c
subversion/trunk/subversion/libsvn_client/ra.c
subversion/trunk/subversion/libsvn_client/repos_diff.c
subversion/trunk/subversion/libsvn_client/revert.c
subversion/trunk/subversion/libsvn_client/status.c
subversion/trunk/subversion/libsvn_client/switch.c
subversion/trunk/subversion/libsvn_client/update.c
subversion/trunk/subversion/libsvn_client/util.c
Modified: subversion/trunk/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/add.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/add.c (original)
+++ subversion/trunk/subversion/libsvn_client/add.c Sat Mar 23 14:58:26 2013
@@ -176,8 +176,7 @@ get_auto_props_for_pattern(apr_hash_t *p
propval_str->data = propval;
propval_str->len = strlen(propval);
- apr_hash_set(properties, propname, APR_HASH_KEY_STRING,
- propval_str);
+ svn_hash_sets(properties, propname, propval_str);
if (strcmp(propname, SVN_PROP_MIME_TYPE) == 0)
*mimetype = propval;
else if (strcmp(propname, SVN_PROP_EXECUTABLE) == 0)
@@ -287,8 +286,8 @@ add_file(const char *local_abspath,
{
mimetype = NULL;
properties = apr_hash_make(pool);
- apr_hash_set(properties, SVN_PROP_SPECIAL, APR_HASH_KEY_STRING,
- svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool));
+ svn_hash_sets(properties, SVN_PROP_SPECIAL,
+ svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool));
}
else
{
@@ -544,8 +543,8 @@ all_auto_props_collector(const char *nam
if (len > 0)
{
- apr_hash_t *pattern_hash = apr_hash_get(autoprops_baton->autoprops,
- name, APR_HASH_KEY_STRING);
+ apr_hash_t *pattern_hash = svn_hash_gets(autoprops_baton->autoprops,
+ name);
svn_string_t *propval;
/* Force reserved boolean property values to '*'. */
@@ -563,13 +562,13 @@ all_auto_props_collector(const char *nam
if (!pattern_hash)
{
pattern_hash = apr_hash_make(autoprops_baton->result_pool);
- apr_hash_set(autoprops_baton->autoprops,
- apr_pstrdup(autoprops_baton->result_pool, name),
- APR_HASH_KEY_STRING, pattern_hash);
+ svn_hash_sets(autoprops_baton->autoprops,
+ apr_pstrdup(autoprops_baton->result_pool, name),
+ pattern_hash);
}
- apr_hash_set(pattern_hash,
- apr_pstrdup(autoprops_baton->result_pool, property),
- APR_HASH_KEY_STRING, propval->data);
+ svn_hash_sets(pattern_hash,
+ apr_pstrdup(autoprops_baton->result_pool, property),
+ propval->data);
}
}
return TRUE;
@@ -636,9 +635,9 @@ svn_client__get_all_auto_props(apr_hash_
svn_error_t *err = NULL;
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
svn_boolean_t target_is_url = svn_path_is_url(path_or_url);
- svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
- SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
+ svn_config_t *cfg = ctx->config ? svn_hash_gets(ctx->config,
+ SVN_CONFIG_CATEGORY_CONFIG)
+ : NULL;
*autoprops = apr_hash_make(result_pool);
autoprops_baton.result_pool = result_pool;
autoprops_baton.autoprops = *autoprops;
@@ -689,7 +688,7 @@ svn_client__get_all_auto_props(apr_hash_
/* Stash any explicit PROPS for PARENT_PATH into the inherited props array,
since these are actually inherited props for LOCAL_ABSPATH. */
- config_auto_prop = apr_hash_get(props, path_or_url, APR_HASH_KEY_STRING);
+ config_auto_prop = svn_hash_gets(props, path_or_url);
if (config_auto_prop)
{
@@ -697,10 +696,8 @@ svn_client__get_all_auto_props(apr_hash_
apr_palloc(scratch_pool, sizeof(*new_iprop));
new_iprop->path_or_url = path_or_url;
new_iprop->prop_hash = apr_hash_make(scratch_pool);
- apr_hash_set(new_iprop->prop_hash,
- SVN_PROP_INHERITABLE_AUTO_PROPS,
- APR_HASH_KEY_STRING,
- config_auto_prop);
+ svn_hash_sets(new_iprop->prop_hash, SVN_PROP_INHERITABLE_AUTO_PROPS,
+ config_auto_prop);
APR_ARRAY_PUSH(inherited_config_auto_props,
svn_prop_inherited_item_t *) = new_iprop;
}
@@ -794,8 +791,7 @@ svn_error_t *svn_client__get_inherited_i
&rev, &rev, NULL, svn_depth_empty, NULL, ctx,
scratch_pool, scratch_pool));
- explicit_prop = apr_hash_get(explicit_ignores, path_or_url,
- APR_HASH_KEY_STRING);
+ explicit_prop = svn_hash_gets(explicit_ignores, path_or_url);
if (explicit_prop)
{
@@ -803,10 +799,8 @@ svn_error_t *svn_client__get_inherited_i
apr_palloc(scratch_pool, sizeof(*new_iprop));
new_iprop->path_or_url = path_or_url;
new_iprop->prop_hash = apr_hash_make(scratch_pool);
- apr_hash_set(new_iprop->prop_hash,
- SVN_PROP_INHERITABLE_IGNORES,
- APR_HASH_KEY_STRING,
- explicit_prop);
+ svn_hash_sets(new_iprop->prop_hash, SVN_PROP_INHERITABLE_IGNORES,
+ explicit_prop);
APR_ARRAY_PUSH(inherited_ignores,
svn_prop_inherited_item_t *) = new_iprop;
}
@@ -817,9 +811,8 @@ svn_error_t *svn_client__get_inherited_i
{
svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
inherited_ignores, i, svn_prop_inherited_item_t *);
- svn_string_t *ignore_val = apr_hash_get(elt->prop_hash,
- SVN_PROP_INHERITABLE_IGNORES,
- APR_HASH_KEY_STRING);
+ svn_string_t *ignore_val = svn_hash_gets(elt->prop_hash,
+ SVN_PROP_INHERITABLE_IGNORES);
if (ignore_val)
svn_cstring_split_append(*ignores, ignore_val->data, "\n\r\t\v ",
FALSE, result_pool);
Modified: subversion/trunk/subversion/libsvn_client/cat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cat.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/cat.c (original)
+++ subversion/trunk/subversion/libsvn_client/cat.c Sat Mar 23 14:58:26 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_client.h"
#include "svn_string.h"
#include "svn_error.h"
@@ -109,12 +110,9 @@ svn_client__get_normalized_stream(svn_st
local_mod = TRUE;
}
- eol_style = apr_hash_get(props, SVN_PROP_EOL_STYLE,
- APR_HASH_KEY_STRING);
- keywords = apr_hash_get(props, SVN_PROP_KEYWORDS,
- APR_HASH_KEY_STRING);
- special = apr_hash_get(props, SVN_PROP_SPECIAL,
- APR_HASH_KEY_STRING);
+ eol_style = svn_hash_gets(props, SVN_PROP_EOL_STYLE);
+ keywords = svn_hash_gets(props, SVN_PROP_KEYWORDS);
+ special = svn_hash_gets(props, SVN_PROP_SPECIAL);
if (eol_style)
svn_subst_eol_style_from_value(&style, &eol, eol_style->data);
@@ -244,8 +242,8 @@ svn_client_cat2(svn_stream_t *out,
}
}
- eol_style = apr_hash_get(props, SVN_PROP_EOL_STYLE, APR_HASH_KEY_STRING);
- keywords = apr_hash_get(props, SVN_PROP_KEYWORDS, APR_HASH_KEY_STRING);
+ eol_style = svn_hash_gets(props, SVN_PROP_EOL_STYLE);
+ keywords = svn_hash_gets(props, SVN_PROP_KEYWORDS);
if (eol_style || keywords)
{
@@ -268,12 +266,9 @@ svn_client_cat2(svn_stream_t *out,
svn_string_t *cmt_rev, *cmt_date, *cmt_author;
apr_time_t when = 0;
- cmt_rev = apr_hash_get(props, SVN_PROP_ENTRY_COMMITTED_REV,
- APR_HASH_KEY_STRING);
- cmt_date = apr_hash_get(props, SVN_PROP_ENTRY_COMMITTED_DATE,
- APR_HASH_KEY_STRING);
- cmt_author = apr_hash_get(props, SVN_PROP_ENTRY_LAST_AUTHOR,
- APR_HASH_KEY_STRING);
+ cmt_rev = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_REV);
+ cmt_date = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_DATE);
+ cmt_author = svn_hash_gets(props, SVN_PROP_ENTRY_LAST_AUTHOR);
if (cmt_date)
SVN_ERR(svn_time_from_cstring(&when, cmt_date->data, pool));
Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Sat Mar 23 14:58:26 2013
@@ -114,7 +114,7 @@ get_ra_editor(const svn_delta_editor_t *
ctx->wc_ctx, item->path, FALSE, pool,
iterpool));
if (relpath)
- apr_hash_set(relpath_map, relpath, APR_HASH_KEY_STRING, item->path);
+ svn_hash_sets(relpath_map, relpath, item->path);
}
svn_pool_destroy(iterpool);
}
@@ -209,7 +209,7 @@ collect_lock_tokens(apr_hash_t **result,
if (relpath)
{
- apr_hash_set(*result, relpath, APR_HASH_KEY_STRING, token);
+ svn_hash_sets(*result, relpath, token);
}
}
@@ -365,13 +365,13 @@ determine_lock_targets(apr_array_header_
return svn_error_trace(err);
}
- wc_targets = apr_hash_get(wc_items, wcroot_abspath, APR_HASH_KEY_STRING);
+ wc_targets = svn_hash_gets(wc_items, wcroot_abspath);
if (! wc_targets)
{
wc_targets = apr_array_make(scratch_pool, 4, sizeof(const char *));
- apr_hash_set(wc_items, apr_pstrdup(scratch_pool, wcroot_abspath),
- APR_HASH_KEY_STRING, wc_targets);
+ svn_hash_sets(wc_items, apr_pstrdup(scratch_pool, wcroot_abspath),
+ wc_targets);
}
APR_ARRAY_PUSH(wc_targets, const char *) = target_abspath;
@@ -786,8 +786,8 @@ svn_client_commit6(const apr_array_heade
{
svn_boolean_t found_delete_half =
- (apr_hash_get(committables->by_path, delete_op_root_abspath,
- APR_HASH_KEY_STRING) != NULL);
+ (svn_hash_gets(committables->by_path, delete_op_root_abspath)
+ != NULL);
if (!found_delete_half)
{
@@ -830,9 +830,9 @@ svn_client_commit6(const apr_array_heade
if (parent_delete_op_root_abspath)
found_delete_half =
- (apr_hash_get(committables->by_path,
- parent_delete_op_root_abspath,
- APR_HASH_KEY_STRING) != NULL);
+ (svn_hash_gets(committables->by_path,
+ parent_delete_op_root_abspath)
+ != NULL);
}
}
@@ -866,8 +866,7 @@ svn_client_commit6(const apr_array_heade
if (moved_to_abspath && copy_op_root_abspath &&
strcmp(moved_to_abspath, copy_op_root_abspath) == 0 &&
- apr_hash_get(committables->by_path, copy_op_root_abspath,
- APR_HASH_KEY_STRING) == NULL)
+ svn_hash_gets(committables->by_path, copy_op_root_abspath) == NULL)
{
cmt_err = svn_error_createf(
SVN_ERR_ILLEGAL_TARGET, NULL,
@@ -969,9 +968,7 @@ svn_client_commit6(const apr_array_heade
bump_err = post_process_commit_item(
queue, item, ctx->wc_ctx,
keep_changelists, keep_locks, commit_as_operations,
- apr_hash_get(sha1_checksums,
- item->path,
- APR_HASH_KEY_STRING),
+ svn_hash_gets(sha1_checksums, item->path),
iterpool);
if (bump_err)
goto cleanup;
Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Sat Mar 23 14:58:26 2013
@@ -213,18 +213,15 @@ add_committable(svn_client__committables
/* ### todo: Get the canonical repository for this item, which will
be the real key for the COMMITTABLES hash, instead of the above
bogosity. */
- array = apr_hash_get(committables->by_repository,
- repos_root_url,
- APR_HASH_KEY_STRING);
+ array = svn_hash_gets(committables->by_repository, repos_root_url);
/* E-gads! There is no array for this repository yet! Oh, no
problem, we'll just create (and add to the hash) one. */
if (array == NULL)
{
array = apr_array_make(result_pool, 1, sizeof(new_item));
- apr_hash_set(committables->by_repository,
- apr_pstrdup(result_pool, repos_root_url),
- APR_HASH_KEY_STRING, array);
+ svn_hash_sets(committables->by_repository,
+ apr_pstrdup(result_pool, repos_root_url), array);
}
/* Now update pointer values, ensuring that their allocations live
@@ -254,19 +251,14 @@ add_committable(svn_client__committables
APR_ARRAY_PUSH(array, svn_client_commit_item3_t *) = new_item;
/* ... and to the hash. */
- apr_hash_set(committables->by_path,
- new_item->path,
- APR_HASH_KEY_STRING,
- new_item);
+ svn_hash_sets(committables->by_path, new_item->path, new_item);
if (lock
&& lock_tokens
&& (state_flags & SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN))
{
- apr_hash_set(lock_tokens,
- new_item->url,
- APR_HASH_KEY_STRING,
- apr_pstrdup(result_pool, lock->token));
+ svn_hash_sets(lock_tokens, new_item->url,
+ apr_pstrdup(result_pool, lock->token));
}
return SVN_NO_ERROR;
@@ -280,7 +272,7 @@ look_up_committable(svn_client__committa
apr_pool_t *pool)
{
return (svn_client_commit_item3_t *)
- apr_hash_get(committables->by_path, path, APR_HASH_KEY_STRING);
+ svn_hash_gets(committables->by_path, path);
}
/* Helper function for svn_client__harvest_committables().
@@ -646,8 +638,8 @@ harvest_status_callback(void *status_bat
/* Save the result for reuse. */
matches_changelists = ((changelists == NULL)
|| (status->changelist != NULL
- && apr_hash_get(changelists, status->changelist,
- APR_HASH_KEY_STRING) != NULL));
+ && svn_hash_gets(changelists, status->changelist)
+ != NULL));
/* Early exit. */
if (status->kind != svn_node_dir && ! matches_changelists)
@@ -934,12 +926,10 @@ harvest_status_callback(void *status_bat
if (parent_is_copy)
parent_abspath = copy_root_abspath;
- if (!apr_hash_get(danglers, parent_abspath, APR_HASH_KEY_STRING))
+ if (!svn_hash_gets(danglers, parent_abspath))
{
- apr_hash_set(danglers,
- apr_pstrdup(result_pool, parent_abspath),
- APR_HASH_KEY_STRING,
- apr_pstrdup(result_pool, local_abspath));
+ svn_hash_sets(danglers, apr_pstrdup(result_pool, parent_abspath),
+ apr_pstrdup(result_pool, local_abspath));
}
}
}
@@ -1469,9 +1459,8 @@ do_item_commit(void **dir_baton,
apr_pool_t *pool)
{
struct item_commit_baton *icb = callback_baton;
- const svn_client_commit_item3_t *item = apr_hash_get(icb->commit_items,
- path,
- APR_HASH_KEY_STRING);
+ const svn_client_commit_item3_t *item = svn_hash_gets(icb->commit_items,
+ path);
svn_node_kind_t kind = item->kind;
void *file_baton = NULL;
apr_pool_t *file_pool = NULL;
@@ -1748,7 +1737,7 @@ do_item_commit(void **dir_baton,
/* Add this file mod to the FILE_MODS hash. */
mod->item = item;
mod->file_baton = file_baton;
- apr_hash_set(file_mods, item->session_relpath, APR_HASH_KEY_STRING, mod);
+ svn_hash_sets(file_mods, item->session_relpath, mod);
}
else if (file_baton)
{
@@ -1801,7 +1790,7 @@ svn_client__do_commit(const char *base_u
svn_client_commit_item3_t *item =
APR_ARRAY_IDX(commit_items, i, svn_client_commit_item3_t *);
const char *path = item->session_relpath;
- apr_hash_set(items_hash, path, APR_HASH_KEY_STRING, item);
+ svn_hash_sets(items_hash, path, item);
APR_ARRAY_PUSH(paths, const char *) = path;
}
@@ -1869,8 +1858,7 @@ svn_client__do_commit(const char *base_u
}
if (sha1_checksums)
- apr_hash_set(*sha1_checksums, item->path, APR_HASH_KEY_STRING,
- new_text_base_sha1_checksum);
+ svn_hash_sets(*sha1_checksums, item->path, new_text_base_sha1_checksum);
}
svn_pool_destroy(iterpool);
@@ -1986,8 +1974,8 @@ svn_client__ensure_revprop_table(apr_has
{
new_revprop_table = apr_hash_make(pool);
}
- apr_hash_set(new_revprop_table, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
- svn_string_create(log_msg, pool));
+ svn_hash_sets(new_revprop_table, SVN_PROP_REVISION_LOG,
+ svn_string_create(log_msg, pool));
*revprop_table_out = new_revprop_table;
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Sat Mar 23 14:58:26 2013
@@ -28,6 +28,7 @@
/*** Includes. ***/
#include <string.h>
+#include "svn_hash.h"
#include "svn_client.h"
#include "svn_error.h"
#include "svn_error_codes.h"
@@ -599,9 +600,7 @@ path_driver_cb_func(void **dir_baton,
{
struct path_driver_cb_baton *cb_baton = callback_baton;
svn_boolean_t do_delete = FALSE, do_add = FALSE;
- path_driver_info_t *path_info = apr_hash_get(cb_baton->action_hash,
- path,
- APR_HASH_KEY_STRING);
+ path_driver_info_t *path_info = svn_hash_gets(cb_baton->action_hash, path);
/* Initialize return value. */
*dir_baton = NULL;
@@ -1045,9 +1044,9 @@ repos_to_repos_copy(const apr_array_head
info->src_path = src_rel;
info->dst_path = dst_rel;
- apr_hash_set(action_hash, info->dst_path, APR_HASH_KEY_STRING, info);
+ svn_hash_sets(action_hash, info->dst_path, info);
if (is_move && (! info->resurrection))
- apr_hash_set(action_hash, info->src_path, APR_HASH_KEY_STRING, info);
+ svn_hash_sets(action_hash, info->src_path, info);
}
if (SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx))
@@ -1115,7 +1114,7 @@ repos_to_repos_copy(const apr_array_head
info->dir_add = TRUE;
APR_ARRAY_PUSH(paths, const char *) = relpath;
- apr_hash_set(action_hash, relpath, APR_HASH_KEY_STRING, info);
+ svn_hash_sets(action_hash, relpath, info);
}
}
@@ -1361,9 +1360,8 @@ wc_to_repos_copy(const apr_array_header_
ctx, scratch_pool, iterpool));
/* The committables are keyed by the repository root */
- commit_items = apr_hash_get(committables->by_repository,
- cukb.repos_root_url,
- APR_HASH_KEY_STRING);
+ commit_items = svn_hash_gets(committables->by_repository,
+ cukb.repos_root_url);
SVN_ERR_ASSERT(commit_items != NULL);
if (cukb.should_reparent)
@@ -1467,7 +1465,7 @@ wc_to_repos_copy(const apr_array_header_
ctx->wc_ctx, item->path, FALSE,
scratch_pool, iterpool));
if (relpath)
- apr_hash_set(relpath_map, relpath, APR_HASH_KEY_STRING, item->path);
+ svn_hash_sets(relpath_map, relpath, item->path);
}
}
#endif
@@ -1668,7 +1666,7 @@ repos_to_wc_copy_single(svn_client__copy
&pair->src_revnum, &new_props, pool));
if (new_props && ! same_repositories)
- apr_hash_set(new_props, SVN_PROP_MERGEINFO, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(new_props, SVN_PROP_MERGEINFO, NULL);
SVN_ERR(svn_wc_add_repos_file4(
ctx->wc_ctx, dst_abspath,
Modified: subversion/trunk/subversion/libsvn_client/copy_foreign.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy_foreign.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy_foreign.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy_foreign.c Sat Mar 23 14:58:26 2013
@@ -26,6 +26,7 @@
/*** Includes. ***/
#include <string.h>
+#include "svn_hash.h"
#include "svn_client.h"
#include "svn_delta.h"
#include "svn_dirent_uri.h"
@@ -164,9 +165,8 @@ dir_change_prop(void *dir_baton,
db->properties = apr_hash_make(db->pool);
if (value != NULL)
- apr_hash_set(db->properties,
- apr_pstrdup(db->pool, name), APR_HASH_KEY_STRING,
- svn_string_dup(value, db->pool));
+ svn_hash_sets(db->properties, apr_pstrdup(db->pool, name),
+ svn_string_dup(value, db->pool));
}
else
{
@@ -311,9 +311,8 @@ file_change_prop(void *file_baton,
fb->properties = apr_hash_make(fb->pool);
if (value != NULL)
- apr_hash_set(fb->properties,
- apr_pstrdup(fb->pool, name), APR_HASH_KEY_STRING,
- svn_string_dup(value, fb->pool));
+ svn_hash_sets(fb->properties, apr_pstrdup(fb->pool, name),
+ svn_string_dup(value, fb->pool));
return SVN_NO_ERROR;
}
@@ -533,7 +532,7 @@ svn_client__copy_foreign(const char *url
|| ! strcmp(name, SVN_PROP_MERGEINFO))
{
/* We can't handle DAV, ENTRY and merge specific props here */
- apr_hash_set(props, name, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(props, name, NULL);
}
}
Modified: subversion/trunk/subversion/libsvn_client/ctx.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/ctx.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/ctx.c (original)
+++ subversion/trunk/subversion/libsvn_client/ctx.c Sat Mar 23 14:58:26 2013
@@ -28,6 +28,7 @@
/*** Includes. ***/
#include <apr_pools.h>
+#include "svn_hash.h"
#include "svn_client.h"
#include "svn_error.h"
@@ -93,8 +94,7 @@ svn_client_create_context2(svn_client_ct
(*ctx)->config = cfg_hash;
if (cfg_hash)
- cfg_config = apr_hash_get(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING);
+ cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG);
else
cfg_config = NULL;
Modified: subversion/trunk/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/delete.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/delete.c (original)
+++ subversion/trunk/subversion/libsvn_client/delete.c Sat Mar 23 14:58:26 2013
@@ -28,6 +28,7 @@
/*** Includes. ***/
#include <apr_file_io.h>
+#include "svn_hash.h"
#include "svn_types.h"
#include "svn_pools.h"
#include "svn_wc.h"
@@ -324,8 +325,7 @@ delete_urls_multi_repos(const apr_array_
repos_deletables = apr_pcalloc(pool, sizeof(*repos_deletables));
repos_deletables->ra_session = ra_session;
repos_deletables->target_uris = target_uris;
- apr_hash_set(deletables, repos_root,
- APR_HASH_KEY_STRING, repos_deletables);
+ svn_hash_sets(deletables, repos_root, repos_deletables);
}
/* If we get here, we should have been able to calculate a
@@ -530,13 +530,11 @@ svn_client_delete4(const apr_array_heade
pool));
SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx,
local_abspath, pool, iterpool));
- targets = apr_hash_get(wcroots, wcroot_abspath,
- APR_HASH_KEY_STRING);
+ targets = svn_hash_gets(wcroots, wcroot_abspath);
if (targets == NULL)
{
targets = apr_array_make(pool, 1, sizeof(const char *));
- apr_hash_set(wcroots, wcroot_abspath, APR_HASH_KEY_STRING,
- targets);
+ svn_hash_sets(wcroots, wcroot_abspath, targets);
}
/* Make sure targets are unique. */
Modified: subversion/trunk/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/deprecated.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_client/deprecated.c Sat Mar 23 14:58:26 2013
@@ -36,6 +36,7 @@
#include "svn_client.h"
#include "svn_path.h"
#include "svn_compat.h"
+#include "svn_hash.h"
#include "svn_props.h"
#include "svn_utf.h"
#include "svn_string.h"
@@ -1431,17 +1432,17 @@ store_dirent(void *baton, const char *pa
if (dirent->kind == svn_node_file)
{
const char *base_name = svn_path_basename(abs_path, lb->pool);
- apr_hash_set(lb->dirents, base_name, APR_HASH_KEY_STRING, dirent);
+ svn_hash_sets(lb->dirents, base_name, dirent);
if (lock)
- apr_hash_set(lb->locks, base_name, APR_HASH_KEY_STRING, lock);
+ svn_hash_sets(lb->locks, base_name, lock);
}
}
else
{
path = apr_pstrdup(lb->pool, path);
- apr_hash_set(lb->dirents, path, APR_HASH_KEY_STRING, dirent);
+ svn_hash_sets(lb->dirents, path, dirent);
if (lock)
- apr_hash_set(lb->locks, path, APR_HASH_KEY_STRING, lock);
+ svn_hash_sets(lb->locks, path, lock);
}
return SVN_NO_ERROR;
@@ -1975,7 +1976,7 @@ svn_client_propget3(apr_hash_t **props,
svn_dirent_skip_ancestor(target, abspath),
pool);
- apr_hash_set(*props, relpath, APR_HASH_KEY_STRING, value);
+ svn_hash_sets(*props, relpath, value);
}
}
else
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Sat Mar 23 14:58:26 2013
@@ -2451,8 +2451,7 @@ set_up_diff_cmd_and_options(struct diff_
/* See if there is a diff command and/or diff arguments. */
if (config)
{
- svn_config_t *cfg = apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING);
+ svn_config_t *cfg = svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG);
svn_config_get(cfg, &diff_cmd, SVN_CONFIG_SECTION_HELPERS,
SVN_CONFIG_OPTION_DIFF_CMD, NULL);
if (options == NULL)
Modified: subversion/trunk/subversion/libsvn_client/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff_local.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff_local.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff_local.c Sat Mar 23 14:58:26 2013
@@ -127,8 +127,7 @@ do_arbitrary_files_diff(const char *loca
scratch_pool));
/* Try to determine the mime-type of each file. */
- original_mime_type = apr_hash_get(original_props, SVN_PROP_MIME_TYPE,
- APR_HASH_KEY_STRING);
+ original_mime_type = svn_hash_gets(original_props, SVN_PROP_MIME_TYPE);
if (!file1_is_empty && !original_mime_type)
{
const char *mime_type;
@@ -139,8 +138,7 @@ do_arbitrary_files_diff(const char *loca
original_mime_type = svn_string_create(mime_type, scratch_pool);
}
- modified_mime_type = apr_hash_get(modified_props, SVN_PROP_MIME_TYPE,
- APR_HASH_KEY_STRING);
+ modified_mime_type = svn_hash_gets(modified_props, SVN_PROP_MIME_TYPE);
if (!file2_is_empty && !modified_mime_type)
{
const char *mime_type;
@@ -195,8 +193,7 @@ do_arbitrary_files_diff(const char *loca
/* Wrap with normalization, etc. if necessary */
if (original_props)
{
- val = apr_hash_get(original_props, SVN_PROP_EOL_STYLE,
- APR_HASH_KEY_STRING);
+ val = svn_hash_gets(original_props, SVN_PROP_EOL_STYLE);
if (val)
{
@@ -214,8 +211,7 @@ do_arbitrary_files_diff(const char *loca
if (modified_props)
{
- val = apr_hash_get(modified_props, SVN_PROP_EOL_STYLE,
- APR_HASH_KEY_STRING);
+ val = svn_hash_gets(modified_props, SVN_PROP_EOL_STYLE);
if (val)
{
@@ -472,13 +468,13 @@ arbitrary_diff_this_dir(struct arbitrary
if (strcmp(name, SVN_WC_ADM_DIR_NAME) == 0)
continue;
- dirent1 = apr_hash_get(dirents1, name, APR_HASH_KEY_STRING);
+ dirent1 = svn_hash_gets(dirents1, name);
if (!dirent1)
{
dirent1 = svn_io_dirent2_create(iterpool);
dirent1->kind = svn_node_none;
}
- dirent2 = apr_hash_get(dirents2, name, APR_HASH_KEY_STRING);
+ dirent2 = svn_hash_gets(dirents2, name);
if (!dirent2)
{
dirent2 = svn_io_dirent2_create(iterpool);
Modified: subversion/trunk/subversion/libsvn_client/diff_summarize.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff_summarize.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff_summarize.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff_summarize.c Sat Mar 23 14:58:26 2013
@@ -24,6 +24,7 @@
#include "svn_dirent_uri.h"
+#include "svn_hash.h"
#include "svn_props.h"
#include "svn_pools.h"
@@ -185,7 +186,7 @@ cb_dir_closed(svn_wc_notify_state_t *con
if (! svn_relpath_skip_ancestor(b->target, path))
return SVN_NO_ERROR;
- prop_change = apr_hash_get(b->prop_changes, path, APR_HASH_KEY_STRING) != NULL;
+ prop_change = svn_hash_gets(b->prop_changes, path) != NULL;
if (dir_was_added || prop_change)
SVN_ERR(send_summary(b, path,
dir_was_added ? svn_client_diff_summarize_kind_added
@@ -275,7 +276,7 @@ cb_dir_props_changed(svn_wc_notify_state
struct summarize_baton_t *b = diff_baton;
if (props_changed(propchanges, scratch_pool))
- apr_hash_set(b->prop_changes, path, APR_HASH_KEY_STRING, path);
+ svn_hash_sets(b->prop_changes, path, path);
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_client/export.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/export.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/export.c (original)
+++ subversion/trunk/subversion/libsvn_client/export.c Sat Mar 23 14:58:26 2013
@@ -34,6 +34,7 @@
#include "svn_string.h"
#include "svn_error.h"
#include "svn_dirent_uri.h"
+#include "svn_hash.h"
#include "svn_path.h"
#include "svn_pools.h"
#include "svn_subst.h"
@@ -68,9 +69,9 @@ add_externals(apr_hash_t *externals,
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
- apr_hash_set(externals, local_abspath, APR_HASH_KEY_STRING,
- apr_pstrmemdup(pool, externals_prop_val->data,
- externals_prop_val->len));
+ svn_hash_sets(externals, local_abspath,
+ apr_pstrmemdup(pool, externals_prop_val->data,
+ externals_prop_val->len));
return SVN_NO_ERROR;
}
@@ -338,8 +339,7 @@ export_node(void *baton,
}
/* We can early-exit if we're creating a special file. */
- special = apr_hash_get(props, SVN_PROP_SPECIAL,
- APR_HASH_KEY_STRING);
+ special = svn_hash_gets(props, SVN_PROP_SPECIAL);
if (special != NULL)
{
/* Create the destination as a special file, and copy the source
@@ -352,12 +352,9 @@ export_node(void *baton,
}
- eol_style = apr_hash_get(props, SVN_PROP_EOL_STYLE,
- APR_HASH_KEY_STRING);
- keywords = apr_hash_get(props, SVN_PROP_KEYWORDS,
- APR_HASH_KEY_STRING);
- executable = apr_hash_get(props, SVN_PROP_EXECUTABLE,
- APR_HASH_KEY_STRING);
+ eol_style = svn_hash_gets(props, SVN_PROP_EOL_STYLE);
+ keywords = svn_hash_gets(props, SVN_PROP_KEYWORDS);
+ executable = svn_hash_gets(props, SVN_PROP_EXECUTABLE);
if (eol_style)
SVN_ERR(get_eol_style(&style, &eol, eol_style->data, eib->native_eol));
@@ -954,30 +951,26 @@ add_file_ev2(void *baton,
apr_time_t date = 0;
/* Look at any properties for additional information. */
- if ( (val = apr_hash_get(props, SVN_PROP_EOL_STYLE, APR_HASH_KEY_STRING)) )
+ if ( (val = svn_hash_gets(props, SVN_PROP_EOL_STYLE)) )
eol_style_val = val;
- if ( !eb->ignore_keywords && (val = apr_hash_get(props, SVN_PROP_KEYWORDS,
- APR_HASH_KEY_STRING)) )
+ if ( !eb->ignore_keywords && (val = svn_hash_gets(props, SVN_PROP_KEYWORDS)) )
keywords_val = val;
- if ( (val = apr_hash_get(props, SVN_PROP_EXECUTABLE, APR_HASH_KEY_STRING)) )
+ if ( (val = svn_hash_gets(props, SVN_PROP_EXECUTABLE)) )
executable_val = val;
/* Try to fill out the baton's keywords-structure too. */
- if ( (val = apr_hash_get(props, SVN_PROP_ENTRY_COMMITTED_REV,
- APR_HASH_KEY_STRING)) )
+ if ( (val = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_REV)) )
revision = val->data;
- if ( (val = apr_hash_get(props, SVN_PROP_ENTRY_COMMITTED_DATE,
- APR_HASH_KEY_STRING)) )
+ if ( (val = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_DATE)) )
SVN_ERR(svn_time_from_cstring(&date, val->data, scratch_pool));
- if ( (val = apr_hash_get(props, SVN_PROP_ENTRY_LAST_AUTHOR,
- APR_HASH_KEY_STRING)) )
+ if ( (val = svn_hash_gets(props, SVN_PROP_ENTRY_LAST_AUTHOR)) )
author = val->data;
- if ( (val = apr_hash_get(props, SVN_PROP_SPECIAL, APR_HASH_KEY_STRING)) )
+ if ( (val = svn_hash_gets(props, SVN_PROP_SPECIAL)) )
special = TRUE;
if (special)
@@ -1081,7 +1074,7 @@ add_directory_ev2(void *baton,
_("'%s' already exists"),
svn_dirent_local_style(full_path, scratch_pool));
- if ( (val = apr_hash_get(props, SVN_PROP_EXTERNALS, APR_HASH_KEY_STRING)) )
+ if ( (val = svn_hash_gets(props, SVN_PROP_EXTERNALS)) )
SVN_ERR(add_externals(eb->externals, full_path, val));
if (eb->notify_func)
Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Sat Mar 23 14:58:26 2013
@@ -28,6 +28,7 @@
/*** Includes. ***/
#include <apr_uri.h>
+#include "svn_hash.h"
#include "svn_wc.h"
#include "svn_pools.h"
#include "svn_client.h"
@@ -358,9 +359,9 @@ switch_file_external(const char *local_a
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
- svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
- SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
+ svn_config_t *cfg = ctx->config
+ ? svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG)
+ : NULL;
svn_boolean_t use_commit_times;
const char *diff3_cmd;
const char *preserved_exts_str;
@@ -907,8 +908,7 @@ handle_externals_change(svn_client_ctx_t
iterpool));
}
- old_defining_abspath = apr_hash_get(old_externals, target_abspath,
- APR_HASH_KEY_STRING);
+ old_defining_abspath = svn_hash_gets(old_externals, target_abspath);
SVN_ERR(wrap_external_error(
ctx, target_abspath,
@@ -924,7 +924,7 @@ handle_externals_change(svn_client_ctx_t
/* And remove already processed items from the to-remove hash */
if (old_defining_abspath)
- apr_hash_set(old_externals, target_abspath, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(old_externals, target_abspath, NULL);
}
svn_pool_destroy(iterpool);
Modified: subversion/trunk/subversion/libsvn_client/import.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/import.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/import.c (original)
+++ subversion/trunk/subversion/libsvn_client/import.c Sat Mar 23 14:58:26 2013
@@ -117,7 +117,7 @@ send_file_contents(const char *local_abs
sizeof(SVN_PROP_EOL_STYLE) - 1);
keywords_val = apr_hash_get(properties, SVN_PROP_KEYWORDS,
sizeof(SVN_PROP_KEYWORDS) - 1);
- if (apr_hash_get(properties, SVN_PROP_SPECIAL, APR_HASH_KEY_STRING))
+ if (svn_hash_gets(properties, SVN_PROP_SPECIAL))
special = TRUE;
}
@@ -263,12 +263,11 @@ import_file(const svn_delta_editor_t *ed
send to the server. */
if (dirent->special)
{
- apr_hash_set(properties, SVN_PROP_SPECIAL, APR_HASH_KEY_STRING,
- svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool));
+ svn_hash_sets(properties, SVN_PROP_SPECIAL,
+ svn_string_create(SVN_PROP_BOOLEAN_TRUE, pool));
SVN_ERR(editor->change_file_prop(file_baton, SVN_PROP_SPECIAL,
- apr_hash_get(properties,
- SVN_PROP_SPECIAL,
- APR_HASH_KEY_STRING),
+ svn_hash_gets(properties,
+ SVN_PROP_SPECIAL),
pool));
}
@@ -342,26 +341,26 @@ get_filtered_children(apr_hash_t **child
(*ctx->notify_func2)(ctx->notify_baton2, notify, iterpool);
}
- apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(dirents, base_name, NULL);
continue;
}
/* If this is an excluded path, exclude it. */
- if (apr_hash_get(excludes, local_abspath, APR_HASH_KEY_STRING))
+ if (svn_hash_gets(excludes, local_abspath))
{
- apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(dirents, base_name, NULL);
continue;
}
if (ignores && svn_wc_match_ignore_list(base_name, ignores, iterpool))
{
- apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(dirents, base_name, NULL);
continue;
}
if (global_ignores &&
svn_wc_match_ignore_list(base_name, global_ignores, iterpool))
{
- apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(dirents, base_name, NULL);
continue;
}
@@ -374,7 +373,7 @@ get_filtered_children(apr_hash_t **child
if (filter)
{
- apr_hash_set(dirents, base_name, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(dirents, base_name, NULL);
continue;
}
}
@@ -840,7 +839,7 @@ svn_client_import5(const char *path,
{
const char *abs_path;
SVN_ERR(svn_dirent_get_absolute(&abs_path, tmp_file, scratch_pool));
- apr_hash_set(excludes, abs_path, APR_HASH_KEY_STRING, (void *)1);
+ svn_hash_sets(excludes, abs_path, (void *)1);
}
}
@@ -935,8 +934,7 @@ svn_client_import5(const char *path,
if (apr_hash_count(local_ignores_hash))
{
- svn_string_t *propval = apr_hash_get(local_ignores_hash, url,
- APR_HASH_KEY_STRING);
+ svn_string_t *propval = svn_hash_gets(local_ignores_hash, url);
if (propval)
{
svn_cstring_split_append(local_ignores_arr, propval->data,
Modified: subversion/trunk/subversion/libsvn_client/info.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/info.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/info.c (original)
+++ subversion/trunk/subversion/libsvn_client/info.c Sat Mar 23 14:58:26 2013
@@ -142,7 +142,7 @@ push_dir_info(svn_ra_session_t *ra_sessi
child_pathrev = svn_client__pathrev_join_relpath(pathrev, name, subpool);
fs_path = svn_client__pathrev_fspath(child_pathrev, subpool);
- lock = apr_hash_get(locks, fs_path, APR_HASH_KEY_STRING);
+ lock = svn_hash_gets(locks, fs_path);
SVN_ERR(build_info_from_dirent(&info, the_ent, lock, child_pathrev,
subpool));
Modified: subversion/trunk/subversion/libsvn_client/iprops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/iprops.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/iprops.c (original)
+++ subversion/trunk/subversion/libsvn_client/iprops.c Sat Mar 23 14:58:26 2013
@@ -28,6 +28,7 @@
/*** Includes. ***/
#include "svn_error.h"
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_wc.h"
#include "svn_ra.h"
@@ -154,7 +155,7 @@ get_inheritable_props(apr_hash_t **wcroo
an external, then svn_wc__get_cached_iprop_children won't return
LOCAL_ABSPATH in IPROPS_PATHS because the former has no cached iprops
yet. So make sure LOCAL_ABSPATH is present if it's a WC root. */
- if (!apr_hash_get(iprop_paths, local_abspath, APR_HASH_KEY_STRING))
+ if (!svn_hash_gets(iprop_paths, local_abspath))
{
svn_boolean_t needs_cached_iprops;
@@ -167,8 +168,7 @@ get_inheritable_props(apr_hash_t **wcroo
/* As value we set TARGET_ABSPATH, but any string besides ""
would do */
- apr_hash_set(iprop_paths, target_abspath,
- APR_HASH_KEY_STRING, target_abspath);
+ svn_hash_sets(iprop_paths, target_abspath, target_abspath);
}
}
@@ -217,10 +217,9 @@ get_inheritable_props(apr_hash_t **wcroo
continue;
}
- apr_hash_set(*wcroot_iprops,
- apr_pstrdup(result_pool, child_abspath),
- APR_HASH_KEY_STRING,
- inherited_props);
+ svn_hash_sets(*wcroot_iprops,
+ apr_pstrdup(result_pool, child_abspath),
+ inherited_props);
}
Modified: subversion/trunk/subversion/libsvn_client/list.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/list.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/list.c (original)
+++ subversion/trunk/subversion/libsvn_client/list.c Sat Mar 23 14:58:26 2013
@@ -23,6 +23,7 @@
#include "svn_client.h"
#include "svn_dirent_uri.h"
+#include "svn_hash.h"
#include "svn_path.h"
#include "svn_pools.h"
#include "svn_time.h"
@@ -129,18 +130,16 @@ get_dir_contents(apr_uint32_t dirent_fie
/* Filter out svn:externals from all properties hash. */
if (prop_hash)
- prop_val = apr_hash_get(prop_hash, SVN_PROP_EXTERNALS,
- APR_HASH_KEY_STRING);
+ prop_val = svn_hash_gets(prop_hash, SVN_PROP_EXTERNALS);
if (prop_val)
{
const char *url;
SVN_ERR(svn_ra_get_session_url(ra_session, &url, scratch_pool));
- apr_hash_set(externals, svn_path_url_add_component2(url, dir,
- result_pool),
- APR_HASH_KEY_STRING, svn_string_dup(prop_val,
- result_pool));
+ svn_hash_sets(externals,
+ svn_path_url_add_component2(url, dir, result_pool),
+ svn_string_dup(prop_val, result_pool));
}
if (ctx->cancel_func)
@@ -163,7 +162,7 @@ get_dir_contents(apr_uint32_t dirent_fie
if (locks)
{
const char *abs_path = svn_fspath__join(fs_path, path, iterpool);
- lock = apr_hash_get(locks, abs_path, APR_HASH_KEY_STRING);
+ lock = svn_hash_gets(locks, abs_path);
}
else
lock = NULL;
@@ -240,8 +239,7 @@ svn_client__ra_stat_compatible(svn_ra_se
NULL, "", rev, dirent_fields, subpool));
/* Get the relevant entry. */
- dirent = apr_hash_get(parent_ents, base_name,
- APR_HASH_KEY_STRING);
+ dirent = svn_hash_gets(parent_ents, base_name);
if (dirent)
*dirent_p = svn_dirent_dup(dirent, pool);
@@ -275,16 +273,14 @@ svn_client__ra_stat_compatible(svn_ra_se
SVN_ERR(svn_ra_rev_proplist(ra_session, rev, &props,
pool));
- val = apr_hash_get(props, SVN_PROP_REVISION_DATE,
- APR_HASH_KEY_STRING);
+ val = svn_hash_gets(props, SVN_PROP_REVISION_DATE);
if (val)
SVN_ERR(svn_time_from_cstring(&dirent->time, val->data,
pool));
else
dirent->time = 0;
- val = apr_hash_get(props, SVN_PROP_REVISION_AUTHOR,
- APR_HASH_KEY_STRING);
+ val = svn_hash_gets(props, SVN_PROP_REVISION_AUTHOR);
dirent->last_author = val ? val->data : NULL;
}
@@ -400,8 +396,7 @@ list_internal(const char *path_or_url,
/* Report the dirent for the target. */
SVN_ERR(list_func(baton, "", dirent, locks
- ? (apr_hash_get(locks, fs_path,
- APR_HASH_KEY_STRING))
+ ? (svn_hash_gets(locks, fs_path))
: NULL, fs_path, external_parent_url,
external_target, pool));
Modified: subversion/trunk/subversion/libsvn_client/locking_commands.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/locking_commands.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/locking_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/locking_commands.c Sat Mar 23 14:58:26 2013
@@ -28,6 +28,7 @@
/*** Includes. ***/
#include "svn_client.h"
+#include "svn_hash.h"
#include "client.h"
#include "svn_dirent_uri.h"
#include "svn_path.h"
@@ -88,8 +89,7 @@ store_locks_callback(void *baton,
if (lb->base_dir_abspath)
{
- char *path = apr_hash_get(lb->urls_to_paths, rel_url,
- APR_HASH_KEY_STRING);
+ char *path = svn_hash_gets(lb->urls_to_paths, rel_url);
const char *local_abspath;
local_abspath = svn_dirent_join(lb->base_dir_abspath, path, pool);
@@ -271,11 +271,11 @@ organize_lock_targets(const char **commo
lock token string (if the caller is unlocking). */
for (i = 0; i < rel_targets->nelts; i++)
{
- apr_hash_set(rel_targets_ret,
- APR_ARRAY_IDX(rel_targets, i, const char *),
- APR_HASH_KEY_STRING,
- do_lock ? (const void *)invalid_revnum
- : (const void *)"");
+ svn_hash_sets(rel_targets_ret,
+ APR_ARRAY_IDX(rel_targets, i, const char *),
+ do_lock
+ ? (const void *)invalid_revnum
+ : (const void *)"");
}
}
else
@@ -326,7 +326,7 @@ organize_lock_targets(const char **commo
svn_dirent_local_style(local_abspath,
iterpool));
- apr_hash_set(wc_info, local_abspath, APR_HASH_KEY_STRING, wli);
+ svn_hash_sets(wc_info, local_abspath, wli);
target_url = svn_path_url_add_component2(repos_root_url,
repos_relpath,
@@ -359,8 +359,8 @@ organize_lock_targets(const char **commo
COMMON_DIRENT). */
rel_target = APR_ARRAY_IDX(rel_targets, i, const char *);
rel_url = APR_ARRAY_IDX(rel_urls, i, const char *);
- apr_hash_set(rel_fs_paths, rel_url, APR_HASH_KEY_STRING,
- apr_pstrdup(result_pool, rel_target));
+ svn_hash_sets(rel_fs_paths, rel_url,
+ apr_pstrdup(result_pool, rel_target));
/* Then, we map our REL_URL (again) to either the base
revision of the dirent target with which it is associated
@@ -374,14 +374,13 @@ organize_lock_targets(const char **commo
struct wc_lock_item_t *wli;
revnum = apr_palloc(result_pool, sizeof(* revnum));
- wli = apr_hash_get(wc_info, local_abspath, APR_HASH_KEY_STRING);
+ wli = svn_hash_gets(wc_info, local_abspath);
SVN_ERR_ASSERT(wli != NULL);
*revnum = wli->revision;
- apr_hash_set(rel_targets_ret, rel_url,
- APR_HASH_KEY_STRING, revnum);
+ svn_hash_sets(rel_targets_ret, rel_url, revnum);
}
else /* Unlock. */
{
@@ -391,8 +390,7 @@ organize_lock_targets(const char **commo
/* If not forcing the unlock, get the lock token. */
if (! force)
{
- wli = apr_hash_get(wc_info, local_abspath,
- APR_HASH_KEY_STRING);
+ wli = svn_hash_gets(wc_info, local_abspath);
SVN_ERR_ASSERT(wli != NULL);
@@ -411,8 +409,8 @@ organize_lock_targets(const char **commo
lock_token = NULL;
/* If breaking a lock, we shouldn't pass any lock token. */
- apr_hash_set(rel_targets_ret, rel_url, APR_HASH_KEY_STRING,
- lock_token ? lock_token : "");
+ svn_hash_sets(rel_targets_ret, rel_url,
+ lock_token ? lock_token : "");
}
}
@@ -451,8 +449,7 @@ fetch_tokens(svn_ra_session_t *ra_sessio
(SVN_ERR_CLIENT_MISSING_LOCK_TOKEN, NULL,
_("'%s' is not locked"), path);
- apr_hash_set(path_tokens, path, APR_HASH_KEY_STRING,
- apr_pstrdup(pool, lock->token));
+ svn_hash_sets(path_tokens, path, apr_pstrdup(pool, lock->token));
}
svn_pool_destroy(iterpool);
Modified: subversion/trunk/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/log.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/log.c (original)
+++ subversion/trunk/subversion/libsvn_client/log.c Sat Mar 23 14:58:26 2013
@@ -32,6 +32,7 @@
#include "svn_compat.h"
#include "svn_error.h"
#include "svn_dirent_uri.h"
+#include "svn_hash.h"
#include "svn_path.h"
#include "svn_sorts.h"
#include "svn_props.h"
@@ -212,21 +213,18 @@ pre_15_receiver(void *baton, svn_log_ent
name, &value, pool));
if (log_entry->revprops == NULL)
log_entry->revprops = apr_hash_make(pool);
- apr_hash_set(log_entry->revprops, name, APR_HASH_KEY_STRING, value);
+ svn_hash_sets(log_entry->revprops, name, value);
}
if (log_entry->revprops)
{
/* Pre-1.5 servers send the standard revprops unconditionally;
clear those the caller doesn't want. */
if (!want_author)
- apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_AUTHOR,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(log_entry->revprops, SVN_PROP_REVISION_AUTHOR, NULL);
if (!want_date)
- apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_DATE,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(log_entry->revprops, SVN_PROP_REVISION_DATE, NULL);
if (!want_log)
- apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_LOG,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(log_entry->revprops, SVN_PROP_REVISION_LOG, NULL);
}
}
else
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Sat Mar 23 14:58:26 2013
@@ -9761,8 +9761,9 @@ do_merge(apr_hash_t **modified_subtrees,
depth = svn_depth_infinity;
/* Set up the diff3 command, so various callers don't have to. */
- cfg = ctx->config ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
+ cfg = ctx->config
+ ? svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG)
+ : NULL;
svn_config_get(cfg, &diff3_cmd, SVN_CONFIG_SECTION_HELPERS,
SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
Modified: subversion/trunk/subversion/libsvn_client/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/mergeinfo.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_client/mergeinfo.c Sat Mar 23 14:58:26 2013
@@ -405,9 +405,8 @@ svn_client__get_wc_mergeinfo_catalog(svn
if (mergeinfo)
{
*mergeinfo_cat = apr_hash_make(result_pool);
- apr_hash_set(*mergeinfo_cat,
- apr_pstrdup(result_pool, target_repos_relpath),
- APR_HASH_KEY_STRING, mergeinfo);
+ svn_hash_sets(*mergeinfo_cat,
+ apr_pstrdup(result_pool, target_repos_relpath), mergeinfo);
}
/* If LOCAL_ABSPATH is a directory and we want the subtree mergeinfo too,
@@ -451,8 +450,7 @@ svn_client__get_wc_mergeinfo_catalog(svn
if (*mergeinfo_cat == NULL)
*mergeinfo_cat = apr_hash_make(result_pool);
- apr_hash_set(*mergeinfo_cat, repos_relpath,
- APR_HASH_KEY_STRING, subtree_mergeinfo);
+ svn_hash_sets(*mergeinfo_cat, repos_relpath, subtree_mergeinfo);
}
}
@@ -657,8 +655,7 @@ svn_client__get_wc_or_repos_mergeinfo_ca
|| (inherit == svn_mergeinfo_explicit)
|| (repos_relpath
&& target_mergeinfo_cat_wc
- && apr_hash_get(target_mergeinfo_cat_wc, repos_relpath,
- APR_HASH_KEY_STRING))))
+ && svn_hash_gets(target_mergeinfo_cat_wc, repos_relpath))))
{
repos_only = TRUE;
/* We already have any subtree mergeinfo from the working copy, no
@@ -680,8 +677,7 @@ svn_client__get_wc_or_repos_mergeinfo_ca
SVN_ERR(svn_wc_get_pristine_props(&original_props,
ctx->wc_ctx, local_abspath,
result_pool, scratch_pool));
- if (!apr_hash_get(original_props, SVN_PROP_MERGEINFO,
- APR_HASH_KEY_STRING))
+ if (!svn_hash_gets(original_props, SVN_PROP_MERGEINFO))
{
apr_pool_t *sesspool = NULL;
@@ -700,9 +696,7 @@ svn_client__get_wc_or_repos_mergeinfo_ca
result_pool, scratch_pool));
if (target_mergeinfo_cat_repos
- && apr_hash_get(target_mergeinfo_cat_repos,
- repos_relpath,
- APR_HASH_KEY_STRING))
+ && svn_hash_gets(target_mergeinfo_cat_repos, repos_relpath))
{
if (inherited_p)
*inherited_p = TRUE;
@@ -1149,10 +1143,8 @@ svn_client__elide_mergeinfo_catalog(svn_
if (path_suffix)
{
SVN_ERR(should_elide_mergeinfo(&elides,
- apr_hash_get(mergeinfo_catalog, top,
- APR_HASH_KEY_STRING),
- apr_hash_get(mergeinfo_catalog, path,
- APR_HASH_KEY_STRING),
+ svn_hash_gets(mergeinfo_catalog, top),
+ svn_hash_gets(mergeinfo_catalog, path),
path_suffix,
iterpool));
@@ -1169,7 +1161,7 @@ svn_client__elide_mergeinfo_catalog(svn_
for (i = 0; i < elidable_paths->nelts; i++)
{
const char *path = APR_ARRAY_IDX(elidable_paths, i, const char *);
- apr_hash_set(mergeinfo_catalog, path, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(mergeinfo_catalog, path, NULL);
}
return SVN_NO_ERROR;
@@ -1402,8 +1394,8 @@ filter_log_entry_with_rangelist(void *ba
if (ancestor_is_self /* Explicit mergeinfo on TARGET_PATH_AFFECTED */
&& (change->action != 'M'))
{
- svn_rangelist_t *rangelist = apr_hash_get(
- nearest_ancestor_mergeinfo, path, APR_HASH_KEY_STRING);
+ svn_rangelist_t *rangelist =
+ svn_hash_gets(nearest_ancestor_mergeinfo, path);
svn_merge_range_t *youngest_range = APR_ARRAY_IDX(
rangelist, rangelist->nelts - 1, svn_merge_range_t *);
@@ -1597,10 +1589,10 @@ mergeinfo_relpaths_to_urls(apr_hash_t **
const char *key = svn__apr_hash_index_key(hi);
void *val = svn__apr_hash_index_val(hi);
- apr_hash_set(full_path_mergeinfo,
- svn_path_url_add_component2(repos_root_url, key + 1,
- result_pool),
- APR_HASH_KEY_STRING, val);
+ svn_hash_sets(full_path_mergeinfo,
+ svn_path_url_add_component2(repos_root_url, key + 1,
+ result_pool),
+ val);
}
*out_mergeinfo = full_path_mergeinfo;
}
@@ -1642,8 +1634,7 @@ svn_client_mergeinfo_get_merged(apr_hash
SVN_ERR_ASSERT(repos_relpath != NULL); /* Or get_mergeinfo failed */
}
- mergeinfo = apr_hash_get(mergeinfo_cat, repos_relpath,
- APR_HASH_KEY_STRING);
+ mergeinfo = svn_hash_gets(mergeinfo_cat, repos_relpath);
}
else
{
@@ -1760,10 +1751,8 @@ svn_client_mergeinfo_log2(svn_boolean_t
else
{
target_mergeinfo_cat = apr_hash_make(scratch_pool);
- apr_hash_set(target_mergeinfo_cat,
- target_repos_relpath,
- APR_HASH_KEY_STRING,
- apr_hash_make(scratch_pool));
+ svn_hash_sets(target_mergeinfo_cat, target_repos_relpath,
+ apr_hash_make(scratch_pool));
}
}
@@ -1933,18 +1922,17 @@ svn_client_mergeinfo_log2(svn_boolean_t
SVN_ERR(svn_rangelist__merge_many(subtree_merged_rangelist,
merged, scratch_pool, iterpool));
- apr_hash_set(inheritable_subtree_merges, subtree_path,
- APR_HASH_KEY_STRING, subtree_merged_rangelist);
+ svn_hash_sets(inheritable_subtree_merges, subtree_path,
+ subtree_merged_rangelist);
}
else
{
/* Map SUBTREE_PATH to an empty rangelist if there was nothing
fully merged. e.g. Only empty or non-inheritable mergeinfo
on the subtree or mergeinfo unrelated to the source. */
- apr_hash_set(inheritable_subtree_merges, subtree_path,
- APR_HASH_KEY_STRING,
- apr_array_make(scratch_pool, 0,
- sizeof(svn_merge_range_t *)));
+ svn_hash_sets(inheritable_subtree_merges, subtree_path,
+ apr_array_make(scratch_pool, 0,
+ sizeof(svn_merge_range_t *)));
}
}
Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Sat Mar 23 14:58:26 2013
@@ -313,8 +313,7 @@ obtain_eol_and_keywords_for_file(apr_has
SVN_ERR(svn_wc_prop_list2(&props, wc_ctx, local_abspath,
scratch_pool, scratch_pool));
- keywords_val = apr_hash_get(props, SVN_PROP_KEYWORDS,
- APR_HASH_KEY_STRING);
+ keywords_val = svn_hash_gets(props, SVN_PROP_KEYWORDS);
if (keywords_val)
{
svn_revnum_t changed_rev;
@@ -339,8 +338,7 @@ obtain_eol_and_keywords_for_file(apr_has
author, result_pool));
}
- eol_style_val = apr_hash_get(props, SVN_PROP_EOL_STYLE,
- APR_HASH_KEY_STRING);
+ eol_style_val = svn_hash_gets(props, SVN_PROP_EOL_STYLE);
if (eol_style_val)
{
svn_subst_eol_style_from_value(eol_style,
@@ -1143,8 +1141,7 @@ init_patch_target(patch_target_t **patch
prop_patch->operation,
wc_ctx, target->local_abspath,
result_pool, scratch_pool));
- apr_hash_set(target->prop_targets, prop_name,
- APR_HASH_KEY_STRING, prop_target);
+ svn_hash_sets(target->prop_targets, prop_name, prop_target);
}
}
}
@@ -2188,8 +2185,7 @@ apply_one_patch(patch_target_t **patch_t
target->is_special = TRUE;
/* We'll store matched hunks in prop_content. */
- prop_target = apr_hash_get(target->prop_targets, prop_name,
- APR_HASH_KEY_STRING);
+ prop_target = svn_hash_gets(target->prop_targets, prop_name);
for (i = 0; i < prop_patch->hunks->nelts; i++)
{
Modified: subversion/trunk/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/prop_commands.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/trunk/subversion/libsvn_client/prop_commands.c Sat Mar 23 14:58:26 2013
@@ -88,7 +88,7 @@ get_file_for_validation(const svn_string
pool));
if (mime_type)
- *mime_type = apr_hash_get(props, SVN_PROP_MIME_TYPE, APR_HASH_KEY_STRING);
+ *mime_type = svn_hash_gets(props, SVN_PROP_MIME_TYPE);
return SVN_NO_ERROR;
}
@@ -612,8 +612,7 @@ remote_propget(apr_hash_t *props,
{
svn_prop_inherited_item_t *iprop =
APR_ARRAY_IDX((*inherited_props), i, svn_prop_inherited_item_t *);
- svn_string_t *iprop_val = apr_hash_get(iprop->prop_hash, propname,
- APR_HASH_KEY_STRING);
+ svn_string_t *iprop_val = svn_hash_gets(iprop->prop_hash, propname);
if (iprop_val)
{
@@ -622,10 +621,9 @@ remote_propget(apr_hash_t *props,
new_iprop->path_or_url =
apr_pstrdup(result_pool, iprop->path_or_url);
new_iprop->prop_hash = apr_hash_make(result_pool);
- apr_hash_set(new_iprop->prop_hash,
- apr_pstrdup(result_pool, propname),
- APR_HASH_KEY_STRING,
- svn_string_dup(iprop_val, result_pool));
+ svn_hash_sets(new_iprop->prop_hash,
+ apr_pstrdup(result_pool, propname),
+ svn_string_dup(iprop_val, result_pool));
APR_ARRAY_PUSH(final_iprops, svn_prop_inherited_item_t *) =
new_iprop;
}
@@ -634,10 +632,11 @@ remote_propget(apr_hash_t *props,
}
if (prop_hash
- && (val = apr_hash_get(prop_hash, propname, APR_HASH_KEY_STRING)))
+ && (val = svn_hash_gets(prop_hash, propname)))
{
- apr_hash_set(props, apr_pstrdup(result_pool, target_full_url),
- APR_HASH_KEY_STRING, svn_string_dup(val, result_pool));
+ svn_hash_sets(props,
+ apr_pstrdup(result_pool, target_full_url),
+ svn_string_dup(val, result_pool));
}
if (depth >= svn_depth_files
@@ -704,9 +703,8 @@ recursive_propget_receiver(void *baton,
if (apr_hash_count(props))
{
apr_hash_index_t *hi = apr_hash_first(scratch_pool, props);
- apr_hash_set(b->props, apr_pstrdup(b->pool, local_abspath),
- APR_HASH_KEY_STRING,
- svn_string_dup(svn__apr_hash_index_val(hi), b->pool));
+ svn_hash_sets(b->props, apr_pstrdup(b->pool, local_abspath),
+ svn_string_dup(svn__apr_hash_index_val(hi), b->pool));
}
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/ra.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/ra.c (original)
+++ subversion/trunk/subversion/libsvn_client/ra.c Sat Mar 23 14:58:26 2013
@@ -26,6 +26,7 @@
#include <apr_pools.h>
#include "svn_error.h"
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_string.h"
#include "svn_sorts.h"
@@ -409,13 +410,13 @@ svn_client__open_ra_session_internal(svn
*corrected_url = corrected;
/* Make sure we've not attempted this URL before. */
- if (apr_hash_get(attempted, corrected, APR_HASH_KEY_STRING))
+ if (svn_hash_gets(attempted, corrected))
return svn_error_createf(SVN_ERR_CLIENT_CYCLE_DETECTED, NULL,
_("Redirect cycle detected for URL '%s'"),
corrected);
/* Remember this CORRECTED_URL so we don't wind up in a loop. */
- apr_hash_set(attempted, corrected, APR_HASH_KEY_STRING, (void *)1);
+ svn_hash_sets(attempted, corrected, (void *)1);
base_url = corrected;
}
}
@@ -1052,8 +1053,7 @@ svn_client__ra_provide_base(svn_stream_t
const char *local_abspath;
svn_error_t *err;
- local_abspath = apr_hash_get(reb->relpath_map, repos_relpath,
- APR_HASH_KEY_STRING);
+ local_abspath = svn_hash_gets(reb->relpath_map, repos_relpath);
if (!local_abspath)
{
*contents = NULL;
@@ -1097,8 +1097,7 @@ svn_client__ra_provide_props(apr_hash_t
const char *local_abspath;
svn_error_t *err;
- local_abspath = apr_hash_get(reb->relpath_map, repos_relpath,
- APR_HASH_KEY_STRING);
+ local_abspath = svn_hash_gets(reb->relpath_map, repos_relpath);
if (!local_abspath)
{
*props = NULL;
@@ -1140,8 +1139,7 @@ svn_client__ra_get_copysrc_kind(svn_node
struct ra_ev2_baton *reb = baton;
const char *local_abspath;
- local_abspath = apr_hash_get(reb->relpath_map, repos_relpath,
- APR_HASH_KEY_STRING);
+ local_abspath = svn_hash_gets(reb->relpath_map, repos_relpath);
if (!local_abspath)
{
*kind = svn_node_unknown;
Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/repos_diff.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/repos_diff.c Sat Mar 23 14:58:26 2013
@@ -395,9 +395,8 @@ remove_non_prop_changes(apr_hash_t *pris
if (change->value)
{
- const svn_string_t *old_val = apr_hash_get(pristine_props,
- change->name,
- APR_HASH_KEY_STRING);
+ const svn_string_t *old_val = svn_hash_gets(pristine_props,
+ change->name);
if (old_val && svn_string_compare(old_val, change->value))
{
Modified: subversion/trunk/subversion/libsvn_client/revert.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/revert.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/revert.c (original)
+++ subversion/trunk/subversion/libsvn_client/revert.c Sat Mar 23 14:58:26 2013
@@ -31,6 +31,7 @@
#include "svn_wc.h"
#include "svn_client.h"
#include "svn_dirent_uri.h"
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_error.h"
#include "svn_time.h"
@@ -135,8 +136,9 @@ svn_client_revert2(const apr_array_heade
_("'%s' is not a local path"), path);
}
- cfg = ctx->config ? apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
+ cfg = ctx->config
+ ? svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG)
+ : NULL;
SVN_ERR(svn_config_get_bool(cfg, &use_commit_times,
SVN_CONFIG_SECTION_MISCELLANY,
Modified: subversion/trunk/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/status.c (original)
+++ subversion/trunk/subversion/libsvn_client/status.c Sat Mar 23 14:58:26 2013
@@ -87,8 +87,7 @@ tweak_status(void *baton,
transmission. */
if (sb->changelist_hash
&& (! status->changelist
- || ! apr_hash_get(sb->changelist_hash, status->changelist,
- APR_HASH_KEY_STRING)))
+ || ! svn_hash_gets(sb->changelist_hash, status->changelist)))
{
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/switch.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/switch.c (original)
+++ subversion/trunk/subversion/libsvn_client/switch.c Sat Mar 23 14:58:26 2013
@@ -29,6 +29,7 @@
#include "svn_client.h"
#include "svn_error.h"
+#include "svn_hash.h"
#include "svn_time.h"
#include "svn_dirent_uri.h"
#include "svn_path.h"
@@ -90,10 +91,9 @@ switch_internal(svn_revnum_t *result_rev
apr_array_header_t *preserved_exts;
svn_boolean_t server_supports_depth;
struct svn_client__dirent_fetcher_baton_t dfb;
- svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
- SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING)
- : NULL;
+ svn_config_t *cfg = ctx->config
+ ? svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG)
+ : NULL;
/* An unknown depth can't be sticky. */
if (depth == svn_depth_unknown)
@@ -269,8 +269,7 @@ switch_internal(svn_revnum_t *result_rev
SVN_ERR(svn_ra_get_inherited_props(ra_session, &inherited_props,
"", switch_loc->rev, pool,
pool));
- apr_hash_set(wcroot_iprops, local_abspath, APR_HASH_KEY_STRING,
- inherited_props);
+ svn_hash_sets(wcroot_iprops, local_abspath, inherited_props);
}
}
Modified: subversion/trunk/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/update.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/update.c (original)
+++ subversion/trunk/subversion/libsvn_client/update.c Sat Mar 23 14:58:26 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_wc.h"
#include "svn_client.h"
#include "svn_error.h"
@@ -213,9 +214,9 @@ update_internal(svn_revnum_t *result_rev
svn_boolean_t server_supports_depth;
svn_boolean_t cropping_target;
svn_boolean_t target_conflicted = FALSE;
- svn_config_t *cfg = ctx->config ? apr_hash_get(ctx->config,
- SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
+ svn_config_t *cfg = ctx->config
+ ? svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG)
+ : NULL;
if (result_rev)
*result_rev = SVN_INVALID_REVNUM;
Modified: subversion/trunk/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/util.c?rev=1460168&r1=1460167&r2=1460168&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/util.c (original)
+++ subversion/trunk/subversion/libsvn_client/util.c Sat Mar 23 14:58:26 2013
@@ -24,6 +24,7 @@
#include <apr_pools.h>
#include <apr_strings.h>
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_error.h"
#include "svn_types.h"
@@ -349,7 +350,7 @@ fetch_props_func(apr_hash_t **props,
struct shim_callbacks_baton *scb = baton;
const char *local_abspath;
- local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
+ local_abspath = svn_hash_gets(scb->relpath_map, path);
if (!local_abspath)
{
*props = apr_hash_make(result_pool);
@@ -376,7 +377,7 @@ fetch_kind_func(svn_node_kind_t *kind,
struct shim_callbacks_baton *scb = baton;
const char *local_abspath;
- local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
+ local_abspath = svn_hash_gets(scb->relpath_map, path);
if (!local_abspath)
{
*kind = svn_node_unknown;
@@ -403,7 +404,7 @@ fetch_base_func(const char **filename,
svn_stream_t *temp_stream;
svn_error_t *err;
- local_abspath = apr_hash_get(scb->relpath_map, path, APR_HASH_KEY_STRING);
+ local_abspath = svn_hash_gets(scb->relpath_map, path);
if (!local_abspath)
{
*filename = NULL;