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 2010/12/10 22:23:13 UTC
svn commit: r1044516 [6/22] - in /subversion/branches/ignore-mergeinfo: ./
build/ac-macros/ build/generator/ contrib/server-side/ notes/ notes/wc-ng/
subversion/bindings/javahl/native/
subversion/bindings/javahl/src/org/apache/subversion/javahl/ subver...
Modified: subversion/branches/ignore-mergeinfo/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/include/svn_wc.h?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/include/svn_wc.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/include/svn_wc.h Fri Dec 10 21:23:03 2010
@@ -1254,20 +1254,22 @@ typedef struct svn_wc_notify_t {
* @since New in 1.7 */
svn_revnum_t old_revision;
- /* These fields are used by svn patch to identify the
+ /** These fields are used by svn patch to identify the
* hunk the notification is for. They are line-based
* offsets and lengths parsed from the unidiff hunk header.
* @since New in 1.7. */
+ /* @{ */
svn_linenum_t hunk_original_start;
svn_linenum_t hunk_original_length;
svn_linenum_t hunk_modified_start;
svn_linenum_t hunk_modified_length;
+ /* @} */
- /* The line at which a hunk was matched (and applied).
+ /** The line at which a hunk was matched (and applied).
* @since New in 1.7. */
svn_linenum_t hunk_matched_line;
- /* The fuzz factor the hunk was applied with.
+ /** The fuzz factor the hunk was applied with.
* @since New in 1.7 */
int hunk_fuzz;
@@ -1424,11 +1426,11 @@ typedef svn_error_t *(*svn_wc_get_file_t
*/
typedef enum svn_wc_conflict_action_t
{
- svn_wc_conflict_action_edit, /* attempting to change text or props */
- svn_wc_conflict_action_add, /* attempting to add object */
- svn_wc_conflict_action_delete, /* attempting to delete object */
- svn_wc_conflict_action_replace /* attempting to replace object,
- @since New in 1.7 */
+ svn_wc_conflict_action_edit, /**< attempting to change text or props */
+ svn_wc_conflict_action_add, /**< attempting to add object */
+ svn_wc_conflict_action_delete, /**< attempting to delete object */
+ svn_wc_conflict_action_replace /**< attempting to replace object,
+ @since New in 1.7 */
} svn_wc_conflict_action_t;
@@ -2070,20 +2072,20 @@ svn_wc__conflict_description2_dup(
*/
typedef enum svn_wc_conflict_choice_t
{
- /* Don't resolve the conflict now. Let libsvn_wc mark the path
+ /** Don't resolve the conflict now. Let libsvn_wc mark the path
'conflicted', so user can run 'svn resolved' later. */
svn_wc_conflict_choose_postpone,
- /* If there were files to choose from, select one as a way of
+ /** If there were files to choose from, select one as a way of
resolving the conflict here and now. libsvn_wc will then do the
work of "installing" the chosen file.
*/
- svn_wc_conflict_choose_base, /* original version */
- svn_wc_conflict_choose_theirs_full, /* incoming version */
- svn_wc_conflict_choose_mine_full, /* own version */
- svn_wc_conflict_choose_theirs_conflict, /* incoming (for conflicted hunks) */
- svn_wc_conflict_choose_mine_conflict, /* own (for conflicted hunks) */
- svn_wc_conflict_choose_merged /* merged version */
+ svn_wc_conflict_choose_base, /**< original version */
+ svn_wc_conflict_choose_theirs_full, /**< incoming version */
+ svn_wc_conflict_choose_mine_full, /**< own version */
+ svn_wc_conflict_choose_theirs_conflict, /**< incoming (for conflicted hunks) */
+ svn_wc_conflict_choose_mine_conflict, /**< own (for conflicted hunks) */
+ svn_wc_conflict_choose_merged /**< merged version */
} svn_wc_conflict_choice_t;
@@ -3508,7 +3510,7 @@ enum svn_wc_status_kind
/** text or props have been modified */
svn_wc_status_modified,
- /** local mods received repos mods */
+ /** local mods received repos mods (### unused) */
svn_wc_status_merged,
/** local mods received conflicting repos mods */
@@ -4409,7 +4411,7 @@ svn_wc_delete(const char *path,
* and anything below it will be scheduled for addition inside the parent
* working copy as a copy of the original location. The separate working
* copy will be integrated by this step. In this case, which is only used
- * by code like that of 'svn cp URL@rev path' @a copyfrom_url and
+ * by code like that of "svn cp URL@rev path" @a copyfrom_url and
* @a copyfrom_rev MUST BE the the url and revision of @a local_abspath
* in the separate working copy.
*
@@ -5365,10 +5367,6 @@ svn_wc_get_actual_target(const char *pat
* whenever external changes are encountered, giving the callback a chance
* to store the external information for processing.
*
- * If @a fetch_func is non-NULL, then use it (with @a fetch_baton) as
- * a fallback for retrieving repository files whenever 'copyfrom' args
- * are sent into editor->add_file().
- *
* If @a diff3_cmd is non-NULL, then use it as the diff3 command for
* any merging; otherwise, use the built-in merge code.
*
@@ -5419,8 +5417,6 @@ svn_wc_get_update_editor4(const svn_delt
svn_boolean_t allow_unver_obstructions,
const char *diff3_cmd,
const apr_array_header_t *preserved_exts,
- svn_wc_get_file_t fetch_func,
- void *fetch_baton,
svn_wc_conflict_resolver_func_t conflict_func,
void *conflict_baton,
svn_wc_external_update_t external_func,
@@ -5434,7 +5430,8 @@ svn_wc_get_update_editor4(const svn_delt
/** Similar to svn_wc_get_update_editor4, but uses access batons and relative
* path instead of a working copy context-abspath pair and
- * svn_wc_traversal_info_t instead of an externals callback.
+ * svn_wc_traversal_info_t instead of an externals callback. Also,
+ * @a fetch_func and @a fetch_baton are ignored.
*
* If @a ti is non-NULL, record traversal info in @a ti, for use by
* post-traversal accessors such as svn_wc_edited_externals().
@@ -5546,8 +5543,6 @@ svn_wc_get_switch_editor4(const svn_delt
svn_boolean_t allow_unver_obstructions,
const char *diff3_cmd,
const apr_array_header_t *preserved_exts,
- svn_wc_get_file_t fetch_func,
- void *fetch_baton,
svn_wc_conflict_resolver_func_t conflict_func,
void *conflict_baton,
svn_wc_external_update_t external_func,
@@ -5561,8 +5556,7 @@ svn_wc_get_switch_editor4(const svn_delt
/** Similar to svn_wc_get_switch_editor4, but uses access batons and relative
* path instead of a working copy context and svn_wc_traversal_info_t instead
- * of an externals callback. This function doesn't support an external file
- * fetcher.
+ * of an externals callback.
*
* If @a ti is non-NULL, record traversal info in @a ti, for use by
* post-traversal accessors such as svn_wc_edited_externals().
@@ -5963,6 +5957,10 @@ svn_wc_canonicalize_svn_prop(const svn_s
* appear as a diff against their copy source, or whether such paths will
* appear as if they were newly added in their entirety.
*
+ * If @a use_git_diff_format is TRUE, copied paths will be treated as added
+ * if they weren't modified after being copied. This allows the callbacks
+ * to generate appropriate --git diff headers for such files.
+ *
* If @a use_text_base is TRUE, then compare the repository against
* the working copy's text-base files, rather than the working files.
*
@@ -5991,6 +5989,7 @@ svn_wc_get_diff_editor6(const svn_delta_
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,
const apr_array_header_t *changelists,
@@ -6002,7 +6001,7 @@ svn_wc_get_diff_editor6(const svn_delta_
/**
* Similar to svn_wc_get_diff_editor6(), but with an
* #svn_wc_diff_callbacks3_t instead of #svn_wc_diff_callbacks4_t,
- * and @a show_copies_as_adds set to @c FALSE.
+ * @a show_copies_as_adds, and @a use_git_diff_format set to @c FALSE.
*
* @since New in 1.6.
*
@@ -6144,6 +6143,10 @@ svn_wc_get_diff_editor(svn_wc_adm_access
* appear as a diff against their copy source, or whether such paths will
* appear as if they were newly added in their entirety.
*
+ * If @a use_git_diff_format is TRUE, copied paths will be treated as added
+ * if they weren't modified after being copied. This allows the callbacks
+ * to generate appropriate --git diff headers for such files.
+ *
* @a changelists is an array of <tt>const char *</tt> changelist
* names, used as a restrictive filter on items whose differences are
* reported; that is, don't generate diffs about any item unless
@@ -6164,6 +6167,7 @@ svn_wc_diff6(svn_wc_context_t *wc_ctx,
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t show_copies_as_adds,
+ svn_boolean_t use_git_diff_format,
const apr_array_header_t *changelists,
svn_cancel_func_t cancel_func,
void *cancel_baton,
@@ -6171,8 +6175,9 @@ svn_wc_diff6(svn_wc_context_t *wc_ctx,
/**
* Similar to svn_wc_diff6(), but with a #svn_wc_diff_callbacks3_t argument
- * instead of #svn_wc_diff_callbacks4_t, and @a show_copies_as_adds set to
- * @c FALSE. It also doesn't allow specifying a cancel function.
+ * instead of #svn_wc_diff_callbacks4_t, @a show_copies_as_adds,
+ * and @a use_git_diff_format set to * @c FALSE.
+ * It also doesn't allow specifying a cancel function.
*
* @since New in 1.6.
*
@@ -6786,13 +6791,13 @@ typedef svn_error_t *(*svn_wc_relocation
const char *uuid,
const char *url);
-/** Change repository references at @a local_abspath and all it's children.
- * The pre-change URL should be @a from, and the post-change URL will be
- * @a to. @a validator (and its baton, @a validator_baton), will be called
- * for the newly generated base URL and calculated repo root.
+/** Recursively change repository references at @a wcroot_abspath
+ * (which is the root directory of a working copy). The pre-change
+ * URL should be @a from, and the post-change URL will be @a to. @a
+ * validator (and its baton, @a validator_baton), will be called for
+ * the newly generated base URL and calculated repo root.
*
- * If @a recurse is @c FALSE, none of the children of @a local_abspath will
- * be changed. @a wc_ctx is an working copy context.
+ * @a wc_ctx is an working copy context.
*
* @a scratch_pool will be used for temporary allocations.
*
@@ -6800,10 +6805,9 @@ typedef svn_error_t *(*svn_wc_relocation
*/
svn_error_t *
svn_wc_relocate4(svn_wc_context_t *wc_ctx,
- const char *local_abspath,
+ const char *wcroot_abspath,
const char *from,
const char *to,
- svn_boolean_t recurse,
svn_wc_relocation_validator3_t validator,
void *validator_baton,
apr_pool_t *scratch_pool);
@@ -6811,8 +6815,12 @@ svn_wc_relocate4(svn_wc_context_t *wc_ct
/** Similar to svn_wc_relocate4(), but with a #svn_wc_adm_access_t /
* relative path parameter pair.
*
+ * @note As of the 1.7 API, @a path is required to be a working copy
+ * root directory, and @a recurse is required to be TRUE.
+ *
* @since New in 1.5.
- * @deprecated Provided for backwards compatibility with the 1.6 API.
+ * @deprecated Provided for limited backwards compatibility with the
+ * 1.6 API.
*/
SVN_DEPRECATED
svn_error_t *
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/add.c?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/add.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/add.c Fri Dec 10 21:23:03 2010
@@ -43,6 +43,7 @@
#include "svn_hash.h"
#include "svn_sorts.h"
#include "client.h"
+#include "svn_ctype.h"
#include "private/svn_wc_private.h"
@@ -80,11 +81,11 @@ trim_string(char **pstr)
char *str = *pstr;
size_t i;
- while (apr_isspace(*str))
+ while (svn_ctype_isspace(*str))
str++;
*pstr = str;
i = strlen(str);
- while ((i > 0) && apr_isspace(str[i-1]))
+ while ((i > 0) && svn_ctype_isspace(str[i-1]))
i--;
str[i] = '\0';
}
@@ -656,6 +657,8 @@ static svn_error_t *
mkdir_urls(const apr_array_header_t *urls,
svn_boolean_t make_parents,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -805,8 +808,8 @@ mkdir_urls(const apr_array_header_t *url
/* Fetch RA commit editor */
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
- ctx->commit_callback2,
- ctx->commit_baton,
+ commit_callback,
+ commit_baton,
NULL, TRUE, /* No lock tokens */
pool));
@@ -867,6 +870,8 @@ svn_error_t *
svn_client_mkdir4(const apr_array_header_t *paths,
svn_boolean_t make_parents,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -875,7 +880,8 @@ svn_client_mkdir4(const apr_array_header
if (svn_path_is_url(APR_ARRAY_IDX(paths, 0, const char *)))
{
- SVN_ERR(mkdir_urls(paths, make_parents, revprop_table, ctx, pool));
+ SVN_ERR(mkdir_urls(paths, make_parents, revprop_table, commit_callback,
+ commit_baton, ctx, pool));
}
else
{
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/checkout.c?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/checkout.c Fri Dec 10 21:23:03 2010
@@ -71,10 +71,11 @@ initialize_area(svn_revnum_t *result_rev
repos_root, uuid, revnum, depth, pool));
/* Have update fix the incompleteness. */
return svn_error_return(svn_client__update_internal(result_rev, local_abspath,
- revision, depth, TRUE, ignore_externals,
- allow_unver_obstructions,
- use_sleep, FALSE, innercheckout,
- ctx, pool));
+ revision, depth, TRUE,
+ ignore_externals,
+ allow_unver_obstructions,
+ use_sleep, innercheckout,
+ ctx, pool));
}
@@ -219,7 +220,7 @@ svn_client__checkout_internal(svn_revnum
revision, depth, TRUE,
ignore_externals,
allow_unver_obstructions,
- use_sleep, FALSE, innercheckout,
+ use_sleep, innercheckout,
ctx, pool);
}
else
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/cleanup.c?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/cleanup.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/cleanup.c Fri Dec 10 21:23:03 2010
@@ -129,6 +129,11 @@ svn_client_upgrade(const char *path,
info_baton.last_repos = NULL;
info_baton.last_uuid = NULL;
+ if (svn_path_is_url(path))
+ return svn_error_return(svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("'%s' is not a local path"),
+ path));
+
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
SVN_ERR(svn_wc_upgrade(ctx->wc_ctx, local_abspath,
fetch_repos_info, &info_baton,
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/client.h?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/client.h (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/client.h Fri Dec 10 21:23:03 2010
@@ -490,12 +490,6 @@ svn_client__make_local_parents(const cha
that obstruct items added from the repos are tolerated; if FALSE,
these obstructions cause the update to fail.
- If SEND_COPYFROM_ARGS is true, then request that the server not
- send file contents when adding files that have been created by
- explicit copying; instead, just send copyfrom-args to add_file(),
- and possibly follow up with an apply_textdelta() against the copied
- file.
-
If INNERUPDATE is true, no anchor check is performed on the update target.
*/
svn_error_t *
@@ -507,7 +501,6 @@ svn_client__update_internal(svn_revnum_t
svn_boolean_t ignore_externals,
svn_boolean_t allow_unver_obstructions,
svn_boolean_t *timestamp_sleep,
- svn_boolean_t send_copyfrom_args,
svn_boolean_t innerupdate,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/cmdline.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/cmdline.c?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/cmdline.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/cmdline.c Fri Dec 10 21:23:03 2010
@@ -125,11 +125,14 @@ check_root_url_of_target(const char **ro
* If the target itself is a URL to a repository that does not exist,
* that's fine, too. The callers will deal with this argument in an
* appropriate manter if it does not make any sense.
+ *
+ * Also tolerate locally added targets ("bad revision" error).
*/
if ((err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)
|| (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
|| (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
- || (err->apr_err == SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED))
+ || (err->apr_err == SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED)
+ || (err->apr_err == SVN_ERR_CLIENT_BAD_REVISION))
{
svn_error_clear(err);
return SVN_NO_ERROR;
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/commit.c?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/commit.c Fri Dec 10 21:23:03 2010
@@ -676,6 +676,8 @@ svn_client_import4(const char *path,
svn_boolean_t no_ignore,
svn_boolean_t ignore_unknown_node_types,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -765,8 +767,7 @@ svn_client_import4(const char *path,
while ((err = get_ra_editor(&ra_session,
&editor, &edit_baton, ctx, url, base_dir_abspath,
log_msg, NULL, revprop_table, FALSE, NULL, TRUE,
- ctx->commit_callback2, ctx->commit_baton,
- subpool)));
+ commit_callback, commit_baton, subpool)));
/* Reverse the order of the components we added to our NEW_ENTRIES array. */
if (new_entries->nelts)
@@ -928,23 +929,6 @@ post_process_commit_item(svn_wc_committe
svn_boolean_t loop_recurse = FALSE;
svn_boolean_t remove_lock;
- /* Is it a missing, deleted directory?
-
- ### Temporary: once we centralise this sort of node is just a
- normal delete and will get handled by the post-commit queue. */
- if (item->kind == svn_node_dir
- && item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE)
- {
- svn_boolean_t obstructed;
-
- SVN_ERR(svn_wc__node_is_status_obstructed(&obstructed,
- wc_ctx, item->path,
- scratch_pool));
- if (obstructed)
- return svn_wc__temp_mark_missing_not_present(item->path,
- wc_ctx, scratch_pool);
- }
-
if ((item->state_flags & SVN_CLIENT_COMMIT_ITEM_ADD)
&& (item->kind == svn_node_dir)
&& (item->copyfrom_url))
@@ -1036,6 +1020,8 @@ svn_client_commit5(const apr_array_heade
svn_boolean_t keep_changelists,
const apr_array_header_t *changelists,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -1197,8 +1183,8 @@ svn_client_commit5(const apr_array_heade
pool)))
goto cleanup;
- cb.original_callback = ctx->commit_callback2;
- cb.original_baton = ctx->commit_baton;
+ cb.original_callback = commit_callback;
+ cb.original_baton = commit_baton;
cb.info = &commit_info;
cb.pool = pool;
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/commit_util.c?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/commit_util.c Fri Dec 10 21:23:03 2010
@@ -398,7 +398,6 @@ harvest_committables(apr_hash_t *committ
svn_boolean_t is_added;
const char *node_copyfrom_relpath;
svn_revnum_t node_copyfrom_rev;
- svn_boolean_t keep_local;
svn_wc_context_t *wc_ctx = ctx->wc_ctx;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
@@ -482,12 +481,9 @@ harvest_committables(apr_hash_t *committ
}
}
- SVN_ERR(svn_wc__temp_get_keep_local(&keep_local, ctx->wc_ctx,
- local_abspath, scratch_pool));
- if (! keep_local)
- SVN_ERR(bail_on_tree_conflicted_children(ctx->wc_ctx, local_abspath,
- db_kind, depth, changelists,
- scratch_pool));
+ SVN_ERR(bail_on_tree_conflicted_children(ctx->wc_ctx, local_abspath,
+ db_kind, depth, changelists,
+ scratch_pool));
/* Our own URL wins if not in COPY_MODE. In COPY_MODE the
telescoping URLs are used. */
@@ -863,44 +859,6 @@ harvest_committables(apr_hash_t *committ
and depth says not to go there. */
continue;
}
- else
- {
- svn_boolean_t obstructed;
-
- SVN_ERR(svn_wc__node_is_status_obstructed(&obstructed,
- ctx->wc_ctx,
- this_abspath,
- iterpool));
-
- if (obstructed)
- {
- /* A missing, schedule-delete child dir is
- allowable. Just don't try to recurse. */
- svn_node_kind_t childkind;
- SVN_ERR(svn_io_check_path(this_abspath,
- &childkind,
- iterpool));
- if (childkind == svn_node_none && this_is_deleted)
- {
- if (svn_wc__changelist_match(ctx->wc_ctx,
- this_abspath,
- changelists,
- iterpool))
- {
- SVN_ERR(add_committable(
- committables, this_abspath,
- this_kind,
- repos_root_url, this_repos_relpath,
- SVN_INVALID_REVNUM,
- NULL,
- SVN_INVALID_REVNUM,
- SVN_CLIENT_COMMIT_ITEM_DELETE,
- result_pool, iterpool));
- continue; /* don't recurse! */
- }
- }
- }
- }
}
{
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/copy.c?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/copy.c Fri Dec 10 21:23:03 2010
@@ -445,12 +445,10 @@ do_wc_to_wc_moves(const apr_array_header
static svn_error_t *
-wc_to_wc_copy(const apr_array_header_t *copy_pairs,
- const char *dst_path,
- svn_boolean_t is_move,
- svn_boolean_t make_parents,
- svn_client_ctx_t *ctx,
- apr_pool_t *pool)
+verify_wc_srcs_and_dsts(const apr_array_header_t *copy_pairs,
+ svn_boolean_t make_parents,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
{
int i;
apr_pool_t *iterpool = svn_pool_create(pool);
@@ -507,11 +505,7 @@ wc_to_wc_copy(const apr_array_header_t *
svn_pool_destroy(iterpool);
- /* Copy or move all targets. */
- if (is_move)
- return do_wc_to_wc_moves(copy_pairs, dst_path, ctx, pool);
- else
- return do_wc_to_wc_copies(copy_pairs, ctx, pool);
+ return SVN_NO_ERROR;
}
@@ -724,6 +718,8 @@ static svn_error_t *
repos_to_repos_copy(const apr_array_header_t *copy_pairs,
svn_boolean_t make_parents,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
svn_boolean_t is_move,
apr_pool_t *pool)
@@ -1116,8 +1112,8 @@ repos_to_repos_copy(const apr_array_head
/* Fetch RA commit editor. */
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
- ctx->commit_callback2,
- ctx->commit_baton,
+ commit_callback,
+ commit_baton,
NULL, TRUE, /* No lock tokens */
pool));
@@ -1152,6 +1148,8 @@ static svn_error_t *
wc_to_repos_copy(const apr_array_header_t *copy_pairs,
svn_boolean_t make_parents,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -1390,8 +1388,8 @@ wc_to_repos_copy(const apr_array_header_
/* Fetch RA commit editor. */
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
- ctx->commit_callback2,
- ctx->commit_baton, NULL,
+ commit_callback,
+ commit_baton, NULL,
TRUE, /* No lock tokens */
pool));
@@ -1872,6 +1870,8 @@ try_copy(const apr_array_header_t *sourc
svn_boolean_t make_parents,
svn_boolean_t ignore_externals,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -2149,14 +2149,20 @@ try_copy(const apr_array_header_t *sourc
/* Now, call the right handler for the operation. */
if ((! srcs_are_urls) && (! dst_is_url))
{
- return svn_error_return(
- wc_to_wc_copy(copy_pairs, dst_path_in, is_move, make_parents, ctx,
- pool));
+ SVN_ERR(verify_wc_srcs_and_dsts(copy_pairs, make_parents, ctx, pool));
+
+ /* Copy or move all targets. */
+ if (is_move)
+ return svn_error_return(do_wc_to_wc_moves(copy_pairs, dst_path_in, ctx,
+ pool));
+ else
+ return svn_error_return(do_wc_to_wc_copies(copy_pairs, ctx, pool));
}
else if ((! srcs_are_urls) && (dst_is_url))
{
return svn_error_return(
- wc_to_repos_copy(copy_pairs, make_parents, revprop_table, ctx, pool));
+ wc_to_repos_copy(copy_pairs, make_parents, revprop_table,
+ commit_callback, commit_baton, ctx, pool));
}
else if ((srcs_are_urls) && (! dst_is_url))
{
@@ -2167,8 +2173,9 @@ try_copy(const apr_array_header_t *sourc
else
{
return svn_error_return(
- repos_to_repos_copy(copy_pairs, make_parents,
- revprop_table, ctx, is_move, pool));
+ repos_to_repos_copy(copy_pairs, make_parents, revprop_table,
+ commit_callback, commit_baton, ctx, is_move,
+ pool));
}
}
@@ -2182,6 +2189,8 @@ svn_client_copy6(const apr_array_header_
svn_boolean_t make_parents,
svn_boolean_t ignore_externals,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -2198,6 +2207,7 @@ svn_client_copy6(const apr_array_header_
make_parents,
ignore_externals,
revprop_table,
+ commit_callback, commit_baton,
ctx,
subpool);
@@ -2230,6 +2240,7 @@ svn_client_copy6(const apr_array_header_
make_parents,
ignore_externals,
revprop_table,
+ commit_callback, commit_baton,
ctx,
subpool);
}
@@ -2246,6 +2257,8 @@ svn_client_move6(const apr_array_header_
svn_boolean_t move_as_child,
svn_boolean_t make_parents,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -2280,6 +2293,7 @@ svn_client_move6(const apr_array_header_
make_parents,
FALSE,
revprop_table,
+ commit_callback, commit_baton,
ctx,
subpool);
@@ -2309,6 +2323,7 @@ svn_client_move6(const apr_array_header_
make_parents,
FALSE,
revprop_table,
+ commit_callback, commit_baton,
ctx,
subpool);
}
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/delete.c?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/delete.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/delete.c Fri Dec 10 21:23:03 2010
@@ -115,7 +115,7 @@ svn_client__can_delete(const char *path,
be deleted. */
return svn_error_return(svn_client_status5(NULL, ctx, path, &revision,
svn_depth_infinity, FALSE,
- FALSE, FALSE, FALSE, FALSE,
+ FALSE, FALSE, FALSE, FALSE, FALSE,
NULL,
find_undeletables, NULL,
scratch_pool));
@@ -138,6 +138,8 @@ path_driver_cb_func(void **dir_baton,
static svn_error_t *
delete_urls(const apr_array_header_t *paths,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -237,8 +239,8 @@ delete_urls(const apr_array_header_t *pa
/* Fetch RA commit editor */
SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
commit_revprops,
- ctx->commit_callback2,
- ctx->commit_baton,
+ commit_callback,
+ commit_baton,
NULL, TRUE, /* No lock tokens */
pool));
@@ -315,6 +317,8 @@ svn_client_delete4(const apr_array_heade
svn_boolean_t force,
svn_boolean_t keep_local,
const apr_hash_t *revprop_table,
+ svn_commit_callback2_t commit_callback,
+ void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
@@ -338,7 +342,8 @@ svn_client_delete4(const apr_array_heade
if (is_url)
{
- SVN_ERR(delete_urls(paths, revprop_table, ctx, pool));
+ SVN_ERR(delete_urls(paths, revprop_table, commit_callback, commit_baton,
+ ctx, pool));
}
else
{
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/deprecated.c?rev=1044516&r1=1044515&r2=1044516&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/deprecated.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/deprecated.c Fri Dec 10 21:23:03 2010
@@ -53,13 +53,8 @@
/* Baton for capture_commit_info() */
struct capture_baton_t {
- svn_commit_callback2_t original_callback;
- void *original_baton;
-
svn_commit_info_t **info;
apr_pool_t *pool;
-
- svn_boolean_t saw_commit;
};
@@ -74,11 +69,6 @@ capture_commit_info(const svn_commit_inf
*(cb->info) = svn_commit_info_dup(commit_info, cb->pool);
- if (cb->original_callback)
- SVN_ERR((cb->original_callback)(commit_info, cb->original_baton, pool));
-
- cb->saw_commit = TRUE;
-
return SVN_NO_ERROR;
}
@@ -124,20 +114,13 @@ svn_client_mkdir3(svn_commit_info_t **co
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- svn_client_ctx_t shadow_ctx;
struct capture_baton_t cb;
cb.info = commit_info_p;
cb.pool = pool;
- cb.original_callback = ctx->commit_callback2;
- cb.original_baton = ctx->commit_baton;
- shadow_ctx = *ctx;
- shadow_ctx.commit_callback2 = capture_commit_info;
- shadow_ctx.commit_baton = &cb;
-
- return svn_client_mkdir4(paths, make_parents, revprop_table, &shadow_ctx,
- pool);
+ return svn_client_mkdir4(paths, make_parents, revprop_table,
+ capture_commit_info, &cb, ctx, pool);
}
svn_error_t *
@@ -334,7 +317,7 @@ wrapped_receiver(void *baton,
struct wrapped_receiver_baton_s *b = baton;
svn_stringbuf_t *expanded_line = svn_stringbuf_create(line, pool);
- svn_stringbuf_appendbytes(expanded_line, "\r", 1);
+ svn_stringbuf_appendbyte(expanded_line, '\r');
return b->orig_receiver(b->orig_baton, line_no, revision, author,
date, expanded_line->data, pool);
@@ -398,21 +381,14 @@ svn_client_import3(svn_commit_info_t **c
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- svn_client_ctx_t shadow_ctx;
struct capture_baton_t cb;
cb.info = commit_info_p;
cb.pool = pool;
- cb.original_callback = ctx->commit_callback2;
- cb.original_baton = ctx->commit_baton;
-
- shadow_ctx = *ctx;
- shadow_ctx.commit_callback2 = capture_commit_info;
- shadow_ctx.commit_baton = &cb;
return svn_client_import4(path, url, depth, no_ignore,
ignore_unknown_node_types, revprop_table,
- &shadow_ctx, pool);
+ capture_commit_info, &cb, ctx, pool);
}
svn_error_t *
@@ -460,23 +436,17 @@ svn_client_commit4(svn_commit_info_t **c
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- svn_client_ctx_t shadow_ctx;
struct capture_baton_t cb;
+ *commit_info_p = NULL;
cb.info = commit_info_p;
cb.pool = pool;
- cb.original_callback = ctx->commit_callback2;
- cb.original_baton = ctx->commit_baton;
- cb.saw_commit = FALSE;
-
- shadow_ctx = *ctx;
- shadow_ctx.commit_callback2 = capture_commit_info;
- shadow_ctx.commit_baton = &cb;
SVN_ERR(svn_client_commit5(targets, depth, keep_locks, keep_changelists,
- changelists, revprop_table, &shadow_ctx, pool));
+ changelists, revprop_table,
+ capture_commit_info, &cb, ctx, pool));
- if (!cb.saw_commit)
+ if (! *commit_info_p)
*commit_info_p = svn_create_commit_info(pool);
return SVN_NO_ERROR;
@@ -539,20 +509,14 @@ svn_client_copy5(svn_commit_info_t **com
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- svn_client_ctx_t shadow_ctx;
struct capture_baton_t cb;
cb.info = commit_info_p;
cb.pool = pool;
- cb.original_callback = ctx->commit_callback2;
- cb.original_baton = ctx->commit_baton;
-
- shadow_ctx = *ctx;
- shadow_ctx.commit_callback2 = capture_commit_info;
- shadow_ctx.commit_baton = &cb;
return svn_client_copy6(sources, dst_path, copy_as_child, make_parents,
- ignore_externals, revprop_table, &shadow_ctx, pool);
+ ignore_externals, revprop_table,
+ capture_commit_info, &cb, ctx, pool);
}
svn_error_t *
@@ -651,20 +615,14 @@ svn_client_move5(svn_commit_info_t **com
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- svn_client_ctx_t shadow_ctx;
struct capture_baton_t cb;
cb.info = commit_info_p;
cb.pool = pool;
- cb.original_callback = ctx->commit_callback2;
- cb.original_baton = ctx->commit_baton;
-
- shadow_ctx = *ctx;
- shadow_ctx.commit_callback2 = capture_commit_info;
- shadow_ctx.commit_baton = &cb;
return svn_client_move6(src_paths, dst_path, force, move_as_child,
- make_parents, revprop_table, &shadow_ctx, pool);
+ make_parents, revprop_table,
+ capture_commit_info, &cb, ctx, pool);
}
svn_error_t *
@@ -768,20 +726,13 @@ svn_client_delete3(svn_commit_info_t **c
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- svn_client_ctx_t shadow_ctx;
struct capture_baton_t cb;
cb.info = commit_info_p;
cb.pool = pool;
- cb.original_callback = ctx->commit_callback2;
- cb.original_baton = ctx->commit_baton;
-
- shadow_ctx = *ctx;
- shadow_ctx.commit_callback2 = capture_commit_info;
- shadow_ctx.commit_baton = &cb;
return svn_client_delete4(paths, force, keep_local, revprop_table,
- &shadow_ctx, pool);
+ capture_commit_info, &cb, ctx, pool);
}
svn_error_t *
@@ -1526,21 +1477,14 @@ svn_client_propset3(svn_commit_info_t **
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- svn_client_ctx_t shadow_ctx;
struct capture_baton_t cb;
cb.info = commit_info_p;
cb.pool = pool;
- cb.original_callback = ctx->commit_callback2;
- cb.original_baton = ctx->commit_baton;
-
- shadow_ctx = *ctx;
- shadow_ctx.commit_callback2 = capture_commit_info;
- shadow_ctx.commit_baton = &cb;
return svn_client_propset4(propname, propval, target, depth, skip_checks,
base_revision_for_url, changelists, revprop_table,
- &shadow_ctx, pool);
+ capture_commit_info, &cb, ctx, pool);
}
svn_error_t *
@@ -1737,7 +1681,7 @@ svn_client_status4(svn_revnum_t *result_
status_baton };
return svn_client_status5(result_rev, ctx, path, revision, depth, get_all,
- update, no_ignore, ignore_externals, FALSE,
+ update, no_ignore, ignore_externals, TRUE, FALSE,
changelists, status4_wrapper_func, &swb, pool);
}
@@ -2134,3 +2078,18 @@ svn_client_mergeinfo_log_eligible(const
svn_depth_empty, revprops, ctx,
pool);
}
+
+/*** From relocate.c ***/
+svn_error_t *
+svn_client_relocate(const char *path,
+ const char *from,
+ const char *to,
+ svn_boolean_t recurse,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *pool)
+{
+ if (! recurse)
+ svn_error_create(SVN_ERR_UNSUPPORTED_FEATURE, 0,
+ _("Non-recursive relocation not supported"));
+ return svn_client_relocate2(path, from, to, ctx, pool);
+}