summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cvs/contrib
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-04-27 19:43:32 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-04-27 19:43:32 +0000
commit49126961fd129e607f88970e81ab6d48baaecda0 (patch)
tree8168bd6a7b92392e99d483a83c51b3f8f7df113d /gnu/usr.bin/cvs/contrib
parent61aa6f7b30e536382606a49e9a65374b125db338 (diff)
Latest public release from Cyclic; fixes numerous memory leaks and have
some performance improvements
Diffstat (limited to 'gnu/usr.bin/cvs/contrib')
-rw-r--r--gnu/usr.bin/cvs/contrib/ChangeLog10
-rw-r--r--gnu/usr.bin/cvs/contrib/README7
-rw-r--r--gnu/usr.bin/cvs/contrib/rcs2sccs.sh143
3 files changed, 159 insertions, 1 deletions
diff --git a/gnu/usr.bin/cvs/contrib/ChangeLog b/gnu/usr.bin/cvs/contrib/ChangeLog
index 80f16f1fb63..de2e5d797f7 100644
--- a/gnu/usr.bin/cvs/contrib/ChangeLog
+++ b/gnu/usr.bin/cvs/contrib/ChangeLog
@@ -1,3 +1,13 @@
+Mon Feb 19 13:37:36 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * README: Don't just tell people "we don't want your script"; tell
+ them what to do instead.
+
+Thu Feb 1 14:28:16 1996 Karl Fogel <kfogel@floss.red-bean.com>
+
+ * Makefile.in (DISTFILES): added `rcs2sccs.sh', as mentioned in
+ README.
+
Thu Jan 18 09:39:16 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
* README: Talk about submitting changes to contrib directory.
diff --git a/gnu/usr.bin/cvs/contrib/README b/gnu/usr.bin/cvs/contrib/README
index 98befbb2858..094ac47f8d9 100644
--- a/gnu/usr.bin/cvs/contrib/README
+++ b/gnu/usr.bin/cvs/contrib/README
@@ -14,7 +14,12 @@ check in changes to this directory. So submissions for new scripts to
add here are unlikely to be accepted. Suggested changes to the
existing scripts here conceivably might, but that isn't clear either.
The exception is pcl-cvs; that is more actively maintained (see
-pcl-cvs/README).
+pcl-cvs/README). If you have some software that works with CVS that
+you wish to offer it is suggested that you make it available by FTP or
+HTTP and then announce it on the info-cvs mailing list. There is also
+a web page of software related to CVS at
+http://www.loria.fr/~molli/cvs-index.html which would presumably be
+willing to list your software.
Contents of this directory:
diff --git a/gnu/usr.bin/cvs/contrib/rcs2sccs.sh b/gnu/usr.bin/cvs/contrib/rcs2sccs.sh
new file mode 100644
index 00000000000..e87a941dc6e
--- /dev/null
+++ b/gnu/usr.bin/cvs/contrib/rcs2sccs.sh
@@ -0,0 +1,143 @@
+#! /bin/sh
+#
+#
+# OrigId: rcs2sccs,v 1.12 90/10/04 20:52:23 kenc Exp Locker: kenc
+# $Id: rcs2sccs.sh,v 1.1.1.1 1996/04/27 19:42:52 tholo Exp $
+
+############################################################
+# Error checking
+#
+if [ ! -d SCCS ] ; then
+ mkdir SCCS
+fi
+
+logfile=/tmp/rcs2sccs_$$_log
+rm -f $logfile
+tmpfile=/tmp/rcs2sccs_$$_tmp
+rm -f $tmpfile
+emptyfile=/tmp/rcs2sccs_$$_empty
+echo -n "" > $emptyfile
+initialfile=/tmp/rcs2sccs_$$_init
+echo "Initial revision" > $initialfile
+sedfile=/tmp/rcs2sccs_$$_sed
+rm -f $sedfile
+revfile=/tmp/rcs2sccs_$$_rev
+rm -f $revfile
+commentfile=/tmp/rcs2sccs_$$_comment
+rm -f $commentfile
+
+# create the sed script
+cat > $sedfile << EOF
+s,;Id;,%Z%%M% %I% %E%,g
+s,;SunId;,%Z%%M% %I% %E%,g
+s,;RCSfile;,%M%,g
+s,;Revision;,%I%,g
+s,;Date;,%E%,g
+s,;Id:.*;,%Z%%M% %I% %E%,g
+s,;SunId:.*;,%Z%%M% %I% %E%,g
+s,;RCSfile:.*;,%M%,g
+s,;Revision:.*;,%I%,g
+s,;Date:.*;,%E%,g
+EOF
+sed -e 's/;/\\$/g' $sedfile > $tmpfile
+cp $tmpfile $sedfile
+############################################################
+# Loop over every RCS file in RCS dir
+#
+for vfile in *,v; do
+ # get rid of the ",v" at the end of the name
+ file=`echo $vfile | sed -e 's/,v$//'`
+
+ # work on each rev of that file in ascending order
+ firsttime=1
+ rlog $file | grep "^revision [0-9][0-9]*\." | awk '{print $2}' | sed -e 's/\./ /g' | sort -n -u +0 +1 +2 +3 +4 +5 +6 +7 +8 | sed -e 's/ /./g' > $revfile
+ for rev in `cat $revfile`; do
+ if [ $? != 0 ]; then
+ echo ERROR - revision
+ exit
+ fi
+ # get file into current dir and get stats
+ date=`rlog -r$rev $file | grep "^date: " | awk '{print $2; exit}' | sed -e 's/^19//'`
+ time=`rlog -r$rev $file | grep "^date: " | awk '{print $3; exit}' | sed -e 's/;//'`
+ author=`rlog -r$rev $file | grep "^date: " | awk '{print $5; exit}' | sed -e 's/;//'`
+ date="$date $time"
+ echo ""
+ rlog -r$rev $file | sed -e '/^branches: /d' -e '1,/^date: /d' -e '/^===========/d' -e 's/$/\\/' | awk '{if ((total += length($0) + 1) < 510) print $0}' > $commentfile
+ echo "==> file $file, rev=$rev, date=$date, author=$author"
+ rm -f $file
+ co -r$rev $file >> $logfile 2>&1
+ if [ $? != 0 ]; then
+ echo ERROR - co
+ exit
+ fi
+ echo checked out of RCS
+
+ # add SCCS keywords in place of RCS keywords
+ sed -f $sedfile $file > $tmpfile
+ if [ $? != 0 ]; then
+ echo ERROR - sed
+ exit
+ fi
+ echo performed keyword substitutions
+ rm -f $file
+ cp $tmpfile $file
+
+ # check file into SCCS
+ if [ "$firsttime" = "1" ]; then
+ firsttime=0
+ echo about to do sccs admin
+ echo sccs admin -n -i$file $file < $commentfile
+ sccs admin -n -i$file $file < $commentfile >> $logfile 2>&1
+ if [ $? != 0 ]; then
+ echo ERROR - sccs admin
+ exit
+ fi
+ echo initial rev checked into SCCS
+ else
+ case $rev in
+ *.*.*.*)
+ brev=`echo $rev | sed -e 's/\.[0-9]*$//'`
+ sccs admin -fb $file 2>>$logfile
+ echo sccs get -e -p -r$brev $file
+ sccs get -e -p -r$brev $file >/dev/null 2>>$logfile
+ ;;
+ *)
+ echo sccs get -e -p $file
+ sccs get -e -p $file >/dev/null 2>> $logfile
+ ;;
+ esac
+ if [ $? != 0 ]; then
+ echo ERROR - sccs get
+ exit
+ fi
+ sccs delta $file < $commentfile >> $logfile 2>&1
+ if [ $? != 0 ]; then
+ echo ERROR - sccs delta -r$rev $file
+ exit
+ fi
+ echo checked into SCCS
+ fi
+ sed -e "s;^d D $rev ../../.. ..:..:.. [^ ][^ ]*;d D $rev $date $author;" SCCS/s.$file > $tmpfile
+ rm -f SCCS/s.$file
+ cp $tmpfile SCCS/s.$file
+ chmod 444 SCCS/s.$file
+ sccs admin -z $file
+ if [ $? != 0 ]; then
+ echo ERROR - sccs admin -z
+ exit
+ fi
+ done
+ rm -f $file
+done
+
+
+############################################################
+# Clean up
+#
+echo cleaning up...
+rm -f $tmpfile $emptyfile $initialfile $sedfile $commentfile
+echo ===================================================
+echo " Conversion Completed Successfully"
+echo ===================================================
+
+rm -f *,v