You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2011/08/30 19:23:09 UTC
svn commit: r1163296 - in /subversion/trunk/subversion/libsvn_client:
client.h diff.c merge.c repos_diff.c
Author: julianfoad
Date: Tue Aug 30 17:23:08 2011
New Revision: 1163296
URL: http://svn.apache.org/viewvc?rev=1163296&view=rev
Log:
Remove knowledge of the WC from the client's repos-repos diff editor. This
knowledge was only used as a convenience by the merge code, to provide
ready-made WC abspaths into its callbacks, and was not used at all by the
diff code that is the other client of this editor.
* subversion/libsvn_client/client.h
(svn_client__get_diff_editor): Remove 'target' and 'wc_ctx' parameters.
* subversion/libsvn_client/diff.c
(diff_repos_repos, diff_summarize_repos_repos): Adjust callers.
* subversion/libsvn_client/merge.c
(merge_dir_props_changed, merge_file_changed, merge_file_added,
merge_file_deleted, merge_dir_added, merge_dir_deleted,
merge_dir_opened): Calculate the abspath from the received relpath.
(notification_receiver): Calculate the abspath from the received relpath.
(drive_merge_report_editor, do_file_merge): Adjust accordingly.
* subversion/libsvn_client/repos_diff.c
(edit_baton): Remove 'target' and 'wc_ctx' fields.
(dir_baton, file_baton): Remove 'wcpath' field.
(make_dir_baton, make_file_baton): Stop initializing those fields.
(diff_deleted_dir, delete_entry, add_directory, open_directory, open_file,
close_file, close_directory, absent_directory, absent_file): Use the
target-relative path instead of the WC path when providing paths to
callbacks.
(svn_client__get_diff_editor): Remove 'target' and 'wc_ctx' parameters.
Modified:
subversion/trunk/subversion/libsvn_client/client.h
subversion/trunk/subversion/libsvn_client/diff.c
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/libsvn_client/repos_diff.c
Modified: subversion/trunk/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/client.h?rev=1163296&r1=1163295&r2=1163296&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/client.h (original)
+++ subversion/trunk/subversion/libsvn_client/client.h Tue Aug 30 17:23:08 2011
@@ -584,12 +584,6 @@ svn_client__switch_internal(svn_revnum_t
/* Create an editor for a pure repository comparison, i.e. comparing one
repository version against the other.
- TARGET is a working-copy path, the base of the hierarchy to be
- compared. It corresponds to the URL opened in RA_SESSION below.
-
- WC_CTX is a context for the working copy and should be NULL for
- operations that do not involve a working copy.
-
DIFF_CMD/DIFF_CMD_BATON represent the callback and callback argument that
implement the file comparison function
@@ -618,8 +612,6 @@ svn_client__switch_internal(svn_revnum_t
svn_error_t *
svn_client__get_diff_editor(const svn_delta_editor_t **editor,
void **edit_baton,
- svn_wc_context_t *wc_ctx,
- const char *target,
svn_depth_t depth,
svn_ra_session_t *ra_session,
svn_revnum_t revision,
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1163296&r1=1163295&r2=1163296&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Tue Aug 30 17:23:08 2011
@@ -1751,7 +1751,7 @@ diff_repos_repos(const svn_wc_diff_callb
Otherwise, we just use "". */
SVN_ERR(svn_client__get_diff_editor(
&diff_editor, &diff_edit_baton,
- NULL, "", depth,
+ depth,
extra_ra_session, rev1, TRUE /* walk_deleted_dirs */,
TRUE /* text_deltas */,
callbacks, callback_baton,
@@ -2119,7 +2119,7 @@ diff_summarize_repos_repos(svn_client_di
/* Set up the repos_diff editor. */
SVN_ERR(svn_client__get_diff_editor(&diff_editor, &diff_edit_baton,
- NULL /* wc_ctx */, "", depth,
+ depth,
extra_ra_session, rev1, TRUE /* walk_deleted_dirs */,
FALSE /* text_deltas */,
callbacks, callback_baton,
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1163296&r1=1163295&r2=1163296&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Tue Aug 30 17:23:08 2011
@@ -1244,7 +1244,7 @@ merge_props_changed(svn_wc_notify_state_
static svn_error_t *
merge_dir_props_changed(svn_wc_notify_state_t *state,
svn_boolean_t *tree_conflicted,
- const char *local_abspath,
+ const char *local_relpath,
svn_boolean_t dir_was_added,
const apr_array_header_t *propchanges,
apr_hash_t *original_props,
@@ -1252,6 +1252,8 @@ merge_dir_props_changed(svn_wc_notify_st
apr_pool_t *scratch_pool)
{
merge_cmd_baton_t *merge_b = diff_baton;
+ const char *local_abspath = svn_dirent_join(merge_b->target_abspath,
+ local_relpath, scratch_pool);
svn_wc_notify_state_t obstr_state;
SVN_ERR(perform_obstruction_check(&obstr_state, NULL, NULL,
@@ -1420,7 +1422,7 @@ static svn_error_t *
merge_file_changed(svn_wc_notify_state_t *content_state,
svn_wc_notify_state_t *prop_state,
svn_boolean_t *tree_conflicted,
- const char *mine_abspath,
+ const char *mine_relpath,
const char *older_abspath,
const char *yours_abspath,
svn_revnum_t older_rev,
@@ -1433,6 +1435,8 @@ merge_file_changed(svn_wc_notify_state_t
apr_pool_t *scratch_pool)
{
merge_cmd_baton_t *merge_b = baton;
+ const char *mine_abspath = svn_dirent_join(merge_b->target_abspath,
+ mine_relpath, scratch_pool);
enum svn_wc_merge_outcome_t merge_outcome;
svn_node_kind_t wc_kind;
svn_boolean_t is_deleted;
@@ -1646,7 +1650,7 @@ static svn_error_t *
merge_file_added(svn_wc_notify_state_t *content_state,
svn_wc_notify_state_t *prop_state,
svn_boolean_t *tree_conflicted,
- const char *mine_abspath,
+ const char *mine_relpath,
const char *older_abspath,
const char *yours_abspath,
svn_revnum_t rev1,
@@ -1661,6 +1665,8 @@ merge_file_added(svn_wc_notify_state_t *
apr_pool_t *scratch_pool)
{
merge_cmd_baton_t *merge_b = baton;
+ const char *mine_abspath = svn_dirent_join(merge_b->target_abspath,
+ mine_relpath, scratch_pool);
svn_node_kind_t kind;
int i;
apr_hash_t *file_props;
@@ -1981,7 +1987,7 @@ files_same_p(svn_boolean_t *same,
static svn_error_t *
merge_file_deleted(svn_wc_notify_state_t *state,
svn_boolean_t *tree_conflicted,
- const char *mine_abspath,
+ const char *mine_relpath,
const char *older_abspath,
const char *yours_abspath,
const char *mimetype1,
@@ -1991,6 +1997,8 @@ merge_file_deleted(svn_wc_notify_state_t
apr_pool_t *scratch_pool)
{
merge_cmd_baton_t *merge_b = baton;
+ const char *mine_abspath = svn_dirent_join(merge_b->target_abspath,
+ mine_relpath, scratch_pool);
svn_node_kind_t kind;
svn_boolean_t moved_away;
svn_wc_conflict_reason_t reason;
@@ -2112,7 +2120,7 @@ merge_dir_added(svn_wc_notify_state_t *s
svn_boolean_t *tree_conflicted,
svn_boolean_t *skip,
svn_boolean_t *skip_children,
- const char *local_abspath,
+ const char *local_relpath,
svn_revnum_t rev,
const char *copyfrom_path,
svn_revnum_t copyfrom_revision,
@@ -2120,6 +2128,8 @@ merge_dir_added(svn_wc_notify_state_t *s
apr_pool_t *scratch_pool)
{
merge_cmd_baton_t *merge_b = baton;
+ const char *local_abspath = svn_dirent_join(merge_b->target_abspath,
+ local_relpath, scratch_pool);
svn_node_kind_t kind;
const char *copyfrom_url = NULL, *child;
svn_revnum_t copyfrom_rev = SVN_INVALID_REVNUM;
@@ -2314,11 +2324,13 @@ merge_dir_added(svn_wc_notify_state_t *s
static svn_error_t *
merge_dir_deleted(svn_wc_notify_state_t *state,
svn_boolean_t *tree_conflicted,
- const char *local_abspath,
+ const char *local_relpath,
void *baton,
apr_pool_t *scratch_pool)
{
merge_cmd_baton_t *merge_b = baton;
+ const char *local_abspath = svn_dirent_join(merge_b->target_abspath,
+ local_relpath, scratch_pool);
svn_node_kind_t kind;
svn_error_t *err;
svn_boolean_t is_versioned;
@@ -2454,12 +2466,14 @@ static svn_error_t *
merge_dir_opened(svn_boolean_t *tree_conflicted,
svn_boolean_t *skip,
svn_boolean_t *skip_children,
- const char *local_abspath,
+ const char *local_relpath,
svn_revnum_t rev,
void *baton,
apr_pool_t *scratch_pool)
{
merge_cmd_baton_t *merge_b = baton;
+ const char *local_abspath = svn_dirent_join(merge_b->target_abspath,
+ local_relpath, scratch_pool);
svn_depth_t parent_depth;
svn_node_kind_t wc_kind;
svn_wc_notify_state_t obstr_state;
@@ -2694,7 +2708,7 @@ notification_receiver(void *baton, const
{
notification_receiver_baton_t *notify_b = baton;
svn_boolean_t is_operative_notification = FALSE;
- const char *notify_path;
+ const char *notify_abspath;
/* Skip notifications if this is a --record-only merge that is adding
or deleting NOTIFY->PATH, allow only mergeinfo changes and headers.
@@ -2717,7 +2731,8 @@ notification_receiver(void *baton, const
* not yet implemented.
* ### We should stash the info about which moves have been followed and
* retrieve that info here, instead of querying the WC again here. */
- notify_path = notify->path;
+ notify_abspath = svn_dirent_join(notify_b->merge_b->target_abspath,
+ notify->path, pool);
if (notify->action == svn_wc_notify_update_update
&& notify->kind == svn_node_file)
{
@@ -2726,7 +2741,7 @@ notification_receiver(void *baton, const
err = svn_wc__node_was_moved_away(&moved_to_abspath, NULL,
notify_b->merge_b->ctx->wc_ctx,
- notify->path, pool, pool);
+ notify_abspath, pool, pool);
if (err)
{
if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
@@ -2735,10 +2750,14 @@ notification_receiver(void *baton, const
moved_to_abspath = NULL;
}
else
- return; /* ### return svn_error_trace(err); */
+ {
+ /* ### return svn_error_trace(err); */
+ svn_error_clear(err);
+ return;
+ }
}
if (moved_to_abspath)
- notify_path = moved_to_abspath;
+ notify_abspath = moved_to_abspath;
}
if (notify_b->merge_b->sources_ancestral
@@ -2750,7 +2769,8 @@ notification_receiver(void *baton, const
|| notify->prop_state == svn_wc_notify_state_changed
|| notify->action == svn_wc_notify_update_add)
{
- const char *merged_path = apr_pstrdup(notify_b->pool, notify_path);
+ const char *merged_path = apr_pstrdup(notify_b->pool,
+ notify_abspath);
if (notify_b->merged_abspaths == NULL)
notify_b->merged_abspaths = apr_hash_make(notify_b->pool);
@@ -2761,7 +2781,8 @@ notification_receiver(void *baton, const
if (notify->action == svn_wc_notify_skip)
{
- const char *skipped_path = apr_pstrdup(notify_b->pool, notify_path);
+ const char *skipped_path = apr_pstrdup(notify_b->pool,
+ notify_abspath);
if (notify_b->skipped_abspaths == NULL)
notify_b->skipped_abspaths = apr_hash_make(notify_b->pool);
@@ -2773,7 +2794,7 @@ notification_receiver(void *baton, const
if (notify->action == svn_wc_notify_tree_conflict)
{
const char *tree_conflicted_path = apr_pstrdup(notify_b->pool,
- notify_path);
+ notify_abspath);
if (notify_b->tree_conflicted_abspaths == NULL)
notify_b->tree_conflicted_abspaths =
@@ -2787,7 +2808,8 @@ notification_receiver(void *baton, const
if (notify->action == svn_wc_notify_update_add)
{
svn_boolean_t is_root_of_added_subtree = FALSE;
- const char *added_path = apr_pstrdup(notify_b->pool, notify_path);
+ const char *added_path = apr_pstrdup(notify_b->pool,
+ notify_abspath);
const char *added_path_parent = NULL;
/* Stash the root path of any added subtrees. */
@@ -2836,7 +2858,7 @@ notification_receiver(void *baton, const
find_nearest_ancestor(
notify_b->children_with_mergeinfo,
notify->action != svn_wc_notify_update_delete,
- notify_path);
+ notify_abspath);
if (new_nearest_ancestor_index != notify_b->cur_ancestor_index)
{
@@ -2884,7 +2906,12 @@ notification_receiver(void *baton, const
}
if (notify_b->wrapped_func)
- (*notify_b->wrapped_func)(notify_b->wrapped_baton, notify, pool);
+ {
+ svn_wc_notify_t notify2 = *notify;
+
+ notify2.path = notify_abspath;
+ notify_b->wrapped_func(notify_b->wrapped_baton, ¬ify2, pool);
+ }
}
/* Set *OUT_RANGELIST to the intersection of IN_RANGELIST with the simple
@@ -5201,7 +5228,6 @@ drive_merge_report_editor(const char *ta
/* Get the diff editor and a reporter with which to, ultimately,
drive it. */
SVN_ERR(svn_client__get_diff_editor(&diff_editor, &diff_edit_baton,
- merge_b->ctx->wc_ctx, target_abspath,
depth,
merge_b->ra_session2, revision1,
FALSE /* walk_deleted_dirs */,
@@ -7062,6 +7088,7 @@ do_file_merge(svn_mergeinfo_catalog_t re
if (!merge_b->record_only)
{
apr_array_header_t *ranges_to_merge = remaining_ranges;
+ const char *target_relpath = ""; /* relative to root of merge */
int i;
/* If we have ancestrally related sources and more than one
@@ -7097,7 +7124,7 @@ do_file_merge(svn_mergeinfo_catalog_t re
svn_pool_clear(iterpool);
- n = svn_wc_create_notify(target_abspath,
+ n = svn_wc_create_notify(target_relpath,
merge_b->same_repos
? svn_wc_notify_merge_begin
: svn_wc_notify_foreign_merge_begin,
@@ -7155,14 +7182,14 @@ do_file_merge(svn_mergeinfo_catalog_t re
/* Delete... */
SVN_ERR(merge_file_deleted(&text_state,
&tree_conflicted,
- target_abspath,
+ target_relpath,
tmpfile1,
tmpfile2,
mimetype1, mimetype2,
props1,
merge_b,
iterpool));
- single_file_merge_notify(notify_b, target_abspath,
+ single_file_merge_notify(notify_b, target_relpath,
tree_conflicted
? svn_wc_notify_tree_conflict
: svn_wc_notify_update_delete,
@@ -7173,7 +7200,7 @@ do_file_merge(svn_mergeinfo_catalog_t re
/* ...plus add... */
SVN_ERR(merge_file_added(&text_state, &prop_state,
&tree_conflicted,
- target_abspath,
+ target_relpath,
tmpfile1,
tmpfile2,
r->start,
@@ -7183,7 +7210,7 @@ do_file_merge(svn_mergeinfo_catalog_t re
propchanges, props1,
merge_b,
iterpool));
- single_file_merge_notify(notify_b, target_abspath,
+ single_file_merge_notify(notify_b, target_relpath,
tree_conflicted
? svn_wc_notify_tree_conflict
: svn_wc_notify_update_add,
@@ -7195,7 +7222,7 @@ do_file_merge(svn_mergeinfo_catalog_t re
{
SVN_ERR(merge_file_changed(&text_state, &prop_state,
&tree_conflicted,
- target_abspath,
+ target_relpath,
tmpfile1,
tmpfile2,
r->start,
@@ -7204,7 +7231,7 @@ do_file_merge(svn_mergeinfo_catalog_t re
propchanges, props1,
merge_b,
iterpool));
- single_file_merge_notify(notify_b, target_abspath,
+ single_file_merge_notify(notify_b, target_relpath,
tree_conflicted
? svn_wc_notify_tree_conflict
: svn_wc_notify_update_update,
Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/repos_diff.c?rev=1163296&r1=1163295&r2=1163296&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/repos_diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/repos_diff.c Tue Aug 30 17:23:08 2011
@@ -51,14 +51,6 @@
/* Overall crawler editor baton. */
struct edit_baton {
- /* TARGET is a working-copy directory which corresponds to the base
- URL open in RA_SESSION below. */
- const char *target;
-
- /* A working copy context for TARGET, NULL if this is purely a
- repository operation. */
- svn_wc_context_t *wc_ctx;
-
/* The passed depth */
svn_depth_t depth;
@@ -140,9 +132,6 @@ struct dir_baton {
/* The path of the directory within the repository */
const char *path;
- /* The path of the directory in the wc, relative to cwd */
- const char *wcpath;
-
/* The baton for the parent directory, or null if this is the root of the
hierarchy to be compared. */
struct dir_baton *dir_baton;
@@ -179,9 +168,6 @@ struct file_baton {
/* The path of the file within the repository */
const char *path;
- /* The path of the file in the wc, relative to cwd */
- const char *wcpath;
-
/* The path and APR file handle to the temporary file that contains the
first repository version. Also, the pristine-property list of
this file. */
@@ -242,7 +228,6 @@ make_dir_baton(const char *path,
dir_baton->skip_children = FALSE;
dir_baton->pool = dir_pool;
dir_baton->path = apr_pstrdup(dir_pool, path);
- dir_baton->wcpath = svn_dirent_join(edit_baton->target, path, dir_pool);
dir_baton->propchanges = apr_array_make(pool, 1, sizeof(svn_prop_t));
return dir_baton;
@@ -268,7 +253,6 @@ make_file_baton(const char *path,
file_baton->skip = FALSE;
file_baton->pool = file_pool;
file_baton->path = apr_pstrdup(file_pool, path);
- file_baton->wcpath = svn_dirent_join(edit_baton->target, path, file_pool);
file_baton->propchanges = apr_array_make(pool, 1, sizeof(svn_prop_t));
file_baton->base_revision = edit_baton->revision;
@@ -557,7 +541,7 @@ diff_deleted_dir(const char *dir,
get_file_mime_types(&mimetype1, &mimetype2, b);
SVN_ERR(eb->diff_callbacks->file_deleted(
- NULL, NULL, b->wcpath,
+ NULL, NULL, b->path,
b->path_start_revision,
b->path_end_revision,
mimetype1, mimetype2,
@@ -568,10 +552,8 @@ diff_deleted_dir(const char *dir,
if (dirent->kind == svn_node_dir)
{
- const char *wcpath = svn_dirent_join(eb->target, path, iterpool);
-
SVN_ERR(eb->diff_callbacks->dir_deleted(
- NULL, NULL, wcpath,
+ NULL, NULL, path,
eb->diff_cmd_baton, iterpool));
SVN_ERR(diff_deleted_dir(path,
revision,
@@ -632,7 +614,7 @@ delete_entry(const char *path,
get_file_mime_types(&mimetype1, &mimetype2, b);
SVN_ERR(eb->diff_callbacks->file_deleted(
- &state, &tree_conflicted, b->wcpath,
+ &state, &tree_conflicted, b->path,
b->path_start_revision,
b->path_end_revision,
mimetype1, mimetype2,
@@ -646,7 +628,7 @@ delete_entry(const char *path,
{
SVN_ERR(eb->diff_callbacks->dir_deleted(
&state, &tree_conflicted,
- svn_dirent_join(eb->target, path, pool),
+ path,
eb->diff_cmd_baton, scratch_pool));
if (eb->walk_deleted_repos_dirs)
@@ -677,9 +659,9 @@ delete_entry(const char *path,
if (eb->notify_func)
{
- const char* deleted_path;
+ const char *deleted_path = apr_pstrdup(eb->pool, path);
deleted_path_notify_t *dpn = apr_pcalloc(eb->pool, sizeof(*dpn));
- deleted_path = svn_dirent_join(eb->target, path, eb->pool);
+
dpn->kind = kind;
dpn->action = tree_conflicted ? svn_wc_notify_tree_conflict : action;
dpn->state = state;
@@ -723,7 +705,7 @@ add_directory(const char *path,
SVN_ERR(eb->diff_callbacks->dir_added(
&state, &b->tree_conflicted,
- &b->skip, &b->skip_children, b->wcpath,
+ &b->skip, &b->skip_children, b->path,
eb->target_revision, copyfrom_path, copyfrom_revision,
eb->diff_cmd_baton, pool));
@@ -742,12 +724,12 @@ add_directory(const char *path,
/* Find out if a pending delete notification for this path is
* still around. */
- dpn = apr_hash_get(eb->deleted_paths, b->wcpath, APR_HASH_KEY_STRING);
+ dpn = apr_hash_get(eb->deleted_paths, b->path, APR_HASH_KEY_STRING);
if (dpn)
{
/* If any was found, we will handle the pending 'deleted path
* notification' (DPN) here. Remove it from the list. */
- apr_hash_set(eb->deleted_paths, b->wcpath,
+ apr_hash_set(eb->deleted_paths, b->path,
APR_HASH_KEY_STRING, NULL);
/* the pending delete might be on a different node kind. */
@@ -773,7 +755,7 @@ add_directory(const char *path,
else
action = svn_wc_notify_update_add;
- notify = svn_wc_create_notify(b->wcpath, action, pool);
+ notify = svn_wc_create_notify(b->path, action, pool);
notify->kind = kind;
notify->content_state = notify->prop_state = state;
(*eb->notify_func)(eb->notify_baton, notify, pool);
@@ -809,7 +791,7 @@ open_directory(const char *path,
SVN_ERR(eb->diff_callbacks->dir_opened(
&b->tree_conflicted, &b->skip,
- &b->skip_children, b->wcpath, base_revision,
+ &b->skip_children, b->path, base_revision,
b->edit_baton->diff_cmd_baton, pool));
return SVN_NO_ERROR;
@@ -872,7 +854,7 @@ open_file(const char *path,
SVN_ERR(eb->diff_callbacks->file_opened(
&b->tree_conflicted, &b->skip,
- b->wcpath, base_revision, eb->diff_cmd_baton, pool));
+ b->path, base_revision, eb->diff_cmd_baton, pool));
return SVN_NO_ERROR;
}
@@ -1043,7 +1025,7 @@ close_file(void *file_baton,
if (b->added)
SVN_ERR(eb->diff_callbacks->file_added(
&content_state, &prop_state, &b->tree_conflicted,
- b->wcpath,
+ b->path,
b->path_end_revision ? b->path_start_revision : NULL,
b->path_end_revision,
0,
@@ -1056,7 +1038,7 @@ close_file(void *file_baton,
else
SVN_ERR(eb->diff_callbacks->file_changed(
&content_state, &prop_state,
- &b->tree_conflicted, b->wcpath,
+ &b->tree_conflicted, b->path,
b->path_end_revision ? b->path_start_revision : NULL,
b->path_end_revision,
b->edit_baton->revision,
@@ -1077,12 +1059,12 @@ close_file(void *file_baton,
/* Find out if a pending delete notification for this path is
* still around. */
- dpn = apr_hash_get(eb->deleted_paths, b->wcpath, APR_HASH_KEY_STRING);
+ dpn = apr_hash_get(eb->deleted_paths, b->path, APR_HASH_KEY_STRING);
if (dpn)
{
/* If any was found, we will handle the pending 'deleted path
* notification' (DPN) here. Remove it from the list. */
- apr_hash_set(eb->deleted_paths, b->wcpath,
+ apr_hash_set(eb->deleted_paths, b->path,
APR_HASH_KEY_STRING, NULL);
/* the pending delete might be on a different node kind. */
@@ -1111,7 +1093,7 @@ close_file(void *file_baton,
else
action = svn_wc_notify_update_update;
- notify = svn_wc_create_notify(b->wcpath, action, scratch_pool);
+ notify = svn_wc_create_notify(b->path, action, scratch_pool);
notify->kind = kind;
notify->content_state = content_state;
notify->prop_state = prop_state;
@@ -1159,7 +1141,7 @@ close_directory(void *dir_baton,
svn_boolean_t tree_conflicted = FALSE;
SVN_ERR(eb->diff_callbacks->dir_props_changed(
&prop_state, &tree_conflicted,
- b->wcpath, b->added,
+ b->path, b->added,
b->propchanges, b->pristine_props,
b->edit_baton->diff_cmd_baton, scratch_pool));
if (tree_conflicted)
@@ -1174,7 +1156,7 @@ close_directory(void *dir_baton,
}
SVN_ERR(eb->diff_callbacks->dir_closed(NULL, NULL, NULL,
- b->wcpath, b->added,
+ b->path, b->added,
b->edit_baton->diff_cmd_baton,
scratch_pool));
@@ -1215,7 +1197,7 @@ close_directory(void *dir_baton,
else
action = svn_wc_notify_update_update;
- notify = svn_wc_create_notify(b->wcpath, action, pool);
+ notify = svn_wc_create_notify(b->path, action, pool);
notify->kind = svn_node_dir;
/* In case of a tree conflict during merge, the diff callback
@@ -1308,11 +1290,8 @@ absent_directory(const char *path,
if (eb->notify_func)
{
svn_wc_notify_t *notify
- = svn_wc_create_notify(svn_dirent_join(pb->wcpath,
- svn_relpath_basename(path,
- NULL),
- pool),
- svn_wc_notify_skip, pool);
+ = svn_wc_create_notify(path, svn_wc_notify_skip, pool);
+
notify->kind = svn_node_dir;
notify->content_state = notify->prop_state
= svn_wc_notify_state_missing;
@@ -1338,11 +1317,8 @@ absent_file(const char *path,
if (eb->notify_func)
{
svn_wc_notify_t *notify
- = svn_wc_create_notify(svn_dirent_join(pb->wcpath,
- svn_relpath_basename(path,
- pool),
- pool),
- svn_wc_notify_skip, pool);
+ = svn_wc_create_notify(path, svn_wc_notify_skip, pool);
+
notify->kind = svn_node_file;
notify->content_state = notify->prop_state
= svn_wc_notify_state_missing;
@@ -1356,8 +1332,6 @@ absent_file(const char *path,
svn_error_t *
svn_client__get_diff_editor(const svn_delta_editor_t **editor,
void **edit_baton,
- svn_wc_context_t *wc_ctx,
- const char *target,
svn_depth_t depth,
svn_ra_session_t *ra_session,
svn_revnum_t revision,
@@ -1376,8 +1350,6 @@ svn_client__get_diff_editor(const svn_de
struct edit_baton *eb = apr_pcalloc(editor_pool, sizeof(*eb));
eb->pool = editor_pool;
- eb->target = target;
- eb->wc_ctx = wc_ctx;
eb->depth = depth;
eb->diff_callbacks = diff_callbacks;
eb->diff_cmd_baton = diff_cmd_baton;
Re: RA-serf inconsistency calling editor:absent_file/dir [was: svn
commit: r1163296 ...]
Posted by Julian Foad <ju...@wandisco.com>.
On Thu, 2011-09-01 at 10:18 -0400, Greg Stein wrote:
> On Wed, Aug 31, 2011 at 17:06, Julian Foad <ju...@wandisco.com> wrote:
> > I (Julian Foad) wrote:
> >> Fixed in r1163704 (plus fat-finger follow-ups r1163707 and r1163711).
> >>
> >> static svn_error_t *
> >> absent_file(const char *path,
> >> void *parent_baton,
> >> apr_pool_t *pool)
> >> {
> >> struct dir_baton *pb = parent_baton;
> >>
> >> /* ### This 'join ... basename' works around an inconsistency whereby
> >> * RA-serf gives PATH as just the basename instead of the full path. */
> >> [...] svn_dirent_join(pb->path,
> >> svn_relpath_basename(path, NULL),
> >> pool) [...]
> >> }
> >>
> >> This restored a work-around for an inconsistency in RA-serf, which I
> >> removed, having no idea that's what it was. Now I've added comments
> >> explaining it.
> >>
> >> The inconsistency is that when RA-serf calls
> >> svn_delta_editor_t.absent_directory() or .absent_file() it passes 'path'
> >> as a whole path (relative to the root of the edit drive?) whereas
> >> RA-neon and RA-svn pass just the basename of the directory or file.
>
> Just to clarify because the commit showed ra_serf passed a *basename*
> and the others passed a path. So: the paragraph just above is
> backwards from your intent?
Oops, yes, you're right, it was the other way around. Thanks.
- Julian
Re: RA-serf inconsistency calling editor:absent_file/dir [was: svn
commit: r1163296 ...]
Posted by Greg Stein <gs...@gmail.com>.
On Wed, Aug 31, 2011 at 17:06, Julian Foad <ju...@wandisco.com> wrote:
> I (Julian Foad) wrote:
>> Fixed in r1163704 (plus fat-finger follow-ups r1163707 and r1163711).
>>
>> static svn_error_t *
>> absent_file(const char *path,
>> void *parent_baton,
>> apr_pool_t *pool)
>> {
>> struct dir_baton *pb = parent_baton;
>>
>> /* ### This 'join ... basename' works around an inconsistency whereby
>> * RA-serf gives PATH as just the basename instead of the full path. */
>> [...] svn_dirent_join(pb->path,
>> svn_relpath_basename(path, NULL),
>> pool) [...]
>> }
>>
>> This restored a work-around for an inconsistency in RA-serf, which I
>> removed, having no idea that's what it was. Now I've added comments
>> explaining it.
>>
>> The inconsistency is that when RA-serf calls
>> svn_delta_editor_t.absent_directory() or .absent_file() it passes 'path'
>> as a whole path (relative to the root of the edit drive?) whereas
>> RA-neon and RA-svn pass just the basename of the directory or file.
Just to clarify because the commit showed ra_serf passed a *basename*
and the others passed a path. So: the paragraph just above is
backwards from your intent?
Cheers,
-g
RA-serf inconsistency calling editor:absent_file/dir [was: svn
commit: r1163296 ...]
Posted by Julian Foad <ju...@wandisco.com>.
I (Julian Foad) wrote:
> Fixed in r1163704 (plus fat-finger follow-ups r1163707 and r1163711).
>
> static svn_error_t *
> absent_file(const char *path,
> void *parent_baton,
> apr_pool_t *pool)
> {
> struct dir_baton *pb = parent_baton;
>
> /* ### This 'join ... basename' works around an inconsistency whereby
> * RA-serf gives PATH as just the basename instead of the full path. */
> [...] svn_dirent_join(pb->path,
> svn_relpath_basename(path, NULL),
> pool) [...]
> }
>
> This restored a work-around for an inconsistency in RA-serf, which I
> removed, having no idea that's what it was. Now I've added comments
> explaining it.
>
> The inconsistency is that when RA-serf calls
> svn_delta_editor_t.absent_directory() or .absent_file() it passes 'path'
> as a whole path (relative to the root of the edit drive?) whereas
> RA-neon and RA-svn pass just the basename of the directory or file.
Bert and/or I will look into this tomorrow.
- Julian
Re: svn commit: r1163296 - in
/subversion/trunk/subversion/libsvn_client: client.h diff.c merge.c
repos_diff.c
Posted by Julian Foad <ju...@wandisco.com>.
I (Julian Foad) wrote:
> Philip Martin wrote:
> > "Bert Huijben" <be...@qqmail.nl> writes:
> >
> > > This patch causes merge_authz_tests.py 1 "skipped paths get overriding
> > > mergeinfo" to fail on ra_serf. (See the svn-slik-w2k3-x64-ra
> > > buildbot).
> >
> > It also fails on Linux with serf.
>
> I'm looking into this now.
Fixed in r1163704 (plus fat-finger follow-ups r1163707 and r1163711).
static svn_error_t *
absent_file(const char *path,
void *parent_baton,
apr_pool_t *pool)
{
struct dir_baton *pb = parent_baton;
/* ### This 'join ... basename' works around an inconsistency whereby
* RA-serf gives PATH as just the basename instead of the full path. */
[...] svn_dirent_join(pb->path,
svn_relpath_basename(path, NULL),
pool) [...]
}
This restored a work-around for an inconsistency in RA-serf, which I
removed, having no idea that's what it was. Now I've added comments
explaining it.
The inconsistency is that when RA-serf calls
svn_delta_editor_t.absent_directory() or .absent_file() it passes 'path'
as a whole path (relative to the root of the edit drive?) whereas
RA-neon and RA-svn pass just the basename of the directory or file.
- Julian
Re: svn commit: r1163296 - in
/subversion/trunk/subversion/libsvn_client: client.h diff.c merge.c
repos_diff.c
Posted by Julian Foad <ju...@wandisco.com>.
Philip Martin wrote:
> "Bert Huijben" <be...@qqmail.nl> writes:
>
> > This patch causes merge_authz_tests.py 1 "skipped paths get overriding
> > mergeinfo" to fail on ra_serf. (See the svn-slik-w2k3-x64-ra
> > buildbot).
>
> It also fails on Linux with serf.
I'm looking into this now.
- Julian
Re: svn commit: r1163296 - in /subversion/trunk/subversion/libsvn_client: client.h diff.c merge.c repos_diff.c
Posted by Philip Martin <ph...@wandisco.com>.
"Bert Huijben" <be...@qqmail.nl> writes:
> This patch causes merge_authz_tests.py 1 "skipped paths get overriding
> mergeinfo" to fail on ra_serf. (See the svn-slik-w2k3-x64-ra
> buildbot).
It also fails on Linux with serf.
--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
RE: svn commit: r1163296 - in /subversion/trunk/subversion/libsvn_client: client.h diff.c merge.c repos_diff.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: julianfoad@apache.org [mailto:julianfoad@apache.org]
> Sent: dinsdag 30 augustus 2011 19:23
> To: commits@subversion.apache.org
> Subject: svn commit: r1163296 - in
> /subversion/trunk/subversion/libsvn_client: client.h diff.c merge.c
> repos_diff.c
>
> Author: julianfoad
> Date: Tue Aug 30 17:23:08 2011
> New Revision: 1163296
>
> URL: http://svn.apache.org/viewvc?rev=1163296&view=rev
> Log:
> Remove knowledge of the WC from the client's repos-repos diff editor. This
> knowledge was only used as a convenience by the merge code, to provide
> ready-made WC abspaths into its callbacks, and was not used at all by the
> diff code that is the other client of this editor.
This patch causes merge_authz_tests.py 1 "skipped paths get overriding mergeinfo" to fail on ra_serf. (See the svn-slik-w2k3-x64-ra buildbot).
Bert