# cross the millenium boundary. Use GNU tac instead of tail, which can't
# reverse large files properly.
#
+# 1.3: Merges in Brian Berliner's branch hack from the other fork
+# of this script, the one distributed with CVS. That and 4 SCCS
+# keyword substitutions were we only thing it did that this didn't.
+#
# Eric S. Raymond <esr@thyrsus.com>
#
# $Id$
'%W%[ ]*%G%'\
'%W%[ ]*%E%'\
'%W%'\
+ '%Z%%M%[ ]*%I%[ ]*%G%'\
+ '%Z%%M%[ ]*%I%[ ]*%E%'\
'%M%[ ]*%I%[ ]*%G%'\
'%M%[ ]*%I%[ ]*%E%'\
'%M%'\
'$'Id'$'\
'$'Id'$'\
'$'Id'$'\
+ '$'SunId'$'\
+ '$'SunId'$'\
'$'Id'$'\
'$'Id'$'\
'$'RCSfile'$'\
endif
else
# get RCS lock
- rcs -l $file >>& $logfile
- if ($status != 0) goto ERROR
+ set lckrev = `echo $rev | sed -e 's/\.[0-9]*$//'`
+ if ("$lckrev" =~ [0-9]*.*) then
+ # need to lock the brach -- it is OK if the lock fails
+ rcs -l$lckrev $file >>& $logfile
+ else
+ # need to lock the trunk -- must succeed
+ rcs -l $file >>& $logfile
+ if ($status != 0) goto ERROR
+ endif
echo got lock
prs -r$rev SCCS/s.$file | grep "." > $tmpfile
# it's OK if grep fails here and gives status == 1