]> thyrsus.com Git - sccs2rcs.git/commitdiff
Frozen for PTF release.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 15 Nov 1993 03:18:52 +0000 (03:18 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 15 Nov 1993 03:18:52 +0000 (03:18 +0000)
README
sccs2rcs

diff --git a/README b/README
index e32151162f0288d733f8360e003f80091ee513c8..da3fc00b92561dac8a99c4c946d3db32cb931ca8 100644 (file)
--- 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
index 54ac088a004de427de8b861fd57080ddac80ce66..4b375a285379a1e00b85582e5b6f7467d2ab620a 100755 (executable)
--- 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
 #     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"