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/05/08 12:52:57 UTC
svn commit: r1100714 [1/3] - in /subversion/trunk/subversion:
include/private/svn_wc_private.h libsvn_wc/adm_ops.c libsvn_wc/externals.c
libsvn_wc/props.c
Author: rhuijben
Date: Sun May 8 10:52:56 2011
New Revision: 1100714
URL: http://svn.apache.org/viewvc?rev=1100714&view=rev
Log:
In the working copy library: Add the initial plumbing for a file externals
update editor. Move the externals functions to a new externals.c.
No functional changes, but contains some new code that will be enabled
in a followup commit.
* subversion/include/private/svn_wc_private.h
(svn_wc__get_file_external_editor): New function.
(svn_wc__crawl_file_external): New function.
* subversion/libsvn_wc/adm_ops.c
(svn_wc__set_file_external_location): Move to externals.c
* subversion/libsvn_wc/externals.c
New file, copied from props.c
(..): Removed property functions.
(find_and_remove_externals_revision): Kept function.
(svn_wc_parse_externals_description3): Kept function.
(svn_wc__set_file_external_location): Moved here from adm_ops.c
(edit_baton): New struct.
(set_target_revision,
open_root,
add_file,
open_file,
apply_textdelta,
change_file_prop,
close_file): New stubbed delta editor functions.
(svn_wc__get_file_external_editor): New function.
(svn_wc__crawl_file_external): New function.
* subversion/libsvn_wc/props.c
(TEST_DB_PROP): Remove comment.
(find_and_remove_externals_revision): Remove function.
(svn_wc_parse_externals_description3): Remove function.
Added:
subversion/trunk/subversion/libsvn_wc/externals.c
- copied, changed from r1100674, subversion/trunk/subversion/libsvn_wc/props.c
Modified:
subversion/trunk/subversion/include/private/svn_wc_private.h
subversion/trunk/subversion/libsvn_wc/adm_ops.c
subversion/trunk/subversion/libsvn_wc/props.c
Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1100714&r1=1100713&r2=1100714&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Sun May 8 10:52:56 2011
@@ -72,6 +72,41 @@ svn_wc__set_file_external_location(svn_w
const char *repos_root_url,
apr_pool_t *scratch_pool);
+/* Like svn_wc_get_update_editorX and svn_wc_get_status_editorX, but only
+ allows updating a file external LOCAL_ABSPATH */
+svn_error_t *
+svn_wc__get_file_external_editor(const svn_delta_editor_t **editor,
+ void **edit_baton,
+ const char *switch_url,
+ svn_revnum_t *target_revision,
+ svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ svn_boolean_t use_commit_times,
+ const char *diff3_cmd,
+ svn_wc_conflict_resolver_func2_t conflict_func,
+ void *conflict_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);
+
+/* Like svn_wc_crawl_revisionsX, but only supports updating a file external
+ LOCAL_ABSPATH which may or may not exist yet. */
+svn_error_t *
+svn_wc__crawl_file_external(svn_wc_context_t *wc_ctx,
+ const char *local_abspath,
+ const svn_ra_reporter3_t *reporter,
+ void *report_baton,
+ svn_boolean_t restore_files,
+ svn_boolean_t use_commit_times,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ svn_wc_notify_func2_t notify_func,
+ void *notify_baton,
+ apr_pool_t *scratch_pool);
+
/** Set @a *tree_conflict to a newly allocated @c
* svn_wc_conflict_description_t structure describing the tree
Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=1100714&r1=1100713&r2=1100714&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Sun May 8 10:52:56 2011
@@ -2322,51 +2322,6 @@ svn_wc_set_changelist2(svn_wc_context_t
return SVN_NO_ERROR;
}
-
-svn_error_t *
-svn_wc__set_file_external_location(svn_wc_context_t *wc_ctx,
- const char *local_abspath,
- const char *url,
- const svn_opt_revision_t *peg_rev,
- const svn_opt_revision_t *rev,
- const char *repos_root_url,
- apr_pool_t *scratch_pool)
-{
- const char *external_repos_relpath;
- const svn_opt_revision_t unspecified_rev = { svn_opt_revision_unspecified };
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- SVN_ERR_ASSERT(!url || svn_uri_is_canonical(url, scratch_pool));
-
- if (url)
- {
- external_repos_relpath = svn_uri_is_child(repos_root_url, url,
- scratch_pool);
-
- if (external_repos_relpath == NULL)
- return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Can't add a file external to '%s' as it"
- " is not a file in repository '%s'."),
- url, repos_root_url);
-
- SVN_ERR_ASSERT(peg_rev != NULL);
- SVN_ERR_ASSERT(rev != NULL);
- }
- else
- {
- external_repos_relpath = NULL;
- peg_rev = &unspecified_rev;
- rev = &unspecified_rev;
- }
-
- SVN_ERR(svn_wc__db_temp_op_set_file_external(wc_ctx->db, local_abspath,
- external_repos_relpath, peg_rev,
- rev, scratch_pool));
-
- return SVN_NO_ERROR;
-}
-
-
struct get_cl_fn_baton
{
svn_wc__db_t *db;