"hg log -pf" seems to forget -p after following a copy/rename. Attached is a test case that triggers the error.
FYI, the problem is the match function used to filter patch content is not updated while we dig through rename revisions. Assuming target file is renamed like: a1 -> a2 -> a3 and you ask about the history of a3, the match function is built to filter a3, but keeps filtering a3 when we iterate on a2 and a1 revisions, which explains why empty patches are displayed. Another rename sequence like : a -> b -> c -> a generates 2 diffs.
This was also reported as Debian http://www.serpentine.com/bugzilla/show_bug.cgi?id=552542: http://bugs.debian.org/552542 .
Where in current codebase does "match function" reside? I might try to fix it, if it's not too involved.
tailgunner2: the match functions/classes are defined in match.py.
A fix was included in f786fc4b8764 for 1.6. Do that solve the problem for you?
Yes, thanks. I've attached an updated version of the test case I made. Please feel free to apply it (or not).
Fixed by http://hg.intevation.org/mercurial/crew/rev/efbc09fdefd8 (test-log: Add test for "hg log -pf" (issue647))
Fix and test already on last stable; marking as resolved.
--- Bug imported by bugzilla@serpentine.com 2012-05-12 08:42 EDT --- This bug was previously known as _bug_ 647 at http://mercurial.selenic.com/bts/issue647 Imported an attachment (id=776) Imported an attachment (id=777)