changeset 35104:f6f8b7c8919a

lfs: generate a large file by using `python` instead of yes | head yes(1) on some systems (like gcc112) feels compelled to inform you of broken pipes, such as those triggered by head(1). This works around the problem portably.
author Augie Fackler <augie@google.com>
date Mon, 20 Nov 2017 18:05:15 -0500
parents 7ea56f5700b8
children 795bfa2a9103
files tests/test-lfs-largefiles.t
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-lfs-largefiles.t	Mon Nov 20 18:00:02 2017 -0500
+++ b/tests/test-lfs-largefiles.t	Mon Nov 20 18:05:15 2017 -0500
@@ -199,7 +199,7 @@
 commit.  By the time the commit occurs, the tracked file is smaller than the
 threshold (assuming it is > 41, so the standins don't become lfs objects).
 
-  $ yes | head -n 1048576 > large_by_size.bin
+  $ $PYTHON -c 'import sys ; sys.stdout.write("y\n" * 1048576)' > large_by_size.bin
   $ hg --config largefiles.minsize=1 ci -Am 'large by size'
   adding large_by_size.bin as a largefile
   $ hg manifest