|
From: | Peter Williams |
Subject: | Re: [Quilt-dev] Does anyone know why ... |
Date: | Sat, 04 Mar 2006 11:14:18 +1100 |
User-agent: | Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) |
Andreas Gruenbacher wrote:
On Thursday, 02 March 2006 07:25, Peter Williams wrote:... "quilt files <patch>" produces empty output when <patch> is not applied? Was this a deliberate design decision? If so what was the logic behind it?The current version of quilt will tell you that the specified patch is not applied; it doesn't fail silently.Quilt won't try to list the files that an unapplied patch touches because this can't be done very well: GNU patch uses complicated heuristics to decide which filename it will patch
This shouldn't be necessary for patches in quilt. It should be VERY well known which files will be effected by a patch.
(see Multiple Patches in a File in the diff info pages). You can use utilities like lsdiff for that purpose,
That involves me knowing/exploiting the internal workings of quilt which is not a "good thing"(TM) IMHO.
but lsdiff will also guess wrong for some patches.
If I remember correctly Andrew's patch management utilities which were the inspiration for quilt (I believe) kept the list of files in a patch as a separate piece of data in the database. Apart from the fact it would enable "quilt files <patch>" to give a useful response, doing something similar in quilt would also cure one of its other annoyances namely files going missing from a patch if the patch is popped when there is currently no modifications to the file.
Although this problem could be described as a feature (i.e. automatic trimming of the patch file list) I think that it's a bug. It can lead to problems such as the user editing a file because he thinks it's in the patch because he put it there and didn't take it out.
PeterPS I also think that "patch diff" should display diffs for unapplied patches IFF there is a patch file available. It's sometimes very useful to be able to check what changes a patch will make before it is applied. And yes, I know that I could look at the file directly BUT that involves me knowing/exploiting the internal workings of quilt which is not a "good thing"(TM).
-- Peter Williams address@hidden "Learning, n. The kind of ignorance distinguishing the studious." -- Ambrose Bierce
[Prev in Thread] | Current Thread | [Next in Thread] |