Hello, On Tuesday 03 October 2006 21:37, Chris Shoemaker wrote: > On Tue, Oct 03, 2006 at 02:13:14PM -0400, Chris Shoemaker wrote: > > First off, I'm a long-time happy quilt user. Today, I saw something > > strange enough that I thought I should report it. Sorry I don't have > > an actual reproduction script. If it's absolutely required, let me > > know. > > > > Here's what happened: > > > > [These first few steps may be unimportant, but I include them just in > > case.] > > > > I'm in the middle of my patch stack. The next patch, call it > > 'sed.diff', is the result of a sed on my tree. > > > > $ quilt push > > > > [ The push fails because I've made changes to eariler patches. > > Instead of forcing it and fixing it up, I'm just going to re-run the > > saved sed script. ] > > > > $ quilt delete sed.diff > > > > [ Perhaps I should have used -r here, but I never do. ] > > > > $ quilt new sed.diff > > > > $ quilt add `cat saved-list-of-files` > > > > $ sed -f script.sed -i `quilt files` > > > > Now I want to see what I've done before I `quilt ref`. > > > > $ quilt diff -z |less > > > > Here's where it gets weird, and I had to triple-check that I was > > actually seeing what I was seeing.
The above diff is between the old version of the patch (which is still in patches/sed.diff after the delete, and as far as the original patch applies) and the working tree. What you really want to do here is a simple `quilt diff'. > > The diff looked just as I expected, with the right files and hunks and > > line numbers, except for one important difference. > > > > Most of the changed lines from the original version (those starting > > with '-') were not the actual text from the original version, but the > > text from the changed version. > > > > IOW, if my sed script had "s/QQQ/XXX/g" in it, I saw lines like: > > > > @@ -554,7 +554,7 @@ > > > > > > > > - foo XXX bar > > + foo XXX bar > > > > > > > > > > > > And this wasn't just one hunk, but almost every hunk was in the > > 'correct' place, but showed identical lines. Probably the old and the new versions of the files have some whitespace changes --- otherwise, diff wouldn't generate such hunks. Could you please check very carefully? > > A little baffled, I decided to `quilt ref` anyway. > > > > Afterward, `quilt diff |less` showed the correct diffs. > > > > Can anyone explain this? It seems like a bug to me. > > More info: > $ quilt --version > 0.45 > > > I can easily repeat this. Also, this is probably a BIG HINT: > > When I get the weird `quilt diff -z`, there are 2 of the 20 files for > which the diff shows the correct difference. Those two files are the > same two files that failed to apply during the first `quilt push`. > Incidentally, I use QUILT_PUSH_ARGS="--leave-rejects" in my .quiltrc > file. In case you still run into problems, please send a test case. (You can use the attached test case as a starting point; run with the test/run script in the quilt tarball.) Andreas
$ rm -rf d $ mkdir d d/patches $ cd d $ echo f0 > f $ quilt new foo > Patch patches/foo is now on top $ quilt add f > File f added to patch patches/foo $ echo f1 > f $ quilt refresh > Refreshed patch patches/foo $ quilt delete foo > Removing patch patches/foo > No patches applied > Removed patch patches/foo $ cat patches/foo > Index: d/f > =================================================================== > --- d.orig/f > +++ d/f > @@ -1 +1 @@ > -f0 > +f1 $ quilt new foo > Patch patches/foo is now on top $ quilt add f > File f added to patch patches/foo $ quilt diff -z > Index: d/f > =================================================================== > --- d.orig/f > +++ d/f > @@ -1 +1 @@ > -f1 > +f0 $ cd .. $ rm -rf d
_______________________________________________ Quilt-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/quilt-dev
