bug-rcs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rcs co stops processing files after an empty revision file is encountere


From: Arthur Gabe
Subject: rcs co stops processing files after an empty revision file is encountered
Date: Sun, 25 Feb 2007 22:47:31 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

# ----------------------- rcs co bug ------------------------
#
# when the rcs "co" command is given a file list which contains an
# rcs file that has no revison, e.g., rcs -i file, it fails
# with the following "Bad file number" error after failing to process the
# empty rev file and does not check out any remaining files in the list.
#
#       no revisions present; generating empty revision 0.0
#       co: output error: Bad file number
#       co aborted
#
#  This only happens if the empty rev file is *not* first in the list,
#
# In this test, only the first two runs will succeed
# because only those tests have the file with the empty revision first in the list

for test in "1 2 3"   "1 3 2"   "2 1 3"   "2 3 1"   "3 1 2"   "3 2 1"
do
       echo "--------------- test: $test ---------------"
       echo "remove all test files"
       rm -f co_bug.*
       echo "use rcs -i to create co_bug.1,v file"
       rcs -i -t-test co_bug.1
       echo "use ci to create empty co_bug.2,v and co_bug.3,v files"
       touch co_bug.2 co_bug.3
       ci -t-test co_bug.2 co_bug.3
       rcsfiles=""
       files=""
       for ext in $test
       do
               rcsfiles="$rcsfiles co_bug.$ext,v"
               files="$files co_bug.$ext"
       done
       echo "use co -f $rcsfiles to check out all files"
       co -f  $rcsfiles
       exit_status=$?
       echo "co -f exit status : \$? = $exit_status"
       echo "use ls -l to list all checked out files"
       ls -l $files
done >$0.out 2>&1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]