You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/04/19 15:15:03 UTC
svn commit: r1095078 - in /subversion/trunk/subversion: include/svn_wc.h
libsvn_client/commit.c libsvn_client/diff.c libsvn_client/status.c
libsvn_client/switch.c libsvn_client/update.c libsvn_wc/adm_crawler.c
libsvn_wc/adm_ops.c libsvn_wc/deprecated.c
Author: rhuijben
Date: Tue Apr 19 13:15:02 2011
New Revision: 1095078
URL: http://svn.apache.org/viewvc?rev=1095078&view=rev
Log:
In preparation for resolving issue #3351, add a few extra callbacks to the
adm crawler and commit processing.
External definitions are stored in the BASE tree, but are currently only
updated when updating. To allow removing (file) externals (=issue #3351),
the client library should know when a (file) external is removed from the BASE
tree, even when that happens through a commit.
Currently this works for everybody who receives the updates, but not for
who actually changes the definition.
* subversion/include/svn_wc.h
(svn_wc_process_committed_queue2): Add external_func and baton.
(svn_wc_crawl_revisions5): Add cancel_func and baton.
* subversion/libsvn_client/commit.c
(svn_client_commit5): Update caller.
* subversion/libsvn_client/diff.c
(diff_repos_wc): Update caller.
* subversion/libsvn_client/status.c
(svn_client_status5): Update caller.
* subversion/libsvn_client/switch.c
(switch_internal): Update caller.
* subversion/libsvn_client/update.c
(update_internal): Update caller.
* subversion/libsvn_wc/adm_crawler.c
(report_revisions_and_depths): Use standard ordering for arguments and
receive had_props from caller. Call cancel func when looping.
* subversion/libsvn_wc/adm_ops.c
(svn_wc_process_committed_queue2): Add two arguments, but don't use them yet.
(svn_wc_crawl_revisions5): Retrieve had_props. Update caller.
* subversion/libsvn_wc/deprecated.c
(svn_wc_crawl_revisions5): Update caller.
(svn_wc_process_committed_queue): Update caller.
Modified:
subversion/trunk/subversion/include/svn_wc.h
subversion/trunk/subversion/libsvn_client/commit.c
subversion/trunk/subversion/libsvn_client/diff.c
subversion/trunk/subversion/libsvn_client/status.c
subversion/trunk/subversion/libsvn_client/switch.c
subversion/trunk/subversion/libsvn_client/update.c
subversion/trunk/subversion/libsvn_wc/adm_crawler.c
subversion/trunk/subversion/libsvn_wc/adm_ops.c
subversion/trunk/subversion/libsvn_wc/deprecated.c
Modified: subversion/trunk/subversion/include/svn_wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_wc.h?rev=1095078&r1=1095077&r2=1095078&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_wc.h (original)
+++ subversion/trunk/subversion/include/svn_wc.h Tue Apr 19 13:15:02 2011
@@ -4857,6 +4857,9 @@ svn_wc_queue_committed(svn_wc_committed_
* If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
* if the client wants to cancel the operation.
*
+ * If @a external_func is non-NULL, call it with @a external_baton on
+ * 'svn:externals' changes applied to the working copy.
+ *
* @since New in 1.7.
*/
svn_error_t *
@@ -4865,6 +4868,8 @@ svn_wc_process_committed_queue2(svn_wc_c
svn_revnum_t new_revnum,
const char *rev_date,
const char *rev_author,
+ svn_wc_external_update_t external_func,
+ void *external_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
@@ -5039,6 +5044,8 @@ svn_wc_crawl_revisions5(svn_wc_context_t
svn_boolean_t use_commit_times,
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 *scratch_pool);
@@ -5047,6 +5054,8 @@ svn_wc_crawl_revisions5(svn_wc_context_t
* Similar to svn_wc_crawl_revisions5, but with a relative path and
* access baton instead of an absolute path and wc_ctx.
*
+ * Passes NULL for @a cancel_func and @a cancel_baton.
+ *
* @since New in 1.6.
* @deprecated Provided for compatibility with the 1.6 API.
*/
Modified: subversion/trunk/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit.c?rev=1095078&r1=1095077&r2=1095078&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit.c Tue Apr 19 13:15:02 2011
@@ -1373,6 +1373,8 @@ svn_client_commit5(const apr_array_heade
commit_info->revision,
commit_info->date,
commit_info->author,
+ NULL /* external_func */,
+ NULL /* external_baton */,
ctx->cancel_func,
ctx->cancel_baton,
iterpool);
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1095078&r1=1095077&r2=1095078&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Tue Apr 19 13:15:02 2011
@@ -1890,6 +1890,7 @@ diff_repos_wc(const char *path1,
reporter, reporter_baton,
FALSE, depth, TRUE, (! server_supports_depth),
FALSE, NULL, NULL, /* notification is N/A */
+ ctx->cancel_func, ctx->cancel_baton,
NULL, NULL, pool));
return SVN_NO_ERROR;
Modified: subversion/trunk/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1095078&r1=1095077&r2=1095078&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/status.c (original)
+++ subversion/trunk/subversion/libsvn_client/status.c Tue Apr 19 13:15:02 2011
@@ -483,7 +483,9 @@ svn_client_status5(svn_revnum_t *result_
&lock_fetch_reporter, &rb, FALSE,
depth, TRUE,
(! server_supports_depth),
- FALSE, NULL, NULL, NULL, NULL, pool));
+ FALSE, NULL, NULL,
+ ctx->cancel_func, ctx->cancel_baton,
+ NULL, NULL, pool));
}
if (ctx->notify_func2)
Modified: subversion/trunk/subversion/libsvn_client/switch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/switch.c?rev=1095078&r1=1095077&r2=1095078&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/switch.c (original)
+++ subversion/trunk/subversion/libsvn_client/switch.c Tue Apr 19 13:15:02 2011
@@ -247,6 +247,7 @@ switch_internal(svn_revnum_t *result_rev
(! server_supports_depth),
use_commit_times,
svn_client__external_info_gatherer, &efb,
+ ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2, pool);
if (err)
Modified: subversion/trunk/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/update.c?rev=1095078&r1=1095077&r2=1095078&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/update.c (original)
+++ subversion/trunk/subversion/libsvn_client/update.c Tue Apr 19 13:15:02 2011
@@ -263,7 +263,8 @@ update_internal(svn_revnum_t *result_rev
ignore_externals
? NULL
: svn_client__external_info_gatherer,
- &efb, ctx->notify_func2, ctx->notify_baton2,
+ &efb, ctx->cancel_func, ctx->cancel_baton,
+ ctx->notify_func2, ctx->notify_baton2,
pool);
if (err)
Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_crawler.c?rev=1095078&r1=1095077&r2=1095078&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Tue Apr 19 13:15:02 2011
@@ -286,16 +286,19 @@ report_revisions_and_depths(svn_wc__db_t
svn_depth_t dir_depth,
const svn_ra_reporter3_t *reporter,
void *report_baton,
- svn_wc_external_update_t external_func,
- void *external_baton,
- svn_wc_notify_func2_t notify_func,
- void *notify_baton,
svn_boolean_t restore_files,
svn_depth_t depth,
svn_boolean_t honor_depth_exclude,
svn_boolean_t depth_compatibility_trick,
svn_boolean_t report_everything,
svn_boolean_t use_commit_times,
+ svn_boolean_t had_props,
+ 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 *scratch_pool)
{
const char *dir_abspath;
@@ -343,6 +346,9 @@ report_revisions_and_depths(svn_wc__db_t
svn_boolean_t this_switched = FALSE;
struct svn_wc__db_base_info_t *ths = svn__apr_hash_index_val(hi);
+ if (cancel_func)
+ SVN_ERR(cancel_func(cancel_baton));
+
/* Clear the iteration subpool here because the loop has a bunch
of 'continue' jump statements. */
svn_pool_clear(iterpool);
@@ -634,14 +640,16 @@ report_revisions_and_depths(svn_wc__db_t
dir_repos_root,
ths->depth,
reporter, report_baton,
- external_func,
- external_baton,
- notify_func, notify_baton,
restore_files, depth,
honor_depth_exclude,
depth_compatibility_trick,
start_empty,
use_commit_times,
+ ths->had_props,
+ external_func,
+ external_baton,
+ cancel_func, cancel_baton,
+ notify_func, notify_baton,
iterpool));
}
} /* end directory case */
@@ -731,6 +739,8 @@ svn_wc_crawl_revisions5(svn_wc_context_t
svn_boolean_t use_commit_times,
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 *scratch_pool)
@@ -746,6 +756,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
svn_wc__db_lock_t *target_lock = NULL;
svn_node_kind_t disk_kind;
svn_boolean_t explicit_rev;
+ svn_boolean_t had_props;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
/* The first thing we do is get the base_rev from the working copy's
@@ -755,7 +766,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
&repos_relpath, &repos_root_url,
NULL, NULL, NULL, NULL, &target_depth,
NULL, NULL, &target_lock, NULL,
- NULL, NULL, NULL, NULL,
+ NULL, &had_props, NULL, NULL,
db, local_abspath, scratch_pool,
scratch_pool);
@@ -765,6 +776,7 @@ svn_wc_crawl_revisions5(svn_wc_context_t
return svn_error_return(err);
svn_error_clear(err);
+ had_props = FALSE;
SVN_ERR(svn_wc__db_read_kind(&target_kind, db, local_abspath, TRUE,
scratch_pool));
@@ -896,13 +908,15 @@ svn_wc_crawl_revisions5(svn_wc_context_t
repos_root_url,
target_depth,
reporter, report_baton,
- external_func, external_baton,
- notify_func, notify_baton,
restore_files, depth,
honor_depth_exclude,
depth_compatibility_trick,
start_empty,
use_commit_times,
+ had_props,
+ external_func, external_baton,
+ cancel_func, cancel_baton,
+ notify_func, notify_baton,
scratch_pool);
if (err)
goto abort_report;
Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1095078&r1=1095077&r2=1095078&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Tue Apr 19 13:15:02 2011
@@ -436,6 +436,8 @@ svn_wc_process_committed_queue2(svn_wc_c
svn_revnum_t new_revnum,
const char *rev_date,
const char *rev_author,
+ svn_wc_external_update_t external_func,
+ void *external_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool)
Modified: subversion/trunk/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/deprecated.c?rev=1095078&r1=1095077&r2=1095078&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/trunk/subversion/libsvn_wc/deprecated.c Tue Apr 19 13:15:02 2011
@@ -151,6 +151,8 @@ svn_wc_crawl_revisions4(const char *path
use_commit_times,
external_func,
eb,
+ NULL /* cancel_func */,
+ NULL /* cancel_baton */,
notify_func,
notify_baton,
pool));
@@ -646,7 +648,7 @@ svn_wc_process_committed_queue(svn_wc_co
pool));
SVN_ERR(svn_wc_process_committed_queue2(queue, wc_ctx, new_revnum,
rev_date, rev_author,
- NULL, NULL, pool));
+ NULL, NULL, NULL, NULL, pool));
SVN_ERR(svn_wc_context_destroy(wc_ctx));
return SVN_NO_ERROR;