diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 1995-03-31 07:45:35 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 1995-03-31 07:45:35 +0000 |
commit | ef04f88f0e6b13e5cdff436f2b1e97075da6cb65 (patch) | |
tree | 57039b0e3fe0c11faa51faf3934c6dd3cd6f305e | |
parent | 06d8715958d7c295663b1e4eeb30a0db7aec8cbf (diff) |
This commit was manufactured by cvs2svn to create tag 'cvs_1_4A2'.vendor/misc-GNU/cvs/1.4A2
Notes
Notes:
svn path=/vendor/cvs/dist/; revision=7516
svn path=/vendor/cvs/1.4A2/; revision=7518; tag=vendor/misc-GNU/cvs/1.4A2
-rw-r--r-- | gnu/usr.bin/cvs/Makefile | 3 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/Makefile | 18 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/config.h | 217 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/cvs/version.c | 11 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/doc/cvs.ms | 1073 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/lib/Makefile | 8 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/lib/Makefile.in | 91 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/lib/y.tab.h | 18 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/mkmodules/Makefile | 8 | ||||
-rw-r--r-- | gnu/usr.bin/cvs/mkmodules/xxx | 5320 |
10 files changed, 0 insertions, 6767 deletions
diff --git a/gnu/usr.bin/cvs/Makefile b/gnu/usr.bin/cvs/Makefile deleted file mode 100644 index d75858bc1e59..000000000000 --- a/gnu/usr.bin/cvs/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIR = lib cvs mkmodules - -.include <bsd.subdir.mk> diff --git a/gnu/usr.bin/cvs/cvs/Makefile b/gnu/usr.bin/cvs/cvs/Makefile deleted file mode 100644 index 5be0fbe3238c..000000000000 --- a/gnu/usr.bin/cvs/cvs/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -PROG = cvs -CFLAGS += -I${.CURDIR}/../lib \ - -DDIRENT -DSTDC_HEADERS -DPOSIX -DBROKEN_SIGISMEMBER \ - -DFTIME_MISSING -DHAVE_TIMEZONE -DUTIME_NULL_MISSING - -LDADD= -L${.CURDIR}/../lib/obj -lcvs - -SRCS = add.c admin.c checkin.c checkout.c classify.c commit.c \ -create_adm.c diff.c entries.c find_names.c history.c ignore.c \ -import.c lock.c log.c logmsg.c main.c rcs.c modules.c \ -no_diff.c parseinfo.c patch.c recurse.c release.c remove.c repos.c rtag.c \ -status.c tag.c update.c vers_ts.c version.c - -MAN1= cvs.0 -MAN5= cvs.0 - -.include <bsd.prog.mk> -.include "../../Makefile.inc" diff --git a/gnu/usr.bin/cvs/cvs/config.h b/gnu/usr.bin/cvs/cvs/config.h deleted file mode 100644 index b3bee5f97b09..000000000000 --- a/gnu/usr.bin/cvs/cvs/config.h +++ /dev/null @@ -1,217 +0,0 @@ -/* @(#)config.h 1.19 92/03/31 */ - -/* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner - * - * You may distribute under the terms of the GNU General Public License as - * specified in the README file that comes with the CVS 1.3 kit. - * - * This file holds (most of) the configuration tweaks that can be made to - * customize CVS for your site. CVS comes configured for a typical SunOS 4.x - * environment. The comments for each configurable item are intended to be - * self-explanatory. All #defines are tested first to see if an over-riding - * option was specified on the "make" command line. - * - * If special libraries are needed, you will have to edit the Makefile.in file - * or the configure script directly. Sorry. - */ - -/* - * CVS provides the most features when used in conjunction with the Version-5 - * release of RCS. Thus, it is the default. This also assumes that GNU diff - * Version-1.15 is being used as well -- you will have to configure your RCS - * V5 release separately to make this the case. If you do not have RCS V5 and - * GNU diff V1.15, comment out this define. You should not try mixing and - * matching other combinations of these tools. - */ -#ifndef HAVE_RCS5 -#define HAVE_RCS5 -#endif - -/* - * If, before installing this version of CVS, you were running RCS V4 AND you - * are installing this CVS and RCS V5 and GNU diff 1.15 all at the same time, - * you should turn on the following define. It only exists to try to do - * reasonable things with your existing checked out files when you upgrade to - * RCS V5, since the keyword expansion formats have changed with RCS V5. - * - * If you already have been running with RCS5, or haven't been running with CVS - * yet at all, or are sticking with RCS V4 for now, leave the commented out. - */ -#ifndef HAD_RCS4 -/* #define HAD_RCS4 */ -#endif - -/* - * For portability and heterogeneity reasons, CVS is shipped by default using - * my own text-file version of the ndbm database library in the src/myndbm.c - * file. If you want better performance and are not concerned about - * heterogeneous hosts accessing your modules file, turn this option off. - */ -#ifndef MY_NDBM -#define MY_NDBM -#endif - -/* - * The "diff" program to execute when creating patch output. This "diff" - * must support the "-c" option for context diffing. Specify a full pathname - * if your site wants to use a particular diff. If you are using the GNU - * version of diff (version 1.15 or later), this should be "diff -a". - * - * NOTE: this program is only used for the ``patch'' sub-command. The other - * commands use rcsdiff which will use whatever version of diff was specified - * when rcsdiff was built on your system. - */ -#ifndef DIFF -#define DIFF "diff" -#endif - -/* - * The "grep" program to execute when checking to see if a merged file had - * any conflicts. This "grep" must support the "-s" option and a standard - * regular expression as an argument. Specify a full pathname if your site - * wants to use a particular grep. - */ -#ifndef GREP -#define GREP "grep" -#endif - -/* - * The "rm" program to execute when pruning directories that are not part of - * a release. This "rm" must support the "-fr" options. Specify a full - * pathname if your site wants to use a particular rm. - */ -#ifndef RM -#define RM "rm" -#endif - -/* - * The "sort" program to execute when displaying the module database. Specify - * a full pathname if your site wants to use a particular sort. - */ -#ifndef SORT -#define SORT "sort" -#endif - -/* - * By default, RCS programs are executed with the shell or through execlp(), - * so the user's PATH environment variable is searched. If you'd like to - * bind all RCS programs to a certain directory (perhaps one not in most - * people's PATH) then set the default in RCSBIN_DFLT. Note that setting - * this here will cause all RCS programs to be executed from this directory, - * unless the user overrides the default with the RCSBIN environment variable - * or the "-b" option to CVS. - * - * This define should be either the empty string ("") or a full pathname to the - * directory containing all the installed programs from the RCS distribution. - */ -#ifndef RCSBIN_DFLT -#define RCSBIN_DFLT "" -#endif - -/* - * The default editor to use, if one does not specify the "-e" option to cvs, - * or does not have an EDITOR environment variable. I set this to just "vi", - * and use the shell to find where "vi" actually is. This allows sites with - * /usr/bin/vi or /usr/ucb/vi to work equally well (assuming that your PATH - * is reasonable). - */ -#ifndef EDITOR_DFLT -#define EDITOR_DFLT "vi" -#endif - -/* - * The Repository file holds the path to the directory within the source - * repository that contains the RCS ,v files for each CVS working directory. - * This path is either a full-path or a path relative to CVSROOT. - * - * The only advantage that I can see to having a relative path is that One can - * change the physical location of the master source repository, change one's - * CVSROOT environment variable, and CVS will work without problems. I - * recommend using full-paths. - */ -#ifndef RELATIVE_REPOS -/* #define RELATIVE_REPOS */ -#endif - -/* - * When committing or importing files, you must enter a log message. - * Normally, you can do this either via the -m flag on the command line or an - * editor will be started for you. If you like to use logging templates (the - * rcsinfo file within the $CVSROOT/CVSROOT directory), you might want to - * force people to use the editor even if they specify a message with -m. - * Enabling FORCE_USE_EDITOR will cause the -m message to be appended to the - * temp file when the editor is started. - */ -#ifndef FORCE_USE_EDITOR -/* #define FORCE_USE_EDITOR */ -#endif - -/* - * When locking the repository, some sites like to remove locks and assume - * the program that created them went away if the lock has existed for a long - * time. This used to be the default for previous versions of CVS. CVS now - * attempts to be much more robust, so lock files should not be left around - * by mistake. The new behaviour will never remove old locks (they must now - * be removed by hand). Enabling CVS_FUDGELOCKS will cause CVS to remove - * locks that are older than CVSLCKAGE seconds. - * Use of this option is NOT recommended. - */ -#ifndef CVS_FUDGELOCKS -/* #define CVS_FUDGELOCKS */ -#endif - -/* - * When committing a permanent change, CVS and RCS make a log entry of - * who committed the change. If you are committing the change logged in - * as "root" (not under "su" or other root-priv giving program), CVS/RCS - * cannot determine who is actually making the change. - * - * As such, by default, CVS disallows changes to be committed by users - * logged in as "root". You can disable this option by commenting - * out the lines below. - */ -#ifndef CVS_BADROOT -#define CVS_BADROOT -#endif - -/* - * The "cvs diff" command accepts all the single-character options that GNU - * diff (1.15) accepts. Except -D. GNU diff uses -D as a way to put - * cpp-style #define's around the output differences. CVS, by default, uses - * -D to specify a free-form date (like "cvs diff -D '1 week ago'"). If - * you would prefer that the -D option of "cvs diff" work like the GNU diff - * option, then comment out this define. - */ -#ifndef CVS_DIFFDATE -#define CVS_DIFFDATE -#endif - -/* End of CVS configuration section */ - -/* - * Externs that are included in libc, but are used frequently enough to - * warrant defining here. - */ -#ifndef STDC_HEADERS -extern void exit (); -#endif - -#ifndef getwd -extern char *getwd (); -#endif - -/* - * Some UNIX distributions don't include these in their stat.h Defined here - * because "config.h" is always included last. - */ -#ifndef S_IWRITE -#define S_IWRITE 0000200 /* write permission, owner */ -#endif -#ifndef S_IWGRP -#define S_IWGRP 0000020 /* write permission, grougroup */ -#endif -#ifndef S_IWOTH -#define S_IWOTH 0000002 /* write permission, other */ -#endif diff --git a/gnu/usr.bin/cvs/cvs/version.c b/gnu/usr.bin/cvs/cvs/version.c deleted file mode 100644 index 18a9d14f2b3d..000000000000 --- a/gnu/usr.bin/cvs/cvs/version.c +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (c) 1992, Brian Berliner and Jeff Polk - * Copyright (c) 1989-1992, Brian Berliner - * - * You may distribute under the terms of the GNU General Public License as - * specified in the README file that comes with the CVS 1.3 kit. - * - * version.c - the CVS version number - */ - -char *version_string = "\nConcurrent Versions System (CVS) 1.3\n"; diff --git a/gnu/usr.bin/cvs/doc/cvs.ms b/gnu/usr.bin/cvs/doc/cvs.ms deleted file mode 100644 index 567179b393f8..000000000000 --- a/gnu/usr.bin/cvs/doc/cvs.ms +++ /dev/null @@ -1,1073 +0,0 @@ -.\" soelim cvs.ms | pic | tbl | troff -ms -.\" @(#)cvs.ms 1.2 92/01/30 -.\" -.\" troff source to the cvs USENIX article, Winter 1990, Washington, D.C. -.\" Copyright (c) 1989, Brian Berliner -.\" -.\" This program is free software; you can redistribute it and/or modify -.\" it under the terms of the GNU General Public License as published by -.\" the Free Software Foundation; either version 1, or (at your option) -.\" any later version. -.\" -.\" This program is distributed in the hope that it will be useful, -.\" but WITHOUT ANY WARRANTY; without even the implied warranty of -.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.\" GNU General Public License for more details. -.\" -.\" You should have received a copy of the GNU General Public License -.\" along with this program; if not, write to the Free Software -.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -.\" -.\" The author can be reached at: berliner@prisma.com -.\" -.de SP -.if n .sp -.if t .sp .5 -.. -.de hl -.br -.in +0.5i -\l'\\n(LLu-1i' -.in -0.5i -.sp -.. -.OH "" -.nr PS 11 -.nr PO 1.25i -.pl -0.2i -.TL -.ps 14 -.ft B -.nf -CVS II: -Parallelizing Software Development -.fi -.ft -.ps -.AU -.ps 12 -.ft I -Brian Berliner -.ft -.ps -.AI -.ps 12 -.ft I -Prisma, Inc. -5465 Mark Dabling Blvd. -Colorado Springs, CO 80918 -berliner@prisma.com -.ft -.ps -.AB -The program described in this paper fills a need in the UNIX -community for a freely available tool to manage software revision and -release control in a multi-developer, multi-directory, multi-group -environment. -This tool also addresses the increasing need for tracking third-party vendor -source distributions while trying to maintain local modifications to -earlier releases. -.AE -.NH -Background -.PP -In large software development projects, it is usually necessary for more -than one software developer to be modifying (usually different) modules of the -code at the same time. -Some of these code modifications are done in an -experimental sense, at least until the code functions correctly, and some -testing of the entire program is usually necessary. -Then, the modifications are returned to a master source repository -so that others in the project can -enjoy the new bug-fix or functionality. -In order to manage such a project, some sort of revision control system is -necessary. -.PP -Specifically, UNIX\** -.FS -UNIX is a registered trademark of AT&T. -.FE -kernel development is an excellent example of the -problems that an adequate revision control system must address. -The SunOS\** -.FS -SunOS is a trademark of Sun Microsystems, Inc. -.FE -kernel is composed of over a thousand files spread across a -hierarchy of dozens of directories.\** -.FS -Yes, the SunOS 4.0 kernel is composed of over a \fIthousand\fP files! -.FE -Pieces of the kernel must be edited -by many software developers within an organization. -While undesirable in -theory, it is not uncommon to have two or more people making -modifications to the same file within the kernel sources in -order to facilitate a desired change. -Existing revision control systems like -.SM -RCS -.LG -[Tichy] or -.SM -SCCS -.LG -[Bell] serialize file modifications by -allowing only one developer to have a writable copy of a particular file at -any one point in time. -That developer is said to -have \*Qlocked\*U the file for his exclusive use, and no other developer is -allowed to check out a writable copy of the file until the locking -developer has finished impeding others' productivity. -Development pressures of productivity and deadlines -often force organizations to require that multiple developers be able to -simultaneously edit -copies of the same revision controlled file. -.PP -The necessity for multiple developers to modify the same file concurrently -questions the value of serialization-based policies in traditional revision -control. -This paper discusses the approach that -Prisma took in adapting a standard revision control system, -.SM -RCS\c -.LG -, along with an existing public-domain collection of shell scripts that sits -atop -.SM -RCS -.LG -and provides the basic conflict-resolution algorithms. -The resulting -program, \fBcvs\fP, addresses not only the issue of conflict-resolution in -a multi-developer open-editing environment, but also the issues of -software release control and vendor source support and integration. -.NH -The CVS Program -.PP -\fBcvs\fP -(Concurrent Versions System) -is a front end to the -.SM -RCS -.LG -revision control system which extends -the notion of revision control from a collection of files in a single -directory to a hierarchical collection of directories each containing -revision controlled files. -Directories and files in the \fBcvs\fP system can be combined together in -many ways to form a software release. -\fBcvs\fP -provides the functions necessary to manage these software releases and to -control the concurrent editing of source files among multiple software -developers. -.PP -The six major features of \fBcvs\fP are listed below, and will be -described in more detail in the following sections: -.RS -.IP 1. -Concurrent access and conflict-resolution algorithms to guarantee that -source changes are not \*Qlost.\*U -.IP 2. -Support for tracking third-party vendor source distributions while -maintaining the local modifications made to those sources. -.IP 3. -A flexible module database that provides a symbolic mapping of names to -components of a larger software distribution. -This symbolic mapping provides for location independence within the software -release and, for example, allows one to check out a copy of the \*Qdiff\*U -program without ever knowing that the sources to \*Qdiff\*U actually reside -in the \*Qbin/diff\*U directory. -.IP 4. -Configurable logging support allows all \*Qcommitted\*U source file changes -to be logged using an arbitrary program to save the log messages in a file, -notesfile, or news database. -.IP 5. -A software release can be symbolically tagged and checked out at any time -based on that tag. -An exact copy of a previous software release can be checked out at -any time, \fIregardless\fP of whether files or directories have been -added/removed from the \*Qcurrent\*U software release. -As well, -a \*Qdate\*U can be used to check out the \fIexact\fP version of the software -release as of the specified date. -.IP 6. -A \*Qpatch\*U format file [Wall] can be produced between two software -releases, even if the releases span multiple directories. -.RE -.PP -The sources maintained by \fBcvs\fP are kept within a single directory -hierarchy known as the \*Qsource repository.\*U -This \*Qsource repository\*U holds the actual -.SM -RCS -.LG -\*Q,v\*U files directly, as well as a special per-repository directory -(\c -.SM -CVSROOT.adm\c -.LG -) which contains a small number of administrative files that describe the -repository and how it can be accessed. -See Figure 1 for a picture of the \fBcvs\fP tree. -.KF -.hl -.DS B -.PS -line from 4.112,9.200 to 5.550,8.887 -line from 5.447,8.884 to 5.550,8.887 to 5.458,8.933 -line from 4.112,9.200 to 4.550,8.950 -line from 4.451,8.978 to 4.550,8.950 to 4.476,9.021 -line from 4.112,9.200 to 3.737,8.887 -line from 3.798,8.971 to 3.737,8.887 to 3.830,8.932 -line from 3.612,8.762 to 4.737,8.137 -line from 4.638,8.164 to 4.737,8.137 to 4.662,8.208 -line from 3.612,8.762 to 3.737,8.137 -line from 3.693,8.231 to 3.737,8.137 to 3.742,8.240 -line from 3.612,8.762 to 2.612,8.200 -line from 2.687,8.271 to 2.612,8.200 to 2.712,8.227 -line from 2.362,9.262 to 2.737,8.950 -line from 2.645,8.995 to 2.737,8.950 to 2.677,9.033 -line from 2.362,9.262 to 1.925,8.950 -line from 1.992,9.028 to 1.925,8.950 to 2.021,8.988 -line from 3.362,9.762 to 4.050,9.387 -line from 3.950,9.413 to 4.050,9.387 to 3.974,9.457 -line from 3.362,9.762 to 2.487,9.387 -line from 2.570,9.450 to 2.487,9.387 to 2.589,9.404 -.ps 11 -"newfs.c,v" at 4.487,8.043 ljust -.ps 11 -"mkfs.c,v" at 3.487,8.043 ljust -.ps 11 -"Makefile,v" at 2.237,8.043 ljust -.ps 11 -"newfs" at 3.487,8.793 ljust -.ps 11 -"halt.c,v" at 5.487,8.793 ljust -.ps 11 -"Makefile,v" at 4.237,8.793 ljust -.ps 11 -"modules,v" at 2.487,8.793 ljust -.ps 11 -"loginfo,v" at 1.488,8.793 ljust -.ps 11 -"etc" at 3.987,9.293 ljust -.ps 11 -"CVSROOT.adm" at 1.988,9.293 ljust -.ps 11 -"/src/master" at 2.987,9.793 ljust -.PE -.DE -.hl -.ce 100 -.LG -\fBFigure 1.\fP -.SM -\fBcvs\fP Source Repository -.ce 0 -.sp -.KE -.NH 2 -Software Conflict Resolution\** -.FS -The basic conflict-resolution algorithms -used in the \fBcvs\fP program find their roots -in the original work done by Dick Grune at Vrije Universiteit in Amsterdam -and posted to \fBcomp.sources.unix\fP in the volume 6 release sometime in 1986. -This original version of \fBcvs\fP was a collection of shell scripts that -combined to form a front end to the -.SM -RCS -.LG -programs. -.FE -.PP -\fBcvs\fP allows several software developers to edit personal copies of a -revision controlled file concurrently. -The revision number of each checked out file is maintained independently -for each user, and \fBcvs\fP forces the checked out file to be current with -the \*Qhead\*U revision before it can be \*Qcommitted\*U as a permanent change. -A checked out file is brought up-to-date with the \*Qhead\*U revision using -the \*Qupdate\*U command of \fBcvs\fP. -This command compares the \*Qhead\*U revision number with that of the user's -file and performs an -.SM -RCS -.LG -merge operation if they are not the same. -The result of the merge is a file that contains the user's modifications -and those modifications that were \*Qcommitted\*U after the user -checked out his version of the file (as well as a backup copy of the -user's original file). -\fBcvs\fP points out any conflicts during the merge. -It is the user's responsibility to resolve these conflicts -and to \*Qcommit\*U his/her changes when ready. -.PP -Although the \fBcvs\fP conflict-resolution algorithm was defined in 1986, -it is remarkably similar to the \*QCopy-Modify-Merge\*U scenario included -with NSE\** -.FS -NSE is the Network Software Environment, a product of Sun Microsystems, Inc. -.FE -and described in [Honda] and [Courington]. -The following explanation from [Honda] also applies to \fBcvs\fP: -.QP -Simply stated, a developer copies an object without locking it, modifies -the copy, and then merges the modified copy with the original. -This paradigm allows developers to work in isolation from one another since -changes are made to copies of objects. -Because locks are not used, development is not serialized and can proceed -in parallel. -Developers, however, must merge objects after the changes have been made. -In particular, a developer must resolve conflicts when the same object has -been modified by someone else. -.PP -In practice, Prisma has found that conflicts that occur when the same -object has been modified by someone else are quite rare. -When they do happen, the changes made by the other developer are usually -easily resolved. -This practical use has shown that the \*QCopy-Modify-Merge\*U paradigm is a -correct and useful one. -.NH 2 -Tracking Third-Party Source Distributions -.PP -Currently, a large amount of software is based on source -distributions from a third-party distributor. -It is often the case that local modifications are to be made to this -distribution, \fIand\fP that the vendor's future releases should be -tracked. -Rolling your local modifications forward into the new vendor release is a -time-consuming task, but \fBcvs\fP can ease this burden somewhat. -The \fBcheckin\fP program of \fBcvs\fP initially sets up a source -repository by integrating the source modules directly from the vendor's -release, preserving the directory hierarchy of the vendor's distribution. -The branch support of -.SM -RCS -.LG -is used to build this vendor release as a branch of the main -.SM -RCS -.LG -trunk. -Figure 2 shows how the \*Qhead\*U tracks a sample vendor -branch when no local modifications have been made to the file. -.KF -.hl -.DS B -.PS -ellipse at 3.237,6.763 wid 1.000 ht 0.500 -dashwid = 0.050i -line dashed from 3.237,7.513 to 3.737,7.513 to 3.737,9.762 to 4.237,9.762 -line from 4.138,9.737 to 4.237,9.762 to 4.138,9.787 -line dashed from 2.237,8.262 to 3.237,8.262 to 3.237,7.013 -line from 3.212,7.112 to 3.237,7.013 to 3.262,7.112 -line from 3.737,6.763 to 4.237,6.763 -line from 4.138,6.737 to 4.237,6.763 to 4.138,6.788 -line from 2.237,6.763 to 2.737,6.763 -line from 2.637,6.737 to 2.737,6.763 to 2.637,6.788 -line from 1.738,6.013 to 1.738,6.513 -line from 1.762,6.413 to 1.738,6.513 to 1.713,6.413 -line from 1.238,7.013 to 2.237,7.013 to 2.237,6.513 to 1.238,6.513 to 1.238,7.013 -line from 4.237,9.012 to 5.237,9.012 to 5.237,8.512 to 4.237,8.512 to 4.237,9.012 -line from 4.237,8.012 to 5.237,8.012 to 5.237,7.513 to 4.237,7.513 to 4.237,8.012 -line from 4.237,7.013 to 5.237,7.013 to 5.237,6.513 to 4.237,6.513 to 4.237,7.013 -line from 4.737,7.013 to 4.737,7.513 -line from 4.763,7.413 to 4.737,7.513 to 4.712,7.413 -line from 4.737,8.012 to 4.737,8.512 -line from 4.763,8.412 to 4.737,8.512 to 4.712,8.412 -line from 4.237,10.012 to 5.237,10.012 to 5.237,9.512 to 4.237,9.512 to 4.237,10.012 -line from 4.737,9.012 to 4.737,9.512 -line from 4.763,9.412 to 4.737,9.512 to 4.712,9.412 -line from 5.987,5.013 to 5.987,6.013 to 0.988,6.013 to 0.988,5.013 to 5.987,5.013 -.ps 11 -"\"HEAD\"" at 1.550,8.231 ljust -.ps 11 -"'SunOS'" at 2.987,6.293 ljust -.ps 11 -"1.1.1" at 3.050,6.793 ljust -.ps 11 -"1.1" at 1.613,6.793 ljust -.ps 11 -"1.1.1.1" at 4.487,6.793 ljust -.ps 11 -"1.1.1.2" at 4.487,7.793 ljust -.ps 11 -"1.1.1.3" at 4.487,8.793 ljust -.ps 11 -"1.1.1.4" at 4.487,9.793 ljust -.ps 11 -"'SunOS_4_0'" at 5.487,6.793 ljust -.ps 11 -"'SunOS_4_0_1'" at 5.487,7.793 ljust -.ps 11 -"'YAPT_5_5C'" at 5.487,8.793 ljust -.ps 11 -"'SunOS_4_0_3'" at 5.487,9.793 ljust -.ps 11 -"rcsfile.c,v" at 2.987,5.543 ljust -.PE -.DE -.hl -.ce 100 -.LG -\fBFigure 2.\fP -.SM -\fBcvs\fP Vendor Branch Example -.ce 0 -.sp .3 -.KE -Once this is done, developers can check out files and make local changes to -the vendor's source distribution. -These local changes form a new branch to the tree which is then used as the -source for future check outs. -Figure 3 shows how the \*Qhead\*U moves to the main -.SM -RCS -.LG -trunk when a local modification is made. -.KF -.hl -.DS B -.PS -ellipse at 3.237,6.763 wid 1.000 ht 0.500 -dashwid = 0.050i -line dashed from 2.800,9.075 to 1.738,9.075 to 1.738,8.012 -line from 1.713,8.112 to 1.738,8.012 to 1.762,8.112 -line from 1.738,7.013 to 1.738,7.513 -line from 1.762,7.413 to 1.738,7.513 to 1.713,7.413 -line from 1.238,8.012 to 2.237,8.012 to 2.237,7.513 to 1.238,7.513 to 1.238,8.012 -line from 3.737,6.763 to 4.237,6.763 -line from 4.138,6.737 to 4.237,6.763 to 4.138,6.788 -line from 2.237,6.763 to 2.737,6.763 -line from 2.637,6.737 to 2.737,6.763 to 2.637,6.788 -line from 1.738,6.013 to 1.738,6.513 -line from 1.762,6.413 to 1.738,6.513 to 1.713,6.413 -line from 1.238,7.013 to 2.237,7.013 to 2.237,6.513 to 1.238,6.513 to 1.238,7.013 -line from 4.237,9.012 to 5.237,9.012 to 5.237,8.512 to 4.237,8.512 to 4.237,9.012 -line from 4.237,8.012 to 5.237,8.012 to 5.237,7.513 to 4.237,7.513 to 4.237,8.012 -line from 4.237,7.013 to 5.237,7.013 to 5.237,6.513 to 4.237,6.513 to 4.237,7.013 -line from 4.737,7.013 to 4.737,7.513 -line from 4.763,7.413 to 4.737,7.513 to 4.712,7.413 -line from 4.737,8.012 to 4.737,8.512 -line from 4.763,8.412 to 4.737,8.512 to 4.712,8.412 -line from 4.237,10.012 to 5.237,10.012 to 5.237,9.512 to 4.237,9.512 to 4.237,10.012 -line from 4.737,9.012 to 4.737,9.512 -line from 4.763,9.412 to 4.737,9.512 to 4.712,9.412 -line from 5.987,5.013 to 5.987,6.013 to 0.988,6.013 to 0.988,5.013 to 5.987,5.013 -.ps 11 -"1.2" at 1.613,7.793 ljust -.ps 11 -"\"HEAD\"" at 2.862,9.043 ljust -.ps 11 -"'SunOS'" at 2.987,6.293 ljust -.ps 11 -"1.1.1" at 3.050,6.793 ljust -.ps 11 -"1.1" at 1.613,6.793 ljust -.ps 11 -"1.1.1.1" at 4.487,6.793 ljust -.ps 11 -"1.1.1.2" at 4.487,7.793 ljust -.ps 11 -"1.1.1.3" at 4.487,8.793 ljust -.ps 11 -"1.1.1.4" at 4.487,9.793 ljust -.ps 11 -"'SunOS_4_0'" at 5.487,6.793 ljust -.ps 11 -"'SunOS_4_0_1'" at 5.487,7.793 ljust -.ps 11 -"'YAPT_5_5C'" at 5.487,8.793 ljust -.ps 11 -"'SunOS_4_0_3'" at 5.487,9.793 ljust -.ps 11 -"rcsfile.c,v" at 2.987,5.543 ljust -.PE -.DE -.hl -.ce 100 -.LG -\fBFigure 3.\fP -.SM -\fBcvs\fP Local Modification to Vendor Branch -.ce 0 -.sp -.KE -.PP -When a new version of the vendor's source distribution arrives, the -\fBcheckin\fP program adds the new and changed vendor's files to the -already existing source repository. -For files that have not been changed locally, the new file from the -vendor becomes the current \*Qhead\*U revision. -For files that have been modified locally, \fBcheckin\fP warns that the -file must be merged with the new vendor release. -The \fBcvs\fP \*Qjoin\*U command is a useful tool that aids this process by -performing the necessary -.SM -RCS -.LG -merge, as is done above when performing an \*Qupdate.\*U -.PP -There is also limited support for \*Qdual\*U derivations for source files. -See Figure 4 for a sample dual-derived file. -.KF -.hl -.DS B -.PS -ellipse at 2.337,8.575 wid 0.700 ht 0.375 -ellipse at 2.312,9.137 wid 0.700 ht 0.375 -line from 1.225,9.012 to 1.225,9.363 -line from 1.250,9.263 to 1.225,9.363 to 1.200,9.263 -line from 0.875,9.725 to 1.600,9.725 to 1.600,9.363 to 0.875,9.363 to 0.875,9.725 -line from 0.875,9.012 to 1.600,9.012 to 1.600,8.650 to 0.875,8.650 to 0.875,9.012 -line from 4.050,10.200 to 4.775,10.200 to 4.775,9.850 to 4.050,9.850 to 4.050,10.200 -line from 4.050,9.475 to 4.775,9.475 to 4.775,9.113 to 4.050,9.113 to 4.050,9.475 -line from 4.050,8.762 to 4.775,8.762 to 4.775,8.400 to 4.050,8.400 to 4.050,8.762 -line from 4.425,8.762 to 4.425,9.113 -line from 4.450,9.013 to 4.425,9.113 to 4.400,9.013 -line from 4.425,9.475 to 4.425,9.850 -line from 4.450,9.750 to 4.425,9.850 to 4.400,9.750 -line from 3.050,10.000 to 3.775,10.000 to 3.775,9.637 to 3.050,9.637 to 3.050,10.000 -line from 3.050,9.312 to 3.775,9.312 to 3.775,8.950 to 3.050,8.950 to 3.050,9.312 -line from 0.713,7.325 to 0.713,8.075 to 4.925,8.075 to 4.925,7.325 to 0.713,7.325 -line from 1.238,8.075 to 1.238,8.637 -line from 1.262,8.537 to 1.238,8.637 to 1.213,8.537 -line from 1.613,8.825 to 1.975,8.575 -line from 1.878,8.611 to 1.975,8.575 to 1.907,8.652 -line from 2.675,8.575 to 4.050,8.575 -line from 3.950,8.550 to 4.050,8.575 to 3.950,8.600 -line from 2.675,9.137 to 3.050,9.137 -line from 2.950,9.112 to 3.050,9.137 to 2.950,9.162 -line from 3.425,9.325 to 3.425,9.637 -line from 3.450,9.537 to 3.425,9.637 to 3.400,9.537 -line from 1.613,8.825 to 1.925,9.137 -line from 1.872,9.049 to 1.925,9.137 to 1.837,9.084 -.ps 11 -"'BSD'" at 2.138,9.481 ljust -.ps 11 -"1.2" at 1.113,9.543 ljust -.ps 11 -"1.1" at 1.125,8.831 ljust -.ps 11 -"1.1.1.1" at 4.175,8.543 ljust -.ps 11 -"1.1.1.2" at 4.175,9.281 ljust -.ps 11 -"1.1.1.3" at 4.175,9.993 ljust -.ps 11 -"1.1.2.2" at 3.175,9.793 ljust -.ps 11 -"1.1.2.1" at 3.175,9.106 ljust -.ps 11 -"rcsfile.c,v" at 2.425,7.706 ljust -.ps 11 -"1.1.1" at 2.175,8.568 ljust -.ps 11 -"'SunOS'" at 2.125,8.243 ljust -.ps 11 -"1.1.2" at 2.163,9.131 ljust -.PE -.DE -.hl -.ce 100 -.LG -\fBFigure 4.\fP -.SM -\fBcvs\fP Support For \*QDual\*U Derivations -.ce 0 -.sp -.KE -This example tracks the SunOS distribution but includes major changes from -Berkeley. -These BSD files are saved directly in the -.SM -RCS -.LG -file off a new branch. -.NH 2 -Location Independent Module Database -.PP -\fBcvs\fP contains support for a simple, yet powerful, \*Qmodule\*U database. -For reasons of efficiency, this database is stored in \fBndbm\fP\|(3) format. -The module database is used to apply names to collections of directories -and files as a matter of convenience for checking out pieces of a large -software distribution. -The database records the physical location of the sources as a form of -information hiding, allowing one to check out whole directory hierarchies -or individual files without regard for their actual location within the -global source distribution. -.PP -Consider the following small sample of a module database, which must be -tailored manually to each specific source repository environment: -.DS -\f(CW #key [-option argument] directory [files...] - diff bin/diff - libc lib/libc - sys -o sys/tools/make_links sys - modules -i mkmodules CVSROOT.adm modules - kernel -a sys lang/adb - ps bin Makefile ps.c\fP -.DE -.PP -The \*Qdiff\*U and \*Qlibc\*U modules refer to whole directory hierarchies that -are extracted on check out. -The \*Qsys\*U module extracts the \*Qsys\*U hierarchy, and runs the -\*Qmake_links\*U program at the end of the check out process (the \fI-o\fP -option specifies a program to run on check\fIo\fPut). -The \*Qmodules\*U module allows one to edit the module database file and -runs the \*Qmkmodules\*U program on check\fIi\fPn to regenerate the -\fBndbm\fP database that \fBcvs\fP uses. -The \*Qkernel\*U module is an alias (as the \fI-a\fP option specifies) -which causes the remaining arguments after the \fI-a\fP to be interpreted -exactly as if they had been specified on the command line. -This is useful for objects that require shared pieces of code from far away -places to be compiled (as is the case with the kernel debugger, \fBkadb\fP, -which shares code with the standard \fBadb\fP debugger). -The \*Qps\*U module shows that the source for \*Qps\*U lives in the \*Qbin\*U -directory, but only \fIMakefile\fP and \fIps.c\fP are required to build the -object. -.PP -The module database at Prisma is now populated for the entire UNIX -distribution and thereby allows us to issue the -following convenient commands to check out components of the UNIX -distribution without regard for their actual location within the master source -repository: -.DS -\f(CW example% cvs checkout diff - example% cvs checkout libc ps - example% cd diff; make\fP -.DE -.PP -In building the module database file, it is quite possible to have name -conflicts within a global software distribution. -For example, SunOS provides two \fBcat\fP programs: -one for the standard environment, \fI/bin/cat\fP, and one for the System V -environment, \fI/usr/5bin/cat\fP. -We resolved this conflict by naming the standard \fBcat\fP module -\*Qcat\*U, and the System V \fBcat\fP module \*Q5cat\*U. -Similar name modifications must be applied to other conflicting names, as -might be found between a utility program and a library function, though -Prisma chose not to include individual library functions within the module -database at this time. -.NH 2 -Configurable Logging Support -.PP -The \fBcvs\fP \*Qcommit\*U command is used to make a permanent change to the -master source repository (where the -.SM -RCS -.LG -\*Q,v\*U files live). -Whenever a \*Qcommit\*U is done, the log message for the change is carefully -logged by an arbitrary program (in a file, notesfile, news database, or -mail). -For example, a collection of these updates can be used to produce release -notices. -\fBcvs\fP can be configured to send log updates through one or more filter -programs, based on a regular expression match on the directory that is -being changed. -This allows multiple related or unrelated projects to exist within a single -\fBcvs\fP source repository tree, with each different project sending its -\*Qcommit\*U reports to a unique log device. -.PP -A sample logging configuration file might look as follows: -.DS -\f(CW #regex filter-program - DEFAULT /usr/local/bin/nfpipe -t %s utils.updates - ^diag /usr/local/bin/nfpipe -t %s diag.updates - ^local /usr/local/bin/nfpipe -t %s local.updates - ^perf /usr/local/bin/nfpipe -t %s perf.updates - ^sys /usr/local/bin/nfpipe -t %s kernel.updates\fP -.DE -.PP -This sample allows the diagnostics and performance groups to -share the same source repository with the kernel and utilities groups. -Changes that they make are sent directly to their own notesfile [Essick] -through the \*Qnfpipe\*U program. -A sufficiently simple title is substituted for the \*Q%s\*U argument before -the filter program is executed. -This logging configuration file is tailored manually to each specific -source repository environment. -.NH 2 -Tagged Releases and Dates -.PP -Any release can be given a symbolic tag name that is stored directly in the -.SM -RCS -.LG -files. -This tag can be used at any time to get an exact copy of any previous -release. -With equal ease, one can also extract an exact copy of the source files as -of any arbitrary date in the past as well. -Thus, all that's required to tag the current kernel, and to tag the kernel -as of the Fourth of July is: -.DS -\f(CW example% cvs tag TEST_KERNEL kernel - example% cvs tag -D 'July 4' PATRIOTIC_KERNEL kernel\fP -.DE -The following command would retrieve an exact copy of the test kernel at -some later date: -.DS -\f(CW example% cvs checkout -fp -rTEST_KERNEL kernel\fP -.DE -The \fI-f\fP option causes only files that match the specified tag to be -extracted, while the \fI-p\fP option automatically prunes empty directories. -Consequently, directories added to the kernel after the test kernel was -tagged are not included in the newly extracted copy of the test kernel. -.PP -The \fBcvs\fP date support has exactly the same interface as that provided -with -.SM -RCS\c -.LG -, however \fBcvs\fP must process the \*Q,v\*U files directly due to the -special handling required by the vendor branch support. -The standard -.SM -RCS -.LG -date handling only processes one branch (or the main trunk) when checking -out based on a date specification. -\fBcvs\fP must instead process the current \*Qhead\*U branch and, if a -match is not found, proceed to look for a match on the vendor branch. -This, combined with reasons of performance, is why \fBcvs\fP processes -revision (symbolic and numeric) and date specifications directly from the -\*Q,v\*U files. -.NH 2 -Building \*Qpatch\*U Source Distributions -.PP -\fBcvs\fP can produce a \*Qpatch\*U format [Wall] output file which can be -used to bring a previously released software distribution current with the -newest release. -This patch file supports an entire directory hierarchy within a single -patch, as well as being able to add whole new files to the previous -release. -One can combine symbolic revisions and dates together to display changes in -a very generic way: -.DS -\f(CW example% cvs patch -D 'December 1, 1988' \e - -D 'January 1, 1989' sys\fP -.DE -This example displays the kernel changes made in the month of December, -1988. -To release a patch file, for example, to take the \fBcvs\fP distribution -from version 1.0 to version 1.4 might be done as follows: -.DS -\f(CW example% cvs patch -rCVS_1_0 -rCVS_1_4 cvs\fP -.DE -.NH -CVS Experience -.NH 2 -Statistics -.PP -A quick summary of the scale that \fBcvs\fP is addressing today -can be found in Table 1. -.KF -.TS -box center tab(:); -c s -c s -c | c -l | n . -\fB\s+2Revision Control Statistics at Prisma -as of 11/11/89\fP\s-2 -_ -How Many...:Total -= -Files:17243 -Directories:1005 -Lines of code:3927255 -Removed files:131 -Software developers:14 -Software groups:6 -Megabytes of source:128 -.TE -.ce 100 -.LG -\fBTable 1.\fP -.SM -\fBcvs\fP Statistics -.ce 0 -.sp .3 -.KE -Table 2 shows the history of files changed or added and the number -of source lines affected by the change at Prisma. -Only changes made to the kernel sources are included. -.KF -.TS -box center tab(:); -c s s s s -c s s s s -c || c | c || c | c -c || c | c || c | c -l || n | n || n | n. -\fB\s+2Prisma Kernel Source File Changes -By Month, 1988-1989\fP\s-2 -_ -Month:# Changed:# Lines:# Added:# Lines -\^:Files:Changed:Files:Added -= -Dec:87:3619:68:9266 -Jan:39:4324:0:0 -Feb:73:1578:5:3550 -Mar:99:5301:18:11461 -Apr:112:7333:11:5759 -May:138:5371:17:13986 -Jun:65:2261:27:12875 -Jul:34:2000:1:58 -Aug:65:6378:8:4724 -Sep:266:23410:113:39965 -Oct:22:621:1:155 -Total:1000:62196:269:101799 -.TE -.ce 100 -.LG -\fBTable 2.\fP -.SM -\fBcvs\fP Usage History for the Kernel -.ce 0 -.sp -.KE -The large number of source file changes made in September are the result of -merging the SunOS 4.0.3 sources into the kernel. -This merge process is described in section 3.3. -.NH 2 -Performance -.PP -The performance of \fBcvs\fP is currently quite reasonable. -Little effort has been expended on tuning \fBcvs\fP, although performance -related decisions were made during the \fBcvs\fP design. -For example, \fBcvs\fP parses the -.SM -RCS -.LG -\*Q,v\*U files directly instead of running an -.SM -RCS -.LG -process. -This includes following branches as well as integrating with the vendor -source branches and the main trunk when checking out files based on a date. -.PP -Checking out the entire kernel source tree (1223 files/59 directories) -currently takes 16 wall clock minutes on a Sun-4/280. -However, bringing the tree up-to-date with the current kernel sources, once -it has been checked out, takes only 1.5 wall clock minutes. -Updating the \fIcomplete\fP 128 MByte source tree under \fBcvs\fP control -(17243 files/1005 directories) takes roughly 28 wall clock minutes and -utilizes one-third of the machine. -For now this is entirely acceptable; improvements on these numbers will -possibly be made in the future. -.NH 2 -The SunOS 4.0.3 Merge -.PP -The true test of the \fBcvs\fP vendor branch support came with the arrival -of the SunOS 4.0.3 source upgrade tape. -As described above, the \fBcheckin\fP program was used to install the new -sources and the resulting output file listed the files that had been -locally modified, needing to be merged manually. -For the kernel, there were 94 files in conflict. -The \fBcvs\fP \*Qjoin\*U command was used on each of the 94 conflicting -files, and the remaining conflicts were resolved. -.PP -The \*Qjoin\*U command performs an \fBrcsmerge\fP operation. -This in turn uses \fI/usr/lib/diff3\fP to produce a three-way diff file. -As it happens, the \fBdiff3\fP program has a hard-coded limit of 200 -source-file changes maximum. -This proved to be too small for a few of the kernel files that needed -merging by hand, due to the large number of local changes that Prisma had -made. -The \fBdiff3\fP problem was solved by increasing the hard-coded limit by an -order of magnitude. -.PP -The SunOS 4.0.3 kernel source upgrade distribution contained -346 files, 233 of which were modifications to previously released files, -and 113 of which were newly added files. -\fBcheckin\fP added the 113 new files to the source repository -without intervention. -Of the 233 modified files, 139 dropped in cleanly by \fBcheckin\fP, since -Prisma had not made any local changes to them, and 94 required manual -merging due to local modifications. -The 233 modified files consisted of 20,766 lines of differences. -It took one developer two days to manually merge the 94 files using the -\*Qjoin\*U command and resolving conflicts manually. -An additional day was required for kernel debugging. -The entire process of merging over 20,000 lines of differences was -completed in less than a week. -This one time-savings alone was justification enough for the \fBcvs\fP -development effort; we expect to gain even more when tracking future SunOS -releases. -.NH -Future Enhancements and Current Bugs -.PP -Since \fBcvs\fP was designed to be incomplete, for reasons of design -simplicity, there are naturally a good -number of enhancements that can be made to make it more useful. -As well, some nuisances exist in the current implementation. -.RS -.IP \(bu 3 -\fBcvs\fP does not currently \*Qremember\*U who has a checked out a copy of a -module. -As a result, it is impossible to know who might be working on the same -module that you are. -A simple-minded database that is updated nightly would likely suffice. -.IP \(bu 3 -Signal processing, keyboard interrupt handling in particular, is currently -somewhat weak. -This is due to the heavy use of the \fBsystem\fP\|(3) library -function to execute -.SM -RCS -.LG -programs like \fBco\fP and \fBci\fP. -It sometimes takes multiple interrupts to make \fBcvs\fP quit. -This can be fixed by using a home-grown \fBsystem\fP\|() replacement. -.IP \(bu 3 -Security of the source repository is currently not dealt with directly. -The usual UNIX approach of user-group-other security permissions through -the file system is utilized, but nothing else. -\fBcvs\fP could likely be a set-group-id executable that checks a -protected database to verify user access permissions for particular objects -before allowing any operations to affect those objects. -.IP \(bu 3 -With every checked-out directory, \fBcvs\fP maintains some administrative -files that record the current revision numbers of the checked-out files as -well as the location of the respective source repository. -\fBcvs\fP does not recover nicely at all if these administrative files are -removed. -.IP \(bu 3 -The source code for \fBcvs\fP has been tested extensively on Sun-3 and -Sun-4 systems, all running SunOS 4.0 or later versions of the operating -system. -Since the code has not yet been compiled under other platforms, the overall -portability of the code is still questionable. -.IP \(bu 3 -As witnessed in the previous section, the \fBcvs\fP method for tracking -third party vendor source distributions can work quite nicely. -However, if the vendor changes the directory structure or the file names -within the source distribution, \fBcvs\fP has no way of matching the old -release with the new one. -It is currently unclear as to how to solve this, though it is certain to -happen in practice. -.RE -.NH -Availability -.PP -The \fBcvs\fP program sources can be found in a recent posting to the -\fBcomp.sources.unix\fP newsgroup. -It is also currently available via anonymous ftp from \*Qprisma.com\*U. -Copying rights for \fBcvs\fP will be covered by the GNU General Public -License. -.NH -Summary -.PP -Prisma has used \fBcvs\fP since December, 1988. -It has evolved to meet our specific needs of revision and release control. -We will make our code freely available so that others can -benefit from our work, and can enhance \fBcvs\fP to meet broader needs yet. -.PP -Many of the other software release and revision control systems, like the -one described in [Glew], appear to use a collection of tools that are -geared toward specific environments \(em one set of tools for the kernel, -one set for \*Qgeneric\*U software, one set for utilities, and one set for -kernel and utilities. -Each of these tool sets apparently handle some specific aspect of the -problem uniquely. -\fBcvs\fP took a somewhat different approach. -File sharing through symbolic or hard links is not addressed; instead, the -disk space is simply burned since it is \*Qcheap.\*U -Support for producing objects for multiple architectures is not addressed; -instead, a parallel checked-out source tree must be used for each -architecture, again wasting disk space to simplify complexity and ease of -use \(em punting on this issue allowed \fIMakefile\fPs to remain -unchanged, unlike the approach taken in [Mahler], thereby maintaining closer -compatibility with the third-party vendor sources. -\fBcvs\fP is essentially a source-file server, making no assumptions or -special handling of the sources that it controls. -To \fBcvs\fP: -.QP -A source is a source, of course, of course, unless of course the source is -Mr. Ed.\** -.FS -\fBcvs\fP, of course, does not really discriminate against Mr. Ed.\** -.FE -.FS -Yet. -.FE -.LP -Sources are maintained, saved, and retrievable at any time based on -symbolic or numeric revision or date in the past. -It is entirely up to \fBcvs\fP wrapper programs to provide for release -environments and such. -.PP -The major advantage of \fBcvs\fP over the -many other similar systems that have already been designed is the -simplicity of \fBcvs\fP. -\fBcvs\fP contains only three programs that do all the work of release -and revision control, and two manually-maintained administrative -files for each source repository. -Of course, the deciding factor of any tool is whether people use it, and if -they even \fIlike\fP to use it. -At Prisma, \fBcvs\fP prevented members of the kernel -group from killing each other. -.NH -Acknowledgements -.PP -Many thanks to Dick Grune at Vrije Universiteit in Amsterdam for his work -on the original version of \fBcvs\fP and for making it available to the -world. -Thanks to Jeff Polk of Prisma for helping with the design of the module -database, vendor branch support, and for writing the \fBcheckin\fP shell -script. -Thanks also to the entire software group at Prisma for taking the -time to review the paper and correct my grammar. -.NH -References -.IP [Bell] 12 -Bell Telephone Laboratories. -\*QSource Code Control System User's Guide.\*U -\fIUNIX System III Programmer's Manual\fP, October 1981. -.IP [Courington] 12 -Courington, W. -\fIThe Network Software Environment\fP, -Sun Technical Report FE197-0, Sun Microsystems Inc, February 1989. -.IP [Essick] 12 -Essick, Raymond B. and Robert Bruce Kolstad. -\fINotesfile Reference Manual\fP, -Department of Computer Science Technical Report #1081, -University of Illinois at Urbana-Champaign, Urbana, Illinois, -1982, p. 26. -.IP [Glew] 12 -Glew, Andy. -\*QBoxes, Links, and Parallel Trees: -Elements of a Configuration Management System.\*U -\fIWorkshop Proceedings of the Software Management Conference\fP, USENIX, -New Orleans, April 1989. -.IP [Grune] 12 -Grune, Dick. -Distributed the original shell script version of \fBcvs\fP in the -\fBcomp.sources.unix\fP volume 6 release in 1986. -.IP [Honda] 12 -Honda, Masahiro and Terrence Miller. -\*QSoftware Management Using a CASE Environment.\*U -\fIWorkshop Proceedings of the Software Management Conference\fP, USENIX, -New Orleans, April 1989. -.IP [Mahler] 12 -Mahler, Alex and Andreas Lampen. -\*QAn Integrated Toolset for Engineering Software Configurations.\*U -\fIProceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on -Practical Software Development Environments\fP, ACM, Boston, November 1988. -Described is the \fBshape\fP toolkit posted to the -\fBcomp.sources.unix\fP newsgroup in the volume 19 release. -.IP [Tichy] 12 -Tichy, Walter F. -\*QDesign, Implementation, and Evaluation of a Revision Control System.\*U -\fIProceedings of the 6th International Conference on Software -Engineering\fP, IEEE, Tokyo, September 1982. -.IP [Wall] 12 -Wall, Larry. -The \fBpatch\fP program is an indispensable tool for applying a diff file -to an original. -Can be found on uunet.uu.net in ~ftp/pub/patch.tar. diff --git a/gnu/usr.bin/cvs/lib/Makefile b/gnu/usr.bin/cvs/lib/Makefile deleted file mode 100644 index cf3f20fd2802..000000000000 --- a/gnu/usr.bin/cvs/lib/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -LIB = cvs - -CFLAGS += -I${.CURDIR} -I${.CURDIR}/../cvs -DFTIME_MISSING -DHAVE_TIMEZONE - -SRCS = argmatch.c error.c getopt.c sighandle.c strippath.c stripslash.c yesno.c \ - getdate.y fnmatch.c regex.c subr.c myndbm.c hash.c - -.include <bsd.lib.mk> diff --git a/gnu/usr.bin/cvs/lib/Makefile.in b/gnu/usr.bin/cvs/lib/Makefile.in deleted file mode 100644 index a8309f2fc00d..000000000000 --- a/gnu/usr.bin/cvs/lib/Makefile.in +++ /dev/null @@ -1,91 +0,0 @@ -# Makefile for library files used by GNU CVS. -# Do not use this makefile directly, but only from `../Makefile'. -# Copyright (C) 1986, 1988-1992 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -# @(#)Makefile.in 1.12 92/03/31 - -SHELL = /bin/sh - -srcdir = @srcdir@ -@VPATH@ - -SOURCES = argmatch.c \ -error.c getopt.c getopt1.c \ -sighandle.c \ -strippath.c stripslash.c yesno.c \ -getdate.y \ -hostname.c fnmatch.c ftruncate.c mkdir.c rename.c regex.c \ -strdup.c getwd.c alloca.c - -OBJECTS = argmatch.o \ -error.o getopt.o getopt1.o \ -sighandle.o \ -strippath.o stripslash.o yesno.o \ -getdate.o \ -@LIBOBJS@ - -DISTFILES = Makefile.in getopt.h \ -fnmatch.h regex.h system.h wait.h $(SOURCES) - -xxx: - @cd ..; $(MAKE) all SUBDIRS=lib - -all: libcvs.a -.PHONY: all - -install: all -.PHONY: install - -tags: $(DISTFILES) - ctags $(DISTFILES) - -TAGS: $(DISTFILES) - etags $(DISTFILES) - -ls: - @echo $(DISTFILES) -.PHONY: ls - -clean: - rm -f *.a *.o *.tab.c getdate.c -.PHONY: clean - -distclean: clean - rm -f tags TAGS Makefile -.PHONY: distclean - -realclean: distclean -.PHONY: realclean - -dist: - ln $(DISTFILES) ../`cat ../.fname`/lib -.PHONY: dist - -libcvs.a: $(OBJECTS) - $(AR) cr $@ $(OBJECTS) - -$(RANLIB) $@ - -getdate.c: getdate.y - @echo expect 8 shift/reduce conflicts - $(YACC) $(srcdir)/getdate.y - -if test -f y.tab.c ; then mv y.tab.c getdate.c ; fi - -if test -f getdate.tab.c ; then mv getdate.tab.c getdate.c ; fi - -fnmatch.o: fnmatch.h -getopt1.o: getopt.h -regex.o: regex.h -getwd.o: system.h diff --git a/gnu/usr.bin/cvs/lib/y.tab.h b/gnu/usr.bin/cvs/lib/y.tab.h deleted file mode 100644 index 4a541d2c97f7..000000000000 --- a/gnu/usr.bin/cvs/lib/y.tab.h +++ /dev/null @@ -1,18 +0,0 @@ -#define tAGO 257 -#define tDAY 258 -#define tDAYZONE 259 -#define tID 260 -#define tMERIDIAN 261 -#define tMINUTE_UNIT 262 -#define tMONTH 263 -#define tMONTH_UNIT 264 -#define tSEC_UNIT 265 -#define tSNUMBER 266 -#define tUNUMBER 267 -#define tZONE 268 -#define tDST 269 -typedef union { - time_t Number; - enum _MERIDIAN Meridian; -} YYSTYPE; -extern YYSTYPE yylval; diff --git a/gnu/usr.bin/cvs/mkmodules/Makefile b/gnu/usr.bin/cvs/mkmodules/Makefile deleted file mode 100644 index 9f66fdefc97f..000000000000 --- a/gnu/usr.bin/cvs/mkmodules/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -PROG = mkmodules -SRCS = mkmodules.c - -CFLAGS += -I${.CURDIR}/../cvs -I${.CURDIR}/../lib -LDADD= -L${.CURDIR}/../lib/obj -lcvs - -.include <bsd.prog.mk> -.include "../../Makefile.inc" diff --git a/gnu/usr.bin/cvs/mkmodules/xxx b/gnu/usr.bin/cvs/mkmodules/xxx deleted file mode 100644 index f0dd87dee7e7..000000000000 --- a/gnu/usr.bin/cvs/mkmodules/xxx +++ /dev/null @@ -1,5320 +0,0 @@ -# 1 "/usr/src/gnu/cvs/mkmodules/mkmodules.c" - - - - - - - - - - - - - -# 1 "/usr/include/sys/syslimits.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 14 "/usr/src/gnu/cvs/mkmodules/mkmodules.c" 2 - -# 1 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 1 - - -# 1 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 1 - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/types.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; -typedef unsigned short ushort; - -typedef char * caddr_t; -typedef long daddr_t; -typedef short dev_t; -typedef u_long ino_t; -typedef long off_t; -typedef u_short nlink_t; -typedef long swblk_t; -typedef long segsz_t; -typedef u_short uid_t; -typedef u_short gid_t; -typedef short pid_t; -typedef u_short mode_t; -typedef u_long fixpt_t; - - -typedef struct _uquad { u_long val[2]; } u_quad; -typedef struct _quad { long val[2]; } quad; -typedef long * qaddr_t; - - - - - - -# 1 "/usr/include/machine/ansi.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 69 "/usr/include/sys/types.h" 2 - - -# 1 "/usr/include/machine/types.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -typedef struct _physadr { - int r[1]; -} *physadr; - -typedef struct label_t { - int val[6]; -} label_t; - -typedef u_long vm_offset_t; -typedef u_long vm_size_t; - - -# 71 "/usr/include/sys/types.h" 2 - - - - -typedef unsigned long clock_t; - - - - -typedef unsigned int size_t; - - - - -typedef long time_t; - - - - - - - - - - - - - - - - -typedef long fd_mask; - - - - - - -typedef struct fd_set { - fd_mask fds_bits[(((256 )+(( (sizeof(fd_mask) * 8 ) )-1))/( (sizeof(fd_mask) * 8 ) )) ]; -} fd_set; - - - - - - -# 132 "/usr/include/sys/types.h" - - - - -# 20 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2 - -# 1 "/usr/include/sys/stat.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -struct stat -{ - dev_t st_dev; - ino_t st_ino; - mode_t st_mode; - nlink_t st_nlink; - uid_t st_uid; - gid_t st_gid; - dev_t st_rdev; - off_t st_size; - time_t st_atime; - long st_spare1; - time_t st_mtime; - long st_spare2; - time_t st_ctime; - long st_spare3; - long st_blksize; - long st_blocks; - u_long st_flags; - u_long st_gen; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/cdefs.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 76 "/usr/include/sys/cdefs.h" - - - -# 114 "/usr/include/sys/stat.h" 2 - - - -mode_t umask (mode_t) ; -int chmod (const char *, mode_t) ; -int fstat (int, struct stat *) ; -int mkdir (const char *, mode_t) ; -int mkfifo (const char *, mode_t) ; -int stat (const char *, struct stat *) ; - -int fchmod (int, mode_t) ; -int lstat (const char *, struct stat *) ; - - - -# 21 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -off_t lseek (); - - - - - -# 1 "/usr/include/time.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/machine/ansi.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 57 "/usr/include/machine/ansi.h" - -# 39 "/usr/include/time.h" 2 - - - - - - - - - - - - - - - - - - - - - -struct tm { - int tm_sec; - int tm_min; - int tm_hour; - int tm_mday; - int tm_mon; - int tm_year; - int tm_wday; - int tm_yday; - int tm_isdst; - long tm_gmtoff; - char *tm_zone; -}; - -# 1 "/usr/include/sys/cdefs.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 78 "/usr/include/sys/cdefs.h" - -# 74 "/usr/include/time.h" 2 - - - -char *asctime (const struct tm *) ; -clock_t clock (void) ; -char *ctime (const time_t *) ; -double difftime (time_t, time_t) ; -struct tm *gmtime (const time_t *) ; -struct tm *localtime (const time_t *) ; -time_t mktime (struct tm *) ; -size_t strftime (char *, size_t, const char *, const struct tm *) ; -time_t time (time_t *) ; - - -void tzset (void) ; - - - -char *timezone (int, int) ; -void tzsetwall (void) ; - - - - -# 72 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2 - - - -# 86 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" - -# 1 "/usr/include/sys/timeb.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -struct timeb { - time_t time; - unsigned short millitm; - short timezone; - short dstflag; -}; -# 87 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2 - - - - - - - - - - -# 1 "/usr/include/sys/param.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/types.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 135 "/usr/include/sys/types.h" - -# 46 "/usr/include/sys/param.h" 2 - - - - - - - - - - -# 1 "/usr/include/sys/syslimits.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 56 "/usr/include/sys/param.h" 2 - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/signal.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/machine/trap.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 42 "/usr/include/sys/signal.h" 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/cdefs.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 78 "/usr/include/sys/cdefs.h" - -# 90 "/usr/include/sys/signal.h" 2 - - - -typedef void (*sig_t) (int) ; - - -typedef void (*__sighandler_t) (int) ; -typedef unsigned int sigset_t; - - -int sigaddset (sigset_t *, int) ; -int sigdelset (sigset_t *, int) ; -int sigemptyset (sigset_t *) ; -int sigfillset (sigset_t *) ; -int sigismember (const sigset_t *, int) ; - - - - - - - - - - - -struct sigaction { - __sighandler_t sa_handler; - sigset_t sa_mask; - int sa_flags; -}; - - - - - - - - - - - - - - - - - - -struct sigvec { - void (*sv_handler)(); - int sv_mask; - int sv_flags; -}; - - - - - - - -struct sigaltstack { - char *ss_base; - int ss_len; - int ss_onstack; -}; - - - - -struct sigstack { - char *ss_sp; - int ss_onstack; -}; - - - - - - - - -struct sigcontext { - int sc_onstack; - int sc_mask; - int sc_sp; - int sc_fp; - int sc_ap; - int sc_pc; - int sc_ps; -}; - - - - - - - - - - - - - - -# 1 "/usr/include/sys/types.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 135 "/usr/include/sys/types.h" - -# 195 "/usr/include/sys/signal.h" 2 - - - - -__sighandler_t signal (int, __sighandler_t) ; -int raise (int) ; - -int kill (pid_t, int) ; -int sigaction (int, const struct sigaction *, struct sigaction *) ; -int sigpending (sigset_t *) ; -int sigprocmask (int, const sigset_t *, sigset_t *) ; -int sigsuspend (const sigset_t *) ; - - -int killpg (pid_t, int) ; -void psignal (unsigned, const char *) ; -int sigblock (int) ; -int siginterrupt (int, int) ; -int sigpause (int) ; -int sigreturn (struct sigcontext *) ; -int sigsetmask (int) ; -int sigstack (const struct sigstack *, struct sigstack *) ; -int sigvec (int, struct sigvec *, struct sigvec *) ; - - - - - -# 79 "/usr/include/sys/param.h" 2 - - - -# 1 "/usr/include/machine/param.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 82 "/usr/include/sys/param.h" 2 - -# 1 "/usr/include/machine/endian.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/cdefs.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 78 "/usr/include/sys/cdefs.h" - -# 55 "/usr/include/machine/endian.h" 2 - - - - - - - - - -# 77 "/usr/include/machine/endian.h" - - - - - - - - - - - - - - - - - - -# 106 "/usr/include/machine/endian.h" - - - - - - - - - - - - -# 83 "/usr/include/sys/param.h" 2 - -# 1 "/usr/include/machine/limits.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 84 "/usr/include/sys/param.h" 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 97 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2 - - - - - - - - - - - - - - - - - - - -struct utimbuf -{ - long actime; - long modtime; -}; - -int utime (); - - -# 145 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" - -# 1 "/usr/include/strings.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/string.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/machine/ansi.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 57 "/usr/include/machine/ansi.h" - -# 38 "/usr/include/string.h" 2 - - - - - - - - - - - -# 1 "/usr/include/sys/cdefs.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 78 "/usr/include/sys/cdefs.h" - -# 49 "/usr/include/string.h" 2 - - - -void *memchr (const void *, int, size_t) ; -int memcmp (const void *, const void *, size_t) ; -void *memcpy (void *, const void *, size_t) ; -void *memmove (void *, const void *, size_t) ; -void *memset (void *, int, size_t) ; -char *strcat (char *, const char *) ; -char *strchr (const char *, int) ; -int strcmp (const char *, const char *) ; -int strcoll (const char *, const char *) ; -char *strcpy (char *, const char *) ; -size_t strcspn (const char *, const char *) ; -char *strerror (int) ; -size_t strlen (const char *) ; -char *strncat (char *, const char *, size_t) ; -int strncmp (const char *, const char *, size_t) ; -char *strncpy (char *, const char *, size_t) ; -char *strpbrk (const char *, const char *) ; -char *strrchr (const char *, int) ; -size_t strspn (const char *, const char *) ; -char *strstr (const char *, const char *) ; -char *strtok (char *, const char *) ; -size_t strxfrm (char *, const char *, size_t) ; - - - -int bcmp (const void *, const void *, size_t) ; -void bcopy (const void *, void *, size_t) ; -void bzero (void *, size_t) ; -int ffs (int) ; -char *index (const char *, int) ; -void *memccpy (void *, const void *, int, size_t) ; -char *rindex (const char *, int) ; -int strcasecmp (const char *, const char *) ; -char *strdup (const char *) ; -void strmode (int, char *) ; -int strncasecmp (const char *, const char *, size_t) ; -char *strsep (char **, const char *) ; -void swab (const void *, void *, size_t) ; - - - - -# 36 "/usr/include/strings.h" 2 - -# 146 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2 - - - -# 1 "/usr/include/errno.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -extern int errno; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 149 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2 - - - - -char *getenv (); -char *malloc (); -char *realloc (); -char *calloc (); -extern int errno; - - - - - - -# 173 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" - - - - - - -# 1 "/usr/include/sys/file.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/fcntl.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/types.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 135 "/usr/include/sys/types.h" - -# 46 "/usr/include/sys/fcntl.h" 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 99 "/usr/include/sys/fcntl.h" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -struct flock { - short l_type; - short l_whence; - off_t l_start; - off_t l_len; - pid_t l_pid; -}; - - - - - - - - - - - - -# 1 "/usr/include/sys/cdefs.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 78 "/usr/include/sys/cdefs.h" - -# 169 "/usr/include/sys/fcntl.h" 2 - - - -int open (const char *, int, ...) ; -int creat (const char *, mode_t) ; -int fcntl (int, int, ...) ; - -int flock (int, int) ; - - - - - -# 36 "/usr/include/sys/file.h" 2 - -# 1 "/usr/include/sys/unistd.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 37 "/usr/include/sys/file.h" 2 - - -# 73 "/usr/include/sys/file.h" - -# 179 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2 - -char *getwd (); - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/dir.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/dirent.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -struct dirent { - u_long d_fileno; - u_short d_reclen; - u_short d_namlen; - - - - - char d_name[255 + 1]; - -}; - - - - - - - - - - - -typedef struct _dirdesc { - int dd_fd; - long dd_loc; - long dd_size; - char *dd_buf; - int dd_len; - long dd_seek; -} DIR; - - - - - - - - - - - -# 1 "/usr/include/sys/cdefs.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 78 "/usr/include/sys/cdefs.h" - -# 88 "/usr/include/dirent.h" 2 - - - -DIR *opendir (const char *) ; -struct dirent *readdir (DIR *) ; -void rewinddir (DIR *) ; -int closedir (DIR *) ; - -long telldir (const DIR *) ; -void seekdir (DIR *, long) ; -int scandir (const char *, struct dirent ***, - int (*)(struct dirent *), int (*)(const void *, const void *)) ; -int alphasort (const void *, const void *) ; -int getdirentries (int, char *, int, long *) ; - - - - - - -# 44 "/usr/include/sys/dir.h" 2 - - - - - - - - - - - - - - - - - - -# 208 "/usr/src/gnu/cvs/mkmodules/../lib/system.h" 2 - - - - - - - - - - - - - - - - -# 3 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/include/stdio.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/cdefs.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 78 "/usr/include/sys/cdefs.h" - -# 42 "/usr/include/stdio.h" 2 - - -# 1 "/usr/include/machine/ansi.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 57 "/usr/include/machine/ansi.h" - -# 44 "/usr/include/stdio.h" 2 - - - - - - - - - - -typedef long fpos_t; - - - - - - - - - - -struct __sbuf { - unsigned char *_base; - int _size; -}; - - - - - - - - - - - - - - - - - - - - - - - - - -typedef struct __sFILE { - unsigned char *_p; - int _r; - int _w; - short _flags; - short _file; - struct __sbuf _bf; - int _lbfsize; - - - void *_cookie; - int (*_close) (void *) ; - int (*_read) (void *, char *, int) ; - fpos_t (*_seek) (void *, fpos_t, int) ; - int (*_write) (void *, const char *, int) ; - - - struct __sbuf _ub; - unsigned char *_up; - int _ur; - - - unsigned char _ubuf[3]; - unsigned char _nbuf[1]; - - - struct __sbuf _lb; - - - int _blksize; - int _offset; -} FILE; - - -extern FILE __sF[]; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void clearerr (FILE *) ; -int fclose (FILE *) ; -int feof (FILE *) ; -int ferror (FILE *) ; -int fflush (FILE *) ; -int fgetc (FILE *) ; -int fgetpos (FILE *, fpos_t *) ; -char *fgets (char *, size_t, FILE *) ; -FILE *fopen (const char *, const char *) ; -int fprintf (FILE *, const char *, ...) ; -int fputc (int, FILE *) ; -int fputs (const char *, FILE *) ; -int fread (void *, size_t, size_t, FILE *) ; -FILE *freopen (const char *, const char *, FILE *) ; -int fscanf (FILE *, const char *, ...) ; -int fseek (FILE *, long, int) ; -int fsetpos (FILE *, const fpos_t *) ; -long ftell (const FILE *) ; -int fwrite (const void *, size_t, size_t, FILE *) ; -int getc (FILE *) ; -int getchar (void) ; -char *gets (char *) ; - -extern int sys_nerr; -extern char *sys_errlist[]; - -void perror (const char *) ; -int printf (const char *, ...) ; -int putc (int, FILE *) ; -int putchar (int) ; -int puts (const char *) ; -int remove (const char *) ; -int rename (const char *, const char *) ; -void rewind (FILE *) ; -int scanf (const char *, ...) ; -void setbuf (FILE *, char *) ; -int setvbuf (FILE *, char *, int, size_t) ; -int sprintf (char *, const char *, ...) ; -int sscanf (char *, const char *, ...) ; -FILE *tmpfile (void) ; -char *tmpnam (char *) ; -int ungetc (int, FILE *) ; -int vfprintf (FILE *, const char *, char * ) ; -int vprintf (const char *, char * ) ; -int vsprintf (char *, const char *, char * ) ; - - - - - - - - - - -char *ctermid (char *) ; -FILE *fdopen (int, const char *) ; -int fileno (FILE *) ; - - - - - - - - -char *fgetline (FILE *, size_t *) ; -int fpurge (FILE *) ; -int getw (FILE *) ; -int pclose (FILE *) ; -FILE *popen (const char *, const char *) ; -int putw (int, FILE *) ; -void setbuffer (FILE *, char *, int) ; -int setlinebuf (FILE *) ; -char *tempnam (const char *, const char *) ; -int snprintf (char *, size_t, const char *, ...) ; -int vsnprintf (char *, size_t, const char *, char * ) ; -int vscanf (const char *, char * ) ; -int vsscanf (const char *, const char *, char * ) ; - - - - - - - - - - - - - -FILE *funopen (const void *, - int (*)(void *, char *, int), - int (*)(void *, const char *, int), - fpos_t (*)(void *, fpos_t, int), - int (*)(void *)) ; - - - - - - - - - -int __srget (FILE *) ; -int __svfscanf (FILE *, const char *, char * ) ; -int __swbuf (int, FILE *) ; - - - - - - - - -static inline int __sputc(int _c, FILE *_p) { - if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) - return (*_p->_p++ = _c); - else - return (__swbuf(_c, _p)); -} -# 331 "/usr/include/stdio.h" - - - - - - - - - - - - - - - - - - - - - - - -# 4 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/include/ctype.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -extern char _ctype_[]; - - - - - - - - - - - - - - - - - - -# 5 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/include/pwd.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/sys/types.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 135 "/usr/include/sys/types.h" - -# 39 "/usr/include/pwd.h" 2 - - - - - - - - - - - - - - - - - - - - -struct passwd { - char *pw_name; - char *pw_passwd; - int pw_uid; - int pw_gid; - time_t pw_change; - char *pw_class; - char *pw_gecos; - char *pw_dir; - char *pw_shell; - time_t pw_expire; -}; - -# 1 "/usr/include/sys/cdefs.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 78 "/usr/include/sys/cdefs.h" - -# 72 "/usr/include/pwd.h" 2 - - - -struct passwd *getpwuid (uid_t) ; -struct passwd *getpwnam (const char *) ; - -struct passwd *getpwent (void) ; -int setpassent (int) ; -int setpwent (void) ; -void endpwent (void) ; - - - - -# 6 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/include/signal.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 222 "/usr/include/signal.h" - -# 7 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/src/gnu/cvs/mkmodules/../cvs/hash.h" 1 - - - - - - - - - - - - - - - - - - -enum ntype -{ - UNKNOWN, HEADER, ENTRIES, FILES, LIST, RCSNODE, - RCSVERS, DIRS, UPDATE, LOCK, NDBMNODE -}; -typedef enum ntype Ntype; - -struct node -{ - Ntype type; - struct node *next; - struct node *prev; - struct node *hashnext; - struct node *hashprev; - char *key; - char *data; - void (*delproc) (); -}; -typedef struct node Node; - -struct list -{ - Node *list; - Node *hasharray[151 ]; - struct list *next; -}; -typedef struct list List; - -struct entnode -{ - char *version; - char *timestamp; - char *options; - char *tag; - char *date; -}; -typedef struct entnode Entnode; - - -List *getlist (void); -Node *findnode (List * list, char *key); -Node *getnode (void); -int addnode (List * list, Node * p); -int walklist (List * list, int (*proc) ()); -void dellist (List ** listp); -void delnode (Node * p); -void freenode (Node * p); -void sortlist (List * list, int (*comp) ()); -# 77 "/usr/src/gnu/cvs/mkmodules/../cvs/hash.h" - -# 8 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/src/gnu/cvs/mkmodules/../cvs/rcs.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -struct rcsnode -{ - int refcount; - int flags; - char *path; - char *head; - char *branch; - List *symbols; - List *versions; - List *dates; -}; -typedef struct rcsnode RCSNode; - -struct rcsversnode -{ - char *version; - char *date; - char *next; - List *branches; -}; -typedef struct rcsversnode RCSVers; - - - - - - - - - - - - - - -List *RCS_parsefiles (List * files, char *xrepos); -RCSNode *RCS_parse (char *file, char *repos); -RCSNode *RCS_parsercsfile (char *rcsfile); -char *RCS_check_kflag (char *arg); -char *RCS_getdate (RCSNode * rcs, char *date, int force_tag_match); -char *RCS_gettag (RCSNode * rcs, char *tag, int force_tag_match); -char *RCS_getversion (RCSNode * rcs, char *tag, char *date, - int force_tag_match); -char *RCS_magicrev (RCSNode *rcs, char *rev); -int RCS_isbranch (char *file, char *rev, List *srcfiles); -char *RCS_whatbranch (char *file, char *tag, List *srcfiles); -char *RCS_head (RCSNode * rcs); -int RCS_datecmp (char *date1, char *date2); -time_t RCS_getrevtime (RCSNode * rcs, char *rev, char *date, int fudge); -void RCS_check_tag (char *tag); -void freercsnode (RCSNode ** rnodep); -# 102 "/usr/src/gnu/cvs/mkmodules/../cvs/rcs.h" - -# 9 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/src/gnu/cvs/mkmodules/../lib/regex.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -typedef unsigned reg_syntax_t; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -extern reg_syntax_t obscure_syntax; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -typedef enum -{ - REG_NOERROR = 0, - REG_NOMATCH, - - - - REG_BADPAT, - REG_ECOLLATE, - REG_ECTYPE, - REG_EESCAPE, - REG_ESUBREG, - REG_EBRACK, - REG_EPAREN, - REG_EBRACE, - REG_BADBR, - REG_ERANGE, - REG_ESPACE, - REG_BADRPT, - - - REG_EEND, - REG_ESIZE, - REG_ERPAREN -} reg_errcode_t; - - - - - - - - - - -struct re_pattern_buffer -{ - - - - - unsigned char *buffer; - - - unsigned long allocated; - - - unsigned long used; - - - reg_syntax_t syntax; - - - - - char *fastmap; - - - - - - char *translate; - - - size_t re_nsub; - - - - - - - unsigned can_be_null : 2; - - - - unsigned fastmap_accurate : 1; - - - - unsigned no_sub : 1; - - - - unsigned not_bol : 1; - - - unsigned not_eol : 1; - - - unsigned newline_anchor : 1; - - - - - unsigned caller_allocated_regs : 1; - -}; - -typedef struct re_pattern_buffer regex_t; - - - - - - - - - - - -typedef int regoff_t; - - - - -struct re_registers -{ - unsigned num_regs; - regoff_t *start; - regoff_t *end; -}; - - - - - - - - - - - - -typedef struct -{ - regoff_t rm_so; - regoff_t rm_eo; -} regmatch_t; - - - - - - - - - - -extern reg_syntax_t re_set_syntax (reg_syntax_t syntax); - - - - -extern const char *re_compile_pattern (const char *pattern, int length, - struct re_pattern_buffer *buffer); - - - - - -extern int re_compile_fastmap (struct re_pattern_buffer *buffer); - - - - - - - -extern int re_search (struct re_pattern_buffer *buffer, - const char *string, int length, - int start, int range, - struct re_registers *regs); - - - - -extern int re_search_2 (struct re_pattern_buffer *buffer, - const char *string1, int length1, - const char *string2, int length2, - int start, int range, - struct re_registers *regs, - int stop); - - - - -extern int re_match (const struct re_pattern_buffer *buffer, - const char *string, int length, - int start, struct re_registers *regs); - - - -extern int re_match_2 (const struct re_pattern_buffer *buffer, - const char *string1, int length1, - const char *string2, int length2, - int start, - struct re_registers *regs, - int stop); - - - - - - - - - - - -extern int regcomp (regex_t *preg, const char *pattern, int cflags); -extern int regexec (const regex_t *preg, const char *string, size_t nmatch, - regmatch_t pmatch[], int eflags); -extern size_t regerror (int errcode, const regex_t *preg, char *errbuf, - size_t errbuf_size); -extern void regfree (regex_t *preg); - -# 468 "/usr/src/gnu/cvs/mkmodules/../lib/regex.h" - - - - - - - - - - - - -# 10 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/src/gnu/cvs/mkmodules/../lib/fnmatch.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -extern int fnmatch (const char *pattern, const char *string, int flags); - - - - - -# 11 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/src/gnu/cvs/mkmodules/../lib/getopt.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - -extern char *optarg; - - - - - - - - - - - - - -extern int optind; - - - - -extern int opterr; - - - - - - - - - - - - - - - - - - - - - -struct option -{ - char *name; - int has_arg; - int *flag; - int val; -}; - - -extern const struct option *_getopt_long_options; - - - - - - - -extern int _getopt_long_only; - - - - - -extern int option_index; - - -int gnu_getopt (int argc, char **argv, const char *shortopts); -int gnu_getopt_long (int argc, char **argv, const char *shortopts, - const struct option *longopts, int *longind); -int gnu_getopt_long_only (int argc, char **argv, const char *shortopts, - const struct option *longopts, int *longind); - - - - - -# 12 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/src/gnu/cvs/mkmodules/../lib/wait.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 13 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - -# 1 "/usr/src/gnu/cvs/mkmodules/../cvs/config.h" 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -extern void exit (); - - - -extern char *getwd (); - - - - - - - - - - - - - - - -# 14 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - - -# 1 "/usr/src/gnu/cvs/mkmodules/../cvs/myndbm.h" 1 - - - - - - -typedef struct -{ - List *dbm_list; - Node *dbm_next; -} DBM; - -typedef struct -{ - char *dptr; - int dsize; -} datum; - - - - - - - - - - - - - -DBM *mydbm_open (char *file, int flags, int mode); -void mydbm_close (DBM * db); -datum mydbm_fetch (DBM * db, datum key); -datum mydbm_firstkey (DBM * db); -datum mydbm_nextkey (DBM * db); - - - - - - - - - -# 16 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -enum mtype -{ - CHECKOUT, TAG, PATCH -}; - - - - - - -enum classify_type -{ - T_UNKNOWN = 1, - T_CONFLICT, - T_NEEDS_MERGE, - T_MODIFIED, - T_CHECKOUT, - T_ADDED, - T_REMOVED, - T_REMOVE_ENTRY, - T_UPTODATE, - T_TITLE -}; -typedef enum classify_type Ctype; - - - - - - - - -struct vers_ts -{ - char *vn_user; - - - - - - char *vn_rcs; - - char *ts_user; - char *ts_rcs; - char *options; - - char *tag; - char *date; - Entnode *entdata; - RCSNode *srcfile; -}; -typedef struct vers_ts Vers_TS; - - - - - -struct stickydirtag -{ - int aflag; - char *tag; - char *date; - char *options; -}; - - - - - - - - - - - - - - - - -enum direnter_type -{ - R_PROCESS = 1, - R_SKIP_FILES, - R_SKIP_DIRS, - R_SKIP_ALL -}; -typedef enum direnter_type Dtype; - -extern char *program_name, *command_name; -extern char *Rcsbin, *Editor, *CVSroot; -extern char *CurDir; -extern int really_quiet, quiet; -extern int use_editor; -extern int cvswrite; - -extern int trace; -extern int noexec; -extern int logoff; - - - -int Reader_Lock (char *xrepository); -DBM *open_module (void); -FILE *Fopen (char *name, char *mode); -FILE *open_file (char *name, char *mode); -List *Find_Dirs (char *repository, int which); -List *ParseEntries (int aflag); -char *Make_Date (char *rawdate); -char *Name_Repository (char *dir, char *update_dir); -char *Short_Repository (char *repository); -char *getcaller (void); -char *time_stamp (char *file); -char *xmalloc (int bytes); -char *xrealloc (char *ptr, int bytes); -char *xstrdup (char *str); -int No_Difference (char *file, Vers_TS * vers, List * entries); -int Parse_Info (char *infofile, char *repository, int (*callproc) (), int all); -int Reader_Lock (char *xrepository); -int SIG_register (int sig, void (*fn) ()); -int Writer_Lock (List * list); -int gethostname (char *name, int namelen); -int ign_name (char *name); -int isdir (char *file); -int isfile (char *file); -int islink (char *file); -int isreadable (char *file); -int iswritable (char *file); -int link_file (char *from, char *to); -int numdots (char *s); -int run_exec (char *stin, char *stout, char *sterr, int flags); -int unlink_file (char *f); -int update (int argc, char *argv[]); -int xcmp (char *file1, char *file2); -int yesno (void); -time_t get_date (char *date, struct timeb *now); -void Create_Admin (char *dir, char *repository, char *tag, char *date); -void Lock_Cleanup (void); -void ParseTag (char **tagp, char **datep); -void Scratch_Entry (List * list, char *fname); -void WriteTag (char *dir, char *tag, char *date); -void cat_module (int status); -void check_entries (char *dir); -void close_module (DBM * db); -void copy_file (char *from, char *to); -void error (int status, int errnum, char *message,...); -void fperror (FILE * fp, int status, int errnum, char *message,...); -void free_names (int *pargc, char *argv[]); -void freevers_ts (Vers_TS ** versp); -void ign_add (char *ign, int hold); -void ign_add_file (char *file, int hold); -void ign_setup (void); -void line2argv (int *pargc, char *argv[], char *line); -void make_directories (char *name); -void make_directory (char *name); -void rename_file (char *from, char *to); -void run_arg (char *s); -void run_args (char *fmt,...); -void run_print (FILE * fp); -void run_setup (char *fmt,...); -void strip_path (char *path); -void update_delproc (Node * p); -void usage (char **cpp); -void xchmod (char *fname, int writable); -int Checkin (int type, char *file, char *repository, char *rcs, char *rev, - char *tag, char *message, List * entries); -Ctype Classify_File (char *file, char *tag, char *date, char *options, - int force_tag_match, int aflag, char *repository, - List *entries, List *srcfiles, Vers_TS **versp); -List *Find_Names (char *repository, int which, int aflag, - List ** optentries); -void Register (List * list, char *fname, char *vn, char *ts, - char *options, char *tag, char *date); -void Update_Logfile (char *repository, char *xmessage, char *xrevision, - FILE * xlogfp, List * xchanges); -Vers_TS *Version_TS (char *repository, char *options, char *tag, - char *date, char *user, int force_tag_match, - int set_time, List * entries, List * xfiles); -void do_editor (char *dir, char *message, char *repository, - List * changes); -int do_module (DBM * db, char *mname, enum mtype m_type, char *msg, - int (*callback_proc) (), char *where, int shorten, - int local_specified, int run_module_prog, char *extra_arg); -int do_recursion (int (*xfileproc) (), int (*xfilesdoneproc) (), - Dtype (*xdirentproc) (), int (*xdirleaveproc) (), - Dtype xflags, int xwhich, int xaflag, int xreadlock, - int xdosrcs); -int do_update (int argc, char *argv[], char *xoptions, char *xtag, - char *xdate, int xforce, int local, int xbuild, - int xaflag, int xprune, int xpipeout, int which, - char *xjoin_rev1, char *xjoin_rev2, char *preload_update_dir); -void history_write (int type, char *update_dir, char *revs, char *name, - char *repository); -int start_recursion (int (*fileproc) (), int (*filesdoneproc) (), - Dtype (*direntproc) (), int (*dirleaveproc) (), - int argc, char *argv[], int local, int which, - int aflag, int readlock, char *update_preload, - int dosrcs); -void SIG_beginCrSect (); -void SIG_endCrSect (); -# 438 "/usr/src/gnu/cvs/mkmodules/../cvs/cvs.h" - -# 15 "/usr/src/gnu/cvs/mkmodules/mkmodules.c" 2 - - - - - - -PATH_MAX +2 - - -static char rcsid[] = "@(#)mkmodules.c 1.39 92/03/31"; - - - - - - -char *program_name, *command_name; - -char *Rcsbin = "" ; -int noexec = 0; -int trace = 0; - - -static int checkout_file (char *file, char *temp); -static void make_tempfile (char *temp); -static void mkmodules_usage (void); -static void rename_rcsfile (char *temp, char *real); - - - - - - -# 60 "/usr/src/gnu/cvs/mkmodules/mkmodules.c" - - -int -main (argc, argv) - int argc; - char *argv[]; -{ - extern char *getenv (); - char temp[PATH_MAX +2 ]; - char *cp; - - DBM *db; - - - - - - if ((program_name = rindex (argv[0], '/')) == 0 ) - program_name = argv[0]; - else - program_name++; - - if (argc != 2) - mkmodules_usage (); - - if ((cp = getenv ("RCSBIN" )) != 0 ) - Rcsbin = cp; - - - - - - if (Rcsbin[0] != '\0') - { - int len = strlen (Rcsbin); - char *rcsbin; - - if (Rcsbin[len - 1] != '/') - { - rcsbin = Rcsbin; - Rcsbin = xmalloc (len + 2); - (void) strcpy (Rcsbin, rcsbin); - (void) strcat (Rcsbin, "/"); - } - } - - if (chdir (argv[1]) < 0) - error (1, errno, "cannot chdir to %s", argv[1]); - - - - - make_tempfile (temp); - switch (checkout_file ("modules" , temp)) - { - - case 0: - - - if ((db = mydbm_open (temp, 0x0000 , 0666)) != 0 ) - mydbm_close (db); - - - - - rename_rcsfile (temp, "modules" ); - break; - - case -1: - (void) unlink_file (temp); - exit (1); - - - default: - error (0, 0, - "'cvs checkout' is less functional without a %s file", - "modules" ); - break; - } - - (void) unlink_file (temp); - - - - - - make_tempfile (temp); - if (checkout_file ("loginfo" , temp) == 0) - rename_rcsfile (temp, "loginfo" ); - else - error (0, 0, - "no logging of 'cvs commit' messages is done without a %s file", - "loginfo" ); - (void) unlink_file (temp); - - - - - - make_tempfile (temp); - if (checkout_file ("rcsinfo" , temp) == 0) - rename_rcsfile (temp, "rcsinfo" ); - else - error (0, 0, - "a %s file can be used to configure 'cvs commit' templates", - "rcsinfo" ); - (void) unlink_file (temp); - - - - - - make_tempfile (temp); - if (checkout_file ("editinfo" , temp) == 0) - rename_rcsfile (temp, "editinfo" ); - else - error (0, 0, - "a %s file can be used to validate log messages", - "editinfo" ); - (void) unlink_file (temp); - - - - - - make_tempfile (temp); - if (checkout_file ("commitinfo" , temp) == 0) - rename_rcsfile (temp, "commitinfo" ); - else - error (0, 0, - "a %s file can be used to configure 'cvs commit' checking", - "commitinfo" ); - (void) unlink_file (temp); - return (0); -} - - - - -static void -make_tempfile (temp) - char *temp; -{ - static int seed = 0; - int fd; - - if (seed == 0) - seed = getpid (); - while (1) - { - (void) sprintf (temp, "%s%d", ".#" , seed++); - if ((fd = open (temp, 0x0200 | 0x0800 | 0x0002 , 0666)) != -1) - break; - if (errno != 17 ) - error (1, errno, "cannot create temporary file %s", temp); - } - if (close(fd) < 0) - error(1, errno, "cannot close temporary file %s", temp); -} - -static int -checkout_file (file, temp) - char *file; - char *temp; -{ - char rcs[PATH_MAX +2 ]; - int retcode = 0; - - (void) sprintf (rcs, "%s%s", file, ",v" ); - if (!isfile (rcs)) - return (1); - run_setup ("%s%s -q -p", Rcsbin, "co" ); - run_arg (rcs); - if ((retcode = run_exec ( (char *)0 , temp, (char *)0 , 0x0000 )) != 0) - { - error (0, retcode == -1 ? errno : 0, "failed to check out %s file", file); - } - return (retcode); -} - -# 369 "/usr/src/gnu/cvs/mkmodules/mkmodules.c" - - -static void -rename_rcsfile (temp, real) - char *temp; - char *real; -{ - char bak[50]; - - if (chmod (temp, 0444) < 0) - error (0, errno, "warning: cannot chmod %s", temp); - (void) sprintf (bak, "%s%s", ".#" , real); - (void) unlink_file (bak); - (void) rename (real, bak); - (void) rename (temp, real); -} - - - - -void -Lock_Cleanup () -{ -} - -static void -mkmodules_usage () -{ - (void) fprintf ((&__sF[2]) , "Usage: %s modules-directory\n", program_name); - exit (1); -} |