##// END OF EJS Templates
tests: make sha256line.py available for all tests...
tests: make sha256line.py available for all tests This was previously only used in test-revlog-delta-find.t, but it will be useful (and used) in other tests that might need to generate poorly-compressible files.

File last commit:

r52254:fa4c4fa2 stable
r52254:fa4c4fa2 stable
Show More
sha256line.py
14 lines | 275 B | text/x-python | PythonLexer
#!/usr/bin/env python3
#
# A tool to help producing large and poorly compressible files
#
# Usage:
# $TESTDIR/seq.py 1000 | $TESTDIR/sha256line.py > my-file.txt
import hashlib
import sys
for line in sys.stdin:
print(hashlib.sha256(line.encode('utf8')).hexdigest())