view mercurial/revlogutils/nodemap.py @ 44611:8fca7e8449a8 stable 5.3.2

histedit: add missing b prefix to a string If i18n is disabled (such as via HGPLAIN=1), `_()` doesn't convert from str to bytes, so this raises a TypeError on py3. Differential Revision: https://phab.mercurial-scm.org/D8354
author Kyle Lippincott <spectral@google.com>
date Wed, 01 Apr 2020 14:14:55 -0700
parents ab595920de0e
children c577bb4a04d4
line wrap: on
line source

# nodemap.py - nodemap related code and utilities
#
# Copyright 2019 Pierre-Yves David <pierre-yves.david@octobus.net>
# Copyright 2019 George Racinet <georges.racinet@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)