Bug 647 - log -pf forgets -p after following copy/rename
Summary: log -pf forgets -p after following copy/rename
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-24 13:08 UTC by Joel Rosdahl
Modified: 2012-05-13 05:05 UTC (History)
12 users (show)

See Also:
Python Version: ---


Attachments
(33 bytes, application/octet-stream)
2007-07-24 13:08 UTC, Joel Rosdahl
Details
(34 bytes, text/x-patch)
2010-07-08 14:51 UTC, Joel Rosdahl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joel Rosdahl 2007-07-24 13:08 UTC
"hg log -pf" seems to forget -p after following a copy/rename. Attached is a
test case that triggers the error.
Comment 1 Patrick Mézard 2007-07-29 04:50 UTC
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.
Comment 2 Wagner Bruna 2010-02-10 07:18 UTC
This was also reported as Debian http://www.serpentine.com/bugzilla/show_bug.cgi?id=552542: http://bugs.debian.org/552542 .
Comment 3 tailgunner 2010-06-28 13:46 UTC
Where in current codebase does "match function" reside? I might try to fix
it, if it's not too involved.
Comment 4 Martin Geisler 2010-06-29 00:59 UTC
tailgunner2: the match functions/classes are defined in match.py.
Comment 5 kiilerix 2010-07-02 09:48 UTC
A fix was included in f786fc4b8764 for 1.6. Do that solve the problem for you?
Comment 6 Joel Rosdahl 2010-07-08 14:51 UTC
Yes, thanks.

I've attached an updated version of the test case I made. Please feel free
to apply it (or not).
Comment 7 HG Bot 2010-07-14 14:00 UTC
Fixed by http://hg.intevation.org/mercurial/crew/rev/efbc09fdefd8
(test-log: Add test for "hg log -pf" (issue647))
Comment 8 Wagner Bruna 2010-08-13 14:12 UTC
Fix and test already on last stable; marking as resolved.
Comment 9 Bugzilla 2012-05-12 08:42 UTC

--- 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)