Show More
@@ -13,7 +13,6 b' import errno' | |||||
13 | import platform |
|
13 | import platform | |
14 | import shutil |
|
14 | import shutil | |
15 | import stat |
|
15 | import stat | |
16 | import hashlib |
|
|||
17 |
|
16 | |||
18 | from mercurial import dirstate, httpconnection, match as match_, util, scmutil |
|
17 | from mercurial import dirstate, httpconnection, match as match_, util, scmutil | |
19 | from mercurial.i18n import _ |
|
18 | from mercurial.i18n import _ | |
@@ -430,7 +429,7 b' def urljoin(first, second, *arg):' | |||||
430 | def hexsha1(data): |
|
429 | def hexsha1(data): | |
431 | """hexsha1 returns the hex-encoded sha1 sum of the data in the file-like |
|
430 | """hexsha1 returns the hex-encoded sha1 sum of the data in the file-like | |
432 | object data""" |
|
431 | object data""" | |
433 |
h = |
|
432 | h = util.sha1() | |
434 | for chunk in util.filechunkiter(data): |
|
433 | for chunk in util.filechunkiter(data): | |
435 | h.update(chunk) |
|
434 | h.update(chunk) | |
436 | return h.hexdigest() |
|
435 | return h.hexdigest() |
General Comments 0
You need to be logged in to leave comments.
Login now