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 iA9F9u11015395 for ; Tue, 9 Nov 2004 15:09:57 GMT Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by spf3.us4.outblaze.com (Postfix) with ESMTP id 511F553A95 for ; Tue, 9 Nov 2004 15:09:50 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRXlP-000605-1F for migo@homemail.com; Tue, 09 Nov 2004 10:18:31 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRXhW-0004KQ-IS for gnu-arch-users@gnu.org; Tue, 09 Nov 2004 10:14:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRXhK-0004D5-BG for gnu-arch-users@gnu.org; Tue, 09 Nov 2004 10:14:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRXhK-00049i-8V for gnu-arch-users@gnu.org; Tue, 09 Nov 2004 10:14:18 -0500 Received: from [193.131.176.58] (helo=cam-admin0.cambridge.arm.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CRXYU-00058n-Ma for gnu-arch-users@gnu.org; Tue, 09 Nov 2004 10:05:11 -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 iA9F4Qso022805; Tue, 9 Nov 2004 15:04:26 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 PAA11689; Tue, 9 Nov 2004 15:04:51 GMT To: Anand Kumria References: <20041107234609.7bf0abfe@delta.hk.office.outblaze.com> <877jowbl8w.fsf@tleepslib.sk.tsukuba.ac.jp> <200411082327.iA8NRVMB084815@xl2.seyza.com> <1099996596.2900.96.camel@stargate> From: Catalin Marinas Date: Tue, 09 Nov 2004 15:05:27 +0000 In-Reply-To: (Anand Kumria's message of "Wed, 10 Nov 2004 01:42:44 +1100") 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 Cc: gnu-arch-users@gnu.org 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: 2442 Lines: 52 Anand Kumria writes: > On Tue, 09 Nov 2004 10:36:36 +0000, Catalin Marinas wrote: >> What the darcs operators can do is happily merge a patch which adds some >> lines at the end of an existing patch (which is not merged). Arch would >> fail this because the diff context contains the patch which is not merged. >> This might not be good for C language files but might be OK for makefiles. > > Ah, yes - something that bugged me today after a star-merge; all my > conflicts were at the end of files. I'm guessing that that is a problem > with diff/patch? Does darcs contain it's own version of these, or call > out? Perhaps it uses different options which arch should pick up? Darcs uses an internal algorithm similar to diff for creating the changes but they are in a different format and it doesn't use the patch tool for applying the patches. >> Another interesting thing the operators remove is the need for file ids. >> If the P1 patch modifies a file's name and P2 adds some text to this file, >> P2 can be properly merged into a tree which does not contain P1 because >> the commutation operators would change the P2 patch so that it applies the >> changes to the original file name. > > Without ids of some sort, how can darcs determine that P2 is modifying the > same file that P1 renamed? Are you saying that on commit P2 would be > stored as a modification on the original file (P1 filename) but at a later > point in time? P2 is stored as a modification to the latest file. Let's say you have a file called aaa.c which is present in both the main tree and on a branch. P1 renames this file to bbb.c in the main tree. P2 adds some lines to the bbb.c file in the main tree. If you apply P1 and P2 on the branch, in this order, everything would be fine. If you only want to apply P2, darcs notices that P1 is not present and will commute the two patches to P1' and P2' so that P2' can be applied before P1' but preserving the file changes. P2' will be similar to P2 only that it changes the aaa.c and not bbb.c file. You can later apply the P1 on the branch (in fact, P1' will be applied) and rename the file to bbb.c. Have a look at the darcs' manual for the theory of patches. 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/