You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/03/30 21:02:33 UTC
svn commit: r1462850 [9/14] - in /subversion/branches/fsfs-format7: ./
build/ build/ac-macros/ build/generator/ contrib/client-side/svncopy/
notes/ subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversi...
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/ambient_depth_filter_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/ambient_depth_filter_editor.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/ambient_depth_filter_editor.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/ambient_depth_filter_editor.c Sat Mar 30 20:02:27 2013
@@ -121,7 +121,7 @@ struct dir_baton
*/
static svn_error_t *
ambient_read_info(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_depth_t *depth,
svn_wc__db_t *db,
const char *local_abspath,
@@ -140,7 +140,7 @@ ambient_read_info(svn_wc__db_status_t *s
{
svn_error_clear(err);
- *kind = svn_kind_unknown;
+ *kind = svn_node_unknown;
if (status)
*status = svn_wc__db_status_normal;
if (depth)
@@ -190,7 +190,7 @@ make_dir_baton(struct dir_baton **d_p,
{
svn_boolean_t exclude;
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_boolean_t exists = TRUE;
if (!added)
@@ -201,10 +201,10 @@ make_dir_baton(struct dir_baton **d_p,
else
{
status = svn_wc__db_status_not_present;
- kind = svn_kind_unknown;
+ kind = svn_node_unknown;
}
- exists = (kind != svn_kind_unknown);
+ exists = (kind != svn_node_unknown);
if (pb->ambient_depth == svn_depth_empty
|| pb->ambient_depth == svn_depth_files)
@@ -250,7 +250,7 @@ make_file_baton(struct file_baton **f_p,
struct file_baton *f = apr_pcalloc(pool, sizeof(*f));
struct edit_baton *eb = pb->edit_baton;
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
const char *abspath;
SVN_ERR_ASSERT(path);
@@ -272,7 +272,7 @@ make_file_baton(struct file_baton **f_p,
else
{
status = svn_wc__db_status_not_present;
- kind = svn_kind_unknown;
+ kind = svn_node_unknown;
}
if (pb->ambient_depth == svn_depth_empty)
@@ -285,7 +285,7 @@ make_file_baton(struct file_baton **f_p,
if (status == svn_wc__db_status_not_present
|| status == svn_wc__db_status_server_excluded
|| status == svn_wc__db_status_excluded
- || kind == svn_kind_unknown)
+ || kind == svn_node_unknown)
{
f->ambiently_excluded = TRUE;
*f_p = f;
@@ -344,7 +344,7 @@ open_root(void *edit_baton,
if (! *eb->target)
{
/* For an update with a NULL target, this is equivalent to open_dir(): */
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_wc__db_status_t status;
svn_depth_t depth;
@@ -353,7 +353,7 @@ open_root(void *edit_baton,
eb->db, eb->anchor_abspath,
pool));
- if (kind != svn_kind_unknown
+ if (kind != svn_node_unknown
&& status != svn_wc__db_status_not_present
&& status != svn_wc__db_status_excluded
&& status != svn_wc__db_status_server_excluded)
@@ -384,7 +384,7 @@ delete_entry(const char *path,
/* If the entry we want to delete doesn't exist, that's OK.
It's probably an old server that doesn't understand
depths. */
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_wc__db_status_t status;
const char *abspath;
@@ -393,7 +393,7 @@ delete_entry(const char *path,
SVN_ERR(ambient_read_info(&status, &kind, NULL,
eb->db, abspath, pool));
- if (kind == svn_kind_unknown
+ if (kind == svn_node_unknown
|| status == svn_wc__db_status_not_present
|| status == svn_wc__db_status_excluded
|| status == svn_wc__db_status_server_excluded)
@@ -462,7 +462,7 @@ open_directory(const char *path,
struct edit_baton *eb = pb->edit_baton;
struct dir_baton *b;
const char *local_abspath;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_wc__db_status_t status;
svn_depth_t depth;
@@ -484,7 +484,7 @@ open_directory(const char *path,
SVN_ERR(ambient_read_info(&status, &kind, &depth,
eb->db, local_abspath, pool));
- if (kind != svn_kind_unknown
+ if (kind != svn_node_unknown
&& status != svn_wc__db_status_not_present
&& status != svn_wc__db_status_excluded
&& status != svn_wc__db_status_server_excluded)
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/cleanup.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/cleanup.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/cleanup.c Sat Mar 30 20:02:27 2013
@@ -76,7 +76,7 @@ repair_timestamps(svn_wc__db_t *db,
void *cancel_baton,
apr_pool_t *scratch_pool)
{
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_wc__db_status_t status;
if (cancel_func)
@@ -95,15 +95,15 @@ repair_timestamps(svn_wc__db_t *db,
|| status == svn_wc__db_status_not_present)
return SVN_NO_ERROR;
- if (kind == svn_kind_file
- || kind == svn_kind_symlink)
+ if (kind == svn_node_file
+ || kind == svn_node_symlink)
{
svn_boolean_t modified;
SVN_ERR(svn_wc__internal_file_modified_p(&modified,
db, local_abspath, FALSE,
scratch_pool));
}
- else if (kind == svn_kind_dir)
+ else if (kind == svn_node_dir)
{
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
const apr_array_header_t *children;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/conflicts.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/conflicts.c Sat Mar 30 20:02:27 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));
}
@@ -1283,7 +1279,7 @@ generate_propconflict(svn_boolean_t *con
svn_wc_conflict_result_t *result = NULL;
svn_wc_conflict_description2_t *cdesc;
const char *dirpath = svn_dirent_dirname(local_abspath, scratch_pool);
- svn_kind_t kind;
+ svn_node_kind_t kind;
const svn_string_t *new_value = NULL;
SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath,
@@ -1292,7 +1288,7 @@ generate_propconflict(svn_boolean_t *con
FALSE /* show_hidden */,
scratch_pool));
- if (kind == svn_kind_none)
+ if (kind == svn_node_none)
return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
_("The node '%s' was not found."),
svn_dirent_local_style(local_abspath,
@@ -1300,7 +1296,7 @@ generate_propconflict(svn_boolean_t *con
cdesc = svn_wc_conflict_description_create_prop2(
local_abspath,
- (kind == svn_kind_dir) ? svn_node_dir : svn_node_file,
+ (kind == svn_node_dir) ? svn_node_dir : svn_node_file,
propname, scratch_pool);
cdesc->operation = operation;
@@ -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,
@@ -3075,7 +3064,7 @@ svn_wc__resolve_conflicts(svn_wc_context
void *notify_baton,
apr_pool_t *scratch_pool)
{
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_boolean_t conflicted;
struct conflict_status_walker_baton cswb;
@@ -3097,7 +3086,7 @@ svn_wc__resolve_conflicts(svn_wc_context
/* When the implementation still used the entry walker, depth
unknown was translated to infinity. */
- if (kind != svn_kind_dir)
+ if (kind != svn_node_dir)
depth = svn_depth_empty;
else if (depth == svn_depth_unknown)
depth = svn_depth_infinity;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/copy.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/copy.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/copy.c Sat Mar 30 20:02:27 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"
@@ -171,7 +172,7 @@ copy_to_tmpdir(svn_skel_t **work_item,
versioned file itself.
This also works for versioned symlinks that are stored in the db as
- svn_kind_file with svn:special set. */
+ svn_node_file with svn:special set. */
static svn_error_t *
copy_versioned_file(svn_wc__db_t *db,
const char *src_abspath,
@@ -381,7 +382,7 @@ copy_versioned_dir(svn_wc__db_t *db,
|| info->status == svn_wc__db_status_added)
{
/* We have more work to do than just changing the DB */
- if (info->kind == svn_kind_file)
+ if (info->kind == svn_node_file)
{
/* We should skip this node if this child is a file external
(issues #3589, #4000) */
@@ -397,7 +398,7 @@ copy_versioned_dir(svn_wc__db_t *db,
NULL, NULL,
iterpool));
}
- else if (info->kind == svn_kind_dir)
+ else if (info->kind == svn_node_dir)
SVN_ERR(copy_versioned_dir(db,
child_src_abspath, child_dst_abspath,
dst_op_root_abspath, tmpdir_abspath,
@@ -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,
@@ -524,7 +524,7 @@ copy_or_move(svn_boolean_t *move_degrade
apr_pool_t *scratch_pool)
{
svn_wc__db_t *db = wc_ctx->db;
- svn_kind_t src_db_kind;
+ svn_node_kind_t src_db_kind;
const char *dstdir_abspath;
svn_boolean_t conflicted;
const char *tmpdir_abspath;
@@ -762,8 +762,8 @@ copy_or_move(svn_boolean_t *move_degrade
cancel_func, cancel_baton,
scratch_pool));
- if (src_db_kind == svn_kind_file
- || src_db_kind == svn_kind_symlink)
+ if (src_db_kind == svn_node_file
+ || src_db_kind == svn_node_symlink)
{
err = copy_versioned_file(db, src_abspath, dst_abspath, dst_abspath,
tmpdir_abspath,
@@ -954,7 +954,7 @@ remove_all_conflict_markers(svn_wc__db_t
svn_dirent_join(wc_dir_abspath, name, iterpool),
iterpool));
}
- if (info->kind == svn_kind_dir)
+ if (info->kind == svn_node_dir)
{
svn_pool_clear(iterpool);
SVN_ERR(remove_all_conflict_markers(
@@ -983,7 +983,7 @@ svn_wc__move2(svn_wc_context_t *wc_ctx,
{
svn_wc__db_t *db = wc_ctx->db;
svn_boolean_t move_degraded_to_copy = FALSE;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_boolean_t conflicted;
/* Verify that we have the required write locks. */
@@ -1028,7 +1028,7 @@ svn_wc__move2(svn_wc_context_t *wc_ctx,
db, src_abspath,
scratch_pool, scratch_pool));
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
SVN_ERR(remove_all_conflict_markers(db, src_abspath, dst_abspath,
scratch_pool));
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/crop.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/crop.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/crop.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/crop.c Sat Mar 30 20:02:27 2013
@@ -84,7 +84,7 @@ crop_children(svn_wc__db_t *db,
const char *child_name = APR_ARRAY_IDX(children, i, const char *);
const char *child_abspath;
svn_wc__db_status_t child_status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_depth_t child_depth;
svn_pool_clear(iterpool);
@@ -103,7 +103,7 @@ crop_children(svn_wc__db_t *db,
child_status == svn_wc__db_status_excluded ||
child_status == svn_wc__db_status_not_present)
{
- svn_depth_t remove_below = (kind == svn_kind_dir)
+ svn_depth_t remove_below = (kind == svn_node_dir)
? svn_depth_immediates
: svn_depth_files;
if (new_depth < remove_below)
@@ -115,7 +115,7 @@ crop_children(svn_wc__db_t *db,
continue;
}
- else if (kind == svn_kind_file)
+ else if (kind == svn_node_file)
{
if (new_depth == svn_depth_empty)
SVN_ERR(svn_wc__db_op_remove_node(NULL,
@@ -124,7 +124,7 @@ crop_children(svn_wc__db_t *db,
FALSE /* destroy_changes */,
SVN_INVALID_REVNUM,
svn_wc__db_status_not_present,
- svn_kind_none,
+ svn_node_none,
NULL, NULL,
cancel_func, cancel_baton,
iterpool));
@@ -132,7 +132,7 @@ crop_children(svn_wc__db_t *db,
continue;
}
- else if (kind == svn_kind_dir)
+ else if (kind == svn_node_dir)
{
if (new_depth < svn_depth_immediates)
{
@@ -142,7 +142,7 @@ crop_children(svn_wc__db_t *db,
FALSE /* destroy_changes */,
SVN_INVALID_REVNUM,
svn_wc__db_status_not_present,
- svn_kind_none,
+ svn_node_none,
NULL, NULL,
cancel_func, cancel_baton,
iterpool));
@@ -194,7 +194,7 @@ svn_wc_exclude(svn_wc_context_t *wc_ctx,
{
svn_boolean_t is_root, is_switched;
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_revnum_t revision;
const char *repos_relpath, *repos_root, *repos_uuid;
@@ -297,7 +297,7 @@ svn_wc_crop_tree2(svn_wc_context_t *wc_c
{
svn_wc__db_t *db = wc_ctx->db;
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_depth_t dir_depth;
/* Only makes sense when the depth is restrictive. */
@@ -314,7 +314,7 @@ svn_wc_crop_tree2(svn_wc_context_t *wc_c
db, local_abspath,
scratch_pool, scratch_pool));
- if (kind != svn_kind_dir)
+ if (kind != svn_node_dir)
return svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
_("Can only crop directories"));
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/delete.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/delete.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/delete.c Sat Mar 30 20:02:27 2013
@@ -110,7 +110,7 @@ static svn_error_t *
create_delete_wq_items(svn_skel_t **work_items,
svn_wc__db_t *db,
const char *local_abspath,
- svn_kind_t kind,
+ svn_node_kind_t kind,
svn_boolean_t conflicted,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
@@ -118,7 +118,7 @@ create_delete_wq_items(svn_skel_t **work
*work_items = NULL;
/* Schedule the on-disk delete */
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
SVN_ERR(svn_wc__wq_build_dir_remove(work_items, db, local_abspath,
local_abspath,
TRUE /* recursive */,
@@ -185,7 +185,7 @@ svn_wc__delete_many(svn_wc_context_t *wc
svn_wc__db_t *db = wc_ctx->db;
svn_error_t *err;
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_skel_t *work_items = NULL;
apr_array_header_t *versioned_targets;
const char *local_abspath;
@@ -244,7 +244,7 @@ svn_wc__delete_many(svn_wc_context_t *wc
}
if (status == svn_wc__db_status_normal
- && kind == svn_kind_dir)
+ && kind == svn_node_dir)
{
svn_boolean_t is_wcroot;
SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath,
@@ -323,7 +323,7 @@ svn_wc_delete4(svn_wc_context_t *wc_ctx,
svn_wc__db_t *db = wc_ctx->db;
svn_error_t *err;
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_boolean_t conflicted;
svn_skel_t *work_items = NULL;
const char *repos_relpath;
@@ -363,7 +363,7 @@ svn_wc_delete4(svn_wc_context_t *wc_ctx,
}
if (status == svn_wc__db_status_normal
- && kind == svn_kind_dir)
+ && kind == svn_node_dir)
{
svn_boolean_t is_wcroot;
SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath, pool));
@@ -433,7 +433,7 @@ svn_wc__internal_remove_from_revision_co
destroy_wf /* destroy_changes */,
SVN_INVALID_REVNUM,
svn_wc__db_status_not_present,
- svn_kind_none,
+ svn_node_none,
NULL, NULL,
cancel_func, cancel_baton,
scratch_pool));
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/deprecated.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/deprecated.c Sat Mar 30 20:02:27 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;
@@ -970,13 +964,13 @@ svn_wc_add3(const char *path,
/* Make sure the caller gets the new access baton in the set. */
if (svn_wc__adm_retrieve_internal2(wc_db, local_abspath, pool) == NULL)
{
- svn_kind_t kind;
+ svn_node_kind_t kind;
SVN_ERR(svn_wc__db_read_kind(&kind, wc_db, local_abspath,
FALSE /* allow_missing */,
TRUE /* show_deleted */,
FALSE /* show_hidden */, pool));
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
{
svn_wc_adm_access_t *adm_access;
@@ -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))
@@ -3259,7 +3249,7 @@ svn_wc_is_wc_root2(svn_boolean_t *wc_roo
{
svn_boolean_t is_root;
svn_boolean_t is_switched;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_error_t *err;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -3275,7 +3265,7 @@ svn_wc_is_wc_root2(svn_boolean_t *wc_roo
return svn_error_create(SVN_ERR_ENTRY_NOT_FOUND, err, err->message);
}
- *wc_root = is_root || (kind == svn_kind_dir && is_switched);
+ *wc_root = is_root || (kind == svn_node_dir && is_switched);
return SVN_NO_ERROR;
}
@@ -4581,9 +4571,9 @@ svn_wc_read_kind(svn_node_kind_t *kind,
show_hidden,
scratch_pool));
- /*if (db_kind == svn_kind_dir)
+ /*if (db_kind == svn_node_dir)
*kind = svn_node_dir;
- else if (db_kind == svn_kind_file || db_kind == svn_kind_symlink)
+ else if (db_kind == svn_node_file || db_kind == svn_node_symlink)
*kind = svn_node_file;
else
*kind = svn_node_none;*/
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/diff_editor.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/diff_editor.c Sat Mar 30 20:02:27 2013
@@ -696,7 +696,7 @@ walk_local_nodes_diff(struct edit_baton_
const char *child_relpath;
svn_boolean_t repos_only;
svn_boolean_t local_only;
- svn_kind_t base_kind;
+ svn_node_kind_t base_kind;
if (eb->cancel_func)
SVN_ERR(eb->cancel_func(eb->cancel_baton));
@@ -772,7 +772,7 @@ walk_local_nodes_diff(struct edit_baton_
if (eb->local_before_remote && local_only)
{
- if (info->kind == svn_kind_file && diff_files)
+ if (info->kind == svn_node_file && diff_files)
SVN_ERR(svn_wc__diff_local_only_file(db, child_abspath,
child_relpath,
eb->processor, dir_baton,
@@ -781,7 +781,7 @@ walk_local_nodes_diff(struct edit_baton_
eb->cancel_func,
eb->cancel_baton,
iterpool));
- else if (info->kind == svn_kind_dir && diff_dirs)
+ else if (info->kind == svn_node_dir && diff_dirs)
SVN_ERR(svn_wc__diff_local_only_dir(db, child_abspath,
child_relpath,
depth_below_here,
@@ -796,12 +796,12 @@ walk_local_nodes_diff(struct edit_baton_
if (repos_only)
{
/* Report repository form deleted */
- if (base_kind == svn_kind_file && diff_files)
+ if (base_kind == svn_node_file && diff_files)
SVN_ERR(svn_wc__diff_base_only_file(db, child_abspath,
child_relpath, eb->revnum,
eb->processor, dir_baton,
iterpool));
- else if (base_kind == svn_kind_dir && diff_dirs)
+ else if (base_kind == svn_node_dir && diff_dirs)
SVN_ERR(svn_wc__diff_base_only_dir(db, child_abspath,
child_relpath, eb->revnum,
depth_below_here,
@@ -813,7 +813,7 @@ walk_local_nodes_diff(struct edit_baton_
else if (!local_only) /* Not local only nor remote only */
{
/* Diff base against actual */
- if (info->kind == svn_kind_file && diff_files)
+ if (info->kind == svn_node_file && diff_files)
{
if (info->status != svn_wc__db_status_normal
|| !eb->diff_pristine)
@@ -830,7 +830,7 @@ walk_local_nodes_diff(struct edit_baton_
scratch_pool));
}
}
- else if (info->kind == svn_kind_dir && diff_dirs)
+ else if (info->kind == svn_node_dir && diff_dirs)
SVN_ERR(walk_local_nodes_diff(eb, child_abspath,
child_relpath,
depth_below_here,
@@ -841,7 +841,7 @@ walk_local_nodes_diff(struct edit_baton_
if (!eb->local_before_remote && local_only)
{
- if (info->kind == svn_kind_file && diff_files)
+ if (info->kind == svn_node_file && diff_files)
SVN_ERR(svn_wc__diff_local_only_file(db, child_abspath,
child_relpath,
eb->processor, dir_baton,
@@ -850,7 +850,7 @@ walk_local_nodes_diff(struct edit_baton_
eb->cancel_func,
eb->cancel_baton,
iterpool));
- else if (info->kind == svn_kind_dir && diff_dirs)
+ else if (info->kind == svn_node_dir && diff_dirs)
SVN_ERR(svn_wc__diff_local_only_dir(db, child_abspath,
child_relpath, depth_below_here,
eb->processor, dir_baton,
@@ -924,7 +924,7 @@ svn_wc__diff_local_only_file(svn_wc__db_
svn_diff_source_t *right_src;
svn_diff_source_t *copyfrom_src = NULL;
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
const svn_checksum_t *checksum;
const char *original_repos_relpath;
svn_revnum_t original_revision;
@@ -949,7 +949,7 @@ svn_wc__diff_local_only_file(svn_wc__db_
db, local_abspath,
scratch_pool, scratch_pool));
- assert(kind == svn_kind_file
+ assert(kind == svn_node_file
&& (status == svn_wc__db_status_normal
|| status == svn_wc__db_status_added
|| (status == svn_wc__db_status_deleted && diff_pristine)));
@@ -1129,8 +1129,8 @@ svn_wc__diff_local_only_dir(svn_wc__db_t
switch (info->kind)
{
- case svn_kind_file:
- case svn_kind_symlink:
+ case svn_node_file:
+ case svn_node_symlink:
SVN_ERR(svn_wc__diff_local_only_file(db, child_abspath,
child_relpath,
processor, pdb,
@@ -1140,7 +1140,7 @@ svn_wc__diff_local_only_dir(svn_wc__db_t
scratch_pool));
break;
- case svn_kind_dir:
+ case svn_node_dir:
if (depth > svn_depth_files || depth == svn_depth_unknown)
{
SVN_ERR(svn_wc__diff_local_only_dir(db, child_abspath,
@@ -1227,7 +1227,7 @@ handle_local_only(struct dir_baton_t *pb
break;
}
- if (info->kind == svn_kind_dir)
+ if (info->kind == svn_node_dir)
{
svn_depth_t depth ;
@@ -1272,7 +1272,7 @@ svn_wc__diff_base_only_file(svn_wc__db_t
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
const svn_checksum_t *checksum;
apr_hash_t *props;
void *file_baton = NULL;
@@ -1289,7 +1289,7 @@ svn_wc__diff_base_only_file(svn_wc__db_t
scratch_pool, scratch_pool));
SVN_ERR_ASSERT(status == svn_wc__db_status_normal
- && kind == svn_kind_file
+ && kind == svn_node_file
&& checksum);
left_src = svn_diff__source_create(revision, scratch_pool);
@@ -1392,15 +1392,15 @@ svn_wc__diff_base_only_dir(svn_wc__db_t
switch (info->kind)
{
- case svn_kind_file:
- case svn_kind_symlink:
+ case svn_node_file:
+ case svn_node_symlink:
SVN_ERR(svn_wc__diff_base_only_file(db, child_abspath,
child_relpath,
revision,
processor, dir_baton,
iterpool));
break;
- case svn_kind_dir:
+ case svn_node_dir:
if (depth > svn_depth_files || depth == svn_depth_unknown)
{
svn_depth_t depth_below_here = depth;
@@ -1534,7 +1534,7 @@ add_directory(const char *path,
info = svn_hash_gets(pb->local_info, db->name);
- if (!info || info->kind != svn_kind_dir || NOT_PRESENT(info->status))
+ if (!info || info->kind != svn_node_dir || NOT_PRESENT(info->status))
db->repos_only = TRUE;
if (!db->repos_only && info->status != svn_wc__db_status_added)
@@ -1594,7 +1594,7 @@ open_directory(const char *path,
info = svn_hash_gets(pb->local_info, db->name);
- if (!info || info->kind != svn_kind_dir || NOT_PRESENT(info->status))
+ if (!info || info->kind != svn_node_dir || NOT_PRESENT(info->status))
db->repos_only = TRUE;
if (!db->repos_only)
@@ -1817,7 +1817,7 @@ add_file(const char *path,
info = svn_hash_gets(pb->local_info, fb->name);
- if (!info || info->kind != svn_kind_file || NOT_PRESENT(info->status))
+ if (!info || info->kind != svn_node_file || NOT_PRESENT(info->status))
fb->repos_only = TRUE;
if (!fb->repos_only && info->status != svn_wc__db_status_added)
@@ -1874,7 +1874,7 @@ open_file(const char *path,
info = svn_hash_gets(pb->local_info, fb->name);
- if (!info || info->kind != svn_kind_file || NOT_PRESENT(info->status))
+ if (!info || info->kind != svn_node_file || NOT_PRESENT(info->status))
fb->repos_only = TRUE;
if (!fb->repos_only)
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/diff_local.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/diff_local.c Sat Mar 30 20:02:27 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
@@ -260,8 +259,8 @@ diff_status_callback(void *baton,
svn_boolean_t local_only;
svn_wc__db_status_t db_status;
svn_boolean_t have_base;
- svn_kind_t base_kind;
- svn_kind_t db_kind = svn__kind_from_node_kind(status->kind, FALSE);
+ svn_node_kind_t base_kind;
+ svn_node_kind_t db_kind = status->kind;
svn_depth_t depth_below_here = svn_depth_unknown;
const char *child_abspath = local_abspath;
@@ -328,14 +327,14 @@ diff_status_callback(void *baton,
if (repos_only)
{
/* Report repository form deleted */
- if (base_kind == svn_kind_file)
+ if (base_kind == svn_node_file)
SVN_ERR(svn_wc__diff_base_only_file(db, child_abspath,
child_relpath,
SVN_INVALID_REVNUM,
eb->processor,
eb->cur ? eb->cur->baton : NULL,
scratch_pool));
- else if (base_kind == svn_kind_dir)
+ else if (base_kind == svn_node_dir)
SVN_ERR(svn_wc__diff_base_only_dir(db, child_abspath,
child_relpath,
SVN_INVALID_REVNUM,
@@ -349,7 +348,7 @@ diff_status_callback(void *baton,
else if (!local_only)
{
/* Diff base against actual */
- if (db_kind == svn_kind_file)
+ if (db_kind == svn_node_file)
{
SVN_ERR(svn_wc__diff_base_working_diff(db, child_abspath,
child_relpath,
@@ -364,7 +363,7 @@ diff_status_callback(void *baton,
eb->cancel_baton,
scratch_pool));
}
- else if (db_kind == svn_kind_dir)
+ else if (db_kind == svn_node_dir)
{
SVN_ERR(ensure_state(eb, local_abspath, FALSE, scratch_pool));
@@ -393,7 +392,7 @@ diff_status_callback(void *baton,
if (local_only)
{
- if (db_kind == svn_kind_file)
+ if (db_kind == svn_node_file)
SVN_ERR(svn_wc__diff_local_only_file(db, child_abspath,
child_relpath,
eb->processor,
@@ -403,7 +402,7 @@ diff_status_callback(void *baton,
eb->cancel_func,
eb->cancel_baton,
scratch_pool));
- else if (db_kind == svn_kind_dir)
+ else if (db_kind == svn_node_dir)
SVN_ERR(svn_wc__diff_local_only_dir(db, child_abspath,
child_relpath, depth_below_here,
eb->processor,
@@ -415,7 +414,7 @@ diff_status_callback(void *baton,
scratch_pool));
}
- if (db_kind == svn_kind_dir && (local_only || repos_only))
+ if (db_kind == svn_node_dir && (local_only || repos_only))
SVN_ERR(ensure_state(eb, local_abspath, TRUE /* skip */, scratch_pool));
}
@@ -439,7 +438,7 @@ svn_wc_diff6(svn_wc_context_t *wc_ctx,
apr_pool_t *scratch_pool)
{
struct diff_baton eb = { 0 };
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_boolean_t get_all;
const svn_diff_tree_processor_t *processor;
@@ -450,7 +449,7 @@ svn_wc_diff6(svn_wc_context_t *wc_ctx,
FALSE /* show_hidden */,
scratch_pool));
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
eb.anchor_abspath = local_abspath;
else
eb.anchor_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/entries.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/entries.c Sat Mar 30 20:02:27 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"
@@ -62,7 +63,7 @@ typedef struct db_node_t {
const char *parent_relpath;
svn_wc__db_status_t presence;
svn_revnum_t revision;
- svn_node_kind_t kind; /* ### should switch to svn_kind_t */
+ svn_node_kind_t kind;
svn_checksum_t *checksum;
svn_filesize_t recorded_size;
svn_revnum_t changed_rev;
@@ -149,7 +150,7 @@ check_file_external(svn_wc_entry_t *entr
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
const char *repos_relpath;
svn_revnum_t peg_revision;
svn_revnum_t revision;
@@ -170,7 +171,7 @@ check_file_external(svn_wc_entry_t *entr
}
if (status == svn_wc__db_status_normal
- && kind == svn_kind_file)
+ && kind == svn_node_file)
{
entry->file_external_path = repos_relpath;
if (SVN_IS_VALID_REVNUM(peg_revision))
@@ -205,7 +206,7 @@ check_file_external(svn_wc_entry_t *entr
*/
static svn_error_t *
get_info_for_deleted(svn_wc_entry_t *entry,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
const char **repos_relpath,
const svn_checksum_t **checksum,
svn_wc__db_lock_t **lock,
@@ -378,7 +379,7 @@ read_one_entry(const svn_wc_entry_t **ne
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_wc__db_status_t status;
svn_wc__db_lock_t *lock;
const char *repos_relpath;
@@ -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);
}
}
}
@@ -835,11 +835,11 @@ read_one_entry(const svn_wc_entry_t **ne
if (entry->depth == svn_depth_unknown)
entry->depth = svn_depth_infinity;
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
entry->kind = svn_node_dir;
- else if (kind == svn_kind_file)
+ else if (kind == svn_node_file)
entry->kind = svn_node_file;
- else if (kind == svn_kind_symlink)
+ else if (kind == svn_node_symlink)
entry->kind = svn_node_file; /* ### no symlink kind */
else
entry->kind = svn_node_unknown;
@@ -937,7 +937,7 @@ read_one_entry(const svn_wc_entry_t **ne
/* Let's check for a file external. ugh. */
if (status == svn_wc__db_status_normal
- && kind == svn_kind_file)
+ && kind == svn_node_file)
SVN_ERR(check_file_external(entry, db, entry_abspath, dir_abspath,
result_pool, scratch_pool));
@@ -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,
@@ -2615,7 +2621,7 @@ svn_wc_walk_entries3(const char *path,
const char *local_abspath;
svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
svn_error_t *err;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_depth_t depth;
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
@@ -2639,7 +2645,7 @@ svn_wc_walk_entries3(const char *path,
walk_baton, pool);
}
- if (kind == svn_kind_file || depth == svn_depth_exclude)
+ if (kind == svn_node_file || depth == svn_depth_exclude)
{
const svn_wc_entry_t *entry;
@@ -2681,7 +2687,7 @@ svn_wc_walk_entries3(const char *path,
return SVN_NO_ERROR;
}
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
return walker_helper(path, adm_access, walk_callbacks, walk_baton,
walk_depth, show_hidden, cancel_func, cancel_baton,
pool);
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/externals.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/externals.c Sat Mar 30 20:02:27 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
@@ -508,7 +508,7 @@ open_file(const char *path,
void **file_baton)
{
struct edit_baton *eb = parent_baton;
- svn_kind_t kind;
+ svn_node_kind_t kind;
if (strcmp(path, eb->name))
return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
_("This editor can only update '%s'"),
@@ -524,7 +524,7 @@ open_file(const char *path,
eb->db, eb->local_abspath,
eb->pool, file_pool));
- if (kind != svn_kind_file)
+ if (kind != svn_node_file)
return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
_("Node '%s' is no existing file external"),
svn_dirent_local_style(eb->local_abspath,
@@ -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 */
@@ -1080,7 +1079,7 @@ svn_wc__crawl_file_external(svn_wc_conte
{
svn_wc__db_t *db = wc_ctx->db;
svn_error_t *err;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_wc__db_lock_t *lock;
svn_revnum_t revision;
const char *repos_root_url;
@@ -1095,7 +1094,7 @@ svn_wc__crawl_file_external(svn_wc_conte
scratch_pool, scratch_pool);
if (err
- || kind == svn_kind_dir
+ || kind == svn_node_dir
|| !update_root)
{
if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
@@ -1179,7 +1178,7 @@ svn_wc__read_external_info(svn_node_kind
{
const char *repos_root_url;
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_error_t *err;
err = svn_wc__db_external_read(&status, &kind, defining_abspath,
@@ -1221,11 +1220,11 @@ svn_wc__read_external_info(svn_node_kind
else
switch(kind)
{
- case svn_kind_file:
- case svn_kind_symlink:
+ case svn_node_file:
+ case svn_node_symlink:
*external_kind = svn_node_file;
break;
- case svn_kind_dir:
+ case svn_node_dir:
*external_kind = svn_node_dir;
break;
default:
@@ -1310,7 +1309,7 @@ svn_wc__committable_externals_below(apr_
/* Discard dirs for svn_depth_files (s.a.). */
if (depth == svn_depth_files
- && xinfo->kind == svn_kind_dir)
+ && xinfo->kind == svn_node_dir)
continue;
svn_pool_clear(iterpool);
@@ -1391,7 +1390,7 @@ svn_wc__external_remove(svn_wc_context_t
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
SVN_ERR(svn_wc__db_external_read(&status, &kind, NULL, NULL, NULL, NULL,
NULL, NULL,
@@ -1404,7 +1403,7 @@ svn_wc__external_remove(svn_wc_context_t
if (declaration_only)
return SVN_NO_ERROR;
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
SVN_ERR(svn_wc_remove_from_revision_control2(wc_ctx, local_abspath,
TRUE, TRUE,
cancel_func, cancel_baton,
@@ -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/fsfs-format7/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/info.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/info.c Sat Mar 30 20:02:27 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"
@@ -85,7 +86,7 @@ build_info_for_node(svn_wc__info2_t **in
svn_wc__info2_t *tmpinfo;
const char *repos_relpath;
svn_wc__db_status_t status;
- svn_kind_t db_kind;
+ svn_node_kind_t db_kind;
const char *original_repos_relpath;
const char *original_repos_root_url;
const char *original_uuid;
@@ -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/fsfs-format7/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/lock.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/lock.c Sat Mar 30 20:02:27 2013
@@ -127,7 +127,7 @@ svn_wc__internal_check_wc(int *wc_format
if (*wc_format >= SVN_WC__WC_NG_VERSION)
{
svn_wc__db_status_t db_status;
- svn_kind_t db_kind;
+ svn_node_kind_t db_kind;
if (check_path)
{
@@ -161,7 +161,7 @@ svn_wc__internal_check_wc(int *wc_format
else
SVN_ERR(err);
- if (db_kind != svn_kind_dir)
+ if (db_kind != svn_node_dir)
{
/* The WC thinks there must be a file, so this is not
a wc-directory */
@@ -595,7 +595,7 @@ open_single(svn_wc_adm_access_t **adm_ac
### adminstrative area. */
static svn_error_t *
adm_available(svn_boolean_t *available,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *scratch_pool)
@@ -603,7 +603,7 @@ adm_available(svn_boolean_t *available,
svn_wc__db_status_t status;
if (kind)
- *kind = svn_kind_unknown;
+ *kind = svn_node_unknown;
SVN_ERR(svn_wc__db_read_info(&status, kind, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -661,7 +661,7 @@ do_open(svn_wc_adm_access_t **adm_access
for (i = 0; i < children->nelts; i++)
{
const char *node_abspath;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_boolean_t available;
const char *name = APR_ARRAY_IDX(children, i, const char *);
@@ -679,7 +679,7 @@ do_open(svn_wc_adm_access_t **adm_access
node_abspath,
scratch_pool));
- if (kind != svn_kind_dir)
+ if (kind != svn_node_dir)
continue;
if (available)
@@ -887,7 +887,7 @@ svn_wc_adm_retrieve(svn_wc_adm_access_t
apr_pool_t *pool)
{
const char *local_abspath;
- svn_kind_t kind = svn_kind_unknown;
+ svn_node_kind_t kind = svn_node_unknown;
svn_node_kind_t wckind;
svn_error_t *err;
@@ -929,12 +929,12 @@ svn_wc_adm_retrieve(svn_wc_adm_access_t
if (err)
{
- kind = svn_kind_unknown;
+ kind = svn_node_unknown;
svn_error_clear(err);
}
}
- if (kind == svn_kind_dir && wckind == svn_node_file)
+ if (kind == svn_node_dir && wckind == svn_node_file)
{
err = svn_error_createf(
SVN_ERR_WC_NOT_WORKING_COPY, NULL,
@@ -944,7 +944,7 @@ svn_wc_adm_retrieve(svn_wc_adm_access_t
return svn_error_create(SVN_ERR_WC_NOT_LOCKED, err, err->message);
}
- if (kind != svn_kind_dir && kind != svn_kind_unknown)
+ if (kind != svn_node_dir && kind != svn_node_unknown)
{
err = svn_error_createf(
SVN_ERR_WC_NOT_WORKING_COPY, NULL,
@@ -954,7 +954,7 @@ svn_wc_adm_retrieve(svn_wc_adm_access_t
return svn_error_create(SVN_ERR_WC_NOT_LOCKED, err, err->message);
}
- if (kind == svn_kind_unknown || wckind == svn_node_none)
+ if (kind == svn_node_unknown || wckind == svn_node_none)
{
err = svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
_("Directory '%s' is missing"),
@@ -979,7 +979,7 @@ svn_wc_adm_probe_retrieve(svn_wc_adm_acc
{
const char *dir;
const char *local_abspath;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_error_t *err;
SVN_ERR_ASSERT(associated != NULL);
@@ -991,9 +991,9 @@ svn_wc_adm_probe_retrieve(svn_wc_adm_acc
FALSE /* show_hidden*/,
pool));
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
dir = path;
- else if (kind != svn_kind_unknown)
+ else if (kind != svn_node_unknown)
dir = svn_dirent_dirname(path, pool);
else
/* Not a versioned item, probe it */
@@ -1239,7 +1239,7 @@ open_anchor(svn_wc_adm_access_t **anchor
if (! t_access)
{
svn_boolean_t available;
- svn_kind_t kind;
+ svn_node_kind_t kind;
err = adm_available(&available, &kind, db, local_abspath, pool);
@@ -1473,7 +1473,7 @@ svn_wc__acquire_write_lock(const char **
svn_wc__db_t *db = wc_ctx->db;
svn_boolean_t is_wcroot;
svn_boolean_t is_switched;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_error_t *err;
err = svn_wc__db_is_switched(&is_wcroot, &is_switched, &kind,
@@ -1486,18 +1486,18 @@ svn_wc__acquire_write_lock(const char **
svn_error_clear(err);
- kind = svn_kind_none;
+ kind = svn_node_none;
is_wcroot = FALSE;
is_switched = FALSE;
}
- if (!lock_root_abspath && kind != svn_kind_dir)
+ if (!lock_root_abspath && kind != svn_node_dir)
return svn_error_createf(SVN_ERR_WC_NOT_DIRECTORY, NULL,
_("Can't obtain lock on non-directory '%s'."),
svn_dirent_local_style(local_abspath,
scratch_pool));
- if (lock_anchor && kind == svn_kind_dir)
+ if (lock_anchor && kind == svn_node_dir)
{
if (is_wcroot)
lock_anchor = FALSE;
@@ -1510,12 +1510,12 @@ svn_wc__acquire_write_lock(const char **
parent_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
{
if (! is_switched)
local_abspath = parent_abspath;
}
- else if (kind != svn_kind_none && kind != svn_kind_unknown)
+ else if (kind != svn_node_none && kind != svn_node_unknown)
{
/* In the single-DB world we know parent exists */
local_abspath = parent_abspath;
@@ -1523,7 +1523,7 @@ svn_wc__acquire_write_lock(const char **
else
{
/* Can't lock parents that don't exist */
- svn_kind_t parent_kind;
+ svn_node_kind_t parent_kind;
err = svn_wc__db_read_kind(&parent_kind, db, parent_abspath,
TRUE /* allow_missing */,
TRUE /* show_deleted */,
@@ -1532,12 +1532,12 @@ svn_wc__acquire_write_lock(const char **
if (err && SVN_WC__ERR_IS_NOT_CURRENT_WC(err))
{
svn_error_clear(err);
- parent_kind = svn_kind_unknown;
+ parent_kind = svn_node_unknown;
}
else
SVN_ERR(err);
- if (parent_kind != svn_kind_dir)
+ if (parent_kind != svn_node_dir)
return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
_("'%s' is not a working copy"),
svn_dirent_local_style(local_abspath,
@@ -1546,7 +1546,7 @@ svn_wc__acquire_write_lock(const char **
local_abspath = parent_abspath;
}
}
- else if (kind != svn_kind_dir)
+ else if (kind != svn_node_dir)
{
local_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
}
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/merge.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/merge.c Sat Mar 30 20:02:27 2013
@@ -1238,7 +1238,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
/* Sanity check: the merge target must be a file under revision control */
{
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_boolean_t had_props;
svn_boolean_t props_mod;
svn_boolean_t conflicted;
@@ -1251,7 +1251,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
wc_ctx->db, target_abspath,
scratch_pool, scratch_pool));
- if (kind != svn_kind_file || (status != svn_wc__db_status_normal
+ if (kind != svn_node_file || (status != svn_wc__db_status_normal
&& status != svn_wc__db_status_added))
{
*merge_content_outcome = svn_wc_merge_no_merge;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/node.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/node.c Sat Mar 30 20:02:27 2013
@@ -259,19 +259,25 @@ svn_wc__node_get_repos_info(svn_revnum_t
/* Convert DB_KIND into the appropriate NODE_KIND value.
* If SHOW_HIDDEN is TRUE, report the node kind as found in the DB
* even if DB_STATUS indicates that the node is hidden.
- * Else, return svn_kind_none for such nodes.
+ * Else, return svn_node_none for such nodes.
*
* ### This is a bit ugly. We should consider promoting svn_kind_t
* ### to the de-facto node kind type instead of converting between them
* ### in non-backwards compat code.
- * ### See also comments at the definition of svn_kind_t. */
+ * ### See also comments at the definition of svn_kind_t.
+ *
+ * ### In reality, the previous comment is out of date, as there is
+ * ### now only one enumeration for node kinds, and that is
+ * ### svn_node_kind_t (svn_kind_t was merged with that). But it's
+ * ### still ugly.
+ */
static svn_error_t *
convert_db_kind_to_node_kind(svn_node_kind_t *node_kind,
- svn_kind_t db_kind,
+ svn_node_kind_t db_kind,
svn_wc__db_status_t db_status,
svn_boolean_t show_hidden)
{
- *node_kind = svn__node_kind_from_kind(db_kind);
+ *node_kind = db_kind;
/* Make sure hidden nodes return svn_node_none. */
if (! show_hidden)
@@ -297,7 +303,7 @@ svn_wc_read_kind2(svn_node_kind_t *kind,
svn_boolean_t show_hidden,
apr_pool_t *scratch_pool)
{
- svn_kind_t db_kind;
+ svn_node_kind_t db_kind;
SVN_ERR(svn_wc__db_read_kind(&db_kind,
wc_ctx->db, local_abspath,
@@ -306,9 +312,9 @@ svn_wc_read_kind2(svn_node_kind_t *kind,
show_hidden,
scratch_pool));
- if (db_kind == svn_kind_dir)
+ if (db_kind == svn_node_dir)
*kind = svn_node_dir;
- else if (db_kind == svn_kind_file || db_kind == svn_kind_symlink)
+ else if (db_kind == svn_node_file || db_kind == svn_node_symlink)
*kind = svn_node_file;
else
*kind = svn_node_none;
@@ -401,7 +407,7 @@ walker_helper(svn_wc__db_t *db,
{
const char *child_name = svn__apr_hash_index_key(hi);
struct svn_wc__db_walker_info_t *wi = svn__apr_hash_index_val(hi);
- svn_kind_t child_kind = wi->kind;
+ svn_node_kind_t child_kind = wi->kind;
svn_wc__db_status_t child_status = wi->status;
const char *child_abspath;
@@ -425,7 +431,7 @@ walker_helper(svn_wc__db_t *db,
}
/* Return the child, if appropriate. */
- if ( (child_kind == svn_kind_file
+ if ( (child_kind == svn_node_file
|| depth >= svn_depth_immediates)
&& svn_wc__internal_changelist_match(db, child_abspath,
changelist_filter,
@@ -444,7 +450,7 @@ walker_helper(svn_wc__db_t *db,
}
/* Recurse into this directory, if appropriate. */
- if (child_kind == svn_kind_dir
+ if (child_kind == svn_node_dir
&& depth >= svn_depth_immediates)
{
svn_depth_t depth_below_here = depth;
@@ -479,7 +485,7 @@ svn_wc__internal_walk_children(svn_wc__d
void *cancel_baton,
apr_pool_t *scratch_pool)
{
- svn_kind_t db_kind;
+ svn_node_kind_t db_kind;
svn_node_kind_t kind;
svn_wc__db_status_t status;
apr_hash_t *changelist_hash = NULL;
@@ -504,13 +510,13 @@ svn_wc__internal_walk_children(svn_wc__d
changelist_hash, scratch_pool))
SVN_ERR(walk_callback(local_abspath, kind, walk_baton, scratch_pool));
- if (db_kind == svn_kind_file
+ if (db_kind == svn_node_file
|| status == svn_wc__db_status_not_present
|| status == svn_wc__db_status_excluded
|| status == svn_wc__db_status_server_excluded)
return SVN_NO_ERROR;
- if (db_kind == svn_kind_dir)
+ if (db_kind == svn_node_dir)
{
return svn_error_trace(
walker_helper(db, local_abspath, show_hidden, changelist_hash,
@@ -672,7 +678,7 @@ svn_wc__node_get_base(svn_node_kind_t *k
svn_error_t *err;
svn_wc__db_status_t status;
svn_wc__db_lock_t *lock;
- svn_kind_t db_kind;
+ svn_node_kind_t db_kind;
err = svn_wc__db_base_get_info(&status, &db_kind, revision, repos_relpath,
repos_root_url, repos_uuid, NULL,
@@ -717,7 +723,7 @@ svn_wc__node_get_base(svn_node_kind_t *k
}
if (kind)
- *kind = svn__node_kind_from_kind(db_kind);
+ *kind = db_kind;
if (lock_token)
*lock_token = lock ? lock->token : NULL;
@@ -1221,7 +1227,7 @@ svn_wc__check_for_obstructions(svn_wc_no
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- svn_kind_t db_kind;
+ svn_node_kind_t db_kind;
svn_node_kind_t disk_kind;
svn_error_t *err;
@@ -1274,7 +1280,7 @@ svn_wc__check_for_obstructions(svn_wc_no
else
SVN_ERR(err);
- if (db_kind != svn_kind_dir
+ if (db_kind != svn_node_dir
|| (status != svn_wc__db_status_normal
&& status != svn_wc__db_status_added))
{
@@ -1289,7 +1295,7 @@ svn_wc__check_for_obstructions(svn_wc_no
/* Check for obstructing working copies */
if (!no_wcroot_check
- && db_kind == svn_kind_dir
+ && db_kind == svn_node_dir
&& status == svn_wc__db_status_normal)
{
svn_boolean_t is_root;
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/old-and-busted.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/old-and-busted.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/old-and-busted.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/old-and-busted.c Sat Mar 30 20:02:27 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)
{