You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/10/13 16:30:10 UTC
svn commit: r1182877 [4/5] - in /subversion/branches/fs-py: ./
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/tigris/subversion/javahl/
subversion/bindings/javahl/tests/org/apache/subversion/javahl/
subversion/include/ subversion...
Modified: subversion/branches/fs-py/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/entries.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/entries.c Thu Oct 13 14:30:07 2011
@@ -61,7 +61,7 @@ typedef struct db_node_t {
const char *parent_relpath;
svn_wc__db_status_t presence;
svn_revnum_t revision;
- svn_node_kind_t kind; /* ### should switch to svn_wc__db_kind_t */
+ svn_node_kind_t kind; /* ### should switch to svn_kind_t */
svn_checksum_t *checksum;
svn_filesize_t translated_size;
svn_revnum_t changed_rev;
@@ -148,7 +148,7 @@ check_file_external(svn_wc_entry_t *entr
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
const char *repos_relpath;
svn_revnum_t peg_revision;
svn_revnum_t revision;
@@ -169,7 +169,7 @@ check_file_external(svn_wc_entry_t *entr
}
if (status == svn_wc__db_status_normal
- && kind == svn_wc__db_kind_file)
+ && kind == svn_kind_file)
{
entry->file_external_path = repos_relpath;
if (SVN_IS_VALID_REVNUM(peg_revision))
@@ -204,7 +204,7 @@ check_file_external(svn_wc_entry_t *entr
*/
static svn_error_t *
get_info_for_deleted(svn_wc_entry_t *entry,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
const char **repos_relpath,
const svn_checksum_t **checksum,
svn_wc__db_t *db,
@@ -384,7 +384,7 @@ read_one_entry(const svn_wc_entry_t **ne
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_wc__db_status_t status;
svn_wc__db_lock_t *lock;
const char *repos_relpath;
@@ -840,11 +840,11 @@ read_one_entry(const svn_wc_entry_t **ne
if (entry->depth == svn_depth_unknown)
entry->depth = svn_depth_infinity;
- if (kind == svn_wc__db_kind_dir)
+ if (kind == svn_kind_dir)
entry->kind = svn_node_dir;
- else if (kind == svn_wc__db_kind_file)
+ else if (kind == svn_kind_file)
entry->kind = svn_node_file;
- else if (kind == svn_wc__db_kind_symlink)
+ else if (kind == svn_kind_symlink)
entry->kind = svn_node_file; /* ### no symlink kind */
else
entry->kind = svn_node_unknown;
@@ -926,7 +926,7 @@ read_one_entry(const svn_wc_entry_t **ne
/* Let's check for a file external. ugh. */
if (status == svn_wc__db_status_normal
- && kind == svn_wc__db_kind_file)
+ && kind == svn_kind_file)
SVN_ERR(check_file_external(entry, db, entry_abspath, dir_abspath,
result_pool, scratch_pool));
@@ -2500,7 +2500,7 @@ svn_wc_walk_entries3(const char *path,
const char *local_abspath;
svn_wc__db_t *db = svn_wc__adm_get_db(adm_access);
svn_error_t *err;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_depth_t depth;
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
@@ -2524,7 +2524,7 @@ svn_wc_walk_entries3(const char *path,
walk_baton, pool);
}
- if (kind == svn_wc__db_kind_file || depth == svn_depth_exclude)
+ if (kind == svn_kind_file || depth == svn_depth_exclude)
{
const svn_wc_entry_t *entry;
@@ -2566,7 +2566,7 @@ svn_wc_walk_entries3(const char *path,
return SVN_NO_ERROR;
}
- if (kind == svn_wc__db_kind_dir)
+ if (kind == svn_kind_dir)
return walker_helper(path, adm_access, walk_callbacks, walk_baton,
walk_depth, show_hidden, cancel_func, cancel_baton,
pool);
Modified: subversion/branches/fs-py/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/externals.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/externals.c Thu Oct 13 14:30:07 2011
@@ -442,7 +442,7 @@ open_file(const char *path,
void **file_baton)
{
struct edit_baton *eb = parent_baton;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
if (strcmp(path, eb->name))
return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
_("This editor can only update '%s'"),
@@ -458,7 +458,7 @@ open_file(const char *path,
eb->db, eb->local_abspath,
eb->pool, file_pool));
- if (kind != svn_wc__db_kind_file)
+ if (kind != svn_kind_file)
return svn_error_createf(SVN_ERR_WC_PATH_UNEXPECTED_STATUS, NULL,
_("Node '%s' is no existing file external"),
svn_dirent_local_style(eb->local_abspath,
@@ -670,7 +670,7 @@ close_file(void *file_baton,
&new_pristine_props,
&new_actual_props,
eb->db, eb->local_abspath,
- svn_wc__db_kind_file,
+ svn_kind_file,
NULL, NULL,
NULL /* server_baseprops*/,
base_props,
@@ -956,7 +956,7 @@ svn_wc__crawl_file_external(svn_wc_conte
{
svn_wc__db_t *db = wc_ctx->db;
svn_error_t *err;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_wc__db_lock_t *lock;
svn_revnum_t revision;
const char *repos_root_url;
@@ -971,7 +971,7 @@ svn_wc__crawl_file_external(svn_wc_conte
scratch_pool, scratch_pool);
if (err
- || kind == svn_wc__db_kind_dir
+ || kind == svn_kind_dir
|| !update_root)
{
if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
@@ -1055,7 +1055,7 @@ svn_wc__read_external_info(svn_node_kind
{
const char *repos_root_url;
svn_wc__db_status_t status;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_error_t *err;
err = svn_wc__db_external_read(&status, &kind, defining_abspath,
@@ -1097,11 +1097,11 @@ svn_wc__read_external_info(svn_node_kind
else
switch(kind)
{
- case svn_wc__db_kind_file:
- case svn_wc__db_kind_symlink:
+ case svn_kind_file:
+ case svn_kind_symlink:
*external_kind = svn_node_file;
break;
- case svn_wc__db_kind_dir:
+ case svn_kind_dir:
*external_kind = svn_node_dir;
break;
default:
@@ -1164,7 +1164,7 @@ svn_wc__external_remove(svn_wc_context_t
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
SVN_ERR(svn_wc__db_external_read(&status, &kind, NULL, NULL, NULL, NULL,
NULL, NULL,
@@ -1174,7 +1174,7 @@ svn_wc__external_remove(svn_wc_context_t
SVN_ERR(svn_wc__db_external_remove(wc_ctx->db, local_abspath, wri_abspath,
NULL, scratch_pool));
- if (kind == svn_wc__db_kind_dir)
+ if (kind == svn_kind_dir)
SVN_ERR(svn_wc_remove_from_revision_control2(wc_ctx, local_abspath,
TRUE, FALSE,
cancel_func, cancel_baton,
Modified: subversion/branches/fs-py/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/info.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/info.c Thu Oct 13 14:30:07 2011
@@ -86,7 +86,7 @@ build_info_for_node(svn_wc__info2_t **in
svn_wc__info2_t *tmpinfo;
const char *repos_relpath;
svn_wc__db_status_t status;
- svn_wc__db_kind_t db_kind;
+ svn_kind_t db_kind;
const char *original_repos_relpath;
const char *original_repos_root_url;
const char *original_uuid;
Modified: subversion/branches/fs-py/subversion/libsvn_wc/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/lock.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/lock.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/lock.c Thu Oct 13 14:30:07 2011
@@ -122,64 +122,64 @@ svn_wc__internal_check_wc(int *wc_format
}
}
- if (*wc_format >= SVN_WC__WC_NG_VERSION)
- {
- svn_wc__db_status_t db_status;
- svn_wc__db_kind_t db_kind;
-
- if (check_path)
- {
- /* If a node is not a directory, it is not a working copy
- directory. This allows creating new working copies as
- a path below an existing working copy. */
- svn_node_kind_t wc_kind;
-
- SVN_ERR(svn_io_check_path(local_abspath, &wc_kind, scratch_pool));
- if (wc_kind != svn_node_dir)
- {
- *wc_format = 0; /* Not a directory, so not a wc-directory */
- return SVN_NO_ERROR;
- }
- }
-
- err = svn_wc__db_read_info(&db_status, &db_kind, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL,
- db, local_abspath,
- scratch_pool, scratch_pool);
+ if (*wc_format >= SVN_WC__WC_NG_VERSION)
+ {
+ svn_wc__db_status_t db_status;
+ svn_kind_t db_kind;
- if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
- {
- svn_error_clear(err);
- *wc_format = 0;
- return SVN_NO_ERROR;
- }
- else
- SVN_ERR(err);
-
- if (db_kind != svn_wc__db_kind_dir)
- {
- /* The WC thinks there must be a file, so this is not
- a wc-directory */
- *wc_format = 0;
- return SVN_NO_ERROR;
- }
+ if (check_path)
+ {
+ /* If a node is not a directory, it is not a working copy
+ directory. This allows creating new working copies as
+ a path below an existing working copy. */
+ svn_node_kind_t wc_kind;
- switch (db_status)
- {
- case svn_wc__db_status_not_present:
- case svn_wc__db_status_server_excluded:
- case svn_wc__db_status_excluded:
- /* If there is a directory here, it is not related to the parent
- working copy: Obstruction */
- *wc_format = 0;
+ SVN_ERR(svn_io_check_path(local_abspath, &wc_kind, scratch_pool));
+ if (wc_kind != svn_node_dir)
+ {
+ *wc_format = 0; /* Not a directory, so not a wc-directory */
return SVN_NO_ERROR;
- default:
- break;
- }
- }
+ }
+ }
+
+ err = svn_wc__db_read_info(&db_status, &db_kind, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool);
+
+ if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ svn_error_clear(err);
+ *wc_format = 0;
+ return SVN_NO_ERROR;
+ }
+ else
+ SVN_ERR(err);
+
+ if (db_kind != svn_kind_dir)
+ {
+ /* The WC thinks there must be a file, so this is not
+ a wc-directory */
+ *wc_format = 0;
+ return SVN_NO_ERROR;
+ }
+
+ switch (db_status)
+ {
+ case svn_wc__db_status_not_present:
+ case svn_wc__db_status_server_excluded:
+ case svn_wc__db_status_excluded:
+ /* If there is a directory here, it is not related to the parent
+ working copy: Obstruction */
+ *wc_format = 0;
+ return SVN_NO_ERROR;
+ default:
+ break;
+ }
+ }
return SVN_NO_ERROR;
}
@@ -593,7 +593,7 @@ open_single(svn_wc_adm_access_t **adm_ac
### adminstrative area. */
static svn_error_t *
adm_available(svn_boolean_t *available,
- svn_wc__db_kind_t *kind,
+ svn_kind_t *kind,
svn_wc__db_t *db,
const char *local_abspath,
apr_pool_t *scratch_pool)
@@ -601,7 +601,7 @@ adm_available(svn_boolean_t *available,
svn_wc__db_status_t status;
if (kind)
- *kind = svn_wc__db_kind_unknown;
+ *kind = svn_kind_unknown;
SVN_ERR(svn_wc__db_read_info(&status, kind, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
@@ -659,7 +659,7 @@ do_open(svn_wc_adm_access_t **adm_access
for (i = 0; i < children->nelts; i++)
{
const char *node_abspath;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_boolean_t available;
const char *name = APR_ARRAY_IDX(children, i, const char *);
@@ -677,7 +677,7 @@ do_open(svn_wc_adm_access_t **adm_access
node_abspath,
scratch_pool));
- if (kind != svn_wc__db_kind_dir)
+ if (kind != svn_kind_dir)
continue;
if (available)
@@ -885,7 +885,7 @@ svn_wc_adm_retrieve(svn_wc_adm_access_t
apr_pool_t *pool)
{
const char *local_abspath;
- svn_wc__db_kind_t kind = svn_wc__db_kind_unknown;
+ svn_kind_t kind = svn_kind_unknown;
svn_node_kind_t wckind;
svn_error_t *err;
@@ -924,12 +924,12 @@ svn_wc_adm_retrieve(svn_wc_adm_access_t
if (err)
{
- kind = svn_wc__db_kind_unknown;
+ kind = svn_kind_unknown;
svn_error_clear(err);
}
}
- if (kind == svn_wc__db_kind_dir && wckind == svn_node_file)
+ if (kind == svn_kind_dir && wckind == svn_node_file)
{
err = svn_error_createf(
SVN_ERR_WC_NOT_WORKING_COPY, NULL,
@@ -939,7 +939,7 @@ svn_wc_adm_retrieve(svn_wc_adm_access_t
return svn_error_create(SVN_ERR_WC_NOT_LOCKED, err, err->message);
}
- if (kind != svn_wc__db_kind_dir && kind != svn_wc__db_kind_unknown)
+ if (kind != svn_kind_dir && kind != svn_kind_unknown)
{
err = svn_error_createf(
SVN_ERR_WC_NOT_WORKING_COPY, NULL,
@@ -949,7 +949,7 @@ svn_wc_adm_retrieve(svn_wc_adm_access_t
return svn_error_create(SVN_ERR_WC_NOT_LOCKED, err, err->message);
}
- if (kind == svn_wc__db_kind_unknown || wckind == svn_node_none)
+ if (kind == svn_kind_unknown || wckind == svn_node_none)
{
err = svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
_("Directory '%s' is missing"),
@@ -974,7 +974,7 @@ svn_wc_adm_probe_retrieve(svn_wc_adm_acc
{
const char *dir;
const char *local_abspath;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_error_t *err;
SVN_ERR_ASSERT(associated != NULL);
@@ -982,9 +982,9 @@ svn_wc_adm_probe_retrieve(svn_wc_adm_acc
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
SVN_ERR(svn_wc__db_read_kind(&kind, associated->db, local_abspath, TRUE, pool));
- if (kind == svn_wc__db_kind_dir)
+ if (kind == svn_kind_dir)
dir = path;
- else if (kind != svn_wc__db_kind_unknown)
+ else if (kind != svn_kind_unknown)
dir = svn_dirent_dirname(path, pool);
else
/* Not a versioned item, probe it */
@@ -1284,7 +1284,7 @@ open_anchor(svn_wc_adm_access_t **anchor
if (! t_access)
{
svn_boolean_t available;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
err = adm_available(&available, &kind, db, local_abspath, pool);
@@ -1511,14 +1511,14 @@ svn_wc__acquire_write_lock(const char **
apr_pool_t *scratch_pool)
{
svn_wc__db_t *db = wc_ctx->db;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_error_t *err;
SVN_ERR(svn_wc__db_read_kind(&kind, wc_ctx->db, local_abspath,
(lock_root_abspath != NULL),
scratch_pool));
- if (!lock_root_abspath && kind != svn_wc__db_kind_dir)
+ if (!lock_root_abspath && kind != svn_kind_dir)
return svn_error_createf(SVN_ERR_WC_NOT_DIRECTORY, NULL,
_("Can't obtain lock on non-directory '%s'."),
svn_dirent_local_style(local_abspath,
@@ -1527,7 +1527,7 @@ svn_wc__acquire_write_lock(const char **
if (lock_anchor)
{
const char *parent_abspath;
- svn_wc__db_kind_t parent_kind;
+ svn_kind_t parent_kind;
SVN_ERR_ASSERT(lock_root_abspath != NULL);
@@ -1537,12 +1537,12 @@ svn_wc__acquire_write_lock(const char **
if (err && SVN_WC__ERR_IS_NOT_CURRENT_WC(err))
{
svn_error_clear(err);
- parent_kind = svn_wc__db_kind_unknown;
+ parent_kind = svn_kind_unknown;
}
else
SVN_ERR(err);
- if (kind == svn_wc__db_kind_dir && parent_kind == svn_wc__db_kind_dir)
+ if (kind == svn_kind_dir && parent_kind == svn_kind_dir)
{
svn_boolean_t disjoint;
SVN_ERR(child_is_disjoint(&disjoint, wc_ctx->db, local_abspath,
@@ -1550,25 +1550,25 @@ svn_wc__acquire_write_lock(const char **
if (!disjoint)
local_abspath = parent_abspath;
}
- else if (parent_kind == svn_wc__db_kind_dir)
+ else if (parent_kind == svn_kind_dir)
local_abspath = parent_abspath;
- else if (kind != svn_wc__db_kind_dir)
+ else if (kind != svn_kind_dir)
return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
_("'%s' is not a working copy"),
svn_dirent_local_style(local_abspath,
scratch_pool));
}
- else if (kind != svn_wc__db_kind_dir)
+ else if (kind != svn_kind_dir)
{
local_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
/* Can't lock parents that don't exist */
- if (kind == svn_wc__db_kind_unknown)
+ if (kind == svn_kind_unknown)
{
SVN_ERR(svn_wc__db_read_kind(&kind, db, local_abspath, FALSE,
scratch_pool));
- if (kind != svn_wc__db_kind_dir)
+ if (kind != svn_kind_dir)
return svn_error_createf(
SVN_ERR_WC_NOT_DIRECTORY, NULL,
_("Can't obtain lock on non-directory '%s'."),
Modified: subversion/branches/fs-py/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/merge.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/merge.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/merge.c Thu Oct 13 14:30:07 2011
@@ -924,6 +924,77 @@ maybe_resolve_conflicts(svn_skel_t **wor
return SVN_NO_ERROR;
}
+
+/* Attempt a trivial merge of LEFT_ABSPATH and RIGHT_ABSPATH to TARGET_ABSPATH.
+ * The merge is trivial if the file at LEFT_ABSPATH equals TARGET_ABSPATH,
+ * because in this case the content of RIGHT_ABSPATH can be copied to the
+ * target. On success, set *MERGE_OUTCOME to SVN_WC_MERGE_MERGED in case the
+ * target was changed, or to SVN_WC_MERGE_UNCHANGED if the target was not
+ * changed. Install work queue items allocated in RESULT_POOL in *WORK_ITEMS.
+ * On failure, set *MERGE_OUTCOME to SVN_WC_MERGE_NO_MERGE. */
+static svn_error_t *
+merge_file_trivial(svn_skel_t **work_items,
+ enum svn_wc_merge_outcome_t *merge_outcome,
+ const char *left_abspath,
+ const char *right_abspath,
+ const char *target_abspath,
+ svn_boolean_t dry_run,
+ svn_wc__db_t *db,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_skel_t *work_item;
+ svn_boolean_t same_contents = FALSE;
+ svn_node_kind_t kind;
+ svn_boolean_t is_special;
+
+ /* If the target is not a normal file, do not attempt a trivial merge. */
+ SVN_ERR(svn_io_check_special_path(target_abspath, &kind, &is_special,
+ scratch_pool));
+ if (kind != svn_node_file || is_special)
+ {
+ *merge_outcome = svn_wc_merge_no_merge;
+ return SVN_NO_ERROR;
+ }
+
+ /* If the LEFT side of the merge is equal to WORKING, then we can
+ * copy RIGHT directly. */
+ SVN_ERR(svn_io_files_contents_same_p(&same_contents, left_abspath,
+ target_abspath, scratch_pool));
+ if (same_contents)
+ {
+ /* Check whether the left side equals the right side.
+ * If it does, there is no change to merge so we leave the target
+ * unchanged. */
+ SVN_ERR(svn_io_files_contents_same_p(&same_contents, left_abspath,
+ right_abspath, scratch_pool));
+ if (same_contents)
+ {
+ *merge_outcome = svn_wc_merge_unchanged;
+ }
+ else
+ {
+ *merge_outcome = svn_wc_merge_merged;
+ if (!dry_run)
+ {
+ SVN_ERR(svn_wc__wq_build_file_install(
+ &work_item, db, target_abspath, right_abspath,
+ FALSE /* use_commit_times */,
+ FALSE /* record_fileinfo */,
+ result_pool, scratch_pool));
+ *work_items = svn_wc__wq_merge(*work_items, work_item,
+ result_pool);
+ }
+ }
+
+ return SVN_NO_ERROR;
+ }
+
+ *merge_outcome = svn_wc_merge_no_merge;
+ return SVN_NO_ERROR;
+}
+
+
/* XXX Insane amount of parameters... */
static svn_error_t*
merge_text_file(svn_skel_t **work_items,
@@ -1112,37 +1183,15 @@ merge_binary_file(svn_skel_t **work_item
const char *merge_dirpath, *merge_filename;
const char *conflict_wrk;
svn_skel_t *work_item;
- svn_boolean_t same_contents = FALSE;
*work_items = NULL;
svn_dirent_split(&merge_dirpath, &merge_filename, mt->local_abspath, pool);
- /* Attempt to merge the binary file. At the moment, we can only
- handle the special case: if the LEFT side of the merge is equal
- to WORKING, then we can copy RIGHT directly. */
- SVN_ERR(svn_io_files_contents_same_p(&same_contents,
- left_abspath,
- mt->local_abspath,
- scratch_pool));
-
- if (same_contents)
- {
- if (!dry_run)
- {
- SVN_ERR(svn_wc__wq_build_file_install(&work_item,
- mt->db, mt->local_abspath,
- right_abspath,
- FALSE /* use_commit_times */,
- FALSE /* record_fileinfo */,
- result_pool, scratch_pool));
- *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
- }
+ /* If we get here the binary files differ. Because we don't know how
+ * to merge binary files in a non-trivial way we always flag a conflict. */
- *merge_outcome = svn_wc_merge_merged;
- return SVN_NO_ERROR;
- }
- else if (dry_run)
+ if (dry_run)
{
*merge_outcome = svn_wc_merge_conflict;
return SVN_NO_ERROR;
@@ -1367,41 +1416,48 @@ svn_wc__internal_merge(svn_skel_t **work
cancel_func, cancel_baton,
scratch_pool, scratch_pool));
- if (is_binary)
- {
- SVN_ERR(merge_binary_file(work_items,
- merge_outcome,
- &mt,
- left_abspath,
- right_abspath,
- left_label,
- right_label,
- target_label,
- dry_run,
- left_version,
- right_version,
- detranslated_target_abspath,
- conflict_func,
- conflict_baton,
- result_pool, scratch_pool));
- }
- else
+ SVN_ERR(merge_file_trivial(work_items, merge_outcome,
+ left_abspath, right_abspath,
+ target_abspath, dry_run, db,
+ result_pool, scratch_pool));
+ if (*merge_outcome == svn_wc_merge_no_merge)
{
- SVN_ERR(merge_text_file(work_items,
- merge_outcome,
- &mt,
- left_abspath,
- right_abspath,
- left_label,
- right_label,
- target_label,
- dry_run,
- left_version,
- right_version,
- detranslated_target_abspath,
- conflict_func, conflict_baton,
- cancel_func, cancel_baton,
- result_pool, scratch_pool));
+ if (is_binary)
+ {
+ SVN_ERR(merge_binary_file(work_items,
+ merge_outcome,
+ &mt,
+ left_abspath,
+ right_abspath,
+ left_label,
+ right_label,
+ target_label,
+ dry_run,
+ left_version,
+ right_version,
+ detranslated_target_abspath,
+ conflict_func,
+ conflict_baton,
+ result_pool, scratch_pool));
+ }
+ else
+ {
+ SVN_ERR(merge_text_file(work_items,
+ merge_outcome,
+ &mt,
+ left_abspath,
+ right_abspath,
+ left_label,
+ right_label,
+ target_label,
+ dry_run,
+ left_version,
+ right_version,
+ detranslated_target_abspath,
+ conflict_func, conflict_baton,
+ cancel_func, cancel_baton,
+ result_pool, scratch_pool));
+ }
}
/* Merging is complete. Regardless of text or binariness, we might
@@ -1456,12 +1512,12 @@ svn_wc_merge4(enum svn_wc_merge_outcome_
* unless the merge target is a copyfrom text, which lives in a
* temporary file and does not exist in ACTUAL yet. */
{
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
svn_boolean_t hidden;
SVN_ERR(svn_wc__db_read_kind(&kind, wc_ctx->db, target_abspath, TRUE,
scratch_pool));
- if (kind == svn_wc__db_kind_unknown)
+ if (kind == svn_kind_unknown)
{
*merge_outcome = svn_wc_merge_no_merge;
return SVN_NO_ERROR;
Modified: subversion/branches/fs-py/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/node.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/node.c Thu Oct 13 14:30:07 2011
@@ -235,28 +235,28 @@ svn_wc__node_get_repos_info(const char *
* even if DB_STATUS indicates that the node is hidden.
* Else, return svn_kind_none for such nodes.
*
- * ### This is a bit ugly. We should consider promoting svn_wc__db_kind_t
+ * ### This is a bit ugly. We should consider promoting svn_kind_t
* ### to the de-facto node kind type instead of converting between them
* ### in non-backwards compat code.
- * ### See also comments at the definition of svn_wc__db_kind_t. */
+ * ### See also comments at the definition of svn_kind_t. */
static svn_error_t *
convert_db_kind_to_node_kind(svn_node_kind_t *node_kind,
- svn_wc__db_kind_t db_kind,
+ svn_kind_t db_kind,
svn_wc__db_status_t db_status,
svn_boolean_t show_hidden)
{
switch (db_kind)
{
- case svn_wc__db_kind_file:
+ case svn_kind_file:
*node_kind = svn_node_file;
break;
- case svn_wc__db_kind_dir:
+ case svn_kind_dir:
*node_kind = svn_node_dir;
break;
- case svn_wc__db_kind_symlink:
+ case svn_kind_symlink:
*node_kind = svn_node_file;
break;
- case svn_wc__db_kind_unknown:
+ case svn_kind_unknown:
*node_kind = svn_node_unknown;
break;
default:
@@ -287,7 +287,7 @@ svn_wc_read_kind(svn_node_kind_t *kind,
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t db_status;
- svn_wc__db_kind_t db_kind;
+ svn_kind_t db_kind;
svn_error_t *err;
err = svn_wc__db_read_info(&db_status, &db_kind, NULL, NULL, NULL, NULL,
@@ -603,7 +603,7 @@ walker_helper(svn_wc__db_t *db,
{
const char *child_name = svn__apr_hash_index_key(hi);
struct svn_wc__db_walker_info_t *wi = svn__apr_hash_index_val(hi);
- svn_wc__db_kind_t child_kind = wi->kind;
+ svn_kind_t child_kind = wi->kind;
svn_wc__db_status_t child_status = wi->status;
const char *child_abspath;
@@ -627,7 +627,7 @@ walker_helper(svn_wc__db_t *db,
}
/* Return the child, if appropriate. */
- if ( (child_kind == svn_wc__db_kind_file
+ if ( (child_kind == svn_kind_file
|| depth >= svn_depth_immediates)
&& svn_wc__internal_changelist_match(db, child_abspath,
changelist_filter,
@@ -646,7 +646,7 @@ walker_helper(svn_wc__db_t *db,
}
/* Recurse into this directory, if appropriate. */
- if (child_kind == svn_wc__db_kind_dir
+ if (child_kind == svn_kind_dir
&& depth >= svn_depth_immediates)
{
svn_depth_t depth_below_here = depth;
@@ -681,7 +681,7 @@ svn_wc__internal_walk_children(svn_wc__d
void *cancel_baton,
apr_pool_t *scratch_pool)
{
- svn_wc__db_kind_t db_kind;
+ svn_kind_t db_kind;
svn_node_kind_t kind;
svn_wc__db_status_t status;
apr_hash_t *changelist_hash = NULL;
@@ -706,13 +706,13 @@ svn_wc__internal_walk_children(svn_wc__d
changelist_hash, scratch_pool))
SVN_ERR(walk_callback(local_abspath, kind, walk_baton, scratch_pool));
- if (db_kind == svn_wc__db_kind_file
+ if (db_kind == svn_kind_file
|| status == svn_wc__db_status_not_present
|| status == svn_wc__db_status_excluded
|| status == svn_wc__db_status_server_excluded)
return SVN_NO_ERROR;
- if (db_kind == svn_wc__db_kind_dir)
+ if (db_kind == svn_kind_dir)
{
return svn_error_trace(
walker_helper(db, local_abspath, show_hidden, changelist_hash,
@@ -1493,7 +1493,7 @@ svn_wc__node_get_commit_status(svn_node_
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- svn_wc__db_kind_t db_kind;
+ svn_kind_t db_kind;
svn_wc__db_lock_t *lock;
svn_boolean_t had_props;
svn_boolean_t props_mod_tmp;
@@ -1517,9 +1517,9 @@ svn_wc__node_get_commit_status(svn_node_
if (kind)
{
- if (db_kind == svn_wc__db_kind_file)
+ if (db_kind == svn_kind_file)
*kind = svn_node_file;
- else if (db_kind == svn_wc__db_kind_dir)
+ else if (db_kind == svn_kind_dir)
*kind = svn_node_dir;
else
*kind = svn_node_unknown;
@@ -1552,7 +1552,7 @@ svn_wc__node_get_commit_status(svn_node_
apr_hash_t *props;
*symlink = FALSE;
- if (db_kind == svn_wc__db_kind_file
+ if (db_kind == svn_kind_file
&& (had_props || *props_mod))
{
SVN_ERR(svn_wc__db_read_props(&props, wc_ctx->db, local_abspath,
@@ -1653,7 +1653,7 @@ svn_wc__check_for_obstructions(svn_wc_no
apr_pool_t *scratch_pool)
{
svn_wc__db_status_t status;
- svn_wc__db_kind_t db_kind;
+ svn_kind_t db_kind;
svn_node_kind_t disk_kind;
svn_error_t *err;
@@ -1703,7 +1703,7 @@ svn_wc__check_for_obstructions(svn_wc_no
else
SVN_ERR(err);
- if (db_kind != svn_wc__db_kind_dir
+ if (db_kind != svn_kind_dir
|| (status != svn_wc__db_status_normal
&& status != svn_wc__db_status_added))
{
@@ -1718,7 +1718,7 @@ svn_wc__check_for_obstructions(svn_wc_no
/* Check for obstructing working copies */
if (!no_wcroot_check
- && db_kind == svn_wc__db_kind_dir
+ && db_kind == svn_kind_dir
&& status == svn_wc__db_status_normal)
{
svn_boolean_t is_root;
Modified: subversion/branches/fs-py/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/props.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/props.c Thu Oct 13 14:30:07 2011
@@ -167,7 +167,8 @@ combine_mergeinfo_props(const svn_string
SVN_ERR(svn_mergeinfo_parse(&mergeinfo1, prop_val1->data, scratch_pool));
SVN_ERR(svn_mergeinfo_parse(&mergeinfo2, prop_val2->data, scratch_pool));
- SVN_ERR(svn_mergeinfo_merge(mergeinfo1, mergeinfo2, scratch_pool));
+ SVN_ERR(svn_mergeinfo_merge2(mergeinfo1, mergeinfo2, scratch_pool,
+ scratch_pool));
SVN_ERR(svn_mergeinfo_to_string(&mergeinfo_string, mergeinfo1, result_pool));
*output = mergeinfo_string;
return SVN_NO_ERROR;
@@ -181,27 +182,33 @@ combine_forked_mergeinfo_props(const svn
const svn_string_t *from_prop_val,
const svn_string_t *working_prop_val,
const svn_string_t *to_prop_val,
- apr_pool_t *pool)
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
svn_mergeinfo_t from_mergeinfo, l_deleted, l_added, r_deleted, r_added;
svn_string_t *mergeinfo_string;
/* ### OPTIMIZE: Use from_mergeinfo when diff'ing. */
SVN_ERR(diff_mergeinfo_props(&l_deleted, &l_added, from_prop_val,
- working_prop_val, pool));
+ working_prop_val, scratch_pool));
SVN_ERR(diff_mergeinfo_props(&r_deleted, &r_added, from_prop_val,
- to_prop_val, pool));
- SVN_ERR(svn_mergeinfo_merge(l_deleted, r_deleted, pool));
- SVN_ERR(svn_mergeinfo_merge(l_added, r_added, pool));
+ to_prop_val, scratch_pool));
+ SVN_ERR(svn_mergeinfo_merge2(l_deleted, r_deleted,
+ scratch_pool, scratch_pool));
+ SVN_ERR(svn_mergeinfo_merge2(l_added, r_added,
+ scratch_pool, scratch_pool));
/* Apply the combined deltas to the base. */
- SVN_ERR(svn_mergeinfo_parse(&from_mergeinfo, from_prop_val->data, pool));
- SVN_ERR(svn_mergeinfo_merge(from_mergeinfo, l_added, pool));
+ SVN_ERR(svn_mergeinfo_parse(&from_mergeinfo, from_prop_val->data,
+ scratch_pool));
+ SVN_ERR(svn_mergeinfo_merge2(from_mergeinfo, l_added,
+ scratch_pool, scratch_pool));
- SVN_ERR(svn_mergeinfo_remove2(&from_mergeinfo, l_deleted,
- from_mergeinfo, TRUE, pool, pool));
+ SVN_ERR(svn_mergeinfo_remove2(&from_mergeinfo, l_deleted, from_mergeinfo,
+ TRUE, scratch_pool, scratch_pool));
- SVN_ERR(svn_mergeinfo_to_string(&mergeinfo_string, from_mergeinfo, pool));
+ SVN_ERR(svn_mergeinfo_to_string(&mergeinfo_string, from_mergeinfo,
+ result_pool));
*output = mergeinfo_string;
return SVN_NO_ERROR;
}
@@ -225,7 +232,7 @@ svn_wc__perform_props_merge(svn_wc_notif
{
int i;
svn_wc__db_status_t status;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
apr_hash_t *pristine_props = NULL;
apr_hash_t *actual_props = NULL;
apr_hash_t *new_pristine_props;
@@ -315,7 +322,7 @@ svn_wc__perform_props_merge(svn_wc_notif
{
const char *dir_abspath;
- if (kind == svn_wc__db_kind_dir)
+ if (kind == svn_kind_dir)
dir_abspath = local_abspath;
else
dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
@@ -1296,7 +1303,8 @@ apply_single_mergeinfo_prop_change(svn_w
SVN_ERR(combine_forked_mergeinfo_props(&new_val, old_val,
working_val,
new_val,
- result_pool));
+ result_pool,
+ scratch_pool));
apr_hash_set(working_props, propname,
APR_HASH_KEY_STRING, new_val);
set_prop_merge_state(state, svn_wc_notify_state_merged);
@@ -1348,7 +1356,8 @@ apply_single_mergeinfo_prop_change(svn_w
them to base to get the new value. */
SVN_ERR(combine_forked_mergeinfo_props(&new_val, old_val,
working_val,
- new_val, result_pool));
+ new_val, result_pool,
+ scratch_pool));
apr_hash_set(working_props, propname,
APR_HASH_KEY_STRING, new_val);
set_prop_merge_state(state, svn_wc_notify_state_merged);
@@ -1532,7 +1541,7 @@ svn_wc__merge_props(svn_skel_t **work_it
apr_hash_t **new_actual_props,
svn_wc__db_t *db,
const char *local_abspath,
- svn_wc__db_kind_t kind,
+ svn_kind_t kind,
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
apr_hash_t *server_baseprops,
@@ -1561,7 +1570,7 @@ svn_wc__merge_props(svn_skel_t **work_it
*new_pristine_props = NULL;
*new_actual_props = NULL;
- is_dir = (kind == svn_wc__db_kind_dir);
+ is_dir = (kind == svn_kind_dir);
if (!server_baseprops)
server_baseprops = pristine_props;
@@ -2421,7 +2430,7 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
apr_pool_t *scratch_pool)
{
enum svn_prop_kind prop_kind = svn_property_kind(NULL, name);
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
const char *dir_abspath;
/* we don't do entry properties here */
@@ -2445,7 +2454,7 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
SVN_ERR(svn_wc__db_read_kind(&kind, wc_ctx->db, local_abspath, TRUE,
scratch_pool));
- if (kind == svn_wc__db_kind_dir)
+ if (kind == svn_kind_dir)
dir_abspath = local_abspath;
else
dir_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
@@ -2465,7 +2474,7 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
return SVN_NO_ERROR;
SVN_ERR(do_propset(wc_ctx->db, local_abspath,
- kind == svn_wc__db_kind_dir
+ kind == svn_kind_dir
? svn_node_dir
: svn_node_file,
name, value, skip_checks,
Modified: subversion/branches/fs-py/subversion/libsvn_wc/props.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/props.h?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/props.h (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/props.h Thu Oct 13 14:30:07 2011
@@ -106,7 +106,7 @@ svn_wc__merge_props(svn_skel_t **work_it
apr_hash_t **new_actual_props,
svn_wc__db_t *db,
const char *local_abspath,
- svn_wc__db_kind_t kind,
+ svn_kind_t kind,
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
apr_hash_t *server_baseprops,
Modified: subversion/branches/fs-py/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/questions.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/questions.c Thu Oct 13 14:30:07 2011
@@ -244,7 +244,7 @@ svn_wc__internal_file_modified_p(svn_boo
svn_stream_t *pristine_stream;
svn_filesize_t pristine_size;
svn_wc__db_status_t status;
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
const svn_checksum_t *checksum;
svn_filesize_t recorded_size;
apr_time_t recorded_mod_time;
@@ -265,7 +265,7 @@ svn_wc__internal_file_modified_p(svn_boo
/* If we don't have a pristine or the node has a status that allows a
pristine, just say that the node is modified */
if (!checksum
- || (kind != svn_wc__db_kind_file)
+ || (kind != svn_kind_file)
|| ((status != svn_wc__db_status_normal)
&& (status != svn_wc__db_status_added)))
{
@@ -394,7 +394,7 @@ svn_wc__internal_conflicted_p(svn_boolea
apr_pool_t *scratch_pool)
{
svn_node_kind_t kind;
- svn_wc__db_kind_t node_kind;
+ svn_kind_t node_kind;
const apr_array_header_t *conflicts;
int i;
svn_boolean_t conflicted;
Modified: subversion/branches/fs-py/subversion/libsvn_wc/relocate.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/relocate.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/relocate.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/relocate.c Thu Oct 13 14:30:07 2011
@@ -85,7 +85,7 @@ svn_wc_relocate4(svn_wc_context_t *wc_ct
void *validator_baton,
apr_pool_t *scratch_pool)
{
- svn_wc__db_kind_t kind;
+ svn_kind_t kind;
const char *repos_relpath;
const char *old_repos_root, *old_url;
const char *new_repos_root, *new_url;
@@ -131,7 +131,7 @@ svn_wc_relocate4(svn_wc_context_t *wc_ct
wc_ctx->db, local_abspath, scratch_pool,
scratch_pool));
- if (kind != svn_wc__db_kind_dir)
+ if (kind != svn_kind_dir)
return svn_error_create(SVN_ERR_CLIENT_INVALID_RELOCATION, NULL,
_("Cannot relocate a single file"));
Modified: subversion/branches/fs-py/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/status.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/status.c Thu Oct 13 14:30:07 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/fs-py/subversion/libsvn_wc/translate.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/translate.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/translate.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/translate.c Thu Oct 13 14:30:07 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/fs-py/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/update_editor.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/update_editor.c Thu Oct 13 14:30:07 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/fs-py/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/upgrade.c?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/upgrade.c Thu Oct 13 14:30:07 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/fs-py/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/wc-metadata.sql?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/wc-metadata.sql Thu Oct 13 14:30:07 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/fs-py/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/subversion/libsvn_wc/wc.h?rev=1182877&r1=1182876&r2=1182877&view=diff
==============================================================================
--- subversion/branches/fs-py/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/fs-py/subversion/libsvn_wc/wc.h Thu Oct 13 14:30:07 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,