From 461cc63e7458ce60db55037c1a7656349538b52f Mon Sep 17 00:00:00 2001 From: tholo Date: Fri, 21 Feb 1997 06:36:04 +0000 Subject: [PATCH] New release from Cyclic Software --- gnu/usr.bin/cvs/BUGS | 29 +- gnu/usr.bin/cvs/ChangeLog | 174 + gnu/usr.bin/cvs/HACKING | 38 +- gnu/usr.bin/cvs/INSTALL | 32 +- gnu/usr.bin/cvs/NEWS | 47 +- gnu/usr.bin/cvs/README | 56 +- gnu/usr.bin/cvs/README.VMS | 45 +- gnu/usr.bin/cvs/TESTS | 3 +- gnu/usr.bin/cvs/TODO | 2 - gnu/usr.bin/cvs/config.h.in | 6 + gnu/usr.bin/cvs/contrib/ChangeLog | 29 + gnu/usr.bin/cvs/contrib/README | 9 - gnu/usr.bin/cvs/contrib/log.pl | 2 - gnu/usr.bin/cvs/contrib/rcs2log.sh | 5 +- gnu/usr.bin/cvs/cvs-format.el | 14 +- gnu/usr.bin/cvs/cvs.spec | 2 +- gnu/usr.bin/cvs/cvsnt.mak | 17 +- gnu/usr.bin/cvs/doc/ChangeLog | 297 ++ gnu/usr.bin/cvs/doc/Makefile.in | 6 - gnu/usr.bin/cvs/doc/cvs.texinfo | 2519 ++++++++++-- gnu/usr.bin/cvs/doc/cvsclient.texi | 389 +- gnu/usr.bin/cvs/lib/ChangeLog | 27 + gnu/usr.bin/cvs/lib/Makefile.in | 7 - gnu/usr.bin/cvs/lib/argmatch.c | 6 +- gnu/usr.bin/cvs/lib/build_lib.com | 1 - gnu/usr.bin/cvs/lib/fnmatch.c | 7 +- gnu/usr.bin/cvs/lib/fnmatch.h | 7 +- gnu/usr.bin/cvs/lib/getline.c | 6 +- gnu/usr.bin/cvs/lib/getopt.c | 6 +- gnu/usr.bin/cvs/lib/getopt.h | 8 +- gnu/usr.bin/cvs/lib/getopt1.c | 6 +- gnu/usr.bin/cvs/lib/getwd.c | 6 +- gnu/usr.bin/cvs/lib/hostname.c | 6 +- gnu/usr.bin/cvs/lib/mkdir.c | 6 +- gnu/usr.bin/cvs/lib/regex.c | 6 +- gnu/usr.bin/cvs/lib/regex.h | 6 +- gnu/usr.bin/cvs/lib/rename.c | 6 +- gnu/usr.bin/cvs/lib/sighandle.c | 8 +- gnu/usr.bin/cvs/lib/strdup.c | 6 +- gnu/usr.bin/cvs/lib/strerror.c | 7 +- gnu/usr.bin/cvs/lib/stripslash.c | 6 +- gnu/usr.bin/cvs/lib/system.h | 8 +- gnu/usr.bin/cvs/lib/vasprintf.c | 7 +- gnu/usr.bin/cvs/lib/wait.h | 6 +- gnu/usr.bin/cvs/lib/xgetwd.c | 6 +- gnu/usr.bin/cvs/lib/yesno.c | 6 +- gnu/usr.bin/cvs/macintosh/ChangeLog | 22 + gnu/usr.bin/cvs/macintosh/Makefile | 9 +- gnu/usr.bin/cvs/macintosh/README.MacCVS | 13 +- gnu/usr.bin/cvs/macintosh/filesubr.c | 6 +- gnu/usr.bin/cvs/macintosh/mac_init.c | 9 - gnu/usr.bin/cvs/macintosh/options.h | 29 +- gnu/usr.bin/cvs/macintosh/pwd.c | 6 +- gnu/usr.bin/cvs/man/ChangeLog | 11 + gnu/usr.bin/cvs/man/Makefile.in | 4 - gnu/usr.bin/cvs/man/cvs.1 | 7 +- gnu/usr.bin/cvs/man/cvsbug.8 | 4 - gnu/usr.bin/cvs/os2/ChangeLog | 90 + gnu/usr.bin/cvs/os2/Makefile.in | 7 +- gnu/usr.bin/cvs/os2/README | 36 +- gnu/usr.bin/cvs/os2/config.h | 53 +- gnu/usr.bin/cvs/os2/filesubr.c | 105 +- gnu/usr.bin/cvs/os2/getpass.c | 6 +- gnu/usr.bin/cvs/os2/options.h | 25 +- gnu/usr.bin/cvs/os2/os2inc.h | 22 + gnu/usr.bin/cvs/os2/popen.c | 17 +- gnu/usr.bin/cvs/os2/pwd.c | 6 +- gnu/usr.bin/cvs/os2/pwd.h | 6 +- gnu/usr.bin/cvs/os2/run.c | 12 +- gnu/usr.bin/cvs/os2/stripslash.c | 6 +- gnu/usr.bin/cvs/os2/tcpip.h | 24 + gnu/usr.bin/cvs/os2/watcom.mak | 153 + gnu/usr.bin/cvs/src/ChangeLog | 3929 +----------------- gnu/usr.bin/cvs/src/ChangeLog-96 | 4434 +++++++++++++++++++++ gnu/usr.bin/cvs/src/Makefile.in | 9 +- gnu/usr.bin/cvs/src/add.c | 121 +- gnu/usr.bin/cvs/src/admin.c | 2 +- gnu/usr.bin/cvs/src/buffer.h | 12 +- gnu/usr.bin/cvs/src/checkin.c | 6 +- gnu/usr.bin/cvs/src/classify.c | 9 +- gnu/usr.bin/cvs/src/client.c | 451 +-- gnu/usr.bin/cvs/src/client.h | 17 +- gnu/usr.bin/cvs/src/create_adm.c | 13 +- gnu/usr.bin/cvs/src/cvsbug.sh | 6 +- gnu/usr.bin/cvs/src/diff.c | 90 +- gnu/usr.bin/cvs/src/edit.c | 14 +- gnu/usr.bin/cvs/src/edit.h | 6 +- gnu/usr.bin/cvs/src/entries.c | 17 +- gnu/usr.bin/cvs/src/error.c | 47 +- gnu/usr.bin/cvs/src/error.h | 20 +- gnu/usr.bin/cvs/src/fileattr.c | 11 +- gnu/usr.bin/cvs/src/fileattr.h | 6 +- gnu/usr.bin/cvs/src/filesubr.c | 87 +- gnu/usr.bin/cvs/src/find_names.c | 22 +- gnu/usr.bin/cvs/src/hash.c | 79 +- gnu/usr.bin/cvs/src/hash.h | 2 - gnu/usr.bin/cvs/src/history.c | 81 +- gnu/usr.bin/cvs/src/import.c | 5 +- gnu/usr.bin/cvs/src/log.c | 23 +- gnu/usr.bin/cvs/src/login.c | 155 +- gnu/usr.bin/cvs/src/logmsg.c | 367 +- gnu/usr.bin/cvs/src/mkmodules.c | 117 +- gnu/usr.bin/cvs/src/modules.c | 136 +- gnu/usr.bin/cvs/src/myndbm.c | 2 +- gnu/usr.bin/cvs/src/myndbm.h | 2 - gnu/usr.bin/cvs/src/options.h.in | 67 +- gnu/usr.bin/cvs/src/rcs.c | 49 +- gnu/usr.bin/cvs/src/rcs.h | 7 +- gnu/usr.bin/cvs/src/recurse.c | 13 +- gnu/usr.bin/cvs/src/release.c | 314 +- gnu/usr.bin/cvs/src/remove.c | 2 +- gnu/usr.bin/cvs/src/repos.c | 10 +- gnu/usr.bin/cvs/src/root.c | 40 +- gnu/usr.bin/cvs/src/rtag.c | 12 +- gnu/usr.bin/cvs/src/run.c | 44 +- gnu/usr.bin/cvs/src/sanity.sh | 964 ++++- gnu/usr.bin/cvs/src/server.h | 7 +- gnu/usr.bin/cvs/src/status.c | 4 +- gnu/usr.bin/cvs/src/subr.c | 37 + gnu/usr.bin/cvs/src/tag.c | 103 +- gnu/usr.bin/cvs/src/update.h | 7 +- gnu/usr.bin/cvs/src/vers_ts.c | 44 +- gnu/usr.bin/cvs/src/version.c | 2 +- gnu/usr.bin/cvs/src/watch.c | 12 +- gnu/usr.bin/cvs/src/watch.h | 6 +- gnu/usr.bin/cvs/src/wrapper.c | 4 +- gnu/usr.bin/cvs/tools/ChangeLog | 9 + gnu/usr.bin/cvs/tools/Makefile.in | 6 - gnu/usr.bin/cvs/tools/pcl-cvs/ChangeLog | 10 + gnu/usr.bin/cvs/tools/pcl-cvs/Makefile.in | 6 +- gnu/usr.bin/cvs/tools/pcl-cvs/pcl-cvs.el | 9 +- gnu/usr.bin/cvs/vms/ChangeLog | 28 + gnu/usr.bin/cvs/vms/dir.h | 6 +- gnu/usr.bin/cvs/vms/filesubr.c | 6 +- gnu/usr.bin/cvs/vms/filutils.c | 4 - gnu/usr.bin/cvs/vms/filutils.h | 4 - gnu/usr.bin/cvs/vms/misc.c | 4 - gnu/usr.bin/cvs/vms/misc.h | 4 - gnu/usr.bin/cvs/vms/ndir.c | 6 +- gnu/usr.bin/cvs/vms/options.h | 25 +- gnu/usr.bin/cvs/vms/pipe.c | 4 - gnu/usr.bin/cvs/vms/pipe.h | 4 - gnu/usr.bin/cvs/vms/pwd.h | 4 +- gnu/usr.bin/cvs/vms/stat.c | 2 +- gnu/usr.bin/cvs/vms/vms.h | 4 - gnu/usr.bin/cvs/vms/waitpid.c | 6 +- gnu/usr.bin/cvs/windows-NT/ChangeLog | 64 + gnu/usr.bin/cvs/windows-NT/Makefile.in | 1 - gnu/usr.bin/cvs/windows-NT/README | 29 +- gnu/usr.bin/cvs/windows-NT/filesubr.c | 17 +- gnu/usr.bin/cvs/windows-NT/ndir.c | 6 +- gnu/usr.bin/cvs/windows-NT/ndir.h | 6 +- gnu/usr.bin/cvs/windows-NT/options.h | 25 +- gnu/usr.bin/cvs/windows-NT/pwd.c | 6 +- gnu/usr.bin/cvs/windows-NT/pwd.h | 6 +- gnu/usr.bin/cvs/windows-NT/run.c | 21 +- gnu/usr.bin/cvs/windows-NT/stripslash.c | 6 +- gnu/usr.bin/cvs/zlib/ChangeLog | 8 + gnu/usr.bin/cvs/zlib/Makefile.in | 12 +- 159 files changed, 10800 insertions(+), 6190 deletions(-) create mode 100644 gnu/usr.bin/cvs/os2/os2inc.h create mode 100644 gnu/usr.bin/cvs/os2/watcom.mak create mode 100644 gnu/usr.bin/cvs/src/ChangeLog-96 diff --git a/gnu/usr.bin/cvs/BUGS b/gnu/usr.bin/cvs/BUGS index 89a37b69946..7d1f77fc11a 100644 --- a/gnu/usr.bin/cvs/BUGS +++ b/gnu/usr.bin/cvs/BUGS @@ -15,9 +15,32 @@ similar file for the unix-like operating systems (not yet, at least). This file also might contain some platform-specific bugs. -* The "&" feature of the modules file does not work correctly with -client/server CVS. The documented behavior (which is implemented by -non-client/server CVS) is the correct one. +* Importing files as binary (using wrappers to specify that--like +binwrap-1 in the testsuite) will not work on systems which need to +translate between text and binary files (that is, it will work only on +unix). (for the cause, look at send_modified and note that it knows +nothing about whether wrappers specified binary-ness). The file will +be marked as binary, but the contents will be incorrect. The +workaround is (a) import the binary files (but not text files, unless +they have been converted to unix text files) on unix, or (b) check in +the correct contents for the binary files after the import is done. + + +* Some people have reported seeing the message "dying gasps from %s +unexpected" (where %s is the name of your server) when using +client/server CVS. One person reported that this had to do with using +pserver and trying to run a program not in the PATH (which is set up +by inetd, I think) from one of the *info scripts. But noone has +carefully tracked this down (is it caused by something in the server +writing to stdout or stderr when it shouldn't? But then wouldn't the +"dying gasps" message be preceded by "warning: unrecognized response +`%s' from cvs server"?). + + +* "make remotecheck" sometimes fails on test 187a3 with + cvs server: in directory .: + cvs [server aborted]: *PANIC* administration files missing +This does not happen every time. (-kingdon, Nov 96, Red Hat linux 3.0.3). * The -m option to "cvs add" does not work with client/server CVS. diff --git a/gnu/usr.bin/cvs/ChangeLog b/gnu/usr.bin/cvs/ChangeLog index ab94ab490cc..d8e23da53e7 100644 --- a/gnu/usr.bin/cvs/ChangeLog +++ b/gnu/usr.bin/cvs/ChangeLog @@ -1,3 +1,177 @@ +Wed Jan 8 14:50:47 1997 Jim Kingdon + + * Makefile.in, NEWS, README, TODO, configure.in: Remove CVSid; we + decided to get rid of these some time ago. + +Wed Jan 8 00:17:13 1997 Jim Kingdon + + * README (Credits): Refer to NEWS not ChangeLog; the ChangeLog in + question got renamed a bit but ended up as the bottom of the NEWS + file. Eliminate use of first person in a few places where it is + unclear who it refers to. Explicitly say that the lists + of contributors are not comprehensive. + +Thu Jan 2 12:59:45 1997 Jim Kingdon + + * README, Makefile.in: Remove paragraph about writing to the Free + Software Foundation at 675 Massachusetts Avenue. (1) They are no + longer at that address; (2) the Free Software Foundation are not + the ones to write to concerning CVS licensing. bug-cvs would be a + more appropriate choice; (3) there is probably little need for + this paragraph anyway. + +Thu Jan 2 09:46:37 1997 Karl Fogel + + * NEWS: mention read-only repository access feature. + +Wed Jan 1 18:47:08 1997 Jim Kingdon + + * cvs.spec: Don't include ChangeLog and ChangeLog.zoo in %doc. + There is no point in including them without src/ChangeLog, + src/ChangeLog-96, etc., but more to the point they really belong + in the source distribution rather than a binary distribution anyway. + +Mon Dec 30 16:55:54 1996 Abe Feldman + + * NEWS: Add entry for changes to checkout command (creating CVS + directory at top of working directory) + +Tue Dec 17 13:13:30 1996 Jim Kingdon + + * NEWS: Add entry for verifymsg. + +Tue Dec 10 19:22:20 1996 Jim Kingdon + + * cvs-format.el: Revise comments to explain how to use it and + general minor tidying of comments. + +Mon Dec 2 13:05:44 1996 Ian Lance Taylor + + * configure.in: Don't call AC_CHECK_FUNCS(connect) a second time, + because the value will have been cached; instead, check whether + the library was found with connect defined. + * configure: Rebuild with autoconf 2.12. + +Sat Nov 30 23:04:52 1996 Jim Kingdon + + * BUGS: Add note about mysterious failure in test 187a3. + +Fri Nov 29 10:19:50 1996 Jim Kingdon + + * configure.in (AC_CHECK_FUNCS): Also check for readlink. + * config.h.in: Regenerated using autoheader 2.10. + +Fri Nov 22 16:30:27 1996 Brendan Kehoe + + * configure.in: Check for -lsocket, etc., before checking for + Kerberos libraries. + * configure: Rebuild. + +1996-11-19 Jim Kingdon + + * cvsnt.mak: Remove strippath.c. + +Sun Nov 3 21:54:18 1996 Jim Kingdon + + * README: Move detailed information on compatibility to + the manual; simply point to it here. + +Thu Oct 31 07:20:45 1996 Jim Kingdon + + * BUGS: Add note about cvs import of binary files on non-unix. + +Tue Oct 29 13:59:14 1996 Jim Kingdon + + * BUGS: Add note about "dying gasps" message. + +Sat Oct 26 16:17:09 1996 Jim Blandy + + * configure.in (AC_CHECK_FUNCS): Check for tzset. + +Fri Oct 25 10:27:08 1996 Jim Kingdon + + * NEWS: Mention new loginfo features. + +Thu Oct 24 08:21:48 1996 Lars.Henriksen@netman.dk + + * INSTALL: Update to "DEC Alpha running OSF/1 version 3.2 (1.9)" + +Tue Oct 22 10:34:21 1996 Noel Cragg + + * configure.in: don't check for the existence of the /etc/security + directory, because it's possible to have PAM installed without + using shadow passwords. + * configure: regenerated. + +Sat Oct 19 18:34:29 1996 Jim Kingdon + + * README: Say that the remote protocol is not interoperable before + CVS 1.5. + +Sat Oct 19 13:06:53 1996 Mark H. Wilkinson + and Jim Kingdon + + * configure.in, INSTALL: New options for configure to enable or + disable client and server code, overriding configure's defaults. + * confiugre: Regenerated. + +Sat Oct 19 13:06:53 1996 Jim Kingdon + + * INSTALL: Add note about what to do if you got a binary + distribution of CVS. Add VAX/VMS entry. + +Thu Oct 17 15:38:03 1996 Jim Kingdon + + * NEWS, README: Reinstate 30 Sep 96 changes concerning US letter + vs. A4 paper. + +Wed Oct 16 16:59:57 1996 Jim Blandy + + * configure.in: Simplify code to check for crypt. Check for + -lcrypt first, and then check for the crypt function. The old + code did slightly funky things with cache variables, which JimK's + last change disturbed. Let's just keep it simple. + * configure: Rebuilt. + +Wed Oct 16 15:01:59 1996 Jim Kingdon + + * configure.in: Don't call unset. It isn't portable to Ultrix, + but perhaps more to the point, seems like we should be using the + cached values (there was no comment explaining why we should + ignore the cached values, and none of the CVS developers were + able to provide an explanation when I asked). + * configure: Regenerated. + + * NEWS: Add item regarding export and "cvs history". + +Tue Oct 15 07:40:42 1996 Jim Kingdon + + * TESTS: Mention the fact that expr is only for the tests, not for + CVS itself. At least one person was unclear on this. + +Mon Oct 14 12:13:03 1996 Jim Kingdon + + * HACKING: Add "Submitting patches (strategy)" section and + sentence about test cases. These changes have been run by + devel-cvs and there was no objection. + +Sat Oct 12 19:43:56 1996 Jim Kingdon + + * README.VMS: Add notes about some build problems on VAX/VMS. + +Thu Oct 10 09:20:25 1996 Jim Kingdon + + * BUGS: Remove item about & in modules file and client/server; the + bug is fixed. + + * README.VMS: Rewrite sections about wildcard expansion and + calling editors to suggest technical approaches and to make it + clear that fixes will only happen if someone gets around to them. + +Sat Oct 5 15:01:22 1996 Jim Blandy + + * Version 1.9 released. + Tue Oct 1 14:32:44 1996 Jim Kingdon * NEWS, README: Revert changes regarding -D, -g, and A4. They diff --git a/gnu/usr.bin/cvs/HACKING b/gnu/usr.bin/cvs/HACKING index ce65cffdfbc..6ccd4f9f4b4 100644 --- a/gnu/usr.bin/cvs/HACKING +++ b/gnu/usr.bin/cvs/HACKING @@ -91,7 +91,40 @@ Filenames for .c and .h files may contain _ but should not contain - (the latter causes Visual C++ 2.1 to create makefiles which Visual C++ 4.0 cannot use). -* Submitting patches +* Submitting patches (strategy) + +Only some kinds of changes are suitable for inclusion in the +"official" CVS. Bugfixes, where CVS's behavior contradicts the +documentation and/or expectations that everyone agrees on, should be +OK (strategically). For features, the desirable attributes are that +the need is clear and that they fit nicely into the architecture of +CVS. + +However, if there is reason to think that a change would significantly +inconvenience any significant body of CVS users, or would be +controversial for other reasons, then the design should be re-thought. +Go back to the requirements (writing documentation might help, if you +write the documentation to explain why one would use the feature not +just what the feature does). Think about whether there is a behavior +which works in both your situation and the other situations. Make a +list of the issues (for example, submit a comment or documentation +change). Ask your coworkers, a newsgroup, or a mailing list, and see +what other people think. Distribute some experimental patches outside +the "official" CVS and see what people think. By this process, the +intention is that once-controversial changes can be refined to the +point where they are relatively uncontroversial before they are +actually checked in to the "official" CVS. Features like zlib, +encryption, and others have benefitted from this process in the past +by being mentioned in the documentation and/or discussed, before an +implementation was checked in. + +If longstanding CVS behavior, that people may be relying on, is +clearly deficient, it can be changed, but only slowly and carefully. +For example, the global -q option was introduced in CVS 1.3 but the +command -q options, which the global -q replaced, were not removed +until CVS 1.6. + +* Submitting patches (tactics) Please include a ChangeLog entry (see the GNU coding standards for information on writing one) with patches. Include a description of @@ -102,6 +135,9 @@ description may be helpful if there is a better way to solve the problem. In addition to the ChangeLog entry, there should be a change to the NEWS file and cvs.texinfo in the case of a user-visible change. +It is nice to have a test case (see TESTS), especially for fixes which +involve subtle behaviors or twisted sections of the code. + If you solve several unrelated problems, submit a separate patch for each one. Patches should be tested before submission. Use context diffs or unidiffs for patches. diff --git a/gnu/usr.bin/cvs/INSTALL b/gnu/usr.bin/cvs/INSTALL index 1df53ecd04e..00ff5604927 100644 --- a/gnu/usr.bin/cvs/INSTALL +++ b/gnu/usr.bin/cvs/INSTALL @@ -14,8 +14,10 @@ Alpha: DEC Alpha running OSF/1 version 2.0 (1.8) DEC Alpha running OSF/1 version 2.1 (about 1.4A2) DEC Alpha running OSF/1 version 3.0 (1.5.95) (footnote 7) - DEC Alpha running OSF/1 version 3.2 (1.7+obvious patch) + DEC Alpha running OSF/1 version 3.2 (1.9) DEC Alpha running VMS 6.2 (1.8.85 client-only) +Cray: + J90 running unicos 9 (CVS version unknown; Oct 1996) (footnote 10) HPPA: HP 9000/710 running HP-UX 8.07A using gcc (about 1.4A2) HPPA running HP-UX 9 (1.8) @@ -31,7 +33,7 @@ i386 family: ISC 4.0.1 (1.8.87) Linux (kernel 1.2.x) (1.8.86) BSDI 2.0 (1.4.93) (footnote 5) - FreeBSD 2.0.5, i486, gcc (1.5.95) + FreeBSD 2.1.5-stable (1.8.87) NextSTEP 3.3 (1.7) SCO Unix 3.2.4.2, gcc 2.7.2 (1.8.87) (footnote 4) SCO OpenServer 5 (1.8.86) @@ -42,7 +44,7 @@ i386 family: OS/2 Version 3 using IBM C/C++ Tools 2.01 (1.8.86 + patches) m68k: Sun 3 running SunOS 4.1.1_U1 w/ bundled K&R /usr/5bin/cc (1.8.86+) - NextSTEP 3.3 (1.7) + NextSTEP 3.3p1 (1.8.87) Lynx 2.3.0 062695 (1.6.86) (footnote 9) m88k: Data General AViiON running dgux 5.4R2.10 (1.5) @@ -67,6 +69,9 @@ SPARC: Sun SPARC running Solaris 2.5 (1.8.87) NextSTEP 3.3 (1.7) Sun SparcClassing running Linux 2.0.17, gcc 2.7.2 (1.8.87) +VAX: + VAX running VMS 6.2 (1.9+patches, client-only) + (see README.VMS for information on necessary hacks). (footnote 1) AIX 4.1 systems fail to run "configure" due to bugs in their @@ -111,9 +116,16 @@ SPARC: So after running configure I had to undef HAVE_DIRENT_H and define HAVE_SYS_DIR_H. +(footnote 10) + remove CLIENT_SUPPORT and SERVER_SUPPORT from config.h + remove md5.o from lib/Makefile + remove "#include "regex.h" from cvs.h + ------------------------------------------------------------------------------- -Installation under Unix: +Installation under Unix (if you got a binary distribution from +somewhere, install it according to procedure for that binary +distribution, then skip to step 5): 1) Run "configure": @@ -128,6 +140,18 @@ Installation under Unix: value is "/usr/local", with binaries in sub-directory "bin", manual pages in sub-directory "man", and libraries in sub-directory "lib". + A normal build of CVS will create an executable which supports + local, server, or client CVS (if you don't know the difference, + it is described in the Repository chapter of doc/cvs.texinfo). If + you do not intend to use client or server CVS, you may want to + prevent these features from being included in the executable you + build. You can do this with the --disable-client and + --disable-server options: + + $ ./configure --disable-client --disable-server + + Typically this can reduce the size of the executable by around 30%. + If you are using server or local CVS, RCS needs to be installed in the user's PATH (or a path you have configured in src/options.h, or a path specified with the -b option). If you don't have RCS, diff --git a/gnu/usr.bin/cvs/NEWS b/gnu/usr.bin/cvs/NEWS index 4e3bf64977b..3d8868ce27f 100644 --- a/gnu/usr.bin/cvs/NEWS +++ b/gnu/usr.bin/cvs/NEWS @@ -1,4 +1,47 @@ -Changes since 1.8: +Changes since 1.9: + +* Read-only repository access is implemented for the +password-authenticated server (other access methods are just governed +by Unix file permissions, since they require login access to the +repository machine anyway). See the "Repository" section of +cvs.texinfo for details. Note that the security cautions in +cvs.texinfo ("Password authentication security"), and the requirement +that read-only users be able to create locks and write the history +file, both apply. + +* The "checkout" command now creates a CVS directory at the top level +of the new working directory, in addition to CVS directories created +within checked-out directories. + +* There is a new administrative file verifymsg which is like editinfo +but merely validates the message, rather than also getting it from the +user. It therefore works with client/server CVS or if one uses the -m +or -F options to commit. See the verifymsg section of cvs.texinfo for +details. + +* The %s format formerly accepted in loginfo has been extended to +formats such as %{sVv}, so that loginfo scripts have access to the +version numbers being changed. See the Loginfo section of cvs.texinfo +for details. + +* The postscript documentation (doc/cvs.ps) shipped with CVS is now +formatted for US letter size instead of A4. This is not because we +consider this size "better" than A4, but because we believe that the +US letter version will print better on A4 paper than the other way +around. + +* The "cvs export" command is now logged in the history file and there +is a "cvs history -x E" command to select history file entries +produced by export. + +* CVS no longer uses the CVS_PASSWORD environment variable. Storing +passwords in cleartext in an environment variable is a security risk, +especially since (on BSD variants) any user on the system can display +any process's environment using 'ps'. Users should use the 'cvs +login' command instead. + + +Changes from 1.8 to 1.9: * Windows NT client should now work on Windows 95 as well. @@ -980,5 +1023,3 @@ Mon Nov 19 23:15:11 1990 Brian Berliner (berliner at prisma.com) 1986 version of CVS and making it available to the world. Dick's version is available on uunet.uu.net in the comp.sources.unix/volume6/cvs directory. - -$CVSid: @(#)ChangeLog 1.35 94/10/22 $ diff --git a/gnu/usr.bin/cvs/README b/gnu/usr.bin/cvs/README index fb8b5f81311..620426c12f1 100644 --- a/gnu/usr.bin/cvs/README +++ b/gnu/usr.bin/cvs/README @@ -1,5 +1,3 @@ -$CVSid: @(#)README 1.32 94/10/22 $ - CVS Kit Copyright (c) 1993-1994 Brian Berliner @@ -17,10 +15,6 @@ $CVSid: @(#)README 1.32 94/10/22 $ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - ------------------------------------------------------------------------------- Welcome to CVS! @@ -73,7 +67,7 @@ CVS but will tend to require some script-writing and software other than CVS: bug-tracking, build management (that is, make and make-like tools), and automated testing. -And a whole lot more. See the doc/cvs.texinfo file for more information. +And a whole lot more. See the manual for more information. ------------------------------------------------------------------------------- @@ -81,23 +75,10 @@ Notes to people upgrading from a previous release of CVS: See the NEWS file for a description of features new in this version. -The repository format is compatible going back to CVS 1.3. But see -the "Watches compatibility" section of doc/cvs.texinfo if you have -copies of CVS 1.6 or older and you want to use the optional developer -communication features. - -The working directory format is compatible going back to CVS 1.5. It -did change between CVS 1.3 and CVS 1.5. If you run CVS 1.5 or newer -on a working directory checked out with CVS 1.3, CVS will convert it, -but to go back to CVS 1.3 you need to check out a new working -directory with CVS 1.3. - -The remote protocol is interoperable going back to CVS 1.5. Using a -client or server older than 1.5 is deprecated and may fail to work at -some point in the future (1.5 was the first official release with the -remote protocol, but some older versions might still be floating -around). In many cases you need to upgrade both the client and the -server to take advantage of new features and bugfixes, however. +See the Compatibility section of the manual for information on +compatibility between CVS versions. The quick summary is that as long +as you not using the optional watch features, there are no +compatibility problems with CVS 1.5 or later. ------------------------------------------------------------------------------- @@ -114,8 +95,11 @@ Please read the INSTALL file for installation instructions. Brief summary: The documentation is in the doc subdirectory. cvs.texinfo is the main manual; cvs.info* and cvs.ps are the info and postscript versions, respectively, generated from cvs.texinfo. The postscript version is -for A4 paper; if you want US letter size, you need to remove the line -@afourpaper from cvs.texinfo and re-generate cvs.ps using TeX. +for US letter size paper; we do this not because we consider this size +"better" than A4, but because we believe that the US letter version +will print better on A4 paper than the other way around. If you want a +version formatted for A4, add the line @afourpaper near the start of +cvs.texinfo and re-generate cvs.ps using TeX. ------------------------------------------------------------------------------- @@ -154,7 +138,7 @@ D.C., is included in the "doc" directory. Jeff Polk from BSDI converted the CVS 1.2 sources into much more readable and maintainable C code. He also added a whole lot of functionality and modularity to the code in the process. -See the ChangeLog file. +See the bottom of the NEWS file (from about 1992). david d `zoo' zuhn contributed the working base code for CVS 1.4 Alpha. His work carries on from work done by K. Richard Pixley @@ -174,9 +158,9 @@ K. Richard Pixley, Cygnus Support contributed many bug fixes/enhancement as well as completing early reviews of the CVS 1.3 manual pages. -Roland Pesch, then of Cygnus Support contributed brand new -cvs(1) and cvs(5) manual pages. We should all thank him for saving us from -my poor use of our language! +Roland Pesch, then of Cygnus Support contributed +brand new cvs(1) and cvs(5) manual pages. Thanks to him for saving us +from poor use of our language! Paul Sander, HaL Computer Systems, Inc. wrote and contributed the code in lib/sighandle.c. I added support for POSIX, BSD, @@ -185,13 +169,17 @@ and non-POSIX/non-BSD systems. Jim Kingdon and others at Cygnus Support wrote the remote repository access code. -In addition to the above contributors, the following Beta testers deserve -special mention for their support. If I have left off your name, I -apologize. Just write to me and let me know! +There have been many, many contributions not listed here. Consult the +ChangeLog files in each directory for a more complete idea. + +In addition to the above contributors, the following Beta testers +deserve special mention for their support. This is only a partial +list; if you have helped in this way and would like to be listed, let +bug-cvs know (as described elsewhere in this file). Mark D. Baushke Per Cederqvist - J.T. Conklin (jtc@cygnus.com> + J.T. Conklin Vince DeMarco Paul Eggert Lal George diff --git a/gnu/usr.bin/cvs/README.VMS b/gnu/usr.bin/cvs/README.VMS index d3eaa3bd9af..c7f64a72e59 100644 --- a/gnu/usr.bin/cvs/README.VMS +++ b/gnu/usr.bin/cvs/README.VMS @@ -165,19 +165,38 @@ to their advantage. ------------------------------------------------------------------------------- Wildcard expansion is not yet implemented (i.e. CVS COMMIT *.c won't -work.) I have found GPL'd routine which does shell globbing, but I -have not tried to put it in yet. - -Log messages must be entered on the command line using -m. I wanted to start -up TPU for editing log messages, but apparently SYS$SYSTEM:TPU.EXE requires -some command table parsing through DCL, and cannot be directly invoked using C -within CVS. [I did get LSEDIT to launch, but it wasn't interested in argv at -all.] - -You can use -e or define the logical EDITOR to cause CVS to try other editors -if you want to test what's available on your system. I haven't tested this, -but if you install vi or emacs, chances are it will probably work. Just make -sure the .EXE files are in a directory listed in VAXC$PATH. +work.) I think that expand_wild should be calling lib$findfile +(util.c in gzip is said to provide an example), but noone has gotten +around to implementing this. + +Log messages must be entered on the command line using -m or -F. You +can use -e or define the logical EDITOR to cause CVS to try other +editors (TPU.EXE or any other editor which wants DCL command parsing +will not work) if you want to test what's available on your system. I +haven't tested this, but if you install vi or emacs, chances are it +will probably work. Just make sure the .EXE files are in a directory +listed in VAXC$PATH (is this a typo for DCL$PATH? Also, will a +logical name work?). If someone gets around to implementing it, we +should probably be using the callable editors (e.g. TPU$TPU), although +of course we also need interface(s) which are not locked into any +particular editors. + +---------------------------------------- + +Notes regarding compiling on VAX/VMS 6.2 (not Alpha) (These are items +which hopefully will have cleaner solutions in the future, but here is +how to get around them for now): + +* Need to compile lib/getdate.c with vaxc instead of decc to avoid a +compiler bugcheck. Therefore one must add SYS$LIBRARY:VAXCRTL/LIBRARY +to the link. + +* In src/ignore.c, change lstat to stat. In vms/filesubr.c, change +"#ifdef S_ISLNK" to "#if 0". + +* Ignore the warnings in vms/vmsmunch.c; the system include file +declares something as an int when it should be void *. Not *our* +fault! Credits: diff --git a/gnu/usr.bin/cvs/TESTS b/gnu/usr.bin/cvs/TESTS index a559c21af01..15161ec71c2 100644 --- a/gnu/usr.bin/cvs/TESTS +++ b/gnu/usr.bin/cvs/TESTS @@ -12,7 +12,8 @@ WARNING: This test can take quite a while to run, esp. if your disks are slow or over-loaded. You will probably need GNU expr, which is part of the GNU sh-utils -package. +package (this is just for running the tests; CVS itself doesn't use +expr). 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/TODO b/gnu/usr.bin/cvs/TODO index 5ce4681f465..de6b13f2021 100644 --- a/gnu/usr.bin/cvs/TODO +++ b/gnu/usr.bin/cvs/TODO @@ -1,5 +1,3 @@ -$CVSid: @(#)TODO 1.26 94/09/21 $ - 14. Pathname stripper, for checkout, as well as for writing the Repository file. [[ I have a simple one, but need to make sure to call it at all the diff --git a/gnu/usr.bin/cvs/config.h.in b/gnu/usr.bin/cvs/config.h.in index 9a9a5b83392..51b305af261 100644 --- a/gnu/usr.bin/cvs/config.h.in +++ b/gnu/usr.bin/cvs/config.h.in @@ -117,6 +117,9 @@ /* Define if you have the putenv function. */ #undef HAVE_PUTENV +/* Define if you have the readlink function. */ +#undef HAVE_READLINK + /* Define if you have the setvbuf function. */ #undef HAVE_SETVBUF @@ -138,6 +141,9 @@ /* Define if you have the timezone function. */ #undef HAVE_TIMEZONE +/* Define if you have the tzset function. */ +#undef HAVE_TZSET + /* Define if you have the vfork function. */ #undef HAVE_VFORK diff --git a/gnu/usr.bin/cvs/contrib/ChangeLog b/gnu/usr.bin/cvs/contrib/ChangeLog index 5826410c65b..70dcf921cab 100644 --- a/gnu/usr.bin/cvs/contrib/ChangeLog +++ b/gnu/usr.bin/cvs/contrib/ChangeLog @@ -1,3 +1,32 @@ +Wed Jan 8 14:48:58 1997 Jim Kingdon + + * Makefile.in, README, log.pl: Remove CVSid; we decided to get rid + of these some time ago. + +Thu Jan 2 13:30:56 1997 Jim Kingdon + + * Makefile.in: Remove "675" paragraph; see ../ChangeLog for rationale. + +Thu Oct 17 18:28:25 1996 Jim Kingdon + + * patch-2.1-.new-fix: Removed; it was not in DISTFILES so it never + made it into distributions. It also isn't clear what it has to do + with CVS. It is available from + ftp://ftp.weird.com/pub/patch-2.1-.new-fix + * README: Remove entry for patch-2.1-.new-fix. + +Wed Oct 16 10:22:44 1996 Jim Blandy + + * rcs2log.sh: Change date output format to something CVS 1.9 + accepts. I think this breaks the Sep 29 change, but I don't have + a copy of CVS 1.5 handy, so I can't find a format that works with + both, and I think it's more important that it work with the + version it's distributed with. + +Sat Oct 12 21:18:19 1996 Jim Kingdon + + * README: Don't mention pcl-cvs; it isn't here any more. + Sun Sep 29 19:45:19 1996 Greg A. Woods * README: add entry for patch-2.1-.new-fix. diff --git a/gnu/usr.bin/cvs/contrib/README b/gnu/usr.bin/cvs/contrib/README index 004d894551a..81caec5f571 100644 --- a/gnu/usr.bin/cvs/contrib/README +++ b/gnu/usr.bin/cvs/contrib/README @@ -1,5 +1,3 @@ -$CVSid: @(#)README 1.12 94/09/25 $ - This "contrib" directory is a place holder for code/scripts sent to me by contributors around the world. This README file will be kept up-to-date from release to release. BUT, we must point out that these @@ -35,9 +33,6 @@ An attempt at a table of Contents for this directory: changes. Includes the RCS revision of the change as part of the log. Contributed by Kevin Samborn . - pcl-cvs A directory that contains GNU Emacs lisp code which - implements a CVS-mode for emacs. - Contributed by Per Cederqvist . commit_prep A perl script, to be combined with log_accum.pl, to log_accum provide for a way to combine the individual log messages of a multi-directory "commit" into a @@ -110,7 +105,3 @@ An attempt at a table of Contents for this directory: by hostname, then runs a subprocess whose input/output is redirected through the port. Contributed by Benjamin J. Lee - patch-2.1-.new-fix - A fix for GNU Patch version 2.1 which (more) properly - handles creation of new files. - Contributed by Greg A. Woods diff --git a/gnu/usr.bin/cvs/contrib/log.pl b/gnu/usr.bin/cvs/contrib/log.pl index 5e3bf488377..e4fb9b1d3fb 100644 --- a/gnu/usr.bin/cvs/contrib/log.pl +++ b/gnu/usr.bin/cvs/contrib/log.pl @@ -1,8 +1,6 @@ #! xPERL_PATHx # -*-Perl-*- # -#ident "$CVSid$" -# # XXX: FIXME: handle multiple '-f logfile' arguments # # XXX -- I HATE Perl! This *will* be re-written in shell/awk/sed soon! diff --git a/gnu/usr.bin/cvs/contrib/rcs2log.sh b/gnu/usr.bin/cvs/contrib/rcs2log.sh index 33050ff875b..24da5ea9597 100644 --- a/gnu/usr.bin/cvs/contrib/rcs2log.sh +++ b/gnu/usr.bin/cvs/contrib/rcs2log.sh @@ -12,7 +12,7 @@ # Author: Paul Eggert -# $Id: rcs2log.sh,v 1.1.1.2 1996/10/18 03:36:19 tholo Exp $ +# $Id: rcs2log.sh,v 1.1.1.3 1997/02/21 06:38:19 tholo Exp $ # Copyright 1992, 1993, 1994, 1995 Free Software Foundation, Inc. @@ -159,8 +159,7 @@ case $rlog_options in } } } - # Output comma instead of space to avoid CVS 1.5 bug. - printf "%d/%02d/%02d,%02d:%02d:%02d\n", year,i+1,dd,hh,mm,ss + printf "%02d/%02d/%d %02d:%02d:%02d\n", i+1,dd,year,hh,mm,ss exit } ' diff --git a/gnu/usr.bin/cvs/cvs-format.el b/gnu/usr.bin/cvs/cvs-format.el index cdbd8423ce2..1ecbce2d850 100644 --- a/gnu/usr.bin/cvs/cvs-format.el +++ b/gnu/usr.bin/cvs/cvs-format.el @@ -1,11 +1,17 @@ ;; -*- lisp-interaction -*- ;; -*- emacs-lisp -*- ;; +;; Set emacs up for editing code using CVS indentation conventions. +;; See HACKING for more on what those conventions are. +;; To use, put in your .emacs: +;; (load "c-mode") +;; (load "cvs-format.el") +;; You need to load c-mode first or else when c-mode autoloads it will +;; clobber the settings from cvs-format.el. Using c-mode-hook perhaps would +;; be a cleaner way to handle that. Or see below about (set-c-style "BSD"). ;; -;; originally from... -;; Rich's personal .emacs file. feel free to copy. -;; -;; Last Mod Wed Feb 5 16:11:47 PST 1992, by rich@cygnus.com +;; Credits: Originally from the personal .emacs file of Rich Pixley, +;; then rich@cygnus.com, circa 1992. He sez "feel free to copy." ;; ;; diff --git a/gnu/usr.bin/cvs/cvs.spec b/gnu/usr.bin/cvs/cvs.spec index e2f73ab59fa..e8c837ce650 100644 --- a/gnu/usr.bin/cvs/cvs.spec +++ b/gnu/usr.bin/cvs/cvs.spec @@ -33,7 +33,7 @@ make install-info gzip -9nf $RPM_BUILD_ROOT/usr/info/cvs* %files -%doc BUGS COPYING COPYING.LIB ChangeLog ChangeLog.zoo FAQ HACKING +%doc BUGS COPYING COPYING.LIB FAQ HACKING %doc INSTALL MINOR-BUGS NEWS PROJECTS README TESTS TODO /usr/bin/cvs /usr/bin/cvsbug diff --git a/gnu/usr.bin/cvs/cvsnt.mak b/gnu/usr.bin/cvs/cvsnt.mak index 37c617d3a09..e3a52e707eb 100644 --- a/gnu/usr.bin/cvs/cvsnt.mak +++ b/gnu/usr.bin/cvs/cvsnt.mak @@ -50,8 +50,8 @@ $(OUTDIR) : # ADD BASE CPP /nologo /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c # ADD CPP /nologo /W3 /GX /YX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /FR /c # SUBTRACT CPP /WX -CPP_PROJ=/nologo /W3 /GX /YX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib" /D "NDEBUG"\ - /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /FR$(INTDIR)/\ +CPP_PROJ=/nologo /W3 /GX /YX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib"\ + /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /FR$(INTDIR)/\ /Fp$(OUTDIR)/"cvsnt.pch" /Fo$(INTDIR)/ /c CPP_OBJS=.\WinRel/ # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -134,7 +134,6 @@ BSC32_SBRS= \ $(INTDIR)/win32.sbr \ $(INTDIR)/waitpid.sbr \ $(INTDIR)/ndir.sbr \ - $(INTDIR)/strippath.sbr \ $(INTDIR)/stripslash.sbr \ $(INTDIR)/rcmd.sbr \ $(INTDIR)/startserver.sbr \ @@ -238,7 +237,6 @@ LINK32_OBJS= \ $(INTDIR)/win32.obj \ $(INTDIR)/waitpid.obj \ $(INTDIR)/ndir.obj \ - $(INTDIR)/strippath.obj \ $(INTDIR)/stripslash.obj \ $(INTDIR)/rcmd.obj \ $(INTDIR)/startserver.obj \ @@ -366,7 +364,6 @@ BSC32_SBRS= \ $(INTDIR)/win32.sbr \ $(INTDIR)/waitpid.sbr \ $(INTDIR)/ndir.sbr \ - $(INTDIR)/strippath.sbr \ $(INTDIR)/stripslash.sbr \ $(INTDIR)/rcmd.sbr \ $(INTDIR)/startserver.sbr \ @@ -471,7 +468,6 @@ LINK32_OBJS= \ $(INTDIR)/win32.obj \ $(INTDIR)/waitpid.obj \ $(INTDIR)/ndir.obj \ - $(INTDIR)/strippath.obj \ $(INTDIR)/stripslash.obj \ $(INTDIR)/rcmd.obj \ $(INTDIR)/startserver.obj \ @@ -2247,15 +2243,6 @@ $(INTDIR)/ndir.obj : $(SOURCE) $(DEP_NDIR_) $(INTDIR) ################################################################################ # Begin Source File -SOURCE=".\windows-NT\strippath.c" - -$(INTDIR)/strippath.obj : $(SOURCE) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) - -# End Source File -################################################################################ -# Begin Source File - SOURCE=".\windows-NT\stripslash.c" $(INTDIR)/stripslash.obj : $(SOURCE) $(INTDIR) diff --git a/gnu/usr.bin/cvs/doc/ChangeLog b/gnu/usr.bin/cvs/doc/ChangeLog index b97c695c86c..4cfcb234b48 100644 --- a/gnu/usr.bin/cvs/doc/ChangeLog +++ b/gnu/usr.bin/cvs/doc/ChangeLog @@ -1,3 +1,300 @@ +Mon Jan 13 15:41:02 1997 Karl Fogel + + * cvs.texinfo (Read-only access): rephrase to imply that there may + be other administrative files, besides history and locks, which + read-only users can also affect (in the future, for example, the + `passwd' file). + +Wed Jan 8 14:50:47 1997 Jim Kingdon + + * Makefile.in: Remove CVSid; we decided to get rid + of these some time ago. + +Wed Jan 8 09:08:36 1997 Jim Kingdon + + * cvsclient.texi (Connection and Authentication): Document + restriction that cvs root sent in the cvs protocol and in the + pserver authentication protocol must be identical. + +Thu Jan 2 13:30:56 1997 Jim Kingdon + + * Makefile.in, cvs.texinfo: Remove "675" paragraph; + see ../ChangeLog for rationale. + +Thu Jan 2 09:34:51 1997 Karl Fogel + + * cvs.texinfo (Read-only access): new node. + (Repository): new menu item for above new node. + (Password authentication server): document the user-aliasing + feature. Why was this undocumented before? + +Wed Jan 1 18:12:11 1997 Jim Kingdon + + * cvs.texinfo (Conflicts example): Use @asis in example to prevent + starting a line with a conflict marker. This means that when + maintaining the file with CVS itself, CVS will not think there is + a conflict merely because of the conflict marker in the example. + IMHO, this is totally bogus and CVS needs a better way of figuring + out whether a conflict is resolved (see comments elsewhere in this + node), but until then.... Credit to Fred Fish for reporting the + problem. + + * cvs.texinfo (cvsignore): Add paragraph about how .cvsignore + files in the sources being imported by "cvs import" override + "-I !". Credit goes to Fred Fish for pointing out this problem. + +Thu Dec 19 12:36:46 1996 Jim Kingdon + + * cvs.texinfo (Credits): Update Roland Pesch email address per his + request. + +Tue Dec 17 12:57:56 1996 Jim Kingdon + + * cvs.texinfo (verifymsg): In example, remove text "and reedit if + necessary"; it was copied from editinfo and doesn't apply here. + Fix syntax of if statement; remove unnecessary attempt at loop; + don't use -n with echo. Add @appendixsec at start of node. + Add note about how verifymsg cannot change log message. + (editinfo): In paragraph saying editinfo is obsolete, fix various + typos and formatting glitches. Mention -e as well as EDITOR. + (editinfo): In saying that editinfo doesn't get consulted with -m, + -F or client/server, recommend verifymsg. Remove comment which + says, in effect, "we need a feature like verifymsg". + (editinfo example): Change "verifymsg" back to "editinfo" here; + the example is of editinfo not verifymsg. + +Tue Dec 17 12:45:32 1996 Abe Feldman + + * cvs.texinfo (verifymsg): New node. + various places: Say that editinfo is obsolete, or refer to + verifymsg instead of editinfo + +Wed Dec 11 08:55:26 1996 Jim Kingdon + + * cvs.texinfo (Compatibility): Add comment about 1.3 and file death. + + * cvs.texinfo (update output, release output): Document "P" as + well as "U". + +Tue Dec 10 16:23:40 1996 Jim Kingdon + + * cvs.texinfo (Builds): Change "make" to "implement" and "build"; + in this context "make" is ambiguous. + (Builds): Add new URL of mk web page. + +Mon Dec 9 11:03:37 1996 Jim Blandy + + * cvs.texinfo (Password authentication client, Environment + variables): Remove mention of CVS_PASSWORD. + +Sun Dec 8 22:38:34 1996 Jim Kingdon + + * cvs.texinfo (Repository files): Mention differences between RCS + files in RCS and in CVS. + (Tags): Tag names must start with a letter. + +Fri Dec 6 09:08:18 1996 Jim Kingdon + + * cvs.texinfo (syntax): Expand discussion of regular expression + syntax. + +Fri Nov 29 09:06:41 1996 fnf@ninemoons.com (Fred Fish) + and Jim Kingdon + + * cvs.texinfo, cvsclient.texi: Make sure @ref and friends are + followed by "," or "." as described in the texinfo manual. This + is a dubious practice as texi2html and texinfo.tex don't require + it, and makeinfo could insert them as needed, but since makeinfo + doesn't do that yet, cope. + + * cvs.texinfo (From files): Suggest "diff -r" rather than "ls -R" + as the way to see that the sources seem to have been imported + correctly. + (Common options): -k is also available with import. + (admin options): Fix typo ("interrested" -> "interested"). + +Mon Nov 25 10:03:56 1996 Jim Kingdon + + * cvs.texinfo (Common options): Add comments about two digit + years, year 2000, and ambiguous/nonexistent dates. + +Sun Nov 24 17:27:24 1996 Jim Kingdon + + * cvs.texinfo (First import): Don't say what the wdiff program we + are using as an example does--that is confusing. Also don't show + untarring it--people might be familiar with cpio, ZIP, VMS BACKUP, + etc., instead of tar. + + * cvs.texinfo (Adding files): Update comment about "cvs add -m". + + * cvs.texinfo (Common options): Remove -H; -H is not a command + option. + (Global options): Also list --help and --version. Don't say that + -H gives a list of commands; it doesn't any more (directly). + + * cvs.texinfo: Add comment pointing to paper size web page. + + * cvs.texinfo (Common options): Rewrite section on date formats. + Executive summary is that RFC822 and ISO8601 are now preferred. + +Wed Nov 20 08:39:45 1996 Jim Kingdon + + * cvs.texinfo (Getting Notified): Add paragraph clarifying that + watches happen per user, not per working directory. + +Tue Nov 19 09:39:08 1996 Jim Kingdon + + * cvs.texinfo (Tags): Suggest that future special tag names might + start with ".". Fix typo. + + * cvs.texinfo (Removing directories): -P is also available with + export. + (Moving directories): Rewrite first paragraph; now says that you + must use -P for the directory to disappear from working + directories. Thanks to Martin Lorentzon + for reporting this bug. + (various): Where we mention -P, point to Removing directories + node. + +Sat Nov 16 18:03:22 1996 Jim Kingdon + + * cvsclient.texi (Example): Rewrite to actually be based on a real + live example (and therefore reflect the way the protocol currently + works). Add comment about formatting of the document itself. + +Thu Nov 14 10:22:58 1996 Jim Kingdon + + * cvsclient.texi (Introduction): Use @ref, not @xref, after "see". + (Goals): Rewrite items about locking, about uploading in big + 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. + 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 + default. + (Protocol Notes): Add comment about multisite features. + (Requirements): Use @code for requests and responses. + + * cvs.texinfo (Remote repositories): Add a few sentences defining + "client" and "server"; before we had been using the terms without + defining them. + + * cvs.texinfo (What is CVS?): Add paragraph about reporting bugs. + Reword and expand comp.software.config-mgmt description (and add + comments about other newsgroup facts). Point people at GNU list + of FTP sites rather than directly at prep.ai.mit.edu. + +Wed Nov 6 09:45:08 1996 Jim Kingdon + + * cvs.texinfo (Tracking sources): Add comment regarding added and + removed files. + +Tue Nov 5 14:00:31 1996 Jim Kingdon + + * cvs.texinfo: Rename node "Invoking CVS" to "CVS commands". + Rewrite the intro and comments to reflect addition of the new + Invoking CVS. + (Invoking CVS): New node, a quick summary of each command. + (annotate): Don't list the options; refer to Invoking CVS and + Common options instead. + +Sun Nov 3 21:22:42 1996 Jim Kingdon + + * cvs.texinfo (Compatibility): New node, moved from ../README. + + * cvs.texinfo (Common options): Add comment about how tar manual + contains documentation for getdate date formats. + +Fri Nov 1 14:00:31 1996 Jim Kingdon + + * cvs.texinfo (commit examples): Rewrite "New major release + number" section to tighten up the wording, better motivate the + discussion, and replace the term "rcs revision number" with + "numeric revision". + +Fri Oct 25 07:49:21 1996 Jim Kingdon + + * cvs.texinfo (loginfo): Don't say "a la printf"; the syntax is + only vaguely similar to printf. + + * cvs.texinfo (loginfo): To get just the repository name, suggest + %{} instead of % "standing alone"; the latter is now an error. + +Tue Oct 22 13:08:54 1996 Noel Cragg + + * cvs.texinfo (loginfo): add information on the new loginfo format + string specification. + +Mon Oct 21 17:33:44 1996 Jim Kingdon + + * cvs.texinfo (Builds): New node. + (What is CVS?): Refer to it. + +Sat Oct 19 14:32:21 1996 Jim Meyering + and Jim Kingdon + + * cvs.texinfo (Choosing a model): Wording/grammar fix. + +Sat Oct 19 14:32:21 1996 Jim Kingdon + + * cvsclient.texi (Obsolete): New node. + (Requests): Remove Repository and Lost and adjust Directory, + UseUnchanged, and other places accordingly. + (Required): Directory and Unchanged are now required. + + * cvs.texinfo (Removing files): Don't talk about modules; they are + not relevant in this context. + (Removing directories): New node. + (Common options): Refer to it instead of duplicating information. + +Fri Oct 18 11:05:06 1996 Jim Kingdon + + * cvs.texinfo (First import, import): Add paragraph about the fact + that import doesn't modify the directory which it imports from. + + * cvs.texinfo (Creating a repository): Add paragraph about + resource requirements. + + * cvs.texinfo (Copying): Replace empty node with a copy of the GPL. + +Thu Oct 17 12:10:55 1996 Jim Kingdon + + * cvs.texinfo (Adding files): Revise comment to more accurately + reflect the functioning/nonfunctioning status of cvs add -m. + + * cvs.texinfo (Reverting local changes): New node, somewhat based + on the version of this node from 30 Sep 96 change. + (admin options): Refer to it. + + * cvs.texinfo: Reinstate 30 Sep 96 change from A4 to US letter. + + * cvs.texinfo (Concurrency): When telling people how to clean up + locks, tell them to make sure the locks are owned by the person + who has the stale locks. + (update output, release output): Remove text about how CVS doesn't + print "? foo" for directories; CVS has since been changed (see + conflicts-130 in sanity.sh). + +Wed Oct 16 15:01:42 1996 Jim Kingdon + + * cvs.texinfo (history options): Mention new option -x E. + +Mon Oct 14 15:21:25 1996 Jim Kingdon + + * cvs.texinfo (Tags): Add paragraph on choosing a convention for + naming tags. + +Thu Oct 10 16:05:26 1996 Jim Kingdon + + * cvs.texinfo (modules): Describe what & does. + +Mon Oct 7 17:20:11 1996 Ian Lance Taylor + + * cvs.texinfo (Removing files): Correct apparent cut and paste + error: refer to the removed file, not the added file. + Tue Oct 1 14:15:33 1996 Jim Kingdon * cvs.texinfo: Revert all recent changes (the last unscathed one diff --git a/gnu/usr.bin/cvs/doc/Makefile.in b/gnu/usr.bin/cvs/doc/Makefile.in index 9e505d592bc..c7cf098b8e9 100644 --- a/gnu/usr.bin/cvs/doc/Makefile.in +++ b/gnu/usr.bin/cvs/doc/Makefile.in @@ -12,12 +12,6 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -# $CVSid: @(#)Makefile.in 1.8 94/10/22 $ - SHELL = /bin/sh srcdir = @srcdir@ diff --git a/gnu/usr.bin/cvs/doc/cvs.texinfo b/gnu/usr.bin/cvs/doc/cvs.texinfo index 3fd8b6a37c6..9ae1b2541b2 100644 --- a/gnu/usr.bin/cvs/doc/cvs.texinfo +++ b/gnu/usr.bin/cvs/doc/cvs.texinfo @@ -16,11 +16,21 @@ @comment MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @comment GNU General Public License for more details. -@comment You should have received a copy of the GNU General Public License -@comment along with CVS; see the file COPYING. If not, write to -@comment the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +@c See ../README for A4 vs. US letter size. +@c When we provided A4 postscript, and people tried to +@c print it on US letter, the usual complaint was that the +@c page numbers would get cut off. +@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 See +@c http://www.ft.uni-erlangen.de/~mskuhn/iso-paper.html +@c for more on paper sizes. Insuring that margins are +@c big enough to print on either A4 or US letter does +@c indeed seem to be the usual approach (according to +@c an internet draft by Jacob Palme). -@afourpaper @setfilename cvs.info @include CVSvn.texi @settitle CVS---Concurrent Versions System @@ -120,6 +130,12 @@ This info manual describes how to use and administer @sc{cvs} version @value{CVSVN}. @end ifinfo +@c This menu is pretty long. Not sure how easily that +@c can be fixed; seems like "Adding files", "Removing +@c files", "Removing directories", "Moving files", +@c and "Moving directories" all go together (into +@c "Adding, removing, and renaming"?). Other than that +@c no brilliant ideas for a fix... @menu * Preface:: About this manual * What is CVS?:: What is CVS? @@ -133,14 +149,18 @@ This info manual describes how to use and administer * Recursive behavior:: CVS descends directories * Adding files:: Adding files * Removing files:: Removing files +* Removing directories:: Removing directories * Tracking sources:: Tracking third-party sources * Moving files:: Moving and renaming files * Moving directories:: Moving and renaming directories * History browsing:: Viewing the history of files in various ways * Keyword substitution:: CVS can include the revision inside the file * Binary files:: CVS can handle binary files +* Builds:: Issues related to CVS and builds +* Compatibility:: Upgrading CVS versions * Revision management:: Policy questions for revision management -* Invoking CVS:: Reference manual for CVS commands +* CVS commands:: CVS commands share some things +* Invoking CVS:: Quick reference to CVS commands * Administrative files:: Reference manual for the Administrative files * Environment variables:: All environment variables which affect CVS * Troubleshooting:: Some tips when nothing works @@ -259,7 +279,7 @@ to use it. @cindex Contributors (manual) @cindex Credits (manual) -Roland Pesch, Cygnus Support <@t{pesch@@cygnus.com}> +Roland Pesch, then of Cygnus Support <@t{roland@@wrs.com}> wrote the manual pages which were distributed with @sc{cvs} 1.3. Appendix A and B contain much text that was extracted from them. He also read an early draft @@ -393,9 +413,19 @@ Jeff Polk later helped Brian with the design of the @sc{cvs} module and vendor branch support. @cindex Source, getting CVS source -You can get @sc{cvs} via anonymous ftp from a number of -sites, for instance @t{prep.ai.mit.edu} in -@file{pub/gnu}. +You can get @sc{cvs} via anonymous @sc{ftp} from a +number of sites; for example see +@example +http://www.gnu.ai.mit.edu/order/ftp.html +@end example +for a list of the @sc{gnu} @sc{ftp} sites. +@c We could also be pointing to other resources like +@c the cyclic getting.html, Pascal Molli's page, etc., +@c and probably should, when someone gets around to +@c figuring out which pages are stable enough that we +@c should cite them, which ones are best to point +@c people to (supported? binary? source? zero-cost? +@c buying CD-ROMs? etc.), etc. @cindex Mailing list @cindex List, mailing list @@ -409,15 +439,42 @@ unsubscribe @c could add "to the mailing list," send a message to @c or "write to" -@w{@code{info-cvs-request@@prep.ai.mit.edu}}. Please be -specific about your email address. As of May 1996, +@w{@code{info-cvs-request@@prep.ai.mit.edu}}. Please +be specific about your email address. As of May 1996, subscription requests are handled by a busy human being, so you cannot expect to be added or removed -immediately. The usenet group -@code{comp.software.config-mgmt} is also a suitable -place for @sc{cvs} discussions (along with other -configuration management systems). - +immediately. If you prefer a usenet group, the right +group is @code{comp.software.config-mgmt} which is for +@sc{cvs} discussions (along with other configuration +management systems). In the future, it might be +possible to create a +@code{comp.software.config-mgmt.cvs}, but probably only +if there is sufficient @sc{cvs} traffic on +@code{comp.software.config-mgmt}. +@c Other random data is that past attempts to create a +@c gnu.* group have failed (the relevant authorities +@c say they'll do it, but don't), and that tale was very +@c skeptical of comp.software.config-mgmt.cvs when the +@c subject came up around 1995 or so (for one +@c thing, because creating it would be a "reorg" which +@c would need to take a more comprehensive look at the +@c whole comp.software.config-mgmt.* hierarchy). + +@cindex Reporting bugs (CVS) +@cindex Bugs, reporting (CVS) +@cindex Errors, reporting (CVS) +To report bugs in @sc{cvs} send mail to +@code{bug-cvs@@prep.ai.mit.edu}. Do note that someone +may or may not feel like taking care of your bug +report---if you need a response consider a support +contract from Cyclic Software +(@code{http://www.cyclic.com} or +@code{info@@cyclic.com}). This is also the procedure +for submitting suggested changes to @sc{cvs} (see the file +@sc{hacking} in the source distribution for more details). +Note that all submitted changes may be distributed +under the terms of the @sc{gnu} Public License, so if you +don't like this, don't submit them. @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @unnumberedsec CVS is not@dots{} @@ -461,9 +518,12 @@ Figuring out what files need to be rebuilt when something changes is, again, something to be handled outside the scope of @sc{cvs}. One traditional approach is to use @code{make} for building, and use -some automated tool for generating the depencies which +some automated tool for generating the dependencies which @code{make} uses. +See @ref{Builds}, for more information on doing builds +in conjunction with @sc{cvs}. + @item @sc{cvs} is not a substitute for management. Your managers and project leaders are expected to talk @@ -511,7 +571,7 @@ to keep a database of reported bugs and the status of each one (is it fixed? in what release? has the bug submitter agreed that it is fixed?). For interfacing @sc{cvs} to an external bug-tracking system, see the -@file{rcsinfo} and @file{editinfo} files +@file{rcsinfo} and @file{verifymsg} files (@pxref{Administrative files}). Another aspect of change control is keeping track of @@ -552,7 +612,7 @@ releases go through various steps, with various approvals as needed. Generally, one can accomplish this with @sc{cvs} but it might be a little more work. In some cases you'll want to use the @file{commitinfo}, -@file{loginfo}, @file{rcsinfo}, or @file{editinfo} +@file{loginfo}, @file{rcsinfo}, or @file{verifymsg} files, to require that certain steps be performed before cvs will allow a checkin. Also consider whether features such as branches and tags can be used to @@ -757,7 +817,7 @@ any of the files in it. You start your favorite editor, hack away at @file{backend.c}, and a couple of hours later you have added an optimization pass to the compiler. A note to @sc{rcs} and @sc{sccs} users: There is no need to lock the files that -you want to edit. @xref{Multiple developers} for an explanation. +you want to edit. @xref{Multiple developers}, for an explanation. @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @node Committing your changes @@ -948,6 +1008,7 @@ user-defined modules. * Multiple repositories:: Multiple repositories * Creating a repository:: Creating a repository * Remote repositories:: Accessing repositories on remote machines +* Read-only access:: Granting read-only access to the repository @end menu @node Specifying a repository @@ -1112,6 +1173,19 @@ description of the file format, see the @code{man} page file format has become very common---many systems other than @sc{cvs} or @sc{rcs} can at least import history files in this format. +@c FIXME: Think about including documentation for this +@c rather than citing it? In the long run, getting +@c this to be a standard (not sure if we can cope with +@c a standards process as formal as IEEE/ANSI/ISO/etc, +@c though...) is the way to go, so maybe citing is +@c better. + +The @sc{rcs} files used in @sc{cvs} differ in a few +ways from the standard format. The biggest difference +is magic branches; for more information see @ref{Magic +branch numbers}. Also in @sc{cvs} the valid tag names +are a subset of what @sc{rcs} accepts; for @sc{cvs}'s +rules see @ref{Tags}. @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @node File permissions @@ -1305,9 +1379,29 @@ repositories. @cindex Creating a repository @cindex Setting up a repository -To set up a @sc{cvs} repository, choose a directory -with ample disk space available for the revision -history of the source files. It should be accessable +To set up a @sc{cvs} repository, first choose the +machine and disk on which you want to store the +revision history of the source files. CPU and memory +requirements are modest---a server with 32M of memory +or even less can handle a fairly large source tree with +a fair amount of activity. To estimate disk space +requirements, if you are importing RCS files from +another system, the size of those files is the +approximate initial size of your repository, or if you +are starting without any version history, a rule of +thumb is to allow for the server approximately three +times the size of the code to be under CVS for the +repository (you will eventually outgrow this, but not +for a while). On the machines on which the developers +will be working, you'll want disk space for +approximately one working directory for each developer +(either the entire tree or a portion of it, depending +on what each developer uses). Don't worry about CPU +and memory requirements for the clients---any machine +with enough capacity to run the operating system in +question should have little trouble. + +The repository should be accessable (directly or via a networked file system) from all machines which want to use @sc{cvs} in server or local mode; the client machines need not have any access to @@ -1341,11 +1435,18 @@ don't want that, remove the history file after running @cindex Repositories, remote @cindex Remote repositories @cindex Client/Server Operation +@cindex server, CVS Your working copy of the sources can be on a -different machine than the repository. Generally, -using a remote repository is just like using a local -one, except that the format of the repository name is: +different machine than the repository. Using @sc{cvs} +in this manner is known as @dfn{client/server} +operation. You run @sc{cvs} on a machine which can +mount your working directory, known as the +@dfn{client}, and tell it to communicate to a machine +which can mount the repository, known as the +@dfn{server}. Generally, using a remote +repository is just like using a local one, except that +the format of the repository name is: @example :@var{method}:@var{user}@@@var{hostname}:/path/to/repository @@ -1367,6 +1468,12 @@ described in @ref{Connecting via rsh}. @c Platforms like OS/2 and NT probably could plausibly @c default either way (modulo -b troubles). +@c FIXME: We need to have a better way of explaining +@c what method to use. This presentation totally +@c obscures the fact that :ext: and CVS_RSH is the way to +@c use SSH, for example. Plus it incorrectly implies +@c that you need an @code{rsh} binary on the client to use +@c :server:. @menu * Connecting via rsh:: Using the @code{rsh} program to connect * Password authenticated:: Direct connections using passwords @@ -1539,7 +1646,7 @@ to reread its initialization files. @cindex passwd (admin file) Because the client stores and transmits passwords in cleartext (almost---see @ref{Password authentication -security} for details), a separate @sc{cvs} password +security}, for details), a separate @sc{cvs} password file may be used, so people don't compromise their regular passwords when they access the repository. This file is @file{$CVSROOT/CVSROOT/passwd} @@ -1573,6 +1680,43 @@ indicates corresponding valid system usernames). In any case, @sc{cvs} will have no privileges which the (valid) user would not have. +@cindex user aliases + It is possible to ``map'' cvs-specific +usernames onto system usernames (i.e., onto system +login names) in the @file{$CVSROOT/CVSROOT/passwd} file +by appending a colon and the system username after the +password. For example: + +@example +cvs:ULtgRLXo7NRxs:kfogel +generic:1sOp854gDF3DY:spwang +anyone:1sOp854gDF3DY:spwang +@end example + + Thus, someone remotely accessing the repository +on @file{chainsaw.brickyard.com} with the following +command: + +@example +cvs -d :pserver:cvs@@chainsaw.brickyard.com:/usr/local/cvsroot checkout foo +@end example + + would end up running the server under the +system identity kfogel, assuming successful +authentication. However, the remote user would not +necessarily need to know kfogel's system password, as +the @file{$CVSROOT/CVSROOT/passwd} file might contain a +different password, used only for @sc{cvs}. And as the +example above indicates, it is permissible to map +multiple cvs usernames onto a single system username. + + This feature is designed to allow people +repository access without full system access (in +particular, see @xref{Read-only access}); however, also +@xref{Password authentication security}. Any sort of +repository access very likely implies a degree of +general system access as well. + Right now, the only way to put a password in the @sc{cvs} @file{passwd} file is to paste it there from somewhere else. Someday, there may be a @code{cvs @@ -1638,12 +1782,6 @@ were to set it after running @code{cvs login}, then later @sc{cvs} commands would be unable to look up the password for transmission to the server. -@cindex CVS_PASSWORD, environment variable -The @code{CVS_PASSWORD} environment variable overrides -@emph{all} stored passwords. If it is set, @sc{cvs} -will use it for all password-authenticated -connections. - @node Password authentication security @subsubsection Security considerations with password authentication @@ -1730,6 +1868,83 @@ cvs -d :kserver:chainsaw.brickyard.com:/user/local/cvsroot checkout foo Previous versions of @sc{cvs} would fall back to a connection via rsh; this version will not do so. +@c --------------------------------------------------------------------- +@node Read-only access +@section Read-only repository access +@cindex read-only repository access +@cindex readers (admin file) +@cindex writers (admin file) + + It is possible to grant read-only repository +access to people using the password-authenticated +server (@pxref{Password authenticated}). (The +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.) + + A user who has read-only access can do only +those @sc{cvs} operations which do not modify the +repository, except for certain ``administrative'' files +(such as lock files and the history file). It may be +desirable to use this feature in conjunction with +user-aliasing (@pxref{Password authentication server}). +However, note that read-only access does not repeal the +existing security considerations in @xref{Password +authentication security}. + + There are two ways to specify read-only access +for a user: by inclusion, and by exclusion. + + "Inclusion" means listing that user +specifically in the @file{$CVSROOT/CVSROOT/readers} +file, which is simply a newline-separated list of +users. Here is a sample @file{readers} file: + +@example +melissa +splotnik +jrandom +@end example + + (Don't forget the newline after the last user.) + + "Exclusion" means explicitly listing everyone +who has @emph{write} access---if the +@file{$CVSROOT/CVSROOT/writers} file exists, then only +those users listed in it have write access, and +everyone else has read-only access (of course, even the +read-only users still need to be listed in the +@file{$CVSROOT/CVSROOT/passwd} file). The +@file{writers} file has the same format as the +@file{readers} file. + + Note: if your @file{$CVSROOT/CVSROOT/passwd} +file maps cvs users onto system users (@pxref{Password +authentication server}), make sure you deny or grant +read-only access using the @emph{cvs} usernames, not +the system usernames. That is, the @file{readers} and +@file{writers} files contain cvs usernames, which may +or may not be the same as system usernames. + + Here is a complete description of the server's +behavior in deciding whether to grant read-only or +read-write access: + + If @file{readers} exists, and this user is +listed in it, then she gets read-only access. Or if +@file{writers} exists, and this user is NOT listed in +it, then she also gets read-only access (this is true +even if @file{readers} exists but she is not listed +there). Otherwise, she gets full read-write access. + + Of course there is a conflict if the user is +listed in both files. This is resolved in the more +conservative way, it being better to protect the +repository too much than too little: such a user gets +read-only access. + @c --------------------------------------------------------------------- @node Starting a new project @chapter Starting a project with CVS @@ -1798,12 +2013,15 @@ more information about them. You can now verify that it worked, and remove your original source directory. +@c FIXME: Need to say more about "verify that it +@c worked". What should the user look for in the output +@c from "diff -r"? @example $ cd .. $ mv @var{dir} @var{dir}.orig $ cvs checkout yoyodyne/@var{dir} # @r{Explanation below} -$ ls -R yoyodyne +$ diff -r @var{dir}.orig yoyodyne/@var{dir} $ rm -r @var{dir}.orig @end example @@ -2291,11 +2509,11 @@ int main(int argc, gencode(); else fprintf(stderr, "No code generated.\n"); -<<<<<<< driver.c +@asis{}<<<<<<< driver.c exit(nerr == 0 ? EXIT_SUCCESS : EXIT_FAILURE); -======= +@asis{}======= exit(!!nerr); ->>>>>>> 1.6 +@asis{}>>>>>>> 1.6 @} @end example @@ -2408,9 +2626,10 @@ if it still needs to wait. If a lock seems to stick around for an undue amount of time, find the person holding the lock and ask them about the cvs command they are running. If they aren't running a cvs -command, look for and remove files starting with -@file{#cvs.tfl}, @file{#cvs.rfl}, or @file{#cvs.wfl} -from the repository. +command, look in the repository directory mentioned in +the message and remove files which they own whose names +start with @file{#cvs.tfl}, @file{#cvs.rfl}, or +@file{#cvs.wfl}. Note that these locks are to protect @sc{cvs}'s internal data structures and have no relationship to @@ -2644,6 +2863,25 @@ instead of passing the name of the user to be notified to @file{notify}, @sc{cvs} will pass the @var{value} (normally an email address on some other machine). +@sc{Cvs} does not notify you for your own changes. +Currently this check is done based on whether the user +name of the person taking the action which triggers +notification matches the user name of the person +getting notification. In fact, in general, the watches +features only track one edit by each user. It probably +would be more useful if watches tracked each working +directory separately, so this behavior might be worth +changing. +@c "behavior might be worth changing" is an effort to +@c point to future directions while also not promising +@c that "they" (as in "why don't they fix CVS to....") +@c will do this. +@c one implementation issue is identifying whether a +@c working directory is same or different. Comparing +@c pathnames/hostnames is hopeless, but having the server +@c supply a serial number which the client stores in the +@c CVS directory as a magic cookie should work. + @node Editing files @subsection How to edit a file which is being watched @@ -2778,7 +3016,7 @@ that will restore the repository to a state which Reserved and unreserved checkouts each have pros and cons. Let it be said that a lot of this is a matter of opinion or what works given different groups' working -styles, but here is an attempt to briefly describe the +styles, but here is a brief description of some of the issues. There are many ways to organize a team of developers. @sc{cvs} does not try to enforce a certain organization. It is a tool that can be used in several @@ -2891,15 +3129,20 @@ rcsutil.c 5.10 You can use the @code{tag} command to give a symbolic name to a certain revision of a file. You can use the @samp{-v} flag to the @code{status} command to see all tags that a file has, and -which revision numbers they represent. Tag names can +which revision numbers they represent. Tag names must +start with an uppercase or lowercase letter and can contain uppercase and lowercase letters, digits, @samp{-}, and @samp{_}. The two tag names @code{BASE} and @code{HEAD} are reserved for use by @sc{cvs}. It is expected that future names which are special to -@sc{cvs} will contain characters such as @samp{%} or -@samp{=}, rather than being named analogously to +@sc{cvs} will be specially named, for example by +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 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. @c FIXME: CVS actually accepts quite a few characters @c in tag names, not just the ones documented above @c (see RCS_check_tag). RCS @@ -2907,12 +3150,27 @@ actual tag names. @c characters rather than legal ones. CVS is said to lose its @c mind if you try to use "/" (try making such a tag sticky @c and using "cvs status" client/server--see remote -@c protocol format for entries line for probably cause). +@c protocol format for entries line for probable cause). @c TODO: The testsuite @c should test for whatever are documented above as @c officially-OK tag names, and CVS should at least reject @c characters that won't work, like "/". +You'll want to choose some convention for naming tags, +based on information such as the name of the program +and the version number of the release. For example, +one might take the name of the program, immediately +followed by the version number with @samp{.} changed to +@samp{-}, so that CVS 1.9 would be tagged with the name +@code{cvs1-9}. If you choose a consistent convention, +then you won't constantly be guessing whether a tag is +@code{cvs-1-9} or @code{cvs1_9} or what. You might +even want to consider enforcing your convention in the +taginfo file (@pxref{user-defined logging}). +@c Might be nice to say more about using taginfo this +@c way, like giving an example, or pointing out any particular +@c issues which arise. + @cindex Adding a tag @cindex tag, example The following example shows how you can add a tag to a @@ -3110,7 +3368,7 @@ number is created by adding a digit at the tail of the revision number it is based on. (If @samp{release-1-0} corresponds to revision 1.4, the branch's revision number will be 1.4.2. For obscure reasons @sc{cvs} always gives branches even numbers, starting at 2. -@xref{Revision numbers}). +@xref{Revision numbers}.). @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @node Sticky tags @@ -3552,9 +3810,8 @@ The @samp{-k} option specifies the default way that this file will be checked out; for more information see @ref{Substitution modes}. -@c FIXCVS: I kind of think this feature is broken (and -@c has been at least since 1.4A2 or so), although I -@c haven't verified. It's not in the testsuite (Sep 96). +@c As noted in BUGS, -m is broken client/server (Nov +@c 96). Also see testsuite log2-* tests. The @samp{-m} option specifies a description for the file. This description appears in the history log (if it is enabled, @pxref{history file}). It will also be @@ -3571,8 +3828,10 @@ For example, the following commands add the file @c This example used to specify @c -m "Optimizer and code generation passes." -@c to the cvs add command, but unless -m is known to -@c work, seems better to not discuss that subject. +@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 +@c don't work... @example $ cvs add backend.c $ cvs commit -m "Early version. Not yet compilable." backend.c @@ -3596,18 +3855,20 @@ later merge the additions to another branch if you want @c --------------------------------------------------------------------- @node Removing files -@chapter Removing files from a module +@chapter Removing files @cindex Removing files @cindex Deleting files Modules change. New files are added, and old files disappear. Still, you want to be able to retrieve an -exact copy of old releases of the module. +exact copy of old releases. -Here is what you can do to remove a file from a module, +Here is what you can do to remove a file, but remain able to retrieve old revisions: @itemize @bullet +@c FIXME: should probably be saying something about +@c having a working directory in the first place. @item Make sure that you have not made any uncommitted modifications to the file. @xref{Viewing differences}, @@ -3618,7 +3879,7 @@ course not be able to retrieve the file as it was immediately before you deleted it. @item -Remove the file from your working copy of the module. +Remove the file from your working copy of the directory. You can for instance use @code{rm}. @item @@ -3692,17 +3953,51 @@ cvs update: warning: oj.c was lost U oj.c @end example -When you remove a file it is added only on the branch +When you remove a file it is removed only on the branch which you are working on (@pxref{Branches}). You can -later merge the additions to another branch if you want +later merge the removals to another branch if you want (@pxref{Merging adds and removals}). +@node Removing directories +@chapter Removing directories +@cindex removing directories +@cindex directories, removing + +In concept removing directories is somewhat similar to +removing files---you want the directory to not exist in +your current working directories, but you also want to +be able to retrieve old releases in which the directory +existed. + +The way that you remove a directory is to remove all +the files in it. Then specify the @samp{-P} option to +@code{cvs update}, @code{cvs checkout}, or @code{cvs +export}, which will cause @sc{cvs} to remove empty +directories from working directories. Probably the +best way to do this is to always specify @samp{-P}; if +you want an empty directory then put a dummy file (for +example @file{.keepme}) in it to prevent @samp{-P} from +removing it. + +@c I'd try to give a rationale for this, but I'm not +@c sure there is a particularly convincing one. What +@c we would _like_ is for CVS to do a better job of version +@c controlling whether directories exist, to eliminate the +@c need for -P and so that a file can be a directory in +@c one revision and a regular file in another. +Note that @samp{-P} is implied by the @samp{-r} or @samp{-D} +options of @code{checkout} and @code{export}. This way +@sc{cvs} will be able to correctly create the directory +or not depending on whether the particular version you +are checking out contains any files in that directory. + @c --------------------------------------------------------------------- @node Tracking sources @chapter Tracking third-party sources @cindex Third-party sources @cindex Tracking sources +@c FIXME: Need discussion of added and removed files. If you modify a program to better fit your site, you probably want to include your modifications when the next release of the program arrives. @sc{cvs} can help you with @@ -3733,6 +4028,7 @@ revision. @menu * First import:: Importing a module for the first time * Update imports:: Updating a module with the import command +* Reverting local changes:: Reverting a module to the latest vendor release * Binary files in imports:: Binary files require special handling @end menu @@ -3741,26 +4037,37 @@ revision. @section Importing a module for the first time @cindex Importing modules +@c Should mention naming conventions for vendor tags, +@c release tags, and perhaps directory names. Use the @code{import} command to check in the sources for the first time. When you use the @code{import} command to track third-party sources, the @dfn{vendor tag} and @dfn{release tags} are useful. The @dfn{vendor tag} is a symbolic name for the branch (which is always 1.1.1, unless you use the @samp{-b -@var{branch}} flag---@xref{import options}). The +@var{branch}} flag---@xref{import options}.). The @dfn{release tags} are symbolic names for a particular release, such as @samp{FSF_0_04}. +@c I'm not completely sure this belongs here. But +@c we need to say it _somewhere_ reasonably obvious; it +@c is a common misconception among people first learning CVS +Note that @code{import} does @emph{not} change the +directory in which you invoke it. In particular, it +does not set up that directory as a @sc{cvs} working +directory; if you want to work with the sources import +them first and then check them out into a different +directory (@pxref{Getting the source}). + @cindex Wdiff (import example) -Suppose you use @code{wdiff} (a variant of @code{diff} -that ignores changes that only involve whitespace), and -are going to make private modifications that you want -to be able to use even when new releases are made in -the future. You start by importing the source to your -repository: +Suppose you have the sources to a program called +@code{wdiff} in a directory called @file{wdiff-0.04}, +and are going to make private modifications that you +want to be able to use even when new releases are made +in the future. You start by importing the source to +your repository: @example -$ tar xfz wdiff-0.04.tar.gz $ cd wdiff-0.04 $ cvs import -m "Import of FSF v. 0.04" fsf/wdiff FSF_DIST WDIFF_0_04 @end example @@ -3768,6 +4075,7 @@ $ cvs import -m "Import of FSF v. 0.04" fsf/wdiff FSF_DIST WDIFF_0_04 The vendor tag is named @samp{FSF_DIST} in the above example, and the only release tag assigned is @samp{WDIFF_0_04}. +@c FIXME: Need to say where fsf/wdiff comes from. @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @node Update imports @@ -3812,6 +4120,26 @@ $ cvs checkout -jWDIFF_0_04 -jWDIFF_0_05 wdiff @noindent In this case, the two above commands are equivalent. +@node Reverting local changes +@section Reverting to the latest vendor release + +You can also revert local changes completely and return +to the latest vendor release by changing the `head' +revision back to the vendor branch on all files. For +example, if you have a checked-out copy of the sources +in @file{~/work.d/wdiff}, and you want to revert to the +vendor's version for all the files in that directory, +you would type: + +@example +$ cd ~/work.d/wdiff +$ cvs admin -bWDIFF . +@end example + +@noindent +You must specify the @samp{-bWDIFF} without any space +after the @samp{-b}. @xref{admin options}. + @node Binary files in imports @section How to handle binary files with cvs import @@ -3828,7 +4156,7 @@ files are binary. @xref{Wrappers}. Moving files to a different directory or renaming them is not difficult, but some of the ways in which this works may be non-obvious. (Moving or renaming a -directory is even harder. @xref{Moving directories}). +directory is even harder. @xref{Moving directories}.). The examples below assume that the file @var{old} is renamed to @var{new}. @@ -3975,16 +4303,14 @@ numbers will start at 1.0 again. @cindex Renaming directories @cindex Directories, moving -If you want to be able to retrieve old versions of the -module, you must move each file in the directory -with the @sc{cvs} commands. @xref{Outside}. The old, empty -directory will remain inside the repository, but it -will not appear in your workspace when you check out -the module in the future. -@c -- rephrase +The normal way to rename or move a directory is to +rename or move each file within it as described in +@ref{Outside}. Then check out with the @samp{-P} +option, as described in @ref{Removing directories}. -If you really want to rename or delete a directory, you -can do it like this: +If you really want to hack the repository to rename or +delete a directory in the repository, you can do it +like this: @enumerate @item @@ -4199,26 +4525,15 @@ or replaced; you need to use @code{cvs diff} for that @end deffn -These standard options are available with -@code{annotate} (@pxref{Common options}, for a complete -description of them): - -@table @code -@item -D @var{date} -Annotate the most recent revision no later than @var{date}. - -@item -f -Only useful with the @samp{-D @var{date}} or @samp{-r -@var{tag}} flags. If no matching revision is found, -annotate the most recent revision (instead of ignoring -the file). - -@item -l -Local; run only in current working directory. @xref{Recursive behavior}. +The options to @code{cvs annotate} are listed in +@ref{Invoking CVS}, and can be used to select the files +and revisions to annotate. The options are described +in more detail in @ref{Common options}. -@item -r @var{tag} -Annotate revision @var{tag}. -@end table +@c FIXME: maybe an example using the options? Just +@c what it means to select a revision might be worth a +@c few words of explanation ("you want to see who +@c changed this line *before* 1.4"...). @c --------------------------------------------------------------------- @node Keyword substitution @@ -4607,6 +4922,153 @@ and @code{cvs import} treat a file as binary based on its name; for example you could say that files who names end in @samp{.exe} are binary. @xref{Wrappers}. +@c I'm not sure about the best location for this. In +@c one sense, it might belong right after we've introduced +@c CVS's basic version control model, because people need +@c to figure out builds right away. The current location +@c is based on the theory that it kind of akin to the +@c "Revision management" section. +@node Builds +@chapter How your build system interacts with CVS +@cindex builds +@cindex make + +As mentioned in the introduction, @sc{cvs} does not +contain software for building your software from source +code. This section describes how various aspects of +your build system might interact with @sc{cvs}. + +@c Is there a way to discuss this without reference to +@c tools other than CVS? I'm not sure there is; I +@c wouldn't think that people who learn CVS first would +@c even have this concern. +One common question, especially from people who are +accustomed to @sc{rcs}, is how to make their build get +an up to date copy of the sources. The answer to this +with @sc{cvs} is two-fold. First of all, since +@sc{cvs} itself can recurse through directories, there +is no need to modify your @file{Makefile} (or whatever +configuration file your build tool uses) to make sure +each file is up to date. Instead, just use two +commands, first @code{cvs -q update} and then +@code{make} or whatever the command is to invoke your +build tool. Secondly, you do not necessarily +@emph{want} to get a copy of a change someone else made +until you have finished your own work. One suggested +approach is to first update your sources, then +implement, build and +test the change you were thinking of, and then commit +your sources (updating first if necessary). By +periodically (in between changes, using the approach +just described) updating your entire tree, you ensure +that your sources are sufficiently up to date. + +@cindex bill of materials +One common need is to record which versions of which +source files went into a particular build. This kind +of functionality is sometimes called @dfn{bill of +materials} or something similar. The best way to do +this with @sc{cvs} is to use the @code{tag} command to +record which versions went into a given build +(@pxref{Tags}). + +Using @sc{cvs} in the most straightforward manner +possible, each developer will have a copy of the entire +source tree which is used in a particular build. If +the source tree is small, or if developers are +geographically dispersed, this is the preferred +solution. In fact one approach for larger projects is +to break a project down into smaller +@c I say subsystem instead of module because they may or +@c may not use the modules file. +separately-compiled subsystems, and arrange a way of +releasing them internally so that each developer need +check out only those subsystems which are they are +actively working on. + +Another approach is to set up a structure which allows +developers to have their own copies of some files, and +for other files to access source files from a central +location. Many people have come up with some such a +@c two such people are paul@sander.cupertino.ca.us (for +@c a previous employer) +@c and gtornblo@senet.abb.se (spicm and related tools), +@c but as far as I know +@c noone has nicely packaged or released such a system (or +@c instructions for constructing one). +system using features such as the symbolic link feature +found in many operating systems, or the @code{VPATH} +feature found in many versions of @code{make}. One build +tool which is designed to help with this kind of thing +is Odin (see +@code{ftp://ftp.cs.colorado.edu/pub/distribs/odin}). +@c Should we be saying more about Odin? Or how you use +@c it with CVS? Also, the Prime Time Freeware for Unix +@c disk (see http://www.ptf.com/) has Odin (with a nice +@c paragraph summarizing it on the web), so that might be a +@c semi-"official" place to point people. +@c +@c Of course, many non-CVS systems have this kind of +@c functionality, for example OSF's ODE +@c (http://www.osf.org/ode/) or mk +@c (http://www.io.org/~pzi/heading.html; +@c ftp://ftp.interlog.com/pub/unix/mk is out of date). But I'm not sure +@c there is any point in mentioning them here unless they +@c can work with CVS. + +@node Compatibility +@chapter Compatibility between CVS Versions + +@cindex CVS, versions of +@cindex versions, of CVS +@cindex compatibility, between CVS versions +@c We don't mention versions older than CVS 1.3 +@c on the theory that it would clutter it up for the vast +@c majority of people, who don't have anything that old. +@c +The repository format is compatible going back to +@sc{cvs} 1.3. But see @ref{Watches Compatibility}, if +you have copies of @sc{cvs} 1.6 or older and you want +to use the optional developer communication features. +@c If you "cvs rm" and commit using 1.3, then you'll +@c want to run "rcs -sdead " on each of the +@c files in the Attic if you then want 1.5 and +@c later to recognize those files as dead (I think the +@c symptom if this is not done is that files reappear +@c in joins). (Wait: the above will work but really to +@c be strictly correct we should suggest checking +@c in a new revision rather than just changing the +@c state of the head revision, shouldn't we?). +@c The old convert.sh script was for this, but it never +@c did get updated to reflect use of the RCS "dead" +@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 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 +@c use both versions side by side (e.g. during a +@c transition period). +@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 +@c are upgrading (for example) from 1.6 to 1.8. + +The working directory format is compatible going back +to @sc{cvs} 1.5. It did change between @sc{cvs} 1.3 +and @sc{cvs} 1.5. If you run @sc{cvs} 1.5 or newer on +a working directory checked out with @sc{cvs} 1.3, +@sc{cvs} will convert it, but to go back to @sc{cvs} +1.3 you need to check out a new working directory with +@sc{cvs} 1.3. + +The remote protocol is interoperable going back to @sc{cvs} 1.5, but no +further (1.5 was the first official release with the remote protocol, +but some older versions might still be floating around). In many +cases you need to upgrade both the client and the server to take +advantage of new features and bugfixes, however. + @c --------------------------------------------------------------------- @node Revision management @chapter Revision management @@ -4660,28 +5122,18 @@ too regimented and thus counter-productive to the real goal, which is to get software written. @c --------------------------------------------------------------------- -@node Invoking CVS -@appendix Reference manual for CVS commands -@cindex Command reference -@cindex Reference, commands -@cindex Invoking CVS - -@c This is a poor organization. The manual should be -@c organized by what the user wants to do, not by CVS -@c commands. That is why some commands are not described -@c here--the idea is to (as people get around to it) -@c move the information from this section to the rest -@c of the manual. Two functions where it might be useful to -@c have a list of commands: (1) to look up where a command -@c is described in this manual, if you know the name of -@c the command (the index serves this purpose), (2) as a -@c quick reminder of what the commands are (the -H option -@c serves this purpose). - -This appendix describes how to invoke @sc{cvs}, and -describes in detail those subcommands of @sc{cvs} which -are not fully described elsewhere. To look up a -particular subcommand, see @ref{Index}. +@node CVS commands +@appendix Guide to CVS commands + +This appendix describes the overall structure of +@sc{cvs} commands, and describes some commands in +detail (others are described elsewhere; for a quick +reference to @sc{cvs} commands, @pxref{Invoking CVS}). +@c The idea is that we want to move the commands which +@c are described here into the main body of the manual, +@c in the process reorganizing the manual to be +@c organized around what the user wants to do, not +@c organized around CVS commands. @menu * Structure:: Overall structure of CVS commands @@ -4864,10 +5316,15 @@ option to turn the display on. So if you have you may need to use @samp{-f} to show the tag names. @item -H +@itemx --help Display usage information about the specified @samp{cvs_command} (but do not actually execute the command). If you don't specify -a command name, @samp{cvs -H} displays a summary of all the -commands available. +a command name, @samp{cvs -H} displays overall help for +@sc{cvs}, including a list of other help options. +@c It seems to me it is better to document it this way +@c rather than trying to update this documentation +@c every time that we add a --help-foo option. But +@c perhaps that is confusing... @item -l Do not log the cvs_command in the command history (but execute it @@ -4906,6 +5363,7 @@ Trace program execution; display messages showing the steps of potential impact of an unfamiliar command. @item -v +@item --version Display version and copyright information for @sc{cvs}. @cindex CVSREAD, overriding @@ -4967,47 +5425,108 @@ file using @samp{-D}, @sc{cvs} records the date you specified, so that further updates in the same directory will use the same date (for more information on sticky tags/dates, @pxref{Sticky tags}). -@c FIXME: this documentation is lousy. It just gives -@c some examples, never describes the rules. That is -@c probably because the rules are way too loose and not -@c carefully thought out. How to solve this problem? -@c Maybe document a list of "official" date formats -@c which are a subset of what CVS accepts? Maybe at -@c some point have CVS start give warnings on "unofficial" -@c formats (many of which might be typos or user -@c misunderstandings, and/or formats people never/rarely -@c use to specify dates)? We want to rely on standards -@c like ISO8601 and RFC822 as much as practical, but -@c which standard(s)?.... +@samp{-D} is available with the @code{checkout}, +@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}). + +@c What other formats should we accept? I don't want +@c to start accepting a whole mess of non-standard +@c new formats (there are a lot which are in wide use in +@c one context or another), but practicality does +@c dictate some level of flexibility. +@c * POSIX.2 (e.g. touch, ls output, date) and other +@c POSIX and/or de facto unix standards (e.g. at). The +@c practice here is too inconsistent to be of any use. +@c * VMS dates. This is not a formal standard, but +@c there is a published specification (see SYS$ASCTIM +@c and SYS$BINTIM in the _VMS System Services Reference +@c Manual_), it is implemented consistently in VMS +@c utilities, and VMS users will expect CVS running on +@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 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). @cindex timezone, in input @cindex zone, time, in input A wide variety of date formats are supported by -@sc{cvs}. The @var{date_spec} is interpreted as being -in the local timezone, unless a specific timezone is -specified. Examples of valid date specifications -include: +@sc{cvs}. The most standard ones are ISO8601 (from the +International Standards Organization) and the Internet +e-mail standard (specified in RFC822 as amended by +RFC1123). + +@c Probably should be doing more to spell out just what +@c the rules are, rather than just giving examples. +@c But I want to keep this simple too. +@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). (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 +@c hour when daylight savings time goes into or out of +@c effect. Pretty obscure, so I'm not at all sure we +@c should be documenting the behavior in that case. +ISO8601 dates have many variants but a few examples +are: @example - 1 month ago - 2 hours ago - 400000 seconds ago - last year - last Monday - yesterday - a fortnight ago - 3/31/92 10:00:07 PST - January 23, 1987 10:05pm - 22:00 GMT +1972-09-24 +1972-09-24 20:05 @end example +@c I doubt we really accept all ISO8601 format dates +@c (for example, decimal hours like 1972-09-24 20,2) +@c I'm not sure we should, many of them are pretty +@c bizarre and it has lots of gratuitous multiple ways +@c to specify the same thing. + +See +@file{http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html} +for more details about ISO8601 dates. +@c Perhaps we want to also cite other sources in +@c case that page goes away. For example: +@c http://www.dsi.unimi.it/Users/Students/pensa/standard/ISO8601.html + +In addition to the dates allowed in Internet e-mail +itself, @sc{cvs} also allows some of the fields to be +omitted. For example: +@c FIXME: Need to figure out better, and document, +@c what we want to allow the user to omit. +@c NOTE: "omit" does not imply "reorder". +@c FIXME: Need to cite a web page describing how to get +@c RFC's. -@samp{-D} is available with the @code{checkout}, -@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}). Note -that when specifying a date like @samp{3/31/92} it is -@code{@var{month}/@var{day}/@var{year}}. So -@samp{1/4/96} is January 4, not March 1. +@example +24 Sep 1972 20:05 +24 Sep +@end example + +The date is interpreted as being in the +local timezone, unless a specific timezone is +specified. + +These two date formats are preferred. However, +@sc{cvs} currently accepts a wide variety of other date +formats. They are intentionally not documented here in +any detail, and future versions of @sc{cvs} might not +accept all of them. +@c Maybe at +@c some point have CVS start give warnings on "unofficial" +@c formats (many of which might be typos or user +@c misunderstandings, and/or formats people never/rarely +@c use to specify dates)? + +One such format is +@code{@var{month}/@var{day}/@var{year}}. This may +confuse people who are accustomed to having the month +and day in the other order; @samp{1/4/96} is January 4, +not April 1. Remember to quote the argument to the @samp{-D} flag so that your shell doesn't interpret spaces as @@ -5028,17 +5547,14 @@ tag or date. (The most recent revision of the file will be used). @need 800 -@samp{-f} is available with these commands: @code{checkout}, -@code{export}, @code{rdiff}, @code{rtag}, and @code{update}. +@samp{-f} is available with these commands: +@code{annotate}, @code{checkout}, @code{export}, +@code{rdiff}, @code{rtag}, and @code{update}. @strong{Warning:} The @code{commit} command also has a @samp{-f} option, but it has a different behavior for that command. @xref{commit options}. -@item -H -Help; describe the options available for this command. This is -the only option supported for all @sc{cvs} commands. - @item -k @var{kflag} Alter the default @sc{rcs} processing of keywords. @xref{Keyword substitution}, for the meaning of @@ -5051,7 +5567,7 @@ file, and continues to use it with future update commands on the same file until you specify otherwise. The @samp{-k} option is available with the @code{add}, -@code{checkout}, @code{diff} and +@code{checkout}, @code{diff}, @code{import} and @code{update} commands. @item -l @@ -5088,15 +5604,7 @@ Available with the @code{checkout}, @code{commit}, @code{export}, and @code{rtag} commands. @item -P -Prune (remove) directories that are empty after being updated, on -@code{checkout}, or @code{update}. Normally, an empty directory -(one that is void of revision-controlled files) is left alone. -Specifying @samp{-P} will cause these directories to be silently -removed from your checked-out sources. This does not remove the -directory from the repository, only from your checked out copy. -Note that this option is implied by the @samp{-r} or @samp{-D} -options of @code{checkout} and @code{export}. -@c -- implied-- +Prune empty directories. See @xref{Removing directories}. @item -p Pipe the files retrieved from the repository to standard output, @@ -5203,7 +5711,7 @@ with @sc{cvs}. Some even makes it impossible to use This description of the available options is based on the @samp{rcs(1)} man page, but modified to suit -readers that are more interrested in @sc{cvs} than +readers that are more interested in @sc{cvs} than @sc{rcs}. @table @code @@ -5221,12 +5729,10 @@ login names appearing in the comma-separated list When used with bare @sc{rcs}, this option sets the default branch to @var{rev}; in @sc{cvs} sticky tags (@pxref{Sticky tags}) are a better -way to decide which branch you want to work on. With -@sc{cvs}, this option can be used to control behavior -with respect to the vendor branch. -@c FIXME: document how you use it with the vendor -@c branch (or fix cvs so that there is a more graceful -@c way to handle the case). +way to decide which branch you want to work on. There +is one use with @sc{cvs}: to revert to the vendor's +version when using vendor branches (@pxref{Reverting +local changes}). @item -c@var{string} Useful with @sc{cvs}. Sets the comment leader to @@ -5244,6 +5750,8 @@ names appearing in the comma-separated list @var{logins} from the access list of the RCS file. If @var{logins} is omitted, erase the entire access list. +@c FIXME: Doesn't work with client/server CVS; we +@c should probably just not accept the option. @item -I Run interactively, even if the standard input is not a terminal. @@ -5578,7 +6086,7 @@ with the @samp{-o} option in the modules file; @pxref{modules}). @item -P -Prune empty directories. +Prune empty directories. See @ref{Moving directories}. @item -p Pipe files to the standard output. @@ -5803,33 +6311,33 @@ invoking an editor. @appendixsubsubsec New major release number -When you make a major release of your product, you -might want the revision numbers to track your major -release number. You should normally not care about -the revision numbers, but this is a thing that many -people want to do, and it can be done without doing any -harm. - -To bring all your files up to the @sc{rcs} revision 3.0 -(including those that haven't changed), you might do: +@c "commit examples" seems like a bad place for this. +@c What is the right place? +By default, @sc{cvs} will assign numeric revisions by +leaving the first number the same and incrementing the +second number. For example, @code{1.1}, @code{1.2}, +@code{1.3}, etc. Normally there is no reason to care +about the revision numbers---it is easier to treat them +as internal numbers that @sc{cvs} maintains, and tags +provide a better way to distinguish between things like +release 1 versus release 2 of your product +(@pxref{Tags}). However, if you want to set the +numeric revisions, the @samp{-r} option to @code{cvs +commit} can do that. + +For example, to bring all your files up to the @sc{rcs} +revision 3.0 (including those that haven't changed), +you might invoke: @example $ cvs commit -r 3.0 @end example -Note that it is generally a bad idea to try to make the -@sc{rcs} revision number equal to the current release number -of your product. You should think of the revision -number as an internal number that the @sc{cvs} package -maintains, and that you generally never need to care -much about. Using the @code{tag} and @code{rtag} -commands you can give symbolic names to the releases -instead. @xref{tag} and @xref{rtag}. - Note that the number you specify with @samp{-r} must be larger than any existing revision number. That is, if revision 3.0 exists, you cannot @samp{cvs commit --r 1.3}. +-r 1.3}. If you want to maintain several releases in +parallel, you need to use a branch (@pxref{Branches}). @appendixsubsubsec Committing to a branch @@ -6199,6 +6707,8 @@ Certain commands have a single record type: release @item O checkout +@item E +export @item T rtag @end table @@ -6298,6 +6808,8 @@ Contributed examples will gratefully be accepted. @appendixsec import---Import sources into CVS, using vendor branches @cindex Import (subcommand) +@c FIXME: This node is way too long for one which has subnodes. + @itemize @bullet @item Synopsis: import [-options] repository vendortag releasetag@dots{} @@ -6352,6 +6864,16 @@ branch (e.g., for 1.1.1). You must also specify at least one @var{releasetag} to identify the files at the leaves created each time you execute @code{import}. +@c I'm not completely sure this belongs here. But +@c we need to say it _somewhere_ reasonably obvious; it +@c is a common misconception among people first learning CVS +Note that @code{import} does @emph{not} change the +directory in which you invoke it. In particular, it +does not set up that directory as a @sc{cvs} working +directory; if you want to work with the sources import +them first and then check them out into a different +directory (@pxref{Getting the source}). + @menu * import options:: import options * import output:: import output @@ -6387,7 +6909,7 @@ in the future. Indicate the RCS keyword expansion mode desired. This setting will apply to all files created during the import, but not to any files that previously existed in -the repository. See @ref{Substitution modes} for a +the repository. See @ref{Substitution modes}, for a list of valid @samp{-k} settings. @item -I @var{name} @@ -6516,6 +7038,8 @@ accepted are those accepted by the @samp{-D} option to many other @sc{cvs} commands (@pxref{Common options}). Dates can be combined into ranges as follows: +@c Should we be thinking about accepting ISO8601 +@c ranges? For example "1972-09-10/1972-09-12". @table @code @item @var{d1}<@var{d2} @itemx @var{d2}>@var{d1} @@ -6824,13 +7348,15 @@ created, but not added to the @sc{cvs} directory hierarchy with the @code{add} command (@pxref{Adding files}) will be silently ignored (and deleted, if @samp{-d} is specified), even if they contain files. -@c FIXCVS: This is a bug. +@c FIXCVS: This is a bug. But is it true? I think +@c maybe they print "? dir" now. @table @code @item U @var{file} +@itemx P @var{file} There exists a newer revision of this file in the repository, and you have not modified your local copy -of the file. +of the file (@samp{U} and @samp{P} mean the same thing). @item A @var{file} The file has been added to your private copy of the @@ -6855,13 +7381,6 @@ not in the list of files for @sc{cvs} to ignore (see the description of the @samp{-I} option, and @pxref{cvsignore}). If you remove your working sources, this file will be lost. - -Note that no warning message like this is printed for -spurious directories that @sc{cvs} encounters. The -directory, and all its contents, are silently ignored. - -@c FIXME -- CVS should be fixed to print "? foo" for -@c such spurious directories @end table @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @@ -7230,14 +7749,14 @@ to see the sticky options. @xref{status}. Local; run only in current working directory. @xref{Recursive behavior}. @item -P -Prune empty directories. +Prune empty directories. See @ref{Moving directories}. @item -p Pipe files to the standard output. @item -R -Operate recursively. This is on by default. -@xref{Recursive behavior}. +Operate recursively (default). @xref{Recursive +behavior}. @item -r tag Retrieve revision @var{tag}. This option is sticky, @@ -7326,6 +7845,11 @@ the repository but not in your source, and for files that you haven't changed but are not the most recent versions available in the repository. +@item P @var{file} +Like @samp{U}, but the @sc{cvs} server sends a patch +instead of an entire file. These two things accomplish +the same thing. + @item A @var{file} The file has been added to your private copy of the sources, and will be added to the source repository @@ -7387,10 +7911,6 @@ correspond to anything in the source repository, and is not in the list of files for @sc{cvs} to ignore (see the description of the @samp{-I} option, and @pxref{cvsignore}). - -Note that no warning message like this is printed for -spurious directories that @sc{cvs} encounters. The -directory, and all its contents, are silently ignored. @end table @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @@ -7406,169 +7926,849 @@ been going on with the project. $ cvs -n -q update @end example -@c --------------------------------------------------------------------- -@node Administrative files -@appendix Reference manual for the Administrative files -@cindex Administrative files (reference) -@cindex Files, reference manual -@cindex Reference manual (files) -@cindex CVSROOT (file) +@node Invoking CVS +@appendix Quick reference to CVS commands +@cindex Command reference +@cindex Reference, commands +@cindex Invoking CVS -Inside the repository, in the directory -@file{$CVSROOT/CVSROOT}, there are a number of -supportive files for @sc{cvs}. You can use @sc{cvs} in a limited -fashion without any of them, but if they are set up -properly they can help make life easier. For a -discussion of how to edit them, @xref{Intro -administrative files}. +This appendix describes how to invoke @sc{cvs}, with +references to where each command or feature is +described in detail. Other relevant references are the +@samp{--help}/@samp{-H} option to @sc{cvs} +(@pxref{Global options}) and @ref{Index}. -The most important of these files is the @file{modules} -file, which defines the modules inside the repository. +@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 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. +@table @code +@item add [@var{options}] [@var{files}@dots{}] +Add a new file/directory. See @ref{Adding files}. -@menu -* modules:: Defining modules -* Wrappers:: Treat directories as files -* commit files:: The commit support files -* commitinfo:: Pre-commit checking -* editinfo:: Specifying how log messages are created -* loginfo:: Where should log messages be sent? -* rcsinfo:: Templates for the log messages -* cvsignore:: Ignoring files via cvsignore -* history file:: History information -* Variables:: Various variables are expanded -@end menu +@table @code +@item -k @var{kflag} +Set keyword expansion. -@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -@node modules -@appendixsec The modules file -@cindex Modules (admin file) -@cindex Defining modules (reference manual) +@item -m @var{msg} +Set file description. +@end table -The @file{modules} file records your definitions of -names for collections of source code. @sc{cvs} will -use these definitions if you use @sc{cvs} to update the -modules file (use normal commands like @code{add}, -@code{commit}, etc). +@item admin [@var{options}] [@var{files}@dots{}] +Administration of history files in the repository. See +@ref{admin}. +@c This list omits those options which are not +@c documented as being useful with CVS. That might be +@c a mistake... -The @file{modules} file may contain blank lines and -comments (lines beginning with @samp{#}) as well as -module definitions. Long lines can be continued on the -next line by specifying a backslash (@samp{\}) as the -last character on the line. +@table @code +@item -b[@var{rev}] +Set default branch. +@c FIXME: Should xref to a section which describes how +@c to use this with the vendor branch. -A module definition is a single line of the -@file{modules} file, in either of two formats. In both -cases, @var{mname} represents the symbolic module name, -and the remainder of the line is its definition. +@item -c@var{string} +Set comment leader. -@table @code -@item @var{mname} -a @var{aliases}@dots{} -This represents the simplest way of defining a module -@var{mname}. The @samp{-a} flags the definition as a -simple alias: @sc{cvs} will treat any use of @var{mname} (as -a command argument) as if the list of names -@var{aliases} had been specified instead. -@var{aliases} may contain either other module names or -paths. When you use paths in aliases, @code{checkout} -creates all intermediate directories in the working -directory, just as if the path had been specified -explicitly in the @sc{cvs} arguments. +@item -k@var{subst} +Set keyword substitution. See @ref{Keyword +substitution}. -@item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ] [ &@var{module}@dots{} ] -In the simplest case, this form of module definition -reduces to @samp{@var{mname} @var{dir}}. This defines -all the files in directory @var{dir} as module mname. -@var{dir} is a relative path (from @code{$CVSROOT}) to a -directory of source in the source repository. In this -case, on checkout, a single directory called -@var{mname} is created as a working directory; no -intermediate directory levels are used by default, even -if @var{dir} was a path involving several directory -levels. +@item -l[@var{rev}] +Lock revision @var{rev}, or latest revision. -By explicitly specifying files in the module definition -after @var{dir}, you can select particular files from -directory @var{dir}. The sample definition for -@samp{modules} is an example of a module defined with a -single file from a particular directory. Here is -another example: +@item -m@var{rev}:@var{msg} +Replace the log message of revision @var{rev} with +@var{msg}. -@example -m4test unsupported/gnu/m4 foreach.m4 forloop.m4 -@end example +@item -o@var{range} +Delete revisions from the history files -@noindent -With this definition, executing @samp{cvs checkout -m4test} will create a single working directory -@file{m4test} containing the two files listed, which -both come from a common directory several levels deep -in the @sc{cvs} source repository. +@item -q +Run quietly; do not print diagnostics. -A module definition can refer to other modules by -including @samp{&@var{module}} in its definition. -@code{checkout} creates a subdirectory for each such -module, in your working directory. -@c -- Nope. "in your working directory" is wrong. What -@c -- is right? +@item -s@var{state}[:@var{rev}] +Set the state. -@table @code -@item -d @var{name} -Name the working directory something other than the -module name. +@c Does not work for client/server CVS +@item -t +Set file description from standard input. -@cindex Export program -@item -e @var{prog} -Specify a program @var{prog} to run whenever files in a -module are exported. @var{prog} runs with a single -argument, the module name. -@c FIXME: Is it run on server? client? +@item -t@var{file} +Set file description from @var{file}. -@cindex Checkin program -@item -i @var{prog} -Specify a program @var{prog} to run whenever files in a -module are committed. @var{prog} runs with a single -argument, the full pathname of the affected directory -in a source repository. The @file{commitinfo}, -@file{loginfo}, and @file{editinfo} files provide other -ways to call a program on commit. -@c FIXME: Is it run on server? client? +@item -t-@var{string} +Set file description to @var{string}. -@cindex Checkout program -@item -o @var{prog} -Specify a program @var{prog} to run whenever files in a -module are checked out. @var{prog} runs with a single -argument, the module name. -@c FIXME: Is it run on server? client? +@item -u[@var{rev}] +Unlock revision @var{rev}, or latest revision. +@end table -@cindex Status of a module -@cindex Module status -@item -s @var{status} -Assign a status to the module. When the module file is -printed with @samp{cvs checkout -s} the modules are -sorted according to primarily module status, and -secondarily according to the module name. This option -has no other meaning. You can use this option for -several things besides status: for instance, list the -person that is responsible for this module. +@item annotate [@var{options}] [@var{files}@dots{}] +Show last revision where each line was modified. See +@ref{annotate}. -@cindex Tag program -@item -t @var{prog} -Specify a program @var{prog} to run whenever files in a -module are tagged with @code{rtag}. @var{prog} runs -with two arguments: the module name and the symbolic -tag specified to @code{rtag}. There is no way to -specify a program to run when @code{tag} is executed. -@c FIXME: Is it run on server? client? +@table @code +@item -D @var{date} +Annotate the most recent revision no later than +@var{date}. See @ref{Common options}. -@cindex Update program -@item -u @var{prog} -Specify a program @var{prog} to run whenever @samp{cvs -update} is executed from the top-level directory of the -checked-out module. @var{prog} runs with a single -argument, the full path to the source repository for -this module. -@c FIXME: Is it run on server? client? -@end table +@item -f +Use head revision if tag/date not found. See +@ref{Common options}. + +@item -l +Local; run only in current working directory. @xref{Recursive behavior}. + +@item -r @var{tag} +Annotate revision @var{tag}. See @ref{Common options}. +@end table + +@item checkout [@var{options}] @var{modules}@dots{} +Get a copy of the sources. See @ref{checkout}. + +@table @code +@item -A +Reset any sticky tags/date/kopts. See @ref{Sticky +tags} and @ref{Keyword substitution}. + +@item -c +Output the module database. See @ref{checkout options}. + +@item -D @var{date} +Check out revisions as of @var{date} (is sticky). See +@ref{Common options}. + +@item -d @var{dir} +Check out into @var{dir}. See @ref{checkout options}. + +@item -f +Use head revision if tag/date not found. See +@ref{Common options}. + +@c Probably want to use rev1/rev2 style like for diff +@c -r. Here and in on-line help. +@item -j @var{rev} +Merge in changes. See @ref{checkout options}. + +@item -k @var{kflag} +Use @var{kflag} keyword expansion. See +@ref{Substitution modes}. + +@item -l +Local; run only in current working directory. @xref{Recursive behavior}. + +@item -N +Don't shorten module paths if -d specified. See @ref{checkout options}. + +@item -n +Do not run module program (if any). See @ref{checkout options}. + +@item -P +Prune empty directories. See @ref{Moving directories}. + +@item -p +Check out files to standard output (avoids +stickiness). See @ref{checkout options}. + +@item -r @var{tag} +Checkout revision @var{tag} (is sticky). See @ref{Common options}. + +@item -s +Like -c, but include module status. See @ref{checkout options}. +@end table + +@item commit [@var{options}] [@var{files}@dots{}] +Check changes into the repository. See @ref{commit}. + +@table @code +@item -F @var{file} +Read log message from @var{file}. See @ref{commit options}. + +@item -f +@c What is this "disables recursion"? It is from the +@c on-line help; is it documented in this manual? +Force the file to be committed; disables recursion. +See @ref{commit options}. + +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. + +@item -m @var{msg} +Use @var{msg} as log message. See @ref{commit options}. + +@item -n +Do not run module program (if any). See @ref{commit options}. + +@item -R +Operate recursively (default). @xref{Recursive +behavior}. + +@item -r @var{rev} +Commit to @var{rev}. See @ref{commit options}. +@end table + +@item diff [@var{options}] [@var{files}@dots{}] +Show differences between revisions. See @ref{diff}. +In addition to the options shown below, accepts a wide +variety of options to control output style, for example +@samp{-c} for context diffs. + +@table @code +@item -D @var{date1} +Diff revision for date against working file. See +@ref{diff options}. + +@item -D @var{date2} +Diff @var{rev1}/@var{date1} against @var{date2}. See +@ref{diff options}. + +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. + +@item -N +Include diffs for added and removed files. See +@ref{diff options}. + +@item -r @var{rev1} +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}. +@end table + +@item edit [@var{options}] [@var{files}@dots{}] +Get ready to edit a watched file. See @ref{Editing files}. + +@table @code +@item -a @var{actions} +Specify actions for temporary watch, where +@var{actions} is @code{edit}, @code{unedit}, +@code{commit}, @code{all}, or @code{none}. See +@ref{Editing files}. + +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. +@end table + +@item editors [@var{options}] [@var{files}@dots{}] +See who is editing a watched file. See @ref{Watch information}. + +@table @code +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. +@end table + +@item export [@var{options}] @var{modules}@dots{} +Export files from CVS. See @ref{export}. + +@table @code +@item -D @var{date} +Check out revisions as of @var{date}. See +@ref{Common options}. + +@item -d @var{dir} +Check out into @var{dir}. See @ref{export options}. + +@item -f +Use head revision if tag/date not found. See +@ref{Common options}. + +@item -k @var{kflag} +Use @var{kflag} keyword expansion. See +@ref{Substitution modes}. + +@item -l +Local; run only in current working directory. @xref{Recursive behavior}. + +@item -N +Don't shorten module paths if -d specified. See @ref{export options}. + +@item -n +Do not run module program (if any). See @ref{export options}. + +@item -P +Prune empty directories. See @ref{Moving directories}. + +@item -r @var{tag} +Checkout revision @var{tag} (is sticky). See @ref{Common options}. +@end table + +@item history [@var{options}] [@var{files}@dots{}] +Show repository access history. See @ref{history}. + +@table @code +@item -a +All users (default is self). See @ref{history options}. + +@item -b @var{str} +Back to record with @var{str} in module/file/repos +field. See @ref{history options}. + +@item -c +Report on committed (modified) files. See @ref{history options}. + +@item -D @var{date} +Since @var{date}. See @ref{history options}. + +@item -e +Report on all record types. See @ref{history options}. + +@item -l +Last modified (committed or modified report). See @ref{history options}. + +@item -m @var{module} +Report on @var{module} (repeatable). See @ref{history +options}. + +@item -n @var{module} +In @var{module}. See @ref{history options}. + +@item -o +Report on checked out modules. See @ref{history options}. + +@item -r @var{rev} +Since revision @var{rev}. See @ref{history options}. + +@item -T +@c What the @#$@# is a TAG? Same as a tag? This +@c wording is also in the online-line help. +Produce report on all TAGs. See @ref{history options}. + +@item -t @var{tag} +Since tag record placed in history file (by anyone). +See @ref{history options}. + +@item -u @var{user} +For user @var{user} (repeatable). See @ref{history +options}. + +@item -w +Working directory must match. See @ref{history options}. + +@item -x @var{types} +Report on @var{types}, one or more of +@code{TOEFWUCGMAR}. See @ref{history options}. + +@item -z @var{zone} +Output for time zone @var{zone}. See @ref{history +options}. +@end table + +@item import [@var{options}] @var{repository} @var{vendor-tag} @var{release-tags}@dots{} +Import files into CVS, using vendor branches. See +@ref{import}. + +@table @code +@item -b @var{bra} +Import to vendor branch @var{bra}. See +@ref{import options}. + +@item -d +Use the file's modification time as the time of +import. See @ref{import options}. + +@item -k @var{kflag} +Set default RCS keyword substitution mode. See +@ref{import options}. + +@item -m @var{msg} +Use @var{msg} for log message. See +@ref{import options}. + +@item -I @var{ign} +More files to ignore (! to reset). See +@ref{import options}. + +@item -W @var{spec} +More wrappers. See @ref{import options}. +@end table + +@item init +Create a CVS repository if it doesn't exist. See +@ref{Creating a repository}. + +@item log [@var{options}] [@var{files}@dots{}] +Print out history information for files. See @ref{log}. + +@table @code +@item -b +Only list revisions on the default branch. See @ref{log options}. + +@item -d @var{dates} +Specify dates (@var{d1}<@var{d2} for range, @var{d} for +latest before). See @ref{log options}. + +@item -h +Only print header. See @ref{log options}. + +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. + +@item -N +Do not list tags. See @ref{log options}. + +@item -R +Only print name of RCS file. See @ref{log options}. + +@item -r @var{revs} +Only list revisions @var{revs}. See @ref{log options}. + +@item -s @var{states} +Only list revisions with specified states. See @ref{log options}. + +@item -t +Only print header and descriptive text. See @ref{log +options}. + +@item -w @var{logins} +Only list revisions checked in by specified logins. See @ref{log options}. +@end table + +@item login +Prompt for password for authenticating server. See +@ref{Password authentication client}. + +@item rdiff [@var{options}] @var{modules}@dots{} +Show differences between releases. See @ref{rdiff}. + +@table @code +@item -c +Context diff output format (default). See @ref{rdiff options}. + +@item -D @var{date} +Select revisions based on @var{date}. See @ref{Common options}. + +@item -f +Use head revision if tag/date not found. See +@ref{Common options}. + +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. + +@item -r @var{rev} +Select revisions based on @var{rev}. See @ref{Common options}. + +@item -s +Short patch - one liner per file. See @ref{rdiff options}. + +@item -t +Top two diffs - last change made to the file. See +@ref{diff options}. + +@item -u +Unidiff output format. See @ref{rdiff options}. + +@item -V @var{vers} +Use RCS Version @var{vers} for keyword expansion. See +@ref{rdiff options}. +@end table + +@item release [@var{options}] @var{directory} +Indicate that a directory is no longer in use. See +@ref{release}. + +@table @code +@item -d +Delete the given directory. See @ref{release options}. +@end table + +@item remove [@var{options}] [@var{files}@dots{}] +Remove an entry from the repository. See @ref{Removing files}. + +@table @code +@item -f +Delete the file before removing it. See @ref{Removing files}. + +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. + +@item -R +Operate recursively (default). @xref{Recursive +behavior}. +@end table + +@item rtag [@var{options}] @var{tag} @var{modules}@dots{} +Add a symbolic tag to a module. See @ref{rtag}. + +@table @code +@c Is this one of those dumb options which used to +@c work around the lack of death support? +@item -a +Clear tag from removed files that would not otherwise +be tagged. See @ref{rtag options}. + +@item -b +Create a branch named @var{tag}. See @ref{rtag options}. + +@item -D @var{date} +Tag revisions as of @var{date}. See @ref{rtag options}. + +@item -d +Delete the given tag. See @ref{rtag options}. + +@item -F +Move tag if it already exists. See @ref{rtag options}. + +@item -f +Force a head revision match if tag/date not found. +See @ref{rtag options}. + +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. + +@item -n +No execution of tag program. See @ref{rtag options}. + +@item -R +Operate recursively (default). @xref{Recursive +behavior}. + +@item -r @var{tag} +Tag existing tag @var{tag}. See @ref{rtag options}. +@end table + +@item status [@var{options}] @var{files}@dots{} +Display status information in a working directory. See +@ref{status}. + +@table @code +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. + +@item -R +Operate recursively (default). @xref{Recursive +behavior}. + +@item -v +Include tag information for file. See @ref{status options}. +@end table + +@item tag [@var{options}] @var{tag} [@var{files}@dots{}] +Add a symbolic tag to checked out version of files. +See @ref{tag}. + +@table @code +@item -b +Create a branch named @var{tag}. See @ref{tag options}. + +@item -D @var{date} +Tag revisions as of @var{date}. See @ref{tag options}. + +@item -d +Delete the given tag. See @ref{tag options}. + +@item -F +Move tag if it already exists. See @ref{tag options}. + +@item -f +Force a head revision match if tag/date not found. +See @ref{tag options}. + +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. + +@item -n +No execution of tag program. See @ref{tag options}. + +@item -R +Operate recursively (default). @xref{Recursive +behavior}. + +@item -r @var{tag} +Tag existing tag @var{tag}. See @ref{tag options}. +@end table + +@item unedit [@var{options}] [@var{files}@dots{}] +Undo an edit command. See @ref{Editing files}. + +@table @code +@item -a @var{actions} +Specify actions for temporary watch, where +@var{actions} is @code{edit}, @code{unedit}, +@code{commit}, @code{all}, or @code{none}. See +@ref{Editing files}. + +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. +@end table + +@item update [@var{options}] [@var{files}@dots{}] +Bring work tree in sync with repository. See +@ref{update}. + +@table @code +@item -A +Reset any sticky tags/date/kopts. See @ref{Sticky +tags} and @ref{Keyword substitution}. + +@item -D @var{date} +Check out revisions as of @var{date} (is sticky). See +@ref{Common options}. + +@item -d +Create directories. See @ref{update options}. + +@item -f +Use head revision if tag/date not found. See +@ref{Common options}. + +@item -I @var{ign} +More files to ignore (! to reset). See +@ref{import options}. + +@c Probably want to use rev1/rev2 style like for diff +@c -r. Here and in on-line help. +@item -j @var{rev} +Merge in changes. See @ref{update options}. + +@item -k @var{kflag} +Use @var{kflag} keyword expansion. See +@ref{Substitution modes}. + +@item -l +Local; run only in current working directory. @xref{Recursive behavior}. + +@item -P +Prune empty directories. See @ref{Moving directories}. + +@item -p +Check out files to standard output (avoids +stickiness). See @ref{update options}. + +@item -R +Operate recursively (default). @xref{Recursive +behavior}. + +@item -r @var{tag} +Checkout revision @var{tag} (is sticky). See @ref{Common options}. + +@item -W @var{spec} +More wrappers. See @ref{import options}. +@end table + +@item watch [on|off|add|remove] [@var{options}] [@var{files}@dots{}] + +on/off: turn on/off read-only checkouts of files. See +@ref{Setting a watch}. + +add/remove: add or remove notification on actions. See +@ref{Getting Notified}. + +@table @code +@item -a @var{actions} +Specify actions for temporary watch, where +@var{actions} is @code{edit}, @code{unedit}, +@code{commit}, @code{all}, or @code{none}. See +@ref{Editing files}. + +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. +@end table + +@item watchers [@var{options}] [@var{files}@dots{}] +See who is watching a file. See @ref{Watch information}. + +@table @code +@item -l +Local; run only in current working directory. See @ref{Recursive behavior}. +@end table + +@end table + +@c --------------------------------------------------------------------- +@node Administrative files +@appendix Reference manual for the Administrative files +@cindex Administrative files (reference) +@cindex Files, reference manual +@cindex Reference manual (files) +@cindex CVSROOT (file) + +Inside the repository, in the directory +@file{$CVSROOT/CVSROOT}, there are a number of +supportive files for @sc{cvs}. You can use @sc{cvs} in a limited +fashion without any of them, but if they are set up +properly they can help make life easier. For a +discussion of how to edit them, @xref{Intro +administrative files}. + +The most important of these files is the @file{modules} +file, which defines the modules inside the repository. + +@menu +* modules:: Defining modules +* Wrappers:: Treat directories as files +* commit files:: The commit support files +* commitinfo:: Pre-commit checking +* verifymsg:: How are log messages evaluated? +* editinfo:: Specifying how log messages are created + (obsolete) +* loginfo:: Where should log messages be sent? +* rcsinfo:: Templates for the log messages +* cvsignore:: Ignoring files via cvsignore +* history file:: History information +* Variables:: Various variables are expanded +@end menu + +@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@node modules +@appendixsec The modules file +@cindex Modules (admin file) +@cindex Defining modules (reference manual) + +The @file{modules} file records your definitions of +names for collections of source code. @sc{cvs} will +use these definitions if you use @sc{cvs} to update the +modules file (use normal commands like @code{add}, +@code{commit}, etc). + +The @file{modules} file may contain blank lines and +comments (lines beginning with @samp{#}) as well as +module definitions. Long lines can be continued on the +next line by specifying a backslash (@samp{\}) as the +last character on the line. + +A module definition is a single line of the +@file{modules} file, in either of two formats. In both +cases, @var{mname} represents the symbolic module name, +and the remainder of the line is its definition. + +@table @code +@item @var{mname} -a @var{aliases}@dots{} +This represents the simplest way of defining a module +@var{mname}. The @samp{-a} flags the definition as a +simple alias: @sc{cvs} will treat any use of @var{mname} (as +a command argument) as if the list of names +@var{aliases} had been specified instead. +@var{aliases} may contain either other module names or +paths. When you use paths in aliases, @code{checkout} +creates all intermediate directories in the working +directory, just as if the path had been specified +explicitly in the @sc{cvs} arguments. + +@item @var{mname} [ options ] @var{dir} [ @var{files}@dots{} ] [ &@var{module}@dots{} ] +In the simplest case, this form of module definition +reduces to @samp{@var{mname} @var{dir}}. This defines +all the files in directory @var{dir} as module mname. +@var{dir} is a relative path (from @code{$CVSROOT}) to a +directory of source in the source repository. In this +case, on checkout, a single directory called +@var{mname} is created as a working directory; no +intermediate directory levels are used by default, even +if @var{dir} was a path involving several directory +levels. + +By explicitly specifying files in the module definition +after @var{dir}, you can select particular files from +directory @var{dir}. The sample definition for +@samp{modules} is an example of a module defined with a +single file from a particular directory. Here is +another example: + +@example +m4test unsupported/gnu/m4 foreach.m4 forloop.m4 +@end example + +@noindent +With this definition, executing @samp{cvs checkout +m4test} will create a single working directory +@file{m4test} containing the two files listed, which +both come from a common directory several levels deep +in the @sc{cvs} source repository. + +A module definition can refer to other modules by +including @samp{&@var{module}} in its definition. +@code{checkout} creates a subdirectory for each such +module, in the directory containing the module. For +example, if modules contains + +@example +m4test &unsupported +@end example + +then a checkout will create an @code{m4test} directory +which contains a directory called @code{unsupported}, +which in turns contains all the directories and files +which live there. +@c FIXME: this is hard to describe since we don't tell +@c the user what the repository contains. Best way to +@c fix this whole mess is an extended example where we +@c first say what is in the repository, then show a +@c regular module, an alias module, and an & module. +@c We should mention the concept of options only +@c *after* we've taken care of those basics. +@c +@c FIXCVS: What happens if regular and & modules are +@c combined, as in "ampermodule first-dir &second-dir"? +@c When I tried it, it seemed to just ignore the +@c "first-dir". I think perhaps it should be an error +@c (but this needs further investigation). +@c In addition to discussing what each one does, we +@c should put in a few words about why you would use one or +@c the other in various situations. + +@table @code +@item -d @var{name} +Name the working directory something other than the +module name. + +@cindex Export program +@item -e @var{prog} +Specify a program @var{prog} to run whenever files in a +module are exported. @var{prog} runs with a single +argument, the module name. +@c FIXME: Is it run on server? client? + +@cindex Checkin program +@item -i @var{prog} +Specify a program @var{prog} to run whenever files in a +module are committed. @var{prog} runs with a single +argument, the full pathname of the affected directory +in a source repository. The @file{commitinfo}, +@file{loginfo}, and @file{verifymsg} files provide other +ways to call a program on commit. +@c FIXME: Is it run on server? client? + +@cindex Checkout program +@item -o @var{prog} +Specify a program @var{prog} to run whenever files in a +module are checked out. @var{prog} runs with a single +argument, the module name. +@c FIXME: Is it run on server? client? + +@cindex Status of a module +@cindex Module status +@item -s @var{status} +Assign a status to the module. When the module file is +printed with @samp{cvs checkout -s} the modules are +sorted according to primarily module status, and +secondarily according to the module name. This option +has no other meaning. You can use this option for +several things besides status: for instance, list the +person that is responsible for this module. + +@cindex Tag program +@item -t @var{prog} +Specify a program @var{prog} to run whenever files in a +module are tagged with @code{rtag}. @var{prog} runs +with two arguments: the module name and the symbolic +tag specified to @code{rtag}. There is no way to +specify a program to run when @code{tag} is executed. +@c FIXME: Is it run on server? client? + +@cindex Update program +@item -u @var{prog} +Specify a program @var{prog} to run whenever @samp{cvs +update} is executed from the top-level directory of the +checked-out module. @var{prog} runs with a single +argument, the full path to the source repository for +this module. +@c FIXME: Is it run on server? client? +@end table @end table @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -7725,12 +8925,19 @@ The program is responsible for checking that the commit is allowed. If it exits with a non-zero exit status the commit will be aborted. +@item verifymsg +The specified program is used to evaluate the log message, +and possibly verify that it contains all required +fields. This is most useful in combination with the +@file{rcsinfo} file, which can hold a log message +template (@pxref{rcsinfo}). + @item editinfo The specified program is used to edit the log message, and possibly verify that it contains all required fields. This is most useful in combination with the @file{rcsinfo} file, which can hold a log message -template (@pxref{rcsinfo}). +template (@pxref{rcsinfo}). (obsolete) @item loginfo The specified program is called when the commit is @@ -7753,18 +8960,33 @@ imagination is the limit! @cindex Common syntax of info files @c FIXME: having this so totally separate from the -@c Variables node is rather bogus. Also, this syntax -@c applies to taginfo and others, but we don't say so. +@c Variables node is rather bogus. -The four files @file{commitinfo}, @file{loginfo}, -@file{rcsinfo} and @file{editinfo} all have a common -format. The purpose of the files are described later -on. The common syntax is described here. +The administrative files such as @file{commitinfo}, +@file{loginfo}, @file{rcsinfo}, @file{verifymsg}, etc., +all have a common format. The purpose of the files are +described later on. The common syntax is described +here. +@cindex regular expression syntax Each line contains the following: @itemize @bullet @item -A regular expression +@c Say anything about DEFAULT and ALL? Right now we +@c leave that to the description of each file (and in fact +@c the practice is inconsistent which is really annoying). +A regular expression. This is a basic regular +expression in the syntax used by GNU emacs. +@c FIXME: What we probably should be saying is "POSIX Basic +@c Regular Expression with the following extensions (`\(' +@c `\|' '+' etc)" +@c rather than define it with reference to emacs. +@c The reference to emacs is not strictly speaking +@c true, as we don't support \=, \s, or \S. Also it isn't +@c clear we should document and/or promise to continue to +@c support all the obscure emacs extensions like \<. +@c Also need to better cite (or include) full +@c documentation for the syntax. @item A whitespace separator---one or more spaces and/or tabs. @@ -7783,6 +9005,13 @@ The first regular expression that matches the current directory name in the repository is used. The rest of the line is used as a file name or command-line as appropriate. +@c FIXME: need an example. In particular, show what +@c the regular expression is matched against (one +@c ordinarily clueful person got confused about whether it +@c includes the filename--"directory name" above should be +@c unambiguous but there is nothing like an example to +@c confirm people's understanding of this sort of thing). + @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @node commitinfo @appendixsec Commitinfo @@ -7843,6 +9072,97 @@ repositories}). @c general CVS security in "Password authentication @c security" (the bit which is not pserver-specific). +@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +@node verifymsg +@appendixsec Verifying log messages +@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 +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 +that the entered message contains the required fields. + +The @file{verifymsg} file is often most useful together +with the @file{rcsinfo} file, which can be used to +specify a log message template. + +Each line in the @file{verifymsg} file consists of a +regular expression and a command-line template. The +template must include a program name, and can include +any number of arguments. The full path to the current +log message template file is appended to the template. + +One thing that should be noted is that the @samp{ALL} +keyword is not supported. If more than one matching +line is found, the first one is used. This can be +useful for specifying a default verification script in a +module, and then overriding it in a subdirectory. + +@cindex DEFAULT in verifymsg +If the repository name does not match any of the +regular expressions in this file, the @samp{DEFAULT} +line is used, if it is specified. + +If the verification script exits with a non-zero exit status, +the commit is aborted. + +Note that the verification script cannot change the log +message; it can merely accept it or reject it. +@c FIXME? Is this an annoying limitation? It would be +@c relatively easy to fix (although it would *not* be a +@c good idea for a verifymsg script to interact with the user +@c at least in the client/server case because of locks +@c and all that jazz). + +The following is a little silly example of a +@file{verifymsg} file, together with the corresponding +@file{rcsinfo} file, the log message template and an +verification script. We begin with the log message template. +We want to always record a bug-id number on the first +line of the log message. The rest of log message is +free text. The following template is found in the file +@file{/usr/cvssupport/tc.template}. + +@example +BugId: +@end example + +The script @file{/usr/cvssupport/bugid.verify} is used to +evaluate the log message. + +@example +#!/bin/sh +# +# bugid.verify filename +# +# 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 + exit 0 +else + echo "No BugId found." + exit 1 +fi +@end example + +The @file{verifymsg} file contains this line: + +@example +^tc /usr/cvssupport/bugid.edit +@end example + +The @file{rcsinfo} file contains this line: + +@example +^tc /usr/cvssupport/tc.template +@end example + + + @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @node editinfo @appendixsec Editinfo @@ -7851,6 +9171,14 @@ repositories}). @cindex Per-module editor @cindex Log messages, editing +@emph{NOTE:} The @file{editinfo} feature has been +rendered obsolete. To set a default editor for log +messages use the @code{EDITOR} environment variable +(@pxref{Environment variables}) or the @samp{-e} global +option (@pxref{Global options}). See @ref{verifymsg}, +for information on the use of the @file{verifymsg} +feature for evaluating log messages. + If you want to make sure that all log messages look the same way, you can use the @file{editinfo} file to specify a program that is used to edit the log message. @@ -7894,11 +9222,8 @@ the commit is aborted. Note: when @sc{CVS} is accessing a remote repository, or when the @samp{-m} or @samp{-F} options to @code{cvs commit} are used, @file{editinfo} will not be consulted. -There is no good workaround for this. -@c FORCE_USE_EDITOR in the sources sort of helps a bit, -@c but doesn't help with remote CVS, and in any event the -@c whole feature confuses two concepts which should be -@c separate: (1) getting the message; and (2) validating it. +There is no good workaround for this; use +@file{verifymsg} instead. @menu * editinfo example:: Editinfo example @@ -7974,11 +9299,6 @@ relative to the @code{$CVSROOT}. If a match is found, then the remainder of the line is a filter program that should expect log information on its standard input. -The filter program may use one and only one % modifier -(a la printf). If @samp{%s} is specified in the filter -program, a brief title is included (enclosed in single -quotes) showing the modified file names. - If the repository name does not match any of the regular expressions in this file, the @samp{DEFAULT} line is used, if it is specified. @@ -7992,6 +9312,46 @@ The first matching regular expression is used. @xref{commit files}, for a description of the syntax of the @file{loginfo} file. +The user may specify a format string as +part of the filter. The string is composed of a +@samp{%} followed by a space, or followed by a single +format character, or followed by a set of format +characters surrounded by @samp{@{} and @samp{@}} as +separators. The format characters are: + +@table @t +@item s +file name +@item V +old version number (pre-checkin) +@item v +new version number (post-checkin) +@end table + +All other characters that appear in a format string +expand to an empty field (commas separating fields are +still provided). + +For example, some valid format strings are @samp{%}, +@samp{%s}, @samp{%@{s@}}, and @samp{%@{sVv@}}. + +The output will be a string of tokens separated by +spaces. For backwards compatibility, the the first +token will be the repository name. The rest of the +tokens will be comma-delimited lists of the information +requested in the format string. For example, if +@samp{/u/src/master} is the repository, @samp{%@{sVv@}} +is the format string, and three files (@t{ChangeLog}, +@t{Makefile}, @t{foo.c}) were modified, the output +might be: + +@example +/u/src/master ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13 +@end example + +As another example, @samp{%@{@}} means that only the +name of the repository will be generated. + Note: when @sc{CVS} is accessing a remote repository, @file{loginfo} will be run on the @emph{remote} (i.e., server) side, not the client side (@pxref{Remote @@ -8096,7 +9456,7 @@ out tree in @file{/u/www/local-docs}. The @file{rcsinfo} file can be used to specify a form to edit when filling out the commit log. The @file{rcsinfo} file has a syntax similar to the -@file{editinfo}, @file{commitinfo} and @file{loginfo} +@file{verifymsg}, @file{commitinfo} and @file{loginfo} files. @xref{syntax}. Unlike the other files the second part is @emph{not} a command-line template. Instead, the part after the regular expression should be a full pathname to @@ -8116,7 +9476,7 @@ commit -m @var{message}} or @samp{cvs commit -f @var{file}} that log message will override the template. -@xref{editinfo example}, for an example @file{rcsinfo} +@xref{verifymsg}, for an example @file{rcsinfo} file. When @sc{CVS} is accessing a remote repository, @@ -8207,6 +9567,20 @@ exclamation mark (@samp{!}) clears the ignore list. This can be used if you want to store any file which normally is ignored by @sc{cvs}. +Specifying @samp{-I !} to @code{cvs import} will import +everything, which is generally what you want to do if +you are importing files from a pristine distribution or +any other source which is known to not contain any +extraneous files. However, looking at the rules above +you will see there is a fly in the ointment; if the +distribution contains any @file{.cvsignore} files, then +the patterns from those files will be processed even if +@samp{-I !} is specified. The only workaround is to +remove the @file{.cvsignore} files in order to do the +import. Because this is awkward, in the future +@samp{-I !} might be modified to override +@file{.cvsignore} files in each directory. + @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @node history file @appendixsec The history file @@ -8394,11 +9768,6 @@ Used in client-server mode when accessing the @code{cvs login server}. Default value is @file{$HOME/.cvspass}. @pxref{Password authentication client} -@item $CVS_PASSWORD -Used in client-server mode when accessing the @code{cvs -login server}. -@pxref{Password authentication client} - @item $CVS_CLIENT_PORT Used in client-server mode when accessing the server via Kerberos. @@ -8566,7 +9935,395 @@ no way to see how the tag was assigned yesterday). @c --------------------------------------------------------------------- @node Copying @appendix GNU GENERAL PUBLIC LICENSE -@c @include gpl.texinfo +@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 +@unnumberedsec TERMS AND CONDITIONS FOR COPYING, 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 diff --git a/gnu/usr.bin/cvs/doc/cvsclient.texi b/gnu/usr.bin/cvs/doc/cvsclient.texi index cb4ad2cd207..7420014b4db 100644 --- a/gnu/usr.bin/cvs/doc/cvsclient.texi +++ b/gnu/usr.bin/cvs/doc/cvsclient.texi @@ -9,13 +9,12 @@ This document describes the client/server protocol used by CVS. It does not describe how to use or administer client/server CVS; see the regular CVS manual for that. This is version @value{CVSVN} of the protocol -specification---@xref{Introduction} for more on what this version number +specification---@xref{Introduction}, for more on what this version number means. @menu * Introduction:: What is CVS and what is the client/server protocol for? * Goals:: Basic design decisions, requirements, scope, etc. -* Notes:: Notes on the current implementation * Protocol Notes:: Possible enhancements, limitations, etc. of the protocol * Connection and Authentication:: Various ways to connect to the server * Protocol:: Complete description of the protocol @@ -60,7 +59,7 @@ versions of this specification. Although the specification is currently maintained in conjunction with the CVS implementation, and carries the same version number, it also intends to document what is involved with interoperating with other implementations (such as other versions of -CVS); see @xref{Requirements}. This version number should not be used +CVS); see @ref{Requirements}. This version number should not be used by clients or servers to determine what variant of the protocol to speak; they should instead use the @code{valid-requests} and @code{Valid-responses} mechanism (@pxref{Protocol}), which is more @@ -83,46 +82,29 @@ Security and authentication are handled outside this protocol (but see below about @samp{cvs kserver} and @samp{cvs pserver}). @item -This might be a first step towards adding transactions to CVS (i.e. a -set of operations is either executed atomically or none of them is -executed), improving the locking, or other features. The current server -implementation is a long way from being able to do any of these -things. The protocol, however, is not known to contain any defects -which would preclude them. +The protocol makes it possible for updates to be atomic with respect to +checkins; that is if someone commits changes to several files in one cvs +command, then an update by someone else would either get all the +changes, or none of them. The current @sc{cvs} server can't do this, +but that isn't the protocol's fault. @item -The server never has to have any CVS locks in place while it is waiting -for communication with the client. This makes things robust in the face -of flaky networks. - -@item -Data is transferred in large chunks, which is necessary for good -performance. In fact, currently the client uploads all the data -(without waiting for server responses), and then waits for one server -response (which consists of a massive download of all the data). There -may be cases in which it is better to have a richer interraction, but -the need for the server to release all locks whenever it waits for the -client makes it complicated. +The protocol is, with a few exceptions, transaction-based. That is, the +client sends all its requests (without waiting for server responses), +and then waits for the server to send back all responses (without +waiting for further client requests). This has the advantage of +minimizing network turnarounds and the disadvantage of sometimes +transferring more data than would be necessary if there were a richer +interaction. Another, more subtle, advantage is that there is no need +for the protocol to provide locking for features such as making checkins +atomic with respect to updates. Any such locking can be handled +entirely by the server. A good server implementation (such as the +current @sc{cvs} server) will make sure that it does not have any such +locks in place whenever it is waiting for communication with the client; +this prevents one client on a slow or flaky network from interfering +with the work of others. @end itemize -@node Notes -@chapter Notes on the Current Implementation - -The client is built in to the normal @code{cvs} program, triggered by a -specially-formatted @code{CVSROOT} variable, for example -@code{:server:cygnus.com:/rel/cvsfiles}. - -The client stores what is stored in checked-out directories (including -@file{CVS}). The way these are stored is totally compatible with -standard CVS. The server requires no storage other than the repository, -which also is totally compatible with standard CVS. - -The current server implementation can use up huge amounts of memory -when transmitting a lot of data over a slow link (i.e. the network is -slower than the server can generate the data). There is some -experimental code (see @code{SERVER_FLOWCONTROL} in options.h) which -should help significantly. - @node Protocol Notes @chapter Notes on the Protocol @@ -137,6 +119,10 @@ of "cvs edit" in this case is the most sensible course (the "cvs edit" could be handled by a package like VC for emacs). This would also allow local operation of @code{cvs diff} without arguments. +@c It isn't clear exactly how this should relate to a more general +@c multisite feature (in which one can modify the local copy even if the +@c network is down between the local and the master, and then they get +@c reconciled by a potentially manual process). @item Have the client keep a copy of some part of the repository. This allows all of @code{cvs diff} and large parts of @code{cvs update} and @@ -191,7 +177,11 @@ implementation, by having inetd call "cvs pserver") which defaults to connects, sends the string @samp{BEGIN AUTH REQUEST}, a linefeed, the cvs root, a linefeed, the username, a linefeed, the password trivially encoded (see scramble.c in the cvs sources), a linefeed, the string -@samp{END AUTH REQUEST}, and a linefeed. The server responds with +@samp{END AUTH REQUEST}, and a linefeed. The client must sent the +identical string for cvs root here, as it sends later, in the +@code{Root} request of the cvs +protocol itself. Servers are encouraged to enforce this restriction. +The server responds with @samp{I LOVE YOU} and a linefeed if the authentication is successful or @samp{I HATE YOU} and a linefeed if the authentication fails. After receiving @samp{I LOVE YOU}, the client proceeds with the cvs protocol. @@ -216,6 +206,7 @@ to a horizontal tab. * Responses:: * Example:: * Requirements:: +* Obsolete:: Former protocol features @end menu @node Entries Lines @@ -332,23 +323,19 @@ request-list is a space separated list of tokens. Response expected: yes. Ask the server to send back a @code{Valid-requests} response. -@item Repository @var{repository} \n -Response expected: no. Tell the server what repository to use. This -should be a directory name from a previous server response. Note that -this both gives a default for @code{Entry } and @code{Modified } and -also for @code{ci} and the other commands; normal usage is to send a -@code{Repository } for each directory in which there will be an -@code{Entry } or @code{Modified }, and then a final @code{Repository } -for the original directory, then the command. - @item Directory @var{local-directory} \n Additional data: @var{repository} \n. Response expected: no. -This is like @code{Repository}, -but the local name of the directory may differ from the repository name. +Tell the server what directory to use. The @var{repository} should be a +directory name from a previous server response. Note that +this both gives a default for @code{Entry} and @code{Modified} and +also for @code{ci} and the other commands; normal usage is to send +@code{Directory} for each directory in which there will be an +@code{Entry} or @code{Modified}, and then a final @code{Directory} +for the original directory, then the command. If the client uses this request, it affects the way the server returns pathnames; see @ref{Responses}. @var{local-directory} is relative to the top level at which the command is occurring (i.e. the last -@code{Directory} or @code{Repository} which is sent before the command); +@code{Directory} which is sent before the command); to indicate that top level, @samp{.} should be send for @var{local-directory}. @@ -364,7 +351,7 @@ request. @item Static-directory \n Response expected: no. Tell the server that the directory most recently -specified with @code{Repository} or @code{Directory} should not have +specified with @code{Directory} should not have additional files checked out unless explicitly requested. The client sends this if the @code{Entries.Static} flag is set, which is controlled by the @code{Set-static-directory} and @code{Clear-static-directory} @@ -372,7 +359,7 @@ responses. @item Sticky @var{tagspec} \n Response expected: no. Tell the server that the directory most recently -specified with @code{Repository} has a sticky tag or date @var{tagspec}. +specified with @code{Directory} has a sticky tag or date @var{tagspec}. The first character of @var{tagspec} is @samp{T} for a tag, or @samp{D} for a date. The remainder of @var{tagspec} contains the actual tag or date. @@ -392,42 +379,29 @@ Such a program would have been previously set with the @item Entry @var{entry-line} \n Response expected: no. Tell the server what version of a file is on the local machine. The name in @var{entry-line} is a name relative to the -directory most recently specified with @code{Repository}. If the user +directory most recently specified with @code{Directory}. If the user is operating on only some files in a directory, @code{Entry} requests for only those files need be included. If an @code{Entry} request is -sent without @code{Modified}, @code{Unchanged}, or @code{Lost} for that -file the meaning depends on whether @code{UseUnchanged} has been sent; -if it has been it means the file is lost, if not it means the file is -unchanged. +sent without @code{Modified} or @code{Unchanged}, it means the file is +lost (does not exist in the working directory). @item Modified @var{filename} \n Response expected: no. Additional data: mode, \n, file transmission. Send the server a copy of one locally modified file. @var{filename} is -relative to the most recent repository sent with @code{Repository}. If +relative to the most recent repository sent with @code{Directory}. If the user is operating on only some files in a directory, only those files need to be included. This can also be sent without @code{Entry}, if there is no entry for the file. -@item Lost @var{filename} \n -Response expected: no. Tell the server that @var{filename} no longer -exists. The name is relative to the most recent repository sent with -@code{Repository}. This is used for any case in which @code{Entry} is -being sent but the file no longer exists. If the client has issued the -@code{UseUnchanged} request, then this request is not used. - @item Unchanged @var{filename} \n Response expected: no. Tell the server that @var{filename} has not been modified in the checked out directory. The name is relative to the most -recent repository sent with @code{Repository}. This request can only be -issued if @code{UseUnchanged} has been sent. +recent repository sent with @code{Directory}. @item UseUnchanged \n -Response expected: no. Tell the server that the client will be -indicating unmodified files with @code{Unchanged}, and that files for -which no information is sent are nonexistent on the client side, not -unchanged. This is necessary for correct behavior since only the server -knows what possible files may exist, and thus what files are -nonexistent. +Response expected: no. To specify the version of the protocol described +in this document, servers must support this request (although it need +not do anything) and clients must issue it. @item Notify @var{filename} \n Response expected: no. @@ -533,9 +507,9 @@ need to expand modules on the client side. @itemx editors \n @itemx annotate \n Response expected: yes. Actually do a cvs command. This uses any -previous @code{Argument}, @code{Repository}, @code{Entry}, -@code{Modified}, or @code{Lost} requests, if they have been sent. The -last @code{Repository} sent specifies the working directory at the time +previous @code{Argument}, @code{Directory}, @code{Entry}, or +@code{Modified} requests, if they have been sent. The +last @code{Directory} sent specifies the working directory at the time of the operation. No provision is made for any input from the user. This means that @code{ci} must use a @code{-m} argument if it wants to specify a log message. @@ -548,18 +522,18 @@ directory and @emph{not} a fully qualified @code{CVSROOT} variable. The @itemx update \n Response expected: yes. Actually do a @code{cvs update} command. This -uses any previous @code{Argument}, @code{Repository}, @code{Entry}, -@code{Modified}, or @code{Lost} requests, if they have been sent. The -last @code{Repository} sent specifies the working directory at the time +uses any previous @code{Argument}, @code{Directory}, @code{Entry}, +or @code{Modified} requests, if they have been sent. The +last @code{Directory} sent specifies the working directory at the time of the operation. The @code{-I} option is not used--files which the client can decide whether to ignore are not mentioned and the client sends the @code{Questionable} request for others. @item import \n Response expected: yes. Actually do a @code{cvs import} command. This -uses any previous @code{Argument}, @code{Repository}, @code{Entry}, -@code{Modified}, or @code{Lost} requests, if they have been sent. The -last @code{Repository} sent specifies the working directory at the time +uses any previous @code{Argument}, @code{Directory}, @code{Entry}, or +@code{Modified} requests, if they have been sent. The +last @code{Directory} sent specifies the working directory at the time of the operation. The files to be imported are sent in @code{Modified} requests (files which the client knows should be ignored are not sent; the server must still process the CVSROOT/cvsignore file unless -I ! is @@ -573,8 +547,8 @@ argument. Response expected: yes. Actually do the @code{cvs watch on}, @code{cvs watch off}, @code{cvs watch add}, and @code{cvs watch remove} commands, respectively. This uses any previous @code{Argument}, -@code{Repository}, @code{Entry}, @code{Modified}, or @code{Lost} -requests, if they have been sent. The last @code{Repository} sent +@code{Directory}, @code{Entry}, or @code{Modified} +requests, if they have been sent. The last @code{Directory} sent specifies the working directory at the time of the operation. @item release \n @@ -634,14 +608,13 @@ message and exiting---this should be investigated further). @c FIXME: should better document when the specified repository needs to @c end in "/.". -Pathnames are of the actual files operated on (i.e. they do not contain -@samp{,v} endings), and are suitable for use in a subsequent -@code{Repository} request. However, if the client has used the -@code{Directory} request, then it is instead a local directory name +In the following, @var{pathname} actually indicates a pair of +pathnames. First, a local directory name relative to the directory in which the command was given (i.e. the last @code{Directory} before the command). Then a newline and a repository -name (the pathname which is sent if @code{Directory} is not used). Then -the slash and the filename. For example, for a file @file{i386.mh} +name. Then +a slash and the filename (without a @samp{,v} ending). +For example, for a file @file{i386.mh} which is in the local directory @file{gas.clean/config} and for which the repository is @file{/rel/cvsfiles/devo/gas/config}: @@ -827,77 +800,181 @@ The command completed successfully. @node Example @section Example -@c FIXME: Use Directory, not Repository! -@c FIXME-less-important: Use Created and Update-existing, not Updated. -@c FIXME: the presence of timestamps in the entries lines is not right. +@c The C:/S: convention is in imitation of RFC1869 (and presumably +@c other RFC's). In other formatting concerns, we might want to think +@c about whether there is an easy way to provide RFC1543 formatting +@c (without negating the advantages of texinfo), and whether we should +@c use RFC822-style BNF (I fear that would be less clear than +@c what we do now, however). Plus what about IETF terminology (SHOULD, +@c MUST, etc.) or ISO terminology (shall, should, or whatever they are)? +Here is an example; lines are prefixed by @samp{C: } to indicate the +client sends them or @samp{S: } to indicate the server sends them. + +The client starts by connecting, sending the root, and completing the +protocol negotiation. In actual practice the lists of valid responses +and requests would be longer. +@c The reason that we artificially shorten the lists is to avoid phony +@c line breaks. Any better solutions? +@c Other than that, this exchange is taken verbatim from the data +@c exchanged by CVS (as of Nov 1996). That is why some of the requests and +@c reponses are not quite what you would pick for pedagogical purposes. + +@example +C: Root /home/kingdon/testing/cvsroot +C: Valid-responses ok error Checked-in M E +C: valid-requests +S: Valid-requests Root Directory Entry Modified Argument Argumentx ci co +S: ok +C: UseUnchanged +@end example + +The client wants to check out the @code{supermunger} module into a fresh +working directory. Therefore it first expands the @code{supermunger} +module; this step would be omitted if the client was operating on a +directory rather than a module. +@c Why does it send Directory here? The description of expand-modules +@c doesn't really say much of anything about what use, if any, it makes of +@c Directory and similar requests sent previously. + +@example +C: Argument supermunger +C: Directory . +C: /home/kingdon/testing/cvsroot +C: expand-modules +@end example + +The server replies that the @code{supermunger} module expands to the +directory @code{supermunger} (the simplest case): + +@example +S: Module-expansion supermunger +S: ok +@end example + +The client then proceeds to check out the directory. The fact that it +sends only a single @code{Directory} request which specifies @samp{.} +for the working directory means that there is not already a +@code{supermunger} directory on the client. +@c What is -N doing here? + +@example +C: Argument -N +C: Argument supermunger +C: Directory . +C: /home/kingdon/testing/cvsroot +C: co +@end example + +The server replies with the requested files. In this example, there is +only one, @file{mungeall.c}. The @code{Clear-sticky} and +@code{Clear-static-directory} requests are sent by the current +implementation but they have no effect because the default is for those +settings to be clear when a directory is newly created. + +@example +S: Clear-sticky supermunger/ +S: /home/kingdon/testing/cvsroot/supermunger/ +S: Clear-static-directory supermunger/ +S: /home/kingdon/testing/cvsroot/supermunger/ +S: E cvs server: Updating supermunger +S: M U supermunger/mungeall.c +S: Created supermunger/ +S: /home/kingdon/testing/cvsroot/supermunger/mungeall.c +S: /mungeall.c/1.1/// +S: u=rw,g=r,o=r +S: 26 +S: int mein () @{ abort (); @} +S: ok +@end example + +The current client implementation would break the connection here and make a +new connection for the next command. However, the protocol allows it +to keep the connection open and continue, which is what we show here. + +After the user modifies the file and instructs the client to check it +back in. The client sends arguments to specify the log message and file +to check in: + +@example +C: Argument -m +C: Argument Well, you see, it took me hours and hours to find this typo and I +C: Argumentx searched and searched and eventually had to ask John for help. +C: Argument mungeall.c +@end example + +It also sends information about the contents of the working directory, +including the new contents of the modified file. Note that the user has +changed into the @file{supermunger} directory before executing this +command; the top level directory is a user-visible concept because the +server should print filenames in @code{M} and @code{E} responses +relative to that directory. +@c We are waving our hands about the order of the requests. "Directory" +@c and "Argument" can be in any order, but this probably isn't specified +@c very well. + +@example +C: Directory . +C: /home/kingdon/testing/cvsroot/supermunger +C: Entry /mungeall.c/1.1/// +C: Modified mungeall.c +C: u=rw,g=r,o=r +C: 26 +C: int main () @{ abort (); @} +@end example + +And finally, the client issues the checkin command (which makes use of +the data just sent): + +@example +C: ci +@end example -Lines beginning with @samp{c>} are sent by the client; lines beginning -with @samp{s>} are sent by the server; lines beginning with @samp{#} are -not part of the actual exchange. +And the server tells the client that the checkin succeeded: @example -c> Root /rel/cvsfiles -# In actual practice the lists of valid responses and requests would -# be longer -c> Valid-responses Updated Checked-in M ok error -c> valid-requests -s> Valid-requests Root co Modified Entry Repository ci Argument Argumentx -s> ok -# cvs co devo/foo -c> Argument devo/foo -c> co -s> Updated /rel/cvsfiles/devo/foo/foo.c -s> /foo.c/1.4/Mon Apr 19 15:36:47 1993 Mon Apr 19 15:36:47 1993// -s> 26 -s> int mein () @{ abort (); @} -s> Updated /rel/cvsfiles/devo/foo/Makefile -s> /Makefile/1.2/Mon Apr 19 15:36:47 1993 Mon Apr 19 15:36:47 1993// -s> 28 -s> foo: foo.c -s> $(CC) -o foo $< -s> ok -# The current implementation would break the connection here and make a -# new connection for the next command. However, the protocol allows it -# to keep the connection open and continue, which is what we show here. -c> Repository /rel/cvsfiles/devo/foo -# foo.c relative to devo/foo just set as Repository. -c> Entry /foo.c/1.4/Mon Apr 19 15:36:47 1993 Mon Apr 19 15:36:47 1993// -c> Entry /Makefile/1.2/Mon Apr 19 15:36:47 1993 Mon Apr 19 15:36:47 1993// -c> Modified foo.c -c> 26 -c> int main () @{ abort (); @} -# cvs ci -m foo.c -c> Argument -m -c> Argument Well, you see, it took me hours and hours to find this typo and I -c> Argumentx searched and searched and eventually had to ask John for help. -c> Argument foo.c -c> ci -s> Checked-in /rel/cvsfiles/devo/foo/foo.c -s> /foo.c/1.5/ Mon Apr 19 15:54:22 CDT 1993// -s> M Checking in foo.c; -s> M /cygint/rel/cvsfiles/devo/foo/foo.c,v <-- foo.c -s> M new revision: 1.5; previous revision: 1.4 -s> M done -s> ok +S: M Checking in mungeall.c; +S: E /home/kingdon/testing/cvsroot/supermunger/mungeall.c,v <-- mungeall.c +S: E new revision: 1.2; previous revision: 1.1 +S: E done +S: Mode u=rw,g=r,o=r +S: Checked-in ./ +S: /home/kingdon/testing/cvsroot/supermunger/mungeall.c +S: /mungeall.c/1.2/// +S: ok @end example @node Requirements @section Required versus optional parts of the protocol -The following are part of every known implementation of the CVS -protocol and it is considered reasonable behavior to completely fail -to work if you are connected with an implementation which attempts to -not support them. Requests: Root, Valid-responses, valid-requests, -Repository, Entry, Modified, Argument, Argumentx, ci, co, update. -Responses: ok, error, Valid-requests, Checked-in, Updated, Merged, -Removed, M, E. - -Failure to support the Directory, UseUnchanged, and Unchanged requests -is deprecated. CVS 1.5 and later have supported these requests and in -the future it will be considered reasonable behavior to completely -fail to work with an implementation which attempts to not support -them. Support for the Repository and Lost requests is deprecated; CVS -clients 1.5 and later will not use them if communicating with a server -which supports Directory and UseUnchanged. +The following are part of every known implementation of the CVS protocol +(except obsolete, pre-1.5, versions of CVS) and it is considered +reasonable behavior to completely fail to work if you are connected with +an implementation which attempts to not support them. Requests: +@code{Root}, @code{Valid-responses}, @code{valid-requests}, +@code{Directory}, @code{Entry}, @code{Modified}, @code{Unchanged}, +@code{Argument}, @code{Argumentx}, @code{ci}, @code{co}, @code{update}. +Responses: @code{ok}, @code{error}, @code{Valid-requests}, +@code{Checked-in}, @code{Updated}, @code{Merged}, @code{Removed}, +@code{M}, @code{E}. + +A server need not implement @code{Repository}, but in order to interoperate +with CVS 1.5 through 1.9 it must claim to implement it (in +@code{Valid-requests}). The client will not actually send the request. + +@node Obsolete +@section Obsolete protocol elements + +This section briefly describes protocol elements which are obsolete. +There is no attempt to document them in full detail. + +There was a @code{Repository} request which was like @code{Directory} +except it only provided @var{repository}, and the local directory was +assumed to be similarly named. + +If the @code{UseUnchanged} request was not sent, there was a @code{Lost} +request which was sent to indicate that a file did not exist in the +working directory, and the meaning of sending @code{Entries} without +@code{Lost} or @code{Modified} was different. All current clients (CVS +1.5 and later) will send @code{UseUnchanged} if it is supported. @bye diff --git a/gnu/usr.bin/cvs/lib/ChangeLog b/gnu/usr.bin/cvs/lib/ChangeLog index 6772cc6aa94..601cfacb310 100644 --- a/gnu/usr.bin/cvs/lib/ChangeLog +++ b/gnu/usr.bin/cvs/lib/ChangeLog @@ -1,3 +1,30 @@ +Wed Jan 8 14:50:47 1997 Jim Kingdon + + * Makefile.in, getopt.h, sighandle.c, system.h: Remove CVSid; we + decided to get rid of these some time ago. + +Thu Jan 2 13:30:56 1997 Jim Kingdon + + * Makefile.in, argmatch.c, fnmatch.c, fnmatch.h, getline.c, + getopt.c, getopt.h, getopt1.c, getwd.c, hostname.c, mkdir.c, + regex.c, regex.h, rename.c, sighandle.c, strdup.c, strerror.c, + stripslash.c, system.h, vasprintf.c, wait.h, xgetwd.c, yesno.c: + Remove "675" paragraph; see ../ChangeLog for rationale. + +Sun Nov 24 13:34:25 1996 Jim Kingdon + + * getdate.y (Convert): Change last acceptable year from 1999 to + 2038. + * getdate.c: Regenerated using byacc 1.9. + +Tue Nov 19 17:11:17 1996 Jim Kingdon + + * Makefile.in (OBJECTS): Remove strippath.o; we don't use + strip_path anymore. + (SOURCES): Remove strippath.c. + * strippath.c: Removed. + * build_lib.com: Remove strippath.c. + Wed Oct 2 10:43:35 1996 Norbert Kiesel * getdate.y: removed CVSid variable diff --git a/gnu/usr.bin/cvs/lib/Makefile.in b/gnu/usr.bin/cvs/lib/Makefile.in index acd1ffb5e31..9645ae9fa87 100644 --- a/gnu/usr.bin/cvs/lib/Makefile.in +++ b/gnu/usr.bin/cvs/lib/Makefile.in @@ -12,11 +12,6 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -# $CVSid: @(#)Makefile.in 1.21 94/09/24 $ srcdir = @srcdir@ top_srcdir = @top_srcdir@ cvs_srcdir = @top_srcdir@/src @@ -48,7 +43,6 @@ SOURCES = \ strdup.c \ strstr.c \ strerror.c \ - strippath.c \ stripslash.c \ strtoul.c \ valloc.c \ @@ -68,7 +62,6 @@ OBJECTS = \ md5.o \ savecwd.o \ sighandle.o \ - strippath.o \ stripslash.o \ xgetwd.o \ yesno.o \ diff --git a/gnu/usr.bin/cvs/lib/argmatch.c b/gnu/usr.bin/cvs/lib/argmatch.c index cc360ee1d94..90b44c6e0bd 100644 --- a/gnu/usr.bin/cvs/lib/argmatch.c +++ b/gnu/usr.bin/cvs/lib/argmatch.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* Written by David MacKenzie */ diff --git a/gnu/usr.bin/cvs/lib/build_lib.com b/gnu/usr.bin/cvs/lib/build_lib.com index 0b808e59d9b..72c71ba38c4 100644 --- a/gnu/usr.bin/cvs/lib/build_lib.com +++ b/gnu/usr.bin/cvs/lib/build_lib.com @@ -9,7 +9,6 @@ $ CC md5.c $ CC regex.c $ CC savecwd.c $ CC sighandle.c -$ CC strippath.c $ CC stripslash.c $ CC valloc.c $ CC xgetwd.c diff --git a/gnu/usr.bin/cvs/lib/fnmatch.c b/gnu/usr.bin/cvs/lib/fnmatch.c index 9cb847e8b1d..cf0f1242916 100644 --- a/gnu/usr.bin/cvs/lib/fnmatch.c +++ b/gnu/usr.bin/cvs/lib/fnmatch.c @@ -9,12 +9,7 @@ License, or (at your option) any later version. The GNU C Library 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +Library General Public License for more details. */ /* Modified slightly by Brian Berliner and Jim Blandy for CVS use */ diff --git a/gnu/usr.bin/cvs/lib/fnmatch.h b/gnu/usr.bin/cvs/lib/fnmatch.h index a1e4f870218..b15734721a4 100644 --- a/gnu/usr.bin/cvs/lib/fnmatch.h +++ b/gnu/usr.bin/cvs/lib/fnmatch.h @@ -9,12 +9,7 @@ License, or (at your option) any later version. The GNU C Library 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +Library General Public License for more details. */ #ifndef _FNMATCH_H diff --git a/gnu/usr.bin/cvs/lib/getline.c b/gnu/usr.bin/cvs/lib/getline.c index a7ab97b324e..5f4fba640d8 100644 --- a/gnu/usr.bin/cvs/lib/getline.c +++ b/gnu/usr.bin/cvs/lib/getline.c @@ -10,11 +10,7 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ +General Public License for more details. */ /* Written by Jan Brittenson, bson@gnu.ai.mit.edu. */ diff --git a/gnu/usr.bin/cvs/lib/getopt.c b/gnu/usr.bin/cvs/lib/getopt.c index 137e66be187..b5caccd5bc1 100644 --- a/gnu/usr.bin/cvs/lib/getopt.c +++ b/gnu/usr.bin/cvs/lib/getopt.c @@ -14,11 +14,7 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ diff --git a/gnu/usr.bin/cvs/lib/getopt.h b/gnu/usr.bin/cvs/lib/getopt.h index f644aa15f46..c872f414205 100644 --- a/gnu/usr.bin/cvs/lib/getopt.h +++ b/gnu/usr.bin/cvs/lib/getopt.h @@ -9,13 +9,7 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* $CVSid: @(#)getopt.h 1.7 94/09/21 $ */ + GNU General Public License for more details. */ #ifndef _GETOPT_H #define _GETOPT_H 1 diff --git a/gnu/usr.bin/cvs/lib/getopt1.c b/gnu/usr.bin/cvs/lib/getopt1.c index f784b5757c5..a4f19762e38 100644 --- a/gnu/usr.bin/cvs/lib/getopt1.c +++ b/gnu/usr.bin/cvs/lib/getopt1.c @@ -10,11 +10,7 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifdef HAVE_CONFIG_H #if defined (emacs) || defined (CONFIG_BROKETS) diff --git a/gnu/usr.bin/cvs/lib/getwd.c b/gnu/usr.bin/cvs/lib/getwd.c index 573a7889244..94df6e08e7c 100644 --- a/gnu/usr.bin/cvs/lib/getwd.c +++ b/gnu/usr.bin/cvs/lib/getwd.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* Some systems which include both getwd() and getcwd() have an implementation of getwd() which is much faster than getcwd(). As a result, we use the diff --git a/gnu/usr.bin/cvs/lib/hostname.c b/gnu/usr.bin/cvs/lib/hostname.c index 34be15e8b61..7fde5344a8e 100644 --- a/gnu/usr.bin/cvs/lib/hostname.c +++ b/gnu/usr.bin/cvs/lib/hostname.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gnu/usr.bin/cvs/lib/mkdir.c b/gnu/usr.bin/cvs/lib/mkdir.c index 89ed4b6c6f0..babe4acc2ec 100644 --- a/gnu/usr.bin/cvs/lib/mkdir.c +++ b/gnu/usr.bin/cvs/lib/mkdir.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gnu/usr.bin/cvs/lib/regex.c b/gnu/usr.bin/cvs/lib/regex.c index 2f590d64b90..f785f623802 100644 --- a/gnu/usr.bin/cvs/lib/regex.c +++ b/gnu/usr.bin/cvs/lib/regex.c @@ -13,11 +13,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* Trying to define this in the makefile would get hairy, unless we can more gracefully do it for NT, OS/2, unix, etc. */ diff --git a/gnu/usr.bin/cvs/lib/regex.h b/gnu/usr.bin/cvs/lib/regex.h index 408dd210348..20cb5f21dd3 100644 --- a/gnu/usr.bin/cvs/lib/regex.h +++ b/gnu/usr.bin/cvs/lib/regex.h @@ -11,11 +11,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifndef __REGEXP_LIBRARY_H__ #define __REGEXP_LIBRARY_H__ diff --git a/gnu/usr.bin/cvs/lib/rename.c b/gnu/usr.bin/cvs/lib/rename.c index ce2805b3a04..ae3d36ebb43 100644 --- a/gnu/usr.bin/cvs/lib/rename.c +++ b/gnu/usr.bin/cvs/lib/rename.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gnu/usr.bin/cvs/lib/sighandle.c b/gnu/usr.bin/cvs/lib/sighandle.c index ace7db33d24..b229ea603a0 100644 --- a/gnu/usr.bin/cvs/lib/sighandle.c +++ b/gnu/usr.bin/cvs/lib/sighandle.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* Written by Paul Sander, HaL Computer Systems, Inc. Brian Berliner added POSIX support */ @@ -30,8 +26,6 @@ * must not themselves make calls to the signal handling * facilities. * - * $CVSid: @(#)sighandle.c 1.13 94/10/07 $ - * *************************************************************************/ #ifdef HAVE_CONFIG_H diff --git a/gnu/usr.bin/cvs/lib/strdup.c b/gnu/usr.bin/cvs/lib/strdup.c index 46fc8a0d6db..c81969da00d 100644 --- a/gnu/usr.bin/cvs/lib/strdup.c +++ b/gnu/usr.bin/cvs/lib/strdup.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gnu/usr.bin/cvs/lib/strerror.c b/gnu/usr.bin/cvs/lib/strerror.c index b0bec1317a9..9e799b67d67 100644 --- a/gnu/usr.bin/cvs/lib/strerror.c +++ b/gnu/usr.bin/cvs/lib/strerror.c @@ -11,12 +11,7 @@ version 2 of the License, or (at your option) any later version. Libiberty 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with libiberty; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +Library General Public License for more details. */ #include "config.h" diff --git a/gnu/usr.bin/cvs/lib/stripslash.c b/gnu/usr.bin/cvs/lib/stripslash.c index 265950e80f3..ece8ec8162f 100644 --- a/gnu/usr.bin/cvs/lib/stripslash.c +++ b/gnu/usr.bin/cvs/lib/stripslash.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gnu/usr.bin/cvs/lib/system.h b/gnu/usr.bin/cvs/lib/system.h index cff72cdc55c..05025fe5655 100644 --- a/gnu/usr.bin/cvs/lib/system.h +++ b/gnu/usr.bin/cvs/lib/system.h @@ -9,13 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -/* $CVSid: @(#)system.h 1.18 94/09/25 $ */ + GNU General Public License for more details. */ #include #include diff --git a/gnu/usr.bin/cvs/lib/vasprintf.c b/gnu/usr.bin/cvs/lib/vasprintf.c index 6c0f3beea29..35f44b77b40 100644 --- a/gnu/usr.bin/cvs/lib/vasprintf.c +++ b/gnu/usr.bin/cvs/lib/vasprintf.c @@ -11,12 +11,7 @@ version 2 of the License, or (at your option) any later version. Libiberty 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 -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with libiberty; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 675 Mass Ave, -Cambridge, MA 02139, USA. */ +Library General Public License for more details. */ #include #include diff --git a/gnu/usr.bin/cvs/lib/wait.h b/gnu/usr.bin/cvs/lib/wait.h index db60434144a..2dbc6d9a248 100644 --- a/gnu/usr.bin/cvs/lib/wait.h +++ b/gnu/usr.bin/cvs/lib/wait.h @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifdef HAVE_SYS_WAIT_H #include /* For pid_t. */ diff --git a/gnu/usr.bin/cvs/lib/xgetwd.c b/gnu/usr.bin/cvs/lib/xgetwd.c index 8fe4ec18c2e..e2a3baa5a69 100644 --- a/gnu/usr.bin/cvs/lib/xgetwd.c +++ b/gnu/usr.bin/cvs/lib/xgetwd.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* Derived from xgetcwd.c in e.g. the GNU sh-utils. */ diff --git a/gnu/usr.bin/cvs/lib/yesno.c b/gnu/usr.bin/cvs/lib/yesno.c index 86b0798086f..1e8793882da 100644 --- a/gnu/usr.bin/cvs/lib/yesno.c +++ b/gnu/usr.bin/cvs/lib/yesno.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/gnu/usr.bin/cvs/macintosh/ChangeLog b/gnu/usr.bin/cvs/macintosh/ChangeLog index 22c25d6cfdf..0bffb5687a1 100644 --- a/gnu/usr.bin/cvs/macintosh/ChangeLog +++ b/gnu/usr.bin/cvs/macintosh/ChangeLog @@ -1,3 +1,25 @@ +Thu Jan 2 13:42:14 1997 Jim Kingdon + + * filesubr.c, pwd.c: Remove "675" paragraph; + see ../ChangeLog for rationale. + +Wed Jan 1 22:49:49 1997 Jim Kingdon + + * options.h: Reword comment for TMPDIR_DFLT to make it clear that + this isn't specific to the pserver server. + +Mon Oct 28 09:22:09 1996 Jim Kingdon + + * mac_init.c (macos_error_cleanup): Removed; SYSTEM_CLEANUP (aka + MacOS_Cleanup) now gets called in the cases in question. + (MacOS_Initialize): Don't call error_set_cleanup. + * README.MacCVS: Adjust description of problem which should be + fixed by above change. + +Tue Oct 8 12:37:25 1996 Ian Lance Taylor + + * options.h (HAD_RCS4): Remove; no longer used. + Mon Sept 30 13:17:07 1996 Mike Ladwig * ae_if.c (DoScript): Fixed bug cutting off the last character of diff --git a/gnu/usr.bin/cvs/macintosh/Makefile b/gnu/usr.bin/cvs/macintosh/Makefile index 3b0b3ab6ed4..bcb4692c7e2 100644 --- a/gnu/usr.bin/cvs/macintosh/Makefile +++ b/gnu/usr.bin/cvs/macintosh/Makefile @@ -3,13 +3,14 @@ #### this makefile. However, we need this file in order for 'make #### dist' to work properly on Unix machines. -srcdir = . -top_srcdir = .. -cvs_srcdir = ../src +srcdir = ../../work/ccvs/macintosh +top_srcdir = ../../work/ccvs +cvs_srcdir = ../../work/ccvs/src +VPATH = ../../work/ccvs/macintosh SHELL = /bin/sh -prefix = /usr/local +prefix = /usr exec_prefix = ${prefix} diff --git a/gnu/usr.bin/cvs/macintosh/README.MacCVS b/gnu/usr.bin/cvs/macintosh/README.MacCVS index c0d7327dddb..a652673aaac 100644 --- a/gnu/usr.bin/cvs/macintosh/README.MacCVS +++ b/gnu/usr.bin/cvs/macintosh/README.MacCVS @@ -86,10 +86,15 @@ you have a different arrangement, you will need to modify the access paths in You will need CodeWarrier 9 and GUSI 1.7.2. I have a report of a successful build under MPW, but don't support it directly. -There are problems with the CodeWarrier Plum-Hall ANSI libraries and CW9 -compilers that I have worked around. Certain failure and exit modes (most nobably, -exiting after help and usage commands) trigger the problem, which manifests itself as -the DONE flag not being set in result AppleEvents, and loss of the last data packet. Metrowerks has reproduced the problems, and hopefully will have a fix soon. +There are problems with the CodeWarrier Plum-Hall ANSI libraries and +CW9 compilers that I have worked around. Certain failure and exit +modes (most nobably, exiting after help and usage commands) trigger +the problem, which manifests itself as the DONE flag not being set in +result AppleEvents, and loss of the last data packet. Metrowerks has +reproduced the problems, and hopefully will have a fix soon. (Note: +this should be fixed, without needing metrowerks changes, by +SYSTEM_CLEANUP changes of October 28; awaiting verification that it +really is fixed). 4. Feedback diff --git a/gnu/usr.bin/cvs/macintosh/filesubr.c b/gnu/usr.bin/cvs/macintosh/filesubr.c index 5ec82998b69..c65fdfe3b1e 100644 --- a/gnu/usr.bin/cvs/macintosh/filesubr.c +++ b/gnu/usr.bin/cvs/macintosh/filesubr.c @@ -11,11 +11,7 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* These functions were moved out of subr.c because they need different definitions under operating systems (like, say, Windows NT) with different diff --git a/gnu/usr.bin/cvs/macintosh/mac_init.c b/gnu/usr.bin/cvs/macintosh/mac_init.c index 69f355b6e52..f2574198c81 100644 --- a/gnu/usr.bin/cvs/macintosh/mac_init.c +++ b/gnu/usr.bin/cvs/macintosh/mac_init.c @@ -22,13 +22,6 @@ extern int EnvC; extern int argc; extern char **argv; -void -macos_error_cleanup( void ) -{ - Lock_Cleanup(); - RemoveConsole(); // FIXME - Ugly, but necessary until MW fixes _exit -} - void InitializeMacToolbox( void ) { @@ -59,8 +52,6 @@ MacOS_Initialize( int *argc, char ***argv ) #else *argc = ccommand(argv); #endif - - error_set_cleanup (macos_error_cleanup); } void diff --git a/gnu/usr.bin/cvs/macintosh/options.h b/gnu/usr.bin/cvs/macintosh/options.h index d7b5b6f12d9..a56678a99cd 100644 --- a/gnu/usr.bin/cvs/macintosh/options.h +++ b/gnu/usr.bin/cvs/macintosh/options.h @@ -27,20 +27,6 @@ #define HAVE_RCS5 #endif -/* - * If, before installing this version of CVS, you were running RCS V4 AND you - * are installing this CVS and RCS V5 and GNU diff 1.15 all at the same time, - * you should turn on the following define. It only exists to try to do - * reasonable things with your existing checked out files when you upgrade to - * RCS V5, since the keyword expansion formats have changed with RCS V5. - * - * If you already have been running with RCS5, or haven't been running with CVS - * yet at all, or are sticking with RCS V4 for now, leave the commented out. - */ -#ifndef HAD_RCS4 -/* #define HAD_RCS4 */ -#endif - /* * For portability and heterogeneity reasons, CVS is shipped by default using * my own text-file version of the ndbm database library in the src/myndbm.c @@ -104,15 +90,12 @@ #define RCSBIN_DFLT "" #endif -/* - * The password-authenticating server creates a temporary checkout of - * the affected files. The variable TMPDIR_DFLT (or even better, the - * command-line option "-T" in the line for CVS in /etc/inetd.conf) - * can be used to specify the used directory. This directory will - * also be used for other temporary files. - * - * I have no idea what the right default for this is on the Mac. - */ +/* Directory used for storing temporary files, if not overridden by + environment variables or the -T global option. There should be little + need to change this (-T is a better mechanism if you need to use a + different directory for temporary files). + + I have no idea what the right default for this is on the Mac. */ #ifndef TMPDIR_DFLT #define TMPDIR_DFLT "/tmp" #endif diff --git a/gnu/usr.bin/cvs/macintosh/pwd.c b/gnu/usr.bin/cvs/macintosh/pwd.c index 40d4f69c98b..9f9f79e60ed 100644 --- a/gnu/usr.bin/cvs/macintosh/pwd.c +++ b/gnu/usr.bin/cvs/macintosh/pwd.c @@ -11,11 +11,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Header: /home/cvs/src/gnu/usr.bin/cvs/macintosh/Attic/pwd.c,v 1.1.1.2 1996/10/18 03:37:01 tholo Exp $ + $Header: /home/cvs/src/gnu/usr.bin/cvs/macintosh/Attic/pwd.c,v 1.1.1.3 1997/02/21 06:38:57 tholo Exp $ */ /* This 'implementation' is conjectured from the use of this functions in diff --git a/gnu/usr.bin/cvs/man/ChangeLog b/gnu/usr.bin/cvs/man/ChangeLog index 35feb355390..93580e506e8 100644 --- a/gnu/usr.bin/cvs/man/ChangeLog +++ b/gnu/usr.bin/cvs/man/ChangeLog @@ -1,3 +1,14 @@ +Thu Jan 2 13:30:56 1997 Jim Kingdon + + * Makefile.in, cvsbug.8: Remove "675" paragraph; + see ../ChangeLog for rationale. + +Sat Nov 30 14:49:32 1996 Jim Kingdon + + * cvs.1: Add note at beginning about how cvs.texinfo is more + complete than this document. Without some such indication, users + have no way of knowing which document to consult. + Tue Oct 1 14:01:28 1996 Jim Kingdon * cvs.1: Revert all changes by Greg Woods since CVS 1.8.86. They diff --git a/gnu/usr.bin/cvs/man/Makefile.in b/gnu/usr.bin/cvs/man/Makefile.in index 894e4d78ca0..79198fff027 100644 --- a/gnu/usr.bin/cvs/man/Makefile.in +++ b/gnu/usr.bin/cvs/man/Makefile.in @@ -12,10 +12,6 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - SHELL = /bin/sh srcdir = @srcdir@ diff --git a/gnu/usr.bin/cvs/man/cvs.1 b/gnu/usr.bin/cvs/man/cvs.1 index c56ad7f4c98..6400cf522b3 100644 --- a/gnu/usr.bin/cvs/man/cvs.1 +++ b/gnu/usr.bin/cvs/man/cvs.1 @@ -2,7 +2,7 @@ .ds Rv \\$3 .ds Dt \\$4 .. -.Id $Id: cvs.1,v 1.1.1.5 1996/10/18 03:36:04 tholo Exp $ +.Id $Id: cvs.1,v 1.1.1.6 1997/02/21 06:38:03 tholo Exp $ .TH CVS 1 "\*(Dt" .\" Full space in nroff; half space in troff .de SP @@ -24,6 +24,11 @@ cvs \- Concurrent Versions System ] [ .I command_args ] +.SH "NOTE" +This manpage is a summary of some of the features of +.B cvs +but for more in-depth documentation, consult cvs.texinfo (as +described in the SEE ALSO section of this manpage). .SH "DESCRIPTION" .IX "revision control system" "\fLcvs\fR" .IX cvs "" "\fLcvs\fP \- concurrent versions system" diff --git a/gnu/usr.bin/cvs/man/cvsbug.8 b/gnu/usr.bin/cvs/man/cvsbug.8 index 23e17957781..63574d42875 100644 --- a/gnu/usr.bin/cvs/man/cvsbug.8 +++ b/gnu/usr.bin/cvs/man/cvsbug.8 @@ -16,10 +16,6 @@ .\" 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 Library General Public -.\" License along with this program; if not, write to the Free -.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA -.\" .\" --------------------------------------------------------------------------- .nh .TH CVSBUG 1 xVERSIONx "February 1993" diff --git a/gnu/usr.bin/cvs/os2/ChangeLog b/gnu/usr.bin/cvs/os2/ChangeLog index db022dae2da..38627ef0fe1 100644 --- a/gnu/usr.bin/cvs/os2/ChangeLog +++ b/gnu/usr.bin/cvs/os2/ChangeLog @@ -1,3 +1,93 @@ +Wed Jan 15 23:56:12 1997 Jim Kingdon + + * watcom.mak (OS2_OBJECTS): Remove strippath. + + * Makefile.in (DISTFILES): Add os2inc.h and watcom.mak. + +Thu Jan 2 13:30:56 1997 Jim Kingdon + + * filesubr.c, pwd.c, pwd.h, run.c, stripslash.c: + Remove "675" paragraph; see ../ChangeLog for rationale. + +Wed Jan 1 22:50:31 1997 Jim Kingdon + + * options.h: Reword comment for TMPDIR_DFLT to make it clear that + this isn't specific to the pserver server. + +Wed Dec 18 10:51:38 1996 Jim Kingdon + + * Makefile.in (CFLAGS): Specify -Gd- not -Gd+. The documentation + says this causes a static link, although it hasn't yet been + verified whether this option is sufficient to make the binary work + on a system without the compiler's DLL. + +Fri Dec 6 11:00:49 1996 Jim Kingdon + + * os2inc.h, watcom.mak: Add GPL notice. + +1996-11-24 Ullrich von Bassewitz + + Changes for Watcom C: + * README: Describe watcom port. + * config.h: Include stdio.h and errno.h. + * config.h: If EACCES is not defined, define it to EACCESS. + * filesubr.c: Use EACCES not EACCESS. + * config.h [__WATCOMC__]: Define _setmode and _cwait. + Don't define HAVE_DIRENT_H. Don't declare getpid. Don't + define NEED_DECOY_PERMISSIONS. Don't define R_OK and friends. + * os2inc.h: New file; includes os2.h but protected against + multiple inclusion. + * config.h: Include os2inc.h before defining sleep. + * filesubr.c, getpass.c, popen.c, run.c: Include os2inc.h rather than + trying to go through the right contortions to include os2.h + ourselves. + * popen.c (popen) [__WATCOMC__]: Use _hdopen together with fdopen. + (popenRW): Change pid from PID to int. + * tcpip.h [__WATCOMC__]: Work around errno value conflict + between the TCP/IP header and errno.h. + * watcom.mak: New file. + +Sat Nov 23 18:36:11 1996 Jim Kingdon + + * README: Try to clarify status vis-a-vis client vs. local. + +Tue Nov 19 17:21:52 1996 Jim Kingdon + + * Makefile.in (OS2_SOURCES): Remove strippath.c + (OS2_OBJECTS): Remove strippath.obj. + * strippath.c: Removed. + +Fri Nov 8 14:28:19 1996 Ullrich von Bassewitz + + * filesubr.c (expand_wild): Check for ERROR_NO_MORE_FILES from + DosFindFirst instead of ERROR_FILE_NOT_FOUND; that is what the + function actually returns. Cope with the fact that DosFindFirst + and DosFindNext return only the name of the file itself, not any + directory names. + +Fri Nov 08 11:46:50 1996 Jim Kingdon + + IBM ICC (OS/2) lint: + * filesubr.c: Cast from const char * to char * before passing to + various system functions. + (xchmod): Print error message instead of trying to return ENOENT. + (unlink_file): Only call xchmod if the file exists. + + * Makefile.in (CFLAGS): Don't specify -Wpro; there is no way + that we could prototype getopt, for example. + Don't specify -Wuse. The EDC0805 warning ("Automatic + variable line_allocated is set but not referenced.") warns + about unavoidable constructs like line_allocated in + client.c (send_file_names). + +Sat Oct 26 16:21:26 1996 Jim Blandy + + * config.h (HAVE_TZSET): Add a #definition for this. + +Tue Oct 8 12:37:35 1996 Ian Lance Taylor + + * options.h (HAD_RCS4): Remove; no longer used. + Thu Sep 26 14:15:55 1996 Jim Kingdon * filesubr.c (mkdir_if_needed): mkdir only takes one diff --git a/gnu/usr.bin/cvs/os2/Makefile.in b/gnu/usr.bin/cvs/os2/Makefile.in index 1c2268b67a7..19723205b35 100644 --- a/gnu/usr.bin/cvs/os2/Makefile.in +++ b/gnu/usr.bin/cvs/os2/Makefile.in @@ -34,7 +34,7 @@ LIB = s:${SL}ibmcpp${SL}lib;s:${SL}toolkt21${SL}os2lib; CINC = -Is:${SL}ibmcpp${SL}include -Is:${SL}toolkt21${SL}c${SL}os2h # This says we are building an object file, not a full executable. OBJ_CFLAGS = -C+ -CFLAGS = -W3 -Wpro+rea+tru+use+ -Ti+ -Ss+ -Gd+ -Gm+ -G4 -Q+ -Sm ${CINC} \ +CFLAGS = -W3 -Wrea+tru+ -Ti+ -Ss+ -Gd- -Gm+ -G4 -Q+ -Sm ${CINC} \ -I${srcdir} -I${lib_dir} -I${cvs_srcdir} -I${zlib_dir} \ -DIBM_CPP -DHAVE_CONFIG_H \ -DTCPIP_IBM -Is:${SL}ibmtcpip${SL}include @@ -84,7 +84,6 @@ OS2_SOURCES = \ ${srcdir}${SL}waitpid.c \ ${srcdir}${SL}popen.c \ ${srcdir}${SL}porttcp.c \ - ${srcdir}${SL}strippath.c \ ${srcdir}${SL}getdate.c \ ${srcdir}${SL}getpass.c @@ -171,7 +170,6 @@ OS2_OBJECTS = \ ${srcdir}${SL}waitpid.obj \ ${srcdir}${SL}popen.obj \ ${srcdir}${SL}porttcp.obj \ - ${srcdir}${SL}strippath.obj \ ${srcdir}${SL}getdate.obj \ ${srcdir}${SL}getpass.obj @@ -267,7 +265,8 @@ OBJECTS = ${COMMON_OBJECTS} ${LIB_OBJECTS} ${OS2_OBJECTS} ${ZLIB_OBJECTS} DISTFILES = ${OS2_HEADERS} ${OS2_SOURCES} \ ${srcdir}${SL}README ${srcdir}${SL}ChangeLog \ ${srcdir}${SL}Makefile.in ${srcdir}${SL}.cvsignore \ - ${srcdir}${SL}test-makefile Makefile + ${srcdir}${SL}test-makefile Makefile ${srcdir}/os2inc.h \ + ${srcdir}/watcom.mak all: diff --git a/gnu/usr.bin/cvs/os2/README b/gnu/usr.bin/cvs/os2/README index f46fdccafb3..45c769d27e4 100644 --- a/gnu/usr.bin/cvs/os2/README +++ b/gnu/usr.bin/cvs/os2/README @@ -1,7 +1,9 @@ - This port requires IBM C/C++ and the IBM TCPIP library. -You'll need to edit the makefile to reflect your system's paths -(unless you're our customer for this port, in which case the paths -are correct because we did the port on your machine. :-) ). + This port requires IBM C/C++ and the IBM TCPIP library. It +has probably only been tested with the CVS client. Local CVS might or +might not work, and the server would definitely not work. You'll need +to edit the makefile to reflect your system's paths (unless you're our +customer for this port, in which case the paths are correct because we +did the port on your machine. :-) ). That should be all -- edit the makefile, do "make" and get os2\cvs.exe. Assuming you have edited the `install_dir' variable in @@ -17,5 +19,27 @@ such as emacs will generally do this). You will get warnings during the compilation; ignore them. Report bugs to . --Karl - + + +Some notes on the watcom port: +------------------------------ + +You need the OS/2 TCPIP developers toolkit to translate the sources. +This is not as bad as it sounds, since the toolkit is on your OS/2 +CD. + +To compile the sources, enter + + wmake -f watcom.mak + +at the OS/2 prompt. + +The executable created by the watcom compiler does *not* need a runtime +DLL. + + + Uz (uz@musoftware.com) + +Credits: + +Original port in 1995 by Karl Fogel . diff --git a/gnu/usr.bin/cvs/os2/config.h b/gnu/usr.bin/cvs/os2/config.h index 37843623c2a..08c0388ec58 100644 --- a/gnu/usr.bin/cvs/os2/config.h +++ b/gnu/usr.bin/cvs/os2/config.h @@ -8,8 +8,33 @@ */ +/* We need some system header files here since we evaluate values from + * these files below. + */ +#include +#include + + + +#ifndef __STDC__ /* You bet! */ #define __STDC__ 1 +#endif + +/* The IBM compiler uses the (non-standard) error code EACCESS instead of + EACCES (note: one 'S'). Define EACCESS to be EACCES and use the standard + name in the code. */ +#ifndef EACCES +#define EACCES EACCESS +#endif + +/* Handle some other name differences between the IBM and the Watcom + * compiler. + */ +#ifdef __WATCOMC__ +#define _setmode setmode +#define _cwait cwait +#endif /* Define if on AIX 3. System headers sometimes define this. @@ -174,6 +199,9 @@ this function in the code anyway, hmm. */ #undef HAVE_TIMEZONE +/* Define if you have the tzset function. */ +#define HAVE_TZSET 1 + /* Define if you have the vfork function. */ #undef HAVE_VFORK @@ -185,7 +213,11 @@ /* Define if you have the header file. */ /* We have our own dirent.h and dirent.c. */ +#ifdef __WATCOMC__ +#undef HAVE_DIRENT_H +#else #define HAVE_DIRENT_H 1 +#endif /* Define if you have the header file. */ #define HAVE_ERRNO_H 1 @@ -261,7 +293,9 @@ extern int os2_mkdir (const char *PATH, int MODE); extern int readlink (char *path, char *buf, int buf_size); /* This is just a call to GetCurrentProcessID. */ +#ifndef __WATCOMC__ extern pid_t getpid (void); +#endif /* We definitely have prototypes. */ #define USE_PROTOTYPES 1 @@ -315,17 +349,26 @@ extern void convert_file (char *INFILE, int INFLAGS, according to the C library manual pages. So we'll make decoys. (This was partly introduced for an obsolete reason, now taken care of by CHMOD_BROKEN, but I haven't carefully looked at every case - (in particular mode_to_string), so it might still be needed). */ + (in particular mode_to_string), so it might still be needed). + We do not need that for the watcom compiler since watcom already + all those permission bits defined. It would probably be better to + include the necessary system header files in system.h, and then make + each permission define only if it is not already defined. +*/ +#ifndef __WATCOMC__ #define NEED_DECOY_PERMISSIONS 1 /* see system.h */ +#endif -/* For the access() function, for which OS/2 has no pre-defined +/* For the access() function, for which IBM OS/2 compiler has no pre-defined mnemonic masks. */ +#ifndef __WATCOMC__ #define R_OK 04 #define W_OK 02 #define F_OK 00 #define X_OK R_OK /* I think this is right for OS/2. */ +#endif /* For getpid() */ #include @@ -344,7 +387,7 @@ extern void init_sockets(); /* * This tells the client that it must use send()/recv() to talk to the * server if it is connected to the server via a socket. Sigh. - * Windows 95 also cannot convert sockets to file descriptors, + * Windows 95 and VMS cannot convert sockets to file descriptors either, * apparently. */ #define NO_SOCKET_TO_FD 1 @@ -357,8 +400,10 @@ extern void init_sockets(); #define CHMOD_BROKEN 1 /* Rule Number 1 of OS/2 Programming: If the function you're looking - for doesn't exist, try putting "Dos" in front of it. */ + for doesn't exist, try putting "Dos" in front of it. + Do not forget to include the os2 header file if we use DosSleep. */ #ifndef sleep +#include "os2inc.h" #define sleep(x) DosSleep(((long)(x))*1000L) #endif /* sleep */ diff --git a/gnu/usr.bin/cvs/os2/filesubr.c b/gnu/usr.bin/cvs/os2/filesubr.c index 6236a7415ab..f2aa88ee4b6 100644 --- a/gnu/usr.bin/cvs/os2/filesubr.c +++ b/gnu/usr.bin/cvs/os2/filesubr.c @@ -11,21 +11,15 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* These functions were moved out of subr.c because they need different definitions under operating systems (like, say, Windows NT) with different file system semantics. */ #include -#define INCL_DOSFILEMGR /* File Manager values */ -#define INCL_DOSERRORS -#include +#include "os2inc.h" #include "cvs.h" static int deep_remove_dir PROTO((const char *path)); @@ -98,7 +92,7 @@ copy_file (from, to) memset ((char *) &t, 0, sizeof (t)); t.actime = sb.st_atime; t.modtime = sb.st_mtime; - (void) utime (to, &t); + (void) utime ((char *)to, &t); } /* @@ -227,7 +221,7 @@ make_directory (name) if (stat (name, &buf) == 0 && (!S_ISDIR (buf.st_mode))) error (0, 0, "%s already exists but is not a directory", name); - if (!noexec && mkdir (name) < 0) + if (!noexec && mkdir ((char *)name) < 0) error (1, errno, "cannot make directory %s", name); } @@ -244,7 +238,7 @@ make_directories (name) if (noexec) return; - if (mkdir (name) == 0 || errno == EACCESS) + if (mkdir ((char *)name) == 0 || errno == EACCES) return; if (! existence_error (errno)) { @@ -258,7 +252,7 @@ make_directories (name) *cp++ = '/'; if (*cp == '\0') return; - (void) mkdir (name); + (void) mkdir ((char *)name); } /* Create directory NAME if it does not already exist; fatal error for @@ -275,19 +269,19 @@ mkdir_if_needed (name) "The file already exists", - and the error string for EACCESS is: + and the error string for EACCES is: "The file or directory specified is read-only". - Nonetheless, mkdir() will set EACCESS if the + Nonetheless, mkdir() will set EACCES if the directory *exists*, according both to the documentation and its actual behavior. I'm sure that this made sense, to someone, somewhere, sometime. Just not me, here, now. */ if (errno != EEXIST -#ifdef EACCESS - && errno != EACCESS +#ifdef EACCES + && errno != EACCES #endif ) error (1, errno, "cannot make directory %s", name); @@ -313,7 +307,11 @@ xchmod (fname, writable) char *q; if (!isfile (fname)) - return ENOENT; + { + error (0, 0, "cannot change mode of file %s; it does not exist", + fname); + return; + } attrib_cmd = "attrib "; /* No, really? */ @@ -383,7 +381,8 @@ unlink_file (f) * name is closer to our interface, what the heck. Also, we know * unlink()'s error code when trying to remove a directory. */ - xchmod (f, 1); + if (isfile (f)) + xchmod ((char *)f, 1); return (unlink (f)); } @@ -408,9 +407,9 @@ unlink_file_dir (f) if (unlink_file (f) != 0) { - /* under OS/2, unlink returns EACCESS if the path + /* under OS/2, unlink returns EACCES if the path is a directory. */ - if (errno == EACCESS) + if (errno == EACCES) return deep_remove_dir (f); else /* The file wasn't a directory and some other @@ -434,9 +433,9 @@ deep_remove_dir (path) struct dirent *dp; char buf[PATH_MAX]; - if ( rmdir (path) != 0 && errno == EACCESS ) + if (rmdir ((char *)path) != 0 && errno == EACCES) { - if ((dirp = opendir (path)) == NULL) + if ((dirp = opendir ((char *)path)) == NULL) /* If unable to open the directory return * an error */ @@ -471,7 +470,7 @@ deep_remove_dir (path) } } closedir (dirp); - return rmdir (path); + return rmdir ((char *)path); } /* Was able to remove the directory return 0 */ return 0; @@ -811,18 +810,40 @@ expand_wild (argc, argv, pargc, pargv) ULONG FindCount = 1; APIRET rc; /* Return code */ #define ALL_FILES (FILE_ARCHIVED|FILE_DIRECTORY|FILE_SYSTEM|FILE_HIDDEN|FILE_READONLY) - - rc = DosFindFirst(argv[i], /* File pattern */ + + /* DosFindFirst, called with a string like 'dir/file' will return + * *only* the file part. So what we have to do here is to save the + * directory part, and add it later to the returned filename. + */ + + /* Path + name */ + char *PathName = argv [i]; + + /* Path only, including slash */ + char *Path = NULL; + + /* Name without path */ + char *Name = last_component (PathName); + + if (Name > PathName) + { + /* We have a path component, save it */ + Path = xmalloc (Name - PathName + 1); + memcpy (Path, PathName, Name - PathName); + Path [Name - PathName] = '\0'; + } + + rc = DosFindFirst(PathName, /* File pattern */ &FindHandle, /* Directory search handle */ ALL_FILES, /* Search attribute */ (PVOID) &FindBuffer, /* Result buffer */ sizeof(FindBuffer), /* Result buffer length */ &FindCount, /* Number of entries to find */ FIL_STANDARD); /* Return level 1 file info */ - + if (rc != 0) { - if (rc == ERROR_FILE_NOT_FOUND) + if (rc == ERROR_NO_MORE_FILES) { /* No match. The file specified didn't contain a wildcard (in which case we clearly should return it unchanged), or it contained a wildcard which @@ -837,7 +858,7 @@ expand_wild (argc, argv, pargc, pargv) } else { - error (1, rc, "cannot find %s", argv[i]); + error (1, rc, "cannot find %s", PathName); } } else @@ -853,18 +874,32 @@ expand_wild (argc, argv, pargc, pargv) (strcmp(FindBuffer.achName, "..") != 0) && ((argv[i][0] == '.') || (FindBuffer.achName[0] != '.'))) { - new_argv [new_argc++] = xstrdup (FindBuffer.achName); + /* Be sure to add the path if needed */ + char *NewArg; + if (Path) + { + unsigned Len = + strlen (Path) + strlen (FindBuffer.achName) + 1; + NewArg = xmalloc (Len); + strcpy (NewArg, Path); + strcat (NewArg, FindBuffer.achName); + } + else + { + NewArg = xstrdup (FindBuffer.achName); + } + new_argv [new_argc++] = NewArg; if (new_argc == max_new_argc) { max_new_argc *= 2; new_argv = xrealloc (new_argv, max_new_argc * sizeof (char *)); } } - - rc = DosFindNext(FindHandle, - (PVOID) &FindBuffer, - sizeof(FindBuffer), - &FindCount); + + rc = DosFindNext (FindHandle, + (PVOID) &FindBuffer, + sizeof(FindBuffer), + &FindCount); if (rc == ERROR_NO_MORE_FILES) break; else if (rc != NO_ERROR) @@ -874,6 +909,8 @@ expand_wild (argc, argv, pargc, pargv) if (rc != 0) error (1, rc, "cannot close %s", argv[i]); } + if (Path != NULL) + free (Path); } *pargc = new_argc; *pargv = new_argv; diff --git a/gnu/usr.bin/cvs/os2/getpass.c b/gnu/usr.bin/cvs/os2/getpass.c index 0ba29fcdeec..e9ceb22ce16 100644 --- a/gnu/usr.bin/cvs/os2/getpass.c +++ b/gnu/usr.bin/cvs/os2/getpass.c @@ -1,11 +1,7 @@ #include #include #include "cvs.h" - -#define INCL_BASE -#define INCL_SUB -#define INCL_KBD -#include +#include "os2inc.h" /* Only define this if you're testing and want to compile this file standalone. */ diff --git a/gnu/usr.bin/cvs/os2/options.h b/gnu/usr.bin/cvs/os2/options.h index 1de53451f15..d41909ae894 100644 --- a/gnu/usr.bin/cvs/os2/options.h +++ b/gnu/usr.bin/cvs/os2/options.h @@ -27,20 +27,6 @@ #define HAVE_RCS5 #endif -/* - * If, before installing this version of CVS, you were running RCS V4 AND you - * are installing this CVS and RCS V5 and GNU diff 1.15 all at the same time, - * you should turn on the following define. It only exists to try to do - * reasonable things with your existing checked out files when you upgrade to - * RCS V5, since the keyword expansion formats have changed with RCS V5. - * - * If you already have been running with RCS5, or haven't been running with CVS - * yet at all, or are sticking with RCS V4 for now, leave the commented out. - */ -#ifndef HAD_RCS4 -/* #define HAD_RCS4 */ -#endif - /* * For portability and heterogeneity reasons, CVS is shipped by default using * my own text-file version of the ndbm database library in the src/myndbm.c @@ -122,13 +108,10 @@ #define RCSBIN_DFLT "" #endif -/* - * The password-authenticating server creates a temporary checkout of - * the affected files. The variable TMPDIR_DFLT (or even better, the - * command-line option "-T" in the line for CVS in /etc/inetd.conf) - * can be used to specify the used directory. This directory will - * also be used for other temporary files. - */ +/* Directory used for storing temporary files, if not overridden by + environment variables or the -T global option. There should be little + need to change this (-T is a better mechanism if you need to use a + different directory for temporary files). */ #ifndef TMPDIR_DFLT #define TMPDIR_DFLT "c:\\temp" #endif diff --git a/gnu/usr.bin/cvs/os2/os2inc.h b/gnu/usr.bin/cvs/os2/os2inc.h new file mode 100644 index 00000000000..ba348a1661d --- /dev/null +++ b/gnu/usr.bin/cvs/os2/os2inc.h @@ -0,0 +1,22 @@ +/* This file is used to make the os/2 header files idempotent. + Written 11/96 by Ullrich von Bassewitz (uz@musoftware.com) + + 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. */ + +#ifndef IN_OS2INC_H +#define IN_OS2INC_H + +#define INCL_BASE +#define INCL_SUB +#define INCL_KBD +#include + +#endif diff --git a/gnu/usr.bin/cvs/os2/popen.c b/gnu/usr.bin/cvs/os2/popen.c index 9f8199764d5..7bc99e12fdf 100644 --- a/gnu/usr.bin/cvs/os2/popen.c +++ b/gnu/usr.bin/cvs/os2/popen.c @@ -4,10 +4,6 @@ Search for "DIAGNOSTIC" in the code to see what it's for. */ #define DIAGNOSTIC 0 -#define INCL_DOSQUEUES -#define INCL_DOSPROCESS -#define INCL_DOSSESMGR -#include #include #include @@ -18,10 +14,12 @@ #include #include +#include "config.h" +#include "os2inc.h" + #define LL_VAL ULONG #define LL_KEY PID /* also ULONG, really */ - #define STDIN 0 #define STDOUT 1 #define STDERR 2 @@ -224,7 +222,14 @@ popen (const char *Command, const char *Mode) return NULL; } +#ifdef __WATCOMC__ + /* Watcom does not allow mixing operating system handles and + * C library handles, so we have to convert. + */ + File = fdopen (_hdopen (End1, *Mode == 'w'? O_WRONLY : O_RDONLY), Mode); +#else File = fdopen (End1, Mode); +#endif ll_insert ((LL_KEY) End1, (LL_VAL) Result.codeTerminate); return File; @@ -247,7 +252,7 @@ popenRW (const char **argv, int *pipes) HFILE Out1, Out2, In1, In2; HFILE Old0 = -1, Old1 = -1, Old2 = -1, Tmp; - PID pid; + int pid; if (DosCreatePipe (&Out2, &Out1, 4096)) return FALSE; diff --git a/gnu/usr.bin/cvs/os2/pwd.c b/gnu/usr.bin/cvs/os2/pwd.c index 1cdf16c799d..4019dd2983f 100644 --- a/gnu/usr.bin/cvs/os2/pwd.c +++ b/gnu/usr.bin/cvs/os2/pwd.c @@ -11,11 +11,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Header: /home/cvs/src/gnu/usr.bin/cvs/os2/pwd.c,v 1.1.1.1 1996/01/30 00:19:38 tholo Exp $ + $Header: /home/cvs/src/gnu/usr.bin/cvs/os2/pwd.c,v 1.1.1.2 1997/02/21 06:38:44 tholo Exp $ */ /* This 'implementation' is conjectured from the use of this functions in diff --git a/gnu/usr.bin/cvs/os2/pwd.h b/gnu/usr.bin/cvs/os2/pwd.h index c3e22cab328..acaaa5c4080 100644 --- a/gnu/usr.bin/cvs/os2/pwd.h +++ b/gnu/usr.bin/cvs/os2/pwd.h @@ -11,11 +11,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Header: /home/cvs/src/gnu/usr.bin/cvs/os2/pwd.h,v 1.1.1.1 1996/01/30 00:19:37 tholo Exp $ + $Header: /home/cvs/src/gnu/usr.bin/cvs/os2/pwd.h,v 1.1.1.2 1997/02/21 06:38:42 tholo Exp $ */ /* This 'implementation' is conjectured from the use of this functions in diff --git a/gnu/usr.bin/cvs/os2/run.c b/gnu/usr.bin/cvs/os2/run.c index 04bb789b2ef..2086803f894 100644 --- a/gnu/usr.bin/cvs/os2/run.c +++ b/gnu/usr.bin/cvs/os2/run.c @@ -10,18 +10,12 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #include "cvs.h" -#define INCL_DOSQUEUES -#define INCL_DOSPROCESS -#define INCL_DOSSESMGR -#include +#include "os2inc.h" + #include #include diff --git a/gnu/usr.bin/cvs/os2/stripslash.c b/gnu/usr.bin/cvs/os2/stripslash.c index 629dad9393d..a68763d5733 100644 --- a/gnu/usr.bin/cvs/os2/stripslash.c +++ b/gnu/usr.bin/cvs/os2/stripslash.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #include diff --git a/gnu/usr.bin/cvs/os2/tcpip.h b/gnu/usr.bin/cvs/os2/tcpip.h index 4d19448650a..4f3e58f56ce 100644 --- a/gnu/usr.bin/cvs/os2/tcpip.h +++ b/gnu/usr.bin/cvs/os2/tcpip.h @@ -43,6 +43,30 @@ #include #if defined( TCPIP_IBM ) +/* Here comes some ugly stuff: The watcom compiler and the IBM TCPIP + * toolkit do not work together very well. The return codes for the + * socket calls are not integrated into the usual error codes, there + * are separate values instead. This results in a crash for two values. + * Since these values are not needed for socket access as far as I can + * see, I will save those values and redefine them after including + * nerrno.h (types.h will include nerrno.h, so this is needed here). + */ +# ifdef __WATCOMC__ + /* First check the numeric values */ +# if ENAMETOOLONG != 35 +# error "ENAMETOOLONG: value unknown" +# endif +# if ENOTEMPTY != 39 +# error "ENOTEMPTY: value unknown" +# endif +# undef ENAMETOOLONG +# undef ENOTEMPTY +# include +# undef ENAMETOOLONG +# undef ENOTEMPTY +# define ENAMETOOLONG 35 +# define ENOTEMPTY 39 +# endif # include # if !defined( TCPIP_IBM_NOHIDE ) # define send IbmSockSend diff --git a/gnu/usr.bin/cvs/os2/watcom.mak b/gnu/usr.bin/cvs/os2/watcom.mak new file mode 100644 index 00000000000..1d79c2a981b --- /dev/null +++ b/gnu/usr.bin/cvs/os2/watcom.mak @@ -0,0 +1,153 @@ +# Makefile for OS/2 (Watcom-C) for use with the watcom make. +# Written 11/96 by Ullrich von Bassewitz (uz@musoftware.com) +# +# 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. + +# The directory, where the IBM TCP/IP developers toolkit is installed. As far +# as I remember, c:\mptn is the default location. If it is not, it is still +# a good choice :-) +tcpip_dir = c:\mptn +tcpip_libdir = $(tcpip_dir)\lib +tcpip_incdir = $(tcpip_dir)\inc + +# Directory for source files and objects +srcdir = . +top_srcdir = .. +lib_dir = $(top_srcdir)\lib +cvs_srcdir = $(top_srcdir)\src +zlib_dir = $(top_srcdir)\zlib + +# Define the stuff used for building the executable +CC = WCC386 +LD = WLINK +CFLAGS = -bm -bt=OS2 -I$(srcdir) -I$(lib_dir) -I$(cvs_srcdir) -I$(zlib_dir) & + -DIBM_CPP -DHAVE_CONFIG_H -DTCPIP_IBM -d1 -onatx -zp4 -5s -fpi87 -zq & + -w2 -ze -I$(tcpip_incdir) + +# Tell the make where the C files are located +.c: $(srcdir);$(lib_dir);$(cvs_srcdir);$(zlib_dir) + +# Somewhat modified generic rule for .obj files. Don't put the .obj file into +# the current directory, use the source directory instead. +.c.obj: .AUTODEPEND + $(CC) $(CFLAGS) -fo=$*.obj $^* + +# object files from OS/2 sources +OS2_OBJECTS = & + $(srcdir)\mkdir.obj & + $(srcdir)\pwd.obj & + $(srcdir)\filesubr.obj & + $(srcdir)\run.obj & + $(srcdir)\stripslash.obj & + $(srcdir)\rcmd.obj & + $(srcdir)\waitpid.obj & + $(srcdir)\popen.obj & + $(srcdir)\porttcp.obj & + $(srcdir)\getpass.obj + +# object files from ..\src +COMMON_OBJECTS = & + $(cvs_srcdir)\add.obj & + $(cvs_srcdir)\admin.obj & + $(cvs_srcdir)\buffer.obj & + $(cvs_srcdir)\checkin.obj & + $(cvs_srcdir)\checkout.obj & + $(cvs_srcdir)\classify.obj & + $(cvs_srcdir)\client.obj & + $(cvs_srcdir)\commit.obj & + $(cvs_srcdir)\create_adm.obj & + $(cvs_srcdir)\cvsrc.obj & + $(cvs_srcdir)\diff.obj & + $(cvs_srcdir)\edit.obj & + $(cvs_srcdir)\entries.obj & + $(cvs_srcdir)\error.obj & + $(cvs_srcdir)\expand_path.obj & + $(cvs_srcdir)\fileattr.obj & + $(cvs_srcdir)\find_names.obj & + $(cvs_srcdir)\hash.obj & + $(cvs_srcdir)\history.obj & + $(cvs_srcdir)\ignore.obj & + $(cvs_srcdir)\import.obj & + $(cvs_srcdir)\lock.obj & + $(cvs_srcdir)\log.obj & + $(cvs_srcdir)\login.obj & + $(cvs_srcdir)\logmsg.obj & + $(cvs_srcdir)\main.obj & + $(cvs_srcdir)\mkmodules.obj & + $(cvs_srcdir)\modules.obj & + $(cvs_srcdir)\myndbm.obj & + $(cvs_srcdir)\no_diff.obj & + $(cvs_srcdir)\parseinfo.obj & + $(cvs_srcdir)\patch.obj & + $(cvs_srcdir)\rcs.obj & + $(cvs_srcdir)\rcscmds.obj & + $(cvs_srcdir)\recurse.obj & + $(cvs_srcdir)\release.obj & + $(cvs_srcdir)\remove.obj & + $(cvs_srcdir)\repos.obj & + $(cvs_srcdir)\root.obj & + $(cvs_srcdir)\rtag.obj & + $(cvs_srcdir)\scramble.obj & + $(cvs_srcdir)\server.obj & + $(cvs_srcdir)\status.obj & + $(cvs_srcdir)\subr.obj & + $(cvs_srcdir)\tag.obj & + $(cvs_srcdir)\update.obj & + $(cvs_srcdir)\watch.obj & + $(cvs_srcdir)\wrapper.obj & + $(cvs_srcdir)\vers_ts.obj & + $(cvs_srcdir)\version.obj & + $(cvs_srcdir)\zlib.obj +# end of $COMMON_OBJECTS + +# objects from ..\lib +LIB_OBJECTS = & + $(lib_dir)\getopt.obj & + $(lib_dir)\getopt1.obj & + $(lib_dir)\getline.obj & + $(lib_dir)\getwd.obj & + $(lib_dir)\savecwd.obj & + $(lib_dir)\sighandle.obj & + $(lib_dir)\yesno.obj & + $(lib_dir)\vasprintf.obj & + $(lib_dir)\xgetwd.obj & + $(lib_dir)\md5.obj & + $(lib_dir)\fnmatch.obj & + $(lib_dir)\regex.obj & + $(lib_dir)\getdate.obj & + $(lib_dir)\valloc.obj + +ZLIB_OBJECTS = & + $(zlib_dir)\adler32.obj & + $(zlib_dir)\compress.obj & + $(zlib_dir)\crc32.obj & + $(zlib_dir)\uncompr.obj & + $(zlib_dir)\deflate.obj & + $(zlib_dir)\trees.obj & + $(zlib_dir)\zutil.obj & + $(zlib_dir)\inflate.obj & + $(zlib_dir)\infblock.obj & + $(zlib_dir)\inftrees.obj & + $(zlib_dir)\infcodes.obj & + $(zlib_dir)\infutil.obj & + $(zlib_dir)\inffast.obj + +OBJECTS = $(COMMON_OBJECTS) $(LIB_OBJECTS) $(OS2_OBJECTS) $(ZLIB_OBJECTS) + +cvs.exe: $(OBJECTS) + $(LD) SYSTEM os2v2 DEBUG all NAME cvs.exe OPTION dosseg & + OPTION stack=32K FILE $(cvs_srcdir)\*.obj,$(lib_dir)\*.obj, & + $(srcdir)\*.obj,$(zlib_dir)\*.obj & + LIBRARY $(tcpip_libdir)\tcp32dll.lib, & + $(tcpip_libdir)\so32dll.lib + +strip: cvs.exe .SYMBOLIC + -wstrip cvs.exe diff --git a/gnu/usr.bin/cvs/src/ChangeLog b/gnu/usr.bin/cvs/src/ChangeLog index fea7afaa183..c9d0f394f64 100644 --- a/gnu/usr.bin/cvs/src/ChangeLog +++ b/gnu/usr.bin/cvs/src/ChangeLog @@ -1,3811 +1,184 @@ -Fri Oct 4 15:11:46 1996 Jim Kingdon +Thu Jan 16 00:06:00 1997 Jim Kingdon - * server.c (server_cleanup): Temporarily clear noexec when calling - unlink_file_dir. This is so we clean up the temp directory even - when the -n global option is specified. + * version.c: Version 1.9.2. -Wed Oct 2 10:47:33 1996 Norbert Kiesel +Wed Jan 15 09:14:38 1997 Jim Kingdon - * client.c (send_repository): initialize some variables before - first usage + * client.c (call_in_directory): Take code that creates CVSADM at + top level, move it before the CVS_CHDIR (dir_name) call, and do it + regardless of whether dir_name is ".". Pass "." not dir_name to + Create_Admin (when the code was written they were always the + same). Don't add reposdirname to the repository we pass to + Create_Admin (when the code was written, I think reposdirname + probably would always be "."). Don't create CVSADM if + reposdirname_absolute. + * sanity.sh (basicb): Enable tests basicb-1a and basicb-9a for + remote; tests for above fix. + (basic1): Do entire test within a "1" directory to deal with + creation of CVS directories at top level. Support --keep. + (conflicts): In test conflicts-136, only update first-dir. + (basica): Uncomment the part that tests "cvs co -l .". That tests + the existing functionality which I might have (but hopefully did not) + perturbed with the call_in_directory changes. -Tue Oct 1 13:01:24 1996 Jim Blandy +Mon Jan 13 11:04:32 1997 Jim Kingdon - Revert some of Greg's changes; they're welcome later, but we're - trying to keep CVS stable for pre-release testing at the moment. - * checkin.c, commit.c, cvs.h, diff.c, import.c, main.c, no_diff.c, - options.h.in, patch.c, rcs.c, rcs.h, rcscmds.c, sanity.sh, update.c: - Revert changes of Sep 29 and 30. + * server.c (check_command_legal_p): Do not call error (1, ...) + here; that will always cause a protocol violation by shutting down + the connection prematurely. Remove croak_on_illegal arg. + (do_cvs_command): Move call to check_command_legal_p until after + the call to print_pending_error. Print the error message ourself. -Tue Oct 1 13:17:31 1996 Ian Lance Taylor + * mkmodules.c (filelist): Add readers and writers. Add comment + about why passwd is not included. Add comment about meaning of + NULL contents field. - Make sure the server temporary directory is removed even if - Max-dotdot is used. - * server.c (orig_server_temp_dir): New static variable. - (serve_max_dotdot): Don't free server_temp_dir if it is the same - as orig_server_temp_dir. - (do_cvs_command): Use orig_server_temp_dir in error message. - (server_cleanup): Remove orig_server_temp_dir. - (server): Set orig_server_temp_dir. Remove incorrect indentation - of error message. +Fri Jan 10 13:23:09 1997 Norbert Kiesel - * import.c (update_rcs_file): Restore new argument to - RCS_checkout, removed in last patch. + * release.c (release): Initialize delete_flag before reading it + (found by running purify) + + * logmsg.c (do_verify): Fix reading unallocated memory (found by + running purify) + +Thu Jan 9 16:32:47 1997 Jim Kingdon + + * checkout.c (build_dirs_and_chdir): Partially revert 3 Jan + change--move call to Subdir_Register back above the CVS_CHDIR call + (we need to register in the old, not the new, directory). Instead + of calling CVS_MKDIR and ignoring errors, call mkdir_if_needed; + this is an effort to catch errors there rather than catching them + in the CVS_CHDIR. This makes test 27-add-add in sanity.sh work + again. + + * find_names.c (Find_Directories): Remove code inside + #ifdef ATTIC_DIR_SUPPORT and replace it with a comment explaining + why we don't look in the attic. ATTIC_DIR_SUPPORT was never defined. + + * find_names.c (find_dirs): Add comment about tmp being unset. + + * commit.c (checkaddfile): Report errors with errno and specific + error messages. + + * rcs.c, commit.c, create_adm.c, entries.c, find_names.c, + ignore.c, history.c: Nuke PATH_MAX arbitrary limits. + +Wed Jan 8 23:07:41 1997 Jim Kingdon + + * add.c (add): Reindent a portion which needed it. + +1997-01-08 Jim Kingdon -Tue Oct 1 00:32:55 1996 Jim Blandy + * client.c (send_file_names): When looking name up in Entries, + call Entries_Open and Entries_Close. This has two effects: + (1) we look at Entries.Log, and (2) we don't skip 'D' entries, + both of which are needed to make us get the right (command + line) name for a directory we are adding. + +Wed Jan 8 14:50:47 1997 Jim Kingdon - * import.c: Revert Greg Woods' changes of Sep 30. We may want - them later, but not before 1.9. + * Makefile.in, cvs.h, hash.h, myndbm.h, rcs.h: Remove CVSid; we + decided to get rid of these some time ago. -Mon Sep 30 23:31:01 1996 Jim Blandy +Tue Jan 7 12:56:10 1997 Karl Fogel - * log.c (log_fileproc): Now that we might actually find a "desc" - node in rcsfile->other, thanks to Ian's change below, we had - better deal correctly if we find a null pointer in it. + * root.c (check_root_consistent): new func, compares below new + global var with CVSroot_directory, assuming both set. + (set_local_cvsroot): use above new func for security check. + (parse_cvsroot): same. + But do all of above only #ifdef AUTH_SERVER_SUPPORT. -Mon Sep 30 13:55:03 1996 Greg A. Woods + * server.c: (Pserver_Repos): new global var, init to NULL. + (pserver_authenticate_connection): set above new global. + (check_repository_password): be a good scout and use + CVSROOTADM and CVSROOTADM_PASSWD, now that they are the standard. + Make sure all of above is in #ifdef AUTH_SERVER_SUPPORT. + (check_command_legal_p): wrap most of body in #ifdef + AUTH_SERVER_SUPPORT. + Everywhere: wrap all references to CVS_Username in #ifdef + AUTH_SERVER_SUPPORT. - * main.c (main): don't set need_to_create_root for "cvs init" - either, just in case it's run from within a valid working - directory. + * cvs.h (Pserver_Repos): new var, used in consistency [security] + check. Defined only #ifdef AUTH_SERVER_SUPPORT. + (CVSROOTADM_PASSWD): new #define, trying to get with the program. - * sanity.sh (testcvs): oops, forgot to comment out test version I - was using... +Fri Jan 3 18:10:39 1997 Ian Lance Taylor - * diff.c (diff_fileproc): use Diffbin instead of DIFF (3). - * patch.c (patch_fileproc): use Diffbin instead of DIFF. - * commit.c (check_fileproc): use Grepbin instead of GREP. - * rcscmds.c (RCS_merge): use Grepbin instead of GREP. - * update.c (patch_file): use Diffbin instead of DIFF. - (update_fileproc): use Grepbin instead of GREP. - * cvs.h (Diffbin): new declaration. - (Grepbin): new declaration. - (DIFFBIN_ENV): new manifest to name DIFFBIN environ var. - (GREPBIN_ENV): new manifest to name GREPBIN environ var. - * option.h.in (DIFFBIN_DFLT): renamed from DIFF. - (GREPBIN_DFLT): renamed from GREP. - * main.c (main): new variables diffbin_update_env and - grepbin_update_inv, ala rcsbin_update_env. - (main): new options -D diffbin and -g grepbin - (usg): describe new options -D diffbin and -g grepbin. - (Diffbin): new global variable for DIFF path. - (Grepfbin): new global variable for GREP path. + * checkout.c (build_dirs_and_chdir): Move call to Subdir_Register + until after we know that the directory exists. + +Thu Jan 2 13:30:56 1997 Jim Kingdon - * options.h.in (RCSBIN_DFLT): mention this needs to be set if - your PATH isn't set properly by rshd. + * Makefile.in, cvsbug.sh, edit.c, edit.h, error.c, error.h, + fileattr.c, fileattr.h, filesubr.c, run.c, update.h, watch.c, + watch.h: Remove "675" paragraph; see ../ChangeLog for rationale. - * sanity.sh (rdiff): re-do Jim's change, but with the original - keywords I had intended (should be a bit more like real life), and - Jim's better RCS date and user matching form. - [I guess that's what I get for checking things in at 3am! ;-)] +Thu Jan 2 12:27:46 1997 Jim Kingdon -Mon Sep 30 17:00:20 1996 Ian Lance Taylor + * sanity.sh (info): New test info-cleanup-verifymsg gets rid of + verifymsg when we are done with it. - * rcs.c (RCS_reparsercsfile): Store desc field value in main RCS - node data, not in version specific data. - * sanity.sh: Enable log2 test (for local CVS only). + * sanity.sh (basicb): Skip tests basicb-1a and basicb-9a for remote. + * sanity.sh (modules-155a4): It is OK if a CVS directory exists. + * sanity.sh (ignore): Do everything inside a "1" directory. The + change to create CVS directories at top-level causes messages such as + "? home" otherwise. In test 191, specify -I CVS so that new CVS + directory is ignored. + * sanity.sh (crerepos): Manually remove CVS directory which had not + existed before. -Mon Sep 30 13:01:45 1996 Jim Kingdon +Thu Jan 2 09:06:20 1997 Karl Fogel - * sanity.sh (log2): New test, tests cvs add -m. Not yet enabled - in "tests" because CVS currently flunks this test. + * server.c: Changes for pserver read-only repository access: + (check_command_legal_p): new func. Right now, just checks if + repository modification is permitted, and that only if pserver is + active. + (do_cvs_command): take new parameter `cmd_name', a string. All + callers changed. Pass it on to new func check_command_legal_p() + before executing the command. + (CVS_Username): new global, init to NULL. Used by + check_command_legal_p(), set in check_password(). + (check_password): set above new global CVS_Username; reorganized a + bit to facilitate this. + (check_repository_password): give *host_user_ptr permanent + storage iff success. - * sanity.sh (rdiff, basic2): Allow "cvs server" as well as "cvs - checkout" and friends in messages. In testing output of cvs - status, don't require a tab which isn't there for remote. Skip - test rdiff-9 for remote. In test basic2-64, add missing slash in - the pattern which gets used for remote. + * main.c: Changes for pserver read-only repository access: + (lookup_command_attribute): new func. + (main): use new func lookup_command_attribute() to establish if + CVS_CMD_IGNORE_ADMROOT and CVS_CMD_USES_WORK_DIR. - * sanity.sh (rdiff): Fix strings we were matching against which - got keyword-expanded in checking in sanity.sh. + * cvs.h: Changes for pserver read-only repository access: + (CVSROOTADM_READERS, CVSROOTADM_WRITERS): new #defines. + Prototype lookup_command_attribute(). + (CVS_CMD_IGNORE_ADMROOT, CVS_CMD_USES_WORK_DIR, + CVS_CMD_MODIFIES_REPOSITORY): new #defines for + lookup_command_attribute() and its callers. -Mon Sep 30 03:21:37 1996 Greg A. Woods +Wed Jan 1 19:50:38 1997 Jim Kingdon - * sanity.sh: change all regexpr literal '.' to '\.' - (basic2): why are tests 34 & 42 commented out (because - of 'diff -u'?)? - add tests 56[abc], 57a, and 58a to test import to the main - branch (i.e. branch '1'). - (rdiff): new test section for rdiff -K, etc. - (dotest): remove dotest.ex? before running a new test. - (dotest_fail): remove dotest.ex? before running a new test. - (dotest_internal): write expected output to dotest.exp, or if $4 - also used, to dotest.ex1 and dotest.ex2. - (patch): renamed this test to 'serverpatch'. - (dotest_lit): rename dotest.res to dotest.exp ala dotest(). - remove dotest.ex? before running a new test. - (DOTSTAR): mention the bug exists up to 1.12 - (ENDANCHOR): mention the bug exists up to 1.12 - (dotest_all_in_one): new function for debugging. - (dotest_line_by_line): new function for debugging. - (dotest_internal_debug): new function for debugging. - (dotest_internal): stop emulating the ancient tests and don't spew - the dotest.tmp contents onto $LOGFILE -- it's just too much - meaningless noise. Only do this if the test fails. Many tests - don't use dotest() yet, so this isn't quite so helpful as it might - otherwise be. - (TODO): mention CVS/* files, especially CVS/Root. - - * main.c (main): add a commented out piece of code to suggest that - there should be a function lookup_command_attribute() that could - tell us various things about internal commands, such as whether - they use CVS/Root, or if they're repository-only, or if they need - a working directory, etc.... - (main): don't set need_to_create_root if command doesn't use a - local working directory. + * options.h.in: Reword comment for TMPDIR_DFLT to make it clear + that this isn't specific to the pserver server. - * patch.c (patch): CLIENT_SUPPORT: send '-f' if NOT force_tag_match + * modules.c (do_module): Give an error message if one tries to + specify -a together with another option. + * sanity.sh (modules2): New tests modules2-a* test for above fix. - * error.c (fperror): protect declaration for un-defined __STDC__ + * sanity.sh (devcom): Add tests devcom-a-nonexist and + devcom-t-nonexist for "cvs watchers" on nonexistent argument. - * import.c (import): permit imports to a branch with zero dots, - i.e. the trunk. - (update_rcs_file): don't detect conflicts if importing to the - trunk. - (import): add hint that we should allow a module name, instead of - just a pathname relative to $CVSROOT. - (add_rcs_file): if importing to trunk, do it with ci(1). +1997-01-01 Fred Fish - * import.c: XXX the following are all #if 0'ed out until a full - implementation can be designed.... - (cbranch): new variable to support conflict detection on another - branch set by -c. - (import): truncate -b and -c optarg if to fit in static storage. - (import_usage): describe -c + * run.c (piped_child, filter_stream_through_program): Actually + install these HAVE_VFORK patches that got missed. + (There was a log entry for these changes for 29 Nov 1996 but it + seems I accidentally forgot to actually check them in -kingdon). - * rcscmds.c (RCS_checkout): add new argument 'rcsver'. If rcsver - is set, turn on 'keywords' to force call to RCS_exec_checkout. - * rcs.c (RCS_exec_checkout): add new argument 'rcsver'. Pass - 'rcsver' to "co" with run_arg(). - * cvs.h: (RCS_checkout): add new argument 'rcsver' to prototype. - (RCS_exec_checkout): add new argument 'rcsver' to prototype. - * commit.c (remove_file): supply new argument to RCS_checkout. - * checkin.c (Checkin): supply new argument to RCS_checkout. - * diff.c (diff_fileproc): supply new argument to RCS_checkout. - (diff_file_nodiff): supply new argument to RCS_checkout. - * no_diff.c (No_Difference): supply new argument to RCS_checkout. - * update.c (checkout_file): supply new argument to RCS_checkout. - (patch_file): supply new argument to RCS_checkout. - (join_file): supply new argument to RCS_checkout. +Wed Jan 1 18:32:44 1997 Jim Kingdon - * patch.c: (o_options): new variable for -K - (rcsver): new variable for -V. - (patch): add -K flag which sets o_options, change -V to set - rcsver, send o_options and rcsver if in client mode. - (patch_fileproc): use RCS_checkout instead of RCS_fast_checkout in - order to ensure $Name is expanded, use o_options if set, or - options if set, or by default "-ko" when getting "old" file. + * Makefile.in: Add ChangeLog-96. + * ChangeLog-96: New file, contains former contents of ChangeLog. + * ChangeLog: Now just contains 1997 changes. -Sun Sep 29 16:43:28 1996 Jim Kingdon - - * rcscmds.c: Replace comment at top of file concerning RCS library - with a reworded version based on discussion between me, Ian, Paul - Eggert, and JimB. - -Sun Sep 29 13:09:45 1996 Noel Cragg - - * main.c (main): don't create/update CVS/Root when doing the "cvs - login" command. Consider: if the user executes "cvs login" with - the working directory inside an already checked out module, we'd - incorrectly change the CVS/Root file to reflect the CVSROOT of the - "cvs login" command. - - * login.c (login): if we're re-logging into a server for which a - .cvspass entry already exists, copy the temporary file to its home - location rather than renaming. Renaming doesn't work between - filesystems. After copying, unlink the temporary file. - -Fri Sep 27 05:24:56 1996 Jim Kingdon - - * diff.c: Add comment about --brief option. - - * README-rm-add: Removed; the information which was here is now in - cvs.texinfo. - * Makefile.in (DISTFILES): Remove README-rm-add. - -Wed Sep 25 10:00:00 1996 Larry Jones - - * Makefile.in (cvsbug): Add dependency on version.c. - -Wed Sep 25 09:01:48 1996 Jim Kingdon - - * filesubr.c (get_homedir), update.c (update): Reindent. - -Wed Sep 25 04:44:54 1996 Jim Blandy - - * version.c (version_string): Bump to 1.8.86. - -Wed Sep 25 05:17:50 1996 Jim Blandy - - * update.c (update): Don't neglect to pass the -kmumble options - to the server. - * sanity.sh (binfiles-sticky): New tests for above. - - * cvsrc.c (read_cvsrc): Deal correctly with lines that specify a - command, but no options; don't corrupt argv. - - * sanity.sh: When testing rsh, use the program specified by - the CVS_RSH environment variable, if it's set. Move test to top - of file, so it runs before all other tests (it's really a - meta-test). - - * filesubr.c (get_homedir): Use getpwuid to find the home - directory, if the HOME environment variable isn't set. - * ignore.c (ign_add_file): Call get_homedir to find the user's - home directory; this is more portable than calling getpwuid. - -Tue Sep 24 09:08:17 1996 Jim Kingdon - - * log.c (log_tree): When walking through branches, follow the - ->prev field rather than following ->next which insures that the - loop only executes once and we only see the last branch. - * sanity.sh (multibranch): Test "cvs log" too; tests for above fix. - -Mon Sep 23 09:55:22 1996 Norbert Kiesel - - * options.h.in: Fixed some typos in the comments and reindented - them. - -Sat Sep 21 02:33:26 1996 Jim Blandy - - * sanity.sh: If we're testing remote CVS, make sure rsh itself is - working before running any tests. It's confusing when basica-1 - fails just because you don't have the local host in your .rhosts - file. - - * version.c (version_string): Bump to 1.8.85. - -Thu Sep 19 09:15:41 1996 Jim Kingdon - - * options.h.in: Define SERVER_FLOWCONTROL, SERVER_HI_WATER, - SERVER_LO_WATER. Several large sites (FreeBSD, Cygnus) have been - pounding on this code without problems, and it doesn't seem to - have any significant downsides. - -Tue Sep 17 01:13:41 1996 Jim Kingdon - - * status.c (status_fileproc): Instead of a default case, set sstat - before the switch. This way gcc -Wall can detect a missed case. - Add explicit T_TITLE case. - -Tue Sep 17 00:09:44 1996 Assar Westerlund - - * login.c (login): Print usage if argc < 0. - -Tue Sep 17 00:09:44 1996 Jim Kingdon - - * lock.c: In comment, mention one more function of readlocks - (fileattr not updated atomically). Note similarity between - solutions #2 and #5. - - * checkout.c (safe_location): Do not reject a location merely - because it textually starts with hardpath; insist that it be - hardpath or a subdirectory thereof. - -Mon Sep 16 11:46:36 1996 Jim Kingdon - - * server.c (server_cleanup): Add comment about ignoring errors - from unlink_file_dir. - -Mon Sep 16 10:31:48 1996 Norbert Kiesel - - * main.c: Add support for -T command line option. This - is needed for servers started via inetd. - (usg): Added line for -T. Improved -z documentation. - (main): Read default for tmpdir from the environment. Test for 'T' - in getopt loop. Use '/tmp' as ultimative fallback. Update - environment if possible. - - * cvs.h (TMPDIR_ENV): Added for -T command line option. - - * options.h.in: Add TMPDIR_DFLT - - * import.c (update_rcs_file): Use global variable Tmpdir instead - of reading the environment. - - * server.c (server_cleanup): Use global variable Tmpdir instead of - reading the environment. Also, replace system("rm -rf") with - unlink_file_dir. - (server): Use global variable Tmpdir instead of reading the - environment. - -Thu Sep 12 1996 Jim Kingdon - - * main.c (main): If ARGV0_NOT_PROGRAM_NAME, then just set - program_name to "cvs" rather than argv[0]. - -Thu Sep 12 12:06:56 1996 Jim Kingdon - - * client.c (update_entries): If we can't write the file, don't - make it a fatal error. - -Wed Sep 11 12:46:23 1996 Jim Kingdon - - * client.c (start_server): Move START_SERVER_RETURNS_SOCKET code - so that it is only run for server_method. It is wrong for - pserver_method (in which connect_to_pserver sets server_sock). - - * login.c (construct_cvspass_filename): If NO_SLASH_AFTER_HOME, - don't put a '/' between $HOME and .cvspass. Reindent function. - * build_src.com: Add zlib.c, login.c, and scramble.c. - - * rcs.c (RCS_deltas): When looking for our branch in ->branches, - check the branch number. - * sanity.sh (multibranch): New tests test for above fix. - - * commit.c (precommit_list_proc): Fix typo in last change - (->status to ->type). - -Tue Sep 10 23:05:41 1996 Jim Kingdon - - * Makefile.in (DISTFILES): Add build_src.com. - * build_src.com: Add buffer.c, buffer.obj, and zlib.olb. - -Tue Sep 10 20:35:23 1996 Juergen Renz - and Jim Kingdon - - * commit.c (precommit_list_proc): Update to reflect Jul 22 change - in which p->data was changed from a Ctype to a struct - logfile_info *. This means that commitinfo scripts again get - passed the file list like they should. - -Tue Sep 10 20:35:23 1996 Jim Kingdon - - * client.c (auth_server_port_number): Change name of service from - "cvs" to "cvspserver". The latter is what the manual has always - recommended, and it is also officially registered with IANA. - -Tue Sep 10 11:12:42 1996 Mark A. Solinski - and Jim Kingdon - - * client.c (socket_buffer_output): Change ifdef VMS to ifdef - SEND_NEVER_PARTIAL. - (start_server): Change ifdef VMS to ifdef START_SERVER_RETURNS_SOCKET. - -Tue Sep 10 17:15:21 1996 Jim Blandy - - * client.c (auth_server_port_number): Look up "cvs" in the - services database, and use the value it returns; fall back to - CVS_AUTH_PORT if no entry is present. - (connect_to_pserver): Use the correct port number in any error - messages. - -Tue Sep 10 11:12:42 1996 Jim Kingdon - - * sanity.sh (newb): New test newb-123j0 tests for another "cvs - status" case. - -Sun Sep 8 15:20:37 1996 Ian Lance Taylor - - * rcs.c (RCS_checkout): Clarify handling of options parameter. - - * rcs.c (RCS_checkout): Free buffer allocated by RCS_deltas. - -Sat Sep 7 21:28:27 1996 Jim Kingdon - - * main.c (struct cmd): Add comment concerning recognizing unique - abbreviations. - -Fri Sep 6 22:31:52 1996 Jim Kingdon - - * rcs.c (RCS_checkout): Fix indentation. - -Fri Sep 6 11:48:08 1996 Ian Lance Taylor - - * rcs.c (RCS_checkout): Replace tag parameter with rev and nametag - parameters. Change all callers. - * rcs.h (RCS_checkout): Update declaration. - - * rcs.c (RCS_getversion): Replace return_both parameter with - simple_tag. Change all callers. - (RCS_gettag): Likewise. - * rcs.h (RCS_getversion, RCS_gettag): Update declarations. - * vers_ts.c (Version_TS): Simplify vn_tag initialization using new - simple_tag rather than old return_both. - * cvs.h (struct vers_ts): Clarify vn_tag comment a bit. - - * main.c (usg): Only mention -x if ENCRYPTION is defined. - (main): Mention ENCRYPTION define in comment for -x. - * client.h (krb_encrypt_buffer_initialize): Only declare if - ENCRYPTION is defined. - * client.c (start_server): Only encrypt if ENCRYPTION is defined. - * server.c (serve_kerberos_encrypt): Only define if ENCRYPTION is - defined. - (requests): Only include Kerberos-encrypt is ENCRYPTION is - defined. - (krb_encrypt_*): Only define if ENCRYPTION is defined. - -Thu Sep 5 17:32:39 1996 Ian Lance Taylor - - * sanity.sh: When testing remote, use :ext: instead of :server: to - match change made earlier today. - -Thu Sep 5 13:57:47 1996 Jim Kingdon - - * client.c (start_tcp_server): Don't allow :kserver: to mean - "direct tcp" (root.c already takes care of this, but I want to - make it clear what is intended, and not intended, here). - (start_server): Handle ext_method (external rsh program) and - server_method (internal rsh client) separately. - * client.c: Take rsh_pid and start_rsh_server out of - RSH_NOT_TRANSPARENT ifdefs. It is useful for things like SSH on NT. - * cvs.h (CVSmethod), root.c (method_names): Add ext_method. - * root.c (parse_cvsroot): Recognize "ext" access method. - If access method is not specified and CVSROOT contains a colon, - use either ext_method or server_method depending on - RSH_NOT_TRANSPARENT. - -Thu Sep 5 00:09:49 1996 Ian Lance Taylor - - * rcs.c (RCS_checkout): Remove flags parameter, which was not - serving any useful purpose. Change all callers. - * rcscmds.c (RCS_exec_checkout): Likewise. - - * rcscmds.c (RCS_exec_checkout): Rename from RCS_checkout. Change - all callers. - * rcs.c (RCS_checkout): Rename from RCS_fast_checkout. Change all - callers. - -Wed Sep 4 14:42:28 1996 Ian Lance Taylor - - * rcs.c (RCS_fast_checkout): If tracing, output a message. If - noexec, and workfile is not NULL, just return immediately. Assert - that sout is RUN_TTY or workfile is NULL, rather than using it as - a conditional. Replace found variable with two variables--gothead - and keywords--reflecting what it actually means. - - * rcs.c (RCS_fast_checkout): Don't handle the case of workfile set - to "". - * rcscmds.c (RCS_checkout): Likewise. - * checkin.c (Checkin): Pass explicit file name, not "", to - RCS_fast_checkout. - * update.c (join_file): Likewise. - * commit.c (remove_file): Pass explicit file name to - RCS_fast_checkout and RCS_checkin. - - * rcs.c (RCS_reparsercsfile): Always continue after seeing - RCSSYMBOLS, even if the value is NULL. Clear the NODELTA flag - after setting delta_pos. - (free_rcsnode_contents): New static function. - (freercsnode): Call free_rcsnode_contents. - (RCS_fast_checkout): If NODELTA is set, reparse the RCS file. - (RCS_settag): New function. Change all callers to old function. - (RCS_deltag, RCS_setbranch): Likewise. - (RCS_lock, RCS_unlock): Likewise. - (RCS_deltas): If NODELTA is set, reparse the RCS file. - * rcs.h (NODELTA): Define. - (RCS_settag, RCS_deltag, RCS_setbranch): Declare. - (RCS_lock, RCS_unlock): Declare. - * rcscmds.c (RCS_exec_settag): Rename from RCS_settag. Don't - check tag against BASE or HEAD (now done in new RCS_settag). - (RCS_exec_deltag): Rename from RCS_deltag. - (RCS_exec_setbranch): Rename from RCS_setbranch. - (RCS_exec_lock): Rename from RCS_lock. - (RCS_exec_unlock): Rename from RCS_unlock. - * cvs.h: Update declarations of renamed functions. - * checkin.c (Checkin): Remove rcscopy variable (no longer needed - because of change in RCS_unlock call). - * commit.c: Include . - (remove_file): Update RCSNode path if the file is renamed. - (unblockrcs): Change rcs parameter to RCSNode. Change all - callers. - (fixbranch): Likewise. - (lock_RCS): Likewise. Don't call RCS_parsercsfile. - (checkaddfile): Update RCSNode path if the file is renamed. After - creating a new file, call RCS_parse. When stubbing a branch, use - the passed in RCSNode if there is one, rather than calling - RCS_Parse. Don't call RCS_Parse again after calling RCS_settag. - Free head and magicrev even if RCS_settag fails. - * import.c (add_rev): Change rcs parameter to RCSNode. Change all - callers. - (add_tag): Likewise. - - * rcs.c (RCS_fast_checkout): Amend last patch: if workfile is - NULL, but sout is not NULL, use sout in error message. - -Wed Sep 4 13:35:09 1996 Jim Kingdon - - * version.c: Increment version number to 1.8.8. - - * Version 1.8.7. - -Wed Sep 4 1996 Jim Kingdon - - * client.c (send_file_names): Look for the name to send in - Entries even if the file doesn't exist; we should send the - name as it appears in Entries in the "rm foo; cvs update FOO" - case. - -Tue Sep 3 20:50:11 1996 William A. Hoffman - - * rcs.c (RCS_fast_checkout): If workfile is NULL, don't try to - include it in error message. - -Mon Aug 26 12:27:38 1996 Jim Kingdon - - * mkmodules.c (mkdir_if_needed): Move from here ... - * filesubr.c, cvs.h (mkdir_if_needed): ... to here. Have it - return a value saying whether the directory was created. - * client.c (call_in_directory), edit.c (edit_fileproc): Call it. - -Fri Aug 23 19:19:44 1996 Ian Lance Taylor - - * checkin.c (Checkin): Copy rcs parameter in case it is freed when - finfo->rcs is freed. - -Fri Aug 23 14:55:41 1996 Jim Kingdon - - * remove.c (remove_fileproc): Revert change of 23 Aug to print - getwd and finfo->file in message. The latter is redundant with - fullname and the former is redundant with fullname and the working - directory when CVS was invoked. The implementation was also - lacking as the getwd call could overflow the buffer. - -Fri Aug 23 18:40:35 1996 Norbert Kiesel - - * remove.c (cvsremove): fix remove -f for client/server - -Fri Aug 23 11:28:27 1996 Jim Kingdon - - * wrapper.c, cvs.h: Remove conflictHook field of WrapperEntry, - WRAP_CONFLICT in WrapMergeHas, and 'c' option in wrap_add; they - are never used. - -Fri Aug 23 11:41:46 1996 Norbert Kiesel - - * server.c (switch_to_user): use #ifdef SETXID_SUPPORT instead of - #if SETXID_SUPPORT - -Thu Aug 22 14:18:43 1996 Ian Lance Taylor - - * checkin.c (Checkin): Remove local variable xfinfo. Reparse the - RCS file after the checkin. Call RCS_fast_checkout rather than - RCS_checkout. - - * cvs.h (RCS_FLAGS_LOCK): Don't define. - (RCS_FLAGS_*): Adjust values to fill in hole left by removal of - RCS_FLAGS_LOCK. - * rcs.c (RCS_fast_checkout): Don't check for RCS_FLAGS_LOCK. - * rcscmds.c (RCS_checkout): Likewise. - * commit.c (commit_fileproc): Remove rcs local variable. If - status is T_MODIFIED, require that finfo->rcs be set, call - Lock_RCS directly, and don't call locate_rcs. If adding to a tag, - require that finfo->rcs be set, and don't call locate_rcs. - (remove_file): Remove rcs local variable. Require that finfo->rcs - be set. Don't call locate_rcs. Don't pass RCS_FLAGS_LOCK to - RCS_checkout; use RCS_lock instead. Call RCS_fast_checkout rather - than RCS_checkout. - (unlockrcs): Use a single rcs parameter rather than two parameters - for file and repository. Change all callers. Don't call - locate_rcs. - (fixbranch): Likewise. - (lockrcsfile): Remove; no more callers. - -Tue Aug 20 10:13:59 1996 Jim Kingdon - - * buffer.c, rcs.c: Don't use inline. It wasn't being used in a - loop or any such place where it would matter for performance, and - it was a (minor) portability hassle. - - * server.c (server): Change "Dummy argument 0" to "cvs server" and - add comment explaining why. - - * rcs.c (linevector_add): Add comment regarding changing \n to \0. - -Tue Aug 20 09:19:19 1996 Norbert Kiesel - - * checkout.c (checkout_proc): Call RCS_parse to get the default - options from the RCS file. - - * sanity.sh (binfiles): Add tests 5.5b0 and 5.5b1 for the above fix - -Mon Aug 19 18:13:32 1996 Ian Lance Taylor - - * rcs.c (linevector_init): Make inline. Set lines_alloced to 0, - not 10. Set vector to NULL. - (linevector_add): Remove assertion that lines_alloced is greater - than zero. Initialize lines_alloced if necessary. - (linevector_copy): Initialize lines_alloced if necessary. - (linevector_free): Only free vector if it is not NULL. - (RCS_deltas): Always call linevector_init and linevector_free on - curlines, headlines, and trunklines. - (RCS_fast_checkout): Remove #if 0 around code that calls - RCS_deltas. - -Fri Aug 16 17:52:54 1996 Ian Lance Taylor - - * rcs.c (linevector_add): Handle zero length correctly. - (RCS_deltas): In RCS_FETCH case, the data is in headlines, not - curlines. - (RCS_fast_checkout): Update comment about RCS_deltas: the - testsuite now passes. - - * rcs.c (RCS_fully_parse): Use the length of the value, rather - than assuming that there are no embedded zero bytes. - (struct line): Add len field. - (linevector_add): Add len parameter. Change all callers. Use - len, rather than assuming that there are no embedded zero bytes. - Set the len field in new lines. - (RCS_deltas): Use the length of the value, rather than assuming - that there are no embedded zero bytes. Use the line length when - outputting it and when copying it. - (RCS_fast_checkout): Update comment about RCS_deltas to remove - note about supporting zero bytes correctly. - -Thu Aug 15 23:38:48 1996 Jim Kingdon - - * commit.c, import.c: Revise comments regarding the fact that we - call start_server before do_editor. - -Thu Aug 15 11:30:55 1996 Ian Lance Taylor - - * server.c: Include if AUTH_SERVER_SUPPORT. - (pserver_authenticate_connection): Set SO_KEEPALIVE on - STDIN_FILENO. - (kserver_authenticate_connection): Likewise. - -Thu Aug 15 10:26:41 1996 Norbert Kiesel - - * server.c (switch_to_user): Fix previous patch to compile it for - both HAVE_KERBEROS and AUTH_SERVER_SUPPORT - -Wed Aug 14 14:02:00 1996 Norbert Kiesel - - * server.c (check_password): if available use getspnam instead of - getpwnam when reading system passwords. This allows cvs pserver - to run on systems with shadow passwords. - (switch_to_user): new static function. Contains the extracted - common tail of kserver_authenticate_connection and - pserver_authenticate_connection. If compiled with SETXID_SUPPORT, - honor the setgid bit if it is set. - (check_repository_password): turn into a static function - (check_password): ditto - (pserver_authenticate_connection): little code cleanup - -Wed Aug 14 01:07:10 1996 Greg A. Woods - - * history.c (history): apply fix posted by Steven Meyer - to info-cvs to correct handling of '-D' - argument. Message-Id: <9608122335.AA01385@nijel.blacksmith.com> - -Tue Aug 13 13:42:36 1996 Ian Lance Taylor - - * log.c (cvslog): Remove comment about calling rlog. - * rcs.c (translate_symtag): Correct typo in comment (l ist -> - list). - * server.c (server_write_entries): Add omitted word (lists) in - comment. - -Tue Aug 13 14:01:49 1996 Norbert Kiesel - - * wrapper.c (wrap_rcsoption): fix memory access error - - * rcs.c (RCS_fast_checkout): fix memory access error (triggered - by an empty option string) - -Mon Aug 12 17:45:15 1996 Jim Kingdon (unknown@beezley) - - * buffer.c, zlib.c: If EIO is not defined, try to define it. - -Mon Aug 12 10:33:27 1996 Jim Kingdon - - * import.c (comtable): Add comment concerning applicability with - RCS 5.7. - - * server.c (server): If TMPDIR is not an absolute pathname, give - an error. - -Mon Aug 12 10:34:43 1996 Norbert Kiesel - - * main.c: add synonym "ann" for "annotate" again - -Sun Aug 11 17:54:11 1996 Jim Kingdon - - * rcs.h (RCS_RLOG): Removed; no longer used. - -Fri Aug 9 20:16:20 1996 Ian Lance Taylor - - * server.c (dirswitch): Open the Entries file with mode "a" rather - than "w+". - (server_write_entries): Open the Entries file with mode "a" rather - than "w". - * sanity.sh (modules): Add topfiles module and 155cN tests for - above patch. - -Fri Aug 9 12:11:25 1996 Jim Kingdon - - * main.c (cmd): Add comment regarding synonyms. - -Thu Aug 8 14:40:10 1996 Jim Kingdon - - * main.c: Remove synonyms for "cvs annotate". Synonyms create - user confusion. - -Thu Aug 8 10:24:04 1996 Norbert Kiesel - - * main.c: Revert (undocumented) change to rename the cvs history - alias "his" to "hist" - -Wed Aug 7 18:26:25 1996 Ian Lance Taylor - - * server.c (cvs_output): Change str parameter to const char *. - Correct loop to print from p, not str. - (cvs_outerr): Likewise. - * cvs.h (cvs_output, cvs_outerr): Update declarations. - - * server.c (receive_partial_file): Read and discard remaining file - data on a write error. - (serve_modified): Discard data while size > 0, not >=. - -Wed Aug 7 15:11:40 1996 Norbert Kiesel - - * main.c (cmds): Add some aliases for "annotate". - (usg): Improve usage message text - (cmd_synonyms): New function to print the command synonym list - (main): Add new option --help-synonyms - -Wed Aug 7 00:07:31 1996 Ian Lance Taylor - - Keep track of subdirectories in the Entries file. - * cvs.h (enum ent_type): Define. - (struct entnode): Add type field. - (struct stickydirtag): Add subdirs field. - (Subdirs_Known, Subdir_Register, Subdir_Deregister): Declare. - (ignore_files): Update declaration for new parameter. - (FILESDONEPROC): Add entries parameter. - (DIRENTPROC, DIRLEAVEPROC): Likewise. - * entries.c (Entnode_Create): Add type parameter. Change all - callers. - (write_ent_proc): If closure is not NULL, treat it as a pointer to - an int, and set it to 1 if a node is seen which is not ENT_FILE. - (write_entries): If subdirectory information is known, but no - subdirectories were written, write an unadorned D to the file. - (Scratch_Entry): Write an R command to Entries.Log. Don't rewrite - the Entries file. - (Register): Set entfilename. Write an A command rather than an - unadorned entries line. - (fgetentent): Add cmd and sawdir parameters. Change all callers. - If CMD is not NULL, expect and return a single character command. - Handle an initial D by setting the type to ENT_SUBDIR. - (fputentent): Output an initial D for an ENT_SUBDIR entry. - (Entries_Open): Handle removal commands in Entries.Log. Record - whether subdirectory information is known in the list private - data. - (Subdirs_Known): New function. - (subdir_record): New static function. - (Subdir_Register, Subdir_Deregister): New functions. - * find_names.c (add_entries_proc): Skip entries that are not - ENT_FILE. - (add_subdir_proc): New static function. - (register_subdir_proc): New static function. - (Find_Directories): If the Entries file has subdirectory - information, get the directories out of it. Otherwise, call - find_dirs, and add the information to the Entries file. - * recurse.c (struct frame_and_entries): Define. - (do_recursion): Don't call Entries_Close until after processing - dirlist. Pass entries to filesdoneproc. Pass a frame_and_entries - structure to do_dir_proc via walklist. - (do_dir_proc): Expect a frame_and_entries structure in closure, - not a recursion_frame. Pass entries to direntproc and - dirleaveproc. - * ignore.c (ignore_files): Add entries parameter. Change all - callers. If we have subdirectory information, check for - directories in entries. - * add.c (add): If client_active, call Subdir_Register on each new - directory. - (add_directory): Add entries parameter. Change caller. Call - Subdir_Register. - * checkout.c (build_dirs_and_chdir): Call Subdir_Register. - * client.c (call_in_directory): Call Subdir_Register for newly - created directories. Call Subdirs_Known or Find_Directories after - calling Entries_Open. - (process_prune_candidates): Call Subdir_Deregister. - * commit.c (findmaxrev): Skip entries that are not ENT_FILE. - * server.c (dirswitch): Call Subdir_Register. - * update.c (update_dirent_proc): Call Subdir_Register. - (update_dirleave_proc): Call Subdir_Deregister. - * Several files: Change direntproc, dirleaveproc, and - filesdoneproc routines to expect an entries argument. - - * rcs.c (translate_symtag): New static function. - (RCS_gettag): Use translate_symtag rather than RCS_symbols. - (RCS_nodeisbranch, RCS_whatbranch): Likewise. - -Tue Aug 6 15:36:09 1996 Ian Lance Taylor - - Finish the conversion of cvs log so that it never invokes rlog. - * log.c (struct log_data): Remove dorlog field. Add nameonly, - header, long_header, statelist, and authorlist fields. - (log_usage): Remove rlog-options. Add -R, -h, -t, -b, -s, -w. - (cvslog): Don't clear opterr. Handle -h, -R, -s, -t, -w. If an - unrecognized option is seen, call usage. - (log_parse_list): New static function. - (log_fileproc): Remove code that called rlog. Check nameonly, - header, and long_header fields in log_data. - (log_version_requested): Check statelist and authorlist. - - * log.c (struct datelist): Define. - (struct log_data): Add datelist and singledatelist fields. - (log_usage): Add -d. - (cvslog): Handle -d. - (log_parse_date): New static function. - (log_fileproc): Do special single date handling. - (log_version_requested): Check datelist and singledatelist. - (log_fix_singledate): New static function. - -Mon Aug 5 23:48:16 1996 Ian Lance Taylor - - * log.c (struct option_revlist): Define. - (struct revlist): Define. - (struct log_data): Add default_branch and revlist fields. - (struct log_data_and_rcs): Define. - (log_usage): Add -N and -r. - (cvslog): Handle -N and -r. - (log_parse_revlist): New static function. - (log_fileproc): Call log_expand_revlist and log_free_revlist. - Pass log_data_and_rcs structure to log_count_print via walklist. - (log_expand_revlist, log_free_revlist): New static functions. - (log_version_requested): New static function. - (log_count_print): New static function. - (log_tree): Add log_data and revlist parameter. Change all - callers. - (log_abranch): Likewise. - (log_version): Likewise. Call log_version_requested. - (version_compare): New static function. - * sanity.sh (log): New tests for -r, -b, and -N options to log. - -Sun Aug 4 11:19:30 1996 Ian Lance Taylor - - Handle simple cases of cvs log without invoking rlog. - * log.c (struct log_data): Define. - (cvslog): Use getopt to parse options. Set up a log_data - structure, and pass it to start_recursion. - (log_fileproc): Get arguments form callerdat rather than static - variables. In simple cases, print the log information directly, - rather than invoking rlog. - (log_symbol, log_count, log_tree): New static functions. - (log_abranch, log_version, log_branch): New static functions. - * rcs.h (struct rcsnode): Add other field. - (struct rcsversnode): Add other field. - (RCS_fully_parse): Declare. - * rcs.c (getrcsrev): Move declaration to start of file. - (RCS_reparsercsfile): Add all parameter. Change all callers. - (RCS_fully_parse): New function. - (freercsnode): Free other list. - (rcsvers_delproc): Free other list. - * hash.h (enum ntype): Add RCSFIELD. - * hash.c (nodetypestring): Handle RCSFIELD. - -Sat Aug 3 19:39:54 1996 Ian Lance Taylor - - * log.c (cvslog): Correct position of CLIENT_SUPPORT #endif. - -Thu Jul 25 12:06:45 1996 Ian Lance Taylor - - * update.c (join_file): If merging a branch, and the branch - revision does not exist, just return without doing anything. - * sanity.sh (join): Add cases file7 and file8 to test above - patch. - - * server.c (cvsencrypt): Rename from encrypt, to avoid conflict - with NetBSD unistd.h. Rename all uses. - - * server.c (krb_encrypt_buffer_output): Fix typo in comment (reply - -> replay). - -Thu Jul 25 10:37:32 1996 Jim Kingdon - - * server.c (krb_encrypt_buffer_output): Fix typo in comment - (krb_recv_auth -> krb_recvauth). - -Wed Jul 24 09:28:33 1996 Jim Kingdon - - * lock.c (set_lock): Adjust comment regarding why we call stat. - -Wed Jul 24 15:06:08 1996 Ian Lance Taylor - - Add encryption support over a Kerberos connection. - * main.c (usg): Mention -x if CLIENT_SUPPORT. - (main): Handle -x. - * client.h (encrypt): Declare. - (krb_encrypt_buffer_initialize): Declare. - * client.c (kblock, sched): New static variables if - HAVE_KERBEROS. - (start_tcp_server): Remove sched local variable. Copy - cred.session into kblock. - (start_server): Turn on encryption if requested. - * server.c (kblock, sched): New static variables if - HAVE_KERBEROS. - (serve_kerberos_encrypt): New static function. - (requests): Add "Kerberos-encrypt" if HAVE_KERBEROS. - (kserver_authenticate_connection): Remove sched local variable. - Copy auth.session into kblock. - (encrypt): New global variable. - (struct krb_encrypt_buffer): Define. - (krb_encrypt_buffer_initialize): New function. - (krb_encrypt_buffer_input): New static function. - (krb_encrypt_buffer_output): New static function. - (krb_encrypt_buffer_flush): New static function. - (krb_encrypt_buffer_block): New static function. - (krb_encrypt_buffer_shutdown): New static function. - -Wed Jul 24 09:28:33 1996 Jim Kingdon - - * recurse.c (do_recursion): Add comment about calling - Name_Repository in !(which & W_LOCAL) case. - - * expand_path.c (expand_variable): Fix typo (varaible -> variable). - -Tue Jul 23 15:05:01 1996 Ian Lance Taylor - - * update.c (update_fileproc): In T_REMOVE_ENTRY case, only call - server_scratch_entry_only if ts_user is NULL. - * sanity.sh (death2): Add death2-20 test for above patch. - - * diff.c (diff_fileproc): If a file is not in the working - directory, check that the tag is present before warning that no - comparison is possible. - * sanity.sh (death2): Add death2-diff-9 and death2-diff-10 tests - for above patch. - -Tue Jul 23 12:05:42 1996 Jim Kingdon - - * tag.c (tag_check_valid): Fix indentation. - - * client.c (handle_e): Flush stdout before writing to stderr. - (handle_m): Flush stderr before writing to stdout. - -Fri Jul 19 16:02:11 1996 Mike Ladwig - - * client.c: Added NO_CLIENT_GZIP_PROCESS to deal with the MacOS - client where Gzip-stream is supported, but "gzip-file-contents" is - not. - -Fri Jul 19 16:02:11 1996 Mike Ladwig - - * repos.c: Fixed recent patch which added plain fopen rather than - CVS_FOPEN - -Mon Jul 22 22:25:53 1996 Ian Lance Taylor - - * logmsg.c (tag): New static variable. - (setup_tmpfile): Don't print the prefix before calling fmt_proc. - Free tag if it is set. - (find_type): Get type from logfile_info struct. - (fmt_proc): Likewise. Print tag information. Handle all prefix - printing. - (revision): Remove static variable. - (Update_Logfile): Remove xrevision parameter. Change all - callers. - (title_proc): Get type from logfile_info struct. - (logfile_write): Remove revision parameter. Change all callers. - * cvs.h (struct logfile_info): Define. - (Update_Logfile): Update prototype. - * commit.c (find_fileproc): Set logfile_info information. - (check_fileproc): Likewise. - (commit_filesdoneproc): Don't call ParseTag. - (update_delproc): Free logfile_info information. - * add.c (add_directory): Set logfile_info information. - * import.c (import): Likewise. - - * tag.c (tag_check_valid): The special BASE and HEAD tags are - always valid. - * sanity.sh (basica): Add basica-6.3 test for above patch. - -Mon Jul 22 14:41:20 1996 Jim Kingdon - - * update.c (merge_file): Pass 0 not NULL to checkout_file (20 Jul - 96 change changed other calls to checkout_file but missed this one). - -Sat Jul 20 00:21:54 1996 Ian Lance Taylor - - * update.c (join_file): Check whether the target of the merge is - the same as the working file revision before checking whether the - file was added during the merge. - - * update.c (scratch_file): Remove existing parameters, and add a - single parameter of type struct file_info. Change all callers. - Warn if unlink_file fails. - (checkout_file): Remove resurrecting_out parameter. Add adding - parameter. Change all callers. Remove joining code. - (join_file): Remove resurrecting parameter. Rewrite to handle - joining dead or added revisions. - * classify.c (Classify_File): If there is no user file, and the - RCS file is dead, return T_UPTODATE rather than T_CHECKOUT. - * checkout.c (checkout_proc): Set W_ATTIC if there is a join tag. - * sanity.sh (join): New set of tests for above patches. - (death): Adjust tests 86, 89, 89a, 92.1c, 95 for above patches. - (import): Adjust test 113 for above patches. - -Thu Jul 18 19:24:08 1996 Jim Kingdon - - * lock.c: Add comment explaining what locks are for. Also discuss - various changes to locking which get proposed from time to time. - - * sanity.sh (death2): Change a number of test names from death-* - to death2-*. - - * wrapper.c (wrap_setup): Don't look in repository if client_active. - * wrapper.c, cvs.h (wrap_send): New function. - * update.c (update), import.c (import): Call it. - * sanity.sh (binwrap): Do binwrap tests for remote as well as - local; tests for above fixes. - - * wrapper.c: Add a few FIXME comments. - -Thu Jul 18 18:43:50 1996 Ian Lance Taylor - - * sanity.sh (patch): Fix names of a couple of tests to say patch - rather than death2. - -Thu Jul 18 16:19:21 1996 Bill Bumgarner - and Jim Kingdon - - * add.c (add), import.c (add_rcs_file): Check for options from - wrappers and use them if specified. - * cvs.h (WrapMergeHas): Add WRAP_RCSOPTION. - * wrapper.c (WrapperEntry): Add rcsOption field. - (wrap_add): Allow a single character argument to an option. - (wrap_add): Handle -k option. - (wrap_add_entry): Handle rcsOption field. - (wrap_name_has): Handle WRAP_RCSOPTION. - * wrapper.c, cvs.h (wrap_rcsoption): New function. - * add.c, import.c, wrapper.c: Minor beautification (mostly - removing trailing spaces). - * sanity.sh (binwrap): New tests test for this feature. - -Wed Jul 17 10:14:20 1996 Ian Lance Taylor - - * checkout.c (checkout): Remove extraneous else accidentally - inserted in last checkin. - -Tue Jul 16 11:37:41 1996 Ian Lance Taylor - - * sanity.sh (import): Use quoting to avoid expansion of RCS ID - strings. - - * sanity.sh (import): Use dotest to examine the output of test - 113, and the actual contents of the file in test 116. - - * update.c (join_file): Always skip rcsmerge if the two revisions - are the same (the old code always did the rcsmerge when two -j - options were specified). - - * checkout.c (history_name): New static variable. - (checkout): Permit both tag and date to be specified. Set - history_name. - (checkout_proc): Use history_name when calling history_write. - * rcs.c (RCS_getversion): If both tag and date are set, use - RCS_whatbranch to get the branch revision number of a symbolic - tag. - (RCS_getdatebranch): If the branch revision itself is early - enough, then use it if the first branch is not early enough. Add - comment for invalid RCS file. Don't bother to check for NULL - before calling xstrdup, since xstrdup checks anyhow. - - * client.h (file_gzip_level): Declare. - * client.c (file_gzip_level): Define. - (start_server): Don't set gzip_level to zero after sending - Gzip-stream command. Set file_gzip_level after sending - gzip-file-contents command. - (send_modified): Use file_gzip_level rather than gzip_level. - * server.c (server_updated): Likewise. - (serve_gzip_contents): Likewise. - - * sanity.sh (patch): New tests. Test remote CVS handling of - unpatchable files. - - * sanity.sh (death2): Accept a '.' in the temporary file name - printed by diff. - - * rcscmds.c (RCS_checkin): Remove noerr parameter. Change all - callers. - * cvs.h (RCS_checkin): Update declaration. - * commit.c (remove_file): Pass RCS_FLAGS_QUIET to RCS_checkin. - - * history.c (history): Cast sizeof to int to use correct type in - error printf string. - (report_hrecs): Cast strlen result to int to use correct type in - printf string. - - * server.c (cvs_flusherr): Correct typo in comment. - - * rcs.c (getrcskey): Hoist three constant strcmp calls out of the - value reading loop. - - * fileattr.c (fileattr_get): Change parameter types from char * to - const char *. - (fileattr_get0, fileattr_modify, fileattr_set): Likewise. - (fileattr_newfile): Likewise. - * fileattr.h (fileattr_get): Update declaration. - (fileattr_get0, fileattr_modify, fileattr_set): Likewise. - (fileattr_newfile): Likewise. - -Thu May 16 11:12:18 1996 Mark P. Immel - and Jim Kingdon - - * client.h, client.c, checkout.c (client_send_expansions): - Pass an additional parameter indicating where the checkout is - to occur, to avoid passing the wrong information to send_files(). - * sanity.sh (basicb): New test basicb-cod-1 tests for above fix. - -Mon Jul 15 18:26:56 1996 Ian Lance Taylor - - * recurse.c (do_recursion): Require a repository before calling - Find_Names. - * repos.c (Name_Repository): Remove sanity checks which spend time - examining the filesystem. - -Mon Jul 15 1996 Jim Kingdon - - * client.c (send_file_names): Send file names as they appear - in CVS/Entries, rather than as specified (in cases where they - might differ in case). - (send_fileproc): Use file name from CVS/Entries (vers->entdata->user) - rather than file name as specified (finfo->file) when available. - -Sun Jul 14 15:39:44 1996 Mark Eichin - and Ian Lance Taylor - - Improve diff -N handling of nonexistent tags and removed files. - * diff.c (enum diff_file): New definition for whole file, moving - unnamed enum out of diff_fileproc, renaming DIFF_NEITHER to - DIFF_DIFFERENT, and adding DIFF_SAME. - (diff): Look through the repository even if only one revision is - given. - (diff_fileproc): Change empty_file to be enum diff_file. If there - is no user revision, but there is a repository file, treat it as a - removed file. Pass empty_file to diff_file_nodiff, and set it - from the return value. - (diff_file_nodiff): Change return type to enum diff_file. Replace - just_set_rev parameter with enum diff_file empty_file parameter. - Change handling of a missing tag to return an enum diff_file value - if empty_files is set, rather than reporting an error. Free tmp - if xcmp returns 0. - * sanity.sh (death2): Add tests for above patches. - -Sat Jul 13 19:11:32 1996 Jim Kingdon - - * rcs.c (annotate): In sending options to server, reverse sense of - test so that we send -f iff -f was specified, rather than iff -f was - not specified. - -Fri Jul 12 20:23:54 1996 Greg A. Woods - - * zlib.c (compress_buffer_input): add a couple of casts for - uses of z_stream's next_in and next_out - -Fri Jul 12 18:55:26 1996 Ian Lance Taylor - - * zlib.c: New file. - * client.c (log_buffer_block): Call set_block and set_nonblock, - rather than lb->buf->block. - (log_buffer_shutdown): New static function. - (get_responses_and_close): Call buf_shutdown on to_server and - from_server. - (start_server): If "Gzip-stream" is supported, use it rather than - "gzip-file-contents". - * server.c (print_error): Call buf_flush rather than - buf_send_output. - (print_pending_error, serve_valid_responses): Likewise. - (serve_expand_modules, serve_valid_requests): Likewise. - (do_cvs_command): Call buf_flush rather than buf_send_output - before the fork, and in the parent after the child has completed. - In the child, set buf_to_net and buf_from_net to NULL. - (serve_gzip_stream): New static function. - (requests): Add "Gzip-stream". - (server_cleanup): Don't do anything with buf_to_net if it is - NULL. Call buf_flush rather than buf_send_output. Call - buf_shutdown on buf_to_net and buf_from_net. Call error for an - malloc failure rather than buf_output to buf_to_net. - * buffer.h (struct buffer): Add shutdown field. - (buf_initialize): Update declaration for new shutdown parameter. - (compress_buffer_initialize): Declare. - (buf_shutdown): Declare. - * buffer.c (buf_initialize): Add shutdown parameter. Change all - callers. - (buf_shutdown): New function. - * Makefile.in (SOURCES): Add zlib.c - (OBJECTS): Add zlib.o. - ($(PROGS)): Depend upon ../zlib/libz.a. - (cvs): Link against ../zlib/libz.a. - (zlib.o): New target. - -Fri Jul 12 1996 Jim Kingdon - - * client.c (log_buffer_input, log_buffer_output): Use size_t - to avoid Visual C++ signed/unsigned warnings. - -Thu Jul 11 22:01:37 1996 Jim Kingdon - - * client.c (handle_f): Reindent. - - * client.c (mode_to_string, handle_m, handle_e, - auth_server_port_number, get_responses_and_close), server.c - (pserver_authenticate_connection, serve_modified, - serve_enable_unchanged, wait_sig, server_cleanup): Reindent. - * server.c: Remove #if 0'd block of code above - check_repository_password; it was yanked out of some unknown - context and didn't seem to be very useful. - -Thu Jul 11 20:10:21 1996 Ian Lance Taylor - - * server.c (do_cvs_command): Pass new special parameter to - buf_copy_counted. If it gets set to -1, send an 'F' response if - the client supports it, and call cvs_flusherr. - (cvs_flusherr): New function. - * cvs.h (cvs_flusherr): Declare. - * client.c (handle_f): New static function. - (responses): Add "F". - * buffer.c (buf_send_special_count): New function. - (buf_copy_counted): Add special parameter. Handle negative counts - specially. - * buffer.h (buf_send_sepcial_count): Declare. - (buf_copy_counted): Update declaration. - * lock.c (lock_wait, lock_obtained): Call cvs_flusherr. - - Change the client to use the buffer data structure. - * client.c: Include "buffer.h". - (to_server): Change to be struct buffer *. - (to_server_fp): New static variable. - (from_server): Change to be struct buffer *. - (from_server_fp): New static variable. - (from_server_logfile, to_server_logfile): Remove. - (buf_memory_error): New static function. - (struct log_buffer): Define. - (log_buffer_initialize, log_buffer_input): New static functions. - (log_buffer_output, log_buffer_flush): New static functions. - (log_buffer_block): New static function. - (struct socket_buffer): Define if NO_SOCKET_TO_FD. - (socket_buffer_initialize): New static function if - NO_SOCKET_TO_FD. - (socket_buffer_input, socket_buffer_output): Likewise. - (socket_buffer_flush): Likewise. - (read_line): Rewrite to use buf_read_line. Remove eof_ok - parameter (it was always passed as 0); change all callers. - (send_to_server): Rewrite to use buf_output. - (try_read_from_server): Rewrite to use buf_read_data. - (get_responses_and_close): Use from_server_fp and to_server_fp for - the streams. Check buf_empty_p when checking for dying gasps. - (start_server): Don't set from_server_logfile and - to_server_logfile; instead, call log_buffer_initialize. If - NO_SOCKET_TO_FD and use_socket_style, call - socket_buffer_initialize; otherwise, call - stdio_buffer_initialize. - * buffer.c: Compile if CLIENT_SUPPORT is defined. - (buf_flush): Fix comment to describe return value. - (buf_read_line): Add lenp parameter. Change all callers. Look - for a line terminated by \012 rather than \n. - * buffer.h: Compile if CLIENT_SUPPORT is defined. - (buf_read_line): Update declaration. - - * server.c (server): Initialize buf_to_net, buf_from_net, - saved_output, and saved_outerr before setting error_use_protocol. - (pserver_authenticate_connection): Don't set error_use_protocol. - Errors before the authentication is complete aren't handled - cleanly anyhow. Change error call after authentication to use - printf. - -Thu Jul 11 1996 Jim Kingdon - - * client.c (start_server): Open logfiles in binary, not text, mode. - -Wed Jul 10 19:24:22 1996 Jim Kingdon - - * server.c (print_pending_error, print_error): Remove comments - about deadlocks; they don't apply here. Add comments saying - that these functions must only be called when it is OK to - send output (which is why the deadlock concern doesn't apply). The - comments remain for server_cleanup and serve_valid_responses, - where they are an example of the "print a message and exit" - behavior which is noted in cvsclient.texi and which also exists - places like kserver_authenticate_connection. - -Wed Jul 10 18:24:46 1996 Ian Lance Taylor - - * server.c (print_error): Add comment warning about potential - deadlock. - (print_pending_error, serve_valid_responses): Likewise. - (server_cleanup): Likewise. - (serve_directory): Don't call buf_send_output. - (serve_modified, serve_notify, server, cvs_outerr): Likewise. - (serve_expand_modules): Call buf_send_output. - (serve_valid_requests): Likewise. - -Wed Jul 10 15:51:29 1996 Jim Kingdon - - * main.c (main): Print a warning for rlog command. - -Wed Jul 10 15:00:55 1996 Ian Lance Taylor - - Abstract the buffer data structure away from the underlying - communication medium. - * buffer.h (struct buffer): Remove fd and output fields. Add - input, output, flush, block, and closure fields. - (buf_initialize, buf_nonio_initialize): Declare. - (stdio_buffer_initialize, buf_flush): Declare. - (buf_read_line, buf_read_data): Declare. - * buffer.c: Include . Don't include . - (O_NONBLOCK, blocking_error): Don't define. - (buf_initialize, buf_nonio_initialize): New functions. - (buf_send_output): Use output function, rather than write. - (buf_flush): New function. - (set_nonblock, set_block): Use block function, rather than calling - fcntl. - (buf_send_counted): Don't check output. - (buf_input_data): Call input function, rather than read. - (buf_read_line, buf_read_data): New functions. - (buf_copy_lines, buf_copy_counted): Don't check output. - (stdio_buffer_initialize): New function. - (stdio_buffer_input, stdio_buffer_output): New static functions. - (stdio_bufer_flush): New static function. - * server.c: Include "getline.h". - (buf_to_net): Change to be a pointer. Change all uses. - (protocol, saved_output, saved_outerr): Likewise. - (buf_from_net): New static variable. - (no_mem_error, NO_MEM_ERROR, read_line): Remove. - (struct fd_buffer): Define. - (fd_buffer_initialize, fd_buffer_input): New static functions. - (fd_buffer_output, fd_buffer_flush): New static functions. - (fd_buffer_block): New static function. - (serve_directory): Call buf_read_line rather than read_line. - (serve_notify, server): Likewise. - (receive_partial_file): Call buf_read_data rather than fread. - (serve_modified): Call buf_read_line rather than read_line. Call - buf_read_data rather than fread. - (do_cvs_command): Initialize buffers with fd_buffer_initialize. - Change stdoutbuf, stderrbuf, and protocol_inbuf to be pointers. - (server): Initialize buffers using fd_buffer_initialize, - stdio_buffer_initialize, and buf_nonio_initialize. - (check_repository_password): Call getline rather than read_line. - -Wed Jul 10 15:51:29 1996 Jim Kingdon - - * commit.c (find_fileproc): Add comments describing a few cases - that we aren't handling. - -Tue Jul 9 04:33:03 1996 Jim Kingdon - - * rcs.c (RCS_deltas): New function, created from guts of old - annotate_fileproc. - (annotate_fileproc): Call RCS_deltas. - (RCS_fast_checkout): Call it (commented out for now; see comment - for reasons). - - * cvs.h, recurse.c (start_recursion): Add callerdat argument. - * cvs.h: Add callerdat argument to recursion processor callbacks. - * recurse.c: add it to struct recursion_frame and pass it to all - the callbacks. - * admin.c, client.c, commit.c, diff.c, edit.c, lock.c, log.c, - patch.c, rcs.c, remove.c, rtag.c, status.c, tag.c, update.c, - watch.c: Update all the functions used as callbacks. Update calls - to start_recursion. - * commit.c (find_filesdoneproc, find_fileproc, find_dirent_proc, - commit), tag.c (val_fileproc, tag_check_valid): Use callerdat - instead of a static variable. - - * recurse.c (do_recursion): Make static and move declaration to here... - * cvs.h: ...from here. - * recurse.c (do_recursion): Replace plethora of arguments with - single struct recursion_frame *. Change callers. - * recurse.c: New structure frame_and_file. Use it and existing - struct recursion_frame structures to pass info to do_file_proc and - do_dir_proc. Remove globals fileproc, filesdoneproc, direntproc, - dirleaveproc, which, flags, aflag, readlock, and dosrcs. - -Tue Jul 9 11:13:29 1996 Ian Lance Taylor - - * modules.c (do_module): Call cvs_outerr rather than fprintf. - -Mon Jul 8 1996 Jim Kingdon - - * rcs.c (RCS_fast_checkout): If -kb is not in use, open the - working file in text, not binary, mode. - -Sun Jul 7 10:36:16 1996 Jim Kingdon - - * rcscmds.c (RCS_settag): Add comment regarding moving check for - reserved tag names to RCS_check_tag. - - * rcscmds.c: Add comment regarding librarifying RCS and related - issues. This is a lightly edited version of a message I sent to - the CVS developers and didn't get flamed for, so it would appear - to be relatively uncontroversial. - - * rcs.c (annotate): Remove comment suggesting -r option and - related functionality; it is done. - -Fri Jul 5 17:19:57 1996 Ian Lance Taylor - - * client.c (last_entries): Make file static, rather than function - static within call_in_directory. - (get_responses_and_close): If last_entries is not NULL, pass it to - Entries_Close. - - * server.c (server_pause_check): Check for errors when reading - from flowcontrol_pipe. - - * client.c (call_in_directory): If dir_name is ".", call - Create_Admin if there is no CVS directory. - (send_dirent_proc): If there is no CVS subdirectory, pretend that - the directory does not exist (i.e., don't try to send any files in - the directory). - * server.c (dirswitch): If dir is "." in the top level repository, - add "/." after the Repository entry. - * sanity.sh (modules): Add test 155b for above patches. - -Thu Jul 4 15:57:34 1996 Ian Lance Taylor - - * server.c (buf_to_net): Move definition near top of file. - (read_line): Call buf_send_output rather than fflush. - (print_error): Output information to buf_to_net buffer rather than - stdout. - (print_pending_error, serve_valid_responses): Likewise. - (server_notify, do_cvs_command, server_co): Likewise. - (expand_proc, serve_expand_modules, server_prog): Likewise. - (serve_valid_requests, server_cleanup, server): Likewise. - (server_notify): Don't call fflush on stdout. - (do_cvs_command): Flush saved_output and saved_outerr to - buf_to_net before fork. Flush buf_to_net before fork. In child, - just initialize memory_error field of saved_output and - saved_outerr. - (server_cleanup): Flush buf_to_net. - (server): Initialize saved_output and saved_outerr. - (cvs_output): Add support for error_use_protocol case. - (cvs_outerr): Likewise. - * error.c (error): In HAVE_VPRINTF case, just call cvs_outerr. - - * buffer.c: New file; buffer support functions taken from - server.c. - * buffer.h: New file; declarations for buffer.c. - * server.c: Move buffer support functions into buffer.c and - buffer.h. Include "buffer.h". - * Makefile.in (SOURCES): Add buffer.c. - (OBJECTS): Add buffer.o. - (HEADERS): Add buffer.h. - -Thu Jul 4 00:12:45 1996 Jim Kingdon - - * version.c: Increment version number to 1.8.6. - -Wed Jul 3 22:31:16 1996 Jim Kingdon - - * version.c: Version 1.8.5. - -Wed Jul 3 21:51:23 1996 Ian Lance Taylor - - * server.c (blocking_error): Define macro. - (buf_send_output, buf_input_data): Use blocking_error rather than - #ifdef EWOULDBLOCK. - -Tue Jul 2 20:38:41 1996 Jim Kingdon - - * add.c (add): Change message which said "version 1.2 of foo.c - will be resurrected"; the message was confusing because it made - people think that the old contents of the file would come back - instead of the contents in the working directory. - -Mon Jul 1 01:38:57 1996 Jim Kingdon - - * find_names.c (find_dirs): Add comment explaining why we bother - with the entries stuff. - -Sat Jun 29 20:23:50 1996 Ian Lance Taylor - - * find_names.c (Find_Directories): Add entries parameter, and pass - it to find_dirs. - (find_dirs): Add entries parameter, and skip all files it names. - * cvs.h (Find_Directories): Update declaration. - * recurse.c (start_recursion): Pass NULL to Find_Directories. - (do_recursion): Pass entries to Find_Directories. - - * client.c (send_modified): Add trace output. - - * diff.c (diff_fileproc): Always call diff_file_nodiff. Handle - dead versions correctly. Handle diffs between a specified - revision to a dead file correctly. - (diff_file_nodiff): Add just_set_rev parameter. Change caller. - * patch.c (patch_fileproc): Check for dead versions. - * sanity.sh (death2): Add tests for above patches. - -Fri Jun 28 20:30:48 1996 Jim Kingdon - - For reference, this takes CVS's text segment from 271136 bytes to - 270352 bytes, a saving of 784. Not as good as I had hoped (oh well, - the source *seems* simpler at least). - * checkin.c (Checkin), commit.c (finaladd, remove_file), update.c - (join_file, checkout_file, patch_file), no_diff.c - (No_Differences), server.c (server_updated), classify.c - (Classify_File), vers_ts.c (Version_TS), diff.c (diff_file_nodiff): - Use a single struct file_info * argument instead of a bunch of - separate arguments for each of its fields. Remove local fullname - emulations. Use fullname in error messages where file had - erroneously been used. - * cvs.h: Update declarations of above functions and move them to - after the struct file_info declaration. - * server.h: Update declarations. - * add.c, admin.c, checkin.c, checkout.c, classify.c, client.c, - commit.c, diff.c, history.c, import.c, update.c, status.c, - remove.c, rtag.c, tag.c: Change callers. - - * diff.c (diff): Remove -q and -Q command options. This somehow - slipped through the cracks of the general removal of -q and -Q - command options on Jul 21 1995. Note that there is no need to - accept and ignore these options in server mode, like there is for - some of the commands, because the client has never sent -q and -Q - command options for "cvs diff". - -Fri Jun 28 16:50:18 1996 Ian Lance Taylor - - * add.c (add): Pass force_tag_match as 1 when calling Version_TS. - * sanity.sh (death2): Add test for above patch. Also add - commented out test for adding a file on a nonbranch tag, which CVS - currently, mistakenly, permits. - -Thu Jun 27 23:20:49 1996 Ian Lance Taylor - and Jim Kingdon - - * diff.c (longopts): New static array. - (diff): Handle long options and new short options in diff 2.7. - Fix arbitrary limit associated with the tmp variable. - * client.c (send_option_string): Parse options as space separated, - rather than requiring all options to be single characters. - * diff.c, options.h.in: Remove CVS_DIFFDATE; the need for it is gone - now that we have --ifdef (the new behavior is the behavior which - was the default, which is that -D specifies a date). - -Wed Jun 26 22:36:29 1996 Ian Lance Taylor - - * commit.c (check_fileproc): If there is a tag, permit adding a - file even if the RCS file already exists. - (checkaddfile): If there is a tag, use the file in the regular - repository, rather than the Attic, if it exists. - * sanity.sh (death2): New set of tests for above patch. - -Tue Jun 25 23:34:13 1996 Jim Kingdon - - * update.c (checkout_file): Add comments about two cases which - seem fishy. - - * sanity.sh (basic2, death): Add comments encouraging people to - stop making these sections bigger and more complex. I'm not (yet - at least) trying to figure out the ideal size for a section (my - current best estimate is 10-20 tests), but surely these - two sections are pushing the limit, whatever it is. - -Tue Jun 25 19:52:02 1996 Ian Lance Taylor - - * update.c (checkout_file): Rewrite handling of dead files when - joining. Avoid space leaks. Avoid unnecessary file - resurrections. - (join_file): Add checks to skip merging a dead revision onto a - dead revision, and to skip merging a common ancestor onto a dead - revision. Move check for non-existent working file after new - checks. - * sanity.sh (death): Use dotest for tests 86 and 95, and add test - death-file2-1, to test above changes. - -Mon Jun 24 11:27:37 1996 Jim Kingdon - - * update.c (merge_file): Replace file, repository, entries, and - update_dir arguments with finfo argument. Use fullname field - instead of locally emulating it. - (update_fileproc): Update caller. - (merge_file): If -kb is in effect, call it a conflict, leave - the two versions in the file and the backup file, and tell the - user to deal with it. The previous behavior was that the merge - would fail and then there was no way to do a checkin even once you - resolved the conflict (short of kludges like moving the file - aside, updating, and then moving it back). - * sanity.sh (binfiles): New tests binfiles-con* test for above - behavior. Adjust remaining tests to reflect changes in revision - numbers. - -Mon Jun 17 15:11:09 1996 Ian Lance Taylor - - * sanity.sh (import): Remove sleep. Requiring it was a bug, and - it is fixed in the current sources. - -Mon Jun 17 1996 Ian Lance Taylor - and Jim Kingdon - - * sanity.sh (TMPPWD): Set to real name of /tmp directory. - (basic2-64, conflicts-126.5): Use ${TMPPWD}. - -Mon Jun 17 1996 Ian Lance Taylor - - * rcscmds.c (RCS_checkout): Remove noerr parameter. Change all - callers. - * rcs.c (RCS_fast_checkout): Likewise. - -Mon Jun 17 1996 Ian Lance Taylor - - Cleaner implementation of tag locking code added Jun 13 1996: - * cvs.h (tag_lockdir, tag_unlockdir): Declare. - * rtag.c (locked_dir, locked_list): Remove. - (rtag_fileproc): Don't lock here; just call tag_lockdir. - (rtag_filesdoneproc): Don't unlock here; just call tag_unlockdir. - * tag.c (locked_dir, locked_list): Move farther down in file. - (tag_fileproc): Don't lock here; just call tag_lockdir. - (tag_filesdoneproc): Don't unlock here; just call tag_unlockdir. - (tag_lockdir, tag_unlockdir): New functions. - -Wed Jun 15 07:52:22 1996 Mike Ladwig - - * client.c (send_modified, update_entries): Fixed bug which didn't - handle binary file transfers in BROKEN_READWRITE_CONVERSION. - -Thu Jun 13 1996 Ian Lance Taylor - and Jim Kingdon - - * update.c (checkout_file): Call server_scratch_entry_only when a - non-pertinent file is found that does not exist. - * sanity.sh (newb): Add test case for above patch. - -Thu Jun 13 1996 Ian Lance Taylor - - * update.c (update_fileproc): Call server_scratch_entry_only when - handling T_REMOVE_ENTRY on the server. - * sanity.sh (conflicts2): Remove special case for remote server - bug fixed by above patch. - -Thu Jun 13 21:16:26 1996 Jim Kingdon - - * sanity.sh (basica-9): Update to reflect change to "sufficient - access" message. - -Thu Jun 13 20:13:55 1996 Ian Lance Taylor - and Jim Kingdon - - * recurse.c, cvs.h (start_recursion): Remove wd_is_repos argument; - add comment about meaning of which argument. Use !(which & - W_LOCAL) instead of wd_is_repos. - * admin.c, client.c, commit.c, diff.c, edit.c, lock.c, log.c, - patch.c, rcs.c, remove.c, rtag.c, status.c, tag.c, update.c, - watch.c: Change callers. This is a semantic change in only two - cases: (1) tag_check_valid, where repository was not "", and (2) - the pipeout case in checkout_proc. In both of those cases the - previous setting of wd_is_repos did not reflect whether we - actually were cd'd into the repository. - * recurse.c (start_recursion): Only check for the CVS subdirectory - if which & W_LOCAL. - * sanity.sh (devcom): Add test case fixed by above patch. - -Thu Jun 13 1996 Ian Lance Taylor - - * ignore.c (ignore_files): Skip based on the file name before - calling lstat. - - * client.c (last_register_time): New static variable. - (update_entries): Set last_register_time when calling Register. - (get_responses_and_close): If the current time is the same as - last_register_time, sleep for a section to avoid timestamp races. - -Thu Jun 13 17:24:38 1996 Jim Kingdon - - * client.c (supported_request): Reindent. - -Thu Jun 13 1996 Mark H. Wilkinson - - * options.h.in, mkmodules.c: Corrections to allow compilation of - non-client-server version. - -Thu Jun 13 1996 Ian Lance Taylor - - * tag.c (tag_check_valid_join): New function. - * cvs.h (tag_check_valid_join): Declare. - * checkout.c (join_tags_validated): New static variable. - (checkout_proc): Check validity of join tags. - * update.c (update): Likewise. - - * tag.c (tag_check_valid): Correct sizeof CVSROOTADM_HISTORY to - use CVSROOTADM_VALTAGS. - - * lock.c (Writer_Lock): If we called lock_wait to wait for a lock, - then call lock_obtained when we get it. - (set_lock): Likewise. - (lock_obtained): New static function. - -Thu Jun 13 13:55:38 1996 Ian Lance Taylor - and Jim Kingdon - - * main.c (main): If we can't read cvs root, don't say "you don't - have sufficient access"; just print the message from errno. It - might be "No such file or directory" or something else for which - "you don't have sufficient access" doesn't make any sense. - -Thu Jun 13 1996 Ian Lance Taylor - - * commit.c (remove_file): Pass noerr as 0 to RCS_checkout. - -Thu Jun 13 12:55:56 1996 Ian Lance Taylor - - * patch.c: Initialize rev1_validated and rev2_validated to 0, not 1. - -Thu Jun 13 12:55:56 1996 Jim Kingdon - - * rtag.c (locked_dir): Revise comments regarding locking; the rtag - and tag situations are different (changing from readlocking one - directory at a time to writelocking one directory at a time does - not do everything we might want, but it does fix simultaneous tags - and it doesn't make anything worse). - -Thu Jun 13 1996 Ian Lance Taylor - - Prevent simultaneous tag operations from interfering with each - other. - * rtag.c (rtag_proc): Pass rtag_filesdoneproc to start_recursion, - and pass readlock as 0. - (locked_dir, locked_list): New static variables. - (rtag_fileproc): Write lock the repository if it is not already - locked. - (rtag_filesdoneproc): New static function to unlock the - repository. - * tag.c (tag): Pass tag_filesdoneproc to start_recursion, and pass - readlock as 0. - (locked_dir, locked_list): New static variables. - (tag_fileproc): Write lock the repository if it is not already - locked. - (tag_filesdoneproc): New static function. - -Thu Jun 13 11:42:25 1996 Mike Sutton - - * sanity.sh: Allow digits in usernames. - -Wed Jun 12 16:23:03 1996 Jim Kingdon - - * client.c (send_modified, update_entries): Reindent and add - comments to BROKEN_READWRITE_CONVERSION code. - -Wed Jun 12 16:23:03 1996 Mike Ladwig - - * client.c (send_modified, update_entries): Add - BROKEN_READWRITE_CONVERSION code. - -Mon Jun 10 20:03:16 1996 J.T. Conklin - - * rcs.c (RCS_gettag): No longer set p to NULL if rcs is also NULL. - rcs will never be null, thanks to the assertion at top of function. - -Mon Jun 10 16:28:14 1996 Ian Lance Taylor - and Jim Kingdon - - * main.c (main): Ignore CVS/Root file when doing an import. - -Fri Jun 7 18:20:01 1996 Jim Kingdon - - * status.c (status_fileproc, tag_list_proc): Use cvs_output rather - than writing to stdout directly. - -Wed Jun 5 13:54:57 1996 Ian Lance Taylor - - * rcs.c (force_tag_match, tag, date): New static variables. - (annotate_fileproc): Redo the loop to look for the version - specified by tag/date/force_tag_match, and handle branches - correctly. - (annotate_usage): Mention -f, -r, and -D. - (annotate): Handle -f, -r, and -D. - -Tue Jun 4 13:38:17 1996 Ian Lance Taylor - - * rcs.c (annotate_fileproc): Skip unrelated branch deltas. - -Fri Jun 7 13:04:01 1996 Jim Kingdon - - * main.c (main): Change INITIALIZE_SOCKET_SUBSYSTEM to - SYSTEM_INITIALIZE and pass it pointers to argc and argv. Rename - CLEANUP_SOCKET_SUBSYSTEM to SYSTEM_CLEANUP. - -Wed Jun 05 10:07:29 1996 Mike Ladwig - - * import.c (add_rcs_file): make buf char[] not unsigned char[] - -Wed Jun 05 10:07:29 1996 Mike Ladwig - and Jim Kingdon - - * main.c (main): Add CLEANUP_SOCKET_SUBSYSTEM hook at end. Revise - comments regarding INITIALIZE_SOCKET_SUBSYSTEM. - -Wed Jun 05 10:07:29 1996 Mike Ladwig - and Jim Kingdon - - * main.c (main): Don't mess with signals if DONT_USE_SIGNALS is - defined. - -Thu Jun 6 15:32:41 1996 Jim Kingdon - - * modules.c (cat_module): Always format for 80 columns rather than - trying to determine how wide the screen is. The code we had for - the latter didn't cover all cases, was a portability headache, and - didn't work client/server. - -Wed Jun 05 10:07:29 1996 Mike Ladwig - - * error.c: Don't declare strerror if it is #defined. - -Wed Jun 05 10:07:29 1996 Mike Ladwig - and Jim Kingdon - - * cvs.h: If ENUMS_CAN_BE_TROUBLE, typedef Dtype to int not an enum. - -Wed Jun 05 10:07:29 1996 Mike Ladwig - and Jim Kingdon - - * update.c (update): If DONT_USE_PATCH, don't request patches. - Also call supported_request rather than reimplementing it. - -Wed Jun 05 10:07:29 1996 Mike Ladwig - - * client.c (read_line): Changed an occurence of '\n' to '\012'. - -Wed Jun 5 17:18:46 1996 Jim Kingdon - - * add.c (add_directory): Don't create the directory if noexec. - * sanity.sh (basica): New tests basica-1a10, basica-1a11 test for - above fix. - * sanity.sh (basicb): New tests basicb-2a10, basicb-2a11, - basicb-3a1 test for analogous situation with files rather than - directories. - -Tue Jun 4 13:38:17 1996 Ian Lance Taylor - - * sanity.sh: When doing a remote check, use :server: in CVSROOT. - -Wed Jun 5 13:32:40 1996 Larry Jones - and Jim Kingdon - - * ignore.c: Set ign_hold to -1 when not holding instead of 0 so - that holding an empty list works correctly. - * sanity.sh (ignore): New tests 190 & 191 for above fix. - -Wed Jun 5 1996 Jim Kingdon - - Visual C++ lint: - * client.c (update_entries): Copy the size to an unsigned variable - before comparing it with unsigned variables. - (handle_created, handle_update_existing): Prototype. - -Tue Jun 4 10:02:44 1996 Jim Kingdon - - * client.c (responses): Add Created and Update-existing responses. - * server.c (server_updated): If they are supported, use them - instead of Updated. - * client.c (struct update_entries_data): Add existp field. - (handle_checked_in, handle_updated, handle_new_entry, - handle_merged, handle_patched): Set it. - (handle_update_existing, handle_created): New functions, - for new responses. - (update_entries): Based on existp, check for - existence/nonexistence of file. - (try_read_from_server): Expand comment. - * server.c, server.h (server_updated): New argument vers. - * checkin.c (Checkin), commit.c (commit_fileproc), update.c - (update_fileproc, merge_file, join_file): Pass it. - * cvs.h: Move include of server.h after Vers_TS declaration. - * sanity.sh (conflicts2): New tests conflicts2-142d* test for - above fix. - - * sanity.sh (ignore): Fix typo in comment. - - * tag.c (tag_check_valid): Add comment clarifying when val-tags - entries are created. - -Mon Jun 3 07:26:35 1996 Jim Kingdon - - * version.c: Increment version number to 1.8.4. - -Mon Jun 3 02:20:30 1996 Noel Cragg - - * version.c: version 1.8.3. - -Thu May 30 10:07:24 1996 Jim Kingdon - - * main.c (cmds): Fix typo ("bdif" -> "dif") which was accidentally - introduced 24 May 96. - - * main.c (main_cleanup): Add comment stating default case will - never be reached. - -Wed May 29 21:43:43 1996 noel - - * main.c (main_cleanup): check to see if SIGHUP, SIGINT, SIGQUIT, - SIGPIPE, and SIGTERM are defined before using them. Also add a - default case to print out those errors numerically which are not - found. - -Wed May 29 18:43:45 1996 Jim Kingdon - - * expand_path.c (expand_path): Document LINE == 0 and allocation - of return value. - * modules.c (do_module): Pass 0, not -1, to indicate line number - not known. Free value returned from expand_path. Deal with NULL - return from expand_path. - -Wed May 29 15:56:47 1996 Greg A. Woods - - * modules.c (do_module): call expand_path() on the program name - specfied by one of '-o', '-t', or '-e' in the modules file before - passing it to run_setup(). This makes it possible to use $CVSROOT - (or indeed ~user or any other user-specified variable) to specify - pathnames for programs not installed in the normal execution path. - -Sun May 26 21:57:09 1996 Jim Kingdon - - * client.c (start_server): Don't include %s in error message; - there is no argument to go with it. Do include "internal error" - in error message since that might not be clear to the user otherwise. - -Sun May 26 11:58:13 1996 Greg A. Woods - - * root.c (set_local_cvsroot): enforce a wee bit of portability - (parse_cvsroot): same.... - (DEBUG main): same, plus style guidelines - (DEBUG error): deleted -- not necessary here (use fprintf instead) - - * mkmodules.c (modules_contents): updated notes about what must be - done if you change any of the options for a module. - (loginfo_contents): fixed grammar, re-pargraphed, and added 'echo - %s;' to the example. - (editinfo_contents): minor grammar fix. - -Sun May 26 17:51:18 1996 Jim Kingdon - - * vers_ts.c (Version_TS): Remove case where we get options from - sdtp->options. Whatever case that was intended to handle is - probably lost in the mists of time, but sdtp->options isn't set - anywhere, and I think that has been true for a long time. - * cvs.h (struct stickydirtag): remove options field. - * entries.c (freesdt): Don't free ->options. - * sanity.sh (binfiles): New tests binfiles-13a* test for above fix. - - * tag.c (check_fileproc): Use fullname not file in error message. - Say "locally modified" not "up-to-date"; the file need not match - the head revision it only need match some revision. - -Sun May 26 16:57:02 1996 Norbert Kiesel - - * tag.c: added support for new option -c to make sure all tagged - files are up-to-date - (tag): check for option and set check_uptodate - (check_fileproc): check status of file if check_uptodate is set - -Sat May 25 15:22:26 1996 Jim Kingdon - - * main.c (main): Revert change to look for a -H command option; - command option parsing should be up to each subcommand and the -H - global option works fine. - -Mon May 23 1996 Ian Lance Taylor - - * client.c (process_prune_candidates): Set prune_candidates to - NULL at the end of the function. - -Mon May 23 1996 Ian Lance Taylor - - * checkout.c (checkout): In code to handle multiple arguments, - pass preload_update_dir, not where, to Create_Admin. - (checkout_proc): Pass preload_update_dir, not where, to - Create_Admin. - -Thu May 23 19:14:35 1996 Jim Kingdon - - * server.c (server_set_sticky): Assert that update_dir != NULL. - * sanity.sh (basicb): New test; tests for Ian's fix to checkout.c - above. - -Thu May 23 1996 Ian Lance Taylor - - * patch.c (patch_fileproc): Don't ignore a file just because it is - in the Attic directory. - -Thu May 23 10:40:24 1996 Jim Kingdon - - * sanity.sh (death): New tests death-{72a,76a0,76a1} test for bug - fixed by Ian's patch_fileproc change above. - - * sanity.sh (death): Remove "temporary hack" in test 89. - - * rcs.c (RCS_fast_checkout): If error closing file, and workfile - is NULL, use sout in error message instead of workfile. - -Thu May 23 1996 Ian Lance Taylor - - * rcs.c (RCS_fast_checkout): Do a fast checkout in the case where - workfile is NULL and sout is a file name. - -Wed May 22 19:06:23 1996 Mark Immel - - * update.c (checkout_file): New arg resurrecting_out, to provide - resurrecting flag to caller. - (join_file): New arg resurrecting. Register with "0" if we are - the server and are resurrecting. - (update_fileproc): Pass the flag from checkout_file to join_file. - -Wed May 22 19:06:23 1996 Jim Kingdon - - * sanity.sh (death): Test for above fix, in test 89 and new test 89a. - -Tue May 21 09:49:04 1996 Greg A. Woods - - * update.c (update_usage): oops -- fix my spelling typo. - -Mon May 20 10:53:14 1996 Jim Kingdon - - * commit.c (find_fileproc): Call freevers_ts. - - * commit.c (find_*): Keep an ignlist, like update.c and client.c do. - * commit.c (commit): Process the files from the ignlists, once we - are connected to the server. - * sanity.sh (ignore): New tests 189e and 189f test for new - commit.c behavior (and client.c behavior, which is unchanged). - * sanity.sh (conflicts): Remove dir1 and sdir in parts of the test - where we aren't prepared for "? dir1" and similar output. - -Mon May 20 13:23:36 1996 Greg A. Woods - - * main.c (cmd_usage): minor corrections to descriptions of status, - rtag, tag, and rdiff. Sort alphabetically by command name. - -Mon May 20 10:36:07 1996 Ian Lance Taylor - - * client.c (call_in_directory): Move the call to Entries_Close - before the call to chdir, since Entries_Close examines files in - the current directory. - -Fri May 17 12:13:09 1996 Jim Kingdon - - * client.c (start_tcp_server, start_server, start_rsh_server, - read_line, filter_through_gzip, filter_through_gunzip, - call_in_directory): Reindent as needed. - - * main.c (main): Add missing #endif. Use indentation to indicate - nesting. - -Thu May 16 17:15:01 1996 Jim Kingdon - - * main.c (cmd_usage): Add "init" command. - -Thu May 16 16:45:51 1996 Noel Cragg - - * client.c (start_tcp_server): Error message modified to tell the - user to use ":server:" instead of setting CVS_CLIENT_PORT to a - negative number. - - * main.c (main): Add #ifdefs for turning off buffering of - stdio/stderr, so we don't get it by default. - -Thu May 16 01:29:47 1996 noel - - * commit.c (commit_filesdoneproc): Print the repository and root - directories as part of the error message. - - * main.c (main): Don't buffer stdout or stderr. It's inefficient, - but it then produces the right output for sanity.sh. - -Thu May 16 09:44:47 1996 Jim Kingdon - - * fileattr.c (fileattr_set): In the case where we are about to - call delproc, don't free ->data; delproc does that. - * sanity.sh (devcom): New tests devcom-b* test for this fix. - - * sanity.sh (conflicts): Remove redundant clean up from previous - tests at the beginning of the test. Use dotest a few more places. - (conflicts2): New test, tests for Ian's fix to Classify_File. - - * client.c (remove_entry_and_file): Add comment about - existence_error's. - -Sat May 16 1996 Ian Lance Taylor - - * update.c (update_dirleave_proc): Don't try to chdir .. and check - for an empty directory if there is a slash in the directory name. - -Thu May 16 09:02:59 1996 Jim Kingdon - - * sanity.sh (deep): New tests deep-4a* test for Ian's fix to - update_dirleave_proc. - -Sat May 16 1996 Ian Lance Taylor - - * main.c (main_cleanup): Report signal name before dying. - -Wed May 15 23:47:59 1996 Noel Cragg - - * main.c (usg): revert usage strings for `-H' flag change. - -Sat May 15 1996 Ian Lance Taylor - - * server.c (serve_static_directory): Return immediately if there - is a pending error. - (serve_sticky): Likewise. - (serve_modified): Read the file data even if there is a pending - error. - -Wed May 15 14:26:32 1996 Jim Kingdon - - * main.c (main): If -d and CVS/Root both specified, after writing - the value from -d into CVS/Root, use the value from -d, not the - old value from CVS/Root. Don't write CVS/Root with value from -d - until we have verified that it works. - * sanity.sh: Reenable test basica-9 and adjust for new behavior. - -Tue May 14 1996 Jim Kingdon - - * logmsg.c (do_editor): If user aborts the commit, still remove the - temporary file. - -Tue May 14 11:45:41 1996 Jim Kingdon - - * filesubr.c, cvs.h (cvs_temp_name): New function. Move L_tmpnam - define from cvs.h to filesubr.c. - * client.c, diff.c, import.c, login.c, logmsg.c, no_diff.c, - patch.c, wrapper.c: Call cvs_temp_name not tmpnam. - * login.c (login): Reindent function. - -Tue May 14 10:56:56 1996 Ian Lance Taylor - - * rcs.c (RCS_fast_checkout): If workfile is NULL, don't call chmod. - -Mon May 13 10:52:10 1996 Greg A. Woods - - * checkout.c (export_usage): note which options cause a sticky - version to be set, and which option avoids this. - * update.c (update_usage): likewise - -Sat May 11 18:57:07 1996 Jim Kingdon - - * sanity.sh: Comment out test basica-9 until I get around to - actually fixing it (the -d vs. CVS/Root change broke it). - -Fri May 10 09:39:49 1996 Jim Kingdon - - * main.c (main): -d now overrides CVS/Root. - -Thu May 9 19:45:24 1996 Jim Kingdon - - * main.c: Remove comment listing commands at beginning. It was - out of date and redundant with the help. - -Thu May 9 09:33:55 1996 Greg A. Woods - - * main.c: add 'init' to opening comment listing commands - - * mkmodules.c (init): fix to recognize argc==-1 as hint to call - usage() [should make "cvs init -H" work as expected] - -Wed May 8 15:02:49 1996 Jim Kingdon - - * sanity.sh: Set EXPR in the case that the expr in the path is the - one that we want. - -Wed May 8 14:06:24 1996 Greg A. Woods - - * sanity.sh (test): - convert all '[' to test ala GCD - -Wed May 8 13:46:56 1996 Greg A. Woods - - * sanity.sh (expr): - make a valiant attempt to find GNU expr - - Patch from Larry Jones: - sanity test deep-4 failed with "expr: arg list too long" - sanity test 56 failed because the stderr and stdout output was not - interleaved as expected. - sanity test modules-155a4 failed with "ls: illegal option -- 1" - - * main.c (main): - Patch from Larry Jones for SysV setvbuf - -Tue May 7 16:41:16 1996 Jim Kingdon - - * version.c: Increment version number to 1.8.2 to work around fact - that CVS 1.8 (confusingly) calls itself 1.8.1 not 1.8. - -Tue May 7 10:44:20 MET DST 1996 Norbert Kiesel - - * rcs.c (rcsvers_delproc): fix memory leak by freeing author - field. - -Mon May 6 10:40:05 1996 Jim Kingdon - - * sanity.sh (conflicts): New test conflicts-126.5 tests for bug - which Ian fixed May 5 in update.c - -Mon May 6 06:00:10 1996 Benjamin J. Lee - - * Version 1.8.1 - -Sun May 5 21:39:02 1996 Jim Kingdon - - * vers_ts.c (Version_TS): If sdtp is NULL, go ahead and check - RCS_getexpand for options. Fixes binaries and non-unix clients. - * sanity.sh: Fix binfiles-5.5 to test for the correct behavior - rather than the buggy behavior which existed when the binfiles-5.5 - test was written. - (binfiles-14c,binfiles-14f): Likewise. - -Sun May 5 17:38:21 1996 Benjamin J. Lee - - Integrated changes submitted by Ian Taylor - - * update.c (update_dirent_proc): cvs co -p doesn't print - anything when run from an empty directory. - - * import.c (import_descend_dir): Check for a file in the - repository which will be checked out to the same name as the - directory. - -Sat May 4 12:33:02 1996 Ian Lance Taylor - - Extract the head revision directly from the RCS file when - possible, rather than execing co. - * rcs.c (RCS_reparsercsfile): Set delta_pos field. - (getrcskey): Add lenp parameter. Change all callers. - (RCS_fast_checkout): New function. - (annotate_fileproc): If PARTIAL is not set, just fseek to - delta_pos. - * rcs.h (struct rcsnode): Add delta_pos field. - (RCS_fast_checkout): Declare. - * diff.c (diff_file_nodiff): Call RCS_fast_checkout rather than - RCS_checkout. - * import.c (update_rcs_file): Likewise. - * no_diff.c (No_Difference): Likewise. - * patch.c (patch_fileproc): Likewise. - * update.c (checkout_file): Likewise. - (patch_file): Likewise. - (join_file): Likewise. - -Sat May 4 12:33:02 1996 Ian Lance Taylor - - * classify.c (Classify_File): Don't report a conflict for a - pending remove if somebody else has already removed the file. - -Thu May 2 13:34:37 1996 Benjamin J. Lee - - * Version 1.7.88 - -Thu May 2 01:40:55 1996 Benjamin J. Lee - - * server.c (HAVE_INITGROUPS): Use initgroups() only if - located by configure, in the event a system has crypt(), but - no initgroups() - -Wed May 01 21:08:21 1996 noel - - * client.c (filter_through_gunzip): use "gzip -d" instead of - "gunzip," since there's no good reason (on NT at least) to have an - extra copy of gzip.exe copied to gunzip.exe (Arrrrgh! No symbolic - links!). - - * mkmodules.c (init): check to see that we have the correct number - of arguments or print out the usage message (used to be argc > 1, - should be argc != 1, because help forces argc == -1 as a special - case). - -Wed May 1 18:05:02 1996 Jim Kingdon - - * sanity.sh (basica): When testing rejection of reserved tag name, - use BASE instead of RESERVED. - -Wed May 1 15:15:11 1996 Tom Jarmolowski - - * rcs.c (linevector_delete): Only copy up to vec->nlines - nlines, - not to vec->nlines. - -Wed May 1 15:43:21 1996 Jim Kingdon - - * rcscmds.c (RCS_settag): Instead of reserving all tag names - containing only uppercase letters, reserve only BASE and HEAD. - * sanity.sh (mflag): Revert 26 Mar change; use all-uppercase tag - name again. - -Wed May 1 15:15:11 1996 Tom Jarmolowski - - * rcs.c (linevector_add): Move increment of i out of larger - statement, to avoid assumptions about evaluation order. - -Tue Apr 30 15:46:03 1996 Jim Kingdon - - * Version 1.7.87. - - * server.c (check_password): Don't use ANSI string concatenation. - Reindent function. - -Mon Apr 29 10:48:38 1996 Noel Cragg - - * root.c (parse_cvsroot): removed "rsh" as an alias to "server" in - the method section. - - * main.c (main): new variable help so we can support the `cvs -H - cmd' convention. Reverts change of 26 Apr 96 which removed this - feature. - -Sun Apr 28 14:57:38 1996 Noel Cragg - - * main.c (main): update error message if parse_cvsroot fails. - * server.c (serve_root): same. - (serve_init): same. - - * client.c (start_tcp_server): get rid of the "fall through" - stuff, now that we have access methods. - (start_server): switch off the access method to choose routine - that starts the server. - (start_tcp_server): tofd wasn't getting set to -1 early enough, - because a call to error for bind or gethostbyname might fail and - the subsequent error check to see if the connection had been made - would fail. - - * root.c: new variable method_names for error reporting purposes. - -Sun Apr 28 17:22:15 1996 Noel Cragg - - * server.c: moved kerberos #includes from main.c for the - kserver_authenticate_connection routine. - -Fri Apr 26 07:59:44 1996 Noel Cragg - - * server.c (serve_init): use the new return value from - parse_cvsroot. - (serve_root): same. - * main.c (main): same. - - * root.c (parse_cvsroot): fix indentation, add a return value - which tells whether the command succeeded or failed. - - * main.c (main): move the setting of the UMASK environment - variable inside the stuff that gets done if the user is NOT asking - for help, so we don't signal any errors prematurely (don't want to - give an error because we can't parse an environment variable - correctly if the user asks for help). Similar mods for the code - that tries to get the working directory. - - Also make CVSADM_Root a local variable instead of a global, since - its scope is only about 20 lines here! - - * server.c (kserver_authenticate_connection): moved code from - main.c to clean up MAIN. Makes sense, since we already have a - pserver_authenticate_connection. - (pserver_authenticate_connection): rename from - authenticate_connection. - - * main.c (main): reorganized the routine to eliminate variables - help, help_commands, and version_flag. Now the routine is much - clearer, since we don't have to be checking to see if these - variables are set. One behavior that was a bug/feature which is - now gone is an invocation like "cvs -H rtag" -- previously this - would give usage for rtag, but now gives usage for cvs itself. - The first behavior didn't make sense, especially since we say in - the docs that command-line flags are position-specific. *Reverted - Above* - -Thu Apr 25 20:05:10 1996 Noel Cragg - - * main.c (main): make sure we have a valid command name before we - do anything else (moved the thing that looks for a command in CMDS - to right after the GETOPT loop). Added `kserver' and `pserver' to - the table so they will be recognized; set their functions to - SERVER so that help will be given when asked for. - - * expand_path.c (expand_variable): return CVSroot_original rather - than CVSroot_directory. - - * main.c (main): save CVSroot in the env rather than - CVSroot_original, since we might not have called PARSE_CVSROOT - (this can happen if we use the -H option to a command). - - * root.c (parse_cvsroot): the parsing method was bogus for - guessing when we had hostnames vs. directories specified. Any - ambiguity should be removed by having the user specify the access - method. If the access method isn't specified, choose - server_method if the string contains a colon or local_method - otherwise. - - * Changed CVSroot_remote back to client_active since the code - reads better. - -Wed Apr 24 17:27:53 1996 Norbert Kiesel - - * vers_ts.c (Version_TS): xmalloc enough space (1 more - byte). Thanks to purify! - -Mon Apr 22 00:38:08 1996 Noel Cragg - - * create_adm.c (Create_Admin): pass CVSroot_original instead of - CVSroot_directory (oops!). - * update.c (update_filesdone_proc): same. - - * server.c (serve_root): modify to use parse_cvsroot rather than - goofing around with other variables. Will need to fix - parse_cvsroot to have a return value so we can return an error and - quit gracefully if in server mode. - (serve_init): same. - - * main.c: modify command table to remove client_* routines, since - they no longer exist. - (main): don't try to switch off non-existent field in command - table! ;-) - - * client.h (client_*): removed prototypes for now non-existent - functions. - - * client.c: remove proto for get_cvs_password, since it is now in - cvs.h. Modify routines to use new globals that describe CVSROOT - rather than client_active, server_host, server_user, and - server_cvsroot. - (parse_cvsroot): removed function, since a more generic version - now lives in root.c. - (connect_to_pserver): remove call to parse_cvsroot, since main.c - has already done it for us. - (client_*): removed all of these routines, since they only call - parse_cvsroot and then their respective operation functions. - Since main.c has already called parse_cvsroot, we shouldn't bother - with the extra function call, since client-server diffs are - already handled in the core routines themselves. - - * main.c: remove CVSroot as a global variable. Remove - use_authenticating_server variable since we have a new - `CVSroot_method' variable instead. - (main): add `CVSroot' as a local variable. Call parse_cvsroot - after we're sure we have the right setting for `CVSroot.' - - * login.c (login): update to use new global variables. Instead of - old behavior which let the user type in user@host when prompted, - it makes them do it in CVSROOT proper. The routine still lets the - user type the password, however. - (get_cvs_password): make sure that CVSROOT is fully qualified - before trying to find the entry in the .cvspass file. - * cvs.h: add prototype for get_cvs_password. - - * add.c: use new globals that describe CVSROOT. - * admin.c: same. - * checkout.c: same. - * commit.c: same. - * create_adm.c: same. - * diff.c: same. - * edit.c: same. - * expand_path.c: same. - * history.c: same. - * ignore.c: same. - * import.c: same. - * log.c: same. - * mkmodules.c: same. - * modules.c: same. - * parseinfo.c: same. - * patch.c: same. - * rcs.c: same. - * recurse.c: same. - * release.c: same. - * remove.c: same. - * repos.c: same. - * rtag.c: same. - * status.c: same. - * tag.c: same. - * update.c: same. - * watch.c: same. - * wrapper.c: same. - - * root.c (Name_Root): remove error message that reports missing - CVSROOT, since new code in main.c will catch it and also print out - an error. - (parse_cvsroot): new function -- takes a CVSROOT string and breaks - it up into its component parts -- method, hostname, username, and - repository directory. Sets new global variables that describe the - repository location more precisely: CVSroot_original, - CVSroot_remote, CVSroot_method, CVSroot_username, - CVSroot_hostname, CVSroot_directory for use by all other - functions. Checks for obvious errors in format of string. - (main): a short routine to test parse_cvsroot from the command - line. - * cvs.h: add prototype for parse_cvsroot and extern definitions - for new globals. - - * cvs.h: removed CVSroot variable, since we don't want other - routines using the raw CVSROOT (also helped to find all of the - refs to the variable!). - -Fri Apr 19 11:22:35 1996 Benjamin J. Lee - - * Version 1.7.86 - -Thu Apr 18 1996 Jim Kingdon - - * client.c (try_read_from_server): Compare return value from fwrite - with a size_t not an int (Visual C++ lint). - -Wed Apr 17 11:56:32 1996 Jim Kingdon - - * client.c (try_read_from_server): New function. - (read_from_server): Use it. - (read_counted_file): New function. - * client.c, server.c: Add Template response. - * cvs.h (CVSADM_TEMPLATE): Added. - * logmsg.c (do_editor): If repository is NULL, use CVSADM_TEMPLATE - file in place of rcsinfo. - * server.c, server.h (server_template): New function. - * create_adm.c (Create_Admin): Call it. - -Tue Apr 16 13:56:06 1996 Jim Kingdon - - * repos.c (Name_Repository): Fix comments. - * create_adm.c (Create_Admin): Fix indentation. - -Wed Apr 10 16:46:54 1996 Jim Kingdon - - * options.h.in: Include relevant information here rather than - citing (former) FAQ. - - * ChangeLog-9395: Fix typo in introductory paragraph. - -Wed Apr 10 14:55:10 1996 code by Mike Spengler mks@msc.edu - comments by Jim Kingdon - - * filesubr.c (unlink_file_dir,deep_remove_dir): Don't call unlink - on something which might be a directory; check using isdir instead. - -Wed Apr 10 14:55:10 1996 Jim Kingdon - - * checkout.c (build_dirs_and_chdir): Pass path, not cp, to - Create_Admin. The former is the correct update dir. - * sanity.sh (modules): New tests modules-155* test, for above fix. - -Mon Apr 8 13:53:27 1996 Samuel Tardieu - - * rcs.c (annotate_fileproc): If the file is not under CVS control, - return instead of dumping a core. Don't bug on files with an empty - first revision. - -Fri Mar 29 16:08:28 1996 Jim Kingdon - - * rcs.c (annotate_fileproc): If last line of add-chunk is not - newline terminated, end the loop when we find that out. - -Fri Mar 29 16:59:34 1996 Norbert Kiesel - - * rcs.c (annotate_fileproc): allow last line of add-chunk not to - be newline terminated - -Thu Mar 28 10:56:36 1996 Jim Kingdon - - Add more diff tests: - * sanity.sh (basic2): Use dotest for test 61. - (basica): Add test basica-6.2. - (branches): Add tests branches-14.4 and branches-14.5. - (basic1): Remove tests 19, 20, 25, and 26. The only thing this - might miss out on is diff's interaction with added and removed - files, but those tests didn't test that very well anyway. - - * rcs.c (RCS_getrevtime): Add comment regarding years after 1999. - - * rcs.c: Add "cvs annotate" command and related code. - (getrcskey): Move special handling of RCSDESC from here to - callers. Handle those keys (desc, log, text) which do not - end in a semicolon. - * rcs.h (RCSVers): Add author field. - * rcs.c (RCS_reparsercsfile): Set it. - * cvs.h (annotate), main.c (cmd_usage, cmds), client.h client.c - (client_annotate), server.c (serve_annotate, requests): Usual - machinery to add a new command. - * sanity.sh (basica): Test cvs annotate. - - * sanity.sh (branches): More tests, of things like adding files on - the trunk after a branch has been made. - -Tue Mar 26 09:48:49 1996 Jim Kingdon - - * expand_path.c: Don't declare free and xmalloc; cvs.h already - takes care of that. - - * sanity.sh (mflag): Don't use tag name reserved to CVS. - - NT local changes plus miscellaneous things noticed in the process: - * import.c (add_rcs_file): Use binary mode to write RCS file. Use - \012 where linefeed is intended. Copy data a small block at a - time, until we hit EOF, rather than trying to read the whole file - into memory at once. - * client.c (send_modified): Add comments regarding st_size. - * commit.c (commit): Add comments regarding binary mode and read(). - * logmsg.c (do_editor): Add comments regarding st_size. - * server.c (server_updated): Use binary mode to read file we are - sending. - - * rcscmds.c (RCS_settag): Complain if user tries to add a tag name - reserved to CVS. - * sanity.sh (basica): Test for this behavior. - - * sanity.sh (binfiles): New tests test ability to change keyword - expansion. - -Mon Mar 25 1996 Jim Kingdon - - * cvs.h, filesubr.c (expand_wild): New function. - * recurse.c (start_recursion): Call expand_wild at beginning and - free its results at the end. - * cvs.h, subr.c (xrealloc): Make argument and return value void *. - * client.h, client.c (send_file_names): Add flags argument. If - SEND_EXPAND_WILD flag is passed, call expand_wild at beginning and - free its results at the end. - * admin.c, add.c, log.c, tag.c, status.c, edit.c, watch.c, - update.c, commit.c, remove.c, client.c, diff.c: Update callers. - -Fri Mar 22 10:09:55 1996 Jim Kingdon - - * error.c (error, fperror): Exit with status EXIT_FAILURE rather - than STATUS. We had been neglecting to check for 256, and the - value of providing a count of errors is probably minimal anyway. - * add.c, modules.c, mkmodules.c, tag.c, server.c, main.c, - import.c, client.c, scramble.c, recurse.c: Exit with status - EXIT_FAILURE rather than 1. On VMS, 1 is success, not failure. - * main.c (main): Return EXIT_FAILURE or 0. The value of providing - a count of errors is minimal. - - * client.c (init_sockaddr): Exit with status 1 rather than - EXIT_FAILURE. The latter apparently doesn't exist on SunOS4. - Reindent function. - -Mon Mar 18 14:28:00 1996 Jim Kingdon - - * cvs.h, ignore.c: New variable ign_case. - * ignore.c (ign_name): If it is set, match in a case-insensitive - fashion. - * server.c (serve_case): New function. - (requests): Add Case request. - * client.c (start_server): If FILENAMES_CASE_INSENSITIVE is - defined, send Case request. - -Sat Mar 16 08:20:01 1996 Jim Kingdon - - For reference, this change takes cvs's text segment from 315392 - bytes to 311296 bytes (one 4096 byte page). - * cvs.h (struct file_info): Add fullname field. - * recurse.c (do_file_proc): Set it. - * commit.c (find_fileproc), client.c (send_fileproc), commit.c - (check_fileproc), diff.c (diff_fileproc), edit.c - (unedit_fileproc), patch.c (patch_fileproc), remove.c - (remove_fileproc), rtag.c (rtag_fileproc), tag.c (tag_fileproc), - update.c (update_fileproc), watch.c (watchers_fileproc): Use it - instead of computing it each time. - * diff.c (diff_fileproc), remove.c (remove_fileproc): Use fullname - where we had been (bogusly) omitting the directory from user - messages. - * edit.c (unedit_fileproc, edit_fileproc): If we cannot close - CVSADM_NOTIFY, mention CVSADM_NOTIFY rather than finfo->file in - error message. - * rtag.c (rtag_fileproc), tag.c (tag_fileproc): Reindent. - -Fri Mar 15 15:12:11 1996 Norbert Kiesel - - * server.h: fix prototype of server_pause_check (was - server_check_pause) - -Thu Mar 14 1996 Jim Kingdon - - * vers_ts.c (Version_TS), entries.c (Scratch_Entry, AddEntryNode): - Change findnode to findnode_fn. - - * main.c: Depending on HAVE_WINSOCK_H, include winsock.h or - declare gethostname. - * cvs.h: Don't declare it here. - -Thu Mar 14 07:06:59 1996 Jim Kingdon - - * commit.c (find_fileproc): If vn_user is NULL and ts_user is not, - print an error rather than silently succeeding. - * sanity.sh (basica-notadded): New test, for above fix. - (dotest_internal): New function. - (dotest,dotest_fail): Call it instead of duplicating code between - these two functions. - - * sanity.sh: Skip tests binfiles-9 through binfiles-13 for remote. - - * options.h.in: Adjust comment to reflect kfogel change. - -Thu Mar 14 01:38:30 1996 Karl Fogel - - * options.h.in (AUTH_CLIENT_SUPPORT): turn on by default. - -Wed Mar 13 09:25:56 1996 Jim Kingdon - - * vers_ts.c (Version_TS): Don't try to override options from rcs - file if there isn't an rcs file (e.g. called from send_fileproc). - This fixes a bug detected by test 59 in "make remotecheck". - - * rcs.c (RCS_reparsercsfile, RCS_getexpand): Assert that argument - is not NULL. - - Fix a gcc -Wall warning: - * rcs.c, rcs.h (RCS_getexpand): New function. - * vers_ts.c (Version_TS): Call it. - * rcs.c (RCS_reparsercsfile): Make static. - - Add a "cvs init" command. This is needed because cvsinit.sh - invoked mkmodules which doesn't exist any more. - * mkmodules.c: Break filelist out of mkmodules function, rename - struct _checkout_file to struct admin_file (for namespace - correctness), and add contents field. - (init,mkdir_if_needed): New functions. - * cvs.h (init): Declare. - * main.c (cmds): Add init. - (main): If command is init, don't require cvsroot to exist. - * client.c, client.h (client_init, send_init_command): New functions. - * client.c (start_server): Don't send Root request if command is init. - * server.c (serve_init): New function. - (requests): Add "init". - -Wed Mar 13 09:51:03 MET 1996 Norbert Kiesel - - * vers_ts.c (Version_TS): set options to default option if the - file if no -k option but -A was given. This avoids the (wrong) - update message for binary files which are up-to-date when - running 'cvs -A'. - - * update.c (checkout_file): remove test of -k option stored in the - file itself because it was moved to vers_ts.c - - * sanity.sh: added tests for the above fix. - -Tue Mar 12 13:47:09 1996 Jim Kingdon - - * hash.c (findnode): Adjust comment regarding errors. - - * hash.c (findnode, findnode_fn): Assert that key != NULL. This - way the check still happens even if the function is later - rewritten to not start out by calling hashp. - -Mon Mar 11 10:21:05 1996 Jim Kingdon - - * sanity.sh: If expr accepts multi-line patterns but is too - liberal in matching them, print a warning but keep going. - - * sanity.sh: Add QUESTION variable, analogous to PLUS. Use it - instead of \? to match a question mark. - - * cvs.h (CVSMODULE_OPTS, CVSMODULE_SPEC): Move from here... - * modules.c: ...to here. They are only used here and the code to - handle the syntax of modules files should not be scattered all over. - * modules.c (CVSMODULE_OPTS): Add "+" as first character. - * sanity.sh (modules): New tests 148a0 and 148a1 test for - above-fixed bug. - -Mon Mar 11 13:11:04 1996 Samuel Tardieu - - * modules.c (cat_module): set optind to 0 to force getopt() to - reinitialize its internal nextchar - -Mon Mar 11 00:09:14 1996 Jim Kingdon - - * hash.c (findnode, findnode_fn): Revert changes of 7-8 Mar 1996. - The correct style is to assert() that key != NULL (see HACKING), - which is already done in the hashp function. - * fileattr.c (fileattr_delproc): Likewise, assert() that - node->data != NULL rather than trying to deal with it being NULL. - -Fri Mar 8 01:31:04 1996 Greg A. Woods - - * hash.c (findnode_fn): one more place to avoid calling hashp() - with a NULL key - -Thu Mar 7 17:30:01 1996 Greg A. Woods - - * hash.c (findnode): also return NULL if key is not set - [[ reported by Chris_Eich@optilink.optilink.dsccc.com, and - supposedly in a PR that should be marked "fixed"..... ]] - - * fileattr.c (fileattr_set): set node->data to NULL after freeing - it to prevent subsequent accesses - (fileattr_delproc): don't free node->data if it's NULL, and set it - to NULL after freeing - [[ reported by Chris_Eich@optilink.optilink.dsccc.com, and - supposedly in a PR that should be marked "fixed"..... ]] - -Fri Mar 1 14:56:08 1996 Jim Kingdon - - * sanity.sh (basica): New test basica-4a tests for bug fixed by - sam@inf.enst.fr on 1 Mar 96. - -Fri Mar 1 18:10:49 1996 Samuel Tardieu - - * tag.c (check_fileproc): Check for file existence before trying - to tag it. - -Fri Mar 1 07:51:29 1996 Jim Kingdon - - * client.c (update_entries): If command is export, set options to - NULL. - -Thu Feb 29 16:54:14 1996 Jim Kingdon - - * lock.c (write_lock, Reader_Lock): Remove - BOGUS_UNLESS_PROVEN_OTHERWISE code. It was pretty bogus, and has - been ifdeffed out for a long time. - * cvs.h (CVSTFL): Removed; no longer used. - - * cvsrc.c, cvs.h (read_cvsrc): Pass in command name rather than - using global variable command_name. - * main.c (command_name): Initialize to "", not "cvs" so that error - messages don't say "cvs cvs". Update calls to read_cvsrc to pass - in command_name or "cvs" as appropriate. - * sanity.sh (basica): New test basica-9 tests for above-fixed bug. - - * lock.c: Rename unlock to lock_simple_remove to avoid conflict - with builtin function on QNX. - -Thu Feb 29 17:02:22 1996 Samuel Tardieu - - * fileattr.c (fileattr_get): Removed NULL pointer dereference - which occurred in the absence of default attribute. - -Thu Feb 29 07:36:57 1996 J.T. Conklin - - * rcs.c (RCS_isbranch, RCS_whatbranch): Remove no longer used file - argument, swap order of remaining two arguments to be like other - RCS_* functions. - (RCS_nodeisbranch): swap order of arguments to be like other RCS_* - functions. - * rcs.h (RCS_isbranch, RCS_whatbranch, RCS_nodeisbranch): Update - prototypes for above changes. - * commit.c, rtag.c, status.c, tag.c: Update for above calling - convention changes. - -Thu Feb 29 08:39:03 1996 Jim Kingdon - - * client.c (start_server): Revert changes which claimed to fall - back to a different way of connecting. Add comments explaining - why. (I don't think the changes did what they claimed, anyway). - Use indentation rather than comments to line up #if, #else, and - #endif. - - * patch.c (patch, patch_fileproc): Revert change to add optional - arguments to -c and -u. Optional arguments are evil and in - violation of the POSIX argument syntax guidelines. The correct - way to do this is -C and -U. Also change DIFF back to "diff" in - output (see comments). - - gcc -Wall lint: - * client.c (copy_a_file): Declare p inside the #ifdef in which is - it used. - * commit.c (remove_file): Remove unused variable p. - * commit.c (checkaddfile): Remove unused variables p. - * rcs.c (RCS_isbranch): Remove unused variable p. - * rcs.c: Remove unused declarations and definitions of - parse_rcs_proc, rcsnode_delproc, rcslist, and repository. - * rtag.c (rtag_fileproc): Remove unused variable p. - * patch.c (patch_fileproc): Remove unused variable p. - * tag.c (val_fileproc): Remove unused variable node. - * client.c, import.c, lock.c, server.c: Cast pid_t to long before - passing it to %ld. - - * cvs.h: Don't prototype gethostname; merely declare it (on linux, - second argument is size_t not int). - -Thu Feb 29 10:29:25 MET 1996 Norbert Kiesel (nk) - - * sanity.sh: added "cat > /dev/null" to loginfo entry to avoid the - SIGPIPE signal - -Thu Feb 29 10:28:25 MET 1996 Norbert Kiesel (nk) - - * patch.c: added new variable diff_opt - (patch): allow optional parameter to -c and -u option, send it to - server - (patch_fileproc): cleaned up the code which prints the current - filename. For "-s" option, print the pathname relative to CVSROOT - instead of just the filename. - - * filesubr.c (xchmod): added cast to shut up gcc - - * cvs.h: added prototype for gethostname - -Thu Feb 29 10:27:25 MET 1996 Norbert Kiesel (nk) - - * lock.c (write_lock), (Reader_Lock), import.c (update_rcs_file), - client.c (update_entries), (send_modified), server.c (server), - (receive_file), (server_updated): use %ld for printing pid_t - variables - -Thu Feb 29 02:22:12 1996 Benjamin J. Lee - - * run.c (run_exec): Added VMS return status support. - -Thu Feb 29 01:07:43 1996 Benjamin J. Lee - - * client.c (send_to_server): wrtn wasn't being declared under - VMS for some reason. - -Wed Feb 28 23:27:04 1996 Benjamin J. Lee - - * client.c: Changed #ifdef VMS && NO_SOCKET_TO_FD to - #if defined(VMS) && defined(NO_SOCKET_TO_FD) - -Wed Feb 28 22:28:43 1996 Benjamin J. Lee - - * build_src.com: Added DCL command procedure to build - and link CVS client for VMS. - -Wed Feb 28 22:07:20 1996 Benjamin J. Lee - - * client.c: VMS CVS client specific changes. - - Added USE_DIRECT_TCP to allow CVS_PORT to be used to specify - a TCP connection port (no Kerberos). Changed - start_kerberos_server() to start_tcp_server(). - - In copy_a_file(): transform a backup file to have a - VMS-friendly name. - - Added HAVE_CONFIG_H to include "config.h". - - start_server() will starts the first successful of any - mutually exclusive methods of starting the CVS server - which might be enabled. - - Initialized use_socket_style and server_sock for VMS in - start_server(). - -Wed Feb 28 21:49:48 1996 Benjamin J. Lee - - * find_names.c, recurse.c, cvs.h: Changed Find_Dirs() to - Find_Directories(). - * cvs.h: Added VMS filenames enabled through USE_VMS_FILENAMES - VMS POSIX will require to use the regular CVS filenames - while VMS is #define'd. - -Wed Feb 28 21:26:22 1996 Benjamin J. Lee - - * ignore.c: Added the patterns *.olb *.exe _$* *$ to default - ignore list for VMS. - -Wed Feb 28 13:32:28 1996 Jim Kingdon - - * logmsg.c (do_editor): Fix indentation. - -Wed Feb 28 12:56:49 1996 Benjamin J. Lee - - * logmsg.c (do_editor): If no editor is defined, exit and print - a message. - -Wed Feb 28 10:40:25 1996 Jim Kingdon - - * vers_ts.c (time_stamp, time_stamp_server): Reindent and revise - comments. - -Tue Feb 27 23:57:55 1996 Benjamin J. Lee - - * vers_ts.c: gmtime() returns NULL on some systems (VMS) - revert to local time via ctime() if GMT is not avaiable. - -Tue Feb 27 13:07:45 1996 J.T. Conklin - - The changes listed below cause cvs to parse each rcs file (and - free the associated rcsnode after the file has been processed) - sequentially. cvs used to parse all files in a directory, an - approach that does not scale to huge repositories with lots - of revisions/branches/tags/etc. - - * cvs.h (struct file_info): Removed srcfiles field. Added rcs - (node) field. - * recurse.c (do_recursion): Removed code that pre-parsed all - rcs files in the directory. - (do_file_proc): Parse current rcs file. - * rcs.c (RCS_parsefiles, parse_rcs_proc, RCS_addnode): Removed. - (RCS_isbranch, RCS_whatbranch): Changed srcfiles argument to - rcs (node). - * rcs.h (RCS_parsefiles, RCS_addnode): Removed prototypes. - (RCS_isbranch, RCS_whatbranch): Updated prototypes. - * add.c, admin.c, checkin.c, checkout.c, classify.c, client.c, - commit.c, diff.c, history.c, import.c, log.c, patch.c, remove.c, - rtag.c, status.c, tag.c, update.c, vers_ts: Updated for above - calling convention / data structure changes. - -Mon Feb 26 16:07:56 1996 Jim Kingdon - - * Version 1.7.3. - - * Version 1.7.2. - -Mon Feb 26 1996 Jim Kingdon - - * recurse.c (start_recursion): Use last_component rather than - checking for '/' directly. - (do_dir_proc): Likewise. - - Visual C++ lint: - * client.c (send_to_server): Change wrtn to size_t. - (connect_to_pserver): Put tofd and fromfd declarations inside - #ifndef NO_SOCKET_TO_FD. - * scramble.c (shifts): Change from array of char to array of - unsigned char. - -Mon Feb 26 13:31:25 1996 Jim Kingdon - - * server.c (check_repository_password): Remove unused variables - linelen, ch. - - * client.c (send_file_names): Translate ISDIRSEP characters to '/'. - -Sat Feb 24 21:25:46 1996 Jim Kingdon - - * checkout.c (safe_location): Re-indent one line. - -Sat Feb 24 10:50:42 1996 Karl Fogel - - * checkout.c (safe_location): put assignment to hardpath[x] in an - `else'-clause, so we don't do it when x == -1. - -Sat Feb 24 01:40:28 1996 Marcus Daniels - via Karl Fogel - - * server.c (check_repository_password): Return by reference an - optional username, the `host_user', from the passwd file. The - host_user will be the user-id under which the cvs repository is - run. - (check_repository_password): Use `read_line' instead of fgets to - allow for passwords larger than 32 characters, as well as the - optional host user argument. - (check_password): Modify to use host_user. - (authenticate_connection): Modify to use host_user. - -Sat Feb 24 01:05:21 1996 Karl Fogel - - * scramble.c (descramble): just shift descrambled string to get - rid of tag char, instead of allocating a whole new copy. - (scramble): cast return value of xmalloc to avoid unsightly - compiler warnings. - - * options.h.in (RCSBIN_DFLT): don't refer to AUTH_SERVER_SUPPORT - in comment anymore, now that it's not defined in this file. - -Fri Feb 23 1996 Jim Kingdon - - * client.c: Ifdef HAVE_WINSOCK_H, include winsock.h - instead of sys/socket.h and friends. - * login.c: Don't include sys/socket.h and friends. - * login.c (login): Only fclose fp in the case where it was - successfully fopen'd. - * login.c: Declare getpass. - * filesubr.c, cvs.h (get_homedir): New function. - * cvsrc.c, expand_path.c, history.c, login.c: Call it instead - of getenv ("HOME"). - -Fri Feb 23 09:23:20 1996 Jim Kingdon - - * client.c (connect_to_pserver): Remove unused variable host. - * login.c: Include getline.h. - (login): Remove unused variables i and username. - (get_cvs_password): Move free of linebuf to where it actually will - be called. Add a "return NULL" at the end of the function to shut - up gcc -Wall. - - * options.h.in: Remove AUTH_SERVER_SUPPORT. - * client.h (authenticate_connection): Declare. - * scramble.c (scramble): Cast char to unsigned char before using - it to look up in table (char might be signed). - * server.c [AUTH_SERVER_SUPPORT]: Include grp.h - (authenticate_connection): Remove unused variables len and - server_user. - - * sanity.sh (basica): Add comments regarding creating a top-level - directory. - (basic1): Don't try to remove first-dir and - ${CVSROOT_DIRNAME}/first-dir at start of test; tests are now - responsible for cleaning up at the end. - (PLUS,DOTSTAR,ENDANCHOR): Add comments regarding fixed GNU expr. - -Thu Feb 22 22:34:11 1996 Jim Kingdon - - * cvs.h: Remove alloca cruft. - -Wed Feb 21 07:30:16 1996 J.T. Conklin - - * modules.c (do_module): call free_cwd before exiting. - - * recurse.c: Removed entries global variable. - (do_recursion): Declare entries. Moved call to Entries_Close so - entries list is closed on all code paths. - (start_recursion): Removed call to Entries_Close, entries list has - been moved to do_recursion only. - -Tue Feb 20 22:10:05 1996 Jim Kingdon - - * update.c (update_dirent_proc): If dir lacks a CVS subdirectory, - don't recurse into it. - * sanity.sh (conflicts): Test for above-fixed bug. - - * update.c (merge_file): Use write_letter not printf. - -Tue Feb 20 12:34:07 EST 1996: Gary Oberbrunner - and Jim Kingdon - - * history.c (history_write): Change username to char * and call - getcaller() to set it. Setting username accidentally got deleted - 8 Feb 96. - * sanity.sh: Revise test 64 to test for above-fixed bug. - * sanity.sh (PLUS): New variable, work around yet another GNU expr - bug. - -Tue Feb 20 14:07:50 1996 Jim Kingdon - - * sanity.sh: Merge test rtags into test basic2. They never were - capable of running separately of each other. - - * sanity.sh (deep): New test, to test ability to operate in deeply - nested directories (more quickly than basic2 test did). - (basic2,rtags): Remove directories dir3 and dir4. Remove file8, - file10, file12, file9, file11, file13, file15, file16, file17. - These additional files slowed down the tests considerably without - significantly increasing coverage. - - * sanity.sh (PROG): New variable. Use it instead of "cvs" - to match the name cvs prints out for itself. - -Mon Feb 19 09:00:29 1996 Jim Kingdon - - This fixes a bug whereby old default attributes would get - clobbered instead of added to on "cvs watch add". - * hash.c (findnode): Don't check for key == NULL; let the - assertion in hashp take care of it. - * fileattr.h, fileattr.c (fileattr_get): If filename is NULL, - return default attributes. - - * client.c (send_repository): Fix indentation. - -Mon Feb 19 01:10:01 1996 Karl Fogel - - * login.c (login): print out full repos so user knows which server - she's logging into. - - * client.c (send_repository): die if `repos' is NULL. This is a - lame solution; see comments in code. - -Thu Feb 15 15:04:01 1996 Jim Kingdon - - * error.c (error): Free entire and mess when done with them. - - * sanity.sh (info): Correct syntax of .cvsrc file. - - * cvs.h, expand_path.c, edit.c, parseinfo.c, wrapper.c: - expand_path now takes arguments containing file and line for error - message, and it prints the error message itself. - * sanity.sh (info-6a): Test printing of error message. - - * expand_path.c (expand_variable): Add USER internal variable. - * sanity.sh (info): Test USER and CVSROOT internal variables too. - -Wed Feb 14 19:11:08 1996 Jim Kingdon - - * main.c (usg): Add -s option. - -Tue Feb 13 20:26:06 1996 Jim Kingdon - - gcc -Wall lint: - * mkmodules.c (mkmodules_usage): Remove declaration of - non-existent function. - * cvs.h (mkmodules): Declare. - -Mon Feb 12 12:20:04 1996 Jim Kingdon - - * mkmodules.c: Rename main to mkmodules and remove various pieces - of scaffolding which it used to emulate non-existent parts of CVS. - Change calling convention to just take a char * not argc,argv. - Save and restore working directory. - * commit.c (commit_filesdoneproc): Call it if checking files into - CVSROOT. - * Makefile.in (SOURCES): Add mkmodules.c. - (OBJECTS): Add mkmodules.o. - (MSOURCES,MOBJECTS): Removed. - (COMMON_OBJECTS): Removed; move former contents into OBJECTS. - Update other rules accordingly. - * sanity.sh: Adjust to reflect nonexistence of mkmodules. - - These changes introduce functions cvs_output and cvs_outerr; - eventually all server output will go through them rather than - stdio directly. - * server.c (saved_output, saved_outerr): New variables. - (do_cvs_command): Initialize them. - (buf_output): Don't require that buf->output be set; saved_* use - this to shove some data in a buffer which buf_copy_lines will - later want to get data from. - * server.c, cvs.h (cvs_output, cvs_outerr): New functions. - * mkmodules.c (cvs_outerr): New function, so error() works. - * error.c: Reindent. Don't declare program_name and command_name; - cvs.h declares them. - (error): Use vasprintf and cvs_outerr (or fputs in the - error_use_protocol case) rather than stdio directly. - * import.c (import_descend_dir): Remove kludge which had prevented - messages from error() from being out of order with respect to - messages from printf; cvs_output and cvs_outerr are a cleaner - solution to the problem. - (add_log, import): Use cvs_output not printf. - * update.c (write_letter): Use cvs_output not printf. - (checkout_file): Use write_letter not printf. - * sanity.sh: Use dotest for test 56 (test that output is actually - correct). In theory should test that the import.c bug is fixed, - but I was unable to reproduce the bug (it is timing dependent). - -Mon Feb 12 16:07:45 1996 Norbert Kiesel - - * commit.c: define last_register_time - (commit): make sure cvs doesn't exit in the same second it wrote - the last timestamp - (commit_fileproc): set last_register_time - (finaladd): set last_register_time - - * run.c, cvs.h: Changed more Popen() to run_popen() - -Mon Feb 12 03:06:50 1996 Benjamin J. Lee - - * release.c, rtag.c, tag.c: changed 'delete' to 'delete_flag' - to avoid symbol collision with DEC C RTL function delete() - -Mon Feb 12 03:01:48 1996 Benjamin J. Lee - - * mkmodules.c: changed 'void Lock_Cleanup()' to 'void static - Lock_Cleanup() to avoid conflict with more substantial - Lock_Cleanup() in lock.c - -Mon Feb 12 02:50:19 1996 Benjamin J. Lee - - * edit.c, logmsg.c, release.c, run.c: Changed Popen() to - run_popen(). VMS' linker is not case sensitive and considered - popen() and Popen() to be identical symbols. - -Sun Feb 11 10:51:14 1996 Jim Kingdon - - * main.c (main) [!CLIENT_SUPPORT]: Silently ignore gzip level - rather than printing usage message. - - * cvs.h, expand_path.c (variable_list): New variable. - (variable_set): New function. - * hash.h (enum ntype), hash.c (nodetypestring): Add VARIABLE. - * expand_path.c (expand_path, expand_variable): Reindent. - (expand_variable): Use user variables not environment variables - for ${=VAR} syntax. The environment variables didn't work - client/server. - * main.c (main): Process new -s global option. - * client.c (send_variable_proc): New function. - (start_server): Call it, to send user variables. - * server.c (serve_set): New function. - (requests): Add Set request. - * sanity.sh: Revise info test to use user variables rather than - environment variables. - -Sat Feb 10 16:55:37 1996 Jim Kingdon - - By itself this is only a small cleanup, but in the long run it - will be way cool (for reference, it takes CVS's text segment from - 290816 bytes to 294912, which I expect will be made up by future - changes which this enables): - * cvs.h (struct file_info): Added. - (FILEPROC): Replace 5 args with single struct file_info *. - * recurse.c (do_file_proc): Adjust args to fileproc; passed in - instead of from globals. - (do_recursion): Call do_file_proc accordingly. Remove srcfiles - global variable. - * update.c (update_fileproc): Renamed from update_file_proc. - * admin.c, client.c, commit.c, diff.c, edit.c, log.c, patch.c, - remove.c, rtag.c, status.c, tag.c, update.c, watch.c: Update - fileprocs to new calling convention. - -Fri Feb 9 15:30:32 1996 Jim Kingdon - - * expand_path.c (expand_variable): Accept a variable name starting - with '=' as a way to specify an environment variable. - * sanity.sh (info): New tests, for above behavior. - - * Makefile.in (clean): Also remove check.log check.plog. - - * import.c (comtable): Remove SYSTEM_COMMENT_TABLE; the table - should *not* depend on what kind of machine the server happens to - be. Add "mak", "rc", "dlg", "frm", and "bas" types which were - formerly included via SYSTEM_COMMENT_TABLE. - - * cvs.h, rcs.h, add.c, checkin.c, classify.c, commit.c, diff.c, - import.c, patch.c, rcs.c, update.c, vers_ts.c: Remove - DEATH_SUPPORT ifdefs. They were introduced to facilitate merging - between Cygnus and Berliner variants of CVS, not because it was - intended to subset CVS this way. And they clutter up the code - quite a bit. - * cvs.h, create_adm.c, main.c, update.c: Likewise, remove - CVSADM_ROOT ifdefs (it is still a #define, of course). I believe - they had a more-or-less similar motivation. - - * sanity.sh: Move setting of HOME from ignore test to the start of - the tests so it applies to all tests. - (CVS): Remove -f; the above change takes care of it. - - * rcs.h (RCS_MERGE): Removed; unused. - - * commit.c (checkaddfile): Fix memory leak. - - * admin.c, commit.c, diff.c, log.c, mkmodules.c: Pass -x,v/ to RCS - commands. - - * rcscmds.c, cvs.h (RCS_checkin): New function. - * checkin.c, commit.c, import.c: Call it, rather than run_*. - * cvs.h, commit.c: Remove DEATH_STATE define; the behavior - which used to be the default (DEATH_STATE) is now the only one. - Failing to define DEATH_STATE has been commented as obsolete at - least since CVS 1.5. We still can read repositories created with - such a CVS, however. - * rcs.h, rcs.c: Adjust comments regarding DEATH_STATE. - * subr.c (make_message_rcslegal): Add comment, describing - allocation of returned value. - -Fri Feb 9 09:53:44 MET 1996 Norbert Kiesel - - * sanity.sh: use "${testcvs}" instead of "cvs" in devcom tests - - * hash.c: fix "dereferencing a NULL pointer" bug triggered with - "cvs watch add" - (findnode): return NULL if key == NULL - (hashp): assert (key != NULL) - -Fri Feb 9 00:46:47 1996 Jim Kingdon - - * rcs.c (RCS_reparsercsfile): Remove unused variable date. - - * myndbm.c (mydbm_load_file): Fix typo ('015' -> '\015'). - -Thu Feb 8 13:00:00 1996 Jim Kingdon - - * rcs.c (RCS_parse, RCS_parsercsfile, RCS_reparsercsfile), - fileattr.c (fileattr_read), myndbm.c (myndbm_open): - Use FOPEN_BINARY_READ. - * fileattr.c (fileattr_write), myndbm.c (myndbm_close): - Use FOPEN_BINARY_WRITE. - * history.c (history_write, read_hrecs): Specify OPEN_BINARY. - * rcs.c: Remove calls to abort. - * myndbm.c (myndbm_load_file): Ignore CRs from ends of lines - if present. - * myndbm.c, fileattr.c: While I am at it, change \n to \012 - a few places where LF is intended. - * history.c (history_write): Use getenv ("HOME"), not getpwnam, - to find home directory. If it isn't set, just keep going; don't - print a message. - * rcscmds.c, cvs.h (RCS_checkout): New function. - * update.c, checkin.c, commit.c, diff.c, import.c, no_diff.c, - patch.c: Call it instead of run_*. - * patch.c (patch_fileproc): Clean up inconsistent handling of - noexec flag. - * rcscmds.c (RCS_*): Pass -x,v/ to RCS commands; elsewhere in - CVS it is assumed that ,v is a suffix. - -Fri Feb 2 14:07:32 1996 J.T. Conklin - - * rcs.h (struct rcsnode): Remove dates field (list of rcsversnodes - indexed by date). CVS maintained this list for each RCS file even - though it was never used. This resulted in higher then necessary - memory requirements (and run time too). Even if revision info was - needed, CVS' List data structure is inappropriate because can't - handle duplicate keys. The above was discovered by tracking down - a memory leak. - * rcs.c (RCS_reparsercsfile): Don't build dates list. - (freercsnode): Don't delete dates list. - (rcsvers_delproc): Free date field. - (null_delproc): Removed. - -Thu Feb 1 12:28:33 1996 Jim Kingdon - - * remove.c (cvsremove): Don't tell user the name of the program - which they use to remove files; we don't have any way of knowing - that, and besides which they might use a GUI or emacs 'dired' anyway. - * update.c (update_filesdone_proc, update_dirleave_proc): Call - unlink_file_dir instead of rm -rf. - * options.h.in: Remove RM; no longer used. - - * sanity.sh: New tests devcom-a* test "cvs watch add", - "cvs watch remove", and "cvs watchers". - - * sanity.sh: New test 171a0 tests for watch.c bug just fixed by kfogel. - - * Most .c files: Remove rcsids. - * cvs.h: Remove USE macro. - -Thu Feb 1 13:07:15 1996 J.T. Conklin - - * tag.c, rtag.c: Update various comments to reflect function name - changes. - -Thu Feb 1 14:14:31 1996 Karl Fogel - - * recurse.c (do_recursion): comment #endif. - - * edit.c (notify_check): surround with #ifdef CLIENT_SUPPORT; else - CVS won't compile if CLIENT_SUPPORT is undefined. - - * edit.h (notify_check): surround declaration with #ifdef - CLIENT_SUPPORT. - - * watch.c (watch): if argc <= 1, then just give usage (previously - was "argc == -1"). - -Thu Feb 1 12:28:33 1996 Jim Kingdon - - * README-rm-add: Remove information which is now in cvs.texinfo. - - * sanity.sh: Remove basic0 tests. Move a few to new tests - basica-1a* (but there is no need to test that *every* command - gracefully does nothing on an empty directory; exhaustive testing - is impractical and the generic recursion processor handles this - anyway). - - * sanity.sh: New tests 69a* test use of update -p to restore old - version of dead file. - -Wed Jan 31 18:32:34 1996 Jim Kingdon - - * ChangeLog-9395: Remove duplicate entries from 1996 which - accidentally got into this file. - - * client.c (read_line, read_from_server): Change "premature end of - file from server" message to "end of file from server (consult - above messages if any)" because 99% of the time it means rsh has - printed an error message and exited. - -Wed Jan 31 15:09:51 1996 J.T. Conklin - - * edit.c (ncheck_fileproc): Fix memory leak; free line before - returning. - -Tue Jan 30 18:06:12 1996 Jim Kingdon - - * recurse.c (do_recursion): Add comment about the fact that we - don't have locks in place at certain points. - -Tue Jan 30 09:43:34 1996 Vince Demarco - - * edit.c (notify_proc): have notify_proc call expand_path with - the name of the filter program. The user may have used a - cvs environmental variable. (Popen will expand it, but it may not - use the correct value) - -Tue Jan 30 09:43:34 1996 Jim Kingdon - - * ChangeLog: take the pre-1996 changes and put them in a new file - ChangeLog-9395. - * ChangeLog-9194: Renamed from ChangeLog.fsf. - * ChangeLog-9194, ChangeLog-9395, ChangeLog: Add additional text - explaining the difference between all these logs and pointing to - older logs. - * Makefile.in (DISTFILES): Add ChangeLog-9194 and ChangeLog-9395; - remove ChangeLog.fsf. - - * modules.c (do_module): Don't fall through from 'l' to 'o' case - of option processing switch statement. - -Tue Jan 30 06:50:19 1996 J.T. Conklin - - * client.c (send_repository): Fix memory leak; free adm_name - before returning. - * diff.c (diff_file_nodiff): Fix memory leak; free xvers before - returning. - * rtag.c (rtag_fileproc): Fix memory leak; if branch_mode is set, - free rev before returning. - * status.c (status_fileproc, tag_list_proc): Fix memory leak; free - return value of RCS_whatbranch. - * tag.c (tag_fileproc): Fix memory leak; free vers before - returning. - (val_fileproc): Fix memory leak; free return value of RCS_gettag. - * watch.c (watch_modify_watchers): Fix memory leak; free mynewattr - before returning. - -Tue Jan 30 09:43:34 1996 Jim Kingdon - - * lock.c (readers_exist): If stat gave an error, print an error - message saying it was from stat, rather than from "reading - directory". Skip the message completely if it was an - existence_error. - - * sanity.sh (branches): New tests (branches off of branches, etc.). - -Tue Jan 30 11:55:34 MET 1996 Norbert Kiesel - - * main.c (main): Add change to run getopt_long twice again. - -Mon Jan 29 15:59:31 1996 Jim Kingdon - - gcc -Wall lint: - * client.c: Include edit.h - -Sun Jan 28 09:45:53 1996 Jim Kingdon - - * edit.c, edit.h (mark_up_to_date): New function, to remove file - in CVS/Base. - * client.c (update_entries): Call it if file is up to date. - * checkin.c (Checkin): Call it in non-server (local) case. - * sanity.sh: New test 182.5, tests for above-fixed bug. - -Sun Jan 28 01:07:22 1996 Jim Kingdon (kingdon@beezley) - - * client.c (change_mode): Separate out CHMOD_BROKEN code to parse - mode_string, rather than going through a mode_t. Cleaner than - the previous CHMOD_BROKEN code (which also had a typo of && not &). - -Sat Jan 27 23:29:46 1996 Jim Kingdon (kingdon@beezley) - - * edit.c (edit_fileproc): Check for EACCESS as well as EEXIST. - -Sat Jan 27 16:26:30 1996 Karl Fogel (kfogel@floss.cyclic.com) - - * client.c (notified_a_file): use rename_file() instead of - rename() (but temporarily set `noexec' to 0 so it runs - unconditionally). - (change_mode): deal with CHMOD_BROKEN. - -Fri Jan 26 00:14:00 1996 Karl Fogel - - * server.c: renamed `dirname' to `dir_name', to avoid conflicts - with system headers. - - * client.c: renamed `dirname' and `last_dirname' to `dir_name' and - last_dir_name' (see above). Not strictly necessary, but - consistency is nice -- as long as you do it all the time. - -Thu Jan 25 00:41:59 1996 Karl Fogel - - * options.h.in (AUTH_SERVER_SUPPORT, AUTH_CLIENT_SUPPORT): change - comment now that no longer under construction. - -Wed Jan 24 15:25:22 1996 Jim Kingdon - - * Version 1.7.1. - - * Version 1.7. - -Sat Jan 20 00:05:08 1996 Jim Kingdon - - * Version 1.6.87. - -Mon Jan 15 18:14:55 1996 Gary Oberbrunner - and Jim Kingdon - - * tag.c (val_direntproc): New function to ignore - nonexistent dirs when recursing to check tag validity. - (tag_check_valid): Pass it to start_recursion. - * sanity.sh (death): New tests 65a0-65a6 cause test 74 to test for - above-fixed bug. - -Mon Jan 15 12:55:37 1996 Jim Kingdon - - * main.c: Revert change to run getopt_long twice. This can go in - after 1.7. - -Mon Jan 15 13:03:28 1996 Norbert Kiesel - - * filesubr.c (deep_remove_dir): added test of EEXIST for nonempty - directory (Posix states that both ENOTEMPTY (BSD) and EEXIST - (SYSV) are valid) - - * main.c (main): run getopt_long twice to allow command-line - suppression of reading the cvsrc file - -Fri Jan 12 10:02:43 1996 Jim Kingdon - - * Version 1.6.86. - -Thu Jan 11 23:28:05 1996 J.T. Conklin - and Jim Kingdon - - * fileattr.h (fileattr_startdir): Add comment about REPOS == NULL. - * fileattr.c (fileattr_read, fileattr_write): Assert that - fileattr_stored_repos != NULL. - (fileattr_free): If fileattr_stored_repos is NULL, don't free it. - -Thu Jan 11 18:03:21 1996 Karl Fogel - - * scramble.c (descramble): deal with DIAGNOSTIC better. - -Thu Jan 11 12:04:42 1996 Norbert Kiesel - - * main.c: remove CVS_NOADMIN. - - * options.h.in: remove CVS_NOADMIN - -Thu Jan 11 10:28:44 1996 Karl Fogel - - * scramble.c (descramble): make sure the string returned is safe - to free(). - -Wed Jan 10 01:11:23 1996 Jim Kingdon - - * server.c (serve_notify): Cast return value from malloc. - - * edit.c (notify_do): Use struct assignment, not struct - initialization (which SunOS4 /bin/cc doesn't have). - -Tue Jan 9 09:41:29 1996 Jim Kingdon - - * Version 1.6.85. - - We use version numbers instead of patchlevels. But there was some - confusing patchlevel stuff lying around. Nuke it: - * Makefile.in (HEADERS): Remove patchlevel.h - * patchlevel.h: Removed. - * main.c: Don't include patchlevel.h. - (main): Don't print patch level. - - * server.c (check_repository_password): Check for errors from - system calls; reindent function. - -Tue Jan 9 23:15:30 1996 Karl Fogel - - * expand_path.c: fix comments (explain expand_path()'s behavior - correctly). - -Tue Jan 9 09:41:29 1996 Jim Kingdon - - * edit.c (notify_proc): After copying in string following %s, - don't clobber it. Instead set up q to end of string. - - * watch.c (watch_modify_watchers), edit.c (editor_set): Fix sense - of test in trying to decide whether attributes are changed. - - * cvs.h (CVSROOTADM_USERS): New macro. - * edit.c (notify_do): Look up notifyee in CVSROOTADM_USERS if it - exists. - -Tue Jan 9 21:39:45 1996 Karl Fogel - - * expand_path.c: don't redundantly #include things that cvs.h - already #includes (i.e., stdio.h, ctype.h, string[s].h). - -Tue Jan 9 09:41:29 1996 Jim Kingdon - - * ignore.c (ign_default): Add *.obj. - - * server.c: Put /* */ around #endif comment. - -Mon Jan 8 20:37:17 1996 Karl Fogel - - * client.c (connect_to_pserver): check return value of recv(). - -Mon Jan 8 11:37:57 1996 Jim Kingdon - - * client.c (connect_to_pserver): Check for error from connect; - reindent function. - - * sanity.sh (4.75): Use dotest, so we get a PASS if test passes. - - * sanity.sh (dotest): New argument OUTPUT2. - (188a): Use it instead of \|. - - * sanity.sh (import): Avoid using string $ followed by Id followed - by $ in sanity.sh source, in case sanity.sh itself is under CVS. - I hate keyword expansion. - - * sanity.sh: If expr cannot handle multiline expressions, fail and - tell the user to get one which can. - - * release.c (release_delete): Remove unused variable retcode. - -Fri Jan 5 13:30:00 1996 Jim Kingdon - - * release.c (release_delete): Call unlink_file_dir rather - than "rm -rf". - -Thu Jan 4 09:58:30 1996 Jim Kingdon - - * commit.c (find_fileproc): Print "nothing known about foo" and - return 1 if the file doesn't exist and isn't in CVS/Entries. - (commit): If the recursion over find_fileproc returns an error, - print "correct above errors first!" just like local CVS. - * sanity.sh (basica): Test for above-fixed bug. - - * release.c (release): If we are the client, only unedit if the - server supports it. - - * sanity.sh: Remove STARTANCHOR stuff; expr patterns are - automatically anchored to the start. ENDANCHOR remains. - - * commit.c (commit): Don't start the server until we have - determined that there is something to commit. - -Thu Jan 4 09:48:33 1996 Ben Laurie - and Jim Kingdon - - * client.c (start_server): dup the file descriptor before - fdopening it. - -Wed Jan 3 18:25:25 1996 Jim Kingdon - - * sanity.sh: Remove tests 5, 5.5, and 5.75. All that stuff is - tested elsewhere. - - * ignore.c (ign_default): Change CVS* to CVS CVS.adm. CVS* is too - broad, especially in a case-insensitive filesystem. - - * Makefile.in (cvsbug): version.c is in srcdir. - -Wed Jan 3 17:30:45 1996 Phi-Long Tran - - * modules.c (do_module): Honor error_use_protocol in printing trace. - * server.c (server_register): Move check for options NULL to above - printing of the trace. - -Wed Jan 3 01:19:53 1996 Mark Immel - and Jim Kingdon - - * update.c (checkout_file): Do not resurrect file on join if it - doesn't contain the revisions we are joining. Probably not a - perfect test, but should be an improvement. - * sanity.sh (death): New death-file4-* tests, for bug fixed above. - -Wed Jan 3 01:19:53 1996 Jim Kingdon - - * add.c, admin.c, checkout.c, client.c, commit.c, diff.c, edit.c, - history.c, import.c, log.c, patch.c, release.c, remove.c, rtag.c, - status.c, tag.c, update.c, watch.c: In calling send_to_server, - pass \012 not \n. On the Mac \n is CR, not LF, and we want to - send LF. I didn't try to deal with whether files in CVSADM should - contain CR or LF--in fact there is some code in client.c which - reads \n from CVSADM files and passes it to send_to_server; it - needs to be cleaned up one way or the other. - - * entries.c (Entries_Open): Don't try to close fpin twice. - - * client.c (update_entries): Fix typo ("strlen (filename + 10)" - -> "strlen (filename) + 10"). - - * commit.c (checkaddfile): Remove arbitrary limit. - -Tue Jan 2 11:25:22 1996 Jim Kingdon - - * commit.c (commit): Only pass files which were modified, added, - or removed to send_file_names. This has as a side effect a - semantic change--the up-to-date check is now skipped for other - files--but probably a good one, or at least not a bad one. - * sanity.sh (basica): New test; tests for bug fixed above. - * sanity.sh (187a3): Adjust for new 'cvs commit' output. Set up - DOTSTAR to match arbitrary text (another GNU expr bug/misfeature, - sigh). - - * sanity.sh: Test that the commit in test 43 actually worked. - Merge tests basic2 and basic3 and make them independent of basic1. - (pass,fail): Don't insert spurious space. - (45.5): Fix typo in directory name. - -Tue Jan 2 13:00:00 1996 Jim Kingdon - - Visual C++ lint: - * myndbm.c: Prototype write_item. - -Tue Jan 2 11:25:22 1996 Jim Kingdon - - gcc -Wall lint: - * client.c (client_expand_modules): Pass error message not "" to error. - * client.c (supported_request), server.c (supported_response): - Return a value (gcc -Wall can't know that error doesn't return). - * commit.c (copy_ulist): Return a value. - * history.c (fill_hrec): Don't make assumptions about whether - time_t is "int" or "long" or what. - * cvs.h: Declare link_file. - * server.c: Include fileattr.h. - * server.c (server_notify): Remove unused variable val. - * tag.c (val_fileproc): Remove unused variable foundtag. - -Mon Jan 1 09:49:16 1996 Jim Kingdon - - * Version 1.6.5. - - * Version 1.6.4. - - * filesubr.c (link_file): Add comment about link vs. copy semantics. - - * cvs.h (struct vers_ts): Fix comments. - * commit.c (commit): Before we ask for a log message, figure out - what is modified and what is not and pass the information to - do_editor. - (copy_ulist,find_fileproc): New helper functions for above code. - - * client.c (read_line): When writing to from_server_logfile, write - the \n too. - - * client.c (send_files): No longer call send_file_names. - * client.h: Update comment. - * add.c, admin.c, commit.c, diff.c, edit.c, log.c, remove.c, - status.c, tag.c, update.c, watch.c: Call send_file_names before - send_files. - * client.c: New variables module_argc, module_argv. - (client_expand_modules): Set them, to arguments. - (client_send_expansions): Use them instead of modules_vector to - send arguments. - * sanity.sh (modules): Add test of modules -d flag. - - -For older changes see ChangeLog-9395. + +For older changes see ChangeLog-96. diff --git a/gnu/usr.bin/cvs/src/ChangeLog-96 b/gnu/usr.bin/cvs/src/ChangeLog-96 new file mode 100644 index 00000000000..6c3a2a12d64 --- /dev/null +++ b/gnu/usr.bin/cvs/src/ChangeLog-96 @@ -0,0 +1,4434 @@ +Mon Dec 30 15:43:48 1996 Abe Feldman + + * checkout.c (build_dirs_and_chdir): Reproduced block containing + Create_Admin, placing it before Subdir_Register. + * sanity.sh (basicb): Added tests 1a and 9a to test above changes + to the checkout command. + +Mon Dec 30 13:29:14 1996 uz@wuschel.ibb.schwaben.com (Ullrich von Bassewitz) + and Jim Kingdon + + * cvs.h (CVSEDITPREFIXLEN): New define. + * logmsg.c (do_editor): Use CVSEDITPREFIXLEN when deciding whether + to strip off CVSEDITPREFIX and when telling the user what we will + strip off. + +Sun Dec 22 22:06:49 1996 Jim Kingdon + + * logmsg.c (do_verify): If noexec, skip the verification *without* + printing a message. Use cvs_output not printf. Skip verification + for client_active. + +Wed Dec 18 12:27:35 1996 Jim Kingdon + + * repos.c (Name_Repository): Add comment regarding wording of + "*PANIC*" error message. + +1996-12-18 Jim Kingdon + + * client.c (call_in_directory): If the directory we are about + to create is the same as CVSADM as seen by fncmp (for example, + it is "cvs" and filenames are case-insensitive), then give a + fatal error. + +Tue Dec 17 13:14:22 1996 Jim Kingdon + + * options.h.in: Add comments about SETXID security holes. + + * logmsg.c (do_verify): Reindent comments. Check errno if return + code from run_exec is -1, not if it is 1. + * sanity.sh (info): Move tests info-4 and info-8 to end and rename + them. Add verifymsg tests. Instead of forcibly removing loginfo, + remove it nicely (test info-11). + +Tue Dec 17 12:45:32 1996 Abe Feldman + + * commit.c, import.c: Call do_verify as well as do_editor. + * cvs.h (CVSROOTADM_VERIFYMSG): Define. + * logmsg.c, cvs.h (do_verify, verifymsg_proc): New functions. + (verifymsg_script): New variable. + * mkmodules.c (filelist): Add CVSROOTADM_VERIFYMSG. + +Mon Dec 16 13:24:47 1996 Ian Lance Taylor + + * lock.c (remove_locks): New static function, copied from part of + Lock_Cleanup. + (Lock_Cleanup): Call remove_locks. + (Writer_Lock): Call remove_locks rather than Lock_Cleanup when + waiting for a lock. + +Thu Dec 12 10:36:37 1996 Jim Kingdon + + * login.c (get_cvs_password): If CVS_PASSWORD is set, print a + warning (and then proceed to ignore it). It was a documented + feature, so we should point people who were using it to the + replacement. + +Mon Dec 9 12:35:43 1996 Ian Lance Taylor + + * server.c (server_updated): Change comment to only worry about + umask in the rsh case. + (server): Create the temporary directory, and change the mode to + S_IRWXU. + (switch_to_user): Set the umask to 0, not 077. + +Mon Dec 9 10:58:28 1996 Jim Blandy + + * login.c (get_cvs_password): Remove code to check for value of + CVS_PASSWORD. Keeping cleartext passwords in environment + variables is a really bad idea on Unix, since anyone can print + out a processes' environment using 'ps' (on BSD variants + anyway). Update help message. + +Fri Dec 6 15:59:40 1996 Jim Kingdon + + * sanity.sh: When matching "use .cvs commit. to remove this file + permanently" messages, change "cvs" to "${PROG}". + (rdiff, binfiles): Likewise. + This fixes testing a program named something other than "cvs", e.g. + $ cp cvs cvs-test + $ /bin/sh /sanity.sh `pwd`/cvs-test + +1996-12-02 Jim Kingdon + + * client.c: In comment saying that socket buffers don't + implement the blocking routine, say they are blocking. + * buffer.h (struct buffer): In description of input function, + describe blocking, non-blocking, and NEED more fully. Say + what happens if we read a nonzero amount less than NEED and + then get end of file. + * client.c (socket_buffer_input): If NEED == 0, still call + recv (once). Handle the case where recv returns 0. + +Sat Nov 30 15:10:07 1996 Jim Kingdon + + * subr.c, cvs.h (file_has_markers): New function. + * rcs.h (RCS_MERGE_PAT): Now a fixed string not a regexp. + * options.h.in (GREP): Removed; no longer used. + * update.c (update_fileproc), commit.c (check_fileproc): Call + file_has_markers rather than GREP. + * rcscmds.c (RCS_merge): Just give a fatal error in the case where + we had been calling GREP. I suspect noone is using this code + any more. + * sanity.sh (conflicts): Rewrite tests 131, 132, and 133 to use + dotest; tests that the above changes didn't break anything. + +Fri Nov 29 09:06:41 1996 fnf@ninemoons.com (Fred Fish) + and Jim Kingdon + + * checkout.c (safe_location): Only call readlink if HAVE_READLINK. + + * run.c (piped_child, filter_stream_through_program): If + HAVE_VFORK, call vfork not fork. + * run.c (run_exec): Add comment about why we use vfork. + +Mon Nov 25 12:48:31 1996 Jim Kingdon + + * release.c (release): Don't return after processing the first + argument; that kind of defeats the purpose of having a loop, eh? + For client, close the connection after we've processed them all. + * sanity.sh: Remove workaround for modules2-8 test; tests for + above fix. Adjust modules2-6 test to answer both questions. + + * login.c: Reindent (all of get_cvs_password, a handful of lines + elsewhere). + + Cleanups to release, mostly cosmetic: + * release.c (release_server): New function; breaks out server code + from the release function. + * release.c: Move delete_flag inside the release function. + * release.c (release): Reindent. Rewrite comments about how the + implementation could be improved. Don't declare variables as + "register". Include errno in error message. Don't cast result of + printf to void. Remove unused variable srepos. + * release.c: Remove comments at top of file about what it does. + They were not particularly coherent and they were also out of date + (I think). Likewise for comment in release function about "if we + are in a repository". + * release.c: Change "module" to "directory" in a few messages + since that is what is meant. + * sanity.sh: In tests ignore-195 and ignore-193, change expected + message accordingly. + +Sun Nov 24 11:30:55 1996 Jim Kingdon + + * sanity.sh: Clarify a few items in the todo list. + + * log.c (log_parse_date): Use the "end" of the epoch not "next + week" as the time which means "no end time". + * sanity.sh (rcs): New test, tests dates and importing RCS files. + +1996-11-19 Jim Kingdon + + Visual C++ lint: + * hash.c: Declare qsort_comp. + * update.c: Declare isremoved. + +1996-11-19 Jim Kingdon + + * root.c, repos.c, modules.c, create_adm.c: Change all calls to + strip_path to strip_trailing_slashes. Basically strip_path is + just an unneeded complication (we should keep the pathname the way + the user specifies it, and the system can worry about things like + consecutive /'s if it wants to). Stripping trailing slashes is + potentially dubious for the same reason, but it is a somewhat + different case which I won't try to tackle now. + * cvs.h (strip_path): Remove declaration. + +Tue Nov 19 15:18:13 1996 Jim Kingdon + + There are a lot of details to this change, but the concept is + relatively simple: make it so that for every CVSLCK lock that we + might take out, there is a flag which is set iff we have created + the CVSLCK directory. + * lock.c (struct lock): New structure. + * lock.c: Remove static variables repository and cleanup_lckdir. + They are replaced by global_readlock.repository and + global_readlock.have_lckdir, respectively (except insofar as the + rest of these changes change the concept of cleanup_lckdir). + New static variable global_readlock. + (Reader_Lock, Lock_Cleanup): Use global_readlock in place of + repository. + (lock_simple_remove, set_lock, clear_lock, write_lock): Take a + struct lock * instead of just a repository. Set/clear + lock->have_lckdir instead of cleanup_lckdir. + (set_writelock_proc, unlock_proc): Pass ->data, not ->key, to + write_lock or lock_simple_remove. + (lock_filesdoneproc,lock_dir_for_write): Allocate a struct lock, + put it in the ->data field, and fill in its fields. + (lock_simple_remove): Use lock->have_lckdir as the sole test for + whether the CVSLCK directory needs to be removed. Add + comments about why readlock and writelock variables don't tell us + for sure whether locks exist. + (lock_simple_remove, clear_lock): Use SIG_beginCrSect and + SIG_endCrSect to ensure that ->have_lckdir is set to 0 iff the + CVSLCK directory was really removed. + (lock_simple_remove): Check for errors removing CVSLCK directory. + (lock_simple_remove, Check_Owner, set_lock): Remove all code which + checks userids (including all of Check_Owner and all the AFCVS + code). It was bogus if several CVS processes with the same userid + were running (common if several users share a userid; a common + practice with remote CVS), and with the rest of the changes here + should not be needed. + +1996-11-16 Paul Eggert + + * rcs.c (RCS_deltas): Fix unintended trigraphs. + +Fri Nov 15 13:06:03 1996 Tom Hageman + + * diff.c (diff_fileproc): In printing error messages, use the + correct filename for which the error occurred. + +Sun Nov 10 21:13:38 1996 Paul Sanders + and Jim Kingdon + + * server.c: Use all the right cruft which goes along with + including sys/time.h. + + * server.c: Include a "copyright" notice. + + * server.c: If HAVE_WINSOCK_H, include winsock.h. + + * server.c (server): Only set a handler for SIGHUP if it is + defined. Likewise for all the other signals. + + * server.c (do_cvs_command): Use DEVNULL not /dev/null. + +Fri Nov 08 12:14:20 1996 Jim Kingdon + + IBM ICC (OS/2) lint: + * add.c (add): Only declare begin_added_files if + SERVER_SUPPORT. + * client.c (init_sockaddr): Change port argument from + unsigned short to unsigned int. Change hostname + argument from const char * to char *. + +Sun Nov 3 18:24:28 1996 Noel Cragg + + * sanity.sh (info): add new tests that check behavior of format + string substitution in loginfo file. + +Sat Nov 2 09:39:09 1996 Jim Kingdon + + * client.c (do_deferred_progs): Don't access memory once it is + freed (we already did it right for checkin_progs; do the same + thing for update_progs). + + * update.c, client.c, classify.c, client.h, diff.c, commit.c, + create_adm.c: Nuke more PATH_MAX. + +Fri Nov 1 18:22:32 1996 Jim Kingdon + + * error.h: Define PROTO if it is not defined. + +Wed Oct 30 08:53:20 1996 jalving@ibm.net + + * patch.c (patch_fileproc): Set line1 and line2 to NULL up-front + (before the first "goto out") so we don't try to free them. + +Wed Oct 30 08:53:20 1996 Jim Kingdon + + * commit.c (remove_file, commit_filesdoneproc), run.c (run_print, + run_exec), modules.c (open_module, cat_module, do_module), update.c + (update_dirleave_proc), tag.c (tag_fileproc): Call cvs_out* rather + than stdio. + * server.c (serve_expand_modules): Remove comment about do_module + writing to stdout/stderr; above changes should fix this. + +Tue Oct 29 17:23:59 1996 Ian Lance Taylor + + * status.c (tag_list_proc): When printing the tag name, don't + truncate it to 25 characters. + +Tue Oct 29 12:49:07 1996 Jim Kingdon + + * add.c, checkin.c, checkout.c, filesubr.c: Nuke arbitrary limit + of PATH_MAX. Many more such limits surely remain. + + * fileattr.c (fileattr_set): Set attrs_modified *after* we might + call fileattr_read, because fileattr_read clears it. + * sanity.sh (devcom2): New tests, test for above fix and other + behaviors I discovered in the process of looking into it. + +Mon Oct 28 08:55:57 1996 Jim Kingdon + + The following changes are to ensure that SYSTEM_CLEANUP is always + called. + * error.c, cvs.h, main.c: Remove error_set_cleanup and related + machinery. It was for a time when error.c was intended to be + shared with other programs, but that is no longer true. + * error.c, error.h (error_exit): New function; like error_cleanup + from main.c but also calls SYSTEM_CLEANUP and exit (EXIT_FAILURE). + * error.c (error, fperror): Call error_exit instead of doing it + ourself. + * server.c (server, serve_valid_responses, switch_to_user, + check_password, pserver_authenticate_connection, + kserver_authenticate_connection): Call SYSTEM_CLEANUP before exit. + * add.c, client.c, import.c, main.c, mkmodules.c, modules.c, + recurse.c, server.c, tag.c, update.c: Call error_exit () + instead of exit (EXIT_FAILURE). + +Sun Oct 27 08:34:16 1996 Jim Kingdon + + * sanity.sh (conflicts): New test 128.5 tests "cvs co -p" in an empty + directory (like 126.5), but when the file has nonempty contents. + * rcs.c (RCS_checkout): If writing to stdout, use cvs_output + rather than fwrite. + * update.c (checkout_file): Call cvs_stderr not fprintf. + These changes should fix some out-of-order bugs which show up in + situations like conflicts-126.5 and conflicts-128.5. + + * mkmodules.c (checkout_file): Call RCS_checkout rather than + run_exec on RCS_CO. + +Sat Oct 26 18:29:46 1996 Jim Kingdon + + * sanity.sh (rdiff): cd out of testimport directory and remove it + when done. + + * sanity.sh (info): Adjust tests to reflect fact that loginfo was + created by cvs init. + + * sanity.sh (ignore): Change test 187a1 to allow any number of + files in CVSROOT, not just modules. + + * sanity.sh (modules): In tests 148a0 and 148a1, don't expect a + module which defines CVSROOT to itself, since we don't define one + any more. Also change test to rewrite modules rather than append + to it (in case any previous tests are changed to do something with + modules). Change test 155b to allow any number of files in + CVSROOT, not just modules. + + * add.c (add_directory): Set rev_old and rev_new fields of struct + logfile_info to NULL (prevents us from trying to free them later). + * commit.c (find_fileproc), import.c (import): Likewise. + + * sanity.sh (crerepos): New tests, to test alternate ways of + creating a repository and related matters. + * sanity.sh: Remove tests 1 through 3 and related cruft; replace + them with a new test 1 which merely tests "cvs init". By doing + the obscure stuff in crerepos we avoid having to do all this stuff + any time we run any single test. + +Sat Oct 26 16:19:48 1996 Jim Blandy + + * main.c (main): If HAVE_TZSET is #defined, call tzset. This is + harmless on all systems I know of, and required on some. + +Fri Oct 25 13:20:44 1996 Ian Lance Taylor + + * diff.c (diff_file_nodiff): When setting use_rev1, only return + DIFF_SAME if empty_file is DIFF_DIFFERENT and ts_user is not + NULL. Don't get confused by a vn_user field of "0" or one + starting with '-'. + * sanity.sh (death2): Add new death2-diff-{1,2,7,8} tests for + above patch. Renumber existing death2-diff tests to make room. + +Fri Oct 25 12:38:29 1996 Jim Wilson + + * sanity.sh (death2): In tests death2-diff-{2,4,6,8,10}, allow "_" + in temp file names. The system (tmpnam or whatever) generates + these names so they vary from system to system. + +Fri Oct 25 07:52:44 1996 Jim Kingdon + + * logmsg.c (logfile_write): Give an error for several cases which + should not be legal. Adjust comments accordingly. + * mkmodules.c (loginfo_contents): Make description of loginfo much + more concise. This should be a reminder, not full documentation. + +Tue Oct 22 10:37:37 1996 Noel Cragg + + * commit.c (update_delproc): free structure members rev_old and + rev_new if they have been allocated. + + * mkmodules.c: change loginfo_contents to include a description of + the new format string. + + * logmsg.c (logfile_write): change syntax of format string. + +Sat Oct 19 16:09:55 1996 Jim Kingdon + + For reference, this takes CVS's text segment from 348348 bytes to + 347420 bytes. + * server.c (requests): Change Directory to rq_essential + per change in doc/cvsclient.texi. + * client.c: Remove use_directory and all code which executed if + it wasn't set. This includes the get_short_pathname function. + * server.c: Likewise, for use_dir_and_repos. + (serve_repository): Give a fatal error. + * server.c (requests): Remove Lost. Change Unchanged to rq_essential. + (serve_lost): Removed. + * server.c, server.h, client.c, vers_ts.c: Remove use_unchanged, + code to set it, and all code which executed if it wasn't set. + +Sat Oct 19 12:44:08 1996 J. Richard Sladkey + and Jim Kingdon + + * hash.c (sortlist, new function qsort_comp): Rewrite to use qsort + instead of insert sort. Changes algorithm from n^2 to n log n + (assuming qsort is implemented with quicksort or similar). + +Sat Oct 19 12:44:08 1996 Jim Kingdon + + * sanity.sh (basic2): In test basic2-64, use -x and specify types + which exclude E; the test is not built to deal with E (or any + other new types). + +Sat Oct 19 12:00:00 1996 Mark Mitchell + and Jim Kingdon + + * update.c (isemptydir, new function isremoved): Avoid pruning + directories that contain files marked for removal but not + comitted. + * update.c, update.h (isemptydir): Now extern, not static. + * update.c (isemptydir): New parameter might_not_exist handles + difference in functionality from old client_isemptydir. Bring + over the improved error checking from client_isemptydir. + * client.c (client_isemptydir): Removed; isemptydir now suffices. + * update.c (update_dirleave_proc), client.c + (process_prune_candidates): Update callers. + * sanity.sh (deep): Add tests deep-rm* for above fix. + +Fri Oct 18 15:53:41 1996 Jim Kingdon + + * sanity.sh (devcom): Add tests devcom-some* to test watching just + a single file. + + * root.c (Name_Root): Use isabsolute to test whether a pathname is + absolute instead of checking for the first character being '/'. + (Reported by Antoine P. Brusseau ). + + * commit.c (checkaddfile): Free rev only if it is non-NULL (thanks + to cwong@world.std.com (Christopher Wong) for diagnosing this; the + death2-15 test in sanity.sh hits it). + +Thu Oct 17 15:21:56 1996 Jim Kingdon + + * sanity.sh: Reenable rdiff tests. Delete rdiff-9 test to reflect + the fact that the change to add a -K option has not been + incorporated. Adjust rdiff-8 test to reflect the fact that the + change to change the default keyword expansion for the first + revision has not been incorporated. + * patch.c (patch_fileproc): Pass the symbolic revision to + RCS_checkout so that Name can be expanded correctly. Reinstates + one of the 30 Sep 96 changes and fixes a bug which the sanity.sh + rdiff test tests for. + + Reinstate change from 30 Sep 96: + * patch.c (patch): CLIENT_SUPPORT: send '-f' if NOT force_tag_match + + * client.c (process_prune_candidates): Do not ignore errors from + unlink_file_dir. + + * filesubr.c (deep_remove_dir): If rmdir returns an error other + than ENOTEMPTY or EEXIST, return -1 not 0. Add workaround for AIX + header bug. + +Tue Apr 30 08:21:27 1996 Mike Sutton + + * checkout.c, history.c: added logging/reporting of cvs export + command + +Wed Oct 16 10:16:57 1996 Jim Kingdon + + * sanity.sh: Remove tests 4, 4.5, and 4.75; this functionality is + already tested by 45, 45.5 and other tests. + (ignore): New tests ignore-192, ignore-193, ignore-194, and + ignore-195 test output from "cvs release". + (modules2): New tests modules2-6, modules2-7, and modules2-8 test + ability of cvs release to handle multiple arguments. Since it + currently doesn't, the tests are kludged. + + * server.c, cvs.h (cvs_flushout): New function. + * recurse.c (do_file_proc): Call it. + * server.c (cvs_outerr): Call fflush (stdout) in non-server case. + * main.c (main): Don't call setvbuf. The code was incorrectly + checking for "patch" (it really is "rdiff"); the concern about + slowing down large amounts of output is not specific to rdiff + (it applies to "log" for example); and the above changes should + meet the need. + +Tue Oct 15 10:22:10 1996 Jim Kingdon + + This is intended to facilitate some future cleanups to the + locking, but by itself it is a simple, conversative rearrangement: + * tag.c (locked_dir, locked_list): Move from here... + * lock.c: ...to here. + * lock.c (Lock_Cleanup): If locked_dir is set clean it up too. + * tag.c (tag_unlockdir): Removed; with the above change + Lock_Cleanup suffices. + * tag.c (tag_lockdir): Move from here... + * lock.c (lock_dir_for_write): ...to here. + * tag.c (tag_fileproc), rtag.c (rtag_fileproc): Update callers. + Move comments concerning why we are locking what we are from + tag_lockdir to here. + * tag.c (tag_filesdoneproc), rtag.c (rtag_filesdoneproc): + Update callers. + * lock.c (Writer_Lock): Made static. + * cvs.h: Update declarations. + * server.c (server_notify): Call lock_dir_for_write rather than + calling Writer_Lock ourselves. + + This is intended to facilitate some future cleanups to the + locking, but by itself it is a simple, conversative rearrangement: + * lock.c (Lock_Cleanup): Also dellist (lock_tree_list). + * lock.c, cvs.h (lock_tree_cleanup): Removed; with the above change + Lock_Cleanup suffices. + * commit.c, edit.c, watch.c: Change callers. + +Sat Oct 12 21:41:46 1996 Jim Kingdon + + * sanity.sh (deep): Add comment about whether the deep-4b behavior + is considered desirable. + +Sat Oct 12 20:36:36 1996 Ian Lance Taylor + + * client.c (client_send_expansions): Add build_dirs parameter. + Change all callers. + (send_dirent_proc): Get build_dirs from callerdat; if it is + zero, don't send a nonexistent directory to the server. + (send_files): Add build_dirs parameter. Change all callers. + * client.h (send_files): Update prototype. + (send_files_contents): Remove prototype for nonexistent function. + (client_send_expansions): Update prototype. + * sanity.sh (deep): Add deep-4b test for above patch. + +Fri Oct 11 14:07:12 1996 Jim Kingdon + + gcc -Wall lint: + * logmsg.c (title_proc): Remove unused variables title and comma. + + * sanity.sh (modules2): Don't be picky about whether we are + checking in 1.3 or 1.2 of modules; it depends on whether we are + running all the tests or just some. + +Thu Oct 10 14:52:06 1996 Jim Kingdon + + * server.c, server.h (server_dir): New variable. + (output_dir): If it is set, send it before the directory name. + * modules.c (do_module): Set it, in the case of & modules, and + restore it when done. + * sanity.sh (modules): Don't clean up first-dir before starting; + tests now clean up for themselves at the end. + (modules2): New tests, for above fix. + +Wed Oct 9 15:52:34 1996 Jim Blandy + + * sanity.sh: Barf immediately if run as root. + + * rcs.c (RCS_getrevtime): When giving a date to get_date, use the full + year, not the year - 1900, so that dates after 1999 are parsed + correctly. (Change thanks to Paul Eggert.) + +Wed Oct 9 10:59:11 1996 Jim Kingdon + + Clean up gcc -Wmissing-prototypes lint: + * cvs.h (admin, add, checkout, commit, diff, history, import, + cvslog, login, patch, release, cvsremove, rtag, status, tag): + Declare. + * server.c, main.c: Don't declare them here. Don't declare update + either (which is already declared in cvs.h). + * tag.c, cvs.h, main.c, server.c: Rename tag to cvstag to avoid + name conflicts. + * client.c (init_sockaddr, auth_server_port_number), entries.c + (Entnode_Create, Entnode_Destroy), hash.c (nodetypestring), + login.c (construct_cvspass_filename), server.c + (supported_response), wrapper.c (wrap_matching_entry): Make static; + prototype. + * hash.c (printlist): Prototype. + * myndbm.c (mydbm_load_file): Change declaration to prototype. + +Tue Oct 8 22:35:34 1996 Jim Kingdon + + * sanity.sh (log2): Re-add these tests; they were deleted for 1.9 + (because they were thought to be destabilizing and/or due to + confusion/accident), but they can be put back now. + + * sanity.sh (death2): In tests death2-diff-{2,4,6,8,10}, allow "-" + or "%" in temp file names. The system (tmpnam or whatever) + generates these names so they vary from system to system. + +Tue Oct 8 12:37:09 1996 Ian Lance Taylor + + * options.h.in (HAD_RCS4): Remove; no longer used. + +Sun Oct 6 15:58:11 1996 Noel Cragg + + * The following changes address problem #56 in the GNATS database + on harvey.cyclic.com: + + * logmsg.c (str_list_format): new global -- contains the format + for items to be placed in str_list. + (Update_Logfile): move code that creates the "title" string... + (logfile_write): ...to here. Pull apart the filter program and + look for a format string, extracting it if there is one. + (title_proc): write a given filename/value based on the format + string. + + * commit.c (classify_file_internal): new routine, old code (needed + to use the code in more than one place). Determines the status + and version information about a file. + (check_fileproc): use classify_file_internal. Fill in the rev_old + field for the struct logfile_info. + (commit_fileproc): Fill in the rev_new field. + + * cvs.h (struct logfile_info): add two new fields -- rev_old and + rev_new -- that keep track of revision numbers across commits. + +Fri Sep 27 15:21:47 1996 Peter Wemm + + * logmsg.c (do_editor): Do not use editinfo if running on the client. + +Fri Oct 4 15:11:46 1996 Jim Kingdon + + * server.c (server_cleanup): Temporarily clear noexec when calling + unlink_file_dir. This is so we clean up the temp directory even + when the -n global option is specified. + +Wed Oct 2 10:47:33 1996 Norbert Kiesel + + * client.c (send_repository): initialize some variables before + first usage + +Tue Oct 1 13:01:24 1996 Jim Blandy + + Revert some of Greg's changes; they're welcome later, but we're + trying to keep CVS stable for pre-release testing at the moment. + * checkin.c, commit.c, cvs.h, diff.c, import.c, main.c, no_diff.c, + options.h.in, patch.c, rcs.c, rcs.h, rcscmds.c, sanity.sh, update.c: + Revert changes of Sep 29 and 30. + +Tue Oct 1 13:17:31 1996 Ian Lance Taylor + + Make sure the server temporary directory is removed even if + Max-dotdot is used. + * server.c (orig_server_temp_dir): New static variable. + (serve_max_dotdot): Don't free server_temp_dir if it is the same + as orig_server_temp_dir. + (do_cvs_command): Use orig_server_temp_dir in error message. + (server_cleanup): Remove orig_server_temp_dir. + (server): Set orig_server_temp_dir. Remove incorrect indentation + of error message. + + * import.c (update_rcs_file): Restore new argument to + RCS_checkout, removed in last patch. + +Tue Oct 1 00:32:55 1996 Jim Blandy + + * import.c: Revert Greg Woods' changes of Sep 30. We may want + them later, but not before 1.9. + +Mon Sep 30 23:31:01 1996 Jim Blandy + + * log.c (log_fileproc): Now that we might actually find a "desc" + node in rcsfile->other, thanks to Ian's change below, we had + better deal correctly if we find a null pointer in it. + +Mon Sep 30 13:55:03 1996 Greg A. Woods + + * main.c (main): don't set need_to_create_root for "cvs init" + either, just in case it's run from within a valid working + directory. + + * sanity.sh (testcvs): oops, forgot to comment out test version I + was using... + + * diff.c (diff_fileproc): use Diffbin instead of DIFF (3). + * patch.c (patch_fileproc): use Diffbin instead of DIFF. + * commit.c (check_fileproc): use Grepbin instead of GREP. + * rcscmds.c (RCS_merge): use Grepbin instead of GREP. + * update.c (patch_file): use Diffbin instead of DIFF. + (update_fileproc): use Grepbin instead of GREP. + * cvs.h (Diffbin): new declaration. + (Grepbin): new declaration. + (DIFFBIN_ENV): new manifest to name DIFFBIN environ var. + (GREPBIN_ENV): new manifest to name GREPBIN environ var. + * option.h.in (DIFFBIN_DFLT): renamed from DIFF. + (GREPBIN_DFLT): renamed from GREP. + * main.c (main): new variables diffbin_update_env and + grepbin_update_inv, ala rcsbin_update_env. + (main): new options -D diffbin and -g grepbin + (usg): describe new options -D diffbin and -g grepbin. + (Diffbin): new global variable for DIFF path. + (Grepfbin): new global variable for GREP path. + + * options.h.in (RCSBIN_DFLT): mention this needs to be set if + your PATH isn't set properly by rshd. + + * sanity.sh (rdiff): re-do Jim's change, but with the original + keywords I had intended (should be a bit more like real life), and + Jim's better RCS date and user matching form. + [I guess that's what I get for checking things in at 3am! ;-)] + +Mon Sep 30 17:00:20 1996 Ian Lance Taylor + + * rcs.c (RCS_reparsercsfile): Store desc field value in main RCS + node data, not in version specific data. + * sanity.sh: Enable log2 test (for local CVS only). + +Mon Sep 30 13:01:45 1996 Jim Kingdon + + * sanity.sh (log2): New test, tests cvs add -m. Not yet enabled + in "tests" because CVS currently flunks this test. + + * sanity.sh (rdiff, basic2): Allow "cvs server" as well as "cvs + checkout" and friends in messages. In testing output of cvs + status, don't require a tab which isn't there for remote. Skip + test rdiff-9 for remote. In test basic2-64, add missing slash in + the pattern which gets used for remote. + + * sanity.sh (rdiff): Fix strings we were matching against which + got keyword-expanded in checking in sanity.sh. + +Mon Sep 30 03:21:37 1996 Greg A. Woods + + * sanity.sh: change all regexpr literal '.' to '\.' + (basic2): why are tests 34 & 42 commented out (because + of 'diff -u'?)? + add tests 56[abc], 57a, and 58a to test import to the main + branch (i.e. branch '1'). + (rdiff): new test section for rdiff -K, etc. + (dotest): remove dotest.ex? before running a new test. + (dotest_fail): remove dotest.ex? before running a new test. + (dotest_internal): write expected output to dotest.exp, or if $4 + also used, to dotest.ex1 and dotest.ex2. + (patch): renamed this test to 'serverpatch'. + (dotest_lit): rename dotest.res to dotest.exp ala dotest(). + remove dotest.ex? before running a new test. + (DOTSTAR): mention the bug exists up to 1.12 + (ENDANCHOR): mention the bug exists up to 1.12 + (dotest_all_in_one): new function for debugging. + (dotest_line_by_line): new function for debugging. + (dotest_internal_debug): new function for debugging. + (dotest_internal): stop emulating the ancient tests and don't spew + the dotest.tmp contents onto $LOGFILE -- it's just too much + meaningless noise. Only do this if the test fails. Many tests + don't use dotest() yet, so this isn't quite so helpful as it might + otherwise be. + (TODO): mention CVS/* files, especially CVS/Root. + + * main.c (main): add a commented out piece of code to suggest that + there should be a function lookup_command_attribute() that could + tell us various things about internal commands, such as whether + they use CVS/Root, or if they're repository-only, or if they need + a working directory, etc.... + (main): don't set need_to_create_root if command doesn't use a + local working directory. + + * patch.c (patch): CLIENT_SUPPORT: send '-f' if NOT force_tag_match + + * error.c (fperror): protect declaration for un-defined __STDC__ + + * import.c (import): permit imports to a branch with zero dots, + i.e. the trunk. + (update_rcs_file): don't detect conflicts if importing to the + trunk. + (import): add hint that we should allow a module name, instead of + just a pathname relative to $CVSROOT. + (add_rcs_file): if importing to trunk, do it with ci(1). + + * import.c: XXX the following are all #if 0'ed out until a full + implementation can be designed.... + (cbranch): new variable to support conflict detection on another + branch set by -c. + (import): truncate -b and -c optarg if to fit in static storage. + (import_usage): describe -c + + * rcscmds.c (RCS_checkout): add new argument 'rcsver'. If rcsver + is set, turn on 'keywords' to force call to RCS_exec_checkout. + * rcs.c (RCS_exec_checkout): add new argument 'rcsver'. Pass + 'rcsver' to "co" with run_arg(). + * cvs.h: (RCS_checkout): add new argument 'rcsver' to prototype. + (RCS_exec_checkout): add new argument 'rcsver' to prototype. + * commit.c (remove_file): supply new argument to RCS_checkout. + * checkin.c (Checkin): supply new argument to RCS_checkout. + * diff.c (diff_fileproc): supply new argument to RCS_checkout. + (diff_file_nodiff): supply new argument to RCS_checkout. + * no_diff.c (No_Difference): supply new argument to RCS_checkout. + * update.c (checkout_file): supply new argument to RCS_checkout. + (patch_file): supply new argument to RCS_checkout. + (join_file): supply new argument to RCS_checkout. + + * patch.c: (o_options): new variable for -K + (rcsver): new variable for -V. + (patch): add -K flag which sets o_options, change -V to set + rcsver, send o_options and rcsver if in client mode. + (patch_fileproc): use RCS_checkout instead of RCS_fast_checkout in + order to ensure $Name is expanded, use o_options if set, or + options if set, or by default "-ko" when getting "old" file. + +Sun Sep 29 16:43:28 1996 Jim Kingdon + + * rcscmds.c: Replace comment at top of file concerning RCS library + with a reworded version based on discussion between me, Ian, Paul + Eggert, and JimB. + +Sun Sep 29 13:09:45 1996 Noel Cragg + + * main.c (main): don't create/update CVS/Root when doing the "cvs + login" command. Consider: if the user executes "cvs login" with + the working directory inside an already checked out module, we'd + incorrectly change the CVS/Root file to reflect the CVSROOT of the + "cvs login" command. + + * login.c (login): if we're re-logging into a server for which a + .cvspass entry already exists, copy the temporary file to its home + location rather than renaming. Renaming doesn't work between + filesystems. After copying, unlink the temporary file. + +Fri Sep 27 05:24:56 1996 Jim Kingdon + + * diff.c: Add comment about --brief option. + + * README-rm-add: Removed; the information which was here is now in + cvs.texinfo. + * Makefile.in (DISTFILES): Remove README-rm-add. + +Wed Sep 25 10:00:00 1996 Larry Jones + + * Makefile.in (cvsbug): Add dependency on version.c. + +Wed Sep 25 09:01:48 1996 Jim Kingdon + + * filesubr.c (get_homedir), update.c (update): Reindent. + +Wed Sep 25 04:44:54 1996 Jim Blandy + + * version.c (version_string): Bump to 1.8.86. + +Wed Sep 25 05:17:50 1996 Jim Blandy + + * update.c (update): Don't neglect to pass the -kmumble options + to the server. + * sanity.sh (binfiles-sticky): New tests for above. + + * cvsrc.c (read_cvsrc): Deal correctly with lines that specify a + command, but no options; don't corrupt argv. + + * sanity.sh: When testing rsh, use the program specified by + the CVS_RSH environment variable, if it's set. Move test to top + of file, so it runs before all other tests (it's really a + meta-test). + + * filesubr.c (get_homedir): Use getpwuid to find the home + directory, if the HOME environment variable isn't set. + * ignore.c (ign_add_file): Call get_homedir to find the user's + home directory; this is more portable than calling getpwuid. + +Tue Sep 24 09:08:17 1996 Jim Kingdon + + * log.c (log_tree): When walking through branches, follow the + ->prev field rather than following ->next which insures that the + loop only executes once and we only see the last branch. + * sanity.sh (multibranch): Test "cvs log" too; tests for above fix. + +Mon Sep 23 09:55:22 1996 Norbert Kiesel + + * options.h.in: Fixed some typos in the comments and reindented + them. + +Sat Sep 21 02:33:26 1996 Jim Blandy + + * sanity.sh: If we're testing remote CVS, make sure rsh itself is + working before running any tests. It's confusing when basica-1 + fails just because you don't have the local host in your .rhosts + file. + + * version.c (version_string): Bump to 1.8.85. + +Thu Sep 19 09:15:41 1996 Jim Kingdon + + * options.h.in: Define SERVER_FLOWCONTROL, SERVER_HI_WATER, + SERVER_LO_WATER. Several large sites (FreeBSD, Cygnus) have been + pounding on this code without problems, and it doesn't seem to + have any significant downsides. + +Tue Sep 17 01:13:41 1996 Jim Kingdon + + * status.c (status_fileproc): Instead of a default case, set sstat + before the switch. This way gcc -Wall can detect a missed case. + Add explicit T_TITLE case. + +Tue Sep 17 00:09:44 1996 Assar Westerlund + + * login.c (login): Print usage if argc < 0. + +Tue Sep 17 00:09:44 1996 Jim Kingdon + + * lock.c: In comment, mention one more function of readlocks + (fileattr not updated atomically). Note similarity between + solutions #2 and #5. + + * checkout.c (safe_location): Do not reject a location merely + because it textually starts with hardpath; insist that it be + hardpath or a subdirectory thereof. + +Mon Sep 16 11:46:36 1996 Jim Kingdon + + * server.c (server_cleanup): Add comment about ignoring errors + from unlink_file_dir. + +Mon Sep 16 10:31:48 1996 Norbert Kiesel + + * main.c: Add support for -T command line option. This + is needed for servers started via inetd. + (usg): Added line for -T. Improved -z documentation. + (main): Read default for tmpdir from the environment. Test for 'T' + in getopt loop. Use '/tmp' as ultimative fallback. Update + environment if possible. + + * cvs.h (TMPDIR_ENV): Added for -T command line option. + + * options.h.in: Add TMPDIR_DFLT + + * import.c (update_rcs_file): Use global variable Tmpdir instead + of reading the environment. + + * server.c (server_cleanup): Use global variable Tmpdir instead of + reading the environment. Also, replace system("rm -rf") with + unlink_file_dir. + (server): Use global variable Tmpdir instead of reading the + environment. + +Thu Sep 12 1996 Jim Kingdon + + * main.c (main): If ARGV0_NOT_PROGRAM_NAME, then just set + program_name to "cvs" rather than argv[0]. + +Thu Sep 12 12:06:56 1996 Jim Kingdon + + * client.c (update_entries): If we can't write the file, don't + make it a fatal error. + +Wed Sep 11 12:46:23 1996 Jim Kingdon + + * client.c (start_server): Move START_SERVER_RETURNS_SOCKET code + so that it is only run for server_method. It is wrong for + pserver_method (in which connect_to_pserver sets server_sock). + + * login.c (construct_cvspass_filename): If NO_SLASH_AFTER_HOME, + don't put a '/' between $HOME and .cvspass. Reindent function. + * build_src.com: Add zlib.c, login.c, and scramble.c. + + * rcs.c (RCS_deltas): When looking for our branch in ->branches, + check the branch number. + * sanity.sh (multibranch): New tests test for above fix. + + * commit.c (precommit_list_proc): Fix typo in last change + (->status to ->type). + +Tue Sep 10 23:05:41 1996 Jim Kingdon + + * Makefile.in (DISTFILES): Add build_src.com. + * build_src.com: Add buffer.c, buffer.obj, and zlib.olb. + +Tue Sep 10 20:35:23 1996 Juergen Renz + and Jim Kingdon + + * commit.c (precommit_list_proc): Update to reflect Jul 22 change + in which p->data was changed from a Ctype to a struct + logfile_info *. This means that commitinfo scripts again get + passed the file list like they should. + +Tue Sep 10 20:35:23 1996 Jim Kingdon + + * client.c (auth_server_port_number): Change name of service from + "cvs" to "cvspserver". The latter is what the manual has always + recommended, and it is also officially registered with IANA. + +Tue Sep 10 11:12:42 1996 Mark A. Solinski + and Jim Kingdon + + * client.c (socket_buffer_output): Change ifdef VMS to ifdef + SEND_NEVER_PARTIAL. + (start_server): Change ifdef VMS to ifdef START_SERVER_RETURNS_SOCKET. + +Tue Sep 10 17:15:21 1996 Jim Blandy + + * client.c (auth_server_port_number): Look up "cvs" in the + services database, and use the value it returns; fall back to + CVS_AUTH_PORT if no entry is present. + (connect_to_pserver): Use the correct port number in any error + messages. + +Tue Sep 10 11:12:42 1996 Jim Kingdon + + * sanity.sh (newb): New test newb-123j0 tests for another "cvs + status" case. + +Sun Sep 8 15:20:37 1996 Ian Lance Taylor + + * rcs.c (RCS_checkout): Clarify handling of options parameter. + + * rcs.c (RCS_checkout): Free buffer allocated by RCS_deltas. + +Sat Sep 7 21:28:27 1996 Jim Kingdon + + * main.c (struct cmd): Add comment concerning recognizing unique + abbreviations. + +Fri Sep 6 22:31:52 1996 Jim Kingdon + + * rcs.c (RCS_checkout): Fix indentation. + +Fri Sep 6 11:48:08 1996 Ian Lance Taylor + + * rcs.c (RCS_checkout): Replace tag parameter with rev and nametag + parameters. Change all callers. + * rcs.h (RCS_checkout): Update declaration. + + * rcs.c (RCS_getversion): Replace return_both parameter with + simple_tag. Change all callers. + (RCS_gettag): Likewise. + * rcs.h (RCS_getversion, RCS_gettag): Update declarations. + * vers_ts.c (Version_TS): Simplify vn_tag initialization using new + simple_tag rather than old return_both. + * cvs.h (struct vers_ts): Clarify vn_tag comment a bit. + + * main.c (usg): Only mention -x if ENCRYPTION is defined. + (main): Mention ENCRYPTION define in comment for -x. + * client.h (krb_encrypt_buffer_initialize): Only declare if + ENCRYPTION is defined. + * client.c (start_server): Only encrypt if ENCRYPTION is defined. + * server.c (serve_kerberos_encrypt): Only define if ENCRYPTION is + defined. + (requests): Only include Kerberos-encrypt is ENCRYPTION is + defined. + (krb_encrypt_*): Only define if ENCRYPTION is defined. + +Thu Sep 5 17:32:39 1996 Ian Lance Taylor + + * sanity.sh: When testing remote, use :ext: instead of :server: to + match change made earlier today. + +Thu Sep 5 13:57:47 1996 Jim Kingdon + + * client.c (start_tcp_server): Don't allow :kserver: to mean + "direct tcp" (root.c already takes care of this, but I want to + make it clear what is intended, and not intended, here). + (start_server): Handle ext_method (external rsh program) and + server_method (internal rsh client) separately. + * client.c: Take rsh_pid and start_rsh_server out of + RSH_NOT_TRANSPARENT ifdefs. It is useful for things like SSH on NT. + * cvs.h (CVSmethod), root.c (method_names): Add ext_method. + * root.c (parse_cvsroot): Recognize "ext" access method. + If access method is not specified and CVSROOT contains a colon, + use either ext_method or server_method depending on + RSH_NOT_TRANSPARENT. + +Thu Sep 5 00:09:49 1996 Ian Lance Taylor + + * rcs.c (RCS_checkout): Remove flags parameter, which was not + serving any useful purpose. Change all callers. + * rcscmds.c (RCS_exec_checkout): Likewise. + + * rcscmds.c (RCS_exec_checkout): Rename from RCS_checkout. Change + all callers. + * rcs.c (RCS_checkout): Rename from RCS_fast_checkout. Change all + callers. + +Wed Sep 4 14:42:28 1996 Ian Lance Taylor + + * rcs.c (RCS_fast_checkout): If tracing, output a message. If + noexec, and workfile is not NULL, just return immediately. Assert + that sout is RUN_TTY or workfile is NULL, rather than using it as + a conditional. Replace found variable with two variables--gothead + and keywords--reflecting what it actually means. + + * rcs.c (RCS_fast_checkout): Don't handle the case of workfile set + to "". + * rcscmds.c (RCS_checkout): Likewise. + * checkin.c (Checkin): Pass explicit file name, not "", to + RCS_fast_checkout. + * update.c (join_file): Likewise. + * commit.c (remove_file): Pass explicit file name to + RCS_fast_checkout and RCS_checkin. + + * rcs.c (RCS_reparsercsfile): Always continue after seeing + RCSSYMBOLS, even if the value is NULL. Clear the NODELTA flag + after setting delta_pos. + (free_rcsnode_contents): New static function. + (freercsnode): Call free_rcsnode_contents. + (RCS_fast_checkout): If NODELTA is set, reparse the RCS file. + (RCS_settag): New function. Change all callers to old function. + (RCS_deltag, RCS_setbranch): Likewise. + (RCS_lock, RCS_unlock): Likewise. + (RCS_deltas): If NODELTA is set, reparse the RCS file. + * rcs.h (NODELTA): Define. + (RCS_settag, RCS_deltag, RCS_setbranch): Declare. + (RCS_lock, RCS_unlock): Declare. + * rcscmds.c (RCS_exec_settag): Rename from RCS_settag. Don't + check tag against BASE or HEAD (now done in new RCS_settag). + (RCS_exec_deltag): Rename from RCS_deltag. + (RCS_exec_setbranch): Rename from RCS_setbranch. + (RCS_exec_lock): Rename from RCS_lock. + (RCS_exec_unlock): Rename from RCS_unlock. + * cvs.h: Update declarations of renamed functions. + * checkin.c (Checkin): Remove rcscopy variable (no longer needed + because of change in RCS_unlock call). + * commit.c: Include . + (remove_file): Update RCSNode path if the file is renamed. + (unblockrcs): Change rcs parameter to RCSNode. Change all + callers. + (fixbranch): Likewise. + (lock_RCS): Likewise. Don't call RCS_parsercsfile. + (checkaddfile): Update RCSNode path if the file is renamed. After + creating a new file, call RCS_parse. When stubbing a branch, use + the passed in RCSNode if there is one, rather than calling + RCS_Parse. Don't call RCS_Parse again after calling RCS_settag. + Free head and magicrev even if RCS_settag fails. + * import.c (add_rev): Change rcs parameter to RCSNode. Change all + callers. + (add_tag): Likewise. + + * rcs.c (RCS_fast_checkout): Amend last patch: if workfile is + NULL, but sout is not NULL, use sout in error message. + +Wed Sep 4 13:35:09 1996 Jim Kingdon + + * version.c: Increment version number to 1.8.8. + + * Version 1.8.7. + +Wed Sep 4 1996 Jim Kingdon + + * client.c (send_file_names): Look for the name to send in + Entries even if the file doesn't exist; we should send the + name as it appears in Entries in the "rm foo; cvs update FOO" + case. + +Tue Sep 3 20:50:11 1996 William A. Hoffman + + * rcs.c (RCS_fast_checkout): If workfile is NULL, don't try to + include it in error message. + +Mon Aug 26 12:27:38 1996 Jim Kingdon + + * mkmodules.c (mkdir_if_needed): Move from here ... + * filesubr.c, cvs.h (mkdir_if_needed): ... to here. Have it + return a value saying whether the directory was created. + * client.c (call_in_directory), edit.c (edit_fileproc): Call it. + +Fri Aug 23 19:19:44 1996 Ian Lance Taylor + + * checkin.c (Checkin): Copy rcs parameter in case it is freed when + finfo->rcs is freed. + +Fri Aug 23 14:55:41 1996 Jim Kingdon + + * remove.c (remove_fileproc): Revert change of 23 Aug to print + getwd and finfo->file in message. The latter is redundant with + fullname and the former is redundant with fullname and the working + directory when CVS was invoked. The implementation was also + lacking as the getwd call could overflow the buffer. + +Fri Aug 23 18:40:35 1996 Norbert Kiesel + + * remove.c (cvsremove): fix remove -f for client/server + +Fri Aug 23 11:28:27 1996 Jim Kingdon + + * wrapper.c, cvs.h: Remove conflictHook field of WrapperEntry, + WRAP_CONFLICT in WrapMergeHas, and 'c' option in wrap_add; they + are never used. + +Fri Aug 23 11:41:46 1996 Norbert Kiesel + + * server.c (switch_to_user): use #ifdef SETXID_SUPPORT instead of + #if SETXID_SUPPORT + +Thu Aug 22 14:18:43 1996 Ian Lance Taylor + + * checkin.c (Checkin): Remove local variable xfinfo. Reparse the + RCS file after the checkin. Call RCS_fast_checkout rather than + RCS_checkout. + + * cvs.h (RCS_FLAGS_LOCK): Don't define. + (RCS_FLAGS_*): Adjust values to fill in hole left by removal of + RCS_FLAGS_LOCK. + * rcs.c (RCS_fast_checkout): Don't check for RCS_FLAGS_LOCK. + * rcscmds.c (RCS_checkout): Likewise. + * commit.c (commit_fileproc): Remove rcs local variable. If + status is T_MODIFIED, require that finfo->rcs be set, call + Lock_RCS directly, and don't call locate_rcs. If adding to a tag, + require that finfo->rcs be set, and don't call locate_rcs. + (remove_file): Remove rcs local variable. Require that finfo->rcs + be set. Don't call locate_rcs. Don't pass RCS_FLAGS_LOCK to + RCS_checkout; use RCS_lock instead. Call RCS_fast_checkout rather + than RCS_checkout. + (unlockrcs): Use a single rcs parameter rather than two parameters + for file and repository. Change all callers. Don't call + locate_rcs. + (fixbranch): Likewise. + (lockrcsfile): Remove; no more callers. + +Tue Aug 20 10:13:59 1996 Jim Kingdon + + * buffer.c, rcs.c: Don't use inline. It wasn't being used in a + loop or any such place where it would matter for performance, and + it was a (minor) portability hassle. + + * server.c (server): Change "Dummy argument 0" to "cvs server" and + add comment explaining why. + + * rcs.c (linevector_add): Add comment regarding changing \n to \0. + +Tue Aug 20 09:19:19 1996 Norbert Kiesel + + * checkout.c (checkout_proc): Call RCS_parse to get the default + options from the RCS file. + + * sanity.sh (binfiles): Add tests 5.5b0 and 5.5b1 for the above fix + +Mon Aug 19 18:13:32 1996 Ian Lance Taylor + + * rcs.c (linevector_init): Make inline. Set lines_alloced to 0, + not 10. Set vector to NULL. + (linevector_add): Remove assertion that lines_alloced is greater + than zero. Initialize lines_alloced if necessary. + (linevector_copy): Initialize lines_alloced if necessary. + (linevector_free): Only free vector if it is not NULL. + (RCS_deltas): Always call linevector_init and linevector_free on + curlines, headlines, and trunklines. + (RCS_fast_checkout): Remove #if 0 around code that calls + RCS_deltas. + +Fri Aug 16 17:52:54 1996 Ian Lance Taylor + + * rcs.c (linevector_add): Handle zero length correctly. + (RCS_deltas): In RCS_FETCH case, the data is in headlines, not + curlines. + (RCS_fast_checkout): Update comment about RCS_deltas: the + testsuite now passes. + + * rcs.c (RCS_fully_parse): Use the length of the value, rather + than assuming that there are no embedded zero bytes. + (struct line): Add len field. + (linevector_add): Add len parameter. Change all callers. Use + len, rather than assuming that there are no embedded zero bytes. + Set the len field in new lines. + (RCS_deltas): Use the length of the value, rather than assuming + that there are no embedded zero bytes. Use the line length when + outputting it and when copying it. + (RCS_fast_checkout): Update comment about RCS_deltas to remove + note about supporting zero bytes correctly. + +Thu Aug 15 23:38:48 1996 Jim Kingdon + + * commit.c, import.c: Revise comments regarding the fact that we + call start_server before do_editor. + +Thu Aug 15 11:30:55 1996 Ian Lance Taylor + + * server.c: Include if AUTH_SERVER_SUPPORT. + (pserver_authenticate_connection): Set SO_KEEPALIVE on + STDIN_FILENO. + (kserver_authenticate_connection): Likewise. + +Thu Aug 15 10:26:41 1996 Norbert Kiesel + + * server.c (switch_to_user): Fix previous patch to compile it for + both HAVE_KERBEROS and AUTH_SERVER_SUPPORT + +Wed Aug 14 14:02:00 1996 Norbert Kiesel + + * server.c (check_password): if available use getspnam instead of + getpwnam when reading system passwords. This allows cvs pserver + to run on systems with shadow passwords. + (switch_to_user): new static function. Contains the extracted + common tail of kserver_authenticate_connection and + pserver_authenticate_connection. If compiled with SETXID_SUPPORT, + honor the setgid bit if it is set. + (check_repository_password): turn into a static function + (check_password): ditto + (pserver_authenticate_connection): little code cleanup + +Wed Aug 14 01:07:10 1996 Greg A. Woods + + * history.c (history): apply fix posted by Steven Meyer + to info-cvs to correct handling of '-D' + argument. Message-Id: <9608122335.AA01385@nijel.blacksmith.com> + +Tue Aug 13 13:42:36 1996 Ian Lance Taylor + + * log.c (cvslog): Remove comment about calling rlog. + * rcs.c (translate_symtag): Correct typo in comment (l ist -> + list). + * server.c (server_write_entries): Add omitted word (lists) in + comment. + +Tue Aug 13 14:01:49 1996 Norbert Kiesel + + * wrapper.c (wrap_rcsoption): fix memory access error + + * rcs.c (RCS_fast_checkout): fix memory access error (triggered + by an empty option string) + +Mon Aug 12 17:45:15 1996 Jim Kingdon (unknown@beezley) + + * buffer.c, zlib.c: If EIO is not defined, try to define it. + +Mon Aug 12 10:33:27 1996 Jim Kingdon + + * import.c (comtable): Add comment concerning applicability with + RCS 5.7. + + * server.c (server): If TMPDIR is not an absolute pathname, give + an error. + +Mon Aug 12 10:34:43 1996 Norbert Kiesel + + * main.c: add synonym "ann" for "annotate" again + +Sun Aug 11 17:54:11 1996 Jim Kingdon + + * rcs.h (RCS_RLOG): Removed; no longer used. + +Fri Aug 9 20:16:20 1996 Ian Lance Taylor + + * server.c (dirswitch): Open the Entries file with mode "a" rather + than "w+". + (server_write_entries): Open the Entries file with mode "a" rather + than "w". + * sanity.sh (modules): Add topfiles module and 155cN tests for + above patch. + +Fri Aug 9 12:11:25 1996 Jim Kingdon + + * main.c (cmd): Add comment regarding synonyms. + +Thu Aug 8 14:40:10 1996 Jim Kingdon + + * main.c: Remove synonyms for "cvs annotate". Synonyms create + user confusion. + +Thu Aug 8 10:24:04 1996 Norbert Kiesel + + * main.c: Revert (undocumented) change to rename the cvs history + alias "his" to "hist" + +Wed Aug 7 18:26:25 1996 Ian Lance Taylor + + * server.c (cvs_output): Change str parameter to const char *. + Correct loop to print from p, not str. + (cvs_outerr): Likewise. + * cvs.h (cvs_output, cvs_outerr): Update declarations. + + * server.c (receive_partial_file): Read and discard remaining file + data on a write error. + (serve_modified): Discard data while size > 0, not >=. + +Wed Aug 7 15:11:40 1996 Norbert Kiesel + + * main.c (cmds): Add some aliases for "annotate". + (usg): Improve usage message text + (cmd_synonyms): New function to print the command synonym list + (main): Add new option --help-synonyms + +Wed Aug 7 00:07:31 1996 Ian Lance Taylor + + Keep track of subdirectories in the Entries file. + * cvs.h (enum ent_type): Define. + (struct entnode): Add type field. + (struct stickydirtag): Add subdirs field. + (Subdirs_Known, Subdir_Register, Subdir_Deregister): Declare. + (ignore_files): Update declaration for new parameter. + (FILESDONEPROC): Add entries parameter. + (DIRENTPROC, DIRLEAVEPROC): Likewise. + * entries.c (Entnode_Create): Add type parameter. Change all + callers. + (write_ent_proc): If closure is not NULL, treat it as a pointer to + an int, and set it to 1 if a node is seen which is not ENT_FILE. + (write_entries): If subdirectory information is known, but no + subdirectories were written, write an unadorned D to the file. + (Scratch_Entry): Write an R command to Entries.Log. Don't rewrite + the Entries file. + (Register): Set entfilename. Write an A command rather than an + unadorned entries line. + (fgetentent): Add cmd and sawdir parameters. Change all callers. + If CMD is not NULL, expect and return a single character command. + Handle an initial D by setting the type to ENT_SUBDIR. + (fputentent): Output an initial D for an ENT_SUBDIR entry. + (Entries_Open): Handle removal commands in Entries.Log. Record + whether subdirectory information is known in the list private + data. + (Subdirs_Known): New function. + (subdir_record): New static function. + (Subdir_Register, Subdir_Deregister): New functions. + * find_names.c (add_entries_proc): Skip entries that are not + ENT_FILE. + (add_subdir_proc): New static function. + (register_subdir_proc): New static function. + (Find_Directories): If the Entries file has subdirectory + information, get the directories out of it. Otherwise, call + find_dirs, and add the information to the Entries file. + * recurse.c (struct frame_and_entries): Define. + (do_recursion): Don't call Entries_Close until after processing + dirlist. Pass entries to filesdoneproc. Pass a frame_and_entries + structure to do_dir_proc via walklist. + (do_dir_proc): Expect a frame_and_entries structure in closure, + not a recursion_frame. Pass entries to direntproc and + dirleaveproc. + * ignore.c (ignore_files): Add entries parameter. Change all + callers. If we have subdirectory information, check for + directories in entries. + * add.c (add): If client_active, call Subdir_Register on each new + directory. + (add_directory): Add entries parameter. Change caller. Call + Subdir_Register. + * checkout.c (build_dirs_and_chdir): Call Subdir_Register. + * client.c (call_in_directory): Call Subdir_Register for newly + created directories. Call Subdirs_Known or Find_Directories after + calling Entries_Open. + (process_prune_candidates): Call Subdir_Deregister. + * commit.c (findmaxrev): Skip entries that are not ENT_FILE. + * server.c (dirswitch): Call Subdir_Register. + * update.c (update_dirent_proc): Call Subdir_Register. + (update_dirleave_proc): Call Subdir_Deregister. + * Several files: Change direntproc, dirleaveproc, and + filesdoneproc routines to expect an entries argument. + + * rcs.c (translate_symtag): New static function. + (RCS_gettag): Use translate_symtag rather than RCS_symbols. + (RCS_nodeisbranch, RCS_whatbranch): Likewise. + +Tue Aug 6 15:36:09 1996 Ian Lance Taylor + + Finish the conversion of cvs log so that it never invokes rlog. + * log.c (struct log_data): Remove dorlog field. Add nameonly, + header, long_header, statelist, and authorlist fields. + (log_usage): Remove rlog-options. Add -R, -h, -t, -b, -s, -w. + (cvslog): Don't clear opterr. Handle -h, -R, -s, -t, -w. If an + unrecognized option is seen, call usage. + (log_parse_list): New static function. + (log_fileproc): Remove code that called rlog. Check nameonly, + header, and long_header fields in log_data. + (log_version_requested): Check statelist and authorlist. + + * log.c (struct datelist): Define. + (struct log_data): Add datelist and singledatelist fields. + (log_usage): Add -d. + (cvslog): Handle -d. + (log_parse_date): New static function. + (log_fileproc): Do special single date handling. + (log_version_requested): Check datelist and singledatelist. + (log_fix_singledate): New static function. + +Mon Aug 5 23:48:16 1996 Ian Lance Taylor + + * log.c (struct option_revlist): Define. + (struct revlist): Define. + (struct log_data): Add default_branch and revlist fields. + (struct log_data_and_rcs): Define. + (log_usage): Add -N and -r. + (cvslog): Handle -N and -r. + (log_parse_revlist): New static function. + (log_fileproc): Call log_expand_revlist and log_free_revlist. + Pass log_data_and_rcs structure to log_count_print via walklist. + (log_expand_revlist, log_free_revlist): New static functions. + (log_version_requested): New static function. + (log_count_print): New static function. + (log_tree): Add log_data and revlist parameter. Change all + callers. + (log_abranch): Likewise. + (log_version): Likewise. Call log_version_requested. + (version_compare): New static function. + * sanity.sh (log): New tests for -r, -b, and -N options to log. + +Sun Aug 4 11:19:30 1996 Ian Lance Taylor + + Handle simple cases of cvs log without invoking rlog. + * log.c (struct log_data): Define. + (cvslog): Use getopt to parse options. Set up a log_data + structure, and pass it to start_recursion. + (log_fileproc): Get arguments form callerdat rather than static + variables. In simple cases, print the log information directly, + rather than invoking rlog. + (log_symbol, log_count, log_tree): New static functions. + (log_abranch, log_version, log_branch): New static functions. + * rcs.h (struct rcsnode): Add other field. + (struct rcsversnode): Add other field. + (RCS_fully_parse): Declare. + * rcs.c (getrcsrev): Move declaration to start of file. + (RCS_reparsercsfile): Add all parameter. Change all callers. + (RCS_fully_parse): New function. + (freercsnode): Free other list. + (rcsvers_delproc): Free other list. + * hash.h (enum ntype): Add RCSFIELD. + * hash.c (nodetypestring): Handle RCSFIELD. + +Sat Aug 3 19:39:54 1996 Ian Lance Taylor + + * log.c (cvslog): Correct position of CLIENT_SUPPORT #endif. + +Thu Jul 25 12:06:45 1996 Ian Lance Taylor + + * update.c (join_file): If merging a branch, and the branch + revision does not exist, just return without doing anything. + * sanity.sh (join): Add cases file7 and file8 to test above + patch. + + * server.c (cvsencrypt): Rename from encrypt, to avoid conflict + with NetBSD unistd.h. Rename all uses. + + * server.c (krb_encrypt_buffer_output): Fix typo in comment (reply + -> replay). + +Thu Jul 25 10:37:32 1996 Jim Kingdon + + * server.c (krb_encrypt_buffer_output): Fix typo in comment + (krb_recv_auth -> krb_recvauth). + +Wed Jul 24 09:28:33 1996 Jim Kingdon + + * lock.c (set_lock): Adjust comment regarding why we call stat. + +Wed Jul 24 15:06:08 1996 Ian Lance Taylor + + Add encryption support over a Kerberos connection. + * main.c (usg): Mention -x if CLIENT_SUPPORT. + (main): Handle -x. + * client.h (encrypt): Declare. + (krb_encrypt_buffer_initialize): Declare. + * client.c (kblock, sched): New static variables if + HAVE_KERBEROS. + (start_tcp_server): Remove sched local variable. Copy + cred.session into kblock. + (start_server): Turn on encryption if requested. + * server.c (kblock, sched): New static variables if + HAVE_KERBEROS. + (serve_kerberos_encrypt): New static function. + (requests): Add "Kerberos-encrypt" if HAVE_KERBEROS. + (kserver_authenticate_connection): Remove sched local variable. + Copy auth.session into kblock. + (encrypt): New global variable. + (struct krb_encrypt_buffer): Define. + (krb_encrypt_buffer_initialize): New function. + (krb_encrypt_buffer_input): New static function. + (krb_encrypt_buffer_output): New static function. + (krb_encrypt_buffer_flush): New static function. + (krb_encrypt_buffer_block): New static function. + (krb_encrypt_buffer_shutdown): New static function. + +Wed Jul 24 09:28:33 1996 Jim Kingdon + + * recurse.c (do_recursion): Add comment about calling + Name_Repository in !(which & W_LOCAL) case. + + * expand_path.c (expand_variable): Fix typo (varaible -> variable). + +Tue Jul 23 15:05:01 1996 Ian Lance Taylor + + * update.c (update_fileproc): In T_REMOVE_ENTRY case, only call + server_scratch_entry_only if ts_user is NULL. + * sanity.sh (death2): Add death2-20 test for above patch. + + * diff.c (diff_fileproc): If a file is not in the working + directory, check that the tag is present before warning that no + comparison is possible. + * sanity.sh (death2): Add death2-diff-9 and death2-diff-10 tests + for above patch. + +Tue Jul 23 12:05:42 1996 Jim Kingdon + + * tag.c (tag_check_valid): Fix indentation. + + * client.c (handle_e): Flush stdout before writing to stderr. + (handle_m): Flush stderr before writing to stdout. + +Fri Jul 19 16:02:11 1996 Mike Ladwig + + * client.c: Added NO_CLIENT_GZIP_PROCESS to deal with the MacOS + client where Gzip-stream is supported, but "gzip-file-contents" is + not. + +Fri Jul 19 16:02:11 1996 Mike Ladwig + + * repos.c: Fixed recent patch which added plain fopen rather than + CVS_FOPEN + +Mon Jul 22 22:25:53 1996 Ian Lance Taylor + + * logmsg.c (tag): New static variable. + (setup_tmpfile): Don't print the prefix before calling fmt_proc. + Free tag if it is set. + (find_type): Get type from logfile_info struct. + (fmt_proc): Likewise. Print tag information. Handle all prefix + printing. + (revision): Remove static variable. + (Update_Logfile): Remove xrevision parameter. Change all + callers. + (title_proc): Get type from logfile_info struct. + (logfile_write): Remove revision parameter. Change all callers. + * cvs.h (struct logfile_info): Define. + (Update_Logfile): Update prototype. + * commit.c (find_fileproc): Set logfile_info information. + (check_fileproc): Likewise. + (commit_filesdoneproc): Don't call ParseTag. + (update_delproc): Free logfile_info information. + * add.c (add_directory): Set logfile_info information. + * import.c (import): Likewise. + + * tag.c (tag_check_valid): The special BASE and HEAD tags are + always valid. + * sanity.sh (basica): Add basica-6.3 test for above patch. + +Mon Jul 22 14:41:20 1996 Jim Kingdon + + * update.c (merge_file): Pass 0 not NULL to checkout_file (20 Jul + 96 change changed other calls to checkout_file but missed this one). + +Sat Jul 20 00:21:54 1996 Ian Lance Taylor + + * update.c (join_file): Check whether the target of the merge is + the same as the working file revision before checking whether the + file was added during the merge. + + * update.c (scratch_file): Remove existing parameters, and add a + single parameter of type struct file_info. Change all callers. + Warn if unlink_file fails. + (checkout_file): Remove resurrecting_out parameter. Add adding + parameter. Change all callers. Remove joining code. + (join_file): Remove resurrecting parameter. Rewrite to handle + joining dead or added revisions. + * classify.c (Classify_File): If there is no user file, and the + RCS file is dead, return T_UPTODATE rather than T_CHECKOUT. + * checkout.c (checkout_proc): Set W_ATTIC if there is a join tag. + * sanity.sh (join): New set of tests for above patches. + (death): Adjust tests 86, 89, 89a, 92.1c, 95 for above patches. + (import): Adjust test 113 for above patches. + +Thu Jul 18 19:24:08 1996 Jim Kingdon + + * lock.c: Add comment explaining what locks are for. Also discuss + various changes to locking which get proposed from time to time. + + * sanity.sh (death2): Change a number of test names from death-* + to death2-*. + + * wrapper.c (wrap_setup): Don't look in repository if client_active. + * wrapper.c, cvs.h (wrap_send): New function. + * update.c (update), import.c (import): Call it. + * sanity.sh (binwrap): Do binwrap tests for remote as well as + local; tests for above fixes. + + * wrapper.c: Add a few FIXME comments. + +Thu Jul 18 18:43:50 1996 Ian Lance Taylor + + * sanity.sh (patch): Fix names of a couple of tests to say patch + rather than death2. + +Thu Jul 18 16:19:21 1996 Bill Bumgarner + and Jim Kingdon + + * add.c (add), import.c (add_rcs_file): Check for options from + wrappers and use them if specified. + * cvs.h (WrapMergeHas): Add WRAP_RCSOPTION. + * wrapper.c (WrapperEntry): Add rcsOption field. + (wrap_add): Allow a single character argument to an option. + (wrap_add): Handle -k option. + (wrap_add_entry): Handle rcsOption field. + (wrap_name_has): Handle WRAP_RCSOPTION. + * wrapper.c, cvs.h (wrap_rcsoption): New function. + * add.c, import.c, wrapper.c: Minor beautification (mostly + removing trailing spaces). + * sanity.sh (binwrap): New tests test for this feature. + +Wed Jul 17 10:14:20 1996 Ian Lance Taylor + + * checkout.c (checkout): Remove extraneous else accidentally + inserted in last checkin. + +Tue Jul 16 11:37:41 1996 Ian Lance Taylor + + * sanity.sh (import): Use quoting to avoid expansion of RCS ID + strings. + + * sanity.sh (import): Use dotest to examine the output of test + 113, and the actual contents of the file in test 116. + + * update.c (join_file): Always skip rcsmerge if the two revisions + are the same (the old code always did the rcsmerge when two -j + options were specified). + + * checkout.c (history_name): New static variable. + (checkout): Permit both tag and date to be specified. Set + history_name. + (checkout_proc): Use history_name when calling history_write. + * rcs.c (RCS_getversion): If both tag and date are set, use + RCS_whatbranch to get the branch revision number of a symbolic + tag. + (RCS_getdatebranch): If the branch revision itself is early + enough, then use it if the first branch is not early enough. Add + comment for invalid RCS file. Don't bother to check for NULL + before calling xstrdup, since xstrdup checks anyhow. + + * client.h (file_gzip_level): Declare. + * client.c (file_gzip_level): Define. + (start_server): Don't set gzip_level to zero after sending + Gzip-stream command. Set file_gzip_level after sending + gzip-file-contents command. + (send_modified): Use file_gzip_level rather than gzip_level. + * server.c (server_updated): Likewise. + (serve_gzip_contents): Likewise. + + * sanity.sh (patch): New tests. Test remote CVS handling of + unpatchable files. + + * sanity.sh (death2): Accept a '.' in the temporary file name + printed by diff. + + * rcscmds.c (RCS_checkin): Remove noerr parameter. Change all + callers. + * cvs.h (RCS_checkin): Update declaration. + * commit.c (remove_file): Pass RCS_FLAGS_QUIET to RCS_checkin. + + * history.c (history): Cast sizeof to int to use correct type in + error printf string. + (report_hrecs): Cast strlen result to int to use correct type in + printf string. + + * server.c (cvs_flusherr): Correct typo in comment. + + * rcs.c (getrcskey): Hoist three constant strcmp calls out of the + value reading loop. + + * fileattr.c (fileattr_get): Change parameter types from char * to + const char *. + (fileattr_get0, fileattr_modify, fileattr_set): Likewise. + (fileattr_newfile): Likewise. + * fileattr.h (fileattr_get): Update declaration. + (fileattr_get0, fileattr_modify, fileattr_set): Likewise. + (fileattr_newfile): Likewise. + +Thu May 16 11:12:18 1996 Mark P. Immel + and Jim Kingdon + + * client.h, client.c, checkout.c (client_send_expansions): + Pass an additional parameter indicating where the checkout is + to occur, to avoid passing the wrong information to send_files(). + * sanity.sh (basicb): New test basicb-cod-1 tests for above fix. + +Mon Jul 15 18:26:56 1996 Ian Lance Taylor + + * recurse.c (do_recursion): Require a repository before calling + Find_Names. + * repos.c (Name_Repository): Remove sanity checks which spend time + examining the filesystem. + +Mon Jul 15 1996 Jim Kingdon + + * client.c (send_file_names): Send file names as they appear + in CVS/Entries, rather than as specified (in cases where they + might differ in case). + (send_fileproc): Use file name from CVS/Entries (vers->entdata->user) + rather than file name as specified (finfo->file) when available. + +Sun Jul 14 15:39:44 1996 Mark Eichin + and Ian Lance Taylor + + Improve diff -N handling of nonexistent tags and removed files. + * diff.c (enum diff_file): New definition for whole file, moving + unnamed enum out of diff_fileproc, renaming DIFF_NEITHER to + DIFF_DIFFERENT, and adding DIFF_SAME. + (diff): Look through the repository even if only one revision is + given. + (diff_fileproc): Change empty_file to be enum diff_file. If there + is no user revision, but there is a repository file, treat it as a + removed file. Pass empty_file to diff_file_nodiff, and set it + from the return value. + (diff_file_nodiff): Change return type to enum diff_file. Replace + just_set_rev parameter with enum diff_file empty_file parameter. + Change handling of a missing tag to return an enum diff_file value + if empty_files is set, rather than reporting an error. Free tmp + if xcmp returns 0. + * sanity.sh (death2): Add tests for above patches. + +Sat Jul 13 19:11:32 1996 Jim Kingdon + + * rcs.c (annotate): In sending options to server, reverse sense of + test so that we send -f iff -f was specified, rather than iff -f was + not specified. + +Fri Jul 12 20:23:54 1996 Greg A. Woods + + * zlib.c (compress_buffer_input): add a couple of casts for + uses of z_stream's next_in and next_out + +Fri Jul 12 18:55:26 1996 Ian Lance Taylor + + * zlib.c: New file. + * client.c (log_buffer_block): Call set_block and set_nonblock, + rather than lb->buf->block. + (log_buffer_shutdown): New static function. + (get_responses_and_close): Call buf_shutdown on to_server and + from_server. + (start_server): If "Gzip-stream" is supported, use it rather than + "gzip-file-contents". + * server.c (print_error): Call buf_flush rather than + buf_send_output. + (print_pending_error, serve_valid_responses): Likewise. + (serve_expand_modules, serve_valid_requests): Likewise. + (do_cvs_command): Call buf_flush rather than buf_send_output + before the fork, and in the parent after the child has completed. + In the child, set buf_to_net and buf_from_net to NULL. + (serve_gzip_stream): New static function. + (requests): Add "Gzip-stream". + (server_cleanup): Don't do anything with buf_to_net if it is + NULL. Call buf_flush rather than buf_send_output. Call + buf_shutdown on buf_to_net and buf_from_net. Call error for an + malloc failure rather than buf_output to buf_to_net. + * buffer.h (struct buffer): Add shutdown field. + (buf_initialize): Update declaration for new shutdown parameter. + (compress_buffer_initialize): Declare. + (buf_shutdown): Declare. + * buffer.c (buf_initialize): Add shutdown parameter. Change all + callers. + (buf_shutdown): New function. + * Makefile.in (SOURCES): Add zlib.c + (OBJECTS): Add zlib.o. + ($(PROGS)): Depend upon ../zlib/libz.a. + (cvs): Link against ../zlib/libz.a. + (zlib.o): New target. + +Fri Jul 12 1996 Jim Kingdon + + * client.c (log_buffer_input, log_buffer_output): Use size_t + to avoid Visual C++ signed/unsigned warnings. + +Thu Jul 11 22:01:37 1996 Jim Kingdon + + * client.c (handle_f): Reindent. + + * client.c (mode_to_string, handle_m, handle_e, + auth_server_port_number, get_responses_and_close), server.c + (pserver_authenticate_connection, serve_modified, + serve_enable_unchanged, wait_sig, server_cleanup): Reindent. + * server.c: Remove #if 0'd block of code above + check_repository_password; it was yanked out of some unknown + context and didn't seem to be very useful. + +Thu Jul 11 20:10:21 1996 Ian Lance Taylor + + * server.c (do_cvs_command): Pass new special parameter to + buf_copy_counted. If it gets set to -1, send an 'F' response if + the client supports it, and call cvs_flusherr. + (cvs_flusherr): New function. + * cvs.h (cvs_flusherr): Declare. + * client.c (handle_f): New static function. + (responses): Add "F". + * buffer.c (buf_send_special_count): New function. + (buf_copy_counted): Add special parameter. Handle negative counts + specially. + * buffer.h (buf_send_sepcial_count): Declare. + (buf_copy_counted): Update declaration. + * lock.c (lock_wait, lock_obtained): Call cvs_flusherr. + + Change the client to use the buffer data structure. + * client.c: Include "buffer.h". + (to_server): Change to be struct buffer *. + (to_server_fp): New static variable. + (from_server): Change to be struct buffer *. + (from_server_fp): New static variable. + (from_server_logfile, to_server_logfile): Remove. + (buf_memory_error): New static function. + (struct log_buffer): Define. + (log_buffer_initialize, log_buffer_input): New static functions. + (log_buffer_output, log_buffer_flush): New static functions. + (log_buffer_block): New static function. + (struct socket_buffer): Define if NO_SOCKET_TO_FD. + (socket_buffer_initialize): New static function if + NO_SOCKET_TO_FD. + (socket_buffer_input, socket_buffer_output): Likewise. + (socket_buffer_flush): Likewise. + (read_line): Rewrite to use buf_read_line. Remove eof_ok + parameter (it was always passed as 0); change all callers. + (send_to_server): Rewrite to use buf_output. + (try_read_from_server): Rewrite to use buf_read_data. + (get_responses_and_close): Use from_server_fp and to_server_fp for + the streams. Check buf_empty_p when checking for dying gasps. + (start_server): Don't set from_server_logfile and + to_server_logfile; instead, call log_buffer_initialize. If + NO_SOCKET_TO_FD and use_socket_style, call + socket_buffer_initialize; otherwise, call + stdio_buffer_initialize. + * buffer.c: Compile if CLIENT_SUPPORT is defined. + (buf_flush): Fix comment to describe return value. + (buf_read_line): Add lenp parameter. Change all callers. Look + for a line terminated by \012 rather than \n. + * buffer.h: Compile if CLIENT_SUPPORT is defined. + (buf_read_line): Update declaration. + + * server.c (server): Initialize buf_to_net, buf_from_net, + saved_output, and saved_outerr before setting error_use_protocol. + (pserver_authenticate_connection): Don't set error_use_protocol. + Errors before the authentication is complete aren't handled + cleanly anyhow. Change error call after authentication to use + printf. + +Thu Jul 11 1996 Jim Kingdon + + * client.c (start_server): Open logfiles in binary, not text, mode. + +Wed Jul 10 19:24:22 1996 Jim Kingdon + + * server.c (print_pending_error, print_error): Remove comments + about deadlocks; they don't apply here. Add comments saying + that these functions must only be called when it is OK to + send output (which is why the deadlock concern doesn't apply). The + comments remain for server_cleanup and serve_valid_responses, + where they are an example of the "print a message and exit" + behavior which is noted in cvsclient.texi and which also exists + places like kserver_authenticate_connection. + +Wed Jul 10 18:24:46 1996 Ian Lance Taylor + + * server.c (print_error): Add comment warning about potential + deadlock. + (print_pending_error, serve_valid_responses): Likewise. + (server_cleanup): Likewise. + (serve_directory): Don't call buf_send_output. + (serve_modified, serve_notify, server, cvs_outerr): Likewise. + (serve_expand_modules): Call buf_send_output. + (serve_valid_requests): Likewise. + +Wed Jul 10 15:51:29 1996 Jim Kingdon + + * main.c (main): Print a warning for rlog command. + +Wed Jul 10 15:00:55 1996 Ian Lance Taylor + + Abstract the buffer data structure away from the underlying + communication medium. + * buffer.h (struct buffer): Remove fd and output fields. Add + input, output, flush, block, and closure fields. + (buf_initialize, buf_nonio_initialize): Declare. + (stdio_buffer_initialize, buf_flush): Declare. + (buf_read_line, buf_read_data): Declare. + * buffer.c: Include . Don't include . + (O_NONBLOCK, blocking_error): Don't define. + (buf_initialize, buf_nonio_initialize): New functions. + (buf_send_output): Use output function, rather than write. + (buf_flush): New function. + (set_nonblock, set_block): Use block function, rather than calling + fcntl. + (buf_send_counted): Don't check output. + (buf_input_data): Call input function, rather than read. + (buf_read_line, buf_read_data): New functions. + (buf_copy_lines, buf_copy_counted): Don't check output. + (stdio_buffer_initialize): New function. + (stdio_buffer_input, stdio_buffer_output): New static functions. + (stdio_bufer_flush): New static function. + * server.c: Include "getline.h". + (buf_to_net): Change to be a pointer. Change all uses. + (protocol, saved_output, saved_outerr): Likewise. + (buf_from_net): New static variable. + (no_mem_error, NO_MEM_ERROR, read_line): Remove. + (struct fd_buffer): Define. + (fd_buffer_initialize, fd_buffer_input): New static functions. + (fd_buffer_output, fd_buffer_flush): New static functions. + (fd_buffer_block): New static function. + (serve_directory): Call buf_read_line rather than read_line. + (serve_notify, server): Likewise. + (receive_partial_file): Call buf_read_data rather than fread. + (serve_modified): Call buf_read_line rather than read_line. Call + buf_read_data rather than fread. + (do_cvs_command): Initialize buffers with fd_buffer_initialize. + Change stdoutbuf, stderrbuf, and protocol_inbuf to be pointers. + (server): Initialize buffers using fd_buffer_initialize, + stdio_buffer_initialize, and buf_nonio_initialize. + (check_repository_password): Call getline rather than read_line. + +Wed Jul 10 15:51:29 1996 Jim Kingdon + + * commit.c (find_fileproc): Add comments describing a few cases + that we aren't handling. + +Tue Jul 9 04:33:03 1996 Jim Kingdon + + * rcs.c (RCS_deltas): New function, created from guts of old + annotate_fileproc. + (annotate_fileproc): Call RCS_deltas. + (RCS_fast_checkout): Call it (commented out for now; see comment + for reasons). + + * cvs.h, recurse.c (start_recursion): Add callerdat argument. + * cvs.h: Add callerdat argument to recursion processor callbacks. + * recurse.c: add it to struct recursion_frame and pass it to all + the callbacks. + * admin.c, client.c, commit.c, diff.c, edit.c, lock.c, log.c, + patch.c, rcs.c, remove.c, rtag.c, status.c, tag.c, update.c, + watch.c: Update all the functions used as callbacks. Update calls + to start_recursion. + * commit.c (find_filesdoneproc, find_fileproc, find_dirent_proc, + commit), tag.c (val_fileproc, tag_check_valid): Use callerdat + instead of a static variable. + + * recurse.c (do_recursion): Make static and move declaration to here... + * cvs.h: ...from here. + * recurse.c (do_recursion): Replace plethora of arguments with + single struct recursion_frame *. Change callers. + * recurse.c: New structure frame_and_file. Use it and existing + struct recursion_frame structures to pass info to do_file_proc and + do_dir_proc. Remove globals fileproc, filesdoneproc, direntproc, + dirleaveproc, which, flags, aflag, readlock, and dosrcs. + +Tue Jul 9 11:13:29 1996 Ian Lance Taylor + + * modules.c (do_module): Call cvs_outerr rather than fprintf. + +Mon Jul 8 1996 Jim Kingdon + + * rcs.c (RCS_fast_checkout): If -kb is not in use, open the + working file in text, not binary, mode. + +Sun Jul 7 10:36:16 1996 Jim Kingdon + + * rcscmds.c (RCS_settag): Add comment regarding moving check for + reserved tag names to RCS_check_tag. + + * rcscmds.c: Add comment regarding librarifying RCS and related + issues. This is a lightly edited version of a message I sent to + the CVS developers and didn't get flamed for, so it would appear + to be relatively uncontroversial. + + * rcs.c (annotate): Remove comment suggesting -r option and + related functionality; it is done. + +Fri Jul 5 17:19:57 1996 Ian Lance Taylor + + * client.c (last_entries): Make file static, rather than function + static within call_in_directory. + (get_responses_and_close): If last_entries is not NULL, pass it to + Entries_Close. + + * server.c (server_pause_check): Check for errors when reading + from flowcontrol_pipe. + + * client.c (call_in_directory): If dir_name is ".", call + Create_Admin if there is no CVS directory. + (send_dirent_proc): If there is no CVS subdirectory, pretend that + the directory does not exist (i.e., don't try to send any files in + the directory). + * server.c (dirswitch): If dir is "." in the top level repository, + add "/." after the Repository entry. + * sanity.sh (modules): Add test 155b for above patches. + +Thu Jul 4 15:57:34 1996 Ian Lance Taylor + + * server.c (buf_to_net): Move definition near top of file. + (read_line): Call buf_send_output rather than fflush. + (print_error): Output information to buf_to_net buffer rather than + stdout. + (print_pending_error, serve_valid_responses): Likewise. + (server_notify, do_cvs_command, server_co): Likewise. + (expand_proc, serve_expand_modules, server_prog): Likewise. + (serve_valid_requests, server_cleanup, server): Likewise. + (server_notify): Don't call fflush on stdout. + (do_cvs_command): Flush saved_output and saved_outerr to + buf_to_net before fork. Flush buf_to_net before fork. In child, + just initialize memory_error field of saved_output and + saved_outerr. + (server_cleanup): Flush buf_to_net. + (server): Initialize saved_output and saved_outerr. + (cvs_output): Add support for error_use_protocol case. + (cvs_outerr): Likewise. + * error.c (error): In HAVE_VPRINTF case, just call cvs_outerr. + + * buffer.c: New file; buffer support functions taken from + server.c. + * buffer.h: New file; declarations for buffer.c. + * server.c: Move buffer support functions into buffer.c and + buffer.h. Include "buffer.h". + * Makefile.in (SOURCES): Add buffer.c. + (OBJECTS): Add buffer.o. + (HEADERS): Add buffer.h. + +Thu Jul 4 00:12:45 1996 Jim Kingdon + + * version.c: Increment version number to 1.8.6. + +Wed Jul 3 22:31:16 1996 Jim Kingdon + + * version.c: Version 1.8.5. + +Wed Jul 3 21:51:23 1996 Ian Lance Taylor + + * server.c (blocking_error): Define macro. + (buf_send_output, buf_input_data): Use blocking_error rather than + #ifdef EWOULDBLOCK. + +Tue Jul 2 20:38:41 1996 Jim Kingdon + + * add.c (add): Change message which said "version 1.2 of foo.c + will be resurrected"; the message was confusing because it made + people think that the old contents of the file would come back + instead of the contents in the working directory. + +Mon Jul 1 01:38:57 1996 Jim Kingdon + + * find_names.c (find_dirs): Add comment explaining why we bother + with the entries stuff. + +Sat Jun 29 20:23:50 1996 Ian Lance Taylor + + * find_names.c (Find_Directories): Add entries parameter, and pass + it to find_dirs. + (find_dirs): Add entries parameter, and skip all files it names. + * cvs.h (Find_Directories): Update declaration. + * recurse.c (start_recursion): Pass NULL to Find_Directories. + (do_recursion): Pass entries to Find_Directories. + + * client.c (send_modified): Add trace output. + + * diff.c (diff_fileproc): Always call diff_file_nodiff. Handle + dead versions correctly. Handle diffs between a specified + revision to a dead file correctly. + (diff_file_nodiff): Add just_set_rev parameter. Change caller. + * patch.c (patch_fileproc): Check for dead versions. + * sanity.sh (death2): Add tests for above patches. + +Fri Jun 28 20:30:48 1996 Jim Kingdon + + For reference, this takes CVS's text segment from 271136 bytes to + 270352 bytes, a saving of 784. Not as good as I had hoped (oh well, + the source *seems* simpler at least). + * checkin.c (Checkin), commit.c (finaladd, remove_file), update.c + (join_file, checkout_file, patch_file), no_diff.c + (No_Differences), server.c (server_updated), classify.c + (Classify_File), vers_ts.c (Version_TS), diff.c (diff_file_nodiff): + Use a single struct file_info * argument instead of a bunch of + separate arguments for each of its fields. Remove local fullname + emulations. Use fullname in error messages where file had + erroneously been used. + * cvs.h: Update declarations of above functions and move them to + after the struct file_info declaration. + * server.h: Update declarations. + * add.c, admin.c, checkin.c, checkout.c, classify.c, client.c, + commit.c, diff.c, history.c, import.c, update.c, status.c, + remove.c, rtag.c, tag.c: Change callers. + + * diff.c (diff): Remove -q and -Q command options. This somehow + slipped through the cracks of the general removal of -q and -Q + command options on Jul 21 1995. Note that there is no need to + accept and ignore these options in server mode, like there is for + some of the commands, because the client has never sent -q and -Q + command options for "cvs diff". + +Fri Jun 28 16:50:18 1996 Ian Lance Taylor + + * add.c (add): Pass force_tag_match as 1 when calling Version_TS. + * sanity.sh (death2): Add test for above patch. Also add + commented out test for adding a file on a nonbranch tag, which CVS + currently, mistakenly, permits. + +Thu Jun 27 23:20:49 1996 Ian Lance Taylor + and Jim Kingdon + + * diff.c (longopts): New static array. + (diff): Handle long options and new short options in diff 2.7. + Fix arbitrary limit associated with the tmp variable. + * client.c (send_option_string): Parse options as space separated, + rather than requiring all options to be single characters. + * diff.c, options.h.in: Remove CVS_DIFFDATE; the need for it is gone + now that we have --ifdef (the new behavior is the behavior which + was the default, which is that -D specifies a date). + +Wed Jun 26 22:36:29 1996 Ian Lance Taylor + + * commit.c (check_fileproc): If there is a tag, permit adding a + file even if the RCS file already exists. + (checkaddfile): If there is a tag, use the file in the regular + repository, rather than the Attic, if it exists. + * sanity.sh (death2): New set of tests for above patch. + +Tue Jun 25 23:34:13 1996 Jim Kingdon + + * update.c (checkout_file): Add comments about two cases which + seem fishy. + + * sanity.sh (basic2, death): Add comments encouraging people to + stop making these sections bigger and more complex. I'm not (yet + at least) trying to figure out the ideal size for a section (my + current best estimate is 10-20 tests), but surely these + two sections are pushing the limit, whatever it is. + +Tue Jun 25 19:52:02 1996 Ian Lance Taylor + + * update.c (checkout_file): Rewrite handling of dead files when + joining. Avoid space leaks. Avoid unnecessary file + resurrections. + (join_file): Add checks to skip merging a dead revision onto a + dead revision, and to skip merging a common ancestor onto a dead + revision. Move check for non-existent working file after new + checks. + * sanity.sh (death): Use dotest for tests 86 and 95, and add test + death-file2-1, to test above changes. + +Mon Jun 24 11:27:37 1996 Jim Kingdon + + * update.c (merge_file): Replace file, repository, entries, and + update_dir arguments with finfo argument. Use fullname field + instead of locally emulating it. + (update_fileproc): Update caller. + (merge_file): If -kb is in effect, call it a conflict, leave + the two versions in the file and the backup file, and tell the + user to deal with it. The previous behavior was that the merge + would fail and then there was no way to do a checkin even once you + resolved the conflict (short of kludges like moving the file + aside, updating, and then moving it back). + * sanity.sh (binfiles): New tests binfiles-con* test for above + behavior. Adjust remaining tests to reflect changes in revision + numbers. + +Mon Jun 17 15:11:09 1996 Ian Lance Taylor + + * sanity.sh (import): Remove sleep. Requiring it was a bug, and + it is fixed in the current sources. + +Mon Jun 17 1996 Ian Lance Taylor + and Jim Kingdon + + * sanity.sh (TMPPWD): Set to real name of /tmp directory. + (basic2-64, conflicts-126.5): Use ${TMPPWD}. + +Mon Jun 17 1996 Ian Lance Taylor + + * rcscmds.c (RCS_checkout): Remove noerr parameter. Change all + callers. + * rcs.c (RCS_fast_checkout): Likewise. + +Mon Jun 17 1996 Ian Lance Taylor + + Cleaner implementation of tag locking code added Jun 13 1996: + * cvs.h (tag_lockdir, tag_unlockdir): Declare. + * rtag.c (locked_dir, locked_list): Remove. + (rtag_fileproc): Don't lock here; just call tag_lockdir. + (rtag_filesdoneproc): Don't unlock here; just call tag_unlockdir. + * tag.c (locked_dir, locked_list): Move farther down in file. + (tag_fileproc): Don't lock here; just call tag_lockdir. + (tag_filesdoneproc): Don't unlock here; just call tag_unlockdir. + (tag_lockdir, tag_unlockdir): New functions. + +Wed Jun 15 07:52:22 1996 Mike Ladwig + + * client.c (send_modified, update_entries): Fixed bug which didn't + handle binary file transfers in BROKEN_READWRITE_CONVERSION. + +Thu Jun 13 1996 Ian Lance Taylor + and Jim Kingdon + + * update.c (checkout_file): Call server_scratch_entry_only when a + non-pertinent file is found that does not exist. + * sanity.sh (newb): Add test case for above patch. + +Thu Jun 13 1996 Ian Lance Taylor + + * update.c (update_fileproc): Call server_scratch_entry_only when + handling T_REMOVE_ENTRY on the server. + * sanity.sh (conflicts2): Remove special case for remote server + bug fixed by above patch. + +Thu Jun 13 21:16:26 1996 Jim Kingdon + + * sanity.sh (basica-9): Update to reflect change to "sufficient + access" message. + +Thu Jun 13 20:13:55 1996 Ian Lance Taylor + and Jim Kingdon + + * recurse.c, cvs.h (start_recursion): Remove wd_is_repos argument; + add comment about meaning of which argument. Use !(which & + W_LOCAL) instead of wd_is_repos. + * admin.c, client.c, commit.c, diff.c, edit.c, lock.c, log.c, + patch.c, rcs.c, remove.c, rtag.c, status.c, tag.c, update.c, + watch.c: Change callers. This is a semantic change in only two + cases: (1) tag_check_valid, where repository was not "", and (2) + the pipeout case in checkout_proc. In both of those cases the + previous setting of wd_is_repos did not reflect whether we + actually were cd'd into the repository. + * recurse.c (start_recursion): Only check for the CVS subdirectory + if which & W_LOCAL. + * sanity.sh (devcom): Add test case fixed by above patch. + +Thu Jun 13 1996 Ian Lance Taylor + + * ignore.c (ignore_files): Skip based on the file name before + calling lstat. + + * client.c (last_register_time): New static variable. + (update_entries): Set last_register_time when calling Register. + (get_responses_and_close): If the current time is the same as + last_register_time, sleep for a section to avoid timestamp races. + +Thu Jun 13 17:24:38 1996 Jim Kingdon + + * client.c (supported_request): Reindent. + +Thu Jun 13 1996 Mark H. Wilkinson + + * options.h.in, mkmodules.c: Corrections to allow compilation of + non-client-server version. + +Thu Jun 13 1996 Ian Lance Taylor + + * tag.c (tag_check_valid_join): New function. + * cvs.h (tag_check_valid_join): Declare. + * checkout.c (join_tags_validated): New static variable. + (checkout_proc): Check validity of join tags. + * update.c (update): Likewise. + + * tag.c (tag_check_valid): Correct sizeof CVSROOTADM_HISTORY to + use CVSROOTADM_VALTAGS. + + * lock.c (Writer_Lock): If we called lock_wait to wait for a lock, + then call lock_obtained when we get it. + (set_lock): Likewise. + (lock_obtained): New static function. + +Thu Jun 13 13:55:38 1996 Ian Lance Taylor + and Jim Kingdon + + * main.c (main): If we can't read cvs root, don't say "you don't + have sufficient access"; just print the message from errno. It + might be "No such file or directory" or something else for which + "you don't have sufficient access" doesn't make any sense. + +Thu Jun 13 1996 Ian Lance Taylor + + * commit.c (remove_file): Pass noerr as 0 to RCS_checkout. + +Thu Jun 13 12:55:56 1996 Ian Lance Taylor + + * patch.c: Initialize rev1_validated and rev2_validated to 0, not 1. + +Thu Jun 13 12:55:56 1996 Jim Kingdon + + * rtag.c (locked_dir): Revise comments regarding locking; the rtag + and tag situations are different (changing from readlocking one + directory at a time to writelocking one directory at a time does + not do everything we might want, but it does fix simultaneous tags + and it doesn't make anything worse). + +Thu Jun 13 1996 Ian Lance Taylor + + Prevent simultaneous tag operations from interfering with each + other. + * rtag.c (rtag_proc): Pass rtag_filesdoneproc to start_recursion, + and pass readlock as 0. + (locked_dir, locked_list): New static variables. + (rtag_fileproc): Write lock the repository if it is not already + locked. + (rtag_filesdoneproc): New static function to unlock the + repository. + * tag.c (tag): Pass tag_filesdoneproc to start_recursion, and pass + readlock as 0. + (locked_dir, locked_list): New static variables. + (tag_fileproc): Write lock the repository if it is not already + locked. + (tag_filesdoneproc): New static function. + +Thu Jun 13 11:42:25 1996 Mike Sutton + + * sanity.sh: Allow digits in usernames. + +Wed Jun 12 16:23:03 1996 Jim Kingdon + + * client.c (send_modified, update_entries): Reindent and add + comments to BROKEN_READWRITE_CONVERSION code. + +Wed Jun 12 16:23:03 1996 Mike Ladwig + + * client.c (send_modified, update_entries): Add + BROKEN_READWRITE_CONVERSION code. + +Mon Jun 10 20:03:16 1996 J.T. Conklin + + * rcs.c (RCS_gettag): No longer set p to NULL if rcs is also NULL. + rcs will never be null, thanks to the assertion at top of function. + +Mon Jun 10 16:28:14 1996 Ian Lance Taylor + and Jim Kingdon + + * main.c (main): Ignore CVS/Root file when doing an import. + +Fri Jun 7 18:20:01 1996 Jim Kingdon + + * status.c (status_fileproc, tag_list_proc): Use cvs_output rather + than writing to stdout directly. + +Wed Jun 5 13:54:57 1996 Ian Lance Taylor + + * rcs.c (force_tag_match, tag, date): New static variables. + (annotate_fileproc): Redo the loop to look for the version + specified by tag/date/force_tag_match, and handle branches + correctly. + (annotate_usage): Mention -f, -r, and -D. + (annotate): Handle -f, -r, and -D. + +Tue Jun 4 13:38:17 1996 Ian Lance Taylor + + * rcs.c (annotate_fileproc): Skip unrelated branch deltas. + +Fri Jun 7 13:04:01 1996 Jim Kingdon + + * main.c (main): Change INITIALIZE_SOCKET_SUBSYSTEM to + SYSTEM_INITIALIZE and pass it pointers to argc and argv. Rename + CLEANUP_SOCKET_SUBSYSTEM to SYSTEM_CLEANUP. + +Wed Jun 05 10:07:29 1996 Mike Ladwig + + * import.c (add_rcs_file): make buf char[] not unsigned char[] + +Wed Jun 05 10:07:29 1996 Mike Ladwig + and Jim Kingdon + + * main.c (main): Add CLEANUP_SOCKET_SUBSYSTEM hook at end. Revise + comments regarding INITIALIZE_SOCKET_SUBSYSTEM. + +Wed Jun 05 10:07:29 1996 Mike Ladwig + and Jim Kingdon + + * main.c (main): Don't mess with signals if DONT_USE_SIGNALS is + defined. + +Thu Jun 6 15:32:41 1996 Jim Kingdon + + * modules.c (cat_module): Always format for 80 columns rather than + trying to determine how wide the screen is. The code we had for + the latter didn't cover all cases, was a portability headache, and + didn't work client/server. + +Wed Jun 05 10:07:29 1996 Mike Ladwig + + * error.c: Don't declare strerror if it is #defined. + +Wed Jun 05 10:07:29 1996 Mike Ladwig + and Jim Kingdon + + * cvs.h: If ENUMS_CAN_BE_TROUBLE, typedef Dtype to int not an enum. + +Wed Jun 05 10:07:29 1996 Mike Ladwig + and Jim Kingdon + + * update.c (update): If DONT_USE_PATCH, don't request patches. + Also call supported_request rather than reimplementing it. + +Wed Jun 05 10:07:29 1996 Mike Ladwig + + * client.c (read_line): Changed an occurence of '\n' to '\012'. + +Wed Jun 5 17:18:46 1996 Jim Kingdon + + * add.c (add_directory): Don't create the directory if noexec. + * sanity.sh (basica): New tests basica-1a10, basica-1a11 test for + above fix. + * sanity.sh (basicb): New tests basicb-2a10, basicb-2a11, + basicb-3a1 test for analogous situation with files rather than + directories. + +Tue Jun 4 13:38:17 1996 Ian Lance Taylor + + * sanity.sh: When doing a remote check, use :server: in CVSROOT. + +Wed Jun 5 13:32:40 1996 Larry Jones + and Jim Kingdon + + * ignore.c: Set ign_hold to -1 when not holding instead of 0 so + that holding an empty list works correctly. + * sanity.sh (ignore): New tests 190 & 191 for above fix. + +Wed Jun 5 1996 Jim Kingdon + + Visual C++ lint: + * client.c (update_entries): Copy the size to an unsigned variable + before comparing it with unsigned variables. + (handle_created, handle_update_existing): Prototype. + +Tue Jun 4 10:02:44 1996 Jim Kingdon + + * client.c (responses): Add Created and Update-existing responses. + * server.c (server_updated): If they are supported, use them + instead of Updated. + * client.c (struct update_entries_data): Add existp field. + (handle_checked_in, handle_updated, handle_new_entry, + handle_merged, handle_patched): Set it. + (handle_update_existing, handle_created): New functions, + for new responses. + (update_entries): Based on existp, check for + existence/nonexistence of file. + (try_read_from_server): Expand comment. + * server.c, server.h (server_updated): New argument vers. + * checkin.c (Checkin), commit.c (commit_fileproc), update.c + (update_fileproc, merge_file, join_file): Pass it. + * cvs.h: Move include of server.h after Vers_TS declaration. + * sanity.sh (conflicts2): New tests conflicts2-142d* test for + above fix. + + * sanity.sh (ignore): Fix typo in comment. + + * tag.c (tag_check_valid): Add comment clarifying when val-tags + entries are created. + +Mon Jun 3 07:26:35 1996 Jim Kingdon + + * version.c: Increment version number to 1.8.4. + +Mon Jun 3 02:20:30 1996 Noel Cragg + + * version.c: version 1.8.3. + +Thu May 30 10:07:24 1996 Jim Kingdon + + * main.c (cmds): Fix typo ("bdif" -> "dif") which was accidentally + introduced 24 May 96. + + * main.c (main_cleanup): Add comment stating default case will + never be reached. + +Wed May 29 21:43:43 1996 noel + + * main.c (main_cleanup): check to see if SIGHUP, SIGINT, SIGQUIT, + SIGPIPE, and SIGTERM are defined before using them. Also add a + default case to print out those errors numerically which are not + found. + +Wed May 29 18:43:45 1996 Jim Kingdon + + * expand_path.c (expand_path): Document LINE == 0 and allocation + of return value. + * modules.c (do_module): Pass 0, not -1, to indicate line number + not known. Free value returned from expand_path. Deal with NULL + return from expand_path. + +Wed May 29 15:56:47 1996 Greg A. Woods + + * modules.c (do_module): call expand_path() on the program name + specfied by one of '-o', '-t', or '-e' in the modules file before + passing it to run_setup(). This makes it possible to use $CVSROOT + (or indeed ~user or any other user-specified variable) to specify + pathnames for programs not installed in the normal execution path. + +Sun May 26 21:57:09 1996 Jim Kingdon + + * client.c (start_server): Don't include %s in error message; + there is no argument to go with it. Do include "internal error" + in error message since that might not be clear to the user otherwise. + +Sun May 26 11:58:13 1996 Greg A. Woods + + * root.c (set_local_cvsroot): enforce a wee bit of portability + (parse_cvsroot): same.... + (DEBUG main): same, plus style guidelines + (DEBUG error): deleted -- not necessary here (use fprintf instead) + + * mkmodules.c (modules_contents): updated notes about what must be + done if you change any of the options for a module. + (loginfo_contents): fixed grammar, re-pargraphed, and added 'echo + %s;' to the example. + (editinfo_contents): minor grammar fix. + +Sun May 26 17:51:18 1996 Jim Kingdon + + * vers_ts.c (Version_TS): Remove case where we get options from + sdtp->options. Whatever case that was intended to handle is + probably lost in the mists of time, but sdtp->options isn't set + anywhere, and I think that has been true for a long time. + * cvs.h (struct stickydirtag): remove options field. + * entries.c (freesdt): Don't free ->options. + * sanity.sh (binfiles): New tests binfiles-13a* test for above fix. + + * tag.c (check_fileproc): Use fullname not file in error message. + Say "locally modified" not "up-to-date"; the file need not match + the head revision it only need match some revision. + +Sun May 26 16:57:02 1996 Norbert Kiesel + + * tag.c: added support for new option -c to make sure all tagged + files are up-to-date + (tag): check for option and set check_uptodate + (check_fileproc): check status of file if check_uptodate is set + +Sat May 25 15:22:26 1996 Jim Kingdon + + * main.c (main): Revert change to look for a -H command option; + command option parsing should be up to each subcommand and the -H + global option works fine. + +Mon May 23 1996 Ian Lance Taylor + + * client.c (process_prune_candidates): Set prune_candidates to + NULL at the end of the function. + +Mon May 23 1996 Ian Lance Taylor + + * checkout.c (checkout): In code to handle multiple arguments, + pass preload_update_dir, not where, to Create_Admin. + (checkout_proc): Pass preload_update_dir, not where, to + Create_Admin. + +Thu May 23 19:14:35 1996 Jim Kingdon + + * server.c (server_set_sticky): Assert that update_dir != NULL. + * sanity.sh (basicb): New test; tests for Ian's fix to checkout.c + above. + +Thu May 23 1996 Ian Lance Taylor + + * patch.c (patch_fileproc): Don't ignore a file just because it is + in the Attic directory. + +Thu May 23 10:40:24 1996 Jim Kingdon + + * sanity.sh (death): New tests death-{72a,76a0,76a1} test for bug + fixed by Ian's patch_fileproc change above. + + * sanity.sh (death): Remove "temporary hack" in test 89. + + * rcs.c (RCS_fast_checkout): If error closing file, and workfile + is NULL, use sout in error message instead of workfile. + +Thu May 23 1996 Ian Lance Taylor + + * rcs.c (RCS_fast_checkout): Do a fast checkout in the case where + workfile is NULL and sout is a file name. + +Wed May 22 19:06:23 1996 Mark Immel + + * update.c (checkout_file): New arg resurrecting_out, to provide + resurrecting flag to caller. + (join_file): New arg resurrecting. Register with "0" if we are + the server and are resurrecting. + (update_fileproc): Pass the flag from checkout_file to join_file. + +Wed May 22 19:06:23 1996 Jim Kingdon + + * sanity.sh (death): Test for above fix, in test 89 and new test 89a. + +Tue May 21 09:49:04 1996 Greg A. Woods + + * update.c (update_usage): oops -- fix my spelling typo. + +Mon May 20 10:53:14 1996 Jim Kingdon + + * commit.c (find_fileproc): Call freevers_ts. + + * commit.c (find_*): Keep an ignlist, like update.c and client.c do. + * commit.c (commit): Process the files from the ignlists, once we + are connected to the server. + * sanity.sh (ignore): New tests 189e and 189f test for new + commit.c behavior (and client.c behavior, which is unchanged). + * sanity.sh (conflicts): Remove dir1 and sdir in parts of the test + where we aren't prepared for "? dir1" and similar output. + +Mon May 20 13:23:36 1996 Greg A. Woods + + * main.c (cmd_usage): minor corrections to descriptions of status, + rtag, tag, and rdiff. Sort alphabetically by command name. + +Mon May 20 10:36:07 1996 Ian Lance Taylor + + * client.c (call_in_directory): Move the call to Entries_Close + before the call to chdir, since Entries_Close examines files in + the current directory. + +Fri May 17 12:13:09 1996 Jim Kingdon + + * client.c (start_tcp_server, start_server, start_rsh_server, + read_line, filter_through_gzip, filter_through_gunzip, + call_in_directory): Reindent as needed. + + * main.c (main): Add missing #endif. Use indentation to indicate + nesting. + +Thu May 16 17:15:01 1996 Jim Kingdon + + * main.c (cmd_usage): Add "init" command. + +Thu May 16 16:45:51 1996 Noel Cragg + + * client.c (start_tcp_server): Error message modified to tell the + user to use ":server:" instead of setting CVS_CLIENT_PORT to a + negative number. + + * main.c (main): Add #ifdefs for turning off buffering of + stdio/stderr, so we don't get it by default. + +Thu May 16 01:29:47 1996 noel + + * commit.c (commit_filesdoneproc): Print the repository and root + directories as part of the error message. + + * main.c (main): Don't buffer stdout or stderr. It's inefficient, + but it then produces the right output for sanity.sh. + +Thu May 16 09:44:47 1996 Jim Kingdon + + * fileattr.c (fileattr_set): In the case where we are about to + call delproc, don't free ->data; delproc does that. + * sanity.sh (devcom): New tests devcom-b* test for this fix. + + * sanity.sh (conflicts): Remove redundant clean up from previous + tests at the beginning of the test. Use dotest a few more places. + (conflicts2): New test, tests for Ian's fix to Classify_File. + + * client.c (remove_entry_and_file): Add comment about + existence_error's. + +Sat May 16 1996 Ian Lance Taylor + + * update.c (update_dirleave_proc): Don't try to chdir .. and check + for an empty directory if there is a slash in the directory name. + +Thu May 16 09:02:59 1996 Jim Kingdon + + * sanity.sh (deep): New tests deep-4a* test for Ian's fix to + update_dirleave_proc. + +Sat May 16 1996 Ian Lance Taylor + + * main.c (main_cleanup): Report signal name before dying. + +Wed May 15 23:47:59 1996 Noel Cragg + + * main.c (usg): revert usage strings for `-H' flag change. + +Sat May 15 1996 Ian Lance Taylor + + * server.c (serve_static_directory): Return immediately if there + is a pending error. + (serve_sticky): Likewise. + (serve_modified): Read the file data even if there is a pending + error. + +Wed May 15 14:26:32 1996 Jim Kingdon + + * main.c (main): If -d and CVS/Root both specified, after writing + the value from -d into CVS/Root, use the value from -d, not the + old value from CVS/Root. Don't write CVS/Root with value from -d + until we have verified that it works. + * sanity.sh: Reenable test basica-9 and adjust for new behavior. + +Tue May 14 1996 Jim Kingdon + + * logmsg.c (do_editor): If user aborts the commit, still remove the + temporary file. + +Tue May 14 11:45:41 1996 Jim Kingdon + + * filesubr.c, cvs.h (cvs_temp_name): New function. Move L_tmpnam + define from cvs.h to filesubr.c. + * client.c, diff.c, import.c, login.c, logmsg.c, no_diff.c, + patch.c, wrapper.c: Call cvs_temp_name not tmpnam. + * login.c (login): Reindent function. + +Tue May 14 10:56:56 1996 Ian Lance Taylor + + * rcs.c (RCS_fast_checkout): If workfile is NULL, don't call chmod. + +Mon May 13 10:52:10 1996 Greg A. Woods + + * checkout.c (export_usage): note which options cause a sticky + version to be set, and which option avoids this. + * update.c (update_usage): likewise + +Sat May 11 18:57:07 1996 Jim Kingdon + + * sanity.sh: Comment out test basica-9 until I get around to + actually fixing it (the -d vs. CVS/Root change broke it). + +Fri May 10 09:39:49 1996 Jim Kingdon + + * main.c (main): -d now overrides CVS/Root. + +Thu May 9 19:45:24 1996 Jim Kingdon + + * main.c: Remove comment listing commands at beginning. It was + out of date and redundant with the help. + +Thu May 9 09:33:55 1996 Greg A. Woods + + * main.c: add 'init' to opening comment listing commands + + * mkmodules.c (init): fix to recognize argc==-1 as hint to call + usage() [should make "cvs init -H" work as expected] + +Wed May 8 15:02:49 1996 Jim Kingdon + + * sanity.sh: Set EXPR in the case that the expr in the path is the + one that we want. + +Wed May 8 14:06:24 1996 Greg A. Woods + + * sanity.sh (test): - convert all '[' to test ala GCD + +Wed May 8 13:46:56 1996 Greg A. Woods + + * sanity.sh (expr): - make a valiant attempt to find GNU expr + - Patch from Larry Jones: + sanity test deep-4 failed with "expr: arg list too long" + sanity test 56 failed because the stderr and stdout output was not + interleaved as expected. + sanity test modules-155a4 failed with "ls: illegal option -- 1" + + * main.c (main): - Patch from Larry Jones for SysV setvbuf + +Tue May 7 16:41:16 1996 Jim Kingdon + + * version.c: Increment version number to 1.8.2 to work around fact + that CVS 1.8 (confusingly) calls itself 1.8.1 not 1.8. + +Tue May 7 10:44:20 MET DST 1996 Norbert Kiesel + + * rcs.c (rcsvers_delproc): fix memory leak by freeing author + field. + +Mon May 6 10:40:05 1996 Jim Kingdon + + * sanity.sh (conflicts): New test conflicts-126.5 tests for bug + which Ian fixed May 5 in update.c + +Mon May 6 06:00:10 1996 Benjamin J. Lee + + * Version 1.8.1 + +Sun May 5 21:39:02 1996 Jim Kingdon + + * vers_ts.c (Version_TS): If sdtp is NULL, go ahead and check + RCS_getexpand for options. Fixes binaries and non-unix clients. + * sanity.sh: Fix binfiles-5.5 to test for the correct behavior + rather than the buggy behavior which existed when the binfiles-5.5 + test was written. + (binfiles-14c,binfiles-14f): Likewise. + +Sun May 5 17:38:21 1996 Benjamin J. Lee + + Integrated changes submitted by Ian Taylor + + * update.c (update_dirent_proc): cvs co -p doesn't print + anything when run from an empty directory. + + * import.c (import_descend_dir): Check for a file in the + repository which will be checked out to the same name as the + directory. + +Sat May 4 12:33:02 1996 Ian Lance Taylor + + Extract the head revision directly from the RCS file when + possible, rather than execing co. + * rcs.c (RCS_reparsercsfile): Set delta_pos field. + (getrcskey): Add lenp parameter. Change all callers. + (RCS_fast_checkout): New function. + (annotate_fileproc): If PARTIAL is not set, just fseek to + delta_pos. + * rcs.h (struct rcsnode): Add delta_pos field. + (RCS_fast_checkout): Declare. + * diff.c (diff_file_nodiff): Call RCS_fast_checkout rather than + RCS_checkout. + * import.c (update_rcs_file): Likewise. + * no_diff.c (No_Difference): Likewise. + * patch.c (patch_fileproc): Likewise. + * update.c (checkout_file): Likewise. + (patch_file): Likewise. + (join_file): Likewise. + +Sat May 4 12:33:02 1996 Ian Lance Taylor + + * classify.c (Classify_File): Don't report a conflict for a + pending remove if somebody else has already removed the file. + +Thu May 2 13:34:37 1996 Benjamin J. Lee + + * Version 1.7.88 + +Thu May 2 01:40:55 1996 Benjamin J. Lee + + * server.c (HAVE_INITGROUPS): Use initgroups() only if + located by configure, in the event a system has crypt(), but + no initgroups() + +Wed May 01 21:08:21 1996 noel + + * client.c (filter_through_gunzip): use "gzip -d" instead of + "gunzip," since there's no good reason (on NT at least) to have an + extra copy of gzip.exe copied to gunzip.exe (Arrrrgh! No symbolic + links!). + + * mkmodules.c (init): check to see that we have the correct number + of arguments or print out the usage message (used to be argc > 1, + should be argc != 1, because help forces argc == -1 as a special + case). + +Wed May 1 18:05:02 1996 Jim Kingdon + + * sanity.sh (basica): When testing rejection of reserved tag name, + use BASE instead of RESERVED. + +Wed May 1 15:15:11 1996 Tom Jarmolowski + + * rcs.c (linevector_delete): Only copy up to vec->nlines - nlines, + not to vec->nlines. + +Wed May 1 15:43:21 1996 Jim Kingdon + + * rcscmds.c (RCS_settag): Instead of reserving all tag names + containing only uppercase letters, reserve only BASE and HEAD. + * sanity.sh (mflag): Revert 26 Mar change; use all-uppercase tag + name again. + +Wed May 1 15:15:11 1996 Tom Jarmolowski + + * rcs.c (linevector_add): Move increment of i out of larger + statement, to avoid assumptions about evaluation order. + +Tue Apr 30 15:46:03 1996 Jim Kingdon + + * Version 1.7.87. + + * server.c (check_password): Don't use ANSI string concatenation. + Reindent function. + +Mon Apr 29 10:48:38 1996 Noel Cragg + + * root.c (parse_cvsroot): removed "rsh" as an alias to "server" in + the method section. + + * main.c (main): new variable help so we can support the `cvs -H + cmd' convention. Reverts change of 26 Apr 96 which removed this + feature. + +Sun Apr 28 14:57:38 1996 Noel Cragg + + * main.c (main): update error message if parse_cvsroot fails. + * server.c (serve_root): same. + (serve_init): same. + + * client.c (start_tcp_server): get rid of the "fall through" + stuff, now that we have access methods. + (start_server): switch off the access method to choose routine + that starts the server. + (start_tcp_server): tofd wasn't getting set to -1 early enough, + because a call to error for bind or gethostbyname might fail and + the subsequent error check to see if the connection had been made + would fail. + + * root.c: new variable method_names for error reporting purposes. + +Sun Apr 28 17:22:15 1996 Noel Cragg + + * server.c: moved kerberos #includes from main.c for the + kserver_authenticate_connection routine. + +Fri Apr 26 07:59:44 1996 Noel Cragg + + * server.c (serve_init): use the new return value from + parse_cvsroot. + (serve_root): same. + * main.c (main): same. + + * root.c (parse_cvsroot): fix indentation, add a return value + which tells whether the command succeeded or failed. + + * main.c (main): move the setting of the UMASK environment + variable inside the stuff that gets done if the user is NOT asking + for help, so we don't signal any errors prematurely (don't want to + give an error because we can't parse an environment variable + correctly if the user asks for help). Similar mods for the code + that tries to get the working directory. + + Also make CVSADM_Root a local variable instead of a global, since + its scope is only about 20 lines here! + + * server.c (kserver_authenticate_connection): moved code from + main.c to clean up MAIN. Makes sense, since we already have a + pserver_authenticate_connection. + (pserver_authenticate_connection): rename from + authenticate_connection. + + * main.c (main): reorganized the routine to eliminate variables + help, help_commands, and version_flag. Now the routine is much + clearer, since we don't have to be checking to see if these + variables are set. One behavior that was a bug/feature which is + now gone is an invocation like "cvs -H rtag" -- previously this + would give usage for rtag, but now gives usage for cvs itself. + The first behavior didn't make sense, especially since we say in + the docs that command-line flags are position-specific. *Reverted + Above* + +Thu Apr 25 20:05:10 1996 Noel Cragg + + * main.c (main): make sure we have a valid command name before we + do anything else (moved the thing that looks for a command in CMDS + to right after the GETOPT loop). Added `kserver' and `pserver' to + the table so they will be recognized; set their functions to + SERVER so that help will be given when asked for. + + * expand_path.c (expand_variable): return CVSroot_original rather + than CVSroot_directory. + + * main.c (main): save CVSroot in the env rather than + CVSroot_original, since we might not have called PARSE_CVSROOT + (this can happen if we use the -H option to a command). + + * root.c (parse_cvsroot): the parsing method was bogus for + guessing when we had hostnames vs. directories specified. Any + ambiguity should be removed by having the user specify the access + method. If the access method isn't specified, choose + server_method if the string contains a colon or local_method + otherwise. + + * Changed CVSroot_remote back to client_active since the code + reads better. + +Wed Apr 24 17:27:53 1996 Norbert Kiesel + + * vers_ts.c (Version_TS): xmalloc enough space (1 more + byte). Thanks to purify! + +Mon Apr 22 00:38:08 1996 Noel Cragg + + * create_adm.c (Create_Admin): pass CVSroot_original instead of + CVSroot_directory (oops!). + * update.c (update_filesdone_proc): same. + + * server.c (serve_root): modify to use parse_cvsroot rather than + goofing around with other variables. Will need to fix + parse_cvsroot to have a return value so we can return an error and + quit gracefully if in server mode. + (serve_init): same. + + * main.c: modify command table to remove client_* routines, since + they no longer exist. + (main): don't try to switch off non-existent field in command + table! ;-) + + * client.h (client_*): removed prototypes for now non-existent + functions. + + * client.c: remove proto for get_cvs_password, since it is now in + cvs.h. Modify routines to use new globals that describe CVSROOT + rather than client_active, server_host, server_user, and + server_cvsroot. + (parse_cvsroot): removed function, since a more generic version + now lives in root.c. + (connect_to_pserver): remove call to parse_cvsroot, since main.c + has already done it for us. + (client_*): removed all of these routines, since they only call + parse_cvsroot and then their respective operation functions. + Since main.c has already called parse_cvsroot, we shouldn't bother + with the extra function call, since client-server diffs are + already handled in the core routines themselves. + + * main.c: remove CVSroot as a global variable. Remove + use_authenticating_server variable since we have a new + `CVSroot_method' variable instead. + (main): add `CVSroot' as a local variable. Call parse_cvsroot + after we're sure we have the right setting for `CVSroot.' + + * login.c (login): update to use new global variables. Instead of + old behavior which let the user type in user@host when prompted, + it makes them do it in CVSROOT proper. The routine still lets the + user type the password, however. + (get_cvs_password): make sure that CVSROOT is fully qualified + before trying to find the entry in the .cvspass file. + * cvs.h: add prototype for get_cvs_password. + + * add.c: use new globals that describe CVSROOT. + * admin.c: same. + * checkout.c: same. + * commit.c: same. + * create_adm.c: same. + * diff.c: same. + * edit.c: same. + * expand_path.c: same. + * history.c: same. + * ignore.c: same. + * import.c: same. + * log.c: same. + * mkmodules.c: same. + * modules.c: same. + * parseinfo.c: same. + * patch.c: same. + * rcs.c: same. + * recurse.c: same. + * release.c: same. + * remove.c: same. + * repos.c: same. + * rtag.c: same. + * status.c: same. + * tag.c: same. + * update.c: same. + * watch.c: same. + * wrapper.c: same. + + * root.c (Name_Root): remove error message that reports missing + CVSROOT, since new code in main.c will catch it and also print out + an error. + (parse_cvsroot): new function -- takes a CVSROOT string and breaks + it up into its component parts -- method, hostname, username, and + repository directory. Sets new global variables that describe the + repository location more precisely: CVSroot_original, + CVSroot_remote, CVSroot_method, CVSroot_username, + CVSroot_hostname, CVSroot_directory for use by all other + functions. Checks for obvious errors in format of string. + (main): a short routine to test parse_cvsroot from the command + line. + * cvs.h: add prototype for parse_cvsroot and extern definitions + for new globals. + + * cvs.h: removed CVSroot variable, since we don't want other + routines using the raw CVSROOT (also helped to find all of the + refs to the variable!). + +Fri Apr 19 11:22:35 1996 Benjamin J. Lee + + * Version 1.7.86 + +Thu Apr 18 1996 Jim Kingdon + + * client.c (try_read_from_server): Compare return value from fwrite + with a size_t not an int (Visual C++ lint). + +Wed Apr 17 11:56:32 1996 Jim Kingdon + + * client.c (try_read_from_server): New function. + (read_from_server): Use it. + (read_counted_file): New function. + * client.c, server.c: Add Template response. + * cvs.h (CVSADM_TEMPLATE): Added. + * logmsg.c (do_editor): If repository is NULL, use CVSADM_TEMPLATE + file in place of rcsinfo. + * server.c, server.h (server_template): New function. + * create_adm.c (Create_Admin): Call it. + +Tue Apr 16 13:56:06 1996 Jim Kingdon + + * repos.c (Name_Repository): Fix comments. + * create_adm.c (Create_Admin): Fix indentation. + +Wed Apr 10 16:46:54 1996 Jim Kingdon + + * options.h.in: Include relevant information here rather than + citing (former) FAQ. + + * ChangeLog-9395: Fix typo in introductory paragraph. + +Wed Apr 10 14:55:10 1996 code by Mike Spengler mks@msc.edu + comments by Jim Kingdon + + * filesubr.c (unlink_file_dir,deep_remove_dir): Don't call unlink + on something which might be a directory; check using isdir instead. + +Wed Apr 10 14:55:10 1996 Jim Kingdon + + * checkout.c (build_dirs_and_chdir): Pass path, not cp, to + Create_Admin. The former is the correct update dir. + * sanity.sh (modules): New tests modules-155* test, for above fix. + +Mon Apr 8 13:53:27 1996 Samuel Tardieu + + * rcs.c (annotate_fileproc): If the file is not under CVS control, + return instead of dumping a core. Don't bug on files with an empty + first revision. + +Fri Mar 29 16:08:28 1996 Jim Kingdon + + * rcs.c (annotate_fileproc): If last line of add-chunk is not + newline terminated, end the loop when we find that out. + +Fri Mar 29 16:59:34 1996 Norbert Kiesel + + * rcs.c (annotate_fileproc): allow last line of add-chunk not to + be newline terminated + +Thu Mar 28 10:56:36 1996 Jim Kingdon + + Add more diff tests: + * sanity.sh (basic2): Use dotest for test 61. + (basica): Add test basica-6.2. + (branches): Add tests branches-14.4 and branches-14.5. + (basic1): Remove tests 19, 20, 25, and 26. The only thing this + might miss out on is diff's interaction with added and removed + files, but those tests didn't test that very well anyway. + + * rcs.c (RCS_getrevtime): Add comment regarding years after 1999. + + * rcs.c: Add "cvs annotate" command and related code. + (getrcskey): Move special handling of RCSDESC from here to + callers. Handle those keys (desc, log, text) which do not + end in a semicolon. + * rcs.h (RCSVers): Add author field. + * rcs.c (RCS_reparsercsfile): Set it. + * cvs.h (annotate), main.c (cmd_usage, cmds), client.h client.c + (client_annotate), server.c (serve_annotate, requests): Usual + machinery to add a new command. + * sanity.sh (basica): Test cvs annotate. + + * sanity.sh (branches): More tests, of things like adding files on + the trunk after a branch has been made. + +Tue Mar 26 09:48:49 1996 Jim Kingdon + + * expand_path.c: Don't declare free and xmalloc; cvs.h already + takes care of that. + + * sanity.sh (mflag): Don't use tag name reserved to CVS. + + NT local changes plus miscellaneous things noticed in the process: + * import.c (add_rcs_file): Use binary mode to write RCS file. Use + \012 where linefeed is intended. Copy data a small block at a + time, until we hit EOF, rather than trying to read the whole file + into memory at once. + * client.c (send_modified): Add comments regarding st_size. + * commit.c (commit): Add comments regarding binary mode and read(). + * logmsg.c (do_editor): Add comments regarding st_size. + * server.c (server_updated): Use binary mode to read file we are + sending. + + * rcscmds.c (RCS_settag): Complain if user tries to add a tag name + reserved to CVS. + * sanity.sh (basica): Test for this behavior. + + * sanity.sh (binfiles): New tests test ability to change keyword + expansion. + +Mon Mar 25 1996 Jim Kingdon + + * cvs.h, filesubr.c (expand_wild): New function. + * recurse.c (start_recursion): Call expand_wild at beginning and + free its results at the end. + * cvs.h, subr.c (xrealloc): Make argument and return value void *. + * client.h, client.c (send_file_names): Add flags argument. If + SEND_EXPAND_WILD flag is passed, call expand_wild at beginning and + free its results at the end. + * admin.c, add.c, log.c, tag.c, status.c, edit.c, watch.c, + update.c, commit.c, remove.c, client.c, diff.c: Update callers. + +Fri Mar 22 10:09:55 1996 Jim Kingdon + + * error.c (error, fperror): Exit with status EXIT_FAILURE rather + than STATUS. We had been neglecting to check for 256, and the + value of providing a count of errors is probably minimal anyway. + * add.c, modules.c, mkmodules.c, tag.c, server.c, main.c, + import.c, client.c, scramble.c, recurse.c: Exit with status + EXIT_FAILURE rather than 1. On VMS, 1 is success, not failure. + * main.c (main): Return EXIT_FAILURE or 0. The value of providing + a count of errors is minimal. + + * client.c (init_sockaddr): Exit with status 1 rather than + EXIT_FAILURE. The latter apparently doesn't exist on SunOS4. + Reindent function. + +Mon Mar 18 14:28:00 1996 Jim Kingdon + + * cvs.h, ignore.c: New variable ign_case. + * ignore.c (ign_name): If it is set, match in a case-insensitive + fashion. + * server.c (serve_case): New function. + (requests): Add Case request. + * client.c (start_server): If FILENAMES_CASE_INSENSITIVE is + defined, send Case request. + +Sat Mar 16 08:20:01 1996 Jim Kingdon + + For reference, this change takes cvs's text segment from 315392 + bytes to 311296 bytes (one 4096 byte page). + * cvs.h (struct file_info): Add fullname field. + * recurse.c (do_file_proc): Set it. + * commit.c (find_fileproc), client.c (send_fileproc), commit.c + (check_fileproc), diff.c (diff_fileproc), edit.c + (unedit_fileproc), patch.c (patch_fileproc), remove.c + (remove_fileproc), rtag.c (rtag_fileproc), tag.c (tag_fileproc), + update.c (update_fileproc), watch.c (watchers_fileproc): Use it + instead of computing it each time. + * diff.c (diff_fileproc), remove.c (remove_fileproc): Use fullname + where we had been (bogusly) omitting the directory from user + messages. + * edit.c (unedit_fileproc, edit_fileproc): If we cannot close + CVSADM_NOTIFY, mention CVSADM_NOTIFY rather than finfo->file in + error message. + * rtag.c (rtag_fileproc), tag.c (tag_fileproc): Reindent. + +Fri Mar 15 15:12:11 1996 Norbert Kiesel + + * server.h: fix prototype of server_pause_check (was + server_check_pause) + +Thu Mar 14 1996 Jim Kingdon + + * vers_ts.c (Version_TS), entries.c (Scratch_Entry, AddEntryNode): + Change findnode to findnode_fn. + + * main.c: Depending on HAVE_WINSOCK_H, include winsock.h or + declare gethostname. + * cvs.h: Don't declare it here. + +Thu Mar 14 07:06:59 1996 Jim Kingdon + + * commit.c (find_fileproc): If vn_user is NULL and ts_user is not, + print an error rather than silently succeeding. + * sanity.sh (basica-notadded): New test, for above fix. + (dotest_internal): New function. + (dotest,dotest_fail): Call it instead of duplicating code between + these two functions. + + * sanity.sh: Skip tests binfiles-9 through binfiles-13 for remote. + + * options.h.in: Adjust comment to reflect kfogel change. + +Thu Mar 14 01:38:30 1996 Karl Fogel + + * options.h.in (AUTH_CLIENT_SUPPORT): turn on by default. + +Wed Mar 13 09:25:56 1996 Jim Kingdon + + * vers_ts.c (Version_TS): Don't try to override options from rcs + file if there isn't an rcs file (e.g. called from send_fileproc). + This fixes a bug detected by test 59 in "make remotecheck". + + * rcs.c (RCS_reparsercsfile, RCS_getexpand): Assert that argument + is not NULL. + + Fix a gcc -Wall warning: + * rcs.c, rcs.h (RCS_getexpand): New function. + * vers_ts.c (Version_TS): Call it. + * rcs.c (RCS_reparsercsfile): Make static. + + Add a "cvs init" command. This is needed because cvsinit.sh + invoked mkmodules which doesn't exist any more. + * mkmodules.c: Break filelist out of mkmodules function, rename + struct _checkout_file to struct admin_file (for namespace + correctness), and add contents field. + (init,mkdir_if_needed): New functions. + * cvs.h (init): Declare. + * main.c (cmds): Add init. + (main): If command is init, don't require cvsroot to exist. + * client.c, client.h (client_init, send_init_command): New functions. + * client.c (start_server): Don't send Root request if command is init. + * server.c (serve_init): New function. + (requests): Add "init". + +Wed Mar 13 09:51:03 MET 1996 Norbert Kiesel + + * vers_ts.c (Version_TS): set options to default option if the + file if no -k option but -A was given. This avoids the (wrong) + update message for binary files which are up-to-date when + running 'cvs -A'. + + * update.c (checkout_file): remove test of -k option stored in the + file itself because it was moved to vers_ts.c + + * sanity.sh: added tests for the above fix. + +Tue Mar 12 13:47:09 1996 Jim Kingdon + + * hash.c (findnode): Adjust comment regarding errors. + + * hash.c (findnode, findnode_fn): Assert that key != NULL. This + way the check still happens even if the function is later + rewritten to not start out by calling hashp. + +Mon Mar 11 10:21:05 1996 Jim Kingdon + + * sanity.sh: If expr accepts multi-line patterns but is too + liberal in matching them, print a warning but keep going. + + * sanity.sh: Add QUESTION variable, analogous to PLUS. Use it + instead of \? to match a question mark. + + * cvs.h (CVSMODULE_OPTS, CVSMODULE_SPEC): Move from here... + * modules.c: ...to here. They are only used here and the code to + handle the syntax of modules files should not be scattered all over. + * modules.c (CVSMODULE_OPTS): Add "+" as first character. + * sanity.sh (modules): New tests 148a0 and 148a1 test for + above-fixed bug. + +Mon Mar 11 13:11:04 1996 Samuel Tardieu + + * modules.c (cat_module): set optind to 0 to force getopt() to + reinitialize its internal nextchar + +Mon Mar 11 00:09:14 1996 Jim Kingdon + + * hash.c (findnode, findnode_fn): Revert changes of 7-8 Mar 1996. + The correct style is to assert() that key != NULL (see HACKING), + which is already done in the hashp function. + * fileattr.c (fileattr_delproc): Likewise, assert() that + node->data != NULL rather than trying to deal with it being NULL. + +Fri Mar 8 01:31:04 1996 Greg A. Woods + + * hash.c (findnode_fn): one more place to avoid calling hashp() + with a NULL key + +Thu Mar 7 17:30:01 1996 Greg A. Woods + + * hash.c (findnode): also return NULL if key is not set + [[ reported by Chris_Eich@optilink.optilink.dsccc.com, and + supposedly in a PR that should be marked "fixed"..... ]] + + * fileattr.c (fileattr_set): set node->data to NULL after freeing + it to prevent subsequent accesses + (fileattr_delproc): don't free node->data if it's NULL, and set it + to NULL after freeing + [[ reported by Chris_Eich@optilink.optilink.dsccc.com, and + supposedly in a PR that should be marked "fixed"..... ]] + +Fri Mar 1 14:56:08 1996 Jim Kingdon + + * sanity.sh (basica): New test basica-4a tests for bug fixed by + sam@inf.enst.fr on 1 Mar 96. + +Fri Mar 1 18:10:49 1996 Samuel Tardieu + + * tag.c (check_fileproc): Check for file existence before trying + to tag it. + +Fri Mar 1 07:51:29 1996 Jim Kingdon + + * client.c (update_entries): If command is export, set options to + NULL. + +Thu Feb 29 16:54:14 1996 Jim Kingdon + + * lock.c (write_lock, Reader_Lock): Remove + BOGUS_UNLESS_PROVEN_OTHERWISE code. It was pretty bogus, and has + been ifdeffed out for a long time. + * cvs.h (CVSTFL): Removed; no longer used. + + * cvsrc.c, cvs.h (read_cvsrc): Pass in command name rather than + using global variable command_name. + * main.c (command_name): Initialize to "", not "cvs" so that error + messages don't say "cvs cvs". Update calls to read_cvsrc to pass + in command_name or "cvs" as appropriate. + * sanity.sh (basica): New test basica-9 tests for above-fixed bug. + + * lock.c: Rename unlock to lock_simple_remove to avoid conflict + with builtin function on QNX. + +Thu Feb 29 17:02:22 1996 Samuel Tardieu + + * fileattr.c (fileattr_get): Removed NULL pointer dereference + which occurred in the absence of default attribute. + +Thu Feb 29 07:36:57 1996 J.T. Conklin + + * rcs.c (RCS_isbranch, RCS_whatbranch): Remove no longer used file + argument, swap order of remaining two arguments to be like other + RCS_* functions. + (RCS_nodeisbranch): swap order of arguments to be like other RCS_* + functions. + * rcs.h (RCS_isbranch, RCS_whatbranch, RCS_nodeisbranch): Update + prototypes for above changes. + * commit.c, rtag.c, status.c, tag.c: Update for above calling + convention changes. + +Thu Feb 29 08:39:03 1996 Jim Kingdon + + * client.c (start_server): Revert changes which claimed to fall + back to a different way of connecting. Add comments explaining + why. (I don't think the changes did what they claimed, anyway). + Use indentation rather than comments to line up #if, #else, and + #endif. + + * patch.c (patch, patch_fileproc): Revert change to add optional + arguments to -c and -u. Optional arguments are evil and in + violation of the POSIX argument syntax guidelines. The correct + way to do this is -C and -U. Also change DIFF back to "diff" in + output (see comments). + + gcc -Wall lint: + * client.c (copy_a_file): Declare p inside the #ifdef in which is + it used. + * commit.c (remove_file): Remove unused variable p. + * commit.c (checkaddfile): Remove unused variables p. + * rcs.c (RCS_isbranch): Remove unused variable p. + * rcs.c: Remove unused declarations and definitions of + parse_rcs_proc, rcsnode_delproc, rcslist, and repository. + * rtag.c (rtag_fileproc): Remove unused variable p. + * patch.c (patch_fileproc): Remove unused variable p. + * tag.c (val_fileproc): Remove unused variable node. + * client.c, import.c, lock.c, server.c: Cast pid_t to long before + passing it to %ld. + + * cvs.h: Don't prototype gethostname; merely declare it (on linux, + second argument is size_t not int). + +Thu Feb 29 10:29:25 MET 1996 Norbert Kiesel (nk) + + * sanity.sh: added "cat > /dev/null" to loginfo entry to avoid the + SIGPIPE signal + +Thu Feb 29 10:28:25 MET 1996 Norbert Kiesel (nk) + + * patch.c: added new variable diff_opt + (patch): allow optional parameter to -c and -u option, send it to + server + (patch_fileproc): cleaned up the code which prints the current + filename. For "-s" option, print the pathname relative to CVSROOT + instead of just the filename. + + * filesubr.c (xchmod): added cast to shut up gcc + + * cvs.h: added prototype for gethostname + +Thu Feb 29 10:27:25 MET 1996 Norbert Kiesel (nk) + + * lock.c (write_lock), (Reader_Lock), import.c (update_rcs_file), + client.c (update_entries), (send_modified), server.c (server), + (receive_file), (server_updated): use %ld for printing pid_t + variables + +Thu Feb 29 02:22:12 1996 Benjamin J. Lee + + * run.c (run_exec): Added VMS return status support. + +Thu Feb 29 01:07:43 1996 Benjamin J. Lee + + * client.c (send_to_server): wrtn wasn't being declared under + VMS for some reason. + +Wed Feb 28 23:27:04 1996 Benjamin J. Lee + + * client.c: Changed #ifdef VMS && NO_SOCKET_TO_FD to + #if defined(VMS) && defined(NO_SOCKET_TO_FD) + +Wed Feb 28 22:28:43 1996 Benjamin J. Lee + + * build_src.com: Added DCL command procedure to build + and link CVS client for VMS. + +Wed Feb 28 22:07:20 1996 Benjamin J. Lee + + * client.c: VMS CVS client specific changes. + + Added USE_DIRECT_TCP to allow CVS_PORT to be used to specify + a TCP connection port (no Kerberos). Changed + start_kerberos_server() to start_tcp_server(). + + In copy_a_file(): transform a backup file to have a + VMS-friendly name. + + Added HAVE_CONFIG_H to include "config.h". + + start_server() will starts the first successful of any + mutually exclusive methods of starting the CVS server + which might be enabled. + + Initialized use_socket_style and server_sock for VMS in + start_server(). + +Wed Feb 28 21:49:48 1996 Benjamin J. Lee + + * find_names.c, recurse.c, cvs.h: Changed Find_Dirs() to + Find_Directories(). + * cvs.h: Added VMS filenames enabled through USE_VMS_FILENAMES + VMS POSIX will require to use the regular CVS filenames + while VMS is #define'd. + +Wed Feb 28 21:26:22 1996 Benjamin J. Lee + + * ignore.c: Added the patterns *.olb *.exe _$* *$ to default + ignore list for VMS. + +Wed Feb 28 13:32:28 1996 Jim Kingdon + + * logmsg.c (do_editor): Fix indentation. + +Wed Feb 28 12:56:49 1996 Benjamin J. Lee + + * logmsg.c (do_editor): If no editor is defined, exit and print + a message. + +Wed Feb 28 10:40:25 1996 Jim Kingdon + + * vers_ts.c (time_stamp, time_stamp_server): Reindent and revise + comments. + +Tue Feb 27 23:57:55 1996 Benjamin J. Lee + + * vers_ts.c: gmtime() returns NULL on some systems (VMS) + revert to local time via ctime() if GMT is not avaiable. + +Tue Feb 27 13:07:45 1996 J.T. Conklin + + The changes listed below cause cvs to parse each rcs file (and + free the associated rcsnode after the file has been processed) + sequentially. cvs used to parse all files in a directory, an + approach that does not scale to huge repositories with lots + of revisions/branches/tags/etc. + + * cvs.h (struct file_info): Removed srcfiles field. Added rcs + (node) field. + * recurse.c (do_recursion): Removed code that pre-parsed all + rcs files in the directory. + (do_file_proc): Parse current rcs file. + * rcs.c (RCS_parsefiles, parse_rcs_proc, RCS_addnode): Removed. + (RCS_isbranch, RCS_whatbranch): Changed srcfiles argument to + rcs (node). + * rcs.h (RCS_parsefiles, RCS_addnode): Removed prototypes. + (RCS_isbranch, RCS_whatbranch): Updated prototypes. + * add.c, admin.c, checkin.c, checkout.c, classify.c, client.c, + commit.c, diff.c, history.c, import.c, log.c, patch.c, remove.c, + rtag.c, status.c, tag.c, update.c, vers_ts: Updated for above + calling convention / data structure changes. + +Mon Feb 26 16:07:56 1996 Jim Kingdon + + * Version 1.7.3. + + * Version 1.7.2. + +Mon Feb 26 1996 Jim Kingdon + + * recurse.c (start_recursion): Use last_component rather than + checking for '/' directly. + (do_dir_proc): Likewise. + + Visual C++ lint: + * client.c (send_to_server): Change wrtn to size_t. + (connect_to_pserver): Put tofd and fromfd declarations inside + #ifndef NO_SOCKET_TO_FD. + * scramble.c (shifts): Change from array of char to array of + unsigned char. + +Mon Feb 26 13:31:25 1996 Jim Kingdon + + * server.c (check_repository_password): Remove unused variables + linelen, ch. + + * client.c (send_file_names): Translate ISDIRSEP characters to '/'. + +Sat Feb 24 21:25:46 1996 Jim Kingdon + + * checkout.c (safe_location): Re-indent one line. + +Sat Feb 24 10:50:42 1996 Karl Fogel + + * checkout.c (safe_location): put assignment to hardpath[x] in an + `else'-clause, so we don't do it when x == -1. + +Sat Feb 24 01:40:28 1996 Marcus Daniels + via Karl Fogel + + * server.c (check_repository_password): Return by reference an + optional username, the `host_user', from the passwd file. The + host_user will be the user-id under which the cvs repository is + run. + (check_repository_password): Use `read_line' instead of fgets to + allow for passwords larger than 32 characters, as well as the + optional host user argument. + (check_password): Modify to use host_user. + (authenticate_connection): Modify to use host_user. + +Sat Feb 24 01:05:21 1996 Karl Fogel + + * scramble.c (descramble): just shift descrambled string to get + rid of tag char, instead of allocating a whole new copy. + (scramble): cast return value of xmalloc to avoid unsightly + compiler warnings. + + * options.h.in (RCSBIN_DFLT): don't refer to AUTH_SERVER_SUPPORT + in comment anymore, now that it's not defined in this file. + +Fri Feb 23 1996 Jim Kingdon + + * client.c: Ifdef HAVE_WINSOCK_H, include winsock.h + instead of sys/socket.h and friends. + * login.c: Don't include sys/socket.h and friends. + * login.c (login): Only fclose fp in the case where it was + successfully fopen'd. + * login.c: Declare getpass. + * filesubr.c, cvs.h (get_homedir): New function. + * cvsrc.c, expand_path.c, history.c, login.c: Call it instead + of getenv ("HOME"). + +Fri Feb 23 09:23:20 1996 Jim Kingdon + + * client.c (connect_to_pserver): Remove unused variable host. + * login.c: Include getline.h. + (login): Remove unused variables i and username. + (get_cvs_password): Move free of linebuf to where it actually will + be called. Add a "return NULL" at the end of the function to shut + up gcc -Wall. + + * options.h.in: Remove AUTH_SERVER_SUPPORT. + * client.h (authenticate_connection): Declare. + * scramble.c (scramble): Cast char to unsigned char before using + it to look up in table (char might be signed). + * server.c [AUTH_SERVER_SUPPORT]: Include grp.h + (authenticate_connection): Remove unused variables len and + server_user. + + * sanity.sh (basica): Add comments regarding creating a top-level + directory. + (basic1): Don't try to remove first-dir and + ${CVSROOT_DIRNAME}/first-dir at start of test; tests are now + responsible for cleaning up at the end. + (PLUS,DOTSTAR,ENDANCHOR): Add comments regarding fixed GNU expr. + +Thu Feb 22 22:34:11 1996 Jim Kingdon + + * cvs.h: Remove alloca cruft. + +Wed Feb 21 07:30:16 1996 J.T. Conklin + + * modules.c (do_module): call free_cwd before exiting. + + * recurse.c: Removed entries global variable. + (do_recursion): Declare entries. Moved call to Entries_Close so + entries list is closed on all code paths. + (start_recursion): Removed call to Entries_Close, entries list has + been moved to do_recursion only. + +Tue Feb 20 22:10:05 1996 Jim Kingdon + + * update.c (update_dirent_proc): If dir lacks a CVS subdirectory, + don't recurse into it. + * sanity.sh (conflicts): Test for above-fixed bug. + + * update.c (merge_file): Use write_letter not printf. + +Tue Feb 20 12:34:07 EST 1996: Gary Oberbrunner + and Jim Kingdon + + * history.c (history_write): Change username to char * and call + getcaller() to set it. Setting username accidentally got deleted + 8 Feb 96. + * sanity.sh: Revise test 64 to test for above-fixed bug. + * sanity.sh (PLUS): New variable, work around yet another GNU expr + bug. + +Tue Feb 20 14:07:50 1996 Jim Kingdon + + * sanity.sh: Merge test rtags into test basic2. They never were + capable of running separately of each other. + + * sanity.sh (deep): New test, to test ability to operate in deeply + nested directories (more quickly than basic2 test did). + (basic2,rtags): Remove directories dir3 and dir4. Remove file8, + file10, file12, file9, file11, file13, file15, file16, file17. + These additional files slowed down the tests considerably without + significantly increasing coverage. + + * sanity.sh (PROG): New variable. Use it instead of "cvs" + to match the name cvs prints out for itself. + +Mon Feb 19 09:00:29 1996 Jim Kingdon + + This fixes a bug whereby old default attributes would get + clobbered instead of added to on "cvs watch add". + * hash.c (findnode): Don't check for key == NULL; let the + assertion in hashp take care of it. + * fileattr.h, fileattr.c (fileattr_get): If filename is NULL, + return default attributes. + + * client.c (send_repository): Fix indentation. + +Mon Feb 19 01:10:01 1996 Karl Fogel + + * login.c (login): print out full repos so user knows which server + she's logging into. + + * client.c (send_repository): die if `repos' is NULL. This is a + lame solution; see comments in code. + +Thu Feb 15 15:04:01 1996 Jim Kingdon + + * error.c (error): Free entire and mess when done with them. + + * sanity.sh (info): Correct syntax of .cvsrc file. + + * cvs.h, expand_path.c, edit.c, parseinfo.c, wrapper.c: + expand_path now takes arguments containing file and line for error + message, and it prints the error message itself. + * sanity.sh (info-6a): Test printing of error message. + + * expand_path.c (expand_variable): Add USER internal variable. + * sanity.sh (info): Test USER and CVSROOT internal variables too. + +Wed Feb 14 19:11:08 1996 Jim Kingdon + + * main.c (usg): Add -s option. + +Tue Feb 13 20:26:06 1996 Jim Kingdon + + gcc -Wall lint: + * mkmodules.c (mkmodules_usage): Remove declaration of + non-existent function. + * cvs.h (mkmodules): Declare. + +Mon Feb 12 12:20:04 1996 Jim Kingdon + + * mkmodules.c: Rename main to mkmodules and remove various pieces + of scaffolding which it used to emulate non-existent parts of CVS. + Change calling convention to just take a char * not argc,argv. + Save and restore working directory. + * commit.c (commit_filesdoneproc): Call it if checking files into + CVSROOT. + * Makefile.in (SOURCES): Add mkmodules.c. + (OBJECTS): Add mkmodules.o. + (MSOURCES,MOBJECTS): Removed. + (COMMON_OBJECTS): Removed; move former contents into OBJECTS. + Update other rules accordingly. + * sanity.sh: Adjust to reflect nonexistence of mkmodules. + + These changes introduce functions cvs_output and cvs_outerr; + eventually all server output will go through them rather than + stdio directly. + * server.c (saved_output, saved_outerr): New variables. + (do_cvs_command): Initialize them. + (buf_output): Don't require that buf->output be set; saved_* use + this to shove some data in a buffer which buf_copy_lines will + later want to get data from. + * server.c, cvs.h (cvs_output, cvs_outerr): New functions. + * mkmodules.c (cvs_outerr): New function, so error() works. + * error.c: Reindent. Don't declare program_name and command_name; + cvs.h declares them. + (error): Use vasprintf and cvs_outerr (or fputs in the + error_use_protocol case) rather than stdio directly. + * import.c (import_descend_dir): Remove kludge which had prevented + messages from error() from being out of order with respect to + messages from printf; cvs_output and cvs_outerr are a cleaner + solution to the problem. + (add_log, import): Use cvs_output not printf. + * update.c (write_letter): Use cvs_output not printf. + (checkout_file): Use write_letter not printf. + * sanity.sh: Use dotest for test 56 (test that output is actually + correct). In theory should test that the import.c bug is fixed, + but I was unable to reproduce the bug (it is timing dependent). + +Mon Feb 12 16:07:45 1996 Norbert Kiesel + + * commit.c: define last_register_time + (commit): make sure cvs doesn't exit in the same second it wrote + the last timestamp + (commit_fileproc): set last_register_time + (finaladd): set last_register_time + + * run.c, cvs.h: Changed more Popen() to run_popen() + +Mon Feb 12 03:06:50 1996 Benjamin J. Lee + + * release.c, rtag.c, tag.c: changed 'delete' to 'delete_flag' + to avoid symbol collision with DEC C RTL function delete() + +Mon Feb 12 03:01:48 1996 Benjamin J. Lee + + * mkmodules.c: changed 'void Lock_Cleanup()' to 'void static + Lock_Cleanup() to avoid conflict with more substantial + Lock_Cleanup() in lock.c + +Mon Feb 12 02:50:19 1996 Benjamin J. Lee + + * edit.c, logmsg.c, release.c, run.c: Changed Popen() to + run_popen(). VMS' linker is not case sensitive and considered + popen() and Popen() to be identical symbols. + +Sun Feb 11 10:51:14 1996 Jim Kingdon + + * main.c (main) [!CLIENT_SUPPORT]: Silently ignore gzip level + rather than printing usage message. + + * cvs.h, expand_path.c (variable_list): New variable. + (variable_set): New function. + * hash.h (enum ntype), hash.c (nodetypestring): Add VARIABLE. + * expand_path.c (expand_path, expand_variable): Reindent. + (expand_variable): Use user variables not environment variables + for ${=VAR} syntax. The environment variables didn't work + client/server. + * main.c (main): Process new -s global option. + * client.c (send_variable_proc): New function. + (start_server): Call it, to send user variables. + * server.c (serve_set): New function. + (requests): Add Set request. + * sanity.sh: Revise info test to use user variables rather than + environment variables. + +Sat Feb 10 16:55:37 1996 Jim Kingdon + + By itself this is only a small cleanup, but in the long run it + will be way cool (for reference, it takes CVS's text segment from + 290816 bytes to 294912, which I expect will be made up by future + changes which this enables): + * cvs.h (struct file_info): Added. + (FILEPROC): Replace 5 args with single struct file_info *. + * recurse.c (do_file_proc): Adjust args to fileproc; passed in + instead of from globals. + (do_recursion): Call do_file_proc accordingly. Remove srcfiles + global variable. + * update.c (update_fileproc): Renamed from update_file_proc. + * admin.c, client.c, commit.c, diff.c, edit.c, log.c, patch.c, + remove.c, rtag.c, status.c, tag.c, update.c, watch.c: Update + fileprocs to new calling convention. + +Fri Feb 9 15:30:32 1996 Jim Kingdon + + * expand_path.c (expand_variable): Accept a variable name starting + with '=' as a way to specify an environment variable. + * sanity.sh (info): New tests, for above behavior. + + * Makefile.in (clean): Also remove check.log check.plog. + + * import.c (comtable): Remove SYSTEM_COMMENT_TABLE; the table + should *not* depend on what kind of machine the server happens to + be. Add "mak", "rc", "dlg", "frm", and "bas" types which were + formerly included via SYSTEM_COMMENT_TABLE. + + * cvs.h, rcs.h, add.c, checkin.c, classify.c, commit.c, diff.c, + import.c, patch.c, rcs.c, update.c, vers_ts.c: Remove + DEATH_SUPPORT ifdefs. They were introduced to facilitate merging + between Cygnus and Berliner variants of CVS, not because it was + intended to subset CVS this way. And they clutter up the code + quite a bit. + * cvs.h, create_adm.c, main.c, update.c: Likewise, remove + CVSADM_ROOT ifdefs (it is still a #define, of course). I believe + they had a more-or-less similar motivation. + + * sanity.sh: Move setting of HOME from ignore test to the start of + the tests so it applies to all tests. + (CVS): Remove -f; the above change takes care of it. + + * rcs.h (RCS_MERGE): Removed; unused. + + * commit.c (checkaddfile): Fix memory leak. + + * admin.c, commit.c, diff.c, log.c, mkmodules.c: Pass -x,v/ to RCS + commands. + + * rcscmds.c, cvs.h (RCS_checkin): New function. + * checkin.c, commit.c, import.c: Call it, rather than run_*. + * cvs.h, commit.c: Remove DEATH_STATE define; the behavior + which used to be the default (DEATH_STATE) is now the only one. + Failing to define DEATH_STATE has been commented as obsolete at + least since CVS 1.5. We still can read repositories created with + such a CVS, however. + * rcs.h, rcs.c: Adjust comments regarding DEATH_STATE. + * subr.c (make_message_rcslegal): Add comment, describing + allocation of returned value. + +Fri Feb 9 09:53:44 MET 1996 Norbert Kiesel + + * sanity.sh: use "${testcvs}" instead of "cvs" in devcom tests + + * hash.c: fix "dereferencing a NULL pointer" bug triggered with + "cvs watch add" + (findnode): return NULL if key == NULL + (hashp): assert (key != NULL) + +Fri Feb 9 00:46:47 1996 Jim Kingdon + + * rcs.c (RCS_reparsercsfile): Remove unused variable date. + + * myndbm.c (mydbm_load_file): Fix typo ('015' -> '\015'). + +Thu Feb 8 13:00:00 1996 Jim Kingdon + + * rcs.c (RCS_parse, RCS_parsercsfile, RCS_reparsercsfile), + fileattr.c (fileattr_read), myndbm.c (myndbm_open): + Use FOPEN_BINARY_READ. + * fileattr.c (fileattr_write), myndbm.c (myndbm_close): + Use FOPEN_BINARY_WRITE. + * history.c (history_write, read_hrecs): Specify OPEN_BINARY. + * rcs.c: Remove calls to abort. + * myndbm.c (myndbm_load_file): Ignore CRs from ends of lines + if present. + * myndbm.c, fileattr.c: While I am at it, change \n to \012 + a few places where LF is intended. + * history.c (history_write): Use getenv ("HOME"), not getpwnam, + to find home directory. If it isn't set, just keep going; don't + print a message. + * rcscmds.c, cvs.h (RCS_checkout): New function. + * update.c, checkin.c, commit.c, diff.c, import.c, no_diff.c, + patch.c: Call it instead of run_*. + * patch.c (patch_fileproc): Clean up inconsistent handling of + noexec flag. + * rcscmds.c (RCS_*): Pass -x,v/ to RCS commands; elsewhere in + CVS it is assumed that ,v is a suffix. + +Fri Feb 2 14:07:32 1996 J.T. Conklin + + * rcs.h (struct rcsnode): Remove dates field (list of rcsversnodes + indexed by date). CVS maintained this list for each RCS file even + though it was never used. This resulted in higher then necessary + memory requirements (and run time too). Even if revision info was + needed, CVS' List data structure is inappropriate because can't + handle duplicate keys. The above was discovered by tracking down + a memory leak. + * rcs.c (RCS_reparsercsfile): Don't build dates list. + (freercsnode): Don't delete dates list. + (rcsvers_delproc): Free date field. + (null_delproc): Removed. + +Thu Feb 1 12:28:33 1996 Jim Kingdon + + * remove.c (cvsremove): Don't tell user the name of the program + which they use to remove files; we don't have any way of knowing + that, and besides which they might use a GUI or emacs 'dired' anyway. + * update.c (update_filesdone_proc, update_dirleave_proc): Call + unlink_file_dir instead of rm -rf. + * options.h.in: Remove RM; no longer used. + + * sanity.sh: New tests devcom-a* test "cvs watch add", + "cvs watch remove", and "cvs watchers". + + * sanity.sh: New test 171a0 tests for watch.c bug just fixed by kfogel. + + * Most .c files: Remove rcsids. + * cvs.h: Remove USE macro. + +Thu Feb 1 13:07:15 1996 J.T. Conklin + + * tag.c, rtag.c: Update various comments to reflect function name + changes. + +Thu Feb 1 14:14:31 1996 Karl Fogel + + * recurse.c (do_recursion): comment #endif. + + * edit.c (notify_check): surround with #ifdef CLIENT_SUPPORT; else + CVS won't compile if CLIENT_SUPPORT is undefined. + + * edit.h (notify_check): surround declaration with #ifdef + CLIENT_SUPPORT. + + * watch.c (watch): if argc <= 1, then just give usage (previously + was "argc == -1"). + +Thu Feb 1 12:28:33 1996 Jim Kingdon + + * README-rm-add: Remove information which is now in cvs.texinfo. + + * sanity.sh: Remove basic0 tests. Move a few to new tests + basica-1a* (but there is no need to test that *every* command + gracefully does nothing on an empty directory; exhaustive testing + is impractical and the generic recursion processor handles this + anyway). + + * sanity.sh: New tests 69a* test use of update -p to restore old + version of dead file. + +Wed Jan 31 18:32:34 1996 Jim Kingdon + + * ChangeLog-9395: Remove duplicate entries from 1996 which + accidentally got into this file. + + * client.c (read_line, read_from_server): Change "premature end of + file from server" message to "end of file from server (consult + above messages if any)" because 99% of the time it means rsh has + printed an error message and exited. + +Wed Jan 31 15:09:51 1996 J.T. Conklin + + * edit.c (ncheck_fileproc): Fix memory leak; free line before + returning. + +Tue Jan 30 18:06:12 1996 Jim Kingdon + + * recurse.c (do_recursion): Add comment about the fact that we + don't have locks in place at certain points. + +Tue Jan 30 09:43:34 1996 Vince Demarco + + * edit.c (notify_proc): have notify_proc call expand_path with + the name of the filter program. The user may have used a + cvs environmental variable. (Popen will expand it, but it may not + use the correct value) + +Tue Jan 30 09:43:34 1996 Jim Kingdon + + * ChangeLog: take the pre-1996 changes and put them in a new file + ChangeLog-9395. + * ChangeLog-9194: Renamed from ChangeLog.fsf. + * ChangeLog-9194, ChangeLog-9395, ChangeLog: Add additional text + explaining the difference between all these logs and pointing to + older logs. + * Makefile.in (DISTFILES): Add ChangeLog-9194 and ChangeLog-9395; + remove ChangeLog.fsf. + + * modules.c (do_module): Don't fall through from 'l' to 'o' case + of option processing switch statement. + +Tue Jan 30 06:50:19 1996 J.T. Conklin + + * client.c (send_repository): Fix memory leak; free adm_name + before returning. + * diff.c (diff_file_nodiff): Fix memory leak; free xvers before + returning. + * rtag.c (rtag_fileproc): Fix memory leak; if branch_mode is set, + free rev before returning. + * status.c (status_fileproc, tag_list_proc): Fix memory leak; free + return value of RCS_whatbranch. + * tag.c (tag_fileproc): Fix memory leak; free vers before + returning. + (val_fileproc): Fix memory leak; free return value of RCS_gettag. + * watch.c (watch_modify_watchers): Fix memory leak; free mynewattr + before returning. + +Tue Jan 30 09:43:34 1996 Jim Kingdon + + * lock.c (readers_exist): If stat gave an error, print an error + message saying it was from stat, rather than from "reading + directory". Skip the message completely if it was an + existence_error. + + * sanity.sh (branches): New tests (branches off of branches, etc.). + +Tue Jan 30 11:55:34 MET 1996 Norbert Kiesel + + * main.c (main): Add change to run getopt_long twice again. + +Mon Jan 29 15:59:31 1996 Jim Kingdon + + gcc -Wall lint: + * client.c: Include edit.h + +Sun Jan 28 09:45:53 1996 Jim Kingdon + + * edit.c, edit.h (mark_up_to_date): New function, to remove file + in CVS/Base. + * client.c (update_entries): Call it if file is up to date. + * checkin.c (Checkin): Call it in non-server (local) case. + * sanity.sh: New test 182.5, tests for above-fixed bug. + +Sun Jan 28 01:07:22 1996 Jim Kingdon (kingdon@beezley) + + * client.c (change_mode): Separate out CHMOD_BROKEN code to parse + mode_string, rather than going through a mode_t. Cleaner than + the previous CHMOD_BROKEN code (which also had a typo of && not &). + +Sat Jan 27 23:29:46 1996 Jim Kingdon (kingdon@beezley) + + * edit.c (edit_fileproc): Check for EACCESS as well as EEXIST. + +Sat Jan 27 16:26:30 1996 Karl Fogel (kfogel@floss.cyclic.com) + + * client.c (notified_a_file): use rename_file() instead of + rename() (but temporarily set `noexec' to 0 so it runs + unconditionally). + (change_mode): deal with CHMOD_BROKEN. + +Fri Jan 26 00:14:00 1996 Karl Fogel + + * server.c: renamed `dirname' to `dir_name', to avoid conflicts + with system headers. + + * client.c: renamed `dirname' and `last_dirname' to `dir_name' and + last_dir_name' (see above). Not strictly necessary, but + consistency is nice -- as long as you do it all the time. + +Thu Jan 25 00:41:59 1996 Karl Fogel + + * options.h.in (AUTH_SERVER_SUPPORT, AUTH_CLIENT_SUPPORT): change + comment now that no longer under construction. + +Wed Jan 24 15:25:22 1996 Jim Kingdon + + * Version 1.7.1. + + * Version 1.7. + +Sat Jan 20 00:05:08 1996 Jim Kingdon + + * Version 1.6.87. + +Mon Jan 15 18:14:55 1996 Gary Oberbrunner + and Jim Kingdon + + * tag.c (val_direntproc): New function to ignore + nonexistent dirs when recursing to check tag validity. + (tag_check_valid): Pass it to start_recursion. + * sanity.sh (death): New tests 65a0-65a6 cause test 74 to test for + above-fixed bug. + +Mon Jan 15 12:55:37 1996 Jim Kingdon + + * main.c: Revert change to run getopt_long twice. This can go in + after 1.7. + +Mon Jan 15 13:03:28 1996 Norbert Kiesel + + * filesubr.c (deep_remove_dir): added test of EEXIST for nonempty + directory (Posix states that both ENOTEMPTY (BSD) and EEXIST + (SYSV) are valid) + + * main.c (main): run getopt_long twice to allow command-line + suppression of reading the cvsrc file + +Fri Jan 12 10:02:43 1996 Jim Kingdon + + * Version 1.6.86. + +Thu Jan 11 23:28:05 1996 J.T. Conklin + and Jim Kingdon + + * fileattr.h (fileattr_startdir): Add comment about REPOS == NULL. + * fileattr.c (fileattr_read, fileattr_write): Assert that + fileattr_stored_repos != NULL. + (fileattr_free): If fileattr_stored_repos is NULL, don't free it. + +Thu Jan 11 18:03:21 1996 Karl Fogel + + * scramble.c (descramble): deal with DIAGNOSTIC better. + +Thu Jan 11 12:04:42 1996 Norbert Kiesel + + * main.c: remove CVS_NOADMIN. + + * options.h.in: remove CVS_NOADMIN + +Thu Jan 11 10:28:44 1996 Karl Fogel + + * scramble.c (descramble): make sure the string returned is safe + to free(). + +Wed Jan 10 01:11:23 1996 Jim Kingdon + + * server.c (serve_notify): Cast return value from malloc. + + * edit.c (notify_do): Use struct assignment, not struct + initialization (which SunOS4 /bin/cc doesn't have). + +Tue Jan 9 09:41:29 1996 Jim Kingdon + + * Version 1.6.85. + + We use version numbers instead of patchlevels. But there was some + confusing patchlevel stuff lying around. Nuke it: + * Makefile.in (HEADERS): Remove patchlevel.h + * patchlevel.h: Removed. + * main.c: Don't include patchlevel.h. + (main): Don't print patch level. + + * server.c (check_repository_password): Check for errors from + system calls; reindent function. + +Tue Jan 9 23:15:30 1996 Karl Fogel + + * expand_path.c: fix comments (explain expand_path()'s behavior + correctly). + +Tue Jan 9 09:41:29 1996 Jim Kingdon + + * edit.c (notify_proc): After copying in string following %s, + don't clobber it. Instead set up q to end of string. + + * watch.c (watch_modify_watchers), edit.c (editor_set): Fix sense + of test in trying to decide whether attributes are changed. + + * cvs.h (CVSROOTADM_USERS): New macro. + * edit.c (notify_do): Look up notifyee in CVSROOTADM_USERS if it + exists. + +Tue Jan 9 21:39:45 1996 Karl Fogel + + * expand_path.c: don't redundantly #include things that cvs.h + already #includes (i.e., stdio.h, ctype.h, string[s].h). + +Tue Jan 9 09:41:29 1996 Jim Kingdon + + * ignore.c (ign_default): Add *.obj. + + * server.c: Put /* */ around #endif comment. + +Mon Jan 8 20:37:17 1996 Karl Fogel + + * client.c (connect_to_pserver): check return value of recv(). + +Mon Jan 8 11:37:57 1996 Jim Kingdon + + * client.c (connect_to_pserver): Check for error from connect; + reindent function. + + * sanity.sh (4.75): Use dotest, so we get a PASS if test passes. + + * sanity.sh (dotest): New argument OUTPUT2. + (188a): Use it instead of \|. + + * sanity.sh (import): Avoid using string $ followed by Id followed + by $ in sanity.sh source, in case sanity.sh itself is under CVS. + I hate keyword expansion. + + * sanity.sh: If expr cannot handle multiline expressions, fail and + tell the user to get one which can. + + * release.c (release_delete): Remove unused variable retcode. + +Fri Jan 5 13:30:00 1996 Jim Kingdon + + * release.c (release_delete): Call unlink_file_dir rather + than "rm -rf". + +Thu Jan 4 09:58:30 1996 Jim Kingdon + + * commit.c (find_fileproc): Print "nothing known about foo" and + return 1 if the file doesn't exist and isn't in CVS/Entries. + (commit): If the recursion over find_fileproc returns an error, + print "correct above errors first!" just like local CVS. + * sanity.sh (basica): Test for above-fixed bug. + + * release.c (release): If we are the client, only unedit if the + server supports it. + + * sanity.sh: Remove STARTANCHOR stuff; expr patterns are + automatically anchored to the start. ENDANCHOR remains. + + * commit.c (commit): Don't start the server until we have + determined that there is something to commit. + +Thu Jan 4 09:48:33 1996 Ben Laurie + and Jim Kingdon + + * client.c (start_server): dup the file descriptor before + fdopening it. + +Wed Jan 3 18:25:25 1996 Jim Kingdon + + * sanity.sh: Remove tests 5, 5.5, and 5.75. All that stuff is + tested elsewhere. + + * ignore.c (ign_default): Change CVS* to CVS CVS.adm. CVS* is too + broad, especially in a case-insensitive filesystem. + + * Makefile.in (cvsbug): version.c is in srcdir. + +Wed Jan 3 17:30:45 1996 Phi-Long Tran + + * modules.c (do_module): Honor error_use_protocol in printing trace. + * server.c (server_register): Move check for options NULL to above + printing of the trace. + +Wed Jan 3 01:19:53 1996 Mark Immel + and Jim Kingdon + + * update.c (checkout_file): Do not resurrect file on join if it + doesn't contain the revisions we are joining. Probably not a + perfect test, but should be an improvement. + * sanity.sh (death): New death-file4-* tests, for bug fixed above. + +Wed Jan 3 01:19:53 1996 Jim Kingdon + + * add.c, admin.c, checkout.c, client.c, commit.c, diff.c, edit.c, + history.c, import.c, log.c, patch.c, release.c, remove.c, rtag.c, + status.c, tag.c, update.c, watch.c: In calling send_to_server, + pass \012 not \n. On the Mac \n is CR, not LF, and we want to + send LF. I didn't try to deal with whether files in CVSADM should + contain CR or LF--in fact there is some code in client.c which + reads \n from CVSADM files and passes it to send_to_server; it + needs to be cleaned up one way or the other. + + * entries.c (Entries_Open): Don't try to close fpin twice. + + * client.c (update_entries): Fix typo ("strlen (filename + 10)" + -> "strlen (filename) + 10"). + + * commit.c (checkaddfile): Remove arbitrary limit. + +Tue Jan 2 11:25:22 1996 Jim Kingdon + + * commit.c (commit): Only pass files which were modified, added, + or removed to send_file_names. This has as a side effect a + semantic change--the up-to-date check is now skipped for other + files--but probably a good one, or at least not a bad one. + * sanity.sh (basica): New test; tests for bug fixed above. + * sanity.sh (187a3): Adjust for new 'cvs commit' output. Set up + DOTSTAR to match arbitrary text (another GNU expr bug/misfeature, + sigh). + + * sanity.sh: Test that the commit in test 43 actually worked. + Merge tests basic2 and basic3 and make them independent of basic1. + (pass,fail): Don't insert spurious space. + (45.5): Fix typo in directory name. + +Tue Jan 2 13:00:00 1996 Jim Kingdon + + Visual C++ lint: + * myndbm.c: Prototype write_item. + +Tue Jan 2 11:25:22 1996 Jim Kingdon + + gcc -Wall lint: + * client.c (client_expand_modules): Pass error message not "" to error. + * client.c (supported_request), server.c (supported_response): + Return a value (gcc -Wall can't know that error doesn't return). + * commit.c (copy_ulist): Return a value. + * history.c (fill_hrec): Don't make assumptions about whether + time_t is "int" or "long" or what. + * cvs.h: Declare link_file. + * server.c: Include fileattr.h. + * server.c (server_notify): Remove unused variable val. + * tag.c (val_fileproc): Remove unused variable foundtag. + +Mon Jan 1 09:49:16 1996 Jim Kingdon + + * Version 1.6.5. + + * Version 1.6.4. + + * filesubr.c (link_file): Add comment about link vs. copy semantics. + + * cvs.h (struct vers_ts): Fix comments. + * commit.c (commit): Before we ask for a log message, figure out + what is modified and what is not and pass the information to + do_editor. + (copy_ulist,find_fileproc): New helper functions for above code. + + * client.c (read_line): When writing to from_server_logfile, write + the \n too. + + * client.c (send_files): No longer call send_file_names. + * client.h: Update comment. + * add.c, admin.c, commit.c, diff.c, edit.c, log.c, remove.c, + status.c, tag.c, update.c, watch.c: Call send_file_names before + send_files. + * client.c: New variables module_argc, module_argv. + (client_expand_modules): Set them, to arguments. + (client_send_expansions): Use them instead of modules_vector to + send arguments. + * sanity.sh (modules): Add test of modules -d flag. + + +For older changes see ChangeLog-9395. diff --git a/gnu/usr.bin/cvs/src/Makefile.in b/gnu/usr.bin/cvs/src/Makefile.in index d0dea5de9d2..9b9621df09f 100644 --- a/gnu/usr.bin/cvs/src/Makefile.in +++ b/gnu/usr.bin/cvs/src/Makefile.in @@ -12,12 +12,6 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -# $CVSid: @(#)Makefile.in 1.19 94/09/29 $ - SHELL = /bin/sh srcdir = @srcdir@ @@ -65,7 +59,8 @@ HEADERS = buffer.h cvs.h rcs.h hash.h myndbm.h \ TAGFILES = $(HEADERS) options.h.in $(SOURCES) -DISTFILES = .cvsignore Makefile.in ChangeLog ChangeLog-9395 ChangeLog-9194 \ +DISTFILES = .cvsignore Makefile.in \ + ChangeLog ChangeLog-96 ChangeLog-9395 ChangeLog-9194 \ NOTES \ sanity.sh cvsbug.sh $(TAGFILES) build_src.com diff --git a/gnu/usr.bin/cvs/src/add.c b/gnu/usr.bin/cvs/src/add.c index 08f6acc58af..fadc48bf3a0 100644 --- a/gnu/usr.bin/cvs/src/add.c +++ b/gnu/usr.bin/cvs/src/add.c @@ -92,57 +92,57 @@ add (argc, argv) #ifdef CLIENT_SUPPORT if (client_active) - { + { int i; start_server (); ign_setup (); if (options) send_arg(options); option_with_arg ("-m", message); for (i = 0; i < argc; ++i) - /* FIXME: Does this erroneously call Create_Admin in error - conditions which are only detected once the server gets its - hands on things? */ - if (isdir (argv[i])) + /* FIXME: Does this erroneously call Create_Admin in error + conditions which are only detected once the server gets its + hands on things? */ + if (isdir (argv[i])) { - char *tag; - char *date; - char *rcsdir = xmalloc (strlen (repository) - + strlen (argv[i]) + 10); - - /* before we do anything else, see if we have any - per-directory tags */ - ParseTag (&tag, &date); - - sprintf (rcsdir, "%s/%s", repository, argv[i]); - - strip_trailing_slashes (argv[i]); - - Create_Admin (argv[i], argv[i], rcsdir, tag, date); - - if (tag) - free (tag); - if (date) - free (date); - free (rcsdir); - - if (strchr (argv[i], '/') == NULL) - Subdir_Register ((List *) NULL, (char *) NULL, argv[i]); - else - { - char *cp, *b; - - cp = xstrdup (argv[i]); - b = strrchr (cp, '/'); - *b++ = '\0'; - Subdir_Register ((List *) NULL, cp, b); - free (cp); - } + char *tag; + char *date; + char *rcsdir = xmalloc (strlen (repository) + + strlen (argv[i]) + 10); + + /* before we do anything else, see if we have any + per-directory tags */ + ParseTag (&tag, &date); + + sprintf (rcsdir, "%s/%s", repository, argv[i]); + + strip_trailing_slashes (argv[i]); + + Create_Admin (argv[i], argv[i], rcsdir, tag, date); + + if (tag) + free (tag); + if (date) + free (date); + free (rcsdir); + + if (strchr (argv[i], '/') == NULL) + Subdir_Register ((List *) NULL, (char *) NULL, argv[i]); + else + { + char *cp, *b; + + cp = xstrdup (argv[i]); + b = strrchr (cp, '/'); + *b++ = '\0'; + Subdir_Register ((List *) NULL, cp, b); + free (cp); + } } send_file_names (argc, argv, SEND_EXPAND_WILD); - send_files (argc, argv, 0, 0); + send_files (argc, argv, 0, 0, 1); send_to_server ("add\012", 0); return get_responses_and_close (); - } + } #endif entries = Entries_Open (0); @@ -151,7 +151,9 @@ add (argc, argv) for (i = 0; i < argc; i++) { int begin_err = err; +#ifdef SERVER_SUPPORT int begin_added_files = added_files; +#endif struct file_info finfo; user = argv[i]; @@ -195,7 +197,8 @@ add (argc, argv) * See if a directory exists in the repository with * the same name. If so, blow this request off. */ - char dname[PATH_MAX]; + char *dname = xmalloc (strlen (repository) + strlen (user) + + 10); (void) sprintf (dname, "%s/%s", repository, user); if (isdir (dname)) { @@ -206,6 +209,7 @@ add (argc, argv) dname); error (1, 0, "illegal filename overlap"); } + free (dname); if (vers->options == NULL || *vers->options == '\0') { @@ -251,13 +255,16 @@ scheduling %s `%s' for addition on branch `%s'", { if (isdir (user) && !wrap_name_has (user, WRAP_TOCVS)) { - error (0, 0, "the directory `%s' cannot be added because a file of the", user); - error (1, 0, "same name already exists in the repository."); + error (0, 0, "\ +the directory `%s' cannot be added because a file of the", user); + error (1, 0, "\ +same name already exists in the repository."); } else { if (vers->tag) - error (0, 0, "file `%s' will be added on branch `%s' from version %s", + error (0, 0, "\ +file `%s' will be added on branch `%s' from version %s", user, vers->tag, vers->vn_rcs); else /* I'm not sure that mentioning vers->vn_rcs makes @@ -304,8 +311,8 @@ re-adding file %s (in place of dead revision %s)", * There is no RCS file, so somebody else must've removed * it from under us */ - error (0, 0, - "cannot resurrect %s; RCS file removed by second party", user); + error (0, 0, "\ +cannot resurrect %s; RCS file removed by second party", user); err++; } else @@ -343,7 +350,8 @@ re-adding file %s (in place of dead revision %s)", else { /* The user file shouldn't be there */ - error (0, 0, "%s should be removed and is still there (or is back again)", user); + error (0, 0, "\ +%s should be removed and is still there (or is back again)", user); err++; } } @@ -394,9 +402,9 @@ add_directory (repository, entries, dir) List *entries; char *dir; { - char rcsdir[PATH_MAX]; + char *rcsdir = NULL; struct saved_cwd cwd; - char message[PATH_MAX + 100]; + char *message = NULL; char *tag, *date; if (strchr (dir, '/') != NULL) @@ -432,6 +440,7 @@ add_directory (repository, entries, dir) goto out; } + rcsdir = xmalloc (strlen (repository) + strlen (dir) + 10); (void) sprintf (rcsdir, "%s/%s", repository, dir); if (isfile (rcsdir) && !isdir (rcsdir)) { @@ -440,6 +449,7 @@ add_directory (repository, entries, dir) } /* setup the log message */ + message = xmalloc (strlen (rcsdir) + 80); (void) sprintf (message, "Directory %s added to the repository\n", rcsdir); if (tag) { @@ -499,6 +509,7 @@ add_directory (repository, entries, dir) li = (struct logfile_info *) xmalloc (sizeof (struct logfile_info)); li->type = T_TITLE; li->tag = xstrdup (tag); + li->rev_old = li->rev_new = NULL; p->data = (char *) li; (void) addnode (ulist, p); Update_Logfile (rcsdir, message, (FILE *) NULL, ulist); @@ -517,19 +528,23 @@ add_directory (repository, entries, dir) free (date); if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); free_cwd (&cwd); Subdir_Register (entries, (char *) NULL, dir); (void) printf ("%s", message); + free (rcsdir); + free (message); return (0); out: if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); free_cwd (&cwd); + if (rcsdir != NULL) + free (rcsdir); return (0); } @@ -546,7 +561,7 @@ build_entry (repository, user, options, message, entries, tag) List *entries; char *tag; { - char fname[PATH_MAX]; + char *fname; char line[MAXLINELEN]; FILE *fp; @@ -558,12 +573,14 @@ build_entry (repository, user, options, message, entries, tag) * file user,t. If the "message" argument is set, use it as the * initial creation log (which typically describes the file). */ + fname = xmalloc (strlen (user) + 80); (void) sprintf (fname, "%s/%s%s", CVSADM, user, CVSEXT_LOG); fp = open_file (fname, "w+"); if (message && fputs (message, fp) == EOF) error (1, errno, "cannot write to %s", fname); if (fclose(fp) == EOF) error(1, errno, "cannot close %s", fname); + free (fname); /* * Create the entry now, since this allows the user to interrupt us above diff --git a/gnu/usr.bin/cvs/src/admin.c b/gnu/usr.bin/cvs/src/admin.c index 489f5c57898..c3dd0add1f3 100644 --- a/gnu/usr.bin/cvs/src/admin.c +++ b/gnu/usr.bin/cvs/src/admin.c @@ -97,7 +97,7 @@ admin (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, 0, 0); + send_files (argc, argv, 0, 0, 0); send_to_server ("admin\012", 0); return get_responses_and_close (); } diff --git a/gnu/usr.bin/cvs/src/buffer.h b/gnu/usr.bin/cvs/src/buffer.h index d3d52bdcc47..b62456cf63c 100644 --- a/gnu/usr.bin/cvs/src/buffer.h +++ b/gnu/usr.bin/cvs/src/buffer.h @@ -26,9 +26,15 @@ struct buffer both. */ /* Read data into the buffer DATA. There is room for up to SIZE - bytes. At least NEED bytes must be read (NEED may be 0). This - should return 0 on success, or -1 on end of file, or an errno - code. It should set the number of bytes read in *GOT. */ + bytes. In blocking mode, wait until some input, at least NEED + bytes, is available (NEED may be 0 but that is the same as NEED + == 1). In non-blocking mode return immediately no matter how + much input is available; NEED is ignored. Return 0 on success, + or -1 on end of file, or an errno code. Set the number of + bytes read in *GOT. + + If there are a nonzero number of bytes available, less than NEED, + followed by end of file, just read those bytes and return 0. */ int (*input) PROTO((void *closure, char *data, int need, int size, int *got)); diff --git a/gnu/usr.bin/cvs/src/checkin.c b/gnu/usr.bin/cvs/src/checkin.c index 50e309e273a..4f54a8bc333 100644 --- a/gnu/usr.bin/cvs/src/checkin.c +++ b/gnu/usr.bin/cvs/src/checkin.c @@ -29,12 +29,13 @@ Checkin (type, finfo, rcs, rev, tag, options, message) char *options; char *message; { - char fname[PATH_MAX]; + char *fname; Vers_TS *vers; int set_time; char *tocvsPath = NULL; (void) printf ("Checking in %s;\n", finfo->fullname); + fname = xmalloc (strlen (finfo->file) + 80); (void) sprintf (fname, "%s/%s%s", CVSADM, CVSPREFIX, finfo->file); /* @@ -134,6 +135,7 @@ Checkin (type, finfo, rcs, rev, tag, options, message) if (!noexec) error (1, errno, "could not check in %s -- fork failed", finfo->fullname); + free (fname); return (1); default: /* ci failed */ @@ -151,6 +153,7 @@ Checkin (type, finfo, rcs, rev, tag, options, message) rename_file (fname, finfo->file); error (0, 0, "could not check in %s", finfo->fullname); } + free (fname); return (1); } @@ -179,5 +182,6 @@ Checkin (type, finfo, rcs, rev, tag, options, message) mark_up_to_date (finfo->file); freevers_ts (&vers); + free (fname); return (0); } diff --git a/gnu/usr.bin/cvs/src/classify.c b/gnu/usr.bin/cvs/src/classify.c index c591b1e7867..522017a472d 100644 --- a/gnu/usr.bin/cvs/src/classify.c +++ b/gnu/usr.bin/cvs/src/classify.c @@ -172,12 +172,8 @@ conflict: %s created independently by second party", if (vers->ts_user == NULL) { - char tmp[PATH_MAX]; - /* There is no user file (as it should be) */ - (void) sprintf (tmp, "-%s", vers->vn_rcs ? vers->vn_rcs : ""); - if (vers->vn_rcs == NULL || RCS_isdead (vers->srcfile, vers->vn_rcs)) { @@ -188,8 +184,9 @@ conflict: %s created independently by second party", */ ret = T_REMOVE_ENTRY; } - else if (strcmp (tmp, vers->vn_user) == 0) - + else if (vers->vn_rcs == NULL + ? vers->vn_user[1] == '\0' + : strcmp (vers->vn_rcs, vers->vn_user + 1) == 0) /* * The RCS file is the same version as the user file was, and * that's OK; remove it diff --git a/gnu/usr.bin/cvs/src/client.c b/gnu/usr.bin/cvs/src/client.c index ea6340bdfd1..2a2cfb90bb6 100644 --- a/gnu/usr.bin/cvs/src/client.c +++ b/gnu/usr.bin/cvs/src/client.c @@ -4,6 +4,7 @@ #include "config.h" #endif /* HAVE_CONFIG_H */ +#include #include "cvs.h" #include "getline.h" #include "edit.h" @@ -431,7 +432,8 @@ static int use_socket_style = 0; static int server_sock; /* These routines implement a buffer structure which uses send and - recv. We don't need the block routine, so we don't implement it. */ + recv. The buffer is always in blocking mode so we don't implement + the block routine. */ /* We use an instance of this structure as the closure field. */ @@ -490,16 +492,28 @@ socket_buffer_input (closure, data, need, size, got) *got = 0; - while (need > 0) + do { nbytes = recv (sb->socket, data, size, 0); if (nbytes < 0) error (1, errno, "reading from server"); + if (nbytes == 0) + { + /* End of file (for example, the server has closed + the connection). If we've already read something, we + just tell the caller about the data, not about the end of + file. If we've read nothing, we return end of file. */ + if (*got == 0) + return -1; + else + return 0; + } need -= nbytes; size -= nbytes; data += nbytes; *got += nbytes; } + while (need > 0); return 0; } @@ -636,8 +650,10 @@ int filter_through_gunzip (fd, dir, pidp) */ static char *toplevel_repos; -/* Working directory when we first started. */ -char toplevel_wd[PATH_MAX]; +/* Working directory when we first started. Note: we could speed things + up on some systems by using savecwd.h here instead of just always + storing a name. */ +char *toplevel_wd; static void handle_ok (args, len) @@ -710,9 +726,6 @@ handle_valid_requests (args, len) */ send_to_server (rq->name, 0); send_to_server ("\012", 0); - - if (!strcmp("UseUnchanged",rq->name)) - use_unchanged = 1; } else rq->status = rq_supported; @@ -728,27 +741,6 @@ handle_valid_requests (args, len) } } -static int use_directory = -1; - -static char *get_short_pathname PROTO((const char *)); - -static char * -get_short_pathname (name) - const char *name; -{ - const char *retval; - if (use_directory) - return (char *) name; - if (strncmp (name, toplevel_repos, strlen (toplevel_repos)) != 0) - error (1, 0, "server bug: name `%s' doesn't specify file in `%s'", - name, toplevel_repos); - retval = name + strlen (toplevel_repos) + 1; - if (retval[-1] != '/') - error (1, 0, "server bug: name `%s' doesn't specify file in `%s'", - name, toplevel_repos); - return (char *) retval; -} - /* This variable holds the result of Entries_Open, so that we can close Entries_Close on it when we move on to a new directory, or when we finish. */ @@ -777,7 +769,7 @@ call_in_directory (pathname, func, data) char *dir_name; char *filename; /* Just the part of pathname relative to toplevel_repos. */ - char *short_pathname = get_short_pathname (pathname); + char *short_pathname = pathname; char *p; /* @@ -800,30 +792,23 @@ call_in_directory (pathname, func, data) int reposdirname_absolute; reposname = NULL; - if (use_directory) - read_line (&reposname); + read_line (&reposname); + assert (reposname != NULL); reposdirname_absolute = 0; - if (reposname != NULL) + if (strncmp (reposname, toplevel_repos, strlen (toplevel_repos)) != 0) { - if (strncmp (reposname, toplevel_repos, strlen (toplevel_repos)) != 0) + reposdirname_absolute = 1; + short_repos = reposname; + } + else + { + short_repos = reposname + strlen (toplevel_repos) + 1; + if (short_repos[-1] != '/') { reposdirname_absolute = 1; short_repos = reposname; } - else - { - short_repos = reposname + strlen (toplevel_repos) + 1; - if (short_repos[-1] != '/') - { - reposdirname_absolute = 1; - short_repos = reposname; - } - } - } - else - { - short_repos = short_pathname; } reposdirname = xstrdup (short_repos); p = strrchr (reposdirname, '/'); @@ -853,14 +838,9 @@ call_in_directory (pathname, func, data) else ++filename; - if (reposname != NULL) - { - /* This is the use_directory case. */ - - short_pathname = xmalloc (strlen (pathname) + strlen (filename) + 5); - strcpy (short_pathname, pathname); - strcat (short_pathname, filename); - } + short_pathname = xmalloc (strlen (pathname) + strlen (filename) + 5); + strcpy (short_pathname, pathname); + strcat (short_pathname, filename); if (last_dir_name == NULL || strcmp (last_dir_name, dir_name) != 0) @@ -875,14 +855,48 @@ call_in_directory (pathname, func, data) free (last_dir_name); last_dir_name = dir_name; - if (toplevel_wd[0] == '\0') - if (getwd (toplevel_wd) == NULL) - error (1, 0, - "could not get working directory: %s", toplevel_wd); + if (toplevel_wd == NULL) + { + toplevel_wd = xgetwd (); + if (toplevel_wd == NULL) + error (1, errno, "could not get working directory"); + } - if ( CVS_CHDIR (toplevel_wd) < 0) + if (CVS_CHDIR (toplevel_wd) < 0) error (1, errno, "could not chdir to %s", toplevel_wd); newdir = 0; + + /* Create the CVS directory at the top level if needed. + The isdir seems like an unneeded system call, but it *does* + need to be called both if the CVS_CHDIR below succeeds (e.g. + "cvs co .") or if it fails (e.g. basicb-1a in testsuite). */ + if (/* I think the reposdirname_absolute case has to do with + things like "cvs update /foo/bar". In any event, the + code below which tries to put toplevel_repos into + CVS/Repository is almost surely unsuited to + the reposdirname_absolute case. */ + !reposdirname_absolute + + && ! isdir (CVSADM)) + { + char *repo; + char *r; + + newdir = 1; + + repo = xmalloc (strlen (toplevel_repos) + + 10); + strcpy (repo, toplevel_repos); + r = repo + strlen (repo); + if (r[-1] != '.' || r[-2] != '/') + strcpy (r, "/."); + + Create_Admin (".", ".", repo, (char *) NULL, + (char *) NULL); + + free (repo); + } + if ( CVS_CHDIR (dir_name) < 0) { char *dir; @@ -953,6 +967,14 @@ call_in_directory (pathname, func, data) strcpy (dir, dir_name); } + if (fncmp (dir, CVSADM) == 0) + { + error (0, 0, "cannot create a directory named %s", dir); + error (0, 0, "because CVS uses \"%s\" for its own uses", + CVSADM); + error (1, 0, "rename the directory and try again"); + } + if (mkdir_if_needed (dir)) { /* It already existed, fine. Just keep going. */ @@ -1019,41 +1041,6 @@ call_in_directory (pathname, func, data) error (1, errno, "could not chdir to %s", dir_name); } - /* If the modules file has an entry for the entire tree (e.g., - ``world -a .''), we may need to create the CVS directory - specially in this working directory. */ - if (strcmp (dir_name, ".") == 0 - && ! isdir (CVSADM)) - { - char *repo; - char *r; - - newdir = 1; - - repo = xmalloc (strlen (reposdirname) - + strlen (toplevel_repos) - + 10); - if (reposdirname_absolute) - r = repo; - else - { - strcpy (repo, toplevel_repos); - r = repo + strlen (repo); - *r++ = '/'; - } - - strcpy (r, reposdirname); - - r += strlen (r); - if (r[-1] != '.' || r[-2] != '/') - strcpy (r, "/."); - - Create_Admin (dir_name, dir_name, repo, (char *) NULL, - (char *) NULL); - - free (repo); - } - if (strcmp (command_name, "export") != 0) { last_entries = Entries_Open (0); @@ -1084,11 +1071,8 @@ call_in_directory (pathname, func, data) free (dir_name); free (reposdirname); (*func) (data, last_entries, short_pathname, filename); - if (reposname != NULL) - { - free (short_pathname); - free (reposname); - } + free (short_pathname); + free (reposname); } static void @@ -1575,10 +1559,12 @@ update_entries (data_arg, ent_list, short_pathname, filename) else { int retcode; - char backup[PATH_MAX]; + char *backup; struct stat s; - (void) sprintf (backup, "%s~", filename); + backup = xmalloc (strlen (filename) + 5); + strcpy (backup, filename); + strcat (backup, "~"); (void) unlink_file (backup); if (!isfile (filename)) error (1, 0, "patch original file %s does not exist", @@ -1631,8 +1617,10 @@ update_entries (data_arg, ent_list, short_pathname, filename) stored_checksum_valid = 0; + free (backup); return; } + free (backup); } free (temp_filename); @@ -1886,28 +1874,10 @@ static int is_cvsroot_level (pathname) char *pathname; { - char *short_pathname; - if (strcmp (toplevel_repos, CVSroot_directory) != 0) return 0; - if (!use_directory) - { - if (strncmp (pathname, CVSroot_directory, strlen (CVSroot_directory)) != 0) - error (1, 0, - "server bug: pathname `%s' doesn't specify file in `%s'", - pathname, CVSroot_directory); - short_pathname = pathname + strlen (CVSroot_directory) + 1; - if (short_pathname[-1] != '/') - error (1, 0, - "server bug: pathname `%s' doesn't specify file in `%s'", - pathname, CVSroot_directory); - return strchr (short_pathname, '/') == NULL; - } - else - { - return strchr (pathname, '/') == NULL; - } + return strchr (pathname, '/') == NULL; } static void @@ -2133,15 +2103,17 @@ do_deferred_progs () struct save_prog *p; struct save_prog *q; - char fname[PATH_MAX]; + char *fname; FILE *f; - if (toplevel_wd[0] != '\0') - { - if ( CVS_CHDIR (toplevel_wd) < 0) - error (1, errno, "could not chdir to %s", toplevel_wd); - } + + if (toplevel_wd != NULL) + { + if (CVS_CHDIR (toplevel_wd) < 0) + error (1, errno, "could not chdir to %s", toplevel_wd); + } for (p = checkin_progs; p != NULL; ) { + fname = xmalloc (strlen (p->dir) + sizeof CVSADM_CIPROG + 10); sprintf (fname, "%s/%s", p->dir, CVSADM_CIPROG); f = open_file (fname, "w"); if (fprintf (f, "%s\n", p->name) < 0) @@ -2153,10 +2125,12 @@ do_deferred_progs () q = p->next; free (p); p = q; + free (fname); } checkin_progs = NULL; - for (p = update_progs; p != NULL; p = p->next) + for (p = update_progs; p != NULL; ) { + fname = xmalloc (strlen (p->dir) + sizeof CVSADM_UPROG + 10); sprintf (fname, "%s/%s", p->dir, CVSADM_UPROG); f = open_file (fname, "w"); if (fprintf (f, "%s\n", p->name) < 0) @@ -2165,50 +2139,14 @@ do_deferred_progs () error (1, errno, "closing %s", fname); free (p->name); free (p->dir); + q = p->next; free (p); + p = q; + free (fname); } update_progs = NULL; } -static int client_isemptydir PROTO((char *)); - -/* - * Returns 1 if the argument directory exists and is completely empty, - * other than the existence of the CVS directory entry. Zero otherwise. - */ -static int -client_isemptydir (dir) - char *dir; -{ - DIR *dirp; - struct dirent *dp; - - if ((dirp = CVS_OPENDIR (dir)) == NULL) - { - if (! existence_error (errno)) - error (0, errno, "cannot open directory %s for empty check", dir); - return (0); - } - errno = 0; - while ((dp = readdir (dirp)) != NULL) - { - if (strcmp (dp->d_name, ".") != 0 && strcmp (dp->d_name, "..") != 0 && - strcmp (dp->d_name, CVSADM) != 0) - { - (void) closedir (dirp); - return (0); - } - } - if (errno != 0) - { - error (0, errno, "cannot read directory %s", dir); - (void) closedir (dirp); - return (0); - } - (void) closedir (dirp); - return (1); -} - struct save_dir { char *dir; struct save_dir *next; @@ -2238,18 +2176,19 @@ process_prune_candidates () struct save_dir *p; struct save_dir *q; - if (toplevel_wd[0] != '\0') + if (toplevel_wd != NULL) { - if ( CVS_CHDIR (toplevel_wd) < 0) - error (1, errno, "could not chdir to %s", toplevel_wd); + if (CVS_CHDIR (toplevel_wd) < 0) + error (1, errno, "could not chdir to %s", toplevel_wd); } for (p = prune_candidates; p != NULL; ) { - if (client_isemptydir (p->dir)) + if (isemptydir (p->dir, 1)) { char *b; - unlink_file_dir (p->dir); + if (unlink_file_dir (p->dir) < 0) + error (0, errno, "cannot remove %s", p->dir); b = strrchr (p->dir, '/'); if (b == NULL) Subdir_Deregister ((List *) NULL, (char *) NULL, p->dir); @@ -2319,23 +2258,12 @@ send_repository (dir, repos, update_dir) /* 80 is large enough for any of CVSADM_*. */ adm_name = xmalloc (strlen (dir) + 80); - if (use_directory == -1) - use_directory = supported_request ("Directory"); + send_to_server ("Directory ", 0); + send_to_server (update_dir, 0); + send_to_server ("\012", 1); + send_to_server (repos, 0); + send_to_server ("\012", 1); - if (use_directory) - { - send_to_server ("Directory ", 0); - send_to_server (update_dir, 0); - send_to_server ("\012", 1); - send_to_server (repos, 0); - send_to_server ("\012", 1); - } - else - { - send_to_server ("Repository ", 0); - send_to_server (repos, 0); - send_to_server ("\012", 1); - } if (supported_request ("Static-directory")) { adm_name[0] = '\0'; @@ -2606,9 +2534,10 @@ client_expand_modules (argc, argv, local) } void -client_send_expansions (local, where) +client_send_expansions (local, where, build_dirs) int local; char *where; + int build_dirs; { int i; char *argv[1]; @@ -2625,7 +2554,7 @@ client_send_expansions (local, where) { argv[0] = where ? where : modules_vector[i]; if (isfile (argv[0])) - send_files (1, argv, local, 0); + send_files (1, argv, local, 0, build_dirs); } send_a_repository ("", CVSroot_directory, ""); } @@ -2987,28 +2916,34 @@ supported_request (name) #ifdef AUTH_CLIENT_SUPPORT -void +static void init_sockaddr PROTO ((struct sockaddr_in *, char *, + unsigned int)); + +static void init_sockaddr (name, hostname, port) struct sockaddr_in *name; - const char *hostname; - unsigned short int port; + char *hostname; + unsigned int port; { struct hostent *hostinfo; + unsigned short shortport = port; memset (name, 0, sizeof (*name)); name->sin_family = AF_INET; - name->sin_port = htons (port); + name->sin_port = htons (shortport); hostinfo = gethostbyname (hostname); if (hostinfo == NULL) { fprintf (stderr, "Unknown host %s.\n", hostname); - exit (EXIT_FAILURE); + error_exit (); } name->sin_addr = *(struct in_addr *) hostinfo->h_addr; } -int +static int auth_server_port_number PROTO ((void)); + +static int auth_server_port_number () { struct servent *s = getservbyname ("cvspserver", "tcp"); @@ -3047,7 +2982,7 @@ connect_to_pserver (tofdp, fromfdp, verify_only) if (sock == -1) { fprintf (stderr, "socket() failed\n"); - exit (EXIT_FAILURE); + error_exit (); } port_number = auth_server_port_number (); init_sockaddr (&client_sai, CVSroot_hostname, port_number); @@ -3059,7 +2994,15 @@ connect_to_pserver (tofdp, fromfdp, verify_only) /* Run the authorization mini-protocol before anything else. */ { int i; - char ch, read_buf[PATH_MAX]; + char ch; + + /* Long enough to hold I LOVE YOU or I HATE YOU. Using a fixed-size + buffer seems better than letting an apeshit server chew up our + memory with illegal responses, and the value comes from + the protocol itself; it is not an arbitrary limit on data sent. */ +#define LARGEST_RESPONSE 80 + char read_buf[LARGEST_RESPONSE]; + char *begin = NULL; char *repository = CVSroot_directory; char *username = CVSroot_username; @@ -3108,8 +3051,8 @@ connect_to_pserver (tofdp, fromfdp, verify_only) * end of both ACK and NACK, and we loop, reading until "\n". */ ch = 0; - memset (read_buf, 0, PATH_MAX); - for (i = 0; (i < (PATH_MAX - 1)) && (ch != '\n'); i++) + memset (read_buf, 0, LARGEST_RESPONSE); + for (i = 0; (i < (LARGEST_RESPONSE - 1)) && (ch != '\n'); i++) { if (recv (sock, &ch, 1, 0) < 0) error (1, errno, "recv() from server %s", CVSroot_hostname); @@ -3528,7 +3471,7 @@ the :server: access method is not supported by this port of CVS"); send_to_server ("valid-requests\012", 0); if (get_server_responses ()) - exit (EXIT_FAILURE); + error_exit (); /* * Now handle global options. @@ -3719,7 +3662,6 @@ start_rsh_server (tofdp, fromfdp) invoke another rsh on a proxy machine. */ char *cvs_rsh = getenv ("CVS_RSH"); char *cvs_server = getenv ("CVS_SERVER"); - char command[PATH_MAX]; int i = 0; /* This needs to fit "rsh", "-b", "-l", "USER", "host", "cmd (w/ args)", and NULL. We leave some room to grow. */ @@ -3760,7 +3702,6 @@ start_rsh_server (tofdp, fromfdp) if (trace) { fprintf (stderr, " -> Starting server: "); - fprintf (stderr, "%s", command); putc ('\n', stderr); } @@ -4172,18 +4113,8 @@ send_fileproc (callerdat, finfo) * Do we want to print "file was lost" like normal CVS? * Would it always be appropriate? */ - /* File no longer exists. */ - if (!use_unchanged) - { - /* if the server is old, use the old request... */ - send_to_server ("Lost ", 0); - send_to_server (filename, 0); - send_to_server ("\012", 1); - /* - * Otherwise, don't do anything for missing files, - * they just happen. - */ - } + /* File no longer exists. Don't do anything, missing files + just happen. */ } else if (vers->ts_rcs == NULL || strcmp (vers->ts_user, vers->ts_rcs) != 0) @@ -4192,13 +4123,9 @@ send_fileproc (callerdat, finfo) } else { - /* Only use this request if the server supports it... */ - if (use_unchanged) - { - send_to_server ("Unchanged ", 0); - send_to_server (filename, 0); - send_to_server ("\012", 1); - } + send_to_server ("Unchanged ", 0); + send_to_server (filename, 0); + send_to_server ("\012", 1); } /* if this directory has an ignore list, add this file to it */ @@ -4276,6 +4203,7 @@ send_dirent_proc (callerdat, dir, repository, update_dir, entries) char *update_dir; List *entries; { + int build_dirs = *(int *) callerdat; int dir_exists; char *cvsadm_name; char *cvsadm_repos_name; @@ -4323,7 +4251,14 @@ send_dirent_proc (callerdat, dir, repository, update_dir, entries) free (repos); } else - send_a_repository (dir, repository, update_dir); + { + /* Don't send a non-existent directory unless we are building + new directories (build_dirs is true). Otherwise, CVS may + see a D line in an Entries file, and recreate a directory + which the user removed by hand. */ + if (dir_exists || build_dirs) + send_a_repository (dir, repository, update_dir); + } free (cvsadm_repos_name); return (dir_exists ? R_PROCESS : R_SKIP_ALL); @@ -4376,11 +4311,6 @@ send_file_names (argc, argv, flags) char *q; int level; int max_level; - char *line; - size_t line_allocated; - - line = NULL; - line_allocated = 0; /* The fact that we do this here as well as start_recursion is a bit of a performance hit. Perhaps worth cleaning up someday. */ @@ -4436,6 +4366,7 @@ send_file_names (argc, argv, flags) { char buf[1]; char *p = argv[i]; + char *line = NULL; #ifdef FILENAMES_CASE_INSENSITIVE /* We want to send the file name as it appears @@ -4447,39 +4378,28 @@ send_file_names (argc, argv, flags) non-local case too, though. */ if (p == last_component (p)) { - FILE *ent; - - ent = CVS_FOPEN (CVSADM_ENT, "r"); - if (ent == NULL) + List *entries; + Node *node; + + /* If we were doing non-local directory, + we would save_cwd, CVS_CHDIR + like in update.c:isemptydir. */ + /* Note that if we are adding a directory, + the following will read the entry + that we just wrote there, that is, we + will get the case specified on the + command line, not the case of the + directory in the filesystem. This + is correct behavior. */ + entries = Entries_Open (0); + node = findnode_fn (entries, p); + if (node != NULL) { - if (!existence_error (errno)) - error (0, errno, "cannot read %s", CVSADM_ENT); - } - else - { - while (getline (&line, &line_allocated, ent) > 0) - { - char *cp; - - if (line[0] != '/') - continue; - cp = strchr (line + 1, '/'); - if (cp == NULL) - continue; - *cp = '\0'; - if (fncmp (p, line + 1) == 0) - { - p = line + 1; - break; - } - } - if (ferror (ent)) - error (0, errno, "cannot read %s", CVSADM_ENT); - if (fclose (ent) < 0) - error (0, errno, "cannot close %s", CVSADM_ENT); - /* We don't attempt to look at CVS/Entries.Log. In a few cases that might - lead to strange behaviors, but they should be fairly obscure. */ + line = xstrdup (node->key); + p = line; + delnode (node); } + Entries_Close (entries); } #endif /* FILENAMES_CASE_INSENSITIVE */ @@ -4504,11 +4424,10 @@ send_file_names (argc, argv, flags) ++p; } send_to_server ("\012", 1); + if (line != NULL) + free (line); } - if (line != NULL) - free (line); - if (flags & SEND_EXPAND_WILD) { int i; @@ -4522,16 +4441,18 @@ send_file_names (argc, argv, flags) /* * Send Repository, Modified and Entry. argc and argv contain only * the files to operate on (or empty for everything), not options. - * local is nonzero if we should not recurse (-l option). Also sends + * local is nonzero if we should not recurse (-l option). build_dirs + * is nonzero if nonexistent directories should be sent. Also sends * Argument lines for argc and argv, so should be called after options * are sent. */ void -send_files (argc, argv, local, aflag) +send_files (argc, argv, local, aflag, build_dirs) int argc; char **argv; int local; int aflag; + int build_dirs; { int err; @@ -4542,10 +4463,10 @@ send_files (argc, argv, local, aflag) */ err = start_recursion (send_fileproc, send_filesdoneproc, - send_dirent_proc, (DIRLEAVEPROC)NULL, NULL, + send_dirent_proc, (DIRLEAVEPROC)NULL, (void *) &build_dirs, argc, argv, local, W_LOCAL, aflag, 0, (char *)NULL, 0); if (err) - exit (EXIT_FAILURE); + error_exit (); if (toplevel_repos == NULL) /* * This happens if we are not processing any files, diff --git a/gnu/usr.bin/cvs/src/client.h b/gnu/usr.bin/cvs/src/client.h index d68412628f7..10e1759f049 100644 --- a/gnu/usr.bin/cvs/src/client.h +++ b/gnu/usr.bin/cvs/src/client.h @@ -82,16 +82,8 @@ send_file_names PROTO((int argc, char **argv, unsigned int flags)); * local is nonzero if we should not recurse (-l option). */ void -send_files PROTO((int argc, char **argv, int local, int aflag)); - -/* - * Like send_files but never send "Unchanged"--just send the contents of the - * file in that case. This is used to fix it if you import a directory which - * happens to have CVS directories (yes it is obscure but the testsuite tests - * it). - */ -void -send_files_contents PROTO((int argc, char **argv, int local, int aflag)); +send_files PROTO((int argc, char **argv, int local, int aflag, + int build_dirs)); /* Send an argument to the remote server. */ void @@ -160,14 +152,15 @@ extern struct response responses[]; extern void client_senddate PROTO((const char *date)); extern void client_expand_modules PROTO((int argc, char **argv, int local)); -extern void client_send_expansions PROTO((int local, char *where)); +extern void client_send_expansions PROTO((int local, char *where, + int build_dirs)); extern void client_nonexpanded_setup PROTO((void)); extern void send_init_command PROTO ((void)); extern char **failed_patches; extern int failed_patches_count; -extern char toplevel_wd[]; +extern char *toplevel_wd; extern void client_import_setup PROTO((char *repository)); extern int client_process_import_file PROTO((char *message, char *vfile, char *vtag, diff --git a/gnu/usr.bin/cvs/src/create_adm.c b/gnu/usr.bin/cvs/src/create_adm.c index 01d38f90bf8..e1f7773d3b8 100644 --- a/gnu/usr.bin/cvs/src/create_adm.c +++ b/gnu/usr.bin/cvs/src/create_adm.c @@ -25,23 +25,24 @@ Create_Admin (dir, update_dir, repository, tag, date) { FILE *fout; char *cp; - char tmp[PATH_MAX]; + char *tmp; #ifdef SERVER_SUPPORT if (trace) { - char wd[PATH_MAX]; - getwd (wd); + char *wd = xgetwd (); fprintf (stderr, "%c-> Create_Admin (%s, %s, %s, %s, %s) in %s\n", (server_active) ? 'S' : ' ', dir, update_dir, repository, tag ? tag : "", date ? date : "", wd); + free (wd); } #endif if (noexec) return; + tmp = xmalloc (strlen (dir) + 100); if (dir != NULL) (void) sprintf (tmp, "%s/%s", dir, CVSADM); else @@ -67,7 +68,7 @@ Create_Admin (dir, update_dir, repository, tag, date) error (1, errno, "cannot open %s/%s", update_dir, CVSADM_REP); } cp = repository; - strip_path (cp); + strip_trailing_slashes (cp); #ifdef RELATIVE_REPOS /* @@ -76,11 +77,12 @@ Create_Admin (dir, update_dir, repository, tag, date) */ if (CVSroot_directory != NULL) { - char path[PATH_MAX]; + char *path = xmalloc (strlen (CVSroot_directory) + 10); (void) sprintf (path, "%s/", CVSroot_directory); if (strncmp (repository, path, strlen (path)) == 0) cp = repository + strlen (path); + free (path); } #endif @@ -137,4 +139,5 @@ Create_Admin (dir, update_dir, repository, tag, date) } #endif + free (tmp); } diff --git a/gnu/usr.bin/cvs/src/cvsbug.sh b/gnu/usr.bin/cvs/src/cvsbug.sh index bee910f990d..ae6af7822b9 100644 --- a/gnu/usr.bin/cvs/src/cvsbug.sh +++ b/gnu/usr.bin/cvs/src/cvsbug.sh @@ -7,7 +7,7 @@ # This file is part of GNU GNATS. # Modified by Berliner for CVS. # -#ident "@(#)cvs/src:$Name: $:$Id: cvsbug.sh,v 1.1.1.2 1996/01/30 00:17:47 tholo Exp $" +#ident "@(#)cvs/src:$Name: $:$Id: cvsbug.sh,v 1.1.1.3 1997/02/21 06:37:08 tholo Exp $" # # GNU GNATS is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,10 +18,6 @@ # 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 GNU GNATS; see the file COPYING. If not, write to -# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. # The version of this send-pr. VERSION=3.2 diff --git a/gnu/usr.bin/cvs/src/diff.c b/gnu/usr.bin/cvs/src/diff.c index ca113323b4a..7163c3e7481 100644 --- a/gnu/usr.bin/cvs/src/diff.c +++ b/gnu/usr.bin/cvs/src/diff.c @@ -51,9 +51,8 @@ static char *user_file_rev; #endif static char *options; -/* FIXME: arbitrary limit (security hole, if the client passes us - data which overflows it). */ -static char opts[PATH_MAX]; +static char *opts; +static size_t opts_allocated = 1; static int diff_errors; static int empty_files = 0; @@ -146,6 +145,28 @@ static struct option const longopts[] = {0, 0, 0, 0} }; +static void strcat_and_allocate PROTO ((char **, size_t *, const char *)); + +/* *STR is a pointer to a malloc'd string. *LENP is its allocated + length. Add SRC to the end of it, reallocating if necessary. */ +static void +strcat_and_allocate (str, lenp, src) + char **str; + size_t *lenp; + const char *src; +{ + size_t new_size; + + new_size = strlen (*str) + strlen (src) + 1; + if (*str == NULL || new_size >= *lenp) + { + while (new_size >= *lenp) + *lenp *= 2; + *str = xrealloc (*str, *lenp); + } + strcat (*str, src); +} + int diff (argc, argv) int argc; @@ -165,11 +186,17 @@ diff (argc, argv) * intercept the -r arguments for doing revision diffs; and -l/-R for a * non-recursive/recursive diff. */ -#ifdef SERVER_SUPPORT - /* Need to be able to do this command more than once (according to - the protocol spec, even if the current client doesn't use it). */ + + /* For server, need to be able to do this command more than once + (according to the protocol spec, even if the current client + doesn't use it). */ + if (opts == NULL) + { + opts_allocated = 1; + opts = xmalloc (opts_allocated); + } opts[0] = '\0'; -#endif + optind = 1; while ((c = getopt_long (argc, argv, "abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:V:W:k:r:", @@ -183,30 +210,31 @@ diff (argc, argv) case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'B': case 'H': case 'T': (void) sprintf (tmp, " -%c", (char) c); - (void) strcat (opts, tmp); + strcat_and_allocate (&opts, &opts_allocated, tmp); break; case 'C': case 'F': case 'I': case 'L': case 'U': case 'V': case 'W': (void) sprintf (tmp, " -%c", (char) c); - strcat (opts, tmp); - strcat (opts, optarg); + strcat_and_allocate (&opts, &opts_allocated, tmp); + strcat_and_allocate (&opts, &opts_allocated, optarg); break; case 147: /* --ifdef. */ - strcat (opts, " -D"); - strcat (opts, optarg); + strcat_and_allocate (&opts, &opts_allocated, " -D"); + strcat_and_allocate (&opts, &opts_allocated, optarg); break; case 129: case 130: case 131: case 132: case 133: case 134: case 135: case 136: case 137: case 138: case 139: case 140: case 141: case 142: case 143: case 144: case 145: case 146: - strcat (opts, " --"); - strcat (opts, longopts[option_index].name); + strcat_and_allocate (&opts, &opts_allocated, " --"); + strcat_and_allocate (&opts, &opts_allocated, + longopts[option_index].name); if (longopts[option_index].has_arg == 1 || (longopts[option_index].has_arg == 2 && optarg != NULL)) { - strcat (opts, "="); - strcat (opts, optarg); + strcat_and_allocate (&opts, &opts_allocated, "="); + strcat_and_allocate (&opts, &opts_allocated, optarg); } break; case 'R': @@ -284,7 +312,7 @@ diff (argc, argv) /* Send the current files unless diffing two revs from the archive */ if (diff_rev2 == NULL && diff_date2 == NULL) #endif - send_files (argc, argv, local, 0); + send_files (argc, argv, local, 0, 0); send_to_server ("diff\012", 0); err = get_responses_and_close (); @@ -328,7 +356,7 @@ diff_fileproc (callerdat, finfo) enum diff_file empty_file = DIFF_DIFFERENT; char *tmp; char *tocvsPath; - char fname[PATH_MAX]; + char *fname; #ifdef SERVER_SUPPORT user_file_rev = 0; @@ -508,10 +536,14 @@ diff_fileproc (callerdat, finfo) if (tocvsPath) { /* Backup the current version of the file to CVS/,,filename */ + fname = xmalloc (strlen (finfo->file) + + sizeof CVSADM + + sizeof CVSPREFIX + + 10); sprintf(fname,"%s/%s%s",CVSADM, CVSPREFIX, finfo->file); if (unlink_file_dir (fname) < 0) if (! existence_error (errno)) - error (1, errno, "cannot remove %s", finfo->file); + error (1, errno, "cannot remove %s", fname); rename_file (finfo->file, fname); /* Copy the wrapped file to the current directory then go to work */ copy_file (tocvsPath, finfo->file); @@ -609,7 +641,8 @@ diff_fileproc (callerdat, finfo) rename_file (fname,finfo->file); if (unlink_file (tocvsPath) < 0) - error (1, errno, "cannot remove %s", finfo->file); + error (1, errno, "cannot remove %s", tocvsPath); + free (fname); } if (empty_file == DIFF_REMOVED @@ -828,16 +861,25 @@ diff_file_nodiff (finfo, vers, empty_file) return DIFF_DIFFERENT; } #endif /* SERVER_SUPPORT */ + if (use_rev1 == NULL || (vers->vn_user != NULL && strcmp (use_rev1, vers->vn_user) == 0)) { - if (strcmp (vers->ts_rcs, vers->ts_user) == 0 && - (!(*options) || strcmp (options, vers->options) == 0)) + if (empty_file == DIFF_DIFFERENT + && vers->ts_user != NULL + && strcmp (vers->ts_rcs, vers->ts_user) == 0 + && (!(*options) || strcmp (options, vers->options) == 0)) { return DIFF_SAME; } - if (use_rev1 == NULL) - use_rev1 = xstrdup (vers->vn_user); + if (use_rev1 == NULL + && (vers->vn_user[0] != '0' || vers->vn_user[1] != '\0')) + { + if (vers->vn_user[0] == '-') + use_rev1 = xstrdup (vers->vn_user + 1); + else + use_rev1 = xstrdup (vers->vn_user); + } } /* If we already know that the file is being added or removed, diff --git a/gnu/usr.bin/cvs/src/edit.c b/gnu/usr.bin/cvs/src/edit.c index 0e4687c50a0..ae7964d9645 100644 --- a/gnu/usr.bin/cvs/src/edit.c +++ b/gnu/usr.bin/cvs/src/edit.c @@ -8,11 +8,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #include "cvs.h" #include "getline.h" @@ -94,7 +90,7 @@ watch_onoff (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0); + send_files (argc, argv, local, 0, 0); send_to_server (turning_on ? "watch-on\012" : "watch-off\012", 0); return get_responses_and_close (); } @@ -109,7 +105,7 @@ watch_onoff (argc, argv) argc, argv, local, W_LOCAL, 0, 0, (char *)NULL, 0); - lock_tree_cleanup (); + Lock_Cleanup (); return err; } @@ -268,7 +264,7 @@ send_notifications (argc, argv, local) (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, argc, argv, local, W_LOCAL, 0, 0, (char *)NULL, 0); - lock_tree_cleanup (); + Lock_Cleanup (); } return err; } @@ -1006,7 +1002,7 @@ editors (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0); + send_files (argc, argv, local, 0, 0); send_to_server ("editors\012", 0); return get_responses_and_close (); } diff --git a/gnu/usr.bin/cvs/src/edit.h b/gnu/usr.bin/cvs/src/edit.h index 0a823ad84d9..7c274a6a2cb 100644 --- a/gnu/usr.bin/cvs/src/edit.h +++ b/gnu/usr.bin/cvs/src/edit.h @@ -8,11 +8,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ extern int watch_on PROTO ((int argc, char **argv)); extern int watch_off PROTO ((int argc, char **argv)); diff --git a/gnu/usr.bin/cvs/src/entries.c b/gnu/usr.bin/cvs/src/entries.c index 48e55979be4..d9c4e815ee1 100644 --- a/gnu/usr.bin/cvs/src/entries.c +++ b/gnu/usr.bin/cvs/src/entries.c @@ -27,7 +27,12 @@ static char *entfilename; /* for error messages */ /* * Construct an Entnode */ -Entnode * +static Entnode *Entnode_Create PROTO ((enum ent_type, const char *, + const char *, const char *, + const char *, const char *, + const char *, const char *)); + +static Entnode * Entnode_Create(type, user, vn, ts, options, tag, date, ts_conflict) enum ent_type type; const char *user; @@ -57,7 +62,9 @@ Entnode_Create(type, user, vn, ts, options, tag, date, ts_conflict) /* * Destruct an Entnode */ -void +static void Entnode_Destroy PROTO ((Entnode *)); + +static void Entnode_Destroy (ent) Entnode *ent; { @@ -596,11 +603,14 @@ WriteTag (dir, tag, date) char *date; { FILE *fout; - char tmp[PATH_MAX]; + char *tmp; if (noexec) return; + tmp = xmalloc ((dir ? strlen (dir) : 0) + + sizeof (CVSADM_TAG) + + 10); if (dir == NULL) (void) strcpy (tmp, CVSADM_TAG); else @@ -625,6 +635,7 @@ WriteTag (dir, tag, date) else if (unlink_file (tmp) < 0 && ! existence_error (errno)) error (1, errno, "cannot remove %s", tmp); + free (tmp); } /* diff --git a/gnu/usr.bin/cvs/src/error.c b/gnu/usr.bin/cvs/src/error.c index 48452d71fdd..a772cca0e8f 100644 --- a/gnu/usr.bin/cvs/src/error.c +++ b/gnu/usr.bin/cvs/src/error.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* David MacKenzie */ /* Brian Berliner added support for CVS */ @@ -67,24 +63,27 @@ extern char *strerror (); extern int vasprintf (); -typedef void (*fn_returning_void) PROTO((void)); - -/* Function to call before exiting. */ -static fn_returning_void cleanup_fn; - -fn_returning_void -error_set_cleanup (arg) - fn_returning_void arg; +void +error_exit PROTO ((void)) { - fn_returning_void retval = cleanup_fn; - cleanup_fn = arg; - return retval; + Lock_Cleanup(); +#ifdef SERVER_SUPPORT + if (server_active) + server_cleanup (0); +#endif +#ifdef SYSTEM_CLEANUP + /* Hook for OS-specific behavior, for example socket subsystems on + NT and OS2 or dealing with windows and arguments on Mac. */ + SYSTEM_CLEANUP (); +#endif + exit (EXIT_FAILURE); } /* Print the program name and error message MESSAGE, which is a printf-style format string with optional args. If ERRNUM is nonzero, print its corresponding system error message. - Exit with status EXIT_FAILURE if STATUS is nonzero. */ + Exit with status EXIT_FAILURE if STATUS is nonzero. If MESSAGE is "", + no need to print a message. */ /* VARARGS */ void #if defined (HAVE_VPRINTF) && __STDC__ @@ -98,6 +97,7 @@ error (status, errnum, message, va_alist) #endif { #ifdef HAVE_VPRINTF + if (message[0] != '\0') { va_list args; char *mess = NULL; @@ -158,6 +158,7 @@ error (status, errnum, message, va_alist) /* I think that all relevant systems have vprintf these days. But just in case, I'm leaving this code here. */ + if (message[0] != '\0') { FILE *out = stderr; @@ -203,11 +204,7 @@ error (status, errnum, message, va_alist) #endif /* No HAVE_VPRINTF */ if (status) - { - if (cleanup_fn) - (*cleanup_fn) (); - exit (EXIT_FAILURE); - } + error_exit (); } /* Print the program name and error message MESSAGE, which is a printf-style @@ -248,9 +245,5 @@ fperror (fp, status, errnum, message, va_alist) putc ('\n', fp); fflush (fp); if (status) - { - if (cleanup_fn) - (*cleanup_fn) (); - exit (EXIT_FAILURE); - } + error_exit (); } diff --git a/gnu/usr.bin/cvs/src/error.h b/gnu/usr.bin/cvs/src/error.h index 7d4f5353797..5d37bb44d75 100644 --- a/gnu/usr.bin/cvs/src/error.h +++ b/gnu/usr.bin/cvs/src/error.h @@ -9,15 +9,21 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifndef _error_h_ #define _error_h_ +/* Add prototype support. Normally this is done in cvs.h, but that + doesn't get included from lib/savecwd.c. */ +#ifndef PROTO +#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__) +#define PROTO(ARGS) ARGS +#else +#define PROTO(ARGS) () +#endif +#endif + #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ @@ -38,6 +44,10 @@ void error (int, int, const char *, ...) \ void error (); #endif +/* Exit due to an error. Similar to error (1, 0, "message"), but call + it in the case where the message has already been printed. */ +extern void error_exit PROTO ((void)); + /* If non-zero, error will use the CVS protocol to report error messages. This will only be set in the CVS server parent process; most other code is run via do_cvs_command, which forks off a child diff --git a/gnu/usr.bin/cvs/src/fileattr.c b/gnu/usr.bin/cvs/src/fileattr.c index dd105c9441b..c64596bfe87 100644 --- a/gnu/usr.bin/cvs/src/fileattr.c +++ b/gnu/usr.bin/cvs/src/fileattr.c @@ -8,11 +8,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #include "cvs.h" #include "getline.h" @@ -305,8 +301,6 @@ fileattr_set (filename, attrname, attrval) Node *node; char *p; - attrs_modified = 1; - if (filename == NULL) { p = fileattr_modify (fileattr_default_attrs, attrname, attrval, @@ -314,6 +308,7 @@ fileattr_set (filename, attrname, attrval) if (fileattr_default_attrs != NULL) free (fileattr_default_attrs); fileattr_default_attrs = p; + attrs_modified = 1; return; } if (attrlist == NULL) @@ -353,6 +348,8 @@ fileattr_set (filename, attrname, attrval) free (node->data); node->data = p; } + + attrs_modified = 1; } void diff --git a/gnu/usr.bin/cvs/src/fileattr.h b/gnu/usr.bin/cvs/src/fileattr.h index 27cc30df285..0ca7eae1515 100644 --- a/gnu/usr.bin/cvs/src/fileattr.h +++ b/gnu/usr.bin/cvs/src/fileattr.h @@ -8,11 +8,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #ifndef FILEATTR_H diff --git a/gnu/usr.bin/cvs/src/filesubr.c b/gnu/usr.bin/cvs/src/filesubr.c index 3c7bf3b584f..03d8cdce47f 100644 --- a/gnu/usr.bin/cvs/src/filesubr.c +++ b/gnu/usr.bin/cvs/src/filesubr.c @@ -11,11 +11,7 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* These functions were moved out of subr.c because they need different definitions under operating systems (like, say, Windows NT) with different @@ -469,45 +465,55 @@ deep_remove_dir (path) struct dirent *dp; char buf[PATH_MAX]; - if (rmdir (path) != 0 && (errno == ENOTEMPTY || errno == EEXIST)) + if (rmdir (path) != 0) { - if ((dirp = opendir (path)) == NULL) - /* If unable to open the directory return - * an error - */ - return -1; - - while ((dp = readdir (dirp)) != NULL) + if (errno == ENOTEMPTY + || errno == EEXIST + /* Ugly workaround for ugly AIX 4.1 (and 3.2) header bug + (it defines ENOTEMPTY and EEXIST to 17 but actually + returns 87). */ + || (ENOTEMPTY == 17 && EEXIST == 17 && errno == 87)) { - if (strcmp (dp->d_name, ".") == 0 || - strcmp (dp->d_name, "..") == 0) - continue; + if ((dirp = opendir (path)) == NULL) + /* If unable to open the directory return + * an error + */ + return -1; - sprintf (buf, "%s/%s", path, dp->d_name); - - /* See comment in unlink_file_dir explanation of why we use - isdir instead of just calling unlink and checking the - status. */ - if (isdir(buf)) + while ((dp = readdir (dirp)) != NULL) { - if (deep_remove_dir(buf)) + if (strcmp (dp->d_name, ".") == 0 || + strcmp (dp->d_name, "..") == 0) + continue; + + sprintf (buf, "%s/%s", path, dp->d_name); + + /* See comment in unlink_file_dir explanation of why we use + isdir instead of just calling unlink and checking the + status. */ + if (isdir(buf)) { - closedir(dirp); - return -1; + if (deep_remove_dir(buf)) + { + closedir(dirp); + return -1; + } } - } - else - { - if (unlink (buf) != 0) + else { - closedir(dirp); - return -1; + if (unlink (buf) != 0) + { + closedir(dirp); + return -1; + } } } + closedir (dirp); + return rmdir (path); } - closedir (dirp); - return rmdir (path); - } + else + return -1; + } /* Was able to remove the directory return 0 */ return 0; @@ -672,19 +678,24 @@ last_component (path) } /* Return the home directory. Returns a pointer to storage - managed by this function or its callees (currently getenv). */ + managed by this function or its callees (currently getenv). + This function will return the same thing every time it is + called. */ char * get_homedir () { - static char home[PATH_MAX]; + static char *home = NULL; char *env = getenv ("HOME"); struct passwd *pw; + if (home != NULL) + return home; + if (env) - strcpy (home, env); + home = env; else if ((pw = (struct passwd *) getpwuid (getuid ())) && pw->pw_dir) - strcpy (home, pw->pw_dir); + home = xstrdup (pw->pw_dir); else return 0; diff --git a/gnu/usr.bin/cvs/src/find_names.c b/gnu/usr.bin/cvs/src/find_names.c index 9143a6cd08d..8bfce8c75b7 100644 --- a/gnu/usr.bin/cvs/src/find_names.c +++ b/gnu/usr.bin/cvs/src/find_names.c @@ -71,7 +71,6 @@ Find_Names (repository, which, aflag, optentries) { List *entries; List *files; - char dir[PATH_MAX]; /* make a list for the files */ files = filelist = getlist (); @@ -103,8 +102,11 @@ Find_Names (repository, which, aflag, optentries) /* search the attic too */ if (which & W_ATTIC) { + char *dir; + dir = xmalloc (strlen (repository) + sizeof (CVSATTIC) + 10); (void) sprintf (dir, "%s/%s", repository, CVSATTIC); (void) find_rcs (dir, files); + free (dir); } } @@ -221,16 +223,11 @@ Find_Directories (repository, which, entries) if (find_dirs (repository, dirlist, 0, entries) != 0) error (1, errno, "cannot open directory %s", repository); -#ifdef ATTIC_DIR_SUPPORT /* XXX - FIXME */ - /* search the attic too */ - if (which & W_ATTIC) - { - char dir[PATH_MAX]; - - (void) sprintf (dir, "%s/%s", repository, CVSATTIC); - (void) find_dirs (dir, dirlist, 0, entries); - } -#endif + /* We don't need to look in the attic because directories + never go in the attic. In the future, there hopefully will + be a better mechanism for detecting whether a directory in + the repository is alive or dead; it may or may not involve + moving directories to the attic. */ } /* sort the list into alphabetical order and return it */ @@ -344,6 +341,9 @@ find_dirs (dir, list, checkadm, entries) if (dp->d_type == DT_LNK) continue; #endif + /* FIXME: tmp is not set here, or doesn't seem to be. + This would appear to just be a mistake... Needs more + investigation to be sure... */ if (islink (tmp)) continue; #ifdef DT_DIR diff --git a/gnu/usr.bin/cvs/src/hash.c b/gnu/usr.bin/cvs/src/hash.c index 229b588bf3d..e9f49355f5b 100644 --- a/gnu/usr.bin/cvs/src/hash.c +++ b/gnu/usr.bin/cvs/src/hash.c @@ -332,6 +332,19 @@ list_isempty (list) return list == NULL || list->list->next == list->list; } +static int (*client_comp) PROTO ((const Node *, const Node *)); +static int qsort_comp PROTO ((const void *, const void *)); + +static int +qsort_comp (elem1, elem2) + const void *elem1; + const void *elem2; +{ + Node **node1 = (Node **) elem1; + Node **node2 = (Node **) elem2; + return client_comp (*node1, *node2); +} + /* * sort the elements of a list (in place) */ @@ -340,49 +353,48 @@ sortlist (list, comp) List *list; int (*comp) PROTO ((const Node *, const Node *)); { - Node *head, *remain, *p, *q; + Node *head, *remain, *p, **array; + int i, n; /* save the old first element of the list */ head = list->list; remain = head->next; - /* make the header node into a null list of it's own */ - head->next = head->prev = head; + /* count the number of nodes in the list */ + n = 0; + for (p = remain; p != head; p = p->next) + n++; - /* while there are nodes remaining, do insert sort */ - while (remain != head) - { - /* take one from the list */ - p = remain; - remain = remain->next; + /* allocate an array of nodes and populate it */ + array = (Node **) xmalloc (sizeof(Node *) * n); + i = 0; + for (p = remain; p != head; p = p->next) + array[i++] = p; - /* traverse the sorted list looking for the place to insert it */ - for (q = head->next; q != head; q = q->next) - { - if (comp (p, q) < 0) - { - /* p comes before q */ - p->next = q; - p->prev = q->prev; - p->prev->next = p; - q->prev = p; - break; - } - } - if (q == head) - { - /* it belongs at the end of the list */ - p->next = head; - p->prev = head->prev; - p->prev->next = p; - head->prev = p; - } + /* sort the array of nodes */ + client_comp = comp; + qsort (array, n, sizeof(Node *), qsort_comp); + + /* rebuild the list from beginning to end */ + head->next = head->prev = head; + for (i = 0; i < n; i++) + { + p = array[i]; + p->next = head; + p->prev = head->prev; + p->prev->next = p; + head->prev = p; } + + /* release the array of nodes */ + free (array); } /* Debugging functions. Quite useful to call from within gdb. */ -char * +static char *nodetypestring PROTO ((Ntype)); + +static char * nodetypestring (type) Ntype type; { @@ -424,6 +436,11 @@ printnode (node, closure) return(0); } +/* This is global, not static, so that its name is unique and to avoid + compiler warnings about it not being used. But it is not used by CVS; + it exists so one can call it from a debugger. */ +void printlist PROTO ((List *)); + void printlist (list) List *list; diff --git a/gnu/usr.bin/cvs/src/hash.h b/gnu/usr.bin/cvs/src/hash.h index 92b25493862..a22bc1045c8 100644 --- a/gnu/usr.bin/cvs/src/hash.h +++ b/gnu/usr.bin/cvs/src/hash.h @@ -1,5 +1,3 @@ -/* $CVSid: @(#)hash.h 1.23 94/10/07 $ */ - /* * Copyright (c) 1992, Brian Berliner and Jeff Polk * diff --git a/gnu/usr.bin/cvs/src/history.c b/gnu/usr.bin/cvs/src/history.c index ef153fc49dc..ac55dad6377 100644 --- a/gnu/usr.bin/cvs/src/history.c +++ b/gnu/usr.bin/cvs/src/history.c @@ -17,6 +17,7 @@ * X is a single character showing the type of event: * T "Tag" cmd. * O "Checkout" cmd. + * E "Export" cmd. * F "Release" cmd. * W "Update" cmd - No User file, Remove from Entries file. * U "Update" cmd - File was checked out over User file. @@ -40,18 +41,18 @@ * command was typed. * T "A" --> New Tag, "D" --> Delete Tag * Otherwise it is the Tag or Date to modify. - * O,F A "" (null field) + * O,F,E A "" (null field) * * rev(s) Revision number or tag. * T The Tag to apply. - * O The Tag or Date, if specified, else "" (null field). + * O,E The Tag or Date, if specified, else "" (null field). * F "" (null field) * W The Tag or Date, if specified, else "" (null field). * U The Revision checked out over the User file. * G,C The Revision(s) involved in merge. * M,A,R RCS Revision affected. * - * argument The module (for [TOUF]) or file (for [WUGCMAR]) affected. + * argument The module (for [TOEUF]) or file (for [WUGCMAR]) affected. * * *** Report categories: "User" and "Since" modifiers apply to all reports. @@ -59,7 +60,7 @@ * * Extract list of record types * - * -e, -x [TOFWUGCMAR] + * -e, -x [TOEFWUGCMAR] * * Extracted records are simply printed, No analysis is performed. * All "field" modifiers apply. -e chooses all types. @@ -177,6 +178,7 @@ */ #include "cvs.h" +#include "savecwd.h" static struct hrec { @@ -206,7 +208,7 @@ static void save_file PROTO((char *dir, char *name, char *module)); static void save_module PROTO((char *module)); static void save_user PROTO((char *name)); -#define ALL_REC_TYPES "TOFWUCGMAR" +#define ALL_REC_TYPES "TOEFWUCGMAR" #define USER_INCREMENT 2 #define FILE_INCREMENT 128 #define MODULE_INCREMENT 5 @@ -273,7 +275,7 @@ static const char *const history_usg[] = " -c Committed (Modified) files\n", " -o Checked out modules\n", " -m Look for specified module (repeatable)\n", - " -x [TOFWUCGMAR] Extract by record type\n", + " -x [TOEFWUCGMAR] Extract by record type\n", " Flags:\n", " -a All users (Default is self)\n", " -e Everything (same as -x, but all record types)\n", @@ -367,7 +369,7 @@ history (argc, argv) char **argv; { int i, c; - char fname[PATH_MAX]; + char *fname; if (argc == -1) usage (history_usg); @@ -647,14 +649,19 @@ history (argc, argv) save_file ("", argv[i], (char *) NULL); if (histfile) - (void) strcpy (fname, histfile); + fname = xstrdup (histfile); else + { + fname = xmalloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM) + + sizeof (CVSROOTADM_HISTORY) + 10); (void) sprintf (fname, "%s/%s/%s", CVSroot_directory, CVSROOTADM, CVSROOTADM_HISTORY); + } read_hrecs (fname); qsort ((PTR) hrec_head, hrec_count, sizeof (struct hrec), sort_order); report_hrecs (); + free (fname); return (0); } @@ -667,7 +674,8 @@ history_write (type, update_dir, revs, name, repository) char *name; char *repository; { - char fname[PATH_MAX], workdir[PATH_MAX], homedir[PATH_MAX]; + char *fname; + char *workdir; char *username = getcaller (); int fd; char *line; @@ -678,6 +686,8 @@ history_write (type, update_dir, revs, name, repository) if (logoff) /* History is turned off by cmd line switch */ return; + fname = xmalloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM) + + sizeof (CVSROOTADM_HISTORY) + 10); (void) sprintf (fname, "%s/%s/%s", CVSroot_directory, CVSROOTADM, CVSROOTADM_HISTORY); @@ -685,7 +695,7 @@ history_write (type, update_dir, revs, name, repository) if (!isfile (fname)) { logoff = 1; - return; + goto out; } if (trace) @@ -696,7 +706,7 @@ history_write (type, update_dir, revs, name, repository) fprintf (stderr, "-> fopen(%s,a)\n", fname); #endif if (noexec) - return; + goto out; fd = CVS_OPEN (fname, O_WRONLY | O_APPEND | O_CREAT | OPEN_BINARY, 0666); if (fd < 0) error (1, errno, "cannot open history file: %s", fname); @@ -721,13 +731,21 @@ history_write (type, update_dir, revs, name, repository) else { /* Try harder to find a "homedir" */ - if (!getwd (workdir)) - error (1, errno, "can't getwd in history"); + struct saved_cwd cwd; + char *homedir; + + if (save_cwd (&cwd)) + error_exit (); + if ( CVS_CHDIR (pwdir) < 0) error (1, errno, "can't chdir(%s)", pwdir); - if (!getwd (homedir)) + homedir = xgetwd (); + if (homedir == NULL) error (1, errno, "can't getwd in %s", pwdir); - (void) CVS_CHDIR (workdir); + + if (restore_cwd (&cwd, NULL)) + error_exit (); + free_cwd (&cwd); i = strlen (homedir); if (!strncmp (CurDir, homedir, i)) @@ -735,6 +753,7 @@ history_write (type, update_dir, revs, name, repository) PrCurDir += i; /* Point to '/' separator */ tilde = "~"; } + free (homedir); } } } @@ -749,6 +768,8 @@ history_write (type, update_dir, revs, name, repository) else update_dir = ""; + workdir = xmalloc (strlen (tilde) + strlen (PrCurDir) + strlen (slash) + + strlen (update_dir) + 10); (void) sprintf (workdir, "%s%s%s%s", tilde, PrCurDir, slash, update_dir); /* @@ -822,6 +843,9 @@ history_write (type, update_dir, revs, name, repository) free (line); if (close (fd) != 0) error (1, errno, "cannot close history file: %s", fname); + free (workdir); + out: + free (fname); } /* @@ -969,7 +993,7 @@ fill_hrec (line, hr) NEXT_BAR (repos); NEXT_BAR (rev); hr->idx = idx++; - if (strchr ("FOT", *(hr->type))) + if (strchr ("FOET", *(hr->type))) hr->mod = line; NEXT_BAR (file); /* This returns ptr to next line or final '\0' */ @@ -1219,7 +1243,7 @@ select_hrec (hr) */ if (!strchr (rec_types, *(hr->type))) return (0); - if (!strchr ("TFO", *(hr->type))) /* Don't bother with "file" if "TFO" */ + if (!strchr ("TFOE", *(hr->type))) /* Don't bother with "file" if "TFOE" */ { if (file_list) /* If file_list is null, accept all */ { @@ -1231,7 +1255,7 @@ select_hrec (hr) * the concatenation of the repository and file from hrec. * 3. Else compare the file_list entry against the hrec file. */ - char cmpfile[PATH_MAX]; + char *cmpfile = NULL; if (*(cp = fl->l_file) == '*') { @@ -1247,8 +1271,12 @@ select_hrec (hr) { if (strchr (cp, '/')) { - (void) sprintf (cp2 = cmpfile, "%s/%s", + cmpfile = xmalloc (strlen (hr->repos) + + strlen (hr->file) + + 10); + (void) sprintf (cmpfile, "%s/%s", hr->repos, hr->file); + cp2 = cmpfile; } else { @@ -1261,6 +1289,8 @@ select_hrec (hr) hr->mod = fl->l_module; break; } + if (cmpfile != NULL) + free (cmpfile); } } if (!count) @@ -1319,7 +1349,7 @@ report_hrecs () hr++; for (count = hrec_count; count--; lr = hr, hr++) { - char repos[PATH_MAX]; + char *repos; if (!count) hr = NULL; @@ -1327,7 +1357,7 @@ report_hrecs () continue; ty = *(lr->type); - (void) strcpy (repos, lr->repos); + repos = xstrdup (lr->repos); if ((cp = strrchr (repos, '/')) != NULL) { if (lr->mod && !strcmp (++cp, lr->mod)) @@ -1345,6 +1375,7 @@ report_hrecs () rev_len = i; if (lr->mod && (i = strlen (lr->mod)) > mod_len) mod_len = i; + free (repos); } /* Walk through hrec array setting "lr" (Last Record) to each element. @@ -1358,7 +1389,8 @@ report_hrecs () */ for (lr = hrec_head, hr = (lr + 1); hrec_count--; lr = hr, hr++) { - char workdir[PATH_MAX], repos[PATH_MAX]; + char *workdir; + char *repos; if (!hrec_count) hr = NULL; @@ -1379,6 +1411,7 @@ report_hrecs () tm->tm_mday, tm->tm_hour, tm->tm_min, tz_name, user_len, lr->user); + workdir = xmalloc (strlen (lr->dir) + strlen (lr->end) + 10); (void) sprintf (workdir, "%s%s", lr->dir, lr->end); if ((cp = strrchr (workdir, '/')) != NULL) { @@ -1387,6 +1420,7 @@ report_hrecs () (void) strcpy (cp, "*"); } } + repos = xmalloc (strlen (lr->repos) + 10); (void) strcpy (repos, lr->repos); if ((cp = strrchr (repos, '/')) != NULL) { @@ -1406,6 +1440,7 @@ report_hrecs () (void) printf (" {%s}", workdir); break; case 'F': + case 'E': case 'O': if (lr->rev && *(lr->rev)) (void) printf (" [%s]", lr->rev); @@ -1429,6 +1464,8 @@ report_hrecs () break; } (void) putchar ('\n'); + free (workdir); + free (repos); } } diff --git a/gnu/usr.bin/cvs/src/import.c b/gnu/usr.bin/cvs/src/import.c index 6c9d0ae6434..99501362853 100644 --- a/gnu/usr.bin/cvs/src/import.c +++ b/gnu/usr.bin/cvs/src/import.c @@ -184,7 +184,7 @@ import (argc, argv) do_editor ((char *) NULL, &message, repository, (List *) NULL); } - + do_verify (message, repository); msglen = message == NULL ? 0 : strlen (message); if (msglen == 0 || message[msglen - 1] != '\n') { @@ -304,6 +304,7 @@ import (argc, argv) li = (struct logfile_info *) xmalloc (sizeof (struct logfile_info)); li->type = T_TITLE; li->tag = xstrdup (vbranch); + li->rev_old = li->rev_new = NULL; p->data = (char *) li; (void) addnode (ulist, p); Update_Logfile (repository, message, logfp, ulist); @@ -1240,7 +1241,7 @@ import_descend_dir (message, dir, vtag, targc, targv) else repository[0] = '\0'; if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); free_cwd (&cwd); return (err); } diff --git a/gnu/usr.bin/cvs/src/log.c b/gnu/usr.bin/cvs/src/log.c index 2e2533249cf..3bb7eb2a907 100644 --- a/gnu/usr.bin/cvs/src/log.c +++ b/gnu/usr.bin/cvs/src/log.c @@ -236,7 +236,7 @@ cvslog (argc, argv) /* FIXME: We shouldn't have to send current files to get log entries, but it doesn't work yet and I haven't debugged it. So send the files -- it's slower but it works. gnu@cygnus.com Apr94 */ - send_files (argc - i, argv + i, local, 0); + send_files (argc - i, argv + i, local, 0, 0); send_to_server ("log\012", 0); err = get_responses_and_close (); @@ -399,7 +399,10 @@ log_parse_date (log_data, argstring) else { /* 1970 was the beginning of time, as far as get_date and - Make_Date are concerned. */ + Make_Date are concerned. FIXME: That is true only if time_t + is a POSIX-style time and there is nothing in ANSI that + mandates that. It would be cleaner to set a flag saying + whether or not there is a start date. */ nd->start = Make_Date ("1/1/1970 UTC"); } @@ -407,11 +410,17 @@ log_parse_date (log_data, argstring) nd->end = Make_Date (de); else { - /* We want to set the end date to some time sufficiently far - in the future to pick up all revisions that have been - created since the specified date and the time `cvs log' - completes. */ - nd->end = Make_Date ("next week"); + /* We want to set the end date to some time sufficiently far + in the future to pick up all revisions that have been + created since the specified date and the time `cvs log' + completes. FIXME: The date in question only makes sense + if time_t is a POSIX-style time and it is 32 bits + and signed. We should instead be setting a flag saying + whether or not there is an end date. Note that using + something like "next week" would break the testsuite (and, + perhaps less importantly, loses if the clock is set grossly + wrong). */ + nd->end = Make_Date ("2038-01-01"); } nd->next = *pd; diff --git a/gnu/usr.bin/cvs/src/login.c b/gnu/usr.bin/cvs/src/login.c index 93e248ce571..a0fab6a3ac0 100644 --- a/gnu/usr.bin/cvs/src/login.c +++ b/gnu/usr.bin/cvs/src/login.c @@ -21,8 +21,10 @@ extern char *getpass (); /* If non-NULL, get_cvs_password() will just return this. */ static char *cvs_password = NULL; +static char *construct_cvspass_filename PROTO ((void)); + /* The return value will need to be freed. */ -char * +static char * construct_cvspass_filename () { char *homedir; @@ -215,10 +217,11 @@ login (argc, argv) linebuf = (char *) NULL; while (getline (&linebuf, &linebuf_len, fp) >= 0) { - if (strncmp (CVSroot_original, linebuf, root_len)) - fprintf (tmp_fp, "%s", linebuf); - else - fprintf (tmp_fp, "%s %s\n", CVSroot_original, typed_password); + if (strncmp (CVSroot_original, linebuf, root_len)) + fprintf (tmp_fp, "%s", linebuf); + else + fprintf (tmp_fp, "%s %s\n", CVSroot_original, + typed_password); free (linebuf); linebuf = (char *) NULL; @@ -240,8 +243,8 @@ login (argc, argv) return 1; } - fprintf (fp, "%s %s\n", CVSroot_original, typed_password); - fclose (fp); + fprintf (fp, "%s %s\n", CVSroot_original, typed_password); + fclose (fp); } /* Utter, total, raving paranoia, I know. */ @@ -264,99 +267,99 @@ login (argc, argv) char * get_cvs_password () { - int found_it = 0; - int root_len; - char *password; - char *linebuf = (char *) NULL; - size_t linebuf_len; - FILE *fp; - char *passfile; - - /* If someone (i.e., login()) is calling connect_to_pserver() out of - context, then assume they have supplied the correct, scrambled - password. */ - if (cvs_password) - return cvs_password; - - /* Environment should override file. */ - if ((password = getenv ("CVS_PASSWORD")) != NULL) + int found_it = 0; + int root_len; + char *password; + char *linebuf = (char *) NULL; + size_t linebuf_len; + FILE *fp; + char *passfile; + + /* If someone (i.e., login()) is calling connect_to_pserver() out of + context, then assume they have supplied the correct, scrambled + password. */ + if (cvs_password) + return cvs_password; + + if (getenv ("CVS_PASSWORD") != NULL) { - char *p; - p = xstrdup (password); - /* If we got it from the environment, then it wasn't properly - scrambled. Since unscrambling is done on the server side, we - need to transmit it scrambled. */ - p = scramble (p); - return p; + /* In previous versions of CVS one could specify a password in + CVS_PASSWORD. This is a bad idea, because in BSD variants + of unix anyone can see the environment variable with 'ps'. + But for users who were using that feature we want to at + least let them know what is going on. After printing this + warning, we should fall through to the regular error where + we tell them to run "cvs login" (unless they already ran + it, of course). */ + error (0, 0, "CVS_PASSWORD is no longer supported; ignored"); } - /* Else get it from the file. First make sure that the CVSROOT - * variable has the appropriate fields filled in. */ + /* Else get it from the file. First make sure that the CVSROOT + variable has the appropriate fields filled in. */ - if (CVSroot_method != pserver_method) + if (CVSroot_method != pserver_method) { - error (0, 0, "can only call GET_CVS_PASSWORD with pserver method"); - error (1, 0, "CVSROOT: %s", CVSroot_original); + error (0, 0, "can only call GET_CVS_PASSWORD with pserver method"); + error (1, 0, "CVSROOT: %s", CVSroot_original); } - - if (! CVSroot_username) + + if (! CVSroot_username) { - error (0, 0, "CVSROOT \"%s\" is not fully-qualified.", CVSroot_original); - error (1, 0, "Please make sure to specify \"user@host\"!"); + error (0, 0, "CVSROOT \"%s\" is not fully-qualified.", + CVSroot_original); + error (1, 0, "Please make sure to specify \"user@host\"!"); } - passfile = construct_cvspass_filename (); - fp = CVS_FOPEN (passfile, "r"); - if (fp == NULL) + passfile = construct_cvspass_filename (); + fp = CVS_FOPEN (passfile, "r"); + if (fp == NULL) { - error (0, errno, "could not open %s", passfile); - free (passfile); - error (1, 0, "use \"cvs login\" to log in first"); + error (0, errno, "could not open %s", passfile); + free (passfile); + error (1, 0, "use \"cvs login\" to log in first"); } - root_len = strlen (CVSroot_original); + root_len = strlen (CVSroot_original); - /* Check each line to see if we have this entry already. */ - while (getline (&linebuf, &linebuf_len, fp) >= 0) + /* Check each line to see if we have this entry already. */ + while (getline (&linebuf, &linebuf_len, fp) >= 0) { - if (strncmp (CVSroot_original, linebuf, root_len) == 0) + if (strncmp (CVSroot_original, linebuf, root_len) == 0) { - /* This is it! So break out and deal with linebuf. */ - found_it = 1; - break; + /* This is it! So break out and deal with linebuf. */ + found_it = 1; + break; } - else + else { - free (linebuf); - linebuf = (char *) NULL; + free (linebuf); + linebuf = (char *) NULL; } } - if (found_it) + if (found_it) { - /* linebuf now contains the line with the password. */ - char *tmp; - - strtok (linebuf, " "); - password = strtok (NULL, "\n"); - - /* Give it permanent storage. */ - tmp = xmalloc (strlen (password) + 1); - strcpy (tmp, password); - tmp[strlen (password)] = '\0'; - memset (password, 0, strlen (password)); - free (linebuf); - return tmp; + /* linebuf now contains the line with the password. */ + char *tmp; + + strtok (linebuf, " "); + password = strtok (NULL, "\n"); + + /* Give it permanent storage. */ + tmp = xmalloc (strlen (password) + 1); + strcpy (tmp, password); + tmp[strlen (password)] = '\0'; + memset (password, 0, strlen (password)); + free (linebuf); + return tmp; } - else + else { - error (0, 0, "cannot find password"); - error (0, 0, "use \"cvs login\" to log in first"); - error (1, 0, "or set the CVS_PASSWORD environment variable"); + error (0, 0, "cannot find password"); + error (1, 0, "use \"cvs login\" to log in first"); } - /* NOTREACHED */ - return NULL; + /* NOTREACHED */ + return NULL; } #endif /* AUTH_CLIENT_SUPPORT from beginning of file. */ - diff --git a/gnu/usr.bin/cvs/src/logmsg.c b/gnu/usr.bin/cvs/src/logmsg.c index de022b9d6a3..0a4ffb601fc 100644 --- a/gnu/usr.bin/cvs/src/logmsg.c +++ b/gnu/usr.bin/cvs/src/logmsg.c @@ -11,17 +11,20 @@ static int find_type PROTO((Node * p, void *closure)); static int fmt_proc PROTO((Node * p, void *closure)); -static int logfile_write PROTO((char *repository, char *filter, char *title, +static int logfile_write PROTO((char *repository, char *filter, char *message, FILE * logfp, List * changes)); static int rcsinfo_proc PROTO((char *repository, char *template)); static int title_proc PROTO((Node * p, void *closure)); static int update_logfile_proc PROTO((char *repository, char *filter)); static void setup_tmpfile PROTO((FILE * xfp, char *xprefix, List * changes)); static int editinfo_proc PROTO((char *repository, char *template)); +static int verifymsg_proc PROTO((char *repository, char *script)); static FILE *fp; static char *str_list; +static char *str_list_format; /* The format for str_list's contents. */ static char *editinfo_editor; +static char *verifymsg_script; static Ctype type; /* @@ -188,6 +191,7 @@ do_editor (dir, messagep, repository, changes) if (strcmp (Editor, "") == 0 && !editinfo_editor) error(1, 0, "no editor defined, must use -e or -m"); + /* Create a temporary file */ fname = cvs_temp_name (); again: @@ -198,7 +202,8 @@ do_editor (dir, messagep, repository, changes) { (void) fprintf (fp, "%s", *messagep); - if ((*messagep)[strlen (*messagep) - 1] != '\n') + if ((*messagep)[0] == '\0' || + (*messagep)[strlen (*messagep) - 1] != '\n') (void) fprintf (fp, "\n"); } else @@ -247,8 +252,9 @@ do_editor (dir, messagep, repository, changes) "%s----------------------------------------------------------------------\n", CVSEDITPREFIX); (void) fprintf (fp, - "%sEnter Log. Lines beginning with `%s' are removed automatically\n%s\n", - CVSEDITPREFIX, CVSEDITPREFIX, CVSEDITPREFIX); + "%sEnter Log. Lines beginning with `%.*s' are removed automatically\n%s\n", + CVSEDITPREFIX, CVSEDITPREFIXLEN, CVSEDITPREFIX, + CVSEDITPREFIX); if (dir != NULL && *dir) (void) fprintf (fp, "%sCommitting in %s\n%s\n", CVSEDITPREFIX, dir, CVSEDITPREFIX); @@ -267,6 +273,11 @@ do_editor (dir, messagep, repository, changes) if (editinfo_editor) free (editinfo_editor); editinfo_editor = (char *) NULL; +#ifdef CLIENT_SUPPORT + if (client_active) + ; /* nothing, leave editinfo_editor NULL */ + else +#endif if (repository != NULL) (void) Parse_Info (CVSROOTADM_EDITINFO, repository, editinfo_proc, 0); @@ -314,7 +325,7 @@ do_editor (dir, messagep, repository, changes) error (0, errno, "warning: cannot read %s", fname); break; } - if (strncmp (line, CVSEDITPREFIX, sizeof (CVSEDITPREFIX) - 1) == 0) + if (strncmp (line, CVSEDITPREFIX, CVSEDITPREFIXLEN) == 0) continue; (void) strcpy (p, line); p += line_length; @@ -360,6 +371,83 @@ do_editor (dir, messagep, repository, changes) free (fname); } +/* Runs the user-defined verification script as part of the commit or import + process. This verification is meant to be run whether or not the user + included the -m atribute. unlike the do_editor function, this is + independant of the running of an editor for getting a message. + */ +void +do_verify (message, repository) + char *message; + char *repository; +{ + FILE *fp; + char *fname; + int retcode = 0; + +#ifdef CLIENT_SUPPORT + if (client_active) + /* The verification will happen on the server. */ + return; +#endif + + /* FIXME? Do we really want to skip this on noexec? What do we do + for the other administrative files? */ + if (noexec) + return; + + /* If there's no message, then we have nothing to verify. Can this + case happen? And if so why would we print a message? */ + if (message == NULL) + { + cvs_output ("No message to verify\n", 0); + return; + } + + /* Get a temp filename, open a temporary file, write the message to the + temp file, and close the file. */ + + fname = cvs_temp_name (); + + if ((fp = fopen (fname, "w")) < 0) + { + error (1, 0, "cannot create temporary file %s", fname); + return; + } + else + { + fprintf (fp, "%s", message); + if ((message)[0] == '\0' || + (message)[strlen (message) - 1] != '\n') + (void) fprintf (fp, "%s", "\n"); + if (fclose (fp) == EOF) + error (1, errno, "%s", fname); + + /* Get the name of the verification script to run */ + + if (repository != NULL) + (void) Parse_Info (CVSROOTADM_VERIFYMSG, repository, + verifymsg_proc, 0); + + /* Run the verification script */ + + if (verifymsg_script) + { + run_setup ("%s", verifymsg_script); + run_arg (fname); + if ((retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, + RUN_NORMAL | RUN_SIGIGNORE)) != 0) + error (1, retcode == -1 ? errno : 0, + "Message verification failed"); + } + + /* Close and delete the temp file */ + + unlink_file (fname); + free (fname); + } +} + /* * callback proc for Parse_Info for rcsinfo templates this routine basically * copies the matching template onto the end of the tempfile we are setting @@ -409,7 +497,6 @@ rcsinfo_proc (repository, template) * directory in the source repository. The log information is fed into the * specified program as standard input. */ -static char *title; static FILE *logfp; static char *message; static List *changes; @@ -421,8 +508,6 @@ Update_Logfile (repository, xmessage, xlogfp, xchanges) FILE *xlogfp; List *xchanges; { - char *srepos; - /* nothing to do if the list is empty */ if (xchanges == NULL || xchanges->list->next == xchanges->list) return; @@ -432,34 +517,8 @@ Update_Logfile (repository, xmessage, xlogfp, xchanges) logfp = xlogfp; changes = xchanges; - /* figure out a good title string */ - srepos = Short_Repository (repository); - - /* allocate a chunk of memory to hold the title string */ - if (!str_list) - str_list = xmalloc (MAXLISTLEN); - str_list[0] = '\0'; - - type = T_TITLE; - (void) walklist (changes, title_proc, NULL); - type = T_ADDED; - (void) walklist (changes, title_proc, NULL); - type = T_MODIFIED; - (void) walklist (changes, title_proc, NULL); - type = T_REMOVED; - (void) walklist (changes, title_proc, NULL); - title = xmalloc (strlen (srepos) + strlen (str_list) + 1 + 2); /* for 's */ - (void) sprintf (title, "'%s%s'", srepos, str_list); - - /* to be nice, free up this chunk of memory */ - free (str_list); - str_list = (char *) NULL; - /* call Parse_Info to do the actual logfile updates */ (void) Parse_Info (CVSROOTADM_LOGINFO, repository, update_logfile_proc, 1); - - /* clean up */ - free (title); } /* @@ -470,12 +529,11 @@ update_logfile_proc (repository, filter) char *repository; char *filter; { - return (logfile_write (repository, filter, title, message, logfp, - changes)); + return (logfile_write (repository, filter, message, logfp, changes)); } /* - * concatenate each name onto str_list + * concatenate each filename/version onto str_list */ static int title_proc (p, closure) @@ -483,19 +541,58 @@ title_proc (p, closure) void *closure; { struct logfile_info *li; + char *c; li = (struct logfile_info *) p->data; if (li->type == type) { + /* Until we decide on the correct logging solution when we add + directories or perform imports, T_TITLE nodes will only + tack on the name provided, regardless of the format string. + You can verify that this assumption is safe by checking the + code in add.c (add_directory) and import.c (import). */ + (void) strcat (str_list, " "); - (void) strcat (str_list, p->key); + + if (li->type == T_TITLE) + { + (void) strcat (str_list, p->key); + } + else + { + /* All other nodes use the format string. */ + + for (c = str_list_format; *c != '\0'; c++) + { + switch (*c) + { + case 's': + (void) strcat (str_list, p->key); + break; + case 'V': + (void) strcat (str_list, (li->rev_old + ? li->rev_old : "NONE")); + break; + case 'v': + (void) strcat (str_list, (li->rev_new + ? li->rev_new : "NONE")); + break; + /* All other characters, we insert an empty field (but + we do put in the comma separating it from other + fields). This way if future CVS versions add formatting + characters, one can write a loginfo file which at least + won't blow up on an old CVS. */ + } + if (*(c + 1) != '\0') + (void) strcat (str_list, ","); + } + } } return (0); } /* - * Since some systems don't define this... - */ + * Since some systems don't define this... */ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 256 #endif @@ -505,25 +602,185 @@ title_proc (p, closure) * filter program. */ static int -logfile_write (repository, filter, title, message, logfp, changes) +logfile_write (repository, filter, message, logfp, changes) char *repository; char *filter; - char *title; char *message; FILE *logfp; List *changes; { char cwd[PATH_MAX]; FILE *pipefp; - char *prog = xmalloc (MAXPROGLEN); + char *prog; char *cp; int c; int pipestatus; + char *fmt_percent; /* the location of the percent sign + that starts the format string. */ + + prog = xmalloc (MAXPROGLEN); + + /* The user may specify a format string as part of the filter. + Originally, `%s' was the only valid string. The string that + was substituted for it was: + + ... + + Each file was either a new directory/import (T_TITLE), or a + added (T_ADDED), modified (T_MODIFIED), or removed (T_REMOVED) + file. + + It is desirable to preserve that behavior so lots of commitlog + scripts won't die when they get this new code. At the same + time, we'd like to pass other information about the files (like + version numbers, statuses, or checkin times). + + The solution is to allow a format string that allows us to + specify those other pieces of information. The format string + will be composed of `%' followed by a single format character, + or followed by a set of format characters surrounded by `{' and + `}' as separators. The format characters are: + + s = file name + V = old version number (pre-checkin) + v = new version number (post-checkin) + + For example, valid format strings are: + + %{} + %s + %{s} + %{sVv} + + There's no reason that more items couldn't be added (like + modification date or file status [added, modified, updated, + etc.]) -- the code modifications would be minimal (logmsg.c + (title_proc) and commit.c (check_fileproc)). + + The output will be a string of tokens separated by spaces. For + backwards compatibility, the the first token will be the + repository name. The rest of the tokens will be + comma-delimited lists of the information requested in the + format string. For example, if `/u/src/master' is the + repository, `%{sVv}' is the format string, and three files + (ChangeLog, Makefile, foo.c) were modified, the output might + be: + + /u/src/master ChangeLog,1.1,1.2 Makefile,1.3,1.4 foo.c,1.12,1.13 + + Why this duplicates the old behavior when the format string is + `%s' is left as an exercise for the reader. */ + + fmt_percent = strchr (filter, '%'); + if (fmt_percent) + { + int len; + char *srepos; + char *fmt_begin, *fmt_end; /* beginning and end of the + format string specified in + filter. */ + char *fmt_continue; /* where the string continues + after the format string (we + might skip a '}') somewhere + in there... */ + + /* Grab the format string. */ + + if ((*(fmt_percent + 1) == ' ') || (*(fmt_percent + 1) == '\0')) + { + /* The percent stands alone. This is an error. We could + be treating ' ' like any other formatting character, but + using it as a formatting character seems like it would be + a mistake. */ + + /* Would be nice to also be giving the line number. */ + error (0, 0, "loginfo: '%%' not followed by formatting character"); + fmt_begin = fmt_percent + 1; + fmt_end = fmt_begin; + fmt_continue = fmt_begin; + } + else if (*(fmt_percent + 1) == '{') + { + /* The percent has a set of characters following it. */ + + fmt_begin = fmt_percent + 2; + fmt_end = strchr (fmt_begin, '}'); + if (fmt_end) + { + /* Skip over the '}' character. */ + + fmt_continue = fmt_end + 1; + } + else + { + /* There was no close brace -- assume that format + string continues to the end of the line. */ + + /* Would be nice to also be giving the line number. */ + error (0, 0, "loginfo: '}' missing"); + fmt_end = fmt_begin + strlen (fmt_begin); + fmt_continue = fmt_end; + } + } + else + { + /* The percent has a single character following it. FIXME: + %% should expand to a regular percent sign. */ + + fmt_begin = fmt_percent + 1; + fmt_end = fmt_begin + 1; + fmt_continue = fmt_end; + } + + len = fmt_end - fmt_begin; + str_list_format = xmalloc (sizeof (char) * (len + 1)); + strncpy (str_list_format, fmt_begin, len); + str_list_format[len] = '\0'; + + /* Allocate a chunk of memory to hold the string. */ + + if (!str_list) + str_list = xmalloc (MAXLISTLEN); + str_list[0] = '\0'; + + /* Add entries to the string. Don't bother looking for + entries if the format string is empty. */ + + if (str_list_format[0] != '\0') + { + type = T_TITLE; + (void) walklist (changes, title_proc, NULL); + type = T_ADDED; + (void) walklist (changes, title_proc, NULL); + type = T_MODIFIED; + (void) walklist (changes, title_proc, NULL); + type = T_REMOVED; + (void) walklist (changes, title_proc, NULL); + } + + /* Construct the final string. */ + + srepos = Short_Repository (repository); + + (void) strncpy (prog, filter, fmt_percent - filter); + prog[fmt_percent - filter] = '\0'; + (void) strcat (prog, "'"); + (void) strcat (prog, srepos); + (void) strcat (prog, str_list); + (void) strcat (prog, "'"); + (void) strcat (prog, fmt_continue); + + /* To be nice, free up some memory. */ + + free (str_list); + str_list = (char *) NULL; + } + else + { + /* There's no format string. */ + strcpy (prog, filter); + } - /* - * Only 1 %s argument is supported in the filter - */ - (void) sprintf (prog, filter, title); if ((pipefp = run_popen (prog, "w")) == NULL) { if (!noexec) @@ -571,3 +828,19 @@ editinfo_proc(repository, editor) editinfo_editor = xstrdup (editor); return (0); } + +/* This routine is calld by Parse_Info. it asigns the name of the + * message verification script to the global variable verify_script + */ +static int +verifymsg_proc (repository, script) + char *repository; + char *script; +{ + if (verifymsg_script && strcmp (verifymsg_script, script) == 0) + return (0); + if (verifymsg_script) + free (verifymsg_script); + verifymsg_script = xstrdup (script); + return (0); +} diff --git a/gnu/usr.bin/cvs/src/mkmodules.c b/gnu/usr.bin/cvs/src/mkmodules.c index 9d4bbd63dfe..9f3f797cc48 100644 --- a/gnu/usr.bin/cvs/src/mkmodules.c +++ b/gnu/usr.bin/cvs/src/mkmodules.c @@ -28,37 +28,50 @@ struct admin_file { /* This is a one line description of what the file is for. It is not currently used, although one wonders whether it should be, somehow. - If NULL, then don't process this file in mkmodules (FIXME: a bit of + If NULL, then don't process this file in mkmodules (FIXME?: a bit of a kludge; probably should replace this with a flags field). */ char *errormsg; /* Contents which the file should have in a new repository. To avoid problems with brain-dead compilers which choke on long string constants, this is a pointer to an array of char * terminated by NULL--each of - the strings is concatenated. */ + the strings is concatenated. + + If this field is NULL, the file is not created in a new + repository, but it can be added with "cvs add" (just as if one + had created the repository with a version of CVS which didn't + know about the file) and the checked-out copy will be updated + without having to add it to checkoutlist. */ const char * const *contents; }; static const char *const loginfo_contents[] = { - "# The \"loginfo\" file is used to control where \"cvs commit\" log information is\n", - "# sent. The first entry on a line is a regular expression which is tested\n", - "# against the directory that the change is being made to, relative to the\n", - "# $CVSROOT. For the first match that is found, the remainder of the line is a\n", - "# filter program that should expect log information on its standard input\n", + "# The \"loginfo\" file controls where \"cvs commit\" log information\n" + "# is sent. The first entry on a line is a regular expression which must match\n", + "# the directory that the change is being made to, relative to the\n", + "# $CVSROOT. If a match is found, then the remainder of the line is a filter\n", + "# program that should expect log information on its standard input.\n", "#\n", - "# If the repository name does not match any of the regular expressions in the\n", - "# first field of this file, the \"DEFAULT\" line is used, if it is specified.\n", + "# If the repository name does not match any of the regular expressions in this\n", + "# file, the \"DEFAULT\" line is used, if it is specified.\n", "#\n", - "# If the name \"ALL\" appears as a regular expression it is always used\n", - "# in addition to the first matching regex or \"DEFAULT\".\n", + "# If the name ALL appears as a regular expression it is always used\n", + "# in addition to the first matching regex or DEFAULT.\n", + "#\n", + "# You may specify a format string as part of the\n", + "# filter. The string is composed of a `%' followed\n", + "# by a single format character, or followed by a set of format\n", + "# characters surrounded by `{' and `}' as separators. The format\n", + "# characters are:\n", "#\n", - "# The filter program may use one and only one \"%s\" modifier (ala printf). If\n", - "# such a \"%s\" is specified in the filter program, a brief title is included\n", - "# (as one argument, enclosed in single quotes) showing the relative directory\n", - "# name and listing the modified file names.\n", + "# s = file name\n", + "# V = old version number (pre-checkin)\n", + "# v = new version number (post-checkin)\n", "#\n", "# For example:\n", - "#DEFAULT (echo \"\"; who am i; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog\n", + "#DEFAULT (echo \"\"; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog\n", + "# or\n", + "#DEFAULT (echo \"\"; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog\n", NULL }; @@ -104,6 +117,31 @@ static const char *const editinfo_contents[] = { NULL }; +static const char *const verifymsg_contents[] = { + "# The \"verifymsg\" file is used to allow verification of logging\n", + "# information. It works best when a template (as specified in the\n", + "# rcsinfo file) is provided for the logging procedure. Given a\n", + "# template with locations for, a bug-id number, a list of people who\n", + "# reviewed the code before it can be checked in, and an external\n", + "# process to catalog the differences that were code reviewed, the\n", + "# following test can be applied to the code:\n", + "#\n", + "# Making sure that the entered bug-id number is correct.\n", + "# Validating that the code that was reviewed is indeed the code being\n", + "# checked in (using the bug-id number or a seperate review\n", + "# number to identify this particular code set.).\n", + "#\n", + "# If any of the above test failed, then the commit would be aborted.\n", + "#\n", + "# Actions such as mailing a copy of the report to each reviewer are\n", + "# better handled by an entry in the loginfo file.\n", + "#\n", + "# One thing that should be noted is the the ALL keyword is not\n", + "# supported. There can be only one entry that matches a given\n", + "# repository.\n", + NULL +}; + static const char *const commitinfo_contents[] = { "# The \"commitinfo\" file is used to control pre-commit checks.\n", "# The filter on the right is invoked with the repository and a list \n", @@ -246,6 +284,9 @@ static const struct admin_file filelist[] = { {CVSROOTADM_EDITINFO, "a %s file can be used to validate log messages", editinfo_contents}, + {CVSROOTADM_VERIFYMSG, + "a %s file can be used to validate log messages", + verifymsg_contents}, {CVSROOTADM_COMMITINFO, "a %s file can be used to configure 'cvs commit' checking", commitinfo_contents}, @@ -268,6 +309,20 @@ static const struct admin_file filelist[] = { /* modules is special-cased in mkmodules. */ NULL, modules_contents}, + {CVSROOTADM_READERS, + "a %s file specifies read-only users", + NULL}, + {CVSROOTADM_WRITERS, + "a %s file specifies read/write users", + NULL}, + /* Some have suggested listing CVSROOTADM_PASSWD here too. The + security implications of transmitting hashed passwords over the + net are no worse than transmitting cleartext passwords which pserver + does, so this isn't a problem. But I'm worried about the implications + of storing old passwords--if someone used a password in the past + they might be using it elsewhere, using a similar password, etc, + and so it doesn't seem to me like we should be saving old passwords, + even hashed. */ {NULL, NULL} }; @@ -289,7 +344,7 @@ mkmodules (dir) const struct admin_file *fileptr; if (save_cwd (&cwd)) - exit (EXIT_FAILURE); + error_exit (); if ( CVS_CHDIR (dir) < 0) error (1, errno, "cannot chdir to %s", dir); @@ -315,7 +370,7 @@ mkmodules (dir) case -1: /* fork failed */ (void) unlink_file (temp); - exit (EXIT_FAILURE); + error (1, errno, "cannot check out %s", CVSROOTADM_MODULES); /* NOTREACHED */ default: @@ -393,7 +448,7 @@ mkmodules (dir) } if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); free_cwd (&cwd); return (0); @@ -428,18 +483,30 @@ checkout_file (file, temp) char *file; char *temp; { - char rcs[PATH_MAX]; + char *rcs; + RCSNode *rcsnode; int retcode = 0; - (void) sprintf (rcs, "%s%s", file, RCSEXT); + if (noexec) + return 0; + + rcs = xmalloc (strlen (file) + 5); + strcpy (rcs, file); + strcat (rcs, RCSEXT); if (!isfile (rcs)) + { + free (rcs); return (1); - run_setup ("%s%s -x,v/ -q -p", Rcsbin, RCS_CO); - run_arg (rcs); - if ((retcode = run_exec (RUN_TTY, temp, RUN_TTY, RUN_NORMAL)) != 0) + } + rcsnode = RCS_parsercsfile (rcs); + retcode = RCS_checkout (rcsnode, NULL, NULL, NULL, NULL, temp); + if (retcode != 0) { - error (0, retcode == -1 ? errno : 0, "failed to check out %s file", file); + error (0, retcode == -1 ? errno : 0, "failed to check out %s file", + file); } + freercsnode (&rcsnode); + free (rcs); return (retcode); } diff --git a/gnu/usr.bin/cvs/src/modules.c b/gnu/usr.bin/cvs/src/modules.c index a82415a7857..c9261f944c7 100644 --- a/gnu/usr.bin/cvs/src/modules.c +++ b/gnu/usr.bin/cvs/src/modules.c @@ -58,10 +58,8 @@ open_module () if (CVSroot_original == NULL) { - (void) fprintf (stderr, - "%s: must set the CVSROOT environment variable\n", - program_name); - error (1, 0, "or specify the '-d' option to %s", program_name); + error (0, 0, "must set the CVSROOT environment variable"); + error (1, 0, "or specify the '-d' global option"); } (void) sprintf (mfile, "%s/%s/%s", CVSroot_directory, CVSROOTADM, CVSROOTADM_MODULES); @@ -119,8 +117,11 @@ do_module (db, mname, m_type, msg, callback_proc, where, datum key, val; char *cp; int c, err = 0; + int nonalias_opt = 0; #ifdef SERVER_SUPPORT + int restore_server_dir = 0; + char *server_dir_to_restore; if (trace) { char *buf; @@ -150,7 +151,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, } /* strip extra stuff from the module name */ - strip_path (mname); + strip_trailing_slashes (mname); /* * Look up the module using the following scheme: @@ -318,7 +319,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, /* remember where we start */ if (save_cwd (&cwd)) - exit (EXIT_FAILURE); + error_exit (); /* copy value to our own string since if we go recursive we'll be really screwed if we do another dbm lookup */ @@ -431,26 +432,33 @@ do_module (db, mname, m_type, msg, callback_proc, where, alias = 1; break; case 'd': + nonalias_opt = 1; if (mwhere) free (mwhere); mwhere = xstrdup (optarg); break; case 'i': + nonalias_opt = 1; checkin_prog = optarg; break; case 'l': + nonalias_opt = 1; local_specified = 1; break; case 'o': + nonalias_opt = 1; checkout_prog = optarg; break; case 'e': + nonalias_opt = 1; export_prog = optarg; break; case 't': + nonalias_opt = 1; tag_prog = optarg; break; case 'u': + nonalias_opt = 1; update_prog = optarg; break; case '?': @@ -477,6 +485,17 @@ do_module (db, mname, m_type, msg, callback_proc, where, return (++err); } + if (alias && nonalias_opt) + { + /* The documentation has never said it is legal to specify + -a along with another option. And I believe that in the past + CVS has ignored the options other than -a, more or less, in this + situation. */ + error (0, 0, "\ +-a cannot be specified in the modules file along with other options"); + return ++err; + } + /* if this was an alias, call ourselves recursively for each module */ if (alias) { @@ -519,6 +538,40 @@ do_module (db, mname, m_type, msg, callback_proc, where, if (local_specified) spec_opt = NULL; +#ifdef SERVER_SUPPORT + /* We want to check out into the directory named by the module. + So we set a global variable which tells the server to glom that + directory name onto the front. A cleaner approach would be some + way of passing it down to the recursive call, through the + callback_proc, to start_recursion, and then into the update_dir in + the struct file_info. That way the "Updating foo" message could + print the actual directory we are checking out into. + + For local CVS, this is handled by the chdir call above + (directly or via the callback_proc). */ + if (server_active && spec_opt != NULL) + { + char *change_to; + + change_to = where ? where : (mwhere ? mwhere : mname); + server_dir_to_restore = server_dir; + restore_server_dir = 1; + server_dir = + xmalloc ((server_dir_to_restore != NULL + ? strlen (server_dir_to_restore) + : 0) + + strlen (change_to) + + 5); + server_dir[0] = '\0'; + if (server_dir_to_restore != NULL) + { + strcat (server_dir, server_dir_to_restore); + strcat (server_dir, "/"); + } + strcat (server_dir, change_to); + } +#endif + while (spec_opt != NULL) { char *next_opt; @@ -551,6 +604,14 @@ do_module (db, mname, m_type, msg, callback_proc, where, spec_opt = next_opt; } +#ifdef SERVER_SUPPORT + if (server_active && restore_server_dir) + { + free (server_dir); + server_dir = server_dir_to_restore; + } +#endif + /* write out the checkin/update prog files if necessary */ #ifdef SERVER_SUPPORT if (err == 0 && !noexec && m_type == CHECKOUT && server_expanding) @@ -584,7 +645,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, /* cd back to where we started */ if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); free_cwd (&cwd); /* run checkout or tag prog if appropriate */ @@ -624,10 +685,12 @@ do_module (db, mname, m_type, msg, callback_proc, where, if (!quiet) { - (void) printf ("%s %s: Executing '", program_name, - command_name); + cvs_output (program_name, 0); + cvs_output (" ", 1); + cvs_output (command_name, 0); + cvs_output (": Executing '", 0); run_print (stdout); - (void) printf ("'\n"); + cvs_output ("'\n", 0); } err += run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); free (expanded_path); @@ -821,17 +884,21 @@ cat_module (status) fill = cols - (indent + 2); for (s_h = s_head, i = 0; i < s_count; i++, s_h++) { + line = xmalloc (strlen (s_h->modname) + strlen (s_h->rest) + + strlen (status ? s_h->status : "") + 15); + /* Print module name (and status, if wanted) */ - (void) printf ("%-12s", s_h->modname); + sprintf (line, "%-12s", s_h->modname); + cvs_output (line, 0); if (status) { - (void) printf (" %-11s", s_h->status); + sprintf (line, " %-11s", s_h->status); + cvs_output (line, 0); if (s_h->status != def_status) *(s_h->status + strlen (s_h->status)) = ' '; } /* Parse module file entry as command line and print options */ - line = xmalloc (strlen (s_h->modname) + strlen (s_h->rest) + 10); (void) sprintf (line, "%s %s", s_h->modname, s_h->rest); line2argv (&moduleargc, moduleargv, line); free (line); @@ -846,17 +913,28 @@ cat_module (status) { if (c == 'a' || c == 'l') { - (void) printf (" -%c", c); + char buf[5]; + + sprintf (buf, " -%c", c); + cvs_output (buf, 0); wid += 3; /* Could just set it to 3 */ } else { + char buf[10]; + if (strlen (optarg) + 4 + wid > (unsigned) fill) { - (void) printf ("\n%*s", indent, ""); + int j; + + cvs_output ("\n", 1); + for (j = 0; j < indent; ++j) + cvs_output (" ", 1); wid = 0; } - (void) printf (" -%c %s", c, optarg); + sprintf (buf, " -%c ", c); + cvs_output (buf, 0); + cvs_output (optarg, 0); wid += strlen (optarg) + 4; } } @@ -869,21 +947,31 @@ cat_module (status) { if (strlen (*argv) + wid > (unsigned) fill) { - (void) printf ("\n%*s", indent, ""); + int j; + + cvs_output ("\n", 1); + for (j = 0; j < indent; ++j) + cvs_output (" ", 1); wid = 0; } - (void) printf (" %s", *argv); + cvs_output (" ", 1); + cvs_output (*argv, 0); wid += strlen (*argv) + 1; } - (void) printf ("\n"); + cvs_output ("\n", 1); /* Format the comment field -- save_d (), compressed spaces */ for (cp2 = cp = s_h->comment; *cp; cp2 = cp) { - (void) printf ("%*s # ", indent, ""); + int j; + + for (j = 0; j < indent; ++j) + cvs_output (" ", 1); + cvs_output (" # ", 0); if (strlen (cp2) < (unsigned) (fill - 2)) { - (void) printf ("%s\n", cp2); + cvs_output (cp2, 0); + cvs_output ("\n", 1); break; } cp += fill - 2; @@ -891,12 +979,14 @@ cat_module (status) cp--; if (cp == cp2) { - (void) printf ("%s\n", cp2); + cvs_output (cp2, 0); + cvs_output ("\n", 1); break; } *cp++ = '\0'; - (void) printf ("%s\n", cp2); + cvs_output (cp2, 0); + cvs_output ("\n", 1); } free_names(&moduleargc, moduleargv); diff --git a/gnu/usr.bin/cvs/src/myndbm.c b/gnu/usr.bin/cvs/src/myndbm.c index cae27e7cacd..99fe9521ace 100644 --- a/gnu/usr.bin/cvs/src/myndbm.c +++ b/gnu/usr.bin/cvs/src/myndbm.c @@ -19,7 +19,7 @@ #ifdef MY_NDBM -static void mydbm_load_file (); +static void mydbm_load_file PROTO ((FILE *, List *)); /* ARGSUSED */ DBM * diff --git a/gnu/usr.bin/cvs/src/myndbm.h b/gnu/usr.bin/cvs/src/myndbm.h index 0431e15d4d6..2bce7391e90 100644 --- a/gnu/usr.bin/cvs/src/myndbm.h +++ b/gnu/usr.bin/cvs/src/myndbm.h @@ -1,5 +1,3 @@ -/* $CVSid: @(#)myndbm.h 1.4 94/09/21 $ */ - #ifdef MY_NDBM #define DBLKSIZ 4096 diff --git a/gnu/usr.bin/cvs/src/options.h.in b/gnu/usr.bin/cvs/src/options.h.in index 0f6374b8b5a..476d747d0c4 100644 --- a/gnu/usr.bin/cvs/src/options.h.in +++ b/gnu/usr.bin/cvs/src/options.h.in @@ -28,22 +28,6 @@ #define HAVE_RCS5 #endif -/* - * If, before installing this version of CVS, you were running RCS V4 - * AND you are installing this CVS and RCS V5 and GNU diff 1.15 all at - * the same time, you should turn on the following define. It only - * exists to try to do reasonable things with your existing checked - * out files when you upgrade to RCS V5, since the keyword expansion - * formats have changed with RCS V5. - * - * If you already have been running with RCS5, or haven't been running - * with CVS yet at all, or are sticking with RCS V4 for now, leave the - * commented out. - */ -#ifndef HAD_RCS4 -/* #define HAD_RCS4 */ -#endif - /* * For portability and heterogeneity reasons, CVS is shipped by * default using my own text-file version of the ndbm database library @@ -72,16 +56,6 @@ #define DIFF "diff" #endif -/* - * The "grep" program to execute when checking to see if a merged file - * had any conflicts. This "grep" must support a standard basic - * regular expression as an argument. Specify a full pathname if your - * site wants to use a particular grep. - */ -#ifndef GREP -#define GREP "grep" -#endif - /* * The "patch" program to run when using the CVS server and accepting * patches across the network. Specify a full pathname if your site @@ -126,13 +100,10 @@ #define RCSBIN_DFLT "" #endif -/* - * The password-authenticating server creates a temporary checkout of - * the affected files. The variable TMPDIR_DFLT (or even better, the - * command-line option "-T" in the line for CVS in /etc/inetd.conf) - * can be used to specify the used directory. This directory will - * also be used for other temporary files. - */ +/* Directory used for storing temporary files, if not overridden by + environment variables or the -T global option. There should be little + need to change this (-T is a better mechanism if you need to use a + different directory for temporary files). */ #ifndef TMPDIR_DFLT #define TMPDIR_DFLT "/tmp" #endif @@ -231,17 +202,25 @@ #define CVS_BADROOT #endif -/* - * Define this to enable the SETXID support. The way to use this is - * to create a group with no users in it (except perhaps cvs - * administrators), set the cvs executable to setgid that group, chown - * all the repository files to that group, and change all directory - * permissions in the repository to 770. The last person to modify a - * file will own it, but as long as directory permissions are set - * right that won't matter. You'll need a system which inherits file - * groups from the parent directory. I don't know how carefully this - * has been inspected for security holes. - */ +/* Define this to enable the SETXID support. The way to use this is + to create a group with no users in it (except perhaps cvs + administrators), set the cvs executable to setgid that group, chown + all the repository files to that group, and change all directory + permissions in the repository to 770. The last person to modify a + file will own it, but as long as directory permissions are set + right that won't matter. You'll need a system which inherits file + groups from the parent directory (WARNING: using the wrong kind of + system (I think Solaris 2.4 is the wrong kind, for example) will + create a security hole! You will receive no warning other than the + fact that files in the working directory are owned by the group + which cvs is setgid to). + + One security hole which has been reported is that setgid is not + turned off when the editor is invoked--most editors provide a way + to execute a shell, or the user can specify an editor (this one is + large enough to drive a truck through). Don't assume that the + holes described here are the only ones; I don't know how carefully + SETXID has been inspected for security holes. */ #ifndef SETXID_SUPPORT /* #define SETXID_SUPPORT */ #endif diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c index 9c7ca375ff6..f5cef712298 100644 --- a/gnu/usr.bin/cvs/src/rcs.c +++ b/gnu/usr.bin/cvs/src/rcs.c @@ -68,8 +68,11 @@ RCS_parse (file, repos) { RCSNode *rcs; FILE *fp; - char rcsfile[PATH_MAX]; + RCSNode *retval; + char *rcsfile; + rcsfile = xmalloc (strlen (repos) + strlen (file) + + sizeof (RCSEXT) + sizeof (CVSATTIC) + 10); (void) sprintf (rcsfile, "%s/%s%s", repos, file, RCSEXT); if ((fp = CVS_FOPEN (rcsfile, FOPEN_BINARY_READ)) != NULL) { @@ -78,12 +81,14 @@ RCS_parse (file, repos) rcs->flags |= VALID; fclose (fp); - return (rcs); + retval = rcs; + goto out; } else if (! existence_error (errno)) { error (0, errno, "cannot open %s", rcsfile); - return NULL; + retval = NULL; + goto out; } (void) sprintf (rcsfile, "%s/%s/%s%s", repos, CVSATTIC, file, RCSEXT); @@ -97,15 +102,21 @@ RCS_parse (file, repos) } fclose (fp); - return (rcs); + retval = rcs; + goto out; } else if (! existence_error (errno)) { error (0, errno, "cannot open %s", rcsfile); - return NULL; + retval = NULL; + goto out; } + retval = NULL; - return (NULL); + out: + free (rcsfile); + + return retval; } /* @@ -1859,11 +1870,11 @@ RCS_getrevtime (rcs, rev, date, fudge) /* put the date in a form getdate can grok */ #ifdef HAVE_RCS5 (void) sprintf (tdate, "%d/%d/%d GMT %d:%d:%d", ftm->tm_mon, - ftm->tm_mday, ftm->tm_year, ftm->tm_hour, + ftm->tm_mday, ftm->tm_year + 1900, ftm->tm_hour, ftm->tm_min, ftm->tm_sec); #else (void) sprintf (tdate, "%d/%d/%d %d:%d:%d", ftm->tm_mon, - ftm->tm_mday, ftm->tm_year, ftm->tm_hour, + ftm->tm_mday, ftm->tm_year + 1900, ftm->tm_hour, ftm->tm_min, ftm->tm_sec); #endif @@ -2306,11 +2317,19 @@ RCS_checkout (rcs, workfile, rev, nametag, options, sout) error (1, errno, "cannot open %s", workfile); } - if (fwrite (value, 1, len, ofp) != len) - error (1, errno, "cannot write %s", - (workfile != NULL - ? workfile - : (sout != RUN_TTY ? sout : "stdout"))); + if (workfile == NULL && sout == RUN_TTY) + { + if (len > 0) + cvs_output (value, len); + } + else + { + if (fwrite (value, 1, len, ofp) != len) + error (1, errno, "cannot write %s", + (workfile != NULL + ? workfile + : (sout != RUN_TTY ? sout : "stdout"))); + } if (workfile != NULL) { @@ -3168,7 +3187,7 @@ invalid rcs file %s (`d' operand out of range)", /* Now output the date. */ ym = strchr (prvers->date, '.'); if (ym == NULL) - cvs_output ("??-???-??", 0); + cvs_output ("?\?-??\?-??", 0); else { md = strchr (ym + 1, '.'); @@ -3345,7 +3364,7 @@ annotate (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0); + send_files (argc, argv, local, 0, 0); send_to_server ("annotate\012", 0); return get_responses_and_close (); } diff --git a/gnu/usr.bin/cvs/src/rcs.h b/gnu/usr.bin/cvs/src/rcs.h index 91175309833..ed6ea37f89f 100644 --- a/gnu/usr.bin/cvs/src/rcs.h +++ b/gnu/usr.bin/cvs/src/rcs.h @@ -1,5 +1,3 @@ -/* $CVSid: @(#)rcs.h 1.18 94/09/23 $ */ - /* * Copyright (c) 1992, Brian Berliner and Jeff Polk * Copyright (c) 1989-1992, Brian Berliner @@ -15,7 +13,10 @@ #define RCS_CO "co" #define RCS_DIFF "rcsdiff" #define RCS_RCSMERGE "rcsmerge" -#define RCS_MERGE_PAT "^>>>>>>> " /* runs "grep" with this pattern */ + +/* String which indicates a conflict if it occurs at the start of a line. */ +#define RCS_MERGE_PAT ">>>>>>> " + #define RCSEXT ",v" #define RCSPAT "*,v" #define RCSHEAD "head" diff --git a/gnu/usr.bin/cvs/src/recurse.c b/gnu/usr.bin/cvs/src/recurse.c index 191156c1ae9..7eb7fe99c69 100644 --- a/gnu/usr.bin/cvs/src/recurse.c +++ b/gnu/usr.bin/cvs/src/recurse.c @@ -525,6 +525,11 @@ do_file_proc (p, closure) freercsnode(&finfo->rcs); free (finfo->fullname); + /* Allow the user to monitor progress with tail -f. Doing this once + per file should be no big deal, but we don't want the performance + hit of flushing on every line like previous versions of CVS. */ + cvs_flushout (); + return (ret); } @@ -593,7 +598,7 @@ do_dir_proc (p, closure) { /* save our current directory and static vars */ if (save_cwd (&cwd)) - exit (EXIT_FAILURE); + error_exit (); sdirlist = dirlist; srepository = repository; dirlist = NULL; @@ -629,7 +634,7 @@ do_dir_proc (p, closure) /* get back to where we started and restore state vars */ if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); free_cwd (&cwd); dirlist = sdirlist; repository = srepository; @@ -713,7 +718,7 @@ unroll_files_proc (p, closure) if (strcmp(p->key, ".") != 0) { if (save_cwd (&cwd)) - exit (EXIT_FAILURE); + error_exit (); if ( CVS_CHDIR (p->key) < 0) error (1, errno, "could not chdir to %s", p->key); @@ -733,7 +738,7 @@ unroll_files_proc (p, closure) free (save_update_dir); if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); free_cwd (&cwd); } diff --git a/gnu/usr.bin/cvs/src/release.c b/gnu/usr.bin/cvs/src/release.c index 56073a3f0f2..8e5c992d3d0 100644 --- a/gnu/usr.bin/cvs/src/release.c +++ b/gnu/usr.bin/cvs/src/release.c @@ -1,10 +1,6 @@ /* * Release: "cancel" a checkout in the history log. * - * - Don't allow release if anything is active - Don't allow release if not - * above or inside repository. - Don't allow release if ./CVS/Repository is - * not the same as the directory specified in the module database. - * * - Enter a line in the history log indicating the "release". - If asked to, * delete the local working directory. */ @@ -15,27 +11,50 @@ static void release_delete PROTO((char *dir)); static const char *const release_usage[] = { - "Usage: %s %s [-d] modules...\n", + "Usage: %s %s [-d] directories...\n", "\t-d\tDelete the given directory.\n", NULL }; -static short delete_flag; +#ifdef SERVER_SUPPORT +static int release_server PROTO ((int argc, char **argv)); + +/* This is the server side of cvs release. */ +static int +release_server (argc, argv) + int argc; + char **argv; +{ + int i; + + /* Note that we skip argv[0]. */ + for (i = 1; i < argc; ++i) + history_write ('F', argv[i], "", argv[i], ""); + return 0; +} + +#endif /* SERVER_SUPPORT */ -/* FIXME: This implementation is cheezy in quite a few ways: +/* There are various things to improve about this implementation: - 1. The whole "cvs update" junk could be checked locally with a + 1. Using run_popen to run "cvs update" could be replaced by a fairly simple start_recursion/classify_file loop--a win for - portability, performance, and cleanliness. + portability, performance, and cleanliness. In particular, there is + no particularly good way to find the right "cvs". - 2. Should be like edit/unedit in terms of working well if disconnected - from the network, and then sending a delayed notification. + 2. The fact that "cvs update" contacts the server slows things down; + it undermines the case for using "cvs release" rather than "rm -rf". + However, for correctly printing "? foo" and correctly handling + CVSROOTADM_IGNORE, we currently need to contact the server. - 3. Way too many network turnarounds. More than one for each argument. - Puh-leeze. + 3. Would be nice to take processing things on the client side one step + further, and making it like edit/unedit in terms of working well if + disconnected from the network, and then sending a delayed + notification. - 4. Oh, and as a purely stylistic nit, break this out into separate - functions for client/local and for server. Those #ifdefs are a mess. */ + 4. Having separate network turnarounds for the "Notify" request + which we do as part of unedit, and for the "release" itself, is slow + and unnecessary. */ int release (argc, argv) @@ -43,49 +62,44 @@ release (argc, argv) char **argv; { FILE *fp; - register int i, c; - char *repository, *srepos; + int i, c; + char *repository; char line[PATH_MAX], update_cmd[PATH_MAX]; char *thisarg; int arg_start_idx; int err = 0; + short delete_flag = 0; #ifdef SERVER_SUPPORT - if (!server_active) - { -#endif /* SERVER_SUPPORT */ - if (argc == -1) - usage (release_usage); - optind = 1; - while ((c = getopt (argc, argv, "Qdq")) != -1) - { - switch (c) - { - case 'Q': - case 'q': -#ifdef SERVER_SUPPORT - /* The CVS 1.5 client sends these options (in addition to - Global_option requests), so we must ignore them. */ - if (!server_active) + if (server_active) + return release_server (argc, argv); #endif - error (1, 0, - "-q or -Q must be specified before \"%s\"", - command_name); + + /* Everything from here on is client or local. */ + if (argc == -1) + usage (release_usage); + optind = 1; + while ((c = getopt (argc, argv, "Qdq")) != -1) + { + switch (c) + { + case 'Q': + case 'q': + error (1, 0, + "-q or -Q must be specified before \"%s\"", + command_name); break; - case 'd': + case 'd': delete_flag++; break; - case '?': - default: + case '?': + default: usage (release_usage); break; - } - } - argc -= optind; - argv += optind; -#ifdef SERVER_SUPPORT - } -#endif /* SERVER_SUPPORT */ + } + } + argc -= optind; + argv += optind; /* We're going to run "cvs -n -q update" and check its output; if * the output is sufficiently unalarming, then we release with no @@ -98,116 +112,85 @@ release (argc, argv) #ifdef CLIENT_SUPPORT /* Start the server; we'll close it after looping. */ if (client_active) - { + { start_server (); ign_setup (); - } + } #endif /* CLIENT_SUPPORT */ - /* If !server_active, we already skipped over argv[0] in the "argc - -= optind;" statement above. But if server_active, we need to - skip it now. */ -#ifdef SERVER_SUPPORT - if (server_active) - arg_start_idx = 1; - else -#endif /* SERVER_SUPPORT */ - arg_start_idx = 0; + arg_start_idx = 0; for (i = arg_start_idx; i < argc; i++) { - thisarg = argv[i]; - -#ifdef SERVER_SUPPORT - if (server_active) - { - /* Just log the release -- all the interesting stuff happened - * on the client. - */ - history_write ('F', thisarg, "", thisarg, ""); /* F == Free */ - } - else - { -#endif /* SERVER_SUPPORT */ - - /* - * If we are in a repository, do it. Else if we are in the parent of - * a directory with the same name as the module, "cd" into it and - * look for a repository there. - */ + thisarg = argv[i]; + if (isdir (thisarg)) { - if ( CVS_CHDIR (thisarg) < 0) - { - if (!really_quiet) - error (0, 0, "can't chdir to: %s", thisarg); - continue; - } - if (!isdir (CVSADM)) - { - if (!really_quiet) - error (0, 0, "no repository module: %s", thisarg); - continue; - } + if (CVS_CHDIR (thisarg) < 0) + { + if (!really_quiet) + error (0, errno, "can't chdir to: %s", thisarg); + continue; + } + if (!isdir (CVSADM)) + { + if (!really_quiet) + error (0, 0, "no repository directory: %s", thisarg); + continue; + } } else { - if (!really_quiet) - error (0, 0, "no such directory: %s", thisarg); - continue; + if (!really_quiet) + error (0, 0, "no such directory: %s", thisarg); + continue; } repository = Name_Repository ((char *) NULL, (char *) NULL); - srepos = Short_Repository (repository); - + if (!really_quiet) { - /* The "release" command piggybacks on "update", which - * does the real work of finding out if anything is not - * up-to-date with the repository. Then "release" prompts - * the user, telling her how many files have been - * modified, and asking if she still wants to do the - * release. - */ - fp = run_popen (update_cmd, "r"); - c = 0; - - while (fgets (line, sizeof (line), fp)) - { - if (strchr ("MARCZ", *line)) - c++; - (void) printf (line); - } - - /* If the update exited with an error, then we just want to - * complain and go on to the next arg. Especially, we do - * not want to delete the local copy, since it's obviously - * not what the user thinks it is. - */ - if ((pclose (fp)) != 0) - { - error (0, 0, "unable to release `%s'", thisarg); - continue; - } - - (void) printf ("You have [%d] altered files in this repository.\n", - c); - (void) printf ("Are you sure you want to release %smodule `%s': ", - delete_flag ? "(and delete) " : "", thisarg); - c = !yesno (); - if (c) /* "No" */ - { - (void) fprintf (stderr, "** `%s' aborted by user choice.\n", - command_name); - free (repository); - continue; - } + /* The "release" command piggybacks on "update", which + does the real work of finding out if anything is not + up-to-date with the repository. Then "release" prompts + the user, telling her how many files have been + modified, and asking if she still wants to do the + release. */ + fp = run_popen (update_cmd, "r"); + c = 0; + + while (fgets (line, sizeof (line), fp)) + { + if (strchr ("MARCZ", *line)) + c++; + (void) printf (line); + } + + /* If the update exited with an error, then we just want to + complain and go on to the next arg. Especially, we do + not want to delete the local copy, since it's obviously + not what the user thinks it is. */ + if ((pclose (fp)) != 0) + { + error (0, 0, "unable to release `%s'", thisarg); + continue; + } + + printf ("You have [%d] altered files in this repository.\n", + c); + printf ("Are you sure you want to release %sdirectory `%s': ", + delete_flag ? "(and delete) " : "", thisarg); + c = !yesno (); + if (c) /* "No" */ + { + (void) fprintf (stderr, "** `%s' aborted by user choice.\n", + command_name); + free (repository); + continue; + } } if (1 -#ifdef SERVER_SUPPORT - && !server_active -#endif #ifdef CLIENT_SUPPORT && !(client_active && (!supported_request ("noop") @@ -215,45 +198,50 @@ release (argc, argv) #endif ) { - /* We are chdir'ed into the directory in question. - So don't pass args to unedit. */ - int argc = 1; - char *argv[3]; - argv[0] = "dummy"; - argv[1] = NULL; - err += unedit (argc, argv); + /* We are chdir'ed into the directory in question. + So don't pass args to unedit. */ + int argc = 1; + char *argv[3]; + argv[0] = "dummy"; + argv[1] = NULL; + err += unedit (argc, argv); } #ifdef CLIENT_SUPPORT if (client_active) { - send_to_server ("Argument ", 0); - send_to_server (thisarg, 0); - send_to_server ("\012", 1); - send_to_server ("release\012", 0); - } + send_to_server ("Argument ", 0); + send_to_server (thisarg, 0); + send_to_server ("\012", 1); + send_to_server ("release\012", 0); + } else - { #endif /* CLIENT_SUPPORT */ - history_write ('F', thisarg, "", thisarg, ""); /* F == Free */ -#ifdef CLIENT_SUPPORT - } /* else client not active */ -#endif /* CLIENT_SUPPORT */ - + { + history_write ('F', thisarg, "", thisarg, ""); /* F == Free */ + } + free (repository); if (delete_flag) release_delete (thisarg); - + #ifdef CLIENT_SUPPORT if (client_active) - return get_responses_and_close (); - else + err += get_server_responses (); #endif /* CLIENT_SUPPORT */ - return (0); - -#ifdef SERVER_SUPPORT - } /* else server not active */ -#endif /* SERVER_SUPPORT */ - } /* `for' loop */ + } + +#ifdef CLIENT_SUPPORT + if (client_active) + { + /* Unfortunately, client.c doesn't offer a way to close + the connection without waiting for responses. The extra + network turnaround here is quite unnecessary other than + that.... */ + send_to_server ("noop\012", 0); + err += get_responses_and_close (); + } +#endif /* CLIENT_SUPPORT */ + return err; } diff --git a/gnu/usr.bin/cvs/src/remove.c b/gnu/usr.bin/cvs/src/remove.c index 95c395d5d16..08a67bed58c 100644 --- a/gnu/usr.bin/cvs/src/remove.c +++ b/gnu/usr.bin/cvs/src/remove.c @@ -101,7 +101,7 @@ cvsremove (argc, argv) if (local) send_arg("-l"); send_file_names (argc, argv, 0); - send_files (argc, argv, local, 0); + send_files (argc, argv, local, 0, 0); send_to_server ("remove\012", 0); return get_responses_and_close (); } diff --git a/gnu/usr.bin/cvs/src/repos.c b/gnu/usr.bin/cvs/src/repos.c index 74d4580c5f3..d774c342120 100644 --- a/gnu/usr.bin/cvs/src/repos.c +++ b/gnu/usr.bin/cvs/src/repos.c @@ -64,6 +64,14 @@ Name_Repository (dir, update_dir) if (existence_error (save_errno)) { + /* FIXME: This is a very poorly worded error message. It + occurs at least in the case where the user manually + creates a directory named CVS, so the error message + should be more along the lines of "CVS directory found + without administrative files; use CVS to create the CVS + directory, or rename it to something else if the + intention is to store something besides CVS + administrative files". */ error (0, 0, "in directory %s:", xupdate_dir); error (1, 0, "*PANIC* administration files missing"); } @@ -105,7 +113,7 @@ Name_Repository (dir, update_dir) } /* allocate space to return and fill it in */ - strip_path (repos); + strip_trailing_slashes (repos); ret = xstrdup (repos); return (ret); } diff --git a/gnu/usr.bin/cvs/src/root.c b/gnu/usr.bin/cvs/src/root.c index 21df17d2bd0..71e8f2883df 100644 --- a/gnu/usr.bin/cvs/src/root.c +++ b/gnu/usr.bin/cvs/src/root.c @@ -80,16 +80,14 @@ Name_Root(dir, update_dir) /* * root now contains a candidate for CVSroot. It must be an - * absolute pathname + * absolute pathname or specify a remote server. */ + if ( #ifdef CLIENT_SUPPORT - /* It must specify a server via remote CVS or be an absolute pathname. */ - if ((strchr (root, ':') == NULL) - && ! isabsolute (root)) -#else /* ! CLIENT_SUPPORT */ - if (root[0] != '/') -#endif /* CLIENT_SUPPORT */ + (strchr (root, ':') == NULL) && +#endif + ! isabsolute (root)) { error (0, 0, "in directory %s:", xupdate_dir); error (0, 0, @@ -112,7 +110,7 @@ Name_Root(dir, update_dir) } /* allocate space to return and fill it in */ - strip_path (root); + strip_trailing_slashes (root); ret = xstrdup (root); return (ret); } @@ -197,6 +195,26 @@ char *CVSroot_username; /* the username or NULL if method == local */ char *CVSroot_hostname; /* the hostname or NULL if method == local */ char *CVSroot_directory; /* the directory name */ +#ifdef AUTH_SERVER_SUPPORT +/* Die if CVSroot_directory and Pserver_Repos don't match. */ +static void +check_root_consistent () +{ + /* FIXME: Should be using a deferred error, as the rest of + serve_root does. As it is now the call to error could conceivably + cause deadlock, as noted in server_cleanup. Best solution would + presumably be to write some code so that error() automatically + defers the error in those cases where that is needed. */ + + if ((Pserver_Repos != NULL) && (CVSroot_directory != NULL)) + if (strcmp (Pserver_Repos, CVSroot_directory) != 0) + error (1, 0, "repository mismatch: \"%s\" vs \"%s\"", + Pserver_Repos, CVSroot_directory); +} + +#endif /* AUTH_SERVER_SUPPORT */ + + int parse_cvsroot (CVSroot) char *CVSroot; @@ -299,6 +317,9 @@ parse_cvsroot (CVSroot) } CVSroot_directory = cvsroot_copy; +#ifdef AUTH_SERVER_SUPPORT + check_root_consistent (); +#endif /* AUTH_SERVER_SUPPORT */ #if ! defined (CLIENT_SUPPORT) && ! defined (DEBUG) if (CVSroot_method != local_method) @@ -368,6 +389,9 @@ set_local_cvsroot (dir) CVSroot_original = xstrdup (dir); CVSroot_method = local_method; CVSroot_directory = CVSroot_original; +#ifdef AUTH_SERVER_SUPPORT + check_root_consistent (); +#endif /* AUTH_SERVER_SUPPORT */ CVSroot_username = NULL; CVSroot_hostname = NULL; client_active = 0; diff --git a/gnu/usr.bin/cvs/src/rtag.c b/gnu/usr.bin/cvs/src/rtag.c index 552ad32033d..dfc3c9364eb 100644 --- a/gnu/usr.bin/cvs/src/rtag.c +++ b/gnu/usr.bin/cvs/src/rtag.c @@ -518,7 +518,15 @@ rtag_fileproc (callerdat, finfo) /* Lock the directory if it is not already locked. We might be able to rely on rtag_dirproc for this. */ - tag_lockdir (finfo->repository); + + /* It would be nice to provide consistency with respect to + commits; however CVS lacks the infrastructure to do that (see + Concurrency in cvs.texinfo and comment in do_recursion). We + can and will prevent simultaneous tag operations from + interfering with each other, by write locking each directory as + we enter it, and unlocking it as we leave it. */ + + lock_dir_for_write (finfo->repository); /* find the parsed RCS data */ if ((rcsfile = finfo->rcs) == NULL) @@ -694,7 +702,7 @@ rtag_filesdoneproc (callerdat, err, repos, update_dir, entries) char *update_dir; List *entries; { - tag_unlockdir (); + Lock_Cleanup (); return (err); } diff --git a/gnu/usr.bin/cvs/src/run.c b/gnu/usr.bin/cvs/src/run.c index 036821e08c6..df594312a8f 100644 --- a/gnu/usr.bin/cvs/src/run.c +++ b/gnu/usr.bin/cvs/src/run.c @@ -10,11 +10,7 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #include "cvs.h" @@ -192,12 +188,11 @@ run_exec (stin, stout, sterr, flags) if (trace) { #ifdef SERVER_SUPPORT - (void) fprintf (stderr, "%c-> system(", (server_active) ? 'S' : ' '); -#else - (void) fprintf (stderr, "-> system("); + cvs_outerr (server_active ? "S" : " ", 1); #endif + cvs_outerr ("-> system(", 0); run_print (stderr); - (void) fprintf (stderr, ")\n"); + cvs_outerr (")\n", 0); } if (noexec && (flags & RUN_REALLY) == 0) return (0); @@ -244,7 +239,14 @@ run_exec (stin, stout, sterr, flags) fflush (stdout); fflush (stderr); - /* The output files, if any, are now created. Do the fork and dups */ + /* The output files, if any, are now created. Do the fork and dups. + + We use vfork not so much for the sake of unices without + copy-on-write (such systems are rare these days), but for the + sake of systems without an MMU, which therefore can't do + copy-on-write (e.g. Amiga). The other solution is spawn (see + windows-NT/run.c). */ + #ifdef HAVE_VFORK pid = vfork (); #else @@ -393,12 +395,22 @@ run_print (fp) FILE *fp; { int i; + void (*outfn) PROTO ((const char *, size_t)); + + if (fp == stderr) + outfn = cvs_outerr; + else if (fp == stdout) + outfn = cvs_output; + else + error (1, 0, "internal error: bad argument to run_print"); for (i = 0; i < run_argc; i++) { - (void) fprintf (fp, "'%s'", run_argv[i]); + (*outfn) ("'", 1); + (*outfn) (run_argv[i], 0); + (*outfn) ("'", 1); if (i != run_argc - 1) - (void) fprintf (fp, " "); + (*outfn) (" ", 1); } } @@ -437,7 +449,11 @@ piped_child (command, tofdp, fromfdp) if (pipe (from_child_pipe) < 0) error (1, errno, "cannot create pipe"); +#ifdef HAVE_VFORK + pid = vfork (); +#else pid = fork (); +#endif if (pid < 0) error (1, errno, "cannot fork"); if (pid == 0) @@ -494,7 +510,11 @@ filter_stream_through_program (oldfd, dir, prog, pidp) if (pipe (p)) error (1, errno, "cannot create pipe"); +#ifdef HAVE_VFORK + newpid = vfork (); +#else newpid = fork (); +#endif if (pidp) *pidp = newpid; switch (newpid) diff --git a/gnu/usr.bin/cvs/src/sanity.sh b/gnu/usr.bin/cvs/src/sanity.sh index 8d67c1c6cc4..ecf296cf028 100644 --- a/gnu/usr.bin/cvs/src/sanity.sh +++ b/gnu/usr.bin/cvs/src/sanity.sh @@ -13,6 +13,15 @@ # See TODO list at end of file. +# You can't run CVS as root; print a nice error message here instead +# of somewhere later, after making a mess. +case "`whoami`" in + "root" ) + echo "sanity.sh: test suite does not work correctly when run as root" >&2 + exit 1 + ;; +esac + # required to make this script work properly. unset CVSREAD @@ -442,76 +451,11 @@ HOME=${TESTDIR}/home; export HOME # tests. if test x"$*" = x; then - # This doesn't yet include log2, because the bug it tests for - # is not yet fixed, and/or we might want to wait until after 1.9. - # - # We also omit rdiff for now, because we have put off - # committing the changes that make it work until after the 1.9 - # release. - tests="basica basicb basic1 deep basic2 death death2 branches multibranch import join new newb conflicts conflicts2 modules mflag errmsg1 devcom ignore binfiles binwrap info serverpatch log" + tests="basica basicb basic1 deep basic2 rdiff death death2 branches multibranch import join new newb conflicts conflicts2 modules modules2 mflag errmsg1 devcom devcom2 ignore binfiles binwrap info serverpatch log log2 crerepos rcs" else tests="$*" fi -# this should die -if ${CVS} -d `pwd`/cvsroot co cvs-sanity 2>> ${LOGFILE} ; then - echo "FAIL: test 1" | tee -a ${LOGFILE} - exit 1 -else - echo "PASS: test 1" >>${LOGFILE} -fi - -# this should still die -mkdir cvsroot -if ${CVS} -d `pwd`/cvsroot co cvs-sanity 2>> ${LOGFILE} ; then - echo "FAIL: test 2" | tee -a ${LOGFILE} - exit 1 -else - echo "PASS: test 2" >>${LOGFILE} -fi - -# this should still die -mkdir cvsroot/CVSROOT -if ${CVS} -d `pwd`/cvsroot co cvs-sanity 2>> ${LOGFILE} ; then - echo "FAIL: test 3" | tee -a ${LOGFILE} - exit 1 -else - echo "PASS: test 3" >>${LOGFILE} -fi - -# This one should work, although it should spit a warning. -mkdir tmp ; cd tmp -${CVS} -d `pwd`/../cvsroot co CVSROOT 2>> ${LOGFILE} -cd .. ; rm -rf tmp - -# set up a minimal modules file... -# (now that mkmodules is gone, this doesn't test -i the way it -# used to. In fact, it looks like a noop to me). -echo "CVSROOT CVSROOT" > cvsroot/CVSROOT/modules -# The following line stolen from cvsinit.sh. FIXME: create our -# repository via cvsinit.sh; that way we test it too. -(cd cvsroot/CVSROOT; ci -q -u -t/dev/null \ - -m'initial checkin of modules' modules) - -# This one should succeed. No warnings. -mkdir tmp ; cd tmp -if ${CVS} -d `pwd`/../cvsroot co CVSROOT ; then - echo "PASS: test 4" >>${LOGFILE} -else - echo "FAIL: test 4" | tee -a ${LOGFILE} - exit 1 -fi - -if echo "yes" | ${CVS} -d `pwd`/../cvsroot release -d CVSROOT ; then - echo "PASS: test 4.5" >>${LOGFILE} -else - echo "FAIL: test 4.5" | tee -a ${LOGFILE} - exit 1 -fi -# this had better be empty -cd ..; rmdir tmp -dotest_fail 4.75 "test -d tmp" '' - # a simple function to compare directory contents # # Returns: {nothing} @@ -552,10 +496,7 @@ directory_cmp () rm -f /tmp/dc$$* } -# so much for the setup. Let's try something harder. - -# Try setting CVSROOT so we don't have to worry about it anymore. (now that -# we've tested -d cvsroot.) +# Set up CVSROOT (the crerepos tests will test operating without CVSROOT set). CVSROOT_DIRNAME=${TESTDIR}/cvsroot CVSROOT=${CVSROOT_DIRNAME} ; export CVSROOT if test "x$remote" = xyes; then @@ -566,8 +507,7 @@ if test "x$remote" = xyes; then CVS_SERVER=${testcvs}; export CVS_SERVER fi -# start keeping history -touch ${CVSROOT_DIRNAME}/CVSROOT/history +dotest 1 "${testcvs} init" '' ### The big loop for what in $tests; do @@ -577,14 +517,19 @@ for what in $tests; do # tests, but hopefully a lot faster. Also tests operating on # files two directories down *without* operating on the parent dirs. - # Using mkdir in the repository is used throughout these - # tests to create a top-level directory. I think instead it - # should be: - # cvs co -l . - # mkdir first-dir - # cvs add first-dir - # but currently that works only for local CVS, not remote. - mkdir ${CVSROOT_DIRNAME}/first-dir + # Tests basica-0a and basica-0b provide the equivalent of the: + # mkdir ${CVSROOT_DIRNAME}/first-dir + # used by many of the tests. It is "more official" in the sense + # that is does everything through CVS; the reason most of the + # tests don't use it is mostly historical. + mkdir 1; cd 1 + dotest basica-0a "${testcvs} -q co -l ." '' + mkdir first-dir + dotest basica-0b "${testcvs} add first-dir" \ +"Directory /tmp/cvs-sanity/cvsroot/\./first-dir added to the repository" + cd .. + rm -rf 1 + dotest basica-1 "${testcvs} -q co first-dir" '' cd first-dir @@ -705,6 +650,7 @@ done' # More basic tests, including non-branch tags and co -d. mkdir ${CVSROOT_DIRNAME}/first-dir dotest basicb-1 "${testcvs} -q co first-dir" '' + dotest basicb-1a "test -d CVS" '' cd first-dir mkdir sdir1 sdir2 dotest basicb-2 "${testcvs} add sdir1 sdir2" \ @@ -783,6 +729,7 @@ U first-dir1/sdir2/sfile2' "${testcvs} -q co -d newdir -r release-1 first-dir/sdir1 first-dir/sdir2" \ 'U newdir/sdir1/sfile1 U newdir/sdir2/sfile2' + dotest basicb-9a "test -d CVS" '' dotest basicb-10 "cat newdir/sdir1/sfile1 newdir/sdir2/sfile2" \ "sfile1 develops sfile2 starts" @@ -794,6 +741,7 @@ sfile2 starts" basic1) # first dive - add a files, first singly, then in a group. mkdir ${CVSROOT_DIRNAME}/first-dir + mkdir 1; cd 1 # check out an empty directory if ${CVS} co first-dir ; then echo "PASS: test 13a" >>${LOGFILE} @@ -896,8 +844,15 @@ sfile2 starts" echo "FAIL: test 28" | tee -a ${LOGFILE} ; exit 1 fi cd .. + cd .. + + if test "$keep" = yes; then + echo Keeping /tmp/cvs-sanity and exiting due to --keep + exit 0 + fi + + rm -rf 1 rm -rf ${CVSROOT_DIRNAME}/first-dir - rm -rf first-dir ;; deep) @@ -971,7 +926,7 @@ HERE rm file1 dotest deep-4a0 "${testcvs} rm file1" \ "${PROG} [a-z]*: scheduling .file1. for removal -${PROG} [a-z]*: use .cvs commit. to remove this file permanently" +${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" dotest deep-4a1 "${testcvs} -q ci -m rm-it" 'Removing file1; /tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1 new revision: delete; previous revision: 1\.1 @@ -980,7 +935,37 @@ done' dotest deep-4a2 "${testcvs} -q update -P dir6/dir7" '' # Should be using "test -e" if that is portable enough. dotest_fail deep-4a3 "test -d dir6/dir7/dir8" '' - cd ../../../../../.. + + # Test that if we remove the working directory, CVS does not + # recreate it. (I realize that this behavior is what the + # users expect, but in the longer run we might want to + # re-think it. The corresponding behavior for a file is that + # CVS *will* recreate it, and we might want to make it so + # that "cvs release -d" is the way to delete the directory + # and have it stay gone -kingdon, Oct1996). + rm -rf dir6 + dotest deep-4b1 "${testcvs} -q update" '' + dotest deep-4b2 "${testcvs} -q update -d -P" \ +'U dir6/file1 +U dir6/dir7/file1' + + # Test what happens if one uses -P when there are files removed + # but not committed. + cd dir6/dir7 + dotest deep-rm1 "${testcvs} rm -f file1" \ +"${PROG} [a-z]*: scheduling .file1. for removal +${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" + cd .. + dotest deep-rm2 "${testcvs} -q update -d -P" 'R dir7/file1' + dotest deep-rm3 "test -d dir7" '' + dotest deep-rm4 "${testcvs} -q ci -m rm-it" 'Removing dir7/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- file1 +new revision: delete; previous revision: 1\.1 +done' + dotest deep-rm5 "${testcvs} -q update -d -P" '' + dotest_fail deep-rm6 "test -d dir7" '' + + cd ../../../../../../.. if echo "yes" | ${testcvs} release -d first-dir >>${LOGFILE}; then pass deep-5 @@ -1322,7 +1307,7 @@ No conflicts created by this import' # why are there two lines at the end of the local output # which don't exist in the remote output? would seem to be # a CVS bug. - dotest basic2-64 "${testcvs} his -e -a" \ + dotest basic2-64 "${testcvs} his -x TOFWUCGMAR -a" \ 'O [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z0-9@][a-z0-9@]* first-dir =first-dir= '"${TMPPWD}"'/cvs-sanity/\* A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z0-9@][a-z0-9@]* 1\.1 file6 first-dir == '"${TMPPWD}"'/cvs-sanity A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z0-9@][a-z0-9@]* 1\.1 file7 first-dir == '"${TMPPWD}"'/cvs-sanity @@ -1385,9 +1370,9 @@ N trdiff/bar No conflicts created by this import' dotest rdiff-2 \ "${testcvs} co -ko trdiff" \ -'cvs [a-z]*: Updating trdiff +"${PROG} [a-z]*: Updating trdiff U trdiff/bar -U trdiff/foo' +U trdiff/foo" cd trdiff echo something >> foo dotest rdiff-3 \ @@ -1400,8 +1385,8 @@ done' echo "new file" >> new dotest rdiff-4 \ "${testcvs} add -m new-file-description new" \ -"cvs [a-z]*: scheduling file \`new' for addition -cvs [a-z]*: use 'cvs commit' to add this file permanently" +"${PROG} [a-z]*: scheduling file \`new' for addition +${PROG} [a-z]*: use 'cvs commit' to add this file permanently" dotest rdiff-5 \ "${testcvs} commit -m added-new-file new" \ 'RCS file: /tmp/cvs-sanity/cvsroot/trdiff/new,v @@ -1412,10 +1397,10 @@ initial revision: 1\.1 done' dotest rdiff-6 \ "${testcvs} tag local-v0" \ -'cvs [a-z]*: Tagging . +"${PROG} [a-z]*: Tagging . T bar T foo -T new' +T new" dotest rdiff-7 \ "${testcvs} status -v foo" \ '=================================================================== @@ -1437,15 +1422,15 @@ File: foo Status: Up-to-date dotest rdiff-8 \ "${testcvs} rdiff -r T1 -r local-v0 trdiff" \ -'cvs [a-z]*: Diffing trdiff +"${PROG}"' [a-z]*: Diffing trdiff Index: trdiff/foo diff -c trdiff/foo:1\.1\.1\.1 trdiff/foo:1\.2 \*\*\* trdiff/foo:1\.1\.1\.1 .* --- trdiff/foo .* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1,2 \*\*\*\* -! \$''Id\$ -! \$''Name\$ +! \$''Id: foo,v 1\.1\.1\.1 [0-9/]* [0-9:]* [a-zA-Z0-9][a-zA-Z0-9]* Exp \$ +! \$''Name: T1 \$ --- 1,3 ---- ! \$''Id: foo,v 1\.2 [0-9/]* [0-9:]* [a-zA-Z0-9][a-zA-Z0-9]* Exp \$ ! \$''Name: local-v0 \$ @@ -1460,40 +1445,14 @@ diff -c /dev/null trdiff/new:1\.1 '"${PLUS}"' #ident "@(#)trdiff:\$''Name: local-v0 \$:\$''Id: new,v 1\.1 [0-9/]* [0-9:]* [a-zA-Z0-9][a-zA-Z0-9]* Exp \$" '"${PLUS}"' new file' - # This appears to be broken client/server - if test "x$remote" = xno; then - dotest rdiff-9 \ - "${testcvs} rdiff -Ko -kv -r T1 -r local-v0 trdiff" \ -'cvs [a-z]*: Diffing trdiff -Index: trdiff/foo -diff -c trdiff/foo:1\.1\.1\.1 trdiff/foo:1\.2 -\*\*\* trdiff/foo:1\.1\.1\.1 .* ---- trdiff/foo .* -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -\*\*\* 1,2 \*\*\*\* -! \$''Id\$ -! \$''Name\$ ---- 1,3 ---- -! foo,v 1\.2 .* Exp -! local-v0 -! something -Index: trdiff/new -diff -c /dev/null trdiff/new:1\.1 -\*\*\* /dev/null .* ---- trdiff/new .* -\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -\*\*\* 0 \*\*\*\* ---- 1,2 ---- -'"${PLUS}"' #ident "@(#)trdiff:local-v0:new,v 1\.1 .* Exp" -'"${PLUS}"' new file' - fi # end tests we are skipping for client/server - # FIXME: will this work here? # if test "$keep" = yes; then # echo Keeping /tmp/cvs-sanity and exiting due to --keep # exit 0 # fi + cd .. + rm -rf testimport rm -rf ${CVSROOT_DIRNAME}/trdiff ;; @@ -1912,7 +1871,24 @@ done' rm file1 dotest death2-7 "${testcvs} rm file1" \ "${PROG} [a-z]*: scheduling .file1. for removal -${PROG} [a-z]*: use .cvs commit. to remove this file permanently" +${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" + + # Test diff of the removed file before it is committed. + dotest_fail death2-diff-1 "${testcvs} -q diff file1" \ +"${PROG} [a-z]*: file1 was removed, no comparison available" + + dotest_fail death2-diff-2 "${testcvs} -q diff -N -c file1" \ +"Index: file1 +=================================================================== +RCS file: file1 +diff -N file1 +\*\*\* [-a-zA-Z0-9/.%_]*[ ][ ]*[a-zA-Z0-9: ]* +--- /dev/null[ ][ ]*[a-zA-Z0-9: ]* +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\*\*\* 1 \*\*\*\* +- first revision +--- 0 ----" + dotest death2-8 "${testcvs} -q ci -m removed" \ 'Removing file1; /tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 @@ -1920,32 +1896,32 @@ new revision: delete; previous revision: 1\.1\.2 done' # Test diff of a dead file. - dotest_fail death2-diff-1 \ + dotest_fail death2-diff-3 \ "${testcvs} -q diff -r1.1 -rbranch -c file1" \ "${PROG} [a-z]*: file1 was removed, no comparison available" - dotest_fail death2-diff-2 \ + dotest_fail death2-diff-4 \ "${testcvs} -q diff -r1.1 -rbranch -N -c file1" \ "Index: file1 =================================================================== RCS file: file1 diff -N file1 -\*\*\* [a-zA-Z0-9/.]*[ ][ ]*[a-zA-Z0-9: ]* +\*\*\* [-a-zA-Z0-9/.%_]*[ ][ ]*[a-zA-Z0-9: ]* --- /dev/null[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* - first revision --- 0 ----" - dotest_fail death2-diff-3 "${testcvs} -q diff -rtag -c ." \ + dotest_fail death2-diff-5 "${testcvs} -q diff -rtag -c ." \ "${PROG} [a-z]*: file1 no longer exists, no comparison available" - dotest_fail death2-diff-4 "${testcvs} -q diff -rtag -N -c ." \ + dotest_fail death2-diff-6 "${testcvs} -q diff -rtag -N -c ." \ "Index: file1 =================================================================== RCS file: file1 diff -N file1 -\*\*\* [a-zA-Z0-9/.]*[ ][ ]*[a-zA-Z0-9: ]* +\*\*\* [-a-zA-Z0-9/.%]*[ ][ ]*[a-zA-Z0-9: ]* --- /dev/null[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1 \*\*\*\* @@ -1971,6 +1947,23 @@ diff -c first-dir/file1:1\.1 first-dir/file1:removed dotest death2-9 "${testcvs} add file1" \ "${PROG}"' [a-z]*: file `file1'\'' will be added on branch `branch'\'' from version 1\.1\.2\.1 '"${PROG}"' [a-z]*: use '\''cvs commit'\'' to add this file permanently' + + # Test diff of the added file before it is committed. + dotest_fail death2-diff-7 "${testcvs} -q diff file1" \ +"${PROG} [a-z]*: file1 is a new entry, no comparison available" + + dotest_fail death2-diff-8 "${testcvs} -q diff -N -c file1" \ +"Index: file1 +=================================================================== +RCS file: file1 +diff -N file1 +\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* +--- [-a-zA-Z0-9/.%_]*[ ][ ]*[a-zA-Z0-9: ]* +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +\*\*\* 0 \*\*\*\* +--- 1 ---- +${PLUS} second revision" + dotest death2-10 "${testcvs} -q commit -m add" \ 'Checking in file1; /tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 @@ -2028,22 +2021,22 @@ new revision: 1\.1\.2\.1; previous revision: 1\.1 done' # Test diff of a nonexistent tag - dotest_fail death2-diff-5 "${testcvs} -q diff -rtag -c file3" \ + dotest_fail death2-diff-9 "${testcvs} -q diff -rtag -c file3" \ "${PROG} [a-z]*: tag tag is not in file file3" - dotest_fail death2-diff-6 "${testcvs} -q diff -rtag -N -c file3" \ + dotest_fail death2-diff-10 "${testcvs} -q diff -rtag -N -c file3" \ "Index: file3 =================================================================== RCS file: file3 diff -N file3 \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* ---- [a-zA-Z0-9/.]*[ ][ ]*[a-zA-Z0-9: ]* +--- [-a-zA-Z0-9/.%_]*[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 1 ---- ${PLUS} first revision" - dotest_fail death2-diff-7 "${testcvs} -q diff -rtag -c ." \ + dotest_fail death2-diff-11 "${testcvs} -q diff -rtag -c ." \ "Index: file1 =================================================================== RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v @@ -2060,7 +2053,7 @@ diff -c -r1\.1 -r1\.1\.2\.2 ${PROG} [a-z]*: tag tag is not in file file2 ${PROG} [a-z]*: tag tag is not in file file3" - dotest_fail death2-diff-8 "${testcvs} -q diff -rtag -c -N ." \ + dotest_fail death2-diff-12 "${testcvs} -q diff -rtag -c -N ." \ "Index: file1 =================================================================== RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v @@ -2079,7 +2072,7 @@ Index: file2 RCS file: file2 diff -N file2 \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* ---- [a-zA-Z0-9/.]*[ ][ ]*[a-zA-Z0-9: ]* +--- [-a-zA-Z0-9/.%_]*[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 1 ---- @@ -2089,7 +2082,7 @@ Index: file3 RCS file: file3 diff -N file3 \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* ---- [a-zA-Z0-9/.]*[ ][ ]*[a-zA-Z0-9: ]* +--- [-a-zA-Z0-9/.%_]*[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 1 ---- @@ -2113,16 +2106,16 @@ ${PROG} [a-z]*: file3 is no longer in the repository" # dotest death2-21 "${testcvs} add file2" "some error message" # Make sure diff only reports appropriate files. - dotest_fail death2-diff-9 "${testcvs} -q diff -r rdiff-tag" \ + dotest_fail death2-diff-13 "${testcvs} -q diff -r rdiff-tag" \ "${PROG} [a-z]*: file1 is a new entry, no comparison available" - dotest_fail death2-diff-10 "${testcvs} -q diff -r rdiff-tag -c -N" \ + dotest_fail death2-diff-14 "${testcvs} -q diff -r rdiff-tag -c -N" \ "Index: file1 =================================================================== RCS file: file1 diff -N file1 \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]* ---- [a-zA-Z0-9/.]*[ ][ ]*[a-zA-Z0-9: ]* +--- [-a-zA-Z0-9/.%_]*[ ][ ]*[a-zA-Z0-9: ]* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 1 ---- @@ -2742,7 +2735,7 @@ T file8' dotest join-6 "${testcvs} rm file6 file8" \ "${PROG}"' [a-z]*: scheduling `file6'\'' for removal '"${PROG}"' [a-z]*: scheduling `file8'\'' for removal -'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to remove these files permanently' +'"${PROG}"' [a-z]*: use '\'"${PROG} commit"\'' to remove these files permanently' dotest join-7 "${testcvs} -q ci -mx ." \ 'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file2,v done @@ -2831,7 +2824,7 @@ T file8' '"${PROG}"' [a-z]*: scheduling `file4'\'' for removal '"${PROG}"' [a-z]*: scheduling `file5'\'' for removal '"${PROG}"' [a-z]*: scheduling `file6'\'' for removal -'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to remove these files permanently' +'"${PROG}"' [a-z]*: use '\'"${PROG} commit"\'' to remove these files permanently' dotest join-14 "${testcvs} -q ci -mx ." \ 'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/Attic/file1,v done @@ -3070,7 +3063,7 @@ done' rm a dotest newb-123g "${testcvs} rm a" \ "${PROG} [a-z]*: scheduling .a. for removal -${PROG} [a-z]*: use .cvs commit. to remove this file permanently" +${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" dotest newb-123h "${testcvs} -q ci -m removed" \ 'Removing a; /tmp/cvs-sanity/cvsroot/first-dir/a,v <-- a @@ -3137,9 +3130,6 @@ done' mkdir 2 cd 2 - # TODO-maybe: we could also check this (also in an empty - # directory) after the file has nonempty contents. - # # The need for TMPPWD here is a (minor) CVS bug; the # output should use the name of the repository as specified. dotest conflicts-126.5 "${testcvs} co -p first-dir" \ @@ -3171,7 +3161,28 @@ VERS: 1\.1 /tmp/cvs-sanity/cvsroot/first-dir/a,v <-- a new revision: 1\.2; previous revision: 1\.1 done' - cd ../../2/first-dir + cd ../.. + + # Similar to conflicts-126.5, but now the file has nonempty + # contents. + mkdir 3 + cd 3 + # The need for TMPPWD here is a (minor) CVS bug; the + # output should use the name of the repository as specified. + dotest conflicts-128.5 "${testcvs} co -p -l first-dir" \ +"${PROG} [a-z]*"': Updating first-dir +=================================================================== +Checking out first-dir/a +RCS: '"${TMPPWD}"'/cvs-sanity/cvsroot/first-dir/a,v +VERS: 1\.2 +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +add a line' + cd .. + rmdir 3 + + # Now go over the to the other working directory and + # start testing conflicts + cd 2/first-dir echo add a conflicting line >>a dotest_fail conflicts-129 "${testcvs} -q ci -m changed" \ "${PROG}"' [a-z]*: Up-to-date check failed for `a'\'' @@ -3199,29 +3210,22 @@ rcsmerge: warning: conflicts during merge C a' rmdir dir1 sdir - # Try to check in the file with the conflict markers in it. - if ${CVS} ci -m try 2>>${LOGFILE}; then - echo 'FAIL: test 131' | tee -a ${LOGFILE} - else - # Should tell us to resolve conflict first - echo 'PASS: test 131' >>${LOGFILE} - fi + dotest_fail conflicts-131 "${testcvs} -q ci -m try" \ +"${PROG} [a-z]*: file .a. had a conflict and has not been modified +${PROG} \[[a-z]* aborted\]: correct above errors first!" echo lame attempt at resolving it >>a # Try to check in the file with the conflict markers in it. - if ${CVS} ci -m try >>${LOGFILE} 2>&1; then - echo 'FAIL: test 132' | tee -a ${LOGFILE} - else - # Should tell us to resolve conflict first - echo 'PASS: test 132' >>${LOGFILE} - fi + dotest_fail conflicts-132 "${testcvs} -q ci -m try" \ +"${PROG} [a-z]*: file .a. still contains conflict indicators +${PROG} \[[a-z]* aborted\]: correct above errors first!" echo resolve conflict >a - if ${CVS} ci -m resolved >>${LOGFILE} 2>&1; then - echo 'PASS: test 133' >>${LOGFILE} - else - echo 'FAIL: test 133' | tee -a ${LOGFILE} - fi + dotest conflicts-133 "${testcvs} -q ci -m resolved" \ +"Checking in a; +/tmp/cvs-sanity/cvsroot/first-dir/a,v <-- a +new revision: 1\.3; previous revision: 1\.2 +done" # Now test that we can add a file in one working directory # and have an update in another get it. @@ -3239,7 +3243,7 @@ C a' fi cd ../../2 mkdir first-dir/dir1 first-dir/sdir - dotest conflicts-136 "${testcvs} -q update" \ + dotest conflicts-136 "${testcvs} -q update first-dir" \ '[UP] first-dir/abc '"${QUESTION}"' first-dir/dir1 '"${QUESTION}"' first-dir/sdir' \ @@ -3348,7 +3352,7 @@ done' rm a dotest conflicts2-142b3 "${testcvs} rm a" \ "${PROG} [a-z]*: scheduling .a. for removal -${PROG} [a-z]*: use .cvs commit. to remove this file permanently" +${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" dotest_fail conflicts2-142b4 "${testcvs} -q update" \ "${PROG} [a-z]*: conflict: removed a was modified by second party C a" @@ -3366,7 +3370,7 @@ ${PROG} [a-z]*: a, version 1\.1, resurrected" rm abc dotest conflicts2-142c0 "${testcvs} rm abc" \ "${PROG} [a-z]*: scheduling .abc. for removal -${PROG} [a-z]*: use .cvs commit. to remove this file permanently" +${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" dotest conflicts2-142c1 "${testcvs} -q ci -m remove-abc" \ 'Removing abc; /tmp/cvs-sanity/cvsroot/first-dir/abc,v <-- abc @@ -3376,7 +3380,7 @@ done' rm abc dotest conflicts2-142c2 "${testcvs} rm abc" \ "${PROG} [a-z]*: scheduling .abc. for removal -${PROG} [a-z]*: use .cvs commit. to remove this file permanently" +${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" dotest conflicts2-142c3 "${testcvs} update" \ "${PROG} [a-z]*: Updating \." cd ../.. @@ -3416,7 +3420,7 @@ C aa\.c" ;; modules) - rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir + # Tests of various ways to define and use modules. mkdir ${CVSROOT_DIRNAME}/first-dir mkdir 1 @@ -3472,7 +3476,7 @@ C aa\.c" exit 1 fi - echo realmodule first-dir/subdir a >>CVSROOT/modules + echo realmodule first-dir/subdir a >CVSROOT/modules echo dirmodule first-dir/subdir >>CVSROOT/modules echo namedmodule -d nameddir first-dir/subdir >>CVSROOT/modules echo aliasmodule -a first-dir/subdir/a >>CVSROOT/modules @@ -3492,8 +3496,7 @@ C aa\.c" exit 1 fi cd .. - dotest 148a0 "${testcvs} co -c" 'CVSROOT CVSROOT -aliasmodule -a first-dir/subdir/a + dotest 148a0 "${testcvs} co -c" 'aliasmodule -a first-dir/subdir/a aliasnested -a first-dir/subdir/ssdir bogusalias first-dir/subdir/a -a dirmodule first-dir/subdir @@ -3504,8 +3507,8 @@ world -a .' # I don't know why aliasmodule isn't printed (I would have thought # that it gets printed without the -a; although I'm not sure that # printing expansions without options is useful). - dotest 148a1 "${testcvs} co -s" 'CVSROOT NONE CVSROOT -bogusalias NONE first-dir/subdir/a -a + dotest 148a1 "${testcvs} co -s" \ +'bogusalias NONE first-dir/subdir/a -a dirmodule NONE first-dir/subdir namedmodule NONE first-dir/subdir realmodule NONE first-dir/subdir a' @@ -3649,7 +3652,9 @@ U nameddir/b' dotest modules-155a2 "test -d first-dir/subdir" '' dotest modules-155a3 "test -d first-dir/subdir/ssdir" '' # Test that nothing extraneous got created. - dotest modules-155a4 "ls" "first-dir" + dotest modules-155a4 "ls" "first-dir" \ +"CVS +first-dir" cd .. rm -rf 2 @@ -3657,7 +3662,7 @@ U nameddir/b' mkdir 1 cd 1 dotest modules-155b "${testcvs} -q co world" \ -"U CVSROOT/modules +"U CVSROOT/${DOTSTAR} U first-dir/subdir/a U first-dir/subdir/b" cd .. @@ -3704,6 +3709,74 @@ U first-dir/file2" rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + + modules2) + # More tests of modules, in particular the & feature. + mkdir ${CVSROOT_DIRNAME}/first-dir + mkdir ${CVSROOT_DIRNAME}/second-dir + + mkdir 1 + cd 1 + + dotest modules2-1 "${testcvs} -q co CVSROOT/modules" \ +'U CVSROOT/modules' + cd CVSROOT + echo 'ampermodule &first-dir &second-dir' > modules + # Depending on whether the user also ran the modules test + # we will be checking in revision 1.2 or 1.3. + dotest modules2-2 "${testcvs} -q ci -m add-modules" \ +"Checking in modules; +/tmp/cvs-sanity/cvsroot/CVSROOT/modules,v <-- modules +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +done +${PROG} [a-z]*: Rebuilding administrative file database" + + cd .. + + dotest modules2-3 "${testcvs} -q co ampermodule" '' + dotest modules2-4 "test -d ampermodule/first-dir" '' + dotest modules2-5 "test -d ampermodule/second-dir" '' + + # Test ability of cvs release to handle multiple arguments + cd ampermodule + if ${testcvs} release -d first-dir second-dir <>${LOGFILE} +yes +yes +EOF + then + pass modules2-6 + else + fail modules2-6 + fi + dotest_fail modules2-7 "test -d first-dir" '' + dotest_fail modules2-8 "test -d second-dir" '' + + cd .. + + # Test that CVS gives an error if one combines -a with + # other options. + cd CVSROOT + echo 'aliasopt -a -d onedir first-dir' >modules + dotest modules2-a0 "${testcvs} -q ci -m add-modules" \ +"Checking in modules; +/tmp/cvs-sanity/cvsroot/CVSROOT/modules,v <-- modules +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +done +${PROG} [a-z]*: Rebuilding administrative file database" + cd .. + dotest_fail modules2-a1 "${testcvs} -q co aliasopt" \ +"${PROG} [a-z]*: -a cannot be specified in the modules file along with other options" \ +"${PROG} [a-z]*: -a cannot be specified in the modules file along with other options +${PROG} \[[a-z]* aborted\]: cannot expand modules" + + # Clean up. + rm -rf CVSROOT + cd .. + rm -rf 1 + rm -rf ${CVSROOT_DIRNAME}/first-dir + rm -rf ${CVSROOT_DIRNAME}/second-dir + ;; + mflag) for message in '' ' ' ' ' ' test' ; do @@ -3996,6 +4069,11 @@ EOF fi dotest devcom-a0 "${testcvs} watchers" '' + + # FIXME: This probably should be an error message instead + # of silently succeeding and printing nothing. + dotest devcom-a-nonexist "${testcvs} watchers nonexist" '' + dotest devcom-a1 "${testcvs} watch add" '' dotest devcom-a2 "${testcvs} watchers" \ 'abb [a-z0-9]* edit unedit commit @@ -4012,22 +4090,97 @@ T abc' cd ../.. mkdir 3 cd 3 + + # Test commented out because the bug it tests for is not fixed + # The error is: + # cvs watchers: cannot open CVS/Entries for reading: No such file or directory + # cvs: ../../work/ccvs/src/fileattr.c:75: fileattr_read: Assertion `fileattr_stored_repos != ((void *)0)' failed. +: dotest devcom-t-nonexist "${testcvs} watchers nonexist" fixme + dotest devcom-t1 "${testcvs} -q co -rtag first-dir/abb" \ 'U first-dir/abb' + cd .. + rm -rf 3 # Now remove all the file attributes - cd ../2/first-dir + cd 2/first-dir dotest devcom-b0 "${testcvs} watch off" '' dotest devcom-b1 "${testcvs} watch remove" '' # Test that CVS 1.6 and earlier can handle the repository. dotest_fail devcom-b2 "test -d ${CVSROOT_DIRNAME}/first-dir/CVS" + # Now test watching just some, not all, files. + dotest devcom-some0 "${testcvs} watch on abc" '' cd ../.. + mkdir 3 + cd 3 + dotest devcom-some1 "${testcvs} -q co first-dir" 'U first-dir/abb +U first-dir/abc' + dotest devcom-some2 "test -w first-dir/abb" '' + dotest_fail devcom-some3 "test -w first-dir/abc" '' + cd .. + + if test "$keep" = yes; then + echo Keeping /tmp/cvs-sanity and exiting due to --keep + exit 0 + fi + rm -rf 1 2 3 ${CVSROOT_DIRNAME}/first-dir ;; + devcom2) + # More watch tests, most notably setting watches on + # files in various different states. + mkdir ${CVSROOT_DIRNAME}/first-dir + mkdir 1 + cd 1 + dotest devcom2-1 "${testcvs} -q co first-dir" '' + cd first-dir + + # This should probably be an error; setting a watch on a totally + # unknown file is more likely to be a typo than intentional. + # But that isn't the currently implemented behavior. + dotest devcom2-2 "${testcvs} watch on w1" '' + + touch w1 w2 w3 nw1 + dotest devcom2-3 "${testcvs} add w1 w2 w3 nw1" "${DOTSTAR}" + # Letting the user set the watch here probably can be considered + # a feature--although it leads to a few potentially strange + # consequences like one user can set the watch and another actually + # adds the file. + dotest devcom2-4 "${testcvs} watch on w2" '' + dotest devcom2-5 "${testcvs} -q ci -m add-them" "${DOTSTAR}" + + # Note that this test differs in a subtle way from devcom-some0; + # in devcom-some0 the watch is creating a new fileattr file, and + # here we are modifying an existing one. + dotest devcom2-6 "${testcvs} watch on w3" '' + + # Now test that all the watches got set on the correct files + # FIXME: CVS should have a way to report whether watches are + # set, I think. The "check it out and see if it read-only" is + # sort of OK, but is complicated by CVSREAD and doesn't help + # if the file is added and not yet committed or some such. + # Probably "cvs status" should report "watch: on" if watch is on + # (and nothing if watch is off, so existing behavior is preserved). + cd ../.. + mkdir 2 + cd 2 + dotest devcom2-7 "${testcvs} -q co first-dir" 'U first-dir/nw1 +U first-dir/w1 +U first-dir/w2 +U first-dir/w3' + dotest devcom2-8 "test -w first-dir/nw1" '' + dotest_fail devcom2-9 "test -w first-dir/w1" '' + dotest_fail devcom2-10 "test -w first-dir/w2" '' + dotest_fail devcom2-11 "test -w first-dir/w3" '' + cd .. + + rm -rf 1 2 ${CVSROOT_DIRNAME}/first-dir + ;; + ignore) - dotest 187a1 "${testcvs} -q co CVSROOT" 'U CVSROOT/modules' + dotest 187a1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}" cd CVSROOT echo rootig.c >cvsignore dotest 187a2 "${testcvs} add cvsignore" "${PROG}"' [a-z]*: scheduling file `cvsignore'"'"' for addition @@ -4089,6 +4242,8 @@ No conflicts created by this import' cd .. rm -rf dir-to-import + mkdir 1 + cd 1 dotest 189a "${testcvs} -q co second-dir" \ 'U second-dir/bar.c U second-dir/defig.o @@ -4140,25 +4295,46 @@ ${QUESTION} second-dir/notig.c" \ "${QUESTION} first-dir/.cvsignore ${QUESTION} second-dir/notig.c ${QUESTION} second-dir/.cvsignore" - dotest 191 "${testcvs} -qn update -I!" \ -"${QUESTION} first-dir/CVS -${QUESTION} first-dir/rootig.c + dotest 191 "${testcvs} -qn update -I! -I CVS" \ +"${QUESTION} first-dir/rootig.c ${QUESTION} first-dir/defig.o ${QUESTION} first-dir/envig.c ${QUESTION} first-dir/.cvsignore -${QUESTION} second-dir/CVS ${QUESTION} second-dir/.cvsignore ${QUESTION} second-dir/notig.c" \ -"${QUESTION} first-dir/CVS -${QUESTION} first-dir/rootig.c +"${QUESTION} first-dir/rootig.c ${QUESTION} first-dir/defig.o ${QUESTION} first-dir/envig.c ${QUESTION} first-dir/.cvsignore -${QUESTION} second-dir/CVS ${QUESTION} second-dir/notig.c ${QUESTION} second-dir/.cvsignore" - rm -rf first-dir second-dir + if echo yes | ${testcvs} release -d first-dir \ + >${TESTDIR}/ignore.tmp; then + pass ignore-192 + else + fail ignore-192 + fi + dotest ignore-193 "cat ${TESTDIR}/ignore.tmp" \ +"${QUESTION} \.cvsignore +You have \[0\] altered files in this repository. +Are you sure you want to release (and delete) directory .first-dir': " + + echo add a line >>second-dir/foobar.c + rm second-dir/notig.c second-dir/.cvsignore + if echo yes | ${testcvs} release -d second-dir \ + >${TESTDIR}/ignore.tmp; then + pass ignore-194 + else + fail ignore-194 + fi + dotest ignore-195 "cat ${TESTDIR}/ignore.tmp" \ +"M foobar.c +You have \[1\] altered files in this repository. +Are you sure you want to release (and delete) directory .second-dir': " + cd .. + rm -rf 1 + rm ${TESTDIR}/ignore.tmp rm -rf ${CVSROOT_DIRNAME}/first-dir ${CVSROOT_DIRNAME}/second-dir ;; @@ -4241,11 +4417,11 @@ done' cd ../../2/first-dir echo 'edits in dir 2' >binfile dotest binfiles-con1 "${testcvs} -q update" \ -'U binfile -cvs [a-z]*: binary file needs merge -cvs [a-z]*: revision 1\.3 from repository is now in binfile -cvs [a-z]*: file from working directory is now in \.#binfile\.1\.2 -C binfile' +"U binfile +${PROG} [a-z]*: binary file needs merge +${PROG} [a-z]*: revision 1\.3 from repository is now in binfile +${PROG} [a-z]*: file from working directory is now in \.#binfile\.1\.2 +C binfile" dotest binfiles-con2 "cmp binfile ../../1/binfile.dat" '' dotest binfiles-con3 "cat .#binfile.1.2" 'edits in dir 2' @@ -4337,7 +4513,7 @@ File: binfile Status: Up-to-date # Do sticky options work when used with 'cvs update'? echo "Not a binary file." > nibfile dotest binfiles-sticky1 "${testcvs} -q add nibfile" \ - 'cvs [a-z]*: use '\''cvs commit'\'' to add this file permanently' +"${PROG} [a-z]*: use "\''cvs commit'\'' to add this file permanently' dotest binfiles-sticky2 "${testcvs} -q ci -m add-it nibfile" \ 'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/nibfile,v done @@ -4407,23 +4583,27 @@ File: foo\.exe Status: Up-to-date dotest info-1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}" cd CVSROOT echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\"" > loginfo - dotest info-2 "${testcvs} add loginfo" \ + # The following cases test the format string substitution + echo "ALL echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo + echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo + echo "ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo + echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo + echo "ALL echo %sux >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo + + # Might be nice to move this to crerepos tests; it should + # work to create a loginfo file if you didn't create one + # with "cvs init". + : dotest info-2 "${testcvs} add loginfo" \ "${PROG}"' [a-z]*: scheduling file `loginfo'"'"' for addition '"${PROG}"' [a-z]*: use '"'"'cvs commit'"'"' to add this file permanently' + dotest info-3 "${testcvs} -q ci -m new-loginfo" \ -'RCS file: /tmp/cvs-sanity/cvsroot/CVSROOT/loginfo,v -done -Checking in loginfo; +'Checking in loginfo; /tmp/cvs-sanity/cvsroot/CVSROOT/loginfo,v <-- loginfo -initial revision: 1\.1 +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done '"${PROG}"' [a-z]*: Rebuilding administrative file database' cd .. - if echo "yes" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then - pass info-4 - else - fail info-4 - fi mkdir ${CVSROOT_DIRNAME}/first-dir dotest info-5 "${testcvs} -q co first-dir" '' @@ -4448,18 +4628,93 @@ done new revision: 1\.2; previous revision: 1\.1 done' cd .. - if echo "yes" | ${testcvs} release -d first-dir >>${LOGFILE} ; then - pass info-8 - else - fail info-8 - fi dotest info-9 "cat $TESTDIR/testlog" 'xenv-valueyz=[a-z0-9@][a-z0-9@]*=/tmp/cvs-sanity/cvsroot=' + dotest info-10 "cat $TESTDIR/testlog2" 'first-dir file1,NONE,1.1 +first-dir 1.1 +first-dir file1 +first-dir NONEAX +first-dir file1ux +first-dir file1,1.1,1.2 +first-dir 1.2 +first-dir file1 +first-dir 1.1AX +first-dir file1ux' - # I think this might be doable with cvs remove, or at least - # checking in a version with only comments, but I'm too lazy - # at the moment. Blow it away. - rm -f ${CVSROOT_DIRNAME}/CVSROOT/loginfo* + cd CVSROOT + echo '# do nothing' >loginfo + dotest info-11 "${testcvs} -q -s ZEE=garbage ci -m nuke-loginfo" \ +"Checking in loginfo; +/tmp/cvs-sanity/cvsroot/CVSROOT/loginfo,v <-- loginfo +new revision: 1\.[0-9]; previous revision: 1\.[0-9] +done +${PROG} [a-z]*: Rebuilding administrative file database" + + # Now test verifymsg + cat >${TESTDIR}/vscript < /dev/null; then + exit 0 +else + echo "No BugId found." + exit 1 +fi +EOF + chmod +x ${TESTDIR}/vscript + echo "^first-dir ${TESTDIR}/vscript" >>verifymsg + dotest info-v1 "${testcvs} -q ci -m add-verification" \ +"Checking in verifymsg; +/tmp/cvs-sanity/cvsroot/CVSROOT/verifymsg,v <-- verifymsg +new revision: 1\.2; previous revision: 1\.1 +done +${PROG} [a-z]*: Rebuilding administrative file database" + cd ../first-dir + echo line2 >>file1 + dotest_fail info-v2 "${testcvs} -q ci -m bogus" \ +"No BugId found\. +${PROG} \[[a-z]* aborted\]: Message verification failed" + + cat >${TESTDIR}/comment.tmp <verifymsg + dotest info-cleanup-verifymsg "${testcvs} -q ci -m nuke-verifymsg" \ +"Checking in verifymsg; +/tmp/cvs-sanity/cvsroot/CVSROOT/verifymsg,v <-- verifymsg +new revision: 1\.[0-9]; previous revision: 1\.[0-9] +done +${PROG} [a-z]*: Rebuilding administrative file database" + cd .. + + if echo "yes" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then + pass info-cleanup + else + fail info-cleanup + fi + if echo "yes" | ${testcvs} release -d first-dir >>${LOGFILE} ; then + pass info-cleanup-2 + else + fail info-cleanup-2 + fi rm -rf ${CVSROOT_DIRNAME}/first-dir ;; @@ -4527,6 +4782,11 @@ U file1' log) # Test selecting revisions with cvs log. + # See also log2 tests for more tests. + # See also rcs tests, for -d option to log. + # See also branches-14.3 for logging with a branch off of a branch. + # See also multibranch-14 for logging with several branches off the + # same branchpoint. # Check in a file with a few revisions and branches. mkdir ${CVSROOT_DIRNAME}/first-dir @@ -4746,6 +5006,280 @@ ${log_trailer}" rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir ;; + log2) + # More "cvs log" tests, for example the file description. + + # Setting the file description doesn't yet work client/server, so + # skip these tests for remote. + if test "x$remote" = xno; then + + # Check in a file + mkdir ${CVSROOT_DIRNAME}/first-dir + dotest log2-1 "${testcvs} -q co first-dir" '' + cd first-dir + echo 'first revision' > file1 + dotest log2-2 "${testcvs} add -m file1-is-for-testing file1" \ +"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition +'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to add this file permanently' + dotest log2-3 "${testcvs} -q commit -m 1" \ +'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v +done +Checking in file1; +/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 +initial revision: 1\.1 +done' + dotest log2-4 "${testcvs} log -N file1" ' +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v +Working file: file1 +head: 1\.1 +branch: +locks: strict +access list: +keyword substitution: kv +total revisions: 1; selected revisions: 1 +description: +file1-is-for-testing +---------------------------- +revision 1\.1 +date: [0-9/]* [0-9:]*; author: [a-zA-Z0-9@]*; state: Exp; +1 +=============================================================================' + + cd .. + rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir + + fi # end of tests skipped for remote + + ;; + crerepos) + # Various tests relating to creating repositories, operating + # on repositories created with old versions of CVS, etc. + + # At the moment local only but that should be changed. + if test "x$remote" = "xno"; then + + # First, if the repository doesn't exist at all... + dotest_fail crerepos-1 \ +"${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \ +"${PROG} \[[a-z]* aborted\]: /tmp/cvs-sanity/crerepos/CVSROOT: .*" + mkdir crerepos + + # The repository exists but CVSROOT doesn't. + dotest_fail crerepos-2 \ +"${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \ +"${PROG} \[[a-z]* aborted\]: /tmp/cvs-sanity/crerepos/CVSROOT: .*" + mkdir crerepos/CVSROOT + + # Checkout of nonexistent module + dotest_fail crerepos-3 \ +"${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \ +"${PROG} [a-z]*: cannot find module .cvs-sanity. - ignored" + + # Now test that CVS works correctly without a modules file + # or any of that other stuff. In particular, it *must* + # function if administrative files added to CVS recently (since + # CVS 1.3) do not exist, because the repository might have + # been created with an old version of CVS. + mkdir tmp; cd tmp + dotest crerepos-4 \ +"${testcvs} -q -d ${TESTDIR}/crerepos co CVSROOT" \ +'' + if echo yes | \ +${testcvs} -d ${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then + pass crerepos-5 + else + fail crerepos-5 + fi + rm -rf CVS + cd .. + + # The directory tmp should be empty + dotest crerepos-6 "rmdir tmp" '' + + # CVS better not create a history file--if the administrator + # doesn't need it and wants to save on disk space, they just + # delete it. + dotest_fail crerepos-7 \ +"test -f ${TESTDIR}/crerepos/CVSROOT/history" '' + + fi # end of tests to be skipped for remote + ;; + + rcs) + # Test ability to import an RCS file. Note that this format + # is fixed--files written by RCS5, and other software which + # implements this format, will be out there "forever" and + # CVS must always be able to import such files. + + # TODO: would be nice to have a corresponding test for exporting + # RCS files. Rather than try to write a rigorous check for whether + # the file CVS exports is legal, we could just write a simpler test + # for what CVS actually exports, and revise the check as needed. + + mkdir ${CVSROOT_DIRNAME}/first-dir + + # Currently the way to import an RCS file is to copy it + # directly into the repository. + # This file was written by RCS 5.7, and then the dates were + # hacked so that we test year 2000 stuff. Note also that + # "author" names are just strings, as far as importing + # RCS files is concerned--they need not correspond to user + # IDs on any particular system. + cat <${CVSROOT_DIRNAME}/first-dir/file1,v +head 1.3; +access; +symbols; +locks; strict; +comment @# @; + + +1.3 +date 2000.11.24.15.58.37; author kingdon; state Exp; +branches; +next 1.2; + +1.2 +date 96.11.24.15.57.41; author kingdon; state Exp; +branches; +next 1.1; + +1.1 +date 96.11.24.15.56.05; author kingdon; state Exp; +branches; +next ; + + +desc +@file1 is for testing CVS +@ + + +1.3 +log +@delete second line; modify twelfth line +@ +text +@This is the first line +This is the third line +This is the fourth line +This is the fifth line +This is the sixth line +This is the seventh line +This is the eighth line +This is the ninth line +This is the tenth line +This is the eleventh line +This is the twelfth line (and what a line it is) +This is the thirteenth line +@ + + +1.2 +log +@add more lines +@ +text +@a1 1 +This is the second line +d11 1 +a11 1 +This is the twelfth line +@ + + +1.1 +log +@add file1 +@ +text +@d2 12 +@ +EOF + dotest rcs-1 "${testcvs} -q co first-dir" 'U first-dir/file1' + cd first-dir + dotest rcs-2 "${testcvs} -q log" " +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v +Working file: file1 +head: 1\.3 +branch: +locks: strict +access list: +symbolic names: +keyword substitution: kv +total revisions: 3; selected revisions: 3 +description: +file1 is for testing CVS +---------------------------- +revision 1\.3 +date: 2000/11/24 15:58:37; author: kingdon; state: Exp; lines: ${PLUS}1 -2 +delete second line; modify twelfth line +---------------------------- +revision 1\.2 +date: 1996/11/24 15:57:41; author: kingdon; state: Exp; lines: ${PLUS}12 -0 +add more lines +---------------------------- +revision 1\.1 +date: 1996/11/24 15:56:05; author: kingdon; state: Exp; +add file1 +=============================================================================" + + # Note that the dates here are chosen so that (a) we test + # at least one date after 2000, (b) we will notice if the + # month and day are getting mixed up with each other. + # TODO: also test that year isn't getting mixed up with month + # or day, for example 01-02-03. + + # ISO8601 format. There are many, many, other variations + # specified by ISO8601 which we should be testing too. + dotest rcs-3 "${testcvs} -q log -d 1996-12-11<" " +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v +Working file: file1 +head: 1\.3 +branch: +locks: strict +access list: +symbolic names: +keyword substitution: kv +total revisions: 3; selected revisions: 1 +description: +file1 is for testing CVS +---------------------------- +revision 1\.3 +date: 2000/11/24 15:58:37; author: kingdon; state: Exp; lines: ${PLUS}1 -2 +delete second line; modify twelfth line +=============================================================================" + + # RFC822 format (as amended by RFC1123). + if ${testcvs} -q log -d '<3 Apr 2000 00:00' >${TESTDIR}/rcs4.tmp + then + dotest rcs-4 "cat ${TESTDIR}/rcs4.tmp" " +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v +Working file: file1 +head: 1\.3 +branch: +locks: strict +access list: +symbolic names: +keyword substitution: kv +total revisions: 3; selected revisions: 2 +description: +file1 is for testing CVS +---------------------------- +revision 1\.2 +date: 1996/11/24 15:57:41; author: kingdon; state: Exp; lines: ${PLUS}12 -0 +add more lines +---------------------------- +revision 1\.1 +date: 1996/11/24 15:56:05; author: kingdon; state: Exp; +add file1 +=============================================================================" + else + fail rcs-4 + fi + + rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/rcs4.tmp + ;; + *) echo $what is not the name of a test -- ignored ;; @@ -4758,15 +5292,16 @@ echo "OK, all tests completed." # * use "test" not "[" and see if all test's support `-z' # * Test `cvs admin'. # * Test `cvs update -d foo' (where foo does not exist). -# * Test `cvs update foo bar' (where foo and bar are both from the same -# repository). Suppose one is a branch--make sure that both directories -# get updated with the respective correct thing. +# * Test `cvs update foo bar' (where foo and bar are both from the +# same directory in the repository). Suppose one is a branch--make +# sure that both directories get updated with the respective correct +# thing. # * `cvs update ../foo'. Also ../../foo ./../foo foo/../../bar /foo/bar # foo/.././../bar foo/../bar etc. # * Test all flags in modules file. # Test that ciprog gets run both on checkin in that directory, or a # higher-level checkin which recurses into it. -# * Test that $ followed by "Header" followed by $ gets expanded on checkin. +# * More tests of keyword expansion. # * Test operations on a directory that contains other directories but has # no files of its own. # * -t global option @@ -4778,6 +5313,7 @@ echo "OK, all tests completed." # gives an appropriate error (e.g. # Cannot access /tmp/cvs-sanity/non-existent/CVSROOT # No such file or directory). +# (like basica-9, but for remote). # * Test ability to send notifications in response to watches. (currently # hard to test because CVS doesn't send notifications if username is the # same). diff --git a/gnu/usr.bin/cvs/src/server.h b/gnu/usr.bin/cvs/src/server.h index 25ce596a60d..e9c5807a53c 100644 --- a/gnu/usr.bin/cvs/src/server.h +++ b/gnu/usr.bin/cvs/src/server.h @@ -80,6 +80,11 @@ extern void server_update_entries PROTO((char *file, char *update_dir, char *repository, enum server_updated_arg4 updated)); +/* Pointer to a malloc'd string which is the directory which + the server should prepend to the pathnames which it sends + to the client. */ +extern char *server_dir; + enum progs {PROG_CHECKIN, PROG_UPDATE}; extern void server_prog PROTO((char *, char *, enum progs)); extern void server_cleanup PROTO((int sig)); @@ -135,5 +140,3 @@ struct request /* Table of requests ending with an entry with a NULL name. */ extern struct request requests[]; - -extern int use_unchanged; diff --git a/gnu/usr.bin/cvs/src/status.c b/gnu/usr.bin/cvs/src/status.c index 203e0aae84d..7254b1cfb2c 100644 --- a/gnu/usr.bin/cvs/src/status.c +++ b/gnu/usr.bin/cvs/src/status.c @@ -79,7 +79,7 @@ status (argc, argv) send_file_names (argc, argv, SEND_EXPAND_WILD); /* XXX This should only need to send file info; the file contents themselves will not be examined. */ - send_files (argc, argv, local, 0); + send_files (argc, argv, local, 0, 0); send_to_server ("status\012", 0); err = get_responses_and_close (); @@ -326,7 +326,7 @@ tag_list_proc (p, closure) buf = xmalloc (80 + strlen (p->key) + (branch ? strlen (branch) : strlen (p->data))); - sprintf (buf, "\t%-25.25s\t(%s: %s)\n", p->key, + sprintf (buf, "\t%-25s\t(%s: %s)\n", p->key, branch ? "branch" : "revision", branch ? branch : p->data); cvs_output (buf, 0); diff --git a/gnu/usr.bin/cvs/src/subr.c b/gnu/usr.bin/cvs/src/subr.c index 8ed9177b2d2..fbf184deb2e 100644 --- a/gnu/usr.bin/cvs/src/subr.c +++ b/gnu/usr.bin/cvs/src/subr.c @@ -9,6 +9,7 @@ */ #include "cvs.h" +#include "getline.h" extern char *getlogin (); @@ -316,3 +317,39 @@ make_message_rcslegal (message) return message; } + +/* Does the file FINFO contain conflict markers? The whole concept + of looking at the contents of the file to figure out whether there are + unresolved conflicts is kind of bogus (people do want to manage files + which contain those patterns not as conflict markers), but for now it + is what we do. */ +int +file_has_markers (finfo) + struct file_info *finfo; +{ + FILE *fp; + char *line = NULL; + size_t line_allocated = 0; + int result; + + result = 0; + fp = CVS_FOPEN (finfo->file, "r"); + if (fp == NULL) + error (1, errno, "cannot open %s", finfo->fullname); + while (getline (&line, &line_allocated, fp) > 0) + { + if (strncmp (line, RCS_MERGE_PAT, sizeof RCS_MERGE_PAT - 1) == 0) + { + result = 1; + goto out; + } + } + if (ferror (fp)) + error (0, errno, "cannot read %s", finfo->fullname); +out: + if (fclose (fp) < 0) + error (0, errno, "cannot close %s", finfo->fullname); + if (line != NULL) + free (line); + return result; +} diff --git a/gnu/usr.bin/cvs/src/tag.c b/gnu/usr.bin/cvs/src/tag.c index 312c8820b6c..b09979e7d00 100644 --- a/gnu/usr.bin/cvs/src/tag.c +++ b/gnu/usr.bin/cvs/src/tag.c @@ -72,7 +72,7 @@ static const char *const tag_usage[] = }; int -tag (argc, argv) +cvstag (argc, argv) int argc; char **argv; { @@ -178,7 +178,7 @@ tag (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0); + send_files (argc, argv, local, 0, 0); send_to_server ("tag\012", 0); return get_responses_and_close (); } @@ -430,7 +430,13 @@ tag_fileproc (callerdat, finfo) /* Lock the directory if it is not already locked. We can't rely on tag_dirproc because it won't handle the case where the user specifies a list of files on the command line. */ - tag_lockdir (finfo->repository); + /* We do not need to acquire a full write lock for the tag operation: + the revisions are obtained from the working directory, so we do not + require consistency across the entire repository. However, we do + need to prevent simultaneous tag operations from interfering with + each other. Therefore, we write lock each directory as we enter + it, and unlock it as we leave it. */ + lock_dir_for_write (finfo->repository); vers = Version_TS (finfo, NULL, NULL, NULL, 0, 0); @@ -481,7 +487,9 @@ tag_fileproc (callerdat, finfo) /* warm fuzzies */ if (!really_quiet) { - (void) printf ("D %s\n", finfo->fullname); + cvs_output ("D ", 2); + cvs_output (finfo->fullname, 0); + cvs_output ("\n", 1); } freevers_ts (&vers); @@ -556,12 +564,19 @@ tag_fileproc (callerdat, finfo) if (!force_tag_move) { /* we're NOT going to move the tag */ - (void) printf ("W %s", finfo->fullname); - - (void) printf (" : %s already exists on %s %s", - symtag, isbranch ? "branch" : "version", oversion); - (void) printf (" : NOT MOVING tag to %s %s\n", - branch_mode ? "branch" : "version", rev); + cvs_output ("W ", 2); + cvs_output (finfo->fullname, 0); + cvs_output (" : ", 0); + cvs_output (symtag, 0); + cvs_output (" already exists on ", 0); + cvs_output (isbranch ? "branch" : "version", 0); + cvs_output (" ", 0); + cvs_output (oversion, 0); + cvs_output (" : NOT MOVING tag to ", 0); + cvs_output (branch_mode ? "branch" : "version", 0); + cvs_output (" ", 0); + cvs_output (rev, 0); + cvs_output ("\n", 1); free (oversion); freevers_ts (&vers); return (0); @@ -581,7 +596,9 @@ tag_fileproc (callerdat, finfo) /* more warm fuzzies */ if (!really_quiet) { - (void) printf ("T %s\n", finfo->fullname); + cvs_output ("T ", 2); + cvs_output (finfo->fullname, 0); + cvs_output ("\n", 1); } if (nversion != NULL) @@ -602,7 +619,7 @@ tag_filesdoneproc (callerdat, err, repos, update_dir, entries) char *update_dir; List *entries; { - tag_unlockdir (); + Lock_Cleanup (); return (err); } @@ -624,66 +641,6 @@ tag_dirproc (callerdat, dir, repos, update_dir, entries) return (R_PROCESS); } -/* We do not need to acquire a full write lock for the tag operation: - the revisions are obtained from the working directory, so we do not - require consistency across the entire repository. However, we do - need to prevent simultaneous tag operations from interfering with - each other. Therefore, we write lock each directory as we enter - it, and unlock it as we leave it. - - In the rtag case, it would be nice to provide consistency with - respect to commits; however CVS lacks the infrastructure to do that - (see Concurrency in cvs.texinfo and comment in do_recursion). We - can and will prevent simultaneous tag operations from interfering - with each other, by write locking each directory as we enter it, - and unlocking it as we leave it. */ -static char *locked_dir; -static List *locked_list; - -/* - * Lock the directory for a tag operation. This is also called by the - * rtag code. - */ -void -tag_lockdir (repository) - char *repository; -{ - if (repository != NULL - && (locked_dir == NULL - || strcmp (locked_dir, repository) != 0)) - { - Node *node; - - if (locked_dir != NULL) - tag_unlockdir (); - - locked_dir = xstrdup (repository); - locked_list = getlist (); - node = getnode (); - node->type = LOCK; - node->key = xstrdup (repository); - (void) addnode (locked_list, node); - Writer_Lock (locked_list); - } -} - -/* - * Unlock the directory for a tag operation. This is also called by - * the rtag code. - */ -void -tag_unlockdir () -{ - if (locked_dir != NULL) - { - Lock_Cleanup (); - dellist (&locked_list); - free (locked_dir); - locked_dir = NULL; - locked_list = NULL; - } -} - /* Code relating to the val-tags file. Note that this file has no way of knowing when a tag has been deleted. The problem is that there is no way of knowing whether a tag still exists somewhere, when we @@ -846,7 +803,7 @@ Numeric tag %s contains characters other than digits and '.'", name); else { if (save_cwd (&cwd)) - exit (EXIT_FAILURE); + error_exit (); if ( CVS_CHDIR (repository) < 0) error (1, errno, "cannot change to %s directory", repository); } diff --git a/gnu/usr.bin/cvs/src/update.h b/gnu/usr.bin/cvs/src/update.h index bad6562fb02..ba713104a9c 100644 --- a/gnu/usr.bin/cvs/src/update.h +++ b/gnu/usr.bin/cvs/src/update.h @@ -8,14 +8,11 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ int do_update PROTO((int argc, char *argv[], char *xoptions, char *xtag, char *xdate, int xforce, int local, int xbuild, int xaflag, int xprune, int xpipeout, int which, char *xjoin_rev1, char *xjoin_rev2, char *preload_update_dir)); int joining PROTO((void)); +extern int isemptydir PROTO ((char *dir, int might_not_exist)); diff --git a/gnu/usr.bin/cvs/src/vers_ts.c b/gnu/usr.bin/cvs/src/vers_ts.c index 415b68785b6..d7420e7160d 100644 --- a/gnu/usr.bin/cvs/src/vers_ts.c +++ b/gnu/usr.bin/cvs/src/vers_ts.c @@ -206,39 +206,27 @@ time_stamp_server (file, vers_ts) { if (! existence_error (errno)) error (1, errno, "cannot stat temp file"); - if (use_unchanged) - { - /* Missing file means lost or unmodified; check entries - file to see which. - XXX FIXME - If there's no entries file line, we - wouldn't be getting the file at all, so consider it - lost. I don't know that that's right, but it's not - clear to me that either choice is. Besides, would we - have an RCS string in that case anyways? */ - if (vers_ts->entdata == NULL) - mark_lost (vers_ts); - else if (vers_ts->entdata->timestamp - && vers_ts->entdata->timestamp[0] == '=') - mark_unchanged (vers_ts); - else - mark_lost (vers_ts); - } - else - { - /* Missing file in the temp directory means that the file - was not modified. */ + /* Missing file means lost or unmodified; check entries + file to see which. + + XXX FIXME - If there's no entries file line, we + wouldn't be getting the file at all, so consider it + lost. I don't know that that's right, but it's not + clear to me that either choice is. Besides, would we + have an RCS string in that case anyways? */ + if (vers_ts->entdata == NULL) + mark_lost (vers_ts); + else if (vers_ts->entdata->timestamp + && vers_ts->entdata->timestamp[0] == '=') mark_unchanged (vers_ts); - } + else + mark_lost (vers_ts); } else if (sb.st_mtime == 0) { - if (use_unchanged) - /* We shouldn't reach this case any more! */ - abort (); - - /* Special code used by server.c to indicate the file was lost. */ - mark_lost (vers_ts); + /* We shouldn't reach this case any more! */ + abort (); } else { diff --git a/gnu/usr.bin/cvs/src/version.c b/gnu/usr.bin/cvs/src/version.c index d74012af9fd..26d1bd05fc0 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"; +char *version_string = "\nConcurrent Versions System (CVS) 1.9.2"; #ifdef CLIENT_SUPPORT #ifdef SERVER_SUPPORT diff --git a/gnu/usr.bin/cvs/src/watch.c b/gnu/usr.bin/cvs/src/watch.c index 80626e3d508..4fedda29c69 100644 --- a/gnu/usr.bin/cvs/src/watch.c +++ b/gnu/usr.bin/cvs/src/watch.c @@ -8,11 +8,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #include "cvs.h" #include "edit.h" @@ -340,7 +336,7 @@ watch_addremove (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0); + send_files (argc, argv, local, 0, 0); send_to_server (the_args.adding ? "watch-add\012" : "watch-remove\012", 0); @@ -357,7 +353,7 @@ watch_addremove (argc, argv) argc, argv, local, W_LOCAL, 0, 0, (char *)NULL, 1); - lock_tree_cleanup (); + Lock_Cleanup (); return err; } @@ -515,7 +511,7 @@ watchers (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0); + send_files (argc, argv, local, 0, 0); send_to_server ("watchers\012", 0); return get_responses_and_close (); } diff --git a/gnu/usr.bin/cvs/src/watch.h b/gnu/usr.bin/cvs/src/watch.h index d279c7126b5..fa34ef50f0f 100644 --- a/gnu/usr.bin/cvs/src/watch.h +++ b/gnu/usr.bin/cvs/src/watch.h @@ -8,11 +8,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ extern const char *const watch_usage[]; diff --git a/gnu/usr.bin/cvs/src/wrapper.c b/gnu/usr.bin/cvs/src/wrapper.c index 580b8d3488f..324f7cc7904 100644 --- a/gnu/usr.bin/cvs/src/wrapper.c +++ b/gnu/usr.bin/cvs/src/wrapper.c @@ -377,7 +377,9 @@ wrap_name_has (name,has) return (0); } -WrapperEntry * +static WrapperEntry *wrap_matching_entry PROTO ((const char *)); + +static WrapperEntry * wrap_matching_entry (name) const char *name; { diff --git a/gnu/usr.bin/cvs/tools/ChangeLog b/gnu/usr.bin/cvs/tools/ChangeLog index ce046436b13..407c053d6b2 100644 --- a/gnu/usr.bin/cvs/tools/ChangeLog +++ b/gnu/usr.bin/cvs/tools/ChangeLog @@ -1,3 +1,12 @@ +Wed Jan 8 14:50:47 1997 Jim Kingdon + + * Makefile.in: Remove CVSid; we decided to get rid + of these some time ago. + +Thu Jan 2 13:30:56 1997 Jim Kingdon + + * Makefile.in: Remove "675" paragraph; see ../ChangeLog for rationale. + Fri Aug 16 16:05:56 1996 Norbert Kiesel * Makefile.in (installdirs): new (empty) target diff --git a/gnu/usr.bin/cvs/tools/Makefile.in b/gnu/usr.bin/cvs/tools/Makefile.in index d47d44c4e32..3a39bc310d9 100644 --- a/gnu/usr.bin/cvs/tools/Makefile.in +++ b/gnu/usr.bin/cvs/tools/Makefile.in @@ -12,12 +12,6 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -# $CVSid: @(#)Makefile.in 1.6 94/10/22 $ - SHELL = /bin/sh srcdir = @srcdir@ diff --git a/gnu/usr.bin/cvs/tools/pcl-cvs/ChangeLog b/gnu/usr.bin/cvs/tools/pcl-cvs/ChangeLog index 20877271f30..a9e6f47830a 100644 --- a/gnu/usr.bin/cvs/tools/pcl-cvs/ChangeLog +++ b/gnu/usr.bin/cvs/tools/pcl-cvs/ChangeLog @@ -1,3 +1,13 @@ +Mon Oct 14 19:19:17 1996 Jim Blandy + + * pcl-cvs.el (cvs-parse-stderr): Ignore messages about patch hunks + failing; CVS will refetch the file. + +Thu Oct 10 10:20:20 1996 Jim Blandy + + * Makefile.in: Allow pcl-cvs to find the site-lisp directory where + it is installed in modern Emacsen. (Patch thanks to David Kågedal.) + Wed Sep 25 05:38:09 1996 Jim Blandy * pcl-cvs.el (cvs-find-program): New function. diff --git a/gnu/usr.bin/cvs/tools/pcl-cvs/Makefile.in b/gnu/usr.bin/cvs/tools/pcl-cvs/Makefile.in index 62784c35bbf..f2387587218 100644 --- a/gnu/usr.bin/cvs/tools/pcl-cvs/Makefile.in +++ b/gnu/usr.bin/cvs/tools/pcl-cvs/Makefile.in @@ -4,7 +4,7 @@ # #ident "@(#)original: dist-makefile,v 1.19 1993/05/31 22:43:45 ceder Exp " # -#ident "@(#)elisp/pcl-cvs:$Name: $:$Id: Makefile.in,v 1.1.1.1 1996/05/06 22:20:47 tholo Exp $" +#ident "@(#)elisp/pcl-cvs:$Name: $:$Id: Makefile.in,v 1.1.1.2 1997/02/21 06:38:25 tholo Exp $" # # Makefile for pcl-cvs release 1.05-CVS-$Name: $. # Copyright (C) 1992, 1993 Per Cederqvist @@ -35,7 +35,7 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ # Where to put the system-wide supplementary files -libdir = $(prefix)/lib +sharedir = $(prefix)/share # Where to put the Info files infodir = $(prefix)/info @@ -49,7 +49,7 @@ EMACS = emacs BATCHFLAGS = -batch # This is the directory in which the ELCFILES will be installed. -lispdir = $(libdir)/emacs/site-lisp +lispdir = $(sharedir)/emacs/site-lisp #### End of system configuration section. #### diff --git a/gnu/usr.bin/cvs/tools/pcl-cvs/pcl-cvs.el b/gnu/usr.bin/cvs/tools/pcl-cvs/pcl-cvs.el index b632948ed5e..50dd33144d4 100644 --- a/gnu/usr.bin/cvs/tools/pcl-cvs/pcl-cvs.el +++ b/gnu/usr.bin/cvs/tools/pcl-cvs/pcl-cvs.el @@ -1,7 +1,7 @@ ;;; ;;;#ident "@(#)OrigId: pcl-cvs.el,v 1.93 1993/05/31 22:44:00 ceder Exp " ;;; -;;;#ident "@(#)cvs/contrib/pcl-cvs:$Name: $:$Id: pcl-cvs.el,v 1.1.1.2 1996/10/18 03:36:26 tholo Exp $" +;;;#ident "@(#)cvs/contrib/pcl-cvs:$Name: $:$Id: pcl-cvs.el,v 1.1.1.3 1997/02/21 06:38:27 tholo Exp $" ;;; ;;; pcl-cvs.el -- A Front-end to CVS 1.3 or later. ;;; Release 1.05-CVS-$Name: $. @@ -1014,7 +1014,7 @@ ERR-BUF should be 'STDOUT or 'STDERR." (insert "Pcl-cvs Version: " "@(#)OrigId: pcl-cvs.el,v 1.93 1993/05/31 22:44:00 ceder Exp\n") (insert "CVS Version: " - "@(#)cvs/contrib/pcl-cvs:$Name: $:$Id: pcl-cvs.el,v 1.1.1.2 1996/10/18 03:36:26 tholo Exp $\n\n") + "@(#)cvs/contrib/pcl-cvs:$Name: $:$Id: pcl-cvs.el,v 1.1.1.3 1997/02/21 06:38:27 tholo Exp $\n\n") (insert (format "--- Contents of stdout buffer (%d chars) ---\n" (length stdout))) (insert stdout) @@ -1176,6 +1176,11 @@ This function returns the last cons-cell in the list that is built." "^cvs \\(update\\|server\\): warning: .* was lost$") (forward-line 1)) + ;; Patch failed; CVS will refetch the file. Ignored. + ((looking-at + "^[0-9]+ out of [0-9]+ hunks failed--saving rejects to .*$") + (forward-line 1)) + ;; File unknown for some reason. ;; FIXME: is it really a good idea to add this as unknown here? diff --git a/gnu/usr.bin/cvs/vms/ChangeLog b/gnu/usr.bin/cvs/vms/ChangeLog index 1b172206585..bd4239d81ff 100644 --- a/gnu/usr.bin/cvs/vms/ChangeLog +++ b/gnu/usr.bin/cvs/vms/ChangeLog @@ -1,3 +1,31 @@ +Thu Jan 2 13:30:56 1997 Jim Kingdon + + * dir.h, filesubr.c, filutils.c, filutils.h, misc.c, misc.h, + ndir.c, pipe.c, pipe.h, waitpid.c: Remove "675" paragraph; + see ../ChangeLog for rationale. + +Wed Jan 1 22:50:44 1997 Jim Kingdon + + * options.h: Reword comment for TMPDIR_DFLT to make it clear that + this isn't specific to the pserver server. + +Tue Nov 19 17:13:55 1996 Jim Kingdon + + * ndir.c (opendir): Change strip_path to strip_trailing_slashes + per corresponding change to src. + * stat.c (wrapped_stat): Likewise. + +Sat Oct 12 19:36:42 1996 Jim Kingdon + + * vms.h: Don't declare/define mode_t and rmdir; they conflict with + declarations in system include files on VAX/VMS 6.2. + * pwd.h: #include sys/types.h instead of trying to define uid_t, + gid_t and pid_t ourselves. + +Tue Oct 8 12:37:45 1996 Ian Lance Taylor + + * options.h: Remove; no longer used. + Wed Sep 25 15:09:53 1996 Jim Kingdon * options.h: Define TMPDIR_DFLT to sys$scratch not sys$login. diff --git a/gnu/usr.bin/cvs/vms/dir.h b/gnu/usr.bin/cvs/vms/dir.h index 7ea632db625..b1fdb0e2def 100644 --- a/gnu/usr.bin/cvs/vms/dir.h +++ b/gnu/usr.bin/cvs/vms/dir.h @@ -11,11 +11,7 @@ any later version. GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +GNU General Public License for more details. */ /* * Files-11 Ver. 2 directory structure (VMS V4.x - long names) diff --git a/gnu/usr.bin/cvs/vms/filesubr.c b/gnu/usr.bin/cvs/vms/filesubr.c index 99c0af163c3..1c0e6246d4e 100644 --- a/gnu/usr.bin/cvs/vms/filesubr.c +++ b/gnu/usr.bin/cvs/vms/filesubr.c @@ -14,11 +14,7 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #include "cvs.h" diff --git a/gnu/usr.bin/cvs/vms/filutils.c b/gnu/usr.bin/cvs/vms/filutils.c index 748a677ad84..3c4947303ea 100644 --- a/gnu/usr.bin/cvs/vms/filutils.c +++ b/gnu/usr.bin/cvs/vms/filutils.c @@ -15,10 +15,6 @@ * 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 GNU VMSLIB; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/gnu/usr.bin/cvs/vms/filutils.h b/gnu/usr.bin/cvs/vms/filutils.h index 6605353049f..1c484e839fa 100644 --- a/gnu/usr.bin/cvs/vms/filutils.h +++ b/gnu/usr.bin/cvs/vms/filutils.h @@ -15,10 +15,6 @@ * 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 GNU VMSLIB; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ char *file_name_as_directory (); diff --git a/gnu/usr.bin/cvs/vms/misc.c b/gnu/usr.bin/cvs/vms/misc.c index 78bb27378f3..82e9c70c423 100644 --- a/gnu/usr.bin/cvs/vms/misc.c +++ b/gnu/usr.bin/cvs/vms/misc.c @@ -15,10 +15,6 @@ * 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 GNU VMSLIB; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* diff --git a/gnu/usr.bin/cvs/vms/misc.h b/gnu/usr.bin/cvs/vms/misc.h index 0494b16698e..35a48ccc154 100644 --- a/gnu/usr.bin/cvs/vms/misc.h +++ b/gnu/usr.bin/cvs/vms/misc.h @@ -15,10 +15,6 @@ * 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 GNU VMSLIB; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ void fatal (); diff --git a/gnu/usr.bin/cvs/vms/ndir.c b/gnu/usr.bin/cvs/vms/ndir.c index 87fb0cb070a..a9758eae1dd 100644 --- a/gnu/usr.bin/cvs/vms/ndir.c +++ b/gnu/usr.bin/cvs/vms/ndir.c @@ -15,10 +15,6 @@ * 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 GNU VMSLIB; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include @@ -109,7 +105,7 @@ opendir (infilename, filepattern) filename = (char *) malloc(length+1); strcpy(filename, infilename); - strip_path(filename); + strip_trailing_slashes (filename); if(strcmp(filename, ".") == 0) { getcwd(filename, length+1, 1); /* Get a VMS filespec */ diff --git a/gnu/usr.bin/cvs/vms/options.h b/gnu/usr.bin/cvs/vms/options.h index 92a03426ad4..264bfe146b5 100644 --- a/gnu/usr.bin/cvs/vms/options.h +++ b/gnu/usr.bin/cvs/vms/options.h @@ -27,20 +27,6 @@ #define HAVE_RCS5 #endif -/* - * If, before installing this version of CVS, you were running RCS V4 AND you - * are installing this CVS and RCS V5 and GNU diff 1.15 all at the same time, - * you should turn on the following define. It only exists to try to do - * reasonable things with your existing checked out files when you upgrade to - * RCS V5, since the keyword expansion formats have changed with RCS V5. - * - * If you already have been running with RCS5, or haven't been running with CVS - * yet at all, or are sticking with RCS V4 for now, leave the commented out. - */ -#ifndef HAD_RCS4 -/* #define HAD_RCS4 */ -#endif - /* * For portability and heterogeneity reasons, CVS is shipped by default using * my own text-file version of the ndbm database library in the src/myndbm.c @@ -117,13 +103,10 @@ #define RCSBIN_DFLT "" #endif -/* - * The password-authenticating server creates a temporary checkout of - * the affected files. The variable TMPDIR_DFLT (or even better, the - * command-line option "-T" in the line for CVS in /etc/inetd.conf) - * can be used to specify the used directory. This directory will - * also be used for other temporary files. - */ +/* Directory used for storing temporary files, if not overridden by + environment variables or the -T global option. There should be little + need to change this (-T is a better mechanism if you need to use a + different directory for temporary files). */ #ifndef TMPDIR_DFLT #define TMPDIR_DFLT "sys$scratch" #endif diff --git a/gnu/usr.bin/cvs/vms/pipe.c b/gnu/usr.bin/cvs/vms/pipe.c index d6078df8e0e..eae384791bb 100644 --- a/gnu/usr.bin/cvs/vms/pipe.c +++ b/gnu/usr.bin/cvs/vms/pipe.c @@ -15,10 +15,6 @@ * 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 GNU VMSLIB; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* diff --git a/gnu/usr.bin/cvs/vms/pipe.h b/gnu/usr.bin/cvs/vms/pipe.h index 6a88c1d716d..3b6b8f27218 100644 --- a/gnu/usr.bin/cvs/vms/pipe.h +++ b/gnu/usr.bin/cvs/vms/pipe.h @@ -15,10 +15,6 @@ * 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 GNU VMSLIB; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include diff --git a/gnu/usr.bin/cvs/vms/pwd.h b/gnu/usr.bin/cvs/vms/pwd.h index da0ed334a4c..3ca5dbce872 100644 --- a/gnu/usr.bin/cvs/vms/pwd.h +++ b/gnu/usr.bin/cvs/vms/pwd.h @@ -1,9 +1,7 @@ #ifndef _PWD_H #define _PWD_H -#define uid_t unsigned int -#define gid_t unsigned int -#define pid_t int +#include struct passwd { char *pw_name; diff --git a/gnu/usr.bin/cvs/vms/stat.c b/gnu/usr.bin/cvs/vms/stat.c index 336247fb73f..af3b5acc3af 100644 --- a/gnu/usr.bin/cvs/vms/stat.c +++ b/gnu/usr.bin/cvs/vms/stat.c @@ -10,7 +10,7 @@ struct stat *buffer; int rs; strcpy(statpath, path); - strip_path(statpath); + strip_trailing_slashes (statpath); if(strcmp(statpath, ".") == 0) getwd(statpath); diff --git a/gnu/usr.bin/cvs/vms/vms.h b/gnu/usr.bin/cvs/vms/vms.h index 7483c4748a6..9cd0b509eb7 100644 --- a/gnu/usr.bin/cvs/vms/vms.h +++ b/gnu/usr.bin/cvs/vms/vms.h @@ -1,7 +1,5 @@ /* Determined from CC RTL function prototypes in online documentation */ -#define mode_t unsigned int - #define fork(x) vfork(x) #include @@ -24,8 +22,6 @@ extern int fnmatch(char *pattern, char *string, int options); int unlink(char *path); int link(char *from, char *to); -int rmdir(char *path); - #define stat(a, b) wrapped_stat(a, b) #undef POSIX diff --git a/gnu/usr.bin/cvs/vms/waitpid.c b/gnu/usr.bin/cvs/vms/waitpid.c index 95d27b3eb31..36f20d52553 100644 --- a/gnu/usr.bin/cvs/vms/waitpid.c +++ b/gnu/usr.bin/cvs/vms/waitpid.c @@ -11,11 +11,7 @@ any later version. GNU DIFF 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 GNU DIFF; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +GNU General Public License for more details. */ #include "vms.h" diff --git a/gnu/usr.bin/cvs/windows-NT/ChangeLog b/gnu/usr.bin/cvs/windows-NT/ChangeLog index 9589a96dab7..c902c92c76f 100644 --- a/gnu/usr.bin/cvs/windows-NT/ChangeLog +++ b/gnu/usr.bin/cvs/windows-NT/ChangeLog @@ -1,3 +1,67 @@ +1997-01-08 Jim Kingdon + + * filesubr.c (expand_wild): If we just find a file (that + is, without expanding a wildcard), return the file name + as specified rather than as it exists in the filesystem. + +Thu Jan 2 13:30:56 1997 Jim Kingdon + + * filesubr.c, ndir.c, ndir.h, pwd.c, pwd.h, run.c, stripslash.c: + Remove "675" paragraph; see ../ChangeLog for rationale. + +Wed Jan 1 22:51:01 1997 Jim Kingdon + + * options.h: Reword comment for TMPDIR_DFLT to make it clear that + this isn't specific to the pserver server. + +Tue Dec 31 14:17:38 1996 Jim Kingdon + + * README: Remove another mention of grep; CVS no longer uses it. + +Tue Dec 31 11:01:29 1996 Noel Cragg + + * README: Add note that the various support utilities can also be + found at the Cyclic FTP site; things move around on the net. + +Tue Dec 31 12:33:29 1996 Jim Kingdon + + * README: Add note about lack of need for rsh. I don't know if + this is the best place to talk about this, but many people get + confused by it. + +Sat Nov 30 15:33:22 1996 Jim Kingdon + + * README: Grep is no longer required. Specify when gzip is required. + +Tue Nov 19 17:19:35 1996 Jim Kingdon + + * Makefile.in (SOURCES): Remove strippath.c. + * strippath.c: Removed. + +Sun Nov 10 22:54:04 1996 Paul Sanders + and Jim Kingdon + + * run.c (run_popen): Save and restore file descriptors. + +Fri Oct 18 16:54:00 1996 Tony Brusseau + and Jim Kingdon + + * strippath.c (strip_path): Leave leading "\\" unmolested for UNC. + +Thu Oct 17 10:57:06 1996 Jim Kingdon + + * README: Clarify who it is who needs to be able to mount the + repository. + +Mon Oct 14 08:30:38 1996 Jim Kingdon + + * README: Remove item about markso Win95 web site now that it is + merged in. Mention Win95 at beginning. + +Tue Oct 8 12:37:54 1996 Ian Lance Taylor + + * options.h (HAD_RCS4): Remove; no longer used. + Wed Sep 25 14:31:51 1996 Jim Kingdon * options.h (TMPDIR_DFLT): Change from c:\temp to c:\\temp. diff --git a/gnu/usr.bin/cvs/windows-NT/Makefile.in b/gnu/usr.bin/cvs/windows-NT/Makefile.in index 2fd0d3a9197..76d7760c59f 100644 --- a/gnu/usr.bin/cvs/windows-NT/Makefile.in +++ b/gnu/usr.bin/cvs/windows-NT/Makefile.in @@ -27,7 +27,6 @@ SOURCES = \ rcmd.c \ run.c \ startserver.c \ - strippath.c \ stripslash.c \ waitpid.c \ win32.c diff --git a/gnu/usr.bin/cvs/windows-NT/README b/gnu/usr.bin/cvs/windows-NT/README index 057320e0bb7..b86a28601d4 100644 --- a/gnu/usr.bin/cvs/windows-NT/README +++ b/gnu/usr.bin/cvs/windows-NT/README @@ -3,10 +3,12 @@ Cyclic Software Check the ../INSTALL file for information on the most recent version -of CVS which has been known to be tested with NT. +of CVS which has been known to be tested with NT and/or Win95. This port implements the full set of CVS commands, both local and -client. It does not provide a CVS server for NT. +client. It does not provide a CVS server for NT. Multiple users can +access a common CVS repository, if they can mount the repository, +either directly or via a networked file system. We don't distribute a .ZIP source distribution partly because, as far as I can tell, PKZIP insists on munging long file names, which would @@ -28,11 +30,14 @@ limitation in the NT command shell. sanity.sh provides pretty minimal feature coverage, but still gives me some confidence it isn't totally broken. -To operate in client mode, you will need GNU patch. gzip is useful -but not required. +To operate in client mode, you will need GNU patch. To do compressed +transfers with old versions of CVS (1.8 and older), you also need +gzip. Note that you do NOT need an rsh client if you are using the +:server: access method (which uses the internal rsh client), except +perhaps for debugging. -To operate in local mode, you will need GNU patch, GNU diffutils, a -version of grep, and rcs version 5.7 installed on your system. Make +To operate in local mode, you will need GNU patch, GNU diffutils, +and rcs version 5.7 installed on your system. Make sure NOT to get a version of rcs less than 5.7 (gr564bnt.zip was particularly bad), because those versions insist on putting their files in their own directory structure, making them incompatible with @@ -41,13 +46,14 @@ CVS. Noel Cragg, who did the latest mods to the Windows NT port, used the following packages: - ftp://wuarchive.wustl.edu/systems/ibmpc/gnuish/grep15.zip - ** use grepb.exe and egrepb.exe, but install as - ** grep.exe and egrep.exe respectively) ftp://wuarchive.wustl.edu/systems/ibmpc/gnuish/patch212.zip ftp://ftp.netcom.com/pub/al/alexande/rcs57nt.zip ftp://ftp.netcom.com/pub/al/alexande/diff57nt.zip +Copies of these zip files can be also be found at: + + ftp://ftp.cyclic.com/pub/cvs/cvs-1.8.3/windows-nt + If you want to try other versions of these utilities, you might have luck with the Congruent ports of these packages to Windows NT, binary and source: @@ -66,11 +72,6 @@ you're modifying CVS itself: ftp://ftp.digex.net/pub/access/schueman/cvs/cvsnt14b.zip -Mark A. Solinski has ported CVS 1.7 to Windows -95. You can find his source code at: - - http://www.mcs.net/~markso/cvs/cvs95.html - Here are some other things which may be of interest for unix junkies: http://www.halcyon.com/gvr/vim/ (VI clone) diff --git a/gnu/usr.bin/cvs/windows-NT/filesubr.c b/gnu/usr.bin/cvs/windows-NT/filesubr.c index 926e06799d5..7ab5814d0f5 100644 --- a/gnu/usr.bin/cvs/windows-NT/filesubr.c +++ b/gnu/usr.bin/cvs/windows-NT/filesubr.c @@ -11,11 +11,7 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ /* These functions were moved out of subr.c because they need different definitions under operating systems (like, say, Windows NT) with different @@ -956,7 +952,16 @@ expand_wild (argc, argv, pargc, pargv) /* Copy the file name. */ - strcat (new_argv[new_argc], fdata.cFileName); + if (fncmp (argv[i] + dirname_length, fdata.cFileName) == 0) + /* We didn't expand a wildcard; we just matched a filename. + Use the file name as specified rather than the filename + which exists in the directory (they may differ in case). + This is needed to make cvs add on a directory consistently + use the name specified on the command line, but it is + probably a good idea in other contexts too. */ + strcpy (new_argv[new_argc], argv[i]); + else + strcat (new_argv[new_argc], fdata.cFileName); new_argc++; diff --git a/gnu/usr.bin/cvs/windows-NT/ndir.c b/gnu/usr.bin/cvs/windows-NT/ndir.c index 40866f51d98..afaf00c3ce8 100644 --- a/gnu/usr.bin/cvs/windows-NT/ndir.c +++ b/gnu/usr.bin/cvs/windows-NT/ndir.c @@ -11,11 +11,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Header: /home/cvs/src/gnu/usr.bin/cvs/windows-NT/ndir.c,v 1.1.1.1 1995/12/19 09:21:44 deraadt Exp $ + $Header: /home/cvs/src/gnu/usr.bin/cvs/windows-NT/ndir.c,v 1.1.1.2 1997/02/21 06:38:34 tholo Exp $ */ /* Everything non trivial in this code is from: @(#)msd_dir.c 1.4 diff --git a/gnu/usr.bin/cvs/windows-NT/ndir.h b/gnu/usr.bin/cvs/windows-NT/ndir.h index f5be88634c2..4eea8276c3f 100644 --- a/gnu/usr.bin/cvs/windows-NT/ndir.h +++ b/gnu/usr.bin/cvs/windows-NT/ndir.h @@ -11,11 +11,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Header: /home/cvs/src/gnu/usr.bin/cvs/windows-NT/ndir.h,v 1.1.1.2 1996/01/30 00:19:27 tholo Exp $ + $Header: /home/cvs/src/gnu/usr.bin/cvs/windows-NT/ndir.h,v 1.1.1.3 1997/02/21 06:38:30 tholo Exp $ */ /* Everything non trivial in this code is taken from: @(#)msd_dir.c 1.4 diff --git a/gnu/usr.bin/cvs/windows-NT/options.h b/gnu/usr.bin/cvs/windows-NT/options.h index 793a8a06c96..b9bba3ffc3a 100644 --- a/gnu/usr.bin/cvs/windows-NT/options.h +++ b/gnu/usr.bin/cvs/windows-NT/options.h @@ -27,20 +27,6 @@ #define HAVE_RCS5 #endif -/* - * If, before installing this version of CVS, you were running RCS V4 AND you - * are installing this CVS and RCS V5 and GNU diff 1.15 all at the same time, - * you should turn on the following define. It only exists to try to do - * reasonable things with your existing checked out files when you upgrade to - * RCS V5, since the keyword expansion formats have changed with RCS V5. - * - * If you already have been running with RCS5, or haven't been running with CVS - * yet at all, or are sticking with RCS V4 for now, leave the commented out. - */ -#ifndef HAD_RCS4 -/* #define HAD_RCS4 */ -#endif - /* * For portability and heterogeneity reasons, CVS is shipped by default using * my own text-file version of the ndbm database library in the src/myndbm.c @@ -118,13 +104,10 @@ #define RCSBIN_DFLT "" #endif -/* - * The password-authenticating server creates a temporary checkout of - * the affected files. The variable TMPDIR_DFLT (or even better, the - * command-line option "-T" in the line for CVS in /etc/inetd.conf) - * can be used to specify the used directory. This directory will - * also be used for other temporary files. - */ +/* Directory used for storing temporary files, if not overridden by + environment variables or the -T global option. There should be little + need to change this (-T is a better mechanism if you need to use a + different directory for temporary files). */ #ifndef TMPDIR_DFLT #define TMPDIR_DFLT "c:\\temp" #endif diff --git a/gnu/usr.bin/cvs/windows-NT/pwd.c b/gnu/usr.bin/cvs/windows-NT/pwd.c index 32459b204e5..fdde6594239 100644 --- a/gnu/usr.bin/cvs/windows-NT/pwd.c +++ b/gnu/usr.bin/cvs/windows-NT/pwd.c @@ -11,11 +11,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Header: /home/cvs/src/gnu/usr.bin/cvs/windows-NT/pwd.c,v 1.1.1.1 1995/12/19 09:21:44 deraadt Exp $ + $Header: /home/cvs/src/gnu/usr.bin/cvs/windows-NT/pwd.c,v 1.1.1.2 1997/02/21 06:38:34 tholo Exp $ */ /* This 'implementation' is conjectured from the use of this functions in diff --git a/gnu/usr.bin/cvs/windows-NT/pwd.h b/gnu/usr.bin/cvs/windows-NT/pwd.h index ecd890daa63..d5c485abf26 100644 --- a/gnu/usr.bin/cvs/windows-NT/pwd.h +++ b/gnu/usr.bin/cvs/windows-NT/pwd.h @@ -11,11 +11,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Header: /home/cvs/src/gnu/usr.bin/cvs/windows-NT/pwd.h,v 1.1.1.1 1995/12/19 09:21:44 deraadt Exp $ + $Header: /home/cvs/src/gnu/usr.bin/cvs/windows-NT/pwd.h,v 1.1.1.2 1997/02/21 06:38:31 tholo Exp $ */ /* This 'implementation' is conjectured from the use of this functions in diff --git a/gnu/usr.bin/cvs/windows-NT/run.c b/gnu/usr.bin/cvs/windows-NT/run.c index e0b01466af2..d3e20865c26 100644 --- a/gnu/usr.bin/cvs/windows-NT/run.c +++ b/gnu/usr.bin/cvs/windows-NT/run.c @@ -10,11 +10,7 @@ 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, 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #include "cvs.h" @@ -392,7 +388,22 @@ run_popen (cmd, mode) double quotes. */ { char *requoted = requote (cmd); + /* Save and restore our file descriptors to work around + apparent bugs in _popen. We are perhaps better off using + the win32 functions instead of _popen. */ + int old_stdin = dup (STDIN_FILENO); + int old_stdout = dup (STDOUT_FILENO); + int old_stderr = dup (STDERR_FILENO); + FILE *result = popen (requoted, mode); + + dup2 (old_stdin, STDIN_FILENO); + dup2 (old_stdout, STDOUT_FILENO); + dup2 (old_stderr, STDERR_FILENO); + close (old_stdin); + close (old_stdout); + close (old_stderr); + free (requoted); return result; } diff --git a/gnu/usr.bin/cvs/windows-NT/stripslash.c b/gnu/usr.bin/cvs/windows-NT/stripslash.c index 629dad9393d..a68763d5733 100644 --- a/gnu/usr.bin/cvs/windows-NT/stripslash.c +++ b/gnu/usr.bin/cvs/windows-NT/stripslash.c @@ -9,11 +9,7 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + GNU General Public License for more details. */ #include diff --git a/gnu/usr.bin/cvs/zlib/ChangeLog b/gnu/usr.bin/cvs/zlib/ChangeLog index 0db0b1a8f09..7ffad45dceb 100644 --- a/gnu/usr.bin/cvs/zlib/ChangeLog +++ b/gnu/usr.bin/cvs/zlib/ChangeLog @@ -1,3 +1,11 @@ +1997-01-01 Fred Fish + + * Makefile.in (CC): Use @CC@ rather than hard coded "cc". + (CFLAGS): Use @CFLAGS@ rather than hard coded "-O". + (LDFLAGS): Use @LDFLAGS@ rather than hard coded "-L. -lz". + (prefix): Use @prefix@ rather than hard coded "/usr/local". + (example, minigzip): Use $(LIBS) when linking. + Wed Sep 11 00:59:44 1996 Jim Kingdon * build_zlib.com: Add infblock.c and infcodes.c. diff --git a/gnu/usr.bin/cvs/zlib/Makefile.in b/gnu/usr.bin/cvs/zlib/Makefile.in index 7b585adad35..0296a9c4fec 100644 --- a/gnu/usr.bin/cvs/zlib/Makefile.in +++ b/gnu/usr.bin/cvs/zlib/Makefile.in @@ -15,15 +15,15 @@ VPATH = @srcdir@ # To install in $HOME instead of /usr/local, use: # make install prefix=$HOME -CC=cc +CC=@CC@ -CFLAGS=-O +CFLAGS=@CFLAGS@ #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 #CFLAGS=-g -DDEBUG #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ # -Wstrict-prototypes -Wmissing-prototypes -LDFLAGS=-L. -lz +LDFLAGS=@LDFLAGS@ LDSHARED=$(CC) VER=1.0.4 @@ -34,7 +34,7 @@ AR=ar RANLIB=ranlib TAR=tar -prefix=/usr/local +prefix=@prefix@ exec_prefix = $(prefix) OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ @@ -64,10 +64,10 @@ libz.so.$(VER): $(OBJS) rm -f libz.so; ln -s $@ libz.so example: example.o $(LIBS) - $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) $(LIBS) minigzip: minigzip.o $(LIBS) - $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) + $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) $(LIBS) # For CVS, remove the install and uninstall targets. install: -- 2.20.1