Mercurial > hg-stable
changeset 23468:ee311681e591
parsers: ensure revlog index node tree is initialized before insertion
Currently, the revlog index C implementation assumes its node tree will be
initialized before a new element is inserted by revnum. For example, revlog.py
executes 'self.index.insert(-1, e)' in _addrevision(). This is only safe
because the node tree has been initialized by a "node in self.nodemap"
check made in addrevision().
(For context, this was discovered while developing an experimental revlog
mixin which stores "elided nodes" via a separate code path from
_addrevision(); that new code path segfaults without this patch.)
author | Mike Edgar <adgar@google.com> |
---|---|
date | Thu, 04 Dec 2014 12:02:02 -0500 |
parents | c237499a7fba |
children | 65e48b8d20f5 |
files | mercurial/parsers.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff