You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pr...@apache.org on 2013/04/05 07:29:34 UTC
svn commit: r1464833 [8/11] - in /subversion/branches/verify-keep-going: ./
build/ build/generator/ contrib/client-side/svncopy/ notes/
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/
subversion/bindings/...
Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/ssl_server_trust_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/ssl_server_trust_providers.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/ssl_server_trust_providers.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/ssl_server_trust_providers.c Fri Apr 5 05:29:29 2013
@@ -24,6 +24,7 @@
#include <apr_pools.h>
+#include "svn_hash.h"
#include "svn_auth.h"
#include "svn_error.h"
#include "svn_config.h"
@@ -50,13 +51,10 @@ ssl_server_trust_file_first_credentials(
const char *realmstring,
apr_pool_t *pool)
{
- apr_uint32_t *failures = apr_hash_get(parameters,
- SVN_AUTH_PARAM_SSL_SERVER_FAILURES,
- APR_HASH_KEY_STRING);
+ apr_uint32_t *failures = svn_hash_gets(parameters,
+ SVN_AUTH_PARAM_SSL_SERVER_FAILURES);
const svn_auth_ssl_server_cert_info_t *cert_info =
- apr_hash_get(parameters,
- SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO,
- APR_HASH_KEY_STRING);
+ svn_hash_gets(parameters, SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO);
apr_hash_t *creds_hash = NULL;
const char *config_dir;
svn_error_t *error = SVN_NO_ERROR;
@@ -65,9 +63,7 @@ ssl_server_trust_file_first_credentials(
*iter_baton = NULL;
/* Check if this is a permanently accepted certificate */
- config_dir = apr_hash_get(parameters,
- SVN_AUTH_PARAM_CONFIG_DIR,
- APR_HASH_KEY_STRING);
+ config_dir = svn_hash_gets(parameters, SVN_AUTH_PARAM_CONFIG_DIR);
error =
svn_config_read_auth_data(&creds_hash, SVN_AUTH_CRED_SSL_SERVER_TRUST,
realmstring, config_dir, pool);
@@ -77,11 +73,9 @@ ssl_server_trust_file_first_credentials(
svn_string_t *trusted_cert, *this_cert, *failstr;
apr_uint32_t last_failures = 0;
- trusted_cert = apr_hash_get(creds_hash, AUTHN_ASCII_CERT_KEY,
- APR_HASH_KEY_STRING);
+ trusted_cert = svn_hash_gets(creds_hash, AUTHN_ASCII_CERT_KEY);
this_cert = svn_string_create(cert_info->ascii_cert, pool);
- failstr = apr_hash_get(creds_hash, AUTHN_FAILURES_KEY,
- APR_HASH_KEY_STRING);
+ failstr = svn_hash_gets(creds_hash, AUTHN_FAILURES_KEY);
if (failstr)
{
@@ -131,20 +125,17 @@ ssl_server_trust_file_save_credentials(s
if (! creds->may_save)
return SVN_NO_ERROR;
- config_dir = apr_hash_get(parameters,
- SVN_AUTH_PARAM_CONFIG_DIR,
- APR_HASH_KEY_STRING);
-
- cert_info = apr_hash_get(parameters,
- SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO,
- APR_HASH_KEY_STRING);
+ config_dir = svn_hash_gets(parameters, SVN_AUTH_PARAM_CONFIG_DIR);
+
+ cert_info = svn_hash_gets(parameters, SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO);
creds_hash = apr_hash_make(pool);
- apr_hash_set(creds_hash, AUTHN_ASCII_CERT_KEY, APR_HASH_KEY_STRING,
- svn_string_create(cert_info->ascii_cert, pool));
- apr_hash_set(creds_hash, AUTHN_FAILURES_KEY, APR_HASH_KEY_STRING,
- svn_string_createf(pool, "%lu", (unsigned long)
- creds->accepted_failures));
+ svn_hash_sets(creds_hash, AUTHN_ASCII_CERT_KEY,
+ svn_string_create(cert_info->ascii_cert, pool));
+ svn_hash_sets(creds_hash,
+ AUTHN_FAILURES_KEY,
+ svn_string_createf(pool, "%lu",
+ (unsigned long)creds->accepted_failures));
SVN_ERR(svn_config_write_auth_data(creds_hash,
SVN_AUTH_CRED_SSL_SERVER_TRUST,
@@ -198,16 +189,12 @@ ssl_server_trust_prompt_first_cred(void
apr_pool_t *pool)
{
ssl_server_trust_prompt_provider_baton_t *pb = provider_baton;
- apr_uint32_t *failures = apr_hash_get(parameters,
- SVN_AUTH_PARAM_SSL_SERVER_FAILURES,
- APR_HASH_KEY_STRING);
- const char *no_auth_cache = apr_hash_get(parameters,
- SVN_AUTH_PARAM_NO_AUTH_CACHE,
- APR_HASH_KEY_STRING);
+ apr_uint32_t *failures = svn_hash_gets(parameters,
+ SVN_AUTH_PARAM_SSL_SERVER_FAILURES);
+ const char *no_auth_cache = svn_hash_gets(parameters,
+ SVN_AUTH_PARAM_NO_AUTH_CACHE);
const svn_auth_ssl_server_cert_info_t *cert_info =
- apr_hash_get(parameters,
- SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO,
- APR_HASH_KEY_STRING);
+ svn_hash_gets(parameters, SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO);
svn_boolean_t may_save = (!no_auth_cache
&& !(*failures & SVN_AUTH_SSL_OTHER));
Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/stream.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/stream.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/stream.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/stream.c Fri Apr 5 05:29:29 2013
@@ -1781,6 +1781,19 @@ seek_handler_lazyopen(void *baton,
return SVN_NO_ERROR;
}
+/* Implements svn_stream__is_buffered_fn_t */
+static svn_boolean_t
+is_buffered_lazyopen(void *baton)
+{
+ lazyopen_baton_t *b = baton;
+
+ /* No lazy open as we cannot handle an open error. */
+ if (!b->real_stream)
+ return FALSE;
+
+ return svn_stream__is_buffered(b->real_stream);
+}
+
svn_stream_t *
svn_stream_lazyopen_create(svn_stream_lazyopen_func_t open_func,
void *open_baton,
@@ -1801,6 +1814,7 @@ svn_stream_lazyopen_create(svn_stream_la
svn_stream_set_close(stream, close_handler_lazyopen);
svn_stream_set_mark(stream, mark_handler_lazyopen);
svn_stream_set_seek(stream, seek_handler_lazyopen);
+ svn_stream__set_is_buffered(stream, is_buffered_lazyopen);
return stream;
}
Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/subst.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/subst.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/subst.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/subst.c Fri Apr 5 05:29:29 2013
@@ -33,6 +33,7 @@
#include <apr_file_io.h>
#include <apr_strings.h>
+#include "svn_hash.h"
#include "svn_cmdline.h"
#include "svn_types.h"
#include "svn_string.h"
@@ -254,23 +255,23 @@ svn_subst_build_keywords(svn_subst_keywo
* only if the relevant keyword was present in keywords_val, otherwise
* leaving that slot untouched. */
- val = apr_hash_get(kwhash, SVN_KEYWORD_REVISION_LONG, APR_HASH_KEY_STRING);
+ val = svn_hash_gets(kwhash, SVN_KEYWORD_REVISION_LONG);
if (val)
kw->revision = val;
- val = apr_hash_get(kwhash, SVN_KEYWORD_DATE_LONG, APR_HASH_KEY_STRING);
+ val = svn_hash_gets(kwhash, SVN_KEYWORD_DATE_LONG);
if (val)
kw->date = val;
- val = apr_hash_get(kwhash, SVN_KEYWORD_AUTHOR_LONG, APR_HASH_KEY_STRING);
+ val = svn_hash_gets(kwhash, SVN_KEYWORD_AUTHOR_LONG);
if (val)
kw->author = val;
- val = apr_hash_get(kwhash, SVN_KEYWORD_URL_LONG, APR_HASH_KEY_STRING);
+ val = svn_hash_gets(kwhash, SVN_KEYWORD_URL_LONG);
if (val)
kw->url = val;
- val = apr_hash_get(kwhash, SVN_KEYWORD_ID, APR_HASH_KEY_STRING);
+ val = svn_hash_gets(kwhash, SVN_KEYWORD_ID);
if (val)
kw->id = val;
@@ -304,12 +305,9 @@ svn_subst_build_keywords2(apr_hash_t **k
svn_string_t *revision_val;
revision_val = keyword_printf("%r", rev, url, date, author, pool);
- apr_hash_set(*kw, SVN_KEYWORD_REVISION_LONG,
- APR_HASH_KEY_STRING, revision_val);
- apr_hash_set(*kw, SVN_KEYWORD_REVISION_MEDIUM,
- APR_HASH_KEY_STRING, revision_val);
- apr_hash_set(*kw, SVN_KEYWORD_REVISION_SHORT,
- APR_HASH_KEY_STRING, revision_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_REVISION_LONG, revision_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_REVISION_MEDIUM, revision_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_REVISION_SHORT, revision_val);
}
else if ((! strcmp(keyword, SVN_KEYWORD_DATE_LONG))
|| (! svn_cstring_casecmp(keyword, SVN_KEYWORD_DATE_SHORT)))
@@ -317,10 +315,8 @@ svn_subst_build_keywords2(apr_hash_t **k
svn_string_t *date_val;
date_val = keyword_printf("%D", rev, url, date, author, pool);
- apr_hash_set(*kw, SVN_KEYWORD_DATE_LONG,
- APR_HASH_KEY_STRING, date_val);
- apr_hash_set(*kw, SVN_KEYWORD_DATE_SHORT,
- APR_HASH_KEY_STRING, date_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_DATE_LONG, date_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_DATE_SHORT, date_val);
}
else if ((! strcmp(keyword, SVN_KEYWORD_AUTHOR_LONG))
|| (! svn_cstring_casecmp(keyword, SVN_KEYWORD_AUTHOR_SHORT)))
@@ -328,10 +324,8 @@ svn_subst_build_keywords2(apr_hash_t **k
svn_string_t *author_val;
author_val = keyword_printf("%a", rev, url, date, author, pool);
- apr_hash_set(*kw, SVN_KEYWORD_AUTHOR_LONG,
- APR_HASH_KEY_STRING, author_val);
- apr_hash_set(*kw, SVN_KEYWORD_AUTHOR_SHORT,
- APR_HASH_KEY_STRING, author_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_AUTHOR_LONG, author_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_AUTHOR_SHORT, author_val);
}
else if ((! strcmp(keyword, SVN_KEYWORD_URL_LONG))
|| (! svn_cstring_casecmp(keyword, SVN_KEYWORD_URL_SHORT)))
@@ -339,10 +333,8 @@ svn_subst_build_keywords2(apr_hash_t **k
svn_string_t *url_val;
url_val = keyword_printf("%u", rev, url, date, author, pool);
- apr_hash_set(*kw, SVN_KEYWORD_URL_LONG,
- APR_HASH_KEY_STRING, url_val);
- apr_hash_set(*kw, SVN_KEYWORD_URL_SHORT,
- APR_HASH_KEY_STRING, url_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_URL_LONG, url_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_URL_SHORT, url_val);
}
else if ((! svn_cstring_casecmp(keyword, SVN_KEYWORD_ID)))
{
@@ -350,8 +342,7 @@ svn_subst_build_keywords2(apr_hash_t **k
id_val = keyword_printf("%b %r %d %a", rev, url, date, author,
pool);
- apr_hash_set(*kw, SVN_KEYWORD_ID,
- APR_HASH_KEY_STRING, id_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_ID, id_val);
}
else if ((! svn_cstring_casecmp(keyword, SVN_KEYWORD_HEADER)))
{
@@ -359,8 +350,7 @@ svn_subst_build_keywords2(apr_hash_t **k
header_val = keyword_printf("%u %r %d %a", rev, url, date, author,
pool);
- apr_hash_set(*kw, SVN_KEYWORD_HEADER,
- APR_HASH_KEY_STRING, header_val);
+ svn_hash_sets(*kw, SVN_KEYWORD_HEADER, header_val);
}
}
@@ -559,7 +549,7 @@ match_keyword(char *buf,
keyword_name[i] = buf[i + 1];
keyword_name[i] = '\0';
- return apr_hash_get(keywords, keyword_name, APR_HASH_KEY_STRING) != NULL;
+ return svn_hash_gets(keywords, keyword_name) != NULL;
}
/* Try to translate keyword *KEYWORD_NAME in BUF (whose length is LEN):
@@ -595,7 +585,7 @@ translate_keyword(char *buf,
if (! keywords)
return FALSE;
- value = apr_hash_get(keywords, keyword_name, APR_HASH_KEY_STRING);
+ value = svn_hash_gets(keywords, keyword_name);
if (value)
{
@@ -1448,9 +1438,8 @@ stream_translated(svn_stream_t *stream,
void *val;
apr_hash_this(hi, &key, NULL, &val);
- apr_hash_set(copy, apr_pstrdup(result_pool, key),
- APR_HASH_KEY_STRING,
- svn_string_dup(val, result_pool));
+ svn_hash_sets(copy, apr_pstrdup(result_pool, key),
+ svn_string_dup(val, result_pool));
}
svn_pool_destroy(subpool);
Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/types.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/types.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/types.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/types.c Fri Apr 5 05:29:29 2013
@@ -24,6 +24,7 @@
#include <apr_pools.h>
#include <apr_uuid.h>
+#include "svn_hash.h"
#include "svn_types.h"
#include "svn_error.h"
#include "svn_string.h"
@@ -312,9 +313,8 @@ svn_log_entry_dup(const svn_log_entry_t
apr_hash_this(hi, &key, NULL, &change);
- apr_hash_set(new_entry->changed_paths2, apr_pstrdup(pool, key),
- APR_HASH_KEY_STRING,
- svn_log_changed_path2_dup(change, pool));
+ svn_hash_sets(new_entry->changed_paths2, apr_pstrdup(pool, key),
+ svn_log_changed_path2_dup(change, pool));
}
}
Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/username_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/username_providers.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/username_providers.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/username_providers.c Fri Apr 5 05:29:29 2013
@@ -28,6 +28,7 @@
/*** Includes. ***/
#include <apr_pools.h>
+#include "svn_hash.h"
#include "svn_auth.h"
#include "svn_error.h"
#include "svn_utf.h"
@@ -54,12 +55,10 @@ username_first_creds(void **credentials,
const char *realmstring,
apr_pool_t *pool)
{
- const char *config_dir = apr_hash_get(parameters,
- SVN_AUTH_PARAM_CONFIG_DIR,
- APR_HASH_KEY_STRING);
- const char *username = apr_hash_get(parameters,
- SVN_AUTH_PARAM_DEFAULT_USERNAME,
- APR_HASH_KEY_STRING);
+ const char *config_dir = svn_hash_gets(parameters,
+ SVN_AUTH_PARAM_CONFIG_DIR);
+ const char *username = svn_hash_gets(parameters,
+ SVN_AUTH_PARAM_DEFAULT_USERNAME);
svn_boolean_t may_save = !! username;
svn_error_t *err;
@@ -78,8 +77,7 @@ username_first_creds(void **credentials,
svn_error_clear(err);
if (! err && creds_hash)
{
- svn_string_t *str = apr_hash_get(creds_hash, AUTHN_USERNAME_KEY,
- APR_HASH_KEY_STRING);
+ svn_string_t *str = svn_hash_gets(creds_hash, AUTHN_USERNAME_KEY);
if (str && str->data)
username = str->data;
}
@@ -123,14 +121,12 @@ username_save_creds(svn_boolean_t *saved
if (! creds->may_save)
return SVN_NO_ERROR;
- config_dir = apr_hash_get(parameters,
- SVN_AUTH_PARAM_CONFIG_DIR,
- APR_HASH_KEY_STRING);
+ config_dir = svn_hash_gets(parameters, SVN_AUTH_PARAM_CONFIG_DIR);
/* Put the credentials in a hash and save it to disk */
creds_hash = apr_hash_make(pool);
- apr_hash_set(creds_hash, AUTHN_USERNAME_KEY, APR_HASH_KEY_STRING,
- svn_string_create(creds->username, pool));
+ svn_hash_sets(creds_hash, AUTHN_USERNAME_KEY,
+ svn_string_create(creds->username, pool));
err = svn_config_write_auth_data(creds_hash, SVN_AUTH_CRED_USERNAME,
realmstring, config_dir, pool);
svn_error_clear(err);
@@ -200,9 +196,7 @@ prompt_for_username_creds(svn_auth_cred_
/* If we're allowed to check for default usernames, do so. */
if (first_time)
- def_username = apr_hash_get(parameters,
- SVN_AUTH_PARAM_DEFAULT_USERNAME,
- APR_HASH_KEY_STRING);
+ def_username = svn_hash_gets(parameters, SVN_AUTH_PARAM_DEFAULT_USERNAME);
/* If we have defaults, just build the cred here and return it.
*
@@ -238,9 +232,8 @@ username_prompt_first_creds(void **crede
{
username_prompt_provider_baton_t *pb = provider_baton;
username_prompt_iter_baton_t *ibaton = apr_pcalloc(pool, sizeof(*ibaton));
- const char *no_auth_cache = apr_hash_get(parameters,
- SVN_AUTH_PARAM_NO_AUTH_CACHE,
- APR_HASH_KEY_STRING);
+ const char *no_auth_cache = svn_hash_gets(parameters,
+ SVN_AUTH_PARAM_NO_AUTH_CACHE);
SVN_ERR(prompt_for_username_creds
((svn_auth_cred_username_t **) credentials_p, pb,
@@ -266,9 +259,8 @@ username_prompt_next_creds(void **creden
{
username_prompt_iter_baton_t *ib = iter_baton;
username_prompt_provider_baton_t *pb = provider_baton;
- const char *no_auth_cache = apr_hash_get(parameters,
- SVN_AUTH_PARAM_NO_AUTH_CACHE,
- APR_HASH_KEY_STRING);
+ const char *no_auth_cache = svn_hash_gets(parameters,
+ SVN_AUTH_PARAM_NO_AUTH_CACHE);
if ((pb->retry_limit >= 0) && (ib->retries >= pb->retry_limit))
{
Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/utf.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/utf.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/utf.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/utf.c Fri Apr 5 05:29:29 2013
@@ -32,6 +32,7 @@
#include <apr_xlate.h>
#include <apr_atomic.h>
+#include "svn_hash.h"
#include "svn_string.h"
#include "svn_error.h"
#include "svn_pools.h"
@@ -292,9 +293,8 @@ get_xlate_handle_node_internal(xlate_han
xlate_handle_node_t *old_node = NULL;
/* 2nd level: hash lookup */
- xlate_handle_node_t **old_node_p = apr_hash_get(xlate_handle_hash,
- userdata_key,
- APR_HASH_KEY_STRING);
+ xlate_handle_node_t **old_node_p = svn_hash_gets(xlate_handle_hash,
+ userdata_key);
if (old_node_p)
old_node = *old_node_p;
if (old_node)
@@ -388,9 +388,7 @@ static svn_error_t *
put_xlate_handle_node_internal(xlate_handle_node_t *node,
const char *userdata_key)
{
- xlate_handle_node_t **node_p = apr_hash_get(xlate_handle_hash,
- userdata_key,
- APR_HASH_KEY_STRING);
+ xlate_handle_node_t **node_p = svn_hash_gets(xlate_handle_hash, userdata_key);
if (node_p == NULL)
{
userdata_key = apr_pstrdup(apr_hash_pool_get(xlate_handle_hash),
@@ -398,8 +396,7 @@ put_xlate_handle_node_internal(xlate_han
node_p = apr_palloc(apr_hash_pool_get(xlate_handle_hash),
sizeof(*node_p));
*node_p = NULL;
- apr_hash_set(xlate_handle_hash, userdata_key,
- APR_HASH_KEY_STRING, node_p);
+ svn_hash_sets(xlate_handle_hash, userdata_key, node_p);
}
node->next = *node_p;
*node_p = node;
Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/utf_validate.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/utf_validate.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/utf_validate.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/utf_validate.c Fri Apr 5 05:29:29 2013
@@ -308,6 +308,13 @@ first_non_fsm_start_char_cstring(const c
return data;
/* Scan the input one machine word at a time. */
+#ifndef SVN_UTF_NO_UNINITIALISED_ACCESS
+ /* This may read allocated but initialised bytes beyond the
+ terminating null. Any such bytes are always readable and this
+ code operates correctly whatever the uninitialised values happen
+ to be. However memory checking tools such as valgrind and GCC
+ 4.8's address santitizer will object so this bit of code can be
+ disabled at compile time. */
for (; ; data += sizeof(apr_uintptr_t))
{
/* Check for non-ASCII chars: */
@@ -320,6 +327,7 @@ first_non_fsm_start_char_cstring(const c
if ((chunk & SVN__BIT_7_SET) != SVN__BIT_7_SET)
break;
}
+#endif
/* The remaining odd bytes will be examined the naive way: */
for (; ; ++data)
Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/version.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/version.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/version.c Fri Apr 5 05:29:29 2013
@@ -206,7 +206,9 @@ svn_version__parse_version_string(svn_ve
svn_cstring_split(version_string, ".", FALSE, result_pool);
if ((pieces->nelts < 2) || (pieces->nelts > 3))
- return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING, NULL, NULL);
+ return svn_error_createf(SVN_ERR_MALFORMED_VERSION_STRING, NULL,
+ _("Failed to parse version number string '%s'"),
+ version_string);
version = apr_pcalloc(result_pool, sizeof(*version));
version->tag = "";
@@ -215,11 +217,15 @@ svn_version__parse_version_string(svn_ve
err = svn_cstring_atoi(&(version->major),
APR_ARRAY_IDX(pieces, 0, const char *));
if (err)
- return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING, err, NULL);
+ return svn_error_createf(SVN_ERR_MALFORMED_VERSION_STRING, err,
+ _("Failed to parse version number string '%s'"),
+ version_string);
err = svn_cstring_atoi(&(version->minor),
APR_ARRAY_IDX(pieces, 1, const char *));
if (err)
- return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING, err, NULL);
+ return svn_error_createf(SVN_ERR_MALFORMED_VERSION_STRING, err,
+ _("Failed to parse version number string '%s'"),
+ version_string);
/* If there's a third component, we'll parse it, too. But we don't
require that it be present. */
@@ -234,10 +240,17 @@ svn_version__parse_version_string(svn_ve
}
err = svn_cstring_atoi(&(version->patch), piece);
if (err)
- return svn_error_create(SVN_ERR_MALFORMED_VERSION_STRING,
- err, NULL);
+ return svn_error_createf(SVN_ERR_MALFORMED_VERSION_STRING, err,
+ _("Failed to parse version number string '%s'"
+ ),
+ version_string);
}
+ if (version->major < 0 || version->minor < 0 || version->patch < 0)
+ return svn_error_createf(SVN_ERR_MALFORMED_VERSION_STRING, err,
+ _("Failed to parse version number string '%s'"),
+ version_string);
+
*version_p = version;
return SVN_NO_ERROR;
}
Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/win32_crypto.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/win32_crypto.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/win32_crypto.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/win32_crypto.c Fri Apr 5 05:29:29 2013
@@ -34,6 +34,7 @@ typedef int win32_crypto__dummy;
#include <apr_base64.h>
#include "svn_auth.h"
#include "svn_error.h"
+#include "svn_hash.h"
#include "svn_utf.h"
#include "svn_config.h"
#include "svn_user.h"
@@ -435,13 +436,10 @@ windows_ssl_server_trust_first_credentia
const char *realmstring,
apr_pool_t *pool)
{
- apr_uint32_t *failures = apr_hash_get(parameters,
- SVN_AUTH_PARAM_SSL_SERVER_FAILURES,
- APR_HASH_KEY_STRING);
+ apr_uint32_t *failures = svn_hash_gets(parameters,
+ SVN_AUTH_PARAM_SSL_SERVER_FAILURES);
const svn_auth_ssl_server_cert_info_t *cert_info =
- apr_hash_get(parameters,
- SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO,
- APR_HASH_KEY_STRING);
+ svn_hash_gets(parameters, SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO);
*credentials = NULL;
*iter_baton = NULL;
Modified: subversion/branches/verify-keep-going/subversion/libsvn_subr/xml.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_subr/xml.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_subr/xml.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_subr/xml.c Fri Apr 5 05:29:29 2013
@@ -27,6 +27,7 @@
#include <assert.h>
#include "svn_private_config.h" /* for SVN_HAVE_OLD_EXPAT */
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_xml.h"
#include "svn_error.h"
@@ -533,7 +534,7 @@ svn_xml_ap_to_hash(va_list ap, apr_pool_
while ((key = va_arg(ap, char *)) != NULL)
{
const char *val = va_arg(ap, const char *);
- apr_hash_set(ht, key, APR_HASH_KEY_STRING, val);
+ svn_hash_sets(ht, key, val);
}
return ht;
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/adm_crawler.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/adm_crawler.c Fri Apr 5 05:29:29 2013
@@ -30,6 +30,7 @@
#include <apr_file_io.h>
#include <apr_hash.h>
+#include "svn_hash.h"
#include "svn_types.h"
#include "svn_pools.h"
#include "svn_wc.h"
@@ -369,7 +370,7 @@ report_revisions_and_depths(svn_wc__db_t
/* Is the entry NOT on the disk? We may be able to restore it. */
if (restore_files
- && apr_hash_get(dirents, child, APR_HASH_KEY_STRING) == NULL)
+ && svn_hash_gets(dirents, child) == NULL)
{
svn_wc__db_status_t wrk_status;
svn_node_kind_t wrk_kind;
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/adm_ops.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/adm_ops.c Fri Apr 5 05:29:29 2013
@@ -55,6 +55,7 @@
#include "svn_private_config.h"
#include "private/svn_subr_private.h"
+#include "private/svn_dep_compat.h"
struct svn_wc_committed_queue_t
@@ -296,7 +297,7 @@ svn_wc__process_committed_internal(svn_w
this_abspath = svn_dirent_join(local_abspath, name, iterpool);
sha1_checksum = NULL;
- cqi = apr_hash_get(queue->queue, this_abspath, APR_HASH_KEY_STRING);
+ cqi = svn_hash_gets(queue->queue, this_abspath);
if (cqi != NULL)
sha1_checksum = cqi->sha1_checksum;
@@ -341,7 +342,7 @@ svn_wc__prop_array_to_hash(const apr_arr
{
const svn_prop_t *prop = APR_ARRAY_IDX(props, i, const svn_prop_t *);
if (prop->value != NULL)
- apr_hash_set(prophash, prop->name, APR_HASH_KEY_STRING, prop->value);
+ svn_hash_sets(prophash, prop->name, prop->value);
}
return prophash;
@@ -392,7 +393,7 @@ svn_wc_queue_committed3(svn_wc_committed
cqi->sha1_checksum = sha1_checksum;
cqi->new_dav_cache = svn_wc__prop_array_to_hash(wcprop_changes, queue->pool);
- apr_hash_set(queue->queue, local_abspath, APR_HASH_KEY_STRING, cqi);
+ svn_hash_sets(queue->queue, local_abspath, cqi);
return SVN_NO_ERROR;
}
@@ -487,16 +488,15 @@ svn_wc_process_committed_queue2(svn_wc_c
wc_ctx->db, cqi->local_abspath,
iterpool, iterpool));
- if (! apr_hash_get(run_wqs, wcroot_abspath, APR_HASH_KEY_STRING))
+ if (! svn_hash_gets(run_wqs, wcroot_abspath))
{
wcroot_abspath = apr_pstrdup(scratch_pool, wcroot_abspath);
- apr_hash_set(run_wqs, wcroot_abspath, APR_HASH_KEY_STRING,
- wcroot_abspath);
+ svn_hash_sets(run_wqs, wcroot_abspath, wcroot_abspath);
}
}
/* Make sure nothing happens if this function is called again. */
- SVN_ERR(svn_hash__clear(queue->queue, iterpool));
+ apr_hash_clear(queue->queue);
/* Ok; everything is committed now. Now we can start calling callbacks */
@@ -1385,8 +1385,7 @@ svn_wc__internal_changelist_match(svn_wc
}
return (changelist
- && apr_hash_get((apr_hash_t *)clhash, changelist,
- APR_HASH_KEY_STRING) != NULL);
+ && svn_hash_gets((apr_hash_t *)clhash, changelist) != NULL);
}
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/conflicts.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/conflicts.c Fri Apr 5 05:29:29 2013
@@ -32,6 +32,7 @@
#include <apr_hash.h>
#include <apr_errno.h>
+#include "svn_hash.h"
#include "svn_types.h"
#include "svn_pools.h"
#include "svn_string.h"
@@ -890,10 +891,9 @@ svn_wc__conflict_read_prop_conflict(cons
for (name = c->children; name; name = name->next)
{
- apr_hash_set(*conflicted_prop_names,
- apr_pstrmemdup(result_pool, name->data, name->len),
- APR_HASH_KEY_STRING,
- "");
+ svn_hash_sets(*conflicted_prop_names,
+ apr_pstrmemdup(result_pool, name->data, name->len),
+ "");
}
}
c = c->next;
@@ -1216,20 +1216,16 @@ svn_wc__conflict_create_markers(svn_skel
SVN_ERR(prop_conflict_skel_add(
prop_data, propname,
old_props
- ? apr_hash_get(old_props, propname,
- APR_HASH_KEY_STRING)
+ ? svn_hash_gets(old_props, propname)
: NULL,
mine_props
- ? apr_hash_get(mine_props, propname,
- APR_HASH_KEY_STRING)
+ ? svn_hash_gets(mine_props, propname)
: NULL,
their_props
- ? apr_hash_get(their_props, propname,
- APR_HASH_KEY_STRING)
+ ? svn_hash_gets(their_props, propname)
: NULL,
their_original_props
- ? apr_hash_get(their_original_props, propname,
- APR_HASH_KEY_STRING)
+ ? svn_hash_gets(their_original_props, propname)
: NULL,
result_pool, scratch_pool));
}
@@ -1507,7 +1503,7 @@ generate_propconflict(svn_boolean_t *con
SVN_ERR(svn_wc__db_read_props(&props, db, local_abspath, scratch_pool,
scratch_pool));
- apr_hash_set(props, propname, APR_HASH_KEY_STRING, new_value);
+ svn_hash_sets(props, propname, new_value);
SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, props,
FALSE, NULL, NULL,
@@ -1947,20 +1943,16 @@ svn_wc__conflict_invoke_resolver(svn_wc_
right_version,
propname,
old_props
- ? apr_hash_get(old_props, propname,
- APR_HASH_KEY_STRING)
+ ? svn_hash_gets(old_props, propname)
: NULL,
mine_props
- ? apr_hash_get(mine_props, propname,
- APR_HASH_KEY_STRING)
+ ? svn_hash_gets(mine_props, propname)
: NULL,
old_their_props
- ? apr_hash_get(old_their_props, propname,
- APR_HASH_KEY_STRING)
+ ? svn_hash_gets(old_their_props, propname)
: NULL,
their_props
- ? apr_hash_get(their_props, propname,
- APR_HASH_KEY_STRING)
+ ? svn_hash_gets(their_props, propname)
: NULL,
resolver_func, resolver_baton,
iterpool));
@@ -2133,9 +2125,8 @@ read_prop_conflicts(apr_array_header_t *
desc->property_name = apr_pstrdup(result_pool, propname);
- my_value = apr_hash_get(my_props, propname, APR_HASH_KEY_STRING);
- their_value = apr_hash_get(their_props, propname,
- APR_HASH_KEY_STRING);
+ my_value = svn_hash_gets(my_props, propname);
+ their_value = svn_hash_gets(their_props, propname);
/* Compute the incoming side of the conflict ('action'). */
if (their_value == NULL)
@@ -2191,7 +2182,7 @@ read_prop_conflicts(apr_array_header_t *
SVN_ERR(svn_stream_close(s));
}
- old_value = apr_hash_get(their_old_props, propname, APR_HASH_KEY_STRING);
+ old_value = svn_hash_gets(their_old_props, propname);
if (old_value)
{
svn_stream_t *s;
@@ -2595,11 +2586,9 @@ resolve_prop_conflict_on_node(svn_boolea
const char *propname = svn__apr_hash_index_key(hi);
svn_string_t *new_value = NULL;
- new_value = apr_hash_get(resolve_from, propname,
- APR_HASH_KEY_STRING);
+ new_value = svn_hash_gets(resolve_from, propname);
- apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING,
- new_value);
+ svn_hash_sets(actual_props, propname, new_value);
}
SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, actual_props,
FALSE, NULL, NULL,
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/copy.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/copy.c Fri Apr 5 05:29:29 2013
@@ -32,6 +32,7 @@
#include "svn_error.h"
#include "svn_dirent_uri.h"
#include "svn_path.h"
+#include "svn_hash.h"
#include "wc.h"
#include "workqueue.h"
@@ -447,7 +448,7 @@ copy_versioned_dir(svn_wc__db_t *db,
|| info->status == svn_wc__db_status_added))
{
/* Remove versioned child as it has been handled */
- apr_hash_set(disk_children, child_name, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(disk_children, child_name, NULL);
}
}
@@ -481,8 +482,7 @@ copy_versioned_dir(svn_wc__db_t *db,
unver_dst_abspath = svn_dirent_join(dst_abspath, name, iterpool);
if (marker_files &&
- apr_hash_get(marker_files, unver_src_abspath,
- APR_HASH_KEY_STRING))
+ svn_hash_gets(marker_files, unver_src_abspath))
continue;
SVN_ERR(copy_to_tmpdir(&work_item, NULL, db, unver_src_abspath,
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/deprecated.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/deprecated.c Fri Apr 5 05:29:29 2013
@@ -32,6 +32,7 @@
#include "svn_subst.h"
#include "svn_pools.h"
#include "svn_props.h"
+#include "svn_hash.h"
#include "svn_time.h"
#include "svn_dirent_uri.h"
#include "svn_path.h"
@@ -85,8 +86,7 @@ traversal_info_update(void *baton,
{
dup_val = apr_pstrmemdup(dup_pool, old_val->data, old_val->len);
- apr_hash_set(ub->traversal->externals_old, dup_path, APR_HASH_KEY_STRING,
- dup_val);
+ svn_hash_sets(ub->traversal->externals_old, dup_path, dup_val);
}
if (new_val)
@@ -95,12 +95,10 @@ traversal_info_update(void *baton,
if (old_val != new_val)
dup_val = apr_pstrmemdup(dup_pool, new_val->data, new_val->len);
- apr_hash_set(ub->traversal->externals_new, dup_path, APR_HASH_KEY_STRING,
- dup_val);
+ svn_hash_sets(ub->traversal->externals_new, dup_path, dup_val);
}
- apr_hash_set(ub->traversal->depths, dup_path, APR_HASH_KEY_STRING,
- svn_depth_to_word(depth));
+ svn_hash_sets(ub->traversal->depths, dup_path, svn_depth_to_word(depth));
return SVN_NO_ERROR;
}
@@ -138,19 +136,15 @@ gather_traversal_info(svn_wc_context_t *
traversal_info->pool);
if (gather_as_old)
- apr_hash_set(traversal_info->externals_old,
- relpath, APR_HASH_KEY_STRING,
- svn__apr_hash_index_val(hi));
+ svn_hash_sets(traversal_info->externals_old, relpath,
+ svn__apr_hash_index_val(hi));
if (gather_as_new)
- apr_hash_set(traversal_info->externals_new,
- relpath, APR_HASH_KEY_STRING,
- svn__apr_hash_index_val(hi));
-
- apr_hash_set(traversal_info->depths,
- relpath, APR_HASH_KEY_STRING,
- apr_hash_get(ambient_depths, node_abspath,
- APR_HASH_KEY_STRING));
+ svn_hash_sets(traversal_info->externals_new, relpath,
+ svn__apr_hash_index_val(hi));
+
+ svn_hash_sets(traversal_info->depths, relpath,
+ svn_hash_gets(ambient_depths, node_abspath));
}
return SVN_NO_ERROR;
@@ -2357,8 +2351,7 @@ svn_wc_parse_externals_description(apr_h
svn_wc_external_item_t *item;
item = APR_ARRAY_IDX(list, i, svn_wc_external_item_t *);
- apr_hash_set(*externals_p, item->target_dir,
- APR_HASH_KEY_STRING, item);
+ svn_hash_sets(*externals_p, item->target_dir, item);
}
}
return SVN_NO_ERROR;
@@ -3148,8 +3141,7 @@ svn_wc_add_repos_file2(const char *dst_p
/* If the new file is special, then we can simply open the given
contents since it is already in normal form. */
- if (apr_hash_get(new_props,
- SVN_PROP_SPECIAL, APR_HASH_KEY_STRING) != NULL)
+ if (svn_hash_gets(new_props, SVN_PROP_SPECIAL) != NULL)
{
SVN_ERR(svn_stream_open_readonly(&new_contents, new_text_path,
pool, pool));
@@ -3162,8 +3154,7 @@ svn_wc_add_repos_file2(const char *dst_p
apr_hash_t *keywords = NULL;
svn_string_t *list;
- list = apr_hash_get(new_props,
- SVN_PROP_KEYWORDS, APR_HASH_KEY_STRING);
+ list = svn_hash_gets(new_props, SVN_PROP_KEYWORDS);
if (list != NULL)
{
/* Since we are detranslating, all of the keyword values
@@ -3177,9 +3168,8 @@ svn_wc_add_repos_file2(const char *dst_p
}
svn_subst_eol_style_from_value(&eol_style, &eol_str,
- apr_hash_get(new_props,
- SVN_PROP_EOL_STYLE,
- APR_HASH_KEY_STRING));
+ svn_hash_gets(new_props,
+ SVN_PROP_EOL_STYLE));
if (svn_subst_translation_required(eol_style, eol_str, keywords,
FALSE, FALSE))
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/diff_local.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/diff_local.c Fri Apr 5 05:29:29 2013
@@ -246,8 +246,7 @@ diff_status_callback(void *baton,
if (eb->changelist_hash != NULL
&& (!status->changelist
- || ! apr_hash_get(eb->changelist_hash, status->changelist,
- APR_HASH_KEY_STRING)))
+ || ! svn_hash_gets(eb->changelist_hash, status->changelist)))
return SVN_NO_ERROR; /* Filtered via changelist */
/* This code does about the same thing as the inner body of
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/entries.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/entries.c Fri Apr 5 05:29:29 2013
@@ -34,6 +34,7 @@
#include "svn_path.h"
#include "svn_ctype.h"
#include "svn_string.h"
+#include "svn_hash.h"
#include "wc.h"
#include "adm_files.h"
@@ -470,8 +471,7 @@ read_one_entry(const svn_wc_entry_t **ne
{
if (!tree_conflicts)
tree_conflicts = apr_hash_make(scratch_pool);
- apr_hash_set(tree_conflicts, child_name,
- APR_HASH_KEY_STRING, conflict);
+ svn_hash_sets(tree_conflicts, child_name, conflict);
}
}
}
@@ -971,7 +971,7 @@ read_entries_new(apr_hash_t **result_ent
"" /* name */,
NULL /* parent_entry */,
result_pool, iterpool));
- apr_hash_set(entries, "", APR_HASH_KEY_STRING, parent_entry);
+ svn_hash_sets(entries, "", parent_entry);
/* Use result_pool so that the child names (used by reference, rather
than copied) appear in result_pool. */
@@ -988,7 +988,7 @@ read_entries_new(apr_hash_t **result_ent
SVN_ERR(read_one_entry(&entry,
db, wc_id, local_abspath, name, parent_entry,
result_pool, iterpool));
- apr_hash_set(entries, entry->name, APR_HASH_KEY_STRING, entry);
+ svn_hash_sets(entries, entry->name, entry);
}
svn_pool_destroy(iterpool);
@@ -1365,7 +1365,7 @@ prune_deleted(apr_hash_t **entries_prune
SVN_ERR(svn_wc__entry_is_hidden(&hidden, entry));
if (!hidden)
- apr_hash_set(*entries_pruned, key, APR_HASH_KEY_STRING, entry);
+ svn_hash_sets(*entries_pruned, key, entry);
}
return SVN_NO_ERROR;
@@ -1581,6 +1581,15 @@ struct write_baton {
apr_hash_t *tree_conflicts;
};
+#define WRITE_ENTRY_ASSERT(expr) \
+ if (!(expr)) \
+ return svn_error_createf(SVN_ERR_ASSERTION_FAIL, NULL, \
+ _("Unable to upgrade '%s' at line %d"), \
+ svn_dirent_local_style( \
+ svn_dirent_join(root_abspath, \
+ local_relpath, \
+ scratch_pool), \
+ scratch_pool), __LINE__)
/* Write the information for ENTRY to WC_DB. The WC_ID, REPOS_ID and
REPOS_ROOT will all be used for writing ENTRY.
@@ -1696,9 +1705,10 @@ write_entry(struct write_baton **entry_n
replace+copied replace+copied [base|work]+work [base|work]+work
*/
- SVN_ERR_ASSERT(parent_node || entry->schedule == svn_wc_schedule_normal);
- SVN_ERR_ASSERT(!parent_node || parent_node->base
- || parent_node->below_work || parent_node->work);
+ WRITE_ENTRY_ASSERT(parent_node || entry->schedule == svn_wc_schedule_normal);
+
+ WRITE_ENTRY_ASSERT(!parent_node || parent_node->base
+ || parent_node->below_work || parent_node->work);
switch (entry->schedule)
{
@@ -1743,8 +1753,8 @@ write_entry(struct write_baton **entry_n
BASE node to indicate the not-present node. */
if (entry->deleted)
{
- SVN_ERR_ASSERT(base_node || below_working_node);
- SVN_ERR_ASSERT(!entry->incomplete);
+ WRITE_ENTRY_ASSERT(base_node || below_working_node);
+ WRITE_ENTRY_ASSERT(!entry->incomplete);
if (base_node)
base_node->presence = svn_wc__db_status_not_present;
else
@@ -1752,8 +1762,8 @@ write_entry(struct write_baton **entry_n
}
else if (entry->absent)
{
- SVN_ERR_ASSERT(base_node && !working_node && !below_working_node);
- SVN_ERR_ASSERT(!entry->incomplete);
+ WRITE_ENTRY_ASSERT(base_node && !working_node && !below_working_node);
+ WRITE_ENTRY_ASSERT(!entry->incomplete);
base_node->presence = svn_wc__db_status_server_excluded;
}
@@ -1865,7 +1875,7 @@ write_entry(struct write_baton **entry_n
scratch_pool),
scratch_pool, scratch_pool));
- SVN_ERR_ASSERT(conflict->kind == svn_wc_conflict_kind_tree);
+ WRITE_ENTRY_ASSERT(conflict->kind == svn_wc_conflict_kind_tree);
/* Fix dubious data stored by old clients, local adds don't have
a repository URL. */
@@ -1878,9 +1888,8 @@ write_entry(struct write_baton **entry_n
/* Store in hash to be retrieved when writing the child
row. */
key = svn_dirent_skip_ancestor(root_abspath, conflict->local_abspath);
- apr_hash_set(tree_conflicts, apr_pstrdup(result_pool, key),
- APR_HASH_KEY_STRING,
- svn_skel__unparse(new_skel, result_pool)->data);
+ svn_hash_sets(tree_conflicts, apr_pstrdup(result_pool, key),
+ svn_skel__unparse(new_skel, result_pool)->data);
skel = skel->next;
}
}
@@ -1889,9 +1898,8 @@ write_entry(struct write_baton **entry_n
if (parent_node && parent_node->tree_conflicts)
{
- const char *tree_conflict_data = apr_hash_get(parent_node->tree_conflicts,
- local_relpath,
- APR_HASH_KEY_STRING);
+ const char *tree_conflict_data =
+ svn_hash_gets(parent_node->tree_conflicts, local_relpath);
if (tree_conflict_data)
{
actual_node = MAYBE_ALLOC(actual_node, scratch_pool);
@@ -1900,8 +1908,7 @@ write_entry(struct write_baton **entry_n
/* Reset hash so that we don't write the row again when writing
actual-only nodes */
- apr_hash_set(parent_node->tree_conflicts, local_relpath,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(parent_node->tree_conflicts, local_relpath, NULL);
}
if (entry->file_external_path != NULL)
@@ -1931,14 +1938,15 @@ write_entry(struct write_baton **entry_n
if (entry->deleted)
{
- SVN_ERR_ASSERT(base_node->presence == svn_wc__db_status_not_present);
+ WRITE_ENTRY_ASSERT(base_node->presence
+ == svn_wc__db_status_not_present);
/* ### should be svn_node_unknown, but let's store what we have. */
base_node->kind = entry->kind;
}
else if (entry->absent)
{
- SVN_ERR_ASSERT(base_node->presence
- == svn_wc__db_status_server_excluded);
+ WRITE_ENTRY_ASSERT(base_node->presence
+ == svn_wc__db_status_server_excluded);
/* ### should be svn_node_unknown, but let's store what we have. */
base_node->kind = entry->kind;
@@ -1971,8 +1979,8 @@ write_entry(struct write_baton **entry_n
else if (entry->incomplete)
{
/* ### nobody should have set the presence. */
- SVN_ERR_ASSERT(base_node->presence
- == svn_wc__db_status_normal);
+ WRITE_ENTRY_ASSERT(base_node->presence
+ == svn_wc__db_status_normal);
base_node->presence = svn_wc__db_status_incomplete;
}
}
@@ -2222,8 +2230,8 @@ write_entry(struct write_baton **entry_n
if (entry->incomplete)
{
/* We shouldn't be overwriting another status. */
- SVN_ERR_ASSERT(working_node->presence
- == svn_wc__db_status_normal);
+ WRITE_ENTRY_ASSERT(working_node->presence
+ == svn_wc__db_status_normal);
working_node->presence = svn_wc__db_status_incomplete;
}
}
@@ -2344,8 +2352,7 @@ svn_wc__write_upgraded_entries(void **di
struct write_baton *dir_node;
/* Get a copy of the "this dir" entry for comparison purposes. */
- this_dir = apr_hash_get(entries, SVN_WC_ENTRY_THIS_DIR,
- APR_HASH_KEY_STRING);
+ this_dir = svn_hash_gets(entries, SVN_WC_ENTRY_THIS_DIR);
/* If there is no "this dir" entry, something is wrong. */
if (! this_dir)
@@ -2376,7 +2383,7 @@ svn_wc__write_upgraded_entries(void **di
const svn_wc_entry_t *this_entry = svn__apr_hash_index_val(hi);
const char *child_abspath, *child_relpath;
svn_wc__text_base_info_t *text_base_info
- = apr_hash_get(text_bases_info, name, APR_HASH_KEY_STRING);
+ = svn_hash_gets(text_bases_info, name);
svn_pool_clear(iterpool);
@@ -2502,8 +2509,7 @@ walker_helper(const char *dirpath,
SVN_ERR(walk_callbacks->handle_error(dirpath, err, walk_baton, pool));
/* As promised, always return the '.' entry first. */
- dot_entry = apr_hash_get(entries, SVN_WC_ENTRY_THIS_DIR,
- APR_HASH_KEY_STRING);
+ dot_entry = svn_hash_gets(entries, SVN_WC_ENTRY_THIS_DIR);
if (! dot_entry)
return walk_callbacks->handle_error
(dirpath, svn_error_createf(SVN_ERR_ENTRY_NOT_FOUND, NULL,
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/externals.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/externals.c Fri Apr 5 05:29:29 2013
@@ -360,7 +360,7 @@ svn_wc__externals_find_target_dups(apr_a
target = APR_ARRAY_IDX(externals, i,
svn_wc_external_item2_t*)->target_dir;
len = apr_hash_count(targets);
- apr_hash_set(targets, target, APR_HASH_KEY_STRING, "");
+ svn_hash_sets(targets, target, "");
if (len == apr_hash_count(targets))
{
/* Hashtable length is unchanged. This must be a duplicate. */
@@ -370,7 +370,7 @@ svn_wc__externals_find_target_dups(apr_a
if (! targets2)
targets2 = apr_hash_make(scratch_pool);
len2 = apr_hash_count(targets2);
- apr_hash_set(targets2, target, APR_HASH_KEY_STRING, "");
+ svn_hash_sets(targets2, target, "");
if (len2 < apr_hash_count(targets2))
{
/* The second hash list just got bigger, i.e. this target has
@@ -953,8 +953,7 @@ close_edit(void *edit_baton,
if (eb->iprops)
{
wcroot_iprops = apr_hash_make(pool);
- apr_hash_set(wcroot_iprops, eb->local_abspath, APR_HASH_KEY_STRING,
- eb->iprops);
+ svn_hash_sets(wcroot_iprops, eb->local_abspath, eb->iprops);
}
/* The node wasn't updated, so we just have to bump its revision */
@@ -1462,8 +1461,7 @@ svn_wc__externals_gather_definitions(apr
}
if (value)
- apr_hash_set(*externals, local_abspath, APR_HASH_KEY_STRING,
- value->data);
+ svn_hash_sets(*externals, local_abspath, value->data);
if (value && depths)
{
@@ -1478,8 +1476,7 @@ svn_wc__externals_gather_definitions(apr
wc_ctx->db, local_abspath,
scratch_pool, scratch_pool));
- apr_hash_set(*depths, local_abspath, APR_HASH_KEY_STRING,
- svn_depth_to_word(node_depth));
+ svn_hash_sets(*depths, local_abspath, svn_depth_to_word(node_depth));
}
return SVN_NO_ERROR;
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/info.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/info.c Fri Apr 5 05:29:29 2013
@@ -22,6 +22,7 @@
*/
#include "svn_dirent_uri.h"
+#include "svn_hash.h"
#include "svn_path.h"
#include "svn_pools.h"
#include "svn_wc.h"
@@ -427,18 +428,17 @@ info_found_node_callback(const char *loc
{
const char *this_basename = APR_ARRAY_IDX(victims, i, const char *);
- apr_hash_set(fe_baton->tree_conflicts,
- svn_dirent_join(local_abspath, this_basename,
- fe_baton->pool),
- APR_HASH_KEY_STRING, "");
+ svn_hash_sets(fe_baton->tree_conflicts,
+ svn_dirent_join(local_abspath, this_basename,
+ fe_baton->pool),
+ "");
}
}
/* Delete this path which we are currently visiting from the list of tree
* conflicts. This relies on the walker visiting a directory before visiting
* its children. */
- apr_hash_set(fe_baton->tree_conflicts, local_abspath, APR_HASH_KEY_STRING,
- NULL);
+ svn_hash_sets(fe_baton->tree_conflicts, local_abspath, NULL);
return SVN_NO_ERROR;
}
@@ -523,8 +523,7 @@ svn_wc__get_info(svn_wc_context_t *wc_ct
svn_error_clear(err);
- apr_hash_set(fe_baton.tree_conflicts, local_abspath,
- APR_HASH_KEY_STRING, "");
+ svn_hash_sets(fe_baton.tree_conflicts, local_abspath, "");
}
else
SVN_ERR(err);
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/old-and-busted.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/old-and-busted.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/old-and-busted.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/old-and-busted.c Fri Apr 5 05:29:29 2013
@@ -26,6 +26,7 @@
#include "svn_time.h"
#include "svn_xml.h"
#include "svn_dirent_uri.h"
+#include "svn_hash.h"
#include "svn_path.h"
#include "svn_ctype.h"
#include "svn_pools.h"
@@ -716,7 +717,7 @@ do_bool_attr(svn_boolean_t *entry_flag,
apr_hash_t *atts, const char *attr_name,
const char *entry_name)
{
- const char *str = apr_hash_get(atts, attr_name, APR_HASH_KEY_STRING);
+ const char *str = svn_hash_gets(atts, attr_name);
*entry_flag = FALSE;
if (str)
@@ -741,7 +742,7 @@ extract_string(apr_hash_t *atts,
const char *att_name,
apr_pool_t *result_pool)
{
- const char *value = apr_hash_get(atts, att_name, APR_HASH_KEY_STRING);
+ const char *value = svn_hash_gets(atts, att_name);
if (value == NULL)
return NULL;
@@ -756,7 +757,7 @@ extract_string_normalize(apr_hash_t *att
const char *att_name,
apr_pool_t *result_pool)
{
- const char *value = apr_hash_get(atts, att_name, APR_HASH_KEY_STRING);
+ const char *value = svn_hash_gets(atts, att_name);
if (value == NULL)
return NULL;
@@ -790,7 +791,7 @@ atts_to_entry(svn_wc_entry_t **new_entry
const char *name;
/* Find the name and set up the entry under that name. */
- name = apr_hash_get(atts, ENTRIES_ATTR_NAME, APR_HASH_KEY_STRING);
+ name = svn_hash_gets(atts, ENTRIES_ATTR_NAME);
entry->name = name ? apr_pstrdup(pool, name) : SVN_WC_ENTRY_THIS_DIR;
/* Attempt to set revision (resolve_to_defaults may do it later, too)
@@ -798,7 +799,7 @@ atts_to_entry(svn_wc_entry_t **new_entry
### not used by loggy; no need to set MODIFY_FLAGS */
{
const char *revision_str
- = apr_hash_get(atts, ENTRIES_ATTR_REVISION, APR_HASH_KEY_STRING);
+ = svn_hash_gets(atts, ENTRIES_ATTR_REVISION);
if (revision_str)
entry->revision = SVN_STR_TO_REV(revision_str);
@@ -827,7 +828,7 @@ atts_to_entry(svn_wc_entry_t **new_entry
/* ### not used by loggy; no need to set MODIFY_FLAGS */
{
const char *kindstr
- = apr_hash_get(atts, ENTRIES_ATTR_KIND, APR_HASH_KEY_STRING);
+ = svn_hash_gets(atts, ENTRIES_ATTR_KIND);
entry->kind = svn_node_none;
if (kindstr)
@@ -848,7 +849,7 @@ atts_to_entry(svn_wc_entry_t **new_entry
/* ### not used by loggy; no need to set MODIFY_FLAGS */
{
const char *schedulestr
- = apr_hash_get(atts, ENTRIES_ATTR_SCHEDULE, APR_HASH_KEY_STRING);
+ = svn_hash_gets(atts, ENTRIES_ATTR_SCHEDULE);
entry->schedule = svn_wc_schedule_normal;
if (schedulestr)
@@ -894,8 +895,7 @@ atts_to_entry(svn_wc_entry_t **new_entry
{
const char *revstr;
- revstr = apr_hash_get(atts, ENTRIES_ATTR_COPYFROM_REV,
- APR_HASH_KEY_STRING);
+ revstr = svn_hash_gets(atts, ENTRIES_ATTR_COPYFROM_REV);
if (revstr)
entry->copyfrom_rev = SVN_STR_TO_REV(revstr);
}
@@ -921,8 +921,7 @@ atts_to_entry(svn_wc_entry_t **new_entry
{
const char *text_timestr;
- text_timestr = apr_hash_get(atts, ENTRIES_ATTR_TEXT_TIME,
- APR_HASH_KEY_STRING);
+ text_timestr = svn_hash_gets(atts, ENTRIES_ATTR_TEXT_TIME);
if (text_timestr)
SVN_ERR(svn_time_from_cstring(&entry->text_time, text_timestr, pool));
@@ -945,8 +944,7 @@ atts_to_entry(svn_wc_entry_t **new_entry
{
const char *cmt_datestr, *cmt_revstr;
- cmt_datestr = apr_hash_get(atts, ENTRIES_ATTR_CMT_DATE,
- APR_HASH_KEY_STRING);
+ cmt_datestr = svn_hash_gets(atts, ENTRIES_ATTR_CMT_DATE);
if (cmt_datestr)
{
SVN_ERR(svn_time_from_cstring(&entry->cmt_date, cmt_datestr, pool));
@@ -954,7 +952,7 @@ atts_to_entry(svn_wc_entry_t **new_entry
else
entry->cmt_date = 0;
- cmt_revstr = apr_hash_get(atts, ENTRIES_ATTR_CMT_REV, APR_HASH_KEY_STRING);
+ cmt_revstr = svn_hash_gets(atts, ENTRIES_ATTR_CMT_REV);
if (cmt_revstr)
{
entry->cmt_rev = SVN_STR_TO_REV(cmt_revstr);
@@ -971,7 +969,7 @@ atts_to_entry(svn_wc_entry_t **new_entry
entry->lock_comment = extract_string(atts, ENTRIES_ATTR_LOCK_COMMENT, pool);
{
const char *cdate_str =
- apr_hash_get(atts, ENTRIES_ATTR_LOCK_CREATION_DATE, APR_HASH_KEY_STRING);
+ svn_hash_gets(atts, ENTRIES_ATTR_LOCK_CREATION_DATE);
if (cdate_str)
{
SVN_ERR(svn_time_from_cstring(&entry->lock_creation_date,
@@ -987,8 +985,7 @@ atts_to_entry(svn_wc_entry_t **new_entry
/* Translated size */
/* ### not used by loggy; no need to set MODIFY_FLAGS */
{
- const char *val = apr_hash_get(atts, ENTRIES_ATTR_WORKING_SIZE,
- APR_HASH_KEY_STRING);
+ const char *val = svn_hash_gets(atts, ENTRIES_ATTR_WORKING_SIZE);
if (val)
{
/* Cast to off_t; it's safe: we put in an off_t to start with... */
@@ -1045,7 +1042,7 @@ handle_start_tag(void *userData, const c
/* Find the name and set up the entry under that name. This
should *NOT* be NULL, since svn_wc__atts_to_entry() should
have made it into SVN_WC_ENTRY_THIS_DIR. */
- apr_hash_set(accum->entries, entry->name, APR_HASH_KEY_STRING, entry);
+ svn_hash_sets(accum->entries, entry->name, entry);
}
/* Parse BUF of size SIZE as an entries file in XML format, storing the parsed
@@ -1131,7 +1128,7 @@ resolve_to_defaults(apr_hash_t *entries,
{
apr_hash_index_t *hi;
svn_wc_entry_t *default_entry
- = apr_hash_get(entries, SVN_WC_ENTRY_THIS_DIR, APR_HASH_KEY_STRING);
+ = svn_hash_gets(entries, SVN_WC_ENTRY_THIS_DIR);
/* First check the dir's own entry for consistency. */
if (! default_entry)
@@ -1259,7 +1256,7 @@ svn_wc__read_entries_old(apr_hash_t **en
++curp;
++entryno;
- apr_hash_set(*entries, entry->name, APR_HASH_KEY_STRING, entry);
+ svn_hash_sets(*entries, entry->name, entry);
}
}
@@ -1328,7 +1325,7 @@ svn_wc_entry(const svn_wc_entry_t **entr
fetch all entries here (optimization) since we know how to filter
out a "hidden" node. */
SVN_ERR(svn_wc__entries_read_internal(&entries, dir_access, TRUE, pool));
- *entry = apr_hash_get(entries, entry_name, APR_HASH_KEY_STRING);
+ *entry = svn_hash_gets(entries, entry_name);
if (!show_hidden && *entry != NULL)
{
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/props.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/props.c Fri Apr 5 05:29:29 2013
@@ -1142,13 +1142,13 @@ svn_wc__merge_props(svn_skel_t **conflic
= &APR_ARRAY_IDX(propchanges, i, svn_prop_t);
const char *propname = incoming_change->name;
const svn_string_t *base_val /* Pristine in WC */
- = apr_hash_get(pristine_props, propname, APR_HASH_KEY_STRING);
+ = svn_hash_gets(pristine_props, propname);
const svn_string_t *from_val /* Merge left */
- = apr_hash_get(server_baseprops, propname, APR_HASH_KEY_STRING);
+ = svn_hash_gets(server_baseprops, propname);
const svn_string_t *to_val /* Merge right */
= incoming_change->value;
const svn_string_t *working_val /* Mine */
- = apr_hash_get(actual_props, propname, APR_HASH_KEY_STRING);
+ = svn_hash_gets(actual_props, propname);
const svn_string_t *result_val;
svn_boolean_t conflict_remains;
svn_boolean_t did_merge = FALSE;
@@ -1157,7 +1157,7 @@ svn_wc__merge_props(svn_skel_t **conflic
to_val = to_val ? svn_string_dup(to_val, result_pool) : NULL;
- apr_hash_set(their_props, propname, APR_HASH_KEY_STRING, to_val);
+ svn_hash_sets(their_props, propname, to_val);
/* We already know that state is at least `changed', so mark
@@ -1185,8 +1185,7 @@ svn_wc__merge_props(svn_skel_t **conflic
result_pool, iterpool));
if (result_val != working_val)
- apr_hash_set(*new_actual_props, propname, APR_HASH_KEY_STRING,
- result_val);
+ svn_hash_sets(*new_actual_props, propname, result_val);
if (did_merge)
set_prop_merge_state(state, svn_wc_notify_state_merged);
@@ -1200,7 +1199,7 @@ svn_wc__merge_props(svn_skel_t **conflic
if (!conflict_props)
conflict_props = apr_hash_make(scratch_pool);
- apr_hash_set(conflict_props, propname, APR_HASH_KEY_STRING, "");
+ svn_hash_sets(conflict_props, propname, "");
}
} /* foreach propchange ... */
@@ -1256,7 +1255,7 @@ wcprop_set(svn_wc__db_t *db,
if (prophash == NULL)
prophash = apr_hash_make(scratch_pool);
- apr_hash_set(prophash, name, APR_HASH_KEY_STRING, value);
+ svn_hash_sets(prophash, name, value);
return svn_error_trace(svn_wc__db_base_set_dav_cache(db, local_abspath,
prophash,
scratch_pool));
@@ -1308,13 +1307,12 @@ propname_filter_receiver(void *baton,
apr_pool_t *scratch_pool)
{
struct propname_filter_baton_t *pfb = baton;
- const svn_string_t *propval = apr_hash_get(props, pfb->propname,
- APR_HASH_KEY_STRING);
+ const svn_string_t *propval = svn_hash_gets(props, pfb->propname);
if (propval)
{
props = apr_hash_make(scratch_pool);
- apr_hash_set(props, pfb->propname, APR_HASH_KEY_STRING, propval);
+ svn_hash_sets(props, pfb->propname, propval);
SVN_ERR(pfb->receiver_func(pfb->receiver_baton, local_abspath, props,
scratch_pool));
@@ -1510,7 +1508,7 @@ svn_wc__internal_propget(const svn_strin
}
if (prophash)
- *value = apr_hash_get(prophash, name, APR_HASH_KEY_STRING);
+ *value = svn_hash_gets(prophash, name);
else
*value = NULL;
@@ -1628,7 +1626,8 @@ validate_eol_prop_against_file(const cha
if (mime_type && svn_mime_type_is_binary(mime_type->data))
return svn_error_createf
(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("File '%s' has binary mime type property"),
+ _("Can't set '" SVN_PROP_EOL_STYLE "': "
+ "file '%s' has binary mime type property"),
path_display);
/* Now ask the getter for the contents of the file; this will do a
@@ -1684,8 +1683,7 @@ do_propset(svn_wc__db_t *db,
const svn_string_t *new_value;
struct getter_baton gb;
- gb.mime_type = apr_hash_get(prophash,
- SVN_PROP_MIME_TYPE, APR_HASH_KEY_STRING);
+ gb.mime_type = svn_hash_gets(prophash, SVN_PROP_MIME_TYPE);
gb.local_abspath = local_abspath;
SVN_ERR(svn_wc_canonicalize_svn_prop(&new_value, name, value,
@@ -1714,8 +1712,7 @@ do_propset(svn_wc__db_t *db,
*/
if (kind == svn_node_file && strcmp(name, SVN_PROP_KEYWORDS) == 0)
{
- svn_string_t *old_value = apr_hash_get(prophash, SVN_PROP_KEYWORDS,
- APR_HASH_KEY_STRING);
+ svn_string_t *old_value = svn_hash_gets(prophash, SVN_PROP_KEYWORDS);
apr_hash_t *old_keywords, *new_keywords;
if (old_value)
@@ -1755,8 +1752,7 @@ do_propset(svn_wc__db_t *db,
}
else if (kind == svn_node_file && strcmp(name, SVN_PROP_EOL_STYLE) == 0)
{
- svn_string_t *old_value = apr_hash_get(prophash, SVN_PROP_EOL_STYLE,
- APR_HASH_KEY_STRING);
+ svn_string_t *old_value = svn_hash_gets(prophash, SVN_PROP_EOL_STYLE);
if (((value == NULL) != (old_value == NULL))
|| (value && ! svn_string_compare(value, old_value)))
@@ -1767,7 +1763,7 @@ do_propset(svn_wc__db_t *db,
/* Find out what type of property change we are doing: add, modify, or
delete. */
- if (apr_hash_get(prophash, name, APR_HASH_KEY_STRING) == NULL)
+ if (svn_hash_gets(prophash, name) == NULL)
{
if (value == NULL)
/* Deleting a non-existent property. */
@@ -1788,7 +1784,7 @@ do_propset(svn_wc__db_t *db,
/* Now we have all the properties in our hash. Simply merge the new
property into it. */
- apr_hash_set(prophash, name, APR_HASH_KEY_STRING, value);
+ svn_hash_sets(prophash, name, value);
/* Drop it right into the db.. */
SVN_ERR(svn_wc__db_op_set_props(db, local_abspath, prophash,
@@ -2004,16 +2000,14 @@ svn_wc__canonicalize_props(apr_hash_t **
/* Before we can canonicalize svn:eol-style we need to know svn:mime-type,
* so process that first. */
- mime_type = apr_hash_get((apr_hash_t *)props,
- SVN_PROP_MIME_TYPE, APR_HASH_KEY_STRING);
+ mime_type = svn_hash_gets((apr_hash_t *)props, SVN_PROP_MIME_TYPE);
if (mime_type)
{
SVN_ERR(svn_wc_canonicalize_svn_prop(
&mime_type, SVN_PROP_MIME_TYPE, mime_type,
local_abspath, node_kind, skip_some_checks,
NULL, NULL, scratch_pool));
- apr_hash_set(*prepared_props, SVN_PROP_MIME_TYPE, APR_HASH_KEY_STRING,
- mime_type);
+ svn_hash_sets(*prepared_props, SVN_PROP_MIME_TYPE, mime_type);
}
/* Set up the context for canonicalizing the other properties. */
@@ -2035,7 +2029,7 @@ svn_wc__canonicalize_props(apr_hash_t **
&value, name, value,
local_abspath, node_kind, skip_some_checks,
get_file_for_validation, &gb, scratch_pool));
- apr_hash_set(*prepared_props, name, APR_HASH_KEY_STRING, value);
+ svn_hash_sets(*prepared_props, name, value);
}
return SVN_NO_ERROR;
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/revert.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/revert.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/revert.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/revert.c Fri Apr 5 05:29:29 2013
@@ -445,8 +445,7 @@ revert_restore(svn_wc__db_t *db,
scratch_pool, scratch_pool));
#ifdef HAVE_SYMLINK
- special_prop = apr_hash_get(props, SVN_PROP_SPECIAL,
- APR_HASH_KEY_STRING);
+ special_prop = svn_hash_gets(props, SVN_PROP_SPECIAL);
if ((special_prop != NULL) != special)
{
@@ -499,8 +498,8 @@ revert_restore(svn_wc__db_t *db,
SVN_ERR(svn_io__is_finfo_read_only(&read_only, &finfo,
scratch_pool));
- needs_lock_prop = apr_hash_get(props, SVN_PROP_NEEDS_LOCK,
- APR_HASH_KEY_STRING);
+ needs_lock_prop = svn_hash_gets(props,
+ SVN_PROP_NEEDS_LOCK);
if (needs_lock_prop && !read_only)
{
SVN_ERR(svn_io_set_file_read_only(local_abspath,
@@ -527,8 +526,8 @@ revert_restore(svn_wc__db_t *db,
SVN_ERR(svn_io__is_finfo_executable(&executable, &finfo,
scratch_pool));
- executable_prop = apr_hash_get(props, SVN_PROP_EXECUTABLE,
- APR_HASH_KEY_STRING);
+ executable_prop = svn_hash_gets(props,
+ SVN_PROP_EXECUTABLE);
if (executable_prop && !executable)
{
SVN_ERR(svn_io_set_file_executable(local_abspath,
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/status.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/status.c Fri Apr 5 05:29:29 2013
@@ -373,8 +373,7 @@ read_info(const struct svn_wc__db_info_t
SVN_ERR(svn_wc__db_read_pristine_props(&properties, db, local_abspath,
scratch_pool, scratch_pool));
- mtb->special = (NULL != apr_hash_get(properties, SVN_PROP_SPECIAL,
- APR_HASH_KEY_STRING));
+ mtb->special = (NULL != svn_hash_gets(properties, SVN_PROP_SPECIAL));
}
#endif
*info = mtb;
@@ -915,10 +914,9 @@ send_status_structure(const struct walk_
{
/* repos_lock still uses the deprecated filesystem absolute path
format */
- repos_lock = apr_hash_get(wb->repos_locks,
- svn_fspath__join("/", repos_relpath,
- scratch_pool),
- APR_HASH_KEY_STRING);
+ repos_lock = svn_hash_gets(wb->repos_locks,
+ svn_fspath__join("/", repos_relpath,
+ scratch_pool));
}
}
@@ -1037,7 +1035,7 @@ is_external_path(apr_hash_t *externals,
apr_hash_index_t *hi;
/* First try: does the path exist as a key in the hash? */
- if (apr_hash_get(externals, local_abspath, APR_HASH_KEY_STRING))
+ if (svn_hash_gets(externals, local_abspath))
return TRUE;
/* Failing that, we need to check if any external is a child of
@@ -1560,9 +1558,9 @@ hash_stash(void *baton,
{
apr_hash_t *stat_hash = baton;
apr_pool_t *hash_pool = apr_hash_pool_get(stat_hash);
- assert(! apr_hash_get(stat_hash, path, APR_HASH_KEY_STRING));
- apr_hash_set(stat_hash, apr_pstrdup(hash_pool, path),
- APR_HASH_KEY_STRING, svn_wc_dup_status3(status, hash_pool));
+ assert(! svn_hash_gets(stat_hash, path));
+ svn_hash_sets(stat_hash, apr_pstrdup(hash_pool, path),
+ svn_wc_dup_status3(status, hash_pool));
return SVN_NO_ERROR;
}
@@ -1621,7 +1619,7 @@ tweak_statushash(void *baton,
pool = apr_hash_pool_get(statushash);
/* Is PATH already a hash-key? */
- statstruct = apr_hash_get(statushash, local_abspath, APR_HASH_KEY_STRING);
+ statstruct = svn_hash_gets(statushash, local_abspath);
/* If not, make it so. */
if (! statstruct)
@@ -1644,8 +1642,7 @@ tweak_statushash(void *baton,
SVN_ERR(internal_status(&statstruct, db, local_abspath, pool,
scratch_pool));
statstruct->repos_lock = repos_lock;
- apr_hash_set(statushash, apr_pstrdup(pool, local_abspath),
- APR_HASH_KEY_STRING, statstruct);
+ svn_hash_sets(statushash, apr_pstrdup(pool, local_abspath), statstruct);
}
/* Merge a repos "delete" + "add" into a single "replace". */
@@ -1747,9 +1744,8 @@ find_dir_repos_relpath(const struct dir_
{
const char *repos_relpath;
struct dir_baton *pb = db->parent_baton;
- const svn_wc_status3_t *status = apr_hash_get(pb->statii,
- db->local_abspath,
- APR_HASH_KEY_STRING);
+ const svn_wc_status3_t *status = svn_hash_gets(pb->statii,
+ db->local_abspath);
/* Note that status->repos_relpath could be NULL in the case of a missing
* directory, which means we need to recurse up another level to get
* a useful relpath. */
@@ -1829,8 +1825,7 @@ make_dir_baton(void **dir_baton,
/* Get the status for this path's children. Of course, we only want
to do this if the path is versioned as a directory. */
if (pb)
- status_in_parent = apr_hash_get(pb->statii, d->local_abspath,
- APR_HASH_KEY_STRING);
+ status_in_parent = svn_hash_gets(pb->statii, d->local_abspath);
else
status_in_parent = eb->anchor_status;
@@ -1862,8 +1857,7 @@ make_dir_baton(void **dir_baton,
dir_pool));
/* If we found a depth here, it should govern. */
- this_dir_status = apr_hash_get(d->statii, d->local_abspath,
- APR_HASH_KEY_STRING);
+ this_dir_status = svn_hash_gets(d->statii, d->local_abspath);
if (this_dir_status && this_dir_status->versioned
&& (d->depth == svn_depth_unknown
|| d->depth > status_in_parent->depth))
@@ -2266,8 +2260,7 @@ close_directory(void *dir_baton,
const svn_wc_status3_t *dir_status;
/* See if the directory was deleted or replaced. */
- dir_status = apr_hash_get(pb->statii, db->local_abspath,
- APR_HASH_KEY_STRING);
+ dir_status = svn_hash_gets(pb->statii, db->local_abspath);
if (dir_status &&
((dir_status->repos_node_status == svn_wc_status_deleted)
|| (dir_status->repos_node_status == svn_wc_status_replaced)))
@@ -2283,7 +2276,7 @@ close_directory(void *dir_baton,
eb->get_all))
SVN_ERR((eb->status_func)(eb->status_baton, db->local_abspath,
dir_status, scratch_pool));
- apr_hash_set(pb->statii, db->local_abspath, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(pb->statii, db->local_abspath, NULL);
}
else if (! pb)
{
@@ -2293,8 +2286,7 @@ close_directory(void *dir_baton,
{
const svn_wc_status3_t *tgt_status;
- tgt_status = apr_hash_get(db->statii, eb->target_abspath,
- APR_HASH_KEY_STRING);
+ tgt_status = svn_hash_gets(db->statii, eb->target_abspath);
if (tgt_status)
{
if (tgt_status->versioned
@@ -2469,10 +2461,9 @@ close_file(void *file_baton,
const char *repos_relpath = svn_relpath_join(dir_repos_relpath,
fb->name, pool);
- repos_lock = apr_hash_get(fb->edit_baton->wb.repos_locks,
- svn_fspath__join("/", repos_relpath,
- pool),
- APR_HASH_KEY_STRING);
+ repos_lock = svn_hash_gets(fb->edit_baton->wb.repos_locks,
+ svn_fspath__join("/", repos_relpath,
+ pool));
}
}
else
@@ -2847,9 +2838,9 @@ svn_wc_get_default_ignores(apr_array_hea
apr_hash_t *config,
apr_pool_t *pool)
{
- svn_config_t *cfg = config ? apr_hash_get(config,
- SVN_CONFIG_CATEGORY_CONFIG,
- APR_HASH_KEY_STRING) : NULL;
+ svn_config_t *cfg = config
+ ? svn_hash_gets(config, SVN_CONFIG_CATEGORY_CONFIG)
+ : NULL;
const char *val;
/* Check the Subversion run-time configuration for global ignores.
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/translate.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/translate.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/translate.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/translate.c Fri Apr 5 05:29:29 2013
@@ -33,6 +33,7 @@
#include "svn_types.h"
#include "svn_string.h"
#include "svn_dirent_uri.h"
+#include "svn_hash.h"
#include "svn_path.h"
#include "svn_error.h"
#include "svn_subst.h"
@@ -407,7 +408,7 @@ svn_wc__sync_flags_with_props(svn_boolea
/* Handle the read-write bit. */
if (status != svn_wc__db_status_normal
|| props == NULL
- || ! apr_hash_get(props, SVN_PROP_NEEDS_LOCK, APR_HASH_KEY_STRING)
+ || ! svn_hash_gets(props, SVN_PROP_NEEDS_LOCK)
|| lock)
{
SVN_ERR(svn_io_set_file_read_write(local_abspath, FALSE, scratch_pool));
@@ -427,8 +428,7 @@ svn_wc__sync_flags_with_props(svn_boolea
pristine_props = NULL;
if (pristine_props
- && apr_hash_get(pristine_props,
- SVN_PROP_NEEDS_LOCK, APR_HASH_KEY_STRING) )
+ && svn_hash_gets(pristine_props, SVN_PROP_NEEDS_LOCK) )
/*&& props
&& apr_hash_get(props, SVN_PROP_NEEDS_LOCK, APR_HASH_KEY_STRING) )*/
SVN_ERR(svn_io_set_file_read_only(local_abspath, FALSE, scratch_pool));
@@ -438,7 +438,7 @@ svn_wc__sync_flags_with_props(svn_boolea
#ifndef WIN32
if (props == NULL
- || ! apr_hash_get(props, SVN_PROP_EXECUTABLE, APR_HASH_KEY_STRING))
+ || ! svn_hash_gets(props, SVN_PROP_EXECUTABLE))
{
/* Turn off the execute bit */
SVN_ERR(svn_io_set_file_executable(local_abspath, FALSE, FALSE,