From b4fb31617ca25d6a7b6f9d26ed05b24f041144c7 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 11 Jul 2007 03:36:22 +0000 Subject: [PATCH] Merge in Brian Berliner's lbranch hack from the CVS contrib version. --- sccs2rcs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sccs2rcs b/sccs2rcs index d1c4fa1..fd8a09c 100755 --- a/sccs2rcs +++ b/sccs2rcs @@ -50,6 +50,10 @@ # 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 # # $Id$ @@ -130,6 +134,8 @@ set sccs_keywords = (\ '%W%[ ]*%G%'\ '%W%[ ]*%E%'\ '%W%'\ + '%Z%%M%[ ]*%I%[ ]*%G%'\ + '%Z%%M%[ ]*%I%[ ]*%E%'\ '%M%[ ]*%I%[ ]*%G%'\ '%M%[ ]*%I%[ ]*%E%'\ '%M%'\ @@ -141,6 +147,8 @@ set rcs_keywords = (\ '$'Id'$'\ '$'Id'$'\ '$'Id'$'\ + '$'SunId'$'\ + '$'SunId'$'\ '$'Id'$'\ '$'Id'$'\ '$'RCSfile'$'\ @@ -251,8 +259,15 @@ foreach sfile (SCCS/s.*) 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 -- 2.43.0