summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/cvs/src
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>1997-02-21 06:36:04 +0000
committertholo <tholo@openbsd.org>1997-02-21 06:36:04 +0000
commit461cc63e7458ce60db55037c1a7656349538b52f (patch)
treefc5e0cad6904025fae8f8b820707d62a173a1188 /gnu/usr.bin/cvs/src
parentdo not pass up un-init vftype (diff)
downloadwireguard-openbsd-461cc63e7458ce60db55037c1a7656349538b52f.tar.xz
wireguard-openbsd-461cc63e7458ce60db55037c1a7656349538b52f.zip
New release from Cyclic Software
Diffstat (limited to 'gnu/usr.bin/cvs/src')
-rw-r--r--gnu/usr.bin/cvs/src/ChangeLog3929
-rw-r--r--gnu/usr.bin/cvs/src/ChangeLog-964434
-rw-r--r--gnu/usr.bin/cvs/src/Makefile.in9
-rw-r--r--gnu/usr.bin/cvs/src/add.c121
-rw-r--r--gnu/usr.bin/cvs/src/admin.c2
-rw-r--r--gnu/usr.bin/cvs/src/buffer.h12
-rw-r--r--gnu/usr.bin/cvs/src/checkin.c6
-rw-r--r--gnu/usr.bin/cvs/src/classify.c9
-rw-r--r--gnu/usr.bin/cvs/src/client.c451
-rw-r--r--gnu/usr.bin/cvs/src/client.h17
-rw-r--r--gnu/usr.bin/cvs/src/create_adm.c13
-rw-r--r--gnu/usr.bin/cvs/src/cvsbug.sh6
-rw-r--r--gnu/usr.bin/cvs/src/diff.c90
-rw-r--r--gnu/usr.bin/cvs/src/edit.c14
-rw-r--r--gnu/usr.bin/cvs/src/edit.h6
-rw-r--r--gnu/usr.bin/cvs/src/entries.c17
-rw-r--r--gnu/usr.bin/cvs/src/error.c47
-rw-r--r--gnu/usr.bin/cvs/src/error.h20
-rw-r--r--gnu/usr.bin/cvs/src/fileattr.c11
-rw-r--r--gnu/usr.bin/cvs/src/fileattr.h6
-rw-r--r--gnu/usr.bin/cvs/src/filesubr.c87
-rw-r--r--gnu/usr.bin/cvs/src/find_names.c22
-rw-r--r--gnu/usr.bin/cvs/src/hash.c79
-rw-r--r--gnu/usr.bin/cvs/src/hash.h2
-rw-r--r--gnu/usr.bin/cvs/src/history.c81
-rw-r--r--gnu/usr.bin/cvs/src/import.c5
-rw-r--r--gnu/usr.bin/cvs/src/log.c23
-rw-r--r--gnu/usr.bin/cvs/src/login.c155
-rw-r--r--gnu/usr.bin/cvs/src/logmsg.c367
-rw-r--r--gnu/usr.bin/cvs/src/mkmodules.c117
-rw-r--r--gnu/usr.bin/cvs/src/modules.c136
-rw-r--r--gnu/usr.bin/cvs/src/myndbm.c2
-rw-r--r--gnu/usr.bin/cvs/src/myndbm.h2
-rw-r--r--gnu/usr.bin/cvs/src/options.h.in67
-rw-r--r--gnu/usr.bin/cvs/src/rcs.c49
-rw-r--r--gnu/usr.bin/cvs/src/rcs.h7
-rw-r--r--gnu/usr.bin/cvs/src/recurse.c13
-rw-r--r--gnu/usr.bin/cvs/src/release.c314
-rw-r--r--gnu/usr.bin/cvs/src/remove.c2
-rw-r--r--gnu/usr.bin/cvs/src/repos.c10
-rw-r--r--gnu/usr.bin/cvs/src/root.c40
-rw-r--r--gnu/usr.bin/cvs/src/rtag.c12
-rw-r--r--gnu/usr.bin/cvs/src/run.c44
-rw-r--r--gnu/usr.bin/cvs/src/sanity.sh964
-rw-r--r--gnu/usr.bin/cvs/src/server.h7
-rw-r--r--gnu/usr.bin/cvs/src/status.c4
-rw-r--r--gnu/usr.bin/cvs/src/subr.c37
-rw-r--r--gnu/usr.bin/cvs/src/tag.c103
-rw-r--r--gnu/usr.bin/cvs/src/update.h7
-rw-r--r--gnu/usr.bin/cvs/src/vers_ts.c44
-rw-r--r--gnu/usr.bin/cvs/src/version.c2
-rw-r--r--gnu/usr.bin/cvs/src/watch.c12
-rw-r--r--gnu/usr.bin/cvs/src/watch.h6
-rw-r--r--gnu/usr.bin/cvs/src/wrapper.c4
54 files changed, 6947 insertions, 5099 deletions
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 <kingdon@harvey.cyclic.com>
+Thu Jan 16 00:06:00 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
- * 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 <nk@col.sw-ley.de>
+Wed Jan 15 09:14:38 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
- * 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 <jimb@floss.cyclic.com>
+Mon Jan 13 11:04:32 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
- 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 <ian@cygnus.com>
+ * 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 <nk@col.sw-ley.de>
- * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * add.c (add): Reindent a portion which needed it.
+
+1997-01-08 Jim Kingdon
-Tue Oct 1 00:32:55 1996 Jim Blandy <jimb@floss.cyclic.com>
+ * 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 <kingdon@harvey.cyclic.com>
- * 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 <jimb@floss.cyclic.com>
+Tue Jan 7 12:56:10 1997 Karl Fogel <kfogel@ynu38.ynu.edu.cn>
- * 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 <woods@most.weird.com>
+ * 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 <ian@cygnus.com>
- * 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 <kingdon@harvey.cyclic.com>
- * 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 <kingdon@harvey.cyclic.com>
-Mon Sep 30 17:00:20 1996 Ian Lance Taylor <ian@cygnus.com>
+ * 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 <kingdon@harvey.cyclic.com>
+Thu Jan 2 09:06:20 1997 Karl Fogel <kfogel@ynu38.ynu.edu.cn>
- * 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 <woods@most.weird.com>
+Wed Jan 1 19:50:38 1997 Jim Kingdon <kingdon@harvey.cyclic.com>
- * 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 <fnf@ninemoons.com>
- * 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 <kingdon@harvey.cyclic.com>
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <noel@kiva.rain.org>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <larry.jones@sdrc.com>
-
- * Makefile.in (cvsbug): Add dependency on version.c.
-
-Wed Sep 25 09:01:48 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * filesubr.c (get_homedir), update.c (update): Reindent.
-
-Wed Sep 25 04:44:54 1996 Jim Blandy <jimb@totoro.cyclic.com>
-
- * version.c (version_string): Bump to 1.8.86.
-
-Wed Sep 25 05:17:50 1996 Jim Blandy <jimb@floss.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * options.h.in: Fixed some typos in the comments and reindented
- them.
-
-Sat Sep 21 02:33:26 1996 Jim Blandy <jimb@totoro.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <assar@pdc.kth.se>
-
- * login.c (login): Print usage if argc < 0.
-
-Tue Sep 17 00:09:44 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * server.c (server_cleanup): Add comment about ignoring errors
- from unlink_file_dir.
-
-Mon Sep 16 10:31:48 1996 Norbert Kiesel <nk@col.sw-ley.de>
-
- * main.c: Add support for -T <tmpdir> 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 <tmpdir> 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 <kingdon@cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <renz@conware.de>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <markso@mcs.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <jimb@totoro.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * sanity.sh (newb): New test newb-123j0 tests for another "cvs
- status" case.
-
-Sun Sep 8 15:20:37 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * main.c (struct cmd): Add comment concerning recognizing unique
- abbreviations.
-
-Fri Sep 6 22:31:52 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * rcs.c (RCS_checkout): Fix indentation.
-
-Fri Sep 6 11:48:08 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <assert.h>.
- (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 <kingdon@harvey.cyclic.com>
-
- * version.c: Increment version number to 1.8.8.
-
- * Version 1.8.7.
-
-Wed Sep 4 1996 Jim Kingdon <kingdon@cyclic.com>
-
- * 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 <hoffman@albirio.crd.ge.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * remove.c (cvsremove): fix remove -f for client/server
-
-Fri Aug 23 11:28:27 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * server.c (switch_to_user): use #ifdef SETXID_SUPPORT instead of
- #if SETXID_SUPPORT
-
-Thu Aug 22 14:18:43 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * 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 <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * server.c: Include <sys/socket.h> 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 <nk@col.sw-ley.de>
-
- * 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 <nk@col.sw-ley.de>
-
- * 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 <woods@most.weird.com>
-
- * history.c (history): apply fix posted by Steven Meyer
- <steve@blacksmith.com> 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 <ian@cygnus.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * main.c: add synonym "ann" for "annotate" again
-
-Sun Aug 11 17:54:11 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * rcs.h (RCS_RLOG): Removed; no longer used.
-
-Fri Aug 9 20:16:20 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * main.c (cmd): Add comment regarding synonyms.
-
-Thu Aug 8 14:40:10 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * main.c: Remove synonyms for "cvs annotate". Synonyms create
- user confusion.
-
-Thu Aug 8 10:24:04 1996 Norbert Kiesel <nk@col.sw-ley.de>
-
- * main.c: Revert (undocumented) change to rename the cvs history
- alias "his" to "hist"
-
-Wed Aug 7 18:26:25 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * 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 <ian@cygnus.com>
-
- 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 <ian@cygnus.com>
-
- 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 <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- 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 <ian@cygnus.com>
-
- * log.c (cvslog): Correct position of CLIENT_SUPPORT #endif.
-
-Thu Jul 25 12:06:45 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * server.c (krb_encrypt_buffer_output): Fix typo in comment
- (krb_recv_auth -> krb_recvauth).
-
-Wed Jul 24 09:28:33 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * lock.c (set_lock): Adjust comment regarding why we call stat.
-
-Wed Jul 24 15:06:08 1996 Ian Lance Taylor <ian@cygnus.com>
-
- 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <mike@twinpeaks.prc.com>
-
- * 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 <mike@twinpeaks.prc.com>
-
- * repos.c: Fixed recent patch which added plain fopen rather than
- CVS_FOPEN
-
-Mon Jul 22 22:25:53 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <bbum@friday.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * checkout.c (checkout): Remove extraneous else accidentally
- inserted in last checkin.
-
-Tue Jul 16 11:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <immel@radix.net>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@cyclic.com>
-
- * 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 <eichin@cygnus.com>
- and Ian Lance Taylor <ian@cygnus.com>
-
- 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 <kingdon@harvey.cyclic.com>
-
- * 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 <woods@most.weird.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@cyclic.com>
-
- * client.c (start_server): Open logfiles in binary, not text, mode.
-
-Wed Jul 10 19:24:22 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * main.c (main): Print a warning for rlog command.
-
-Wed Jul 10 15:00:55 1996 Ian Lance Taylor <ian@cygnus.com>
-
- 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 <assert.h>. Don't include <fcntl.h>.
- (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 <kingdon@harvey.cyclic.com>
-
- * commit.c (find_fileproc): Add comments describing a few cases
- that we aren't handling.
-
-Tue Jul 9 04:33:03 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * modules.c (do_module): Call cvs_outerr rather than fprintf.
-
-Mon Jul 8 1996 Jim Kingdon <kingdon@cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * version.c: Increment version number to 1.8.6.
-
-Wed Jul 3 22:31:16 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * version.c: Version 1.8.5.
-
-Wed Jul 3 21:51:23 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- 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 <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * sanity.sh (TMPPWD): Set to real name of /tmp directory.
- (basic2-64, conflicts-126.5): Use ${TMPPWD}.
-
-Mon Jun 17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * rcscmds.c (RCS_checkout): Remove noerr parameter. Change all
- callers.
- * rcs.c (RCS_fast_checkout): Likewise.
-
-Mon Jun 17 1996 Ian Lance Taylor <ian@cygnus.com>
-
- 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 <mike@twinpeaks.prc.com>
-
- * 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 <ian@cygnus.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * sanity.sh (basica-9): Update to reflect change to "sufficient
- access" message.
-
-Thu Jun 13 20:13:55 1996 Ian Lance Taylor <ian@cygnus.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * client.c (supported_request): Reindent.
-
-Thu Jun 13 1996 Mark H. Wilkinson <mhw@minster.york.ac.uk>
-
- * options.h.in, mkmodules.c: Corrections to allow compilation of
- non-client-server version.
-
-Thu Jun 13 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * commit.c (remove_file): Pass noerr as 0 to RCS_checkout.
-
-Thu Jun 13 12:55:56 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * patch.c: Initialize rev1_validated and rev2_validated to 0, not 1.
-
-Thu Jun 13 12:55:56 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- 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 <mws115@llcoolj.dayton.saic.com>
-
- * sanity.sh: Allow digits in usernames.
-
-Wed Jun 12 16:23:03 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * client.c (send_modified, update_entries): Reindent and add
- comments to BROKEN_READWRITE_CONVERSION code.
-
-Wed Jun 12 16:23:03 1996 Mike Ladwig <mike@twinpeaks.prc.com>
-
- * client.c (send_modified, update_entries): Add
- BROKEN_READWRITE_CONVERSION code.
-
-Mon Jun 10 20:03:16 1996 J.T. Conklin <jtc@cygnus.com>
-
- * 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 <ian@cygnus.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * main.c (main): Ignore CVS/Root file when doing an import.
-
-Fri Jun 7 18:20:01 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- * rcs.c (annotate_fileproc): Skip unrelated branch deltas.
-
-Fri Jun 7 13:04:01 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <mike@twinpeaks.prc.com>
-
- * import.c (add_rcs_file): make buf char[] not unsigned char[]
-
-Wed Jun 05 10:07:29 1996 Mike Ladwig <mike@twinpeaks.prc.com>
- and Jim Kingdon <kingdon@cyclic.com>
-
- * 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 <mike@twinpeaks.prc.com>
- and Jim Kingdon <kingdon@cyclic.com>
-
- * main.c (main): Don't mess with signals if DONT_USE_SIGNALS is
- defined.
-
-Thu Jun 6 15:32:41 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <mike@twinpeaks.prc.com>
-
- * error.c: Don't declare strerror if it is #defined.
-
-Wed Jun 05 10:07:29 1996 Mike Ladwig <mike@twinpeaks.prc.com>
- and Jim Kingdon <kingdon@cyclic.com>
-
- * cvs.h: If ENUMS_CAN_BE_TROUBLE, typedef Dtype to int not an enum.
-
-Wed Jun 05 10:07:29 1996 Mike Ladwig <mike@twinpeaks.prc.com>
- and Jim Kingdon <kingdon@cyclic.com>
-
- * 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 <mike@twinpeaks.prc.com>
-
- * client.c (read_line): Changed an occurence of '\n' to '\012'.
-
-Wed Jun 5 17:18:46 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * sanity.sh: When doing a remote check, use :server: in CVSROOT.
-
-Wed Jun 5 13:32:40 1996 Larry Jones <larry.jones@sdrc.com>
- and Jim Kingdon <kingdon@cyclic.com>
-
- * 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 <kingdon@cyclic.com>
-
- 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * version.c: Increment version number to 1.8.4.
-
-Mon Jun 3 02:20:30 1996 Noel Cragg <noel@gargle.rain.org>
-
- * version.c: version 1.8.3.
-
-Thu May 30 10:07:24 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <noel@BOAT_ANCHOR>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <woods@most.weird.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <woods@most.weird.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * client.c (process_prune_candidates): Set prune_candidates to
- NULL at the end of the function.
-
-Mon May 23 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <immel@centerline.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * sanity.sh (death): Test for above fix, in test 89 and new test 89a.
-
-Tue May 21 09:49:04 1996 Greg A. Woods <woods@most.weird.com>
-
- * update.c (update_usage): oops -- fix my spelling typo.
-
-Mon May 20 10:53:14 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <woods@most.weird.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * main.c (cmd_usage): Add "init" command.
-
-Thu May 16 16:45:51 1996 Noel Cragg <noel@gargle.rain.org>
-
- * 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 <noel@BOAT_ANCHOR>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * sanity.sh (deep): New tests deep-4a* test for Ian's fix to
- update_dirleave_proc.
-
-Sat May 16 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * main.c (main_cleanup): Report signal name before dying.
-
-Wed May 15 23:47:59 1996 Noel Cragg <noel@gargle.rain.org>
-
- * main.c (usg): revert usage strings for `-H' flag change.
-
-Sat May 15 1996 Ian Lance Taylor <ian@cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@cyclic.com>
-
- * logmsg.c (do_editor): If user aborts the commit, still remove the
- temporary file.
-
-Tue May 14 11:45:41 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ian@cygnus.com>
-
- * rcs.c (RCS_fast_checkout): If workfile is NULL, don't call chmod.
-
-Mon May 13 10:52:10 1996 Greg A. Woods <woods@most.weird.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * main.c (main): -d now overrides CVS/Root.
-
-Thu May 9 19:45:24 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <woods@most.weird.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <woods@most.weird.com>
-
- * sanity.sh (test): - convert all '[' to test ala GCD
-
-Wed May 8 13:46:56 1996 Greg A. Woods <woods@most.weird.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * rcs.c (rcsvers_delproc): fix memory leak by freeing author
- field.
-
-Mon May 6 10:40:05 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <benjamin@cyclic.com>
-
- * Version 1.8.1
-
-Sun May 5 21:39:02 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <benjamin@cyclic.com>
-
- Integrated changes submitted by Ian Taylor <ian@cygnus.com>
-
- * 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 <ian@cygnus.com>
-
- 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 <ian@cygnus.com>
-
- * 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 <benjamin@cyclic.com>
-
- * Version 1.7.88
-
-Thu May 2 01:40:55 1996 Benjamin J. Lee <benjamin@cyclic.com>
-
- * 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 <noel@BOAT_ANCHOR>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * sanity.sh (basica): When testing rejection of reserved tag name,
- use BASE instead of RESERVED.
-
-Wed May 1 15:15:11 1996 Tom Jarmolowski <tjj@booklink.com>
-
- * rcs.c (linevector_delete): Only copy up to vec->nlines - nlines,
- not to vec->nlines.
-
-Wed May 1 15:43:21 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <tjj@booklink.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <noel@gargle>
-
- * 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 <noel@gargle>
-
- * 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 <noel@occs.cs.oberlin.edu>
-
- * server.c: moved kerberos #includes from main.c for the
- kserver_authenticate_connection routine.
-
-Fri Apr 26 07:59:44 1996 Noel Cragg <noel@gargle>
-
- * 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 <noel@gargle>
-
- * 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 <nk@col.sw-ley.de>
-
- * vers_ts.c (Version_TS): xmalloc enough space (1 more
- byte). Thanks to purify!
-
-Mon Apr 22 00:38:08 1996 Noel Cragg <noel@gargle>
-
- * 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 <benjamin@cyclic.com>
-
- * Version 1.7.86
-
-Thu Apr 18 1996 Jim Kingdon <kingdon@cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * repos.c (Name_Repository): Fix comments.
- * create_adm.c (Create_Admin): Fix indentation.
-
-Wed Apr 10 16:46:54 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <sam@inf.enst.fr>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * rcs.c (annotate_fileproc): allow last line of add-chunk not to
- be newline terminated
-
-Thu Mar 28 10:56:36 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- 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 <nk@col.sw-ley.de>
-
- * server.h: fix prototype of server_pause_check (was
- server_check_pause)
-
-Thu Mar 14 1996 Jim Kingdon <kingdon@cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kfogel@floss.red-bean.com>
-
- * options.h.in (AUTH_CLIENT_SUPPORT): turn on by default.
-
-Wed Mar 13 09:25:56 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <sam@inf.enst.fr>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <woods@most.weird.com>
-
- * 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 <woods@most.weird.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <sam@inf.enst.fr>
-
- * tag.c (check_fileproc): Check for file existence before trying
- to tag it.
-
-Fri Mar 1 07:51:29 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * client.c (update_entries): If command is export, set options to
- NULL.
-
-Thu Feb 29 16:54:14 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <sam@inf.enst.fr>
-
- * 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 <jtc@rtl.cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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) <nk@col.sw-ley.de>
-
- * 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) <nk@col.sw-ley.de>
-
- * 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) <nk@col.sw-ley.de>
-
- * 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 <benjamin@cyclic.com>
-
- * run.c (run_exec): Added VMS return status support.
-
-Thu Feb 29 01:07:43 1996 Benjamin J. Lee <benjamin@cyclic.com>
-
- * 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 <benjamin@cyclic.com>
-
- * 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 <benjamin@cyclic.com>
-
- * 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 <benjamin@cyclic.com>
-
- * 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 <benjamin@cyclic.com>
-
- * 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 <benjamin@cyclic.com>
-
- * ignore.c: Added the patterns *.olb *.exe _$* *$ to default
- ignore list for VMS.
-
-Wed Feb 28 13:32:28 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * logmsg.c (do_editor): Fix indentation.
-
-Wed Feb 28 12:56:49 1996 Benjamin J. Lee <benjamin@cyclic.com>
-
- * logmsg.c (do_editor): If no editor is defined, exit and print
- a message.
-
-Wed Feb 28 10:40:25 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * vers_ts.c (time_stamp, time_stamp_server): Reindent and revise
- comments.
-
-Tue Feb 27 23:57:55 1996 Benjamin J. Lee <benjamin@cyclic.com>
-
- * 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 <jtc@rtl.cygnus.com>
-
- 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 <kingdon@harvey.cyclic.com>
-
- * Version 1.7.3.
-
- * Version 1.7.2.
-
-Mon Feb 26 1996 Jim Kingdon <kingdon@cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * checkout.c (safe_location): Re-indent one line.
-
-Sat Feb 24 10:50:42 1996 Karl Fogel <kfogel@floss.red-bean.com>
-
- * 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 <marcus@sayre.sysc.pdx.edu>
- via Karl Fogel <kfogel@floss.red-bean.com>
-
- * 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 <kfogel@floss.red-bean.com>
-
- * 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 <kingdon@cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * cvs.h: Remove alloca cruft.
-
-Wed Feb 21 07:30:16 1996 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <garyo@avs.com>
- and Jim Kingdon <kingdon@cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- 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 <kfogel@floss.red-bean.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * main.c (usg): Add -s option.
-
-Tue Feb 13 20:26:06 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * 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 <benjamin@cyclic.com>
-
- * 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 <benjamin@cyclic.com>
-
- * 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 <benjamin@cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@peary.cyclic.com>
-
- * 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 <jtc@rtl.cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <jtc@rtl.cygnus.com>
-
- * tag.c, rtag.c: Update various comments to reflect function name
- changes.
-
-Thu Feb 1 14:14:31 1996 Karl Fogel <kfogel@floss.red-bean.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <jtc@rtl.cygnus.com>
-
- * edit.c (ncheck_fileproc): Fix memory leak; free line before
- returning.
-
-Tue Jan 30 18:06:12 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <vdemarco@bou.shl.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <jtc@rtl.cygnus.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * main.c (main): Add change to run getopt_long twice again.
-
-Mon Jan 29 15:59:31 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- gcc -Wall lint:
- * client.c: Include edit.h
-
-Sun Jan 28 09:45:53 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <kfogel@floss.red-bean.com>
-
- * 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 <kfogel@floss.red-bean.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * Version 1.7.1.
-
- * Version 1.7.
-
-Sat Jan 20 00:05:08 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * Version 1.6.87.
-
-Mon Jan 15 18:14:55 1996 Gary Oberbrunner <garyo@avs.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <nk@col.sw-ley.de>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * Version 1.6.86.
-
-Thu Jan 11 23:28:05 1996 J.T. Conklin <jtc@rtl.cygnus.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <kfogel@floss.red-bean.com>
-
- * scramble.c (descramble): deal with DIAGNOSTIC better.
-
-Thu Jan 11 12:04:42 1996 Norbert Kiesel <nk@col.sw-ley.de>
-
- * main.c: remove CVS_NOADMIN.
-
- * options.h.in: remove CVS_NOADMIN
-
-Thu Jan 11 10:28:44 1996 Karl Fogel <kfogel@floss.red-bean.com>
-
- * scramble.c (descramble): make sure the string returned is safe
- to free().
-
-Wed Jan 10 01:11:23 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kfogel@floss.red-bean.com>
-
- * expand_path.c: fix comments (explain expand_path()'s behavior
- correctly).
-
-Tue Jan 9 09:41:29 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <kfogel@floss.red-bean.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * ignore.c (ign_default): Add *.obj.
-
- * server.c: Put /* */ around #endif comment.
-
-Mon Jan 8 20:37:17 1996 Karl Fogel <kfogel@floss.red-bean.com>
-
- * client.c (connect_to_pserver): check return value of recv().
-
-Mon Jan 8 11:37:57 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@peary.cyclic.com>
-
- * release.c (release_delete): Call unlink_file_dir rather
- than "rm -rf".
-
-Thu Jan 4 09:58:30 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ben@gonzo.ben.algroup.co.uk>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * client.c (start_server): dup the file descriptor before
- fdopening it.
-
-Wed Jan 3 18:25:25 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <ptran@autodesk.com>
-
- * 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 <immel@centerline.com>
- and Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@harvey.cyclic.com>
-
- * 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 <kingdon@peary.cyclic.com>
-
- Visual C++ lint:
- * myndbm.c: Prototype write_item.
-
-Tue Jan 2 11:25:22 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- 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 <kingdon@harvey.cyclic.com>
-
- * 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 <feldman@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <feldman@cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <jimb@floss.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <srcdir>/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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ 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 <eggert@twinsun.com>
+
+ * rcs.c (RCS_deltas): Fix unintended trigraphs.
+
+Fri Nov 15 13:06:03 1996 Tom Hageman <tom@basil.icce.rug.nl>
+
+ * 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 <p.sanders@dial.pipex.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <noel@gargle.rain.org>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <jimb@totoro.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <wilson@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <noel@gargle.rain.org>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ 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 <jrs@world.std.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <mmitchell@usa.net>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <brusseau@jprc.com>).
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <mike_sutton@dayton.saic.com>
+
+ * checkout.c, history.c: added logging/reporting of cvs export
+ command
+
+Wed Oct 16 10:16:57 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (deep): Add comment about whether the deep-4b behavior
+ is considered desirable.
+
+Sat Oct 12 20:36:36 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <jimb@totoro.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * options.h.in (HAD_RCS4): Remove; no longer used.
+
+Sun Oct 6 15:58:11 1996 Noel Cragg <noel@gargle.rain.org>
+
+ * 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 <peter@spinner.dialix.com>
+
+ * logmsg.c (do_editor): Do not use editinfo if running on the client.
+
+Fri Oct 4 15:11:46 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * client.c (send_repository): initialize some variables before
+ first usage
+
+Tue Oct 1 13:01:24 1996 Jim Blandy <jimb@floss.cyclic.com>
+
+ 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 <ian@cygnus.com>
+
+ 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 <jimb@floss.cyclic.com>
+
+ * 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 <jimb@floss.cyclic.com>
+
+ * 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 <woods@most.weird.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <woods@most.weird.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <noel@kiva.rain.org>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <larry.jones@sdrc.com>
+
+ * Makefile.in (cvsbug): Add dependency on version.c.
+
+Wed Sep 25 09:01:48 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * filesubr.c (get_homedir), update.c (update): Reindent.
+
+Wed Sep 25 04:44:54 1996 Jim Blandy <jimb@totoro.cyclic.com>
+
+ * version.c (version_string): Bump to 1.8.86.
+
+Wed Sep 25 05:17:50 1996 Jim Blandy <jimb@floss.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * options.h.in: Fixed some typos in the comments and reindented
+ them.
+
+Sat Sep 21 02:33:26 1996 Jim Blandy <jimb@totoro.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <assar@pdc.kth.se>
+
+ * login.c (login): Print usage if argc < 0.
+
+Tue Sep 17 00:09:44 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * server.c (server_cleanup): Add comment about ignoring errors
+ from unlink_file_dir.
+
+Mon Sep 16 10:31:48 1996 Norbert Kiesel <nk@col.sw-ley.de>
+
+ * main.c: Add support for -T <tmpdir> 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 <tmpdir> 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 <kingdon@cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <renz@conware.de>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <markso@mcs.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <jimb@totoro.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (newb): New test newb-123j0 tests for another "cvs
+ status" case.
+
+Sun Sep 8 15:20:37 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * main.c (struct cmd): Add comment concerning recognizing unique
+ abbreviations.
+
+Fri Sep 6 22:31:52 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * rcs.c (RCS_checkout): Fix indentation.
+
+Fri Sep 6 11:48:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <assert.h>.
+ (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 <kingdon@harvey.cyclic.com>
+
+ * version.c: Increment version number to 1.8.8.
+
+ * Version 1.8.7.
+
+Wed Sep 4 1996 Jim Kingdon <kingdon@cyclic.com>
+
+ * 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 <hoffman@albirio.crd.ge.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * remove.c (cvsremove): fix remove -f for client/server
+
+Fri Aug 23 11:28:27 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * server.c (switch_to_user): use #ifdef SETXID_SUPPORT instead of
+ #if SETXID_SUPPORT
+
+Thu Aug 22 14:18:43 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * server.c: Include <sys/socket.h> 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 <nk@col.sw-ley.de>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * 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 <woods@most.weird.com>
+
+ * history.c (history): apply fix posted by Steven Meyer
+ <steve@blacksmith.com> 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 <ian@cygnus.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * main.c: add synonym "ann" for "annotate" again
+
+Sun Aug 11 17:54:11 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * rcs.h (RCS_RLOG): Removed; no longer used.
+
+Fri Aug 9 20:16:20 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * main.c (cmd): Add comment regarding synonyms.
+
+Thu Aug 8 14:40:10 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * main.c: Remove synonyms for "cvs annotate". Synonyms create
+ user confusion.
+
+Thu Aug 8 10:24:04 1996 Norbert Kiesel <nk@col.sw-ley.de>
+
+ * main.c: Revert (undocumented) change to rename the cvs history
+ alias "his" to "hist"
+
+Wed Aug 7 18:26:25 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * 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 <ian@cygnus.com>
+
+ 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 <ian@cygnus.com>
+
+ 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 <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ 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 <ian@cygnus.com>
+
+ * log.c (cvslog): Correct position of CLIENT_SUPPORT #endif.
+
+Thu Jul 25 12:06:45 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * server.c (krb_encrypt_buffer_output): Fix typo in comment
+ (krb_recv_auth -> krb_recvauth).
+
+Wed Jul 24 09:28:33 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * lock.c (set_lock): Adjust comment regarding why we call stat.
+
+Wed Jul 24 15:06:08 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <mike@twinpeaks.prc.com>
+
+ * 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 <mike@twinpeaks.prc.com>
+
+ * repos.c: Fixed recent patch which added plain fopen rather than
+ CVS_FOPEN
+
+Mon Jul 22 22:25:53 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <bbum@friday.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * checkout.c (checkout): Remove extraneous else accidentally
+ inserted in last checkin.
+
+Tue Jul 16 11:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <immel@radix.net>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@cyclic.com>
+
+ * 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 <eichin@cygnus.com>
+ and Ian Lance Taylor <ian@cygnus.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <woods@most.weird.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@cyclic.com>
+
+ * client.c (start_server): Open logfiles in binary, not text, mode.
+
+Wed Jul 10 19:24:22 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * main.c (main): Print a warning for rlog command.
+
+Wed Jul 10 15:00:55 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ 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 <assert.h>. Don't include <fcntl.h>.
+ (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 <kingdon@harvey.cyclic.com>
+
+ * commit.c (find_fileproc): Add comments describing a few cases
+ that we aren't handling.
+
+Tue Jul 9 04:33:03 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * modules.c (do_module): Call cvs_outerr rather than fprintf.
+
+Mon Jul 8 1996 Jim Kingdon <kingdon@cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * version.c: Increment version number to 1.8.6.
+
+Wed Jul 3 22:31:16 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * version.c: Version 1.8.5.
+
+Wed Jul 3 21:51:23 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ 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 <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (TMPPWD): Set to real name of /tmp directory.
+ (basic2-64, conflicts-126.5): Use ${TMPPWD}.
+
+Mon Jun 17 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * rcscmds.c (RCS_checkout): Remove noerr parameter. Change all
+ callers.
+ * rcs.c (RCS_fast_checkout): Likewise.
+
+Mon Jun 17 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ 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 <mike@twinpeaks.prc.com>
+
+ * 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 <ian@cygnus.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (basica-9): Update to reflect change to "sufficient
+ access" message.
+
+Thu Jun 13 20:13:55 1996 Ian Lance Taylor <ian@cygnus.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * client.c (supported_request): Reindent.
+
+Thu Jun 13 1996 Mark H. Wilkinson <mhw@minster.york.ac.uk>
+
+ * options.h.in, mkmodules.c: Corrections to allow compilation of
+ non-client-server version.
+
+Thu Jun 13 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * commit.c (remove_file): Pass noerr as 0 to RCS_checkout.
+
+Thu Jun 13 12:55:56 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * patch.c: Initialize rev1_validated and rev2_validated to 0, not 1.
+
+Thu Jun 13 12:55:56 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ 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 <mws115@llcoolj.dayton.saic.com>
+
+ * sanity.sh: Allow digits in usernames.
+
+Wed Jun 12 16:23:03 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * client.c (send_modified, update_entries): Reindent and add
+ comments to BROKEN_READWRITE_CONVERSION code.
+
+Wed Jun 12 16:23:03 1996 Mike Ladwig <mike@twinpeaks.prc.com>
+
+ * client.c (send_modified, update_entries): Add
+ BROKEN_READWRITE_CONVERSION code.
+
+Mon Jun 10 20:03:16 1996 J.T. Conklin <jtc@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * main.c (main): Ignore CVS/Root file when doing an import.
+
+Fri Jun 7 18:20:01 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ * rcs.c (annotate_fileproc): Skip unrelated branch deltas.
+
+Fri Jun 7 13:04:01 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <mike@twinpeaks.prc.com>
+
+ * import.c (add_rcs_file): make buf char[] not unsigned char[]
+
+Wed Jun 05 10:07:29 1996 Mike Ladwig <mike@twinpeaks.prc.com>
+ and Jim Kingdon <kingdon@cyclic.com>
+
+ * 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 <mike@twinpeaks.prc.com>
+ and Jim Kingdon <kingdon@cyclic.com>
+
+ * main.c (main): Don't mess with signals if DONT_USE_SIGNALS is
+ defined.
+
+Thu Jun 6 15:32:41 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <mike@twinpeaks.prc.com>
+
+ * error.c: Don't declare strerror if it is #defined.
+
+Wed Jun 05 10:07:29 1996 Mike Ladwig <mike@twinpeaks.prc.com>
+ and Jim Kingdon <kingdon@cyclic.com>
+
+ * cvs.h: If ENUMS_CAN_BE_TROUBLE, typedef Dtype to int not an enum.
+
+Wed Jun 05 10:07:29 1996 Mike Ladwig <mike@twinpeaks.prc.com>
+ and Jim Kingdon <kingdon@cyclic.com>
+
+ * 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 <mike@twinpeaks.prc.com>
+
+ * client.c (read_line): Changed an occurence of '\n' to '\012'.
+
+Wed Jun 5 17:18:46 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * sanity.sh: When doing a remote check, use :server: in CVSROOT.
+
+Wed Jun 5 13:32:40 1996 Larry Jones <larry.jones@sdrc.com>
+ and Jim Kingdon <kingdon@cyclic.com>
+
+ * 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 <kingdon@cyclic.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * version.c: Increment version number to 1.8.4.
+
+Mon Jun 3 02:20:30 1996 Noel Cragg <noel@gargle.rain.org>
+
+ * version.c: version 1.8.3.
+
+Thu May 30 10:07:24 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <noel@BOAT_ANCHOR>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <woods@most.weird.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <woods@most.weird.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * client.c (process_prune_candidates): Set prune_candidates to
+ NULL at the end of the function.
+
+Mon May 23 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <immel@centerline.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (death): Test for above fix, in test 89 and new test 89a.
+
+Tue May 21 09:49:04 1996 Greg A. Woods <woods@most.weird.com>
+
+ * update.c (update_usage): oops -- fix my spelling typo.
+
+Mon May 20 10:53:14 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <woods@most.weird.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * main.c (cmd_usage): Add "init" command.
+
+Thu May 16 16:45:51 1996 Noel Cragg <noel@gargle.rain.org>
+
+ * 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 <noel@BOAT_ANCHOR>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (deep): New tests deep-4a* test for Ian's fix to
+ update_dirleave_proc.
+
+Sat May 16 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * main.c (main_cleanup): Report signal name before dying.
+
+Wed May 15 23:47:59 1996 Noel Cragg <noel@gargle.rain.org>
+
+ * main.c (usg): revert usage strings for `-H' flag change.
+
+Sat May 15 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@cyclic.com>
+
+ * logmsg.c (do_editor): If user aborts the commit, still remove the
+ temporary file.
+
+Tue May 14 11:45:41 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ian@cygnus.com>
+
+ * rcs.c (RCS_fast_checkout): If workfile is NULL, don't call chmod.
+
+Mon May 13 10:52:10 1996 Greg A. Woods <woods@most.weird.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * main.c (main): -d now overrides CVS/Root.
+
+Thu May 9 19:45:24 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <woods@most.weird.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <woods@most.weird.com>
+
+ * sanity.sh (test): - convert all '[' to test ala GCD
+
+Wed May 8 13:46:56 1996 Greg A. Woods <woods@most.weird.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * rcs.c (rcsvers_delproc): fix memory leak by freeing author
+ field.
+
+Mon May 6 10:40:05 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <benjamin@cyclic.com>
+
+ * Version 1.8.1
+
+Sun May 5 21:39:02 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <benjamin@cyclic.com>
+
+ Integrated changes submitted by Ian Taylor <ian@cygnus.com>
+
+ * 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 <ian@cygnus.com>
+
+ 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 <ian@cygnus.com>
+
+ * 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 <benjamin@cyclic.com>
+
+ * Version 1.7.88
+
+Thu May 2 01:40:55 1996 Benjamin J. Lee <benjamin@cyclic.com>
+
+ * 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 <noel@BOAT_ANCHOR>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * sanity.sh (basica): When testing rejection of reserved tag name,
+ use BASE instead of RESERVED.
+
+Wed May 1 15:15:11 1996 Tom Jarmolowski <tjj@booklink.com>
+
+ * rcs.c (linevector_delete): Only copy up to vec->nlines - nlines,
+ not to vec->nlines.
+
+Wed May 1 15:43:21 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <tjj@booklink.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <noel@gargle>
+
+ * 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 <noel@gargle>
+
+ * 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 <noel@occs.cs.oberlin.edu>
+
+ * server.c: moved kerberos #includes from main.c for the
+ kserver_authenticate_connection routine.
+
+Fri Apr 26 07:59:44 1996 Noel Cragg <noel@gargle>
+
+ * 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 <noel@gargle>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * vers_ts.c (Version_TS): xmalloc enough space (1 more
+ byte). Thanks to purify!
+
+Mon Apr 22 00:38:08 1996 Noel Cragg <noel@gargle>
+
+ * 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 <benjamin@cyclic.com>
+
+ * Version 1.7.86
+
+Thu Apr 18 1996 Jim Kingdon <kingdon@cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * repos.c (Name_Repository): Fix comments.
+ * create_adm.c (Create_Admin): Fix indentation.
+
+Wed Apr 10 16:46:54 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <sam@inf.enst.fr>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * rcs.c (annotate_fileproc): allow last line of add-chunk not to
+ be newline terminated
+
+Thu Mar 28 10:56:36 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ 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 <nk@col.sw-ley.de>
+
+ * server.h: fix prototype of server_pause_check (was
+ server_check_pause)
+
+Thu Mar 14 1996 Jim Kingdon <kingdon@cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kfogel@floss.red-bean.com>
+
+ * options.h.in (AUTH_CLIENT_SUPPORT): turn on by default.
+
+Wed Mar 13 09:25:56 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <sam@inf.enst.fr>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <woods@most.weird.com>
+
+ * 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 <woods@most.weird.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <sam@inf.enst.fr>
+
+ * tag.c (check_fileproc): Check for file existence before trying
+ to tag it.
+
+Fri Mar 1 07:51:29 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * client.c (update_entries): If command is export, set options to
+ NULL.
+
+Thu Feb 29 16:54:14 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <sam@inf.enst.fr>
+
+ * 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 <jtc@rtl.cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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) <nk@col.sw-ley.de>
+
+ * 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) <nk@col.sw-ley.de>
+
+ * 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) <nk@col.sw-ley.de>
+
+ * 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 <benjamin@cyclic.com>
+
+ * run.c (run_exec): Added VMS return status support.
+
+Thu Feb 29 01:07:43 1996 Benjamin J. Lee <benjamin@cyclic.com>
+
+ * 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 <benjamin@cyclic.com>
+
+ * 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 <benjamin@cyclic.com>
+
+ * 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 <benjamin@cyclic.com>
+
+ * 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 <benjamin@cyclic.com>
+
+ * 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 <benjamin@cyclic.com>
+
+ * ignore.c: Added the patterns *.olb *.exe _$* *$ to default
+ ignore list for VMS.
+
+Wed Feb 28 13:32:28 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * logmsg.c (do_editor): Fix indentation.
+
+Wed Feb 28 12:56:49 1996 Benjamin J. Lee <benjamin@cyclic.com>
+
+ * logmsg.c (do_editor): If no editor is defined, exit and print
+ a message.
+
+Wed Feb 28 10:40:25 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * vers_ts.c (time_stamp, time_stamp_server): Reindent and revise
+ comments.
+
+Tue Feb 27 23:57:55 1996 Benjamin J. Lee <benjamin@cyclic.com>
+
+ * 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 <jtc@rtl.cygnus.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * Version 1.7.3.
+
+ * Version 1.7.2.
+
+Mon Feb 26 1996 Jim Kingdon <kingdon@cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * checkout.c (safe_location): Re-indent one line.
+
+Sat Feb 24 10:50:42 1996 Karl Fogel <kfogel@floss.red-bean.com>
+
+ * 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 <marcus@sayre.sysc.pdx.edu>
+ via Karl Fogel <kfogel@floss.red-bean.com>
+
+ * 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 <kfogel@floss.red-bean.com>
+
+ * 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 <kingdon@cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * cvs.h: Remove alloca cruft.
+
+Wed Feb 21 07:30:16 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <garyo@avs.com>
+ and Jim Kingdon <kingdon@cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ 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 <kfogel@floss.red-bean.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * main.c (usg): Add -s option.
+
+Tue Feb 13 20:26:06 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * 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 <benjamin@cyclic.com>
+
+ * 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 <benjamin@cyclic.com>
+
+ * 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 <benjamin@cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@peary.cyclic.com>
+
+ * 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 <jtc@rtl.cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <jtc@rtl.cygnus.com>
+
+ * tag.c, rtag.c: Update various comments to reflect function name
+ changes.
+
+Thu Feb 1 14:14:31 1996 Karl Fogel <kfogel@floss.red-bean.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <jtc@rtl.cygnus.com>
+
+ * edit.c (ncheck_fileproc): Fix memory leak; free line before
+ returning.
+
+Tue Jan 30 18:06:12 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <vdemarco@bou.shl.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <jtc@rtl.cygnus.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * main.c (main): Add change to run getopt_long twice again.
+
+Mon Jan 29 15:59:31 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ gcc -Wall lint:
+ * client.c: Include edit.h
+
+Sun Jan 28 09:45:53 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kfogel@floss.red-bean.com>
+
+ * 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 <kfogel@floss.red-bean.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * Version 1.7.1.
+
+ * Version 1.7.
+
+Sat Jan 20 00:05:08 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * Version 1.6.87.
+
+Mon Jan 15 18:14:55 1996 Gary Oberbrunner <garyo@avs.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <nk@col.sw-ley.de>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * Version 1.6.86.
+
+Thu Jan 11 23:28:05 1996 J.T. Conklin <jtc@rtl.cygnus.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kfogel@floss.red-bean.com>
+
+ * scramble.c (descramble): deal with DIAGNOSTIC better.
+
+Thu Jan 11 12:04:42 1996 Norbert Kiesel <nk@col.sw-ley.de>
+
+ * main.c: remove CVS_NOADMIN.
+
+ * options.h.in: remove CVS_NOADMIN
+
+Thu Jan 11 10:28:44 1996 Karl Fogel <kfogel@floss.red-bean.com>
+
+ * scramble.c (descramble): make sure the string returned is safe
+ to free().
+
+Wed Jan 10 01:11:23 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kfogel@floss.red-bean.com>
+
+ * expand_path.c: fix comments (explain expand_path()'s behavior
+ correctly).
+
+Tue Jan 9 09:41:29 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kfogel@floss.red-bean.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * ignore.c (ign_default): Add *.obj.
+
+ * server.c: Put /* */ around #endif comment.
+
+Mon Jan 8 20:37:17 1996 Karl Fogel <kfogel@floss.red-bean.com>
+
+ * client.c (connect_to_pserver): check return value of recv().
+
+Mon Jan 8 11:37:57 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@peary.cyclic.com>
+
+ * release.c (release_delete): Call unlink_file_dir rather
+ than "rm -rf".
+
+Thu Jan 4 09:58:30 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ben@gonzo.ben.algroup.co.uk>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * client.c (start_server): dup the file descriptor before
+ fdopening it.
+
+Wed Jan 3 18:25:25 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <ptran@autodesk.com>
+
+ * 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 <immel@centerline.com>
+ and Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <kingdon@peary.cyclic.com>
+
+ Visual C++ lint:
+ * myndbm.c: Prototype write_item.
+
+Tue Jan 2 11:25:22 1996 Jim Kingdon <kingdon@harvey.cyclic.com>
+
+ 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 <kingdon@harvey.cyclic.com>
+
+ * 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 <assert.h>
#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 <module> 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:
+
+ <repository-name> <file1> <file2> <file3> ...
+
+ 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
@@ -29,22 +29,6 @@
#endif
/*
- * If, before installing this version of CVS, you were running RCS V4
- * AND you are installing this CVS and RCS V5 and GNU diff 1.15 all at
- * the same time, you should turn on the following define. It only
- * exists to try to do reasonable things with your existing checked
- * out files when you upgrade to RCS V5, since the keyword expansion
- * formats have changed with RCS V5.
- *
- * If you already have been running with RCS5, or haven't been running
- * with CVS yet at all, or are sticking with RCS V4 for now, leave the
- * commented out.
- */
-#ifndef HAD_RCS4
-/* #define HAD_RCS4 */
-#endif
-
-/*
* For portability and heterogeneity reasons, CVS is shipped by
* default using my own text-file version of the ndbm database library
* in the src/myndbm.c file. If you want better performance and are
@@ -73,16 +57,6 @@
#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
* wants to use a particular patch.
@@ -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 <<EOF >>${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 <<EOF
+#!/bin/sh
+if head -1 < \$1 | grep '^BugId:[ ]*[0-9][0-9]*$' > /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 <<EOF
+BugId: 42
+and many more lines after it
+EOF
+ dotest info-v3 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
+"Checking in file1;
+/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1
+new revision: 1\.3; previous revision: 1\.2
+done"
+ cd ..
+ mkdir another-dir
+ cd another-dir
+ touch file2
+ dotest_fail info-v4 \
+ "${testcvs} import -m bogus first-dir/another x y" \
+"No BugId found\.
+${PROG} \[[a-z]* aborted\]: Message verification failed"
+ rm file2
+ cd ..
+ rmdir another-dir
+
+ cd CVSROOT
+ echo '# do nothing' >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 <<EOF >${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;
{