##// END OF EJS Templates
git-hgext: adjust to the lack of `changelog.heads` method...
git-hgext: adjust to the lack of `changelog.heads` method We don't have a `heads` method returning nodeid, but this is very easy to get the same result. This was flagged by pytype. We can note that the fact this code did not break is probably a good sign that it is dead code. However this is a question outside of the scop of this series.

File last commit:

r49730:6000f5b2 default
r52197:d91b5537 default
Show More
hashutil.py
8 lines | 175 B | text/x-python | PythonLexer
import hashlib
try:
from ..thirdparty import sha1dc # pytype: disable=import-error
sha1 = sha1dc.sha1
except (ImportError, AttributeError):
sha1 = hashlib.sha1