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

Re: Issue 2897 revisited. Really.

From: Ben Collins-Sussman <sussman_at_red-bean.com>
Date: 2007-11-29 14:03:14 CET

On Nov 29, 2007 1:09 AM, Kamesh Jayachandran <kamesh@collab.net> wrote:
>
> > I think issue #2897 is really two separate issues rolled into one.
> > Disentangled, they are:
> >
> > 1) When you merge a BRANCH to TRUNK, don't merge back revisions
> > which had previously been ported from TRUNK to BRANCH.
> >
> > 2) Don't lose conflict resolution work (where "lose" can mean
> > "mistakenly lump it in with purely merged changes").
> >
> >
> >
> Yes I am working on [2], the Idea I have to solve that bit is,
> *Don't filter the reflective merge commit rev, rather merge it
> differently by having separate editor hooks defined in the client/wc level.
> Let us say
> - someone 'merge -r50:150 from /feature branch' to trunk working copy.
> - He already synchronized trunk to /feature branch and committed at r96
> In issue-2897 branch code does 'merge -r50:95 from /feature branch' and
> 'merge -r96:150 from /feature branch', This looses changes from
> - local edits to resolve conflicts etc.
> - merge from some other source part of the same commit.

Right, I think we agree. We cannot merge r96 to the trunk as it is,
because it will cause repeated-merge conflicts. But we can't skip r96
entirely either, because the local edits are still important.

> My thoughts on solving this further may be on issue-2897 branch or part
> of some new issue branch.
> - Introduce the new boolean member 'is_reflective' to
> 'svn_merge_range_t'.
> - While populating 'remaining_ranges' populate this field when we
> encounter a reflective revision
> - non_reflective_merge_editor which would analyze the given revision
> number and do relevant non-reflective portions(adhoc local mods/merge
> from some other source part of this commit)

Exactly: r96 needs to be "split" into two changes: the /trunk:r50-95
portion should be ignored, but the remaining changes should be
applied.

> - 'merge -r50:95 from /feature branch'
> - Oh r96 is a reflective, Use non_reflective_merge_editor to merge the
> non-reflective changes.
> - 'merge -r96:150 from /feature branch'

Sure... the hard part here is: how are you going to divide r96? You
need to 'subtract' /trunk:50-95 from r96, and capture the leftover
diff. Or, as Ph. Marek has suggested, maybe you can generate the
special diff by simply comparing trunk@95 with branch@96. Or, as Karl
is pondering, maybe we want to avoid this situation altogether, and
force r96 to be two separate commits.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Nov 29 14:03:31 2007

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