mercurial/utils/hashutil.py
author Pulkit Goyal <7895pulkit@gmail.com>
Thu, 09 Jul 2020 18:20:54 +0530
changeset 45164 7f41e824a02b
parent 44059 7126d8b8e0e6
child 46785 521ac0d7047f
permissions -rw-r--r--
mergestate: remove unnecessary recordactions() from mergestate class This function is updating dirstate which sounds like not something which a method on mergestate class should do. Also this just calls another function. Lets directly call that function and remove this reducing mergestate responsibility a bit. There was single caller which is updated. Differential Revision: https://phab.mercurial-scm.org/D8737

from __future__ import absolute_import

import hashlib

try:
    from ..thirdparty import sha1dc

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