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? Tim. */