[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: reverse-merge broken?

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2007-10-18 15:33:13 CEST

Jack,
Yes it is broken since the early days of merge tracking which I
uncovered yesterday.

Issue 2973 takes care of that.

The cause of the failure is,

We try to do reverse merge only if there was a forward merge in the
past.(As an attempt to avoid repeat reverse merging I hope!!).

This makes me to think 'If we don't track reverse merge why we should
avoid repeat reverse merge'.

Attaching the patch, merge tests 67 alone fails with this.

Thanks.
With regards
Kamesh Jayachandran

Jack Repenning wrote:
> Is this wrong? Or have I just somehow forgotten how reverse merges
> should work?
>
> % svn merge some://url/to/some/branch
> (changes happen)
> % svn ci -m"check the merge in"
> (some changes get committed)
> % svn up
> At revision 17.
> % svn merge -c-17
> --- Reverse-merging r17 into '.':
> (but nothing else!)
> % svn stat
> (nothing)
>
> Shouldn't that merge command undo the changes that went into revision
> 17, leaving me with local mods (matching what I had back at r16,
> before the merge and commit)?
>
> I'm looking at a private build of r27129. (OS X, if you want to
> care). The repository was created, and has only been touched by, this
> same build (it's a tiny demo repo I set up for, well, a demo -- just
> contains the greek tree).
>
> Happy to provide a detailed reproduction script, dump of the
> repository at the outset, and all that, but thought I'd confirm that
> my head's on straight first.
>
> -==-
> Jack Repenning
> Chief Technology Officer
> CollabNet, Inc.
> 8000 Marina Boulevard, Suite 600
> Brisbane, California 94005
> office: +1 650.228.2562
> mobile: +1 408.835.8090
> raindance: +1 877.326.2337, x844.7461
> aim: jackrepenning
> skype: jrepenning
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>

Index: subversion/libsvn_client/merge.c
===================================================================
--- subversion/libsvn_client/merge.c (revision 27274)
+++ subversion/libsvn_client/merge.c (working copy)
@@ -1185,11 +1185,8 @@
               SVN_ERR(svn_rangelist_reverse(subtractive_merges, pool));
               qsort(subtractive_merges->elts, subtractive_merges->nelts,
                     subtractive_merges->elt_size, svn_sort_compare_ranges);
- SVN_ERR(svn_rangelist_intersect(&after_subtractive_merges,
- target_rangelist,
- subtractive_merges, pool));
               SVN_ERR(svn_rangelist_reverse(subtractive_merges, pool));
- SVN_ERR(svn_rangelist_reverse(after_subtractive_merges, pool));
+ after_subtractive_merges = subtractive_merges;
             }
           else
             {

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 18 15:33:30 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.