From: Eric S. Raymond Date: Mon, 15 Nov 1993 03:18:52 +0000 (+0000) Subject: Frozen for PTF release. X-Git-Tag: 1.1~7 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=169e2b690c66c49905f7e19199cd66d11a306c35;p=sccs2rcs.git Frozen for PTF release. --- diff --git a/README b/README index e321511..da3fc00 100644 --- a/README +++ b/README @@ -2,12 +2,21 @@ Sccs2rcs is a script to convert an existing SCCS history into an RCS history without losing any of the information contained therein. It has been tested under the following OS's: + Dell UNIX 2.2 (System V Release 4) SunOS 3.5, 4.0.3, 4.1 Ultrix-32 2.0, 3.1 Things to note: - + It will NOT delete or alter your ./SCCS history under any -circumstances. + + The -b (batch) option can be used to tell this script to run + non-interactively. In this mode, it assumes that you do not + want to enter descriptions on initial checkins, nor change + the default keyword substitution + + + The -u option will cause a copy of the file to be checked out + after the conversion, so if you started with a workfile in place, + you'll end up with one there. + + + It will NOT delete or alter your ./SCCS history under any circumstances. + Run in a directory where ./SCCS exists and where you can create ./RCS @@ -39,3 +48,8 @@ Ken Cox Viewlogic Systems, Inc. kenstir@viewlogic.com ...!harvard!cg-atla!viewlog!kenstir + +I added some portability fixes and the -u option. + +Eric S. Raymond +esr@snark.thyrsus.com diff --git a/sccs2rcs b/sccs2rcs index 54ac088..4b375a2 100755 --- a/sccs2rcs +++ b/sccs2rcs @@ -4,7 +4,9 @@ # history into an RCS history without losing any of # the information contained therein. # It has been tested under the following OS's: -# Dell UUNIX 2.2 (System V Release 4) +# Dell UNIX 2.2 (System V Release 4) +# SunOS 3.5, 4.0.3, 4.1 +# Ultrix-32 2.0, 3.1 # # Things to note: # + The -b (batch) option can be used to tell this script to run @@ -12,6 +14,10 @@ # want to enter descriptions on initial checkins, nor change # the default keyword substitution # +# + The -u option will cause a copy of the file to be checked out +# after the conversion, so if you started with a workfile in place, +# you'll end up with one there. +# # + It will NOT delete or alter your ./SCCS history under any circumstances. # # + Run in a directory where ./SCCS exists and where you can @@ -45,6 +51,8 @@ # kenstir@viewlogic.com # ...!harvard!cg-atla!viewlog!kenstir # +# I added some portability fixes and the -u option. +# # Eric S. Raymond # esr@snark.thyrsus.com # @@ -64,11 +72,18 @@ set century = 19 ############################################################ # Option handling # +set nodesc = 0 +set nohack = 0 +set regen = 0 while ($#argv) if ($argv[1] == "-b") then - set nodesc = "0" - set nohack = "0" + set nodesc = 1 + set nohack = 1 + endif + + if ($argv[1] == "-u") then + set regen = 1 endif shift @@ -141,20 +156,18 @@ set rcs_keywords = (\ ############################################################ # Get some answers from user # -if ((_$nodesc == _)) then +if ($nodesc == 0) then echo "" echo "Do you want to be prompted for a description of each" echo "file as it is checked in to RCS initially?" echo -n "(y=prompt for description, n=null description) [y]? " set ans = $< if ((_$ans == _) || (_$ans == _y) || (_$ans == _Y)) then - set nodesc = 0 - else set nodesc = 1 endif endif -if ((_$nohack == _)) then +if ($nohack == 0) then echo "" echo "The default keyword substitutions are as follows and are" echo "applied in the order specified:" @@ -184,6 +197,8 @@ while ($i <= $#sccs_keywords) @ i = $i + 1 end +mkdir old-SCCS + ############################################################ # Loop over every s-file in SCCS dir # @@ -220,7 +235,7 @@ foreach sfile (SCCS/s.*) # check file into RCS if ($firsttime) then set firsttime = 0 - if ($nodesc == 0) then + if ($nodesc == 1) then ci -f -r$rev -d"$date" -w$author -t/dev/null $file <$initialfile >>& $logfile if ($status != 0) goto ERROR echo initial rev checked into RCS without description @@ -254,6 +269,10 @@ EOF if ($status != 0) goto ERROR end rm -f $file + mv $sfile old-SCCS + if ($regen == 1) then + co $file + endif end @@ -261,7 +280,6 @@ end # Clean up # echo cleaning up... -mv SCCS old-SCCS rm -f $tmpfile $initialfile $sedfile echo =================================================== echo " Conversion Completed Successfully"