mercurial/utils/hashutil.py
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 15 Apr 2021 09:23:28 +0200
changeset 46930 0afe96e374a7
parent 46785 521ac0d7047f
child 48875 6000f5b25c9b
permissions -rw-r--r--
outgoing: pass subrepo path using function argument instead of abssource hack This is clearer, remove the needs for the `repo._subtoppath` hack and will make our live easier when making `outgoing` accept multiple destinations. Differential Revision: https://phab.mercurial-scm.org/D10390

from __future__ import absolute_import

import hashlib

try:
    from ..thirdparty import sha1dc  # pytype: disable=import-error

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