Submitter | phabricator |
---|---|
Date | Jan. 13, 2020, 10:48 p.m. |
Message ID | <differential-rev-PHID-DREV-3kzthd6xbdruv7k6amdk-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/44293/ |
State | Superseded |
Headers | show |
Comments
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. I'm not keen on a new module just for 6 lines. But whatever. REPOSITORY rHG Mercurial BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7848/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7848 To: durin42, #hg-reviewers, indygreg Cc: indygreg, mercurial-devel
pulkit added a comment. Absorbing the following into this patch to make `test-check-module-imports.t` happy. diff --git a/mercurial/utils/hashutil.py b/mercurial/utils/hashutil.py --- a/mercurial/utils/hashutil.py +++ b/mercurial/utils/hashutil.py @@ -3,7 +3,7 @@ from __future__ import absolute_import import hashlib try: - from mercurial.thirdparty import sha1dc + from ..thirdparty import sha1dc sha1 = sha1dc.sha1 except (ImportError, AttributeError): sha1 = hashlib.sha1 REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7848/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7848 To: durin42, #hg-reviewers, indygreg Cc: pulkit, indygreg, mercurial-devel
Patch
diff --git a/mercurial/utils/hashutil.py b/mercurial/utils/hashutil.py new file mode 100644 --- /dev/null +++ b/mercurial/utils/hashutil.py @@ -0,0 +1,9 @@ +from __future__ import absolute_import + +import hashlib + +try: + from mercurial.thirdparty import sha1dc + sha1 = sha1dc.sha1 +except (ImportError, AttributeError): + sha1 = hashlib.sha1