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 2012/04/23 14:33:03 UTC
svn commit: r1329209 [22/38] - in /subversion/branches/javahl-ra: ./ build/
build/ac-macros/ build/generator/ build/generator/templates/ build/win32/
contrib/client-side/emacs/ contrib/client-side/vim/
contrib/server-side/mod_dontdothat/ notes/ notes/a...
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/deprecated.c Mon Apr 23 12:32:48 2012
@@ -36,6 +36,7 @@
#include "svn_dirent_uri.h"
#include "svn_path.h"
+#include "private/svn_subr_private.h"
#include "private/svn_wc_private.h"
#include "wc.h"
@@ -688,9 +689,8 @@ svn_wc_queue_committed(svn_wc_committed_
const svn_checksum_t *md5_checksum;
if (digest)
- md5_checksum = svn_checksum__from_digest(
- digest, svn_checksum_md5,
- svn_wc__get_committed_queue_pool(*queue));
+ md5_checksum = svn_checksum__from_digest_md5(
+ digest, svn_wc__get_committed_queue_pool(*queue));
else
md5_checksum = NULL;
@@ -748,7 +748,7 @@ svn_wc_process_committed4(const char *pa
new_date = 0;
if (digest)
- md5_checksum = svn_checksum__from_digest(digest, svn_checksum_md5, pool);
+ md5_checksum = svn_checksum__from_digest_md5(digest, pool);
else
md5_checksum = NULL;
@@ -1907,6 +1907,43 @@ static struct svn_wc_diff_callbacks4_t d
wrap_4to3_dir_closed
};
+
+svn_error_t *
+svn_wc_get_diff_editor6(const svn_delta_editor_t **editor,
+ void **edit_baton,
+ svn_wc_context_t *wc_ctx,
+ const char *anchor_abspath,
+ const char *target,
+ svn_depth_t depth,
+ svn_boolean_t ignore_ancestry,
+ svn_boolean_t show_copies_as_adds,
+ svn_boolean_t use_git_diff_format,
+ svn_boolean_t use_text_base,
+ svn_boolean_t reverse_order,
+ svn_boolean_t server_performs_filtering,
+ const apr_array_header_t *changelist_filter,
+ const svn_wc_diff_callbacks4_t *callbacks,
+ void *callback_baton,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ return svn_error_trace(
+ svn_wc__get_diff_editor(editor, edit_baton,
+ wc_ctx,
+ anchor_abspath, target,
+ depth,
+ ignore_ancestry, show_copies_as_adds,
+ use_git_diff_format, use_text_base,
+ reverse_order, server_performs_filtering,
+ changelist_filter,
+ callbacks, callback_baton,
+ cancel_func, cancel_baton,
+ result_pool, scratch_pool));
+}
+
+
svn_error_t *
svn_wc_get_diff_editor5(svn_wc_adm_access_t *anchor,
const char *target,
@@ -2585,6 +2622,47 @@ status4_wrapper_func(void *baton,
return (*swb->old_func)(swb->old_baton, path, dup, scratch_pool);
}
+
+svn_error_t *
+svn_wc_get_status_editor5(const svn_delta_editor_t **editor,
+ void **edit_baton,
+ void **set_locks_baton,
+ svn_revnum_t *edit_revision,
+ svn_wc_context_t *wc_ctx,
+ const char *anchor_abspath,
+ const char *target_basename,
+ svn_depth_t depth,
+ svn_boolean_t get_all,
+ svn_boolean_t no_ignore,
+ svn_boolean_t depth_as_sticky,
+ svn_boolean_t server_performs_filtering,
+ const apr_array_header_t *ignore_patterns,
+ svn_wc_status_func4_t status_func,
+ void *status_baton,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ return svn_error_trace(
+ svn_wc__get_status_editor(editor, edit_baton,
+ set_locks_baton,
+ edit_revision,
+ wc_ctx,
+ anchor_abspath,
+ target_basename,
+ depth,
+ get_all, no_ignore,
+ depth_as_sticky,
+ server_performs_filtering,
+ ignore_patterns,
+ status_func, status_baton,
+ cancel_func, cancel_baton,
+ result_pool,
+ scratch_pool));
+}
+
+
svn_error_t *
svn_wc_get_status_editor4(const svn_delta_editor_t **editor,
void **edit_baton,
@@ -3154,6 +3232,59 @@ svn_wc_is_wc_root(svn_boolean_t *wc_root
return svn_error_trace(svn_wc_context_destroy(wc_ctx));
}
+
+svn_error_t *
+svn_wc_get_update_editor4(const svn_delta_editor_t **editor,
+ void **edit_baton,
+ svn_revnum_t *target_revision,
+ svn_wc_context_t *wc_ctx,
+ const char *anchor_abspath,
+ const char *target_basename,
+ svn_boolean_t use_commit_times,
+ svn_depth_t depth,
+ svn_boolean_t depth_is_sticky,
+ svn_boolean_t allow_unver_obstructions,
+ svn_boolean_t adds_as_modification,
+ svn_boolean_t server_performs_filtering,
+ svn_boolean_t clean_checkout,
+ const char *diff3_cmd,
+ const apr_array_header_t *preserved_exts,
+ svn_wc_dirents_func_t fetch_dirents_func,
+ void *fetch_dirents_baton,
+ svn_wc_conflict_resolver_func2_t conflict_func,
+ void *conflict_baton,
+ svn_wc_external_update_t external_func,
+ void *external_baton,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ return svn_error_trace(
+ svn_wc__get_update_editor(editor, edit_baton,
+ target_revision,
+ wc_ctx,
+ anchor_abspath,
+ target_basename,
+ use_commit_times,
+ depth, depth_is_sticky,
+ allow_unver_obstructions,
+ adds_as_modification,
+ server_performs_filtering,
+ clean_checkout,
+ diff3_cmd,
+ preserved_exts,
+ fetch_dirents_func, fetch_dirents_baton,
+ conflict_func, conflict_baton,
+ external_func, external_baton,
+ cancel_func, cancel_baton,
+ notify_func, notify_baton,
+ result_pool, scratch_pool));
+}
+
+
svn_error_t *
svn_wc_get_update_editor3(svn_revnum_t *target_revision,
svn_wc_adm_access_t *anchor,
@@ -3288,6 +3419,56 @@ svn_wc_get_update_editor(svn_revnum_t *t
traversal_info, pool);
}
+
+svn_error_t *
+svn_wc_get_switch_editor4(const svn_delta_editor_t **editor,
+ void **edit_baton,
+ svn_revnum_t *target_revision,
+ svn_wc_context_t *wc_ctx,
+ const char *anchor_abspath,
+ const char *target_basename,
+ const char *switch_url,
+ svn_boolean_t use_commit_times,
+ svn_depth_t depth,
+ svn_boolean_t depth_is_sticky,
+ svn_boolean_t allow_unver_obstructions,
+ svn_boolean_t server_performs_filtering,
+ const char *diff3_cmd,
+ const apr_array_header_t *preserved_exts,
+ svn_wc_dirents_func_t fetch_dirents_func,
+ void *fetch_dirents_baton,
+ svn_wc_conflict_resolver_func2_t conflict_func,
+ void *conflict_baton,
+ svn_wc_external_update_t external_func,
+ void *external_baton,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ return svn_error_trace(
+ svn_wc__get_switch_editor(editor, edit_baton,
+ target_revision,
+ wc_ctx,
+ anchor_abspath, target_basename,
+ switch_url,
+ use_commit_times,
+ depth, depth_is_sticky,
+ allow_unver_obstructions,
+ server_performs_filtering,
+ diff3_cmd,
+ preserved_exts,
+ fetch_dirents_func, fetch_dirents_baton,
+ conflict_func, conflict_baton,
+ external_func, external_baton,
+ cancel_func, cancel_baton,
+ notify_func, notify_baton,
+ result_pool, scratch_pool));
+}
+
+
svn_error_t *
svn_wc_get_switch_editor3(svn_revnum_t *target_revision,
svn_wc_adm_access_t *anchor,
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/diff_editor.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/diff_editor.c Mon Apr 23 12:32:48 2012
@@ -61,6 +61,7 @@
#include "svn_path.h"
#include "svn_hash.h"
+#include "private/svn_subr_private.h"
#include "private/svn_wc_private.h"
#include "wc.h"
@@ -1494,9 +1495,8 @@ window_handler(svn_txdelta_window_t *win
if (!window)
{
- fb->result_checksum = svn_checksum__from_digest(whb->result_digest,
- svn_checksum_md5,
- fb->pool);
+ fb->result_checksum = svn_checksum__from_digest_md5(whb->result_digest,
+ fb->pool);
}
return SVN_NO_ERROR;
@@ -1856,7 +1856,7 @@ close_edit(void *edit_baton,
/* Create a diff editor and baton. */
svn_error_t *
-svn_wc_get_diff_editor6(const svn_delta_editor_t **editor,
+svn_wc__get_diff_editor(const svn_delta_editor_t **editor,
void **edit_baton,
svn_wc_context_t *wc_ctx,
const char *anchor_abspath,
@@ -1880,6 +1880,7 @@ svn_wc_get_diff_editor6(const svn_delta_
void *inner_baton;
svn_delta_editor_t *tree_editor;
const svn_delta_editor_t *inner_editor;
+ struct svn_wc__shim_fetch_baton_t *sfb;
svn_delta_shim_callbacks_t *shim_callbacks =
svn_delta_shim_callbacks_default(result_pool);
@@ -1933,8 +1934,20 @@ svn_wc_get_diff_editor6(const svn_delta_
edit_baton,
result_pool));
+ sfb = apr_palloc(result_pool, sizeof(*sfb));
+ sfb->db = wc_ctx->db;
+ sfb->base_abspath = eb->anchor_abspath;
+ sfb->fetch_base = TRUE;
+
+ shim_callbacks->fetch_kind_func = svn_wc__fetch_kind_func;
+ shim_callbacks->fetch_props_func = svn_wc__fetch_props_func;
+ shim_callbacks->fetch_base_func = svn_wc__fetch_base_func;
+ shim_callbacks->fetch_baton = sfb;
+
+
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- shim_callbacks, result_pool, scratch_pool));
+ NULL, NULL, shim_callbacks,
+ result_pool, scratch_pool));
return SVN_NO_ERROR;
}
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/entries.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/entries.c Mon Apr 23 12:32:48 2012
@@ -236,15 +236,6 @@ get_info_for_deleted(svn_wc_entry_t *ent
entry_abspath,
result_pool,
scratch_pool));
-
- if (*repos_relpath == NULL)
- SVN_ERR(svn_wc__db_scan_base_repos(repos_relpath,
- &entry->repos,
- &entry->uuid,
- db,
- entry_abspath,
- result_pool,
- scratch_pool));
}
else
{
@@ -1476,8 +1467,20 @@ insert_node(svn_sqlite__db_t *sdb,
svn_node_kind_to_word(node->kind)));
if (node->kind == svn_node_file)
- SVN_ERR(svn_sqlite__bind_checksum(stmt, 14, node->checksum,
- scratch_pool));
+ {
+ if (!node->checksum
+ && node->op_depth == 0
+ && node->presence != svn_wc__db_status_not_present
+ && node->presence != svn_wc__db_status_excluded
+ && node->presence != svn_wc__db_status_server_excluded)
+ return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
+ _("The file '%s' has no checksum"),
+ svn_dirent_local_style(node->local_relpath,
+ scratch_pool));
+
+ SVN_ERR(svn_sqlite__bind_checksum(stmt, 14, node->checksum,
+ scratch_pool));
+ }
if (node->properties) /* ### Never set, props done later */
SVN_ERR(svn_sqlite__bind_properties(stmt, 15, node->properties,
@@ -1885,7 +1888,7 @@ write_entry(struct write_baton **entry_n
}
else if (entry->absent)
{
- SVN_ERR_ASSERT(base_node->presence
+ SVN_ERR_ASSERT(base_node->presence
== svn_wc__db_status_server_excluded);
/* ### should be svn_node_unknown, but let's store what we have. */
base_node->kind = entry->kind;
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/externals.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/externals.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/externals.c Mon Apr 23 12:32:48 2012
@@ -300,8 +300,13 @@ svn_wc_parse_externals_description3(apr_
item->target_dir = svn_dirent_internal_style(item->target_dir, pool);
- if (item->target_dir[0] == '\0' || item->target_dir[0] == '/'
- || svn_path_is_backpath_present(item->target_dir))
+ if (item->target_dir[0] == '\0'
+ || svn_dirent_is_absolute(item->target_dir)
+ || svn_path_is_backpath_present(item->target_dir)
+ || !svn_dirent_skip_ancestor("dummy",
+ svn_dirent_join("dummy",
+ item->target_dir,
+ pool)))
return svn_error_createf
(SVN_ERR_CLIENT_INVALID_EXTERNALS_DESCRIPTION, NULL,
_("Invalid %s property on '%s': "
@@ -616,8 +621,13 @@ close_file(void *file_baton,
{
new_checksum = eb->original_checksum;
- SVN_ERR(svn_wc__db_base_get_props(&actual_props, eb->db,
- eb->local_abspath, pool, pool));
+ if (eb->had_props)
+ SVN_ERR(svn_wc__db_base_get_props(&base_props, eb->db,
+ eb->local_abspath,
+ pool, pool));
+
+ SVN_ERR(svn_wc__db_read_props(&actual_props, eb->db,
+ eb->local_abspath, pool, pool));
}
if (!base_props)
@@ -1133,7 +1143,7 @@ is_external_rolled_out(svn_boolean_t *is
err = svn_wc__node_get_origin(NULL, NULL,
&x_repos_relpath,
&x_repos_root_url,
- NULL,
+ NULL, NULL,
wc_ctx, xinfo->local_abspath,
FALSE, /* scan_deleted */
scratch_pool, scratch_pool);
@@ -1171,7 +1181,7 @@ svn_wc__committable_externals_below(apr_
local_abspath,
depth != svn_depth_infinity,
result_pool, scratch_pool));
-
+
if (orig_externals == NULL)
return SVN_NO_ERROR;
@@ -1353,6 +1363,16 @@ svn_wc__externals_gather_definitions(apr
}
}
+svn_error_t *
+svn_wc__close_db(const char *external_abspath,
+ svn_wc_context_t *wc_ctx,
+ apr_pool_t *scratch_pool)
+{
+ SVN_ERR(svn_wc__db_drop_root(wc_ctx->db, external_abspath,
+ scratch_pool));
+ return SVN_NO_ERROR;
+}
+
/* Return the scheme of @a uri in @a scheme allocated from @a pool.
If @a uri does not appear to be a valid URI, then @a scheme will
not be updated. */
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/info.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/info.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/info.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/info.c Mon Apr 23 12:32:48 2012
@@ -41,8 +41,7 @@ svn_wc_info_dup(const svn_wc_info_t *inf
if (info->changelist)
new_info->changelist = apr_pstrdup(pool, info->changelist);
- if (info->checksum)
- new_info->checksum = svn_checksum_dup(info->checksum, pool);
+ new_info->checksum = svn_checksum_dup(info->checksum, pool);
if (info->conflicts)
{
int i;
@@ -182,7 +181,7 @@ build_info_for_node(svn_wc__info2_t **in
SVN_ERR(svn_wc__internal_get_origin(NULL, &tmpinfo->rev,
&repos_relpath,
&tmpinfo->repos_root_URL,
- &tmpinfo->repos_UUID,
+ &tmpinfo->repos_UUID, NULL,
db, local_abspath, TRUE,
result_pool, scratch_pool));
}
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/node.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/node.c Mon Apr 23 12:32:48 2012
@@ -214,6 +214,8 @@ svn_wc__internal_get_repos_info(const ch
db, local_abspath,
result_pool, scratch_pool));
+ SVN_ERR_ASSERT(repos_root_url == NULL || *repos_root_url != NULL);
+ SVN_ERR_ASSERT(repos_uuid == NULL || *repos_uuid != NULL);
return SVN_NO_ERROR;
}
@@ -880,7 +882,6 @@ get_base_rev(svn_revnum_t *base_revision
const char *local_abspath,
apr_pool_t *scratch_pool)
{
- svn_boolean_t have_base;
svn_error_t *err;
err = svn_wc__db_base_get_info(NULL, NULL, base_revision, NULL,
@@ -894,13 +895,7 @@ get_base_rev(svn_revnum_t *base_revision
svn_error_clear(err);
- SVN_ERR(svn_wc__db_read_info(NULL, NULL, base_revision,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, &have_base, NULL,
- NULL, NULL, NULL, NULL, NULL,
- db, local_abspath,
- scratch_pool, scratch_pool));
+ *base_revision = SVN_INVALID_REVNUM;
return SVN_NO_ERROR;
}
@@ -1347,6 +1342,7 @@ svn_wc__internal_get_origin(svn_boolean_
const char **repos_relpath,
const char **repos_root_url,
const char **repos_uuid,
+ const char **copy_root_abspath,
svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t scan_deleted,
@@ -1397,7 +1393,8 @@ svn_wc__internal_get_origin(svn_boolean_
if (repos_uuid)
*repos_uuid = original_repos_uuid;
- return SVN_NO_ERROR;
+ if (copy_root_abspath == NULL)
+ return SVN_NO_ERROR;
}
{
@@ -1426,13 +1423,19 @@ svn_wc__internal_get_origin(svn_boolean_
result_pool, scratch_pool));
if (status == svn_wc__db_status_added)
- return SVN_NO_ERROR; /* Local addition */
+ {
+ if (is_copy)
+ *is_copy = FALSE;
+ return SVN_NO_ERROR; /* Local addition */
+ }
*repos_relpath = svn_relpath_join(
original_repos_relpath,
svn_dirent_skip_ancestor(op_root_abspath,
local_abspath),
result_pool);
+ if (copy_root_abspath)
+ *copy_root_abspath = op_root_abspath;
}
else /* Deleted, excluded, not-present, server-excluded, ... */
{
@@ -1457,6 +1460,7 @@ svn_wc__node_get_origin(svn_boolean_t *i
const char **repos_relpath,
const char **repos_root_url,
const char **repos_uuid,
+ const char **copy_root_abspath,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t scan_deleted,
@@ -1465,6 +1469,7 @@ svn_wc__node_get_origin(svn_boolean_t *i
{
return svn_error_trace(svn_wc__internal_get_origin(is_copy, revision,
repos_relpath, repos_root_url, repos_uuid,
+ copy_root_abspath,
wc_ctx->db, local_abspath, scan_deleted,
result_pool, scratch_pool));
}
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/props.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/props.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/props.c Mon Apr 23 12:32:48 2012
@@ -788,7 +788,7 @@ set_prop_merge_state(svn_wc_notify_state
* 'choose_postpone', then set *CONFLICT_REMAINS to TRUE and return.
*
* If the callback responds with a choice of 'base', 'theirs', 'mine',
- * or 'merged', then install the proper value into WORKING_PROPS and
+ * or 'merged', then install the proper value into ACTUAL_PROPS and
* set *CONFLICT_REMAINS to FALSE.
*/
static svn_error_t *
@@ -799,7 +799,7 @@ maybe_generate_propconflict(svn_boolean_
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
const char *propname,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const svn_string_t *incoming_old_val,
const svn_string_t *incoming_new_val,
const svn_string_t *base_val,
@@ -936,7 +936,7 @@ maybe_generate_propconflict(svn_boolean_
}
/* Build the rest of the description object: */
- cdesc->mime_type = (is_dir ? NULL : svn_prop_get_value(working_props,
+ cdesc->mime_type = (is_dir ? NULL : svn_prop_get_value(actual_props,
SVN_PROP_MIME_TYPE));
cdesc->is_binary = (cdesc->mime_type
&& svn_mime_type_is_binary(cdesc->mime_type));
@@ -978,7 +978,7 @@ maybe_generate_propconflict(svn_boolean_
}
case svn_wc_conflict_choose_mine_full:
{
- /* No need to change working_props; it already contains working_val */
+ /* No need to change actual_props; it already contains working_val */
*conflict_remains = FALSE;
break;
}
@@ -989,14 +989,14 @@ maybe_generate_propconflict(svn_boolean_
then choose _mine side or _theirs side for conflicting ones. */
case svn_wc_conflict_choose_theirs_full:
{
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING,
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING,
incoming_new_val);
*conflict_remains = FALSE;
break;
}
case svn_wc_conflict_choose_base:
{
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, base_val);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, base_val);
*conflict_remains = FALSE;
break;
}
@@ -1018,7 +1018,7 @@ maybe_generate_propconflict(svn_boolean_
cdesc->merged_file,
scratch_pool));
merged_string = svn_stringbuf__morph_into_string(merged_stringbuf);
- apr_hash_set(working_props, propname,
+ apr_hash_set(actual_props, propname,
APR_HASH_KEY_STRING, merged_string);
*conflict_remains = FALSE;
}
@@ -1033,7 +1033,7 @@ maybe_generate_propconflict(svn_boolean_
}
-/* Add the property with name PROPNAME to the set of WORKING_PROPS on
+/* Add the property with name PROPNAME to the set of ACTUAL_PROPS on
* PATH, setting *STATE or *CONFLICT_REMAINS according to merge outcomes.
*
* *STATE is an input and output parameter, its value is to be
@@ -1055,7 +1055,7 @@ apply_single_prop_add(svn_wc_notify_stat
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const char *propname,
const svn_string_t *base_val,
const svn_string_t *new_val,
@@ -1067,13 +1067,13 @@ apply_single_prop_add(svn_wc_notify_stat
{
svn_string_t *working_val
- = apr_hash_get(working_props, propname, APR_HASH_KEY_STRING);
+ = apr_hash_get(actual_props, propname, APR_HASH_KEY_STRING);
*conflict_remains = FALSE;
if (working_val)
{
- /* the property already exists in working_props... */
+ /* the property already exists in actual_props... */
if (svn_string_compare(working_val, new_val))
/* The value we want is already there, so it's a merge. */
@@ -1107,7 +1107,7 @@ apply_single_prop_add(svn_wc_notify_stat
else
{
merged_prop = TRUE;
- apr_hash_set(working_props, propname,
+ apr_hash_set(actual_props, propname,
APR_HASH_KEY_STRING, merged_val);
set_prop_merge_state(state, svn_wc_notify_state_merged);
}
@@ -1119,7 +1119,7 @@ apply_single_prop_add(svn_wc_notify_stat
db, local_abspath,
left_version, right_version,
is_dir,
- propname, working_props,
+ propname, actual_props,
NULL, new_val,
base_val, working_val,
conflict_func,
@@ -1134,21 +1134,21 @@ apply_single_prop_add(svn_wc_notify_stat
db, local_abspath,
left_version, right_version,
is_dir, propname,
- working_props, NULL, new_val,
+ actual_props, NULL, new_val,
base_val, NULL,
conflict_func, conflict_baton,
dry_run, scratch_pool));
}
- else /* property doesn't yet exist in working_props... */
+ else /* property doesn't yet exist in actual_props... */
/* so just set it */
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, new_val);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, new_val);
return SVN_NO_ERROR;
}
/* Delete the property with name PROPNAME from the set of
- * WORKING_PROPS on PATH, setting *STATE or *CONFLICT_REMAINS according to
+ * ACTUAL_PROPS on PATH, setting *STATE or *CONFLICT_REMAINS according to
* merge outcomes.
*
* *STATE is an input and output parameter, its value is to be
@@ -1171,7 +1171,7 @@ apply_single_prop_delete(svn_wc_notify_s
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const char *propname,
const svn_string_t *base_val,
const svn_string_t *old_val,
@@ -1182,7 +1182,7 @@ apply_single_prop_delete(svn_wc_notify_s
apr_pool_t *scratch_pool)
{
svn_string_t *working_val
- = apr_hash_get(working_props, propname, APR_HASH_KEY_STRING);
+ = apr_hash_get(actual_props, propname, APR_HASH_KEY_STRING);
*conflict_remains = FALSE;
@@ -1196,14 +1196,14 @@ apply_single_prop_delete(svn_wc_notify_s
db, local_abspath,
left_version, right_version,
is_dir, propname,
- working_props, old_val, NULL,
+ actual_props, old_val, NULL,
base_val, working_val,
conflict_func, conflict_baton,
dry_run, scratch_pool));
}
else
{
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, NULL);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, NULL);
if (old_val)
/* This is a merge, merging a delete into non-existent
property or a local addition of same prop value. */
@@ -1217,14 +1217,14 @@ apply_single_prop_delete(svn_wc_notify_s
{
if (svn_string_compare(working_val, old_val))
/* they have the same values, so it's an update */
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, NULL);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, NULL);
else
{
SVN_ERR(maybe_generate_propconflict(conflict_remains,
db, local_abspath,
left_version, right_version,
is_dir,
- propname, working_props,
+ propname, actual_props,
old_val, NULL,
base_val, working_val,
conflict_func,
@@ -1244,7 +1244,7 @@ apply_single_prop_delete(svn_wc_notify_s
db, local_abspath,
left_version, right_version,
is_dir, propname,
- working_props, old_val, NULL,
+ actual_props, old_val, NULL,
base_val, working_val,
conflict_func, conflict_baton,
dry_run, scratch_pool));
@@ -1269,7 +1269,7 @@ apply_single_mergeinfo_prop_change(svn_w
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const char *propname,
const svn_string_t *base_val,
const svn_string_t *old_val,
@@ -1281,7 +1281,7 @@ apply_single_mergeinfo_prop_change(svn_w
apr_pool_t *scratch_pool)
{
svn_string_t *working_val
- = apr_hash_get(working_props, propname, APR_HASH_KEY_STRING);
+ = apr_hash_get(actual_props, propname, APR_HASH_KEY_STRING);
if ((working_val && ! base_val)
|| (! working_val && base_val)
@@ -1305,7 +1305,7 @@ apply_single_mergeinfo_prop_change(svn_w
new_val,
result_pool,
scratch_pool));
- apr_hash_set(working_props, propname,
+ apr_hash_set(actual_props, propname,
APR_HASH_KEY_STRING, new_val);
set_prop_merge_state(state, svn_wc_notify_state_merged);
}
@@ -1317,7 +1317,7 @@ apply_single_mergeinfo_prop_change(svn_w
SVN_ERR(maybe_generate_propconflict(conflict_remains,
db, local_abspath,
left_version, right_version,
- is_dir, propname, working_props,
+ is_dir, propname, actual_props,
old_val, new_val,
base_val, working_val,
conflict_func, conflict_baton,
@@ -1339,14 +1339,14 @@ apply_single_mergeinfo_prop_change(svn_w
old_val, new_val, scratch_pool));
SVN_ERR(svn_mergeinfo_to_string(&mergeinfo_string,
added_mergeinfo, result_pool));
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING,
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING,
mergeinfo_string);
}
else /* means working && base && svn_string_compare(working, base) */
{
if (svn_string_compare(old_val, base_val))
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, new_val);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, new_val);
else
{
@@ -1358,7 +1358,7 @@ apply_single_mergeinfo_prop_change(svn_w
working_val,
new_val, result_pool,
scratch_pool));
- apr_hash_set(working_props, propname,
+ apr_hash_set(actual_props, propname,
APR_HASH_KEY_STRING, new_val);
set_prop_merge_state(state, svn_wc_notify_state_merged);
}
@@ -1381,7 +1381,7 @@ apply_single_generic_prop_change(svn_wc_
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const char *propname,
const svn_string_t *base_val,
const svn_string_t *old_val,
@@ -1393,7 +1393,7 @@ apply_single_generic_prop_change(svn_wc_
apr_pool_t *scratch_pool)
{
svn_string_t *working_val
- = apr_hash_get(working_props, propname, APR_HASH_KEY_STRING);
+ = apr_hash_get(actual_props, propname, APR_HASH_KEY_STRING);
SVN_ERR_ASSERT(old_val != NULL);
@@ -1411,7 +1411,7 @@ apply_single_generic_prop_change(svn_wc_
&& svn_string_compare(working_val, old_val))
{
/* A trivial update: change it to new_val. */
- apr_hash_set(working_props, propname, APR_HASH_KEY_STRING, new_val);
+ apr_hash_set(actual_props, propname, APR_HASH_KEY_STRING, new_val);
}
else
{
@@ -1419,7 +1419,7 @@ apply_single_generic_prop_change(svn_wc_
SVN_ERR(maybe_generate_propconflict(conflict_remains,
db, local_abspath,
left_version, right_version,
- is_dir, propname, working_props,
+ is_dir, propname, actual_props,
old_val, new_val,
base_val, working_val,
conflict_func, conflict_baton,
@@ -1429,7 +1429,7 @@ apply_single_generic_prop_change(svn_wc_
return SVN_NO_ERROR;
}
-/* Change the property with name PROPNAME in the set of WORKING_PROPS
+/* Change the property with name PROPNAME in the set of ACTUAL_PROPS
* on PATH, setting *STATE or *CONFLICT_REMAINS according to the merge outcome.
*
* *STATE is an input and output parameter, its value is to be
@@ -1454,7 +1454,7 @@ apply_single_prop_change(svn_wc_notify_s
const svn_wc_conflict_version_t *left_version,
const svn_wc_conflict_version_t *right_version,
svn_boolean_t is_dir,
- apr_hash_t *working_props,
+ apr_hash_t *actual_props,
const char *propname,
const svn_string_t *base_val,
const svn_string_t *old_val,
@@ -1490,7 +1490,7 @@ apply_single_prop_change(svn_wc_notify_s
left_version,
right_version,
is_dir,
- working_props,
+ actual_props,
propname,
base_val,
old_val,
@@ -1522,7 +1522,7 @@ apply_single_prop_change(svn_wc_notify_s
db, local_abspath,
left_version, right_version,
is_dir,
- working_props,
+ actual_props,
propname, base_val, old_val,
new_val,
conflict_func, conflict_baton,
@@ -1988,7 +1988,7 @@ svn_wc_prop_get2(const svn_string_t **va
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
- enum svn_prop_kind kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind kind = svn_property_kind2(name);
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -2014,7 +2014,7 @@ svn_wc__internal_propget(const svn_strin
apr_pool_t *scratch_pool)
{
apr_hash_t *prophash = NULL;
- enum svn_prop_kind kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind kind = svn_property_kind2(name);
svn_boolean_t hidden;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -2429,7 +2429,7 @@ svn_wc_prop_set4(svn_wc_context_t *wc_ct
void *notify_baton,
apr_pool_t *scratch_pool)
{
- enum svn_prop_kind prop_kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind prop_kind = svn_property_kind2(name);
svn_kind_t kind;
const char *dir_abspath;
@@ -2546,7 +2546,8 @@ svn_wc_canonicalize_svn_prop(const svn_s
|| strcmp(propname, SVN_PROP_EXTERNALS) == 0)
{
/* Make sure that the last line ends in a newline */
- if (propval->data[propval->len - 1] != '\n')
+ if (propval->len == 0
+ || propval->data[propval->len - 1] != '\n')
{
new_value = svn_stringbuf_create_from_string(propval, pool);
svn_stringbuf_appendbyte(new_value, '\n');
@@ -2608,7 +2609,7 @@ svn_wc_canonicalize_svn_prop(const svn_s
svn_boolean_t
svn_wc_is_normal_prop(const char *name)
{
- enum svn_prop_kind kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind kind = svn_property_kind2(name);
return (kind == svn_prop_regular_kind);
}
@@ -2616,7 +2617,7 @@ svn_wc_is_normal_prop(const char *name)
svn_boolean_t
svn_wc_is_wc_prop(const char *name)
{
- enum svn_prop_kind kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind kind = svn_property_kind2(name);
return (kind == svn_prop_wc_kind);
}
@@ -2624,7 +2625,7 @@ svn_wc_is_wc_prop(const char *name)
svn_boolean_t
svn_wc_is_entry_prop(const char *name)
{
- enum svn_prop_kind kind = svn_property_kind(NULL, name);
+ enum svn_prop_kind kind = svn_property_kind2(name);
return (kind == svn_prop_entry_kind);
}
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/questions.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/questions.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/questions.c Mon Apr 23 12:32:48 2012
@@ -531,19 +531,6 @@ svn_wc__min_max_revisions(svn_revnum_t *
svn_error_t *
-svn_wc__is_sparse_checkout(svn_boolean_t *is_sparse_checkout,
- svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- apr_pool_t *scratch_pool)
-{
- return svn_error_trace(svn_wc__db_is_sparse_checkout(is_sparse_checkout,
- wc_ctx->db,
- local_abspath,
- scratch_pool));
-}
-
-
-svn_error_t *
svn_wc__has_switched_subtrees(svn_boolean_t *is_switched,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/status.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/status.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/status.c Mon Apr 23 12:32:48 2012
@@ -294,7 +294,7 @@ read_info(const struct svn_wc__db_info_t
{
const char *moved_to_abspath;
const char *moved_to_op_root_abspath;
-
+
/* NOTE: we can't use op-root-ness as a condition here since a base
* node can be the root of a move and still not be an explicit
* op-root (having a working node with op_depth == pathelements).
@@ -303,7 +303,7 @@ read_info(const struct svn_wc__db_info_t
* svn mv a/b bb
* svn del a
* and
- * svn mv a aa
+ * svn mv a aa
* svn mv aa/b bb
* In both, 'bb' is moved from 'a/b', but 'a/b' has no op_depth>0
* node at all, as its parent 'a' is locally deleted. */
@@ -526,9 +526,17 @@ assemble_status(svn_wc_status3_t **statu
if (!info->have_base)
copied = TRUE;
else
- SVN_ERR(svn_wc__internal_node_get_schedule(NULL, &copied,
- db, local_abspath,
- scratch_pool));
+ {
+ const char *work_del_abspath;
+
+ /* Find out details of our deletion. */
+ SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
+ &work_del_abspath, NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool));
+ if (work_del_abspath)
+ copied = TRUE; /* Working deletion */
+ }
}
else if (!dirent || dirent->kind != svn_node_dir)
{
@@ -544,11 +552,17 @@ assemble_status(svn_wc_status3_t **statu
{
if (info->status == svn_wc__db_status_deleted)
{
+ const char *work_del_abspath;
+
node_status = svn_wc_status_deleted;
- SVN_ERR(svn_wc__internal_node_get_schedule(NULL, &copied,
- db, local_abspath,
- scratch_pool));
+ /* Find out details of our deletion. */
+ SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL,
+ &work_del_abspath, NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool));
+ if (work_del_abspath)
+ copied = TRUE; /* Working deletion */
}
else if (!dirent || dirent->kind != svn_node_file)
{
@@ -1203,7 +1217,7 @@ one_child_status(const struct walk_statu
/* The node exists on disk but there is no versioned information about it,
* or it doesn't exist but is a tree conflicted path or should be
* reported not-present. */
-
+
/* Why pass ignore patterns on a tree conflicted node, even if it should
* always show up in clients' status reports anyway? Because the calling
* client decides whether to ignore, and thus this flag needs to be
@@ -1318,13 +1332,37 @@ get_dir_status(const struct walk_status_
/* Handle "this-dir" first. */
if (! skip_this_dir)
- SVN_ERR(send_status_structure(wb, local_abspath,
- parent_repos_root_url,
- parent_repos_relpath,
- parent_repos_uuid,
- dir_info, dirent, get_all,
- status_func, status_baton,
- iterpool));
+ {
+#ifdef HAVE_SYMLINK
+ if (dirent->special)
+ {
+ svn_io_dirent2_t *this_dirent = svn_io_dirent2_dup(dirent, iterpool);
+
+ /* We're being pointed to "this-dir" via a symlink.
+ * Get the real node kind and pretend the path is not a symlink.
+ * This prevents send_status_structure() from treating this-dir
+ * as a directory obstructed by a file. */
+ SVN_ERR(svn_io_check_resolved_path(local_abspath,
+ &this_dirent->kind, iterpool));
+ this_dirent->special = FALSE;
+ SVN_ERR(send_status_structure(wb, local_abspath,
+ parent_repos_root_url,
+ parent_repos_relpath,
+ parent_repos_uuid,
+ dir_info, this_dirent, get_all,
+ status_func, status_baton,
+ iterpool));
+ }
+ else
+#endif
+ SVN_ERR(send_status_structure(wb, local_abspath,
+ parent_repos_root_url,
+ parent_repos_relpath,
+ parent_repos_uuid,
+ dir_info, dirent, get_all,
+ status_func, status_baton,
+ iterpool));
+ }
/* If the requested depth is empty, we only need status on this-dir. */
if (depth == svn_depth_empty)
@@ -1594,9 +1632,9 @@ tweak_statushash(void *baton,
else
statstruct->repos_relpath = apr_pstrdup(pool, b->repos_relpath);
- statstruct->repos_root_url =
+ statstruct->repos_root_url =
b->edit_baton->anchor_status->repos_root_url;
- statstruct->repos_uuid =
+ statstruct->repos_uuid =
b->edit_baton->anchor_status->repos_uuid;
}
@@ -1649,7 +1687,7 @@ tweak_statushash(void *baton,
return SVN_NO_ERROR;
}
-/* Returns the URL for DB, or NULL: */
+/* Returns the URL for DB */
static const char *
find_dir_repos_relpath(const struct dir_baton *db, apr_pool_t *pool)
{
@@ -1666,14 +1704,11 @@ find_dir_repos_relpath(const struct dir_
/* 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)
+ if (status && status->repos_relpath)
return status->repos_relpath;
repos_relpath = find_dir_repos_relpath(pb, pool);
- if (repos_relpath)
- return svn_relpath_join(repos_relpath, db->name, pool);
- else
- return NULL;
+ return svn_relpath_join(repos_relpath, db->name, pool);
}
}
@@ -2369,19 +2404,15 @@ close_file(void *file_baton,
const char *dir_repos_relpath = find_dir_repos_relpath(fb->dir_baton,
pool);
- if (dir_repos_relpath)
- {
- /* repos_lock still uses the deprecated filesystem absolute path
- format */
-
- const char *repos_relpath = svn_relpath_join(dir_repos_relpath,
- fb->name, pool);
+ /* repos_lock still uses the deprecated filesystem absolute path
+ format */
+ const char *repos_relpath = svn_relpath_join(dir_repos_relpath,
+ fb->name, pool);
- repos_lock = apr_hash_get(fb->edit_baton->wb.repos_locks,
- svn_fspath__join("/", repos_relpath,
- pool),
- APR_HASH_KEY_STRING);
- }
+ repos_lock = apr_hash_get(fb->edit_baton->wb.repos_locks,
+ svn_fspath__join("/", repos_relpath,
+ pool),
+ APR_HASH_KEY_STRING);
}
}
else
@@ -2432,7 +2463,7 @@ close_edit(void *edit_baton,
/*** Public API ***/
svn_error_t *
-svn_wc_get_status_editor5(const svn_delta_editor_t **editor,
+svn_wc__get_status_editor(const svn_delta_editor_t **editor,
void **edit_baton,
void **set_locks_baton,
svn_revnum_t *edit_revision,
@@ -2455,6 +2486,7 @@ svn_wc_get_status_editor5(const svn_delt
struct edit_baton *eb;
svn_delta_editor_t *tree_editor = svn_delta_default_editor(result_pool);
void *inner_baton;
+ struct svn_wc__shim_fetch_baton_t *sfb;
const svn_delta_editor_t *inner_editor;
svn_delta_shim_callbacks_t *shim_callbacks =
svn_delta_shim_callbacks_default(result_pool);
@@ -2545,8 +2577,18 @@ svn_wc_get_status_editor5(const svn_delt
if (set_locks_baton)
*set_locks_baton = eb;
+ sfb = apr_palloc(result_pool, sizeof(*sfb));
+ sfb->db = wc_ctx->db;
+ sfb->base_abspath = eb->anchor_abspath;
+ sfb->fetch_base = FALSE;
+
+ shim_callbacks->fetch_kind_func = svn_wc__fetch_kind_func;
+ shim_callbacks->fetch_props_func = svn_wc__fetch_props_func;
+ shim_callbacks->fetch_base_func = svn_wc__fetch_base_func;
+ shim_callbacks->fetch_baton = sfb;
+
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- shim_callbacks,
+ NULL, NULL, shim_callbacks,
result_pool, scratch_pool));
return SVN_NO_ERROR;
@@ -2606,7 +2648,11 @@ 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_kind_dir)
+ if (info
+ && info->kind == svn_kind_dir
+ && info->status != svn_wc__db_status_not_present
+ && info->status != svn_wc__db_status_excluded
+ && info->status != svn_wc__db_status_server_excluded)
{
SVN_ERR(get_dir_status(&wb,
local_abspath,
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/update_editor.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/update_editor.c Mon Apr 23 12:32:48 2012
@@ -50,6 +50,7 @@
#include "translate.h"
#include "workqueue.h"
+#include "private/svn_subr_private.h"
#include "private/svn_wc_private.h"
/* Checks whether a svn_wc__db_status_t indicates whether a node is
present in a working copy. Used by the editor implementation */
@@ -961,8 +962,7 @@ window_handler(svn_txdelta_window_t *win
{
/* Tell the file baton about the new text base's checksums. */
fb->new_text_base_md5_checksum =
- svn_checksum__from_digest(hb->new_text_base_md5_digest,
- svn_checksum_md5, fb->pool);
+ svn_checksum__from_digest_md5(hb->new_text_base_md5_digest, fb->pool);
fb->new_text_base_sha1_checksum =
svn_checksum_dup(hb->new_text_base_sha1_checksum, fb->pool);
@@ -2541,7 +2541,7 @@ change_dir_prop(void *dir_baton,
propchange->name = apr_pstrdup(db->pool, name);
propchange->value = value ? svn_string_dup(value, db->pool) : NULL;
- if (!db->edited && svn_property_kind(NULL, name) == svn_prop_regular_kind)
+ if (!db->edited && svn_property_kind2(name) == svn_prop_regular_kind)
SVN_ERR(mark_directory_edited(db, pool));
return SVN_NO_ERROR;
@@ -3724,7 +3724,7 @@ change_file_prop(void *file_baton,
propchange->name = apr_pstrdup(fb->pool, name);
propchange->value = value ? svn_string_dup(value, fb->pool) : NULL;
- if (!fb->edited && svn_property_kind(NULL, name) == svn_prop_regular_kind)
+ if (!fb->edited && svn_property_kind2(name) == svn_prop_regular_kind)
SVN_ERR(mark_file_edited(fb, scratch_pool));
return SVN_NO_ERROR;
@@ -4470,8 +4470,8 @@ close_file(void *file_baton,
NULL /* left_version */,
NULL /* right_version */,
NULL /* server_baseprops (not merging) */,
- current_base_props /* base_props */,
- fake_actual_props /* working_props */,
+ current_base_props /* pristine_props */,
+ fake_actual_props /* actual_props */,
regular_prop_changes, /* propchanges */
TRUE /* base_merge */,
FALSE /* dry_run */,
@@ -4581,7 +4581,7 @@ close_file(void *file_baton,
/* If the file was moved-away, notify for the moved-away node.
* The original location only had its BASE info changed and
- * we don't usually notify about such changes. */
+ * we don't usually notify about such changes. */
notify = svn_wc_create_notify(working_abspath, action, scratch_pool);
notify->kind = svn_node_file;
notify->content_state = content_state;
@@ -4715,59 +4715,9 @@ close_edit(void *edit_baton,
return SVN_NO_ERROR;
}
-
/*** Returning editors. ***/
-struct fetch_baton
-{
- svn_wc__db_t *db;
- const char *target_abspath;
-};
-
-static svn_error_t *
-fetch_props_func(apr_hash_t **props,
- void *baton,
- const char *path,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- struct fetch_baton *fpb = baton;
- const char *local_abspath = svn_dirent_join(fpb->target_abspath, path,
- scratch_pool);
- svn_error_t *err;
-
- err = svn_wc__db_read_props(props, fpb->db, local_abspath,
- result_pool, scratch_pool);
-
- /* If the path doesn't exist, just return an empty set of props. */
- if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
- {
- svn_error_clear(err);
- *props = apr_hash_make(result_pool);
- }
- else if (err)
- return svn_error_trace(err);
-
- return SVN_NO_ERROR;
-}
-
-static svn_error_t *
-fetch_kind_func(svn_kind_t *kind,
- void *baton,
- const char *path,
- apr_pool_t *scratch_pool)
-{
- struct fetch_baton *fpb = baton;
- const char *local_abspath = svn_dirent_join(fpb->target_abspath, path,
- scratch_pool);
-
- SVN_ERR(svn_wc__db_read_kind(kind, fpb->db, local_abspath, FALSE,
- scratch_pool));
-
- return SVN_NO_ERROR;
-}
-
/* Helper for the three public editor-supplying functions. */
static svn_error_t *
make_editor(svn_revnum_t *target_revision,
@@ -4805,7 +4755,7 @@ make_editor(svn_revnum_t *target_revisio
svn_delta_editor_t *tree_editor = svn_delta_default_editor(edit_pool);
const svn_delta_editor_t *inner_editor;
const char *repos_root, *repos_uuid;
- struct fetch_baton *fpb;
+ struct svn_wc__shim_fetch_baton_t *sfb;
svn_delta_shim_callbacks_t *shim_callbacks =
svn_delta_shim_callbacks_default(edit_pool);
@@ -5035,24 +4985,26 @@ make_editor(svn_revnum_t *target_revisio
edit_baton,
result_pool));
- fpb = apr_palloc(result_pool, sizeof(*fpb));
- fpb->db = db;
- fpb->target_abspath = eb->target_abspath;
-
- shim_callbacks->fetch_kind_func = fetch_kind_func;
- shim_callbacks->fetch_kind_baton = fpb;
- shim_callbacks->fetch_props_func = fetch_props_func;
- shim_callbacks->fetch_props_baton = fpb;
+ sfb = apr_palloc(result_pool, sizeof(*sfb));
+ sfb->db = db;
+ sfb->base_abspath = eb->anchor_abspath;
+ sfb->fetch_base = TRUE;
+
+ shim_callbacks->fetch_kind_func = svn_wc__fetch_kind_func;
+ shim_callbacks->fetch_props_func = svn_wc__fetch_props_func;
+ shim_callbacks->fetch_base_func = svn_wc__fetch_base_func;
+ shim_callbacks->fetch_baton = sfb;
SVN_ERR(svn_editor__insert_shims(editor, edit_baton, *editor, *edit_baton,
- shim_callbacks, result_pool, scratch_pool));
+ NULL, NULL, shim_callbacks,
+ result_pool, scratch_pool));
return SVN_NO_ERROR;
}
svn_error_t *
-svn_wc_get_update_editor4(const svn_delta_editor_t **editor,
+svn_wc__get_update_editor(const svn_delta_editor_t **editor,
void **edit_baton,
svn_revnum_t *target_revision,
svn_wc_context_t *wc_ctx,
@@ -5095,7 +5047,7 @@ svn_wc_get_update_editor4(const svn_delt
}
svn_error_t *
-svn_wc_get_switch_editor4(const svn_delta_editor_t **editor,
+svn_wc__get_switch_editor(const svn_delta_editor_t **editor,
void **edit_baton,
svn_revnum_t *target_revision,
svn_wc_context_t *wc_ctx,
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/util.c?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/util.c (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/util.c Mon Apr 23 12:32:48 2012
@@ -533,3 +533,94 @@ svn_wc__status2_from_3(svn_wc_status2_t
return SVN_NO_ERROR;
}
+
+
+svn_error_t *
+svn_wc__fetch_kind_func(svn_kind_t *kind,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *scratch_pool)
+{
+ struct svn_wc__shim_fetch_baton_t *sfb = baton;
+ const char *local_abspath = svn_dirent_join(sfb->base_abspath, path,
+ scratch_pool);
+
+ SVN_ERR(svn_wc__db_read_kind(kind, sfb->db, local_abspath, FALSE,
+ scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
+svn_wc__fetch_props_func(apr_hash_t **props,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ struct svn_wc__shim_fetch_baton_t *sfb = baton;
+ const char *local_abspath = svn_dirent_join(sfb->base_abspath, path,
+ scratch_pool);
+ svn_error_t *err;
+
+ if (sfb->fetch_base)
+ err = svn_wc__db_base_get_props(props, sfb->db, local_abspath, result_pool,
+ scratch_pool);
+ else
+ err = svn_wc__db_read_props(props, sfb->db, local_abspath,
+ result_pool, scratch_pool);
+
+ /* If the path doesn't exist, just return an empty set of props. */
+ if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ svn_error_clear(err);
+ *props = apr_hash_make(result_pool);
+ }
+ else if (err)
+ return svn_error_trace(err);
+
+ return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
+svn_wc__fetch_base_func(const char **filename,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ struct svn_wc__shim_fetch_baton_t *sfb = baton;
+ const svn_checksum_t *checksum;
+ svn_error_t *err;
+ const char *local_abspath = svn_dirent_join(sfb->base_abspath, path,
+ scratch_pool);
+
+ err = svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, &checksum,
+ NULL, NULL, NULL, NULL, sfb->db,
+ local_abspath, scratch_pool, scratch_pool);
+ if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ svn_error_clear(err);
+ *filename = NULL;
+ return SVN_NO_ERROR;
+ }
+ else if (err)
+ return svn_error_trace(err);
+
+ if (checksum == NULL)
+ {
+ *filename = NULL;
+ return SVN_NO_ERROR;
+ }
+
+ SVN_ERR(svn_wc__db_pristine_get_path(filename, sfb->db, local_abspath,
+ checksum, scratch_pool, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc-metadata.sql
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc-metadata.sql?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc-metadata.sql Mon Apr 23 12:32:48 2012
@@ -383,17 +383,19 @@ CREATE TABLE NODES (
perhaps add a column called "moved_from". */
/* Boolean value, specifying if this node was moved here (rather than just
- copied). The source of the move is implied by a different node with
- a moved_to column pointing at this node. */
+ copied). This is set on all the nodes in the moved tree. The source of
+ the move is implied by a different node with a moved_to column pointing
+ at the root node of the moved tree. */
moved_here INTEGER,
/* If the underlying node was moved away (rather than just deleted), this
- specifies the local_relpath of where the BASE node was moved to.
+ specifies the local_relpath of where the node was moved to.
This is set only on the root of a move, and is NULL for all children.
- Note that moved_to never refers to *this* node. It always refers
- to the "underlying" node in the BASE tree. A non-NULL moved_to column
- is only valid in rows where op_depth == 0. */
+ The op-depth of the moved-to node is not recorded. A moved_to path
+ always points at a node within the highest op-depth layer at the
+ destination. This invariant must be maintained by operations which
+ change existing move information. */
moved_to TEXT,
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc-queries.sql?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc-queries.sql Mon Apr 23 12:32:48 2012
@@ -51,8 +51,7 @@ ORDER BY op_depth DESC
-- STMT_SELECT_BASE_NODE
SELECT repos_id, repos_path, presence, kind, revision, checksum,
translated_size, changed_revision, changed_date, changed_author, depth,
- symlink_target, last_mod_time, properties, file_external IS NOT NULL,
- moved_to
+ symlink_target, last_mod_time, properties, file_external IS NOT NULL
FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
@@ -60,7 +59,6 @@ WHERE wc_id = ?1 AND local_relpath = ?2
SELECT nodes.repos_id, nodes.repos_path, presence, kind, revision,
checksum, translated_size, changed_revision, changed_date, changed_author,
depth, symlink_target, last_mod_time, properties, file_external IS NOT NULL,
- moved_to,
/* All the columns until now must match those returned by
STMT_SELECT_BASE_NODE. The implementation of svn_wc__db_base_get_info()
assumes that these columns are followed by the lock information) */
@@ -283,18 +281,35 @@ WHERE wc_id = ?1 AND local_relpath = ?2
SELECT dav_cache FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
+/* ### FIXME. modes_move.moved_to IS NOT NULL works when there is
+ only one move but we need something else when there are several. */
-- STMT_SELECT_DELETION_INFO
-SELECT nodes_base.presence, nodes_work.presence, nodes_base.moved_to,
+SELECT nodes_base.presence, nodes_work.presence, nodes_move.moved_to,
nodes_work.op_depth
FROM nodes AS nodes_work
+LEFT OUTER JOIN nodes nodes_move ON nodes_move.wc_id = nodes_work.wc_id
+ AND nodes_move.local_relpath = nodes_work.local_relpath
+ AND nodes_move.moved_to IS NOT NULL
LEFT OUTER JOIN nodes nodes_base ON nodes_base.wc_id = nodes_work.wc_id
- AND nodes_base.local_relpath = nodes_work.local_relpath
- AND nodes_base.op_depth = 0
+ AND nodes_base.local_relpath = nodes_work.local_relpath
+ AND nodes_base.op_depth = 0
WHERE nodes_work.wc_id = ?1 AND nodes_work.local_relpath = ?2
AND nodes_work.op_depth = (SELECT MAX(op_depth) FROM nodes
WHERE wc_id = ?1 AND local_relpath = ?2
AND op_depth > 0)
+-- STMT_SELECT_OP_DEPTH_MOVED_TO
+SELECT op_depth, moved_to
+FROM nodes
+WHERE nodes.wc_id = ?1 AND nodes.local_relpath = ?2
+ AND op_depth = (SELECT MIN(op_depth) FROM nodes
+ WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > ?3)
+
+-- STMT_SELECT_MOVED_TO
+SELECT moved_to
+FROM nodes
+WHERE nodes.wc_id = ?1 AND nodes.local_relpath = ?2 AND op_depth = ?3
+
-- STMT_DELETE_LOCK
DELETE FROM lock
WHERE repos_id = ?1 AND repos_relpath = ?2
@@ -884,28 +899,32 @@ INSERT OR REPLACE INTO nodes (
wc_id, local_relpath, op_depth, parent_relpath, repos_id,
repos_path, revision, presence, depth, moved_here, kind, changed_revision,
changed_date, changed_author, checksum, properties, translated_size,
- last_mod_time, symlink_target )
-SELECT wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
- repos_id, repos_path, revision, ?6 /*presence*/, depth, ?7/*moved_here*/,
- kind, changed_revision, changed_date, changed_author, checksum, properties,
- translated_size, last_mod_time, symlink_target
-FROM nodes
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
+ last_mod_time, symlink_target, moved_to )
+SELECT src.wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
+ src.repos_id, src.repos_path, src.revision, ?6 /*presence*/, src.depth,
+ ?7/*moved_here*/, src.kind, src.changed_revision, src.changed_date,
+ src.changed_author, src.checksum, src.properties, src.translated_size,
+ src.last_mod_time, src.symlink_target, dst.moved_to
+FROM nodes AS src
+LEFT OUTER JOIN nodes_current dst ON dst.wc_id = src.wc_id
+ AND dst.local_relpath = ?3 AND dst.op_depth = ?4
+WHERE src.wc_id = ?1 AND src.local_relpath = ?2 AND src.op_depth = 0
-- STMT_INSERT_WORKING_NODE_COPY_FROM_WORKING
INSERT OR REPLACE INTO nodes (
- wc_id, local_relpath, op_depth, parent_relpath, repos_id, repos_path,
- revision, presence, depth, moved_here, kind, changed_revision, changed_date,
- changed_author, checksum, properties, translated_size, last_mod_time,
- symlink_target )
-SELECT wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
- repos_id, repos_path, revision, ?6 /*presence*/, depth, ?7 /*moved_here*/,
- kind, changed_revision, changed_date, changed_author, checksum, properties,
- translated_size, last_mod_time, symlink_target
-FROM nodes
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > 0
-ORDER BY op_depth DESC
-LIMIT 1
+ wc_id, local_relpath, op_depth, parent_relpath, repos_id,
+ repos_path, revision, presence, depth, moved_here, kind, changed_revision,
+ changed_date, changed_author, checksum, properties, translated_size,
+ last_mod_time, symlink_target, moved_to )
+SELECT src.wc_id, ?3 /*local_relpath*/, ?4 /*op_depth*/, ?5 /*parent_relpath*/,
+ src.repos_id, src.repos_path, src.revision, ?6 /*presence*/, src.depth,
+ ?7 /*moved_here*/, src.kind, src.changed_revision, src.changed_date,
+ src.changed_author, src.checksum, src.properties, src.translated_size,
+ src.last_mod_time, src.symlink_target, dst.moved_to
+FROM nodes_current AS src
+LEFT OUTER JOIN nodes_current dst ON dst.wc_id = src.wc_id
+ AND dst.local_relpath = ?3 AND dst.op_depth = ?4
+WHERE src.wc_id = ?1 AND src.local_relpath = ?2 AND src.op_depth > 0
-- STMT_INSERT_WORKING_NODE_COPY_FROM_DEPTH
INSERT OR REPLACE INTO nodes (
@@ -1373,34 +1392,48 @@ WHERE wc_id = ?1
AND presence='normal'
AND file_external IS NULL
+/* ### FIXME: op-depth? What about multiple moves? */
-- STMT_SELECT_MOVED_FROM_RELPATH
-SELECT local_relpath FROM nodes
-WHERE wc_id = ?1 AND moved_to = ?2 AND op_depth = 0
+SELECT local_relpath, op_depth FROM nodes
+WHERE wc_id = ?1 AND moved_to = ?2 AND op_depth > 0
-- STMT_UPDATE_MOVED_TO_RELPATH
-UPDATE nodes SET moved_to = ?3
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
+UPDATE nodes SET moved_to = ?4
+WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3
+/* ### FIXME: op-depth? What about multiple moves? */
-- STMT_CLEAR_MOVED_TO_RELPATH
UPDATE nodes SET moved_to = NULL
-WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0
-
--- STMT_CLEAR_MOVED_TO_RELPATH_RECURSIVE
-UPDATE nodes SET moved_to = NULL
-WHERE wc_id = ?1
- AND (?2 = ''
- OR local_relpath = ?2
- OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2))
- AND op_depth = 0
+WHERE wc_id = ?1 AND local_relpath = ?2
/* This statement returns pairs of move-roots below the path ?2 in WC_ID ?1.
* Each row returns a moved-here path (always a child of ?2) in the first
* column, and its matching moved-away (deleted) path in the second column. */
-- STMT_SELECT_MOVED_HERE_CHILDREN
SELECT moved_to, local_relpath FROM nodes
-WHERE wc_id = ?1 AND op_depth = 0
+WHERE wc_id = ?1 AND op_depth > 0
AND IS_STRICT_DESCENDANT_OF(moved_to, ?2)
+/* This statement returns pairs of paths that define a move where the
+ destination of the move is within the subtree rooted at path ?2 in
+ WC_ID ?1. */
+-- STMT_SELECT_MOVED_PAIR
+SELECT local_relpath, moved_to, op_depth FROM nodes_current
+WHERE wc_id = ?1
+ AND (IS_STRICT_DESCENDANT_OF(moved_to, ?2)
+ OR (IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
+ AND moved_to IS NOT NULL))
+
+/* This statement returns pairs of move-roots below the path ?2 in WC_ID ?1,
+ * where the source of the move is within the subtree rooted at path ?2, and
+ * the destination of the move is outside the subtree rooted at path ?2. */
+-- STMT_SELECT_MOVED_PAIR2
+SELECT local_relpath, moved_to FROM nodes_current
+WHERE wc_id = ?1
+ AND IS_STRICT_DESCENDANT_OF(local_relpath, ?2)
+ AND moved_to IS NOT NULL
+ AND NOT IS_STRICT_DESCENDANT_OF(moved_to, ?2)
+
/* ------------------------------------------------------------------------- */
/* Queries for verification. */
Modified: subversion/branches/javahl-ra/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/libsvn_wc/wc.h?rev=1329209&r1=1329208&r2=1329209&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/javahl-ra/subversion/libsvn_wc/wc.h Mon Apr 23 12:32:48 2012
@@ -620,6 +620,7 @@ svn_wc__internal_get_origin(svn_boolean_
const char **repos_relpath,
const char **repos_root_url,
const char **repos_uuid,
+ const char **copy_root_abspath,
svn_wc__db_t *db,
const char *local_abspath,
svn_boolean_t scan_deleted,
@@ -724,6 +725,41 @@ svn_wc__perform_file_merge(svn_skel_t **
apr_pool_t *scratch_pool);
+/* Couple of random helpers for the Ev2 shims.
+ ### These will eventually be obsoleted and removed. */
+struct svn_wc__shim_fetch_baton_t
+{
+ svn_wc__db_t *db;
+ const char *base_abspath;
+ svn_boolean_t fetch_base;
+};
+
+/* Using a BATON of struct shim_fetch_baton, return KIND for PATH. */
+svn_error_t *
+svn_wc__fetch_kind_func(svn_kind_t *kind,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *scratch_pool);
+
+/* Using a BATON of struct shim_fetch_baton, return PROPS for PATH. */
+svn_error_t *
+svn_wc__fetch_props_func(apr_hash_t **props,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/* Using a BATON of struct shim_fetch_baton, return a delta base for PATH. */
+svn_error_t *
+svn_wc__fetch_base_func(const char **filename,
+ void *baton,
+ const char *path,
+ svn_revnum_t base_revision,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */