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 [11/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/ subvers...
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.c?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.c Sat Mar 30 20:02:27 2013
@@ -122,7 +122,7 @@ svn_wc__db_op_depth_for_upgrade(const ch
typedef struct insert_base_baton_t {
/* common to all insertions into BASE */
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
apr_int64_t repos_id;
const char *repos_relpath;
svn_revnum_t revision;
@@ -181,7 +181,7 @@ typedef struct insert_base_baton_t {
typedef struct insert_working_baton_t {
/* common to all insertions into WORKING (including NODE_DATA) */
svn_wc__db_status_t presence;
- svn_kind_t kind;
+ svn_node_kind_t kind;
int op_depth;
/* common to all "normal" presence insertions */
@@ -222,7 +222,7 @@ typedef struct insert_working_baton_t {
/* Representation of a new row for the EXTERNALS table */
typedef struct insert_external_baton_t {
/* common to all insertions into EXTERNALS */
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_wc__db_status_t presence;
/* The repository of the external */
@@ -304,7 +304,7 @@ db_read_pristine_props(apr_hash_t **prop
static svn_error_t *
read_info(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -362,7 +362,7 @@ wclock_owns_lock(svn_boolean_t *own_lock
static svn_error_t *
db_is_switched(svn_boolean_t *is_switched,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
apr_pool_t *scratch_pool);
@@ -578,7 +578,7 @@ blank_ibb(insert_base_baton_t *pibb)
svn_error_t *
svn_wc__db_extend_parent_delete(svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
- svn_kind_t kind,
+ svn_node_kind_t kind,
int op_depth,
apr_pool_t *scratch_pool)
{
@@ -700,15 +700,15 @@ insert_base_node(const insert_base_baton
pibb->repos_relpath,
pibb->revision,
presence_map, pibb->status, /* 8 */
- (pibb->kind == svn_kind_dir) ? /* 9 */
+ (pibb->kind == svn_node_dir) ? /* 9 */
svn_token__to_word(depth_map, pibb->depth) : NULL,
kind_map, pibb->kind, /* 10 */
pibb->changed_rev, /* 11 */
pibb->changed_date, /* 12 */
pibb->changed_author, /* 13 */
- (pibb->kind == svn_kind_symlink) ?
+ (pibb->kind == svn_node_symlink) ?
pibb->target : NULL)); /* 19 */
- if (pibb->kind == svn_kind_file)
+ if (pibb->kind == svn_node_file)
{
if (!pibb->checksum
&& pibb->status != svn_wc__db_status_not_present
@@ -771,7 +771,7 @@ insert_base_node(const insert_base_baton
wcroot->sdb, scratch_pool));
}
- if (pibb->kind == svn_kind_dir && pibb->children)
+ if (pibb->kind == svn_node_dir && pibb->children)
SVN_ERR(insert_incomplete_children(wcroot->sdb, wcroot->wc_id,
local_relpath,
repos_id,
@@ -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));
@@ -969,14 +968,14 @@ insert_working_node(const insert_working
piwb->op_depth,
parent_relpath,
presence_map, piwb->presence,
- (piwb->kind == svn_kind_dir)
+ (piwb->kind == svn_node_dir)
? svn_token__to_word(depth_map, piwb->depth) : NULL,
kind_map, piwb->kind,
piwb->changed_rev,
piwb->changed_date,
piwb->changed_author,
/* Note: incomplete nodes may have a NULL target. */
- (piwb->kind == svn_kind_symlink)
+ (piwb->kind == svn_node_symlink)
? piwb->target : NULL,
moved_to_relpath));
@@ -985,7 +984,7 @@ insert_working_node(const insert_working
SVN_ERR(svn_sqlite__bind_int(stmt, 8, TRUE));
}
- if (piwb->kind == svn_kind_file)
+ if (piwb->kind == svn_node_file)
{
SVN_ERR(svn_sqlite__bind_checksum(stmt, 14, piwb->checksum,
scratch_pool));
@@ -1010,7 +1009,7 @@ insert_working_node(const insert_working
The children are part of the same op and so have the same op_depth.
(The only time we'd want a different depth is during a recursive
simple add, but we never insert children here during a simple add.) */
- if (piwb->kind == svn_kind_dir && piwb->children)
+ if (piwb->kind == svn_node_dir && piwb->children)
SVN_ERR(insert_incomplete_children(wcroot->sdb, wcroot->wc_id,
local_relpath,
INVALID_REPOS_ID /* inherit repos_id */,
@@ -1043,7 +1042,7 @@ insert_working_node(const insert_working
wcroot->sdb, scratch_pool));
}
- if (piwb->kind == svn_kind_dir)
+ if (piwb->kind == svn_node_dir)
{
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_UPDATE_ACTUAL_CLEAR_CHANGELIST));
@@ -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));
}
@@ -1224,12 +1223,12 @@ svn_wc__db_get_children_op_depth(apr_has
while (have_row)
{
const char *child_relpath = svn_sqlite__column_text(stmt, 0, NULL);
- svn_kind_t *child_kind = apr_palloc(result_pool, sizeof(svn_kind_t));
+ 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);
}
@@ -1442,7 +1441,7 @@ init_db(/* output values */
presence_map, status, /* 8 */
svn_token__to_word(depth_map,
root_node_depth),
- kind_map, svn_kind_dir /* 10 */));
+ kind_map, svn_node_dir /* 10 */));
SVN_ERR(svn_sqlite__insert(NULL, stmt));
}
@@ -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;
}
@@ -1675,7 +1674,7 @@ svn_wc__db_base_add_directory(svn_wc__db
ibb.repos_uuid = repos_uuid;
ibb.status = svn_wc__db_status_normal;
- ibb.kind = svn_kind_dir;
+ ibb.kind = svn_node_dir;
ibb.repos_relpath = repos_relpath;
ibb.revision = revision;
@@ -1745,7 +1744,7 @@ svn_wc__db_base_add_incomplete_directory
ibb.repos_uuid = repos_uuid;
ibb.status = svn_wc__db_status_incomplete;
- ibb.kind = svn_kind_dir;
+ ibb.kind = svn_node_dir;
ibb.repos_relpath = repos_relpath;
ibb.revision = revision;
ibb.depth = depth;
@@ -1814,7 +1813,7 @@ svn_wc__db_base_add_file(svn_wc__db_t *d
ibb.repos_uuid = repos_uuid;
ibb.status = svn_wc__db_status_normal;
- ibb.kind = svn_kind_file;
+ ibb.kind = svn_node_file;
ibb.repos_relpath = repos_relpath;
ibb.revision = revision;
@@ -1901,7 +1900,7 @@ svn_wc__db_base_add_symlink(svn_wc__db_t
ibb.repos_uuid = repos_uuid;
ibb.status = svn_wc__db_status_normal;
- ibb.kind = svn_kind_symlink;
+ ibb.kind = svn_node_symlink;
ibb.repos_relpath = repos_relpath;
ibb.revision = revision;
@@ -1947,7 +1946,7 @@ add_excluded_or_not_present_node(svn_wc_
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
- svn_kind_t kind,
+ svn_node_kind_t kind,
svn_wc__db_status_t status,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
@@ -2020,7 +2019,7 @@ svn_wc__db_base_add_excluded_node(svn_wc
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
- svn_kind_t kind,
+ svn_node_kind_t kind,
svn_wc__db_status_t status,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
@@ -2042,7 +2041,7 @@ svn_wc__db_base_add_not_present_node(svn
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
- svn_kind_t kind,
+ svn_node_kind_t kind,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
apr_pool_t *scratch_pool)
@@ -2097,7 +2096,7 @@ db_base_remove(svn_wc__db_wcroot_t *wcro
svn_wc__db_status_t status;
apr_int64_t repos_id;
const char *repos_relpath;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_boolean_t keep_working;
SVN_ERR(svn_wc__db_base_get_info_internal(&status, &kind, NULL,
@@ -2140,7 +2139,7 @@ db_base_remove(svn_wc__db_wcroot_t *wcro
local_abspath = svn_dirent_join(wcroot->abspath, local_relpath,
scratch_pool);
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
{
apr_pool_t *iterpool;
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
@@ -2154,7 +2153,7 @@ db_base_remove(svn_wc__db_wcroot_t *wcro
while (have_row)
{
const char *node_relpath = svn_sqlite__column_text(stmt, 0, NULL);
- svn_kind_t node_kind = svn_sqlite__column_token(stmt, 1,
+ svn_node_kind_t node_kind = svn_sqlite__column_token(stmt, 1,
kind_map);
const char *node_abspath;
svn_error_t *err;
@@ -2164,7 +2163,7 @@ db_base_remove(svn_wc__db_wcroot_t *wcro
node_abspath = svn_dirent_join(wcroot->abspath, node_relpath,
iterpool);
- if (node_kind == svn_kind_dir)
+ if (node_kind == svn_node_dir)
err = svn_wc__wq_build_dir_remove(&work_item,
db, wcroot->abspath,
node_abspath, FALSE,
@@ -2365,7 +2364,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
svn_error_t *
svn_wc__db_base_get_info_internal(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -2398,7 +2397,7 @@ svn_wc__db_base_get_info_internal(svn_wc
{
svn_wc__db_status_t node_status = svn_sqlite__column_token(stmt, 2,
presence_map);
- svn_kind_t node_kind = svn_sqlite__column_token(stmt, 3, kind_map);
+ svn_node_kind_t node_kind = svn_sqlite__column_token(stmt, 3, kind_map);
if (kind)
{
@@ -2431,7 +2430,7 @@ svn_wc__db_base_get_info_internal(svn_wc
}
if (depth)
{
- if (node_kind != svn_kind_dir)
+ if (node_kind != svn_node_dir)
{
*depth = svn_depth_unknown;
}
@@ -2443,7 +2442,7 @@ svn_wc__db_base_get_info_internal(svn_wc
}
if (checksum)
{
- if (node_kind != svn_kind_file)
+ if (node_kind != svn_node_file)
{
*checksum = NULL;
}
@@ -2461,7 +2460,7 @@ svn_wc__db_base_get_info_internal(svn_wc
}
if (target)
{
- if (node_kind != svn_kind_symlink)
+ if (node_kind != svn_node_symlink)
*target = NULL;
else
*target = svn_sqlite__column_text(stmt, 11, result_pool);
@@ -2507,7 +2506,7 @@ svn_wc__db_base_get_info_internal(svn_wc
svn_error_t *
svn_wc__db_base_get_info(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
const char **repos_root_url,
@@ -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));
}
@@ -2749,7 +2748,7 @@ svn_wc__db_base_clear_dav_cache_recursiv
svn_error_t *
svn_wc__db_depth_get_info(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -2781,7 +2780,7 @@ svn_wc__db_depth_get_info(svn_wc__db_sta
{
svn_wc__db_status_t node_status = svn_sqlite__column_token(stmt, 2,
presence_map);
- svn_kind_t node_kind = svn_sqlite__column_token(stmt, 3, kind_map);
+ svn_node_kind_t node_kind = svn_sqlite__column_token(stmt, 3, kind_map);
if (kind)
{
@@ -2812,7 +2811,7 @@ svn_wc__db_depth_get_info(svn_wc__db_sta
}
if (depth)
{
- if (node_kind != svn_kind_dir)
+ if (node_kind != svn_node_dir)
{
*depth = svn_depth_unknown;
}
@@ -2824,7 +2823,7 @@ svn_wc__db_depth_get_info(svn_wc__db_sta
}
if (checksum)
{
- if (node_kind != svn_kind_file)
+ if (node_kind != svn_node_file)
{
*checksum = NULL;
}
@@ -2842,7 +2841,7 @@ svn_wc__db_depth_get_info(svn_wc__db_sta
}
if (target)
{
- if (node_kind != svn_kind_symlink)
+ if (node_kind != svn_node_symlink)
*target = NULL;
else
*target = svn_sqlite__column_text(stmt, 11, result_pool);
@@ -3025,8 +3024,8 @@ insert_external_node(const insert_extern
else if (status == svn_wc__db_status_normal && !update_root)
return svn_error_create(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL, NULL);
- if (ieb->kind == svn_kind_file
- || ieb->kind == svn_kind_symlink)
+ if (ieb->kind == svn_node_file
+ || ieb->kind == svn_node_symlink)
{
struct insert_base_baton_t ibb;
@@ -3150,7 +3149,7 @@ svn_wc__db_external_add_file(svn_wc__db_
blank_ieb(&ieb);
- ieb.kind = svn_kind_file;
+ ieb.kind = svn_node_file;
ieb.presence = svn_wc__db_status_normal;
ieb.repos_root_url = repos_root_url;
@@ -3238,7 +3237,7 @@ svn_wc__db_external_add_symlink(svn_wc__
blank_ieb(&ieb);
- ieb.kind = svn_kind_symlink;
+ ieb.kind = svn_node_symlink;
ieb.presence = svn_wc__db_status_normal;
ieb.repos_root_url = repos_root_url;
@@ -3313,7 +3312,7 @@ svn_wc__db_external_add_dir(svn_wc__db_t
blank_ieb(&ieb);
- ieb.kind = svn_kind_dir;
+ ieb.kind = svn_node_dir;
ieb.presence = svn_wc__db_status_normal;
ieb.repos_root_url = repos_root_url;
@@ -3387,7 +3386,7 @@ svn_wc__db_external_remove(svn_wc__db_t
svn_error_t *
svn_wc__db_external_read(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
const char **definining_abspath,
const char **repos_root_url,
const char **repos_uuid,
@@ -3487,7 +3486,7 @@ svn_wc__db_committable_externals_below(a
const char *local_relpath;
svn_boolean_t have_row;
svn_wc__committable_external_info_t *info;
- svn_kind_t db_kind;
+ svn_node_kind_t db_kind;
apr_array_header_t *result = NULL;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -3519,7 +3518,7 @@ svn_wc__db_committable_externals_below(a
result_pool);
db_kind = svn_sqlite__column_token(stmt, 1, kind_map);
- SVN_ERR_ASSERT(db_kind == svn_kind_file || db_kind == svn_kind_dir);
+ SVN_ERR_ASSERT(db_kind == svn_node_file || db_kind == svn_node_dir);
info->kind = db_kind;
info->repos_relpath = svn_sqlite__column_text(stmt, 2, result_pool);
@@ -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));
}
}
@@ -3714,7 +3711,7 @@ cross_db_copy(svn_wc__db_wcroot_t *src_w
svn_wc__db_status_t dst_status,
int dst_op_depth,
int dst_np_op_depth,
- svn_kind_t kind,
+ svn_node_kind_t kind,
const apr_array_header_t *children,
apr_int64_t copyfrom_id,
const char *copyfrom_relpath,
@@ -3729,8 +3726,8 @@ cross_db_copy(svn_wc__db_wcroot_t *src_w
apr_hash_t *props;
svn_depth_t depth;
- SVN_ERR_ASSERT(kind == svn_kind_file
- || kind == svn_kind_dir
+ SVN_ERR_ASSERT(kind == svn_node_file
+ || kind == svn_node_dir
);
SVN_ERR(read_info(NULL, NULL, NULL, NULL, NULL,
@@ -4048,7 +4045,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
const char **copyfrom_relpath,
svn_revnum_t *copyfrom_rev,
svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_boolean_t *op_root,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
@@ -4306,7 +4303,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
int dst_op_depth;
int dst_np_op_depth;
int dst_parent_op_depth;
- svn_kind_t kind;
+ svn_node_kind_t kind;
const apr_array_header_t *children;
SVN_ERR(get_info_for_copy(©from_id, ©from_relpath, ©from_rev,
@@ -4318,7 +4315,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
copyfrom_id, copyfrom_relpath, copyfrom_rev,
dst_wcroot, dst_relpath, scratch_pool));
- SVN_ERR_ASSERT(kind == svn_kind_file || kind == svn_kind_dir);
+ SVN_ERR_ASSERT(kind == svn_node_file || kind == svn_node_dir);
/* ### New status, not finished, see notes/wc-ng/copying */
switch (status)
@@ -4406,7 +4403,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
scratch_pool));
}
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
{
int src_op_depth;
@@ -4521,7 +4518,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
The children are part of the same op and so have the same op_depth.
(The only time we'd want a different depth is during a recursive
simple add, but we never insert children here during a simple add.) */
- if (kind == svn_kind_dir
+ if (kind == svn_node_dir
&& dst_presence == svn_wc__db_status_normal)
SVN_ERR(insert_incomplete_children(
dst_wcroot->sdb,
@@ -4878,7 +4875,7 @@ db_op_copy_shadowed_layer(svn_wc__db_wcr
const apr_array_header_t *children;
apr_pool_t *iterpool;
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_revnum_t node_revision;
const char *node_repos_relpath;
apr_int64_t node_repos_id;
@@ -5250,7 +5247,7 @@ svn_wc__db_op_copy_dir(svn_wc__db_t *db,
blank_iwb(&iwb);
iwb.presence = svn_wc__db_status_normal;
- iwb.kind = svn_kind_dir;
+ iwb.kind = svn_node_dir;
iwb.props = props;
iwb.changed_rev = changed_rev;
@@ -5330,7 +5327,7 @@ svn_wc__db_op_copy_file(svn_wc__db_t *db
blank_iwb(&iwb);
iwb.presence = svn_wc__db_status_normal;
- iwb.kind = svn_kind_file;
+ iwb.kind = svn_node_file;
iwb.props = props;
iwb.changed_rev = changed_rev;
@@ -5408,7 +5405,7 @@ svn_wc__db_op_copy_symlink(svn_wc__db_t
blank_iwb(&iwb);
iwb.presence = svn_wc__db_status_normal;
- iwb.kind = svn_kind_symlink;
+ iwb.kind = svn_node_symlink;
iwb.props = props;
iwb.changed_rev = changed_rev;
@@ -5470,7 +5467,7 @@ svn_wc__db_op_add_directory(svn_wc__db_t
local_relpath = svn_relpath_join(local_relpath, name, scratch_pool);
iwb.presence = svn_wc__db_status_normal;
- iwb.kind = svn_kind_dir;
+ iwb.kind = svn_node_dir;
iwb.op_depth = relpath_depth(local_relpath);
if (props && apr_hash_count((apr_hash_t *)props))
{
@@ -5517,7 +5514,7 @@ svn_wc__db_op_add_file(svn_wc__db_t *db,
local_relpath = svn_relpath_join(local_relpath, name, scratch_pool);
iwb.presence = svn_wc__db_status_normal;
- iwb.kind = svn_kind_file;
+ iwb.kind = svn_node_file;
iwb.op_depth = relpath_depth(local_relpath);
if (props && apr_hash_count((apr_hash_t *)props))
{
@@ -5565,7 +5562,7 @@ svn_wc__db_op_add_symlink(svn_wc__db_t *
local_relpath = svn_relpath_join(local_relpath, name, scratch_pool);
iwb.presence = svn_wc__db_status_normal;
- iwb.kind = svn_kind_symlink;
+ iwb.kind = svn_node_symlink;
iwb.op_depth = relpath_depth(local_relpath);
if (props && apr_hash_count((apr_hash_t *)props))
{
@@ -6670,7 +6667,7 @@ static svn_error_t *
revert_list_read(svn_boolean_t *reverted,
const apr_array_header_t **marker_paths,
svn_boolean_t *copied_here,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
svn_wc__db_t *db,
@@ -6683,7 +6680,7 @@ revert_list_read(svn_boolean_t *reverted
*reverted = FALSE;
*marker_paths = NULL;
*copied_here = FALSE;
- *kind = svn_kind_unknown;
+ *kind = svn_node_unknown;
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_REVERT_LIST));
@@ -6749,7 +6746,7 @@ svn_error_t *
svn_wc__db_revert_list_read(svn_boolean_t *reverted,
const apr_array_header_t **marker_files,
svn_boolean_t *copied_here,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *result_pool,
@@ -6919,7 +6916,7 @@ remove_node_txn(svn_boolean_t *left_chan
svn_boolean_t destroy_changes,
svn_revnum_t not_present_rev,
svn_wc__db_status_t not_present_status,
- svn_kind_t not_present_kind,
+ svn_node_kind_t not_present_kind,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
svn_cancel_func_t cancel_func,
@@ -6970,7 +6967,7 @@ remove_node_txn(svn_boolean_t *left_chan
{
const char *child_relpath;
const char *child_abspath;
- svn_kind_t child_kind;
+ svn_node_kind_t child_kind;
svn_boolean_t have_checksum;
svn_filesize_t recorded_size;
apr_int64_t recorded_time;
@@ -6986,7 +6983,7 @@ remove_node_txn(svn_boolean_t *left_chan
child_abspath = svn_dirent_join(wcroot->abspath, child_relpath,
iterpool);
- if (child_kind == svn_kind_file)
+ if (child_kind == svn_node_file)
{
have_checksum = !svn_sqlite__column_is_null(stmt, 2);
recorded_size = get_recorded_size(stmt, 3);
@@ -7007,12 +7004,12 @@ remove_node_txn(svn_boolean_t *left_chan
if (destroy_changes
|| dirent->kind != svn_node_file
- || child_kind != svn_kind_file)
+ || child_kind != svn_node_file)
{
/* Not interested in keeping changes */
modified_p = FALSE;
}
- else if (child_kind == svn_kind_file
+ else if (child_kind == svn_node_file
&& dirent->kind == svn_node_file
&& dirent->filesize == recorded_size
&& dirent->mtime == recorded_time)
@@ -7032,14 +7029,14 @@ remove_node_txn(svn_boolean_t *left_chan
if (left_changes)
*left_changes = TRUE;
}
- else if (child_kind == svn_kind_dir)
+ else if (child_kind == svn_node_dir)
{
err = svn_wc__wq_build_dir_remove(&work_item,
db, wcroot->abspath,
child_abspath, FALSE,
iterpool, iterpool);
}
- else /* svn_kind_file || svn_kind_symlink */
+ else /* svn_node_file || svn_node_symlink */
{
err = svn_wc__wq_build_file_remove(&work_item,
db, wcroot->abspath,
@@ -7068,7 +7065,7 @@ remove_node_txn(svn_boolean_t *left_chan
{
/* Create work item for destroying the root */
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
SVN_ERR(read_info(&status, &kind, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -7084,7 +7081,7 @@ remove_node_txn(svn_boolean_t *left_chan
local_relpath,
scratch_pool);
- if (kind == svn_kind_dir)
+ if (kind == svn_node_dir)
{
SVN_ERR(svn_wc__wq_build_dir_remove(&work_item,
db, wcroot->abspath,
@@ -7181,7 +7178,7 @@ svn_wc__db_op_remove_node(svn_boolean_t
svn_boolean_t destroy_changes,
svn_revnum_t not_present_revision,
svn_wc__db_status_t not_present_status,
- svn_kind_t not_present_kind,
+ svn_node_kind_t not_present_kind,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
svn_cancel_func_t cancel_func,
@@ -7458,7 +7455,7 @@ delete_node(void *baton,
svn_sqlite__stmt_t *stmt;
int select_depth; /* Depth of what is to be deleted */
svn_boolean_t refetch_depth = FALSE;
- svn_kind_t kind;
+ svn_node_kind_t kind;
apr_array_header_t *moved_nodes = NULL;
int delete_depth = relpath_depth(local_relpath);
@@ -7475,7 +7472,7 @@ delete_node(void *baton,
return SVN_NO_ERROR;
/* Don't copy BASE directories with server excluded nodes */
- if (status == svn_wc__db_status_normal && kind == svn_kind_dir)
+ if (status == svn_wc__db_status_normal && kind == svn_node_dir)
{
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_HAS_SERVER_EXCLUDED_DESCENDANTS));
@@ -7535,9 +7532,16 @@ delete_node(void *baton,
if (op_root && moved_from_relpath)
{
+ const char *part = svn_relpath_skip_ancestor(local_relpath,
+ moved_from_relpath);
+
/* Existing move-root is moved to another location */
moved_node = apr_palloc(scratch_pool, sizeof(struct moved_node_t));
- moved_node->local_relpath = moved_from_relpath;
+ if (!part)
+ moved_node->local_relpath = moved_from_relpath;
+ else
+ moved_node->local_relpath = svn_relpath_join(b->moved_to_relpath,
+ part, scratch_pool);
moved_node->op_depth = move_op_depth;
moved_node->moved_to_relpath = b->moved_to_relpath;
@@ -8028,7 +8032,7 @@ svn_wc__db_op_delete_many(svn_wc__db_t *
DB+LOCAL_ABSPATH, and outputting repos ids instead of URL+UUID. */
static svn_error_t *
read_info(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -8087,7 +8091,7 @@ read_info(svn_wc__db_status_t *status,
if (have_info)
{
int op_depth;
- svn_kind_t node_kind;
+ svn_node_kind_t node_kind;
op_depth = svn_sqlite__column_int(stmt_info, 0);
node_kind = svn_sqlite__column_token(stmt_info, 4, kind_map);
@@ -8145,7 +8149,7 @@ read_info(svn_wc__db_status_t *status,
}
if (depth)
{
- if (node_kind != svn_kind_dir)
+ if (node_kind != svn_node_dir)
{
*depth = svn_depth_unknown;
}
@@ -8157,7 +8161,7 @@ read_info(svn_wc__db_status_t *status,
}
if (checksum)
{
- if (node_kind != svn_kind_file)
+ if (node_kind != svn_node_file)
{
*checksum = NULL;
}
@@ -8175,7 +8179,7 @@ read_info(svn_wc__db_status_t *status,
}
if (target)
{
- if (node_kind != svn_kind_symlink)
+ if (node_kind != svn_node_symlink)
*target = NULL;
else
*target = svn_sqlite__column_text(stmt_info, 12, result_pool);
@@ -8287,7 +8291,7 @@ read_info(svn_wc__db_status_t *status,
if (status)
*status = svn_wc__db_status_normal; /* What! No it's not! */
if (kind)
- *kind = svn_kind_unknown;
+ *kind = svn_node_unknown;
if (revision)
*revision = SVN_INVALID_REVNUM;
if (repos_relpath)
@@ -8358,7 +8362,7 @@ read_info(svn_wc__db_status_t *status,
svn_error_t *
svn_wc__db_read_info_internal(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -8401,7 +8405,7 @@ svn_wc__db_read_info_internal(svn_wc__db
svn_error_t *
svn_wc__db_read_info(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
const char **repos_root_url,
@@ -8504,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
@@ -8595,7 +8599,7 @@ read_children_info(svn_wc__db_wcroot_t *
child->changed_author = svn_sqlite__column_text(stmt, 10,
result_pool);
- if (child->kind != svn_kind_dir)
+ if (child->kind != svn_node_dir)
child->depth = svn_depth_unknown;
else
{
@@ -8621,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)
@@ -8630,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)
@@ -8684,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));
@@ -8706,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));
}
@@ -8755,7 +8756,7 @@ svn_wc__db_read_children_info(apr_hash_t
svn_error_t *
svn_wc__db_read_pristine_info(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *changed_rev,
apr_time_t *changed_date,
const char **changed_author,
@@ -8776,7 +8777,7 @@ svn_wc__db_read_pristine_info(svn_wc__db
svn_error_t *err = NULL;
int op_depth;
svn_wc__db_status_t raw_status;
- svn_kind_t node_kind;
+ svn_node_kind_t node_kind;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -8846,7 +8847,7 @@ svn_wc__db_read_pristine_info(svn_wc__db
}
if (depth)
{
- if (node_kind != svn_kind_dir)
+ if (node_kind != svn_node_dir)
{
*depth = svn_depth_unknown;
}
@@ -8858,7 +8859,7 @@ svn_wc__db_read_pristine_info(svn_wc__db
}
if (checksum)
{
- if (node_kind != svn_kind_file)
+ if (node_kind != svn_node_file)
{
*checksum = NULL;
}
@@ -8884,7 +8885,7 @@ svn_wc__db_read_pristine_info(svn_wc__db
}
if (target)
{
- if (node_kind != svn_kind_symlink)
+ if (node_kind != svn_node_symlink)
*target = NULL;
else
*target = svn_sqlite__column_text(stmt, 12, result_pool);
@@ -8957,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));
}
@@ -9534,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));
@@ -9633,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;
}
@@ -9906,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));
@@ -9937,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));
}
@@ -9956,7 +9955,7 @@ get_children_with_cached_iprops(apr_hash
{
const char *child_abspath = svn__apr_hash_index_key(hi);
const char *child_relpath;
- svn_kind_t child_kind;
+ svn_node_kind_t child_kind;
svn_pool_clear(iterpool);
@@ -9977,10 +9976,9 @@ get_children_with_cached_iprops(apr_hash
scratch_pool));
/* Filter if not a file */
- if (child_kind != svn_kind_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);
}
}
@@ -10597,7 +10595,7 @@ commit_node(svn_wc__db_wcroot_t *wcroot,
const char *changelist = NULL;
const char *parent_relpath;
svn_wc__db_status_t new_presence;
- svn_kind_t new_kind;
+ svn_node_kind_t new_kind;
const char *new_depth_str = NULL;
svn_sqlite__stmt_t *stmt;
apr_int64_t repos_id;
@@ -10636,7 +10634,7 @@ commit_node(svn_wc__db_wcroot_t *wcroot,
new_kind = svn_sqlite__column_token(stmt_info, 4, kind_map);
/* What will the new depth be? */
- if (new_kind == svn_kind_dir)
+ if (new_kind == svn_node_dir)
new_depth_str = svn_sqlite__column_text(stmt_info, 11, scratch_pool);
/* Check that the repository information is not being changed. */
@@ -10800,7 +10798,7 @@ commit_node(svn_wc__db_wcroot_t *wcroot,
}
}
- if (new_kind == svn_kind_dir)
+ if (new_kind == svn_node_dir)
{
/* When committing a directory, we should have its new children. */
/* ### one day. just not today. */
@@ -10871,7 +10869,7 @@ svn_wc__db_global_commit(svn_wc__db_t *d
svn_error_t *
svn_wc__db_global_update(svn_wc__db_t *db,
const char *local_abspath,
- svn_kind_t new_kind,
+ svn_node_kind_t new_kind,
const char *new_repos_relpath,
svn_revnum_t new_revision,
const apr_hash_t *new_props,
@@ -11019,7 +11017,7 @@ bump_node_revision(svn_wc__db_wcroot_t *
const apr_array_header_t *children;
int i;
svn_wc__db_status_t status;
- svn_kind_t db_kind;
+ svn_node_kind_t db_kind;
svn_revnum_t revision;
const char *repos_relpath;
apr_int64_t repos_id;
@@ -11029,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,
@@ -11041,11 +11039,11 @@ bump_node_revision(svn_wc__db_wcroot_t *
/* Skip file externals */
if (update_root
- && db_kind == svn_kind_file
+ && db_kind == svn_node_file
&& !is_root)
return SVN_NO_ERROR;
- if (skip_when_dir && db_kind == svn_kind_dir)
+ if (skip_when_dir && db_kind == svn_node_dir)
return SVN_NO_ERROR;
/* If the node is still marked 'not-present', then the server did not
@@ -11069,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
@@ -11088,7 +11085,7 @@ bump_node_revision(svn_wc__db_wcroot_t *
/* Early out */
if (depth <= svn_depth_empty
- || db_kind != svn_kind_dir
+ || db_kind != svn_node_dir
|| status == svn_wc__db_status_server_excluded
|| status == svn_wc__db_status_excluded
|| status == svn_wc__db_status_not_present)
@@ -11154,7 +11151,7 @@ bump_revisions_post_update(svn_wc__db_wc
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_error_t *err;
apr_int64_t new_repos_id = INVALID_REPOS_ID;
@@ -11227,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)
@@ -12295,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;
}
@@ -12488,7 +12485,7 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
svn_error_t *
svn_wc__db_upgrade_insert_external(svn_wc__db_t *db,
const char *local_abspath,
- svn_kind_t kind,
+ svn_node_kind_t kind,
const char *parent_abspath,
const char *def_local_abspath,
const char *repos_relpath,
@@ -12816,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);
}
@@ -12845,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);
}
@@ -12868,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;
}
@@ -12896,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);
}
@@ -13027,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));
@@ -13058,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, "");
}
}
@@ -13191,7 +13184,7 @@ svn_wc__db_read_conflict_internal(svn_sk
svn_error_t *
-svn_wc__db_read_kind(svn_kind_t *kind,
+svn_wc__db_read_kind(svn_node_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t allow_missing,
@@ -13219,7 +13212,7 @@ svn_wc__db_read_kind(svn_kind_t *kind,
{
if (allow_missing)
{
- *kind = svn_kind_unknown;
+ *kind = svn_node_unknown;
SVN_ERR(svn_sqlite__reset(stmt_info));
return SVN_NO_ERROR;
}
@@ -13265,7 +13258,7 @@ svn_wc__db_read_kind(svn_kind_t *kind,
if (report_none)
{
- *kind = svn_kind_none;
+ *kind = svn_node_none;
return svn_error_trace(svn_sqlite__reset(stmt_info));
}
}
@@ -13339,7 +13332,7 @@ svn_wc__db_is_wcroot(svn_boolean_t *is_w
*/
static svn_error_t *
db_is_switched(svn_boolean_t *is_switched,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
apr_pool_t *scratch_pool)
@@ -13409,7 +13402,7 @@ db_is_switched(svn_boolean_t *is_switche
svn_error_t *
svn_wc__db_is_switched(svn_boolean_t *is_wcroot,
svn_boolean_t *is_switched,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *scratch_pool)
@@ -13433,7 +13426,7 @@ svn_wc__db_is_switched(svn_boolean_t *is
*is_wcroot = TRUE;
if (kind)
- *kind = svn_kind_dir;
+ *kind = svn_node_dir;
return SVN_NO_ERROR;
}
@@ -14554,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));
}
@@ -14876,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/fsfs-format7/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.h?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db.h Sat Mar 30 20:02:27 2013
@@ -640,7 +640,7 @@ svn_wc__db_base_add_excluded_node(svn_wc
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
- svn_kind_t kind,
+ svn_node_kind_t kind,
svn_wc__db_status_t status,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
@@ -671,7 +671,7 @@ svn_wc__db_base_add_not_present_node(svn
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
- svn_kind_t kind,
+ svn_node_kind_t kind,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
apr_pool_t *scratch_pool);
@@ -775,7 +775,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
*/
svn_error_t *
svn_wc__db_base_get_info(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
const char **repos_root_url,
@@ -799,7 +799,7 @@ svn_wc__db_base_get_info(svn_wc__db_stat
fields needed by the adm crawler. */
struct svn_wc__db_base_info_t {
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_revnum_t revnum;
const char *repos_relpath;
const char *repos_root_url;
@@ -1197,7 +1197,7 @@ svn_wc__db_external_remove(svn_wc__db_t
*/
svn_error_t *
svn_wc__db_external_read(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
const char **defining_abspath,
const char **repos_root_url,
@@ -1635,7 +1635,7 @@ svn_error_t *
svn_wc__db_revert_list_read(svn_boolean_t *reverted,
const apr_array_header_t **marker_files,
svn_boolean_t *copied_here,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *result_pool,
@@ -1645,7 +1645,7 @@ svn_wc__db_revert_list_read(svn_boolean_
* svn_wc__db_revert_list_read_copied_children(). */
typedef struct svn_wc__db_revert_list_copied_child_info_t {
const char *abspath;
- svn_kind_t kind;
+ svn_node_kind_t kind;
} svn_wc__db_revert_list_copied_child_info_t ;
/* Return in *CHILDREN a list of reverted copied nodes at or within
@@ -1712,7 +1712,7 @@ svn_wc__db_revert_list_done(svn_wc__db_t
The OUT parameters, and their "not available" values are:
STATUS n/a (always available)
- KIND svn_kind_unknown (For ACTUAL only nodes)
+ KIND svn_node_unknown (For ACTUAL only nodes)
REVISION SVN_INVALID_REVNUM
REPOS_RELPATH NULL
REPOS_ROOT_URL NULL
@@ -1861,7 +1861,7 @@ svn_wc__db_revert_list_done(svn_wc__db_t
*/
svn_error_t *
svn_wc__db_read_info(svn_wc__db_status_t *status, /* ### derived */
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
const char **repos_root_url,
@@ -1909,7 +1909,7 @@ svn_wc__db_read_info(svn_wc__db_status_t
fields needed by status. */
struct svn_wc__db_info_t {
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
svn_revnum_t revnum;
const char *repos_relpath;
const char *repos_root_url;
@@ -1968,7 +1968,7 @@ svn_wc__db_read_children_info(apr_hash_t
fields needed by svn_wc__internal_walk_children(). */
struct svn_wc__db_walker_info_t {
svn_wc__db_status_t status;
- svn_kind_t kind;
+ svn_node_kind_t kind;
};
/* When a node is deleted in WORKING, some of its information is no longer
@@ -1992,7 +1992,7 @@ struct svn_wc__db_walker_info_t {
*/
svn_error_t *
svn_wc__db_read_pristine_info(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *changed_rev,
apr_time_t *changed_date,
const char **changed_author,
@@ -2270,7 +2270,7 @@ svn_wc__db_read_conflict(svn_skel_t **co
/* Return the kind of the node in DB at LOCAL_ABSPATH. The WORKING tree will
be examined first, then the BASE tree. If the node is not present in either
- tree and ALLOW_MISSING is TRUE, then svn_kind_unknown is returned.
+ tree and ALLOW_MISSING is TRUE, then svn_node_unknown is returned.
If the node is missing and ALLOW_MISSING is FALSE, then it will return
SVN_ERR_WC_PATH_NOT_FOUND.
@@ -2284,12 +2284,12 @@ svn_wc__db_read_conflict(svn_skel_t **co
svn_wc__db_status_deleted when show_deleted
- In other cases these nodes are reported with *KIND as svn_kind_none.
+ In other cases these nodes are reported with *KIND as svn_node_none.
(See also svn_wc_read_kind2()'s documentation)
Uses SCRATCH_POOL for temporary allocations. */
svn_error_t *
-svn_wc__db_read_kind(svn_kind_t *kind,
+svn_wc__db_read_kind(svn_node_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t allow_missing,
@@ -2360,7 +2360,7 @@ svn_wc__db_is_wcroot(svn_boolean_t *is_w
svn_error_t *
svn_wc__db_is_switched(svn_boolean_t *is_wcroot,
svn_boolean_t *is_switched,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *scratch_pool);
@@ -2471,7 +2471,7 @@ svn_wc__db_global_commit(svn_wc__db_t *d
svn_error_t *
svn_wc__db_global_update(svn_wc__db_t *db,
const char *local_abspath,
- svn_kind_t new_kind,
+ svn_node_kind_t new_kind,
const char *new_repos_relpath,
svn_revnum_t new_revision,
const apr_hash_t *new_props,
@@ -2875,7 +2875,7 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
svn_error_t *
svn_wc__db_upgrade_insert_external(svn_wc__db_t *db,
const char *local_abspath,
- svn_kind_t kind,
+ svn_node_kind_t kind,
const char *parent_abspath,
const char *def_local_abspath,
const char *repos_relpath,
@@ -3058,7 +3058,7 @@ svn_wc__db_op_remove_node(svn_boolean_t
svn_boolean_t destroy_changes,
svn_revnum_t not_present_revision,
svn_wc__db_status_t not_present_status,
- svn_kind_t not_present_kind,
+ svn_node_kind_t not_present_kind,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
svn_cancel_func_t cancel_func,
Modified: subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db_private.h?rev=1462850&r1=1462849&r2=1462850&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db_private.h (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_wc/wc_db_private.h Sat Mar 30 20:02:27 2013
@@ -57,7 +57,7 @@ struct svn_wc__db_t {
struct
{
svn_stringbuf_t *abspath;
- svn_kind_t kind;
+ svn_node_kind_t kind;
} parse_cache;
/* As we grow the state of this DB, allocate that state here. */
@@ -213,7 +213,7 @@ svn_wc__db_util_open_db(svn_sqlite__db_t
DB+LOCAL_ABSPATH, and outputting repos ids instead of URL+UUID. */
svn_error_t *
svn_wc__db_read_info_internal(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -246,7 +246,7 @@ svn_wc__db_read_info_internal(svn_wc__db
DB+LOCAL_ABSPATH and outputting REPOS_ID instead of URL+UUID. */
svn_error_t *
svn_wc__db_base_get_info_internal(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -281,7 +281,7 @@ svn_wc__db_base_get_info_internal(svn_wc
*/
svn_error_t *
svn_wc__db_depth_get_info(svn_wc__db_status_t *status,
- svn_kind_t *kind,
+ svn_node_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -358,7 +358,7 @@ svn_wc__db_with_txn(svn_wc__db_wcroot_t
SVN_SQLITE__WITH_LOCK(expr, (wcroot)->sdb)
-/* Return CHILDREN mapping const char * names to svn_kind_t * for the
+/* Return CHILDREN mapping const char * names to svn_node_kind_t * for the
children of LOCAL_RELPATH at OP_DEPTH. */
svn_error_t *
svn_wc__db_get_children_op_depth(apr_hash_t **children,
@@ -410,7 +410,7 @@ svn_wc__db_get_children_op_depth(apr_has
svn_error_t *
svn_wc__db_extend_parent_delete(svn_wc__db_wcroot_t *wcroot,
const char *local_relpath,
- svn_kind_t kind,
+ svn_node_kind_t kind,
int op_depth,
apr_pool_t *scratch_pool);