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 16:44:38 UTC
svn commit: r1460176 [2/3] - in /subversion/trunk/subversion:
bindings/swig/perl/libsvn_swig_perl/ bindings/swig/python/libsvn_swig_py/
bindings/swig/ruby/libsvn_swig_ruby/ libsvn_auth_gnome_keyring/
libsvn_client/ libsvn_delta/ libsvn_diff/ libsvn_fs/...
Modified: subversion/trunk/subversion/libsvn_ra_serf/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/merge.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/merge.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/merge.c Sat Mar 23 15:44:36 2013
@@ -27,6 +27,7 @@
#include <serf.h>
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_ra.h"
#include "svn_dav.h"
@@ -160,7 +161,7 @@ merge_closed(svn_ra_serf__xml_estate_t *
{
const char *rtype;
- rtype = apr_hash_get(attrs, "resourcetype", APR_HASH_KEY_STRING);
+ rtype = svn_hash_gets(attrs, "resourcetype");
/* rtype can only be "baseline" or "collection" (or NULL). We can
keep this check simple. */
@@ -168,7 +169,7 @@ merge_closed(svn_ra_serf__xml_estate_t *
{
const char *rev_str;
- rev_str = apr_hash_get(attrs, "revision", APR_HASH_KEY_STRING);
+ rev_str = svn_hash_gets(attrs, "revision");
if (rev_str)
merge_ctx->commit_info->revision = SVN_STR_TO_REV(rev_str);
else
@@ -176,16 +177,15 @@ merge_closed(svn_ra_serf__xml_estate_t *
merge_ctx->commit_info->date =
apr_pstrdup(merge_ctx->pool,
- apr_hash_get(attrs, "date", APR_HASH_KEY_STRING));
+ svn_hash_gets(attrs, "date"));
merge_ctx->commit_info->author =
apr_pstrdup(merge_ctx->pool,
- apr_hash_get(attrs, "author", APR_HASH_KEY_STRING));
+ svn_hash_gets(attrs, "author"));
merge_ctx->commit_info->post_commit_err =
apr_pstrdup(merge_ctx->pool,
- apr_hash_get(attrs,
- "post-commit-err", APR_HASH_KEY_STRING));
+ svn_hash_gets(attrs, "post-commit-err"));
}
else
{
@@ -193,7 +193,7 @@ merge_closed(svn_ra_serf__xml_estate_t *
href = svn_urlpath__skip_ancestor(
merge_ctx->merge_url,
- apr_hash_get(attrs, "href", APR_HASH_KEY_STRING));
+ svn_hash_gets(attrs, "href"));
if (href == NULL)
return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
@@ -209,8 +209,7 @@ merge_closed(svn_ra_serf__xml_estate_t *
const char *checked_in;
svn_string_t checked_in_str;
- checked_in = apr_hash_get(attrs,
- "checked-in", APR_HASH_KEY_STRING);
+ checked_in = svn_hash_gets(attrs, "checked-in");
checked_in_str.data = checked_in;
checked_in_str.len = strlen(checked_in);
Modified: subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/mergeinfo.c Sat Mar 23 15:44:36 2013
@@ -24,6 +24,7 @@
#include <apr_tables.h>
#include <apr_xml.h>
+#include "svn_hash.h"
#include "svn_mergeinfo.h"
#include "svn_path.h"
#include "svn_ra.h"
@@ -93,8 +94,8 @@ mergeinfo_closed(svn_ra_serf__xml_estate
if (leaving_state == MERGEINFO_ITEM)
{
/* Placed here from the child elements. */
- const char *path = apr_hash_get(attrs, "path", APR_HASH_KEY_STRING);
- const char *info = apr_hash_get(attrs, "info", APR_HASH_KEY_STRING);
+ const char *path = svn_hash_gets(attrs, "path");
+ const char *info = svn_hash_gets(attrs, "info");
if (path != NULL && info != NULL)
{
@@ -108,10 +109,9 @@ mergeinfo_closed(svn_ra_serf__xml_estate
SVN_ERR(svn_mergeinfo_parse(&path_mergeinfo, info,
mergeinfo_ctx->pool));
- apr_hash_set(mergeinfo_ctx->result_catalog,
- apr_pstrdup(mergeinfo_ctx->pool, path),
- APR_HASH_KEY_STRING,
- path_mergeinfo);
+ svn_hash_sets(mergeinfo_ctx->result_catalog,
+ apr_pstrdup(mergeinfo_ctx->pool, path),
+ path_mergeinfo);
}
}
else
Modified: subversion/trunk/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/options.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/options.c Sat Mar 23 15:44:36 2013
@@ -177,7 +177,8 @@ capabilities_headers_iterator_callback(v
{
/* The server doesn't know what repository we're referring
to, so it can't just say capability_yes. */
- if (!svn_hash_gets(session->capabilities, SVN_RA_CAPABILITY_MERGEINFO))
+ if (!svn_hash_gets(session->capabilities,
+ SVN_RA_CAPABILITY_MERGEINFO))
{
svn_hash_sets(session->capabilities, SVN_RA_CAPABILITY_MERGEINFO,
capability_server_yes);
@@ -532,17 +533,14 @@ svn_ra_serf__has_capability(svn_ra_sessi
return SVN_NO_ERROR;
}
- cap_result = apr_hash_get(serf_sess->capabilities,
- capability,
- APR_HASH_KEY_STRING);
+ cap_result = svn_hash_gets(serf_sess->capabilities, capability);
/* If any capability is unknown, they're all unknown, so ask. */
if (cap_result == NULL)
SVN_ERR(svn_ra_serf__exchange_capabilities(serf_sess, NULL, pool));
/* Try again, now that we've fetched the capabilities. */
- cap_result = apr_hash_get(serf_sess->capabilities,
- capability, APR_HASH_KEY_STRING);
+ cap_result = svn_hash_gets(serf_sess->capabilities, capability);
/* Some capabilities depend on the repository as well as the server. */
if (cap_result == capability_server_yes)
Modified: subversion/trunk/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/property.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/property.c Sat Mar 23 15:44:36 2013
@@ -25,6 +25,7 @@
#include <serf.h>
+#include "svn_hash.h"
#include "svn_path.h"
#include "svn_base64.h"
#include "svn_xml.h"
@@ -262,8 +263,7 @@ propfind_closed(svn_ra_serf__xml_estate_
}
else if (leaving_state == PROPVAL)
{
- const char *encoding = apr_hash_get(attrs, "V:encoding",
- APR_HASH_KEY_STRING);
+ const char *encoding = svn_hash_gets(attrs, "V:encoding");
const svn_string_t *val_str;
apr_hash_t *gathered;
const char *path;
@@ -303,15 +303,15 @@ propfind_closed(svn_ra_serf__xml_estate_
gathered = svn_ra_serf__xml_gather_since(xes, RESPONSE);
/* These will be dup'd into CTX->POOL, as necessary. */
- path = apr_hash_get(gathered, "path", APR_HASH_KEY_STRING);
+ path = svn_hash_gets(gathered, "path");
if (path == NULL)
path = ctx->path;
- ns = apr_hash_get(attrs, "ns", APR_HASH_KEY_STRING);
+ ns = svn_hash_gets(attrs, "ns");
name = apr_pstrdup(ctx->pool,
- apr_hash_get(attrs, "name", APR_HASH_KEY_STRING));
+ svn_hash_gets(attrs, "name"));
- altvalue = apr_hash_get(attrs, "altvalue", APR_HASH_KEY_STRING);
+ altvalue = svn_hash_gets(attrs, "altvalue");
if (altvalue != NULL)
val_str = svn_string_create(altvalue, ctx->pool);
@@ -330,7 +330,7 @@ propfind_closed(svn_ra_serf__xml_estate_
/* If we've squirreled away a note that says we want to ignore
these properties, we'll do so. Otherwise, we need to copy
them from the temporary hash into the ctx->ret_props hash. */
- if (! apr_hash_get(gathered, "ignore-prop", APR_HASH_KEY_STRING))
+ if (! svn_hash_gets(gathered, "ignore-prop"))
{
SVN_ERR(svn_ra_serf__walk_all_paths(ctx->ps_props, ctx->rev,
copy_into_ret_props, ctx,
@@ -357,14 +357,14 @@ svn_ra_serf__get_ver_prop_string(apr_has
ver_props = apr_hash_get(props, &rev, sizeof(rev));
if (ver_props)
{
- path_props = apr_hash_get(ver_props, path, APR_HASH_KEY_STRING);
+ path_props = svn_hash_gets(ver_props, path);
if (path_props)
{
- ns_props = apr_hash_get(path_props, ns, APR_HASH_KEY_STRING);
+ ns_props = svn_hash_gets(path_props, ns);
if (ns_props)
{
- val = apr_hash_get(ns_props, name, APR_HASH_KEY_STRING);
+ val = svn_hash_gets(ns_props, name);
}
}
}
@@ -426,28 +426,28 @@ svn_ra_serf__set_ver_prop(apr_hash_t *pr
ver_props);
}
- path_props = apr_hash_get(ver_props, path, APR_HASH_KEY_STRING);
+ path_props = svn_hash_gets(ver_props, path);
if (!path_props)
{
path_props = apr_hash_make(pool);
path = apr_pstrdup(pool, path);
- apr_hash_set(ver_props, path, APR_HASH_KEY_STRING, path_props);
+ svn_hash_sets(ver_props, path, path_props);
/* todo: we know that we'll fail the next check, but fall through
* for now for simplicity's sake.
*/
}
- ns_props = apr_hash_get(path_props, ns, APR_HASH_KEY_STRING);
+ ns_props = svn_hash_gets(path_props, ns);
if (!ns_props)
{
ns_props = apr_hash_make(pool);
ns = apr_pstrdup(pool, ns);
- apr_hash_set(path_props, ns, APR_HASH_KEY_STRING, ns_props);
+ svn_hash_sets(path_props, ns, ns_props);
}
- apr_hash_set(ns_props, name, APR_HASH_KEY_STRING, val);
+ svn_hash_sets(ns_props, name, val);
}
void
@@ -691,7 +691,7 @@ svn_ra_serf__fetch_node_props(apr_hash_t
ver_props = apr_hash_get(multiprops, &revision, sizeof(revision));
if (ver_props != NULL)
{
- *results = apr_hash_get(ver_props, url, APR_HASH_KEY_STRING);
+ *results = svn_hash_gets(ver_props, url);
if (*results != NULL)
return SVN_NO_ERROR;
}
@@ -760,7 +760,7 @@ svn_ra_serf__walk_all_props(apr_hash_t *
if (!ver_props)
return SVN_NO_ERROR;
- path_props = apr_hash_get(ver_props, name, APR_HASH_KEY_STRING);
+ path_props = svn_hash_gets(ver_props, name);
if (!path_props)
return SVN_NO_ERROR;
@@ -883,7 +883,7 @@ set_flat_props(void *baton,
prop_name = svn_ra_serf__svnname_from_wirename(ns, name, result_pool);
if (prop_name != NULL)
- apr_hash_set(props, prop_name, APR_HASH_KEY_STRING, value);
+ svn_hash_sets(props, prop_name, value);
return SVN_NO_ERROR;
}
@@ -933,7 +933,7 @@ select_revprops(void *baton,
return SVN_NO_ERROR;
}
- apr_hash_set(revprops, prop_name, APR_HASH_KEY_STRING, val);
+ svn_hash_sets(revprops, prop_name, val);
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/serf.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/serf.c Sat Mar 23 15:44:36 2013
@@ -151,10 +151,8 @@ load_config(svn_ra_serf__session_t *sess
if (config_hash)
{
- config = apr_hash_get(config_hash, SVN_CONFIG_CATEGORY_SERVERS,
- APR_HASH_KEY_STRING);
- config_client = apr_hash_get(config_hash, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING);
+ config = svn_hash_gets(config_hash, SVN_CONFIG_CATEGORY_SERVERS);
+ config_client = svn_hash_gets(config_hash, SVN_CONFIG_CATEGORY_CONFIG);
}
else
{
@@ -609,7 +607,7 @@ svn_ra_serf__rev_prop(svn_ra_session_t *
SVN_ERR(svn_ra_serf__rev_proplist(session, rev, &props, pool));
- *value = apr_hash_get(props, name, APR_HASH_KEY_STRING);
+ *value = svn_hash_gets(props, name);
return SVN_NO_ERROR;
}
@@ -806,7 +804,7 @@ path_dirent_walker(void *baton,
base_name = svn_path_uri_decode(svn_urlpath__basename(path, pool),
pool);
- apr_hash_set(dirents->base_paths, base_name, APR_HASH_KEY_STRING, entry);
+ svn_hash_sets(dirents->base_paths, base_name, entry);
}
dwb.entry = entry;
Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Sat Mar 23 15:44:36 2013
@@ -31,6 +31,7 @@
#include <serf.h>
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_ra.h"
#include "svn_dav.h"
@@ -471,7 +472,7 @@ update_closed(svn_ra_serf__xml_estate_t
if (leaving_state == TARGET_REVISION)
{
- const char *rev = apr_hash_get(attrs, "rev", APR_HASH_KEY_STRING);
+ const char *rev = svn_hash_gets(attrs, "rev");
SVN_ERR(ctx->update_editor->set_target_revision(ctx->update_baton,
SVN_STR_TO_REV(rev),
@@ -1687,8 +1688,7 @@ start_report(svn_ra_serf__xml_parser_t *
info->base_name = info->dir->base_name;
info->name = info->dir->name;
- info->dir->repos_relpath = apr_hash_get(ctx->switched_paths, "",
- APR_HASH_KEY_STRING);
+ info->dir->repos_relpath = svn_hash_gets(ctx->switched_paths, "");
if (!info->dir->repos_relpath)
SVN_ERR(svn_ra_serf__get_relative_path(&info->dir->repos_relpath,
@@ -1742,8 +1742,7 @@ start_report(svn_ra_serf__xml_parser_t *
dir->pool);
info->name = dir->name;
- dir->repos_relpath = apr_hash_get(ctx->switched_paths, dir->name,
- APR_HASH_KEY_STRING);
+ dir->repos_relpath = svn_hash_gets(ctx->switched_paths, dir->name);
if (!dir->repos_relpath)
dir->repos_relpath = svn_relpath_join(dir->parent_dir->repos_relpath,
@@ -2247,8 +2246,7 @@ end_report(svn_ra_serf__xml_parser_t *pa
info->pool);
}
- info->lock_token = apr_hash_get(ctx->lock_path_tokens, info->name,
- APR_HASH_KEY_STRING);
+ info->lock_token = svn_hash_gets(ctx->lock_path_tokens, info->name);
if (info->lock_token && !info->fetch_props)
info->fetch_props = TRUE;
@@ -2267,8 +2265,7 @@ end_report(svn_ra_serf__xml_parser_t *pa
/* If this file is switched vs the editor root we should provide
its real url instead of the one calculated from the session root.
*/
- repos_relpath = apr_hash_get(ctx->switched_paths, info->name,
- APR_HASH_KEY_STRING);
+ repos_relpath = svn_hash_gets(ctx->switched_paths, info->name);
if (!repos_relpath)
{
@@ -2279,8 +2276,7 @@ end_report(svn_ra_serf__xml_parser_t *pa
SVN_ERR_ASSERT(*svn_relpath_dirname(info->name, info->pool)
== '\0');
- repos_relpath = apr_hash_get(ctx->switched_paths, "",
- APR_HASH_KEY_STRING);
+ repos_relpath = svn_hash_gets(ctx->switched_paths, "");
}
else
repos_relpath = svn_relpath_join(info->dir->repos_relpath,
@@ -2582,10 +2578,9 @@ set_path(void *report_baton,
if (lock_token)
{
- apr_hash_set(report->lock_path_tokens,
- apr_pstrdup(report->pool, path),
- APR_HASH_KEY_STRING,
- apr_pstrdup(report->pool, lock_token));
+ svn_hash_sets(report->lock_path_tokens,
+ apr_pstrdup(report->pool, path),
+ apr_pstrdup(report->pool, lock_token));
}
return SVN_NO_ERROR;
@@ -2657,16 +2652,16 @@ link_path(void *report_baton,
/* Store the switch roots to allow generating repos_relpaths from just
the working copy paths. (Needed for HTTPv2) */
path = apr_pstrdup(report->pool, path);
- apr_hash_set(report->switched_paths, path, APR_HASH_KEY_STRING,
- apr_pstrdup(report->pool, link+1));
+ svn_hash_sets(report->switched_paths,
+ path, apr_pstrdup(report->pool, link + 1));
if (!*path)
report->root_is_switched = TRUE;
if (lock_token)
{
- apr_hash_set(report->lock_path_tokens, path, APR_HASH_KEY_STRING,
- apr_pstrdup(report->pool, lock_token));
+ svn_hash_sets(report->lock_path_tokens,
+ path, apr_pstrdup(report->pool, lock_token));
}
return APR_SUCCESS;
@@ -3455,7 +3450,7 @@ try_get_wc_contents(svn_boolean_t *found
}
- svn_props = apr_hash_get(props, SVN_DAV_PROP_NS_DAV, APR_HASH_KEY_STRING);
+ svn_props = svn_hash_gets(props, SVN_DAV_PROP_NS_DAV);
if (!svn_props)
{
/* No properties -- therefore no checksum property -- in response. */
Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Sat Mar 23 15:44:36 2013
@@ -35,6 +35,7 @@
#include <expat.h>
+#include "svn_hash.h"
#include "svn_dirent_uri.h"
#include "svn_path.h"
#include "svn_private_config.h"
@@ -191,12 +192,12 @@ static char *
convert_organisation_to_str(apr_hash_t *org, apr_pool_t *pool)
{
return apr_psprintf(pool, "%s, %s, %s, %s, %s (%s)",
- (char*)apr_hash_get(org, "OU", APR_HASH_KEY_STRING),
- (char*)apr_hash_get(org, "O", APR_HASH_KEY_STRING),
- (char*)apr_hash_get(org, "L", APR_HASH_KEY_STRING),
- (char*)apr_hash_get(org, "ST", APR_HASH_KEY_STRING),
- (char*)apr_hash_get(org, "C", APR_HASH_KEY_STRING),
- (char*)apr_hash_get(org, "E", APR_HASH_KEY_STRING));
+ (char*)svn_hash_gets(org, "OU"),
+ (char*)svn_hash_gets(org, "O"),
+ (char*)svn_hash_gets(org, "L"),
+ (char*)svn_hash_gets(org, "ST"),
+ (char*)svn_hash_gets(org, "C"),
+ (char*)svn_hash_gets(org, "E"));
}
/* This function is called on receiving a ssl certificate of a server when
@@ -234,17 +235,15 @@ ssl_server_cert(void *baton, int failure
issuer = serf_ssl_cert_issuer(cert, scratch_pool);
serf_cert = serf_ssl_cert_certificate(cert, scratch_pool);
- cert_info.hostname = apr_hash_get(subject, "CN", APR_HASH_KEY_STRING);
- san = apr_hash_get(serf_cert, "subjectAltName", APR_HASH_KEY_STRING);
- cert_info.fingerprint = apr_hash_get(serf_cert, "sha1", APR_HASH_KEY_STRING);
+ cert_info.hostname = svn_hash_gets(subject, "CN");
+ san = svn_hash_gets(serf_cert, "subjectAltName");
+ cert_info.fingerprint = svn_hash_gets(serf_cert, "sha1");
if (! cert_info.fingerprint)
cert_info.fingerprint = apr_pstrdup(scratch_pool, "<unknown>");
- cert_info.valid_from = apr_hash_get(serf_cert, "notBefore",
- APR_HASH_KEY_STRING);
+ cert_info.valid_from = svn_hash_gets(serf_cert, "notBefore");
if (! cert_info.valid_from)
cert_info.valid_from = apr_pstrdup(scratch_pool, "[invalid date]");
- cert_info.valid_until = apr_hash_get(serf_cert, "notAfter",
- APR_HASH_KEY_STRING);
+ cert_info.valid_until = svn_hash_gets(serf_cert, "notAfter");
if (! cert_info.valid_until)
cert_info.valid_until = apr_pstrdup(scratch_pool, "[invalid date]");
cert_info.issuer_dname = convert_organisation_to_str(issuer, scratch_pool);
@@ -2266,8 +2265,7 @@ svn_ra_serf__discover_vcc(const char **v
*vcc_url = svn_prop_get_value(ns_props,
"version-controlled-configuration");
- ns_props = apr_hash_get(props,
- SVN_DAV_PROP_NS_DAV, APR_HASH_KEY_STRING);
+ ns_props = svn_hash_gets(props, SVN_DAV_PROP_NS_DAV);
relative_path = svn_prop_get_value(ns_props,
"baseline-relative-path");
uuid = svn_prop_get_value(ns_props, "repository-uuid");
Modified: subversion/trunk/subversion/libsvn_ra_serf/xml.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/xml.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/xml.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/xml.c Sat Mar 23 15:44:36 2013
@@ -26,6 +26,7 @@
#include <apr_uri.h>
#include <serf.h>
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_ra.h"
#include "svn_dav.h"
@@ -560,9 +561,9 @@ svn_ra_serf__xml_note(svn_ra_serf__xml_e
/* In all likelihood, NAME is a string constant. But we can't really
be sure. And it isn't like we're storing a billion of these into
the state pool. */
- apr_hash_set(scan->attrs,
- apr_pstrdup(scan->state_pool, name), APR_HASH_KEY_STRING,
- apr_pstrdup(scan->state_pool, value));
+ svn_hash_sets(scan->attrs,
+ apr_pstrdup(scan->state_pool, name),
+ apr_pstrdup(scan->state_pool, value));
}
@@ -675,8 +676,8 @@ svn_ra_serf__xml_cb_start(svn_ra_serf__x
}
if (value)
- apr_hash_set(new_xes->attrs, name, APR_HASH_KEY_STRING,
- apr_pstrdup(new_pool, value));
+ svn_hash_sets(new_xes->attrs, name,
+ apr_pstrdup(new_pool, value));
}
}
}
Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/client.c Sat Mar 23 15:44:36 2013
@@ -32,6 +32,7 @@
#include <apr_network_io.h>
#include <apr_uri.h>
+#include "svn_hash.h"
#include "svn_types.h"
#include "svn_string.h"
#include "svn_dirent_uri.h"
@@ -388,8 +389,7 @@ static svn_error_t *find_tunnel_agent(co
int n;
/* Look up the tunnel specification in config. */
- cfg = config ? apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
+ cfg = config ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG) : NULL;
svn_config_get(cfg, &val, SVN_CONFIG_SECTION_TUNNELS, tunnel, NULL);
/* We have one predefined tunnel scheme, if it isn't overridden by config. */
@@ -750,12 +750,10 @@ static svn_error_t *ra_svn_open(svn_ra_s
else
tunnel_argv = NULL;
- cfg_client = config ? apr_hash_get(config,
- SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
- cfg = config ? apr_hash_get(config,
- SVN_CONFIG_CATEGORY_SERVERS,
- APR_HASH_KEY_STRING) : NULL;
+ cfg_client = config
+ ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG)
+ : NULL;
+ cfg = config ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_SERVERS) : NULL;
svn_auth_set_parameter(callbacks->auth_baton,
SVN_AUTH_PARAM_CONFIG_CATEGORY_CONFIG, cfg_client);
svn_auth_set_parameter(callbacks->auth_baton,
@@ -990,9 +988,8 @@ static svn_error_t *ra_svn_commit(svn_ra
ra_svn_commit_callback_baton_t *ccb;
apr_hash_index_t *hi;
apr_pool_t *iterpool;
- const svn_string_t *log_msg = apr_hash_get(revprop_table,
- SVN_PROP_REVISION_LOG,
- APR_HASH_KEY_STRING);
+ const svn_string_t *log_msg = svn_hash_gets(revprop_table,
+ SVN_PROP_REVISION_LOG);
/* If we're sending revprops other than svn:log, make sure the server won't
silently ignore them. */
@@ -1007,14 +1004,10 @@ static svn_error_t *ra_svn_commit(svn_ra
if (svn_ra_svn_has_capability(conn, SVN_RA_SVN_CAP_COMMIT_REVPROPS) &&
svn_ra_svn_has_capability(conn, SVN_RA_SVN_CAP_EPHEMERAL_TXNPROPS))
{
- apr_hash_set(revprop_table,
- SVN_PROP_TXN_CLIENT_COMPAT_VERSION,
- APR_HASH_KEY_STRING,
- svn_string_create(SVN_VER_NUMBER, pool));
- apr_hash_set(revprop_table,
- SVN_PROP_TXN_USER_AGENT,
- APR_HASH_KEY_STRING,
- svn_string_create(sess_baton->useragent, pool));
+ svn_hash_sets(revprop_table, SVN_PROP_TXN_CLIENT_COMPAT_VERSION,
+ svn_string_create(SVN_VER_NUMBER, pool));
+ svn_hash_sets(revprop_table, SVN_PROP_TXN_USER_AGENT,
+ svn_string_create(sess_baton->useragent, pool));
}
/* Tell the server we're starting the commit.
@@ -1123,10 +1116,9 @@ parse_iproplist(apr_array_header_t **inh
{
const char *name = svn__apr_hash_index_key(hi);
svn_string_t *value = svn__apr_hash_index_val(hi);
- apr_hash_set(new_iprop->prop_hash,
- apr_pstrdup(result_pool, name),
- APR_HASH_KEY_STRING,
- svn_string_dup(value, result_pool));
+ svn_hash_sets(new_iprop->prop_hash,
+ apr_pstrdup(result_pool, name),
+ svn_string_dup(value, result_pool));
}
APR_ARRAY_PUSH(*inherited_props, svn_prop_inherited_item_t *) =
new_iprop;
@@ -1292,7 +1284,7 @@ static svn_error_t *ra_svn_get_dir(svn_r
else
SVN_ERR(svn_time_from_cstring(&dirent->time, cdate, pool));
dirent->last_author = cauthor;
- apr_hash_set(*dirents, name, APR_HASH_KEY_STRING, dirent);
+ svn_hash_sets(*dirents, name, dirent);
}
return SVN_NO_ERROR;
@@ -1360,8 +1352,7 @@ static svn_error_t *ra_svn_get_mergeinfo
SVN_ERR(svn_mergeinfo_parse(&for_path, to_parse, pool));
/* Correct for naughty servers that send "relative" paths
with leading slashes! */
- apr_hash_set(*catalog, path[0] == '/' ? path + 1 : path,
- APR_HASH_KEY_STRING, for_path);
+ svn_hash_sets(*catalog, path[0] == '/' ? path + 1 :path, for_path);
}
}
@@ -1624,7 +1615,7 @@ static svn_error_t *ra_svn_log(svn_ra_se
change->node_kind = svn_node_kind_from_word(kind_str);
change->text_modified = optbool_to_tristate(text_mods);
change->props_modified = optbool_to_tristate(prop_mods);
- apr_hash_set(cphash, cpath, APR_HASH_KEY_STRING, change);
+ svn_hash_sets(cphash, cpath, change);
}
}
else
@@ -1649,14 +1640,14 @@ static svn_error_t *ra_svn_log(svn_ra_se
{
/* Caller requested all revprops; set author/date/log. */
if (author)
- apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_AUTHOR,
- APR_HASH_KEY_STRING, author);
+ svn_hash_sets(log_entry->revprops, SVN_PROP_REVISION_AUTHOR,
+ author);
if (date)
- apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_DATE,
- APR_HASH_KEY_STRING, date);
+ svn_hash_sets(log_entry->revprops, SVN_PROP_REVISION_DATE,
+ date);
if (message)
- apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_LOG,
- APR_HASH_KEY_STRING, message);
+ svn_hash_sets(log_entry->revprops, SVN_PROP_REVISION_LOG,
+ message);
}
else
{
@@ -1665,14 +1656,14 @@ static svn_error_t *ra_svn_log(svn_ra_se
{
name = APR_ARRAY_IDX(revprops, i, char *);
if (author && strcmp(name, SVN_PROP_REVISION_AUTHOR) == 0)
- apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_AUTHOR,
- APR_HASH_KEY_STRING, author);
+ svn_hash_sets(log_entry->revprops,
+ SVN_PROP_REVISION_AUTHOR, author);
if (date && strcmp(name, SVN_PROP_REVISION_DATE) == 0)
- apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_DATE,
- APR_HASH_KEY_STRING, date);
+ svn_hash_sets(log_entry->revprops,
+ SVN_PROP_REVISION_DATE, date);
if (message && strcmp(name, SVN_PROP_REVISION_LOG) == 0)
- apr_hash_set(log_entry->revprops, SVN_PROP_REVISION_LOG,
- APR_HASH_KEY_STRING, message);
+ svn_hash_sets(log_entry->revprops,
+ SVN_PROP_REVISION_LOG, message);
}
}
SVN_ERR(receiver(receiver_baton, log_entry, iterpool));
@@ -2487,13 +2478,13 @@ static svn_error_t *ra_svn_get_locks(svn
*/
if ((strcmp(abs_path, lock->path) == 0) || (depth == svn_depth_infinity))
{
- apr_hash_set(*locks, lock->path, APR_HASH_KEY_STRING, lock);
+ svn_hash_sets(*locks, lock->path, lock);
}
else if ((depth == svn_depth_files) || (depth == svn_depth_immediates))
{
const char *relpath = svn_fspath__skip_ancestor(abs_path, lock->path);
if (relpath && (svn_path_component_count(relpath) == 1))
- apr_hash_set(*locks, lock->path, APR_HASH_KEY_STRING, lock);
+ svn_hash_sets(*locks, lock->path, lock);
}
}
Modified: subversion/trunk/subversion/libsvn_ra_svn/editorp.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/editorp.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/editorp.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/editorp.c Sat Mar 23 15:44:36 2013
@@ -28,6 +28,7 @@
#include <apr_general.h>
#include <apr_strings.h>
+#include "svn_hash.h"
#include "svn_types.h"
#include "svn_string.h"
#include "svn_error.h"
@@ -499,7 +500,7 @@ static ra_svn_token_entry_t *store_token
entry->is_file = is_file;
entry->dstream = NULL;
entry->pool = pool;
- apr_hash_set(ds->tokens, entry->token, APR_HASH_KEY_STRING, entry);
+ svn_hash_sets(ds->tokens, entry->token, entry);
return entry;
}
@@ -507,7 +508,7 @@ static svn_error_t *lookup_token(ra_svn_
svn_boolean_t is_file,
ra_svn_token_entry_t **entry)
{
- *entry = apr_hash_get(ds->tokens, token, APR_HASH_KEY_STRING);
+ *entry = svn_hash_gets(ds->tokens, token);
if (!*entry || (*entry)->is_file != is_file)
return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
_("Invalid file or dir token during edit"));
@@ -646,7 +647,7 @@ static svn_error_t *ra_svn_handle_close_
/* Close the directory and destroy the baton. */
SVN_CMD_ERR(ds->editor->close_directory(entry->baton, pool));
- apr_hash_set(ds->tokens, token, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(ds->tokens, token, NULL);
svn_pool_destroy(entry->pool);
return SVN_NO_ERROR;
}
@@ -816,7 +817,7 @@ static svn_error_t *ra_svn_handle_close_
/* Close the file and destroy the baton. */
SVN_CMD_ERR(ds->editor->close_file(entry->baton, text_checksum, pool));
- apr_hash_set(ds->tokens, token, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(ds->tokens, token, NULL);
if (--ds->file_refs == 0)
svn_pool_clear(ds->file_pool);
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/marshal.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/marshal.c Sat Mar 23 15:44:36 2013
@@ -32,6 +32,7 @@
#include <apr_lib.h>
#include <apr_strings.h>
+#include "svn_hash.h"
#include "svn_types.h"
#include "svn_string.h"
#include "svn_error.h"
@@ -155,7 +156,7 @@ svn_error_t *svn_ra_svn_set_capabilities
return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
_("Capability entry is not a word"));
word = apr_pstrdup(conn->pool, item->u.word);
- apr_hash_set(conn->capabilities, word, APR_HASH_KEY_STRING, word);
+ svn_hash_sets(conn->capabilities, word, word);
}
return SVN_NO_ERROR;
}
@@ -171,8 +172,7 @@ svn_ra_svn__set_shim_callbacks(svn_ra_sv
svn_boolean_t svn_ra_svn_has_capability(svn_ra_svn_conn_t *conn,
const char *capability)
{
- return (apr_hash_get(conn->capabilities, capability,
- APR_HASH_KEY_STRING) != NULL);
+ return (svn_hash_gets(conn->capabilities, capability) != NULL);
}
int
@@ -1659,7 +1659,7 @@ svn_error_t *svn_ra_svn_parse_proplist(c
return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
_("Proplist element not a list"));
SVN_ERR(svn_ra_svn_parse_tuple(elt->u.list, pool, "cs", &name, &value));
- apr_hash_set(*props, name, APR_HASH_KEY_STRING, value);
+ svn_hash_sets(*props, name, value);
}
return SVN_NO_ERROR;
@@ -1777,7 +1777,7 @@ svn_error_t *svn_ra_svn_handle_commands2
apr_hash_t *cmd_hash = apr_hash_make(subpool);
for (command = commands; command->cmdname; command++)
- apr_hash_set(cmd_hash, command->cmdname, APR_HASH_KEY_STRING, command);
+ svn_hash_sets(cmd_hash, command->cmdname, command);
while (1)
{
@@ -1794,7 +1794,7 @@ svn_error_t *svn_ra_svn_handle_commands2
}
return err;
}
- command = apr_hash_get(cmd_hash, cmdname, APR_HASH_KEY_STRING);
+ command = svn_hash_gets(cmd_hash, cmdname);
if (command)
err = (*command->handler)(conn, iterpool, params, baton);
Modified: subversion/trunk/subversion/mod_dav_svn/activity.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/activity.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/activity.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/activity.c Sat Mar 23 15:44:36 2013
@@ -28,6 +28,7 @@
#include <httpd.h>
#include <mod_dav.h>
+#include "svn_hash.h"
#include "svn_checksum.h"
#include "svn_error.h"
#include "svn_io.h"
@@ -254,8 +255,9 @@ dav_svn__create_txn(const dav_svn_repos
if (repos->username)
{
- apr_hash_set(revprops, SVN_PROP_REVISION_AUTHOR, APR_HASH_KEY_STRING,
- svn_string_create(repos->username, pool));
+ svn_hash_sets(revprops,
+ SVN_PROP_REVISION_AUTHOR,
+ svn_string_create(repos->username, pool));
}
serr = svn_fs_youngest_rev(&rev, repos->fs, pool);
Modified: subversion/trunk/subversion/mod_dav_svn/lock.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/lock.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/lock.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/lock.c Sat Mar 23 15:44:36 2013
@@ -28,6 +28,7 @@
#include <http_log.h>
#include <mod_dav.h>
+#include "svn_hash.h"
#include "svn_fs.h"
#include "svn_repos.h"
#include "svn_dav.h"
@@ -677,9 +678,9 @@ append_locks(dav_lockdb *lockdb,
svn_fs_root_t *txn_root;
const char *conflict_msg;
apr_hash_t *revprop_table = apr_hash_make(resource->pool);
- apr_hash_set(revprop_table, SVN_PROP_REVISION_AUTHOR,
- APR_HASH_KEY_STRING, svn_string_create(repos->username,
- resource->pool));
+ svn_hash_sets(revprop_table,
+ SVN_PROP_REVISION_AUTHOR,
+ svn_string_create(repos->username, resource->pool));
if (resource->info->repos->is_svn_client)
return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED,
Modified: subversion/trunk/subversion/mod_dav_svn/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/merge.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/merge.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/merge.c Sat Mar 23 15:44:36 2013
@@ -170,14 +170,14 @@ do_resources(const dav_svn_repos *repos,
{
/* If we haven't already sent this path, send it (and then
remember that we sent it). */
- if (! apr_hash_get(sent, path, APR_HASH_KEY_STRING))
+ if (! svn_hash_gets(sent, path))
{
svn_node_kind_t kind;
SVN_ERR(svn_fs_check_path(&kind, root, path, subpool));
SVN_ERR(send_response(repos, root, path,
kind == svn_node_dir,
output, bb, subpool));
- apr_hash_set(sent, path, APR_HASH_KEY_STRING, (void *)1);
+ svn_hash_sets(sent, path, (void *)1);
}
}
if (send_parent)
@@ -187,11 +187,11 @@ do_resources(const dav_svn_repos *repos,
pool, not subpool, because it stays in the sent hash
afterwards. */
const char *parent = svn_fspath__dirname(path, pool);
- if (! apr_hash_get(sent, parent, APR_HASH_KEY_STRING))
+ if (! svn_hash_gets(sent, parent))
{
SVN_ERR(send_response(repos, root, parent,
TRUE, output, bb, subpool));
- apr_hash_set(sent, parent, APR_HASH_KEY_STRING, (void *)1);
+ svn_hash_sets(sent, parent, (void *)1);
}
}
}
Modified: subversion/trunk/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/reports/update.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/reports/update.c Sat Mar 23 15:44:36 2013
@@ -29,6 +29,7 @@
#include <http_log.h>
#include <mod_dav.h>
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_repos.h"
#include "svn_fs.h"
@@ -153,7 +154,7 @@ add_to_path_map(apr_hash_t *hash, const
const char *repos_path = linkpath ? linkpath : norm_path;
/* now, geez, put the path in the map already! */
- apr_hash_set(hash, path, APR_HASH_KEY_STRING, repos_path);
+ svn_hash_sets(hash, path, repos_path);
}
@@ -169,7 +170,7 @@ get_from_path_map(apr_hash_t *hash, cons
if (! hash)
return apr_pstrdup(pool, path);
- if ((repos_path = apr_hash_get(hash, path, APR_HASH_KEY_STRING)))
+ if ((repos_path = svn_hash_gets(hash, path)))
{
/* what luck! this path is a hash key! if there is a linkpath,
use that, else return the path itself. */
Modified: subversion/trunk/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/repos.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/repos.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/repos.c Sat Mar 23 15:44:36 2013
@@ -2128,8 +2128,9 @@ get_resource(request_rec *r,
more than that). */
/* Start out assuming no capabilities. */
- apr_hash_set(repos->client_capabilities, SVN_RA_CAPABILITY_MERGEINFO,
- APR_HASH_KEY_STRING, capability_no);
+ svn_hash_sets(repos->client_capabilities,
+ SVN_RA_CAPABILITY_MERGEINFO,
+ capability_no);
/* Then see what we can find. */
val = apr_table_get(r->headers_in, "DAV");
@@ -2140,9 +2141,8 @@ get_resource(request_rec *r,
if (svn_cstring_match_list(SVN_DAV_NS_DAV_SVN_MERGEINFO, vals))
{
- apr_hash_set(repos->client_capabilities,
- SVN_RA_CAPABILITY_MERGEINFO,
- APR_HASH_KEY_STRING, capability_yes);
+ svn_hash_sets(repos->client_capabilities,
+ SVN_RA_CAPABILITY_MERGEINFO, capability_yes);
}
}
}
@@ -2158,18 +2158,12 @@ get_resource(request_rec *r,
/* construct FS configuration parameters */
fs_config = apr_hash_make(r->connection->pool);
- apr_hash_set(fs_config,
- SVN_FS_CONFIG_FSFS_CACHE_DELTAS,
- APR_HASH_KEY_STRING,
- dav_svn__get_txdelta_cache_flag(r) ? "1" : "0");
- apr_hash_set(fs_config,
- SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
- APR_HASH_KEY_STRING,
- dav_svn__get_fulltext_cache_flag(r) ? "1" : "0");
- apr_hash_set(fs_config,
- SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
- APR_HASH_KEY_STRING,
- dav_svn__get_revprop_cache_flag(r) ? "1" : "0");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS,
+ dav_svn__get_txdelta_cache_flag(r) ? "1" :"0");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
+ dav_svn__get_fulltext_cache_flag(r) ? "1" :"0");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
+ dav_svn__get_revprop_cache_flag(r) ? "1" :"0");
/* Disallow BDB/event until issue 4157 is fixed. */
if (!strcmp(ap_show_mpm(), "event"))
@@ -3217,7 +3211,7 @@ deliver(const dav_resource *resource, ap
ent->id = NULL; /* ### does it matter? */
ent->kind = dirent->kind;
- apr_hash_set(entries, key, APR_HASH_KEY_STRING, ent);
+ svn_hash_sets(entries, key, ent);
}
}
Modified: subversion/trunk/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/version.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/version.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/version.c Sat Mar 23 15:44:36 2013
@@ -28,6 +28,7 @@
#include <http_log.h>
#include <mod_dav.h>
+#include "svn_hash.h"
#include "svn_fs.h"
#include "svn_xml.h"
#include "svn_repos.h"
@@ -1327,7 +1328,7 @@ dav_svn__build_lock_hash(apr_hash_t **lo
lockpath = svn_fspath__join(path_prefix, cdata, pool);
if (lockpath && locktoken)
{
- apr_hash_set(hash, lockpath, APR_HASH_KEY_STRING, locktoken);
+ svn_hash_sets(hash, lockpath, locktoken);
lockpath = NULL;
locktoken = NULL;
}
@@ -1337,7 +1338,7 @@ dav_svn__build_lock_hash(apr_hash_t **lo
locktoken = dav_xml_get_cdata(lfchild, pool, 1);
if (lockpath && *locktoken)
{
- apr_hash_set(hash, lockpath, APR_HASH_KEY_STRING, locktoken);
+ svn_hash_sets(hash, lockpath, locktoken);
lockpath = NULL;
locktoken = NULL;
}
Modified: subversion/trunk/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cl-conflicts.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/cl-conflicts.c (original)
+++ subversion/trunk/subversion/svn/cl-conflicts.c Sat Mar 23 15:44:36 2013
@@ -22,6 +22,7 @@
*/
#include "cl-conflicts.h"
+#include "svn_hash.h"
#include "svn_xml.h"
#include "svn_dirent_uri.h"
#include "svn_path.h"
@@ -161,23 +162,20 @@ add_conflict_version_xml(svn_stringbuf_t
apr_hash_t *att_hash = apr_hash_make(pool);
- apr_hash_set(att_hash, "side", APR_HASH_KEY_STRING, side);
+ svn_hash_sets(att_hash, "side", side);
if (version->repos_url)
- apr_hash_set(att_hash, "repos-url", APR_HASH_KEY_STRING,
- version->repos_url);
+ svn_hash_sets(att_hash, "repos-url", version->repos_url);
if (version->path_in_repos)
- apr_hash_set(att_hash, "path-in-repos", APR_HASH_KEY_STRING,
- version->path_in_repos);
+ svn_hash_sets(att_hash, "path-in-repos", version->path_in_repos);
if (SVN_IS_VALID_REVNUM(version->peg_rev))
- apr_hash_set(att_hash, "revision", APR_HASH_KEY_STRING,
- apr_ltoa(pool, version->peg_rev));
+ svn_hash_sets(att_hash, "revision", apr_ltoa(pool, version->peg_rev));
if (version->node_kind != svn_node_unknown)
- apr_hash_set(att_hash, "kind", APR_HASH_KEY_STRING,
- svn_cl__node_kind_str_xml(version->node_kind));
+ svn_hash_sets(att_hash, "kind",
+ svn_cl__node_kind_str_xml(version->node_kind));
svn_xml_make_open_tag_hash(pstr, pool, svn_xml_self_closing,
"version", att_hash);
@@ -193,20 +191,20 @@ append_tree_conflict_info_xml(svn_string
apr_hash_t *att_hash = apr_hash_make(pool);
const char *tmp;
- apr_hash_set(att_hash, "victim", APR_HASH_KEY_STRING,
- svn_dirent_basename(conflict->local_abspath, pool));
+ svn_hash_sets(att_hash, "victim",
+ svn_dirent_basename(conflict->local_abspath, pool));
- apr_hash_set(att_hash, "kind", APR_HASH_KEY_STRING,
- svn_cl__node_kind_str_xml(conflict->node_kind));
+ svn_hash_sets(att_hash, "kind",
+ svn_cl__node_kind_str_xml(conflict->node_kind));
- apr_hash_set(att_hash, "operation", APR_HASH_KEY_STRING,
- svn_cl__operation_str_xml(conflict->operation, pool));
+ svn_hash_sets(att_hash, "operation",
+ svn_cl__operation_str_xml(conflict->operation, pool));
tmp = svn_token__to_word(map_conflict_action_xml, conflict->action);
- apr_hash_set(att_hash, "action", APR_HASH_KEY_STRING, tmp);
+ svn_hash_sets(att_hash, "action", tmp);
tmp = svn_token__to_word(map_conflict_reason_xml, conflict->reason);
- apr_hash_set(att_hash, "reason", APR_HASH_KEY_STRING, tmp);
+ svn_hash_sets(att_hash, "reason", tmp);
/* Open the tree-conflict tag. */
svn_xml_make_open_tag_hash(&str, pool, svn_xml_normal,
@@ -247,15 +245,15 @@ svn_cl__append_conflict_info_xml(svn_str
att_hash = apr_hash_make(scratch_pool);
- apr_hash_set(att_hash, "operation", APR_HASH_KEY_STRING,
- svn_cl__operation_str_xml(conflict->operation, scratch_pool));
+ svn_hash_sets(att_hash, "operation",
+ svn_cl__operation_str_xml(conflict->operation, scratch_pool));
kind = svn_token__to_word(map_conflict_kind_xml, conflict->kind);
- apr_hash_set(att_hash, "type", APR_HASH_KEY_STRING, kind);
+ svn_hash_sets(att_hash, "type", kind);
- apr_hash_set(att_hash, "operation", APR_HASH_KEY_STRING,
- svn_cl__operation_str_xml(conflict->operation, scratch_pool));
+ svn_hash_sets(att_hash, "operation",
+ svn_cl__operation_str_xml(conflict->operation, scratch_pool));
/* "<conflict>" */
Modified: subversion/trunk/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/commit-cmd.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/commit-cmd.c (original)
+++ subversion/trunk/subversion/svn/commit-cmd.c Sat Mar 23 15:44:36 2013
@@ -29,6 +29,7 @@
#include <apr_general.h>
+#include "svn_hash.h"
#include "svn_error.h"
#include "svn_error_codes.h"
#include "svn_wc.h"
@@ -136,8 +137,7 @@ svn_cl__commit(apr_getopt_t *os,
if (opt_state->depth == svn_depth_unknown)
opt_state->depth = svn_depth_infinity;
- cfg = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING);
+ cfg = svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG);
if (cfg)
SVN_ERR(svn_config_get_bool(cfg, &no_unlock,
SVN_CONFIG_SECTION_MISCELLANY,
Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Sat Mar 23 15:44:36 2013
@@ -27,6 +27,7 @@
#define APR_WANT_STRFUNC
#include <apr_want.h>
+#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_client.h"
#include "svn_dirent_uri.h"
@@ -1161,10 +1162,10 @@ svn_cl__conflict_func_postpone(svn_wc_co
{
apr_hash_t *conflicted_paths = baton;
- apr_hash_set(conflicted_paths,
- apr_pstrdup(apr_hash_pool_get(conflicted_paths),
- desc->local_abspath),
- APR_HASH_KEY_STRING, "");
+ svn_hash_sets(conflicted_paths,
+ apr_pstrdup(apr_hash_pool_get(conflicted_paths),
+ desc->local_abspath),
+ "");
*result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
NULL, result_pool);
Modified: subversion/trunk/subversion/svn/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/help-cmd.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/help-cmd.c (original)
+++ subversion/trunk/subversion/svn/help-cmd.c Sat Mar 23 15:44:36 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_string.h"
#include "svn_config.h"
#include "svn_error.h"
@@ -92,9 +93,8 @@ svn_cl__help(apr_getopt_t *os,
if (cmd_baton->ctx->config)
{
- cfg = apr_hash_get(cmd_baton->ctx->config,
- SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING);
+ cfg = svn_hash_gets(cmd_baton->ctx->config,
+ SVN_CONFIG_CATEGORY_CONFIG);
if (cfg)
{
SVN_ERR(svn_config_get_bool(cfg, &store_auth_creds,
@@ -106,9 +106,8 @@ svn_cl__help(apr_getopt_t *os,
SVN_CONFIG_OPTION_STORE_PASSWORDS,
store_passwords));
}
- cfg = apr_hash_get(cmd_baton->ctx->config,
- SVN_CONFIG_CATEGORY_SERVERS,
- APR_HASH_KEY_STRING);
+ cfg = svn_hash_gets(cmd_baton->ctx->config,
+ SVN_CONFIG_CATEGORY_SERVERS);
if (cfg)
{
const char *value;
Modified: subversion/trunk/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/propedit-cmd.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/propedit-cmd.c (original)
+++ subversion/trunk/subversion/svn/propedit-cmd.c Sat Mar 23 15:44:36 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_wc.h"
#include "svn_pools.h"
@@ -239,7 +240,7 @@ svn_cl__propedit(apr_getopt_t *os,
NULL, ctx, subpool, subpool));
/* Get the property value. */
- propval = apr_hash_get(props, abspath_or_url, APR_HASH_KEY_STRING);
+ propval = svn_hash_gets(props, abspath_or_url);
if (! propval)
propval = svn_string_create_empty(subpool);
Modified: subversion/trunk/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/propget-cmd.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/propget-cmd.c (original)
+++ subversion/trunk/subversion/svn/propget-cmd.c Sat Mar 23 15:44:36 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_pools.h"
#include "svn_client.h"
@@ -209,7 +210,7 @@ print_single_prop(svn_string_t *propval,
/* Print the property name and value just as "proplist -v" does */
apr_hash_t *hash = apr_hash_make(scratch_pool);
- apr_hash_set(hash, pname_utf8, APR_HASH_KEY_STRING, propval);
+ svn_hash_sets(hash, pname_utf8, propval);
SVN_ERR(svn_cmdline__print_prop_hash(out, hash, FALSE, scratch_pool));
}
else
Modified: subversion/trunk/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status-cmd.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status-cmd.c (original)
+++ subversion/trunk/subversion/svn/status-cmd.c Sat Mar 23 15:44:36 2013
@@ -27,6 +27,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_string.h"
#include "svn_wc.h"
#include "svn_client.h"
@@ -241,13 +242,12 @@ print_status(void *baton,
scache->status = svn_client_status_dup(status, sb->cl_pool);
path_array =
- apr_hash_get(sb->cached_changelists, cl_key, APR_HASH_KEY_STRING);
+ svn_hash_gets(sb->cached_changelists, cl_key);
if (path_array == NULL)
{
path_array = apr_array_make(sb->cl_pool, 1,
sizeof(struct status_cache *));
- apr_hash_set(sb->cached_changelists, cl_key,
- APR_HASH_KEY_STRING, path_array);
+ svn_hash_sets(sb->cached_changelists, cl_key, path_array);
}
APR_ARRAY_PUSH(path_array, struct status_cache *) = scache;
Modified: subversion/trunk/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status.c (original)
+++ subversion/trunk/subversion/svn/status.c Sat Mar 23 15:44:36 2013
@@ -26,6 +26,7 @@
/*** Includes. ***/
+#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_wc.h"
#include "svn_dirent_uri.h"
@@ -471,28 +472,27 @@ svn_cl__print_status_xml(const char *cwd
"path", svn_dirent_local_style(path, pool), NULL);
att_hash = apr_hash_make(pool);
- apr_hash_set(att_hash, "item", APR_HASH_KEY_STRING,
- generate_status_desc(combined_status(status)));
+ svn_hash_sets(att_hash, "item",
+ generate_status_desc(combined_status(status)));
- apr_hash_set(att_hash, "props", APR_HASH_KEY_STRING,
- generate_status_desc(
- (status->node_status != svn_wc_status_deleted)
- ? status->prop_status
- : svn_wc_status_none));
+ svn_hash_sets(att_hash, "props",
+ generate_status_desc(
+ (status->node_status != svn_wc_status_deleted)
+ ? status->prop_status
+ : svn_wc_status_none));
if (status->wc_is_locked)
- apr_hash_set(att_hash, "wc-locked", APR_HASH_KEY_STRING, "true");
+ svn_hash_sets(att_hash, "wc-locked", "true");
if (status->copied)
- apr_hash_set(att_hash, "copied", APR_HASH_KEY_STRING, "true");
+ svn_hash_sets(att_hash, "copied", "true");
if (status->switched)
- apr_hash_set(att_hash, "switched", APR_HASH_KEY_STRING, "true");
+ svn_hash_sets(att_hash, "switched", "true");
if (status->file_external)
- apr_hash_set(att_hash, "file-external", APR_HASH_KEY_STRING, "true");
+ svn_hash_sets(att_hash, "file-external", "true");
if (status->versioned && ! status->copied)
- apr_hash_set(att_hash, "revision", APR_HASH_KEY_STRING,
- apr_psprintf(pool, "%ld", status->revision));
+ svn_hash_sets(att_hash, "revision",
+ apr_psprintf(pool, "%ld", status->revision));
if (tree_conflicted)
- apr_hash_set(att_hash, "tree-conflicted", APR_HASH_KEY_STRING,
- "true");
+ svn_hash_sets(att_hash, "tree-conflicted", "true");
if (status->moved_from_abspath || status->moved_to_abspath)
{
const char *relpath;
@@ -502,14 +502,14 @@ svn_cl__print_status_xml(const char *cwd
relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
- apr_hash_set(att_hash, "moved-from", APR_HASH_KEY_STRING, relpath);
+ svn_hash_sets(att_hash, "moved-from", relpath);
}
if (status->moved_to_abspath)
{
relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
pool, pool);
relpath = svn_dirent_local_style(relpath, pool);
- apr_hash_set(att_hash, "moved-to", APR_HASH_KEY_STRING, relpath);
+ svn_hash_sets(att_hash, "moved-to", relpath);
}
}
svn_xml_make_open_tag_hash(&sb, pool, svn_xml_normal, "wc-status",
Modified: subversion/trunk/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Sat Mar 23 15:44:36 2013
@@ -2145,8 +2145,7 @@ sub_main(int argc, const char *argv[], a
_("Changelist names must not be empty"));
return EXIT_ERROR(err);
}
- apr_hash_set(changelists, opt_state.changelist,
- APR_HASH_KEY_STRING, (void *)1);
+ svn_hash_sets(changelists, opt_state.changelist, (void *)1);
break;
case opt_keep_changelists:
opt_state.keep_changelists = TRUE;
@@ -2545,8 +2544,7 @@ sub_main(int argc, const char *argv[], a
}
}
- 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);
/* Update the options in the config */
if (opt_state.config_options)
Modified: subversion/trunk/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/util.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/util.c (original)
+++ subversion/trunk/subversion/svn/util.c Sat Mar 23 15:44:36 2013
@@ -112,8 +112,7 @@ svn_cl__merge_file_externally(const char
{
struct svn_config_t *cfg;
merge_tool = NULL;
- cfg = config ? apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
+ cfg = config ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG) : NULL;
/* apr_env_get wants char **, this wants const char ** */
svn_config_get(cfg, (const char **)&merge_tool,
SVN_CONFIG_SECTION_HELPERS,
@@ -225,8 +224,7 @@ svn_cl__make_log_msg_baton(void **baton,
}
else 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, &(lmb->message_encoding),
SVN_CONFIG_SECTION_MISCELLANY,
SVN_CONFIG_OPTION_LOG_ENCODING,
Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Sat Mar 23 15:44:36 2013
@@ -25,6 +25,7 @@
#include <apr_file_io.h>
#include <apr_signal.h>
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_cmdline.h"
#include "svn_error.h"
@@ -112,12 +113,9 @@ open_repos(svn_repos_t **repos,
{
/* construct FS configuration parameters: enable caches for r/o data */
apr_hash_t *fs_config = apr_hash_make(pool);
- apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS,
- APR_HASH_KEY_STRING, "1");
- apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
- APR_HASH_KEY_STRING, "1");
- apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
- APR_HASH_KEY_STRING, "2");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS, "1");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS, "1");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS, "2");
/* now, open the requested repository */
SVN_ERR(svn_repos_open2(repos, path, fs_config, pool));
@@ -632,47 +630,36 @@ subcommand_create(apr_getopt_t *os, void
/* Expect no more arguments. */
SVN_ERR(parse_args(NULL, os, 0, 0, pool));
- apr_hash_set(fs_config, SVN_FS_CONFIG_BDB_TXN_NOSYNC,
- APR_HASH_KEY_STRING,
- (opt_state->bdb_txn_nosync ? "1" : "0"));
-
- apr_hash_set(fs_config, SVN_FS_CONFIG_BDB_LOG_AUTOREMOVE,
- APR_HASH_KEY_STRING,
- (opt_state->bdb_log_keep ? "0" : "1"));
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_BDB_TXN_NOSYNC,
+ (opt_state->bdb_txn_nosync ? "1" :"0"));
+
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_BDB_LOG_AUTOREMOVE,
+ (opt_state->bdb_log_keep ? "0" :"1"));
if (opt_state->fs_type)
- apr_hash_set(fs_config, SVN_FS_CONFIG_FS_TYPE,
- APR_HASH_KEY_STRING,
- opt_state->fs_type);
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_FS_TYPE, opt_state->fs_type);
/* Prior to 1.8, we had explicit options to specify compatibility
with a handful of prior Subversion releases. */
if (opt_state->pre_1_4_compatible)
- apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE,
- APR_HASH_KEY_STRING, "1");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE, "1");
if (opt_state->pre_1_5_compatible)
- apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE,
- APR_HASH_KEY_STRING, "1");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE, "1");
if (opt_state->pre_1_6_compatible)
- apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
- APR_HASH_KEY_STRING, "1");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE, "1");
/* In 1.8, we figured out that we didn't have to keep extending this
madness indefinitely. */
if (opt_state->compatible_version)
{
if (! svn_version__at_least(opt_state->compatible_version, 1, 4, 0))
- apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE,
- APR_HASH_KEY_STRING, "1");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_4_COMPATIBLE, "1");
if (! svn_version__at_least(opt_state->compatible_version, 1, 5, 0))
- apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE,
- APR_HASH_KEY_STRING, "1");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_5_COMPATIBLE, "1");
if (! svn_version__at_least(opt_state->compatible_version, 1, 6, 0))
- apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE,
- APR_HASH_KEY_STRING, "1");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_6_COMPATIBLE, "1");
if (! svn_version__at_least(opt_state->compatible_version, 1, 8, 0))
- apr_hash_set(fs_config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE,
- APR_HASH_KEY_STRING, "1");
+ svn_hash_sets(fs_config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE, "1");
}
SVN_ERR(svn_repos_create(&repos, opt_state->repository_path,
Modified: subversion/trunk/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/svndumpfilter.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/trunk/subversion/svndumpfilter/svndumpfilter.c Sat Mar 23 15:44:36 2013
@@ -333,8 +333,7 @@ new_revision_record(void **revision_bato
header_stream = svn_stream_from_stringbuf(rb->header, pool);
- rev_orig = apr_hash_get(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER,
- APR_HASH_KEY_STRING);
+ rev_orig = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER);
rb->rev_orig = SVN_STR_TO_REV(rev_orig);
if (rb->pb->do_renumber_revs)
@@ -400,12 +399,11 @@ output_revision(struct revision_baton_t
apr_hash_t *old_props = rb->props;
rb->has_props = TRUE;
rb->props = apr_hash_make(hash_pool);
- apr_hash_set(rb->props, SVN_PROP_REVISION_DATE, APR_HASH_KEY_STRING,
- apr_hash_get(old_props, SVN_PROP_REVISION_DATE,
- APR_HASH_KEY_STRING));
- apr_hash_set(rb->props, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
- svn_string_create(_("This is an empty revision for "
- "padding."), hash_pool));
+ svn_hash_sets(rb->props, SVN_PROP_REVISION_DATE,
+ svn_hash_gets(old_props, SVN_PROP_REVISION_DATE));
+ svn_hash_sets(rb->props, SVN_PROP_REVISION_LOG,
+ svn_string_create(_("This is an empty revision for "
+ "padding."), hash_pool));
}
/* Now, "rasterize" the props to a string, and append the property
@@ -547,11 +545,8 @@ new_node_record(void **node_baton,
nb->rb = rev_baton;
pb = nb->rb->pb;
- node_path = apr_hash_get(headers, SVN_REPOS_DUMPFILE_NODE_PATH,
- APR_HASH_KEY_STRING);
- copyfrom_path = apr_hash_get(headers,
- SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH,
- APR_HASH_KEY_STRING);
+ node_path = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_PATH);
+ copyfrom_path = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH);
/* Ensure that paths start with a leading '/'. */
if (node_path[0] != '/')
@@ -566,16 +561,15 @@ new_node_record(void **node_baton,
rest. */
if (nb->do_skip)
{
- apr_hash_set(pb->dropped_nodes,
- apr_pstrdup(apr_hash_pool_get(pb->dropped_nodes),
- node_path),
- APR_HASH_KEY_STRING, (void *)1);
+ svn_hash_sets(pb->dropped_nodes,
+ apr_pstrdup(apr_hash_pool_get(pb->dropped_nodes),
+ node_path),
+ (void *)1);
nb->rb->had_dropped_nodes = TRUE;
}
else
{
- tcl = apr_hash_get(headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH,
- APR_HASH_KEY_STRING);
+ tcl = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_TEXT_CONTENT_LENGTH);
/* Test if this node was copied from dropped source. */
if (copyfrom_path &&
@@ -590,17 +584,16 @@ new_node_record(void **node_baton,
scenario, we'll just do an add without history using the new
contents. */
const char *kind;
- kind = apr_hash_get(headers, SVN_REPOS_DUMPFILE_NODE_KIND,
- APR_HASH_KEY_STRING);
+ kind = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_NODE_KIND);
/* If there is a Text-content-length header, and the kind is
"file", we just fallback to an add without history. */
if (tcl && (strcmp(kind, "file") == 0))
{
- apr_hash_set(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH,
- APR_HASH_KEY_STRING, NULL);
- apr_hash_set(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH,
+ NULL);
+ svn_hash_sets(headers, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV,
+ NULL);
copyfrom_path = NULL;
}
/* Else, this is either a directory or a file whose contents we
@@ -826,8 +819,7 @@ adjust_mergeinfo(svn_string_t **final_va
range->end = revmap_end->rev;
}
}
- apr_hash_set(final_mergeinfo, merge_source,
- APR_HASH_KEY_STRING, rangelist);
+ svn_hash_sets(final_mergeinfo, merge_source, rangelist);
}
SVN_ERR(svn_mergeinfo_sort(final_mergeinfo, subpool));
@@ -847,8 +839,9 @@ set_revision_property(void *revision_bat
apr_pool_t *hash_pool = apr_hash_pool_get(rb->props);
rb->has_props = TRUE;
- apr_hash_set(rb->props, apr_pstrdup(hash_pool, name),
- APR_HASH_KEY_STRING, svn_string_dup(value, hash_pool));
+ svn_hash_sets(rb->props,
+ apr_pstrdup(hash_pool, name),
+ svn_string_dup(value, hash_pool));
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/svnlook/svnlook.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnlook/svnlook.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svnlook/svnlook.c (original)
+++ subversion/trunk/subversion/svnlook/svnlook.c Sat Mar 23 15:44:36 2013
@@ -34,6 +34,7 @@
#define APR_WANT_STRFUNC
#include <apr_want.h>
+#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_types.h"
#include "svn_pools.h"
@@ -1762,7 +1763,7 @@ do_pget(svnlook_ctxt_t *c,
{
apr_hash_t *hash = apr_hash_make(pool);
- apr_hash_set(hash, propname, APR_HASH_KEY_STRING, prop);
+ svn_hash_sets(hash, propname, prop);
SVN_ERR(svn_stream_printf(stdout_stream, pool,
_("Properties on '%s':\n"), path));
SVN_ERR(svn_cmdline__print_prop_hash(stdout_stream, hash,
Modified: subversion/trunk/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnmucc/svnmucc.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svnmucc/svnmucc.c (original)
+++ subversion/trunk/subversion/svnmucc/svnmucc.c Sat Mar 23 15:44:36 2013
@@ -40,6 +40,7 @@
#include <apr_lib.h>
+#include "svn_hash.h"
#include "svn_client.h"
#include "svn_cmdline.h"
#include "svn_config.h"
@@ -335,8 +336,7 @@ get_operation(const char *path,
struct operation *operation,
apr_pool_t *pool)
{
- struct operation *child = apr_hash_get(operation->children, path,
- APR_HASH_KEY_STRING);
+ struct operation *child = svn_hash_gets(operation->children, path);
if (! child)
{
child = apr_pcalloc(pool, sizeof(*child));
@@ -346,7 +346,7 @@ get_operation(const char *path,
child->kind = svn_node_dir;
child->prop_mods = apr_hash_make(pool);
child->prop_dels = apr_array_make(pool, 1, sizeof(const char *));
- apr_hash_set(operation->children, path, APR_HASH_KEY_STRING, child);
+ svn_hash_sets(operation->children, path, child);
}
return child;
}
@@ -450,8 +450,7 @@ build(action_code_t action,
if (! prop_value)
APR_ARRAY_PUSH(operation->prop_dels, const char *) = prop_name;
else
- apr_hash_set(operation->prop_mods, prop_name,
- APR_HASH_KEY_STRING, prop_value);
+ svn_hash_sets(operation->prop_mods, prop_name, prop_value);
if (!operation->rev)
operation->rev = rev;
return SVN_NO_ERROR;
@@ -750,10 +749,9 @@ execute(const apr_array_header_t *action
SVN_ERR(svn_config_get_config(&config, config_dir, pool));
SVN_ERR(svn_cmdline__apply_config_options(config, config_options,
"svnmucc: ", "--config-option"));
- cfg_config = apr_hash_get(config, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING);
+ cfg_config = svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG);
- if (! apr_hash_get(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING))
+ if (! svn_hash_gets(revprops, SVN_PROP_REVISION_LOG))
{
svn_string_t *msg = svn_string_create("", pool);
@@ -772,7 +770,7 @@ execute(const apr_array_header_t *action
TRUE, NULL, apr_hash_pool_get(revprops)));
}
- apr_hash_set(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING, msg);
+ svn_hash_sets(revprops, SVN_PROP_REVISION_LOG, msg);
}
SVN_ERR(create_ra_callbacks(&ra_callbacks, username, password, config_dir,
@@ -1019,7 +1017,7 @@ sanitize_log_sources(apr_hash_t *revprop
/* If we already have a log message in the revprop hash, then just
make sure the user didn't try to also use -m or -F. Otherwise,
we need to consult -m or -F to find a log message, if any. */
- if (apr_hash_get(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING))
+ if (svn_hash_gets(revprops, SVN_PROP_REVISION_LOG))
{
if (filedata || message)
return mutually_exclusive_logs_error();
@@ -1030,13 +1028,13 @@ sanitize_log_sources(apr_hash_t *revprop
return mutually_exclusive_logs_error();
SVN_ERR(svn_utf_cstring_to_utf8(&message, filedata->data, hash_pool));
- apr_hash_set(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
- svn_stringbuf__morph_into_string(filedata));
+ svn_hash_sets(revprops, SVN_PROP_REVISION_LOG,
+ svn_stringbuf__morph_into_string(filedata));
}
else if (message)
{
- apr_hash_set(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
- svn_string_create(message, hash_pool));
+ svn_hash_sets(revprops, SVN_PROP_REVISION_LOG,
+ svn_string_create(message, hash_pool));
}
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dump_editor.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/dump_editor.c Sat Mar 23 15:44:36 2013
@@ -669,8 +669,7 @@ delete_entry(const char *path,
to the deleted_entries of the parent directory baton. That way,
we can tell (later) an addition from a replacement. All the real
deletions get handled in close_directory(). */
- apr_hash_set(pb->deleted_entries, apr_pstrdup(pb->eb->pool, path),
- APR_HASH_KEY_STRING, pb);
+ svn_hash_sets(pb->deleted_entries, apr_pstrdup(pb->eb->pool, path), pb);
return SVN_NO_ERROR;
}
@@ -696,7 +695,7 @@ add_directory(const char *path,
pb, TRUE, pb->eb->pool);
/* This might be a replacement -- is the path already deleted? */
- val = apr_hash_get(pb->deleted_entries, path, APR_HASH_KEY_STRING);
+ val = svn_hash_gets(pb->deleted_entries, path);
/* Detect an add-with-history */
is_copy = ARE_VALID_COPY_ARGS(copyfrom_path, copyfrom_rev);
@@ -711,7 +710,7 @@ add_directory(const char *path,
if (val)
/* Delete the path, it's now been dumped */
- apr_hash_set(pb->deleted_entries, path, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(pb->deleted_entries, path, NULL);
/* Remember that we've started, but not yet finished handling this
directory. */
@@ -826,7 +825,7 @@ add_file(const char *path,
fb = make_file_baton(path, pb, pool);
/* This might be a replacement -- is the path already deleted? */
- val = apr_hash_get(pb->deleted_entries, path, APR_HASH_KEY_STRING);
+ val = svn_hash_gets(pb->deleted_entries, path);
/* Detect add-with-history. */
if (ARE_VALID_COPY_ARGS(copyfrom_path, copyfrom_rev))
@@ -839,7 +838,7 @@ add_file(const char *path,
/* Delete the path, it's now been dumped. */
if (val)
- apr_hash_set(pb->deleted_entries, path, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(pb->deleted_entries, path, NULL);
*file_baton = fb;
return SVN_NO_ERROR;
@@ -897,11 +896,11 @@ change_dir_prop(void *parent_baton,
return SVN_NO_ERROR;
if (value)
- apr_hash_set(db->props, apr_pstrdup(db->pool, name),
- APR_HASH_KEY_STRING, svn_string_dup(value, db->pool));
+ svn_hash_sets(db->props,
+ apr_pstrdup(db->pool, name),
+ svn_string_dup(value, db->pool));
else
- apr_hash_set(db->deleted_props, apr_pstrdup(db->pool, name),
- APR_HASH_KEY_STRING, "");
+ svn_hash_sets(db->deleted_props, apr_pstrdup(db->pool, name), "");
/* Make sure we eventually output the props, and disable printing
a couple of extra newlines */
@@ -925,11 +924,11 @@ change_file_prop(void *file_baton,
return SVN_NO_ERROR;
if (value)
- apr_hash_set(fb->props, apr_pstrdup(fb->pool, name),
- APR_HASH_KEY_STRING, svn_string_dup(value, fb->pool));
+ svn_hash_sets(fb->props,
+ apr_pstrdup(fb->pool, name),
+ svn_string_dup(value, fb->pool));
else
- apr_hash_set(fb->deleted_props, apr_pstrdup(fb->pool, name),
- APR_HASH_KEY_STRING, "");
+ svn_hash_sets(fb->deleted_props, apr_pstrdup(fb->pool, name), "");
/* Dump the property headers and wait; close_file might need
to write text headers too depending on whether
Modified: subversion/trunk/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/load_editor.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/load_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/load_editor.c Sat Mar 23 15:44:36 2013
@@ -199,7 +199,7 @@ prefix_mergeinfo_paths(svn_string_t **me
path = svn_fspath__canonicalize(svn_relpath_join(parent_dir,
merge_source, pool),
pool);
- apr_hash_set(prefixed_mergeinfo, path, APR_HASH_KEY_STRING, rangelist);
+ svn_hash_sets(prefixed_mergeinfo, path, rangelist);
}
return svn_mergeinfo_to_string(mergeinfo_val, prefixed_mergeinfo, pool);
}
@@ -635,10 +635,8 @@ new_node_record(void **node_baton,
commit_editor. We'll set them separately using the RA API
after closing the editor (see close_revision). */
- apr_hash_set(rb->revprop_table, SVN_PROP_REVISION_AUTHOR,
- APR_HASH_KEY_STRING, NULL);
- apr_hash_set(rb->revprop_table, SVN_PROP_REVISION_DATE,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(rb->revprop_table, SVN_PROP_REVISION_AUTHOR, NULL);
+ svn_hash_sets(rb->revprop_table, SVN_PROP_REVISION_DATE, NULL);
SVN_ERR(svn_ra__register_editor_shim_callbacks(rb->pb->session,
get_shim_callbacks(rb, rb->pool)));
@@ -860,8 +858,9 @@ set_revision_property(void *baton,
if (rb->rev > 0)
{
- apr_hash_set(rb->revprop_table, apr_pstrdup(rb->pool, name),
- APR_HASH_KEY_STRING, svn_string_dup(value, rb->pool));
+ svn_hash_sets(rb->revprop_table,
+ apr_pstrdup(rb->pool, name),
+ svn_string_dup(value, rb->pool));
}
else if (rb->rev_offset == -1)
{
Modified: subversion/trunk/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/svnrdump.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/svnrdump.c (original)
+++ subversion/trunk/subversion/svnrdump/svnrdump.c Sat Mar 23 15:44:36 2013
@@ -366,8 +366,7 @@ init_client_context(svn_client_ctx_t **c
SVN_ERR(svn_cmdline__apply_config_options(ctx->config, config_options,
"svnrdump: ", "--config-option"));
- cfg_config = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING);
+ cfg_config = svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG);
/* ### FIXME: This is a hack to work around the fact that our dump
### editor simply can't handle the way ra_serf violates the
@@ -382,8 +381,7 @@ init_client_context(svn_client_ctx_t **c
###
### See http://subversion.tigris.org/issues/show_bug.cgi?id=4116.
*/
- cfg_servers = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_SERVERS,
- APR_HASH_KEY_STRING);
+ cfg_servers = svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_SERVERS);
svn_config_set_bool(cfg_servers, SVN_CONFIG_SECTION_GLOBAL,
SVN_CONFIG_OPTION_HTTP_BULK_UPDATES, TRUE);
svn_config_set_int64(cfg_servers, SVN_CONFIG_SECTION_GLOBAL,
Modified: subversion/trunk/subversion/svnrdump/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/util.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/util.c (original)
+++ subversion/trunk/subversion/svnrdump/util.c Sat Mar 23 15:44:36 2013
@@ -67,7 +67,7 @@ svn_rdump__normalize_props(apr_hash_t **
SVN_ERR(svn_rdump__normalize_prop(key, &value,
result_pool));
- apr_hash_set(*normal_props, key, APR_HASH_KEY_STRING, value);
+ svn_hash_sets(*normal_props, key, value);
}
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/serve.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/serve.c (original)
+++ subversion/trunk/subversion/svnserve/serve.c Sat Mar 23 15:44:36 2013
@@ -35,6 +35,7 @@
#include "svn_compat.h"
#include "svn_private_config.h" /* For SVN_PATH_LOCAL_SEPARATOR */
+#include "svn_hash.h"
#include "svn_types.h"
#include "svn_string.h"
#include "svn_pools.h"
@@ -1056,19 +1057,16 @@ get_props(apr_hash_t **props,
path, pool));
str = svn_string_create(apr_psprintf(pool, "%ld", crev),
pool);
- apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_REV, APR_HASH_KEY_STRING,
- str);
+ svn_hash_sets(*props, SVN_PROP_ENTRY_COMMITTED_REV, str);
str = (cdate) ? svn_string_create(cdate, pool) : NULL;
- apr_hash_set(*props, SVN_PROP_ENTRY_COMMITTED_DATE, APR_HASH_KEY_STRING,
- str);
+ svn_hash_sets(*props, SVN_PROP_ENTRY_COMMITTED_DATE, str);
str = (cauthor) ? svn_string_create(cauthor, pool) : NULL;
- apr_hash_set(*props, SVN_PROP_ENTRY_LAST_AUTHOR, APR_HASH_KEY_STRING,
- str);
+ svn_hash_sets(*props, SVN_PROP_ENTRY_LAST_AUTHOR, str);
/* Hardcode the values for the UUID. */
SVN_ERR(svn_fs_get_uuid(svn_fs_root_fs(root), &uuid, pool));
str = (uuid) ? svn_string_create(uuid, pool) : NULL;
- apr_hash_set(*props, SVN_PROP_ENTRY_UUID, APR_HASH_KEY_STRING, str);
+ svn_hash_sets(*props, SVN_PROP_ENTRY_UUID, str);
}
/* Get any inherited properties the user is authorized to. */
@@ -1438,14 +1436,14 @@ static svn_error_t *commit(svn_ra_svn_co
else
{
revprop_table = apr_hash_make(pool);
- apr_hash_set(revprop_table, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
- svn_string_create(log_msg, pool));
+ svn_hash_sets(revprop_table, SVN_PROP_REVISION_LOG,
+ svn_string_create(log_msg, pool));
}
/* Get author from the baton, making sure clients can't circumvent
the authentication via the revision props. */
- apr_hash_set(revprop_table, SVN_PROP_REVISION_AUTHOR, APR_HASH_KEY_STRING,
- b->user ? svn_string_create(b->user, pool) : NULL);
+ svn_hash_sets(revprop_table, SVN_PROP_REVISION_AUTHOR,
+ b->user ? svn_string_create(b->user, pool) : NULL);
ccb.pool = pool;
ccb.new_rev = &new_rev;
@@ -3507,12 +3505,12 @@ svn_error_t *serve(svn_ra_svn_conn_t *co
/* construct FS configuration parameters */
b.fs_config = apr_hash_make(pool);
- apr_hash_set(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS,
- APR_HASH_KEY_STRING, params->cache_txdeltas ? "1" : "0");
- apr_hash_set(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
- APR_HASH_KEY_STRING, params->cache_fulltexts ? "1" : "0");
- apr_hash_set(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
- APR_HASH_KEY_STRING, params->cache_revprops ? "1" : "0");
+ svn_hash_sets(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_DELTAS,
+ params->cache_txdeltas ? "1" :"0");
+ svn_hash_sets(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
+ params->cache_fulltexts ? "1" :"0");
+ svn_hash_sets(b.fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
+ params->cache_revprops ? "1" :"0");
/* Send greeting. We don't support version 1 any more, so we can
* send an empty mechlist. */