largefiles: use strip() instead of slicing to get rid of EOL of standin
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Mon, 27 Mar 2017 09:44:36 +0900
changeset 31658 f1cf6a745264
parent 31657 641f3a6098d0
child 31659 0eec36112e58
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.
hgext/largefiles/basestore.py
--- a/hgext/largefiles/basestore.py	Mon Mar 27 09:44:36 2017 +0900
+++ b/hgext/largefiles/basestore.py	Mon Mar 27 09:44:36 2017 +0900
@@ -130,7 +130,7 @@
                     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)