On Feb 29, 2012 8:05 AM, "Julian Foad" <julianfoad_at_btopenworld.com> wrote:
>
> Greg Stein wrote:
> > I'm not sure this has anything to do with Ev2. The editor is for making
the actual changes; ie. examine the merge sources, and if acceptable, then
you call svn_editor_delete() to perform the deletion. The merge logic is in
the *driver*, not the receiver.
>
> The way merge works is: client requests the source-side diff from the
repo. Repo sends this diff (e.g. r10:20 branchA) via an 'editor'. Client
(receiver of this edit drive[1]) knows about the target-branch (branchB)
and how that differs from the base (r10 of branchA). Client figures out
what changes to apply to the target branch -- which will be some of the
incoming diff's changes, and some changes that aren't quite the same as in
the incoming diff, and some other changes that the client decides it
needs. Client applies these changes to the WC -- which it could
theoretically do via another editor but it just does it directly.
>
> So the editor is being used to transmit a diff between two repo trees,
not driven by merge code.
In your example you have two edits:
1) the holder of the state of branchA_at_10 is edited to make the state match
branchA_at_20. (unrelated to Ev2, this series of edits is serialized and sent
over the wire)
2) branchB is edited into some target state decided by the merge driver
code. These edits are informed by the deserialized information from (1)
plus "some other changes that the client decides it needs"
The editor interface is not for merging. It is for *applying* the results
of a merge, to a stateful representation of a tree to alter that held state.
Cheers,
-g
Received on 2012-02-29 14:20:26 CET