view mercurial/revlogutils/__init__.py @ 43763:3fd6ec54704c

locarepo: also fastpath `nullid` lookup in __getitem__ We already use that fastpath for `"null"` and `nullrev`, using it for `nullid` is similar. Differential Revision: https://phab.mercurial-scm.org/D7486
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 23 Nov 2019 16:49:34 -0800
parents 9e1932eb41f9
children ab595920de0e
line wrap: on
line source

# mercurial.revlogutils -- basic utilities for revlog
#
# Copyright 2019 Pierre-Yves David <pierre-yves.david@octobus.net>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

from __future__ import absolute_import
from .. import error


class NodeMap(dict):
    def __missing__(self, x):
        raise error.RevlogError(b'unknown node: %s' % x)