File: issue68_broken_pipe.sh

package info (click to toggle)
darcs 2.18.5-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,008 kB
  • sloc: haskell: 47,748; sh: 13,466; ansic: 447; perl: 134; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 448 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash

# For issue68, 'don't report "resource vanished" when stdout pipe is broken.'

. ./lib

rm -rf temp1 # Another script may have left a mess.

darcs init --repodir temp1

cd temp1

for i in {1..500}
do
    echo $i >> f
done

darcs changes 2> err | head
darcs rec -alm 'Add big f'

# We recorded a big file add, so asking for the first n lines of the patch
# would trigger this bug.
darcs changes -v 2> err | head

[[ ! -s err ]]