mercurial/util.py
changeset 46113 59fa3890d40a
parent 45942 89a2afe31e82
child 46521 ebc6d3484fdd
child 46645 7711853110b9
equal deleted inserted replaced
46112:d6afa9c149c3 46113:59fa3890d40a
    40     delattr,
    40     delattr,
    41     getattr,
    41     getattr,
    42     open,
    42     open,
    43     setattr,
    43     setattr,
    44 )
    44 )
       
    45 from .node import hex
    45 from hgdemandimport import tracing
    46 from hgdemandimport import tracing
    46 from . import (
    47 from . import (
    47     encoding,
    48     encoding,
    48     error,
    49     error,
    49     i18n,
    50     i18n,
    50     node as nodemod,
       
    51     policy,
    51     policy,
    52     pycompat,
    52     pycompat,
    53     urllibcompat,
    53     urllibcompat,
    54 )
    54 )
    55 from .utils import (
    55 from .utils import (
   252             h.update(data)
   252             h.update(data)
   253 
   253 
   254     def __getitem__(self, key):
   254     def __getitem__(self, key):
   255         if key not in DIGESTS:
   255         if key not in DIGESTS:
   256             raise error.Abort(_(b'unknown digest type: %s') % k)
   256             raise error.Abort(_(b'unknown digest type: %s') % k)
   257         return nodemod.hex(self._hashes[key].digest())
   257         return hex(self._hashes[key].digest())
   258 
   258 
   259     def __iter__(self):
   259     def __iter__(self):
   260         return iter(self._hashes)
   260         return iter(self._hashes)
   261 
   261 
   262     @staticmethod
   262     @staticmethod