[PATCH 7 of 8] largefiles: use strip() instead of slicing to get rid of EOL of standin
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Sun Mar 26 21:53:47 EDT 2017
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1490575476 -32400
# Mon Mar 27 09:44:36 2017 +0900
# Node ID b80768388eb2700a619159447461063983dd5806
# Parent a26720a7404871d286ac4070710022b448572cb2
largefiles: use strip() instead of slicing to get rid of EOL of standin
This slicing prevents from replacing SHA-1 by another (= longer hash
value) in the future.
diff --git a/hgext/largefiles/basestore.py b/hgext/largefiles/basestore.py
--- a/hgext/largefiles/basestore.py
+++ b/hgext/largefiles/basestore.py
@@ -130,7 +130,7 @@ class basestore(object):
key = (filename, fctx.filenode())
if key not in verified:
verified.add(key)
- expectedhash = fctx.data()[0:40]
+ expectedhash = fctx.data().strip()
filestocheck.append((cset, filename, expectedhash))
failed = self._verifyfiles(contents, filestocheck)
More information about the Mercurial-devel
mailing list