mercurial/utils/hashutil.py
author Raphaël Gomès <rgomes@octobus.net>
Tue, 04 Jul 2023 12:21:45 +0200
branchstable
changeset 50736 f5b02cce82ff
parent 48966 6000f5b25c9b
permissions -rw-r--r--
heptapod-ci: remove push exception for named branches The internal workings of Heptapod cause even fast-forward merges to look like pushes to Gitlab. The only way to run a pipeline on topic-less named branches is not through the web interface. I am probably the only person affected by this, so it's not really a problem. This was confirmed with Georges, the maintainer of Heptapod, though the only way to be *actually* sure, is to merge this and see.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
44059
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
import hashlib
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
     2
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
     3
try:
46413
521ac0d7047f typing: disable import error warnings that are already handled
Matt Harbison <matt_harbison@yahoo.com>
parents: 44059
diff changeset
     4
    from ..thirdparty import sha1dc  # pytype: disable=import-error
44059
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
     5
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
     6
    sha1 = sha1dc.sha1
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
     7
except (ImportError, AttributeError):
7126d8b8e0e6 hashutil: new package for hashing-related features
Augie Fackler <augie@google.com>
parents:
diff changeset
     8
    sha1 = hashlib.sha1