Author: julianfoad
Date: Mon Aug  6 14:23:54 2012
New Revision: 1369855

URL: http://svn.apache.org/viewvc?rev=1369855&view=rev
Log:
Symmetric merge doesn't make sense with the 'ignore ancestry' option, since
it is all about merge tracking, so remove that option from its API and make
'svn merge' error out if both '--ignore-ancestry' and '--symmetric' options
are specified.  (This makes sense at the moment, while symmetric merge is
specified explicitly.  When we later teach 'svn merge' to do a symmetric
merge by default, then we may want to to handle this a different way.)

* subversion/include/private/svn_client_private.h
  (svn_client__do_symmetric_merge): Remove the 'ignore_ancestry' parameter.
    The doc string was wrong anyway: the option did prevent mergeinfo from
    being used.

* subversion/libsvn_client/merge.c
  (do_symmetric_merge_locked, svn_client__do_symmetric_merge): Remove the
    'ignore_ancestry' parameter and use FALSE instead.

* subversion/svn/merge-cmd.c
  (symmetric_merge): Remove the 'ignore_ancestry' parameter.
  (svn_cl__merge): Error out if both '--ignore-ancestry' and '--symmetric'
    options are specified.

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=1369855&r1=1369854&r2=1369855&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_client_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_client_private.h Mon Aug  6 
14:23:54 2012
@@ -211,9 +211,7 @@ svn_client__find_symmetric_merge(svn_cli
  *
  * Merge according to MERGE into the WC at TARGET_WCPATH.
  *
- * The other parameters are as in svn_client_merge4().  IGNORE_ANCESTRY
- * only controls the diffing of files, it doesn't prevent mergeinfo from
- * being used.
+ * The other parameters are as in svn_client_merge4().
  *
  * ### TODO: There's little point in this function being the only way the
  * caller can use the result of svn_client__find_symmetric_merge().  The
@@ -227,7 +225,6 @@ svn_error_t *
 svn_client__do_symmetric_merge(const svn_client__symmetric_merge_t *merge,
                                const char *target_wcpath,
                                svn_depth_t depth,
-                               svn_boolean_t ignore_ancestry,
                                svn_boolean_t force,
                                svn_boolean_t record_only,
                                svn_boolean_t dry_run,

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1369855&r1=1369854&r2=1369855&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Mon Aug  6 14:23:54 2012
@@ -11632,7 +11632,6 @@ static svn_error_t *
 do_symmetric_merge_locked(const svn_client__symmetric_merge_t *merge,
                           const char *target_abspath,
                           svn_depth_t depth,
-                          svn_boolean_t ignore_ancestry,
                           svn_boolean_t force,
                           svn_boolean_t record_only,
                           svn_boolean_t dry_run,
@@ -11682,7 +11681,8 @@ do_symmetric_merge_locked(const svn_clie
                                                    right_ra_session,
                                                    &source, merge->yca,
                                                    TRUE /* same_repos */,
-                                                   depth, ignore_ancestry,
+                                                   depth,
+                                                   FALSE /*ignore_ancestry*/,
                                                    force, record_only,
                                                    dry_run,
                                                    merge_options, &use_sleep,
@@ -11711,8 +11711,8 @@ do_symmetric_merge_locked(const svn_clie
       APR_ARRAY_PUSH(merge_sources, const merge_source_t *) = &source;
 
       err = do_merge(NULL, NULL, merge_sources, target, NULL,
-                     TRUE /*related*/,
-                     TRUE /*same_repos*/, ignore_ancestry, force, dry_run,
+                     TRUE /*related*/, TRUE /*same_repos*/,
+                     FALSE /*ignore_ancestry*/, force, dry_run,
                      record_only, NULL, FALSE, FALSE, depth, merge_options,
                      &use_sleep, ctx, scratch_pool, scratch_pool);
     }
@@ -11729,7 +11729,6 @@ svn_error_t *
 svn_client__do_symmetric_merge(const svn_client__symmetric_merge_t *merge,
                                const char *target_wcpath,
                                svn_depth_t depth,
-                               svn_boolean_t ignore_ancestry,
                                svn_boolean_t force,
                                svn_boolean_t record_only,
                                svn_boolean_t dry_run,
@@ -11745,13 +11744,13 @@ svn_client__do_symmetric_merge(const svn
   if (!dry_run)
     SVN_WC__CALL_WITH_WRITE_LOCK(
       do_symmetric_merge_locked(merge,
-                                target_abspath, depth, ignore_ancestry,
+                                target_abspath, depth,
                                 force, record_only, dry_run,
                                 merge_options, ctx, pool),
       ctx->wc_ctx, lock_abspath, FALSE /* lock_anchor */, pool);
   else
     SVN_ERR(do_symmetric_merge_locked(merge,
-                                target_abspath, depth, ignore_ancestry,
+                                target_abspath, depth,
                                 force, record_only, dry_run,
                                 merge_options, ctx, pool));
 

Modified: subversion/trunk/subversion/svn/merge-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/merge-cmd.c?rev=1369855&r1=1369854&r2=1369855&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/merge-cmd.c (original)
+++ subversion/trunk/subversion/svn/merge-cmd.c Mon Aug  6 14:23:54 2012
@@ -111,7 +111,6 @@ symmetric_merge(const char *source_path_
                 const svn_opt_revision_t *source_revision,
                 const char *target_wcpath,
                 svn_depth_t depth,
-                svn_boolean_t ignore_ancestry,
                 svn_boolean_t force,
                 svn_boolean_t record_only,
                 svn_boolean_t dry_run,
@@ -133,7 +132,7 @@ symmetric_merge(const char *source_path_
 
   /* Perform the 3-way merges */
   SVN_ERR(svn_client__do_symmetric_merge(merge, target_wcpath, depth,
-                                         ignore_ancestry, force, record_only,
+                                         force, record_only,
                                          dry_run, merge_options,
                                          ctx, scratch_pool));
 
@@ -417,6 +416,9 @@ svn_cl__merge(apr_getopt_t *os,
           || first_range_end.kind != svn_opt_revision_unspecified)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                 _("a revision range can't be used with 
--symmetric"));
+      if (opt_state->ignore_ancestry)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--ignore-ancestry can't be used with 
--symmetric"));
 
       SVN_ERR_W(svn_cl__check_related_source_and_target(
                   sourcepath1, &peg_revision1, targetpath, &unspecified,
@@ -425,7 +427,6 @@ svn_cl__merge(apr_getopt_t *os,
 
       merge_err = symmetric_merge(sourcepath1, &peg_revision1, targetpath,
                                   opt_state->depth,
-                                  opt_state->ignore_ancestry,
                                   opt_state->force,
                                   opt_state->record_only,
                                   opt_state->dry_run,


Reply via email to