Received: from spf3.us4.outblaze.com (spf3.us4.outblaze.com [205.158.62.25]) by sdf.lonestar.org (8.12.10/8.12.10) with ESMTP id iAMA0YhL029202 for ; Mon, 22 Nov 2004 10:00:35 GMT Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by spf3.us4.outblaze.com (Postfix) with ESMTP id 925F0549E2 for ; Mon, 22 Nov 2004 10:00:33 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWB61-00031v-RV for migo@homemail.com; Mon, 22 Nov 2004 05:06:57 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWB3k-0002z9-E1 for gnu-arch-users@gnu.org; Mon, 22 Nov 2004 05:04:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWB3d-0002yE-Gx for gnu-arch-users@gnu.org; Mon, 22 Nov 2004 05:04:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWB2z-0002im-8m for gnu-arch-users@gnu.org; Mon, 22 Nov 2004 05:03:49 -0500 Received: from [193.131.176.58] (helo=cam-admin0.cambridge.arm.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWAtr-0006m4-65 for gnu-arch-users@gnu.org; Mon, 22 Nov 2004 04:54:23 -0500 Received: from cam-mail2.cambridge.arm.com (cam-mail2.cambridge.arm.com [10.1.127.39]) by cam-admin0.cambridge.arm.com (8.12.10/8.12.10) with ESMTP id iAM9rVso018852; Mon, 22 Nov 2004 09:53:31 GMT Received: from localhost.localdomain (cmarinas@pc1117.cambridge.arm.com [10.1.69.160]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id JAA19498; Mon, 22 Nov 2004 09:54:12 GMT To: gnu-arch-users@gnu.org References: <20041107234609.7bf0abfe@delta.hk.office.outblaze.com> <1099995711.2900.84.camel@stargate> <1100306258.7511.56.camel@localhost> <20041113122841.GA13424@fencepost> <20041116081231.GS10330@patrick.wattle.id.au> From: Catalin Marinas Date: Mon, 22 Nov 2004 09:55:11 +0000 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Gnu-arch-users] Re: darcs vs tla X-BeenThere: gnu-arch-users@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: a discussion list for all things arch-ish List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: gnu-arch-users-bounces+migo=homemail.com@gnu.org Errors-To: gnu-arch-users-bounces+migo=homemail.com@gnu.org Status: RO Content-Length: 3084 Lines: 68 Cameron Patrick writes: > Anyway, the first post that I can see describing a pure merge > algorithm is here: > > http://cp.yi.org/lurker/message/20030525.000938.4f48d03d.en.html >From this message (written by Robert Collins): "The bad news: say goodbye to star-merge (not needed), replay and update as 'merging' tools." Indeed, pure-merge would be useful but star-merge will still be used. Take for example the Linux kernel development. There are around 3000 changesets between releases. If I upgrade my branch, I wouldn't like to see all those chanso be useful if arch would have an option to specify the author of the patch, other than the one doing the commit. That's also useful if someone would like to create a mirror of a non-arch repository (the Linux kernel?) and preserve the author. The 'star-merge --three-way' (*not* the standard one) algoritm can be modified to cope with cherry-picking. The common ancestor of 2 branches is the last revision before the first 'tla missing' reported revision between these branches (maybe it already does this). If a patch was cherry-picked from one branch into the other branch, 'star-merge -t' would report a conflict in the files modified by the cherry-picked patch. It is likely that the conflicting parts are the same or, at least, have some common lines. This can be easily solved manually or by using a smarter diff3 tool which eliminates the common lines in the conflicting parts (though it might find similarities between other conflicting parts not modified by the cherry-picked patch, but I don't see this as a problem). A more darcs-like way of 'star-merge -t' would be to apply the cherry-picked patches to the common ancestor before the diff3 merging. If the patch fails to apply, that's fine since we can manually fix the conflicts in the star-merged tree. The same result is actually achieved by darcs using the patch commuting operators. If there are not cherry-picked changes, the 'darcs pull' and 'star-merge -t' are equivalent regarding the result on the merged tree (darcs doesn't lose the individual changes though). By successive commuting, darcs moves the cherry-picked changes before the unmerged ones thus creating a real common ancestor with all the changes merged in either direction. Unlike replaying the cherry-picked patches onto the common ancestor, darcs' creation of the common ancestor always succeeds because if 2 patches cannot commute, they were both merged when cherry-picked (patch dependency tracking, you can find situations where this is annoying, i.e. adding some definitions to a C header file, sorted alphabetically). Another difference with darcs is that adjacent changes to the same file are considered independent and they can be commuted (I personally prefer the arch way of knowing if the context of a patch changes). Catalin _______________________________________________ Gnu-arch-users mailing list Gnu-arch-users@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-arch-users GNU arch home page: http://savannah.gnu.org/projects/gnu-arch/