[issue258] tag handling is wrong

Vadim Gelfer vadim.gelfer at gmail.com
Thu May 18 17:54:33 CDT 2006


On 5/18/06, Bryan O'Sullivan <mercurial-bugs at selenic.com> wrote:

> The logic in localrepo.tags is wrong.  It reads each head of the .hgtags file
> and parses it.

here is fix. this reads .hgtags file in each head of repo instead of
each head of .hgtags.

it uses binary search of manifest to be very fast, but on big repo
like kernel, is still much slower than old code.

old code:
$ hg --time tags>/dev/null
Time: real 0.180 secs (user 0.130+0.000 sys 0.050+0.000)

new code:
$ hg --time tags>/dev/null
Time: real 3.100 secs (user 2.910+0.000 sys 0.190+0.000)

i think correct behavior is more important than performance, so i want
to push this change to crew.

we can make performance better by saving record of deletion in
filelog. if we do that, we can find heads of filelog and drop heads
that have been deleted, never touch manifest. but that is more work,
more risk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tags.diff
Type: text/x-patch
Size: 7104 bytes
Desc: not available
Url : http://www.selenic.com/pipermail/mercurial/attachments/20060518/d73e8885/tags.bin


More information about the Mercurial mailing list