On 18.1.13 7:35, Jukka Zitting wrote:
Hi,

On Thu, Jan 17, 2013 at 7:15 PM, Michael Dürig <[email protected]> wrote:
The core idea is to try to resolve all conflicts in a branch through
rebasing it on top of the current trunk. After successfully rebasing a
branch, merging it to trunk is as simple as fast forwarding the head of the
trunk to the head of the branch.

+1

In general, instead of throwing an exception (especially a generic one
indistinguishable from other problems), I'd prefer for commit or merge
to rather just return the revision of the new partially rebased
branch, together with the appropriate conflict markers. The client
would then have a chance to resolve those conflicts and re-merge using
higher level context information than what's available in the
MicroKernel.

Yes this is also my idea. I left it out from the pseudo code to keep it as simple as possible as I didn't want to get into details about conflict resolution but concentrate on the conflict free case.

The first POC implementation I did [1] does in fact exactly this: it annotates conflicts in much the same way like AnnotatingConflictHandler does it currently in oak-core. See the contract for rebase [2] for what constitutes a conflict and how each conflict is annotated.

Michael

[1] https://github.com/mduerig/jackrabbit-oak/commits/OAK-536
[2] https://github.com/mduerig/jackrabbit-oak/commit/63868f6f1b03cf1dfe2793b32be588fc075cfdcc#oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java

Reply via email to