summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1998-07-13 03:52:21 +0000
committertholo <tholo@openbsd.org>1998-07-13 03:52:21 +0000
commitb6f6614ecf345cfa15dd59c3c624b2ef31ac6aa3 (patch)
tree531a9b11d3cd9c1b06c49bb8ccfc62f5de45fcce /gnu/usr.bin
parentsince i blew up prev commit msg, here it is: (diff)
downloadwireguard-openbsd-b6f6614ecf345cfa15dd59c3c624b2ef31ac6aa3.tar.xz
wireguard-openbsd-b6f6614ecf345cfa15dd59c3c624b2ef31ac6aa3.zip
Latest version from Cyclic
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/cvs/ChangeLog21
-rw-r--r--gnu/usr.bin/cvs/NEWS9
-rw-r--r--gnu/usr.bin/cvs/TESTS11
-rw-r--r--gnu/usr.bin/cvs/contrib/ChangeLog4
-rw-r--r--gnu/usr.bin/cvs/contrib/log.pl11
-rw-r--r--gnu/usr.bin/cvs/doc/ChangeLog93
-rw-r--r--gnu/usr.bin/cvs/doc/RCSFILES65
-rw-r--r--gnu/usr.bin/cvs/doc/cvs.texinfo880
-rw-r--r--gnu/usr.bin/cvs/doc/cvsclient.texi27
-rw-r--r--gnu/usr.bin/cvs/emx/ChangeLog4
-rw-r--r--gnu/usr.bin/cvs/emx/filesubr.c24
-rw-r--r--gnu/usr.bin/cvs/lib/ChangeLog4
-rw-r--r--gnu/usr.bin/cvs/lib/Makefile.in2
-rw-r--r--gnu/usr.bin/cvs/macintosh/ChangeLog15
-rw-r--r--gnu/usr.bin/cvs/macintosh/Makefile.in5
-rw-r--r--gnu/usr.bin/cvs/macintosh/README.MacCVS3
-rw-r--r--gnu/usr.bin/cvs/macintosh/filesubr.c27
-rw-r--r--gnu/usr.bin/cvs/os2/ChangeLog4
-rw-r--r--gnu/usr.bin/cvs/os2/filesubr.c14
-rw-r--r--gnu/usr.bin/cvs/src/ChangeLog358
-rw-r--r--gnu/usr.bin/cvs/src/admin.c20
-rw-r--r--gnu/usr.bin/cvs/src/classify.c10
-rw-r--r--gnu/usr.bin/cvs/src/client.c21
-rw-r--r--gnu/usr.bin/cvs/src/diff.c18
-rw-r--r--gnu/usr.bin/cvs/src/error.c14
-rw-r--r--gnu/usr.bin/cvs/src/filesubr.c42
-rw-r--r--gnu/usr.bin/cvs/src/hardlink.c220
-rw-r--r--gnu/usr.bin/cvs/src/hardlink.h6
-rw-r--r--gnu/usr.bin/cvs/src/history.c43
-rw-r--r--gnu/usr.bin/cvs/src/import.c32
-rw-r--r--gnu/usr.bin/cvs/src/options.h.in13
-rw-r--r--gnu/usr.bin/cvs/src/rcs.h9
-rw-r--r--gnu/usr.bin/cvs/src/recurse.c13
-rw-r--r--gnu/usr.bin/cvs/src/sanity.sh1008
-rw-r--r--gnu/usr.bin/cvs/src/status.c2
-rw-r--r--gnu/usr.bin/cvs/src/version.c2
-rw-r--r--gnu/usr.bin/cvs/src/wrapper.c10
-rw-r--r--gnu/usr.bin/cvs/vms/ChangeLog15
-rw-r--r--gnu/usr.bin/cvs/vms/Makefile.in5
-rw-r--r--gnu/usr.bin/cvs/vms/filesubr.c36
-rw-r--r--gnu/usr.bin/cvs/vms/getpass.c67
-rw-r--r--gnu/usr.bin/cvs/windows-NT/ChangeLog4
-rw-r--r--gnu/usr.bin/cvs/windows-NT/SCC/ChangeLog8
-rw-r--r--gnu/usr.bin/cvs/windows-NT/SCC/README.txt22
-rw-r--r--gnu/usr.bin/cvs/windows-NT/SCC/pubscc.h20
-rw-r--r--gnu/usr.bin/cvs/windows-NT/filesubr.c14
46 files changed, 2145 insertions, 1110 deletions
diff --git a/gnu/usr.bin/cvs/ChangeLog b/gnu/usr.bin/cvs/ChangeLog
index 82ea5ac486e..ed9d5510c62 100644
--- a/gnu/usr.bin/cvs/ChangeLog
+++ b/gnu/usr.bin/cvs/ChangeLog
@@ -1,3 +1,24 @@
+1998-04-28 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * TESTS: Add note about Solaris sort program (reported by Mark
+ D. Baushke).
+
+1998-03-16 Larry Jones <larry.jones@sdrc.com>
+
+ * configure.in: Simplify test for shadow password support since
+ the code now handles the case where shadow passwords are supported
+ but are not in use.
+ * configure: Regenerated.
+
+1998-03-07 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * TESTS: Remove note about SGI's XFS. Someone reports that it
+ works (I would assume due to the 13 Feb 1998, and earlier, changes
+ to sanity.sh).
+
+ * NEWS: Add item about PreservePermissions. Fix unclear wording
+ in gserver item.
+
1998-03-04 Jim Kingdon <kingdon@harvey.cyclic.com>
* acconfig.h, configure.in: Add PRESERVE_PERMISSIONS_SUPPORT and
diff --git a/gnu/usr.bin/cvs/NEWS b/gnu/usr.bin/cvs/NEWS
index 5e746fe6fe1..6d38c9f1c03 100644
--- a/gnu/usr.bin/cvs/NEWS
+++ b/gnu/usr.bin/cvs/NEWS
@@ -1,8 +1,13 @@
Changes since 1.9:
+* There is an optional set of features, enabled by PreservePermissions
+in CVSROOT/config, which allow CVS to store unix-specific file
+information such as permissions, file ownership, and links. See the
+Cederqvist for details.
+
* One can now authenticate and encrypt using the GSSAPI network
-security interface. For details see the description of :gserver: in
-CVSROOT, and the -a global option.
+security interface. For details see the Cederqvist's description of
+specifying :gserver: in CVSROOT, and the -a global option.
* All access to RCS files is now implemented internally rather than by
calling RCS programs. The main user-visible consequence of this is
diff --git a/gnu/usr.bin/cvs/TESTS b/gnu/usr.bin/cvs/TESTS
index fa9697f43ad..97463b56cd9 100644
--- a/gnu/usr.bin/cvs/TESTS
+++ b/gnu/usr.bin/cvs/TESTS
@@ -14,13 +14,14 @@ disks are slow or over-loaded.
The tests work in /tmp/cvs-sanity (which the tests create) by default.
If for some reason you want them to work in a different directory, you
can set the TESTDIR environment variable to the desired location
-before running them. In particular, using SGI's Irix 6, the tests
-will fail if TESTDIR is an XFS filesystem (which /tmp often is);
-you'll want to set TESTDIR to a non-XFS filesystem.
+before running them.
You will probably need GNU expr, which is part of the GNU sh-utils
-package (this is just for running the tests; CVS itself doesn't use
-expr).
+package. You may also need sort from the GNU textutils; Solaris 2.6
+in particular has been reported to have a sort program which does not
+behave the way that the testsuite expects (with Solaris 2.6, lines
+starting with tabs sort before blank lines). These programs are just
+for running the tests; CVS itself doesn't require expr or sort.
If there is some unexpected output, that is a failure which can be
somewhat hard to track down. Finding out which test is producing the
diff --git a/gnu/usr.bin/cvs/contrib/ChangeLog b/gnu/usr.bin/cvs/contrib/ChangeLog
index e0d87e14a10..8bf96a16b54 100644
--- a/gnu/usr.bin/cvs/contrib/ChangeLog
+++ b/gnu/usr.bin/cvs/contrib/ChangeLog
@@ -1,3 +1,7 @@
+1998-05-11 W. Bradley Rubenstein
+
+ * log.pl: Check for errors from open and exec.
+
Sat Feb 21 21:59:45 1998 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (clean): Change "/bin/rm" to "rm".
diff --git a/gnu/usr.bin/cvs/contrib/log.pl b/gnu/usr.bin/cvs/contrib/log.pl
index e4fb9b1d3fb..f1d66e3db02 100644
--- a/gnu/usr.bin/cvs/contrib/log.pl
+++ b/gnu/usr.bin/cvs/contrib/log.pl
@@ -145,7 +145,16 @@ if ($dostatus != 0) {
}
last;
}
- open(RCS, "-|") || exec 'cvs', '-nQq', 'status', '-v', $file;
+ $pid = open(RCS, "-|");
+ if ( !defined $pid )
+ {
+ die "fork failed: $!";
+ }
+ if ($pid == 0)
+ {
+ exec 'cvs', '-nQq', 'status', '-v', $file;
+ die "cvs exec failed: $!";
+ }
while (<RCS>) {
print OUT;
if (MAIL) {
diff --git a/gnu/usr.bin/cvs/doc/ChangeLog b/gnu/usr.bin/cvs/doc/ChangeLog
index 9a01d1b6a79..a779ff62877 100644
--- a/gnu/usr.bin/cvs/doc/ChangeLog
+++ b/gnu/usr.bin/cvs/doc/ChangeLog
@@ -1,3 +1,80 @@
+1998-05-12 Jim Meyering <meyering@ascend.com>
+
+ * cvs.texinfo: Add an info dir entry.
+ Remove trailing white space.
+
+1998-05-05 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Wrappers): Be more explicit that -m 'COPY' has no
+ effect on binary files.
+
+1998-05-02 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * RCSFILES: Add more discussion of the order of the revisions.
+
+1998-04-27 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (loginfo example): Also give example of sending
+ mail. Use internal variable $USER rather than expecting CVS to
+ set the environment variable $USER. Change unnecessary 'sed'
+ invocation to 'cat' (it suffered from the same problem in terms of
+ internal variables versus environment variables).
+
+ * cvs.texinfo (Error messages): Add "conflict: removed FILE was
+ modified by second party".
+
+1998-04-20 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Common options): Update comment about meaning of
+ HEAD in cvs diff.
+
+1998-04-12 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Dates): Also mention log -d.
+
+ * cvs.texinfo (Invoking CVS): No space is allowed between -r or -w
+ and its argument, for the log command.
+
+1998-04-11 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvsclient.texi (Dates): New section, explaining the deal with
+ date formats.
+
+1998-04-09 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Global options, Invoking CVS): Fix typo
+ ("files files" -> "files").
+ (Invoking CVS): Make -q and -Q more concise.
+ (Invoking CVS): Use @var for metavariables in "diff -r".
+
+1998-03-17 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (~/.cvsrc): In example, put "checkout" rather than
+ "co" into .cvsrc; we just finished explaining that only the former
+ works! Thanks to Lenny Foner for reporting this.
+
+ * cvs.texinfo (Copying): Remove this node. This basically
+ restores the status quo prior to 18 Oct 1996 (before then the node
+ existed but was empty).
+ (before Top): Adjust copyright notice accordingly.
+
+1998-03-12 Tim Pierce <twp@skepsis.com>
+
+ * RCSFILES: Updated description of `hardlinks' newphrases.
+
+1998-03-07 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * cvs.texinfo (Tags, Sticky tags, Creating a branch, Accessing
+ branches): Rename release-0-1 tag to rel-0-1 and likewise for
+ release-0-1-patches and release-0-4. This fixes an overfull hbox.
+ (diff options): Reformat table to fix underfull hboxes and such.
+
+1998-03-07 Tim Pierce <twp@skepsis.com>
+
+ * cvs.texinfo (Editing files, Special Files): Document hardlinks.
+ Various cleanups to PreservePermissions text.
+ * RCSFILES: Document PreservePermissions newphrases.
+
1998-03-04 Jim Kingdon <kingdon@harvey.cyclic.com>
* cvs.texinfo (Special Files): Add notes about client/server CVS
@@ -213,13 +290,13 @@ Sun Nov 30 20:38:17 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
* cvs.texinfo (Wrappers): Add comment: we don't document %s.
-Mon Nov 24 23:00:09 1997 Karl Fogel <kfogel@floss.red-bean.com>
+Mon Nov 24 23:00:09 1997 Karl Fogel <kfogel@floss.red-bean.com>
and Jim Kingdon <kingdon@harvey.cyclic.com>
* cvsclient.texi: Move Protocol Notes node to the end.
* cvsclient.texi (Request intro): new node/section.
- (Protocol): added some introductory material.
+ (Protocol): added some introductory material.
Rearranged menu into General Conventions, Protocol specification,
and Example etc sections.
(File Modes): replaces Modes, for consistency.
@@ -418,7 +495,7 @@ Sat Sep 6 11:29:15 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
Fri Sep 5 14:42:39 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
* cvs.texinfo (BUGS): Remove mention of unsupported resources page
- on http://www.cyclic.com, as it might go away in a future
+ on http://www.cyclic.com, as it might go away in a future
reorganization.
* DIFFUTILS-2.7-BUG: Further info from Eggert.
@@ -1229,7 +1306,7 @@ Tue Mar 18 15:50:47 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
(A sample session): Add comment about how we need an introduction
and what might go into one. Also bring in the paragraph from
Basic concepts introducing modules, but comment it out.
- (Viewing differences): Add comment about
+ (Viewing differences): Add comment about
(Basic concepts): Removed; its content has been farmed out as
described above, and as the comment said, it was fundamentally
flawed.
@@ -1544,7 +1621,7 @@ Thu Nov 14 10:22:58 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
chunks, and about atomicity to be focused more on the protocol
than the current implementation.
(Notes): Remove this node. The attempt to describe the basic
- model has pretty much been replaced by the Introduction.
+ model has pretty much been replaced by the Introduction.
The material about how to start the client is incomplete and
better left to cvs.texinfo. And the item about the lack of
SERVER_FLOWCONTROL is obsolete now that SERVER_FLOWCONTROL is the
@@ -1700,7 +1777,7 @@ Mon Sep 30 18:17:34 1996 Greg A. Woods <woods@most.weird.com>
GREPBIN.
(export examples): add one.
(import options): describe the effect of '-b 1'.
-
+
Mon Sep 30 08:09:53 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
* cvs.texinfo: Adjust comments concerning A4 vs. US letter,
@@ -2404,14 +2481,14 @@ Sun Dec 31 10:53:47 1995 Jim Kingdon <kingdon@harvey.cyclic.com>
Sun Dec 24 02:37:51 1995 Karl Fogel <kfogel@floss.cyclic.com>
- * cvs.texinfo (Using the client with password authentication):
+ * cvs.texinfo (Using the client with password authentication):
tixed fypos.
Sun Dec 24 00:00:16 1995 Karl Fogel <kfogel@floss.cyclic.com>
* cvs.texinfo (Remote repositories): use @code{rsh} most places,
because it is the name of a program, and because I am a pedant.
- Refer to new node "Password authenticated".
+ Refer to new node "Password authenticated".
(Password authenticated): new node.
(Setting up the server for password authentication): new node.
(Using the client with password authentication): new node.
diff --git a/gnu/usr.bin/cvs/doc/RCSFILES b/gnu/usr.bin/cvs/doc/RCSFILES
index 6d600b8028b..13c4f93c796 100644
--- a/gnu/usr.bin/cvs/doc/RCSFILES
+++ b/gnu/usr.bin/cvs/doc/RCSFILES
@@ -24,12 +24,33 @@ several other output formats. If you just want some source code to
look at, the part of CVS which applies these is RCS_deltas in
src/rcs.c.
-The first time I read rcsfile.5 I didn't really notice the part about
-the order of the revisions. This order _is_ important and CVS relies
-on it. It is documented but it would be clearer if the example in
-rcsfile.5 also showed the order of the revisions (and the "next" and
-"branch" fields and anything else where it would be useful to have an
-example of how a revision tree is represented in an RCS file).
+The rcsfile.5 documentation only _very_ briefly touches on the order
+of the revisions. The order _is_ important and CVS relies on it.
+Here is an example of what I was able to find, based on the join3
+sanity.sh testcase (and the behavior I am documenting here seems to be
+the same for RCS 5.7 and CVS 1.9.27):
+
+ 1.1 -----------------> 1.2
+ \---> 1.1.2.1 \---> 1.2.2.1
+
+Here is how this shows up in the RCS file (omitting irrelevant parts):
+
+ admin: head 1.2;
+ deltas:
+ 1.2 branches 1.2.2.1; next 1.1;
+ 1.1 branches 1.1.2.1; next;
+ 1.1.2.1 branches; next;
+ 1.2.2.1 branches; next;
+ deltatexts:
+ 1.2
+ 1.2.2.1
+ 1.1
+ 1.1.2.1
+
+Yes, the order seems to differ between the deltas and the deltatexts.
+I have no idea how much of this should actually be considered part of
+the RCS file format, and how much programs reading it should expect to
+encounter any order.
The rcsfile.5 grammar shows the {num} after "next" as optional; if it
is omitted then there is no next delta node (for example 1.1 or the
@@ -62,6 +83,38 @@ rules.
the current CVS death support, which uses a state "dead"
rather than a "dead" newphrase.
+CVS does use newphrases to implement the `PreservePermissions'
+extension introduced in CVS 1.9.26. The following new keywords are
+defined when PreservePermissions=yes:
+
+ owner
+ group
+ permissions
+ special
+ symlink
+ hardlinks
+
+The contents of the `owner' and `group' field should be a numeric uid
+and a numeric gid, respectively, representing the user and group who
+own the file. The `permissions' field contains an octal integer,
+representing the permissions that should be applied to the file. The
+`special' field contains two words; the first must be either `block'
+or `character', and the second is the file's device number. The
+`symlink' field should be present only in files which are symbolic
+links to other files, and absent on all regular files. The
+`hardlinks' field contains a list of filenames to which the current
+file is linked, in alphabetical order. Because files often contain
+characters special to RCS, like `.' and sometimes even contain spaces
+or eight-bit characters, the filenames in the hardlinks field will
+usually be enclosed in RCS strings. For example:
+
+ hardlinks README @install.txt@ @Installation Notes@;
+
+The hardlinks field should always include the name of the current
+file. That is, in the repository file README,v, any hardlinks fields
+in the delta nodes should include `README'; CVS will not operate
+properly if this is not done.
+
The rules regarding keyword expansion are not documented along with
the rest of the RCS file format; they are documented in the co(1)
manpage in the RCS 5.7 distribution. See also the "Keyword
diff --git a/gnu/usr.bin/cvs/doc/cvs.texinfo b/gnu/usr.bin/cvs/doc/cvs.texinfo
index 55585386264..2796731b68e 100644
--- a/gnu/usr.bin/cvs/doc/cvs.texinfo
+++ b/gnu/usr.bin/cvs/doc/cvs.texinfo
@@ -22,7 +22,7 @@
@c If one prints US letter on A4, reportedly there is
@c some extra space at the top and/or bottom, and the side
@c margins are a bit narrow, but no text is lost.
-@c
+@c
@c See
@c http://www.ft.uni-erlangen.de/~mskuhn/iso-paper.html
@c for more on paper sizes. Insuring that margins are
@@ -49,6 +49,14 @@
@c problems (as opposed to FIXCVS for CVS problems).
@ifinfo
+@format
+START-INFO-DIR-ENTRY
+* CVS: (cvs). Concurrent Versions System
+END-INFO-DIR-ENTRY
+@end format
+@end ifinfo
+
+@ifinfo
Copyright @copyright{} 1992, 1993 Signum Support AB
Copyright @copyright{} 1993, 1994 Free Software Foundation, Inc.
@@ -65,15 +73,13 @@ notice identical to this one except for the removal of this paragraph
@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
-section entitled ``GNU General Public License'' is included exactly as
-in the original, and provided that the entire resulting derived work is
-distributed under the terms of a permission notice identical to this one.
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
-except that the section entitled ``GNU General Public License'' and
-this permission notice may be included in translations approved by the
-Free Software Foundation instead of in the original English.
+except that this permission notice may be stated in a translation
+approved by the Free Software Foundation.
@end ifinfo
@comment The titlepage section does not appear in the Info file.
@@ -103,15 +109,13 @@ are preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
-section entitled ``GNU General Public License'' is included exactly as
-in the original, and provided that the entire resulting derived work is
-distributed under the terms of a permission notice identical to this one.
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
-except that the section entitled ``GNU General Public License'' and
-this permission notice may be included in translations approved by the
-Free Software Foundation instead of in the original English.
+except that this permission notice may be stated in a translation
+approved by the Free Software Foundation.
@end titlepage
@comment ================================================================
@@ -121,7 +125,7 @@ Free Software Foundation instead of in the original English.
@ifinfo
@c ---------------------------------------------------------------------
@node Top
-@top
+@top
@c Note: there is a space after that @top command.
@c The texinfo-format-buffer Emacs function and
@c the makeinfo shell command disagree on what arguments
@@ -164,7 +168,6 @@ References.
* Troubleshooting:: Some tips when nothing works
* Credits:: Some of the contributors to this manual
* BUGS:: Dealing with bugs in CVS or this manual
-* Copying:: GNU GENERAL PUBLIC LICENSE
* Index:: Index
@end menu
@@ -262,7 +265,7 @@ http://www.loria.fr/~molli/cvs-index.html
@c line, thus avoiding overfull hboxes.
There is a mailing list, known as @w{@code{info-cvs}},
devoted to @sc{cvs}. To subscribe or
-unsubscribe
+unsubscribe
@c could add "to the mailing list,"
send a message to
@c or "write to"
@@ -456,10 +459,10 @@ only once they have been proven.
@c people who read in order get dumped right into all
@c manner of hair regarding remote repositories,
@c creating a repository, etc.
-@c
+@c
@c The following was in the old Basic concepts node. I don't
@c know how good a job it does at introducing modules,
-@c or whether they need to be introduced so soon, but
+@c or whether they need to be introduced so soon, but
@c something of this sort might go into some
@c introductory material somewhere.
@ignore
@@ -818,7 +821,7 @@ override the @code{$CVSROOT} environment variable.
Once you've checked a working copy out from the
repository, it will remember where its repository is
(the information is recorded in the
-@file{CVS/Root} file in the working copy).
+@file{CVS/Root} file in the working copy).
The @code{-d} option and the @file{CVS/Root} file both
override the @code{$CVSROOT} environment variable. If
@@ -862,7 +865,7 @@ the file permissions appropriate for the repository.
@c @cindex filenames, legal
@c @cindex legal filenames
@c Somewhere we need to say something about legitimate
-@c characters in filenames in working directory and
+@c characters in filenames in working directory and
@c repository. Not "/" (not even on non-unix). And
@c here is a specific set of issues:
@c Files starting with a - are handled inconsistently. They can not
@@ -894,31 +897,31 @@ directories):
+--@t{local}
| |
| +--@t{cvsroot}
- | | |
+ | | |
| | +--@t{CVSROOT}
- | (administrative files)
- |
+ | (administrative files)
+ |
+--@t{gnu}
- | |
+ | |
| +--@t{diff}
- | | (source code to @sc{gnu} diff)
- | |
+ | | (source code to @sc{gnu} diff)
+ | |
| +--@t{rcs}
| | (source code to @sc{rcs})
- | |
+ | |
| +--@t{cvs}
- | (source code to @sc{cvs})
- |
+ | (source code to @sc{cvs})
+ |
+--@t{yoyodyne}
- |
+ |
+--@t{tc}
| |
| +--@t{man}
| |
| +--@t{testing}
- |
+ |
+--(other Yoyodyne software)
-@end example
+@end example
With the directories are @dfn{history files} for each file
under version control. The name of the history file is
@@ -943,7 +946,7 @@ the @file{yoyodyne/tc} directory might look like:
+--@t{man}
| |
| +--@t{tc.1,v}
- |
+ |
+--@t{testing}
|
+--@t{testpgm.t,v}
@@ -1068,18 +1071,18 @@ of @sc{cvs}; do not rely on the setting of
@code{CVSUMASK} on the client having no effect.
@c FIXME: need to explain what a umask is or cite
@c someplace which does.
-@c
+@c
@c There is also a larger (largely separate) issue
@c about the meaning of CVSUMASK in a non-unix context.
@c For example, whether there is
@c an equivalent which fits better into other
@c protection schemes like POSIX.6, VMS, &c.
-@c
+@c
@c FIXME: Need one place which discusses this
@c read-only files thing. Why would one use -r or
@c CVSREAD? Why would one use watches? How do they
@c interact?
-@c
+@c
@c FIXME: We need to state
@c whether using CVSUMASK removes the need for manually
@c fixing permissions (in fact, if we are going to mention
@@ -1277,10 +1280,10 @@ differences.
For each administrative file, in addition to the
@sc{rcs} file, there is also a checked out copy of the
file. For example, there is an @sc{rcs} file
-@file{loginfo,v} and a file @file{loginfo} which
+@file{loginfo,v} and a file @file{loginfo} which
contains the latest revision contained in
@file{loginfo,v}. When you check in an administrative
-file, @sc{cvs} should print
+file, @sc{cvs} should print
@example
cvs commit: Rebuilding administrative file database
@@ -1678,7 +1681,7 @@ It is possible to commit an erroneous administrative
file. You can often fix the error and check in a new
revision, but sometimes a particularly bad error in the
administrative file makes it impossible to commit new
-revisions.
+revisions.
@c @xref{Bad administrative files} for a hint
@c about how to solve such situations.
@c -- administrative file checking--
@@ -1958,7 +1961,7 @@ directory, or two megabytes, whichever is larger.
@c documenting the default configuration of CVS. If it
@c is a "standard" thing to change that value, it
@c should be some kind of run-time configuration.
-@c
+@c
@c See cvsclient.texi for more on the design decision
@c to not have locks in place while waiting for the
@c client, which is what results in memory consumption
@@ -2185,8 +2188,8 @@ to reread its initialization files.
@c this. One strange situation I ran into recently
@c was that if inetd.conf specifies a non-existent
@c cvs (e.g. /usr/local/bin/cvs doesn't exist in
-@c the above example), the client says
-@c cvs-1.8 [login aborted]: unrecognized auth response from harvey:
+@c the above example), the client says
+@c cvs-1.8 [login aborted]: unrecognized auth response from harvey:
@c which is a very unhelpful response (can it be
@c improved? does inetd log somewhere?)
@@ -2299,8 +2302,8 @@ argument or the @code{CVSROOT} environment variable.
password:
@example
-cvs -d :pserver:bach@@chainsaw.yard.com:/usr/local/cvsroot login
-CVS password:
+cvs -d :pserver:bach@@chainsaw.yard.com:/usr/local/cvsroot login
+CVS password:
@end example
The password is checked with the server; if it is
@@ -2531,7 +2534,7 @@ other access methods do not have explicit support for
read-only users because those methods all assume login
access to the repository machine anyway, and therefore
the user can do whatever local file permissions allow
-her to do.)
+her to do.)
A user who has read-only access can do only
those @sc{cvs} operations which do not modify the
@@ -2613,7 +2616,7 @@ read-only access.
@cindex server, temporary directories
While running, the @sc{cvs} server creates temporary
-directories. They are named
+directories. They are named
@example
cvs-serv@var{pid}
@@ -2848,7 +2851,7 @@ vary). See the comments in the script for details.
@node From scratch
@subsection Creating a directory tree from scratch
-@c Also/instead should be documenting
+@c Also/instead should be documenting
@c $ cvs co -l .
@c $ mkdir tc
@c $ cvs add tc
@@ -3106,7 +3109,7 @@ is expected that future names which are special to
starting with @samp{.}, rather than being named analogously to
@code{BASE} and @code{HEAD}, to avoid conflicts with
actual tag names.
-@c Including a character such as % or = has also been
+@c Including a character such as % or = has also been
@c suggested as the naming convention for future
@c special tag names. Starting with . is nice because
@c that is not a legal tag name as far as RCS is concerned.
@@ -3147,7 +3150,7 @@ command in the directory where @file{backend.c}
resides.
@example
-$ cvs tag release-0-4 backend.c
+$ cvs tag rel-0-4 backend.c
T backend.c
$ cvs status -v backend.c
===================================================================
@@ -3160,7 +3163,7 @@ File: backend.c Status: Up-to-date
Sticky Options: (none)
Existing Tags:
- release-0-4 (revision: 1.4)
+ rel-0-4 (revision: 1.4)
@end example
@@ -3170,7 +3173,7 @@ strategic points in the development life-cycle, such as when a release
is made.
@example
-$ cvs tag release-1-0 .
+$ cvs tag rel-1-0 .
cvs tag: Tagging .
T Makefile
T backend.c
@@ -3191,7 +3194,7 @@ retrieve the sources that make up release 1.0 of the module @samp{tc} at
any time in the future:
@example
-$ cvs checkout -r release-1-0 tc
+$ cvs checkout -r rel-1-0 tc
@end example
@noindent
@@ -3278,7 +3281,7 @@ File: driver.c Status: Up-to-date
Version: 1.7.2.1 Sat Dec 5 19:35:03 1992
RCS Version: 1.7.2.1 /u/cvsroot/yoyodyne/tc/driver.c,v
- Sticky Tag: release-1-0-patches (branch: 1.7.2)
+ Sticky Tag: rel-1-0-patches (branch: 1.7.2)
Sticky Date: (none)
Sticky Options: (none)
@@ -3340,7 +3343,7 @@ Checking in file1;
/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1
new revision: 1.3; previous revision: 1.2
done
-$
+$
@end example
@c ---------------------------------------------------------------------
@@ -3422,20 +3425,20 @@ You can create a branch with @code{tag -b}; for
example, assuming you're in a working copy:
@example
-$ cvs tag -b release-1-0-patches
+$ cvs tag -b rel-1-0-patches
@end example
@c FIXME: we should be more explicit about the value of
@c having a tag on the branchpoint. For example
-@c "cvs tag release-1-0-patches-branchpoint" before
+@c "cvs tag rel-1-0-patches-branchpoint" before
@c the "cvs tag -b". This points out that
-@c release-1-0-patches is a pretty awkward name for
+@c rel-1-0-patches is a pretty awkward name for
@c this example (more so than for the rtag example
@c below).
This splits off a branch based on the current revisions
in the working copy, assigning that branch the name
-@samp{release-1-0-patches}.
+@samp{rel-1-0-patches}.
It is important to understand that branches get created
in the repository, not in the working copy. Creating a
@@ -3448,12 +3451,12 @@ You can also create a branch without reference to any
working copy, by using @code{rtag}:
@example
-$ cvs rtag -b -r release-1-0 release-1-0-patches tc
+$ cvs rtag -b -r rel-1-0 rel-1-0-patches tc
@end example
-@samp{-r release-1-0} says that this branch should be
+@samp{-r rel-1-0} says that this branch should be
rooted at the revision that
-corresponds to the tag @samp{release-1-0}. It need not
+corresponds to the tag @samp{rel-1-0}. It need not
be the most recent revision -- it's often useful to
split a branch off an old revision (for example, when
fixing a bug in a past release otherwise known to be
@@ -3462,13 +3465,13 @@ stable).
As with @samp{tag}, the @samp{-b} flag tells
@code{rtag} to create a branch (rather than just a
symbolic revision name). Note that the numeric
-revision number that matches @samp{release-1-0} will
+revision number that matches @samp{rel-1-0} will
probably be different from file to file.
So, the full effect of the command is to create a new
-branch -- named @samp{release-1-0-patches} -- in module
+branch -- named @samp{rel-1-0-patches} -- in module
@samp{tc}, rooted in the revision tree at the point tagged
-by @samp{release-1-0}.
+by @samp{rel-1-0}.
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Accessing branches
@@ -3491,21 +3494,21 @@ To check out a branch from the repository, invoke
the tag name of the branch (@pxref{Creating a branch}):
@example
-$ cvs checkout -r release-1-0-patches tc
+$ cvs checkout -r rel-1-0-patches tc
@end example
Or, if you already have a working copy, you can switch
it to a given branch with @samp{update -r}:
@example
-$ cvs update -r release-1-0-patches tc
+$ cvs update -r rel-1-0-patches tc
@end example
or equivalently:
@example
$ cd tc
-$ cvs update -r release-1-0-patches
+$ cvs update -r rel-1-0-patches
@end example
It does not matter if the working copy was originally
@@ -3535,34 +3538,34 @@ File: driver.c Status: Up-to-date
Version: 1.7 Sat Dec 5 18:25:54 1992
RCS Version: 1.7 /u/cvsroot/yoyodyne/tc/driver.c,v
- Sticky Tag: release-1-0-patches (branch: 1.7.2)
+ Sticky Tag: rel-1-0-patches (branch: 1.7.2)
Sticky Date: (none)
Sticky Options: (none)
Existing Tags:
- release-1-0-patches (branch: 1.7.2)
- release-1-0 (revision: 1.7)
+ rel-1-0-patches (branch: 1.7.2)
+ rel-1-0 (revision: 1.7)
===================================================================
File: backend.c Status: Up-to-date
Version: 1.4 Tue Dec 1 14:39:01 1992
RCS Version: 1.4 /u/cvsroot/yoyodyne/tc/backend.c,v
- Sticky Tag: release-1-0-patches (branch: 1.4.2)
+ Sticky Tag: rel-1-0-patches (branch: 1.4.2)
Sticky Date: (none)
Sticky Options: (none)
Existing Tags:
- release-1-0-patches (branch: 1.4.2)
- release-1-0 (revision: 1.4)
- release-0-4 (revision: 1.4)
+ rel-1-0-patches (branch: 1.4.2)
+ rel-1-0 (revision: 1.4)
+ rel-0-4 (revision: 1.4)
@end example
Don't be confused by the fact that the branch numbers
for each file are different (@samp{1.7.2} and
@samp{1.4.2} respectively). The branch tag is the
-same, @samp{release-1-0-patches}, and the files are
+same, @samp{rel-1-0-patches}, and the files are
indeed on the same branch. The numbers simply reflect
the point in each file's revision history at which the
branch was made. In the above example, one can deduce
@@ -3592,7 +3595,7 @@ However, @sc{cvs} is not limited to linear development. The
@dfn{revision tree} can be split into @dfn{branches},
where each branch is a self-maintained line of
development. Changes made on one branch can easily be
-moved back to the main trunk.
+moved back to the main trunk.
Each branch has a @dfn{branch number}, consisting of an
odd number of period-separated decimal integers. The
@@ -3933,7 +3936,7 @@ structure:
| +--@t{CVS}
| | (internal @sc{cvs} files)
| +--@t{tc.1}
- |
+ |
+--@t{testing}
|
+--@t{CVS}
@@ -3956,7 +3959,7 @@ cvs update testing/testpgm.t testing/test2.t
@item
@samp{cvs update testing man} updates all files in the
-subdirectories
+subdirectories
@item
@samp{cvs update .} or just @samp{cvs update} updates
@@ -4038,7 +4041,7 @@ not recursive. You cannot even type @samp{cvs add
foo/bar}! Instead, you have to
@c FIXCVS: This is, of course, not a feature. It is
@c just that no one has gotten around to fixing "cvs add
-@c foo/bar".
+@c foo/bar".
@example
$ cd foo
@@ -4084,7 +4087,7 @@ For example, the following commands add the file
@file{backend.c} to the repository:
@c This example used to specify
-@c -m "Optimizer and code generation passes."
+@c -m "Optimizer and code generation passes."
@c to the cvs add command, but that doesn't work
@c client/server (see log2 in sanity.sh). Should fix CVS,
@c but also seems strange to document things which
@@ -4347,7 +4350,7 @@ to remove @var{old} from the repository, and add
@example
$ mv @var{old} @var{new}
$ cvs remove @var{old}
-$ cvs add @var{new}
+$ cvs add @var{new}
$ cvs commit -m "Renamed @var{old} to @var{new}" @var{old} @var{new}
@end example
@@ -4552,7 +4555,7 @@ source. You are not affected by modifications made by
others until you decide to incorporate those changes
(via the @code{update} command---@pxref{update}).
-@item
+@item
Traceability---When something has changed, you can
always see @emph{exactly} what changed.
@end itemize
@@ -4917,7 +4920,7 @@ check it in as a binary file. The @code{cvs
admin -kb} command sets the default keyword
substitution method for this file, but it does not
alter the working copy of the file that you have. If you need to
-cope with line endings (that is, you are using
+cope with line endings (that is, you are using
@sc{cvs} on a non-unix system), then you need to
check in a new copy of the file, as shown by the
@code{cvs commit} command above.
@@ -4961,7 +4964,7 @@ considerably with the operating system.
@c
@c Another, probably better, way to tell is to read the
@c file in text mode, write it to a temp file in text
-@c mode, and then do a binary mode compare of the two
+@c mode, and then do a binary mode compare of the two
@c files. If they differ, it is a binary file. This
@c might have problems on VMS (or some other system
@c with several different text modes), but in general
@@ -5210,7 +5213,7 @@ resolve the conflict as described in @ref{Conflicts example}.
@sc{Cvs} doesn't know anything about this file. For
example, you have created a new file and have not run
@code{add}.
-@c
+@c
@c "Entry Invalid" and "Classify Error" are also in the
@c status.c. The latter definitely indicates a CVS bug
@c (should it be worded more like "internal error" so
@@ -5496,7 +5499,7 @@ check in the file.
@c The old behavior was really icky; the only way out
@c was to start hacking on
@c the @code{CVS/Entries} file or other such workarounds.
-@c
+@c
@c If the timestamp thing isn't considered nice enough,
@c maybe there should be a "cvs resolved" command
@c which clears the conflict indication. For a nice user
@@ -5857,7 +5860,7 @@ receive notifications, she should specify @code{-a none}.
The @var{files} and options are processed as for the @code{cvs
watch} commands.
-@strong{Caution:} If the @var{PreservePermissions}
+@strong{Caution:} If the @code{PreservePermissions}
option is enabled in the repository (@pxref{config}),
CVS will not change the permissions on any of the
@var{files}. The reason for this change is to ensure
@@ -6110,7 +6113,7 @@ a new revision of the file.
@section Keyword List
@cindex Keyword List
-@c FIXME: need some kind of example here I think,
+@c FIXME: need some kind of example here I think,
@c perhaps in a
@c "Keyword intro" node. The intro in the "Keyword
@c substitution" node itself seems OK, but to launch
@@ -6170,7 +6173,7 @@ file contains
* $@asis{}Log: frob.c,v $
* Revision 1.1 1997/01/03 14:23:51 joe
* Add the superfrobnicate option
- *
+ *
*/
@end example
@@ -6218,7 +6221,7 @@ C source code. This example shows the first few lines
of a typical file, after keyword substitution has been
performed:
-@c Hmm. Someone says that
+@c Hmm. Someone says that
@c "static const char rcsid[] = "foo"
@c is a simpler way to shut up GCC. But I really
@c suspect that we should be avoiding specifics in general
@@ -6232,7 +6235,7 @@ static char *rcsid="$@asis{}Id: samp.c,v 1.5 1993/10/19 14:57:32 ceder Exp $";
/* @r{The following lines will prevent @code{gcc} version 2.@var{x}}
@r{from issuing an "unused variable" warning}. */
#if __GNUC__ == 2
-#define USE(var) static void * use_##var = (&use_##var, (void *) &var)
+#define USE(var) static void * use_##var = (&use_##var, (void *) &var)
USE (rcsid);
#endif
@end example
@@ -6282,7 +6285,7 @@ Keyword substitution has its disadvantages. Sometimes
you might want the literal text string
@samp{$@asis{}Author$} to appear inside a file without
@sc{cvs} interpreting it as a keyword and expanding it
-into something like @samp{$@asis{}Author: ceder $}.
+into something like @samp{$@asis{}Author: ceder $}.
There is unfortunately no way to selectively turn off
keyword substitution. You can use @samp{-ko}
@@ -6767,6 +6770,13 @@ is Odin (see
@node Special Files
@chapter Special Files
+@cindex special files
+@cindex device nodes
+@cindex ownership, saving in CVS
+@cindex permissions, saving in CVS
+@cindex hard links
+@cindex symbolic links
+
In normal circumstances, CVS works only with regular
files. Every file in a project is assumed to be
persistent; it must be possible to open, read and close
@@ -6778,34 +6788,67 @@ if the device file cannot be opened, CVS will refuse to
handle it. Files also lose their ownerships and
permissions during repository transactions.
-If the configuration variable @var{PreservePermissions}
+If the configuration variable @code{PreservePermissions}
(@pxref{config}) is set in the repository, CVS will
-preserve file permissions and ownership across
-repository transactions, and will permit checkin and
-checkout of special files and symbolic links.
-
-Using this option affects the behavior of CVS in
-several ways. First, some of the new operations
-supported by CVS are not accessible to all users. In
-particular, file ownership and special file
-characteristics may only be changed by the superuser.
-When the @var{PreservePermissions} configuration
-variable is set, therefore, users will have to be
-`root' in order to perform CVS operations.
+save the following file characteristics in the
+repository:
+
+@itemize @bullet
+@item user and group ownership
+@item permissions
+@item major and minor device numbers
+@item symbolic links
+@item hard link structure
+@end itemize
+
+Using the @code{PreservePermissions} option affects the
+behavior of CVS in several ways. First, some of the
+new operations supported by CVS are not accessible to
+all users. In particular, file ownership and special
+file characteristics may only be changed by the
+superuser. When the @code{PreservePermissions}
+configuration variable is set, therefore, users will
+have to be `root' in order to perform CVS operations.
+
+When @code{PreservePermissions} is in use, some CVS
+operations (such as @samp{cvs status}) will not
+recognize a file's hard link structure, and so will
+emit spurious warnings about mismatching hard links.
+The reason is that CVS's internal structure does not
+make it easy for these operations to collect all the
+necessary data about hard links, so they check for file
+conflicts with inaccurate data.
A more subtle difference is that CVS considers a file
to have changed only if its contents have changed
(specifically, if the modification time of the working
file does not match that of the repository's file).
-Therefore, if only the permissions or ownership have
-changed, or if a device's major or minor numbers have
-changed, CVS will not notice. In order to commit such
-a change to the repository, you must force the commit
-with @samp{cvs commit -f}. This also means that if a
-file's permissions have changed and the repository file
-is newer than the working copy, performing @samp{cvs
-update} will silently change the permissions on the
-working copy.
+Therefore, if only the permissions, ownership or hard
+linkage have changed, or if a device's major or minor
+numbers have changed, CVS will not notice. In order to
+commit such a change to the repository, you must force
+the commit with @samp{cvs commit -f}. This also means
+that if a file's permissions have changed and the
+repository file is newer than the working copy,
+performing @samp{cvs update} will silently change the
+permissions on the working copy.
+
+Changing hard links in a CVS repository is particularly
+delicate. Suppose that file @file{foo} is linked to
+file @file{old}, but is later relinked to file
+@file{new}. You can wind up in the unusual situation
+where, although @file{foo}, @file{old} and @file{new}
+have all had their underlying link patterns changed,
+only @file{foo} and @file{new} have been modified, so
+@file{old} is not considered a candidate for checking
+in. It can be very easy to produce inconsistent
+results this way. Therefore, we recommend that when it
+is important to save hard links in a repository, the
+prudent course of action is to @code{touch} any file
+whose linkage or status has changed since the last
+checkin. Indeed, it may be wise to @code{touch *}
+before each commit in a directory with complex hard
+link structures.
It is worth noting that only regular files may
be merged, for reasons that hopefully are obvious. If
@@ -6818,9 +6861,9 @@ differences between these files, since no meaningful
textual comparisons can be made on files which contain
no text.
-The PreservePermissions features do not work with
-client/server @sc{cvs}. Another limitation is that
-hard links must be to other files within the same
+The @code{PreservePermissions} features do not work
+with client/server @sc{cvs}. Another limitation is
+that hard links must be to other files within the same
directory; hard links across directories are not
supported.
@@ -6976,7 +7019,7 @@ the file. So if this is the contents of the user's
log -N
diff -u
update -P
-co -P
+checkout -P
@end example
@noindent
@@ -7108,7 +7151,7 @@ suppressed.
@cindex read-only files, and -r
@item -r
-Make new working files files read-only. Same effect
+Make new working files read-only. Same effect
as if the @code{$CVSREAD} environment variable is set
(@pxref{Environment variables}). The default is to
make working files writable, unless watches are on
@@ -7200,7 +7243,7 @@ further updates in the same directory will use the same date
@code{diff}, @code{export}, @code{history},
@code{rdiff}, @code{rtag}, and @code{update} commands.
(The @code{history} command uses this option in a
-slightly different way; @pxref{history options}).
+slightly different way; @pxref{history options}).
@c What other formats should we accept? I don't want
@c to start accepting a whole mess of non-standard
@@ -7218,19 +7261,19 @@ slightly different way; @pxref{history options}).
@c VMS to support this format (and if we're going to do
@c that, better to make CVS support it on all
@c platforms. Maybe).
-@c
+@c
@c NOTE: The tar manual has some documentation for
@c getdate.y (just for our info; we don't want to
@c attempt to document all the formats accepted by
@c getdate.y).
-@c
+@c
@c One more note: In output, CVS should consistently
@c use one date format, and that format should be one that
@c it accepts in input as well. The former isn't
@c really true (see survey below), and I'm not
@c sure that either of those formats is accepted in
-@c input.
-@c
+@c input.
+@c
@c cvs log
@c current 1996/01/02 13:45:31
@c Internet 02 Jan 1996 13:45:31 UT
@@ -7279,7 +7322,7 @@ RFC1123).
@c So I don't know....
@c A few specific issues: (1) Maybe should reassure
@c people that years after 2000
-@c work (they are in the testsuite, so they do indeed
+@c work (they are in the testsuite, so they do indeed
@c work). (2) What do two digit years
@c mean? Where do we accept them? (3) Local times can
@c be ambiguous or nonexistent if they fall during the
@@ -7337,7 +7380,7 @@ accept all of them.
@c message from "cvs import" suggesting a merge
@c command). What else? Probably some/all of the "3
@c weeks ago" family.
-@c
+@c
@c Maybe at
@c some point have CVS start give warnings on "unofficial"
@c formats (many of which might be typos or user
@@ -7366,7 +7409,7 @@ normally ignore files that do not contain the tag (or did not
exist prior to the date) that you specified. Use the @samp{-f} option
if you want files retrieved even when there is no match for the
tag or date. (The most recent revision of the file
-will be used).
+will be used).
@need 800
@samp{-f} is available with these commands:
@@ -7396,7 +7439,7 @@ The @samp{-k} option is available with the @code{add},
@item -l
Local; run only in current working directory, rather than
-recursing through subdirectories.
+recursing through subdirectories.
@strong{Warning:} this is not the same
as the overall @samp{cvs -l} option, which you can specify to the
@@ -7420,7 +7463,7 @@ Available with the following commands: @code{add},
@item -n
Do not run any checkout/commit/tag program. (A program can be
specified to run on each of these activities, in the modules
-database (@pxref{modules}); this option bypasses it).
+database (@pxref{modules}); this option bypasses it).
@strong{Warning:} this is not the same as the overall @samp{cvs -n}
option, which you can specify to the left of a cvs command!
@@ -7460,11 +7503,8 @@ revision you last checked out into the current working directory.
@c for all cvs commands except diff. For diff, it
@c seems to be (a) the head of the trunk (or the default
@c branch?) if there is no sticky tag, (b) the head of the
-@c branch if there is a branch sticky tag, and (c) the
-@c same as BASE if there is a non-branch sticky tag. (c)
-@c would appear to be strange, maybe accidental, and so there would
-@c presumably be
-@c little problem changing it. (b) is ugly as it differs
+@c branch for the sticky tag, if there is a sticky tag.
+@c (b) is ugly as it differs
@c from what HEAD means for other commands, but people
@c and/or scripts are quite possibly used to it.
@c See "head" tests in sanity.sh.
@@ -8400,37 +8440,56 @@ One or both @samp{-r} options can be replaced by a
The following options specify the format of the
output. They have the same meaning as in GNU diff.
-@code{-a} @code{-b} @code{-B} @code{-c} @w{@code{-C}
-@var{nlines}} @code{-d} @code{-e} @code{-f} @code{-h}
-@code{-H} @code{-i} @code{-n} @code{-N} @code{-p}
-@code{-s} @code{-t} @code{-u} @code{-U} @var{nlines}
-@w{@code{-F} @var{regexp}} @w{@code{-I} @var{regexp}}
-@w{@code{-L} @var{label}} @code{-T} @w{@code{-V}
-@var{arg}} @w{@code{-W} @var{columns}} @code{-w}
-@code{-y} @code{-0} @code{-1} @code{-2} @code{-3}
-@code{-4} @code{-5} @code{-6} @code{-7} @code{-8}
-@code{-9} @code{--binary} @code{--brief}
-@code{--changed-group-format=@var{arg}}
-@code{--context[=@var{lines}]} @code{--ed}
-@code{--expand-tabs} @code{--forward-ed}
-@code{--horizon-lines=@var{arg}}
-@code{--ifdef=@var{arg}}
-@code{--ignore-all-space} @code{--ignore-blank-lines}
-@code{--ignore-case}
-@code{--ignore-matching-lines=@var{regexp}}
-@code{--ignore-space-change} @code{--initial-tab}
-@code{--label=@var{label}} @code{--left-column}
-@code{--minimal} @code{--new-file}
-@code{--new-line-format=@var{arg}}
-@code{--old-line-format=@var{arg}} @code{--paginate}
-@code{--rcs} @code{--report-identical-files}
-@code{--code-c-function} @code{--side-by-side}
-@code{--show-function-line=@var{regexp}}
-@code{--speed-large-files}
-@code{--suppress-common-lines} @code{--text}
-@code{--unchanged-group-format=@var{arg}}
-@code{--unified[=@var{lines}]}
-@code{--width=@var{columns}}
+@example
+-0 -1 -2 -3 -4 -5 -6 -7 -8 -9
+--binary
+--brief
+--changed-group-format=@var{arg}
+-c
+ -C @var{nlines}
+ --context[=@var{lines}]
+-e --ed
+-t --expand-tabs
+-f --forward-ed
+--horizon-lines=@var{arg}
+--ifdef=@var{arg}
+-w --ignore-all-space
+-B --ignore-blank-lines
+-i --ignore-case
+-I @var{regexp}
+ --ignore-matching-lines=@var{regexp}
+-h
+-b --ignore-space-change
+-T --initial-tab
+-L @var{label}
+ --label=@var{label}
+--left-column
+-d --minimal
+-N --new-file
+--new-line-format=@var{arg}
+--old-line-format=@var{arg}
+--paginate
+-n --rcs
+-s --report-identical-files
+-p
+--show-c-function
+-y --side-by-side
+-F @var{regexp}
+--show-function-line=@var{regexp}
+-H --speed-large-files
+--suppress-common-lines
+-a --text
+--unchanged-group-format=@var{arg}
+-u
+ -U @var{nlines}
+ --unified[=@var{lines}]
+@c FIXCVS: This option is accepted by src/diff.c but
+@c not diff/diff.c; it would appear that any attempt to
+@c use it would get an error.
+-V @var{arg}
+-W @var{columns}
+ --width=@var{columns}
+@end example
@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@node diff examples
@@ -8608,7 +8667,7 @@ kind of report is generated:
Report on each time commit was used (i.e., each time
the repository was modified).
-@item -e
+@item -e
Everything (all record types). Equivalent to
specifying @samp{-x} with all record types. Of course,
@samp{-e} will also include record types which are
@@ -8629,9 +8688,9 @@ Report on all tags.
@item -x @var{type}
Extract a particular set of record types @var{type} from the @sc{cvs}
history. The types are indicated by single letters,
-which you may specify in combination.
+which you may specify in combination.
-Certain commands have a single record type:
+Certain commands have a single record type:
@table @code
@item F
@@ -8650,7 +8709,7 @@ One of four record types may result from an update:
@table @code
@item C
A merge was necessary but collisions were
-detected (requiring manual merging).
+detected (requiring manual merging).
@item G
A merge was necessary and it succeeded.
@item U
@@ -8894,7 +8953,7 @@ be changed, but if there is a consensus on what it
should be changed to, it doesn't seem to be apparent.
(Various options in the @file{modules} file can be used
to recreate symbolic links on checkout, update, etc.;
-@pxref{modules}.)
+@pxref{modules}.)
@end table
@c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
@@ -9018,7 +9077,7 @@ Do not print the list of tags for this file. This
option can be very useful when your site uses a lot of
tags, so rather than "more"'ing over 3 pages of tag
information, the log information is presented without
-tags at all.
+tags at all.
@item -R
Print only the name of the @sc{rcs} file.
@@ -9027,7 +9086,7 @@ Print only the name of the @sc{rcs} file.
@c being explicitly documented here) is potentially
@c confusing; it shows the log message to get from the
@c previous revision to that revision. "-r1.3 -r1.6"
-@c (equivalent to "-r1.3,1.6") is even worse; it
+@c (equivalent to "-r1.3,1.6") is even worse; it
@c prints the messages to get from 1.2 to 1.3 and 1.5
@c to 1.6. By analogy with "cvs diff", users might
@c expect that it is more like specifying a range.
@@ -9056,7 +9115,7 @@ the same branch).
Revisions from the beginning of the branch up to
and including @var{rev}.
-@item @var{rev}:
+@item @var{rev}:
Revisions starting with @var{rev} to the end of the
branch containing @var{rev}.
@@ -9303,7 +9362,7 @@ if it is non-empty!
Before @code{release} releases your sources it will
print a one-line message for any file that is not
-up-to-date.
+up-to-date.
@strong{Warning:} Any new directories that you have
created, but not added to the @sc{cvs} directory hierarchy
@@ -9409,7 +9468,7 @@ Only useful with the @samp{-D @var{date}} or @samp{-r @var{tag}}
flags. If no matching revision is found, use the most
recent revision (instead of ignoring the file).
-@item -F
+@item -F
Overwrite an existing tag of the same name on a
different revision.
@c FIXME: Needs an example, and/or more explanation.
@@ -9550,7 +9609,7 @@ them):
@c "How do I move or rename a magic branch tag?"
@c in the FAQ (I think the issues it talks about still
@c apply, but this could use some sanity.sh work).
-@item -F
+@item -F
Overwrite an existing tag of the same name on a
different revision.
@c FIXME: See "rtag -F" for comments on this.
@@ -9684,7 +9743,7 @@ See @ref{Sticky tags}, for more information on sticky tags/dates.
Create any directories that exist in the repository if
they're missing from the working directory. Normally,
@code{update} acts only on directories and files that
-were already enrolled in your working directory.
+were already enrolled in your working directory.
This is useful for updating directories that were
created in the repository since the initial checkout;
@@ -9876,13 +9935,13 @@ options}.
Do not change any files. See @ref{Global options}.
@item -Q
-Cause the command to be really quiet. See @ref{Global options}.
+Be really quiet. See @ref{Global options}.
@item -q
-Cause the command to be somewhat quiet. See @ref{Global options}.
+Be somewhat quiet. See @ref{Global options}.
@item -r
-Make new working files files read-only. See @ref{Global options}.
+Make new working files read-only. See @ref{Global options}.
@item -s @var{variable}=@var{value}
Set a user variable. See @ref{Variables}.
@@ -9947,7 +10006,7 @@ Initial revision
@c The idea behind this table is that we want each item
@c to be a sentence or two at most. Preferably a
@c single line.
-@c
+@c
@c In some cases refs to "foo options" are just to get
@c this thing written quickly, not because the "foo
@c options" node is really the best place to point.
@@ -10161,7 +10220,7 @@ Diff revision for @var{rev1} against working file. See
@ref{diff options}.
@item -r @var{rev2}
-Diff rev1/date1 against rev2. See @ref{diff options}.
+Diff @var{rev1}/@var{date1} against @var{rev2}. See @ref{diff options}.
@end table
@item edit [@var{options}] [@var{files}@dots{}]
@@ -10351,7 +10410,7 @@ Do not list tags. See @ref{log options}.
@item -R
Only print name of RCS file. See @ref{log options}.
-@item -r @var{revs}
+@item -r@var{revs}
Only list revisions @var{revs}. See @ref{log options}.
@item -s @var{states}
@@ -10361,7 +10420,7 @@ Only list revisions with specified states. See @ref{log options}.
Only print header and descriptive text. See @ref{log
options}.
-@item -w @var{logins}
+@item -w@var{logins}
Only list revisions checked in by specified logins. See @ref{log options}.
@end table
@@ -10668,7 +10727,7 @@ file, which defines the modules inside the repository.
* commit files:: The commit support files
* commitinfo:: Pre-commit checking
* verifymsg:: How are log messages evaluated?
-* editinfo:: Specifying how log messages are created
+* editinfo:: Specifying how log messages are created
(obsolete)
* loginfo:: Where should log messages be sent?
* rcsinfo:: Templates for the log messages
@@ -11024,11 +11083,13 @@ not work with client/server @sc{cvs}.
The @file{cvswrappers} also has a @samp{-m} option to
specify the merge methodology that should be used when
-the file is updated. @code{MERGE} means the usual
+a non-binary file is updated. @code{MERGE} means the usual
@sc{cvs} behavior: try to merge the files. @code{COPY}
means that @code{cvs update} will refuse to merge
files, as it also does for files specified as binary
-with @samp{-kb}. CVS will provide the user with the
+with @samp{-kb} (but if the file is specified as
+binary, there is no need to specify @samp{-m 'COPY'}).
+CVS will provide the user with the
two versions of the files, and require the user using
mechanisms outside @sc{cvs}, to insert any necessary
changes. @strong{WARNING}: do not use @code{COPY} with
@@ -11135,7 +11196,7 @@ cvs import -I ! -W "*.exe -k 'b'" first-dir vendortag reltag
@c ::::::::::::::::::
@c *.t12 -m 'COPY'
@c *.t[0-9][0-9] -f 'gunzipcp %s' -t 'gzipcp %s %s' -m 'COPY'
-@c
+@c
@c ::::::::::::::::::
@c gunzipcp
@c ::::::::::::::::::
@@ -11335,8 +11396,8 @@ repositories}).
@cindex verifymsg (admin file)
@cindex log message, verifying
-Once you have entered a log message, you can evaluate
-that message to check for specific content, such as
+Once you have entered a log message, you can evaluate
+that message to check for specific content, such as
a bug ID. Use the @file{verifymsg} file to
specify a program that is used to verify the log message.
This program could be a simple script that checks
@@ -11385,7 +11446,7 @@ free text. The following template is found in the file
@file{/usr/cvssupport/tc.template}.
@example
-BugId:
+BugId:
@end example
The script @file{/usr/cvssupport/bugid.verify} is used to
@@ -11396,7 +11457,7 @@ evaluate the log message.
#
# bugid.verify filename
#
-# Verify that the log message contains a valid bugid
+# Verify that the log message contains a valid bugid
# on the first line.
#
if head -1 < $1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /dev/null; then
@@ -11500,7 +11561,7 @@ free text. The following template is found in the file
@file{/usr/cvssupport/tc.template}.
@example
-BugId:
+BugId:
@end example
The script @file{/usr/cvssupport/bugid.edit} is used to
@@ -11570,7 +11631,7 @@ matching regular expression or @samp{DEFAULT}.
The first matching regular expression is used.
@xref{commit files}, for a description of the syntax of
-the @file{loginfo} file.
+the @file{loginfo} file.
The user may specify a format string as
part of the filter. The string is composed of a
@@ -11627,22 +11688,23 @@ repositories}).
@appendixsubsec Loginfo example
The following @file{loginfo} file, together with the
-tiny shell-script below, appends all log messages
+tiny shell-script below, appends all log messages
to the file @file{$CVSROOT/CVSROOT/commitlog},
and any commits to the administrative files (inside
the @file{CVSROOT} directory) are also logged in
@file{/usr/adm/cvsroot-log}.
-@c and mailed to @t{ceder}.
+Commits to the @file{prog1} directory are mailed to @t{ceder}.
@c FIXME: is it a CVS feature or bug that only the
@c first matching line is used? It is documented
-@c above, but is it useful? This example (with the
-@c mail to ceder put back in) is awkward to write if
+@c above, but is it useful? For example, if we wanted
+@c to run both "cvs-log" and "Mail" for the CVSROOT
+@c directory, it is kind of awkward if
@c only the first matching line is used.
@example
-ALL /usr/local/bin/cvs-log $CVSROOT/CVSROOT/commitlog
-@c ^CVSROOT Mail -s %s ceder
+ALL /usr/local/bin/cvs-log $CVSROOT/CVSROOT/commitlog $USER
^CVSROOT /usr/local/bin/cvs-log /usr/adm/cvsroot-log
+^prog1 Mail -s %s ceder
@end example
The shell-script @file{/usr/local/bin/cvs-log} looks
@@ -11651,10 +11713,10 @@ like this:
@example
#!/bin/sh
(echo "------------------------------------------------------";
- echo -n $USER" ";
+ echo -n $2" ";
date;
echo;
- sed '1s+'$@{CVSROOT@}'++') >> $1
+ cat) >> $1
@end example
@node Keeping a checked out copy
@@ -11808,7 +11870,7 @@ patterns is:
*~ #* .#* ,* _$* *$
*.old *.bak *.BAK *.orig *.rej .del-*
*.a *.olb *.o *.obj *.so *.exe
- *.Z *.elc *.ln
+ *.Z *.elc *.ln
core
@end example
@@ -12062,7 +12124,7 @@ can supply it on the command line: @samp{cvs -d cvsroot
cvs_command@dots{}} Once you have checked out a working
directory, @sc{cvs} stores the appropriate root (in
the file @file{CVS/Root}), so normally you only need to
-worry about this when initially checking out a working
+worry about this when initially checking out a working
directory.
@item $EDITOR
@@ -12204,7 +12266,7 @@ to use the optional developer communication features.
@c state.
@c Note: this is tricky to document without confusing
@c people--need to carefully say what CVS version we
-@c are talking about and keep in mind the distinction
+@c are talking about and keep in mind the distinction
@c between a
@c repository created with 1.3 and on which one now
@c uses 1.5+, and a repository on which one wants to
@@ -12215,7 +12277,7 @@ to use the optional developer communication features.
@c Not sure whether this should produce a warning or
@c something, and probably needs further thought, but
@c it would appear that the situation can be detected.
-@c
+@c
@c We might want to separate out the 1.3 compatibility
@c section (for repository & working directory) from the
@c rest--that might help avoid confusing people who
@@ -12320,6 +12382,17 @@ The exact format of this message may vary depending on
your system. It indicates a bug in @sc{cvs}, which can
be handled as described in @ref{BUGS}.
+@item cvs @var{command}: conflict: removed @var{file} was modified by second party
+This message indicates that you removed a file, and
+someone else modified it. To resolve the conflict,
+first run @samp{cvs add @var{file}}. If desired, look
+at the other party's modification to decide whether you
+still want to remove it. If you don't want to remove
+it, stop here. If you do want to remove it, proceed
+with @samp{cvs remove @var{file}} and commit your
+removal.
+@c Tests conflicts2-142b* in sanity.sh test for this.
+
@item cannot change permissions on temporary directory
@example
Operation not permitted
@@ -12839,401 +12912,6 @@ be comprehensive. Perhaps there will never be a
comprehensive, detailed list of known bugs.
@c ---------------------------------------------------------------------
-@node Copying
-@appendix GNU GENERAL PUBLIC LICENSE
-@center Version 2, June 1991
-
-@display
-Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
-59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-
-Everyone is permitted to copy and distribute verbatim copies
-of this license document, but changing it is not allowed.
-@end display
-
-@unnumberedsec Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software---to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
-@iftex
-@heading TERMS AND CONDITIONS FOR COPYING,
-@heading DISTRIBUTION AND MODIFICATION
-@end iftex
-@ifinfo
-@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-@end ifinfo
-
-@enumerate 0
-@item
-This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The ``Program'', below,
-refers to any such program or work, and a ``work based on the Program''
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term ``modification''.) Each licensee is addressed as ``you''.
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-@item
-You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-@item
-You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-@enumerate a
-@item
-You must cause the modified files to carry prominent notices
-stating that you changed the files and the date of any change.
-
-@item
-You must cause any work that you distribute or publish, that in
-whole or in part contains or is derived from the Program or any
-part thereof, to be licensed as a whole at no charge to all third
-parties under the terms of this License.
-
-@item
-If the modified program normally reads commands interactively
-when run, you must cause it, when started running for such
-interactive use in the most ordinary way, to print or display an
-announcement including an appropriate copyright notice and a
-notice that there is no warranty (or else, saying that you provide
-a warranty) and that users may redistribute the program under
-these conditions, and telling the user how to view a copy of this
-License. (Exception: if the Program itself is interactive but
-does not normally print such an announcement, your work based on
-the Program is not required to print an announcement.)
-@end enumerate
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-@item
-You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-@enumerate a
-@item
-Accompany it with the complete corresponding machine-readable
-source code, which must be distributed under the terms of Sections
-1 and 2 above on a medium customarily used for software interchange; or,
-
-@item
-Accompany it with a written offer, valid for at least three
-years, to give any third party, for a charge no more than your
-cost of physically performing source distribution, a complete
-machine-readable copy of the corresponding source code, to be
-distributed under the terms of Sections 1 and 2 above on a medium
-customarily used for software interchange; or,
-
-@item
-Accompany it with the information you received as to the offer
-to distribute corresponding source code. (This alternative is
-allowed only for noncommercial distribution and only if you
-received the program in object code or executable form with such
-an offer, in accord with Subsection b above.)
-@end enumerate
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-@item
-You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-@item
-You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-@item
-Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-@item
-If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-@item
-If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-@item
-The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and ``any
-later version'', you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-@item
-If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-@iftex
-@heading NO WARRANTY
-@end iftex
-@ifinfo
-@center NO WARRANTY
-@end ifinfo
-
-@item
-BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-@item
-IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-@end enumerate
-
-@iftex
-@heading END OF TERMS AND CONDITIONS
-@end iftex
-@ifinfo
-@center END OF TERMS AND CONDITIONS
-@end ifinfo
-
-@page
-@unnumberedsec How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the ``copyright'' line and a pointer to where the full notice is found.
-
-@smallexample
-@var{one line to give the program's name and a brief idea of what it does.}
-Copyright (C) 19@var{yy} @var{name of author}
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
-@end smallexample
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-@smallexample
-Gnomovision version 69, Copyright (C) 19@var{yy} @var{name of author}
-Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
-type `show w'.
-This is free software, and you are welcome to redistribute it
-under certain conditions; type `show c' for details.
-@end smallexample
-
-The hypothetical commands @samp{show w} and @samp{show c} should show
-the appropriate parts of the General Public License. Of course, the
-commands you use may be called something other than @samp{show w} and
-@samp{show c}; they could even be mouse-clicks or menu items---whatever
-suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a ``copyright disclaimer'' for the program, if
-necessary. Here is a sample; alter the names:
-
-@smallexample
-Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-`Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-@var{signature of Ty Coon}, 1 April 1989
-Ty Coon, President of Vice
-@end smallexample
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
-@c ---------------------------------------------------------------------
@node Index
@unnumbered Index
@cindex Index
diff --git a/gnu/usr.bin/cvs/doc/cvsclient.texi b/gnu/usr.bin/cvs/doc/cvsclient.texi
index 56577c29e2b..3b4ab41142f 100644
--- a/gnu/usr.bin/cvs/doc/cvsclient.texi
+++ b/gnu/usr.bin/cvs/doc/cvsclient.texi
@@ -320,6 +320,7 @@ General protocol conventions:
* Filenames:: Conventions regarding filenames
* File transmissions:: How file contents are transmitted
* Strings:: Strings in various requests and responses
+* Dates:: Times and dates
The protocol itself:
@@ -468,6 +469,32 @@ existing practice is probably to just transmit whatever the user
specifies, and hope that everyone involved agrees which character set is
in use, or sticks to a common subset.
+@node Dates
+@section Dates
+
+The protocol contains times and dates in various places.
+
+For the @samp{-D} option to the @code{annotate}, @code{co}, @code{diff},
+@code{export}, @code{history}, @code{rdiff}, @code{rtag}, @code{tag},
+and @code{update} requests, the server should support two formats:
+
+@example
+26 May 1997 13:01:40 GMT ; @r{RFC 822 as modified by RFC 1123}
+5/26/1997 13:01:40 GMT ; @r{traditional}
+@end example
+
+The former format is preferred; the latter however is sent by the CVS
+command line client (versions 1.5 through at least 1.9).
+
+For the @samp{-d} option to the @code{log} request, servers should at
+least support RFC 822/1123 format. Clients are encouraged to use this
+format too (traditionally the command line CVS client has just passed
+along the date format specified by the user, however).
+
+For @code{Mod-time}, see the description of that response.
+
+For @code{Notify}, see the description of that request.
+
@node Request intro
@section Request intro
diff --git a/gnu/usr.bin/cvs/emx/ChangeLog b/gnu/usr.bin/cvs/emx/ChangeLog
index d99ec434f5a..b120ea8dc41 100644
--- a/gnu/usr.bin/cvs/emx/ChangeLog
+++ b/gnu/usr.bin/cvs/emx/ChangeLog
@@ -1,3 +1,7 @@
+1998-04-09 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * filesubr.c (link_file): Remove; no longer used.
+
Tue Feb 17 02:28:20 1998 Noel Cragg <noel@swish.red-bean.com>
* filesubr.c (last_component): return the top-level directory when
diff --git a/gnu/usr.bin/cvs/emx/filesubr.c b/gnu/usr.bin/cvs/emx/filesubr.c
index 29118d5d448..47702fb44a6 100644
--- a/gnu/usr.bin/cvs/emx/filesubr.c
+++ b/gnu/usr.bin/cvs/emx/filesubr.c
@@ -387,30 +387,6 @@ rename_file (from, to)
}
/*
- * link a file, if possible. Warning: the Windows NT version of this
- * function just copies the file, so only use this function in ways
- * that can deal with either a link or a copy.
- */
-int
-link_file (from, to)
- const char *from;
- const char *to;
-{
- if (trace)
-#ifdef SERVER_SUPPORT
- (void) fprintf (stderr, "%c-> link(%s,%s)\n",
- (server_active) ? 'S' : ' ', from, to);
-#else
- (void) fprintf (stderr, "-> link(%s,%s)\n", from, to);
-#endif
- if (noexec)
- return (0);
-
- copy_file (from, to);
- return 0;
-}
-
-/*
* unlink a file, if possible.
*/
int
diff --git a/gnu/usr.bin/cvs/lib/ChangeLog b/gnu/usr.bin/cvs/lib/ChangeLog
index 623c292aca2..264b7ac52f3 100644
--- a/gnu/usr.bin/cvs/lib/ChangeLog
+++ b/gnu/usr.bin/cvs/lib/ChangeLog
@@ -1,3 +1,7 @@
+Tue Mar 24 16:08:00 1998 Ian Lance Taylor <ian@cygnus.com>
+
+ * Makefile.in (CFLAGS): Set to @CFLAGS@, not -g.
+
1998-02-20 Jim Kingdon <kingdon@harvey.cyclic.com>
* regex.c: Partial merge with version from emacs 20.2. Brings
diff --git a/gnu/usr.bin/cvs/lib/Makefile.in b/gnu/usr.bin/cvs/lib/Makefile.in
index 92122c7a09a..99d816b7c48 100644
--- a/gnu/usr.bin/cvs/lib/Makefile.in
+++ b/gnu/usr.bin/cvs/lib/Makefile.in
@@ -77,7 +77,7 @@ DEFS = @DEFS@
RANLIB = @RANLIB@
CC = @CC@
-CFLAGS = -g
+CFLAGS = @CFLAGS@
CPPFLAGS=
YACC = @YACC@
diff --git a/gnu/usr.bin/cvs/macintosh/ChangeLog b/gnu/usr.bin/cvs/macintosh/ChangeLog
index cc1e3aa2d71..c0fb37a9f41 100644
--- a/gnu/usr.bin/cvs/macintosh/ChangeLog
+++ b/gnu/usr.bin/cvs/macintosh/ChangeLog
@@ -1,3 +1,16 @@
+1998-05-12 Jim Meyering <meyering@ascend.com>
+
+ * Makefile.in (distclean): New rule to remove Makefile.
+
+1998-05-09 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * README.MacCVS: Be more discouraging about MacCVS 2.x; merely say
+ there are many more Mac clients rather than singling out MacCVS 3.x.
+
+1998-04-09 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * filesubr.c (link_file): Remove; no longer used.
+
Tue Feb 17 02:29:50 1998 Noel Cragg <noel@swish.red-bean.com>
* filesubr.c (last_component): return the top-level directory when
@@ -269,5 +282,5 @@ Wed Nov 29 09:33:16 1995 Mike Ladwig <mike@twinpeaks.prc.com>
* Requires CW GUSI 1.6.4 and CodeWarrier 7
* 68k version is essentially untested, due to lack of a 68k machine
* 'release' doesn't work, due to cvs implementation approach
- * Tons of obvious "TODOs", but at least the heavy stuff is done
+ * Tons of obvious "TODOs", but at least the heavy stuff is done
diff --git a/gnu/usr.bin/cvs/macintosh/Makefile.in b/gnu/usr.bin/cvs/macintosh/Makefile.in
index fc1c5c80557..fe1c6dfdc5d 100644
--- a/gnu/usr.bin/cvs/macintosh/Makefile.in
+++ b/gnu/usr.bin/cvs/macintosh/Makefile.in
@@ -58,7 +58,7 @@ ls:
@echo ${DISTFILES}
.PHONY: clean distclean realclean mostlyclean
-clean distclean realclean mostlyclean:
+clean realclean mostlyclean:
.PHONY: lint
lint:
@@ -73,6 +73,9 @@ dist-dir:
clean:
@echo make clean does nothing in macintosh subdir
+distclean:
+ rm -f Makefile
+
subdir = macintosh
Makefile: ../config.status Makefile.in
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
diff --git a/gnu/usr.bin/cvs/macintosh/README.MacCVS b/gnu/usr.bin/cvs/macintosh/README.MacCVS
index 99f9e5039f9..28f876ffe14 100644
--- a/gnu/usr.bin/cvs/macintosh/README.MacCVS
+++ b/gnu/usr.bin/cvs/macintosh/README.MacCVS
@@ -15,7 +15,8 @@ see the CVS web sites at:
http://www.cyclic.com/
http://www.loria.fr/~molli/cvs-index.html
-In particular, there is now a MacCVS 3.x which might be worth a try.
+In particular, there are a lot of newer clients for the Macintosh
+which are probably better than MacCVS 2.x, which is what is here.
1. Setup
diff --git a/gnu/usr.bin/cvs/macintosh/filesubr.c b/gnu/usr.bin/cvs/macintosh/filesubr.c
index 9806607b2fb..25c0f48dbfd 100644
--- a/gnu/usr.bin/cvs/macintosh/filesubr.c
+++ b/gnu/usr.bin/cvs/macintosh/filesubr.c
@@ -380,33 +380,6 @@ rename_file (from, to)
}
/*
- * link a file, if possible. Warning: the Windows NT version of this
- * function just copies the file, so only use this function in ways
- * that can deal with either a link or a copy.
- */
-int
-link_file (from, to)
- const char *from;
- const char *to;
-{
- if (trace)
-#ifdef SERVER_SUPPORT
- (void) fprintf (stderr, "%c-> link(%s,%s)\n",
- (server_active) ? 'S' : ' ', from, to);
-#else
- (void) fprintf (stderr, "-> link(%s,%s)\n", from, to);
-#endif
- if (noexec)
- return (0);
-
-#ifdef macintosh
- return (symlink ( (char *)macos_fixpath(from), (char *)macos_fixpath(to)));
-#else
- return (link (from, to));
-#endif
-}
-
-/*
* unlink a file, if possible.
*/
int
diff --git a/gnu/usr.bin/cvs/os2/ChangeLog b/gnu/usr.bin/cvs/os2/ChangeLog
index f9cc0f7c7c0..4744ad40987 100644
--- a/gnu/usr.bin/cvs/os2/ChangeLog
+++ b/gnu/usr.bin/cvs/os2/ChangeLog
@@ -1,3 +1,7 @@
+1998-04-09 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * filesubr.c (link_file): Remove; no longer used.
+
Tue Feb 17 02:31:15 1998 Noel Cragg <noel@swish.red-bean.com>
* filesubr.c (last_component): return the top-level directory when
diff --git a/gnu/usr.bin/cvs/os2/filesubr.c b/gnu/usr.bin/cvs/os2/filesubr.c
index 5047e5b4548..4f6d9fd081c 100644
--- a/gnu/usr.bin/cvs/os2/filesubr.c
+++ b/gnu/usr.bin/cvs/os2/filesubr.c
@@ -95,20 +95,6 @@ copy_file (from, to)
(void) utime ((char *)to, &t);
}
-/*
- * link a file, if possible. Warning: the Windows NT version of this
- * function just copies the file, so only use this function in ways
- * that can deal with either a link or a copy.
- */
-int
-link_file (from, to)
- const char *from;
- const char *to;
-{
- copy_file (from, to);
- return 0;
-}
-
/* FIXME-krp: these functions would benefit from caching the char * &
stat buf. */
diff --git a/gnu/usr.bin/cvs/src/ChangeLog b/gnu/usr.bin/cvs/src/ChangeLog
index 96e17012329..4f13ee6143b 100644
--- a/gnu/usr.bin/cvs/src/ChangeLog
+++ b/gnu/usr.bin/cvs/src/ChangeLog
@@ -1,5 +1,355 @@
+1998-05-23 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * Version 1.9.28.
+
+1998-05-22 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * rcs.c (RCS_cmp_file): Check for errors from CVS_FOPEN. This
+ restores the CVS 1.9 behavior (fatal error if we can't open the
+ file), and corrects an apparent oversight in Ian's 13 Apr 1997
+ change.
+ * sanity.sh (modes2): New test, tests for this.
+
+1998-05-22 Ian Lance Taylor <ian@cygnus.com>
+
+ * server.c (server_updated): Correct test for whether to unlink
+ the file.
+
+1998-05-20 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * wrapper.c (wrap_add): Disable -t/-f wrappers at least until the
+ serious bug can be fixed.
+
+1998-05-15 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * checkout.c (checkout): Call server_pathname_check on the
+ argument to "cvs co -d".
+ * server.c (server_pathname_check): Add comment about how we could
+ be handling absolute pathnames.
+ * sanity.sh (abspath): Rewrite the tests which run "cvs co -d /foo"
+ for remote, to reflect this.
+
+ * sanity.sh (abspath): Also do the "cannot rename" work-around for
+ abspath-7d.
+
+1998-05-13 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * commit.c (commit_filesdoneproc): Free admin_dir when done with it.
+
+1998-05-13 Jim Meyering <meyering@ascend.com>
+
+ * sanity.sh (editor): Change bogus sed command, `s/^/x&/g', to `s/^/x/'.
+ The former exercised a bug in GNU sed-3.01-beta3.
+ (emptydir-8): Add `Rebuilding administrative file database' message,
+ since now it does that.
+ * commit.c (commit_filesdoneproc): Pass only the admin directory
+ pathname to mkmodules.
+ Remove #if 0, now that it's fixed.
+
+ * status.c (cvsstatus): Rename from `status' to avoid shadowing
+ lots of locals and parameters by the same name.
+ * server.c (serve_status): Update caller.
+ * main.c (cmds[]): Update table entry.
+ * cvs.h: Update prototype.
+
+ * commit.c (commit_filesdoneproc): Remove trailing blanks.
+ (commit) [CLIENT_SUPPORT]: Remove unnecessary (and local-shadowing)
+ declaration of `err'.
+ Rename global `tag' to `saved_tag' to avoid overshadowing `tag'
+ parameters of three functions.
+ Rename global `message' to `saved_message' to avoid overshadowing
+ `message' parameter of a function.
+ Rename global `ulist' to `saved_ulist' and move dcl up with others.
+
+1998-05-12 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * commit.c (commit_filesdoneproc): #if 0 the new code until it can
+ be fixed.
+
+ * commit.c (commit_filesdoneproc): Add comment explaining last
+ change.
+
+1998-05-12 Jim Meyering <meyering@ascend.com>
+
+ * commit.c (commit_filesdoneproc): Call mkmodules not just when
+ committing a file directly under CVSROOT, but also when committing
+ files in subdirectories of CVSROOT.
+
+1998-05-08 Jim Meyering <meyering@ascend.com>
+
+ * filesubr.c (xreadlink): NUL-terminate the symbolic link name.
+ Use a much smaller initial buffer length.
+ Test errno only if readlink fails.
+ Use xstrdup then free the original link name so we don't waste space.
+
+1998-05-02 Jim Meyering <meyering@ascend.com>
+
+ * rcs.c (rcsbuf_getword): Fix off-by-one error that would result in
+ an abort (the first one in rcsbuf_getkey) when operating on on some
+ ,v files with over 8192 bytes of tag and branch info.
+
+1998-05-04 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (ann): New tests ann-12 and ann-13 test for specifying
+ a numeric branch.
+
+1998-05-02 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * rcs.c: Add comments about getting rid of rcsbuf_getid,
+ rcsbuf_getword, and rcsbuf_getstring.
+
+ * sanity.sh (abspath): Revise the workarounds to deal with exit
+ status.
+
+1998-04-30 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (abspath): Work around the "cannot rename" bug.
+
+1998-04-27 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * classify.c (Classify_File): Add comments about checking whether
+ command name is "update".
+
+1998-04-22 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * version.c: Change version number to 1.9.27.1.
+
+ * Version 1.9.27.
+
+1998-04-20 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ (This diff was run by devel-cvs and everyone seemed to like it).
+ * diff.c (diff_file_nodiff): Make HEAD mean the head of the branch
+ which contains the sticky tag, not the sticky tag itself.
+ * rcs.c, rcs.h (RCS_branch_head): New function.
+ * sanity.sh (head): Update for this changed behavior.
+
+1998-04-19 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * sanity.sh: Move emptydir tests from basicb to new test emptydir.
+ This is because we now need a module definition to create Emptydir;
+ "co -d" doesn't cut it anymore.
+
+1998-04-17 Petri Virkkula
+
+ * server.c (mkdir_p): Ignore EROFS error (like for EACCES).
+
+1998-04-16 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * checkout.c (checkout_proc): Don't create directories above the
+ last one specified in "co -d".
+ (build_dirs_and_chdir): Revert Noel's change of 17 Feb 1998.
+ (struct dir_to_build): New field just_chdir.
+ (build_dirs_and_chdir): Test it.
+ * sanity.sh (abspath): New tests abspath-7* test for a bug which
+ we fix, in which CVS would create bogus "D/////" entries in
+ CVS/Entries.
+ (abspath): Revise abspath-3* tests to test for the fact that we no
+ longer create directories above the last one specified in "co -d".
+ I checked that CVS 1.9 gives an error on this, so changing this
+ behavior back should be OK.
+ (cvsadm-2d3): Likewise (also checked CVS 1.9 for this case).
+ (cvsadm-2d3d): Likewise (also checked CVS 1.9 for this case).
+ (cvsadm-2d{4,5,6,7,8}, cvsadm-N2d{3,4,5,6,7,8}): Adjust for new
+ behavior (same case as cvsadm-2d3).
+ (cvsadm-2d{4,5,6,7,8}d, cvsadm-N2d{3,4,5,6,7,8}d): Remove test
+ (same case as cvsadm-2d3d).
+ (cvsadm): For remote, skip most these tests.
+ (abspath): When cleaning up, delete mod1 and mod2 rather than mod1
+ twice (longstanding bug, apparently only becomes visible if you
+ run the tests in a certain order).
+
+1998-04-14 Wilfredo Sanchez <wsanchez@apple.com>
+
+ * rcs.c: variable "lockfile" was being referenced after being
+ free'd. Bad. Moved the free() call down.
+
+1998-04-12 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (rcs): Add test for annotate and the year 2000.
+
+ * server.c (do_cvs_command): If there are partial lines left when
+ the child process is done, send them along.
+ * sanity.sh (rcs, rcs2): Enable all tests for remote; tests for
+ this fix.
+
+1998-04-11 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * client.c (client_senddate): Pass SDATEFORM not DATEFORM to
+ sscanf. This fixes a Y2K bug.
+
+ * history.c (history, select_hrec): Change since_date from time_t
+ to RCS format. Use the usual machinery (in particular, Make_Date
+ and client_senddate) so that it will work on VMS too.
+ * main.c, cvs.h (date_from_time_t): New function.
+ * sanity.sh (history): New test, to test that this didn't break
+ anything (also tests client_senddate fix).
+
+1998-04-11 Norbert Kiesel <nk@iname.com>
+
+ * server.c (cvs_output_binary): Shut up "gcc -Wall" by removing
+ unnecessary else if test.
+ * server.c (check_password): Fix uninitialized memory read if
+ shadow passwords are used. Also added some comments.
+ * rcs.c (RCS_checkout): Make sure to call chown with -1 for uid or
+ gid if they should not be changed
+
+1998-04-10 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (rcs2): New test, tests for various Y2K cases.
+ * rcs.c (getdelta): Value for "state" keyword is optional (bug
+ discovered incidentally in writing rcs2 test).
+
+1998-04-09 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * filesubr.c, cvs.h (link_file): Remove; no longer used.
+
+1998-04-08 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * recurse.c (do_dir_proc): Restore update_dir rather than a
+ computation which appears to, but does not necessarily, restore it
+ (reported by various people; this fix is from Greg Hudson).
+ * sanity.sh (importc): New test, tests for this fix.
+
+1998-03-27 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * rcs.c (RCS_lock): If the revision is already locked, give an
+ error rather than dumping core.
+ * sanity.sh (reserved): New test reserved-13c tests for this.
+
+1998-03-25 Loren J. Rittle
+
+ * import.c (add_rev): Rewrite to use RCS_FLAGS_KEEPFILE option
+ of RCS_checkin() to avoid damage to imported files instead of
+ externally undoing damage after the fact. The side effect is
+ that callers of add_rev() may now incrementally walk the
+ entries of the current directory without seeing gratuitous
+ changes to the directory structure (under at least one file
+ system under at least one OS).
+
+1998-03-18 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * error.c (error): Save and restore errno. Should fix test case
+ conflicts3-23 on SCO 5.0.2. Reported by Steve Cameron.
+
+ * sanity.sh (admin): Rename admin-26-o* to admin-26-*; the "o"
+ stands for "cvs admin -o". Add comment about length of tests.
+ Use ${PLUS}.
+
+1998-03-05 Dan Wilder <dan@gasboy.com>
+
+ * Fix problem with cvs admin in which -ntag:branch
+ option associated tag with the branch's head revision.
+ Should have used branch number. Entailed in this fix,
+ the following.
+
+ * Add new functions "RCS_exist_rev", "RCS_exist_tag",
+ "RCS_tag2rev", and "RCS_valid_rev" to rcs.c. RCS_tag2rev
+ is similar to RCS_gettag, but does less interpretation.
+
+ * Plug a small memory leak.
+
+ * Add tests admin-26 through admin-29 to sanity.sh,
+ to test "cvs admin -n".
+
+1998-03-17 Samuel Tardieu <sam@inf.enst.fr>
+
+ * server.c (server_register): protect dereferencing timestamp in
+ the trace message when it is null, to avoid a segmentation fault.
+
+1998-03-16 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * options.h.in (MY_NDBM): Rewrite the comment explaining this
+ option. It was not clear to everyone who "my" referred to, for
+ example.
+
+ * hardlink.c (list_linked_files_on_disk): Remove unused variables
+ err and p.
+ (list_linked_files_on_disk): Add comment about memory allocation
+ of return value.
+ * rcs.c (rcsbuf_getword): Shut up gcc -Wall with a "return 0".
+ (RCS_checkin): Remove unused variable fullpath.
+ * sanity.sh (hardlinks): Remove comment about spurious warnings;
+ the warnings are gone.
+
+1998-03-12 Tim Pierce <twp@skepsis.com>
+
+ New functions for parsing and writing hardlink fields.
+ * rcs.c [PRESERVE_PERMISSIONS_SUPPORT] (puthardlink_proc): New
+ function.
+ (putdelta) [PRESERVE_PERMISSIONS_SUPPORT]: Use it.
+ (rcsbuf_getid, rcsbuf_getstring, rcsbuf_getword): New functions.
+ (getdelta): Call them, storing `hardlinks' field in vnode->hardlinks.
+ (RCS_reparsercsfile): When setting rdata->desc, xstrdup value
+ rather than rcsbuf_valcopying it (due to changes in how getdelta
+ handles keys and values in newphrases).
+
+ * sanity.sh (hardlinks): Use uglier filenames. Checking out
+ hardlinked files no longer produces the same spurious diagnostics,
+ so fix that test.
+ (hardlinks-2.3): Renamed from hardlinks-2.2 (duplicate test name).
+
+ New infrastructure for managing hardlink lists internally...
+ * hardlink.c, hardlink.h (list_linked_files_on_disk,
+ compare_linkage_lists, find_checkedout_proc): New functions.
+ * rcs.h (struct rcsversnode) [PRESERVE_PERMISSIONS_SUPPORT]: New
+ member `hardlinks'.
+ * update.c (special_file_mismatch): Get hardlinks from
+ vp->hardlinks instead of from vp->other_delta.
+ * rcs.c (free_rcsvers_contents): Comment about freeing hardlinks
+ member.
+ (RCS_checkout) [PRESERVE_PERMISSIONS_SUPPORT]: Get hardlinks from
+ vers->hardlinks list instead of vers->other_delta.
+
+ ... and removed obsolete code from earlier revs.
+ * hardlink.c, hardlink.h (list_files_linked_to,
+ cache_hardlinks_proc, list_files_proc, set_hardlink_field_proc):
+ Removed.
+ * hardlink.h: Removed `links' member from hardlink_info struct.
+ * commit.c (commit): Remove the call to cache_hardlinks_proc.
+ (check_fileproc) [PRESERVE_PERMISSIONS_SUPPORT]: Removed reference
+ to hlinfo->links.
+ * hardlink.c (update_hardlink_info): Same.
+ * update.c (get_linkinfo_proc): Same.
+
+ * rcs.c (RCS_checkout) [PRESERVE_PERMISSIONS_SUPPORT]: Use
+ vp->hardlinks and find_checkedout_proc to find recently-updated
+ files that may be hardlinked.
+ * update.c (special_file_mismatch): Use List * structures and
+ compare_linkage_lists for rev1_hardlinks and rev2_hardlinks.
+
+1998-03-16 Larry Jones <larry.jones@sdrc.com>
+
+ * server.c (check_password): If shadow passwords are supported but no
+ entry is found in the shadow file, check the regular password file.
+
+1998-03-07 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * sanity.sh: Rename permissions test to perms since that is what
+ each of its individual tests are named.
+ * sanity.sh (perms symlinks hardlinks): Change CVSROOT to
+ CVSROOT_DIRNAME where appropriate.
+ (perms symlinks hardlinks): Disable/adjust the meat of the tests for
+ remote.
+ (symlinks): Link to ${TESTDIR}/fumble rather than
+ /fumble/mumble/grumble. We shouldn't be making assumptions about
+ what might exist in random directories outside ${TESTDIR}.
+ * hardlink.c (cache_hardlinks_proc): Add comment about trimming
+ whitespace.
+
+1998-03-07 Tim Pierce <twp@skepsis.com>
+
+ * rcs.c (RCS_checkout): Negation bug when checking out symlinks:
+ existence_error should be !existence_error.
+ * sanity.sh (permissions symlinks hardlinks): New tests, for
+ PreservePermissions.
+
1998-03-04 Jim Kingdon <kingdon@harvey.cyclic.com>
+ * version.c: Change version number to 1.9.26.1.
+
+ * Version 1.9.26.
+
* entries.c, cvs.h (Entries_Open): New argument update_dir; use it
in error message.
* add.c, checkout.c, client.c, find_names.c, import.c, recurse.c,
@@ -30,7 +380,7 @@
* update.c (special_file_mismatch): Compare the hard links of the
two revisions.
- * rcs.c (RCS_checkout):
+ * rcs.c (RCS_checkout):
* hardlink.c, hardlink.h: New files.
(hardlink_info): New struct.
@@ -235,7 +585,7 @@ Tue Feb 17 02:32:21 1998 Noel Cragg <noel@swish.red-bean.com>
[These mods make "checkout" work with "-d /absolute/pathname"
once again.]
-
+
* checkout.c (checkout_proc): the -d flag on the command line
should override the -d flag in the modules file if the latter is
an absolute path. The loop that assembles the list of directories
@@ -255,7 +605,7 @@ Tue Feb 17 02:32:21 1998 Noel Cragg <noel@swish.red-bean.com>
* create_adm.c (Create_Admin): include the directory in the error
message.
-
+
1998-02-16 Jim Kingdon <kingdon@harvey.cyclic.com>
* diff.c (diff_fileproc), import.c (import, add_rcs_file), rcs.c
@@ -294,7 +644,7 @@ Tue Feb 17 02:32:21 1998 Noel Cragg <noel@swish.red-bean.com>
Support for device special files, symbolic links, user and group
ownerships, and file permissions.
-
+
* parseinfo.c: (parse_config): Handle new config variable
`PreservePermissions'.
* mkmodules.c (config_contents): Add new PreservePermissions var.
diff --git a/gnu/usr.bin/cvs/src/admin.c b/gnu/usr.bin/cvs/src/admin.c
index 3c50f4a57ac..72cddac616f 100644
--- a/gnu/usr.bin/cvs/src/admin.c
+++ b/gnu/usr.bin/cvs/src/admin.c
@@ -701,15 +701,27 @@ admin_fileproc (callerdat, finfo)
rcs->path,
tag, n->data);
status = 1;
+ free (tag);
continue;
}
}
- /* Expand rev if necessary. */
- rev = RCS_gettag (rcs, p, 0, NULL);
- RCS_settag (rcs, tag, rev);
- if (rev != NULL)
+ /* Attempt to perform the requested tagging. */
+
+ if ((*p == 0 && (rev = RCS_head (rcs)))
+ || (rev = RCS_tag2rev (rcs, p))) /* tag2rev may exit */
+ {
+ RCS_check_tag (tag); /* exit if not a valid tag */
+ RCS_settag (rcs, tag, rev);
free (rev);
+ }
+ else
+ {
+ error (0, 0,
+ "%s: Symbolic name or revision %s is undefined",
+ rcs->path, p);
+ status = 1;
+ }
free (tag);
break;
case 's':
diff --git a/gnu/usr.bin/cvs/src/classify.c b/gnu/usr.bin/cvs/src/classify.c
index b33c9453778..b0084a3d0fa 100644
--- a/gnu/usr.bin/cvs/src/classify.c
+++ b/gnu/usr.bin/cvs/src/classify.c
@@ -288,6 +288,14 @@ conflict: %s created independently by second party",
* There is no user file, so note that it was lost and
* extract a new version
*/
+ /* Comparing the command_name against "update", in
+ addition to being an ugly way to operate, means
+ that this message does not get printed by the
+ server. That might be considered just a straight
+ bug, although there is one subtlety: that case also
+ gets hit when a patch fails and the client fetches
+ a file. I'm not sure there is currently any way
+ for the server to distinguish those two cases. */
if (strcmp (command_name, "update") == 0)
if (!really_quiet)
error (0, 0, "warning: %s was lost", finfo->fullname);
@@ -367,6 +375,8 @@ conflict: %s created independently by second party",
{
/* There is no user file, so just get it */
+ /* See comment at other "update" compare, for more
+ thoughts on this comparison. */
if (strcmp (command_name, "update") == 0)
if (!really_quiet)
error (0, 0, "warning: %s was lost", finfo->fullname);
diff --git a/gnu/usr.bin/cvs/src/client.c b/gnu/usr.bin/cvs/src/client.c
index aa897d5c719..50c923e832b 100644
--- a/gnu/usr.bin/cvs/src/client.c
+++ b/gnu/usr.bin/cvs/src/client.c
@@ -5442,13 +5442,16 @@ option_with_arg (option, arg)
send_arg (arg);
}
-/*
- * Send a date to the server. This will passed a string which is the
- * result of Make_Date, and looks like YY.MM.DD.HH.MM.SS, where all
- * the letters are single digits. The time will be GMT. getdate on
- * the server can't parse that, so we turn it back into something
- * which it can parse.
- */
+/* Send a date to the server. The input DATE is in RCS format.
+ The time will be GMT.
+
+ We then convert that to the format required in the protocol
+ (including the "-D" option) and send it. According to
+ cvsclient.texi, RFC 822/1123 format is preferred, but for now we
+ use the format that we always have, for
+ conservatism/laziness/paranoia. As far as I know all servers
+ support the RFC 822/1123 format, so probably there would be no
+ particular danger in switching. */
void
client_senddate (date)
@@ -5457,10 +5460,10 @@ client_senddate (date)
int year, month, day, hour, minute, second;
char buf[100];
- if (sscanf (date, DATEFORM, &year, &month, &day, &hour, &minute, &second)
+ if (sscanf (date, SDATEFORM, &year, &month, &day, &hour, &minute, &second)
!= 6)
{
- error (1, 0, "diff_client_senddate: sscanf failed on date");
+ error (1, 0, "client_senddate: sscanf failed on date");
}
sprintf (buf, "%d/%d/%d %d:%d:%d GMT", month, day, year,
diff --git a/gnu/usr.bin/cvs/src/diff.c b/gnu/usr.bin/cvs/src/diff.c
index 7a4c105b9d3..341c04c248f 100644
--- a/gnu/usr.bin/cvs/src/diff.c
+++ b/gnu/usr.bin/cvs/src/diff.c
@@ -434,7 +434,15 @@ diff_fileproc (callerdat, finfo)
exists = 0;
/* special handling for TAG_HEAD */
if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
- exists = vers->vn_rcs != NULL;
+ {
+ char *head =
+ (vers->vn_rcs == NULL
+ ? NULL
+ : RCS_branch_head (vers->srcfile, vers->vn_rcs));
+ exists = head != NULL;
+ if (head != NULL)
+ free (head);
+ }
else
{
Vers_TS *xvers;
@@ -814,7 +822,9 @@ diff_file_nodiff (finfo, vers, empty_file)
{
/* special handling for TAG_HEAD */
if (diff_rev1 && strcmp (diff_rev1, TAG_HEAD) == 0)
- use_rev1 = xstrdup (vers->vn_rcs);
+ use_rev1 = ((vers->vn_rcs == NULL || vers->srcfile == NULL)
+ ? NULL
+ : RCS_branch_head (vers->srcfile, vers->vn_rcs));
else
{
xvers = Version_TS (finfo, NULL, diff_rev1, diff_date1, 1, 0);
@@ -827,7 +837,9 @@ diff_file_nodiff (finfo, vers, empty_file)
{
/* special handling for TAG_HEAD */
if (diff_rev2 && strcmp (diff_rev2, TAG_HEAD) == 0)
- use_rev2 = xstrdup (vers->vn_rcs);
+ use_rev2 = ((vers->vn_rcs == NULL || vers->srcfile == NULL)
+ ? NULL
+ : RCS_branch_head (vers->srcfile, vers->vn_rcs));
else
{
xvers = Version_TS (finfo, NULL, diff_rev2, diff_date2, 1, 0);
diff --git a/gnu/usr.bin/cvs/src/error.c b/gnu/usr.bin/cvs/src/error.c
index cb69bdeff4f..9dcc162261e 100644
--- a/gnu/usr.bin/cvs/src/error.c
+++ b/gnu/usr.bin/cvs/src/error.c
@@ -89,7 +89,15 @@ error_exit PROTO ((void))
thing for the server, whether the normal server_active (child process)
case or the error_use_protocol (parent process) case. The one exception
is that STATUS nonzero for error_use_protocol probably doesn't work yet;
- in that case still need to use the pending_error machinery in server.c. */
+ in that case still need to use the pending_error machinery in server.c.
+
+ error() does not molest errno; some code (e.g. Entries_Open) depends
+ on being able to say something like:
+ error (0, 0, "foo");
+ error (0, errno, "bar");
+
+ */
+
/* VARARGS */
void
#if defined (HAVE_VPRINTF) && defined (__STDC__)
@@ -102,6 +110,9 @@ error (status, errnum, message, va_alist)
va_dcl
#endif
{
+ /* Prevent strtoul (via int_vasprintf) from clobbering it. */
+ int save_errno = errno;
+
#ifdef HAVE_VPRINTF
if (message[0] != '\0')
{
@@ -211,6 +222,7 @@ error (status, errnum, message, va_alist)
if (status)
error_exit ();
+ errno = save_errno;
}
/* Print the program name and error message MESSAGE, which is a printf-style
diff --git a/gnu/usr.bin/cvs/src/filesubr.c b/gnu/usr.bin/cvs/src/filesubr.c
index 0ccc3df9180..1c24b2f64fa 100644
--- a/gnu/usr.bin/cvs/src/filesubr.c
+++ b/gnu/usr.bin/cvs/src/filesubr.c
@@ -415,29 +415,6 @@ rename_file (from, to)
}
/*
- * link a file, if possible. Warning: the Windows NT version of this
- * function just copies the file, so only use this function in ways
- * that can deal with either a link or a copy.
- */
-int
-link_file (from, to)
- const char *from;
- const char *to;
-{
- if (trace)
-#ifdef SERVER_SUPPORT
- (void) fprintf (stderr, "%c-> link(%s,%s)\n",
- (server_active) ? 'S' : ' ', from, to);
-#else
- (void) fprintf (stderr, "-> link(%s,%s)\n", from, to);
-#endif
- if (noexec)
- return (0);
-
- return (link (from, to));
-}
-
-/*
* unlink a file, if possible.
*/
int
@@ -770,7 +747,9 @@ xreadlink (link)
const char *link;
{
char *file = NULL;
- int buflen = BUFSIZ;
+ char *tfile;
+ int buflen = 128;
+ int link_name_len;
if (!islink (link))
return NULL;
@@ -781,18 +760,21 @@ xreadlink (link)
do
{
file = xrealloc (file, buflen);
- errno = 0;
- readlink (link, file, buflen);
+ link_name_len = readlink (link, file, buflen - 1);
buflen *= 2;
}
- while (errno == ENAMETOOLONG);
+ while (link_name_len < 0 && errno == ENAMETOOLONG);
- if (errno)
+ if (link_name_len < 0)
error (1, errno, "cannot readlink %s", link);
- return file;
-}
+ file[link_name_len] = '\0';
+ tfile = xstrdup (file);
+ free (file);
+
+ return tfile;
+}
/* Return a pointer into PATH's last component. */
diff --git a/gnu/usr.bin/cvs/src/hardlink.c b/gnu/usr.bin/cvs/src/hardlink.c
index 51bd2a60567..b279aa9c3d0 100644
--- a/gnu/usr.bin/cvs/src/hardlink.c
+++ b/gnu/usr.bin/cvs/src/hardlink.c
@@ -41,96 +41,6 @@ List *hardlist; /* Record hardlink information for working files */
char *working_dir; /* The top-level working directory, used for
constructing full pathnames. */
-/* For check_link_proc: list all of the files named in an inode list. */
-static int
-list_files_proc (node, vstrp)
- Node *node;
- void *vstrp;
-{
- char **strp, *file;
- int len;
-
- /* Get the file's basename. This is because -- VERY IMPORTANT --
- the `hardlinks' field is presently defined only to include links
- within a directory. So the hardlinks field might be `foo' or
- `mumble grump flink', but not `foo bar com/baz' or `wham ../bam
- ../thank/you'. Someday it would be nice to extend this to
- permit cross-directory links, but the issues involved are
- hideous. */
-
- file = strrchr (node->key, '/');
- if (file)
- ++file;
- else
- file = node->key;
-
- /* Is it safe to cast vstrp to (char **) here, and then play with
- the contents? I think so, since vstrp will have started out
- a char ** to begin with, so we should not have alignment bugs. */
- strp = (char **) vstrp;
- len = (*strp == NULL ? 0 : strlen (*strp));
- *strp = (char *) xrealloc (*strp, len + strlen (file) + 2);
- if (*strp == NULL)
- {
- error (0, errno, "could not allocate memory");
- return 1;
- }
- if (sprintf (*strp + len, "%s ", file) < 0)
- {
- error (0, errno, "could not compile file list");
- return 1;
- }
-
- return 0;
-}
-
-/* Set the link field of each hardlink_info node to `data', which is a
- list of linked files. */
-static int
-set_hardlink_field_proc (node, data)
- Node *node;
- void *data;
-{
- struct hardlink_info *hlinfo = (struct hardlink_info *) node->data;
- hlinfo->links = xstrdup ((char *) data);
-
- return 0;
-}
-
-/* For each file being checked in, compile a list of the files linked
- to it, and cache the list in the file's hardlink_info field. */
-int
-cache_hardlinks_proc (node, data)
- Node *node;
- void *data;
-{
- List *inode_links;
- char *p, *linked_files = NULL;
- int err;
-
- inode_links = (List *) node->data;
-
- /* inode->data is a list of hardlink_info structures: all the
- files linked to this inode. We compile a string of each file
- named in this list, in alphabetical order, separated by spaces.
- Then store this string in the `links' field of each
- hardlink_info structure, so that RCS_checkin can easily add
- it to the `hardlinks' field of a new delta node. */
-
- sortlist (inode_links, fsortcmp);
- err = walklist (inode_links, list_files_proc, &linked_files);
- if (err)
- return err;
-
- /* Trim trailing whitespace. */
- p = linked_files + strlen(linked_files) - 1;
- while (p > linked_files && isspace (*p))
- *p-- = '\0';
-
- err = walklist (inode_links, set_hardlink_field_proc, linked_files);
- return err;
-}
-
/* Return a pointer to FILEPATH's node in the hardlist. This means
looking up its inode, retrieving the list of files linked to that
inode, and then looking up FILE in that list. If the file doesn't
@@ -237,26 +147,28 @@ update_hardlink_info (file)
hlinfo = (struct hardlink_info *) n->data;
hlinfo->status = T_UPTODATE;
hlinfo->checked_out = 1;
- hlinfo->links = NULL;
}
-/* Return a string listing all the files known to be linked to FILE in
+/* Return a List with all the files known to be linked to FILE in
the working directory. Used by special_file_mismatch, to determine
- whether it is safe to merge two files. */
-char *
-list_files_linked_to (file)
- const char *file;
+ whether it is safe to merge two files.
+
+ FIXME: What is the memory allocation for the return value? We seem
+ to sometimes allocate a new list (getlist() call below) and sometimes
+ return an existing list (where we return n->data). */
+List *
+list_linked_files_on_disk (file)
+ char *file;
{
- char *inodestr, *filelist, *path;
+ char *inodestr, *path;
struct stat sb;
Node *n;
- int err;
/* If hardlist is NULL, we have not been doing an operation that
would permit us to know anything about the file's hardlinks
- (cvs update, cvs commit, etc). Return an empty string. */
+ (cvs update, cvs commit, etc). Return an empty list. */
if (hardlist == NULL)
- return xstrdup ("");
+ return getlist();
/* Get the full pathname of file (assuming the working directory) */
if (file[0] == '/')
@@ -288,11 +200,107 @@ list_files_linked_to (file)
n = findnode (hardlist, inodestr);
sortlist ((List *) n->data, fsortcmp);
- filelist = NULL;
- err = walklist ((List *) n->data, list_files_proc, &filelist);
- if (err)
- error (1, 0, "cannot get list of hardlinks for %s", file);
-
free (inodestr);
- return filelist;
+ return (List *) n->data;
}
+
+/* Compare the files in the `key' fields of two lists, returning 1 if
+ the lists are equivalent and 0 otherwise.
+
+ Only the basenames of each file are compared. This is an awful hack
+ that exists because list_linked_files_on_disk returns full paths
+ and the `hardlinks' structure of a RCSVers node contains only
+ basenames. That in turn is a result of the awful hack that only
+ basenames are stored in the RCS file. If anyone ever solves the
+ problem of correctly managing cross-directory hardlinks, this
+ function (along with most functions in this file) must be fixed. */
+
+int
+compare_linkage_lists (links1, links2)
+ List *links1;
+ List *links2;
+{
+ Node *n1, *n2;
+ char *p1, *p2;
+
+ sortlist (links1, fsortcmp);
+ sortlist (links2, fsortcmp);
+
+ n1 = links1->list->next;
+ n2 = links2->list->next;
+
+ while (n1 != links1->list && n2 != links2->list)
+ {
+ /* Get the basenames of both files. */
+ p1 = strrchr (n1->key, '/');
+ if (p1 == NULL)
+ p1 = n1->key;
+ else
+ ++p1;
+
+ p2 = strrchr (n2->key, '/');
+ if (p2 == NULL)
+ p2 = n2->key;
+ else
+ ++p2;
+
+ /* Compare the files' basenames. */
+ if (strcmp (p1, p2) != 0)
+ return 0;
+
+ n1 = n1->next;
+ n2 = n2->next;
+ }
+
+ /* At this point we should be at the end of both lists; if not,
+ one file has more links than the other, and return 1. */
+ return (n1 == links1->list && n2 == links2->list);
+}
+
+/* Find a checked-out file in a list of filenames. Used by RCS_checkout
+ when checking out a new hardlinked file, to decide whether this file
+ can be linked to any others that already exist. The return value
+ is not currently used. */
+
+int
+find_checkedout_proc (node, data)
+ Node *node;
+ void *data;
+{
+ Node **uptodate = (Node **) data;
+ Node *link;
+ char *dir = xgetwd();
+ char *path;
+ struct hardlink_info *hlinfo;
+
+ /* If we have already found a file, don't do anything. */
+ if (*uptodate != NULL)
+ return 0;
+
+ /* Look at this file in the hardlist and see whether the checked_out
+ field is 1, meaning that it has been checked out during this CVS run. */
+ path = (char *)
+ xmalloc (sizeof(char) * (strlen (dir) + strlen (node->key) + 2));
+ sprintf (path, "%s/%s", dir, node->key);
+ link = lookup_file_by_inode (path);
+ free (path);
+ free (dir);
+
+ if (link == NULL)
+ {
+ /* We haven't seen this file -- maybe it hasn't been checked
+ out yet at all. */
+ return 0;
+ }
+
+ hlinfo = (struct hardlink_info *) link->data;
+ if (hlinfo->checked_out)
+ {
+ /* This file has been checked out recently, so it's safe to
+ link to it. */
+ *uptodate = link;
+ }
+
+ return 0;
+}
+
diff --git a/gnu/usr.bin/cvs/src/hardlink.h b/gnu/usr.bin/cvs/src/hardlink.h
index cce3f33a265..f9df34448ed 100644
--- a/gnu/usr.bin/cvs/src/hardlink.h
+++ b/gnu/usr.bin/cvs/src/hardlink.h
@@ -21,13 +21,13 @@ struct hardlink_info
{
Ctype status; /* as returned from Classify_File() */
int checked_out; /* has this file been checked out lately? */
- char *links; /* contents of `hardlinks' RCS field */
};
extern List *hardlist;
extern char *working_dir;
-int cache_hardlinks_proc PROTO ((Node *, void *));
Node *lookup_file_by_inode PROTO ((const char *));
void update_hardlink_info PROTO ((const char *));
-char *list_files_linked_to PROTO ((const char *));
+List *list_linked_files_on_disk PROTO ((char *));
+int compare_linkage_lists PROTO ((List *, List *));
+int find_checkedout_proc PROTO ((Node *, void *));
diff --git a/gnu/usr.bin/cvs/src/history.c b/gnu/usr.bin/cvs/src/history.c
index 223e5a770fb..8f1e254720e 100644
--- a/gnu/usr.bin/cvs/src/history.c
+++ b/gnu/usr.bin/cvs/src/history.c
@@ -200,7 +200,6 @@ static int accept_hrec PROTO((struct hrec * hr, struct hrec * lr));
static int select_hrec PROTO((struct hrec * hr));
static int sort_order PROTO((const PTR l, const PTR r));
static int within PROTO((char *find, char *string));
-static time_t date_and_time PROTO((char *date_str));
static void expand_modules PROTO((void));
static void read_hrecs PROTO((char *fname));
static void report_hrecs PROTO((void));
@@ -242,8 +241,8 @@ static char *tz_name = "+0000";
static char *since_rev;
static char *since_tag;
static char *backto;
-/* -D option, or 0 if not specified. */
-static time_t since_date;
+/* -D option, or 0 if not specified. RCS format. */
+static char * since_date;
static struct hrec *last_since_tag;
static struct hrec *last_backto;
@@ -364,18 +363,6 @@ sort_order (l, r)
return (left->idx - right->idx);
}
-static time_t
-date_and_time (date_str)
- char *date_str;
-{
- time_t t;
-
- t = get_date (date_str, (struct timeb *) NULL);
- if (t == (time_t) - 1)
- error (1, 0, "Can't parse date/time: %s", date_str);
- return (t);
-}
-
int
history (argc, argv)
int argc;
@@ -432,14 +419,16 @@ history (argc, argv)
error (0, 0, "date overriding rev/tag/backto");
*since_rev = *since_tag = *backto = '\0';
}
- since_date = date_and_time (optarg);
+ since_date = Make_Date (optarg);
break;
case 'b': /* Since specified file/Repos */
if (since_date || *since_rev || *since_tag)
{
error (0, 0, "backto overriding date/rev/tag");
*since_rev = *since_tag = '\0';
- since_date = 0;
+ if (since_date != NULL)
+ free (since_date);
+ since_date = NULL;
}
free (backto);
backto = xstrdup (optarg);
@@ -461,7 +450,9 @@ history (argc, argv)
{
error (0, 0, "rev overriding date/tag/backto");
*since_tag = *backto = '\0';
- since_date = 0;
+ if (since_date != NULL)
+ free (since_date);
+ since_date = NULL;
}
free (since_rev);
since_rev = xstrdup (optarg);
@@ -471,7 +462,9 @@ history (argc, argv)
{
error (0, 0, "tag overriding date/marker/file/repos");
*since_rev = *backto = '\0';
- since_date = 0;
+ if (since_date != NULL)
+ free (since_date);
+ since_date = NULL;
}
free (since_tag);
since_tag = xstrdup (optarg);
@@ -564,7 +557,7 @@ history (argc, argv)
if (histfile)
send_arg("-X");
if (since_date)
- option_with_arg ("-D", asctime (gmtime (&since_date)));
+ client_senddate (since_date);
if (backto[0] != '\0')
option_with_arg ("-b", backto);
for (f1 = file_list; f1 < &file_list[file_count]; ++f1)
@@ -683,6 +676,8 @@ history (argc, argv)
qsort ((PTR) hrec_head, hrec_count, sizeof (struct hrec), sort_order);
report_hrecs ();
free (fname);
+ if (since_date != NULL)
+ free (since_date);
free (since_rev);
free (since_tag);
free (backto);
@@ -1157,7 +1152,7 @@ select_hrec (hr)
/* "Since" checking: The argument parser guarantees that only one of the
* following four choices is set:
*
- * 1. If "since_date" is set, it contains a Unix time_t specified on the
+ * 1. If "since_date" is set, it contains the date specified on the
* command line. hr->date fields earlier than "since_date" are ignored.
* 2. If "since_rev" is set, it contains either an RCS "dotted" revision
* number (which is of limited use) or a symbolic TAG. Each RCS file
@@ -1177,8 +1172,12 @@ select_hrec (hr)
*/
if (since_date)
{
- if (hr->date < since_date)
+ char *ourdate = date_from_time_t (hr->date);
+
+ if (RCS_datecmp (ourdate, since_date) < 0)
return (0);
+
+ free (ourdate);
}
else if (*since_rev)
{
diff --git a/gnu/usr.bin/cvs/src/import.c b/gnu/usr.bin/cvs/src/import.c
index d79a10e3146..77c617a195c 100644
--- a/gnu/usr.bin/cvs/src/import.c
+++ b/gnu/usr.bin/cvs/src/import.c
@@ -20,8 +20,6 @@
#include "savecwd.h"
#include <assert.h>
-#define FILE_HOLDER ".#cvsxxx"
-
static char *get_comment PROTO((char *user));
static int add_rev PROTO((char *message, RCSNode *rcs, char *vfile,
char *vers));
@@ -655,39 +653,15 @@ add_rev (message, rcs, vfile, vers)
RCS_rewrite (rcs, NULL, NULL);
}
tocvsPath = wrap_tocvs_process_file (vfile);
- if (tocvsPath == NULL)
- {
- /* We play with hard links rather than passing -u to ci to avoid
- expanding RCS keywords (see test 106.5 in sanity.sh). */
- if (link_file (vfile, FILE_HOLDER) < 0)
- {
- if (errno == EEXIST)
- {
- (void) unlink_file (FILE_HOLDER);
- (void) link_file (vfile, FILE_HOLDER);
- }
- else
- {
- ierrno = errno;
- fperror (logfp, 0, ierrno,
- "ERROR: cannot create link to %s", vfile);
- error (0, ierrno, "ERROR: cannot create link to %s", vfile);
- return (1);
- }
- }
- }
status = RCS_checkin (rcs, tocvsPath == NULL ? vfile : tocvsPath,
message, vbranch,
- (RCS_FLAGS_QUIET
+ (RCS_FLAGS_QUIET | RCS_FLAGS_KEEPFILE
| (use_file_modtime ? RCS_FLAGS_MODTIME : 0)));
ierrno = errno;
- if (tocvsPath == NULL)
- rename_file (FILE_HOLDER, vfile);
- else
- if (unlink_file_dir (tocvsPath) < 0)
- error (0, errno, "cannot remove %s", tocvsPath);
+ if ((tocvsPath != NULL) && (unlink_file_dir (tocvsPath) < 0))
+ error (0, errno, "cannot remove %s", tocvsPath);
if (status)
{
diff --git a/gnu/usr.bin/cvs/src/options.h.in b/gnu/usr.bin/cvs/src/options.h.in
index 144980e068a..67e8c40aa04 100644
--- a/gnu/usr.bin/cvs/src/options.h.in
+++ b/gnu/usr.bin/cvs/src/options.h.in
@@ -15,13 +15,12 @@
* or the configure script directly. Sorry.
*/
-/*
- * For portability and heterogeneity reasons, CVS is shipped by
- * default using my own text-file version of the ndbm database library
- * in the src/myndbm.c file. If you want better performance and are
- * not concerned about heterogeneous hosts accessing your modules
- * file, turn this option off.
- */
+/* By default, CVS stores its modules and other such items in flat
+ text files (MY_NDBM enables this). Turning off MY_NDBM causes CVS
+ to look for a system-supplied ndbm database library and use it
+ instead. That may speed things up, but the default setting
+ generally works fine too. */
+
#ifndef MY_NDBM
#define MY_NDBM
#endif
diff --git a/gnu/usr.bin/cvs/src/rcs.h b/gnu/usr.bin/cvs/src/rcs.h
index 400d1a0a13f..f92988f4b1e 100644
--- a/gnu/usr.bin/cvs/src/rcs.h
+++ b/gnu/usr.bin/cvs/src/rcs.h
@@ -154,6 +154,10 @@ struct rcsversnode
List *other;
/* Newphrase fields from delta nodes. */
List *other_delta;
+#ifdef PRESERVE_PERMISSIONS_SUPPORT
+ /* Hard link information for each revision. */
+ List *hardlinks;
+#endif
};
typedef struct rcsversnode RCSVers;
@@ -185,6 +189,9 @@ char *RCS_check_kflag PROTO((const char *arg));
char *RCS_getdate PROTO((RCSNode * rcs, char *date, int force_tag_match));
char *RCS_gettag PROTO((RCSNode * rcs, char *symtag, int force_tag_match,
int *simple_tag));
+int RCS_exist_rev PROTO((RCSNode *rcs, char *rev));
+int RCS_exist_tag PROTO((RCSNode *rcs, char *tag));
+char *RCS_tag2rev PROTO((RCSNode *rcs, char *tag));
char *RCS_getversion PROTO((RCSNode * rcs, char *tag, char *date,
int force_tag_match, int *simple_tag));
char *RCS_magicrev PROTO((RCSNode *rcs, char *rev));
@@ -196,9 +203,11 @@ int RCS_datecmp PROTO((char *date1, char *date2));
time_t RCS_getrevtime PROTO((RCSNode * rcs, char *rev, char *date, int fudge));
List *RCS_symbols PROTO((RCSNode *rcs));
void RCS_check_tag PROTO((const char *tag));
+int RCS_valid_rev PROTO ((char *rev));
List *RCS_getlocks PROTO((RCSNode *rcs));
void freercsnode PROTO((RCSNode ** rnodep));
char *RCS_getbranch PROTO((RCSNode * rcs, char *tag, int force_tag_match));
+char *RCS_branch_head PROTO ((RCSNode *rcs, char *rev));
int RCS_isdead PROTO((RCSNode *, const char *));
char *RCS_getexpand PROTO ((RCSNode *));
diff --git a/gnu/usr.bin/cvs/src/recurse.c b/gnu/usr.bin/cvs/src/recurse.c
index 3896bc737a5..761c43eb0c1 100644
--- a/gnu/usr.bin/cvs/src/recurse.c
+++ b/gnu/usr.bin/cvs/src/recurse.c
@@ -586,7 +586,6 @@ do_dir_proc (p, closure)
char *newrepos;
List *sdirlist;
char *srepository;
- char *cp;
Dtype dir_return = R_PROCESS;
int stripped_dot = 0;
int err = 0;
@@ -790,16 +789,8 @@ but CVS uses %s for its own purposes; skipping %s directory",
repository = srepository;
}
- /* Put back update_dir. I think this is the same as just setting
- update_dir back to saved_update_dir, but there are a few cases I'm
- not sure about (in particular, if DIR is "." and update_dir is
- not ""), so for conservatism I'm leaving this here. */
- cp = last_component (update_dir);
- if (cp > update_dir)
- cp[-1] = '\0';
- else
- update_dir[0] = '\0';
- free (saved_update_dir);
+ free (update_dir);
+ update_dir = saved_update_dir;
return (err);
}
diff --git a/gnu/usr.bin/cvs/src/sanity.sh b/gnu/usr.bin/cvs/src/sanity.sh
index 1d877fee0b2..f378d73725f 100644
--- a/gnu/usr.bin/cvs/src/sanity.sh
+++ b/gnu/usr.bin/cvs/src/sanity.sh
@@ -552,18 +552,23 @@ if test x"$*" = x; then
tests="basica basicb basicc basic1 deep basic2"
# Branching, tagging, removing, adding, multiple directories
tests="${tests} rdiff death death2 branches branches2"
- tests="${tests} rcslib multibranch import importb join join2 join3"
+ tests="${tests} rcslib multibranch import importb importc"
+ tests="${tests} join join2 join3"
tests="${tests} new newb conflicts conflicts2 conflicts3"
# Checking out various places (modules, checkout -d, &c)
tests="${tests} modules modules2 modules3 modules4"
- tests="${tests} cvsadm abspath toplevel"
+ tests="${tests} cvsadm emptydir abspath toplevel"
# Log messages, error messages.
tests="${tests} mflag editor errmsg1 errmsg2"
# Watches, binary files, history browsing, &c.
tests="${tests} devcom devcom2 devcom3 watch4"
tests="${tests} ignore binfiles binfiles2 mcopy binwrap binwrap2"
tests="${tests} binwrap3 mwrap info config"
- tests="${tests} serverpatch log log2 ann crerepos rcs big modes stamps"
+ tests="${tests} serverpatch log log2 ann crerepos rcs rcs2"
+ tests="${tests} history"
+ tests="${tests} big modes modes2 stamps"
+ # PreservePermissions stuff: permissions, symlinks et al.
+ tests="${tests} perms symlinks hardlinks"
# More tag and branch tests, keywords.
tests="${tests} sticky keyword keywordlog"
tests="${tests} head tagdate multibranch2"
@@ -1066,31 +1071,6 @@ done"
cd ../..
rm -r 1
- # Let's see if we can add something to Emptydir.
- dotest basicb-18 "${testcvs} -q co -d t2/t3 first-dir second-dir" \
-"U t2/t3/first-dir/Emptydir/sfile1
-U t2/t3/first-dir/sdir2/sfile2
-U t2/t3/second-dir/aa"
- cd t2
- touch emptyfile
- # The fact that CVS lets us add a file here is a CVS bug, right?
- # I can just make this an error message (on the add and/or the
- # commit) without getting flamed, right?
- # Right?
- # Right?
- dotest basicb-19 "${testcvs} add emptyfile" \
-"${PROG} [a-z]*: scheduling file .emptyfile. for addition
-${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
- dotest basicb-20 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/CVSROOT/Emptydir/emptyfile,v
-done
-Checking in emptyfile;
-${TESTDIR}/cvsroot/CVSROOT/Emptydir/emptyfile,v <-- emptyfile
-initial revision: 1\.1
-done"
- cd ..
- rm -r t2
-
mkdir 1; cd 1
# Note that -H is an illegal option.
# I suspect that the choice between "illegal" and "invalid"
@@ -1105,18 +1085,6 @@ ${PROG} \[admin aborted\]: specify ${PROG} -H admin for usage information"
cd ..
rmdir 1
- # OK, while we have an Emptydir around, test a few obscure
- # things about it.
- mkdir edir; cd edir
- dotest basicb-edir-1 "${testcvs} -q co -l CVSROOT" \
-"U CVSROOT${DOTSTAR}"
- cd CVSROOT
- dotest_fail basicb-edir-2 "test -d Emptydir" ''
- # This tests the code in find_dirs which skips Emptydir.
- dotest basicb-edir-3 "${testcvs} -q -n update -d -P" ''
- cd ../..
- rm -r edir
-
if test "$keep" = yes; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
@@ -1124,7 +1092,6 @@ ${PROG} \[admin aborted\]: specify ${PROG} -H admin for usage information"
rm -rf ${CVSROOT_DIRNAME}/first-dir
rm -rf ${CVSROOT_DIRNAME}/second-dir
- rm -rf ${CVSROOT_DIRNAME}/CVSROOT/Emptydir
rm -f ${CVSROOT_DIRNAME}/topfile,v
;;
@@ -3657,6 +3624,7 @@ modify-on-br1
# rdiff -- imports with keywords
# import -- more tests of imports with keywords
# importb -- -b option.
+ # importc -- bunch o' files in bunch o' directories
# modules3
# mflag -- various -m messages
# ignore -- import and cvsignore
@@ -3972,6 +3940,56 @@ add
rm -rf ${CVSROOT_DIRNAME}/first-dir ${CVSROOT_DIRNAME}/second-dir
;;
+ importc)
+ # Test importing a bunch o' files in a bunch o' directories.
+ mkdir 1; cd 1
+ mkdir adir bdir cdir
+ mkdir adir/sub1 adir/sub2
+ mkdir adir/sub1/ssdir
+ mkdir bdir/subdir
+ touch adir/sub1/file1 adir/sub2/file2 adir/sub1/ssdir/ssfile
+ touch bdir/subdir/file1
+ touch cdir/cfile
+ dotest_sort importc-1 \
+"${testcvs} import -m import-it first-dir vendor release" \
+"
+
+N first-dir/adir/sub1/file1
+N first-dir/adir/sub1/ssdir/ssfile
+N first-dir/adir/sub2/file2
+N first-dir/bdir/subdir/file1
+N first-dir/cdir/cfile
+No conflicts created by this import
+${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir
+${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir/sub1
+${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir/sub1/ssdir
+${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir/sub2
+${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/bdir
+${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/bdir/subdir
+${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/cdir"
+ cd ..
+ mkdir 2; cd 2
+ dotest importc-2 "${testcvs} -q co first-dir" \
+"U first-dir/adir/sub1/file1
+U first-dir/adir/sub1/ssdir/ssfile
+U first-dir/adir/sub2/file2
+U first-dir/bdir/subdir/file1
+U first-dir/cdir/cfile"
+ cd first-dir
+ dotest importc-3 "${testcvs} update adir/sub1" \
+"${PROG} [a-z]*: Updating adir/sub1
+${PROG} [a-z]*: Updating adir/sub1/ssdir"
+ dotest importc-4 "${testcvs} update adir/sub1 bdir/subdir" \
+"${PROG} [a-z]*: Updating adir/sub1
+${PROG} [a-z]*: Updating adir/sub1/ssdir
+${PROG} [a-z]*: Updating bdir/subdir"
+ cd ..
+
+ cd ..
+ rm -r 1 2
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+ ;;
+
join)
# Test doing joins which involve adding and removing files.
# Variety of scenarios (see list below), in the context of:
@@ -7287,68 +7305,71 @@ U dir/dir2d2-2/sub2d2-2/file2-2"
## on the command line, but use a longer path.
##################################################
+ dotest_fail cvsadm-2d3-1 "${testcvs} co -d dir/dir2 1mod" \
+"${PROG} [a-z]*: cannot chdir to dir: No such file or directory
+${PROG} [a-z]*: ignoring module 1mod"
+
+ if test "$remote" = no; then
+ # Remote can't handle this, even with the "mkdir dir".
+ # This was also true of CVS 1.9.
+
+ mkdir dir
dotest cvsadm-2d3 "${testcvs} co -d dir/dir2 1mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file1"
dotest cvsadm-2d3b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d3d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+ dotest_fail cvsadm-2d3d "test -f dir/CVS/Repository" ""
dotest cvsadm-2d3f "cat dir/dir2/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
+ mkdir dir
dotest cvsadm-2d4 "${testcvs} co -d dir/dir2 2mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file2"
dotest cvsadm-2d4b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d4d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
+ mkdir dir
dotest cvsadm-2d5 "${testcvs} co -d dir/dir2 1d1mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file1"
dotest cvsadm-2d5b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d5d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
+ mkdir dir
dotest cvsadm-2d6 "${testcvs} co -d dir/dir2 1d2mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file2"
dotest cvsadm-2d6b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d6d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
+ mkdir dir
dotest cvsadm-2d7 "${testcvs} co -d dir/dir2 2d1mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file1"
dotest cvsadm-2d7b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d7d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
+ mkdir dir
dotest cvsadm-2d8 "${testcvs} co -d dir/dir2 2d2mod" \
"${PROG} [a-z]*: Updating dir/dir2
U dir/dir2/file2"
dotest cvsadm-2d8b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d8d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -7490,65 +7511,60 @@ U dir/dir2d2/sub2d2/file2"
## the ones in two-deep directories
+ mkdir dir
dotest cvsadm-N2d3 "${testcvs} co -N -d dir/dir2 1mod" \
"${PROG} [a-z]*: Updating dir/dir2/1mod
U dir/dir2/1mod/file1"
dotest cvsadm-N2d3b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d3d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
dotest cvsadm-N2d3h "cat dir/dir2/1mod/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
+ mkdir dir
dotest cvsadm-N2d4 "${testcvs} co -N -d dir/dir2 2mod" \
"${PROG} [a-z]*: Updating dir/dir2/2mod
U dir/dir2/2mod/file2"
dotest cvsadm-N2d4b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d4d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-N2d4f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
dotest cvsadm-N2d4h "cat dir/dir2/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
+ mkdir dir
dotest cvsadm-N2d5 "${testcvs} co -N -d dir/dir2 1d1mod" \
"${PROG} [a-z]*: Updating dir/dir2/dir1d1
U dir/dir2/dir1d1/file1"
dotest cvsadm-N2d5b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d5d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
dotest cvsadm-N2d5h "cat dir/dir2/dir1d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
+ mkdir dir
dotest cvsadm-N2d6 "${testcvs} co -N -d dir/dir2 1d2mod" \
"${PROG} [a-z]*: Updating dir/dir2/dir1d2
U dir/dir2/dir1d2/file2"
dotest cvsadm-N2d6b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d6d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-N2d6f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
dotest cvsadm-N2d6h "cat dir/dir2/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
+ mkdir dir
dotest cvsadm-N2d7 "${testcvs} co -N -d dir/dir2 2d1mod" \
"${PROG} [a-z]*: Updating dir/dir2/dir2d1/sub2d1
U dir/dir2/dir2d1/sub2d1/file1"
dotest cvsadm-N2d7b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d7d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-N2d7f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
dotest cvsadm-N2d7f "cat dir/dir2/dir2d1/CVS/Repository" \
@@ -7557,13 +7573,12 @@ U dir/dir2/dir2d1/sub2d1/file1"
"${AREP}mod1"
rm -rf CVS dir
+ mkdir dir
dotest cvsadm-N2d8 "${testcvs} co -N -d dir/dir2 2d2mod" \
"${PROG} [a-z]*: Updating dir/dir2/dir2d2/sub2d2
U dir/dir2/dir2d2/sub2d2/file2"
dotest cvsadm-N2d8b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d8d "cat dir/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
dotest cvsadm-N2d8h "cat dir/dir2/dir2d2/CVS/Repository" \
@@ -7572,6 +7587,8 @@ U dir/dir2/dir2d2/sub2d2/file2"
"${AREP}mod2/sub2"
rm -rf CVS dir
+ fi # end of tests to be skipped for remote
+
##################################################
## That's enough of that, thank you very much.
##################################################
@@ -7589,6 +7606,89 @@ U dir/dir2/dir2d2/sub2d2/file2"
rm -rf ${CVSROOT_DIRNAME}/mod2-2
;;
+ emptydir)
+ # Various tests of the Emptydir (CVSNULLREPOS) code. See also:
+ # cvsadm: tests of Emptydir in various module definitions
+ # basicb: Test that "Emptydir" is non-special in ordinary contexts
+
+ mkdir 1; cd 1
+ dotest emptydir-1 "${testcvs} co CVSROOT/modules" \
+"U CVSROOT/modules"
+ echo "# Module defs for emptydir tests" > CVSROOT/modules
+ echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT/modules
+
+ dotest emptydir-2 "${testcvs} ci -m add-modules" \
+"${PROG} [a-z]*: Examining .
+${PROG} [a-z]*: Examining CVSROOT
+Checking in CVSROOT/modules;
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
+new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
+done
+${PROG} [a-z]*: Rebuilding administrative file database"
+ rm -rf CVS CVSROOT
+
+ mkdir ${CVSROOT_DIRNAME}/mod1
+ # Populate. Not sure we really need to do this.
+ dotest emptydir-3 "${testcvs} co mod1" \
+"${PROG} [a-z]*: Updating mod1"
+ echo "file1" > mod1/file1
+ dotest emptydir-4 "${testcvs} add mod1/file1" \
+"${PROG} [a-z]*: scheduling file .mod1/file1. for addition
+${PROG} [a-z]*: use '${PROG} commit' to add this file permanently"
+ dotest emptydir-5 "${testcvs} -q ci -m yup mod1" \
+"RCS file: ${CVSROOT_DIRNAME}/mod1/file1,v
+done
+Checking in mod1/file1;
+${CVSROOT_DIRNAME}/mod1/file1,v <-- file1
+initial revision: 1\.1
+done"
+ rm -r mod1 CVS
+ # End Populate.
+
+ dotest emptydir-6 "${testcvs} co 2d1mod" \
+"${PROG} [a-z]*: Updating dir2d1/sub2d1
+U dir2d1/sub2d1/file1"
+ cd dir2d1
+ touch emptyfile
+ # The fact that CVS lets us add a file here is a CVS bug, right?
+ # I can just make this an error message (on the add and/or the
+ # commit) without getting flamed, right?
+ # Right?
+ # Right?
+ dotest emptydir-7 "${testcvs} add emptyfile" \
+"${PROG} [a-z]*: scheduling file .emptyfile. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
+ dotest emptydir-8 "${testcvs} -q ci -m add" \
+"RCS file: ${TESTDIR}/cvsroot/CVSROOT/Emptydir/emptyfile,v
+done
+Checking in emptyfile;
+${TESTDIR}/cvsroot/CVSROOT/Emptydir/emptyfile,v <-- emptyfile
+initial revision: 1\.1
+done
+${PROG} [a-z]*: Rebuilding administrative file database"
+ cd ..
+ rm -r CVS dir2d1
+
+ # OK, while we have an Emptydir around, test a few obscure
+ # things about it.
+ mkdir edir; cd edir
+ dotest emptydir-9 "${testcvs} -q co -l CVSROOT" \
+"U CVSROOT${DOTSTAR}"
+ cd CVSROOT
+ dotest_fail emptydir-10 "test -d Emptydir" ''
+ # This tests the code in find_dirs which skips Emptydir.
+ dotest emptydir-11 "${testcvs} -q -n update -d -P" ''
+ cd ../..
+ rm -r edir
+
+ cd ..
+
+ rm -r 1
+ rm -rf ${CVSROOT_DIRNAME}/mod1
+ # I guess for the moment the convention is going to be
+ # that we don't need to remove ${CVSROOT_DIRNAME}/CVSROOT/Emptydir
+ ;;
+
abspath)
# These tests test the thituations thin thwitch thoo theck
@@ -7632,9 +7732,17 @@ done"
# Done.
# Try checking out the module in a local directory
+ if test "$remote" = yes; then
+ dotest_fail abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \
+"${PROG} \[server aborted\]: absolute pathname .${TESTDIR}/1. illegal for server"
+ dotest abspath-2a-try2 "${testcvs} co -d 1 mod1" \
+"${PROG} [a-z]*: Updating 1
+U 1/file1"
+ else
dotest abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \
"${PROG} [a-z]*: Updating ${TESTDIR}/1
U ${TESTDIR}/1/file1"
+ fi # remote workaround
# Are we relative or absolute in our Repository file?
echo "${CVSROOT_DIRNAME}/mod1" > ${TESTDIR}/dotest.abs
@@ -7658,11 +7766,47 @@ U ${TESTDIR}/1/file1"
# Now try in a subdirectory. We're not covering any more
# code here, but we might catch a future error if someone
# changes the checkout code.
+
+ # Note that for the same reason that the shell command
+ # "touch 1/2/3" requires directories 1 and 1/2 to already
+ # exist, we expect ${TESTDIR}/1 to already exist. I believe
+ # this is the behavior of CVS 1.9 and earlier.
+ if test "$remote" = no; then
+ dotest_fail abspath-3.1 "${testcvs} co -d ${TESTDIR}/1/2 mod1" \
+"${PROG} [a-z]*: cannot chdir to 1: No such file or directory
+${PROG} [a-z]*: ignoring module mod1"
+ fi
+ dotest_fail abspath-3.2 "${testcvs} co -d 1/2 mod1" \
+"${PROG} [a-z]*: cannot chdir to 1: No such file or directory
+${PROG} [a-z]*: ignoring module mod1"
+ mkdir 1
+
+ if test "$remote" = yes; then
+ # The server wants the directory to exist, but that is
+ # a bug, it should only need to exist on the client side.
+ # See also cvsadm-2d3.
+ dotest_fail abspath-3a "${testcvs} co -d 1/2 mod1" \
+"${PROG} [a-z]*: cannot chdir to 1: No such file or directory
+${PROG} [a-z]*: ignoring module mod1"
+ cd 1
+ dotest abspath-3a-try2 "${testcvs} co -d 2 mod1" \
+"${PROG} [a-z]*: Updating 2
+U 2/file1"
+ cd ..
+ rm -r 1/CVS
+ else
dotest abspath-3a "${testcvs} co -d ${TESTDIR}/1/2 mod1" \
"${PROG} [a-z]*: Updating ${TESTDIR}/1/2
U ${TESTDIR}/1/2/file1"
+ fi # remote workaround
dotest abspath-3b "cat ${TESTDIR}/1/2/CVS/Repository" \
"${AREP}mod1"
+
+ # For all the same reasons that we want "1" to already
+ # exist, we don't to mess with it to traverse it, for
+ # example by creating a CVS directory.
+
+ dotest_fail abspath-3c "test -d ${TESTDIR}/1/CVS" ''
# Done. Clean up.
rm -rf ${TESTDIR}/1
@@ -7670,19 +7814,32 @@ U ${TESTDIR}/1/2/file1"
# Now try someplace where we don't have permission.
mkdir ${TESTDIR}/barf
chmod -w ${TESTDIR}/barf
- dotest_fail abspath-4 "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
+ if test "$remote" = yes; then
+ dotest_fail abspath-4 "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
+"${PROG} \[server aborted\]: absolute pathname .${TESTDIR}/barf/sub. illegal for server"
+ else
+ dotest_fail abspath-4 "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
"${PROG} \[[a-z]* aborted\]: cannot make directory sub: No such file or directory"
+ fi
chmod +w ${TESTDIR}/barf
rmdir ${TESTDIR}/barf
# Done. Nothing to clean up.
# Try checking out two modules into the same directory.
- dotest abspath-5a "${testcvs} co -d ${TESTDIR}/1 mod1 mod2" \
+ if test "$remote" = yes; then
+ dotest abspath-5a "${testcvs} co -d 1 mod1 mod2" \
+"${PROG} [a-z]*: Updating 1/mod1
+U 1/mod1/file1
+${PROG} [a-z]*: Updating 1/mod2
+U 1/mod2/file2"
+ else
+ dotest abspath-5a "${testcvs} co -d ${TESTDIR}/1 mod1 mod2" \
"${PROG} [a-z]*: Updating ${TESTDIR}/1/mod1
U ${TESTDIR}/1/mod1/file1
${PROG} [a-z]*: Updating ${TESTDIR}/1/mod2
U ${TESTDIR}/1/mod2/file2"
+ fi # end remote workaround
dotest abspath-5b "cat ${TESTDIR}/1/CVS/Repository" \
"${AREP}."
dotest abspath-5c "cat ${TESTDIR}/1/mod1/CVS/Repository" \
@@ -7694,7 +7851,17 @@ U ${TESTDIR}/1/mod2/file2"
# Try checking out the top-level module.
- dotest abspath-6a "${testcvs} co -d ${TESTDIR}/1 ." \
+ if test "$remote" = yes; then
+ dotest abspath-6a "${testcvs} co -d 1 ." \
+"${PROG} [a-z]*: Updating 1
+${PROG} [a-z]*: Updating 1/CVSROOT
+${DOTSTAR}
+${PROG} [a-z]*: Updating 1/mod1
+U 1/mod1/file1
+${PROG} [a-z]*: Updating 1/mod2
+U 1/mod2/file2"
+ else
+ dotest abspath-6a "${testcvs} co -d ${TESTDIR}/1 ." \
"${PROG} [a-z]*: Updating ${TESTDIR}/1
${PROG} [a-z]*: Updating ${TESTDIR}/1/CVSROOT
${DOTSTAR}
@@ -7702,6 +7869,7 @@ ${PROG} [a-z]*: Updating ${TESTDIR}/1/mod1
U ${TESTDIR}/1/mod1/file1
${PROG} [a-z]*: Updating ${TESTDIR}/1/mod2
U ${TESTDIR}/1/mod2/file2"
+ fi # end of remote workaround
dotest abspath-6b "cat ${TESTDIR}/1/CVS/Repository" \
"${AREP}."
dotest abspath-6c "cat ${TESTDIR}/1/CVSROOT/CVS/Repository" \
@@ -7713,17 +7881,45 @@ U ${TESTDIR}/1/mod2/file2"
# Done. Clean up.
rm -rf ${TESTDIR}/1
+ # Test that an absolute pathname to some other directory
+ # doesn't mess with the current working directory.
+ mkdir 1
+ cd 1
+ if test "$remote" = yes; then
+ dotest_fail abspath-7a "${testcvs} -q co -d ../2 mod2" \
+"${PROG} server: protocol error: .\.\./2. contains more leading \.\.
+${PROG} \[server aborted\]: than the 0 which Max-dotdot specified"
+ cd ..
+ dotest abspath-7a-try2 "${testcvs} -q co -d 2 mod2" \
+"U 2/file2"
+ cd 1
+ else
+ dotest abspath-7a "${testcvs} -q co -d ${TESTDIR}/2 mod2" \
+"U ${TESTDIR}/2/file2"
+ fi # remote workaround
+ dotest abspath-7b "ls" ""
+ dotest abspath-7c "${testcvs} -q co mod1" \
+"U mod1/file1"
+ cd mod1
+ if test "$remote" = yes; then
+ cd ../..
+ dotest abspath-7d "${testcvs} -q co -d 3 mod2" \
+"U 3/file2"
+ cd 1/mod1
+ else
+ dotest abspath-7d "${testcvs} -q co -d ${TESTDIR}/3 mod2" \
+"U ${TESTDIR}/3/file2"
+ fi # remote workaround
+ dotest abspath-7e "${testcvs} -q update -d" ""
+ cd ../..
+ rm -r 1 2 3
+
#
# FIXME: do other functions here (e.g. update /tmp/foo)
#
# Finished with all tests. Remove the module.
- rm -rf ${CVSROOT_DIRNAME}/mod1 ${CVSROOT_DIRNAME}/mod1
-
- # FIXME: the absolute pathname fixes create CVS directories
- # wherever they can. That means for the standard TESTDIR, a
- # /tmp/CVS directory will be created as well. It's not safe
- # to remove it, however.
+ rm -rf ${CVSROOT_DIRNAME}/mod1 ${CVSROOT_DIRNAME}/mod2
;;
@@ -7733,7 +7929,9 @@ U ${TESTDIR}/1/mod2/file2"
# Some test, somewhere, is creating Emptydir. That test
# should, perhaps, clean up for itself, but I don't know which
- # one it is.
+ # one it is (cvsadm, emptydir, &c).
+ # (On the other hand, should CVS care whether there is an
+ # Emptydir? That would seem a bit odd).
rm -rf ${CVSROOT_DIRNAME}/CVSROOT/Emptydir
mkdir 1; cd 1
@@ -7894,7 +8092,7 @@ ${PROG} [a-z]*: Updating top-dir"
cat >${TESTDIR}/editme <<EOF
#!${TESTSHELL}
sleep 1
-sed <\$1 -e 's/^/x&/g' >${TESTDIR}/edit.new
+sed <\$1 -e 's/^/x/' >${TESTDIR}/edit.new
mv ${TESTDIR}/edit.new \$1
exit 0
EOF
@@ -10520,7 +10718,9 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
;;
ann)
- # Tests of "cvs annotate". See also basica-10.
+ # Tests of "cvs annotate". See also:
+ # basica-10 A simple annotate test
+ # rcs Annotate and the year 2000
mkdir 1; cd 1
dotest ann-1 "${testcvs} -q co -l ." ''
mkdir first-dir
@@ -10626,6 +10826,22 @@ done"
1\.2 (${username} *[0-9a-zA-Z-]*): line
1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some
1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content"
+ # FIXCVS: shouldn't "-r 1.2.0.2" be the same as "-r br"?
+ dotest ann-12 "${testcvs} ann -r 1.2.0.2 file1" ""
+ dotest ann-13 "${testcvs} ann -r 1.2.2 file1" \
+"Annotations for file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1 (${username} *[0-9a-zA-Z-]*): this
+1\.1 (${username} *[0-9a-zA-Z-]*): is
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.1 (${username} *[0-9a-zA-Z-]*): file
+1\.2 (${username} *[0-9a-zA-Z-]*):
+1\.2 (${username} *[0-9a-zA-Z-]*): with
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.2 (${username} *[0-9a-zA-Z-]*): blank
+1\.2 (${username} *[0-9a-zA-Z-]*): line
+1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content"
cd ../..
rm -r 1
@@ -10984,8 +11200,33 @@ add file1
fail rcs-4
fi
+ # Intended behavior for "cvs annotate" is that it displays the
+ # last two digits of the year. Make sure it does that rather
+ # than some bogosity like "100".
+ dotest rcs-4a "${testcvs} annotate file1" \
+"Annotations for file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1 (kingdon 24-Nov-96): This is the first line
+1\.2 (kingdon 24-Nov-96): This is the third line
+1\.2 (kingdon 24-Nov-96): This is the fourth line
+1\.2 (kingdon 24-Nov-96): This is the fifth line
+1\.2 (kingdon 24-Nov-96): This is the sixth line
+1\.2 (kingdon 24-Nov-96): This is the seventh line
+1\.2 (kingdon 24-Nov-96): This is the eighth line
+1\.2 (kingdon 24-Nov-96): This is the ninth line
+1\.2 (kingdon 24-Nov-96): This is the tenth line
+1\.2 (kingdon 24-Nov-96): This is the eleventh line
+1\.3 (kingdon 24-Nov-00): This is the twelfth line (and what a line it is)
+1\.2 (kingdon 24-Nov-96): This is the thirteenth line"
+
+ # Probably should split this test into two at this point (file1
+ # above this line and file2 below), as the two share little
+ # data/setup.
+
# OK, here is another one. This one was written by hand based on
- # doc/RCSFILES and friends.
+ # doc/RCSFILES and friends. One subtle point is that none of
+ # the lines end with newlines; that is a feature which we
+ # should be testing.
cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file2,v
head 1.5 ;
branch 1.2.6;
@@ -11160,10 +11401,6 @@ a1 1
next branch revision
@"
- # For remote, the "update -p -D" usage seems not to work.
- # I'm not sure what is going on.
- if test "x$remote" = "xno"; then
-
if ${testcvs} -q update -p -D '1970-12-31 11:30 UT' file2 \
>${TESTDIR}/rcs4.tmp
then
@@ -11206,8 +11443,6 @@ next branch revision
fail rcs-13
fi
- fi # end of tests skipped for remote
-
# OK, now make sure cvs log doesn't have any trouble with the
# newphrases and such.
dotest rcs-14 "${testcvs} -q log file2" "
@@ -11258,6 +11493,143 @@ date: 1971/01/01 08:00:05; author: joe; state: Exp; lines: ${PLUS}1 -1
rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
+ rcs2)
+ # More date tests. Might as well do this as a separate
+ # test from "rcs", so that we don't need to perturb the
+ # "written by RCS 5.7" RCS file.
+ mkdir ${CVSROOT_DIRNAME}/first-dir
+ # Significance of various dates:
+ # * At least one Y2K standard refers to recognizing 9 Sep 1999
+ # (as an example of a pre-2000 date, I guess).
+ # * At least one Y2K standard refers to recognizing 1 Jan 2001
+ # (as an example of a post-2000 date, I guess).
+ # * Many Y2K standards refer to 2000 being a leap year.
+ cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file1,v
+head 1.7; access; symbols; locks; strict;
+1.7 date 2004.08.31.01.01.01; author sue; state; branches; next 1.6;
+1.6 date 2004.02.29.01.01.01; author sue; state; branches; next 1.5;
+1.5 date 2003.02.28.01.01.01; author sue; state; branches; next 1.4;
+1.4 date 2001.01.01.01.01.01; author sue; state; branches; next 1.3;
+1.3 date 2000.02.29.01.01.01; author sue; state; branches; next 1.2;
+1.2 date 99.09.09.01.01.01; author sue; state; branches; next 1.1;
+1.1 date 98.09.10.01.01.01; author sue; state; branches; next;
+desc @a test file@
+1.7 log @@ text @head revision@
+1.6 log @@ text @d1 1
+a1 1
+2004 was a great year for leaping@
+1.5 log @@ text @d1 1
+a1 1
+2003 wasn't@
+1.4 log @@ text @d1 1
+a1 1
+two year hiatus@
+1.3 log @@ text @d1 1
+a1 1
+2000 is also a good year for leaping@
+1.2 log @@ text @d1 1
+a1 1
+Tonight we're going to party like it's a certain year@
+1.1 log @@ text @d1 1
+a1 1
+Need to start somewhere@
+EOF
+ dotest rcs2-1 "${testcvs} -q co first-dir" 'U first-dir/file1'
+ cd first-dir
+
+ # 9 Sep 1999
+ if ${testcvs} -q update -p -D '1999-09-09 11:30 UT' file1 \
+ >${TESTDIR}/rcs4.tmp
+ then
+ dotest rcs2-2 "cat ${TESTDIR}/rcs4.tmp" \
+"Tonight we're going to party like it's a certain year"
+ else
+ fail rcs2-2
+ fi
+ # 1 Jan 2001.
+ if ${testcvs} -q update -p -D '2001-01-01 11:30 UT' file1 \
+ >${TESTDIR}/rcs4.tmp
+ then
+ dotest rcs2-3 "cat ${TESTDIR}/rcs4.tmp" \
+"two year hiatus"
+ else
+ fail rcs2-3
+ fi
+ # 29 Feb 2000
+ if ${testcvs} -q update -p -D '2000-02-29 11:30 UT' file1 \
+ >${TESTDIR}/rcs4.tmp
+ then
+ dotest rcs2-4 "cat ${TESTDIR}/rcs4.tmp" \
+"2000 is also a good year for leaping"
+ else
+ fail rcs2-4
+ fi
+ # 29 Feb 2003 is invalid
+ if ${testcvs} -q update -p -D '2003-02-29 11:30 UT' file1 \
+ >${TESTDIR}/rcs4.tmp 2>&1
+ then
+ fail rcs2-5
+ else
+ dotest rcs2-5 "cat ${TESTDIR}/rcs4.tmp" \
+"${PROG} \[[a-z]* aborted\]: Can't parse date/time: 2003-02-29 11:30 UT"
+ fi
+ rm ${TESTDIR}/rcs4.tmp
+
+ cd ..
+ rm -r first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+ ;;
+
+ history)
+ # CVSROOT/history tests:
+ # history: various "cvs history" invocations
+ # basic2: Generating the CVSROOT/history file via CVS commands.
+
+ # Put in some data for the history file (discarding what was
+ # there before). Note that this file format is fixed; the
+ # user may wish to analyze data from a previous version of
+ # CVS. If we phase out this format, it should be done
+ # slowly and carefully.
+ cat >${CVSROOT_DIRNAME}/CVSROOT/history <<EOF
+O3395c677|anonymous|<remote>/*0|ccvs||ccvs
+M339cafae|nk|<remote>|ccvs/src|1.229|sanity.sh
+M339dc339|kingdon|~/work/*0|ccvs/src|1.231|sanity.sh
+W33a6eada|anonymous|<remote>*4|ccvs/emx||Makefile.in
+C3b235f50|kingdon|<remote>|ccvs/emx|1.3|README
+M3b23af50|kingdon|~/work/*0|ccvs/doc|1.281|cvs.texinfo
+EOF
+ dotest history-1 "${testcvs} history -e -a" \
+"O 06/04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= <remote>/\*
+W 06/17 19:51 ${PLUS}0000 anonymous Makefile\.in ccvs/emx == <remote>/emx
+M 06/10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == ~/work/ccvs/src
+C 06/10 11:51 ${PLUS}0000 kingdon 1\.3 README ccvs/emx == <remote>
+M 06/10 17:33 ${PLUS}0000 kingdon 1\.281 cvs\.texinfo ccvs/doc == ~/work/ccvs/doc
+M 06/10 01:36 ${PLUS}0000 nk 1\.229 sanity\.sh ccvs/src == <remote>"
+ if ${testcvs} history -e -a -D '10 Jun 1997 13:00 UT' \
+ >${TESTDIR}/output.tmp
+ then
+ dotest history-2 "cat ${TESTDIR}/output.tmp" \
+"W 06/17 19:51 ${PLUS}0000 anonymous Makefile\.in ccvs/emx == <remote>/emx
+M 06/10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == ~/work/ccvs/src
+C 06/10 11:51 ${PLUS}0000 kingdon 1\.3 README ccvs/emx == <remote>
+M 06/10 17:33 ${PLUS}0000 kingdon 1\.281 cvs\.texinfo ccvs/doc == ~/work/ccvs/doc"
+ else
+ fail history-2
+ fi
+ if ${testcvs} history -e -a -D '10 Jun 2001 13:00 UT' \
+ >${TESTDIR}/output.tmp
+ then
+ # For reasons that are completely unclear to me, the number
+ # of spaces betwen "kingdon" and "1.281" is different than
+ # for the other tests.
+ dotest history-3 "cat ${TESTDIR}/output.tmp" \
+"M 06/10 17:33 ${PLUS}0000 kingdon 1\.281 cvs\.texinfo ccvs/doc == ~/work/ccvs/doc"
+ else
+ fail history-3
+ fi
+ rm ${TESTDIR}/output.tmp
+ ;;
+
big)
# Test ability to operate on big files. Intention is to
@@ -11441,6 +11813,51 @@ done"
# tests "should" not care about them...
;;
+ modes2)
+ # More tests of file permissions in the working directory
+ # and that sort of thing.
+
+ # The usual setup, file first-dir/aa with two revisions.
+ mkdir 1; cd 1
+ dotest modes2-1 "${testcvs} -q co -l ." ''
+ mkdir first-dir
+ dotest modes2-2 "${testcvs} add first-dir" \
+"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+ cd first-dir
+ touch aa
+ dotest modes2-3 "${testcvs} add aa" \
+"${PROG} [a-z]*: scheduling file .aa. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
+ dotest modes2-4 "${testcvs} -q ci -m add" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+done
+Checking in aa;
+${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+initial revision: 1\.1
+done"
+ echo "more money" >> aa
+ dotest modes2-5 "${testcvs} -q ci -m add" \
+"Checking in aa;
+${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+new revision: 1\.2; previous revision: 1\.1
+done"
+
+ # OK, here is the test. The idea is to see what
+ # No_Difference does if it can't open the file.
+ chmod a= aa
+ # If we don't change the st_mtime, CVS doesn't even try to read
+ # the file.
+ touch aa
+ dotest_fail modes2-6 "${testcvs} -q update -r 1.1 aa" \
+"${PROG} \[update aborted\]: cannot open file aa for comparing: Permission denied" \
+"${PROG} \[update aborted\]: reading aa: Permission denied"
+
+ chmod u+rwx aa
+ cd ../..
+ rm -r 1
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+ ;;
+
stamps)
# Test timestamps.
mkdir 1; cd 1
@@ -11581,6 +11998,202 @@ done"
rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
+ perms)
+ # short cut around checking out and committing CVSROOT
+ rm -f ${CVSROOT_DIRNAME}/CVSROOT/config
+ echo 'PreservePermissions=yes' > ${CVSROOT_DIRNAME}/CVSROOT/config
+ chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config
+
+ mkdir 1; cd 1
+ dotest perms-1 "${testcvs} -q co -l ." ''
+ mkdir first-dir
+ dotest perms-2 "${testcvs} add first-dir" \
+"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+ cd first-dir
+
+ touch foo
+ chmod 431 foo
+ dotest perms-3 "${testcvs} add foo" \
+"${PROG} [a-z]*: scheduling file .foo. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
+ dotest perms-4 "${testcvs} -q ci -m ''" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/foo,v
+done
+Checking in foo;
+${TESTDIR}/cvsroot/first-dir/foo,v <-- foo
+initial revision: 1\.1
+done"
+
+ # Test checking out files with different permissions.
+ cd ../..
+ mkdir 2; cd 2
+ dotest perms-5 "${testcvs} -q co first-dir" "U first-dir/foo"
+ cd first-dir
+ if test "$remote" = no; then
+ # PreservePermissions not yet implemented for remote.
+ dotest perms-6 "ls -l foo" "-r---wx--x .* foo"
+ fi
+
+ cd ../..
+ rm -rf 1 2
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+
+ rm -f ${CVSROOT_DIRNAME}/CVSROOT/config
+ touch ${CVSROOT_DIRNAME}/CVSROOT/config
+ chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config
+ ;;
+
+ symlinks)
+ # short cut around checking out and committing CVSROOT
+ rm -f ${CVSROOT_DIRNAME}/CVSROOT/config
+ echo 'PreservePermissions=yes' > ${CVSROOT_DIRNAME}/CVSROOT/config
+ chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config
+
+ mkdir 1; cd 1
+ dotest symlinks-1 "${testcvs} -q co -l ." ''
+ mkdir first-dir
+ dotest symlinks-2 "${testcvs} add first-dir" \
+"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+ cd first-dir
+
+ dotest symlinks-2.1 "ln -s ${TESTDIR}/fumble slink" ""
+ dotest symlinks-3 "${testcvs} add slink" \
+"${PROG} [a-z]*: scheduling file .slink. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
+ if test "$remote" = yes; then
+ # Remote doesn't implement PreservePermissions, and in its
+ # absence the correct behavior is to follow the symlink.
+ dotest_fail symlinks-4 "${testcvs} -q ci -m ''" \
+"${PROG} \[commit aborted\]: reading slink: No such file or directory"
+ else
+ dotest symlinks-4 "${testcvs} -q ci -m ''" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/slink,v
+done
+Checking in slink;
+${TESTDIR}/cvsroot/first-dir/slink,v <-- slink
+initial revision: 1\.1
+done"
+
+ # Test checking out symbolic links.
+ cd ../..
+ mkdir 2; cd 2
+ dotest symlinks-5 "${testcvs} -q co first-dir" "U first-dir/slink"
+ cd first-dir
+ dotest symlinks-6 "ls -l slink" \
+"l[rwx\-]* .* slink -> ${TESTDIR}/fumble"
+ fi
+
+ cd ../..
+ rm -rf 1 2
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+
+ rm -f ${CVSROOT_DIRNAME}/CVSROOT/config
+ touch ${CVSROOT_DIRNAME}/CVSROOT/config
+ chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config
+ ;;
+
+ hardlinks)
+ # short cut around checking out and committing CVSROOT
+ rm -f ${CVSROOT_DIRNAME}/CVSROOT/config
+ echo 'PreservePermissions=yes' > ${CVSROOT_DIRNAME}/CVSROOT/config
+ chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config
+
+ mkdir 1; cd 1
+ dotest hardlinks-1 "${testcvs} -q co -l ." ''
+ mkdir first-dir
+ dotest hardlinks-2 "${testcvs} add first-dir" \
+"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+ cd first-dir
+
+ # Make up some ugly filenames, to test that they get
+ # encoded properly in the delta nodes. Note that `dotest' screws
+ # up if some arguments have embedded spaces.
+ if touch aaaa
+ then
+ pass hardlinks-2.1
+ else
+ fail hardlinks-2.1
+ fi
+
+ if ln aaaa b.b.b.b
+ then
+ pass hardlinks-2.2
+ else
+ fail hardlinks-2.2
+ fi
+
+ if ln aaaa 'dd dd dd'
+ then
+ pass hardlinks-2.3
+ else
+ fail hardlinks-2.3
+ fi
+
+ dotest hardlinks-3 "${testcvs} add [abd]*" \
+"${PROG} [a-z]*: scheduling file .aaaa. for addition
+${PROG} [a-z]*: scheduling file .b\.b\.b\.b. for addition
+${PROG} [a-z]*: scheduling file .dd dd dd. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
+ dotest hardlinks-4 "${testcvs} -q ci -m ''" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaaa,v
+done
+Checking in aaaa;
+${TESTDIR}/cvsroot/first-dir/aaaa,v <-- aaaa
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/b\.b\.b\.b,v
+done
+Checking in b\.b\.b\.b;
+${TESTDIR}/cvsroot/first-dir/b\.b\.b\.b,v <-- b\.b\.b\.b
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dd dd dd,v
+done
+Checking in dd dd dd;
+${TESTDIR}/cvsroot/first-dir/dd dd dd,v <-- dd dd dd
+initial revision: 1\.1
+done"
+ # Test checking out hardlinked files.
+ cd ../..
+ mkdir 2; cd 2
+ if test "$remote" = yes; then
+ # Remote does not implement PreservePermissions.
+ dotest hardlinks-5 "${testcvs} -q co first-dir" \
+"U first-dir/aaaa
+U first-dir/b\.b\.b\.b
+U first-dir/dd dd dd"
+ cd first-dir
+ dotest hardlinks-6 "ls -l [abd]*" \
+"-[rwx\-]* *1 .* aaaa
+-[rwx\-]* *1 .* b\.b\.b\.b
+-[rwx\-]* *1 .* dd dd dd"
+ else
+ dotest hardlinks-5 "${testcvs} -q co first-dir" \
+"U first-dir/aaaa
+U first-dir/b\.b\.b\.b
+U first-dir/dd dd dd"
+ cd first-dir
+ # To make sure that the files are properly hardlinked, it
+ # would be nice to do `ls -i' and make sure all the inodes
+ # match. But I think that would require expr to support
+ # tagged regexps, and I don't think we can rely on that.
+ # So instead we just see that each file has the right
+ # number of links. -twp
+ dotest hardlinks-6 "ls -l [abd]*" \
+"-[rwx\-]* *3 .* aaaa
+-[rwx\-]* *3 .* b\.b\.b\.b
+-[rwx\-]* *3 .* dd dd dd"
+ fi
+
+ cd ../..
+ rm -rf 1 2
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+
+ rm -f ${CVSROOT_DIRNAME}/CVSROOT/config
+ touch ${CVSROOT_DIRNAME}/CVSROOT/config
+ chmod 444 ${CVSROOT_DIRNAME}/CVSROOT/config
+ ;;
+
sticky)
# More tests of sticky tags, particularly non-branch sticky tags.
# See many tests (e.g. multibranch) for ordinary sticky tag
@@ -12131,24 +12744,11 @@ add a line on trunk after trunktag"
"imported contents
add a line on trunk
add a line on trunk after trunktag"
- # But diff thinks that HEAD is "brtag". Case (c) from
- # cvs.texinfo (the "strange, maybe accidental" case).
- dotest_fail head-brtag-diff "${testcvs} -q diff -c -r HEAD -r br1" \
-"Index: file1
-===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
-retrieving revision 1\.3\.2\.1
-retrieving revision 1\.3\.2\.2
-diff -c -r1\.3\.2\.1 -r1\.3\.2\.2
-\*\*\* file1 [0-9/]* [0-9:]* 1\.3\.2\.1
---- file1 [0-9/]* [0-9:]* 1\.3\.2\.2
-\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-\*\*\* 2,4 \*\*\*\*
---- 2,5 ----
- add a line on trunk
- add a line on trunk after trunktag
- modify on branch
-${PLUS} modify on branch after brtag"
+
+ # CVS 1.9 and older thought that HEAD is "brtag" (this was
+ # noted as "strange, maybe accidental"). But "br1" makes a
+ # whole lot more sense.
+ dotest head-brtag-diff "${testcvs} -q diff -c -r HEAD -r br1" ""
# With a nonbranch sticky tag on the trunk, HEAD is the head
# of the trunk, I think.
@@ -12160,24 +12760,23 @@ add a line on trunk"
"imported contents
add a line on trunk
add a line on trunk after trunktag"
- # Like head-brtag-diff, HEAD is the sticky tag. Similarly
- # questionable.
+ # Like head-brtag-diff, there is a non-branch sticky tag.
dotest_fail head-trunktag-diff \
"${testcvs} -q diff -c -r HEAD -r br1" \
"Index: file1
===================================================================
RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
-retrieving revision 1\.2
+retrieving revision 1\.3
retrieving revision 1\.3\.2\.2
-diff -c -r1\.2 -r1\.3\.2\.2
-\*\*\* file1 [0-9/]* [0-9:]* 1\.2
+diff -c -r1\.3 -r1\.3\.2\.2
+\*\*\* file1 [0-9/]* [0-9:]* 1\.3
--- file1 [0-9/]* [0-9:]* 1\.3\.2\.2
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
-\*\*\* 1,2 \*\*\*\*
+\*\*\* 1,3 \*\*\*\*
--- 1,5 ----
imported contents
add a line on trunk
-${PLUS} add a line on trunk after trunktag
+ add a line on trunk after trunktag
${PLUS} modify on branch
${PLUS} modify on branch after brtag"
@@ -12996,6 +13595,192 @@ text
add a line on the branch
@"
+ # Tests of cvs admin -n. Make use of the results of
+ # admin-1 through admin-25.
+ # FIXME: We probably shouldn't make use of those results;
+ # this test is way too long as it is.
+
+ # tagtwo should be a revision
+ #
+ dotest admin-26-1 "${testcvs} admin -ntagtwo:tagone file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+done"
+
+ # br1 should be a branch
+ #
+ dotest admin-26-2 "${testcvs} admin -nbr1:br file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+done"
+
+ # Attach some tags using RCS versions
+ #
+ dotest admin-26-3 "${testcvs} admin -ntagthree:1.1 file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+done"
+
+ dotest admin-26-4 "${testcvs} admin -nbr2:1.1.2 file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+done"
+
+ dotest admin-26-5 "${testcvs} admin -nbr4:1.1.0.2 file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+done"
+
+ # Check results so far
+ #
+ dotest admin-26-6 "${testcvs} status -v file2" \
+"===================================================================
+File: file2 Status: Up-to-date
+
+ Working revision: 1\.2.*
+ Repository revision: 1\.2 ${TESTDIR}/cvsroot/first-dir/file2,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+ Existing Tags:
+ br4 (branch: 1\.1\.2)
+ br2 (branch: 1\.1\.2)
+ tagthree (revision: 1\.1)
+ br1 (branch: 1\.1\.2)
+ tagtwo (revision: 1\.1)
+ tagone (revision: 1\.1)
+ br (branch: 1\.1\.2)"
+
+
+ # Add a couple more revisions
+ #
+ echo "nuthr_line" >> file2
+ dotest admin-27-1 "${testcvs} commit -m nuthr_line file2" \
+"Checking in file2;
+${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+new revision: 1\.3; previous revision: 1\.2
+done"
+
+ echo "yet_another" >> file2
+ dotest admin-27-2 "${testcvs} commit -m yet_another file2" \
+"Checking in file2;
+${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+new revision: 1\.4; previous revision: 1\.3
+done"
+
+ # Fail trying to reattach existing tag with -n
+ #
+ dotest admin-27-3 "${testcvs} admin -ntagfour:1.1 file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+done"
+
+ dotest_fail admin-27-4 "${testcvs} admin -ntagfour:1.3 file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file2,v: symbolic name tagfour already bound to 1\.1
+${PROG} [a-z]*: cannot modify RCS file for .file2."
+
+ # Succeed at reattaching existing tag, using -N
+ #
+ dotest admin-27-5 "${testcvs} admin -Ntagfour:1.3 file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+done"
+
+ # Fail on some bogus operations
+ # Try to attach to nonexistant tag
+ #
+ dotest_fail admin-28-1 "${testcvs} admin -ntagsix:tagfive file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+${PROG} \[[a-z]* aborted\]: tag .tagfive. does not exist"
+
+ # Try a some nonexisting numeric target tags
+ #
+ dotest_fail admin-28-2 "${testcvs} admin -ntagseven:2.1 file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+${PROG} \[[a-z]* aborted\]: revision .2\.1. does not exist"
+
+ dotest_fail admin-28-3 "${testcvs} admin -ntageight:2.1.2 file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+${PROG} \[[a-z]* aborted\]: revision .2\.1\.2. does not exist"
+
+ # Try some invalid targets
+ #
+ dotest_fail admin-28-4 "${testcvs} admin -ntagnine:1.a.2 file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+${PROG} \[[a-z]* aborted\]: tag .1\.a\.2. must start with a letter"
+
+ dotest_fail admin-28-5 "${testcvs} admin -ntagten:BO+GUS file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+${PROG} \[[a-z]* aborted\]: tag .BO${PLUS}GUS. does not exist"
+
+ dotest_fail admin-28-6 "${testcvs} admin -nq.werty:tagfour file2" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+${PROG} \[[a-z]* aborted\]: tag .q\.werty. must not contain the characters ..*"
+
+ # Verify the archive
+ #
+ dotest admin-29 "cat ${TESTDIR}/cvsroot/first-dir/file2,v" \
+"head 1\.4;
+access
+ auth3
+ auth2
+ foo;
+symbols
+ tagfour:1\.3
+ br4:1\.1\.0\.2
+ br2:1\.1\.0\.2
+ tagthree:1\.1
+ br1:1\.1\.0\.2
+ tagtwo:1\.1
+ tagone:1\.1
+ br:1\.1\.0\.2;
+locks; strict;
+comment @# @;
+
+
+1\.4
+date [0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]; author ${username}; state Exp;
+branches;
+next 1\.3;
+
+1\.3
+date [0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]; author ${username}; state Exp;
+branches;
+next 1\.2;
+
+1\.2
+date [0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]; author ${username}; state Exp;
+branches;
+next ;
+
+
+desc
+@@
+
+
+1\.4
+log
+@yet_another
+@
+text
+@add a line
+nuthr_line
+yet_another
+@
+
+
+1\.3
+log
+@nuthr_line
+@
+text
+@d3 1
+@
+
+
+1\.2
+log
+@modify
+@
+text
+@d2 1
+@"
+
cd ../..
rm -r 1
rm -rf ${CVSROOT_DIRNAME}/first-dir
@@ -13141,6 +13926,11 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
"fred has file a-lock locked for version 1\.1
${PROG} [a-z]*: Pre-commit check failed
${PROG} \[[a-z]* aborted\]: correct above errors first!"
+ # OK, now test "cvs admin -l" in the case where someone
+ # else has the file locked.
+ dotest_fail reserved-13c "${testcvs} admin -l a-lock" \
+"RCS file: ${TESTDIR}/cvsroot/first-dir/a-lock,v
+${PROG} \[[a-z]* aborted\]: Revision 1\.1 is already locked by fred"
dotest reserved-14 "${testcvs} admin -u1.1 a-lock" \
"RCS file: ${TESTDIR}/cvsroot/first-dir/a-lock,v
diff --git a/gnu/usr.bin/cvs/src/status.c b/gnu/usr.bin/cvs/src/status.c
index 98be085fb6c..541a969a711 100644
--- a/gnu/usr.bin/cvs/src/status.c
+++ b/gnu/usr.bin/cvs/src/status.c
@@ -31,7 +31,7 @@ static const char *const status_usage[] =
};
int
-status (argc, argv)
+cvsstatus (argc, argv)
int argc;
char **argv;
{
diff --git a/gnu/usr.bin/cvs/src/version.c b/gnu/usr.bin/cvs/src/version.c
index f386895559b..d5fb085d078 100644
--- a/gnu/usr.bin/cvs/src/version.c
+++ b/gnu/usr.bin/cvs/src/version.c
@@ -12,7 +12,7 @@
#include "cvs.h"
-char *version_string = "\nConcurrent Versions System (CVS) 1.9.26";
+char *version_string = "\nConcurrent Versions System (CVS) 1.9.28";
#ifdef CLIENT_SUPPORT
#ifdef SERVER_SUPPORT
diff --git a/gnu/usr.bin/cvs/src/wrapper.c b/gnu/usr.bin/cvs/src/wrapper.c
index 645ce5c1030..e7c540d63cf 100644
--- a/gnu/usr.bin/cvs/src/wrapper.c
+++ b/gnu/usr.bin/cvs/src/wrapper.c
@@ -395,6 +395,11 @@ wrap_add (line, isTemp)
*line='\0';
switch(opt){
case 'f':
+ /* Before this is reenabled, need to address the problem in
+ commit.c (see http://www.cyclic.com/cvs/dev-wrap.txt). */
+ error (1, 0,
+ "-t/-f wrappers not supported by this version of CVS");
+
if(e.fromcvsFilter)
free(e.fromcvsFilter);
/* FIXME: error message should say where the bad value
@@ -404,6 +409,11 @@ wrap_add (line, isTemp)
error (1, 0, "Correct above errors first");
break;
case 't':
+ /* Before this is reenabled, need to address the problem in
+ commit.c (see http://www.cyclic.com/cvs/dev-wrap.txt). */
+ error (1, 0,
+ "-t/-f wrappers not supported by this version of CVS");
+
if(e.tocvsFilter)
free(e.tocvsFilter);
/* FIXME: error message should say where the bad value
diff --git a/gnu/usr.bin/cvs/vms/ChangeLog b/gnu/usr.bin/cvs/vms/ChangeLog
index 30910a1f6ce..7938093ce12 100644
--- a/gnu/usr.bin/cvs/vms/ChangeLog
+++ b/gnu/usr.bin/cvs/vms/ChangeLog
@@ -1,3 +1,18 @@
+1998-05-12 Jim Meyering <meyering@ascend.com>
+
+ * Makefile.in (distclean): New rule to remove Makefile.
+
+1998-04-18 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * getpass.c: Rewrite to use SYS$QIOW instead of curses. This
+ means we don't need to clear the screen, and also the curses
+ version was sometimes dying with a traceback on VMS 7.1 (I don't
+ know why).
+
+1998-04-09 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * filesubr.c (link_file): Remove; no longer used.
+
Tue Feb 17 02:29:24 1998 Noel Cragg <noel@swish.red-bean.com>
* filesubr.c (last_component): return the top-level directory when
diff --git a/gnu/usr.bin/cvs/vms/Makefile.in b/gnu/usr.bin/cvs/vms/Makefile.in
index f37bf736dd7..d725a72625f 100644
--- a/gnu/usr.bin/cvs/vms/Makefile.in
+++ b/gnu/usr.bin/cvs/vms/Makefile.in
@@ -65,7 +65,7 @@ ls:
@echo ${DISTFILES}
.PHONY: clean distclean realclean mostlyclean
-clean distclean realclean mostlyclean:
+clean realclean mostlyclean:
.PHONY: lint
lint:
@@ -80,6 +80,9 @@ dist-dir:
clean:
@echo make clean does nothing in vms subdir
+distclean:
+ rm -f Makefile
+
subdir = vms
Makefile: ../config.status Makefile.in
cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
diff --git a/gnu/usr.bin/cvs/vms/filesubr.c b/gnu/usr.bin/cvs/vms/filesubr.c
index 2d694134108..c9110ad6038 100644
--- a/gnu/usr.bin/cvs/vms/filesubr.c
+++ b/gnu/usr.bin/cvs/vms/filesubr.c
@@ -406,42 +406,6 @@ rename_file (from_file, to_file)
}
/*
- * link a file, if possible.
- */
-int
-link_file (from_file, to_file)
- const char *from_file;
- const char *to_file;
-{
- char from[PATH_MAX], to[PATH_MAX];
-
- /* Prefer local relative paths to files at expense of logical name
- access to files. */
-
- if (isabsolute(from_file))
- strcpy(from, from_file);
- else
- sprintf(from, "./%s", from_file);
-
- if (isabsolute(to_file))
- strcpy(to, to_file);
- else
- sprintf(to, "./%s", to_file);
-
- if (trace)
-#ifdef SERVER_SUPPORT
- (void) fprintf (stderr, "%c-> link(%s,%s)\n",
- (server_active) ? 'S' : ' ', from, to);
-#else
- (void) fprintf (stderr, "-> link(%s,%s)\n", from, to);
-#endif
- if (noexec)
- return (0);
-
- return (link (from, to));
-}
-
-/*
* unlink a file, if possible.
*/
int
diff --git a/gnu/usr.bin/cvs/vms/getpass.c b/gnu/usr.bin/cvs/vms/getpass.c
index 3b495c4d1a9..75891c153af 100644
--- a/gnu/usr.bin/cvs/vms/getpass.c
+++ b/gnu/usr.bin/cvs/vms/getpass.c
@@ -1,30 +1,75 @@
+/* This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details. */
+
+#undef TEST
+
#include <stdio.h>
-#include <curses.h>
+#include <iodef.h>
+#include <descrip.h>
+#include <starlet.h>
+#include <string.h>
+
+#ifdef TEST
+#include <stdlib.h>
+static void error (int, int, char *);
+#else
+# include "cvs.h"
+#endif
char *
getpass (char *prompt)
{
- /* FIXME: arbitrary limit; I think we need to ditch getstr to fix it. */
+ int status;
+ unsigned short chan;
+ static $DESCRIPTOR (sys_command, "SYS$COMMAND");
+ unsigned short iosb[4];
+ /* Arbitrary limit. It doesn't seem worth going through multiple
+ SYS$QIOW calls and who knows what to get rid of it, I don't
+ think. */
static char buf[2048];
- /* This clears the screen, which is *not* what we want. But until I
- get some real VMS documentation.... */
- initscr ();
+ /* Try to ensure that we avoid stepping on whatever output has
+ been sent to stdout. */
+ printf ("\n");
+ fflush (stdout);
- printw ("%s", prompt);
- refresh ();
- noecho ();
- getstr (buf);
- endwin ();
+ status = sys$assign (&sys_command, &chan, 0, 0);
+ if (!(status & 1))
+ error (1, 0, "sys$assign failed in getpass");
+ status = sys$qiow (0, chan, IO$_READPROMPT | IO$M_NOECHO, &iosb, 0, 0,
+ buf, sizeof (buf) - 1, 0, 0, prompt, strlen (prompt));
+ if (!(status & 1))
+ error (1, 0, "sys$qiow failed in getpass");
+ if (!(iosb[0] & 1))
+ error (1, 0, "sys$qiow (iosb) failed in getpass");
+ buf[iosb[1]] = '\0';
+ status = sys$dassgn (chan);
+ if (!(status & 1))
+ error (0, 0, "sys$dassgn failed in getpass");
+ /* Since there is no echo, we better go to the next line ourselves. */
printf ("\n");
return buf;
}
-#if 0
+#ifdef TEST
int
main ()
{
printf ("thank you for saying \"%s\"\n", getpass ("What'll it be? "));
return 0;
}
+
+static void error (int x, int y, char *msg)
+{
+ printf ("error: %s\n", msg);
+ if (x)
+ exit (EXIT_FAILURE);
+}
#endif
diff --git a/gnu/usr.bin/cvs/windows-NT/ChangeLog b/gnu/usr.bin/cvs/windows-NT/ChangeLog
index 4da9b84aee1..1de19e3bed2 100644
--- a/gnu/usr.bin/cvs/windows-NT/ChangeLog
+++ b/gnu/usr.bin/cvs/windows-NT/ChangeLog
@@ -1,3 +1,7 @@
+1998-04-09 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * filesubr.c (link_file): Remove; no longer used.
+
Tue Feb 17 02:31:41 1998 Noel Cragg <noel@swish.red-bean.com>
* filesubr.c (last_component): return the top-level directory when
diff --git a/gnu/usr.bin/cvs/windows-NT/SCC/ChangeLog b/gnu/usr.bin/cvs/windows-NT/SCC/ChangeLog
index 9673b144931..a4f44c3acd8 100644
--- a/gnu/usr.bin/cvs/windows-NT/SCC/ChangeLog
+++ b/gnu/usr.bin/cvs/windows-NT/SCC/ChangeLog
@@ -1,3 +1,11 @@
+1998-03-22 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * pubscc.h: Describe how SccGetCommandOptions works.
+
+1998-03-10 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * README.txt: Update and clarify various minor points.
+
Tue Jan 27 12:54:05 1998 Jim Kingdon <kingdon@harvey.cyclic.com>
* README.txt: Update bug-cvs address to gnu.org.
diff --git a/gnu/usr.bin/cvs/windows-NT/SCC/README.txt b/gnu/usr.bin/cvs/windows-NT/SCC/README.txt
index 816ede95e47..3d89711e22a 100644
--- a/gnu/usr.bin/cvs/windows-NT/SCC/README.txt
+++ b/gnu/usr.bin/cvs/windows-NT/SCC/README.txt
@@ -1,10 +1,11 @@
This is an experimental attempt to interface to the SCC API.
Note that this code doesn't (yet) do anything useful; this file
-is currently for people who want to help hack on our SCC interface,
-not people who want to use it.
+is currently for people who want to hack on the SCC interface,
+not people who want a plug-in integration between any particular pair
+of packages.
-To install it, build scc.dll and then add the following
+To install the test DLL, build scc.dll and then add the following
to the registry using the registry editor:
key/value what to put there
@@ -29,7 +30,8 @@ CVS is not owned by any one company, so CVS seems like the
most appropriate string to put there.
If you do this right, then "Source Control" should appear
-under the "Tools" menu.
+under the "Tools" menu (for Visual C++ 4.x; the details of course may
+vary for other development environments).
NOW WHAT?
@@ -88,8 +90,8 @@ although they may be at a somewhat different level and systems may
support/use several interfaces rather than it being an either/or thing.
If you know of other interfaces which should be added here I guess the
-best place to make suggestions is bug-cvs@prep.ai.mit.edu (although
-this list is not intended to be CVS-centric).
+best place to make suggestions is bug-cvs@gnu.org (although
+the following list is not intended to be particularly CVS-centric).
* The CVS remote protocol is documented in doc/cvsclient.texi in the
CVS distribution and has at least 2 implementations of the client
@@ -103,11 +105,11 @@ implements this via a module which speaks the Metrowerks API out one
end and the OLE Automation interface out the other (the module runs on
Windows, not Mac).
-* There is an API (for Java, I think) which is supported by Symantec's
-Visual Cafe 2.0, and will be supported by a service pack which will
-implement it for StarTeam 2.1 (source: usenet post by Steve Reynolds
-of StarBase, Oct 1997).
+* Symantec's Visual Cafe interface.
* Metrowerks publishes and implements the CodeWarrior IDE Version
Control System API. I think maybe the way to get a copy of the spec
is as part of CodeWarrior but I'm not completely clear on that.
+
+For (some) more details on these interfaces, and others, see
+ http://www.cyclic.com/cvs/dev-int.html
diff --git a/gnu/usr.bin/cvs/windows-NT/SCC/pubscc.h b/gnu/usr.bin/cvs/windows-NT/SCC/pubscc.h
index 0962abdba9a..f97d9250a19 100644
--- a/gnu/usr.bin/cvs/windows-NT/SCC/pubscc.h
+++ b/gnu/usr.bin/cvs/windows-NT/SCC/pubscc.h
@@ -441,12 +441,20 @@ extern SCC_return SccRunScc
LONG num_files,
LPSTR *file_names);
-/* Lots of things that we could do here. Options to get/update
- such as -r -D -k etc. just for starters. Note that the terminology is
- a little confusing here. This function relates to "provider options"
- (prov_options) which are a way for us to provide extra dialogs beyond
- the basic ones for a particular command. It is unrelated to "command
- options" (SCC_cmdopt_*). */
+/* If the user invokes version-control-system-defined behavior
+ (typically by clicking an Advanced button in a dialog, e.g. the Get
+ dialog), and the user clicks on that button, then the development
+ environment calls SccGetCommandOptions. The version control system
+ interacts with the user and then sets *PROV_OPTIONSP to whatever it
+ wants. The development environment doesn't do anything with it,
+ but does pass it to the various commands as prov_options. If it
+ calls SccGetCommandOptions again, it will pass the same value (so
+ user choices from the previous "Advanced" click can serve as
+ defaults).
+
+ Note that "provider options" (prov_options) are unrelated to
+ "command options" (SCC_cmdopt_*). */
+
extern SCC_return SccGetCommandOptions
(void *context_arg, HWND window,
enum SCC_command command,
diff --git a/gnu/usr.bin/cvs/windows-NT/filesubr.c b/gnu/usr.bin/cvs/windows-NT/filesubr.c
index ef88c5d8a86..0008b112a0b 100644
--- a/gnu/usr.bin/cvs/windows-NT/filesubr.c
+++ b/gnu/usr.bin/cvs/windows-NT/filesubr.c
@@ -99,20 +99,6 @@ copy_file (from, to)
(void) utime (to, &t);
}
-/*
- * link a file, if possible. Warning: the Windows NT version of this
- * function just copies the file, so only use this function in ways
- * that can deal with either a link or a copy.
- */
-int
-link_file (from, to)
- const char *from;
- const char *to;
-{
- copy_file (from, to);
- return 0;
-}
-
/* FIXME-krp: these functions would benefit from caching the char * &
stat buf. */