#!/bin/bash -fe # # Show that cygwin RCS 5.8.1-1 and 5.8.2-1 are buggy # when dealing with files of size >= 2^18 = 256k. # Seems fine with 5.7-11. # set -x # echo all statements, preceded by '+' ci=ci co=co mkdir -p RCS # make the directory if it doesn't exist if true then # 2^18-1, 2^18 for n in 262143 262144 do rm -f RCS/foo,v # Check in initial revision (1.1), with small contents. echo foo > foo $ci -l foo < /dev/null $co -p foo | wc # Check in second revision (1.2), size $n bytes. # Note, adding "-f" to the ci command prevents the bug. yes | head -${n}c > foo $ci -l foo < /dev/null cp -f RCS/foo,v RCS/foo,v.$n # When n=262143, the following gives 262143 (correct); # when n=262144, the following gives 65535 (wrong). $co -p foo | wc # The following succeeds with n=262143, but fails with n=262144: # co: RCS/foo,v:32805: edit script refers to line past end of file # co aborted $co -p1.1 foo > /dev/null echo === SUCCESS with n = $n === done fi