Martin von Zweigbergk <martinvonz@google.com> [Tue, 17 Jul 2018 23:34:55 -0700] rev 38821
revlog: remove side effect from failed nt_init()
If nt_init() successfully allocates memory for the node tree but then
runs out of memory while trying to insert nullid into it, it will
leave the node tree pointer set on the index object. That means that
future node tree operations will think that the tree is properly
initialized. It seems very unlikely to make a difference in practice
(if nt_init() runs out of memory, not much else will probably work),
but since I spotted it, I figured I might as well fix it.
Differential Revision: https://phab.mercurial-scm.org/D4028
Martin von Zweigbergk <martinvonz@google.com> [Sun, 08 Jul 2018 23:39:32 -0700] rev 38820
revlog: remove micro-optimization for looking up only nullid
index_find_node() would call nt_find() before initializing the node
tree. nt_find() would then return -2 unless the requested revision was
the null revision. I can't imagine what scenario that is optimizing
for, and doing the initialization earlier makes the code simpler and
easier to follow, so that's what this patch does.
Differential Revision: https://phab.mercurial-scm.org/D4027
Martin von Zweigbergk <martinvonz@google.com> [Fri, 20 Jul 2018 23:57:25 -0700] rev 38819
revlog: remove unnecessary output parameter from node_check()
The "nodelen" output parameter is always set to 20 if the function
returns successfully.
Differential Revision: https://phab.mercurial-scm.org/D4026