summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1995-10-28 21:07:39 +0000
committerpeter <peter@FreeBSD.org>1995-10-28 21:07:39 +0000
commit9d7e3d8dc0cccad8e42e4822ffa52ee28b6f7d2f (patch)
tree7114793938194c2cf26e17493ee035b1ed47dd97 /gnu
parentfe6be261cf7be02da565da8ba831c56736037f14 (diff)
parentf88f3a686799dfede79eb3c8d8cfec9b1e7ae343 (diff)
downloadFreeBSD-src-9d7e3d8dc0cccad8e42e4822ffa52ee28b6f7d2f.zip
FreeBSD-src-9d7e3d8dc0cccad8e42e4822ffa52ee28b6f7d2f.tar.gz
This commit was generated by cvs2svn to compensate for changes in r11891,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/rcs/CREDITS24
-rw-r--r--gnu/usr.bin/rcs/NEWS548
-rw-r--r--gnu/usr.bin/rcs/REFS90
-rw-r--r--gnu/usr.bin/rcs/ci/ci.1211
-rw-r--r--gnu/usr.bin/rcs/doc/rcs.ms78
-rw-r--r--gnu/usr.bin/rcs/ident/ident.1126
-rw-r--r--gnu/usr.bin/rcs/lib/maketime.h39
-rw-r--r--gnu/usr.bin/rcs/lib/merger.c77
-rw-r--r--gnu/usr.bin/rcs/lib/partime.h71
-rw-r--r--gnu/usr.bin/rcs/lib/rcsmap.c9
-rw-r--r--gnu/usr.bin/rcs/lib/rcstime.c191
-rw-r--r--gnu/usr.bin/rcs/lib/version.c2
-rw-r--r--gnu/usr.bin/rcs/merge/merge.1125
-rw-r--r--gnu/usr.bin/rcs/merge/merge.c56
-rw-r--r--gnu/usr.bin/rcs/rcs/rcs.1105
-rw-r--r--gnu/usr.bin/rcs/rcs/rcsfile.5254
-rw-r--r--gnu/usr.bin/rcs/rcs/rcsintro.118
-rw-r--r--gnu/usr.bin/rcs/rcsclean/rcsclean.148
-rw-r--r--gnu/usr.bin/rcs/rcsclean/rcsclean.c114
-rw-r--r--gnu/usr.bin/rcs/rcsdiff/rcsdiff.120
-rw-r--r--gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.sh37
-rw-r--r--gnu/usr.bin/rcs/rcsmerge/rcsmerge.157
-rwxr-xr-xgnu/usr.bin/rcs/rcstest195
23 files changed, 2094 insertions, 401 deletions
diff --git a/gnu/usr.bin/rcs/CREDITS b/gnu/usr.bin/rcs/CREDITS
new file mode 100644
index 0000000..6eca1b9
--- /dev/null
+++ b/gnu/usr.bin/rcs/CREDITS
@@ -0,0 +1,24 @@
+RCS was designed and built by Walter F. Tichy of Purdue University.
+RCS version 3 was released in 1983.
+
+Adam Hammer, Thomas Narten, and Daniel Trinkle of Purdue supported RCS through
+version 4.3, released in 1990. Guy Harris of Sun contributed many porting
+fixes. Paul Eggert of System Development Corporation contributed bug fixes
+and tuneups. Jay Lepreau contributed 4.3BSD support.
+
+Paul Eggert of Twin Sun wrote the changes for RCS versions 5.5 and 5.6 (1991).
+Rich Braun of Kronos and Andy Glew of Intel contributed ideas for new options.
+Bill Hahn of Stratus contributed ideas for setuid support.
+Ideas for piece tables came from Joe Berkovitz of Stratus and Walter F. Tichy.
+Matt Cross of Stratus contributed test case ideas.
+Adam Hammer of Purdue QAed.
+
+Paul Eggert wrote most of the changes for this version of RCS,
+currently in beta test. K. Richard Pixley of Cygnus Support
+contributed several bug fixes. Robert Lupton of Princeton
+and Daniel Trinkle contributed ideas for $Name expansion.
+Brendan Kehoe of Cygnus Support suggested rlog's -N option.
+Paul D. Smith of Data General suggested improvements in option
+and error processing. Adam Hammer of Purdue QAed.
+
+$Id: CREDITS,v 1.1 1993/11/03 17:50:39 eggert Exp $
diff --git a/gnu/usr.bin/rcs/NEWS b/gnu/usr.bin/rcs/NEWS
new file mode 100644
index 0000000..62b7c2b
--- /dev/null
+++ b/gnu/usr.bin/rcs/NEWS
@@ -0,0 +1,548 @@
+Recent changes to RCS (and possible future changes)
+
+ $Id: NEWS,v 1.5 1995/06/16 06:19:24 eggert Exp $
+
+ Copyright 1991, 1992, 1993, 1994, 1995 Paul Eggert
+ Distributed under license by the Free Software Foundation, Inc.
+
+ This file is part of RCS.
+
+ RCS 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.
+
+ RCS 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 RCS; see the file COPYING.
+ If not, write to the Free Software Foundation,
+ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Report problems and direct all questions to:
+
+ rcs-bugs@cs.purdue.edu
+
+
+Here is a brief summary of user-visible changes since 5.6.
+
+ New options:
+ `-kb' supports binary files.
+ `-T' preserves the modification time of RCS files.
+ `-V' prints the version number.
+ `-zLT' causes RCS to use local time in working files and logs.
+ `rcsclean -n' outputs what rcsclean would do, without actually doing it.
+ `rlog -N' omits symbolic names.
+ There is a new keyword `Name'.
+ Inserted log lines now have the same prefix as the preceding `$Log' line.
+
+Most changes for RCS version 5.7 are to fix bugs and improve portability.
+RCS now conforms to GNU configuration standards and to Posix 1003.1b-1993.
+
+
+Features new to RCS version 5.7, and possibly incompatible
+in minor ways with previous practice, include:
+
+ Inserted log lines now have the same prefix as the preceding `$Log' line.
+ E.g. if a $Log line starts with `// $Log', log lines are prefixed with `// '.
+ RCS still records the (now obsolescent) comment leader inside RCS files,
+ but it ignores the comment leader unless it is emulating older RCS versions.
+ If you plan to access a file with both old and new versions of RCS,
+ make sure its comment leader matches its `$Log' line prefix.
+ For backwards compatibility with older versions of RCS,
+ if the log prefix is `/*' or `(*' surrounded by optional white space,
+ inserted log lines contain ` *' instead of `/*' or `(*';
+ however, this usage is obsolescent and should not be relied on.
+
+ $Log string `Revision' times now use the same format as other times.
+
+ Log lines are now inserted even if -kk is specified; this simplifies merging.
+
+ ci's -rR option (with a nonempty R) now just specifies a revision number R.
+ In some beta versions, it also reestablished the default behavior of
+ releasing a lock and removing the working file.
+ Now, only the bare -r option does this.
+
+ With an empty extension, any appearance of a directory named `RCS'
+ in a pathname identifies the pathname as being that of an RCS file.
+ For example, `a/RCS/b/c' is now an RCS file with an empty extension.
+ Formerly, `RCS' had to be the last directory in the pathname.
+
+ rlog's -d option by default now uses exclusive time ranges.
+ E.g. `rlog -d"<T"' now excludes revisions whose times equal T exactly.
+ Use `rlog -d"<=T"' to get the old behavior.
+
+ merge now takes up to three -L options, one for each input file.
+ Formerly, it took at most two -L options, for the 1st and 3rd input files.
+
+ `rcs' now requires at least one option; this is for future expansion.
+
+Other features new to RCS version 5.7 include:
+
+ merge and rcsmerge now pass -A, -E, and -e options to the subsidiary diff3.
+
+ rcs -kb acts like rcs -ko, except it uses binary I/O on working files.
+ This makes no difference under Posix or Unix, but it does matter elsewhere.
+ With -kb in effect, rcsmerge refuses to merge;
+ this avoids common problems with CVS merging.
+
+ The following is for future use by GNU Emacs 19's version control package:
+
+ rcs's new -M option causes it to not send mail when you break somebody
+ else's lock. This is not meant for casual use; see rcs(1).
+
+ ci's new -i option causes an error if the RCS file already exists.
+ Similarly, -j causes an error if the RCS file does not already exist.
+
+ The new keyword `Name' is supported; its value is the name, if any,
+ used to check out the revision. E.g. `co -rN foo' causes foo's
+ $Name...$ keyword strings to end in `: N $'.
+
+ The new -zZONE option causes RCS to output dates and times using ISO 8601
+ format with ZONE as the time zone, and to use ZONE as the default time
+ zone for input. Its most common use is the -zLT option, which causes RCS
+ to use local time externally. You can also specify foreign time zones;
+ e.g. -z+05:30 causes RCS to use India time (5 hours 30 minutes east of UTC).
+ This option does not affect RCS files themselves, which always use UTC;
+ it affects only output (e.g. rlog output, keyword expansion, diff -c times)
+ and interpretation of options (e.g. the -d option of ci, co, and rlog).
+ Bare -z restores the default behavior of UTC with no time zone indication,
+ and the traditional RCS date separator `/' instead of the ISO 8601 `-'.
+ RCSINIT may contain a -z option. ci -k parses UTC offsets.
+
+ The new -T option of ci, co, rcs, and rcsclean preserves the modification
+ time of the RCS file unless a revision is added or removed.
+ ci -T sets the RCS file's modification time to the new revision's time
+ if the former precedes the latter and there is a new revision;
+ otherwise, it preserves the RCS file's modification time.
+ Use this option with care, as it can confuse `make'; see ci(1).
+
+ The new -N option of rlog omits symbolic names from the output.
+
+ A revision number that starts with `.' is considered to be relative to
+ the default branch (normally the trunk). A branch number followed by `.'
+ stands for the last revision on that branch.
+
+ If someone else already holds the lock, rcs -l now asks whether you want
+ to break it, instead of immediately reporting an error.
+
+ ci now always unlocks a revision like 3.5 if you check in a revision
+ like 3.5.2.1 that is the first of a new branch of that revision.
+ Formerly it was inconsistent.
+
+ File names may now contain tab, newline, space, and '$'.
+ They are represented in keyword strings with \t, \n, \040, and \044.
+ \ in a file name is now represented by \\ in a keyword string.
+
+ Identifiers may now start with a digit and (unless they are symbolic names)
+ may contain `.'. This permits author names like `john.doe' and `4tran'.
+
+ A bare -V option now prints the current version number.
+
+ rcsdiff outputs more readable context diff headers if diff -L works.
+
+ rcsdiff -rN -rN now suppresses needless checkout and comparison
+ of identical revisions.
+
+ Error messages now contain the names of files to which they apply.
+
+ Mach style memory mapping is now supported.
+
+ The installation procedure now conforms to the GNU coding standards.
+
+ When properly configured, RCS now strictly conforms to Posix 1003.1b-1993.
+
+
+Features new to RCS version 5.6 include:
+
+ Security holes have been plugged; setgid use is no longer supported.
+
+ co can retrieve old revisions much more efficiently.
+ To generate the Nth youngest revision on the trunk,
+ the old method used up to N passes through copies of the working file;
+ the new method uses a piece table to generate the working file in one pass.
+
+ When ci finds no changes in the working file,
+ it automatically reverts to the previous revision unless -f is given.
+
+ RCS follows symbolic links to RCS files instead of breaking them,
+ and warns when it breaks hard links to RCS files.
+
+ `$' stands for the revision number taken from working file keyword strings.
+ E.g. if F contains an Id keyword string,
+ `rcsdiff -r$ F' compares F to its checked-in revision, and
+ `rcs -nL:$ F' gives the symbolic name L to F's revision.
+
+ co and ci's new -M option sets the modification time
+ of the working file to be that of the revision.
+ Without -M, ci now tries to avoid changing the working file's
+ modification time if its contents are unchanged.
+
+ rcs's new -m option changes the log message of an old revision.
+
+ RCS is portable to hosts that do not permit `,' in filenames.
+ (`,' is not part of the Posix portable filename character set.)
+ A new -x option specifies extensions other than `,v' for RCS files.
+ The Unix default is `-x,v/', so that the working file `w' corresponds
+ to the first file in the list `RCS/w,v', `w,v', `RCS/w' that works.
+ The non-Unix default is `-x', so that only `RCS/w' is tried.
+ Eventually, the Unix default should change to `-x/,v'
+ to encourage interoperability among all Posix hosts.
+
+ A new RCSINIT environment variable specifies defaults for options like -x.
+
+ The separator for revision ranges has been changed from `-' to `:', because
+ the range `A-B' is ambiguous if `A', `B' and `A-B' are all symbolic names.
+ E.g. the old `rlog -r1.5-1.7' is now `rlog -r1.5:1.7'; ditto for `rcs -o'.
+ For a while RCS will still support (but warn about) the old `-' separator.
+
+ RCS manipulates its lock files using a method that is more reliable under NFS.
+
+
+Features new to RCS version 5 include:
+
+ RCS can check in arbitrary files, not just text files, if diff -a works.
+ RCS can merge lines containing just a single `.' if diff3 -m works.
+ GNU diff supports the -a and -m options.
+
+ RCS can now be used as a setuid program.
+ See ci(1) for how users can employ setuid copies of ci, co, and rcsclean.
+ Setuid privileges yield extra security if the effective user owns RCS files
+ and directories, and if only the effective user can write RCS directories.
+ RCS uses the real user for all accesses other than writing RCS directories.
+ As described in ci(1), there are three levels of setuid support.
+
+ 1. Setuid works fully if the seteuid() system call lets any
+ process switch back and forth between real and effective users,
+ as specified in Posix 1003.1a Draft 5.
+
+ 2. On hosts with saved setuids (a Posix 1003.1-1990 option) and without
+ a modern seteuid(), setuid works unless the real or effective user is root.
+
+ 3. On hosts that lack both modern seteuid() and saved setuids,
+ setuid does not work, and RCS uses the effective user for all accesses;
+ formerly it was inconsistent.
+
+ New options to co, rcsdiff, and rcsmerge give more flexibility to keyword
+ substitution.
+
+ -kkv substitutes the default `$Keyword: value $' for keyword strings.
+ However, a locker's name is inserted only as a file is being locked,
+ i.e. by `ci -l' and `co -l'. This is normally the default.
+
+ -kkvl acts like -kkv, except that a locker's name is always inserted
+ if the given revision is currently locked. This was the default in
+ version 4. It is now the default only with when using rcsdiff to
+ compare a revision to a working file whose mode is that of a file
+ checked out for changes.
+
+ -kk substitutes just `$Keyword$', which helps to ignore keyword values
+ when comparing revisions.
+
+ -ko retrieves the old revision's keyword string, thus bypassing keyword
+ substitution.
+
+ -kv retrieves just `value'. This can ease the use of keyword values, but
+ it is dangerous because it causes RCS to lose track of where the keywords
+ are, so for safety the owner write permission of the working file is
+ turned off when -kv is used; to edit the file later, check it out again
+ without -kv.
+
+ rcs -ko sets the default keyword substitution to be in the style of co -ko,
+ and similarly for the other -k options. This can be useful with file
+ formats that cannot tolerate changing the lengths of keyword strings.
+ However it also renders a RCS file readable only by RCS version 5 or later.
+ Use rcs -kkv to restore the usual default substitution.
+
+ RCS can now be used by development groups that span time zone boundaries.
+ All times are now displayed in UTC, and UTC is the default time zone.
+ To use local time with co -d, append ` LT' to the time.
+ When interchanging RCS files with sites running older versions of RCS,
+ time stamp discrepancies may prevent checkins; to work around this,
+ use `ci -d' with a time slightly in the future.
+
+ Dates are now displayed using four-digit years, not two-digit years.
+ Years given in -d options must now have four digits.
+ This change is required for RCS to continue to work after 1999/12/31.
+ The form of dates in version 5 RCS files will not change until 2000/01/01,
+ so in the meantime RCS files can still be interchanged with sites
+ running older versions of RCS. To make room for the longer dates,
+ rlog now outputs `lines: +A -D' instead of `lines added/del: A/D'.
+
+ To help prevent diff programs that are broken or have run out of memory
+ from trashing an RCS file, ci now checks diff output more carefully.
+
+ ci -k now handles the Log keyword, so that checking in a file
+ with -k does not normally alter the file's contents.
+
+ RCS no longer outputs white space at the ends of lines
+ unless the original working file had it.
+ For consistency with other keywords,
+ a space, not a tab, is now output after `$Log:'.
+ Rlog now puts lockers and symbolic names on separate lines in the output
+ to avoid generating lines that are too long.
+ A similar fix has been made to lists in the RCS files themselves.
+
+ RCS no longer outputs the string `Locker: ' when expanding Header or Id
+ keywords. This saves space and reverts back to version 3 behavior.
+
+ The default branch is not put into the RCS file unless it is nonempty.
+ Therefore, files generated by RCS version 5 can be read by RCS version 3
+ unless they use the default branch feature introduced in version 4.
+ This fixes a compatibility problem introduced by version 4.
+
+ RCS can now emulate older versions of RCS; see `co -V'.
+ This may be useful to overcome compatibility problems
+ due to the above changes.
+
+ Programs like Emacs can now interact with RCS commands via a pipe:
+ the new -I option causes ci, co, and rcs to run interactively,
+ even if standard input is not a terminal.
+ These commands now accept multiple inputs from stdin separated by `.' lines.
+
+ ci now silently ignores the -t option if the RCS file already exists.
+ This simplifies some shell scripts and improves security in setuid sites.
+
+ Descriptive text may be given directly in an argument of the form -t-string.
+
+ The character set for symbolic names has been upgraded
+ from Ascii to ISO 8859.
+
+ rcsdiff now passes through all options used by GNU diff;
+ this is a longer list than 4.3BSD diff.
+
+ merge's new -L option gives tags for merge's overlap report lines.
+ This ability used to be present in a different, undocumented form;
+ the new form is chosen for compatibility with GNU diff3's -L option.
+
+ rcsmerge and merge now have a -q option, just like their siblings do.
+
+ rcsclean's new -n option outputs what rcsclean would do,
+ without actually doing it.
+
+ RCS now attempts to ignore parts of an RCS file that look like they come
+ from a future version of RCS.
+
+ When properly configured, RCS now strictly conforms with Posix 1003.1-1990.
+ RCS can still be compiled in non-Posix traditional Unix environments,
+ and can use common BSD and USG extensions to Posix.
+ RCS is a conforming Standard C program, and also compiles under traditional C.
+
+ Arbitrary limits on internal table sizes have been removed.
+ The only limit now is the amount of memory available via malloc().
+
+ File temporaries, lock files, signals, and system call return codes
+ are now handled more cleanly, portably, and quickly.
+ Some race conditions have been removed.
+
+ A new compile-time option RCSPREFIX lets administrators avoid absolute path
+ names for subsidiary programs, trading speed for flexibility.
+
+ The configuration procedure is now more automatic.
+
+ Snooping has been removed.
+
+
+Version 4 was the first version distributed by FSF.
+Beside bug fixes, features new to RCS version 4 include:
+
+ The notion of default branch has been added; see rcs -b.
+
+
+Version 3 was included in the 4.3BSD distribution.
+
+
+Here are some possible future changes for RCS:
+
+ Bring back sccstorcs.
+
+ Add an option to `rcsmerge' so that it can use an arbitrary program
+ to do the 3-way merge, instead of the default `merge'.
+ Likewise for `rcsdiff' and `diff'. It should be possible to pass
+ arbitrary options to these programs, and to the subsidiary `co's.
+
+ Add format options for finer control over the output of ident and rlog.
+ E.g. there should be an easy way for rlog to output lines like
+ `src/main.c 2.4 wft', one for each locked revision.
+ rlog options should have three orthogonal types: selecting files,
+ selecting revisions, and selecting rlog format.
+
+ Add format options for finer control over the output of keyword strings.
+ E.g. there should be some way to prepend @(#), and there should be some
+ way to change $ to some other character to disable further substitution.
+ These options should make the resulting files uneditable, like -kv.
+
+ Add long options, e.g. `--version'. Unfortunately RCS's option syntax
+ is incompatible with getopt. Perhaps the best way is to overload `rcs', e.g.
+ `rcs diff --keyword-substitution=old file' instead of `rcsdiff -ko file'.
+
+ Add a way to put only the interesting part of the path into the $Header
+ keyword expansion.
+
+ rlog -rM:N should work even if M and N have different numbers of fields,
+ so long as M is an ancestor of N or vice versa.
+
+ rcs should evaluate options in order; this allows rcs -oS -nS.
+
+ rcs should be able to fix minor mistakes in checkin dates and authors.
+
+ Be able to redo your most recent checkin with minor changes.
+
+ co -u shouldn't complain about a writable working file if it won't change
+ its contents.
+
+ Configure the Makefile automatically, as well as conf.h.
+
+ Add a new option to rcs that behaves like -o, but that doesn't lose the
+ nonempty log messages, but instead merges them with the next revision
+ if it exists, perhaps with a 1-line header containing author, date, etc.
+
+ Add a `-' option to take the list of pathnames from standard input.
+ Perhaps the pathnames should be null-terminated, not newline-terminated,
+ so that pathnames that contain newlines are handled properly.
+
+ Permit multiple option-pathname pairs, e.g. co -r1.4 a -r1.5 b.
+
+ Add options to allow arbitrary combinations of working file names
+ with RCS file names -- they shouldn't have to match.
+
+ Add an option to break a symbolic link to an RCS file,
+ instead of breaking the hard link that it points to.
+
+ Add ways to specify the earliest revision, the most recent revision,
+ the earliest or latest revision on a particular branch, and
+ the parent or child of some other revision.
+
+ If a user has multiple locks, perhaps ci should fall back on ci -k's
+ method to figure out which revision to use.
+
+ Symbolic names need not refer to existing branches and revisions.
+ rcs(1)'s BUGS section says this is a bug. Is it? If so, it should be fixed.
+
+ Add an option to rcs -o so that old log messages are not deleted if
+ the next undeleted revision exists, but are merely appended to the log
+ message of that revision.
+
+ ci -k should be able to get keyword values from the first `$Log' entry.
+
+ Add an option to rcsclean to clean directories recursively.
+
+ Write an rcsck program that repairs corrupted RCS files,
+ much as fsck repairs corrupted file systems.
+ For example, it should remove stale lock files.
+
+ Clean up the source code with a consistent indenting style.
+
+ Update the date parser to use the more modern getdate.y by Bellovin,
+ Salz, and Berets, or the even more modern getdate by Moraes. None of
+ these getdate implementations are as robust as RCS's old warhorse in
+ avoiding problems like arithmetic overflow, so they'll have to be
+ fixed first.
+
+ Break up the code into a library so that it's easier to write new programs
+ that manipulate RCS files, and so that useless code is removed from the
+ existing programs. For example, the rcs command contains unnecessary
+ keyword substitution baggage, and the merge command can be greatly pruned.
+
+ Make it easier to use your favorite text editor to edit log messages,
+ etc. instead of having to type them in irretrievably at the terminal.
+
+ Let the user specify a search path for default branches,
+ e.g. to use L as the default branch if it works, and M otherwise.
+ Let the user require that at least one entry in the default branch path works.
+ Let the user say that later entries in the default branch path are read only,
+ i.e. one cannot check in changes to them.
+ This should be an option settable by RCSINIT.
+
+ Add a way for a user to see which revisions affected which lines.
+
+ Have `rlog -nN F' print just the revision number that N translates to.
+ E.g. `rlog -nB. F' would print the highest revision on the branch B.
+ Use this to add an option -bB to rcsbranch, to freeze the named branch.
+ This should interact well with default branches.
+
+ Add a co option that prints the revision number before each line,
+ as SCCS's `get -m' does.
+
+The following projects require a change to RCS file format.
+
+ Allow keyword expansion to be changed on a per-revision basis,
+ not on a per-file basis as now. This would allow -ko to be used
+ on imported revisions, with the default -kkv otherwise.
+
+ When two or more branches are merged, record all the ancestors
+ of the new revision. The hard part of this is keeping track of all
+ the ancestors of a working file while it's checked out.
+
+ Add loose locking, which is like non-strict but applies to all users,
+ not just the owner of the RCS file.
+
+ Be able to store RCS files in compressed format.
+ Don't bother to use a .Z extension that would exceed file name length limits;
+ just look at the magic number.
+
+ Add locker commentary, e.g. `co -l -m"checkout to fix merge bug" foo'
+ to tell others why you checked out `foo'.
+ Also record the time when the revision was locked,
+ and perhaps the working pathname (if applicable).
+
+ Let the user mark an RCS revision as deleted; checking out such a revision
+ would result in no working file. Similarly, using `co -d' with a date either
+ before the initial revision or after the file was marked deleted should
+ remove the working file. For extra credit, extend the notion of `deleted' to
+ include `renamed'. RCS should support arbitrary combinations of renaming and
+ deletion, e.g. renaming A to B and B to A, checking in new revisions to both
+ files, and then renaming them back.
+
+ Be able to check in an entire directory structure into a single RCS file.
+
+ Use a better scheme for locking revisions; the current scheme requires
+ changing the RCS file just to lock or unlock a revision.
+ The new scheme should coexist as well as possible with older versions of RCS,
+ and should avoid the rare NFS bugs mentioned in rcsedit.c.
+ E.g. if there's a reliable lockd running, RCS should use it
+ instead of relying on NFS.
+
+ Add rcs options for changing keyword names, e.g. XConsortium instead of Id.
+
+ Add a `$Description' keyword; but this may be tricky, since descriptions can
+ contain newlines and $s.
+
+ Add a `$Copyright' keyword that expands to a copyright notice.
+
+ Add frozen branches a la SCCS. In general, be able to emulate all of
+ SCCS, so that an SCCS-to-RCS program can be practical. For example,
+ there should be an equivalent to the SCCS prt command.
+
+ Add support for distributed RCS, where widely separated
+ users cannot easily access each others' RCS files,
+ and must periodically distribute and reconcile new revisions.
+
+ Be able to create empty branches.
+
+ Be able to store just deltas from a read-only principal copy,
+ e.g. from source on CD-ROM.
+
+ Improve RCS's method for storing binary files.
+ Although it is more efficient than SCCS's,
+ the diff algorithm is still line oriented,
+ and often generates long output for minor changes to an executable file.
+
+ From the user's point of view, it would be best if
+ RCS detected and handled binary files without human intervention,
+ switching expansion methods as needed from revision to revision.
+
+ Allow RCS to determine automagically whether -ko or -kb should be the default
+ by inspecting the file's contents or name. The magic should be optional
+ and user-programmable.
+
+ Extend the grammar of RCS files so that keywords need not be in a fixed order.
+
+ Internationalize messages; unfortunately, there's no common standard yet.
+ This requires a change in RCS file format because of the
+ `empty log message' and `checked in with -k' hacks inside RCS files.
+
+ Add documentation in texinfo format.
diff --git a/gnu/usr.bin/rcs/REFS b/gnu/usr.bin/rcs/REFS
new file mode 100644
index 0000000..eaf96a5
--- /dev/null
+++ b/gnu/usr.bin/rcs/REFS
@@ -0,0 +1,90 @@
+Here are references to RCS and related free software and documentation.
+Some of this information changes often; see the Frequently Asked Questions
+for more up-to-date references.
+
+ $Id: REFS,v 1.1 1995/06/16 06:19:24 eggert Exp $
+
+
+Frequently Asked Questions (FAQs)
+
+<http://www.qucis.queensu.ca/Software-Engineering/>
+<ftp://rtfm.mit.edu//pub/usenet-by-hierarchy/comp/software-eng/>
+ for software engineering; e.g. see
+ <http://www.qucis.queensu.ca/Software-Engineering/blurb/rcs>.
+
+<http://www.iac.honeywell.com/Pub/Tech/CM/CMFAQ.html>
+<ftp://rtfm.mit.edu//pub/usenet-by-hierarchy/comp/software/config-mgmt/>
+ for configuration management
+
+<http://www.winternet.com/~zoo/cvs/FAQ.txt>
+<ftp://ftp.odi.com/pub/users/dgg/FAQ.gz>
+ for CVS (see below)
+
+
+RCS and related GNU project software
+
+<ftp://ftp.cs.purdue.edu/pub/RCS/>
+ The RCS project distribution directory also contains beta versions,
+ ports, and prebuilt documentation.
+
+<ftp://prep.ai.mit.edu/pub/gnu/>
+ The GNU project distribution directory contains:
+ diffutils-N-tar.gz
+ the latest diffutils release; recommended for RCS
+ emacs-N-tar.gz
+ The latest Emacs release contains VC, a version-control package
+ that makes RCS easier to use.
+ make-N-tar.gz
+ GNU Make, which can automatically build from RCS files.
+ rcs-N-tar.gz
+ the latest RCS release
+ cvs-N-tar.gz
+ the latest official CVS release (see below)
+
+<ftp://ftp.leo.org/pub/comp/os/os2/gnu/devtools/> DOS, OS/2 ports
+<ftp://ftp.cc.utexas.edu/microlib/nt/gnu/> NT port
+
+
+CVS
+
+CVS, the Concurrent Versions System, keeps tracks of source changes
+made by groups of developers working on the same files concurrently,
+allowing them to resync as needed.
+
+<http://www.winternet.com/~zoo/cvs/>
+<http://www.loria.fr/~molli/cvs-index.html>
+ These pages have useful information about CVS.
+
+<ftp://prep.ai.mit.edu/pub/gnu/cvs-1.3.tar.gz>
+ CVS 1.3 is the latest released version.
+
+<ftp://ftp.delos.com/pub/cvs/alpha/cvs-1.4A2.tar.gz>
+ CVS 1.4 is in alpha test, but it is recommended if you are installing CVS
+ for the first time, or on a recent operating system.
+
+<ftp://ftp-os2.cdrom.com/pub/os2/unix/> DOS, OS/2 ports
+<ftp://ftp.cc.utexas.edu/microlib/nt/gnu/> NT port
+
+<ftp://ftp.cyclic.com/pub/cvs/>
+ Cyclic CVS adds network transparency to CVS; it supports efficient,
+ reliable, and authenticated repository access via TCP/IP.
+
+
+Other software that uses RCS
+
+<ftp://ftp.nau.edu/pub/Aegis/>
+ Aegis manages revisions, baselines, mandatory reviews, and mandatory testing.
+
+<ftp://ftp.vix.com/pub/patches/csu/>
+ BCS, the Baseline Configuration System,
+ manages revisions, baselines, and staging areas.
+
+<ftp://riftp.osf.org/pub/ode/>
+ ODE, the Open Software Foundation Development Environment,
+ manages revisions, builds, and sandboxes.
+ OSF uses it for their own development.
+
+<ftp://bellcore.com/pub/Odin/>
+ Odin, a `make' replacement, can build directly from arbitrary revisions
+ without requiring checkouts of working copies. It also handles
+ parallel builds on multiple remote hosts and of multiple variants.
diff --git a/gnu/usr.bin/rcs/ci/ci.1 b/gnu/usr.bin/rcs/ci/ci.1
index 5736dc9..d096096 100644
--- a/gnu/usr.bin/rcs/ci/ci.1
+++ b/gnu/usr.bin/rcs/ci/ci.1
@@ -2,8 +2,10 @@
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: ci.1,v 5.9 1991/10/07 17:32:46 eggert Exp $
+.Id $Id: ci.1,v 5.17 1995/06/16 06:19:24 eggert Exp $
+.ds i \&\s-1ISO\s0
.ds r \&\s-1RCS\s0
+.ds u \&\s-1UTC\s0
.if n .ds - \%--
.if t .ds - \(em
.TH CI 1 \*(Dt GNU
@@ -41,7 +43,7 @@ new branch can be created. This restriction is not enforced
for the owner of the file if non-strict locking is used
(see
.BR rcs (1)).
-A lock held by someone else may be broken with the
+A lock held by someone else can be broken with the
.B rcs
command.
.PP
@@ -105,7 +107,9 @@ The number
.I rev
of the deposited revision can be given by any of the options
.BR \-f ,
+.BR \-i ,
.BR \-I ,
+.BR \-j ,
.BR \-k ,
.BR \-l ,
.BR \-M ,
@@ -114,7 +118,15 @@ of the deposited revision can be given by any of the options
or
.BR \-u .
.I rev
-may be symbolic, numeric, or mixed.
+can be symbolic, numeric, or mixed.
+Symbolic names in
+.I rev
+must already be defined;
+see the
+.B \-n
+and
+.B \-N
+options for assigning names during checkin.
If
.I rev
is
@@ -124,6 +136,15 @@ determines the revision number from keyword values in the working file.
.PP
If
.I rev
+begins with a period,
+then the default branch (normally the trunk) is prepended to it.
+If
+.I rev
+is a branch number followed by a period,
+then the latest revision on that branch is used.
+.PP
+If
+.I rev
is a revision number, it must be higher than the latest
one on the branch to which
.I rev
@@ -172,25 +193,28 @@ Exception: On the trunk, revisions can be appended to the end, but
not inserted.
.SH OPTIONS
.TP
-.BR \-r [\f2rev\fP]
-checks in a revision, releases the corresponding lock, and
-removes the working file. This is the default.
-.RS
-.PP
-The
+.BI \-r rev
+Check in revision
+.IR rev .
+.TP
+.BR \-r
+The bare
.B \-r
-option has an unusual meaning in
+option (without any revision) has an unusual meaning in
.BR ci .
-In other \*r commands,
+With other \*r commands, a bare
.B \-r
-merely specifies a revision number,
-but in
-.B ci
-it also releases a lock and removes the working file.
-See
+option specifies the most recent revision on the default branch,
+but with
+.BR ci ,
+a bare
+.B \-r
+option reestablishes the default behavior of releasing a lock and
+removing the working file, and is used to override any default
+.B \-l
+or
.B \-u
-for a tricky example.
-.RE
+options established by shell aliases or scripts.
.TP
.BR \-l [\f2rev\fP]
works like
@@ -213,6 +237,7 @@ immediately after checkin.
.PP
The
.BR \-l ,
+bare
.BR \-r ,
and
.B \-u
@@ -221,7 +246,7 @@ For example,
.B "ci\ \-u\ \-r"
is equivalent to
.B "ci\ \-r"
-because
+because bare
.B \-r
overrides
.BR \-u .
@@ -244,7 +269,7 @@ several sites should be checked in with the
.B \-k
option at these sites to
preserve the original number, date, author, and state.
-The extracted keyword values and the default log message may be overridden
+The extracted keyword values and the default log message can be overridden
with the options
.BR \-d ,
.BR \-m ,
@@ -259,6 +284,14 @@ unless
.B \-f
is given.
.TP
+.BR \-i [\f2rev\fP]
+initial checkin; report an error if the \*r file already exists.
+This avoids race conditions in certain applications.
+.TP
+.BR \-j [\f2rev\fP]
+just checkin and do not initialize;
+report an error if the \*r file does not already exist.
+.TP
.BR \-I [\f2rev\fP]
interactive mode;
the user is prompted and questioned
@@ -296,6 +329,18 @@ Use this option with care; it can confuse
uses the string
.I msg
as the log message for all revisions checked in.
+By convention, log messages that start with
+.B #
+are comments and are ignored by programs like GNU Emacs's
+.B vc
+package.
+Also, log messages that start with
+.BI { clumpname }
+(followed by white space) are meant to be clumped together if possible,
+even if they are associated with different files; the
+.BI { clumpname }
+label is used only for clumping,
+and is not considered to be part of the log message itself.
.TP
.BI \-n "name"
assigns the symbolic name
@@ -326,7 +371,7 @@ into the \*r file,
deleting the existing text.
The
.I file
-may not begin with
+cannot begin with
.BR \- .
.TP
.BI \-t\- string
@@ -356,6 +401,41 @@ For backward compatibility with older versions of \*r, a bare
option is ignored.
.RE
.TP
+.B \-T
+Set the \*r file's modification time to the new revision's time
+if the former precedes the latter and there is a new revision;
+preserve the \*r file's modification time otherwise.
+If you have locked a revision,
+.B ci
+usually updates the \*r file's modification time to the current time,
+because the lock is stored in the \*r file
+and removing the lock requires changing the \*r file.
+This can create an \*r file newer than the working file in one of two ways:
+first,
+.B "ci\ \-M"
+can create a working file with a date before the current time;
+second, when reverting to the previous revision
+the \*r file can change while the working file remains unchanged.
+These two cases can cause excessive recompilation caused by a
+.BR make (1)
+dependency of the working file on the \*r file.
+The
+.B \-T
+option inhibits this recompilation by lying about the \*r file's date.
+Use this option with care; it can suppress recompilation even when
+a checkin of one working file should affect
+another working file associated with the same \*r file.
+For example, suppose the \*r file's time is 01:00,
+the (changed) working file's time is 02:00,
+some other copy of the working file has a time of 03:00,
+and the current time is 04:00.
+Then
+.B "ci\ \-d\ \-T"
+sets the \*r file's time to 02:00 instead of the usual 04:00;
+this causes
+.BR make (1)
+to think (incorrectly) that the other copy is newer than the \*r file.
+.TP
.BI \-w "login"
uses
.I login
@@ -364,6 +444,9 @@ Useful for lying about the author, and for
.B \-k
if no author is available.
.TP
+.BI \-V
+Print \*r's version number.
+.TP
.BI \-V n
Emulate \*r version
.IR n .
@@ -375,9 +458,9 @@ for details.
specifies the suffixes for \*r files.
A nonempty suffix matches any pathname ending in the suffix.
An empty suffix matches any pathname of the form
-.BI RCS/ file
+.BI RCS/ path
or
-.IB path /RCS/ file.
+.IB path1 /RCS/ path2.
The
.B \-x
option can specify a list of suffixes
@@ -398,10 +481,49 @@ The default for
.IR suffixes
is installation-dependent; normally it is
.B ,v/
-for hosts like Unix that permit commas in file names,
+for hosts like Unix that permit commas in filenames,
and is empty (i.e. just the empty suffix) for other hosts.
+.TP
+.BI \-z zone
+specifies the date output format in keyword substitution,
+and specifies the default time zone for
+.I date
+in the
+.BI \-d date
+option.
+The
+.I zone
+should be empty, a numeric \*u offset, or the special string
+.B LT
+for local time.
+The default is an empty
+.IR zone ,
+which uses the traditional \*r format of \*u without any time zone indication
+and with slashes separating the parts of the date;
+otherwise, times are output in \*i 8601 format with time zone indication.
+For example, if local time is January 11, 1990, 8pm Pacific Standard Time,
+eight hours west of \*u,
+then the time is output as follows:
+.RS
+.LP
+.RS
+.nf
+.ta \w'\f3\-z+05:30\fP 'u +\w'\f31990-01-11 09:30:00+05:30\fP 'u
+.ne 4
+\f2option\fP \f2time output\fP
+\f3\-z\fP \f31990/01/12 04:00:00\fP \f2(default)\fP
+\f3\-zLT\fP \f31990-01-11 20:00:00\-08\fP
+\f3\-z+05:30\fP \f31990-01-12 09:30:00+05:30\fP
+.ta 4n +4n +4n +4n
+.fi
+.RE
+.LP
+The
+.B \-z
+option does not affect dates stored in \*r files,
+which are always \*u.
.SH "FILE NAMING"
-Pairs of \*r files and working files may be specified in three ways
+Pairs of \*r files and working files can be specified in three ways
(see also the
example section).
.PP
@@ -423,9 +545,9 @@ If
.I X
is empty,
.IB path1 /
-must be
+must start with
.B RCS/
-or must end in
+or must contain
.BR /RCS/ .
.PP
2) Only the \*r file is given. Then the working file is created in the current
@@ -516,7 +638,7 @@ preserves its read and execute permissions.
.B ci
always turns off all write permissions of \*r files.
.SH FILES
-Several temporary files may be created in the directory containing
+Temporary files are created in the directory containing
the working file, and also in the temporary directory (see
.B \s-1TMPDIR\s0
under
@@ -576,21 +698,23 @@ who can check in new revisions but cannot otherwise change the \*r files.
.SH "SETUID USE"
To prevent anybody but their \*r administrator from deleting revisions,
a set of users can employ setuid privileges as follows.
-.nr n \w'\(bu '+1n-1/1n
-.IP \(bu \nn
+.nr n \w'\(bu'+2n-1/1n
+.ds n \nn
+.if \n(.g .if r an-tag-sep .ds n \w'\(bu'u+\n[an-tag-sep]u
+.IP \(bu \*n
Check that the host supports \*r setuid use.
Consult a trustworthy expert if there are any doubts.
It is best if the
-.B seteuid()
+.B seteuid
system call works as described in Posix 1003.1a Draft 5,
because \*r can switch back and forth easily
between real and effective users, even if the real user is
.BR root .
If not, the second best is if the
-.B setuid()
+.B setuid
system call supports saved setuid
(the {\s-1_POSIX_SAVED_IDS\s0} behavior of Posix 1003.1-1990);
-this fails only if the real user is
+this fails only if the real or effective user is
.BR root .
If \*r detects any failure in setuid, it quits immediately.
.IP \(bu \nn
@@ -599,7 +723,7 @@ Choose a user
to serve as \*r administrator for the set of users.
Only
.I A
-will be able to invoke the
+can invoke the
.B rcs
command on the users' \*r files.
.I A
@@ -608,9 +732,9 @@ should not be
or any other user with special powers.
Mutually suspicious sets of users should use different administrators.
.IP \(bu \nn
-Choose a path name
+Choose a pathname
.I B
-that will be a directory of files to be executed by the users.
+to be a directory of files to be executed by the users.
.IP \(bu \nn
Have
.I A
@@ -733,8 +857,9 @@ Useful
options include
.BR \-q ,
.BR \-V ,
+.BR \-x ,
and
-.BR \-x .
+.BR \-z .
.TP
.B \s-1TMPDIR\s0
Name of the temporary directory.
@@ -755,14 +880,16 @@ The exit status is zero if and only if all operations were successful.
.SH IDENTIFICATION
Author: Walter F. Tichy.
.br
-Revision Number: \*(Rv; Release Date: \*(Dt.
+Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
-Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
+Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
-Copyright \(co 1990, 1991 by Paul Eggert.
+Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
.SH "SEE ALSO"
-co(1), ident(1), make(1), rcs(1), rcsclean(1), rcsdiff(1),
-rcsintro(1), rcsmerge(1), rlog(1), rcsfile(5)
+co(1),
+emacs(1),
+ident(1), make(1), rcs(1), rcsclean(1), rcsdiff(1),
+rcsintro(1), rcsmerge(1), rlog(1), setuid(2), rcsfile(5)
.br
Walter F. Tichy,
\*r\*-A System for Version Control,
diff --git a/gnu/usr.bin/rcs/doc/rcs.ms b/gnu/usr.bin/rcs/doc/rcs.ms
index 7b3f807..1c90810 100644
--- a/gnu/usr.bin/rcs/doc/rcs.ms
+++ b/gnu/usr.bin/rcs/doc/rcs.ms
@@ -3,15 +3,6 @@
.\"
.\" \*s stands for $, and avoids problems when this file is checked in.
.ds s $
-.\" PS and PE center pic diagrams. (The corresponding ms-macros may not.)
-.de PS
-.nr pE (\\n(.lu-\\$2u)/2u
-.in +\\n(pEu
-.ne \\$1u
-..
-.de PE
-.in -\\n(pEu
-..
.de D(
.DS
.nr VS 12p
@@ -27,7 +18,7 @@
.de Id
.ND \\$4
..
-.Id $Id: rcs.ms,v 5.2 1991/01/03 10:57:28 eggert Exp $
+.Id $Id: rcs.ms,v 5.4 1995/06/01 16:23:43 eggert Exp $
.RP
.TL
RCS\*-A System for Version Control
@@ -292,7 +283,7 @@ has a similar function. It accumulates
the log messages that are requested during check-in.
Thus, one can maintain the complete history of a revision directly inside it,
by enclosing it in a comment.
-Figure 1 is a partial reproduction of a log contained in revision 4.1 of
+Figure 1 is an edited version of a log contained in revision 4.1 of
the file \fIci.c\fR. The log appears at the beginning of the file,
and makes it easy to determine what the recent modifications were.
.sp
@@ -301,23 +292,25 @@ and makes it easy to determine what the recent modifications were.
.ne 18
.nf
.in +0.5i
-/* \*sLog: ci.c,v \*s
- * Revision 4.1 1983/05/10 17:03:06 wft
- * Added option \-d and \-w, and updated assignment of date, etc. to new delta.
- * Added handling of default branches.
- *
- * Revision 3.9 1983/02/15 15:25:44 wft
- * Added call to fastcopy() to copy remainder of RCS file.
- *
- * Revision 3.8 1983/01/14 15:34:05 wft
- * Added ignoring of interrupts while new RCS file is renamed;
- * avoids deletion of RCS files by interrupts.
- *
- * Revision 3.7 1982/12/10 16:09:20 wft
- * Corrected checking of return code from diff.
- * An RCS file now inherits its mode during the first ci from the working file,
- * except that write permission is removed.
- */
+/*
+.in +\w'/'u
+* \*sLog: ci.c,v \*s
+* Revision 4.1 1983/05/10 17:03:06 wft
+* Added option \-d and \-w, and updated assignment of date, etc. to new delta.
+* Added handling of default branches.
+*
+* Revision 3.9 1983/02/15 15:25:44 wft
+* Added call to fastcopy() to copy remainder of RCS file.
+*
+* Revision 3.8 1983/01/14 15:34:05 wft
+* Added ignoring of interrupts while new RCS file is renamed;
+* avoids deletion of RCS files by interrupts.
+*
+* Revision 3.7 1982/12/10 16:09:20 wft
+* Corrected checking of return code from diff.
+* An RCS file now inherits its mode during the first ci from the working file,
+* except that write permission is removed.
+*/
.in 0
.ce 1
Figure 1. Log entries produced by the marker \*sLog\*s.
@@ -421,7 +414,7 @@ between 1.3 and 1.3.1.1
into a revision at level 2. The operation \fIrcsmerge\fR automates this
process (see the Appendix).
.ne 7
-.PS 4i
+.PS 4i
.ps -2
box "1.1"
arrow
@@ -460,7 +453,7 @@ that the customer has received revision 1.3, added his local modifications
as revision 1.3.1.1, then received revision 2.4, and merged
2.4 and 1.3.1.1, resulting in 2.4.1.1.
.ne 7
-.PS 4i
+.PS 4i
.ps -2
R13: box "1.3"
line invis
@@ -561,7 +554,7 @@ branch revision is reached. Figure 5 illustrates a tree with
one side branch. Triangles pointing to the left and right represent
reverse and forward deltas, respectively.
.ne 8
-.PS 4i
+.PS 4i
.ps -2
define BD X [line invis $1 right .5;
line up .3 then left .5 down .3 then right .5 down .3 then up .3] X
@@ -570,21 +563,21 @@ define FD X [line invis $1 right .5;
line left .5 down .3 then up .6 then right .5 down .3;] X
right
-D11: BD(" 1.1")
+D11: BD(" 1.1")
arrow right from D11.e
-D12: BD(" 1.2")
- arrow right from D12.e
-D13: BD(" 1.3")
- arrow right from D13.e
-D21: BD(" 2.1")
- arrow right from D21.e
-D22: box "2.2"
+D12: BD(" 1.2")
+ arrow right from D12.e
+D13: BD(" 1.3")
+ arrow right from D13.e
+D21: BD(" 2.1")
+ arrow right from D21.e
+D22: box "2.2"
line invis down from D21.s
-F1: FD("1.3.1.1 ")
+F1: FD("1.3.1.1 ")
arrow from D13.se to F1.w
arrow from F1.e right
right
-F2: FD("1.3.1.2 ")
+F2: FD("1.3.1.2 ")
.ps +2
.PE
.ce 1
@@ -1291,9 +1284,10 @@ locks, unlocks, breaks locks, toggles the strict-locking feature,
sets state attributes and symbolic revision numbers, changes the
description, and deletes revisions. A revision can
only be deleted if it is not the fork of a side branch.
+.br
+.ne 10
.IP "\fIrcsclean\fP \fB\- clean working directory\fP"
.sp 0
-.ne 10
\fIRcsclean\fR removes working files that were checked out but never changed.*
.FS *
The \fIrcsclean\fP and \fIrcsfreeze\fP commands
diff --git a/gnu/usr.bin/rcs/ident/ident.1 b/gnu/usr.bin/rcs/ident/ident.1
index 37c8eda..33c10eb 100644
--- a/gnu/usr.bin/rcs/ident/ident.1
+++ b/gnu/usr.bin/rcs/ident/ident.1
@@ -3,25 +3,28 @@
.ds Dt \\$4
.ds iD \\$3 \\$4 \\$5 \\$6 \\$7
..
-.Id $Id: ident.1,v 5.0 1990/08/22 09:09:36 eggert Exp $
-.ds r \s-1RCS\s0
+.Id $Id: ident.1,v 5.4 1993/11/09 17:40:15 eggert Exp $
+.ds r \&\s-1RCS\s0
+.ds u \&\s-1UTC\s0
.if n .ds - \%--
.if t .ds - \(em
.TH IDENT 1 \*(Dt GNU
.SH NAME
-ident \- identify files
+ident \- identify RCS keyword strings in files
.SH SYNOPSIS
.B ident
[
.B \-q
] [
+.B \-V
+] [
.I file
\&.\|.\|. ]
.SH DESCRIPTION
.B ident
-searches for all occurrences of the pattern
-.BI $ keyword : .\|.\|. $
-in the named files or, if no file name appears, the standard input.
+searches for all instances of the pattern
+.BI $ keyword : "\ text\ " $
+in the named files or, if no files are named, the standard input.
.PP
These patterns are normally inserted automatically by the \*r command
.BR co (1),
@@ -30,6 +33,11 @@ The option
.B \-q
suppresses
the warning given if there are no patterns in a file.
+The option
+.B \-V
+prints
+.BR ident 's
+version number.
.PP
.B ident
works on text files as well as object files and dumps.
@@ -37,7 +45,15 @@ For example, if the C program in
.B f.c
contains
.IP
-\f3char rcsid[] = \&"$\&Id: f.c,v \*(iD $\&";\fP
+.ft 3
+#include <stdio.h>
+.br
+static char const rcsid[] =
+.br
+ \&"$\&Id: f.c,v \*(iD $\&";
+.br
+int main() { return printf(\&"%s\en\&", rcsid) == EOF; }
+.ft P
.LP
and
.B f.c
@@ -57,14 +73,104 @@ f.o:
$\&Id: f.c,v \*(iD $
.ft
.fi
+.PP
+If a C program defines a string like
+.B rcsid
+above but does not use it,
+.BR lint (1)
+may complain, and some C compilers will optimize away the string.
+The most reliable solution is to have the program use the
+.B rcsid
+string, as shown in the example above.
+.PP
+.B ident
+finds all instances of the
+.BI $ keyword : "\ text\ " $
+pattern, even if
+.I keyword
+is not actually an \*r-supported keyword.
+This gives you information about nonstandard keywords like
+.BR $\&XConsortium$ .
+.SH KEYWORDS
+Here is the list of keywords currently maintained by
+.BR co (1).
+All times are given in Coordinated Universal Time (\*u,
+sometimes called \&\s-1GMT\s0) by default, but if the files
+were checked out with
+.BR co 's
+.BI \-z zone
+option, times are given with a numeric time zone indication appended.
+.TP
+.B $\&Author$
+The login name of the user who checked in the revision.
+.TP
+.B $\&Date$
+The date and time the revision was checked in.
+.TP
+.B $\&Header$
+A standard header containing the full pathname of the \*r file, the
+revision number, the date and time, the author, the state,
+and the locker (if locked).
+.TP
+.B $\&Id$
+Same as
+.BR $\&Header$ ,
+except that the \*r filename is without a path.
+.TP
+.B $\&Locker$
+The login name of the user who locked the revision (empty if not locked).
+.TP
+.B $\&Log$
+The log message supplied during checkin.
+For
+.BR ident 's
+purposes, this is equivalent to
+.BR $\&RCSfile$ .
+.TP
+.B $\&Name$
+The symbolic name used to check out the revision, if any.
+.TP
+.B $\&RCSfile$
+The name of the \*r file without a path.
+.TP
+.B $\&Revision$
+The revision number assigned to the revision.
+.TP
+.B $\&Source$
+The full pathname of the \*r file.
+.TP
+.B $\&State$
+The state assigned to the revision with the
+.B \-s
+option of
+.BR rcs (1)
+or
+.BR ci (1).
+.PP
+.BR co (1)
+represents the following characters in keyword values by escape sequences
+to keep keyword strings well-formed.
+.LP
+.RS
+.nf
+.ne 6
+.ta \w'newline 'u
+\f2char escape sequence\fP
+tab \f3\et\fP
+newline \f3\en\fP
+space \f3\e040
+$ \e044
+\e \e\e\fP
+.fi
+.RE
.SH IDENTIFICATION
Author: Walter F. Tichy.
.br
-Revision Number: \*(Rv; Release Date: \*(Dt.
+Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
-Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
+Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
-Copyright \(co 1990 by Paul Eggert.
+Copyright \(co 1990, 1992, 1993 Paul Eggert.
.SH "SEE ALSO"
ci(1), co(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1),
rcsfile(5)
diff --git a/gnu/usr.bin/rcs/lib/maketime.h b/gnu/usr.bin/rcs/lib/maketime.h
new file mode 100644
index 0000000..fbe1256
--- /dev/null
+++ b/gnu/usr.bin/rcs/lib/maketime.h
@@ -0,0 +1,39 @@
+/* Yield time_t from struct partime yielded by partime. */
+
+/* Copyright 1993, 1994, 1995 Paul Eggert
+ Distributed under license by the Free Software Foundation, Inc.
+
+This file is part of RCS.
+
+RCS 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.
+
+RCS 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 RCS; see the file COPYING.
+If not, write to the Free Software Foundation,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+Report problems and direct all questions to:
+
+ rcs-bugs@cs.purdue.edu
+
+*/
+
+#if defined(__STDC__) || has_prototypes
+# define __MAKETIME_P(x) x
+#else
+# define __MAKETIME_P(x) ()
+#endif
+
+struct tm *time2tm __MAKETIME_P((time_t,int));
+time_t difftm __MAKETIME_P((struct tm const *, struct tm const *));
+time_t str2time __MAKETIME_P((char const *, time_t, long));
+time_t tm2time __MAKETIME_P((struct tm *, int));
+void adjzone __MAKETIME_P((struct tm *, long));
diff --git a/gnu/usr.bin/rcs/lib/merger.c b/gnu/usr.bin/rcs/lib/merger.c
index 7162ffa..003e0a6 100644
--- a/gnu/usr.bin/rcs/lib/merger.c
+++ b/gnu/usr.bin/rcs/lib/merger.c
@@ -1,6 +1,6 @@
-/* merger - three-way file merge internals */
+/* three-way file merge internals */
-/* Copyright 1991 by Paul Eggert
+/* Copyright 1991, 1992, 1993, 1994, 1995 Paul Eggert
Distributed under license by the Free Software Foundation, Inc.
This file is part of RCS.
@@ -16,8 +16,9 @@ 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 RCS; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+along with RCS; see the file COPYING.
+If not, write to the Free Software Foundation,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Report problems and direct all questions to:
@@ -27,38 +28,40 @@ Report problems and direct all questions to:
#include "rcsbase.h"
-libId(mergerId, "$Id: merger.c,v 1.3 1991/08/20 23:05:00 eggert Exp $")
+libId(mergerId, "$Id: merger.c,v 1.7 1995/06/16 06:19:24 eggert Exp $")
+ static char const *normalize_arg P((char const*,char**));
static char const *
normalize_arg(s, b)
char const *s;
char **b;
/*
* If S looks like an option, prepend ./ to it. Yield the result.
- * Set *B to the address of any storage that was allocated..
+ * Set *B to the address of any storage that was allocated.
*/
{
char *t;
- switch (*s) {
- case '-': case '+':
- *b = t = testalloc(strlen(s) + 3);
- VOID sprintf(t, ".%c%s", SLASH, s);
- return t;
- default:
- *b = 0;
- return s;
+ if (*s == '-') {
+ *b = t = testalloc(strlen(s) + 3);
+ VOID sprintf(t, ".%c%s", SLASH, s);
+ return t;
+ } else {
+ *b = 0;
+ return s;
}
}
int
-merge(tostdout, label, argv)
+merge(tostdout, edarg, label, argv)
int tostdout;
- char const *const label[2];
+ char const *edarg;
+ char const *const label[3];
char const *const argv[3];
/*
- * Do `merge [-p] -L l0 -L l1 a0 a1 a2',
+ * Do `merge [-p] EDARG -L l0 -L l1 -L l2 a0 a1 a2',
* where TOSTDOUT specifies whether -p is present,
- * LABEL gives l0 and l1, and ARGV gives a0, a1, and a2.
+ * EDARG gives the editing type (e.g. "-A", or null for the default),
+ * LABEL gives l0, l1 and l2, and ARGV gives a0, a1 and a2.
* Yield DIFF_SUCCESS or DIFF_FAILURE.
*/
{
@@ -74,30 +77,35 @@ merge(tostdout, label, argv)
for (i=3; 0<=--i; )
a[i] = normalize_arg(argv[i], &b[i]);
+
+ if (!edarg)
+ edarg = "-E";
#if DIFF3_BIN
t = 0;
if (!tostdout)
t = maketemp(0);
s = run(
- (char*)0, t,
- DIFF3, "-am", "-L", label[0], "-L", label[1],
+ -1, t,
+ DIFF3, edarg, "-am",
+ "-L", label[0],
+ "-L", label[1],
+ "-L", label[2],
a[0], a[1], a[2], (char*)0
);
switch (s) {
case DIFF_SUCCESS:
break;
case DIFF_FAILURE:
- if (!quietflag)
- warn("overlaps during merge");
+ warn("conflicts during merge");
break;
default:
exiterr();
}
if (t) {
- if (!(f = fopen(argv[0], FOPEN_W)))
+ if (!(f = fopenSafer(argv[0], "w")))
efaterror(argv[0]);
- if (!(rt = Iopen(t, FOPEN_R, (struct stat*)0)))
+ if (!(rt = Iopen(t, "r", (struct stat*)0)))
efaterror(t);
fastcopy(rt, f);
Ifclose(rt);
@@ -106,29 +114,30 @@ merge(tostdout, label, argv)
#else
for (i=0; i<2; i++)
switch (run(
- (char*)0, d[i]=maketemp(i),
+ -1, d[i]=maketemp(i),
DIFF, a[i], a[2], (char*)0
)) {
case DIFF_FAILURE: case DIFF_SUCCESS: break;
- default: exiterr();
+ default: faterror("diff failed");
}
t = maketemp(2);
s = run(
- (char*)0, t,
- DIFF3, "-E", d[0], d[1], a[0], a[1], a[2],
- label[0], label[1], (char*)0
+ -1, t,
+ DIFF3, edarg, d[0], d[1], a[0], a[1], a[2],
+ label[0], label[2], (char*)0
);
if (s != DIFF_SUCCESS) {
s = DIFF_FAILURE;
- if (!quietflag)
- warn("overlaps or other problems during merge");
+ warn("overlaps or other problems during merge");
}
- if (!(f = fopen(t, "a")))
+ if (!(f = fopenSafer(t, "a+")))
efaterror(t);
aputs(tostdout ? "1,$p\n" : "w\n", f);
- Ofclose(f);
- if (run(t, (char*)0, ED, "-", a[0], (char*)0))
+ Orewind(f);
+ aflush(f);
+ if (run(fileno(f), (char*)0, ED, "-", a[0], (char*)0))
exiterr();
+ Ofclose(f);
#endif
tempunlink();
diff --git a/gnu/usr.bin/rcs/lib/partime.h b/gnu/usr.bin/rcs/lib/partime.h
new file mode 100644
index 0000000..5d3983f
--- /dev/null
+++ b/gnu/usr.bin/rcs/lib/partime.h
@@ -0,0 +1,71 @@
+/* Parse a string, yielding a struct partime that describes it. */
+
+/* Copyright 1993, 1994, 1995 Paul Eggert
+ Distributed under license by the Free Software Foundation, Inc.
+
+This file is part of RCS.
+
+RCS 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.
+
+RCS 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 RCS; see the file COPYING.
+If not, write to the Free Software Foundation,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+Report problems and direct all questions to:
+
+ rcs-bugs@cs.purdue.edu
+
+*/
+
+#define TM_UNDEFINED (-1)
+#define TM_DEFINED(x) (0 <= (x))
+
+#define TM_UNDEFINED_ZONE ((long) -24 * 60 * 60)
+#define TM_LOCAL_ZONE (TM_UNDEFINED_ZONE - 1)
+
+struct partime {
+ /*
+ * This structure describes the parsed time.
+ * Only the following tm_* values in it are used:
+ * sec, min, hour, mday, mon, year, wday, yday.
+ * If TM_UNDEFINED(value), the parser never found the value.
+ * The tm_year field is the actual year, not the year - 1900;
+ * but see ymodulus below.
+ */
+ struct tm tm;
+
+ /*
+ * If !TM_UNDEFINED(ymodulus),
+ * then tm.tm_year is actually modulo ymodulus.
+ */
+ int ymodulus;
+
+ /*
+ * Week of year, ISO 8601 style.
+ * If TM_UNDEFINED(yweek), the parser never found yweek.
+ * Weeks start on Mondays.
+ * Week 1 includes Jan 4.
+ */
+ int yweek;
+
+ /* Seconds east of UTC; or TM_LOCAL_ZONE or TM_UNDEFINED_ZONE. */
+ long zone;
+};
+
+#if defined(__STDC__) || has_prototypes
+# define __PARTIME_P(x) x
+#else
+# define __PARTIME_P(x) ()
+#endif
+
+char *partime __PARTIME_P((char const *, struct partime *));
+char *parzone __PARTIME_P((char const *, long *));
diff --git a/gnu/usr.bin/rcs/lib/rcsmap.c b/gnu/usr.bin/rcs/lib/rcsmap.c
index 0e7b23c..0345ef8 100644
--- a/gnu/usr.bin/rcs/lib/rcsmap.c
+++ b/gnu/usr.bin/rcs/lib/rcsmap.c
@@ -1,7 +1,7 @@
/* RCS map of character types */
/* Copyright (C) 1982, 1988, 1989 Walter Tichy
- Copyright 1990, 1991 by Paul Eggert
+ Copyright 1990, 1991, 1995 by Paul Eggert
Distributed under license by the Free Software Foundation, Inc.
This file is part of RCS.
@@ -17,8 +17,9 @@ 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 RCS; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+along with RCS; see the file COPYING.
+If not, write to the Free Software Foundation,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Report problems and direct all questions to:
@@ -28,7 +29,7 @@ Report problems and direct all questions to:
#include "rcsbase.h"
-libId(mapId, "$Id: rcsmap.c,v 5.2 1991/08/19 03:13:55 eggert Exp $")
+libId(mapId, "$Id: rcsmap.c,v 5.3 1995/06/16 06:19:24 eggert Exp $")
/* map of character types */
/* ISO 8859/1 (Latin-1) */
diff --git a/gnu/usr.bin/rcs/lib/rcstime.c b/gnu/usr.bin/rcs/lib/rcstime.c
new file mode 100644
index 0000000..a49a857
--- /dev/null
+++ b/gnu/usr.bin/rcs/lib/rcstime.c
@@ -0,0 +1,191 @@
+/* Convert between RCS time format and Posix and/or C formats. */
+
+/* Copyright 1992, 1993, 1994, 1995 Paul Eggert
+ Distributed under license by the Free Software Foundation, Inc.
+
+This file is part of RCS.
+
+RCS 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.
+
+RCS 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 RCS; see the file COPYING.
+If not, write to the Free Software Foundation,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+Report problems and direct all questions to:
+
+ rcs-bugs@cs.purdue.edu
+
+*/
+
+#include "rcsbase.h"
+#include "partime.h"
+#include "maketime.h"
+
+libId(rcstimeId, "$Id: rcstime.c,v 1.4 1995/06/16 06:19:24 eggert Exp $")
+
+static long zone_offset; /* seconds east of UTC, or TM_LOCAL_ZONE */
+static int use_zone_offset; /* if zero, use UTC without zone indication */
+
+/*
+* Convert Unix time to RCS format.
+* For compatibility with older versions of RCS,
+* dates from 1900 through 1999 are stored without the leading "19".
+*/
+ void
+time2date(unixtime,date)
+ time_t unixtime;
+ char date[datesize];
+{
+ register struct tm const *tm = time2tm(unixtime, RCSversion<VERSION(5));
+ VOID sprintf(date,
+# if has_printf_dot
+ "%.2d.%.2d.%.2d.%.2d.%.2d.%.2d",
+# else
+ "%02d.%02d.%02d.%02d.%02d.%02d",
+# endif
+ tm->tm_year + ((unsigned)tm->tm_year < 100 ? 0 : 1900),
+ tm->tm_mon+1, tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec
+ );
+}
+
+/* Like str2time, except die if an error was found. */
+static time_t str2time_checked P((char const*,time_t,long));
+ static time_t
+str2time_checked(source, default_time, default_zone)
+ char const *source;
+ time_t default_time;
+ long default_zone;
+{
+ time_t t = str2time(source, default_time, default_zone);
+ if (t == -1)
+ faterror("unknown date/time: %s", source);
+ return t;
+}
+
+/*
+* Parse a free-format date in SOURCE, convert it
+* into RCS internal format, and store the result into TARGET.
+*/
+ void
+str2date(source, target)
+ char const *source;
+ char target[datesize];
+{
+ time2date(
+ str2time_checked(source, now(),
+ use_zone_offset ? zone_offset
+ : RCSversion<VERSION(5) ? TM_LOCAL_ZONE
+ : 0
+ ),
+ target
+ );
+}
+
+/* Convert an RCS internal format date to time_t. */
+ time_t
+date2time(source)
+ char const source[datesize];
+{
+ char s[datesize + zonelenmax];
+ return str2time_checked(date2str(source, s), (time_t)0, 0);
+}
+
+
+/* Set the time zone for date2str output. */
+ void
+zone_set(s)
+ char const *s;
+{
+ if ((use_zone_offset = *s)) {
+ long zone;
+ char const *zonetail = parzone(s, &zone);
+ if (!zonetail || *zonetail)
+ error("%s: not a known time zone", s);
+ else
+ zone_offset = zone;
+ }
+}
+
+
+/*
+* Format a user-readable form of the RCS format DATE into the buffer DATEBUF.
+* Yield DATEBUF.
+*/
+ char const *
+date2str(date, datebuf)
+ char const date[datesize];
+ char datebuf[datesize + zonelenmax];
+{
+ register char const *p = date;
+
+ while (*p++ != '.')
+ continue;
+ if (!use_zone_offset)
+ VOID sprintf(datebuf,
+ "19%.*s/%.2s/%.2s %.2s:%.2s:%s"
+ + (date[2]=='.' && VERSION(5)<=RCSversion ? 0 : 2),
+ (int)(p-date-1), date,
+ p, p+3, p+6, p+9, p+12
+ );
+ else {
+ struct tm t;
+ struct tm const *z;
+ int non_hour;
+ long zone;
+ char c;
+
+ t.tm_year = atoi(date) - (date[2]=='.' ? 0 : 1900);
+ t.tm_mon = atoi(p) - 1;
+ t.tm_mday = atoi(p+3);
+ t.tm_hour = atoi(p+6);
+ t.tm_min = atoi(p+9);
+ t.tm_sec = atoi(p+12);
+ t.tm_wday = -1;
+ zone = zone_offset;
+ if (zone == TM_LOCAL_ZONE) {
+ time_t u = tm2time(&t, 0), d;
+ z = localtime(&u);
+ d = difftm(z, &t);
+ zone = (time_t)-1 < 0 || d < -d ? d : -(long)-d;
+ } else {
+ adjzone(&t, zone);
+ z = &t;
+ }
+ c = '+';
+ if (zone < 0) {
+ zone = -zone;
+ c = '-';
+ }
+ VOID sprintf(datebuf,
+# if has_printf_dot
+ "%.2d-%.2d-%.2d %.2d:%.2d:%.2d%c%.2d",
+# else
+ "%02d-%02d-%02d %02d:%02d:%02d%c%02d",
+# endif
+ z->tm_year + 1900,
+ z->tm_mon + 1, z->tm_mday, z->tm_hour, z->tm_min, z->tm_sec,
+ c, (int) (zone / (60*60))
+ );
+ if ((non_hour = zone % (60*60))) {
+# if has_printf_dot
+ static char const fmt[] = ":%.2d";
+# else
+ static char const fmt[] = ":%02d";
+# endif
+ VOID sprintf(datebuf + strlen(datebuf), fmt, non_hour / 60);
+ if ((non_hour %= 60))
+ VOID sprintf(datebuf + strlen(datebuf), fmt, non_hour);
+ }
+ }
+ return datebuf;
+}
diff --git a/gnu/usr.bin/rcs/lib/version.c b/gnu/usr.bin/rcs/lib/version.c
new file mode 100644
index 0000000..81f5585
--- /dev/null
+++ b/gnu/usr.bin/rcs/lib/version.c
@@ -0,0 +1,2 @@
+#include "rcsbase.h"
+char const RCS_version_string[] = "5.7";
diff --git a/gnu/usr.bin/rcs/merge/merge.1 b/gnu/usr.bin/rcs/merge/merge.1
index 8b1957f..e4860d2 100644
--- a/gnu/usr.bin/rcs/merge/merge.1
+++ b/gnu/usr.bin/rcs/merge/merge.1
@@ -2,22 +2,14 @@
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: merge.1,v 5.3 1991/02/28 19:18:45 eggert Exp $
+.Id $Id: merge.1,v 5.7 1995/06/01 16:23:43 eggert Exp $
.TH MERGE 1 \*(Dt GNU
.SH NAME
merge \- three-way file merge
.SH SYNOPSIS
.B merge
[
-.B \-L
-.I label1
-[
-.B \-L
-.I label3
-] ] [
-.B \-p
-] [
-.B \-q
+.I "options"
]
.I "file1 file2 file3"
.SH DESCRIPTION
@@ -28,11 +20,8 @@ to
.I file3
into
.IR file1 .
-The result goes to standard output if
-.B \-p
-is present, into
-.I file1
-otherwise.
+The result ordinarily goes into
+.IR file1 .
.B merge
is useful for combining separate changes to an original. Suppose
.I file2
@@ -46,57 +35,101 @@ Then
.B merge
combines both changes.
.PP
-An overlap occurs if both
+A conflict occurs if both
.I file1
and
.I file3
have changes in a common segment of lines.
-On a few older hosts where
-.B diff3
-does not support the
-.B \-E
-option,
-.B merge
-does not detect overlaps, and merely supplies the changed lines from
-.I file3.
-On most hosts, if overlaps occur,
+If a conflict is found,
.B merge
-outputs a message (unless the
-.B \-q
-option is given),
-and includes both alternatives
-in the result. The alternatives are delimited as follows:
+normally outputs a warning and brackets the conflict with
+.B <<<<<<<
+and
+.B >>>>>>>
+lines.
+A typical conflict will look like this:
.LP
.RS
.nf
-.BI <<<<<<< " file1"
-.I "lines in file1"
+.BI <<<<<<< " file A"
+.I "lines in file A"
.B "======="
-.I "lines in file3"
-.BI >>>>>>> " file3"
+.I "lines in file B"
+.BI >>>>>>> " file B"
.RE
.fi
.LP
-If there are overlaps, the user should edit the result and delete one of the
+If there are conflicts, the user should edit the result and delete one of the
alternatives.
-If the
-.BI \-L "\ label1"
+.SH OPTIONS
+.TP
+.B \-A
+Output conflicts using the
+.B \-A
+style of
+.BR diff3 (1),
+if supported by
+.BR diff3 .
+This merges all changes leading from
+.I file2
+to
+.I file3
+into
+.IR file1 ,
+and generates the most verbose output.
+.TP
+\f3\-E\fP, \f3\-e\fP
+These options specify conflict styles that generate less information
+than
+.BR \-A .
+See
+.BR diff3 (1)
+for details.
+The default is
+.BR \-E .
+With
+.BR \-e ,
+.B merge
+does not warn about conflicts.
+.TP
+.BI \-L " label"
+This option may be given up to three times, and specifies labels
+to be used in place of the corresponding file names in conflict reports.
+That is,
+.B "merge\ \-L\ x\ \-L\ y\ \-L\ z\ a\ b\ c"
+generates output that looks like it came from files
+.BR x ,
+.B y
and
-.BI \-L "\ label3"
-options are given, the labels are output in place of the names
-.I file1
+.B z
+instead of from files
+.BR a ,
+.B b
and
-.I file3
-in overlap reports.
+.BR c .
+.TP
+.BI \-p
+Send results to standard output instead of overwriting
+.IR file1 .
+.TP
+.BI \-q
+Quiet; do not warn about conflicts.
+.BI \-V
+Print \*r's version number.
.SH DIAGNOSTICS
-Exit status is 0 for no overlaps, 1 for some overlaps, 2 for trouble.
+Exit status is 0 for no conflicts, 1 for some conflicts, 2 for trouble.
.SH IDENTIFICATION
Author: Walter F. Tichy.
.br
-Revision Number: \*(Rv; Release Date: \*(Dt.
+Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
-Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
+Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
-Copyright \(co 1990, 1991 by Paul Eggert.
+Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
.SH SEE ALSO
diff3(1), diff(1), rcsmerge(1), co(1).
+.SH BUGS
+It normally does not make sense to merge binary files as if they were text, but
+.B merge
+tries to do it anyway.
+.br
diff --git a/gnu/usr.bin/rcs/merge/merge.c b/gnu/usr.bin/rcs/merge/merge.c
index 4067c18..44d33a3 100644
--- a/gnu/usr.bin/rcs/merge/merge.c
+++ b/gnu/usr.bin/rcs/merge/merge.c
@@ -1,6 +1,6 @@
/* merge - three-way file merge */
-/* Copyright 1991 by Paul Eggert
+/* Copyright 1991, 1992, 1993, 1994, 1995 Paul Eggert
Distributed under license by the Free Software Foundation, Inc.
This file is part of RCS.
@@ -16,8 +16,9 @@ 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 RCS; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+along with RCS; see the file COPYING.
+If not, write to the Free Software Foundation,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Report problems and direct all questions to:
@@ -27,44 +28,59 @@ Report problems and direct all questions to:
#include "rcsbase.h"
+static void badoption P((char const*));
static char const usage[] =
- "\nmerge: usage: merge [-p] [-q] [-L label1 [-L label3]] file1 file2 file3\n";
+ "\nmerge: usage: merge [-AeEpqxX3] [-L lab [-L lab [-L lab]]] file1 file2 file3";
- static exiting void
+ static void
badoption(a)
char const *a;
{
- faterror("unknown option: %s%s", a-2, usage);
+ error("unknown option: %s%s", a, usage);
}
-mainProg(mergeId, "merge", "$Id: merge.c,v 1.2 1991/08/19 03:13:55 eggert Exp $")
+mainProg(mergeId, "merge", "$Id: merge.c,v 1.8 1995/06/16 06:19:24 eggert Exp $")
{
register char const *a;
- char const *label[2], *arg[3];
+ char const *arg[3], *label[3], *edarg = 0;
int labels, tostdout;
labels = 0;
tostdout = false;
- while ((a = *++argv) && *a++ == '-') {
+ for (; (a = *++argv) && *a++ == '-'; --argc) {
switch (*a++) {
+ case 'A': case 'E': case 'e':
+ if (edarg && edarg[1] != (*argv)[1])
+ error("%s and %s are incompatible",
+ edarg, *argv
+ );
+ edarg = *argv;
+ break;
+
case 'p': tostdout = true; break;
case 'q': quietflag = true; break;
+
case 'L':
- if (1<labels)
+ if (3 <= labels)
faterror("too many -L options");
if (!(label[labels++] = *++argv))
faterror("-L needs following argument");
--argc;
break;
+
+ case 'V':
+ printf("RCS version %s\n", RCS_version_string);
+ exitmain(0);
+
default:
- badoption(a);
+ badoption(a - 2);
+ continue;
}
if (*a)
- badoption(a);
- --argc;
+ badoption(a - 2);
}
if (argc != 4)
@@ -77,19 +93,19 @@ mainProg(mergeId, "merge", "$Id: merge.c,v 1.2 1991/08/19 03:13:55 eggert Exp $"
arg[1] = argv[1];
arg[2] = argv[2];
- switch (labels) {
- case 0: label[0] = arg[0]; /* fall into */
- case 1: label[1] = arg[2];
- }
+ for (; labels < 3; labels++)
+ label[labels] = arg[labels];
- exitmain(merge(tostdout, label, arg));
+ if (nerror)
+ exiterr();
+ exitmain(merge(tostdout, edarg, label, arg));
}
-#if lint
+#if RCS_lint
# define exiterr mergeExit
#endif
- exiting void
+ void
exiterr()
{
tempunlink();
diff --git a/gnu/usr.bin/rcs/rcs/rcs.1 b/gnu/usr.bin/rcs/rcs/rcs.1
index 9866a9c..38daf8b 100644
--- a/gnu/usr.bin/rcs/rcs/rcs.1
+++ b/gnu/usr.bin/rcs/rcs/rcs.1
@@ -2,16 +2,26 @@
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: rcs.1,v 5.6 1991/09/26 23:16:17 eggert Exp $
+.Id $Id: rcs.1,v 5.13 1995/06/05 08:28:35 eggert Exp $
.ds r \&\s-1RCS\s0
.if n .ds - \%--
.if t .ds - \(em
+.if !\n(.g \{\
+. if !\w|\*(lq| \{\
+. ds lq ``
+. if \w'\(lq' .ds lq "\(lq
+. \}
+. if !\w|\*(rq| \{\
+. ds rq ''
+. if \w'\(rq' .ds rq "\(rq
+. \}
+.\}
.TH RCS 1 \*(Dt GNU
.SH NAME
rcs \- change RCS file attributes
.SH SYNOPSIS
.B rcs
-.RI [ " options " ] " file " .\|.\|.
+.IR "options file " .\|.\|.
.SH DESCRIPTION
.B rcs
creates new \*r files or changes attributes of existing ones.
@@ -72,22 +82,29 @@ is omitted, the default
branch is reset to the (dynamically) highest branch on the trunk.
.TP
.BI \-c string
-sets the comment leader to
+Set the comment leader to
.IR string .
-The comment leader
-is printed before every log message line generated by the keyword
-.B $\&Log$
-during checkout (see
-.BR co (1)).
-This is useful for programming
-languages without multi-line comments.
An initial
-.B ci ,
+.BR ci ,
or an
.B "rcs\ \-i"
without
.BR \-c ,
-guesses the comment leader from the suffix of the working file.
+guesses the comment leader from the suffix of the working filename.
+.RS
+.PP
+This option is obsolescent, since \*r normally uses the preceding
+.B $\&Log$
+line's prefix when inserting log lines during checkout (see
+.BR co (1)).
+However, older versions of \*r use the comment leader instead of the
+.B $\&Log$
+line's prefix, so
+if you plan to access a file with both old and new versions of \*r,
+make sure its comment leader matches its
+.B $\&Log$
+line prefix.
+.RE
.TP
.BI \-k subst
Set the default keyword substitution to
@@ -120,9 +137,7 @@ If
.I rev
is omitted, lock the latest revision on the default branch.
Locking prevents overlapping changes.
-A lock is removed with
-.B ci
-or
+If someone else already holds the lock, the lock is broken as with
.B "rcs\ \-u"
(see below).
.TP
@@ -133,7 +148,7 @@ If a branch is given, unlock the latest revision on that branch.
If
.I rev
is omitted, remove the latest lock held by the caller.
-Normally, only the locker of a revision may unlock it.
+Normally, only the locker of a revision can unlock it.
Somebody else unlocking a revision breaks the lock.
This causes a mail message to be sent to the original locker.
The message contains a commentary solicited from the breaker.
@@ -163,6 +178,13 @@ Replace revision
log message with
.IR msg .
.TP
+.B \-M
+Do not send mail when breaking somebody else's lock.
+This option is not meant for casual use;
+it is meant for programs that warn users by other means, and invoke
+.B "rcs\ \-u"
+only as a low-level lock-breaking operation.
+.TP
\f3\-n\fP\f2name\fP[\f3:\fP[\f2rev\fP]]
Associate the symbolic name
.I name
@@ -235,7 +257,7 @@ from revision
.I rev
to the end of the branch containing
.IR rev .
-None of the outdated revisions may have branches or locks.
+None of the outdated revisions can have branches or locks.
.TP
.B \-q
Run quietly; do not print diagnostics.
@@ -247,7 +269,7 @@ Run interactively, even if the standard input is not a terminal.
Set the state attribute of the revision
.I rev
to
-.I state .
+.IR state .
If
.I rev
is a branch number, assume the latest revision on that branch.
@@ -276,7 +298,7 @@ Write descriptive text from the contents of the named
into the \*r file, deleting the existing text.
The
.IR file
-pathname may not begin with
+pathname cannot begin with
.BR \- .
If
.I file
@@ -298,6 +320,19 @@ Write descriptive text from the
.I string
into the \*r file, deleting the existing text.
.TP
+.B \-T
+Preserve the modification time on the \*r file
+unless a revision is removed.
+This option can suppress extensive recompilation caused by a
+.BR make (1)
+dependency of some copy of the working file on the \*r file.
+Use this option with care; it can suppress recompilation even when it is needed,
+i.e. when a change to the \*r file
+would mean a change to keyword strings in the working file.
+.TP
+.BI \-V
+Print \*r's version number.
+.TP
.BI \-V n
Emulate \*r version
.IR n .
@@ -312,6 +347,19 @@ to characterize \*r files.
See
.BR ci (1)
for details.
+.TP
+.BI \-z zone
+Use
+.I zone
+as the default time zone.
+This option has no effect;
+it is present for compatibility with other \*r commands.
+.PP
+At least one explicit option must be given,
+to ensure compatibility with future planned extensions
+to the
+.B rcs
+command.
.SH COMPATIBILITY
The
.BI \-b rev
@@ -359,14 +407,14 @@ The exit status is zero if and only if all operations were successful.
.SH IDENTIFICATION
Author: Walter F. Tichy.
.br
-Revision Number: \*(Rv; Release Date: \*(Dt.
+Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
-Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
+Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
-Copyright \(co 1990, 1991 by Paul Eggert.
+Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
.SH "SEE ALSO"
-co(1), ci(1), ident(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1),
-rcsfile(5)
+rcsintro(1), co(1), ci(1), ident(1), rcsclean(1), rcsdiff(1),
+rcsmerge(1), rlog(1), rcsfile(5)
.br
Walter F. Tichy,
\*r\*-A System for Version Control,
@@ -374,6 +422,15 @@ Walter F. Tichy,
.BR 15 ,
7 (July 1985), 637-654.
.SH BUGS
+A catastrophe (e.g. a system crash) can cause \*r to leave behind
+a semaphore file that causes later invocations of \*r to claim
+that the \*r file is in use.
+To fix this, remove the semaphore file.
+A semaphore file's name typically begins with
+.B ,
+or ends with
+.BR _ .
+.PP
The separator for revision ranges in the
.B \-o
option used to be
diff --git a/gnu/usr.bin/rcs/rcs/rcsfile.5 b/gnu/usr.bin/rcs/rcs/rcsfile.5
index d0dbbb8..5a1929f 100644
--- a/gnu/usr.bin/rcs/rcs/rcsfile.5
+++ b/gnu/usr.bin/rcs/rcs/rcsfile.5
@@ -1,8 +1,11 @@
+.lf 1 ./rcsfile.5in
+.\" Set p to 1 if your formatter can handle pic output.
+.if t .nr p 1
.de Id
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: rcsfile.5,v 5.1 1991/08/19 03:13:55 eggert Exp $
+.Id $Id: rcsfile.5in,v 5.6 1995/06/05 08:28:35 eggert Exp $
.ds r \s-1RCS\s0
.if n .ds - \%--
.if t .ds - \(em
@@ -18,39 +21,43 @@ The text is free format: space, backspace, tab, newline, vertical
tab, form feed, and carriage return (collectively,
.IR "white space")
have no significance except in strings.
-However, an \*r file must end in a newline character.
+However, white space cannot appear within an id, num, or sym,
+and an \*r file must end with a newline.
.PP
Strings are enclosed by
.BR @ .
If a string contains a
.BR @ ,
it must be doubled;
-otherwise, strings may contain arbitrary binary data.
+otherwise, strings can contain arbitrary binary data.
.PP
The meta syntax uses the following conventions: `|' (bar) separates
alternatives; `{' and `}' enclose optional phrases; `{' and `}*' enclose
-phrases that may be repeated zero or more times;
-`{' and '}+' enclose phrases that must appear at least once and may be
+phrases that can be repeated zero or more times;
+`{' and '}+' enclose phrases that must appear at least once and can be
repeated;
Terminal symbols are in
.BR boldface ;
nonterminal symbols are in
.IR italics .
.LP
+.nr w \w'\f3deltatext\fP '
+.nr y \w'\f3newphrase\fP '
+.if \nw<\ny .nr w \ny
.nr x \w'\f3branches\fP'
.nr y \w'{ \f3comment\fP'
.if \nx<\ny .nr x \ny
.nr y \w'\f3{ branch\fP'
.if \nx<\ny .nr x \ny
-.ta \w'\f2deltatext\fP 'u +\w'::= 'u +\nxu+\w' 'u
-.fc ~
+.ta \nwu +\w'::= 'u +\nxu+\w' 'u
+.fc #
.nf
\f2rcstext\fP ::= \f2admin\fP {\f2delta\fP}* \f2desc\fP {\f2deltatext\fP}*
.LP
\f2admin\fP ::= \f3head\fP {\f2num\fP}\f3;\fP
{ \f3branch\fP {\f2num\fP}\f3;\fP }
\f3access\fP {\f2id\fP}*\f3;\fP
- \f3symbols\fP {\f2id\fP \f3:\fP \f2num\fP}*\f3;\fP
+ \f3symbols\fP {\f2sym\fP \f3:\fP \f2num\fP}*\f3;\fP
\f3locks\fP {\f2id\fP \f3:\fP \f2num\fP}*\f3;\fP {\f3strict ;\fP}
{ \f3comment\fP {\f2string\fP}\f3;\fP }
{ \f3expand\fP {\f2string\fP}\f3;\fP }
@@ -71,13 +78,13 @@ nonterminal symbols are in
{ \f2newphrase\fP }*
\f3text\fP \f2string\fP
.LP
-\f2num\fP ::= {\f2digit\fP{\f3.\fP}}+
+\f2num\fP ::= {\f2digit\fP | \f3.\fP}+
.LP
-\f2digit\fP ::= \f30\fP | \f31\fP | .\|.\|. | \f39\fP
+\f2digit\fP ::= \f30\fP | \f31\fP | \f32\fP | \f33\fP | \f34\fP | \f35\fP | \f36\fP | \f37\fP | \f38\fP | \f39\fP
.LP
-\f2id\fP ::= \f2letter\fP{\f2idchar\fP}*
+\f2id\fP ::= {\f2num\fP} \f2idchar\fP {\f2idchar\fP | \f2num\fP}*
.LP
-\f2letter\fP ::= any letter
+\f2sym\fP ::= {\f2digit\fP}* \f2idchar\fP {\f2idchar\fP | \f2digit\fP}*
.LP
\f2idchar\fP ::= any visible graphic character except \f2special\fP
.LP
@@ -91,12 +98,35 @@ nonterminal symbols are in
.fi
.PP
Identifiers are case sensitive. Keywords are in lower case only.
-The sets of keywords and identifiers may overlap.
-In most environments RCS uses the ISO 8859/1 encoding:
-letters are octal codes 101\-132, 141\-172, 300\-326, 330\-366 and 370-377,
+The sets of keywords and identifiers can overlap.
+In most environments \*r uses the \s-1ISO\s0 8859/1 encoding:
visible graphic characters are codes 041\-176 and 240\-377,
and white space characters are codes 010\-015 and 040.
.PP
+Dates, which appear after the
+.B date
+keyword, are of the form
+\f2Y\fP\f3.\fP\f2mm\fP\f3.\fP\f2dd\fP\f3.\fP\f2hh\fP\f3.\fP\f2mm\fP\f3.\fP\f2ss\fP,
+where
+.I Y
+is the year,
+.I mm
+the month (01\-12),
+.I dd
+the day (01\-31),
+.I hh
+the hour (00\-23),
+.I mm
+the minute (00\-59),
+and
+.I ss
+the second (00\-60).
+.I Y
+contains just the last two digits of the year
+for years from 1900 through 1999,
+and all the digits of years thereafter.
+Dates use the Gregorian calendar; times use UTC.
+.PP
The
.I newphrase
productions in the grammar are reserved for future extensions
@@ -131,7 +161,7 @@ All
nodes whose numbers consist of
.RI 2 n
fields
-.RI ( n >=2)
+.RI ( n \(>=2)
(e.g., 3.1.1.1, 2.1.2.2, etc.)
are linked as follows.
All nodes whose first
@@ -151,11 +181,11 @@ field of a node contains a list of the
numbers of the first nodes of all sequences for which it is a branchpoint.
This list is ordered in increasing numbers.
.LP
+The following diagram shows an example of an \*r file's organization.
+.if !\np \{\
.nf
.vs 12
-.ne 38
-Example:
-.if t .in +0.5i
+.ne 36
.cs 1 20
.eo
@@ -195,12 +225,183 @@ Example:
\ /
.ec
-.if t .in
.cs 1
-.ce
-Fig. 1: A revision tree
.vs
.fi
+.\}
+.if \np \{\
+.lf 232
+.PS 4.250i 3.812i
+.\" -2.0625 -4.25 1.75 0
+.\" 0.000i 4.250i 3.812i 0.000i
+.nr 00 \n(.u
+.nf
+.nr 0x 1
+\h'3.812i'
+.sp -1
+.lf 242
+\h'2.062i-(\w'Head'u/2u)'\v'0.125i-(0v/2u)+0v+0.22m'Head
+.sp -1
+\h'2.062i'\v'0.250i'\D'l0.000i 0.500i'
+.sp -1
+\h'2.087i'\v'0.650i'\D'l-0.025i 0.100i'
+.sp -1
+\h'2.062i'\v'0.750i'\D'l-0.025i -0.100i'
+.sp -1
+\h'1.688i'\v'1.250i'\D'l0.750i 0.000i'
+.sp -1
+\h'2.438i'\v'1.250i'\D'l0.000i -0.500i'
+.sp -1
+\h'2.438i'\v'0.750i'\D'l-0.750i 0.000i'
+.sp -1
+\h'1.688i'\v'0.750i'\D'l0.000i 0.500i'
+.sp -1
+.lf 244
+\h'2.062i-(\w'2.1'u/2u)'\v'1.000i-(0v/2u)+0v+0.22m'2.1
+.sp -1
+\h'2.062i'\v'1.250i'\D'l0.000i 0.500i'
+.sp -1
+\h'2.087i'\v'1.650i'\D'l-0.025i 0.100i'
+.sp -1
+\h'2.062i'\v'1.750i'\D'l-0.025i -0.100i'
+.sp -1
+.lf 246
+\h'2.062i-(\w'1.3'u/2u)'\v'2.000i-(1v/2u)+0v+0.22m'1.3
+.sp -1
+\h'2.062i'\v'2.250i'\D'l-0.375i -0.500i'
+.sp -1
+\h'1.688i'\v'1.750i'\D'l0.750i 0.000i'
+.sp -1
+\h'2.438i'\v'1.750i'\D'l-0.375i 0.500i'
+.sp -1
+\h'1.875i'\v'2.000i'\D'~-0.500i 0.000i 0.000i -0.500i'
+.sp -1
+\h'1.350i'\v'1.600i'\D'l0.025i -0.100i'
+.sp -1
+\h'1.375i'\v'1.500i'\D'l0.025i 0.100i'
+.sp -1
+.lf 249
+\h'1.375i-(\w'1.3.1.1'u/2u)'\v'1.250i-(1v/2u)+1v+0.22m'1.3.1.1
+.sp -1
+\h'1.375i'\v'1.000i'\D'l-0.375i 0.500i'
+.sp -1
+\h'1.000i'\v'1.500i'\D'l0.750i 0.000i'
+.sp -1
+\h'1.750i'\v'1.500i'\D'l-0.375i -0.500i'
+.sp -1
+\h'2.062i'\v'2.250i'\D'l0.000i 0.500i'
+.sp -1
+\h'2.087i'\v'2.650i'\D'l-0.025i 0.100i'
+.sp -1
+\h'2.062i'\v'2.750i'\D'l-0.025i -0.100i'
+.sp -1
+.lf 252
+\h'2.062i-(\w'1.2'u/2u)'\v'3.000i-(1v/2u)+0v+0.22m'1.2
+.sp -1
+\h'2.062i'\v'3.250i'\D'l-0.375i -0.500i'
+.sp -1
+\h'1.688i'\v'2.750i'\D'l0.750i 0.000i'
+.sp -1
+\h'2.438i'\v'2.750i'\D'l-0.375i 0.500i'
+.sp -1
+\h'1.875i'\v'3.000i'\D'~-0.500i 0.000i -0.500i 0.000i -0.500i 0.000i 0.000i -0.500i'
+.sp -1
+\h'0.350i'\v'2.600i'\D'l0.025i -0.100i'
+.sp -1
+\h'0.375i'\v'2.500i'\D'l0.025i 0.100i'
+.sp -1
+.lf 255
+\h'0.375i-(\w'1.2.1.1'u/2u)'\v'2.250i-(1v/2u)+1v+0.22m'1.2.1.1
+.sp -1
+\h'0.375i'\v'2.000i'\D'l-0.375i 0.500i'
+.sp -1
+\h'0.000i'\v'2.500i'\D'l0.750i 0.000i'
+.sp -1
+\h'0.750i'\v'2.500i'\D'l-0.375i -0.500i'
+.sp -1
+\h'0.375i'\v'2.000i'\D'l0.000i -0.500i'
+.sp -1
+\h'0.350i'\v'1.600i'\D'l0.025i -0.100i'
+.sp -1
+\h'0.375i'\v'1.500i'\D'l0.025i 0.100i'
+.sp -1
+.lf 257
+\h'0.375i-(\w'1.2.1.3'u/2u)'\v'1.250i-(1v/2u)+1v+0.22m'1.2.1.3
+.sp -1
+\h'0.375i'\v'1.000i'\D'l-0.375i 0.500i'
+.sp -1
+\h'0.000i'\v'1.500i'\D'l0.750i 0.000i'
+.sp -1
+\h'0.750i'\v'1.500i'\D'l-0.375i -0.500i'
+.sp -1
+\h'2.250i'\v'3.000i'\D'~0.500i 0.000i 0.000i -0.500i'
+.sp -1
+\h'2.725i'\v'2.600i'\D'l0.025i -0.100i'
+.sp -1
+\h'2.750i'\v'2.500i'\D'l0.025i 0.100i'
+.sp -1
+.lf 261
+\h'2.750i-(\w'1.2.2.1'u/2u)'\v'2.250i-(1v/2u)+1v+0.22m'1.2.2.1
+.sp -1
+\h'2.750i'\v'2.000i'\D'l-0.375i 0.500i'
+.sp -1
+\h'2.375i'\v'2.500i'\D'l0.750i 0.000i'
+.sp -1
+\h'3.125i'\v'2.500i'\D'l-0.375i -0.500i'
+.sp -1
+\h'2.938i'\v'2.250i'\D'~0.500i 0.000i 0.000i -0.500i 0.000i -0.500i'
+.sp -1
+\h'3.413i'\v'1.350i'\D'l0.025i -0.100i'
+.sp -1
+\h'3.438i'\v'1.250i'\D'l0.025i 0.100i'
+.sp -1
+.lf 264
+\h'3.438i-(\w'\s-21.2.2.1.1.1\s0'u/2u)'\v'1.000i-(1v/2u)+1v+0.22m'\s-21.2.2.1.1.1\s0
+.sp -1
+\h'3.438i'\v'0.750i'\D'l-0.375i 0.500i'
+.sp -1
+\h'3.062i'\v'1.250i'\D'l0.750i 0.000i'
+.sp -1
+\h'3.812i'\v'1.250i'\D'l-0.375i -0.500i'
+.sp -1
+\h'2.750i'\v'2.000i'\D'l0.000i -0.500i'
+.sp -1
+\h'2.725i'\v'1.600i'\D'l0.025i -0.100i'
+.sp -1
+\h'2.750i'\v'1.500i'\D'l0.025i 0.100i'
+.sp -1
+.lf 267
+\h'2.750i-(\w'1.2.2.2'u/2u)'\v'1.250i-(1v/2u)+1v+0.22m'1.2.2.2
+.sp -1
+\h'2.750i'\v'1.000i'\D'l-0.375i 0.500i'
+.sp -1
+\h'2.375i'\v'1.500i'\D'l0.750i 0.000i'
+.sp -1
+\h'3.125i'\v'1.500i'\D'l-0.375i -0.500i'
+.sp -1
+\h'2.062i'\v'3.250i'\D'l0.000i 0.500i'
+.sp -1
+\h'2.087i'\v'3.650i'\D'l-0.025i 0.100i'
+.sp -1
+\h'2.062i'\v'3.750i'\D'l-0.025i -0.100i'
+.sp -1
+.lf 270
+\h'2.062i-(\w'1.1'u/2u)'\v'4.000i-(1v/2u)+0v+0.22m'1.1
+.sp -1
+\h'2.062i'\v'4.250i'\D'l-0.375i -0.500i'
+.sp -1
+\h'1.688i'\v'3.750i'\D'l0.750i 0.000i'
+.sp -1
+\h'2.438i'\v'3.750i'\D'l-0.375i 0.500i'
+.sp -1
+.sp 4.250i+1
+.if \n(00 .fi
+.br
+.nr 0x 0
+.lf 271
+.PE
+.lf 272
+.\}
.PP
.SH IDENTIFICATION
.de VL
@@ -209,13 +410,14 @@ Fig. 1: A revision tree
Author: Walter F. Tichy,
Purdue University, West Lafayette, IN, 47907.
.br
-Revision Number: \*(Rv; Release Date: \*(Dt.
+Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
-Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
+Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
-Copyright \(co 1990, 1991 by Paul Eggert.
+Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
.SH SEE ALSO
-ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsmerge(1), rlog(1),
+rcsintro(1), ci(1), co(1), ident(1), rcs(1), rcsclean(1), rcsdiff(1),
+rcsmerge(1), rlog(1)
.br
Walter F. Tichy,
\*r\*-A System for Version Control,
diff --git a/gnu/usr.bin/rcs/rcs/rcsintro.1 b/gnu/usr.bin/rcs/rcs/rcsintro.1
index a76caa0..fa97043 100644
--- a/gnu/usr.bin/rcs/rcs/rcsintro.1
+++ b/gnu/usr.bin/rcs/rcs/rcsintro.1
@@ -2,10 +2,20 @@
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: rcsintro.1,v 5.1 1991/04/21 12:00:46 eggert Exp $
+.Id $Id: rcsintro.1,v 5.3 1993/11/03 17:42:27 eggert Exp $
.ds r \&\s-1RCS\s0
.if n .ds - \%--
.if t .ds - \(em
+.if !\n(.g \{\
+. if !\w|\*(lq| \{\
+. ds lq ``
+. if \w'\(lq' .ds lq "\(lq
+. \}
+. if !\w|\*(rq| \{\
+. ds rq ''
+. if \w'\(rq' .ds rq "\(rq
+. \}
+.\}
.am SS
.LP
..
@@ -276,11 +286,11 @@ details.
.SH IDENTIFICATION
Author: Walter F. Tichy.
.br
-Revision Number: \*(Rv; Release Date: \*(Dt.
+Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
-Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
+Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
-Copyright \(co 1990, 1991 by Paul Eggert.
+Copyright \(co 1990, 1991, 1992, 1993 Paul Eggert.
.SH "SEE ALSO"
ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1)
.br
diff --git a/gnu/usr.bin/rcs/rcsclean/rcsclean.1 b/gnu/usr.bin/rcs/rcsclean/rcsclean.1
index 07ed722..be58c94 100644
--- a/gnu/usr.bin/rcs/rcsclean/rcsclean.1
+++ b/gnu/usr.bin/rcs/rcsclean/rcsclean.1
@@ -2,7 +2,7 @@
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: rcsclean.1,v 1.8 1991/11/03 01:09:19 eggert Exp $
+.Id $Id: rcsclean.1,v 1.12 1993/11/03 17:42:27 eggert Exp $
.ds r \&\s-1RCS\s0
.if n .ds - \%--
.if t .ds - \(em
@@ -14,7 +14,11 @@ rcsclean \- clean up working files
.RI [ options "] [ " file " .\|.\|. ]"
.SH DESCRIPTION
.B rcsclean
-removes working files that were checked out and never modified.
+removes files that are not being worked on.
+.B "rcsclean \-u"
+also unlocks and removes files that are being worked on
+but have not changed.
+.PP
For each
.I file
given,
@@ -32,13 +36,13 @@ and
.B "rm \-f"
commands on the standard output.
.PP
+Files are paired as explained in
+.BR ci (1).
If no
.I file
is given, all working files in the current directory are cleaned.
Pathnames matching an \*r suffix denote \*r files;
all others denote working files.
-Names are paired as explained in
-.BR ci (1).
.PP
The number of the revision to which the working file is compared
may be attached to any of the options
@@ -58,15 +62,15 @@ uses the latest revision on the default branch, normally the root.
.B rcsclean
is useful for
.B clean
-targets in Makefiles.
+targets in makefiles.
See also
.BR rcsdiff (1),
which prints out the differences,
and
.BR ci (1),
which
-normally asks whether to check in a file
-if it was not changed.
+normally reverts to the previous revision
+if a file was not changed.
.SH OPTIONS
.TP
.BI \-k subst
@@ -89,9 +93,22 @@ Do not log the actions taken on standard output.
.BR \-r [\f2rev\fP]
This option has no effect other than specifying the revision for comparison.
.TP
+.B \-T
+Preserve the modification time on the \*r file
+even if the \*r file changes because a lock is removed.
+This option can suppress extensive recompilation caused by a
+.BR make (1)
+dependency of some other copy of the working file on the \*r file.
+Use this option with care; it can suppress recompilation even when it is needed,
+i.e. when the lock removal
+would mean a change to keyword strings in the other working file.
+.TP
.BR \-u [\f2rev\fP]
Unlock the revision if it is locked and no difference is found.
.TP
+.BI \-V
+Print \*r's version number.
+.TP
.BI \-V n
Emulate \*r version
.IR n .
@@ -106,6 +123,14 @@ to characterize \*r files.
See
.BR ci (1)
for details.
+.TP
+.BI \-z zone
+Use
+.I zone
+as the time zone for keyword substitution;
+see
+.BR co (1)
+for details.
.SH EXAMPLES
.LP
.RS
@@ -147,19 +172,20 @@ Useful
options include
.BR \-q ,
.BR \-V ,
+.BR \-x ,
and
-.BR \-x .
+.BR \-z .
.SH DIAGNOSTICS
The exit status is zero if and only if all operations were successful.
Missing working files and \*r files are silently ignored.
.SH IDENTIFICATION
Author: Walter F. Tichy.
.br
-Revision Number: \*(Rv; Release Date: \*(Dt.
+Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
-Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
+Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
-Copyright \(co 1990, 1991 by Paul Eggert.
+Copyright \(co 1990, 1991, 1992, 1993 Paul Eggert.
.SH "SEE ALSO"
ci(1), co(1), ident(1), rcs(1), rcsdiff(1), rcsintro(1), rcsmerge(1), rlog(1),
rcsfile(5)
diff --git a/gnu/usr.bin/rcs/rcsclean/rcsclean.c b/gnu/usr.bin/rcs/rcsclean/rcsclean.c
index ba24ab7..3d8ecd3 100644
--- a/gnu/usr.bin/rcs/rcsclean/rcsclean.c
+++ b/gnu/usr.bin/rcs/rcsclean/rcsclean.c
@@ -1,6 +1,6 @@
-/* rcsclean - clean up working files */
+/* Clean up working files. */
-/* Copyright 1991 by Paul Eggert
+/* Copyright 1991, 1992, 1993, 1994, 1995 Paul Eggert
Distributed under license by the Free Software Foundation, Inc.
This file is part of RCS.
@@ -16,8 +16,9 @@ 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 RCS; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+along with RCS; see the file COPYING.
+If not, write to the Free Software Foundation,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Report problems and direct all questions to:
@@ -37,16 +38,17 @@ static void cleanup P((void));
static RILE *workptr;
static int exitstatus;
-mainProg(rcscleanId, "rcsclean", "$Id: rcsclean.c,v 5.1 1991/11/03 01:11:44 eggert Exp $")
+mainProg(rcscleanId, "rcsclean", "$Id: rcsclean.c,v 5.9 1995/06/16 06:19:24 eggert Exp $")
{
static char const usage[] =
- "\nrcsclean: usage: rcsclean [-ksubst] [-{nqru}[rev]] [-Vn] [-xsuffixes] [file ...]";
+ "\nrcsclean: usage: rcsclean -ksubst -{nqru}[rev] -T -Vn -xsuff -zzone file ...";
static struct buf revision;
char *a, **newargv;
char const *rev, *p;
- int changelock, expmode, perform, unlocked, unlockflag, waslocked;
+ int dounlock, expmode, perform, unlocked, unlockflag, waslocked;
+ int Ttimeflag;
struct hshentries *deltas;
struct hshentry *delta;
struct stat workstat;
@@ -54,25 +56,26 @@ mainProg(rcscleanId, "rcsclean", "$Id: rcsclean.c,v 5.1 1991/11/03 01:11:44 egge
setrid();
expmode = -1;
- rev = nil;
+ rev = 0;
suffixes = X_DEFAULT;
perform = true;
unlockflag = false;
+ Ttimeflag = false;
argc = getRCSINIT(argc, argv, &newargv);
argv = newargv;
for (;;) {
- if (--argc <= 0) {
+ if (--argc < 1) {
# if has_dirent
argc = get_directory(".", &newargv);
argv = newargv;
break;
# else
- faterror("no file names specified");
+ faterror("no pathnames specified");
# endif
}
a = *++argv;
- if (*a++ != '-')
+ if (!*a || *a++ != '-')
break;
switch (*a++) {
case 'k':
@@ -98,6 +101,12 @@ mainProg(rcscleanId, "rcsclean", "$Id: rcsclean.c,v 5.1 1991/11/03 01:11:44 egge
}
break;
+ case 'T':
+ if (*a)
+ goto unknown;
+ Ttimeflag = true;
+ break;
+
case 'u':
unlockflag = true;
goto handle_revision;
@@ -110,25 +119,42 @@ mainProg(rcscleanId, "rcsclean", "$Id: rcsclean.c,v 5.1 1991/11/03 01:11:44 egge
suffixes = a;
break;
+ case 'z':
+ zone_set(a);
+ break;
+
default:
unknown:
- faterror("unknown option: %s%s", *argv, usage);
+ error("unknown option: %s%s", *argv, usage);
}
}
- do {
+ dounlock = perform & unlockflag;
+
+ if (nerror)
+ cleanup();
+ else
+ for (; 0 < argc; cleanup(), ++argv, --argc) {
+
ffree();
if (!(
- 0 < pairfilenames(
+ 0 < pairnames(
argc, argv,
- unlockflag&perform ? rcswriteopen : rcsreadopen,
+ dounlock ? rcswriteopen : rcsreadopen,
true, true
) &&
- (workptr = Iopen(workfilename,FOPEN_R_WORK,&workstat))
+ (workptr = Iopen(workname, FOPEN_R_WORK, &workstat))
))
continue;
+ if (same_file(RCSstat, workstat, 0)) {
+ rcserror("RCS file is the same as working file %s.",
+ workname
+ );
+ continue;
+ }
+
gettree();
p = 0;
@@ -155,11 +181,13 @@ mainProg(rcscleanId, "rcsclean", "$Id: rcsclean.c,v 5.1 1991/11/03 01:11:44 egge
waslocked = delta && delta->lockedby;
locker_expansion = unlock(delta);
unlocked = locker_expansion & unlockflag;
- changelock = unlocked & perform;
if (unlocked<waslocked && workstat.st_mode&(S_IWUSR|S_IWGRP|S_IWOTH))
continue;
- if (!dorewrite(unlockflag, changelock))
+ if (unlocked && !checkaccesslist())
+ continue;
+
+ if (dorewrite(dounlock, unlocked) != 0)
continue;
if (0 <= expmode)
@@ -174,31 +202,33 @@ mainProg(rcscleanId, "rcsclean", "$Id: rcsclean.c,v 5.1 1991/11/03 01:11:44 egge
getdesc(false);
if (
- !delta ? workstat.st_size!=0 :
+ !delta ? workstat.st_size!=0 :
0 < rcsfcmp(
- workptr, &workstat,
- buildrevision(deltas, delta, (FILE*)0, false),
- delta
+ workptr, &workstat,
+ buildrevision(deltas, delta, (FILE*)0, false),
+ delta
)
)
continue;
if (quietflag < unlocked)
- aprintf(stdout, "rcs -u%s %s\n", delta->num, RCSfilename);
+ aprintf(stdout, "rcs -u%s %s\n", delta->num, RCSname);
- if_advise_access(changelock && deltas->first != delta,
- finptr, MADV_SEQUENTIAL
- );
- if (!donerewrite(changelock))
- continue;
+ if (perform & unlocked) {
+ if_advise_access(deltas->first != delta, finptr, MADV_SEQUENTIAL);
+ if (donerewrite(true,
+ Ttimeflag ? RCSstat.st_mtime : (time_t)-1
+ ) != 0)
+ continue;
+ }
if (!quietflag)
- aprintf(stdout, "rm -f %s\n", workfilename);
+ aprintf(stdout, "rm -f %s\n", workname);
Izclose(&workptr);
- if (perform && un_link(workfilename) != 0)
- eerror(workfilename);
+ if (perform && un_link(workname) != 0)
+ eerror(workname);
- } while (cleanup(), ++argv, 0 < --argc);
+ }
tempunlink();
if (!quietflag)
@@ -213,16 +243,17 @@ cleanup()
Izclose(&finptr);
Izclose(&workptr);
Ozclose(&fcopy);
- Ozclose(&frewrite);
+ ORCSclose();
dirtempunlink();
}
-#if lint
-# define exiterr rcscleanExit
+#if RCS_lint
+# define exiterr rcscleanExit
#endif
- exiting void
+ void
exiterr()
{
+ ORCSerror();
dirtempunlink();
tempunlink();
_exit(EXIT_FAILURE);
@@ -232,7 +263,7 @@ exiterr()
unlock(delta)
struct hshentry *delta;
{
- register struct lock **al, *l;
+ register struct rcslock **al, *l;
if (delta && delta->lockedby && strcmp(getcaller(),delta->lockedby)==0)
for (al = &Locks; (l = *al); al = &l->nextlock)
@@ -269,7 +300,7 @@ get_directory(dirname, aargv)
while ((errno = 0, e = readdir(d))) {
char const *en = e->d_name;
size_t s = strlen(en) + 1;
- if (en[0]=='.' && (!en[1] || en[1]=='.' && !en[2]))
+ if (en[0]=='.' && (!en[1] || (en[1]=='.' && !en[2])))
continue;
if (rcssuffix(en))
continue;
@@ -281,7 +312,12 @@ get_directory(dirname, aargv)
VOID strcpy(a+chars, en);
chars += s;
}
- if (errno || closedir(d) != 0)
+# if void_closedir
+# define close_directory(d) (closedir(d), 0)
+# else
+# define close_directory(d) closedir(d)
+# endif
+ if (errno || close_directory(d) != 0)
efaterror(dirname);
if (chars)
a = trealloc(char, a, chars);
diff --git a/gnu/usr.bin/rcs/rcsdiff/rcsdiff.1 b/gnu/usr.bin/rcs/rcsdiff/rcsdiff.1
index b78bbdd..373c337 100644
--- a/gnu/usr.bin/rcs/rcsdiff/rcsdiff.1
+++ b/gnu/usr.bin/rcs/rcsdiff/rcsdiff.1
@@ -2,7 +2,7 @@
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: rcsdiff.1,v 5.3 1991/04/21 12:00:46 eggert Exp $
+.Id $Id: rcsdiff.1,v 5.5 1993/11/03 17:42:27 eggert Exp $
.ds r \&\s-1RCS\s0
.if n .ds - \%--
.if t .ds - \(em
@@ -20,10 +20,14 @@ rcsdiff \- compare RCS revisions
[
.BI \-r rev2
] ] [
-.BI \-V n
+.B \-T
+] [
+.RI "\f3\-V\fP[" n ]
] [
.BI \-x suffixes
] [
+.BI \-z zone
+] [
.I "diff options"
]
.I "file .\|.\|."
@@ -68,9 +72,11 @@ See
.BR co (1)
for details
about
-.B \-V
+.BR \-T ,
+.BR \-V ,
+.B \-x
and
-.BR \-x .
+.BR \-z .
Otherwise, all options of
.BR diff (1)
that apply to regular files are accepted, with the same meaning as for
@@ -136,11 +142,11 @@ Exit status is 0 for no differences during any comparison,
.SH IDENTIFICATION
Author: Walter F. Tichy.
.br
-Revision Number: \*(Rv; Release Date: \*(Dt.
+Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
-Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
+Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
-Copyright \(co 1990, 1991 by Paul Eggert.
+Copyright \(co 1990, 1991, 1992, 1993 Paul Eggert.
.SH "SEE ALSO"
ci(1), co(1), diff(1), ident(1), rcs(1), rcsintro(1), rcsmerge(1), rlog(1)
.br
diff --git a/gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.sh b/gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.sh
index 4219979..96954f0 100644
--- a/gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.sh
+++ b/gnu/usr.bin/rcs/rcsfreeze/rcsfreeze.sh
@@ -2,7 +2,7 @@
# rcsfreeze - assign a symbolic revision number to a configuration of RCS files
-# $Id: rcsfreeze.sh,v 4.4 1991/04/21 11:58:24 eggert Exp $
+# $Id: rcsfreeze.sh,v 4.6 1993/11/03 17:42:27 eggert Exp $
# The idea is to run rcsfreeze each time a new version is checked
# in. A unique symbolic revision number (C_[number], where number
@@ -25,22 +25,22 @@
# {RCS/}.rcsfreeze.ver version number
# {RCS/}.rscfreeze.log log messages, most recent first
-PATH=/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:/usr/ucb:$PATH
+PATH=/usr/local/bin:/bin:/usr/bin:/usr/ucb:$PATH
export PATH
DATE=`date` || exit
# Check whether we have an RCS subdirectory, so we can have the right
# prefix for our paths.
-if [ -d RCS ]
-then RCSDIR=RCS/
-else RCSDIR=
+if test -d RCS
+then RCSDIR=RCS/ EXT=
+else RCSDIR= EXT=,v
fi
# Version number stuff, log message file
VERSIONFILE=${RCSDIR}.rcsfreeze.ver
LOGFILE=${RCSDIR}.rcsfreeze.log
# Initialize, rcsfreeze never run before in the current directory
-[ -r $VERSIONFILE ] || { echo 0 >$VERSIONFILE && >>$LOGFILE; } || exit
+test -r $VERSIONFILE || { echo 0 >$VERSIONFILE && >>$LOGFILE; } || exit
# Get Version number, increase it, write back to file.
VERSIONNUMBER=`cat $VERSIONFILE` &&
@@ -79,22 +79,21 @@ trap 'rm -f $TMPLOG; exit 1' 1 2 13 15
# combine old and new logfiles
cp $TMPLOG $LOGFILE &&
-rm -f $TMPLOG || exit
-trap 1 2 13 15
+rm -f $TMPLOG &&
# Now the real work begins by assigning a symbolic revision number
-# to each rcs file. Take the most recent version of the main trunk.
+# to each rcs file. Take the most recent version on the default branch.
-status=
-
-for FILE in ${RCSDIR}*
+# If there are any .*,v files, throw them in too.
+# But ignore RCS/.* files that do not end in ,v.
+DOTFILES=
+for DOTFILE in ${RCSDIR}.*,v
do
-# get the revision number of the most recent revision
- HEAD=`rlog -h $FILE` &&
- REV=`echo "$HEAD" | sed -n 's/^head:[ ]*//p'` &&
-# assign symbolic name to it.
- echo >&2 "rcsfreeze: $REV $FILE" &&
- rcs -q -n$SYMREVNAME:$REV $FILE || status=$?
+ if test -f "$DOTFILE"
+ then
+ DOTFILES="${RCSDIR}.*,v"
+ break
+ fi
done
-exit $status
+exec rcs -q -n$SYMREVNAME: ${RCSDIR}*$EXT $DOTFILES
diff --git a/gnu/usr.bin/rcs/rcsmerge/rcsmerge.1 b/gnu/usr.bin/rcs/rcsmerge/rcsmerge.1
index 82871b0..96b6a46 100644
--- a/gnu/usr.bin/rcs/rcsmerge/rcsmerge.1
+++ b/gnu/usr.bin/rcs/rcsmerge/rcsmerge.1
@@ -2,7 +2,7 @@
.ds Rv \\$3
.ds Dt \\$4
..
-.Id $Id: rcsmerge.1,v 5.3 1991/08/19 03:13:55 eggert Exp $
+.Id $Id: rcsmerge.1,v 5.6 1995/06/01 16:23:43 eggert Exp $
.ds r \&\s-1RCS\s0
.if n .ds - \%--
.if t .ds - \(em
@@ -38,6 +38,35 @@ the overlapping regions as explained in
The command is useful for incorporating changes into a checked-out revision.
.SH OPTIONS
.TP
+.B \-A
+Output conflicts using the
+.B \-A
+style of
+.BR diff3 (1),
+if supported by
+.BR diff3 .
+This merges all changes leading from
+.I file2
+to
+.I file3
+into
+.IR file1 ,
+and generates the most verbose output.
+.TP
+\f3\-E\fP, \f3\-e\fP
+These options specify conflict styles that generate less information
+than
+.BR \-A .
+See
+.BR diff3 (1)
+for details.
+The default is
+.BR \-E .
+With
+.BR \-e ,
+.B rcsmerge
+does not warn about conflicts.
+.TP
.BI \-k subst
Use
.I subst
@@ -51,6 +80,11 @@ ignores differences in keyword values when merging the changes from
.B 1.1
to
.BR 1.2 .
+It normally does not make sense to merge binary files as if they were text, so
+.B rcsmerge
+refuses to merge files if
+.B \-kb
+expansion is used.
.TP
.BR \-p [\f2rev\fP]
Send the result to standard output instead of overwriting the working file.
@@ -65,6 +99,13 @@ Here an empty
.I rev
stands for the latest revision on the default branch, normally the head.
.TP
+.B \-T
+This option has no effect;
+it is present for compatibility with other \*r commands.
+.TP
+.BI \-V
+Print \*r's version number.
+.TP
.BI \-V n
Emulate \*r version
.IR n .
@@ -79,6 +120,14 @@ to characterize \*r files.
See
.BR ci (1)
for details.
+.TP
+.BI \-z zone
+Use
+.I zone
+as the time zone for keyword substitution.
+See
+.BR co (1)
+for details.
.SH EXAMPLES
Suppose you have released revision 2.8 of
.BR f.c .
@@ -123,11 +172,11 @@ Exit status is 0 for no overlaps, 1 for some overlaps, 2 for trouble.
.SH IDENTIFICATION
Author: Walter F. Tichy.
.br
-Revision Number: \*(Rv; Release Date: \*(Dt.
+Manual Page Revision: \*(Rv; Release Date: \*(Dt.
.br
-Copyright \(co 1982, 1988, 1989 by Walter F. Tichy.
+Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
.br
-Copyright \(co 1990, 1991 by Paul Eggert.
+Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert.
.SH "SEE ALSO"
ci(1), co(1), ident(1), merge(1), rcs(1), rcsdiff(1), rcsintro(1), rlog(1),
rcsfile(5)
diff --git a/gnu/usr.bin/rcs/rcstest b/gnu/usr.bin/rcs/rcstest
index e0b6c82..47eab4f 100755
--- a/gnu/usr.bin/rcs/rcstest
+++ b/gnu/usr.bin/rcs/rcstest
@@ -1,4 +1,4 @@
-#!/bin/sh
+#! /bin/sh
# Test RCS's functions.
# The RCS commands are searched for in the PATH as usual;
@@ -15,10 +15,10 @@
# The current directory and ./RCS must be readable, writable, and searchable.
-# $Id: rcstest,v 5.8 1991/11/20 17:58:10 eggert Exp $
+# $Id: rcstest,v 5.14 1995/06/16 06:19:24 eggert Exp $
-# Copyright 1990, 1991 by Paul Eggert
+# Copyright 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert
# Distributed under license by the Free Software Foundation, Inc.
#
# This file is part of RCS.
@@ -34,13 +34,23 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with RCS; see the file COPYING. If not, write to
-# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+# along with RCS; see the file COPYING.
+# If not, write to the Free Software Foundation,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Report problems and direct all questions to:
#
# rcs-bugs@cs.purdue.edu
+# The Makefile overrides the following defaults.
+: ${ALL_CFLAGS=-Dhas_conf_h}
+: ${CC=cc}
+: ${DIFF=diff}
+# : ${LDFLAGS=} ${LIBS=} tickles old shell bug
+
+CL="$CC $ALL_CFLAGS $LDFLAGS -o a.out"
+L=$LIBS
+
RCSINIT=-x
export RCSINIT
@@ -55,26 +65,26 @@ case $1 in
*) echo >&2 "$0: usage: $0 [-v]"; exit 2
esac
-test -d RCS || {
- echo >&2 "$0: RCS: not a directory; please \`mkdir RCS' first."
- exit 1
-}
+if test -d RCS
+then rmdir=:
+else rmdir=rmdir; mkdir RCS || exit
+fi
rm -f a.* $RCSfile $RCS_alt $lockfile &&
echo 1.1 >a.11 &&
echo 1.1.1.1 >a.3x1 &&
echo 1.2 >a.12 || { echo "#initialization failed"; exit 2; }
-case `diff -c a.11 a.3x1` in
-*'! 1.1.1.1')
- diff='diff -c';;
+case "`$DIFF -c a.11 a.3x1`" in
+*!\ 1.1.1.1)
+ diff="$DIFF -c";;
*)
- echo "#warning: diff -c does not work, so diagnostics may be cryptic"
- diff=diff
+ echo "#warning: $DIFF -c does not work, so diagnostics may be cryptic"
+ diff=$DIFF
esac
rcs -i -L -ta.11 $q a.c &&
-<$RCSfile || {
+test -r $RCSfile || {
echo "#rcs -i -L failed; perhaps RCS is not properly installed."
exit 1
}
@@ -84,7 +94,7 @@ rm -f $RCSfile || exit 2
cp a.11 a.c &&
ci -ta.11 -mm $q a.c &&
-<$RCSfile &&
+test -r $RCSfile &&
rcs -L $q a.c || { echo "#ci+rcs -L failed"; exit 1; }
test ! -f a.c || { echo "#ci did not remove working file"; exit 1; }
for l in '' '-l'
@@ -99,6 +109,7 @@ ci -mm $q a.c &&
co $q a.c &&
$diff a.12 a.c || { echo "#ci+co failed"; exit 1; }
+rm -f a.c &&
co -r1.1 $q a.c &&
$diff a.11 a.c || { echo "#can't retrieve first revision"; exit 1; }
@@ -108,21 +119,24 @@ ci -r1.1.1 -mm $q a.c &&
co -r1.1.1.1 $q a.c &&
$diff a.3x1 a.c || { echo "#branches failed"; exit 1; }
+rm -f a.c &&
co -l $q a.c &&
ci -f -mm $q a.c &&
co -r1.3 $q a.c &&
$diff a.12 a.c || { echo "#(co -l; ci -f) failed"; exit 1; }
+rm -f a.c &&
co -l $q a.c &&
echo 1.4 >a.c &&
ci -l -mm $q a.c &&
echo error >a.c &&
ci -mm $q a.c || { echo "#ci -l failed"; exit 1; }
+rm -f a.c &&
co -l $q a.c &&
echo 1.5 >a.c &&
ci -u -mm $q a.c &&
-<a.c || { echo "#ci -u didn't create a working file"; exit 1; }
+test -r a.c || { echo "#ci -u didn't create a working file"; exit 1; }
rm -f a.c &&
echo error >a.c || exit 2
ci -mm $q a.c 2>/dev/null && { echo "#ci -u didn't unlock the file"; exit 1; }
@@ -166,42 +180,28 @@ case $LOGNAME in
esac
esac
esac
-date=`date -u 2>/dev/null` ||
-date=`TZ=GMT0 date 2>/dev/null` ||
-date=`TZ= date` || exit 2
-set $date
-case $2 in
-Jan) m=01;; Feb) m=02;; Mar) m=03;; Apr) m=04;; May) m=05;; Jun) m=06;;
-Jul) m=07;; Aug) m=08;; Sep) m=09;; Oct) m=10;; Nov) m=11;; Dec) m=12;;
-*) echo >&2 "$0: $2: unknown month name"; exit 2
-esac
-case $3 in
-?) d=0$3;;
-*) d=$3
-esac
-case $6 in
-[0-9][0-9][0-9][0-9]*) D=$6/$m/$d;;
-*)
- case $5 in
- [0-9][0-9][0-9][0-9]*) D=$5/$m/$d;;
- *) echo >&2 "$0: bad date format: $date"; exit 2
- esac
+
+
+# Get the date of the previous revision in UTC.
+date=`rlog -r a.c | sed -n '/^date: /{ s///; s/;.*//; p; q; }'` || exit
+case $date in
+[0-9][0-9][0-9]*[0-9]/[0-1][0-9]/[0-3][0-9]\ [0-2][0-9]:[0-5][0-9]:[0-6][0-9]);;
+*) echo >&2 "$0: $date: bad rlog date output"; exit 1
esac
-T=$4
-case $PWD in
-'') PWD=`pwd`
-esac &&
+PWD=`pwd` && export PWD &&
+rm -f a.c &&
co -l $q a.c &&
sed 's/@/$/g' >a.kv <<EOF
@Author: w @
-@Date: $D $T @
-@Header: $PWD$SLASH$RCSfile 2.1 $D $T w s @
-@Id: a.c 2.1 $D $T w s @
+@Date: $date @
+@Header: $PWD$SLASH$RCSfile 2.1 $date w s @
+@Id: a.c 2.1 $date w s @
@Locker: @
-@Log: a.c @
- * Revision 2.1 $D $T w
+ * @Log: a.c @
+ * Revision 2.1 $date w
* m
*
+@Name: Oz @
@RCSfile: a.c @
@Revision: 2.1 @
@Source: $PWD$SLASH$RCSfile @
@@ -210,25 +210,28 @@ EOF
test $? = 0 &&
sed 's/:.*\$/$/' a.kv >a.k &&
sed -e 's/w s [$]/w s '"$me"' $/' -e 's/[$]Locker: /&'"$me/" a.kv >a.kvl &&
-sed -e '/^\$/!d' -e 's/\$$/: old $/' a.k >a.o &&
+sed s/Oz//g a.kv >a.e &&
+sed s/Oz/N/g a.kv >a.N &&
+sed -e '/\$/!d' -e 's/\$$/: old $/' a.k >a.o &&
sed -e 's/\$[^ ]*: //' -e 's/ \$//' a.kv >a.v &&
cp a.o a.c &&
-ci -d"$date" -ss -ww -u2.1 -mm $q a.c &&
+ci -d"$date" -nOz -ss -ww -u2.1 -mm $q a.c &&
$diff a.kv a.c || { echo "#keyword expansion failed"; exit 1; }
-co -p -ko $q a.c >a.oo &&
+co -pOz -ko $q a.c >a.oo &&
$diff a.o a.oo || { echo "#co -p -ko failed"; exit 1; }
-cp a.kv a.o || exit 2
-rcs -o2.1 $q a.c &&
+cp a.kv a.o && cp a.o a.b || exit 2
+rcs -oOz $q a.c &&
rcs -l $q a.c &&
ci -k -u $q a.c &&
$diff a.kv a.c || { echo "#ci -k failed"; exit 1; }
-sed '/^[^$]/d' a.kv >a.i &&
+sed -n 's/^[^$]*\$/$/p' a.kv >a.i &&
ident a.c >a.i1 &&
sed -e 1d -e 's/^[ ]*//' a.i1 >a.i2 &&
$diff a.i a.i2 || { echo "#ident failed"; exit 1; }
rcs -i $q a.c 2>/dev/null && { echo "#rcs -i permitted existing file"; exit 1; }
+rm -f a.c &&
co -l $q a.c &&
echo 2.2 >a.c &&
ci -mm $q a.c &&
@@ -259,40 +262,73 @@ rcs -nN:1.1 $q a.c &&
co -rN $q a.c &&
$diff a.11 a.c || { echo "#rcs -n failed"; exit 1; }
+rm -f a.c &&
rcs -NN:2.1 $q a.c &&
co -rN $q a.c &&
-$diff a.kv a.c || { echo "#rcs -N failed"; exit 1; }
+$diff a.N a.c || { echo "#rcs -N failed"; exit 1; }
+rm -f a.c &&
co -l $q a.c &&
-rcs -c':::' $q a.c &&
-echo '$''Log$' >a.c &&
+echo ':::$''Log$' >a.c &&
ci -u -mm $q a.c &&
-test " `sed '$!d' a.c`" = ' :::' || { echo "#rcs -c failed"; exit 1; }
+test " `sed '$!d' a.c`" = ' :::' || { echo "#comment leader failed"; exit 1; }
+rm -f a.c &&
rcs -o2.2: $q a.c &&
co $q a.c &&
-$diff a.kv a.c || { echo "#rcs -o failed"; exit 1; }
+$diff a.e a.c || { echo "#rcs -o failed"; exit 1; }
-rcsdiff -r1.1 -r2.1 $q a.c >a.0
+rcsdiff -r1.1 -rOz $q a.c >a.0
case $? in
1) ;;
*) echo "#rcsdiff bad status"; exit 1
esac
-diff a.11 a.kv >a.1
+$DIFF a.11 a.kv >a.1
$diff a.0 a.1 || { echo "#rcsdiff failed"; exit 1; }
rcs -l2.1 $q a.c || { echo "#rcs -l2.1 failed"; exit 1; }
-for i in k kv kvl o v
+for i in b k kv kvl o v
do
rm -f a.c &&
cp a.$i a.c &&
- rcsdiff -k$i $q a.c || { echo "#rcsdiff -k$i failed"; exit 1; }
+ rcsdiff -k$i -rOz $q a.c || { echo "#rcsdiff -k$i failed"; exit 1; }
done
co -p1.1 -ko $q a.c >a.t &&
$diff a.11 a.t || { echo "#co -p1.1 -ko failed"; exit 1; }
rcs -u2.1 $q a.c || { echo "#rcs -u2.1 failed"; exit 1; }
rm -f a.c &&
+rcsclean $q a.c &&
+rcsclean -u $q a.c || { echo "#rcsclean botched a nonexistent file"; exit 1; }
+
+rm -f a.c &&
+co $q a.c &&
+rcsclean -n $q a.c &&
+rcsclean -n -u $q a.c &&
+test -f a.c || { echo "#rcsclean -n removed a file"; exit 1; }
+
+rm -f a.c &&
+co $q a.c &&
+rcsclean $q a.c &&
+test ! -f a.c || { echo "#rcsclean missed an unlocked file"; exit 1; }
+
+rm -f a.c &&
+co -l $q a.c &&
+rcsclean $q a.c &&
+test -f a.c || { echo "#rcsclean removed a locked file"; exit 1; }
+rcsclean -u $q a.c &&
+test ! -f a.c || {
+ echo "#rcsclean -u missed an unchanged locked file"; exit 1;
+}
+
+rm -f a.c &&
+co -l $q a.c &&
+echo change >>a.c &&
+rcsclean $q a.c &&
+rcsclean $q -u a.c &&
+test -f a.c || { echo "#rcsclean removed a changed file"; exit 1; }
+
+rm -f a.c &&
co -l $q a.c &&
cat >a.c <<'EOF'
2.2
@@ -324,7 +360,7 @@ b1
c
d1
EOF
-rcsmerge -r2.2 -r2.3 $q a.c
+rcsmerge -E -r2.2 -r2.3 $q a.c
case $? in
0)
if $diff a.0 a.c >/dev/null
@@ -343,16 +379,36 @@ case $? in
echo "#rcsmerge bad status"; exit 1
esac
-nl='
-'
+# Avoid `tr' if possible; it's not portable, and it can't handle null bytes.
+# Our substitute exclusive-ORs with '\n';
+# this ensures null bytes on output, which is even better than `tr',
+# since some diffs think a file is binary only if it contains null bytes.
+cat >a.c <<'EOF'
+#include <stdio.h>
+int main() {
+ int c;
+ while ((c=getchar()) != EOF)
+ putchar(c ^ '\n');
+ return 0;
+}
+EOF
+tr=tr
+if (rm -f a.exe a.out && $CL a.c $L >&2) >/dev/null 2>&1
+then
+ if test -s a.out
+ then tr=./a.out
+ elif test -s a.exe
+ then tr=./a.exe
+ fi
+fi
{
- co -p $q a.c | tr "$nl" '\200' >a.24 &&
+ co -p $q a.c | $tr '\012' '\200' >a.24 &&
cp a.24 a.c &&
ciOut=`(ci -l -mm $q a.c 2>&1)` &&
case $ciOut in
?*) echo >&2 "$ciOut"
esac &&
- co -p $q a.c | tr '\200' "$nl" >a.c &&
+ co -p $q a.c | $tr '\200' '\012' >a.c &&
rcsdiff -r2.3 $q a.c >/dev/null &&
echo 2.5 >a.c &&
@@ -378,15 +434,15 @@ locks: strict
access list:
symbolic names:
N: 2.1
+ Oz: 2.1
n: 1.8
-comment leader: ":::"
keyword substitution: kv
total revisions: 13; selected revisions: 1
description:
1.1
----------------------------
revision 2.1
-date: $D $T; author: w; state: s; lines: +13 -1
+date: $date; author: w; state: s; lines: +14 -1
=============================================================================
EOF
test $? = 0 || { echo "#rlog failed"; exit 1; }
@@ -394,4 +450,5 @@ test $? = 0 || { echo "#rlog failed"; exit 1; }
test ! -f $lockfile || { echo "#lock file not removed"; exit 1; }
-exec rm -f a.* $RCSfile $RCS_alt
+rm -f a.* $RCSfile $RCS_alt
+$rmdir RCS
OpenPOWER on IntegriCloud