[issue1052] diff -g copy handling is oddly filename dependent

Richard Lowe mercurial-bugs at selenic.com
Thu Mar 27 14:37:02 CDT 2008


New submission from Richard Lowe <richlowe at richlowe.net>:

diff -g's copy representation seems to be oddly dependent on the filename of
possible ancestors, after fda369b5779c

It appears to pick the ancestor that sorts last, alphabetically by filename,
rather than the most direct ancestor, in at least some cases.

cp a b
commit
cp b otherfile
commit
cp otherfile somename

Will show otherfile -> somename, in both diff -g and status -C

However, if rather than 'b', one uses 'z', the copy will be z -> somename in
diff -g (but not status -C), contents changes are fixed up in the diff such that
content is fine, only ancestry is incorrect.

A script is attached that perhaps demonstrates this more directly.

----------
files: diff-wrong-file.sh
messages: 5734
nosy: richlowe
priority: bug
status: unread
title: diff -g copy handling is oddly filename dependent

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1052>
____________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff-wrong-file.sh
Type: application/x-shellscript
Size: 856 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20080327/802f26fd/attachment.bin 


More information about the Mercurial-devel mailing list