Mercurial > hg-stable
diff mercurial/patch.py @ 44060:a61287a95dc3
core: migrate uses of hashlib.sha1 to hashutil.sha1
Differential Revision: https://phab.mercurial-scm.org/D7849
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 13 Jan 2020 17:15:14 -0500 |
parents | 0671f0a19d93 |
children | c443b9ba6f63 |
line wrap: on
line diff
--- a/mercurial/patch.py Mon Jan 13 17:14:19 2020 -0500 +++ b/mercurial/patch.py Mon Jan 13 17:15:14 2020 -0500 @@ -12,7 +12,6 @@ import contextlib import copy import errno -import hashlib import os import re import shutil @@ -41,6 +40,7 @@ ) from .utils import ( dateutil, + hashutil, procutil, stringutil, ) @@ -2943,7 +2943,7 @@ if not text: text = b"" l = len(text) - s = hashlib.sha1(b'blob %d\0' % l) + s = hashutil.sha1(b'blob %d\0' % l) s.update(text) return hex(s.digest())