hg annotate confused by branches

Stefan Ring e9725446 at student.tuwien.ac.at
Tue Mar 11 12:10:42 CDT 2008


Hello all,

maybe this is already known (I doubt that I'm the first one to notice) 
but a quick scan of the archives and the bugtracker didn't show up anything.

The following script does not behave the way I would expect it to:

mkdir hg-annotate-bug
cd hg-annotate-bug
hg init
echo "This line has been there since the beginning." > a.txt
hg addremove
hg commit -m base
echo "Second line" >> a.txt
hg commit -m trunk
hg update -Cv 0
echo "Second line" >> a.txt
hg commit -m branch
hg annotate a.txt

The result is
0: This line has been there since the beginning.
1: Second line

instead of the much more meaningful
0: This line has been there since the beginning.
2: Second line

Of course, after a clone -r 2, it does the right thing.


More information about the Mercurial mailing list