From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15309 invoked by alias); 24 Oct 2006 14:37:51 -0000 Received: (qmail 15301 invoked by uid 22791); 24 Oct 2006 14:37:51 -0000 X-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.ie.commprove.com (HELO mail.ie.commprove.com) (80.169.138.185) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Oct 2006 14:37:45 +0000 Received: from mail.ie.commprove.com (localhost [127.0.0.1]) by mail.ie.commprove.com (Commprove Mail Server) with ESMTP id 712F115D0; Tue, 24 Oct 2006 15:36:50 +0100 (IST) Received: from 10.6.7.70 (SquirrelMail authenticated user eli_carter) by mail.ie.commprove.com with HTTP; Tue, 24 Oct 2006 09:36:50 -0500 (CDT) Message-ID: <50453.10.6.7.70.1161700610.squirrel@mail.ie.commprove.com> In-Reply-To: <1161688100.4287.5.camel@cyberelk.elk> References: <53689.10.6.7.70.1161642393.squirrel@mail.ie.commprove.com> <1161688100.4287.5.camel@cyberelk.elk> Date: Tue, 24 Oct 2006 14:37:00 -0000 Subject: Re: patch subtraction bug From: "Eli Carter" To: "Tim Waugh" Cc: "Eli Carter" , patchutils-list@sourceware.org User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-CommProve-MailScanner: Found to be clean X-CommProve-MailScanner-From: eli.carter@commprove.com X-IsSubscribed: yes Mailing-List: contact patchutils-list-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: patchutils-list-owner@sourceware.org X-SW-Source: 2006-q4/txt/msg00002.txt.bz2 > On Mon, 2006-10-23 at 17:26 -0500, Eli Carter wrote: >> I tried abusing patchutils in a new way today, and it didn't do what I >> wanted. >> >> First, pull one change out of a larger patch: >> filterdiff -p1 -i some/file.py --hunks=5 < diff > one-change.patch >> Now, I want to remove that change from the larger patch, so I combine >> the >> larger patch with a reversed version of the the one-change.patch: >> interdiff one-change.patch /dev/null | combinediff diff /dev/stdin > >> rest.patch >> >> What I got was a patch with the hunk from one-change.patch in rest.patch >> twice with different line numbers for the change. > > Hmm, I just tried this myself and got the expected results -- the entire > original patch with the single change removed. > > Sounds like it depends on the input you give it. One thing that *might* > account for it is described in the 'BUGS' section of the interdiff man > page: > > There are some sets of patches in which there is just not enough > information to produce a proper interdiff. In this case, the strategy > employed is to revert the original patch and apply the new patch. > This, unfortunately, means that interdiffs are not guaranteed to be > reversible. > > Do you think it could be that? Perhaps... but I don't think--wait... The doubling of the patch at the end I thought was [apply change] [apply change], but the second one was the reverse of the first, as you described... I misread the patch. Oops. Hmm... I still think interdiff has enough information to cancel the hunks... but I'll have to play with the sources before I really make that claim. Sorry for wasting your time, Eli