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

Re: Symmetric Merge -- Algorithm

From: Cristian Amarie <cristian.amarie_at_gmail.com>
Date: Fri, 20 Apr 2012 16:28:12 +0300

> Hi Cristian.  First, let me see if I understand you.  You are talking about
> any graph consisting of a sequence of 'complete' merges[1] between the
> two branches A and B.  Is this a > concrete example, where n=2 and m=3?
>
>     / -- p ---- q ----- A1 -- s ----- A2
>   O       \      \      /      \      /
>     \ --- B1 --- B2 -- r ----- B3 -- t
>
> Here, p/q/r/s/t means a change that is not a merge.  The p/q/r/s/t states are
> the base candidates, not Ab and Bb.

Ah... my mistake. But that is the idea, yes.

> Did you mean, "(merge B into A produces Ax, where 1 <= x <= n)" and
> "(merge A into B produces By, where 1 <= y <= m)"?

Yes. B into A will produce in this example A3, A into B will produce B4
(n=2, m=3) and my goal is to find bases which will have at least a way
(path) for which A3 == B4 (symmetry).

> [1] <http://wiki.apache.org/subversion/SymmetricMerge#Terminology>
>>
>> we get the possible paths of walking Ax->An and By->Bm.
>
> By "paths of walking" you mean following the "merge arrows" (the '/' and '\' in my graph) and also following the "natural history" of a branch (e.g. B1 -> B2)?
>
> So we get the possible paths of walking A1 -> A2, which are:
>
>   A1 -> s -> A2
>   A1 -> s -> B3 -> t -> A2
>
> and the possible paths of walking (let's choose y=2) B2 -> B3, which are:
>
>   B2 -> r -> B3
>   B2 -> r -> A1 -> s -> B3
>
> I'll stop here, for now.

You got my idea exactly (despite the clumsy description...).
Also
  B2 -> r -> A1 -> B3 -> s -> t -> A2 ==> A3 (end in A)
  B2 -> r -> A1 -> B3 -> s -> A2 -> t ==> B4 (end in B)
can be possible paths, if A3 == B4 is verified.

- Cristian
Received on 2012-04-20 15:28:47 CEST

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.