You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2010/10/08 20:24:48 UTC
svn commit: r1005940 - /subversion/trunk/subversion/libsvn_client/merge.c
Author: pburba
Date: Fri Oct 8 18:24:48 2010
New Revision: 1005940
URL: http://svn.apache.org/viewvc?rev=1005940&view=rev
Log:
Some minor headway on issue #3324 'path moved by merge but source not
deleted'.
* subversion/libsvn_client/merge.c
(do_directory_merge): Document a local variable whose name makes its
purpose seem obvious, but which has some subtleties worth noting.
Calculate the starting revision of the editor drive *after* going through
all our issue #3067 machinations. In other words: Remain liberal in
what mergeinfo we record to describe a merge, but conservative in
what we drive through the editor (e.g. don't use a starting rev that
predates any operative changes). The latter provides some issue #3324
relief, see http://subversion.tigris.org/issues/show_bug.cgi?id=3324#desc5
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=1005940&r1=1005939&r2=1005940&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Fri Oct 8 18:24:48 2010
@@ -8028,7 +8028,18 @@ do_directory_merge(svn_mergeinfo_catalog
apr_pool_t *pool)
{
svn_error_t *err = SVN_NO_ERROR;
+
+ /* The range defining the mergeinfo we will record to describe the merge
+ (assuming we are recording mergeinfo
+
+ Note: This may be a subset of REVISION1:REVISION2 if
+ populate_remaining_ranges() determines that some part of
+ REVISION1:REVISION2 has already been wholly merged to TARGET_ABSPATH.
+ Also, the actual editor drive(s) may be a subset of RANGE, if
+ remove_noop_subtree_ranges() and/or fix_deleted_subtree_ranges()
+ further tweak things. */
svn_merge_range_t range;
+
svn_ra_session_t *ra_session;
svn_client__merge_path_t *target_merge_path;
svn_boolean_t is_rollback = (revision1 > revision2);
@@ -8101,17 +8112,22 @@ do_directory_merge(svn_mergeinfo_catalog
if (honor_mergeinfo && !merge_b->reintegrate_merge)
{
- svn_revnum_t start_rev, end_rev;
+ svn_revnum_t new_range_start, start_rev, end_rev;
apr_pool_t *iterpool = svn_pool_create(pool);
- /* The merge target target_wcpath and/or its subtrees may not need all
+ /* The merge target TARGET_ABSPATH and/or its subtrees may not need all
of REVISION1:REVISION2 applied. So examine
NOTIFY_B->CHILDREN_WITH_MERGEINFO to find the oldest starting
revision that actually needs to be merged (for reverse merges this is
- the youngest starting revision). */
- start_rev =
- get_most_inclusive_start_rev(notify_b->children_with_mergeinfo,
- is_rollback);
+ the youngest starting revision).
+
+ We'll do this twice, right now for the start of the mergeinfo we will
+ ultimately record to describe this merge and then later for the
+ start of the actual editor drive. */
+ new_range_start = get_most_inclusive_start_rev(
+ notify_b->children_with_mergeinfo, is_rollback);
+ if (SVN_IS_VALID_REVNUM(new_range_start))
+ range.start = new_range_start;
/* Remove inoperative ranges from any subtrees' remaining_ranges
to spare the expense of noop editor drives. */
@@ -8121,16 +8137,20 @@ do_directory_merge(svn_mergeinfo_catalog
notify_b, merge_b,
pool, iterpool));
+ /* Adjust subtrees' remaining_ranges to deal with issue #3067 */
SVN_ERR(fix_deleted_subtree_ranges(url1, revision1, url2, revision2,
ra_session, notify_b, merge_b, pool));
+ /* remove_noop_subtree_ranges() and/or fix_deleted_subtree_range()
+ may have further refined the starting revision for our editor
+ drive. */
+ start_rev =
+ get_most_inclusive_start_rev(notify_b->children_with_mergeinfo,
+ is_rollback);
+
/* Is there anything to merge? */
if (SVN_IS_VALID_REVNUM(start_rev))
{
- /* Adjust range to describe the start of our most
- inclusive merge. */
- range.start = start_rev;
-
/* Now examine NOTIFY_B->CHILDREN_WITH_MERGEINFO to find the youngest
ending revision that actually needs to be merged (for reverse
merges this is the oldest starting revision). */