# HG changeset patch # User FUJIWARA Katsunori # Date 2017-03-27 00:44:36 # Node ID f1cf6a74526405dbe0c809143cf7ba9cf1190d65 # Parent 641f3a6098d087ba2bc9c6e9d7b371d68334b861 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)