]> thyrsus.com Git - sccs2rcs.git/commitdiff
Merge in Brian Berliner's lbranch hack from the CVS contrib version.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 11 Jul 2007 03:36:22 +0000 (03:36 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 11 Jul 2007 03:36:22 +0000 (03:36 +0000)
sccs2rcs

index d1c4fa12b087bf691fad6cc56efe85e7a6b6a747..fd8a09c8b1d42f9291f2c07870a984c905efdc7e 100755 (executable)
--- a/sccs2rcs
+++ b/sccs2rcs
 # 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$
@@ -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