Author: julianfoad
Date: Tue Jan 22 18:05:27 2013
New Revision: 1437071
URL: http://svn.apache.org/viewvc?rev=1437071&view=rev
Log:
Remove a new public API for reintegrate merge that I introduced since 1.7.
We don't want it now because it's superseded by the automatic merge API.
There is a small functional change: the '--verbose' option will no longer
print any extra messages during a reintegrate merge -- but that option is
new since 1.7 so that doesn't matter.
* subversion/include/svn_client.h,
subversion/libsvn_client/merge.c
(svn_client_find_reintegrate_merge): Delete.
* subversion/svn/merge-cmd.c
(merge_reintegrate): Delete.
(svn_cl__merge): Call the old svn_client_merge_reintegrate() function
directly.
Modified:
subversion/trunk/subversion/include/svn_client.h
subversion/trunk/subversion/libsvn_client/merge.c
subversion/trunk/subversion/svn/merge-cmd.c
Modified: subversion/trunk/subversion/include/svn_client.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1437071&r1=1437070&r2=1437071&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Tue Jan 22 18:05:27 2013
@@ -3741,39 +3741,6 @@ svn_client_merge(const char *source1,
/**
- * Determine the URLs and revisions needed to perform a reintegrate merge
- * from @a source_path_or_url at @a source_peg_revision into the working
- * copy at @a target_wcpath.
- *
- * Set @a *url1_p and @a *rev1_p to the left side, and @a *url2_p and
- * @a *rev2_p to the right side, URLs and revisions of the source of the
- * required two-URL merge.
- *
- * If no merge should be performed, set @a *url1_p to NULL and @a *rev1_p
- * to #SVN_INVALID_REVNUM.
- *
- * The authentication baton cached in @a ctx is used to communicate with the
- * repository.
- *
- * Allocate all the results in @a result_pool. Use @a scratch_pool for
- * temporary allocations.
- *
- * @since New in 1.8.
- */
-svn_error_t *
-svn_client_find_reintegrate_merge(const char **url1_p,
- svn_revnum_t *rev1_p,
- const char **url2_p,
- svn_revnum_t *rev2_p,
- /* inputs */
- const char *source_path_or_url,
- const svn_opt_revision_t
*source_peg_revision,
- const char *target_wcpath,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-/**
* Perform a reintegration merge of @a source_path_or_url at @a
source_peg_revision
* into @a target_wcpath.
* @a target_wcpath must be a single-revision, #svn_depth_infinity,
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1437071&r1=1437070&r2=1437071&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Tue Jan 22 18:05:27 2013
@@ -10735,54 +10735,6 @@ open_reintegrate_source_and_target(svn_r
return SVN_NO_ERROR;
}
-svn_error_t *
-svn_client_find_reintegrate_merge(const char **url1_p,
- svn_revnum_t *rev1_p,
- const char **url2_p,
- svn_revnum_t *rev2_p,
- const char *source_path_or_url,
- const svn_opt_revision_t
*source_peg_revision,
- const char *target_wcpath,
- svn_client_ctx_t *ctx,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
-{
- const char *target_abspath;
- svn_ra_session_t *source_ra_session;
- svn_client__pathrev_t *source_loc;
- svn_ra_session_t *target_ra_session;
- merge_target_t *target;
- merge_source_t *source;
-
- SVN_ERR(svn_dirent_get_absolute(&target_abspath, target_wcpath,
- scratch_pool));
-
- SVN_ERR(open_reintegrate_source_and_target(
- &source_ra_session, &source_loc, &target_ra_session, &target,
- source_path_or_url, source_peg_revision, target_abspath,
- ctx, scratch_pool, scratch_pool));
-
- SVN_ERR(find_reintegrate_merge(&source, NULL,
- source_ra_session, source_loc,
- target_ra_session, target,
- ctx, result_pool, scratch_pool));
- if (source)
- {
- *url1_p = source->loc1->url;
- *rev1_p = source->loc1->rev;
- *url2_p = source->loc2->url;
- *rev2_p = source->loc2->rev;
- }
- else
- {
- *url1_p = NULL;
- *rev1_p = SVN_INVALID_REVNUM;
- *url2_p = NULL;
- *rev2_p = SVN_INVALID_REVNUM;
- }
- return SVN_NO_ERROR;
-}
-
/* The body of svn_client_merge_reintegrate(), which see for details. */
static svn_error_t *
merge_reintegrate_locked(const char *source_path_or_url,
Modified: subversion/trunk/subversion/svn/merge-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/merge-cmd.c?rev=1437071&r1=1437070&r2=1437071&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/merge-cmd.c (original)
+++ subversion/trunk/subversion/svn/merge-cmd.c Tue Jan 22 18:05:27 2013
@@ -44,65 +44,6 @@ static const svn_opt_revision_t unspecif
/*** Code. ***/
-/* Do a reintegrate merge from SOURCE_PATH_OR_URL@SOURCE_PEG_REVISION into
- * TARGET_WCPATH. Do it with a WC write lock unless DRY_RUN is true. */
-static svn_error_t *
-merge_reintegrate(const char *source_path_or_url,
- const svn_opt_revision_t *source_peg_revision,
- const char *target_wcpath,
- svn_boolean_t dry_run,
- svn_boolean_t verbose,
- const apr_array_header_t *merge_options,
- svn_client_ctx_t *ctx,
- apr_pool_t *scratch_pool)
-{
- const char *url1, *url2;
- svn_revnum_t rev1, rev2;
-
- if (verbose)
- SVN_ERR(svn_cmdline_printf(scratch_pool, _("checking branch
relationship...\n")));
- SVN_ERR_W(svn_cl__check_related_source_and_target(
- source_path_or_url, source_peg_revision,
- target_wcpath, &unspecified_revision, ctx, scratch_pool),
- _("Source and target must be different but related branches"));
-
- if (verbose)
- SVN_ERR(svn_cmdline_printf(scratch_pool, _("calculating reintegrate
merge...\n")));
- SVN_ERR(svn_client_find_reintegrate_merge(
- &url1, &rev1, &url2, &rev2,
- source_path_or_url, source_peg_revision, target_wcpath,
- ctx, scratch_pool, scratch_pool));
-
- if (url1)
- {
- svn_opt_revision_t revision1;
- svn_opt_revision_t revision2;
-
- revision1.kind = svn_opt_revision_number;
- revision1.value.number = rev1;
-
- revision2.kind = svn_opt_revision_number;
- revision2.value.number = rev2;
-
- if (verbose)
- SVN_ERR(svn_cmdline_printf(scratch_pool, _("merging...\n")));
-
- /* Do the merge. Set 'allow_mixed_rev' to true, not because we want
- * to allow a mixed-rev WC but simply to bypass the check, as it was
- * already checked in svn_client_find_reintegrate_merge(). */
- SVN_ERR(svn_client_merge5(url1, &revision1, url2, &revision2,
- target_wcpath, svn_depth_infinity,
- FALSE /* ignore_mergeinfo */,
- FALSE /* diff_ignore_ancestry */,
- FALSE /* force_delete */,
- FALSE /* record_only */,
- dry_run, TRUE /* allow_mixed_rev */,
- merge_options, ctx, scratch_pool));
- }
-
- return SVN_NO_ERROR;
-}
-
/* Throw an error if PATH_OR_URL is a path and REVISION isn't a repository
* revision. */
static svn_error_t *
@@ -503,9 +444,9 @@ svn_cl__merge(apr_getopt_t *os,
}
else if (opt_state->reintegrate)
{
- merge_err = merge_reintegrate(sourcepath1, &peg_revision1, targetpath,
- opt_state->dry_run, opt_state->verbose,
- options, ctx, pool);
+ merge_err = svn_client_merge_reintegrate(
+ sourcepath1, &peg_revision1, targetpath,
+ opt_state->dry_run, options, ctx, pool);
}
else if (! two_sources_specified)
{