Change perftweaks to store the node-to-rev mapping for interesting
revisions, rather than just the rev numbers.
Previously this was used to prepopulate the changelog's node-to-rev
lookup trie, however since we only stored the revision numbers this
still required looking at the revlog index contents in order to
read out the node hash.
With these changes, the trie can be prepopulated without touching
the index.
On its own, this gives only a modest performance increase, however
when combined with using mmap for the revlog index (coming in
another diff), it gives a noticable improvment on repos with very
large revlogs, as we no longer need to touch large portions of the
revlog index on every invocation.
When loading the cache data, we check that the rev numbers are
in range for the revlog, and drop any entries that are out of
range. The assumption is that a node hash won't be reassigned to
another rev index. The other way round ought to be ok, as the
old hash ought to be abandoned if it's no longer part of the
revlog. If there's any more checking needed, please suggest in
the review comments.
Is this better than revstr, node = line.split(':')?
Also, mercurial generally avoids using _ for unused variables, because _ is already the function name for the string internationalization function. I usually use x or some such