On Tue, Oct 03, 2006 at 10:06:39PM +0200, Andreas Gruenbacher wrote: > 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'.
Aha! I had expected that `quilt new sed.diff` would start a _new_ empty patch. That's why I followed it with `quilt add ...`, and that's why I expected `quilt diff` to be the same as `quilt diff -z`. I guess `quilt delete mypatch && quilt new mypatch` doesn't actually give me the new empty patch I want. This might be less disturbing if `quilt new mypatch` gave some output like "Re-using existing patch." > > > > 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. That's quite likely, since the _old_ patch would have stripped trailing whitespace when it was refreshed, but the new changes wouldn't reflect this. > > 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.) In the future, I'll just keep in mind that `quilt new patch` might give me a patch containing stuff from some other old patch with that same name. Thanks. -chris > > Andreas _______________________________________________ Quilt-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/quilt-dev
