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 [9/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_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/update_editor.c Fri Apr 5 05:29:29 2013
@@ -275,11 +275,11 @@ remember_skipped_tree(struct edit_baton
{
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- apr_hash_set(eb->skipped_trees,
- apr_pstrdup(eb->pool,
- svn_dirent_skip_ancestor(eb->wcroot_abspath,
- local_abspath)),
- APR_HASH_KEY_STRING, (void*)1);
+ svn_hash_sets(eb->skipped_trees,
+ apr_pstrdup(eb->pool,
+ svn_dirent_skip_ancestor(eb->wcroot_abspath,
+ local_abspath)),
+ (void *)1);
return SVN_NO_ERROR;
}
@@ -1834,8 +1834,8 @@ delete_entry(const char *path,
if (!pb->deletion_conflicts)
pb->deletion_conflicts = apr_hash_make(pb->pool);
- apr_hash_set(pb->deletion_conflicts, apr_pstrdup(pb->pool, base),
- APR_HASH_KEY_STRING, tree_conflict);
+ svn_hash_sets(pb->deletion_conflicts, apr_pstrdup(pb->pool, base),
+ tree_conflict);
SVN_ERR(svn_wc__conflict_read_tree_conflict(&reason, NULL, NULL,
eb->db, local_abspath,
@@ -2081,8 +2081,7 @@ add_directory(const char *path,
if (conflicted)
{
if (pb->deletion_conflicts)
- tree_conflict = apr_hash_get(pb->deletion_conflicts, db->name,
- APR_HASH_KEY_STRING);
+ tree_conflict = svn_hash_gets(pb->deletion_conflicts, db->name);
if (tree_conflict)
{
@@ -2554,8 +2553,7 @@ close_directory(void *dir_baton,
{
const svn_prop_t *prop;
prop = &APR_ARRAY_IDX(regular_prop_changes, i, svn_prop_t);
- apr_hash_set(props_to_delete, prop->name,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(props_to_delete, prop->name, NULL);
}
/* Add these props to the incoming propchanges (in
@@ -2590,8 +2588,7 @@ close_directory(void *dir_baton,
const svn_string_t *new_val_s = change->value;
const svn_string_t *old_val_s;
- old_val_s = apr_hash_get(base_props, SVN_PROP_EXTERNALS,
- APR_HASH_KEY_STRING);
+ old_val_s = svn_hash_gets(base_props, SVN_PROP_EXTERNALS);
if ((new_val_s == NULL) && (old_val_s == NULL))
; /* No value before, no value after... so do nothing. */
@@ -2648,8 +2645,7 @@ close_directory(void *dir_baton,
/* Check if we should add some not-present markers before marking the
directory complete (Issue #3569) */
{
- apr_hash_t *new_children = apr_hash_get(eb->dir_dirents, db->new_relpath,
- APR_HASH_KEY_STRING);
+ apr_hash_t *new_children = svn_hash_gets(eb->dir_dirents, db->new_relpath);
if (new_children != NULL)
{
@@ -2835,8 +2831,7 @@ close_directory(void *dir_baton,
/* Any inherited props to be set set for this base node? */
if (eb->wcroot_iprops)
{
- iprops = apr_hash_get(eb->wcroot_iprops, db->local_abspath,
- APR_HASH_KEY_STRING);
+ iprops = svn_hash_gets(eb->wcroot_iprops, db->local_abspath);
/* close_edit may also update iprops for switched nodes, catching
those for which close_directory is never called (e.g. a switch
@@ -2844,8 +2839,7 @@ close_directory(void *dir_baton,
iprops from the hash so as not to set them again in
close_edit. */
if (iprops)
- apr_hash_set(eb->wcroot_iprops, db->local_abspath,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(eb->wcroot_iprops, db->local_abspath, NULL);
}
/* Update the BASE data for the directory and mark the directory
@@ -3120,8 +3114,8 @@ add_file(const char *path,
The only thing we can do is add a not-present node, to allow
a future update to bring in the new files when the problem is
resolved. */
- apr_hash_set(pb->not_present_files, apr_pstrdup(pb->pool, fb->name),
- APR_HASH_KEY_STRING, (void*)1);
+ svn_hash_sets(pb->not_present_files, apr_pstrdup(pb->pool, fb->name),
+ (void *)1);
SVN_ERR(remember_skipped_tree(eb, fb->local_abspath, pool));
fb->skip_this = TRUE;
@@ -3171,8 +3165,7 @@ add_file(const char *path,
else if (conflicted)
{
if (pb->deletion_conflicts)
- tree_conflict = apr_hash_get(pb->deletion_conflicts, fb->name,
- APR_HASH_KEY_STRING);
+ tree_conflict = svn_hash_gets(pb->deletion_conflicts, fb->name);
if (tree_conflict)
{
@@ -3229,8 +3222,8 @@ add_file(const char *path,
Note that we can safely assume that no present base node exists,
because then we would not have received an add_file.
*/
- apr_hash_set(pb->not_present_files, apr_pstrdup(pb->pool, fb->name),
- APR_HASH_KEY_STRING, (void*)1);
+ svn_hash_sets(pb->not_present_files, apr_pstrdup(pb->pool, fb->name),
+ (void *)1);
do_notification(eb, fb->local_abspath, svn_node_unknown,
svn_wc_notify_skip_conflicted, scratch_pool);
@@ -3330,8 +3323,8 @@ add_file(const char *path,
|| *eb->target_basename == '\0'
|| (strcmp(fb->local_abspath, eb->target_abspath) != 0))
{
- apr_hash_set(pb->not_present_files, apr_pstrdup(pb->pool, fb->name),
- APR_HASH_KEY_STRING, (void*)1);
+ svn_hash_sets(pb->not_present_files, apr_pstrdup(pb->pool, fb->name),
+ (void *)1);
}
if (tree_conflict != NULL)
@@ -3677,8 +3670,7 @@ change_file_prop(void *file_baton,
scratch_pool, scratch_pool));
was_symlink = ((props
- && apr_hash_get(props, SVN_PROP_SPECIAL,
- APR_HASH_KEY_STRING) != NULL)
+ && svn_hash_gets(props, SVN_PROP_SPECIAL) != NULL)
? svn_tristate_true
: svn_tristate_false);
}
@@ -4440,8 +4432,7 @@ close_file(void *file_baton,
/* Any inherited props to be set set for this base node? */
if (eb->wcroot_iprops)
{
- iprops = apr_hash_get(eb->wcroot_iprops, fb->local_abspath,
- APR_HASH_KEY_STRING);
+ iprops = svn_hash_gets(eb->wcroot_iprops, fb->local_abspath);
/* close_edit may also update iprops for switched nodes, catching
those for which close_directory is never called (e.g. a switch
@@ -4449,8 +4440,7 @@ close_file(void *file_baton,
iprops from the hash so as not to set them again in
close_edit. */
if (iprops)
- apr_hash_set(eb->wcroot_iprops, fb->local_abspath,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(eb->wcroot_iprops, fb->local_abspath, NULL);
}
SVN_ERR(svn_wc__db_base_add_file(eb->db, fb->local_abspath,
@@ -4490,8 +4480,7 @@ close_file(void *file_baton,
/* Deal with the WORKING tree, based on updates to the BASE tree. */
- apr_hash_set(fb->dir_baton->not_present_files, fb->name,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(fb->dir_baton->not_present_files, fb->name, NULL);
/* Send a notification to the callback function. (Skip notifications
about files which were already notified for another reason.) */
@@ -4838,10 +4827,9 @@ make_editor(svn_revnum_t *target_revisio
edit_pool, scratch_pool));
if (dirents != NULL && apr_hash_count(dirents))
- apr_hash_set(eb->dir_dirents,
- apr_pstrdup(edit_pool, dir_repos_relpath),
- APR_HASH_KEY_STRING,
- dirents);
+ svn_hash_sets(eb->dir_dirents,
+ apr_pstrdup(edit_pool, dir_repos_relpath),
+ dirents);
}
if (depth == svn_depth_immediates)
@@ -4895,10 +4883,10 @@ make_editor(svn_revnum_t *target_revisio
edit_pool, iterpool));
if (dirents != NULL && apr_hash_count(dirents))
- apr_hash_set(eb->dir_dirents,
- apr_pstrdup(edit_pool, dir_repos_relpath),
- APR_HASH_KEY_STRING,
- dirents);
+ svn_hash_sets(eb->dir_dirents,
+ apr_pstrdup(edit_pool,
+ dir_repos_relpath),
+ dirents);
}
}
}
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/upgrade.c Fri Apr 5 05:29:29 2013
@@ -151,7 +151,7 @@ read_one_proplist(apr_hash_t *all_wcprop
proplist = apr_hash_make(result_pool);
SVN_ERR(svn_hash_read2(proplist, stream, SVN_HASH_TERMINATOR, result_pool));
- apr_hash_set(all_wcprops, name, APR_HASH_KEY_STRING, proplist);
+ svn_hash_sets(all_wcprops, name, proplist);
return SVN_NO_ERROR;
}
@@ -180,8 +180,7 @@ read_many_wcprops(apr_hash_t **all_wcpro
scratch_pool);
SVN_ERR(read_propfile(&wcprops, propfile_abspath, result_pool, iterpool));
if (wcprops != NULL)
- apr_hash_set(*all_wcprops, SVN_WC_ENTRY_THIS_DIR, APR_HASH_KEY_STRING,
- wcprops);
+ svn_hash_sets(*all_wcprops, SVN_WC_ENTRY_THIS_DIR, wcprops);
props_dir_abspath = svn_wc__adm_child(dir_abspath, WCPROPS_SUBDIR_FOR_FILES,
scratch_pool);
@@ -203,9 +202,7 @@ read_many_wcprops(apr_hash_t **all_wcpro
SVN_ERR(read_propfile(&wcprops, propfile_abspath,
result_pool, iterpool));
SVN_ERR_ASSERT(wcprops != NULL);
- apr_hash_set(*all_wcprops,
- apr_pstrdup(result_pool, name), APR_HASH_KEY_STRING,
- wcprops);
+ svn_hash_sets(*all_wcprops, apr_pstrdup(result_pool, name), wcprops);
}
svn_pool_destroy(iterpool);
@@ -701,9 +698,9 @@ read_tree_conflicts(apr_hash_t **conflic
SVN_ERR(svn_wc__deserialize_conflict(&conflict, skel, dir_path,
pool, iterpool));
if (conflict != NULL)
- apr_hash_set(*conflicts, svn_dirent_basename(conflict->local_abspath,
- pool),
- APR_HASH_KEY_STRING, conflict);
+ svn_hash_sets(*conflicts,
+ svn_dirent_basename(conflict->local_abspath, pool),
+ conflict);
}
svn_pool_destroy(iterpool);
@@ -1121,16 +1118,14 @@ migrate_text_bases(apr_hash_t **text_bas
/* Create a new info struct for this versioned file, or fill in the
* existing one if this is the second text-base we've found for it. */
- info = apr_hash_get(*text_bases_info, versioned_file_name,
- APR_HASH_KEY_STRING);
+ info = svn_hash_gets(*text_bases_info, versioned_file_name);
if (info == NULL)
info = apr_pcalloc(result_pool, sizeof (*info));
file_info = (is_revert_base ? &info->revert_base : &info->normal_base);
file_info->sha1_checksum = svn_checksum_dup(sha1_checksum, result_pool);
file_info->md5_checksum = svn_checksum_dup(md5_checksum, result_pool);
- apr_hash_set(*text_bases_info, versioned_file_name, APR_HASH_KEY_STRING,
- info);
+ svn_hash_sets(*text_bases_info, versioned_file_name, info);
}
}
@@ -1594,9 +1589,40 @@ bump_to_31(void *baton,
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
apr_array_header_t *empty_iprops = apr_array_make(
scratch_pool, 0, sizeof(svn_prop_inherited_item_t *));
+ svn_boolean_t iprops_column_exists = FALSE;
- /* Add the inherited_props column to NODES. */
- SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_UPGRADE_TO_31));
+ /* Add the inherited_props column to NODES if it does not yet exist.
+ *
+ * When using a format >= 31 client to upgrade from old formats which
+ * did not yet have a NODES table, the inherited_props column has
+ * already been created as part of the NODES table. Attemping to add
+ * the inherited_props column will raise an error in this case, so check
+ * if the column exists first.
+ *
+ * Checking for the existence of a column before ALTER TABLE is not
+ * possible within SQLite. We need to run a separate query and evaluate
+ * its result in C first.
+ */
+ SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_PRAGMA_TABLE_INFO_NODES));
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ while (have_row)
+ {
+ const char *column_name = svn_sqlite__column_text(stmt, 1, NULL);
+
+ if (strcmp(column_name, "inherited_props") == 0)
+ {
+ iprops_column_exists = TRUE;
+ break;
+ }
+
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ }
+ SVN_ERR(svn_sqlite__reset(stmt));
+ if (!iprops_column_exists)
+ SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_UPGRADE_TO_31_ALTER_TABLE));
+
+ /* Run additional statements to finalize the upgrade to format 31. */
+ SVN_ERR(svn_sqlite__exec_statements(sdb, STMT_UPGRADE_TO_31_FINALIZE));
/* Set inherited_props to an empty array for the roots of all
switched subtrees in the WC. This allows subsequent updates
@@ -1710,21 +1736,20 @@ upgrade_to_wcng(void **dir_baton,
SVN_ERR(svn_wc__read_entries_old(&entries, dir_abspath,
scratch_pool, scratch_pool));
- 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);
SVN_ERR(ensure_repos_info(this_dir, dir_abspath,
repos_info_func, repos_info_baton,
repos_cache,
scratch_pool, scratch_pool));
/* Cache repos UUID pairs for when a subdir doesn't have this information */
- if (!apr_hash_get(repos_cache, this_dir->repos, APR_HASH_KEY_STRING))
+ if (!svn_hash_gets(repos_cache, this_dir->repos))
{
apr_pool_t *hash_pool = apr_hash_pool_get(repos_cache);
- apr_hash_set(repos_cache,
- apr_pstrdup(hash_pool, this_dir->repos),
- APR_HASH_KEY_STRING,
- apr_pstrdup(hash_pool, this_dir->uuid));
+ svn_hash_sets(repos_cache,
+ apr_pstrdup(hash_pool, this_dir->repos),
+ apr_pstrdup(hash_pool, this_dir->uuid));
}
old_wcroot_abspath = svn_dirent_get_longest_ancestor(dir_abspath,
@@ -2056,7 +2081,7 @@ is_old_wcroot(const char *local_abspath,
return SVN_NO_ERROR;
}
- entry = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
+ entry = svn_hash_gets(entries, name);
if (!entry
|| entry->absent
|| (entry->deleted && entry->schedule != svn_wc_schedule_add)
@@ -2076,7 +2101,7 @@ is_old_wcroot(const char *local_abspath,
parent_abspath = svn_dirent_join(parent_abspath, name, scratch_pool);
break;
}
- entry = apr_hash_get(entries, name, APR_HASH_KEY_STRING);
+ entry = svn_hash_gets(entries, name);
if (!entry
|| entry->absent
|| (entry->deleted && entry->schedule != svn_wc_schedule_add)
@@ -2196,18 +2221,16 @@ svn_wc_upgrade(svn_wc_context_t *wc_ctx,
SVN_ERR(svn_wc__read_entries_old(&entries, local_abspath,
scratch_pool, scratch_pool));
- 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);
SVN_ERR(ensure_repos_info(this_dir, local_abspath, repos_info_func,
repos_info_baton, repos_cache,
scratch_pool, scratch_pool));
/* Cache repos UUID pairs for when a subdir doesn't have this information */
- if (!apr_hash_get(repos_cache, this_dir->repos, APR_HASH_KEY_STRING))
- apr_hash_set(repos_cache,
- apr_pstrdup(scratch_pool, this_dir->repos),
- APR_HASH_KEY_STRING,
- apr_pstrdup(scratch_pool, this_dir->uuid));
+ if (!svn_hash_gets(repos_cache, this_dir->repos))
+ svn_hash_sets(repos_cache,
+ apr_pstrdup(scratch_pool, this_dir->repos),
+ apr_pstrdup(scratch_pool, this_dir->uuid));
/* Create the new DB in the temporary root wc/.svn/tmp/wcng/.svn */
data.root_abspath = svn_dirent_join(svn_wc__adm_child(local_abspath, "tmp",
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-metadata.sql?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-metadata.sql Fri Apr 5 05:29:29 2013
@@ -814,8 +814,9 @@ WHERE wc_id = ?1 and local_relpath = ?2
/* Format 31 adds the inherited_props column to the NODES table. C code then
initializes the update/switch roots to make sure future updates fetch the
inherited properties */
--- STMT_UPGRADE_TO_31
+-- STMT_UPGRADE_TO_31_ALTER_TABLE
ALTER TABLE NODES ADD COLUMN inherited_props BLOB;
+-- STMT_UPGRADE_TO_31_FINALIZE
DROP INDEX IF EXISTS I_ACTUAL_CHANGELIST;
DROP INDEX IF EXISTS I_EXTERNALS_PARENT;
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-queries.sql?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc-queries.sql Fri Apr 5 05:29:29 2013
@@ -952,6 +952,7 @@ WHERE wc_id = ?1
OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
AND op_depth = ?3
AND presence NOT IN (MAP_BASE_DELETED, MAP_NOT_PRESENT, MAP_EXCLUDED, MAP_SERVER_EXCLUDED)
+ AND file_external IS NULL
-- STMT_INSERT_WORKING_NODE_FROM_BASE_COPY
INSERT INTO nodes (
@@ -1218,6 +1219,9 @@ WHERE wc_id = ?1 AND parent_relpath = ?2
UPDATE nodes SET properties = ?4
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
+-- STMT_PRAGMA_TABLE_INFO_NODES
+PRAGMA table_info("NODES")
+
/* --------------------------------------------------------------------------
* Complex queries for callback walks, caching results in a temporary table.
*
@@ -1399,6 +1403,7 @@ WHERE wc_id = ?1
WHERE s.wc_id = ?1
AND s.local_relpath = n.local_relpath)
AND presence NOT IN (MAP_BASE_DELETED, MAP_NOT_PRESENT, MAP_EXCLUDED, MAP_SERVER_EXCLUDED)
+ AND file_external IS NULL
-- STMT_SELECT_DELETE_LIST
SELECT local_relpath FROM delete_list
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc.h?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc.h Fri Apr 5 05:29:29 2013
@@ -388,10 +388,12 @@ svn_wc__internal_file_modified_p(svn_boo
apr_pool_t *scratch_pool);
-/* Prepare to merge a file content change into the working copy. This
- does not merge properties; see svn_wc__merge_props() for that. This
- does not change the working file on disk; it returns work items that
- will replace the working file on disk when they are run.
+/* Prepare to merge a file content change into the working copy.
+
+ This does not merge properties; see svn_wc__merge_props() for that.
+ This does not necessarily change the file TARGET_ABSPATH on disk; it
+ may instead return work items that will replace the file on disk when
+ they are run. ### Can we be more consistent about this?
Merge the difference between LEFT_ABSPATH and RIGHT_ABSPATH into
TARGET_ABSPATH.
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db.c Fri Apr 5 05:29:29 2013
@@ -888,8 +888,8 @@ insert_incomplete_children(svn_sqlite__d
iterpool)));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
if (have_row && !svn_sqlite__column_is_null(stmt, 14))
- apr_hash_set(moved_to_relpaths, name, APR_HASH_KEY_STRING,
- svn_sqlite__column_text(stmt, 14, scratch_pool));
+ svn_hash_sets(moved_to_relpaths, name,
+ svn_sqlite__column_text(stmt, 14, scratch_pool));
SVN_ERR(svn_sqlite__reset(stmt));
}
@@ -913,8 +913,7 @@ insert_incomplete_children(svn_sqlite__d
"incomplete", /* 8, presence */
"unknown", /* 10, kind */
/* 21, moved_to */
- apr_hash_get(moved_to_relpaths, name,
- APR_HASH_KEY_STRING)));
+ svn_hash_gets(moved_to_relpaths, name)));
if (repos_id != INVALID_REPOS_ID)
{
SVN_ERR(svn_sqlite__bind_int64(stmt, 5, repos_id));
@@ -1107,7 +1106,7 @@ add_children_to_hash(apr_hash_t *childre
const char *child_relpath = svn_sqlite__column_text(stmt, 0, NULL);
const char *name = svn_relpath_basename(child_relpath, result_pool);
- apr_hash_set(children, name, APR_HASH_KEY_STRING, name);
+ svn_hash_sets(children, name, name);
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
@@ -1227,9 +1226,9 @@ svn_wc__db_get_children_op_depth(apr_has
svn_node_kind_t *child_kind = apr_palloc(result_pool, sizeof(svn_node_kind_t));
*child_kind = svn_sqlite__column_token(stmt, 1, kind_map);
- apr_hash_set(*children,
- svn_relpath_basename(child_relpath, result_pool),
- APR_HASH_KEY_STRING, child_kind);
+ svn_hash_sets(*children,
+ svn_relpath_basename(child_relpath, result_pool),
+ child_kind);
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
@@ -1260,7 +1259,7 @@ remove_from_access_cache(apr_hash_t *acc
{
svn_wc_adm_access_t *adm_access;
- adm_access = apr_hash_get(access_cache, local_abspath, APR_HASH_KEY_STRING);
+ adm_access = svn_hash_gets(access_cache, local_abspath);
if (adm_access)
svn_wc__adm_access_set_entries(adm_access, NULL);
}
@@ -1534,7 +1533,7 @@ svn_wc__db_init(svn_wc__db_t *db,
db->state_pool, scratch_pool));
/* The WCROOT is complete. Stash it into DB. */
- apr_hash_set(db->dir_data, wcroot->abspath, APR_HASH_KEY_STRING, wcroot);
+ svn_hash_sets(db->dir_data, wcroot->abspath, wcroot);
return SVN_NO_ERROR;
}
@@ -2610,7 +2609,7 @@ svn_wc__db_base_get_children_info(apr_ha
svn_sqlite__reset(stmt)));
- apr_hash_set(*nodes, name, APR_HASH_KEY_STRING, info);
+ svn_hash_sets(*nodes, name, info);
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
@@ -3567,12 +3566,11 @@ svn_wc__db_externals_defined_below(apr_h
local_relpath = svn_sqlite__column_text(stmt, 0, NULL);
def_local_relpath = svn_sqlite__column_text(stmt, 1, NULL);
- apr_hash_set(*externals,
- svn_dirent_join(wcroot->abspath, local_relpath,
- result_pool),
- APR_HASH_KEY_STRING,
- svn_dirent_join(wcroot->abspath, def_local_relpath,
- result_pool));
+ svn_hash_sets(*externals,
+ svn_dirent_join(wcroot->abspath, local_relpath,
+ result_pool),
+ svn_dirent_join(wcroot->abspath, def_local_relpath,
+ result_pool));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
@@ -3634,8 +3632,8 @@ svn_wc__db_externals_gather_definitions(
node_abspath = svn_dirent_join(wcroot->abspath, node_relpath,
result_pool);
- apr_hash_set(*externals, node_abspath, APR_HASH_KEY_STRING,
- apr_pstrdup(result_pool, external_value));
+ svn_hash_sets(*externals, node_abspath,
+ apr_pstrdup(result_pool, external_value));
if (depths)
{
@@ -3643,10 +3641,9 @@ svn_wc__db_externals_gather_definitions(
= svn_sqlite__column_token_null(stmt, 2, depth_map,
svn_depth_unknown);
- apr_hash_set(*depths, node_abspath,
- APR_HASH_KEY_STRING,
- svn_token__to_word(depth_map,
- depth)); /* Use static string */
+ svn_hash_sets(*depths, node_abspath,
+ /* Use static string */
+ svn_token__to_word(depth_map, depth));
}
}
@@ -8511,7 +8508,7 @@ read_children_info(svn_wc__db_wcroot_t *
int op_depth;
svn_boolean_t new_child;
- child_item = apr_hash_get(nodes, name, APR_HASH_KEY_STRING);
+ child_item = svn_hash_gets(nodes, name);
if (child_item)
new_child = FALSE;
else
@@ -8628,8 +8625,7 @@ read_children_info(svn_wc__db_wcroot_t *
SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt)));
child->special = (child->had_props
- && apr_hash_get(properties, SVN_PROP_SPECIAL,
- APR_HASH_KEY_STRING));
+ && svn_hash_gets(properties, SVN_PROP_SPECIAL));
}
#endif
if (op_depth == 0)
@@ -8637,8 +8633,7 @@ read_children_info(svn_wc__db_wcroot_t *
else
child->op_root = (op_depth == relpath_depth(child_relpath));
- apr_hash_set(nodes, apr_pstrdup(result_pool, name),
- APR_HASH_KEY_STRING, child);
+ svn_hash_sets(nodes, apr_pstrdup(result_pool, name), child);
}
if (op_depth == 0)
@@ -8691,7 +8686,7 @@ read_children_info(svn_wc__db_wcroot_t *
const char *child_relpath = svn_sqlite__column_text(stmt, 0, NULL);
const char *name = svn_relpath_basename(child_relpath, NULL);
- child_item = apr_hash_get(nodes, name, APR_HASH_KEY_STRING);
+ child_item = svn_hash_gets(nodes, name);
if (!child_item)
{
child_item = apr_pcalloc(result_pool, sizeof(*child_item));
@@ -8713,16 +8708,15 @@ read_children_info(svn_wc__db_wcroot_t *
scratch_pool, scratch_pool);
if (err)
SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt)));
- child->special = (NULL != apr_hash_get(properties, SVN_PROP_SPECIAL,
- APR_HASH_KEY_STRING));
+ child->special = (NULL != svn_hash_gets(properties,
+ SVN_PROP_SPECIAL));
}
#endif
child->conflicted = !svn_sqlite__column_is_null(stmt, 3); /* conflict */
if (child->conflicted)
- apr_hash_set(conflicts, apr_pstrdup(result_pool, name),
- APR_HASH_KEY_STRING, "");
+ svn_hash_sets(conflicts, apr_pstrdup(result_pool, name), "");
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
@@ -8964,8 +8958,7 @@ svn_wc__db_read_children_walker_info(apr
SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt)));
}
child->kind = svn_sqlite__column_token(stmt, 3, kind_map);
- apr_hash_set(*nodes, apr_pstrdup(result_pool, name),
- APR_HASH_KEY_STRING, child);
+ svn_hash_sets(*nodes, apr_pstrdup(result_pool, name), child);
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
@@ -9541,17 +9534,16 @@ svn_wc__db_prop_retrieve_recursive(apr_h
iterpool, iterpool));
value = (node_props
- ? apr_hash_get(node_props, propname, APR_HASH_KEY_STRING)
+ ? svn_hash_gets(node_props, propname)
: NULL);
if (value)
{
- apr_hash_set(*values,
- svn_dirent_join(wcroot->abspath,
- svn_sqlite__column_text(stmt, 1, NULL),
- result_pool),
- APR_HASH_KEY_STRING,
- svn_string_dup(value, result_pool));
+ svn_hash_sets(*values,
+ svn_dirent_join(wcroot->abspath,
+ svn_sqlite__column_text(stmt, 1, NULL),
+ result_pool),
+ svn_string_dup(value, result_pool));
}
SVN_ERR(svn_sqlite__step(&have_row, stmt));
@@ -9640,7 +9632,7 @@ filter_unwanted_props(apr_hash_t *prop_h
const char *ipropname = svn__apr_hash_index_key(hi);
if (strcmp(ipropname, propname) != 0)
- apr_hash_set(prop_hash, ipropname, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(prop_hash, ipropname, NULL);
}
return;
}
@@ -9913,8 +9905,8 @@ get_children_with_cached_iprops(apr_hash
const char *abspath_with_cache = svn_dirent_join(wcroot->abspath,
relpath_with_cache,
result_pool);
- apr_hash_set(*iprop_paths, abspath_with_cache, APR_HASH_KEY_STRING,
- svn_sqlite__column_text(stmt, 1, result_pool));
+ svn_hash_sets(*iprop_paths, abspath_with_cache,
+ svn_sqlite__column_text(stmt, 1, result_pool));
}
SVN_ERR(svn_sqlite__reset(stmt));
@@ -9944,8 +9936,8 @@ get_children_with_cached_iprops(apr_hash
const char *abspath_with_cache = svn_dirent_join(wcroot->abspath,
relpath_with_cache,
result_pool);
- apr_hash_set(*iprop_paths, abspath_with_cache, APR_HASH_KEY_STRING,
- svn_sqlite__column_text(stmt, 1, result_pool));
+ svn_hash_sets(*iprop_paths, abspath_with_cache,
+ svn_sqlite__column_text(stmt, 1, result_pool));
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
@@ -9986,8 +9978,7 @@ get_children_with_cached_iprops(apr_hash
/* Filter if not a file */
if (child_kind != svn_node_file)
{
- apr_hash_set(*iprop_paths, child_abspath, APR_HASH_KEY_STRING,
- NULL);
+ svn_hash_sets(*iprop_paths, child_abspath, NULL);
}
}
@@ -11036,7 +11027,7 @@ bump_node_revision(svn_wc__db_wcroot_t *
apr_array_header_t *iprops = NULL;
/* Skip an excluded path and its descendants. */
- if (apr_hash_get(exclude_relpaths, local_relpath, APR_HASH_KEY_STRING))
+ if (svn_hash_gets(exclude_relpaths, local_relpath))
return SVN_NO_ERROR;
SVN_ERR(svn_wc__db_base_get_info_internal(&status, &db_kind, &revision,
@@ -11076,10 +11067,9 @@ bump_node_revision(svn_wc__db_wcroot_t *
set_repos_relpath = TRUE;
if (wcroot_iprops)
- iprops = apr_hash_get(wcroot_iprops,
- svn_dirent_join(wcroot->abspath, local_relpath,
- scratch_pool),
- APR_HASH_KEY_STRING);
+ iprops = svn_hash_gets(wcroot_iprops,
+ svn_dirent_join(wcroot->abspath, local_relpath,
+ scratch_pool));
if (iprops
|| set_repos_relpath
@@ -11234,7 +11224,7 @@ svn_wc__db_op_bump_revisions_post_update
VERIFY_USABLE_WCROOT(wcroot);
- if (apr_hash_get(exclude_relpaths, local_relpath, APR_HASH_KEY_STRING))
+ if (svn_hash_gets(exclude_relpaths, local_relpath))
return SVN_NO_ERROR;
if (depth == svn_depth_unknown)
@@ -12302,7 +12292,7 @@ svn_wc__db_upgrade_begin(svn_sqlite__db_
wc_db->state_pool, scratch_pool));
/* The WCROOT is complete. Stash it into DB. */
- apr_hash_set(wc_db->dir_data, wcroot->abspath, APR_HASH_KEY_STRING, wcroot);
+ svn_hash_sets(wc_db->dir_data, wcroot->abspath, wcroot);
return SVN_NO_ERROR;
}
@@ -12823,8 +12813,7 @@ svn_wc__db_temp_get_access(svn_wc__db_t
if (!wcroot)
return NULL;
- return apr_hash_get(wcroot->access_cache, local_dir_abspath,
- APR_HASH_KEY_STRING);
+ return svn_hash_gets(wcroot->access_cache, local_dir_abspath);
}
@@ -12852,11 +12841,10 @@ svn_wc__db_temp_set_access(svn_wc__db_t
}
/* Better not override something already there. */
- SVN_ERR_ASSERT_NO_RETURN(apr_hash_get(wcroot->access_cache,
- local_dir_abspath,
- APR_HASH_KEY_STRING) == NULL);
- apr_hash_set(wcroot->access_cache, local_dir_abspath,
- APR_HASH_KEY_STRING, adm_access);
+ SVN_ERR_ASSERT_NO_RETURN(
+ svn_hash_gets(wcroot->access_cache, local_dir_abspath) == NULL
+ );
+ svn_hash_sets(wcroot->access_cache, local_dir_abspath, adm_access);
}
@@ -12875,8 +12863,7 @@ svn_wc__db_temp_close_access(svn_wc__db_
SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &local_relpath, db,
local_dir_abspath, scratch_pool, scratch_pool));
- apr_hash_set(wcroot->access_cache, local_dir_abspath,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(wcroot->access_cache, local_dir_abspath, NULL);
return SVN_NO_ERROR;
}
@@ -12903,8 +12890,7 @@ svn_wc__db_temp_clear_access(svn_wc__db_
return;
}
- apr_hash_set(wcroot->access_cache, local_dir_abspath,
- APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(wcroot->access_cache, local_dir_abspath, NULL);
}
@@ -13034,7 +13020,7 @@ get_conflict_marker_files(apr_hash_t **m
{
const char *marker_abspath = APR_ARRAY_IDX(markers, i, const char*);
- apr_hash_set(marker_files, marker_abspath, APR_HASH_KEY_STRING, "");
+ svn_hash_sets(marker_files, marker_abspath, "");
}
}
SVN_ERR(svn_sqlite__reset(stmt));
@@ -13065,7 +13051,7 @@ get_conflict_marker_files(apr_hash_t **m
{
const char *marker_abspath = APR_ARRAY_IDX(markers, i, const char*);
- apr_hash_set(marker_files, marker_abspath, APR_HASH_KEY_STRING, "");
+ svn_hash_sets(marker_files, marker_abspath, "");
}
}
@@ -14561,8 +14547,7 @@ svn_wc__db_get_excluded_subtrees(apr_has
svn_dirent_join(wcroot->abspath,
svn_sqlite__column_text(stmt, 0, NULL),
result_pool);
- apr_hash_set(*excluded_subtrees, abs_path, APR_HASH_KEY_STRING,
- abs_path);
+ svn_hash_sets(*excluded_subtrees, abs_path, abs_path);
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
@@ -14883,12 +14868,10 @@ svn_wc__db_base_get_lock_tokens_recursiv
}
SVN_ERR_ASSERT(last_repos_root_url != NULL);
- apr_hash_set(*lock_tokens,
- svn_path_url_add_component2(last_repos_root_url,
- child_relpath,
- result_pool),
- APR_HASH_KEY_STRING,
- lock_token);
+ svn_hash_sets(*lock_tokens,
+ svn_path_url_add_component2(last_repos_root_url,
+ child_relpath, result_pool),
+ lock_token);
SVN_ERR(svn_sqlite__step(&have_row, stmt));
}
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_update_move.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_update_move.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_update_move.c Fri Apr 5 05:29:29 2013
@@ -2249,10 +2249,10 @@ bump_moved_away(svn_wc__db_wcroot_t *wcr
src_root_relpath = svn_relpath_dirname(src_root_relpath,
iterpool);
- if (!apr_hash_get(src_done, src_relpath, APR_HASH_KEY_STRING))
+ if (!svn_hash_gets(src_done, src_relpath))
{
- apr_hash_set(src_done, apr_pstrdup(result_pool, src_relpath),
- APR_HASH_KEY_STRING, "");
+ svn_hash_sets(src_done,
+ apr_pstrdup(result_pool, src_relpath), "");
err = svn_wc__db_read_conflict_internal(&conflict, wcroot,
src_root_relpath,
iterpool, iterpool);
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_wcroot.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/wc_db_wcroot.c Fri Apr 5 05:29:29 2013
@@ -26,6 +26,7 @@
#include <assert.h>
#include "svn_dirent_uri.h"
+#include "svn_hash.h"
#include "svn_path.h"
#include "svn_version.h"
@@ -239,9 +240,9 @@ svn_wc__db_close(svn_wc__db_t *db)
const char *local_abspath = svn__apr_hash_index_key(hi);
if (wcroot->sdb)
- apr_hash_set(roots, wcroot->abspath, APR_HASH_KEY_STRING, wcroot);
+ svn_hash_sets(roots, wcroot->abspath, wcroot);
- apr_hash_set(db->dir_data, local_abspath, APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(db->dir_data, local_abspath, NULL);
}
/* Run the cleanup for each WCROOT. */
@@ -438,8 +439,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
### outside of the wcroot) and then managing all of that within DB.
### for now: play quick & dirty. */
- probe_wcroot = apr_hash_get(db->dir_data, local_abspath,
- APR_HASH_KEY_STRING);
+ probe_wcroot = svn_hash_gets(db->dir_data, local_abspath);
if (probe_wcroot != NULL)
{
*wcroot = probe_wcroot;
@@ -474,8 +474,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
scratch_pool);
/* Is this directory in our hash? */
- probe_wcroot = apr_hash_get(db->dir_data, local_dir_abspath,
- APR_HASH_KEY_STRING);
+ probe_wcroot = svn_hash_gets(db->dir_data, local_dir_abspath);
if (probe_wcroot != NULL)
{
const char *dir_relpath;
@@ -549,8 +548,17 @@ svn_wc__db_wcroot_parse_local_abspath(sv
{
#ifdef SVN_DEBUG
/* Install self-verification trigger statements. */
- SVN_ERR(svn_sqlite__exec_statements(sdb,
- STMT_VERIFICATION_TRIGGERS));
+ err = svn_sqlite__exec_statements(sdb,
+ STMT_VERIFICATION_TRIGGERS);
+ if (err && err->apr_err == SVN_ERR_SQLITE_ERROR)
+ {
+ /* Verification triggers can fail to install on old 1.7-dev
+ * formats which didn't have a NODES table yet. Ignore sqlite
+ * errors so such working copies can be upgraded. */
+ svn_error_clear(err);
+ }
+ else
+ SVN_ERR(err);
#endif
break;
}
@@ -599,8 +607,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
if (resolved_kind == svn_node_dir)
{
/* Is this directory recorded in our hash? */
- found_wcroot = apr_hash_get(db->dir_data, local_abspath,
- APR_HASH_KEY_STRING);
+ found_wcroot = svn_hash_gets(db->dir_data, local_abspath);
if (found_wcroot)
break;
@@ -627,8 +634,7 @@ try_symlink_as_dir:
moved_upwards = TRUE;
/* Is the parent directory recorded in our hash? */
- found_wcroot = apr_hash_get(db->dir_data, local_abspath,
- APR_HASH_KEY_STRING);
+ found_wcroot = svn_hash_gets(db->dir_data, local_abspath);
if (found_wcroot != NULL)
break;
}
@@ -816,10 +822,9 @@ try_symlink_as_dir:
/* We've found the appropriate WCROOT for the requested path. Stash
it into that path's directory. */
- apr_hash_set(db->dir_data,
- apr_pstrdup(db->state_pool, local_dir_abspath),
- APR_HASH_KEY_STRING,
- *wcroot);
+ svn_hash_sets(db->dir_data,
+ apr_pstrdup(db->state_pool, local_dir_abspath),
+ *wcroot);
/* Did we traverse up to parent directories? */
if (!moved_upwards)
@@ -842,12 +847,11 @@ try_symlink_as_dir:
const char *parent_dir = svn_dirent_dirname(scan_abspath, scratch_pool);
svn_wc__db_wcroot_t *parent_wcroot;
- parent_wcroot = apr_hash_get(db->dir_data, parent_dir,
- APR_HASH_KEY_STRING);
+ parent_wcroot = svn_hash_gets(db->dir_data, parent_dir);
if (parent_wcroot == NULL)
{
- apr_hash_set(db->dir_data, apr_pstrdup(db->state_pool, parent_dir),
- APR_HASH_KEY_STRING, *wcroot);
+ svn_hash_sets(db->dir_data, apr_pstrdup(db->state_pool, parent_dir),
+ *wcroot);
}
/* Move up a directory, stopping when we reach the directory where
@@ -865,8 +869,7 @@ svn_wc__db_drop_root(svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *scratch_pool)
{
- svn_wc__db_wcroot_t *root_wcroot = apr_hash_get(db->dir_data, local_abspath,
- APR_HASH_KEY_STRING);
+ svn_wc__db_wcroot_t *root_wcroot = svn_hash_gets(db->dir_data, local_abspath);
apr_hash_index_t *hi;
apr_status_t result;
@@ -886,8 +889,7 @@ svn_wc__db_drop_root(svn_wc__db_t *db,
svn_wc__db_wcroot_t *wcroot = svn__apr_hash_index_val(hi);
if (wcroot == root_wcroot)
- apr_hash_set(db->dir_data,
- svn__apr_hash_index_key(hi), APR_HASH_KEY_STRING, NULL);
+ svn_hash_sets(db->dir_data, svn__apr_hash_index_key(hi), NULL);
}
result = apr_pool_cleanup_run(db->state_pool, root_wcroot, close_wcroot);
Modified: subversion/branches/verify-keep-going/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_wc/workqueue.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_wc/workqueue.c Fri Apr 5 05:29:29 2013
@@ -620,14 +620,14 @@ run_file_install(work_item_baton_t *wqb,
/* Tweak the on-disk file according to its properties. */
#ifndef WIN32
- if (props && apr_hash_get(props, SVN_PROP_EXECUTABLE, APR_HASH_KEY_STRING))
+ if (props && svn_hash_gets(props, SVN_PROP_EXECUTABLE))
SVN_ERR(svn_io_set_file_executable(local_abspath, TRUE, FALSE,
scratch_pool));
#endif
/* Note that this explicitly checks the pristine properties, to make sure
that when the lock is locally set (=modification) it is not read only */
- if (props && apr_hash_get(props, SVN_PROP_NEEDS_LOCK, APR_HASH_KEY_STRING))
+ if (props && svn_hash_gets(props, SVN_PROP_NEEDS_LOCK))
{
svn_wc__db_status_t status;
svn_wc__db_lock_t *lock;
Modified: subversion/branches/verify-keep-going/subversion/mod_authz_svn/INSTALL
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_authz_svn/INSTALL?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_authz_svn/INSTALL (original)
+++ subversion/branches/verify-keep-going/subversion/mod_authz_svn/INSTALL Fri Apr 5 05:29:29 2013
@@ -171,7 +171,7 @@ II. Configuration
AuthUserFile /path/to/htpasswd/file
AuthzSVNAccessFile /path/to/access/file
- # Implicit Satisfy All
+ # implicit Satisfy All
Require valid-user
</Location>
Modified: subversion/branches/verify-keep-going/subversion/mod_authz_svn/mod_authz_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_authz_svn/mod_authz_svn.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_authz_svn/mod_authz_svn.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_authz_svn/mod_authz_svn.c Fri Apr 5 05:29:29 2013
@@ -110,7 +110,7 @@ canonicalize_access_file(const char *acc
}
/* We don't canonicalize repos relative urls since they get
- * canonicalized inside svn_repos_authz_read2() when they
+ * canonicalized before calling svn_repos_authz_read2() when they
* are resolved. */
return access_file;
@@ -309,6 +309,28 @@ log_svn_error(LOG_ARGS_SIGNATURE,
svn_error_clear(err);
}
+/* Resolve *PATH into an absolute canonical URL iff *PATH is a repos-relative
+ * URL. If *REPOS_URL is NULL convert REPOS_PATH into a file URL stored
+ * in *REPOS_URL, if *REPOS_URL is not null REPOS_PATH is ignored. The
+ * resulting *REPOS_URL will be used as the root of the repos-relative URL.
+ * The result will be stored in *PATH. */
+static svn_error_t *
+resolve_repos_relative_url(const char **path, const char **repos_url,
+ const char *repos_path, apr_pool_t *pool)
+{
+ if (svn_path_is_repos_relative_url(*path))
+ {
+ if (!*repos_url)
+ SVN_ERR(svn_uri_get_file_url_from_dirent(repos_url, repos_path, pool));
+
+ SVN_ERR(svn_path_resolve_repos_relative_url(path, *path,
+ *repos_url, pool));
+ *path = svn_uri_canonicalize(*path, pool);
+ }
+
+ return SVN_NO_ERROR;
+}
+
/*
* Get the, possibly cached, svn_authz_t for this request.
*/
@@ -318,10 +340,12 @@ get_access_conf(request_rec *r, authz_sv
{
const char *cache_key = NULL;
const char *access_file;
+ const char *groups_file;
const char *repos_path;
+ const char *repos_url = NULL;
void *user_data = NULL;
svn_authz_t *access_conf = NULL;
- svn_error_t *svn_err;
+ svn_error_t *svn_err = SVN_NO_ERROR;
dav_error *dav_err;
dav_err = dav_svn_get_repos_path(r, conf->base_path, &repos_path);
@@ -346,29 +370,54 @@ get_access_conf(request_rec *r, authz_sv
{
access_file = conf->access_file;
}
+ groups_file = conf->groups_file;
+
+ svn_err = resolve_repos_relative_url(&access_file, &repos_url, repos_path,
+ scratch_pool);
+ if (svn_err)
+ {
+ log_svn_error(APLOG_MARK, r,
+ conf->repo_relative_access_file ?
+ "Failed to load the AuthzSVNReposRelativeAccessFile:" :
+ "Failed to load the AuthzSVNAccessFile:",
+ svn_err, scratch_pool);
+ return NULL;
+ }
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"Path to authz file is %s", access_file);
- if (conf->groups_file)
+ if (groups_file)
{
+ svn_err = resolve_repos_relative_url(&groups_file, &repos_url, repos_path,
+ scratch_pool);
+ if (svn_err)
+ {
+ log_svn_error(APLOG_MARK, r,
+ "Failed to load the AuthzSVNGroupsFile:",
+ svn_err, scratch_pool);
+ return NULL;
+ }
+
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
- "Path to groups file is %s", conf->groups_file);
+ "Path to groups file is %s", groups_file);
}
cache_key = apr_pstrcat(scratch_pool, "mod_authz_svn:",
- access_file, (char *)NULL);
+ access_file, groups_file, (char *)NULL);
apr_pool_userdata_get(&user_data, cache_key, r->connection->pool);
access_conf = user_data;
if (access_conf == NULL)
{
+
svn_err = svn_repos_authz_read2(&access_conf, access_file,
- conf->groups_file, TRUE, repos_path,
+ groups_file, TRUE,
r->connection->pool);
+
if (svn_err)
{
log_svn_error(APLOG_MARK, r,
- "Failed to load the AuthzSVNAccessFile:",
+ "Failed to load the mod_authz_svn config:",
svn_err, scratch_pool);
access_conf = NULL;
}
Modified: subversion/branches/verify-keep-going/subversion/mod_dav_svn/activity.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/activity.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/activity.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/activity.c Fri Apr 5 05:29:29 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/branches/verify-keep-going/subversion/mod_dav_svn/deadprops.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/deadprops.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/deadprops.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/deadprops.c Fri Apr 5 05:29:29 2013
@@ -28,6 +28,7 @@
#include <httpd.h>
#include <mod_dav.h>
+#include "svn_hash.h"
#include "svn_xml.h"
#include "svn_pools.h"
#include "svn_dav.h"
@@ -177,7 +178,7 @@ save_value(dav_db *db, const dav_prop_na
if (propname == NULL)
{
- if (db->resource->info->repos->autoversioning)
+ if (resource->info->repos->autoversioning)
/* ignore the unknown namespace of the incoming prop. */
propname = name->name;
else
@@ -207,10 +208,10 @@ save_value(dav_db *db, const dav_prop_na
/* A subpool to cope with mod_dav making multiple calls, e.g. during
PROPPATCH with multiple values. */
- subpool = svn_pool_create(db->resource->pool);
- if (db->resource->baselined)
+ subpool = svn_pool_create(resource->pool);
+ if (resource->baselined)
{
- if (db->resource->working)
+ if (resource->working)
{
serr = svn_repos_fs_change_txn_prop(resource->info->root.txn,
propname, value,
Modified: subversion/branches/verify-keep-going/subversion/mod_dav_svn/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/lock.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/lock.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/lock.c Fri Apr 5 05:29:29 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/branches/verify-keep-going/subversion/mod_dav_svn/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/merge.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/merge.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/merge.c Fri Apr 5 05:29:29 2013
@@ -29,6 +29,7 @@
#include <httpd.h>
#include <util_filter.h>
+#include "svn_hash.h"
#include "svn_pools.h"
#include "svn_fs.h"
#include "svn_props.h"
@@ -169,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)
@@ -186,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/branches/verify-keep-going/subversion/mod_dav_svn/mod_dav_svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/mod_dav_svn.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/mod_dav_svn.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/mod_dav_svn.c Fri Apr 5 05:29:29 2013
@@ -34,6 +34,7 @@
#include <ap_provider.h>
#include <mod_dav.h>
+#include "svn_hash.h"
#include "svn_version.h"
#include "svn_cache_config.h"
#include "svn_utf.h"
Modified: subversion/branches/verify-keep-going/subversion/mod_dav_svn/reports/log.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/reports/log.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/reports/log.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/reports/log.c Fri Apr 5 05:29:29 2013
@@ -341,10 +341,9 @@ dav_svn__log_report(const dav_resource *
dav_xml_get_cdata(child, resource->pool, 1));
if (serr)
{
- derr = dav_svn__convert_err(serr, HTTP_BAD_REQUEST,
+ return dav_svn__convert_err(serr, HTTP_BAD_REQUEST,
"Malformed CDATA in element "
"\"limit\"", resource->pool);
- goto cleanup;
}
}
else if (strcmp(child->name, "discover-changed-paths") == 0)
Modified: subversion/branches/verify-keep-going/subversion/mod_dav_svn/reports/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/reports/update.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/reports/update.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/reports/update.c Fri Apr 5 05:29:29 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/branches/verify-keep-going/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/repos.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/repos.c Fri Apr 5 05:29:29 2013
@@ -37,6 +37,7 @@
#define CORE_PRIVATE /* To make ap_show_mpm public in 2.2 */
#include <http_config.h>
+#include "svn_hash.h"
#include "svn_types.h"
#include "svn_pools.h"
#include "svn_error.h"
@@ -2127,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");
@@ -2139,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);
}
}
}
@@ -2157,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"))
@@ -3216,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/branches/verify-keep-going/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/mod_dav_svn/version.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/verify-keep-going/subversion/mod_dav_svn/version.c Fri Apr 5 05:29:29 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"
@@ -150,7 +151,7 @@ get_vsn_options(apr_pool_t *p, apr_text_
apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_PARTIAL_REPLAY);
apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INHERITED_PROPS);
apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INLINE_PROPS);
- apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_GET_FILE_REVS_REVERSE);
+ apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_REVERSE_FILE_REVS);
/* Mergeinfo is a special case: here we merely say that the server
* knows how to handle mergeinfo -- whether the repository does too
* is a separate matter.
@@ -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/branches/verify-keep-going/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c Fri Apr 5 05:29:29 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/branches/verify-keep-going/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/cl.h?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/cl.h (original)
+++ subversion/branches/verify-keep-going/subversion/svn/cl.h Fri Apr 5 05:29:29 2013
@@ -180,17 +180,17 @@ typedef struct svn_cl__opt_state_t
svn_boolean_t no_auth_cache; /* do not cache authentication information */
struct
{
- const char *diff_cmd; /* the external diff command to use */
- svn_boolean_t internal_diff; /* override diff_cmd in config file */
- svn_boolean_t no_diff_added; /* do not show diffs for deleted files */
- svn_boolean_t no_diff_deleted; /* do not show diffs for deleted files */
+ const char *diff_cmd; /* the external diff command to use */
+ svn_boolean_t internal_diff; /* override diff_cmd in config file */
+ svn_boolean_t no_diff_added; /* do not show diffs for deleted files */
+ svn_boolean_t no_diff_deleted; /* do not show diffs for deleted files */
svn_boolean_t show_copies_as_adds; /* do not diff copies with their source */
- svn_boolean_t notice_ancestry; /* notice ancestry for diff-y operations */
- svn_boolean_t summarize; /* create a summary of a diff */
+ svn_boolean_t notice_ancestry; /* notice ancestry for diff-y operations */
+ svn_boolean_t summarize; /* create a summary of a diff */
svn_boolean_t use_git_diff_format; /* Use git's extended diff format */
- svn_boolean_t ignore_properties; /* ignore properties */
- svn_boolean_t properties_only; /* Show properties only */
- svn_boolean_t patch_compatible; /* Output compatible with GNU patch */
+ svn_boolean_t ignore_properties; /* ignore properties */
+ svn_boolean_t properties_only; /* Show properties only */
+ svn_boolean_t patch_compatible; /* Output compatible with GNU patch */
} diff;
svn_boolean_t ignore_ancestry; /* ignore ancestry for merge-y operations */
svn_boolean_t ignore_externals;/* ignore externals definitions */
@@ -219,21 +219,21 @@ typedef struct svn_cl__opt_state_t
apr_hash_t *revprop_table; /* table of revision properties to get/set */
svn_boolean_t parents; /* create intermediate directories */
svn_boolean_t use_merge_history; /* use/display extra merge information */
- svn_cl__accept_t accept_which; /* how to handle conflicts */
- svn_cl__show_revs_t show_revs; /* mergeinfo flavor */
- svn_depth_t set_depth; /* new sticky ambient depth value */
- svn_boolean_t reintegrate; /* use "reintegrate" merge-source heuristic */
+ svn_cl__accept_t accept_which; /* how to handle conflicts */
+ svn_cl__show_revs_t show_revs; /* mergeinfo flavor */
+ svn_depth_t set_depth; /* new sticky ambient depth value */
+ svn_boolean_t reintegrate; /* use "reintegrate" merge-source heuristic */
svn_boolean_t trust_server_cert; /* trust server SSL certs that would
otherwise be rejected as "untrusted" */
int strip; /* number of leading path components to strip */
- svn_boolean_t ignore_keywords; /* do not expand keywords */
- svn_boolean_t reverse_diff; /* reverse a diff (e.g. when patching) */
+ svn_boolean_t ignore_keywords; /* do not expand keywords */
+ svn_boolean_t reverse_diff; /* reverse a diff (e.g. when patching) */
svn_boolean_t ignore_whitespace; /* don't account for whitespace when
patching */
- svn_boolean_t show_diff; /* produce diff output (maps to --diff) */
- svn_boolean_t allow_mixed_rev; /* Allow operation on mixed-revision WC */
+ svn_boolean_t show_diff; /* produce diff output (maps to --diff) */
+ svn_boolean_t allow_mixed_rev; /* Allow operation on mixed-revision WC */
svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
- svn_boolean_t show_inherited_props; /* get inherited properties */
+ svn_boolean_t show_inherited_props; /* get inherited properties */
apr_array_header_t* search_patterns; /* pattern arguments for --search */
} svn_cl__opt_state_t;
@@ -361,44 +361,6 @@ svn_cl__conflict_func_interactive(svn_wc
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
-/* Create and return a baton for use with svn_cl__conflict_func_postpone()
- * and svn_cl__resolve_postponed_conflicts(), allocated in RESULT_POOL.
- */
-void *
-svn_cl__get_conflict_func_postpone_baton(apr_pool_t *result_pool);
-
-/* A conflict-resolution callback which postpones all conflicts and
- * remembers conflicted paths in BATON. BATON must have been obtained
- * from svn_cl__get_conflict_func_postpone_baton().
- *
- * Implements svn_wc_conflict_resolver_func2_t.
- */
-svn_error_t *
-svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
- const svn_wc_conflict_description2_t *desc,
- void *baton,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/* Perform conflict resolution on any conflicted paths stored in the BATON
- * which was obtained from svn_cl__get_conflict_func_postpone_baton().
- *
- * If CONFLICTS_ALL_RESOLVED is not null, set *CONFLICTS_ALL_RESOLVED to
- * true if this resolves all the conflicts on the paths that were
- * recorded (or if none were recorded); or to false if some conflicts
- * remain.
- *
- * The conflict resolution will be interactive if ACCEPT_WHICH is
- * svn_cl__accept_unspecified.
- */
-svn_error_t *
-svn_cl__resolve_postponed_conflicts(svn_boolean_t *conflicts_all_resolved,
- void *baton,
- svn_cl__accept_t accept_which,
- const char *editor_cmd,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool);
-
/*** Command-line output functions -- printing to the user. ***/
Modified: subversion/branches/verify-keep-going/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/commit-cmd.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/commit-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/commit-cmd.c Fri Apr 5 05:29:29 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/branches/verify-keep-going/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c Fri Apr 5 05:29:29 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"
@@ -1151,134 +1152,3 @@ svn_cl__conflict_func_interactive(svn_wc
return SVN_NO_ERROR;
}
-
-svn_error_t *
-svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
- const svn_wc_conflict_description2_t *desc,
- void *baton,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- 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, "");
-
- *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
- NULL, result_pool);
- return SVN_NO_ERROR;
-}
-
-void *
-svn_cl__get_conflict_func_postpone_baton(apr_pool_t *result_pool)
-{
- return apr_hash_make(result_pool);
-}
-
-static apr_array_header_t *
-get_postponed_conflicted_paths(void *baton, apr_pool_t *result_pool)
-{
- apr_hash_t *conflicted_paths = baton;
- apr_array_header_t *sorted_array;
- apr_array_header_t *result_array;
- int i;
-
- sorted_array = svn_sort__hash(conflicted_paths,
- svn_sort_compare_items_as_paths,
- apr_hash_pool_get(conflicted_paths));
- result_array = apr_array_make(result_pool, sorted_array->nelts,
- sizeof(const char *));
- for (i = 0; i < sorted_array->nelts; i++)
- {
- svn_sort__item_t item;
-
- item = APR_ARRAY_IDX(sorted_array, i, svn_sort__item_t);
- APR_ARRAY_PUSH(result_array, const char *) = apr_pstrdup(result_pool,
- item.key);
- }
-
- return result_array;
-}
-
-svn_error_t *
-svn_cl__resolve_postponed_conflicts(svn_boolean_t *conflicts_all_resolved,
- void *baton,
- svn_cl__accept_t accept_which,
- const char *editor_cmd,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool)
-{
- apr_array_header_t *targets;
- int i;
- apr_pool_t *iterpool;
-
- targets = get_postponed_conflicted_paths(baton, scratch_pool);
-
- if (conflicts_all_resolved != NULL)
- *conflicts_all_resolved = TRUE;
-
- iterpool = svn_pool_create(scratch_pool);
- for (i = 0; i < targets->nelts; i++)
- {
- const char *target = APR_ARRAY_IDX(targets, i, const char *);
- svn_error_t *err = SVN_NO_ERROR;
- const char *local_abspath;
- svn_wc_conflict_resolver_func2_t conflict_func2;
- void *conflict_baton2;
- svn_cl__interactive_conflict_baton_t *b;
- svn_boolean_t text_c, prop_c, tree_c;
-
- svn_pool_clear(iterpool);
-
- SVN_ERR(svn_dirent_get_absolute(&local_abspath, target, iterpool));
-
- /* Store old state */
- conflict_func2 = ctx->conflict_func2;
- conflict_baton2 = ctx->conflict_baton2;
-
- /* Set up the interactive resolver. */
- ctx->conflict_func2 = svn_cl__conflict_func_interactive;
- SVN_ERR(svn_cl__get_conflict_func_interactive_baton(&b, accept_which,
- ctx->config,
- editor_cmd,
- ctx->cancel_func,
- ctx->cancel_baton,
- scratch_pool));
- ctx->conflict_baton2 = b;
-
- err = svn_client_resolve(local_abspath, svn_depth_empty,
- svn_wc_conflict_choose_unspecified,
- ctx, iterpool);
-
- /* Restore state */
- ctx->conflict_func2 = conflict_func2;
- ctx->conflict_baton2 = conflict_baton2;
-
- if (err)
- {
- if ((err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
- && (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND))
- return svn_error_trace(err);
-
- svn_error_clear(err);
- }
-
- /* Report if we left any of the conflicts unresolved */
- if (conflicts_all_resolved != NULL)
- {
- SVN_ERR(svn_wc_conflicted_p3(&text_c, &prop_c, &tree_c,
- ctx->wc_ctx, local_abspath,
- scratch_pool));
- if (text_c || prop_c || tree_c)
- *conflicts_all_resolved = FALSE;
- }
-
- if (b->quit)
- break;
- }
- svn_pool_destroy(iterpool);
-
- return SVN_NO_ERROR;
-}
Modified: subversion/branches/verify-keep-going/subversion/svn/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/help-cmd.c?rev=1464833&r1=1464832&r2=1464833&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/help-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/help-cmd.c Fri Apr 5 05:29:29 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;