From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: Git merge tool for Org files Date: Sat, 20 Aug 2011 21:08:11 +0200 Message-ID: <878vqnrjdw.fsf@Rainer.invalid> References: <2DC59D99-FACF-40A2-9914-182C6224BD76@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuquE-0003lY-3t for emacs-orgmode@gnu.org; Sat, 20 Aug 2011 15:08:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QuquC-0005o5-T0 for emacs-orgmode@gnu.org; Sat, 20 Aug 2011 15:08:30 -0400 Received: from lo.gmane.org ([80.91.229.12]:59992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QuquC-0005nz-KP for emacs-orgmode@gnu.org; Sat, 20 Aug 2011 15:08:28 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ququ8-0000po-1g for emacs-orgmode@gnu.org; Sat, 20 Aug 2011 21:08:24 +0200 Received: from p57aaceb0.dip.t-dialin.net ([87.170.206.176]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Aug 2011 21:08:24 +0200 Received: from Stromeko by p57aaceb0.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Aug 2011 21:08:24 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Carsten Dominik writes: > One of the obstacle for using Org-mode for collaborative programs is > that many operations add or remove text from the beginning or end of a > file, or which add or remove a subnode from an outline tree. On of the things that I think would be necessary is a way to put an Org document into a "normalized" representation and then evaluate the differences between two of these. The generic exporter started by Bastien could probably deliver such a representation. > These are operations that confuse the git merger, in particular > if two people have added something to a file, or removed/added > sequential sibling nodes. Git merge only works reasonably well for program code (and only if there's no changelog stuff inside the file). The merge driver functionality is there to solve that problem for when you _can_ be smarter. It is absolutely not necessary to write that driver in any particular language, all that git does is to call the driver with three versions of the same file as the argument. > I believe that this could be solved with a dedicated merge driver > that understands the integrity of an outline (sub)tree, and that > knows that the sequence of two new subtrees added by different people > does not matter. You ask a potentially very big question here, this should be constrained to keep it manageable. I think a reasonable strategy is to merge two Org documents "from the outside in", that is starting with the topmost tree elements. If you are merging at the tree level, anything inside the tree should not matter at all. I'm not sure the sequence doesn't matter, but that can hardly be decided by the merge driver unless it figures out how to sort elements of a tree. The second step would then be to check the leaf nodes of the tree for concurrent changes, which probably still need to be resolved manually. Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables