This is the mail archive of the
patchutils-list@sourceware.org
mailing list for the patchutils project.
patch subtraction bug
- From: "Eli Carter" <eli dot carter at commprove dot com>
- To: patchutils-list at sourceware dot org
- Date: Mon, 23 Oct 2006 17:26:33 -0500 (CDT)
- Subject: patch subtraction bug
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.
When I tried the same abuse, but filtering only on file (no --hunks=),
combinediff removed that file's deltas from the original diff, just as I
hoped it would.
So it looks to me like combinediff isn't accounting for the change in line
numbers for a file due to one patch that affects the target line numbers
in the other patch.
If I have a chance, I'll look at the code and try to make this work, but
it'll be another day.
Have fun,
Eli
eli.carter@commprove.com