D4752: filelog: return correct size when content begins with metadata prefix

Yuya Nishihara yuya at tcha.org
Sat Sep 29 00:45:14 EDT 2018


>   The new call to read() should be fast because the revision
>   fulltext should be cached as part of calling renamed(). So the
>   overhead here should be minimal.

That isn't true unfortunately. `renamed()` reads the text only if p1 is null,
so `size()` was cheap in most cases. This patch makes `size()` as slow as
`len(read())`.


More information about the Mercurial-devel mailing list