You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/10/12 14:38:44 UTC
svn commit: r1182334 [4/5] - in /subversion/branches/showing-merge-info: ./
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/tigris/subversion/javahl/
subversion/bindings/javahl/tests/org/apache/subversion/javahl/
subversion/includ...
Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/status.c?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/status.c Wed Oct 12 12:38:41 2011
@@ -184,6 +184,9 @@ struct dir_baton
/* The pool in which this baton itself is allocated. */
apr_pool_t *pool;
+ /* The repository root relative path to this item in the repository. */
+ const char *repos_relpath;
+
/* out-of-date info corresponding to ood_* fields in svn_wc_status3_t. */
svn_node_kind_t ood_kind;
svn_revnum_t ood_changed_rev;
@@ -223,6 +226,9 @@ struct file_baton
the code that syncs up the adm dir and working copy. */
svn_boolean_t prop_changed;
+ /* The repository root relative path to this item in the repository. */
+ const char *repos_relpath;
+
/* out-of-date info corresponding to ood_* fields in svn_wc_status3_t. */
svn_node_kind_t ood_kind;
svn_revnum_t ood_changed_rev;
@@ -267,7 +273,7 @@ read_info(const struct svn_wc__db_info_t
if (mtb->have_base
&& (mtb->status == svn_wc__db_status_added
|| mtb->status == svn_wc__db_status_deleted
- || mtb->kind == svn_wc__db_kind_file))
+ || mtb->kind == svn_kind_file))
{
svn_boolean_t update_root;
svn_wc__db_lock_t **lock_arg = NULL;
@@ -282,7 +288,7 @@ read_info(const struct svn_wc__db_info_t
db, local_abspath,
result_pool, scratch_pool));
- mtb->file_external = (update_root && mtb->kind == svn_wc__db_kind_file);
+ mtb->file_external = (update_root && mtb->kind == svn_kind_file);
if (mtb->status == svn_wc__db_status_deleted)
{
@@ -338,19 +344,22 @@ read_info(const struct svn_wc__db_info_t
if (mtb->status == svn_wc__db_status_added)
{
const char *moved_from_abspath = NULL;
- SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, NULL, NULL, NULL,
+ svn_wc__db_status_t status;
+
+ SVN_ERR(svn_wc__db_scan_addition(&status, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
&moved_from_abspath,
NULL,
db, local_abspath,
result_pool, scratch_pool));
mtb->moved_here = (moved_from_abspath != NULL);
+ mtb->incomplete = (status == svn_wc__db_status_incomplete);
}
mtb->has_checksum = (checksum != NULL);
#ifdef HAVE_SYMLINK
- if (mtb->kind == svn_wc__db_kind_file
+ if (mtb->kind == svn_kind_file
&& (mtb->had_props || mtb->props_mod))
{
apr_hash_t *properties;
@@ -503,9 +512,9 @@ assemble_status(svn_wc_status3_t **statu
/* Examine whether our target is missing or obstructed. To detect
* obstructions, we have to look at the on-disk status in DIRENT. */
- if (info->kind == svn_wc__db_kind_dir)
+ if (info->kind == svn_kind_dir)
{
- if (info->status == svn_wc__db_status_incomplete)
+ if (info->status == svn_wc__db_status_incomplete || info->incomplete)
{
/* Highest precedence. */
node_status = svn_wc_status_incomplete;
@@ -566,7 +575,7 @@ assemble_status(svn_wc_status3_t **statu
If it was changed, then the subdir is incomplete or missing/obstructed.
*/
- if (info->kind != svn_wc__db_kind_dir
+ if (info->kind != svn_kind_dir
&& node_status == svn_wc_status_normal)
{
svn_boolean_t text_modified_p = FALSE;
@@ -578,8 +587,8 @@ assemble_status(svn_wc_status3_t **statu
precedence over M. */
/* If the entry is a file, check for textual modifications */
- if ((info->kind == svn_wc__db_kind_file
- || info->kind == svn_wc__db_kind_symlink)
+ if ((info->kind == svn_kind_file
+ || info->kind == svn_kind_symlink)
#ifdef HAVE_SYMLINK
&& (info->special == (dirent && dirent->special))
#endif /* HAVE_SYMLINK */
@@ -654,7 +663,7 @@ assemble_status(svn_wc_status3_t **statu
{
if (!info->op_root)
copied = TRUE; /* And keep status normal */
- else if (info->kind == svn_wc__db_kind_file
+ else if (info->kind == svn_kind_file
&& !info->have_base && !info->have_more_work)
{
/* Simple addition or copy, no replacement */
@@ -726,14 +735,14 @@ assemble_status(svn_wc_status3_t **statu
switch (info->kind)
{
- case svn_wc__db_kind_dir:
+ case svn_kind_dir:
stat->kind = svn_node_dir;
break;
- case svn_wc__db_kind_file:
- case svn_wc__db_kind_symlink:
+ case svn_kind_file:
+ case svn_kind_symlink:
stat->kind = svn_node_file;
break;
- case svn_wc__db_kind_unknown:
+ case svn_kind_unknown:
default:
stat->kind = svn_node_unknown;
}
@@ -1137,11 +1146,11 @@ one_child_status(const struct walk_statu
&& info->status != svn_wc__db_status_not_present
&& info->status != svn_wc__db_status_excluded
&& info->status != svn_wc__db_status_server_excluded
- && !(info->kind == svn_wc__db_kind_unknown
+ && !(info->kind == svn_kind_unknown
&& info->status == svn_wc__db_status_normal))
{
if (depth == svn_depth_files
- && info->kind == svn_wc__db_kind_dir)
+ && info->kind == svn_kind_dir)
{
return SVN_NO_ERROR;
}
@@ -1156,7 +1165,7 @@ one_child_status(const struct walk_statu
/* Descend in subdirectories. */
if (depth == svn_depth_infinity
- && info->kind == svn_wc__db_kind_dir)
+ && info->kind == svn_kind_dir)
{
SVN_ERR(get_dir_status(wb, local_abspath, TRUE,
dir_repos_root_url, dir_repos_relpath,
@@ -1570,6 +1579,27 @@ tweak_statushash(void *baton,
{
struct dir_baton *b = this_dir_baton;
+ if (!statstruct->repos_relpath && b->repos_relpath)
+ {
+ if (statstruct->repos_node_status == svn_wc_status_deleted)
+ {
+ /* When deleting PATH, BATON is for PATH's parent,
+ so we must construct PATH's real statstruct->url. */
+ statstruct->repos_relpath =
+ svn_relpath_join(b->repos_relpath,
+ svn_dirent_basename(local_abspath,
+ NULL),
+ pool);
+ }
+ else
+ statstruct->repos_relpath = apr_pstrdup(pool, b->repos_relpath);
+
+ statstruct->repos_root_url =
+ b->edit_baton->anchor_status->repos_root_url;
+ statstruct->repos_uuid =
+ b->edit_baton->anchor_status->repos_uuid;
+ }
+
/* The last committed date, and author for deleted items
isn't available. */
if (statstruct->repos_node_status == svn_wc_status_deleted)
@@ -1603,6 +1633,14 @@ tweak_statushash(void *baton,
struct file_baton *b = baton;
statstruct->ood_changed_rev = b->ood_changed_rev;
statstruct->ood_changed_date = b->ood_changed_date;
+ if (!statstruct->repos_relpath && b->repos_relpath)
+ {
+ statstruct->repos_relpath = apr_pstrdup(pool, b->repos_relpath);
+ statstruct->repos_root_url =
+ b->edit_baton->anchor_status->repos_root_url;
+ statstruct->repos_uuid =
+ b->edit_baton->anchor_status->repos_uuid;
+ }
statstruct->ood_kind = b->ood_kind;
if (b->ood_changed_author)
statstruct->ood_changed_author =
@@ -1625,9 +1663,9 @@ find_dir_repos_relpath(const struct dir_
const svn_wc_status3_t *status = apr_hash_get(pb->statii,
db->local_abspath,
APR_HASH_KEY_STRING);
- /* Note that status->url is NULL in the case of a missing
- * directory, which means we need to recurse up another level to
- * get a useful URL. */
+ /* Note that status->repos_relpath could be NULL in the case of a missing
+ * directory, which means we need to recurse up another level to get
+ * a useful relpath. */
if (status)
return status->repos_relpath;
@@ -1672,6 +1710,7 @@ make_dir_baton(void **dir_baton,
d->statii = apr_hash_make(pool);
d->ood_changed_rev = SVN_INVALID_REVNUM;
d->ood_changed_date = 0;
+ d->repos_relpath = apr_pstrdup(pool, find_dir_repos_relpath(d, pool));
d->ood_kind = svn_node_dir;
d->ood_changed_author = NULL;
@@ -1765,6 +1804,8 @@ make_file_baton(struct dir_baton *parent
f->edit_baton = eb;
f->ood_changed_rev = SVN_INVALID_REVNUM;
f->ood_changed_date = 0;
+ f->repos_relpath = svn_relpath_join(find_dir_repos_relpath(pb, pool),
+ f->name, pool);
f->ood_kind = svn_node_file;
f->ood_changed_author = NULL;
return f;
@@ -1962,7 +2003,7 @@ delete_entry(const char *path,
struct dir_baton *db = parent_baton;
struct edit_baton *eb = db->edit_baton;
const char *local_abspath = svn_dirent_join(eb->anchor_abspath, path, pool);
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
/* Note: when something is deleted, it's okay to tweak the
statushash immediately. No need to wait until close_file or
@@ -1971,7 +2012,7 @@ delete_entry(const char *path,
SVN_ERR(svn_wc__db_read_kind(&kind, eb->db, local_abspath, FALSE, pool));
SVN_ERR(tweak_statushash(db, db, TRUE, eb->db,
- local_abspath, kind == svn_wc__db_kind_dir,
+ local_abspath, kind == svn_kind_dir,
svn_wc_status_deleted, 0, 0, revision, NULL, pool));
/* Mark the parent dir -- it lost an entry (unless that parent dir
@@ -1980,7 +2021,7 @@ delete_entry(const char *path,
if (db->parent_baton && (! *eb->target_basename))
SVN_ERR(tweak_statushash(db->parent_baton, db, TRUE,eb->db,
db->local_abspath,
- kind == svn_wc__db_kind_dir,
+ kind == svn_kind_dir,
svn_wc_status_modified, svn_wc_status_modified,
0, SVN_INVALID_REVNUM, NULL, pool));
@@ -2563,7 +2604,7 @@ svn_wc__internal_walk_status(svn_wc__db_
SVN_ERR(svn_io_stat_dirent(&dirent, local_abspath, TRUE,
scratch_pool, scratch_pool));
- if (info && info->kind == svn_wc__db_kind_dir)
+ if (info && info->kind == svn_kind_dir)
{
SVN_ERR(get_dir_status(&wb,
local_abspath,
@@ -2675,7 +2716,7 @@ internal_status(svn_wc_status3_t **statu
apr_pool_t *scratch_pool)
{
const svn_io_dirent2_t *dirent;
- svn_wc__db_kind_t node_kind;
+ svn_kind_t node_kind;
const char *parent_repos_relpath;
const char *parent_repos_root_url;
const char *parent_repos_uuid;
@@ -2699,7 +2740,7 @@ internal_status(svn_wc_status3_t **statu
if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
{
svn_error_clear(err);
- node_kind = svn_wc__db_kind_unknown;
+ node_kind = svn_kind_unknown;
/* Ensure conflicted is always set, but don't hide tree conflicts
on 'hidden' nodes. */
conflicted = FALSE;
@@ -2712,10 +2753,10 @@ internal_status(svn_wc_status3_t **statu
|| node_status == svn_wc__db_status_server_excluded
|| node_status == svn_wc__db_status_excluded)
{
- node_kind = svn_wc__db_kind_unknown;
+ node_kind = svn_kind_unknown;
}
- if (node_kind == svn_wc__db_kind_unknown)
+ if (node_kind == svn_kind_unknown)
return svn_error_trace(assemble_unversioned(status,
db, local_abspath,
dirent, conflicted,
Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/translate.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/translate.c?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/translate.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/translate.c Wed Oct 12 12:38:41 2011
@@ -365,7 +365,7 @@ svn_wc__sync_flags_with_props(svn_boolea
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_wc__db_lock_t *lock;
apr_hash_t *props = NULL;
@@ -387,7 +387,7 @@ svn_wc__sync_flags_with_props(svn_boolea
/* We actually only care about the following flags on files, so just
early-out for all other types. */
- if (kind != svn_wc__db_kind_file)
+ if (kind != svn_kind_file)
return SVN_NO_ERROR;
/* If we get this far, we're going to change *something*, so just set
Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/update_editor.c?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/update_editor.c Wed Oct 12 12:38:41 2011
@@ -1325,7 +1325,7 @@ create_tree_conflict(svn_wc_conflict_des
else
{
/* A BASE node should exist. */
- svn_wc__db_kind_t base_kind;
+ svn_kind_t base_kind;
/* If anything else shows up, then this assertion is probably naive
* and that other case should also be handled. */
@@ -1346,10 +1346,10 @@ create_tree_conflict(svn_wc_conflict_des
result_pool,
scratch_pool));
/* Translate the node kind. */
- if (base_kind == svn_wc__db_kind_file
- || base_kind == svn_wc__db_kind_symlink)
+ if (base_kind == svn_kind_file
+ || base_kind == svn_kind_symlink)
left_kind = svn_node_file;
- else if (base_kind == svn_wc__db_kind_dir)
+ else if (base_kind == svn_kind_dir)
left_kind = svn_node_dir;
else
SVN_ERR_MALFUNCTION();
@@ -1452,7 +1452,7 @@ check_tree_conflict(svn_wc_conflict_desc
struct edit_baton *eb,
const char *local_abspath,
svn_wc__db_status_t working_status,
- svn_wc__db_kind_t working_kind,
+ svn_kind_t working_kind,
svn_boolean_t exists_in_repos,
svn_wc_conflict_action_t action,
svn_node_kind_t their_node_kind,
@@ -1706,7 +1706,7 @@ delete_entry(const char *path,
const char *base = svn_relpath_basename(path, NULL);
const char *local_abspath;
const char *repos_relpath;
- svn_wc__db_kind_t kind, base_kind;
+ svn_kind_t kind, base_kind;
svn_boolean_t conflicted;
svn_boolean_t have_base;
svn_boolean_t have_work;
@@ -1882,7 +1882,7 @@ delete_entry(const char *path,
SVN_ERR(svn_wc__wq_build_base_remove(&work_item,
eb->db, local_abspath,
SVN_INVALID_REVNUM,
- svn_wc__db_kind_unknown,
+ svn_kind_unknown,
scratch_pool, scratch_pool));
}
else
@@ -1912,7 +1912,7 @@ delete_entry(const char *path,
if (pb->shadowed)
action = svn_wc_notify_update_shadowed_delete;
- if (kind == svn_wc__db_kind_dir)
+ if (kind == svn_kind_dir)
node_kind = svn_node_dir;
else
node_kind = svn_node_file;
@@ -1939,7 +1939,7 @@ add_directory(const char *path,
struct dir_baton *db;
svn_node_kind_t kind;
svn_wc__db_status_t status;
- svn_wc__db_kind_t wc_kind;
+ svn_kind_t wc_kind;
svn_boolean_t conflicted;
svn_boolean_t versioned_locally_and_present;
svn_wc_conflict_description2_t *tree_conflict = NULL;
@@ -1995,13 +1995,13 @@ add_directory(const char *path,
return svn_error_trace(err);
svn_error_clear(err);
- wc_kind = svn_wc__db_kind_unknown;
+ wc_kind = svn_kind_unknown;
status = svn_wc__db_status_normal;
conflicted = FALSE;
versioned_locally_and_present = FALSE;
}
- else if (wc_kind == svn_wc__db_kind_dir
+ else if (wc_kind == svn_kind_dir
&& status == svn_wc__db_status_normal)
{
/* !! We found the root of a separate working copy obstructing the wc !!
@@ -2019,7 +2019,7 @@ add_directory(const char *path,
eb->repos_root,
eb->repos_uuid,
*eb->target_revision,
- svn_wc__db_kind_file,
+ svn_kind_file,
NULL, NULL,
pool));
@@ -2033,8 +2033,8 @@ add_directory(const char *path,
return SVN_NO_ERROR;
}
else if (status == svn_wc__db_status_normal
- && (wc_kind == svn_wc__db_kind_file
- || wc_kind == svn_wc__db_kind_symlink))
+ && (wc_kind == svn_kind_file
+ || wc_kind == svn_kind_symlink))
{
/* We found a file external occupating the place we need in BASE.
@@ -2056,7 +2056,7 @@ add_directory(const char *path,
return SVN_NO_ERROR;
}
- else if (wc_kind == svn_wc__db_kind_unknown)
+ else if (wc_kind == svn_kind_unknown)
versioned_locally_and_present = FALSE; /* Tree conflict ACTUAL-only node */
else
versioned_locally_and_present = IS_NODE_PRESENT(status);
@@ -2116,7 +2116,7 @@ add_directory(const char *path,
eb->repos_root,
eb->repos_uuid,
*eb->target_revision,
- svn_wc__db_kind_dir,
+ svn_kind_dir,
NULL, NULL,
pool));
@@ -2155,7 +2155,7 @@ add_directory(const char *path,
/* Is there *something* that is not a dir? */
- local_is_non_dir = (wc_kind != svn_wc__db_kind_dir
+ local_is_non_dir = (wc_kind != svn_kind_dir
&& status != svn_wc__db_status_deleted);
/* Do tree conflict checking if
@@ -2286,7 +2286,7 @@ open_directory(const char *path,
svn_boolean_t conflicted;
svn_wc_conflict_description2_t *tree_conflict = NULL;
svn_wc__db_status_t status, base_status;
- svn_wc__db_kind_t wc_kind;
+ svn_kind_t wc_kind;
SVN_ERR(make_dir_baton(&db, path, eb, pb, FALSE, pool));
*child_baton = db;
@@ -2594,7 +2594,7 @@ close_directory(void *dir_baton,
&new_actual_props,
eb->db,
db->local_abspath,
- svn_wc__db_kind_dir,
+ svn_kind_dir,
NULL, /* left_version */
NULL, /* right_version */
NULL /* use baseprops */,
@@ -2640,7 +2640,7 @@ close_directory(void *dir_baton,
const char *child_relpath;
const svn_dirent_t *dirent;
svn_wc__db_status_t status;
- svn_wc__db_kind_t child_kind;
+ svn_kind_t child_kind;
svn_error_t *err;
svn_pool_clear(iterpool);
@@ -2651,11 +2651,11 @@ close_directory(void *dir_baton,
dirent = svn__apr_hash_index_val(hi);
child_kind = (dirent->kind == svn_node_dir)
- ? svn_wc__db_kind_dir
- : svn_wc__db_kind_file;
+ ? svn_kind_dir
+ : svn_kind_file;
if (db->ambient_depth < svn_depth_immediates
- && child_kind == svn_wc__db_kind_dir)
+ && child_kind == svn_kind_dir)
continue; /* We don't need the subdirs */
/* ### We just check if there is some node in BASE at this path */
@@ -2726,7 +2726,7 @@ close_directory(void *dir_baton,
eb->repos_root,
eb->repos_uuid,
*eb->target_revision,
- svn_wc__db_kind_file,
+ svn_kind_file,
NULL, NULL,
iterpool));
}
@@ -2848,7 +2848,7 @@ close_directory(void *dir_baton,
/* Common code for 'absent_file' and 'absent_directory'. */
static svn_error_t *
absent_node(const char *path,
- svn_wc__db_kind_t absent_kind,
+ svn_kind_t absent_kind,
void *parent_baton,
apr_pool_t *pool)
{
@@ -2859,7 +2859,7 @@ absent_node(const char *path,
const char *local_abspath;
svn_error_t *err;
svn_wc__db_status_t status;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
if (pb->skip_this)
return SVN_NO_ERROR;
@@ -2884,11 +2884,11 @@ absent_node(const char *path,
svn_error_clear(err);
status = svn_wc__db_status_not_present;
- kind = svn_wc__db_kind_unknown;
+ kind = svn_kind_unknown;
}
if (status == svn_wc__db_status_normal
- && kind == svn_wc__db_kind_dir)
+ && kind == svn_kind_dir)
{
/* We found an obstructing working copy!
@@ -2954,7 +2954,7 @@ absent_file(const char *path,
void *parent_baton,
apr_pool_t *pool)
{
- return absent_node(path, svn_wc__db_kind_file, parent_baton, pool);
+ return absent_node(path, svn_kind_file, parent_baton, pool);
}
@@ -2964,7 +2964,7 @@ absent_directory(const char *path,
void *parent_baton,
apr_pool_t *pool)
{
- return absent_node(path, svn_wc__db_kind_dir, parent_baton, pool);
+ return absent_node(path, svn_kind_dir, parent_baton, pool);
}
@@ -2981,7 +2981,7 @@ add_file(const char *path,
struct edit_baton *eb = pb->edit_baton;
struct file_baton *fb;
svn_node_kind_t kind = svn_node_none;
- svn_wc__db_kind_t wc_kind = svn_wc__db_kind_unknown;
+ svn_kind_t wc_kind = svn_kind_unknown;
svn_wc__db_status_t status = svn_wc__db_status_normal;
apr_pool_t *scratch_pool;
svn_boolean_t conflicted = FALSE;
@@ -3030,12 +3030,12 @@ add_file(const char *path,
return svn_error_trace(err);
svn_error_clear(err);
- wc_kind = svn_wc__db_kind_unknown;
+ wc_kind = svn_kind_unknown;
conflicted = FALSE;
versioned_locally_and_present = FALSE;
}
- else if (wc_kind == svn_wc__db_kind_dir
+ else if (wc_kind == svn_kind_dir
&& status == svn_wc__db_status_normal)
{
/* !! We found the root of a separate working copy obstructing the wc !!
@@ -3061,8 +3061,8 @@ add_file(const char *path,
return SVN_NO_ERROR;
}
else if (status == svn_wc__db_status_normal
- && (wc_kind == svn_wc__db_kind_file
- || wc_kind == svn_wc__db_kind_symlink))
+ && (wc_kind == svn_kind_file
+ || wc_kind == svn_kind_symlink))
{
/* We found a file external occupating the place we need in BASE.
@@ -3085,7 +3085,7 @@ add_file(const char *path,
return SVN_NO_ERROR;
}
- else if (wc_kind == svn_wc__db_kind_unknown)
+ else if (wc_kind == svn_kind_unknown)
versioned_locally_and_present = FALSE; /* Tree conflict ACTUAL-only node */
else
versioned_locally_and_present = IS_NODE_PRESENT(status);
@@ -3093,7 +3093,6 @@ add_file(const char *path,
/* Is this path a conflict victim? */
if (conflicted)
- if (conflicted)
{
if (pb->deletion_conflicts)
tree_conflict = apr_hash_get(pb->deletion_conflicts, fb->name,
@@ -3182,8 +3181,8 @@ add_file(const char *path,
scratch_pool, scratch_pool));
/* Is there something that is a file? */
- local_is_file = (wc_kind == svn_wc__db_kind_file
- || wc_kind == svn_wc__db_kind_symlink);
+ local_is_file = (wc_kind == svn_kind_file
+ || wc_kind == svn_kind_symlink);
/* Do tree conflict checking if
* - if there is a local copy.
@@ -3278,7 +3277,7 @@ open_file(const char *path,
svn_boolean_t conflicted;
svn_boolean_t have_work;
svn_wc__db_status_t status;
- svn_wc__db_kind_t wc_kind;
+ svn_kind_t wc_kind;
svn_wc_conflict_description2_t *tree_conflict = NULL;
/* the file_pool can stick around for a *long* time, so we want to use
@@ -4121,7 +4120,7 @@ close_file(void *file_baton,
### verifying again */
SVN_ERR(check_tree_conflict(&tree_conflict, eb, fb->local_abspath,
svn_wc__db_status_added,
- svn_wc__db_kind_file, TRUE,
+ svn_kind_file, TRUE,
svn_wc_conflict_action_add,
svn_node_file, fb->new_relpath, NULL,
scratch_pool, scratch_pool));
@@ -4154,7 +4153,7 @@ close_file(void *file_baton,
&new_actual_props,
eb->db,
working_abspath,
- svn_wc__db_kind_file,
+ svn_kind_file,
NULL /* left_version */,
NULL /* right_version */,
NULL /* server_baseprops (update, not merge) */,
@@ -4293,7 +4292,7 @@ close_file(void *file_baton,
&new_actual_props,
eb->db,
fb->local_abspath,
- svn_wc__db_kind_file,
+ svn_kind_file,
NULL /* left_version */,
NULL /* right_version */,
NULL /* server_baseprops (not merging) */,
@@ -4588,14 +4587,14 @@ fetch_kind_func(svn_node_kind_t *kind,
struct fetch_baton *fpb = baton;
const char *local_abspath = svn_dirent_join(fpb->target_abspath, path,
scratch_pool);
- svn_wc__db_kind_t db_kind;
+ svn_kind_t db_kind;
SVN_ERR(svn_wc__db_read_kind(&db_kind, fpb->db, local_abspath, FALSE,
scratch_pool));
- if (db_kind == svn_wc__db_kind_dir)
+ if (db_kind == svn_kind_dir)
*kind = svn_node_dir;
- else if (db_kind == svn_wc__db_kind_file)
+ else if (db_kind == svn_kind_file)
*kind = svn_node_file;
else
*kind = svn_node_none;
@@ -4739,7 +4738,7 @@ make_editor(svn_revnum_t *target_revisio
depth. In this case the update won't describe additions that would
have been reported if we updated at the ambient depth. */
svn_error_t *err;
- svn_wc__db_kind_t dir_kind;
+ svn_kind_t dir_kind;
svn_wc__db_status_t dir_status;
const char *dir_repos_relpath;
svn_depth_t dir_depth;
@@ -4753,7 +4752,7 @@ make_editor(svn_revnum_t *target_revisio
scratch_pool, scratch_pool);
if (!err
- && dir_kind == svn_wc__db_kind_dir
+ && dir_kind == svn_kind_dir
&& dir_status == svn_wc__db_status_normal)
{
if (dir_depth > depth)
@@ -4809,7 +4808,7 @@ make_editor(svn_revnum_t *target_revisio
db, child_abspath,
iterpool, iterpool));
- if (dir_kind == svn_wc__db_kind_dir
+ if (dir_kind == svn_kind_dir
&& dir_status == svn_wc__db_status_normal
&& dir_depth > svn_depth_empty)
{
@@ -5075,7 +5074,7 @@ svn_wc_get_switch_editor4(const svn_delt
svn_error_t *
svn_wc__check_wc_root(svn_boolean_t *wc_root,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_boolean_t *switched,
svn_wc__db_t *db,
const char *local_abspath,
@@ -5084,7 +5083,7 @@ svn_wc__check_wc_root(svn_boolean_t *wc_
const char *parent_abspath, *name;
const char *repos_relpath, *repos_root, *repos_uuid;
svn_wc__db_status_t status;
- svn_wc__db_kind_t my_kind;
+ svn_kind_t my_kind;
if (!kind)
kind = &my_kind;
@@ -5108,7 +5107,7 @@ svn_wc__check_wc_root(svn_boolean_t *wc_
*wc_root = FALSE;
return SVN_NO_ERROR;
}
- if (*kind != svn_wc__db_kind_dir)
+ if (*kind != svn_kind_dir)
{
/* File/symlinks cannot be a root. */
*wc_root = FALSE;
@@ -5192,7 +5191,7 @@ svn_wc_is_wc_root2(svn_boolean_t *wc_roo
{
svn_boolean_t is_root;
svn_boolean_t is_switched;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_error_t *err;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -5208,7 +5207,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_wc__db_kind_dir && is_switched);
+ *wc_root = is_root || (kind == svn_kind_dir && is_switched);
return SVN_NO_ERROR;
}
@@ -5248,7 +5247,7 @@ svn_wc_get_actual_target2(const char **a
apr_pool_t *scratch_pool)
{
svn_boolean_t is_wc_root, is_switched;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
const char *local_abspath;
svn_error_t *err;
@@ -5270,7 +5269,7 @@ svn_wc_get_actual_target2(const char **a
}
/* If PATH is not a WC root, or if it is a file, lop off a basename. */
- if (!(is_wc_root || is_switched) || (kind != svn_wc__db_kind_dir))
+ if (!(is_wc_root || is_switched) || (kind != svn_kind_dir))
{
svn_dirent_split(anchor, target, path, result_pool);
}
@@ -5308,7 +5307,7 @@ svn_wc_add_repos_file4(svn_wc_context_t
svn_wc__db_t *db = wc_ctx->db;
const char *dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
svn_wc__db_status_t status;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
const char *tmp_text_base_abspath;
svn_checksum_t *new_text_base_md5_checksum;
svn_checksum_t *new_text_base_sha1_checksum;
@@ -5379,7 +5378,7 @@ svn_wc_add_repos_file4(svn_wc_context_t
svn_dirent_local_style(local_abspath,
scratch_pool));
}
- if (kind != svn_wc__db_kind_dir)
+ if (kind != svn_kind_dir)
return svn_error_createf(SVN_ERR_NODE_UNEXPECTED_KIND, NULL,
_("Can't schedule an addition of '%s'"
" below a not-directory node"),
Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/upgrade.c?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/upgrade.c Wed Oct 12 12:38:41 2011
@@ -1997,19 +1997,19 @@ svn_wc__upgrade_add_external_info(svn_wc
svn_revnum_t def_revision,
apr_pool_t *scratch_pool)
{
- svn_wc__db_kind_t db_kind;
+ svn_kind_t db_kind;
switch (kind)
{
case svn_node_dir:
- db_kind = svn_wc__db_kind_dir;
+ db_kind = svn_kind_dir;
break;
case svn_node_file:
- db_kind = svn_wc__db_kind_file;
+ db_kind = svn_kind_file;
break;
case svn_node_unknown:
- db_kind = svn_wc__db_kind_unknown;
+ db_kind = svn_kind_unknown;
break;
default:
Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/wc-metadata.sql?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/wc-metadata.sql Wed Oct 12 12:38:41 2011
@@ -23,12 +23,11 @@
/*
* the KIND column in these tables has one of the following values
- * (documented in the corresponding C type #svn_wc__db_kind_t):
+ * (documented in the corresponding C type #svn_kind_t):
* "file"
* "dir"
* "symlink"
* "unknown"
- * "subdir"
*
* the PRESENCE column in these tables has one of the following values
* (see also the C type #svn_wc__db_status_t):
Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/wc.h?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/wc.h Wed Oct 12 12:38:41 2011
@@ -680,7 +680,7 @@ svn_wc__wipe_postupgrade(const char *dir
*/
svn_error_t *
svn_wc__check_wc_root(svn_boolean_t *wc_root,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_boolean_t *switched,
svn_wc__db_t *db,
const char *local_abspath,
Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.c?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.c Wed Oct 12 12:38:41 2011
@@ -142,7 +142,7 @@ apr_int64_t svn_wc__db_op_depth_for_upgr
typedef struct insert_base_baton_t {
/* common to all insertions into BASE */
svn_wc__db_status_t status;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
apr_int64_t repos_id;
const char *repos_relpath;
svn_revnum_t revision;
@@ -192,7 +192,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_wc__db_kind_t kind;
+ svn_kind_t kind;
apr_int64_t op_depth;
/* common to all "normal" presence insertions */
@@ -226,7 +226,7 @@ typedef struct insert_working_baton_t {
typedef struct insert_external_baton_t {
/* common to all insertions into EXTERNALS */
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_wc__db_status_t presence;
/* The repository of the external */
@@ -274,10 +274,10 @@ typedef struct insert_external_baton_t {
static const svn_token_map_t kind_map[] = {
- { "file", svn_wc__db_kind_file },
- { "dir", svn_wc__db_kind_dir },
- { "symlink", svn_wc__db_kind_symlink },
- { "unknown", svn_wc__db_kind_unknown },
+ { "file", svn_kind_file },
+ { "dir", svn_kind_dir },
+ { "symlink", svn_kind_symlink },
+ { "unknown", svn_kind_unknown },
{ NULL }
};
@@ -329,7 +329,7 @@ db_read_pristine_props(apr_hash_t **prop
static svn_error_t *
read_info(svn_wc__db_status_t *status,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -830,17 +830,17 @@ insert_base_node(void *baton,
pibb->repos_relpath,
pibb->revision,
presence_map, pibb->status, /* 8 */
- (pibb->kind == svn_wc__db_kind_dir) ? /* 9 */
+ (pibb->kind == svn_kind_dir) ? /* 9 */
svn_depth_to_word(pibb->depth) : NULL,
kind_map, pibb->kind, /* 10 */
pibb->changed_rev, /* 11 */
pibb->changed_date, /* 12 */
pibb->changed_author, /* 13 */
- (pibb->kind == svn_wc__db_kind_symlink) ?
+ (pibb->kind == svn_kind_symlink) ?
pibb->target : NULL, /* 19 */
NULL /* 20 */,
moved_to_relpath /* 21 */));
- if (pibb->kind == svn_wc__db_kind_file)
+ if (pibb->kind == svn_kind_file)
{
SVN_ERR(svn_sqlite__bind_checksum(stmt, 14, pibb->checksum,
scratch_pool));
@@ -886,7 +886,7 @@ insert_base_node(void *baton,
wcroot->sdb, scratch_pool));
}
- if (pibb->kind == svn_wc__db_kind_dir && pibb->children)
+ if (pibb->kind == svn_kind_dir && pibb->children)
SVN_ERR(insert_incomplete_children(wcroot->sdb, wcroot->wc_id,
local_relpath,
repos_id,
@@ -1023,18 +1023,18 @@ insert_working_node(void *baton,
piwb->op_depth,
parent_relpath,
presence_map, piwb->presence,
- (piwb->kind == svn_wc__db_kind_dir)
+ (piwb->kind == svn_kind_dir)
? svn_depth_to_word(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_wc__db_kind_symlink)
+ (piwb->kind == svn_kind_symlink)
? piwb->target : NULL,
(apr_int64_t)piwb->moved_here));
- if (piwb->kind == svn_wc__db_kind_file)
+ if (piwb->kind == svn_kind_file)
{
SVN_ERR(svn_sqlite__bind_checksum(stmt, 14, piwb->checksum,
scratch_pool));
@@ -1055,7 +1055,7 @@ insert_working_node(void *baton,
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_wc__db_kind_dir && piwb->children)
+ if (piwb->kind == svn_kind_dir && piwb->children)
SVN_ERR(insert_incomplete_children(wcroot->sdb, wcroot->wc_id,
local_relpath,
INVALID_REPOS_ID /* inherit repos_id */,
@@ -1065,7 +1065,7 @@ insert_working_node(void *baton,
piwb->op_depth,
scratch_pool));
- if (piwb->kind == svn_wc__db_kind_dir)
+ if (piwb->kind == svn_kind_dir)
{
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_UPDATE_ACTUAL_CLEAR_CHANGELIST));
@@ -1463,7 +1463,7 @@ svn_wc__db_init(svn_wc__db_t *db,
ibb.status = svn_wc__db_status_incomplete;
else
ibb.status = svn_wc__db_status_normal;
- ibb.kind = svn_wc__db_kind_dir;
+ ibb.kind = svn_kind_dir;
ibb.repos_id = repos_id;
ibb.repos_relpath = repos_relpath;
ibb.revision = initial_rev;
@@ -1613,7 +1613,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_wc__db_kind_dir;
+ ibb.kind = svn_kind_dir;
ibb.repos_relpath = repos_relpath;
ibb.revision = revision;
@@ -1694,7 +1694,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_wc__db_kind_file;
+ ibb.kind = svn_kind_file;
ibb.repos_relpath = repos_relpath;
ibb.revision = revision;
@@ -1773,7 +1773,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_wc__db_kind_symlink;
+ ibb.kind = svn_kind_symlink;
ibb.repos_relpath = repos_relpath;
ibb.revision = revision;
@@ -1812,7 +1812,7 @@ add_excluded_or_not_present_node(svn_wc_
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
- svn_wc__db_kind_t kind,
+ svn_kind_t kind,
svn_wc__db_status_t status,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
@@ -1884,7 +1884,7 @@ svn_wc__db_base_add_excluded_node(svn_wc
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
- svn_wc__db_kind_t kind,
+ svn_kind_t kind,
svn_wc__db_status_t status,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
@@ -1906,7 +1906,7 @@ svn_wc__db_base_add_not_present_node(svn
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
- svn_wc__db_kind_t kind,
+ svn_kind_t kind,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
apr_pool_t *scratch_pool)
@@ -1983,7 +1983,7 @@ svn_wc__db_base_remove(svn_wc__db_t *db,
DB+LOCAL_ABSPATH and outputting REPOS_ID instead of URL+UUID. */
static svn_error_t *
base_get_info(svn_wc__db_status_t *status,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -2013,7 +2013,7 @@ base_get_info(svn_wc__db_status_t *statu
if (have_row)
{
- svn_wc__db_kind_t node_kind = svn_sqlite__column_token(stmt, 3,
+ svn_kind_t node_kind = svn_sqlite__column_token(stmt, 3,
kind_map);
if (kind)
@@ -2047,7 +2047,7 @@ base_get_info(svn_wc__db_status_t *statu
}
if (depth)
{
- if (node_kind != svn_wc__db_kind_dir)
+ if (node_kind != svn_kind_dir)
{
*depth = svn_depth_unknown;
}
@@ -2063,7 +2063,7 @@ base_get_info(svn_wc__db_status_t *statu
}
if (checksum)
{
- if (node_kind != svn_wc__db_kind_file)
+ if (node_kind != svn_kind_file)
{
*checksum = NULL;
}
@@ -2081,7 +2081,7 @@ base_get_info(svn_wc__db_status_t *statu
}
if (target)
{
- if (node_kind != svn_wc__db_kind_symlink)
+ if (node_kind != svn_kind_symlink)
*target = NULL;
else
*target = svn_sqlite__column_text(stmt, 11, result_pool);
@@ -2110,7 +2110,7 @@ base_get_info(svn_wc__db_status_t *statu
svn_error_t *
svn_wc__db_base_get_info(svn_wc__db_status_t *status,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
const char **repos_root_url,
@@ -2362,7 +2362,7 @@ svn_wc__db_base_clear_dav_cache_recursiv
DB+LOCAL_ABSPATH and outputting REPOS_ID instead of URL+UUID. */
static svn_error_t *
depth_get_info(svn_wc__db_status_t *status,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -2391,7 +2391,7 @@ depth_get_info(svn_wc__db_status_t *stat
if (have_row)
{
- svn_wc__db_kind_t node_kind = svn_sqlite__column_token(stmt, 3,
+ svn_kind_t node_kind = svn_sqlite__column_token(stmt, 3,
kind_map);
if (kind)
@@ -2423,7 +2423,7 @@ depth_get_info(svn_wc__db_status_t *stat
}
if (depth)
{
- if (node_kind != svn_wc__db_kind_dir)
+ if (node_kind != svn_kind_dir)
{
*depth = svn_depth_unknown;
}
@@ -2439,7 +2439,7 @@ depth_get_info(svn_wc__db_status_t *stat
}
if (checksum)
{
- if (node_kind != svn_wc__db_kind_file)
+ if (node_kind != svn_kind_file)
{
*checksum = NULL;
}
@@ -2457,7 +2457,7 @@ depth_get_info(svn_wc__db_status_t *stat
}
if (target)
{
- if (node_kind != svn_wc__db_kind_symlink)
+ if (node_kind != svn_kind_symlink)
*target = NULL;
else
*target = svn_sqlite__column_text(stmt, 11, result_pool);
@@ -2616,8 +2616,8 @@ insert_external_node(void *baton,
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_wc__db_kind_file
- || ieb->kind == svn_wc__db_kind_symlink)
+ if (ieb->kind == svn_kind_file
+ || ieb->kind == svn_kind_symlink)
{
struct insert_base_baton_t ibb;
@@ -2738,7 +2738,7 @@ svn_wc__db_external_add_file(svn_wc__db_
blank_ieb(&ieb);
- ieb.kind = svn_wc__db_kind_file;
+ ieb.kind = svn_kind_file;
ieb.presence = svn_wc__db_status_normal;
ieb.repos_root_url = repos_root_url;
@@ -2822,7 +2822,7 @@ svn_wc__db_external_add_symlink(svn_wc__
blank_ieb(&ieb);
- ieb.kind = svn_wc__db_kind_symlink;
+ ieb.kind = svn_kind_symlink;
ieb.presence = svn_wc__db_status_normal;
ieb.repos_root_url = repos_root_url;
@@ -2895,7 +2895,7 @@ svn_wc__db_external_add_dir(svn_wc__db_t
blank_ieb(&ieb);
- ieb.kind = svn_wc__db_kind_dir;
+ ieb.kind = svn_kind_dir;
ieb.presence = svn_wc__db_status_normal;
ieb.repos_root_url = repos_root_url;
@@ -2972,7 +2972,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_wc__db_kind_t *kind,
+ svn_kind_t *kind,
const char **definining_abspath,
const char **repos_root_url,
const char **repos_uuid,
@@ -3240,7 +3240,7 @@ cross_db_copy(svn_wc__db_wcroot_t *src_w
svn_wc__db_status_t dst_status,
apr_int64_t dst_op_depth,
apr_int64_t dst_np_op_depth,
- svn_wc__db_kind_t kind,
+ svn_kind_t kind,
const apr_array_header_t *children,
apr_int64_t copyfrom_id,
const char *copyfrom_relpath,
@@ -3255,8 +3255,8 @@ cross_db_copy(svn_wc__db_wcroot_t *src_w
apr_hash_t *props;
svn_depth_t depth;
- SVN_ERR_ASSERT(kind == svn_wc__db_kind_file
- || kind == svn_wc__db_kind_dir
+ SVN_ERR_ASSERT(kind == svn_kind_file
+ || kind == svn_kind_dir
);
SVN_ERR(read_info(NULL, NULL, NULL, NULL, NULL,
@@ -3307,7 +3307,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_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_boolean_t *op_root,
svn_boolean_t *have_work,
svn_wc__db_wcroot_t *wcroot,
@@ -3332,7 +3332,7 @@ get_info_for_copy(apr_int64_t *copyfrom_
adjust the relpath */
const char *parent_relpath, *base_name;
svn_wc__db_status_t parent_status;
- svn_wc__db_kind_t parent_kind;
+ svn_kind_t parent_kind;
svn_boolean_t parent_have_work;
svn_dirent_split(&parent_relpath, &base_name, local_relpath,
@@ -3453,7 +3453,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
apr_int64_t copyfrom_id;
apr_int64_t dst_op_depth;
apr_int64_t dst_np_op_depth;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
const apr_array_header_t *children;
SVN_ERR(get_info_for_copy(©from_id, ©from_relpath, ©from_rev,
@@ -3464,7 +3464,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
copyfrom_relpath, copyfrom_rev,
dst_wcroot, dst_relpath, scratch_pool));
- SVN_ERR_ASSERT(kind == svn_wc__db_kind_file || kind == svn_wc__db_kind_dir);
+ SVN_ERR_ASSERT(kind == svn_kind_file || kind == svn_kind_dir);
/* ### New status, not finished, see notes/wc-ng/copying */
switch (status)
@@ -3532,7 +3532,7 @@ db_op_copy(svn_wc__db_wcroot_t *src_wcro
scratch_pool));
}
- if (kind == svn_wc__db_kind_dir)
+ if (kind == svn_kind_dir)
{
apr_int64_t src_op_depth;
@@ -3595,7 +3595,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_wc__db_kind_dir
+ if (kind == svn_kind_dir
&& dst_presence == svn_wc__db_status_normal)
SVN_ERR(insert_incomplete_children(
dst_wcroot->sdb,
@@ -3716,7 +3716,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_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_revnum_t node_revision;
const char *node_repos_relpath;
apr_int64_t node_repos_id;
@@ -4203,7 +4203,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_wc__db_kind_dir;
+ iwb.kind = svn_kind_dir;
iwb.props = props;
iwb.changed_rev = changed_rev;
@@ -4278,7 +4278,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_wc__db_kind_file;
+ iwb.kind = svn_kind_file;
iwb.props = props;
iwb.changed_rev = changed_rev;
@@ -4347,7 +4347,7 @@ svn_wc__db_op_copy_symlink(svn_wc__db_t
blank_iwb(&iwb);
iwb.presence = svn_wc__db_status_normal;
- iwb.kind = svn_wc__db_kind_symlink;
+ iwb.kind = svn_kind_symlink;
iwb.props = props;
iwb.changed_rev = changed_rev;
@@ -4401,7 +4401,7 @@ svn_wc__db_op_add_directory(svn_wc__db_t
blank_iwb(&iwb);
iwb.presence = svn_wc__db_status_normal;
- iwb.kind = svn_wc__db_kind_dir;
+ iwb.kind = svn_kind_dir;
iwb.op_depth = relpath_depth(local_relpath);
iwb.work_items = work_items;
@@ -4436,7 +4436,7 @@ svn_wc__db_op_add_file(svn_wc__db_t *db,
blank_iwb(&iwb);
iwb.presence = svn_wc__db_status_normal;
- iwb.kind = svn_wc__db_kind_file;
+ iwb.kind = svn_kind_file;
iwb.op_depth = relpath_depth(local_relpath);
iwb.work_items = work_items;
@@ -4470,7 +4470,7 @@ svn_wc__db_op_add_symlink(svn_wc__db_t *
blank_iwb(&iwb);
iwb.presence = svn_wc__db_status_normal;
- iwb.kind = svn_wc__db_kind_symlink;
+ iwb.kind = svn_kind_symlink;
iwb.op_depth = relpath_depth(local_relpath);
iwb.target = target;
@@ -5494,7 +5494,7 @@ struct revert_list_read_baton {
const char **conflict_working;
const char **prop_reject;
svn_boolean_t *copied_here;
- svn_wc__db_kind_t *kind;
+ svn_kind_t *kind;
apr_pool_t *result_pool;
};
@@ -5512,7 +5512,7 @@ revert_list_read(void *baton,
*(b->conflict_new) = *(b->conflict_old) = *(b->conflict_working) = NULL;
*(b->prop_reject) = NULL;
*(b->copied_here) = FALSE;
- *(b->kind) = svn_wc__db_kind_unknown;
+ *(b->kind) = svn_kind_unknown;
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
STMT_SELECT_REVERT_LIST));
@@ -5587,7 +5587,7 @@ svn_wc__db_revert_list_read(svn_boolean_
const char **conflict_working,
const char **prop_reject,
svn_boolean_t *copied_here,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *result_pool,
@@ -5901,7 +5901,7 @@ svn_wc__db_op_read_tree_conflict(
struct remove_node_baton
{
svn_revnum_t not_present_rev;
- svn_wc__db_kind_t not_present_kind;
+ svn_kind_t not_present_kind;
};
/* Implements svn_wc__db_txn_callback_t for svn_wc__db_op_remove_node */
@@ -5966,7 +5966,7 @@ svn_error_t *
svn_wc__db_op_remove_node(svn_wc__db_t *db,
const char *local_abspath,
svn_revnum_t not_present_revision,
- svn_wc__db_kind_t not_present_kind,
+ svn_kind_t not_present_kind,
apr_pool_t *scratch_pool)
{
svn_wc__db_wcroot_t *wcroot;
@@ -6108,11 +6108,7 @@ convert_to_working_status(svn_wc__db_sta
|| work_status == svn_wc__db_status_incomplete
|| work_status == svn_wc__db_status_excluded);
- if (work_status == svn_wc__db_status_incomplete)
- {
- *working_status = svn_wc__db_status_incomplete;
- }
- else if (work_status == svn_wc__db_status_excluded)
+ if (work_status == svn_wc__db_status_excluded)
{
*working_status = svn_wc__db_status_excluded;
}
@@ -6127,7 +6123,7 @@ convert_to_working_status(svn_wc__db_sta
*working_status = svn_wc__db_status_deleted;
}
- else /* normal */
+ else /* normal or incomplete */
{
/* The caller should scan upwards to detect whether this
addition has occurred because of a simple addition,
@@ -6238,7 +6234,7 @@ op_delete_txn(void *baton,
svn_sqlite__stmt_t *stmt;
apr_int64_t select_depth; /* Depth of what is to be deleted */
svn_boolean_t refetch_depth = FALSE;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
SVN_ERR(svn_sqlite__exec_statements(wcroot->sdb, STMT_CREATE_DELETE_LIST));
@@ -6300,7 +6296,7 @@ op_delete_txn(void *baton,
/* If a subtree is being moved-away, we need to update moved-to
* information in BASE for all children that were moved into this
* subtree. */
- if (kind == svn_wc__db_kind_dir)
+ if (kind == svn_kind_dir)
{
apr_pool_t *iterpool;
@@ -6590,7 +6586,7 @@ svn_wc__db_op_delete(svn_wc__db_t *db,
DB+LOCAL_ABSPATH, and outputting repos ids instead of URL+UUID. */
static svn_error_t *
read_info(svn_wc__db_status_t *status,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
apr_int64_t *repos_id,
@@ -6649,7 +6645,7 @@ read_info(svn_wc__db_status_t *status,
if (have_info)
{
apr_int64_t op_depth;
- svn_wc__db_kind_t node_kind;
+ svn_kind_t node_kind;
op_depth = svn_sqlite__column_int64(stmt_info, 0);
node_kind = svn_sqlite__column_token(stmt_info, 4, kind_map);
@@ -6708,7 +6704,7 @@ read_info(svn_wc__db_status_t *status,
}
if (depth)
{
- if (node_kind != svn_wc__db_kind_dir)
+ if (node_kind != svn_kind_dir)
{
*depth = svn_depth_unknown;
}
@@ -6726,7 +6722,7 @@ read_info(svn_wc__db_status_t *status,
}
if (checksum)
{
- if (node_kind != svn_wc__db_kind_file)
+ if (node_kind != svn_kind_file)
{
*checksum = NULL;
}
@@ -6752,7 +6748,7 @@ read_info(svn_wc__db_status_t *status,
}
if (target)
{
- if (node_kind != svn_wc__db_kind_symlink)
+ if (node_kind != svn_kind_symlink)
*target = NULL;
else
*target = svn_sqlite__column_text(stmt_info, 12, result_pool);
@@ -6869,7 +6865,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_wc__db_kind_unknown;
+ *kind = svn_kind_unknown;
if (revision)
*revision = SVN_INVALID_REVNUM;
if (repos_relpath)
@@ -6934,7 +6930,7 @@ read_info(svn_wc__db_status_t *status,
svn_error_t *
svn_wc__db_read_info(svn_wc__db_status_t *status,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
const char **repos_root_url,
@@ -7068,6 +7064,8 @@ read_children_info(void *baton,
child->status = svn_sqlite__column_token(stmt, 3, presence_map);
if (op_depth != 0)
{
+ if (child->status == svn_wc__db_status_incomplete)
+ child->incomplete = TRUE;
err = convert_to_working_status(&child->status, child->status);
if (err)
SVN_ERR(svn_error_compose_create(err, svn_sqlite__reset(stmt)));
@@ -7116,7 +7114,7 @@ read_children_info(void *baton,
child->changed_author = svn_sqlite__column_text(stmt, 10,
result_pool);
- if (child->kind != svn_wc__db_kind_dir)
+ if (child->kind != svn_kind_dir)
child->depth = svn_depth_unknown;
else
{
@@ -7287,7 +7285,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_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_revnum_t *changed_rev,
apr_time_t *changed_date,
const char **changed_author,
@@ -7307,7 +7305,7 @@ svn_wc__db_read_pristine_info(svn_wc__db
svn_error_t *err = NULL;
apr_int64_t op_depth;
svn_wc__db_status_t raw_status;
- svn_wc__db_kind_t node_kind;
+ svn_kind_t node_kind;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -7377,7 +7375,7 @@ svn_wc__db_read_pristine_info(svn_wc__db
}
if (depth)
{
- if (node_kind != svn_wc__db_kind_dir)
+ if (node_kind != svn_kind_dir)
{
*depth = svn_depth_unknown;
}
@@ -7395,7 +7393,7 @@ svn_wc__db_read_pristine_info(svn_wc__db
}
if (checksum)
{
- if (node_kind != svn_wc__db_kind_file)
+ if (node_kind != svn_kind_file)
{
*checksum = NULL;
}
@@ -7421,7 +7419,7 @@ svn_wc__db_read_pristine_info(svn_wc__db
}
if (target)
{
- if (node_kind != svn_wc__db_kind_symlink)
+ if (node_kind != svn_kind_symlink)
*target = NULL;
else
*target = svn_sqlite__column_text(stmt, 12, result_pool);
@@ -8537,7 +8535,7 @@ commit_node(void *baton,
const char *changelist = NULL;
const char *parent_relpath;
svn_wc__db_status_t new_presence;
- svn_wc__db_kind_t new_kind;
+ svn_kind_t new_kind;
const char *new_depth_str = NULL;
svn_sqlite__stmt_t *stmt;
apr_int64_t repos_id;
@@ -8575,7 +8573,7 @@ commit_node(void *baton,
new_kind = svn_sqlite__column_token(stmt_info, 4, kind_map);
/* What will the new depth be? */
- if (new_kind == svn_wc__db_kind_dir)
+ if (new_kind == svn_kind_dir)
new_depth_str = svn_sqlite__column_text(stmt_info, 11, scratch_pool);
/* Check that the repository information is not being changed. */
@@ -8713,7 +8711,7 @@ commit_node(void *baton,
}
}
- if (new_kind == svn_wc__db_kind_dir)
+ if (new_kind == svn_kind_dir)
{
/* When committing a directory, we should have its new children. */
/* ### one day. just not today. */
@@ -8810,7 +8808,7 @@ struct update_baton_t {
svn_error_t *
svn_wc__db_global_update(svn_wc__db_t *db,
const char *local_abspath,
- svn_wc__db_kind_t new_kind,
+ svn_kind_t new_kind,
const char *new_repos_relpath,
svn_revnum_t new_revision,
const apr_hash_t *new_props,
@@ -8947,7 +8945,7 @@ bump_node_revision(svn_wc__db_wcroot_t *
const apr_array_header_t *children;
int i;
svn_wc__db_status_t status;
- svn_wc__db_kind_t db_kind;
+ svn_kind_t db_kind;
svn_revnum_t revision;
const char *repos_relpath;
apr_int64_t repos_id;
@@ -8967,11 +8965,11 @@ bump_node_revision(svn_wc__db_wcroot_t *
/* Skip file externals */
if (update_root
- && db_kind == svn_wc__db_kind_file
+ && db_kind == svn_kind_file
&& !is_root)
return SVN_NO_ERROR;
- if (skip_when_dir && db_kind == svn_wc__db_kind_dir)
+ if (skip_when_dir && db_kind == svn_kind_dir)
return SVN_NO_ERROR;
/* If the node is still marked 'not-present', then the server did not
@@ -9003,7 +9001,7 @@ bump_node_revision(svn_wc__db_wcroot_t *
/* Early out */
if (depth <= svn_depth_empty
- || db_kind != svn_wc__db_kind_dir
+ || db_kind != svn_kind_dir
|| status == svn_wc__db_status_server_excluded
|| status == svn_wc__db_status_excluded
|| status == svn_wc__db_status_not_present)
@@ -9068,7 +9066,7 @@ bump_revisions_post_update(void *baton,
{
struct bump_revisions_baton_t *brb = baton;
svn_wc__db_status_t status;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_error_t *err;
apr_int64_t new_repos_id = INVALID_REPOS_ID;
@@ -9463,7 +9461,9 @@ scan_addition_txn(void *baton,
presence = svn_sqlite__column_token(stmt, 1, presence_map);
/* The starting node should exist normally. */
- if (presence != svn_wc__db_status_normal)
+ op_depth = svn_sqlite__column_int64(stmt, 0);
+ if (op_depth == 0 || (presence != svn_wc__db_status_normal
+ && presence != svn_wc__db_status_incomplete))
/* reset the statement as part of the error generation process */
return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS,
svn_sqlite__reset(stmt),
@@ -9477,11 +9477,15 @@ scan_addition_txn(void *baton,
/* Provide the default status; we'll override as appropriate. */
if (sab->status)
- *sab->status = svn_wc__db_status_added;
+ {
+ if (presence == svn_wc__db_status_normal)
+ *sab->status = svn_wc__db_status_added;
+ else
+ *sab->status = svn_wc__db_status_incomplete;
+ }
/* Calculate the op root local path components */
- op_depth = svn_sqlite__column_int64(stmt, 0);
op_root_relpath = local_relpath;
for (i = (int)relpath_depth(local_relpath); i > op_depth; --i)
@@ -10368,7 +10372,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_wc__db_kind_t kind,
+ svn_kind_t kind,
const char *parent_abspath,
const char *def_local_abspath,
const char *repos_relpath,
@@ -10977,7 +10981,7 @@ svn_wc__db_read_conflicts(const apr_arra
svn_error_t *
-svn_wc__db_read_kind(svn_wc__db_kind_t *kind,
+svn_wc__db_read_kind(svn_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t allow_missing,
@@ -11003,7 +11007,7 @@ svn_wc__db_read_kind(svn_wc__db_kind_t *
{
if (allow_missing)
{
- *kind = svn_wc__db_kind_unknown;
+ *kind = svn_kind_unknown;
SVN_ERR(svn_sqlite__reset(stmt_info));
return SVN_NO_ERROR;
}
@@ -12057,7 +12061,7 @@ svn_wc__db_temp_op_set_new_dir_to_incomp
ibb.repos_uuid = repos_uuid;
ibb.status = svn_wc__db_status_incomplete;
- ibb.kind = svn_wc__db_kind_dir;
+ ibb.kind = svn_kind_dir;
ibb.repos_relpath = repos_relpath;
ibb.revision = revision;
ibb.depth = depth;
Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.h?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/wc_db.h Wed Oct 12 12:38:41 2011
@@ -128,37 +128,6 @@ extern "C" {
typedef struct svn_wc__db_t svn_wc__db_t;
-/* Enum indicating what kind of versioned object we're talking about.
-
- ### KFF: That is, my understanding is that this is *not* an enum
- ### indicating what kind of storage the DB is using, even though
- ### one might think that from its name. Rather, the "svn_wc__db_"
- ### is a generic prefix, and this "_kind_t" type indicates the kind
- ### of something that's being stored in the DB.
-
- ### KFF: Does this overlap too much with what svn_node_kind_t does?
-
- ### gjs: possibly. but that doesn't have a symlink kind. and that
- ### cannot simply be added. it would surprise too much code.
- ### (we could probably create svn_node_kind2_t though)
-*/
-typedef enum svn_wc__db_kind_t {
- /* The node is a directory. */
- svn_wc__db_kind_dir,
-
- /* The node is a file. */
- svn_wc__db_kind_file,
-
- /* The node is a symbolic link. */
- svn_wc__db_kind_symlink,
-
- /* The type of the node is not known, due to its absence, exclusion,
- deletion, or incomplete status. */
- svn_wc__db_kind_unknown,
-
-} svn_wc__db_kind_t;
-
-
/* Enumerated values describing the state of a node. */
typedef enum svn_wc__db_status_t {
/* The node is present and has no known modifications applied to it. */
@@ -630,7 +599,7 @@ svn_wc__db_base_add_excluded_node(svn_wc
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
- svn_wc__db_kind_t kind,
+ svn_kind_t kind,
svn_wc__db_status_t status,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
@@ -661,7 +630,7 @@ svn_wc__db_base_add_not_present_node(svn
const char *repos_root_url,
const char *repos_uuid,
svn_revnum_t revision,
- svn_wc__db_kind_t kind,
+ svn_kind_t kind,
const svn_skel_t *conflict,
const svn_skel_t *work_items,
apr_pool_t *scratch_pool);
@@ -740,7 +709,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_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
const char **repos_root_url,
@@ -763,7 +732,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_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_revnum_t revnum;
const char *repos_relpath;
const char *repos_root_url;
@@ -1148,7 +1117,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_wc__db_kind_t *kind,
+ svn_kind_t *kind,
const char **defining_abspath,
const char **repos_root_url,
@@ -1521,7 +1490,7 @@ svn_wc__db_revert_list_read(svn_boolean_
const char **conflict_working,
const char **prop_reject,
svn_boolean_t *copied_here,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *result_pool,
@@ -1531,7 +1500,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_wc__db_kind_t kind;
+ svn_kind_t kind;
} svn_wc__db_revert_list_copied_child_info_t ;
/* Return in *CHILDREN a list of reverted copied nodes at or within
@@ -1642,7 +1611,7 @@ svn_wc__db_op_set_tree_conflict(svn_wc__
The OUT parameters, and their "not available" values are:
STATUS n/a (always available)
- KIND svn_wc__db_kind_unknown (For ACTUAL only nodes)
+ KIND svn_kind_unknown (For ACTUAL only nodes)
REVISION SVN_INVALID_REVNUM
REPOS_RELPATH NULL
REPOS_ROOT_URL NULL
@@ -1710,8 +1679,8 @@ svn_wc__db_op_set_tree_conflict(svn_wc__
node's revision.
svn_wc__db_status_incomplete
- The BASE or WORKING node is incomplete due to an interrupted
- operation.
+ The BASE is incomplete due to an interrupted operation. An
+ incomplete WORKING node will be svn_wc__db_status_added.
If REVISION is requested, it will be set to the revision of the
unmodified (BASE) node, or to SVN_INVALID_REVNUM if any structural
@@ -1791,7 +1760,7 @@ svn_wc__db_op_set_tree_conflict(svn_wc__
*/
svn_error_t *
svn_wc__db_read_info(svn_wc__db_status_t *status, /* ### derived */
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_revnum_t *revision,
const char **repos_relpath,
const char **repos_root_url,
@@ -1839,7 +1808,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_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_revnum_t revnum;
const char *repos_relpath;
const char *repos_root_url;
@@ -1868,6 +1837,7 @@ struct svn_wc__db_info_t {
svn_boolean_t locked; /* WC directory lock */
svn_wc__db_lock_t *lock; /* Repository file lock */
+ svn_boolean_t incomplete; /* TRUE if a working node is incomplete */
const char *moved_to_abspath; /* Only on op-roots. See svn_wc_status3_t. */
svn_boolean_t moved_here; /* On both op-roots and children. */
@@ -1896,7 +1866,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_wc__db_kind_t kind;
+ svn_kind_t kind;
};
/* When a node is deleted in WORKING, some of its information is no longer
@@ -1915,7 +1885,7 @@ struct svn_wc__db_walker_info_t {
*/
svn_error_t *
svn_wc__db_read_pristine_info(svn_wc__db_status_t *status,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_revnum_t *changed_rev,
apr_time_t *changed_date,
const char **changed_author,
@@ -2122,13 +2092,13 @@ svn_wc__db_read_conflicts(const apr_arra
/* 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_wc__db_kind_unknown is returned.
+ tree and ALLOW_MISSING is TRUE, then svn_kind_unknown is returned.
If the node is missing and ALLOW_MISSING is FALSE, then it will return
SVN_ERR_WC_PATH_NOT_FOUND.
Uses SCRATCH_POOL for temporary allocations. */
svn_error_t *
-svn_wc__db_read_kind(svn_wc__db_kind_t *kind,
+svn_wc__db_read_kind(svn_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t allow_missing,
@@ -2288,7 +2258,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_wc__db_kind_t new_kind,
+ svn_kind_t new_kind,
const char *new_repos_relpath,
svn_revnum_t new_revision,
const apr_hash_t *new_props,
@@ -2441,6 +2411,8 @@ svn_wc__db_scan_base_repos(const char **
ancestor unshadowed BASE node. ORIGINAL_* will indicate the source
of the copy.
+ svn_wc__db_status_incomplete -- this NODE is copied but incomplete.
+
svn_wc__db_status_moved_here -- this NODE arrived as a result of a move.
The root of the moved nodes will be stored in OP_ROOT_ABSPATH.
Similar to the copied state, its parent may be a WORKING node or a
@@ -2656,7 +2628,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_wc__db_kind_t kind,
+ svn_kind_t kind,
const char *parent_abspath,
const char *def_local_abspath,
const char *repos_relpath,
@@ -2784,7 +2756,7 @@ svn_error_t *
svn_wc__db_op_remove_node(svn_wc__db_t *db,
const char *local_abspath,
svn_revnum_t not_present_revision,
- svn_wc__db_kind_t not_present_kind,
+ svn_kind_t not_present_kind,
apr_pool_t *scratch_pool);
/* Remove the WORKING_NODE row of LOCAL_ABSPATH in DB. */
Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/workqueue.c?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/workqueue.c Wed Oct 12 12:38:41 2011
@@ -109,7 +109,7 @@ remove_base_node(svn_wc__db_t *db,
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t base_status, wrk_status;
- svn_wc__db_kind_t base_kind, wrk_kind;
+ svn_kind_t base_kind, wrk_kind;
svn_boolean_t have_base, have_work;
svn_error_t *err;
@@ -148,7 +148,7 @@ remove_base_node(svn_wc__db_t *db,
scratch_pool, scratch_pool));
/* Children first */
- if (base_kind == svn_wc__db_kind_dir
+ if (base_kind == svn_kind_dir
&& base_status == svn_wc__db_status_normal)
{
const apr_array_header_t *children;
@@ -179,12 +179,12 @@ remove_base_node(svn_wc__db_t *db,
&& wrk_status != svn_wc__db_status_excluded)
{
if (wrk_status != svn_wc__db_status_deleted
- && (base_kind == svn_wc__db_kind_file
- || base_kind == svn_wc__db_kind_symlink))
+ && (base_kind == svn_kind_file
+ || base_kind == svn_kind_symlink))
{
SVN_ERR(svn_io_remove_file2(local_abspath, TRUE, scratch_pool));
}
- else if (base_kind == svn_wc__db_kind_dir
+ else if (base_kind == svn_kind_dir
&& wrk_status != svn_wc__db_status_deleted)
{
err = svn_io_dir_remove_nonrecursive(local_abspath, scratch_pool);
@@ -218,7 +218,7 @@ run_base_remove(svn_wc__db_t *db,
const char *local_relpath;
const char *local_abspath;
svn_revnum_t not_present_rev = SVN_INVALID_REVNUM;
- svn_wc__db_kind_t not_present_kind;
+ svn_kind_t not_present_kind;
const char *repos_relpath, *repos_root_url, *repos_uuid;
apr_int64_t val;
@@ -232,7 +232,7 @@ run_base_remove(svn_wc__db_t *db,
not_present_rev = (svn_revnum_t)val;
SVN_ERR(svn_skel__parse_int(&val, arg1->next->next, scratch_pool));
- not_present_kind = (svn_wc__db_kind_t)val;
+ not_present_kind = (svn_kind_t)val;
if (SVN_IS_VALID_REVNUM(not_present_rev))
{
@@ -295,7 +295,7 @@ svn_wc__wq_build_base_remove(svn_skel_t
svn_wc__db_t *db,
const char *local_abspath,
svn_revnum_t not_present_revision,
- svn_wc__db_kind_t not_present_kind,
+ svn_kind_t not_present_kind,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
Modified: subversion/branches/showing-merge-info/subversion/libsvn_wc/workqueue.h
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_wc/workqueue.h?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_wc/workqueue.h (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_wc/workqueue.h Wed Oct 12 12:38:41 2011
@@ -212,7 +212,7 @@ svn_wc__wq_build_base_remove(svn_skel_t
svn_wc__db_t *db,
const char *local_abspath,
svn_revnum_t not_present_revision,
- svn_wc__db_kind_t not_present_kind,
+ svn_kind_t not_present_kind,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
Modified: subversion/branches/showing-merge-info/subversion/svnserve/cyrus_auth.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/svnserve/cyrus_auth.c?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/svnserve/cyrus_auth.c (original)
+++ subversion/branches/showing-merge-info/subversion/svnserve/cyrus_auth.c Wed Oct 12 12:38:41 2011
@@ -105,12 +105,7 @@ static sasl_callback_t callbacks[] =
static svn_error_t *initialize(void *baton, apr_pool_t *pool)
{
int result;
- apr_status_t status;
-
- status = svn_ra_svn__sasl_common_init(pool);
- if (status)
- return svn_error_wrap_apr(status,
- _("Could not initialize the SASL library"));
+ SVN_ERR(svn_ra_svn__sasl_common_init(pool));
/* The second parameter tells SASL to look for a configuration file
named subversion.conf. */
Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/authz_tests.py?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/authz_tests.py Wed Oct 12 12:38:41 2011
@@ -1002,6 +1002,7 @@ def multiple_matches(sbox):
'-m', 'second copy',
root_url, root_url + '/second')
+@Issues(4025,4026)
@Skip(svntest.main.is_ra_type_file)
def wc_wc_copy_revert(sbox):
"wc-to-wc-copy with absent nodes and then revert"
@@ -1044,8 +1045,28 @@ def wc_wc_copy_revert(sbox):
svntest.actions.run_and_verify_svn(None, expected_output, [],
'st', '--verbose', sbox.ospath('A2'))
+
+ # Issue 4025, info SEGV on incomplete working node
+ svntest.actions.run_and_verify_svn(None, None,
+ 'svn: E145000: .*unrecognized node kind',
+ 'info', sbox.ospath('A2/B/E'))
+
+ # Issue 4026, copy assertion on incomplete working node
+ svntest.actions.run_and_verify_svn(None, None,
+ 'svn: E145001: cannot handle node kind',
+ 'cp', sbox.ospath('A2/B'), sbox.ospath('B3'))
+
+ expected_output = svntest.verify.ExpectedOutput(
+ ['A + - 1 jrandom ' + sbox.ospath('B3') + '\n',
+ '! - ? ? ' + sbox.ospath('B3/E') + '\n',
+ ])
+ expected_output.match_all = False
+ svntest.actions.run_and_verify_svn(None, expected_output, [],
+ 'st', '--verbose', sbox.ospath('B3'))
+
svntest.actions.run_and_verify_svn(None, None, [],
- 'revert', '--recursive', sbox.ospath('A2'))
+ 'revert', '--recursive',
+ sbox.ospath('A2'), sbox.ospath('B3'))
expected_status = svntest.actions.get_virginal_state(sbox.wc_dir, 1)
expected_status.remove('A/B/E', 'A/B/E/alpha', 'A/B/E/beta')
Modified: subversion/branches/showing-merge-info/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/tests/cmdline/log_tests.py?rev=1182334&r1=1182333&r2=1182334&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/showing-merge-info/subversion/tests/cmdline/log_tests.py Wed Oct 12 12:38:41 2011
@@ -2028,6 +2028,72 @@ def log_on_nonexistent_path_and_valid_re
svntest.actions.run_and_verify_svn(None, None, expected_error,
'log', '-q', bad_path_default_rev)
+#----------------------------------------------------------------------
+# Test for issue #4022 'svn log -g interprets change in inherited mergeinfo
+# due to move as a merge'.
+@Issue(4022)
+@XFail()
+def merge_sensitive_log_copied_path_inherited_mergeinfo(sbox):
+ "log -g on copied path with inherited mergeinfo"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ wc_disk, wc_status = set_up_branch(sbox, branch_only=True)
+
+ A_path = os.path.join(wc_dir, 'A')
+ gamma_COPY_path = os.path.join(wc_dir, 'A_COPY', 'D', 'gamma')
+ old_gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
+ new_gamma_path = os.path.join(wc_dir, 'A', 'C', 'gamma')
+
+ # r3 - Modify a file (A_COPY/D/gamma) on the branch
+ svntest.main.file_write(gamma_COPY_path, "Branch edit.\n")
+ svntest.main.run_svn(None, 'ci', '-m', 'Branch edit', wc_dir)
+
+ # r4 - Reintegrate A_COPY to A
+ svntest.main.run_svn(None, 'up', wc_dir)
+ svntest.main.run_svn(None, 'merge', '--reintegrate',
+ sbox.repo_url + '/A_COPY', A_path)
+ svntest.main.run_svn(None, 'ci', '-m', 'Reintegrate A_COPY to A', wc_dir)
+
+ # r5 - Move file modified by reintegrate (A/D/gamma to A/C/gamma).
+ svntest.main.run_svn(None, 'move', old_gamma_path, new_gamma_path)
+ svntest.main.run_svn(None, 'ci', '-m', 'Move file', wc_dir)
+
+ # 'svn log -g --stop-on-copy ^/A/C/gamma' hould return *only* r5
+ # Currently this test fails because the change in gamma's inherited
+ # mergeinfo between r4 and r5, due to the move, is understood as a merge:
+ #
+ # >svn log -v -g --stop-on-copy ^^/A/C/gamma
+ # ------------------------------------------------------------------------
+ # r5 | jrandom | 2011-10-11 14:37:57 -0700 (Tue, 11 Oct 2011) | 1 line #
+ # Changed paths:
+ # A /A/C/gamma (from /A/D/gamma:4)
+ # D /A/D/gamma
+ #
+ # Move file
+ # ------------------------------------------------------------------------
+ # r3 | jrandom | 2011-10-11 14:37:56 -0700 (Tue, 11 Oct 2011) | 1 line
+ # Changed paths:
+ # M /A_COPY/D/gamma
+ # Reverse merged via: r5
+ #
+ # Branch edit
+ # ------------------------------------------------------------------------
+ # r2 | jrandom | 2011-10-11 14:37:56 -0700 (Tue, 11 Oct 2011) | 1 line
+ # Changed paths:
+ # A /A_COPY (from /A:1)
+ # Reverse merged via: r5
+ #
+ # log msg
+ # ------------------------------------------------------------------------
+ expected_merges = {5 : []}
+ svntest.main.run_svn(None, 'up', wc_dir)
+ exit_code, out, err = svntest.actions.run_and_verify_svn(
+ None, None, [], 'log', '-g', '--stop-on-copy',
+ sbox.repo_url + '/A/C/gamma')
+ log_chain = parse_log_output(out)
+ check_merge_results(log_chain, expected_merges)
+
########################################################################
# Run the tests
@@ -2067,6 +2133,7 @@ test_list = [ None,
merge_sensitive_log_ignores_cyclic_merges,
log_with_unrelated_peg_and_operative_revs,
log_on_nonexistent_path_and_valid_rev,
+ merge_sensitive_log_copied_path_inherited_mergeinfo,
]
if __name__ == '__main__':