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 2012/03/21 19:12:21 UTC

svn commit: r1303481 - in /subversion/trunk/subversion: include/private/svn_client_private.h libsvn_client/merge.c svn/merge-cmd.c

Author: julianfoad
Date: Wed Mar 21 18:12:21 2012
New Revision: 1303481

URL: http://svn.apache.org/viewvc?rev=1303481&view=rev
Log:
Let the symmetric merge accept the '--reintegrate' option and do the strict
WC checks if it is given.

* subversion/include/private/svn_client_private.h
  (svn_client__find_symmetric_merge): Add strictness parameters.

* subversion/libsvn_client/merge.c
  (open_source_and_target, svn_client__find_symmetric_merge): Add and pass
    through strictness parameters.

* subversion/svn/merge-cmd.c
  (symmetric_merge): Add and pass through strictness parameters.
  (svn_cl__merge): Don't complain if the '--reintegrate' option is given;
    instead, request strict WC checks.

Modified:
    subversion/trunk/subversion/include/private/svn_client_private.h
    subversion/trunk/subversion/libsvn_client/merge.c
    subversion/trunk/subversion/svn/merge-cmd.c

Modified: subversion/trunk/subversion/include/private/svn_client_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_client_private.h?rev=1303481&r1=1303480&r2=1303481&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_client_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_client_private.h Wed Mar 21 18:12:21 2012
@@ -125,6 +125,8 @@ svn_client__find_symmetric_merge(svn_cli
                                  const svn_opt_revision_t *source_revision,
                                  const char *target_wcpath,
                                  svn_boolean_t allow_mixed_rev,
+                                 svn_boolean_t allow_local_mods,
+                                 svn_boolean_t allow_switched_subtrees,
                                  svn_client_ctx_t *ctx,
                                  apr_pool_t *result_pool,
                                  apr_pool_t *scratch_pool);

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1303481&r1=1303480&r2=1303481&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Wed Mar 21 18:12:21 2012
@@ -10897,6 +10897,8 @@ open_source_and_target(source_and_target
                        const svn_opt_revision_t *source_peg_revision,
                        const char *target_abspath,
                        svn_boolean_t allow_mixed_rev,
+                       svn_boolean_t allow_local_mods,
+                       svn_boolean_t allow_switched_subtrees,
                        svn_client_ctx_t *ctx,
                        apr_pool_t *session_pool,
                        apr_pool_t *result_pool,
@@ -10906,7 +10908,7 @@ open_source_and_target(source_and_target
 
   /* Target */
   SVN_ERR(open_target_wc(&s_t->target, target_abspath,
-                         allow_mixed_rev, TRUE, TRUE,
+                         allow_mixed_rev, allow_local_mods, allow_switched_subtrees,
                          ctx, result_pool, scratch_pool));
   SVN_ERR(svn_client_open_ra_session(&s_t->target_ra_session,
                                      s_t->target->loc.url,
@@ -11121,6 +11123,8 @@ svn_client__find_symmetric_merge(svn_cli
                                  const svn_opt_revision_t *source_revision,
                                  const char *target_wcpath,
                                  svn_boolean_t allow_mixed_rev,
+                                 svn_boolean_t allow_local_mods,
+                                 svn_boolean_t allow_switched_subtrees,
                                  svn_client_ctx_t *ctx,
                                  apr_pool_t *result_pool,
                                  apr_pool_t *scratch_pool)
@@ -11131,7 +11135,7 @@ svn_client__find_symmetric_merge(svn_cli
 
   SVN_ERR(svn_dirent_get_absolute(&target_abspath, target_wcpath, scratch_pool));
   SVN_ERR(open_source_and_target(&s_t, source_path_or_url, source_revision,
-                                 target_abspath, allow_mixed_rev,
+                                 target_abspath, allow_mixed_rev, allow_local_mods, allow_switched_subtrees,
                                  ctx, result_pool, result_pool, scratch_pool));
 
   /* Check source is in same repos as target. */

Modified: subversion/trunk/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/merge-cmd.c?rev=1303481&r1=1303480&r2=1303481&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/merge-cmd.c (original)
+++ subversion/trunk/subversion/svn/merge-cmd.c Wed Mar 21 18:12:21 2012
@@ -110,6 +110,8 @@ symmetric_merge(const char *source_path_
                 svn_boolean_t record_only,
                 svn_boolean_t dry_run,
                 svn_boolean_t allow_mixed_rev,
+                svn_boolean_t allow_local_mods,
+                svn_boolean_t allow_switched_subtrees,
                 const apr_array_header_t *merge_options,
                 svn_client_ctx_t *ctx,
                 apr_pool_t *scratch_pool)
@@ -120,6 +122,7 @@ symmetric_merge(const char *source_path_
   SVN_ERR(svn_client__find_symmetric_merge(&merge,
                                            source_path_or_url, source_revision,
                                            target_wcpath, allow_mixed_rev,
+                                           allow_local_mods, allow_switched_subtrees,
                                            ctx, scratch_pool, scratch_pool));
 
   /* Perform the 3-way merges */
@@ -384,10 +387,10 @@ svn_cl__merge(apr_getopt_t *os,
 #ifdef SVN_WITH_SYMMETRIC_MERGE
   if (opt_state->symmetric_merge)
     {
-      if (two_sources_specified || opt_state->reintegrate)
+      if (two_sources_specified)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--reintegrate and SOURCE2 can't be used "
-                                  "with --symmetric"));
+                                _("SOURCE2 can't be used with --symmetric"));
+
       SVN_ERR_W(svn_cl__check_related_source_and_target(
                   sourcepath1, &peg_revision1, targetpath, &unspecified,
                   ctx, pool),
@@ -400,6 +403,8 @@ svn_cl__merge(apr_getopt_t *os,
                             opt_state->record_only,
                             opt_state->dry_run,
                             opt_state->allow_mixed_rev,
+                            ! opt_state->reintegrate,
+                            ! opt_state->reintegrate,
                             options, ctx, pool);
     }
   else