gww@beatnix.UUCP (Gary Winiger) (03/13/88)
Subject: RCS does not support a separate file system for the RCS files +Fix Index: new/rcs/src/{rcsbase.h,rcsfnms.c}, new/rcs/man/{ci.1,co.1,rcs.1,rlog.1} 4.3BSD +Fix Description: It would be nice to have all the RCS for the system on a separate file system from /usr/src. Fix: Elxsi maintains a separate file system to contain the its source control files (RCS files). We feel that it buys us some safety in the event of disk failures. We still backup both the /usr/src file system and the separate /RCS file system. The attached mods permit us to run all the RCS commands without change to the user interface and have a separate file system for the RCS files. Use with pleasure.... Gary.. {ucbvax!sun,uunet,lll-lcc!lll-tis,amdahl!altos86,bridge2}!elxsi!gww --------- cut --------- snip --------- :.,$w diff ------------- # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. -----cut here-----cut here-----cut here-----cut here----- #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # rcsbase.h.diff # rcsfnms.c.diff # ci.1.diff # co.1.diff # rcs.1.diff # rlog.1.diff # This archive created: Sat Mar 12 13:52:21 1988 echo shar: extracting rcsbase.h.diff '(1791 characters)' sed 's/^XX//' << \SHAR_EOF > rcsbase.h.diff XX*** /tmp/,RCSt1015618 Sat Mar 12 13:49:12 1988 XX--- rcsbase.h Wed Dec 10 14:12:16 1986 XX*************** XX*** 1,7 **** XX XX! /* $Header: rcsbase.h,v 1.1 86/12/09 17:33:59 gww Exp $ ENIX BSD XX * XX * $Log: rcsbase.h,v $ XX * Revision 1.1 86/12/09 17:33:59 gww XX * Initial revision XX * XX--- 1,10 ---- XX XX! /* $Header: rcsbase.h,v 1.2 86/12/10 14:11:51 gww Exp $ ENIX BSD XX * XX * $Log: rcsbase.h,v $ XX+ * Revision 1.2 86/12/10 14:11:51 gww XX+ * Add search of /RCS for support of a separate RCS file system. XX+ * XX * Revision 1.1 86/12/09 17:33:59 gww XX * Initial revision XX * XX*************** XX*** 9,15 **** XX /* XX * RCS common definitions and data structures XX */ XX! #define RCSBASE "$Header: rcsbase.h,v 1.1 86/12/09 17:33:59 gww Exp $" XX /***************************************************************************** XX * INSTRUCTIONS: XX * ============= XX--- 12,18 ---- XX /* XX * RCS common definitions and data structures XX */ XX! #define RCSBASE "$Header: rcsbase.h,v 1.2 86/12/10 14:11:51 gww Exp $" XX /***************************************************************************** XX * INSTRUCTIONS: XX * ============= XX*************** XX*** 109,114 **** XX--- 112,118 ---- XX #define datelength 20 /* length of a date in RCS format */ XX #define joinlength 20 /* number of joined revisions permitted */ XX #define RCSDIR "RCS/" /* subdirectory for RCS files */ XX+ #define RCSROOT "/RCS" /* separate file system for RCS files */ XX #define RCSSUF 'v' /* suffix for RCS files */ XX #define RCSSEP ',' /* separator for RCSSUF */ XX #define KDELIM '$' /* delimiter for keywords */ SHAR_EOF if test 1791 -ne "`wc -c rcsbase.h.diff`" then echo shar: error transmitting rcsbase.h.diff '(should have been 1791 characters)' fi echo shar: extracting rcsfnms.c.diff '(4221 characters)' sed 's/^XX//' << \SHAR_EOF > rcsfnms.c.diff XX*** /tmp/,RCSt1015631 Sat Mar 12 13:50:08 1988 XX--- rcsfnms.c Sat Jul 18 10:24:12 1987 XX*************** XX*** 1,10 **** XX /* XX * $Log: rcsfnms.c,v $ XX * Revision 1.1 86/12/09 17:34:05 gww XX * Initial revision XX * XX */ XX! static char *ERcsId = "$Header: rcsfnms.c,v 1.1 86/12/09 17:34:05 gww Exp $ ENIX BSD"; XX /* XX * RCS file name handling XX */ XX--- 1,17 ---- XX /* XX * $Log: rcsfnms.c,v $ XX+ * Revision 1.3 87/07/18 10:23:40 gww XX+ * Check environment variable RCSROOT for root path of RCS directory before XX+ * ``/RCS''. XX+ * XX+ * Revision 1.2 86/12/10 14:12:18 gww XX+ * Add search of /RCS for support of a separate RCS file system. XX+ * XX * Revision 1.1 86/12/09 17:34:05 gww XX * Initial revision XX * XX */ XX! static char *ERcsId = "$Header: rcsfnms.c,v 1.3 87/07/18 10:23:40 gww Exp $ ENIX BSD"; XX /* XX * RCS file name handling XX */ XX*************** XX*** 345,354 **** XX--- 352,363 ---- XX char * lastsep, * purefname, * pureRCSname; XX int opened, returncode; XX char * RCS1; XX+ char RCSdir[NCPPN]; XX XX if (*argv == nil) return 0; /* already paired filename */ XX XX InitCleanup(); XX+ findRCSdir(RCSdir); XX XX /* first check suffix to see whether it is an RCS file or not */ XX purefname=bindex(*argv, '/'); /* skip path */ XX*************** XX*** 403,411 **** XX } XX } XX } else { XX! /* build second RCS file name by prefixing it with RCSDIR*/ XX /* then try to open one of them */ XX! strcpy(subfilename,RCSDIR); strcat(subfilename,RCS1); XX opened=( XX ((finptr=fopen(RCSfilename=subfilename, "r"))!=NULL) || XX ((finptr=fopen(RCSfilename=RCS1,"r"))!=NULL) ); XX--- 412,420 ---- XX } XX } XX } else { XX! /* build second RCS file name by prefixing it with RCSdir*/ XX /* then try to open one of them */ XX! strcpy(subfilename,RCSdir); strcat(subfilename,RCS1); XX opened=( XX ((finptr=fopen(RCSfilename=subfilename, "r"))!=NULL) || XX ((finptr=fopen(RCSfilename=RCS1,"r"))!=NULL) ); XX*************** XX*** 426,432 **** XX return 0; XX } else { XX /* initialize new file. Put into ./RCS if possible, strip off suffix*/ XX! RCSfilename= (access(RCSDIR,0)==0)?subfilename:RCS1; XX InitAdmin(); XX returncode= -1; XX } XX--- 435,441 ---- XX return 0; XX } else { XX /* initialize new file. Put into ./RCS if possible, strip off suffix*/ XX! RCSfilename= (access(RCSdir,0)==0)?subfilename:RCS1; XX InitAdmin(); XX returncode= -1; XX } XX*************** XX*** 439,444 **** XX--- 448,492 ---- XX warn("Option -p is set; ignoring output file %s",workfilename); XX XX return returncode; XX+ } XX+ XX+ XX+ extern char *getenv(), *getwd(); XX+ XX+ void int findRCSdir(dir) XX+ char * dir; XX+ /* Procedure: returns the string containing the RCS directory in dir, XX+ * or NULL if none exists. XX+ * First looks for ./RCS (RCSDIR), XX+ * then Environment RCSROOT/<current working directory>, XX+ * then /RCS/<current working directory> (RCSROOT/<cwd>). XX+ * Calls getenv(), getwd(). XX+ */ XX+ { XX+ char pathname[NCPPN]; /* path name of working directory */ XX+ char *rcsroot; XX+ XX+ if (access(RCSDIR,0) == 0) { XX+ strcpy(dir,RCSDIR); XX+ return; XX+ } XX+ if (rcsroot = getenv("RCSROOT")) { XX+ strcpy(dir, rcsroot); XX+ strncat(dir, getwd(pathname), NCPPN); XX+ if (access(dir,0) == 0) { XX+ strncat(dir, "/", NCPPN); XX+ return; XX+ } XX+ } XX+ strcpy(dir, RCSROOT); XX+ strncat(dir, getwd(pathname), NCPPN); XX+ if (access(dir,0) == 0) { XX+ strncat(dir, "/", NCPPN); XX+ return; XX+ } XX+ else XX+ *dir = '\0'; XX+ return; XX } XX XX SHAR_EOF if test 4221 -ne "`wc -c rcsfnms.c.diff`" then echo shar: error transmitting rcsfnms.c.diff '(should have been 4221 characters)' fi echo shar: extracting ci.1.diff '(2079 characters)' sed 's/^XX//' << \SHAR_EOF > ci.1.diff XX*** /tmp/,RCSt1015594 Sat Mar 12 13:47:40 1988 XX--- ci.1 Mon Jan 18 16:43:57 1988 XX*************** XX*** 1,11 **** XX! .\" $Header: ci.1,v 1.1 86/12/10 15:16:32 gww Exp $ ENIX BSD XX .\" XX .\" $Log: ci.1,v $ XX .\" Revision 1.1 86/12/10 15:16:32 gww XX .\" Initial revision XX .\" XX .\" XX! .TH CI 1 6/29/83 "Purdue University" XX .SH NAME XX ci \- check in RCS revisions XX .SH SYNOPSIS XX--- 1,17 ---- XX! .\" $Header: ci.1,v 1.3 88/01/18 16:43:40 gww Exp $ ENIX BSD XX .\" XX .\" $Log: ci.1,v $ XX+ .\" Revision 1.3 88/01/18 16:43:40 gww XX+ .\" Document user of environment variable RCSROOT. XX+ .\" XX+ .\" Revision 1.2 88/01/18 16:27:49 gww XX+ .\" Document use of separate file system /RCS. XX+ .\" XX .\" Revision 1.1 86/12/10 15:16:32 gww XX .\" Initial revision XX .\" XX .\" XX! .TH CI 1E 6/29/83 "Purdue University" XX .SH NAME XX ci \- check in RCS revisions XX .SH SYNOPSIS XX*************** XX*** 42,48 **** XX and appending the suffix `,v'. XX .PP XX If the RCS file is omitted or specified without a path, then \fIci\fR XX! looks for the RCS file first in the directory ./RCS and then in the current XX directory. XX .PP XX For \fIci\fR to work, the caller's login must be on the access list, XX--- 48,57 ---- XX and appending the suffix `,v'. XX .PP XX If the RCS file is omitted or specified without a path, then \fIci\fR XX! looks for the RCS file first in the directory ./RCS, XX! then in the directory named by the environment variable XX! RCSROOT/\fIcurrent-directory\fR, XX! then in the directory /RCS/\fIcurrent-directory\fR, and finally in the current XX directory. XX .PP XX For \fIci\fR to work, the caller's login must be on the access list, XX*************** XX*** 188,196 **** XX Purdue University, West Lafayette, IN, 47907. XX .sp 0 XX Revision Number: XX! .VL $Revision: 1.1 $ XX ; Release Date: XX! .VL $Date: 86/12/10 15:16:32 $ XX \&. XX .sp 0 XX Copyright \(co 1982 by Walter F. Tichy. XX--- 197,205 ---- XX Purdue University, West Lafayette, IN, 47907. XX .sp 0 XX Revision Number: XX! .VL $Revision: 1.3 $ XX ; Release Date: XX! .VL $Date: 88/01/18 16:43:40 $ XX \&. XX .sp 0 XX Copyright \(co 1982 by Walter F. Tichy. SHAR_EOF if test 2079 -ne "`wc -c ci.1.diff`" then echo shar: error transmitting ci.1.diff '(should have been 2079 characters)' fi echo shar: extracting co.1.diff '(2088 characters)' sed 's/^XX//' << \SHAR_EOF > co.1.diff XX*** /tmp/,RCSt1015599 Sat Mar 12 13:47:59 1988 XX--- co.1 Mon Jan 18 16:48:23 1988 XX*************** XX*** 1,11 **** XX! .\" $Header: co.1,v 1.1 86/12/10 15:16:34 gww Exp $ ENIX BSD XX .\" XX .\" $Log: co.1,v $ XX .\" Revision 1.1 86/12/10 15:16:34 gww XX .\" Initial revision XX .\" XX .\" XX! .TH CO 1 6/29/83 "Purdue University" XX .SH NAME XX co \- check out RCS revisions XX .SH SYNOPSIS XX--- 1,17 ---- XX! .\" $Header: co.1,v 1.3 88/01/18 16:48:06 gww Exp $ ENIX BSD XX .\" XX .\" $Log: co.1,v $ XX+ .\" Revision 1.3 88/01/18 16:48:06 gww XX+ .\" Document use of environment variable RCSROOT. XX+ .\" XX+ .\" Revision 1.2 88/01/18 16:47:08 gww XX+ .\" Document use of separate file system /RCS. XX+ .\" XX .\" Revision 1.1 86/12/10 15:16:34 gww XX .\" Initial revision XX .\" XX .\" XX! .TH CO 1E 6/29/83 "Purdue University" XX .SH NAME XX co \- check out RCS revisions XX .SH SYNOPSIS XX*************** XX*** 42,48 **** XX and appending the suffix `,v'. XX .PP XX If the RCS file is omitted or specified without a path, then \fIco\fR XX! looks for the RCS file first in the directory ./RCS and then in the current XX directory. XX .PP XX Revisions of an RCS file may be checked out locked or unlocked. Locking a XX--- 48,57 ---- XX and appending the suffix `,v'. XX .PP XX If the RCS file is omitted or specified without a path, then \fIco\fR XX! looks for the RCS file first in the directory ./RCS, XX! then in the directory named by the environment variable XX! RCSROOT/\fIcurrent-directory\fR, XX! then in the directory /RCS/\fIcurrent-directory\fR, and finally in the current XX directory. XX .PP XX Revisions of an RCS file may be checked out locked or unlocked. Locking a XX*************** XX*** 251,259 **** XX Purdue University, West Lafayette, IN, 47907. XX .sp 0 XX Revision Number: XX! .VL $Revision: 1.1 $ XX ; Release Date: XX! .VL $Date: 86/12/10 15:16:34 $ XX \&. XX .sp 0 XX Copyright \(co 1982 by Walter F. Tichy. XX--- 260,268 ---- XX Purdue University, West Lafayette, IN, 47907. XX .sp 0 XX Revision Number: XX! .VL $Revision: 1.3 $ XX ; Release Date: XX! .VL $Date: 88/01/18 16:48:06 $ XX \&. XX .sp 0 XX Copyright \(co 1982 by Walter F. Tichy. SHAR_EOF if test 2088 -ne "`wc -c co.1.diff`" then echo shar: error transmitting co.1.diff '(should have been 2088 characters)' fi echo shar: extracting rcs.1.diff '(2706 characters)' sed 's/^XX//' << \SHAR_EOF > rcs.1.diff XX*** /tmp/,RCSt1015604 Sat Mar 12 13:48:16 1988 XX--- rcs.1 Mon Jan 18 16:51:43 1988 XX*************** XX*** 1,11 **** XX! .\" $Header: rcs.1,v 1.1 86/12/10 15:16:39 gww Exp $ ENIX BSD XX .\" XX .\" $Log: rcs.1,v $ XX .\" Revision 1.1 86/12/10 15:16:39 gww XX .\" Initial revision XX .\" XX .\" XX! .TH RCS 1 6/29/83 "Purdue University" XX .SH NAME XX rcs \- change RCS file attributes XX .SH SYNOPSIS XX--- 1,17 ---- XX! .\" $Header: rcs.1,v 1.3 88/01/18 16:51:24 gww Exp $ ENIX BSD XX .\" XX .\" $Log: rcs.1,v $ XX+ .\" Revision 1.3 88/01/18 16:51:24 gww XX+ .\" Document use of environment variable RCSROOT. XX+ .\" XX+ .\" Revision 1.2 88/01/18 16:50:17 gww XX+ .\" Document use of separate file system /RCS. XX+ .\" XX .\" Revision 1.1 86/12/10 15:16:39 gww XX .\" Initial revision XX .\" XX .\" XX! .TH RCS 1E 6/29/83 "Purdue University" XX .SH NAME XX rcs \- change RCS file attributes XX .SH SYNOPSIS XX*************** XX*** 26,38 **** XX .PP XX Files ending in `,v' are RCS files, all others are working files. If XX a working file is given, \fIrcs\fR tries to find the corresponding XX! RCS file first in directory ./RCS and then in the current directory, XX as explained in \fIco\fR (1). XX .TP 11 XX .B \-i XX creates and initializes a new RCS file, but does not deposit any revision. XX If the RCS file has no path prefix, \fIrcs\fR tries to place it XX! first into the subdirectory ./RCS, and then into the current directory. XX If the RCS file XX already exists, an error message is printed. XX .TP XX--- 32,50 ---- XX .PP XX Files ending in `,v' are RCS files, all others are working files. If XX a working file is given, \fIrcs\fR tries to find the corresponding XX! RCS file first in directory ./RCS, XX! then in the directory /RCS/\fIcurrent-directory\fR XX! and finally in the current directory, XX as explained in \fIco\fR (1). XX .TP 11 XX .B \-i XX creates and initializes a new RCS file, but does not deposit any revision. XX If the RCS file has no path prefix, \fIrcs\fR tries to place it XX! first into the subdirectory ./RCS, XX! then in the directory named by the environment variable XX! RCSROOT/\fIcurrent-directory\fR, XX! then into the directory /RCS/\fIcurrent-directory\fR XX! and finally into the current directory. XX If the RCS file XX already exists, an error message is printed. XX .TP XX*************** XX*** 153,161 **** XX Purdue University, West Lafayette, IN, 47907. XX .sp 0 XX Revision Number: XX! .VL $Revision: 1.1 $ XX ; Release Date: XX! .VL $Date: 86/12/10 15:16:39 $ XX \&. XX .sp 0 XX Copyright \(co 1982 by Walter F. Tichy. XX--- 165,173 ---- XX Purdue University, West Lafayette, IN, 47907. XX .sp 0 XX Revision Number: XX! .VL $Revision: 1.3 $ XX ; Release Date: XX! .VL $Date: 88/01/18 16:51:24 $ XX \&. XX .sp 0 XX Copyright \(co 1982 by Walter F. Tichy. SHAR_EOF if test 2706 -ne "`wc -c rcs.1.diff`" then echo shar: error transmitting rcs.1.diff '(should have been 2706 characters)' fi echo shar: extracting rlog.1.diff '(2291 characters)' sed 's/^XX//' << \SHAR_EOF > rlog.1.diff XX*** /tmp/,RCSt1015609 Sat Mar 12 13:48:33 1988 XX--- rlog.1 Mon Jan 18 16:55:32 1988 XX*************** XX*** 1,11 **** XX! .\" $Header: rlog.1,v 1.1 86/12/10 15:16:47 gww Exp $ ENIX BSD XX .\" XX .\" $Log: rlog.1,v $ XX .\" Revision 1.1 86/12/10 15:16:47 gww XX .\" Initial revision XX .\" XX .\" XX! .TH RLOG 1 6/29/83 "Purdue University" XX .SH NAME XX rlog \- print log messages and other information about RCS files XX .SH SYNOPSIS XX--- 1,17 ---- XX! .\" $Header: rlog.1,v 1.3 88/01/18 16:55:15 gww Exp $ ENIX BSD XX .\" XX .\" $Log: rlog.1,v $ XX+ .\" Revision 1.3 88/01/18 16:55:15 gww XX+ .\" Document use of environment variable RCSROOT. XX+ .\" XX+ .\" Revision 1.2 88/01/18 16:54:13 gww XX+ .\" Document use of separate file system /RCS. XX+ .\" XX .\" Revision 1.1 86/12/10 15:16:47 gww XX .\" Initial revision XX .\" XX .\" XX! .TH RLOG 1E 6/29/83 "Purdue University" XX .SH NAME XX rlog \- print log messages and other information about RCS files XX .SH SYNOPSIS XX*************** XX*** 17,23 **** XX prints information about RCS files. XX Files ending in `,v' are RCS files, all others are working files. If XX a working file is given, \fIrlog\fR tries to find the corresponding XX! RCS file first in directory ./RCS and then in the current directory, XX as explained in \fIco\fR (1). XX .PP XX \fIRlog\fR prints the following information for each XX--- 23,33 ---- XX prints information about RCS files. XX Files ending in `,v' are RCS files, all others are working files. If XX a working file is given, \fIrlog\fR tries to find the corresponding XX! RCS file first in directory ./RCS, XX! then in the directory named by the environment variable XX! RCSROOT/\fIcurrent-directory\fR, XX! then in the directory /RCS/\fIcurrent-directory\fR XX! and finally in the current directory, XX as explained in \fIco\fR (1). XX .PP XX \fIRlog\fR prints the following information for each XX*************** XX*** 119,127 **** XX Purdue University, West Lafayette, IN, 47907. XX .sp 0 XX Revision Number: XX! .VL $Revision: 1.1 $ XX ; Release Date: XX! .VL $Date: 86/12/10 15:16:47 $ XX \&. XX .sp 0 XX Copyright \(co 1982 by Walter F. Tichy. XX--- 129,137 ---- XX Purdue University, West Lafayette, IN, 47907. XX .sp 0 XX Revision Number: XX! .VL $Revision: 1.3 $ XX ; Release Date: XX! .VL $Date: 88/01/18 16:55:15 $ XX \&. XX .sp 0 XX Copyright \(co 1982 by Walter F. Tichy. SHAR_EOF if test 2291 -ne "`wc -c rlog.1.diff`" then echo shar: error transmitting rlog.1.diff '(should have been 2291 characters)' fi # End of shell archive exit 0