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/05/21 18:52:32 UTC

svn commit: r1341103 - /subversion/trunk/subversion/libsvn_client/merge.c

Author: julianfoad
Date: Mon May 21 16:52:32 2012
New Revision: 1341103

URL: http://svn.apache.org/viewvc?rev=1341103&view=rev
Log:
Simplify merge code a tiny bit.

* subversion/libsvn_client/merge.c
  (filter_self_referential_mergeinfo): Remove the 'honor_mergeinfo' and
    'reintegrate_merge' parameters and the part that simply returns if they
    are both false.
  (prepare_merge_props_changed): Handle those cases here, the only caller,
    instead.

Modified:
    subversion/trunk/subversion/libsvn_client/merge.c

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1341103&r1=1341102&r2=1341103&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Mon May 21 16:52:32 2012
@@ -888,19 +888,13 @@ omit_mergeinfo_changes(apr_array_header_
    *PROPS is an array of svn_prop_t structures representing regular properties
    to be added to the working copy TARGET_ABSPATH.
 
-   HONOR_MERGEINFO determines whether mergeinfo will be honored by this
-   function (when applicable).
-
    The merge source and target are assumed to be in the same repository.
 
-   If mergeinfo is not being honored and REINTEGRATE_MERGE is FALSE do
-   nothing.  Otherwise,
-   filter out mergeinfo property additions to TARGET_ABSPATH when
+   Filter out mergeinfo property additions to TARGET_ABSPATH when
    those additions refer to the same line of history as TARGET_ABSPATH as
    described below.
 
-   If mergeinfo is being honored
-   then examine the added mergeinfo, looking at each range (or single rev)
+   Examine the added mergeinfo, looking at each range (or single rev)
    of each source path.  If a source_path/range refers to the same line of
    history as TARGET_ABSPATH (pegged at its base revision), then filter out
    that range.  If the entire rangelist for a given path is filtered then
@@ -917,8 +911,6 @@ omit_mergeinfo_changes(apr_array_header_
 static svn_error_t *
 filter_self_referential_mergeinfo(apr_array_header_t **props,
                                   const char *target_abspath,
-                                  svn_boolean_t honor_mergeinfo,
-                                  svn_boolean_t reintegrate_merge,
                                   svn_ra_session_t *ra_session,
                                   svn_client_ctx_t *ctx,
                                   apr_pool_t *pool)
@@ -930,13 +922,6 @@ filter_self_referential_mergeinfo(apr_ar
   const char *repos_relpath;
   svn_client__pathrev_t target_base;
 
-  /* If we aren't honoring mergeinfo, then get outta here.  If this is a
-     reintegrate merge or a merge from a foreign repository we still need to
-     filter regardless of whether we are honoring mergeinfo or not. */
-  if (! honor_mergeinfo
-      && ! reintegrate_merge)
-    return SVN_NO_ERROR;
-
   /* If PATH itself has been added there is no need to filter. */
   SVN_ERR(svn_wc__node_get_origin(&is_copy,  &target_base.rev, &repos_relpath,
                                   &target_base.repos_root_url,
@@ -1243,11 +1228,9 @@ prepare_merge_props_changed(const apr_ar
              entirely.  */
           if (! merge_b->same_repos)
             SVN_ERR(omit_mergeinfo_changes(&props, props, result_pool));
-          else
+          else if (HONOR_MERGEINFO(merge_b) || merge_b->reintegrate_merge)
             SVN_ERR(filter_self_referential_mergeinfo(&props,
                                                       local_abspath,
-                                                      HONOR_MERGEINFO(merge_b),
-                                                      merge_b->reintegrate_merge,
                                                       merge_b->ra_session2,
                                                       merge_b->ctx,
                                                       result_pool));