[issue2812] hg annotate and hg log shows wrong revisions

Zoran Bošnjak bugs at mercurial.selenic.com
Mon May 16 05:58:27 CDT 2011


New submission from Zoran Bošnjak <zoran.bosnjak at via.si>:

hg annotate and log commands sometimes shows revision from wrong branch.
hg version: 1.7.5
os: ubuntu 11.04
command: hg annotate, hg log

Example:
mkdir repo
cd repo/
hg init .
echo "test1" > f.txt
hg add f.txt 
hg commit -m "test"
echo "test2" >> f.txt
hg commit -m "append"
hg update -r 0
echo "test2" >> f.txt
hg commit -m "append again"
hg annotate f.txt
hg log f.txt

At the end of this procedure, the "annotate" command shows that appended
line "test2" comes from revison 1, but it is in fact from revision 2. "hg
log f.txt" shows the same.
Revision "1" and revision "2" are the same patches (on 2 different
branches), but (assuming big repository) the user will not be able to find
out easy the correct changeset/author.

I am not sure if this problem can be solved in general case, but there
should be at least an indication if there are more possible results. The
parent/child relations could tell if some changesets can be excluded from
possible result.

----------
messages: 16292
nosy: zoranbosnjak
priority: bug
status: unread
title: hg annotate and hg log shows wrong revisions

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2812>
____________________________________________________


More information about the Mercurial-devel mailing list