view mercurial/utils/hashutil.py @ 46279:14ce2eb6e8a4

shelve: open patch using new shelf class instead of open() For some reason the existing code didn't use `shelvedfile().opener()` so here we migrate to `shelf().open_patch()` from the `open()` system call instead. Differential Revision: https://phab.mercurial-scm.org/D9706
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 07 Jan 2021 15:24:15 -0800
parents 7126d8b8e0e6
children 521ac0d7047f
line wrap: on
line source

from __future__ import absolute_import

import hashlib

try:
    from ..thirdparty import sha1dc

    sha1 = sha1dc.sha1
except (ImportError, AttributeError):
    sha1 = hashlib.sha1