2004-06-09 Derek Price * commit.c, filesubr.c, history.c, server.c, wrapper.c: Various security fixes. (Original patch from Stefan Essler & Sebastian Krahmer .) * cvs.h: Include xsize.h. 2004-06-09 Derek Price * server.c (serve_entry, serve_is_modified, serve_unchanged): Protect against malformed entries. * sanity.sh (server): Tests for same. 2004-06-07 Larry Jones * sanity.sh (basica): More tests for string-based revision inc. 2004-06-04 Larry Jones * subr.c (increment_revnum): Rewrite ala RCS to work directly on the string rather than converting to int to avoid overflow. * sanity.sh (basica): New tests for above, update others to match. 2004-05-19 Derek Price * server.c (serve_unchanged, serve_is_modified): Overwrite existing data in timefields. Fixes CAN-2004-0396. 2004-05-14 Derek Price * subr.c (file_has_conflict), vers_ts.c (time_stamp_server): Don't require '=' to be the only character here, as this is potentially destabilizing. 2004-05-14 Mark D. Baushke * sanity.sh (trailingslashes): During cleanup remove topfile,v to avoid problems in later tests (editor-1). 2004-05-13 Derek Price * sanity.sh (trailingslashes): Note TODO item #205 in the comment. 2004-05-13 Derek Price * sanity.sh (trailingslashes): New tests to expose a bug in CVS when paths are specified with trailing slashes. This relates to TODO #205. 2004-05-12 Derek Price * subr.c (file_has_conflict), vers_ts.c (time_stamp_server): Only special case "=" when it is the only character in a timestamp field. Gratuitous reformatting. * vers_ts.c (time_stamp_server): Check for NULL in a consistent manner. Gratuitous reformatting. 2004-05-10 Derek Price * sanity.sh (top-level): Rename to... (rstar-toplevel): ...this for clarity. 2004-05-10 Derek Price * sanity.sh (dirs2-10ar): Remove unnecessary empty argument. 2004-05-02 Larry Jones * log.c (log_expand_revlist): Suppress warnings if really_quiet. 2004-05-07 Derek Price * sanity.sh (basica): Remove unnecessary empty arguments. 2004-05-07 Derek Price * cvs.h (fopen_case): Remove obsolescent prototype. 2004-05-05 Derek Price * sanity.sh: Wait a second and retry if cvs-serv* directories are discovered to avoid race conditions on some systems. (Patch from Pavel Roskin .) 2004-05-05 Derek Price * commit.c: Some gratuitous reformatting. 2004-05-04 Derek Price * update.c: Some gratuitous reformatting. 2004-05-04 Derek Price * add.c (add): Remove obsolete FIXME comment. (*): Some gratuitous reformatting. 2004-04-26 Derek Price * client.c (start_rsh_server): Don't rely on GNU argument processing capabilities in the RSH command. (Report from Mark Andrews .) 2004-04-19 Derek Price * ignore.c: Gratuitous reformatting. 2004-04-11 Derek Price * client.c (call_in_directory): Check paths the server sends us to make sure they are within a sandbox the user requested be updated. (is_valid_client_path, path_list_prefixed): New functions. 2004-04-11 Derek Price * modules.c (do_module): Don't allow up-level references in paths to step out of the repository. * sanity.sh (multiroot3): Update tests and add a few more. 2004-04-07 Derek Price * sanity.sh (parseroot): Replace hard path with $HOME. 2004-04-07 Derek Price * sanity.sh (parseroot): s/oberon/$username/. 2004-04-07 Derek Price * client.c (start_tcp_server): Use xstrdup rather than xmalloc(strlen)/strcpy. 2004-04-07 Derek Price * root.c (parse_cvsroot): Ignore method options. * sanity.sh (parseroot): Verify that method options are ignored. 2004-04-06 Derek Price * root.h (cvsroot_t): Move username, password, hostname, port inside CLIENT_SUPPORT ifdefs. * buffer.c, root.c, server.c: Add #ifdefs as necessary so that this will compile without client support and the root.h change. Some gratuitous restyling. 2004-04-06 Derek Price * log.c, tag.c: Gratuitous restyling. 2004-04-04 Derek Price * filesubr.c (isabsolute): Move... * subr.c: ...here and use new ISABSOLUTE macro. 2004-04-04 Derek Price * client.c (send_file_names): Cast out an unneeded const to avoid a warning. 2004-04-03 Larry Jones * client.c (send_file_names): Remove unused variables. 2004-04-02 Derek Price * sanity.sh (client): Honor $keep. 2004-04-02 Derek Price * log.c, patch.c, rcs.c: Gratuitous restyling. 2004-04-02 Derek Price * import.c (import): Use ISDIRSEP rather than testing paths against `/' directly. Some gratuitos reformatting. 2004-04-02 Derek Price * sanity.sh: Note the effectiveness of `tail -f check.log' in providing running status. 2004-04-02 Derek Price * client.c (send_file_names): Move code which calculates and sends Max-dotdot... (send_max_dotdot): ...to this new function. (send_files): Call send_max_dotdot. * sanity.sh (files-14): Expect .. in paths to work now. (status): Add a few new tests using `..'. 2004-04-01 Derek Price * lock.c: Gratuitous restyling. 2004-04-01 Derek Price * cvs.h, server.c: Gratuitous restyling. * run.c (run_exec): Ditto, plus call cvs_flush{out,err}() instead of flushing stderr & stdout directly. 2004-03-29 Derek Price * server.c: Gratuitous restyling. 2004-03-29 Derek Price * login.c: Gratuitous restyling. 2004-03-22 Derek Price * sanity.sh (toplevel): Remove FIXME type comment and unneeded Emtptydir removal. 2004-03-22 Derek Price * update.c: Some minor style cleanup. 2004-03-22 Derek Price * sanity.sh (top-level): Don't match most of the assertion since this string is often system dependent. (Thanks to Larry Jones .) 2004-03-22 Derek Price * sanity.sh (top-level): Don't match the assertion's line number. 2004-03-22 Derek Price * sanity.sh (top-level): New test to confirm assertion failure. 2004-03-22 Derek Price * sanity.sh: Only verify argument to -f when -f was passed. Check for $TMPDIR/cvsXXXXXX temp files after each test. 2004-03-22 Derek Price * sanity.sh: Verify that the argument to -f is really a test. 2004-03-20 Larry Jones * cvs.h: Change command_name to cvs_command_name to avoid conflict on HP-UX (incredibly, it declares a global command_name in prot.h, which is included from shadow.h, which we include in server.c). Change all references. * subr.c (previous_rev): Fix == vs = typo. * buffer.h: Add prototype for buf_empty. * add.c (add): Remove unused variable. 2004-03-20 Derek Price * add.c (add, add_directory, build_entry), admin.c (admin_dirproc), checkin.c (Checkin), checkout.c (safe_location, build_dirs_and_chdir), client.c (add_prune_candidate, send_repository, send_a_repository, send_to_server, start_rsh_server, send_arg, send_modified, send_ignproc, send_filesdone_proc, send_dirent_proc, send_dirleave_proc, client_notify), commit.c (check_direntproc, check_filesdoneproc, checkaddfile, commit_direntproc, commit_dirleaveproc, lock_RCS, precommit_proc, find_data, find_dirent_proc, find_ignproc, find_filesdoneproc), create_adm.c (Create_Admin), cvsrc.c (read_cvsrc), diff.c (diff_dirproc, diff_filesdoneproc, diff_dirleaveproc), edit.c (onoff_filesdoneproc, mark_up_to_date, editor_set, notify_proc_args, notify_proc, notify_do, notify_check), entries.c (Scratch_Entry, Register, WriteTag), expand_path.c (expand_variable, expand_path), fileattr.c (fileattr_startdir), filesubr.c (mkdir_if_needed, xchmod, last_component), history.c (history_write), ignore.c (ignore_directory, ignore_files), import.c (get_comment, add_rcs_file, expand_at_signs),xi lock.c (lock_filesdoneproc), log.c (log_dirproc), logmsg.c (logfile_write, rcsinfo_proc, update_logfile_proc, editinfo_proc, verifymsg_proc, do_editor, do_verify, Update_Logfile), main.c (main program_name, program_path, command_name), parseinfo.c (Parse_Info), patch.c (patch_dirproc), rcs.c (RCS_getdatebranch, rcs_lockfilename, RCS_parse, RCS_setattic, RCS_getversion, RCS_gettag, RCS_getbranch, RCS_getdate, RCS_datecmp, RCS_getrevtime, RCS_setexpand, expand_keywords, RCS_checkout, RCS_addbranch, RCS_checkin, RCS_lock, RCS_cmp_file, RCS_deltas, rcs_lockfilename, make_file_label), rcscmds.c (RCS_output_diff_options, call_diff, RCS_merge, RCS_exec_rcsdiff, diff_exec), recurse.c (start_recursion, do_recursion, do_file_proc), remove.c (remove_dirproc), repos.c (Name_Repository, Short_Repository), root.c (Name_Root, Create_Root), run.c (piped_child), server.c (output_dir, server_register, server_checked_in, server_update_entries, server_copy_file, server_set_entstat, server_clear_entstat, server_set_sticky, server_template, cvs_output_tagged), status.c (status_dirproc), subr.c (make_message_rcslegal), tag.c (pretag_proc, tag_dirproc, check_fileproc, check_filesdoneproc, tag_fileproc, val_direntproc), update.c (update_dirent_proc, update_dirleave_proc, update_ignproc, update_filesdone_proc, isemptydir), vers_ts.c (time_stamp_server, time_stamp), watch.c (watch_modify_watchers, addremove_filesdoneproc), zlib.c (read_and_gzip): Make most string args const, mainly in the interest of preserving repository & updatedir but including some collateral damage. Update a few functions to comply with new requirement. Some style fixes. * client.h, cvs.h, edit.h, fileattr.h, rcs.h, server.h, update.h, watch.h: Update prototypes to match. 2004-03-20 Derek Price * sanity.sh (conflicts2): s/cvs/$testcvs/. 2004-03-20 Derek Price * add.c (add): Correct longstanding resurrection bugs. Remove FIXME comment to this effect. Set mode and Entries timestamps of resurrected files correctly. * sanity.sh (basica, binfiles, conflicts2, recase, resurrection, update-p): Update tests to compensate. Remove FIXCVS comments. 2004-03-19 Mark D. Baushke * server.c (gserver_authenticate_connection): Handle large GSSAPI packets dynamically. (Bug report from Douglas Engert ) 2004-03-19 Derek Price * cvs.h (pathname_levels, previous_rev): Remove leading underscore from prototype arguments to avoid potential conflicts with implementations. 2004-03-18 Derek Price * cvs.h (pathname_levels): Make string argument const. * subr.c (pathname_levels): Simplify function. 2004-03-17 Derek Price * subr.c (pathname_levels): Get it right this time. 2004-03-17 Derek Price * subr.c (pathname_levels): Remove incorrect assertion and just return 0 when pathname is NULL. 2004-03-17 Derek Price * subr.c (pathname_levels): Use ISDIRSEP() instead of strchr('/') and remove FIXME comment to that effect. 2004-03-16 Derek Price * main.c (main): Update the --version Copyright (c) string to include 2004. 2004-03-15 Mark D. Baushke * release.c (release): Add missing xmalloc of update_cmd. 2004-03-15 Derek Price * release.c (release): Enable authentication and encryption for a child update process when necessary. (Original patch from Dan Russell via Hal Mahaffey .) 2004-03-14 Derek Price * add.c (add): Only call server_updated() when we actual have a new resurrected file for the client. 2004-03-14 Derek Price * cvs.h (previous_rev, write_letter): New prototypes. (struct file_info): Move to before the write_letter prototype. * add.c (add): Allow resurrection of files which used to exist on a branch. * subr.c (previous_rev): New function. * update.c: Consolidate like pragmas. (write_letter): Remove prototype. Remove static declaration. * sanity.sh (resurrection): New tests. 2004-03-14 Derek Price * commit.c (remove_file): Print the actual previous revision instead of a branch number. * sanity.sh: Update to match. 2004-03-14 Derek Price * rcs.c (RCS_cmp_file): Print the actual name of the file we failed to open in the error message. 2004-03-14 Derek Price * diff.c (diff_fileproc): Allow diffing of new files against arbitrary revisions instead of assuming that there is no RCS archive file. 2004-03-03 Derek Price * import.c (import): Check that the module name specified by the user does not contain `CVS' as a directory name. * ignore.c (ign_add): Never cease ignoring "CVS" - it is a reserved name. (Original patch from Dan Peterson .) * sanity.sh (import-CVS): New tests for the above. 2004-02-29 Larry Jones * import.c (expand_at_signs): Change type of len to size_t. * subr.c (resolve_symlink): Move declaration of newname inside #ifdef, clean up coding style. * zlib.c (gunzip_and_write): Fix up potential overlow problems. (read_and_gzip): Add explicit casts to placate paranoid compilers. 2004-02-28 Larry Jones * sanity.sh (join6): New tests for previous fix. * update.c (join_file): One more fix to avoid dereferencing NULL. (Reported by Steve McIntyre .) * sanity.sh (join6): New tests for above. 2004-02-25 Larry Jones * update.c (join_file): Fix optimization to avoid dereferencing NULL. (Reported by Steve McIntyre .) 2004-02-25 Derek Price * buffer.c (buf_empty): New function. * server.c (server): Check for unread data in buffer before closing. 2004-02-25 Derek Price * release.c (release): Restore the initial directory before and after calling various sections of code that expect it to prevent corruption of CVS/Entries files on release of a subdir and tell unedit() what to release. * sanity.sh: Add test case for release.c fix. (Original patch from Matthew Ogilvie .) * client.c (last_entries): Move global variable... (call_in_directory): ...here (now a local variable). Remove test that always evaluates to true. (last_dir_name): Remove unused global variable. 2004-02-24 Larry Jones * filesubr.c (xresolvepath): Fix crash in error case. (Reported by Reinhard Zierke .) 2004-02-24 Derek Price * sanity.sh (crerepos): Minor stylistic changes to previous change. 2004-02-24 Derek Price * sanity.sh (crerepos): Fix it so that it ignores the user's .cvsrc file (.cvsrc "checkout -r" used to cause the "rm -r 1" command to print warnings and wait for input). (Original patch from Matthew Ogilvie .) * sanity.sh (reposmv, parseroot, devcom3, binwrap3): s/_SAVED\>/_save/ for consistency. 2004-02-20 Derek Price * subr.c (set_nonblock_fd): Move back to... * server.c: ...here. * cvs.h: Remove protos for the above two functions. * buffer.c (stdio_buffer_shutdown): Remove unexessary and possibly dangerous check for unread data on a pipe with a nonblock read. 2004-02-20 Derek Price * ChangeLog, commit.c, filesubr.c, rcs.c, root.c, sanity.sh, subr.c, update.c: Remove VIM editor commands. 2004-02-20 Larry Jones * hash.h (struct node): Change data from char * to void *, change all callers. 2004-02-19 Larry Jones * login.c (password_entry_operation): Initialize line. 2004-02-19 Derek Price * sanity.sh (crerepos): Correct comment. 2004-02-19 Derek Price * sanity.sh (crerepos): Don't create directories named `tmp' in $TESTDIR to avoid conflicts with the default value of $TMPDIR. 2004-02-19 Derek Price * sanity.sh (directory_cmp): Use $TESTDIR for temporary files, like the dotest functions. 2004-02-19 Derek Price * sanity.sh: No longer allow user override of $tmp. Set $TMPDIR to a directory under $TESTDIR, as for $HOME, but still allowing for user override. Check for cvs-serv* directories under $TMPDIR rather than $tmp at the end of the script. 2004-02-17 Derek Price * sanity.sh: Check for $PWD != $TESTDIR after each set of tests rather than once at the end. Check that there are no cvs-serv* directories in $tmp after each set of remote tests. 2004-02-17 Derek Price * sanity.sh: Don't check for an empty $TESTDIR - if $TESTDIR was empty then the preceding call to mkdir would have failed anyhow. 2004-02-17 Larry Jones * log.c (rlog_proc): Fix (harmless) uninitialized variable. * sanity.sh (basicc): Add tests pointing out defective handling of the Entries file. 2004-02-17 Derek Price * checkout.c (build_dir_and_chdir): Expand header comment. 2004-02-15 Mark D. Baushke * annotate.c (rannotate_proc): Plug a memory leak. * log.c (log_fileproc): Ditto. * tag.c (tag_fileproc): Ditto. * update.c (checkout_file): Ditto. * server.c (server_updated): Do not buf_free (filebuf) here. 2004-02-13 Larry Jones * rcs.c (locate_rcs): Remove unused variables. 2004-02-12 Mark D. Baushke * lock.c (readers_exist): Plug a memory leak. 2004-02-12 Mark D. Baushke * server.c (do_cvs_command): Plug a memory leak. 2004-02-12 Derek Price * modules.c: Reformat comment and line to fit in 80 chars. 2004-02-12 Larry Jones * modules.c (_do_module): Rename to my_module to avoid reserved name. * stack.c (_push, _pop, _unshift, _shift): Rename to do_*. 2004-02-11 Larry Jones * root.c (parse_cvsroot): Set hostname in fork mode for error messages. * buffer.c (stdio_buffer_shutdown): Undo previous change. 2004-02-11 Mark D. Baushke * buffer.c (buf_free): Plug a memory leak. * commit.c (checkaddfile): Ditto. * server.c (fd_buffer_shutdown): Avoid a double free(). * parseinfo.c (parse_config): Fix comments. 2004-02-11 Derek Price * buffer.c (stdio_buffer_shutdown): Add logic to avoid attempting to print current_parsed_root->hostname when using the fork method. 2004-02-11 Derek Price * server.c (do_cvs_command): Simplify stream & pipe closing. (Suggestion from Eric Siegerman .) * cvs.h, subr.c (set_block_fd): Remove this unnecessary function. 2004-02-11 Derek Price * checkout.c (checkout_proc): s/is_absolute/isabsolute/. 2004-02-11 Derek Price * checkout.c (checkout_proc): Remove unneeded variable and enclosing block. * modules.c (_do_modules): Minor whitespace change. 2004-02-10 Derek Price * server.c (do_cvs_command): s/FIXCVS/FIXME/ in comment. (set_block_fd, set_nonblock_fd): Move to... * subr.c: ...here. * cvs.h: Add protos for the above two functions. * buffer.c (stdio_buffer_shutdown): Replace fgetc() which checked for unread data on a pipe with a nonblock read. 2004-02-10 Derek Price * server.c (do_cvs_command): Have the server child close all the pipes but the flow control pipe and wait on an EOF on the flow control pipe from the parent when done to avoid a race condition that could otherwise generate a SIGPIPE for the parent before the SIGCHILD when the other pipes were so full after a child exited that the parent attempted to write a stop byte to the flow control pipe. (Original report from .) 2004-02-10 Derek Price * buffer.c (stdio_buffer_shutdown): Add a helpful comment. 2004-02-09 Derek Price * sanity.sh (co-d): Update comments and tests to reflect the current state of my side of my discussion with Larry Jones on how these commands should behave. 2004-02-09 Derek Price * sanity.sh (emptydir): Add two new tests for how modules -d behaves when a directory already exists in the user's workspace. (emptydir): Add --keep functionality. 2004-02-09 Derek Price * sanity.sh (co-d): New test to prove `co -d' failure case. 2004-02-05 Derek Price * sanity.sh (recase): Fix typo that creeped in somehow between my last test run and my commit. 2004-02-04 Derek Price * stack.c (shift, shift_string): Make sure these functions return their result. 2004-02-04 Derek Price * modules.c (do_modules): Move content to and make this function a wrapper for... (_do_modules): ...this new function which can watch for infinite loops in alias modules. * stack.c (_push, _pop, _unshift, _shift, push_string, pop_string, unshift_string, shift_string): New functions. * stack.h (push_string, pop_string, unshift_string, shift_string: New prototypes. * sanity.sh (modules): Add check for nested alias loops. 2004-02-04 Derek Price * sanity.sh (recase): Update test names and comments for clarity and consistency. 2004-02-03 Derek Price Preserve the case of checked out directories in a path as well as file names for client communication with the server. * Makefile.am (cvs_SOURCES): Add stack.c & stack.h. * stack.c, stack.h: New files. * cvs.h: Include stack.h. * client.c (send_file_names): Preserve the case of directories in a path as well as file names for communication with the server. * Makefile.in: Regenerated. 2004-02-02 Derek Price * sanity.sh (join-rm): New test for issue #104 & #159. 2004-02-02 Derek Price Continue removal from server of handling of case insensitive clients. * cvs.h: Remove extern declaration of ign_case. * ignore.c (ign_case): Remove declaration. (ign_name): Remove support for ign_case. * server.c (serve_case): Ditto. (requests): No longer support the "Case" request. * rcs.c (locate_rcs): Remove reference to GLOBAL in function header comment. 2004-02-02 Derek Price * add.c, client.c, cvs.h, rcs.c, subr.c: Remove server support for case insensitivity. 2004-01-25 Derek Price * server.c (kserver_authenticate_connection): Fix call to switch_to_user(). (Original patch from Alexey Mahotkin .) 2004-01-22 Derek Price * modules.c (do_module): Strip trailing slashes before checking for infinite alias loops. * sanity.sh (modules): Tests for response to infinite alias loops. 2004-01-17 Mark D. Baushke * logmsg.c (do_verify): Eliminate double-free bug. (Original patch from Gerald Combs.) 2004-01-07 Larry Jones * checkout.c (safe_location): Remove unused variable(s). * lock.c (lock_tree_for_write): Ditto. * rcs.c (RCS_checkin): Ditto. * subr.c (compare_revnums): Ditto. * tag.c (tag_check_valid): Ditto. * mkmodules.c (init): Initialize err and return it rather than 0. * server.c (do_cvs_command): Only define and set max_command_fd if we're actually going to use it. 2004-01-01 Larry Jones * zlib.c (read_and_gzip, gunzip_and_write): Fix potential buffer overruns, use names for magic numbers. (Original patch from Jeff Downs .) 2003-12-18 Derek Price * server.c (switch_to_user): SysLog attempts to root from pserver. 2003-12-18 Derek Price * server.c (switch_to_user): Don't allow CVS to run as root in pserver mode. (Original patch from Wichert Akkerman via Bradley M Kuhn .) * sanity.sh (pserver): Check for bad root error message. 2003-12-17 Larry Jones * run.c (close_on_exec): fcntl is not documented to return 0 for success (and QNX doesn't), only -1 for error. (Patch from George Refseth .) 2003-12-09 Mark D. Baushke * server.c (template_proc): Fix broken Template protocol code. Must call send buf_send_counted() for Template files to avoid "Protocol error: uncounted data discarded" messages in some circumstances. (Problem reported by "Jim.Hyslop" .) 2003-12-03 Derek Price * sanity.sh (recase-8csss): rename to... (recase-8sscs): ...this to match the convention. 2003-12-03 Derek Price * sanity.sh (recase): Add some clarifying comments. 2003-12-03 Larry Jones * expand_path.c (expand_variable): Expand ${CVSROOT} to just the directory like it's supposed to be. (Reported by Michael S. Tsirkin .) 2003-11-26 Derek Price * sanity.sh (modules3-2): Simplify syntax that may have given Cygwin intermittent conniptions. 2003-11-25 Mark D. Baushke * sanity.sh (recase-17sscs): Use ${CVSROOT_DIRNAME} in pattern. 2003-11-25 Derek Price * sanity.sh (release): Perform forgotten cleanup. 2003-11-25 Derek Price * commit.c (commit_fileproc): Reword comment. 2003-11-25 Derek Price * add.c (add): Disable ign_case for the purposes of adding a file so that recasing the name of a file is possible from a case insensitive client. * sanity.sh (recase): New tests for behavior which varies when the client and/or the server are case insensitive. 2003-11-25 Derek Price * sanity.sh (devcom3-9ar): Ignore the stderr output since it varies considerably between platforms. 2003-11-24 Larry Jones * diff.c (diff_file_nodiff): use_rev1 does *not* imply that diff_rev1 is not null, diff_date1 could be set instead (ditto for use_rev2). (Reported by .) 2003-11-24 Derek Price * sanity.sh (modes3): Skip modes3-5 entirely under Cygwin since permisions are broken there. This change removes most of the earlier Cygwin differentiation in this test ($cygwin_hack & $cygwin_hack2) in favor of skipping the test entirely. 2003-11-21 Larry Jones * hash.c (printnode, printlist): Cast %p arguments to void * as required by the C standard. 2003-11-21 Derek Price * sanity.sh: Add `-h ' option to enable testing across a :ext: connection to another host. Warn when `-h' is specified without $TESTDIR. Leave $TESTDIR intact when it looks absolute since it may contain symlinks. Allow $CVS_SERVER to be overridden via the environment for `-h'. Default $CVS_RSH to `rsh'. (*): Use $CVS_RSH to perform certain commands on the remote host (esp. `ln -s' and `chmod') when `-h' is specified to work around incompatibilities with CygWin & Samba. Add a few other minor workarounds for Cygwin bugs. (newroot): New function. (*): Use newroot when appropriate. 2003-11-19 Larry Jones * rcs.c (RCS_getrevtime): Add error checking; cleanup. 2003-11-18 Derek Price * modules.c (do_module): Reject absolute paths. (Report and suggested fix from Tony Hoyle .) * sanity.sh (abspath2): Check for the above. (spacefiles): Remove tests that expect absolute paths to files in the top level repository directory to work. (tests): Add abspath2. 2003-11-13 Derek Price * rcs.c (RCS_delete_revs): It's `&&', not `and'. 2003-11-13 Derek Price * sanity.sh: Create the empty log to make it easier to tail immediately after the script is started. 2003-11-13 Derek Price * sanity.sh (exit_help): Correct help to specify `-H' and not `-h' as the help option. 2003-11-13 Derek Price * rcs.c (RCS_delete_revs): Don't use the WOE32 kludge which refuses to delete revisions from bvinary files on Cygwin. I'm not sure what the kludge was trying to avoid, but commenting it out causes the test suite to pass. 2003-11-10 Derek Price * commit.c (check_fileproc, find_fileproc): Don't leak memory. 2003-11-10 Derek Price * commit.c (find_fileproc, check_fileproc): Refuse to remove files when the file exists in the sandbox. This used to cause data loss. (Report from Andreas Reifschneider .) * sanity.sh (rmadd3): Update to match. Expand comments. 2003-11-10 Derek Price * sanity.sh (rmadd3): Test the behavior of commit after the add/replace. (Report from Andreas Reifschneider .) 2003-11-10 Mark D. Baushke * Backport symlink bugfix from cvs 1.12.1.1 feature release as written by Derek Price . (This fixes the Issue 142 bug.) * recurse.c (start_recursion): Accept new repository argument so that the working directory may be tracked by do_recursion without using xgetwd(), which returned a value different from the one the user requested when symlinks were in use. Pass repository_in to do_recursion() as part of the recursion frame. * cvs.h (xreadlink): #ifdef HAVE_READLINK proto. (xresolvepath): New proto. (start_recursion): Add repository to proto. * checkout.c (safe_location): Add more complete header comment. Add trace. Use new xresolvepath() function. Always return true in client mode since checking our destination path against the CVSROOT path is usually meaningless in client/server mode. (checkout_proc): Pass repository to do_update() for later use with start_recursion(). * admin.c (admin): Use new definition of start_recursion(). * annotate.c (rannotate_proc): Ditto. * client.c (send_files): Ditto. * commit.c (commit): Ditto. * diff.c (diff): Ditto. * edit.c (watch_onoff, send_notifications, edit, unedit, editors): Ditto. * lock.c (lock_tree_for_write): Ditto. * log.c (rlog_proc): Ditto. * patch.c (patch_proc): Ditto. * remove.c (cvsremove): Ditto. * tag.c (rtag_proc): Ditto. * update.c (do_update): Ditto. * watch.c (watch_addremove, watchers): Ditto. * patch.c (patch_proc): Call tag_check_valid with repository instead of NULL. * filesubr.c (xreadlink): #ifdef HAVE_READLINK this function. Add more complete header comment. (xresolvepath): New function. * recurse.c (do_recursion): Call Lock_Cleanup() only repository was set. * update.c (do_update): Accept new repository argument so that the working directory may be tracked. (update): Pass NULL repository to do_update(). * update.c (do_update): Add repository to proto. * checkout.c (checkout_proc): Use new definition of do_update(). * update.c (update): Ditto. * sanity.sh: Add new -l option to test symlinked roots. (checkout_repository-1): Add server error messages about absolute paths since the client now skips destination validity checks. (check_repository-2): Test renamed to checkout_repository-2. (checkout_repository-2): Process client error messages about CVSROOT files being in the way since the client skips destination validity checks since it should be rare that a client is running in client/server mode on the server and CVS has no current way to check if it is running on the server. (check_repository-3): Test renamed to checkout_repository-3. (dottedroot): New test to check that a CVSROOT with a "." in the name will work. 2003-11-10 Derek Price * sanity.sh (rmadd3): Add whitespace after end of test for readability. 2003-11-10 Derek Price * sanity.sh (rmadd3): New tests that confirms that CVS refuses to delete a file it thinks was already removed. (Report and test from Andreas Reifschneider .) 2003-11-03 Derek Price * sanity.sh (server): Test that the global `-l' option is ignored nonfatally. 2003-11-01 Larry Jones * ignore.c (ignore_files): Use CVS_LSTAT() instead of lstat(). * filesubr.c (xcmp): Make sure S_ISLNK exists before calling it. (Reported by Paul Edwards .) 2003-10-31 Derek Price * sanity.sh (checkout_repository): Name tests consistently. 2003-10-31 Derek Price * sanity.sh: s/${TESTDIR}/cvsroot/${CVSROOT_DIRNAME}/. 2003-10-28 Derek Price * sanity.sh (devcom): s/cvs/$PROG/. 2003-10-28 Derek Price * sanity.sh (devcom): Renumber tests and use dotest function. 2003-10-28 Derek Price * sever.h: Add the standard copyright notice. 2003-10-28 Derek Price * lock.c: Remove some suggestions which have already been implemented or which have become obsolete from the header comment. 2003-10-26 Derek Price * sanity.sh (join6): Fix a few typos in the last test and remove a misplaced test. 2003-10-25 Mark D. Baushke * sanity.sh (parseroot): Perform this test in a subdirectory. It should avoid problems on case-insensitive systems where CVSROOT and cvsroot are the same directory (eg, MacOS X). 2003-10-24 Derek Price * update.c (join_file): Restore the optimization Mark recently removed, but fix it. Move one other optimization up since it needs to be checked for first. Add bew status messages like merge_file produces when the requested diff has already been applied to the destination. Expand header comment. * sanity.sh (join6): Add tests for the new error messages. (import-113, join-admin-2, diffmerge1): Fix collateral damage. 2003-10-23 Mark D. Baushke * update.c (join_file): Do the -jrev1 -jrev2 merge even when the file is already at rev2. * sanity.sh (join6): New testcase for above. (Suggested by Paul Edwards, from somewhere in Australia.) (import): Fix collateral damage. 2003-10-23 Derek Price * sanity.sh (fail): Refer the user to the `TESTS' and `check.log' files on failure. 2003-10-19 Mark D. Baushke * sanity.sh (admin-31): Fix more typos. 2003-10-18 Mark D. Baushke * sanity.sh (admin): Fix a typo. * admin.c (admin_fileproc): Restore the ':' character in the -mtag:message admin argument even if the tag does not exist so that other files with the tag will be found. Also, be more paranoid that a symbolic tag actually points to a version that exists. (Reported by Rodolfo Schulz de Lima .) * sanity.sh (admin): Test these changes. 2003-10-17 Mark D. Baushke * admin.c (admin_fileproc): Force tag match on admin -mversion:message rather than altering the wrong log message. (Patch from "Rodolfo Schulz de Lima" .) * sanity.sh (admin): Test case for it. 2003-10-15 Larry Jones * commit.c (commit_fileproc, finaladd): Don't call fixaddfile() if the RCS file didn't get created at all. (Reported by David Wood .) 2003-10-14 Derek Price Port to pedantic POSIX 1003.1-2001 hosts, such as Debian GNU/Linux testing with _POSIX2_VERSION=200112 in the environment. * sanity.sh: Use 'sed 1q', not 'head -1'. (Patch from Paul Eggert .) 2003-10-10 Derek Price * lock.c (set_lock): Clarify comment. 2003-10-08 Derek Price * Makefile.am (cvs_SOURCES): Add history.h. * history.c: Include history.h. Add the `P' record types to more comments. s/ALL_REC_TYPES/ALL_HISTORY_REC_TYPES/. (usage): Reference ALL_HISTORY_REC_TYPES rather than using a separate string literal. (report_hrecs): Handle `P' record type. (ALL_REC_TYPES): Rename and move... * history.h (ALL_HISTORY_REC_TYPES): ...here. * mkmodules.c: Include history.h. (config_contents): Update contents of and references to LogHistory records to use ALL_HISTORY_REC_TYPES. * sanity.sh (basic2-64): Update to include history records of type `P'. * Makefile.in: Regenerated. 2003-10-08 Derek Price * update.c (patch_file): Correct spelling and punctuation in comment. Update some lines to fit in 80 characters. 2003-10-08 Larry Jones * history.c (history): Don't conflate -e with -x since the client's idea of what -e means may not match the server's. (Reported by Frank Hemer .) 2003-10-07 Larry Jones * sanity.sh: Use dotest_fail instead of dotest_status for diff tests since CVS only returns success/fail rather than 0/1/2 like diff does. 2003-10-07 Derek Price Fix a client/server bug introduced via the data loss fix of 2003-03-17. Basically, the server was reporting ambiguous filename requests when it should have been trusting the user to type the intended case or using the case the client preserved in CVS/Entries before it tried to look anything up in case insensitive mode. * rcs.c (locate_rcs): Use the filename exactly as cased before investigating a case insensitive lookup, per the client/server protocol specification. Expand comments. * subr.c (locate_file_in_dir): This function only needs to locate files case insensitively. Expand comments. * cvs.h (locate_file_in_dir): Only prototype when servers which need to handle case insensitivity are being compiled. 2003-10-07 Derek Price * rcs.c (locate_rcs): Declare static. Move to an earlier location in file to avoid prototyping. * rcs.h (locate_rcs): Remove proto. 2003-10-03 Derek Price * server.c (serve_global_option): Warn that -l is being ignored rather than exiting fatally due to backwards compatibility complaints from administrators. 2003-09-29 Derek Price * rcs.c (make_file_label): Make a failure to stat a file a fatal error since it signals that a later read will also fail. 2003-09-26 Derek Price * diff.c (diff): Add a FIXME re spaces in diff arguments. 2003-09-25 Mark D. Baushke * rcs.c (make_file_label): Do not return an uninitialized label. (Reported by "Todd C. Miller" ) 2003-09-12 Derek Price * sanity.sh (mkmodules): Correct comments. 2003-09-12 Derek Price * mkmodules.c (mkmodules): Do not pass a string which came from the checkoutlist file directly to error as a format string since we don't want to trust any user with access to checkoutlist with creating printf format strings. I already claimed I did this in the NEWS file. (Thanks to Larry Jones for spotting my mistake.) * sanity.sh (mkmodules): Test for the above. 2003-09-12 Derek Price * mkmodules.c (checkoutlist_contents): Document the optional portions of this file format more accurately. (mkmodules): Ditto, in comments. Fix bug that always failed to ignore whitespace before error messages. * sanity.sh (mkmodules-temp-file-removal): Rename to... (mkmodules): ...this and add a test of the checkoutlist error message. Add cleanup step to restore checkoutlist. 2003-08-27 Larry Jones * history.c: 'P' is a valid record type and has been for a long time. Add it to the comments, usage message, and, most important, ALL_REC_TYPES so it gets recorded by default. * server.c (do_cvs_command): Set global command_name to the real command name rather than leaving it set to "server". * sanity.sh: Update to match. (Reported by Dmitry Ryzhkov .) 2003-08-13 Larry Jones * server.c (server_cleanup): Don't shutdown buf_from_net if it's null. (Reported by Scott Mitchell .) 2003-08-01 Derek Price * sanity.sh (join5): Use $PROG consistently and escape a `.'. 2003-08-01 Derek Price * sanity.sh (join5): Use `[a-z]*' as opposed to `update'. 2003-07-31 Derek Price * add.c (add_directory): Restore a malloc I shouldn't have altered on the stable branch. 2003-07-31 Derek Price * rcscmds.c (RCS_merge): Pass `--' before the filename arguments to diff so that filenames starting with `-' can be merged. * sanity.sh (join5): New test for same. 2003-07-31 Derek Price * add.c (add_directory): Don't print status information in really_quiet mode. 2003-07-29 Derek Price * commit.c (checkaddfile): Simplify the logic here, using assumptions already made later in the function to remove calls to locate_rcs and some conditionals. Use same assumptions to remove some variables. 2003-07-29 Derek Price * login.c: Remove GETPASS & HAVE_GETPASSPHRASE cruft in favor of always using the GNULIB getpass since the system getpass was removed from the POSIX.2 specification. 2003-07-28 Derek Price * subr.c (strip_trailiing_newlines): Use size_t rather than int to count string length. (Suggestion from Paul Edwards, who provides a broken return email address in Tonga. I believe he is actually from Australia.) 2003-07-28 Derek Price * checkout.c (checkout): Remove out-of-date comment about Checkin.prog and Update.prog. 2003-07-25 Derek Price * rcs.c (RCS_parsercsfile): Declare rcsfile argument as const. * rcs.h (RCS_parsercsfile): Update prototype to match. * commit.c (fixaddfile): Accept a single path to an rcs file as an argument rather than trying to look it up again when it is not necessary. 2003-07-25 Derek Price * commit.c (finaladd): But don't free variables we no longer allocate. 2003-07-25 Derek Price * checkin.c (Checkin): The rcs argument is unecessary since we know that the parsed RCS data always exists as part of finfo by the time this function gets called. * commit.c (commit_fileproc, finaladd): Use new Checkin() API. * cvs.h (Checkin): Update prototype. 2003-07-25 Derek Price * subr.c (strip_trailing_newlines): Check len b4 str[len] to avoid exceeding the array bounds when the string length == 0. (Report from John Tytgat .) 2003-07-25 Derek Price * subr.c (strip_trailing_newlines): Generalize this function to watch len so that it cannot walk past the beginning of the string passed in. (Report from John Tytgat .) 2003-07-25 Derek Price * subr.c (strip_trailing_newlines): Leave the K&R function decl on this branch. 2003-07-25 Derek Price * cvs.h (strip_trailing_newlines): Update prototype. * subr.c (strip_trailing_newlines): Return true when newlines are removed. * server.c (pserver_authenticate_connection): Don't give a DOS attack a chance to authenticate accidentally because I like to be paranoid. * sanity.sh (pserver): New test for same. 2003-07-20 Derek Price * wrapper.c: Remove mention of obsolete -f and -t wrapper options from a comment. 2003-07-12 Larry Jones * sanity.sh (diffnl): New tests for diff on files with no newline at end. (Patch from Andrew Moise .) 2003-07-09 Larry Jones * add.c (add): Update "re-adding" message to have quotes around the file name like all the other similar messages. * sanity.sh: Update to match. * update.c (join_file): Handle locally removed but not yet committed files. (Reported by Larry Lords .) * sanity.sh (join, join4): New tests for above. 2003-06-28 Larry Jones * commit.c (fixaddfile): Bail out if locate_rcs() fails. Make parameters const. * add.c (add): Fix -Wall complaints. * diff.c (diff_file_nodiff): Ditto. * filesubr.c (cvs_casecmp): Ditto. * patch.c (patch_fileproc): Ditto. * rcs.c (RCS_cmp_file): Ditto. * root.c (parse_cvsroot): Ditto. * subr.c (locate_file_in_dir): Ditto. * cvs.h (cvs_casecmp, locate_file_in_dir): Update prototypes. 2003-06-27 Larry Jones * lock.c (readers_exist): Use LockDir rather than always looking in the repository. (Original patch from Robert Ambalu .) Remove vestigial lock promotion code. 2003-06-26 Larry Jones * hash.c (sortlist): Avoid crash when list is null. 2003-06-23 Derek Price * patch.c (patch_fileproc): Output revision number of the original revision in the removed case. (Idea from Paul Edwards .) * sanity.sh (rdiff-add-remove-nodiff): Rename to... (rdiff-short): ...this. Test for the above changes. Add some tests for when rev2 defaults to the trunk. Expand comments. 2003-06-23 Derek Price * add.c (add): Fix xmalloc's strlen() of wrong variable. * checkout.c (safe_location): leak: reused where_location without free. * log.c (rlog_proc): leak: free where before exit. * logmsg.c (do_verify): leak: free verifymsg_script before exit. (Original patch from Kenneth Lorber .) 2003-06-20 Derek Price * client.c: Remove silly comment. (Patch from Alexey Mahotkin .) 2003-06-13 Derek Price * subr.c (file_has_conflict): Fix comment. (Patch from Paul Edwards .) 2003-06-13 Derek Price * subr.c (xrealloc): Trivial comment fix. (Patch from Kenneth Lorber .) 2003-06-13 Derek Price * diff.c (diff_fileproc): Fix memory leak. (Patch from Kenneth Lorber .) 2003-06-12 Derek Price * root.c (parse_cvsroot, local_cvsroot): Parse trailing '/'s off the end of cvsroots. Make arguments const. * cvs.h: Update prototypes to match. (Idea from Miles Zarathustra .) 2003-06-11 Larry Jones * sanity.sh: Change warning messages to note that defective tools can result in defective results, both pass and fail. Also change "which" to "that" for errant grammar pedants. 2003-06-09 Derek Price * rcs.c (RCS_delete_revs): Reference WOE32 rather than WIN32 in accordance with the GNU convention to avoid implying that we consider the Microsoft Windows Operating Environment any sort of "win". 2003-06-09 Derek Price * filesubr.c (cvs_temp_file): Tidy a comment. 2003-06-09 Derek Price * patch.c (patch_fileproc): Don't assume the content of files is different just because the revision number is different. * sanity.sh (rdiff-add-remove-nodiff): New tests for the above. (Report & original patches from Paul Edwards .) 2003-06-04 Derek Price * cvs.h (locate_file_in_dir): New proto. (locate_rcs): Move proto... * rcs.h: ...here. * filesubr.c (locate_rcs): Move function... * rcs.c: ...here for Windows. * filesubr.c (locate_file_in_dir): Move function... * subr.c: ...here for Windows. 2003-06-02 Derek Price * diff.c (diff_file_nodiff): Don't assume that because two specified revision numbers are different, the contents are different. (Original report & patch from Paul Edwards .) * diff.c (diff_file_nodiff): Pass through rev1_cache to be filled in by RCS_cmp_file when it needs to check out revision 1 into a file. Add some more informative error messages. Cleanup for efficiency & readability. (diff_fileproc): Pass the cached revision to RCS_exec_diff(). Clean up the error exit code. Remove code killed by the changes to diff_file_nodiff(). * rcscmds.c (RCS_exec_rcsdiff): Accept and use new cached revision text if present. * rcs.c (RCS_cmp_file): Accept a second revision number and cache the first revision if it needs to be checked out. * checkin.c (Checkin): Use new RCS_cmp_file(). * import.c (update_rcs_file): Ditto. * no_diff.c (No_Difference): Ditto. * cvs.h (RCS_exec_rcsdiff): New proto to match above changes. * rcs.h (RCS_cmp_file): Ditto. * sanity.sh: Minor corrections to handle the above changes. 2003-05-29 Derek Price * client.c (start_server): Don't send -l to server. * history.c (history_write): Fix comment. * main.c (main): Don't process -l. * server.c (serve_global_option): Ditto. (Suggestion from Rob Lanphier .) 2003-05-23 Larry Jones * sanity.sh (info-cleanup-verifymsg): Avoid race in output. 2003-05-22 Larry Jones * commit.c (commit): Fix leading zero stripping code to not strip unless there's a following digit. * parseinfo.c (Parse_Info): Warn if multiple DEFAULT lines found. * sanity.sh (info): New test for above. 2003-05-21 Derek Price * Makefile.in: Regenerate with Automake version 1.7.5. 2003-05-20 Larry Jones * parseinfo.c (Parse_Info): Fix stupid memory management error. * logmsg.c (do_verify): Treate Parse_Info errors as failure. * parseinfo.c (Parse_Info): Don't call expand_path until executing the command so that errors in unexecuted commands aren't reported. * sanity.sh (info): New tests for above. 2003-05-18 Mark D. Baushke * Makefile.am (localcheck,remotecheck): Use cvs$(EXEEXT) not cvs. * Makefile.in: Regenerated. * sanity.sh (status-init-7): Use ${PROG} not cvs in tests. (branch-after-import-5): Ditto. (keywordname-update-11): Ditto. 2003-05-18 Larry Jones * server.h (kserver_authenticate_connection, pserver_authenticate_connection): Add prototypes. * client.c (update_entries): Set file's access time to the current time rather than the same as the modification time. * vers_ts.c (Version_TS): Ditto. 2003-05-01 Derek Price * main.c (main): Ignore -z when CLIENT_SUPPORT is not defined. (Report from Jim Salter .) 2003-05-01 Derek Price * repos.c (Sanitize_Repository_Name): Remove some old comments about the defunct RELATIVE_REPOS macro. * server.c (outside_root): Ditto. 2003-04-30 Derek Price * add.c (add): Fix a possible, if unlikely, memory out of bounds error. 2003-04-28 Derek Price * client.c (save_prog): Remove unneeded struct. (checkin_progs, update_progs): Remove these unneeded globals. (handle_set_checkin_prog, handle_set_update_prog, do_deferred_progs): Remove these functions. (send_repository): Remove checkin and update prog support. (responses): Remove Set-checkin-prog and Set-update-prog. (get_responses_and_close): Don't call do_deferred_prog(). * commit.c (commit_usage): Remove reference to -n. (commit): Don't set and send run_module_prog via -n. Don't run Checkin.prog or Checkout.prog in local mode. * modules.c (CVSMODULE_OPTS): Remove -i and -u. (do_module): Don't process -i and -u options to set checkin and update progs, respectively. * server.c (server_prog, serve_checkin_prog, server_update_prog): Remove unused functions. (requests): Remove Checkin-prog and Update-prog. * update.c (update_dirleave_proc): Remove update prog functionality. * cvs.h (CVSADM_CIPROG, CVSADM_UPROG): Remove unneeded defines. * server.h (server_prog): Remove proto. (progs): Remove enum. * sanity.sh (modules5): Remove tests for checkin and update programs. 2003-04-10 Larry Jones * Makefile.in: Regenerated. 2003-03-27 Mark D. Baushke * sanity.sh (rdiff2): Add new test case for SEGV problem reported against cvs 1.11.5. (Report from James Cribb) 2003-03-26 Derek Price * client.c: Fix, reorganize, and comment ifdefs for AUTH_CLIENT_SUPPORT and HAVE_GSSAPI. * client.h: Ditto. Remove some unecessary server function prototypes. 2003-03-26 Derek Price * client.c: Include the net headers for HAVE_GSSAPI. (Report from Jim Salter .) 2003-03-26 Derek Price * main.c (main): Verify the argument to -z when running without CLIENT_SUPPORT since Eric Siegerman complained about being bit by a run of `cvs -z -n up' which parsed the -n as the argument to -z. * sanity.sh (opterrmsg): New tests for -z argument checking. 2003-03-26 Larry Jones * main.c (main): Use strtol() instead of atoi() when parsing -z to detect errors. (Reported by Eric Siegerman .) 2003-03-24 Derek Price * Makefile.am: Update copyright notice. * Makefile.in: Regenerated. 2003-03-19 Larry Jones * filesubr.c (mkdir_if_needed): Save errno since isdir() can clobber. (Patch from Brian Poole .) * sanity.sh (abspath-4): Update to match. * filesubr.c (locate_rcs): Fix gcc warning. 2003-03-17 Derek Price * add.c: Correct comment. * client.c: Ditto. * checkin.c (Checkin): Pass work file name to RCS_checkin so that this function works properly in the case insensitive mode. * commit.c (checkaddfile): Fix and factor add logic so that the correct files and directories are created in the case insensitive mode. Reuse code in RCS_parse() below. This avoids a problem that could cause corrupted RCS files to be created on an add from a case insensitive system. Corrupted RCS files could cause later assertion failures for everyone. (locate_rcs): Move this function... * filesubr.c (locate_rcs): ...here and rewrite it. (fopen_case): Remove this function. (locate_file_in_dir): New function. * cvs.h (locate_rcs): Prototype new function. * rcs.c (RCS_parse): Factor out file location into locate_rcs. 2003-03-17 Larry Jones * server.c (switch_to_user): Add syslog calls for setgid/setuid failure. 2003-03-07 Derek Price * sanity.sh (help): Add explanation of CVS-TO-TEST and edit for consistency. 2003-03-07 Derek Price * sanity.sh (usage): Show users long --help rather than less informative -h. 2003-03-07 Derek Price * sanity.sh: Add support for long options. (exit_usage): Move the actual generation of usage text to... (usage): ...this new function and improve the usage message. (exit_help): New function. 2003-03-07 Larry Jones * commit.c (check_fileproc): Remove unused variables. * patch.c (patch): Pass local to do_module so that -l actually works. (Reported by John Coers .) (patch_fileproc): Fix uninitialized variables. * sanity.sh: Define a DATE pattern for rdiff and use it. (basic2-24a): New test for above. 2003-03-06 Derek Price * subr.c (file_has_conflict): New file. * commit.c (check_fileproc): Factor code into new file_has_conflict() function. * update.c (update_fileproc): Ditto. * status.c (status_fileproc): Use new file_has_conflict() function. (Report from Bernd Kuemmerlen .) * sanity.sh (status): New test for same. 2003-03-05 Mark D. Baushke * rcs.c (RCS_magicrev): Backout CVS_LOCAL_BRANCH_NUM feature. * rcs.c (RCS_magicrev): CVS_LOCAL_BRANCH_NUM feature. Port of the FreeBSD hack for setting the next magic branch number to be used. The original patch was written by Peter Wemm and may be found by visiting the URL: http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/cvs/src/rcs.c.diff?r1=1.1&r2=1.2 Implement a horrible (but simple) hack to allow some control over the branch number that is assigned. This is specifically to support the local commit feature of cvsup. If one sets $CVS_LOCAL_BRANCH_NUM to (say) 1000 then branches the local repository, the revision numbers will look like 1.66.1000.xx. This is almost a dead-set certainty that there will be no conflicts with version numbers. (This needs to be something more than an option to 'cvs tag' or 'cvs rtag' as various parts of cvs "know" how to automatically branch files (eg: cvs add). Trying to remember state is getting "Too Hard (TM)") * sanity.sh (branches3): Test the CVS_LOCAL_BRANCH_NUM feature. 2003-03-04 Derek Price * history.c (history_write): Remove unneeded O_CREAT in the call to open() since we abort a few lines earlier if the file doesn't exist. Add a comment to the effect that this is not the optimal method of doing things and needs fixed. 2003-02-28 Derek Price * root.c (parse_cvsroot): s/no_passwd/no_password/ in comments. 2003-02-28 Derek Price * root.c (parse_cvsroot): Set no_password for :gserver: and :kserver: as tokens should already be obtained via external sources. * update.c (update_fileproc): Remove redundant code. 2003-02-28 Larry Jones * lock.c (set_lock): If possible, try a short wait with no message before calling lock_wait() to optimize master lock contention. 2003-02-26 Larry Jones * checkout.c (checkout): Send "--" before file names. * sanity.sh (spacefiles): Remote now works just like local. 2003-02-25 Derek Price * sanity.sh (rcs4): Use UTC to work across timezones. 2003-02-25 Derek Price * rcs.c (RCS_getdate): Fix a bug that shows up when checking out files by date with the "-D date" command line option. There is code in the original to handle a special case. If the date search finds revision 1.1 it is supposed to check whether revision 1.1.1.1 has the same date stamp, which would indicate that the file was originally brought in with "cvs import". In that case it is supposed to return the vendor branch version 1.1.1.1. However, there was a bug in the code. It actually compares the date of revision 1.1 for equality with the date given on the command line -- clearly wrong. This commit fixes the coding bug. Note: There is an additional bug which is _not_ fixed in this commit. The date comparison should not be a strict equality test. It should allow a fudge factor of, say, 2-3 seconds. Old versions of CVS created the two revisions with two separate invocations of the RCS "ci" command. We have many old files in the tree in which the dates of revisions 1.1 and 1.1.1.1 differ by 1 second. This bug was discovered and fixed for FreeBSD cvs. See v 1.21 of for more information. * sanity.sh (rcs4): Tests for same. (Patch from Mark D. Baushke .) 2003-02-25 Derek Price * logmsg.c (logfile_write): Do not pass a NULL pointer to fprintf() when we have an empty log message. * sanity.sh (editor): Add new tests to verify correct behavior of empty log messages. (Patch from Mark D. Baushke , original report from Piotr KUCHARSKI .) 2003-02-25 Derek Price * cvsbug.in: Import use of mktemp function from RedHat 8.0's CVS 1.11.2 RPM. Use new MKTEMP configure variable. Use new SENDMAIL from configure. * Makefile.in: Regenerated. 2003-02-25 Derek Price * watch.c (watch_usage): Use {} rather than () for literals. 2003-02-14 Derek Price * watch.c (watch_usage): Make the repeatability of -a part of the usage spec. 2003-02-14 Derek Price * watch.c (watch_usage): Mention default for -a. Mention multiple invocations of -a. Mention -R as default. Use required () rather than optional [] around watch subcommand list in invocation spec. Use `path' instead of `file'. Put variable <> around `action' and `path'. 2003-02-07 Derek Price * commit.c (checkaddfile): Do not lose the vendor branch when adding files to a new branch. Avoids extranious conflicts for future vendor imports. This was found and fixed in FreeBSD cvs. See http://www.freebsd.org/cgi/query-pr.cgi?pr=4033 for details. * sanity.sh (branch-after-import): New test. (Thanks to Mark D Baushke for forwarding the patch and writing the test cases!) * sanity.sh (branch-after-import): Misc portablility and standard changes. 2003-02-12 Derek Price * main.c (main): Update copyright message to 2003. 2003-02-21 Larry Jones * server.c (switch_to_user): Update comment, change error message so it's not an exact duplicate of the one in check_password. (check_repository_password): Add syslog call for password mismatches. (check_password): Add syslog call for password mismatches, rearrange code to simplify and eliminate redundancy. (pserver_authenticate_connection): Remove syslog call, now done by lower-level routines. 2003-02-19 Larry Jones * sanity.sh (admin-10): Add test for repository files not in working directory. * admin.c (admin_fileproc): Fix crash when no rcs file, return failure status for bogus files. * sanity.sh (admin-4a): Test for above. (Original patch submitted by Mark D. Baushke ). 2003-02-14 Larry Jones * log.c (log_expand_revlist): Fix crashes in error cases. (Reported by Bart Santy .) * sanity.sh (log): New tests for above. 2003-02-01 Larry Jones * buffer.c (stdio_buffer_shutdown): Handle EINTR from waitpid. (Patch from Johannes Grødem .) 2003-02-08 Derek Price * rcs.c (RCS_checkout): Supply the full function name in the trace output. * update.c (checkout_file, join_file): Supply tag properly to RCS_checkout more often. (patch_file): Ditto. Fill out comments. * sanity.sh (keyword, keywordname): Some changes to accomodate the fact that the above changes cause patches generated by patch_file to fail occassionally. 2003-02-06 Derek Price * client.c: Use the complete path to the CVSADM_TEMPLATE file in error messages. Remove related FIXME. 2003-01-31 Derek Price * sanity.sh (keywordname): Change a "FIXME" comment to "FIXCVS". 2003-01-30 Derek Price * sanity.sh (keywordname): New test. 2003-01-23 Larry Jones * diff.c (diff_fileproc): Restructure code to simplify and eliminate redundant tests. * server.c (do_cvs_command): Use WCOREDUMP macro rather than hard coding test for core file. 2003-01-21 Larry Jones * root.c (method_name): Redefine as a 2D array. * root.h (method_name): Ditto. 2003-01-21 Jim Meyering * add.c (add): Rename local-shadowing `i' to `j'. * root.c (method_names): Declare to be a const array of const strings. (Name_Root): Save errno so it doesn't get clobbered by the intervening error call. Use getline's return value, mainly to save a call to strrchr. 2003-01-20 Larry Jones * myndbm.c (O_ACCMODE): Parenthesize the replacement string so that it parses correctly. (Reported by Andres Bertens .) 2003-01-15 Karl Fogel * server.c (dirswitch): Don't free dir_name until right before allocating it again. This removes a potential double-free problem, whereby this function could free dir_name and then immediately return due to invalid directory syntax (without ever reassigning dir_name), then reenter and free dir_name again. Thanks to Stefan Esser for the fix. 2003-01-08 Larry Jones * client.c (update_entries): Only "0" is a special version number; other numbers starting with 0 (like 0.1) are normal version numbers. * commit.c (find_fileproc): Ditto. Also reorganize the code to simplify the conditions. (Reported by Michele Zamparelli .) 2003-01-02 Larry Jones * rcs.c (getdelta): Use RCSDEAD rather than literal "dead". 2002-12-27 Derek Price * admin.c: s/LOCK_(NONE|WRITE|READ)/CVS_$&/g; since the definition of LOCK_WRITE clashes with a definition in objidl.h on Windoze platforms. * annotate.c: Ditto. * client.c: Ditto. * commit.c: Ditto. * cvs.h: Ditto. * diff.c: Ditto. * edit.c: Ditto. * lock.c: Ditto. * log.c: Ditto. * patch.c: Ditto. * recurse.c: Ditto. * remove.c: Ditto. * status.c: Ditto. * tag.c: Ditto. * update.c: Ditto. * watch.c: Ditto. * myndbm.c: Ditto & define O_ACCMODE when it isn't defined, as under Windoze. (Thanks to Stephane Rouleau , Cristopher Seawood , and Frederico Costa for all their hints, tips, and patches for this problem.) 2002-12-20 Derek Price * client.c (send_a_repository): Suppress a warning under Windoze. 2002-12-19 Derek Price * Makefile.am: Remove reference to options.h. * cvs.h: Ditto. * options.h: Remove this obsolete file. * sanity.sh: Remove comment about external diffs causing tests to fail since CVS hasn't used external diffs in years. * Makefile.in: Regenerated. 2002-12-16 Derek Price * admin.c: Disable cvsadmin group checking on the client. (Reported by Dan Peterson .) 2002-12-06 Derek Price * buffer.c: Replace calls to malloc with calls to xmalloc and calls to realloc with calls to xrealloc. * parseinfo.c: Ditto. * root.c: Ditto. * server.c: Ditto. * zlib.c: Ditto. * scramble.c: Change some comments to refer to xmalloc rather than malloc. (Reported by Dan Peterson .) 2002-12-04 Derek Price * options.h: Remove CVS_ADMIN_GROUP. 2002-12-02 Larry Jones * commit.c (commit): Strip leading zeros from numeric revision in addition to trailing dots. (Reported by Peter Meszaros .) 2002-11-22 Larry Jones * sanity.sh: Note that the tests run for a long time. * checkout.c (safe_location): Use xstrdup, not strdup. (Reported by Terrence Enger .) 2002-11-19 Larry Jones * log.c (log_expand_revlist): Fix cross-branch correction code. * sanity.sh: Set $LANG for systems that ignore $LC_ALL. (rcs2-7): Change date offset from 100 months to 96 months to reduce periodic problems with invalid dates. 2002-11-12 Derek Price * sanity.sh (rcslib-symlink): Use rm -f rather than a simple rm when removing links because under some configurations of RH Linux 8.0 the script pauses to ask for removal approval. 2002-11-08 Derek Price * sanity.sh (importc): Update the use of the touch command to be compliant with POSIX 1003.1-2001, SUS2, and SUS3 now that GNU touch supports this. If this breaks any test platforms we should test the behavior of touch like we do for other tools. 2002-11-03 Derek Price * sanity.sh (rcs2-7): Notate with a wild untested hypothesis. 2002-11-03 Derek Price * sanity.sh (rcs2-7): Notate with three more failure dates. 2002-10-25 Derek Price * root.c: Change some calls to SYSTEM_CLEANUP() and then exit() to more appropriate calls to error_exit(). * server.c: Ditto. * tag.c: Ditto. 2002-10-24 Derek Price * buffer.c (stdio_buffer_shutdown): Remove the getc() call used to detect spurious output from clients since getc() would sometimes block and hang indefinately if the client kept the conection open but sent no data. Bug reports state that this hapened frequently with older clients connecting to 1.11.2 servers, especially when compression is enabled. (Original report from Mark D. Baushke . Original patch from Ralf S. Engelschall via Peter Wemm .) 2002-10-05 Larry Jones * recurse.c (start_recursion, do_recursion): Allow write locking in addition to read locking. Change all callers. * cvs.h: Change prototype to match, add lock types. * tag.c (rtag_proc, rtag_fileproc, tag_fileproc): Have start_recursion use write locks rather than calling lock_dir_for_write to avoid deadly embrace. 2002-10-04 Larry Jones * client.c (get_responses_and_close, connect_to_pserver): Set to_server and from_server to NULL after freeing. * main.c (main): Clear server_active when finished. Also neaten up the SERVER_SUPPORT ifdef's. * server.c (do_cvs_command): Set protocol_inbuf, stderrbuf, and stdoutbuf to NULL after freeing. (server_cleanup): Free buf_from_net and buf_to_set and set to NULL. Also reset error_use_protocol. (server): Don't SIG_register server_cleanup. main_cleanup (which is already registered) outputs a fatal error which causes it to be called; registering it directly results in it being called twice. (cvs_output): Don't try to use buf_to_net or protocol if they're NULL. 2002-10-03 Larry Jones * lock.c (readers_exist): Ignore our own read lock, if any, to allow upgrading an existing read lock to a write lock. * tag.c (rtag_proc, rtag_fileproc, tag_fileproc): Rather than locking the entire tree, have start_recursion establish read locks and then upgrade the read lock to a write lock (so only one directory is locked at a time). 2002-09-27 Larry Jones * add.c (add): Send "--" before file names. * admin.c (admin): Ditto. * annotate.c (annotate): Ditto. * commit.c (commit): Ditto. * diff.c (diff): Ditto. * edit.c (watch_onoff, editors): Ditto. * log.c (cvslog): Ditto. * remove.c (cvsremove): Ditto. * status.c (cvsstatus): Ditto. * tag.c (cvstag): Ditto. * update.c (update): Ditto. * watch.c (watch_addremove, watchers): Ditto. * sanity.sh (client-9): Update to match. 2002-09-24 Derek Price * options.h: Remove prototype of STDC exit() function. If this breaks a build, this should be detected in configure.in somehow rather than restoring the line to this file. 2002-09-24 Derek Price * options.h: Move definition of AUTH_CLIENT_SUPPORT into configure.in. 2002-09-24 Derek Price * options.h: Move definition of FORCE_USE_EDITOR into configure.in. 2002-09-24 Derek Price * options.h: Move definition of UMASK_DFLT into configure.in. 2002-09-24 Derek Price * Makefile.in: Regenerated using Automake 1.6.3. 2002-09-24 Larry Jones * filesubr.c, history.c, import.c, rcs.c, update.c: Use HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_RDEV instead of the obsolete HAVE_ST_BLKSIZE and HAVE_ST_RDEV. 2002-09-24 Derek Price * options.h: Move definition of TMPDIR_DFLT into configure.in. 2002-09-24 Derek Price * options.h: Move defininition of EDITOR_DFLT into configure.in. * Makefile.in: Regenerated. 2002-09-23 Jim Meyering If `cvs -d REPO commit ...' was used to override CVS/Root, then modified files in the directory from which cvs is invoked would not be committed. * client.c (arg_should_not_be_sent_to_server): The above would happen because this function would throw out a file name when CVS/Root did not match the current server. Fix by allowing the command-line- specified repository to take precedence over the value returned by Name_Root. Patch by Simon Walton . * sanity.sh (commit-d): New tests for the above. Patch by Simon Walton . 2002-09-20 Derek Price * options.h: Move definition of SERVER_FLOWCONTROL, SERVER_HI_WATER, and SERVER_LO_WATER into configure.in. 2002-09-20 Derek Price * options.h: Move definition of PATCH_PROGRAM to configure.in. 2002-09-18 Larry Jones * client.c (call_in_directory): Don't create admin directory when exporting into an existing directory. (Reported by Jens Engel .) * sanity.sh (basic2): New tests for above. 2002-09-16 Jim Meyering * server.c (do_cvs_command): Move declarations of locals, timeout and timeout_ptr, `up', out of enclosing `#ifdef SERVER_FLOWCONTROL' block. Otherwise, this file would not compile with SERVER_FLOWCONTROL turned off. Patch by Ed Santiago . 2002-09-15 Larry Jones * myndbm.c (mydbm_open): Open the file read/write rather than read- only if that's what the user asked for to ensure that the later open for write will succeed. (Patch submitted by Josh Lehan .) 2002-08-28 Larry Jones * logmsg.c (do_editor): Fix bug which prevented reusing log messages. (Reported by Eric Siegerman .) 2002-08-16 Derek Price * create_adm.c (Create_Admin): Assume RELATIVE_REPOS is set. * server.c (outside_root): Add comment. * options.h: Remove RELATIVE_REPOS & CVS_BADROOT. * sanity.sh: Remove a lot of !RELATIVE_REPOS cruft from tests. 2002-08-14 Derek Price * server.c (server): Dispose of the correct pointer. Tidy comment. 2002-08-13 Derek Price * client.c (get_cvs_port_number): Fix typo in comment. Add comments. * server.c (server): Fix a FIXME. Remove an errant "const" directive. Remove some redundant memory allocation and error handling code. 2002-08-08 Derek Price * import.c (import): Surrounded `server_active' with #ifdef SERVER_SUPPORT/#endif. * commit.c (commit_fileproc, commit_direntproc): Likewise. (Patch from John Tytgat .) 2002-07-31 Derek Price * filesubr.c: Add a line so VIM can determine tab stops and shift widths. * root.c: Ditto. * (parse_cvsroot): Add comments and tidy slightly. 2002-07-31 Derek Price * sanity.sh: Add another date to the comment about rcs2-7 failing. 2002-07-26 Jim Meyering * commit.c (find_fileproc): When committing in client mode, arrange to fail if a `cvs add'ed file no longer exists in the working directory. * sanity.sh (commit-add-missing): New test for above. 2002-07-25 Larry Jones * sanity.sh: Set $TMPDIR if it's not already set and use it rather than /tmp for the expected server temp directory path. 2002-07-09 Larry Jones * vers_ts.c (time_stamp_server, time_stamp): Eliminate unneeded struct_tm copying. * lock.c (lock_wait, lock_obtained): Display time in UTC if possible to reduce confusion in client/server mode. (Original patch from Eduardo Perez Ureta .) 2002-06-26 Larry Jones * tag.c (check_fileproc): When checking up-to-date, T_REMOVE_ENTRY is also a valid status. (Reported by David Everly .) * sanity.sh (tagc): New tests for above. 2002-06-18 Larry Jones * update.c (patch_file): Don't patch if diff bigger than file. Don't bother adjusting the permission on the diff output if we're not going to use it. 2002-06-18 Derek Price * server.c: Handle HPUX password expiration fields in the passwd string in case we are set up on a server with NIS passwords served from HPUX. (Original patch from John Cavanaugh .) 2002-06-17 Larry Jones and Jonathan Kamens * commit.c (commit_fileproc, commit_direntproc): Don't try to call an editor to get the log message if running as a server. Instead, just use an empty log message. * import.c (import): Ditto. * import.c (import): In client mode, always send a message to the server, even if it's empty (this parallels a change made by Larry Jones to commit.c on May 7). 2002-05-31 Larry Jones * rcs.c: Conditionally define MAP_FAILED for old systems that don't have it in . (Reported by jeremy brand .) 2002-05-24 Larry Jones * rcscmds.c (diff_exec): Add a -- before the first file name just in case it looks like an option. (Reported by Zooko .) * rcscmds.c (diff_execv): Remove -- same as diff_exec. Change only caller. * cvs.h: Ditto. 2002-05-23 Larry Jones * cvs.h (strcat_filename_onto_homedir): Make arguments const. * filesubr.c (strcat_filename_onto_homedir): Make arguments const, move more code here from callers, change all callers. 2002-05-22 Derek Price * cvs.h: Add prototype for this... * filesubr.c (strcat_filename_onto_homedir): new function. * login.c (): Use new function. * cvsrc.c (read_cvsrc): Use new function due to problems on VMS. * ignore.c (ign_setup): Ditto. * wrapper.c (wrap_setup): Ditto. (Original patch from Karsten Spang .) 2002-05-21 Larry Jones * rcs.c (rcsbuf_getkey): Correct off-by-one error in ptr assertion and add a similar assertion for ptrend. (Reported by Rebecca Young .) (rcsbuf_fill): Remove redundant code. 2002-05-20 Derek Price * buffer.h: New prototype for... * buffer.c (stdio_buffer_get_file): this new function to abstract access to a buffer's file descriptor. * client.c (auth_server): Use the new function. (Original patch from Jonathan Kamens .) 2002-05-20 Derek Price * main.c (main): Add 2002 to the copyright years output with the version string. 2002-05-15 Larry Jones * log.c (log_parse_list): Fix off-by-one error which caused incorrect handling of 'cvs log -wuser1,user2 foo.c' command. (Patch from Alexey Mahotkin , reported by Alex Morozov .) 2002-05-09 Larry Jones * login.c (password_entry_operation): Get cvsroot_canonical before trying to read the user's password file so we have it even if the file doesn't exist. (Reported by Sarah Thompson .) 2002-05-08 Derek Price * Makefile.am (cvs_SOURCES): Add options.h explicitly - since we stopped generating it dynamically, Automake stopped noticing it and including it in dists. See TODO item #214 for notes. 2002-05-08 Derek Price * cvs.h: Use the HAVE_CONFIG_H define. 2002-05-07 Larry Jones * filesubr.c (isaccessible): Set errno before returning failure in the SETXID_SUPPORT code. * logmsg (do_verify): Avoid even more work if there's no verifymsg script to run. * logmsg: Use fputs/putc rather than fprintf where appropriate. (do_verify): Run the verifymsg script even if there's no log message. (Reported by Andy Baker .) Don't reread the log message unless a verifymsg script was run. * commit.c (commit): Always send -m to the server, even if there's no message. * create_adm.c (Create_Admin): Add dotemplate parameter to trace. Remove unreachable code. 2002-05-03 Larry Jones * server.c (serve_watch_on, serve_watch_off, serve_watch_add, serve_watch_remove): Just pass "watch" as the command name to do_cvs_command to avoid unknown command errors. (Reported by Gary Hennigan .) * rcs.c (RCS_checkin): Fix bad call to error () in buggy PRESERVE_PERMISSIONS code. (rcs_internal_unlockfile): Include current value of errno in error message even though it may well be irrelevant (it's still better than nothing). 2002-05-02 Derek Price * .cvsignore: Remove lines for files obsoleted by new autotools. 2002-05-02 Derek Price * stamp-h2.in: Remove this uneeded file. 2002-05-01 Derek Price * options.h.in: Move to... * options.h: here. 2002-04-30 Derek Price * version.h.in: Remove this file. * version.h: Ditto. * Makefile.am: Remove references to version.h. * cvs.h: Use <> rather than "" around the config.h #include. I didn't quite bother to understand why, but autoconf recommends it. * cvsbug.in: Use PACKAGE_BUGREPORT defined by configure for the bug report email address. * version.c (version): Use PACKAGE_STRING defined in config.h instead of the version_string that used to be defined in version.h. * Makefile.in: Regenerated with automake 1.6. 2002-04-28 Derek Price * cvs.h: Use `"'s around includes when we mean a local file. 2002-04-28 Derek Price * cvs.h: #define new names for functions and variables when they might conflict with system definitions (namely on Mac OS X 10.1 with the most recent dev packages - This should be removable after the Mac dev packages are fixed.). 2002-04-26 Larry Jones * logmsg.c (do_editor): Fix assertion when CLIENT_SUPPORT not defined. (Reported by Matthias Andree .) 2002-04-19 Larry Jones * log.c (log_expand_revlist): First cut at code to allow logging between a revision and *any* ancestor, not just one explicitly on the same branch (e.g., from 1.1 to 4.1.2.3.6.1). * subr.c (gca): Simplify and optimize. 2002-04-19 Jim Meyering and Ed Santiago * classify.c (Classify_File): Fix it so that `cvs update -p -r...' works, even under some slightly unusual (though perfectly legitimate) circumstances. * sanity.sh (update-p): New tests for this. 2002-04-18 Derek Price * sanity.sh: Move test for regex metacharacters in username until after we're sure we found the version of expr that we're going to use. 2002-04-18 Larry Jones * admin.c (admin_fileproc): Allow admin to be used on RCS files with no local version (e.g., removed files) like most other subcommands. * wrapper.c (wrap_add): Update URL of -t/-f wrapper discussion. 2002-04-18 Derek Price * version.h: Regenerated for 1.11.2.1 version update. 2002-04-17 Derek Price * version.h: Regenerated for 1.11.2. 2002-04-03 Derek Price * stamp-h2.in: Regenerate with recent version of Autoconf. 2002-04-03 Derek Price * sanity.sh (TR): Send the stderr of one of the tool setup (tr) tests to /dev/null to avoid spurious output on some operating systems (notably Mac OS X). 2002-03-22 Larry Jones * sanity.sh (rcslib): Correct new tests to use ${testcvs} instead of cvs. 2002-03-21 Derek Price * vers_ts.c (time_stamp): Return the timestamp for the newer of the link and the link's source when the file is a link. (Patch from RedHat cvs-1.11.1p1-7 SRPM.) * sanity.sh (rcslib): Test for same. 2002-03-17 Larry Jones * log.c (cvslog, log_fileproc): Add -S option to suppress head or file name if no revisions selected. * sanity.sh (log): New tests for above. 2002-03-13 Derek Price * main.c (usg): Correct a spelling mistake in a comment. (Thanks to Matt Kraai .) 2002-03-09 Larry Jones * import.c (import): Change the suggested merge message to use rev tags instead of the branch tag with a date. * sanity.sh (import, importb): Change to match. * remove.c (remove_fileproc): Disallow removing files with sticky dates for the same reason we already disallow sticky numeric tags. * sanity.sh (sticky): New test for above. 2002-02-27 Larry Jones * diff.c (diff_fileproc): Treat dead revisions as nonexistent. 2002-02-26 Larry Jones * diff.c (diff): Remove -V and --paginate options: they aren't valid. (diff_usage): Document all the diff options. 2002-02-13 Larry Jones * rcs.c (RCS_gettag): Do not interpret an empty tag as HEAD (nothing else does and I don't see any documentation that says it should). (translate_symtag): Break out of loop at end of symbols to prevent looping forever when tag is "". (Reported by Alain ENOUT via Eric Gillespie .) 2002-02-11 Larry Jones * server.c (server_cleanup): Set buf_to_net back to blocking mode and flush it (in case there are any error messages pending) before shutting down buf_from_net and again right before shutting it down. 2002-02-08 Larry Jones * main.c (lookup_command_attribute): Throw a fatal error if the command is not found. * server.c (server_tag): Use the correct command name. 2002-01-30 Larry Jones * error.h (error_exit): Remove unintended prototype. * server.c (serve_root): Remove check for impossible condition. (serve_init): Save and restore current_parsed_root. 2002-01-29 Larry Jones * error.h (error_exit): Declare __noreturn__ to avoid spurious warnings. * server.c (serve_root): If the specified root doesn't match the pserver root, return before changing current_parsed_root to prevent subsequent commands from accessing an unchecked root directory. (server_init): Check specified root against the pserver root and complain if they don't match. Also, if there are pending errors, print them and return before changing current_parsed_root to prevent subsequent commands from accessing an unchecked root directory. * sanity.sh (pserver): New tests for above. 2002-01-10 Larry Jones * log.c (log_version_requested): Change :: in revision spec to be exclusive just on the low end (so -r tag1::tag2 gives revisions after tag1 but up to and including tag2), which is much more useful than the previous (exclusive at both ends) behavior. (log_usage): Update to match. * sanity.sh (log): Update to match. 2002-01-02 Larry Jones * server.c (LOG_DAEMON): Define if needed. (Patch from John David Anglin .) * server.c (pserver_authenticate_connection): Add a specific error message for EOF at protocol start and syslog if available. * sanity.sh (pserver-bufinit): Update to match. 2001-12-10 Larry Jones * log.c (log_usage): Note that -r and -d take lists, not just a single specification. (log_expand_revlist): Don't dereference null pointers when one end of a revision range is a non-existent tag. 2001-12-03 Larry Jones * annotate.c (annotate, annotate_fileproc): Don't annotate binary files unless new -F option given. * sanity.sh (basica, ann, ann-id, rcs, keywordlog, tagdate): Update to match. 2001-11-30 Larry Jones * admin.c (admin): Allow unrestricted usage of -q in addition to -k. 2001-10-25 Larry Jones * log.c (log_expand_revlist): Make erroneous or inconsistent revision specs select no revisions rather than all revisions. 2001-10-23 Larry Jones * import.c (add_rcs_file): Don't put an expand entry into the file for the default expansion mode (kv). * wrapper.c (wrap_send, wrap_unparse_rcs_options): Process entries with default expansion mode since they may be needed to avoid matching a more general entry later. (wrap_add): Set rcsOption to NULL for default (kv). (wrap_add_entry): Use structure assignment to copy entries rather that copying members by hand. * sanity.sh (binwrap3): Revise to test wrapper entries that don't specify any non-default options but just prevent matching later, more general entries. 2001-10-02 Larry Jones * rcs.c (RCS_fully_parse): Add revision number to more error messages. 2001-09-27 Larry Jones * rcs.c (RCS_fully_parse, RCS_getdeltatext): Add the missing revision number to the "mismatch" error message. * sanity.sh (multiroot2-9a): Update to match changes to lock.c. 2001-09-26 Larry Jones * lock.c (Lock_Cleanup, Reader_Lock, write_lock): Add trace messages. 2001-09-24 Derek Price * find_names.c (add_entries_proc): Leave closure specified as such in the function definition for clarity. * find_names.c (Find_Names): Use 'closure' feature of walklist() to eliminate the static variable. (add_entries_proc): Expect closure to be the file list. (Patch from Alexey Mahotkin .) 2001-09-19 Derek Price * rcs.c (rcsbuf_valpolish_internal): Restore one of the "if ( ... ) abort();" sequences since it seems to check the validity of the RCS file rather than for a programming error. Also added a FIXME comment to the effect that we should explain the RCS file error to the user as such if it is such. (Thanks to Larry Jones .) 2001-09-19 Derek Price * rcs.c (rcsbuf_getkey, rcsbuf_valpolish_internal): Replace some code of the form "if ( ... ) abort();" with equivalent calls to assert(). 2001-09-17 Derek Price * myndbm.c (mydbm_load_file): Fix buffer overflow error and make error messages more informative. * sanity.sh (modules6): New test. (Original report from Taska and others.) 2001-09-14 Derek Price * logmsg.c (do_verify): Dispose memory when finished with it. 2001-09-07 Larry Jones * mkmodules.c (notify_contents): In the example, move the %s to the end since many, if not most, versions of mail insist on options coming before addresses. 2001-09-06 Derek Price * login.c (login): Deal with NULL return value from getpass. 2001-09-04 Derek Price * Makefile.in: Regenerated with automake 1.5. * stamp-h2.in: Ditto. 2001-09-04 Derek Price * main.c (main): Fix empty CVSROOT message to specify `valid' instead of `legal'. 2001-09-04 Derek Price * server.c (pserver_authenticate_connection): Back out changes from the 30th and... * getline.c (getstr): init the buffer instead. 2001-08-31 Derek Price * Makefile.in: Backed out accidental commit from yesterday. 2001-08-30 Derek Price * server.c (pserver_authenticate_connection): Don't print from the NULL pointer in the error message string in the case where the client didn't send any data. * sanity.sh (pserver): Test for this case. (Report from Mark Welch ). 2001-08-24 Derek Price * logmsg.c (do_editor): Add comment and assertion. * import.c (import): Don't call do_editor with a repository argument in client mode. (Report and original patch from darkness .) 2001-08-24 Larry Jones * log.c (log_expand_revlist): Arrange for nil revision specs to select nothing instead of everything. * sanity.sh (log): New tests for above. 2001-08-24 Derek Price * parseinfo.c (Parse_Info): Change the function name in the trace and add the client/server string. 2001-08-24 Derek Price * Implement RereadLogAfterVerify CVSROOT/config option to control FreeBSD read-write of log messages in the verification script. * logmsg.c: RereadLogAfterVerify defaults to LOGMSG_REREAD_NEVER to preserve the status quo. * parseinfo.c (parse_config): Add parsing for RereadLogAfterVerify option. Possible values are: no | never | yes | always | stat * cvs.h: Add extern for RereadLogAfterVerify and new value macros LOGMSG_REREAD_NEVER, LOGMSG_REREAD_ALWAYS, LOGMSG_REREAD_STAT for its values. (Patch from Mark D. Baushke .) * Apply changes from FreeBSD cvs sources to implement a read-write user-defined verification script. * logmsg.c (do_verify): Update do_verify to expect a pointer to the saved message. The log file passed to the verifymsg_script should be re-read after the user-defined verification script has been run. The user-defined verification script is allowed to modify the message. This allows the script to add extra information to the log message or to remove template lines that are not needed. * cvs.h: Update prototype for do_verify prototype to expect a pointer to the saved_message. * commit.c (commit, commit_fileproc, commit_direntproc): Update calls to do_verify as the saved_message arg is now read-write. * import.c (import): Update calls to do_verify as the saved_message arg is now read-write. * sanity.sh (info-v4-[12]): Rename the old info-v4 test to info-v5 and add a new info-v4 test case have the verification script modify the log message to test the above changes. (Patch from Mark D. Baushke .) * logmsg.c: Change RereadLogAfterVerify default to always. (do_verify): Reformat and make minor fixes to Mark's patch. * mkmodules.c (config_constants): Add comment about RereadLogAfterVerify. * sanity.sh (info-rereadlog): Rename the tests from Mark's patch and reformat them a bit. 2001-08-23 Derek Price * sanity.sh (info): Demonstrate that the verifymsg scripts can sometimes, but not always, retreive information on which directory is being committed to. 2001-08-22 Derek Price * logmsg.c: Back out the last change - the repository which is passed in is actually the directory and changes with each call to do_verify. If a verifymsg script is using `pwd`, this could change the operation. * cvs.h: Ditto. * commit.c: Ditto. * import.c: Ditto. 2001-08-22 Derek Price * logmsg.c (do_editor): Return reused_message. (do_verify): Don't verify the same log message more than once. * cvs.h: Update prototypes for do_verify and do_editor. * commit.c (commit_fileproc, commit_direntproc): Use the new functionality. * import.c (import): Ditto. 2001-08-22 Derek Price * logmsg.c (do_verify): Remove an unecessary "else" clause following an exit and unindent the former contents. 2001-08-22 Derek Price * commit.c (commit): Don't call do_verify in client mode since we know do_verify will just return anyhow. 2001-08-20 Derek Price * Makefile.am (cvs_SOURCES): Add version.c and version.h. (BUILT_SOURCES): Add version.h. (Maintainer Targets): Remove version.h. * version.c: Remove @VERSION@ dependant bits. * version.c.in: Removed. * version.h.in: New file. (Original patch from Alexey Mahotkin .) * Makefile.am: Various modifications to make Automake, make dist, and windows targets work like they are supposed to. * version.h: New (generated) file. * Makefile.in: Regenerated. 2001-08-09 Derek Price * client.c (socket_buffer_shutdown): Use recv instead of read and return 0 on success. (Patch from "Manfred Klug" .) 2001-08-09 Derek Price * buffer.c (stdio_buffer_shutdown): Assume the buffer is not a socket when NO_SOCKET_TO_FD is defined. * client.c (make_bufs_from_fds): Add is_sock argument and remove fstat call and reference to S_ISSOCK since these functions aren't available under Windows. (connect_to_forked_server, connect_to_pserver, start_tcp_server, start_server, start_rsh_server): Use new argument. (Patch from "Manfred Klug" .) * buffer.c (stdio_buffer_shutdown): Various reformattings, fix bug where rsh pipes weren't being closed. 2001-08-09 Derek Price * sanity.sh (rmadd, rm-update-message, join-two-branch, ignore-on-branch): Change a few references to `cvs' to `$PROG'. 2001-08-07 Derek Price * build_src.com: Add annotate.c/annotate.obj,verify, correct zlib name. * patch.c: VMS time_t appears to be unsigned. Add a cast when testing for (time_t)-1. * subr.c: #else,#endif for no symlinks should be moved. (Patch from Mike Marciniszyn .) 2001-08-06 Derek Price * Makefile.in: Regenerated. 2001-08-01 Derek Price * diff.c (diff): Send long option for side-by-side diffs to the server rather than '-y', for backwards compatibility with old servers. (Original patch from Peter Mathiasson .) 2001-07-19 Larry Jones * mkmodules.c (cvswrappers_contents): Remove -t/-f since they're disabled in wrapper.c. * checkout.c (checkout): Don't complain about checking out into the repository when piping output. (Reported by der Mouse .) * sanity.sh (checkout_repository): New tests for above. 2001-07-10 Larry Jones * sanity.sh (importc-7): Now works correctly in local mode. * commit.c (commit_dirleaveproc): We're still in the directory when this is called, so the first argument to Name_Repository needs to be NULL, not dir. * sanity.sh (rmadd): New tests for above. * commit.c (commit): Reword error messages for committing as root. 2001-07-08 Larry Jones * rcs.c (RCS_checkout): Correct scanf format to allow for trailing NUL terminator. * update.c (special_file_mismatch): Ditto. (Reported by Pekka Savola .) 2001-07-05 Larry Jones * client.c, root.c: Fix -Wall warnings. * buffer.c: #include socket header to declare shutdown(). * rcs.c (rcsbuf_open): Use getpagesize() instead of sysconf() for portability. (RCS_copydeltas, rcsbuf_fill): Fix -Wall warnings. 2001-07-04 Derek Price * Makefile.in: Regenerated with new Automake release candidate 1.4h. 2001-07-03 Derek Price * rcs.c (rcsbuf_open): Reduce memory consumption still further by not mmapping the entire file when pos is specified. (rcsbuf_cache_open): Add FIXME comment wrt read-only mmaps and rcsbuf caching. 2001-07-03 Derek Price * rcs.c (rcsbuf_open): Use mmap when possible to reduce memory consumption, especially with large (e.g. binary) files. (rcsbuf_close): Call munmap. (rcsbuf_getkey): Remove the buffer fill code when using mmap. (rcsbuf_getrevnum): Ditto. (rcsbuf_fill): Remove this function when using mmap. (rcsbuf_cache_open): Mostly don't use this function with mmap. (RCS_copydeltas): Don't depend on the file pointer with mmap. * stamp-h2.in: Regenerated. 2001-07-03 Derek Price * update.c: Indent compiler directives. 2001-07-02 Larry Jones * import.c (update_rcs_file): Use -kb instead of -ko when comparing binary files. (Reported by Gyula Faller .) 2001-06-28 Larry Jones * checkout.c (checkout): Explicitly initialize all the static options so that multiple calls work right. Also fix potential memory leaks. (Reported by Dr. Dieter Maurer .) 2001-06-28 Derek Price * Makefile.in: Regenerated with new version of Automake. 2001-06-28 Larry Jones * checkout.c (checkout): Set history_name for export as well as checkout. (checkout_proc): Use it. * checkout.c (safe_location): Add missing argument in error message. 2001-06-26 Larry Jones * recurse.c (start_recursion): Use strip_trailing_slashes instead of doing it by hand. * server.c (pserver_authenticate_connection): Don't clear out descrambled_password until *after* it's (potentially) logged. (Reported by Eric Hanchrow .) 2001-06-25 Larry Jones * recurse.c (start_recursion): Deal with at least some of the cases where trailing slashes cause confusion. (Reported by Malcolm Fernandes .) * sanity.sh (basica, basicb): Tweak existing tests to check this. 2001-06-22 Larry Jones * sanity.sh (modules5): New tests with -d on command line. 2001-06-21 Larry Jones * modules.c (do_module): Use run_module_prog and server_active to determine when to call server_prog instead of using server_expanding so that we get the right paths in the replies as long as we take mwhere into account in addition to where. (Reported by Pascal Bourguignon .) * server.c (server_prog): Use protocol pipe instead of buf_to_net. * sanity.sh (modules5): Remove FIXCVS comment and update to match. * server.c, server.h: Remove server_expanding since now unused. 2001-06-21 Larry Jones for Stephen Rasku * admin.c: Corrected spelling mistakes in help. 2001-06-20 Derek Price * client.c (socket_buffer_shutdown): Fix untested typos. (Reported by "Jerzy Kaczorowski" .) * buffer.c (stdio_buffer_shutdown): Put the call to SHUTDOWN_SERVER in the correct place. 2001-06-20 Derek Price * logmsg.c (do_editor): Abort in the case that the file has only comment lines. (Original patch from Mark Valentine .) * logmsg.c (do_editor): Fix rare memory leak. * sanity.sh (editor): Add tests for aborted log messages. 2001-06-20 Larry Jones * server.c (switch_to_user): Only set $CVS_USER if AUTH_SERVER_SUPPORT is defined. (Reported by Nalin Dahyabhai .) 2001-06-13 Derek Price * client.c: Fix incorrect fixed-size buffer usage in connect_to_gserver(). (Minor changes to a patch from Alexey Mahotkin .) 2001-06-11 Derek Price * main.c (main): Always print $CVSROOT when parse_cvsroot fails. * root.c (parse_cvsroot): Tidy error messages and provide more consistent behavior. * sanity.sh (crerepos): Adapt to new error messages. (Suggested by Alexey Mahotkin .) 2001-06-08 Derek Price * sanity.sh (tagf-28): Use $CVSROOT_DIRNAME. 2001-06-07 Larry Jones * rcs.c (RCS_unlock): Reverse kj's change of 1999-10-18: a bare -u should never break locks, you have to specify a specific revision to do that. Also add an informative message for a bare -u when the user doesn't hold any locks. * commit.c (unlockrcs): Make RCS_unlock quiet, like RCS_lock. * sanity.sh (rmadd-24): Update to match. * sanity.sh (crerepos-6a): Set CVS_RSH for ${testcvs}, not for dotest_fail. Allow for "broken pipe" rather than "end of file". 2001-06-07 Derek Price * sanity.sh (tagf): Use $CVSROOT_DIRNAME rather than /tmp/cvs-sanity/cvsroot. 2001-06-06 Derek Price (Reformatting, bug fixes, tests, and comments to a patch from Stephen Cameron .) * tag.c: (rtag_fileproc, rtag_delete, tag_fileproc) Changed behavior of "cvs tag -F", "cvs tag -d", "cvs rtag -F" and "cvs rtag -d" so that they will not disturb existing branch tags unless a new "-B" option is given. * sanity.sh (tagf-16 - tagf-33): Added tests for new -B option to "cvs tag" and "cvs rtag" 2001-06-06 Derek Price * sanity.sh (crerepos-6a): Set CVS_RSH=false and only for the actual test call at Larry's suggestion. Also, test the error message since it's fixed now. 2001-06-05 Larry Jones * rcs.c (RCS_unlock): Note when breaking someone else's lock. (Reported by MURVAI-BUZOGANY Laszlo .) * sanity.sh (reserved-14): Update to match. 2001-06-05 Derek Price * sanity.sh (crerepos-6a): Set CVS_RSH=/bin/false... this is a local mode only test anyhow. (Thanks to Larry Jones and Morgan Burke .) 2001-05-31 Derek Price * sanity.sh (rcs2-7): Add today to the list of failure dates for rcs2-7 in the hopes that the data will eventually prove useful to someone motivated enough to fix the problem. 2001-05-30 Derek Price * stamp-h2.in: Regenerated. 2001-05-30 Derek Price * *: Various bug fixes and comments for the following patch from Donald Sharp : * checkout.c (safe_location): cvs co -d still had failure modes from the way the -d option works. * sanity.sh: Misc error message resynching. 2001-05-29 Derek Price * Makefile.am (cvs_SOURCES): Add root.h. * Makefile.in: Regenerated. * stamp-h2.in: Regenerated. 2001-05-29 Derek Price * checkout.c (safe_location): Correct formatting. 2001-05-29 Derek Price * root.c (parse_cvsroot): Fix a comment. 2001-05-26 Larry Jones * checkout.c (safe_location): Use old-style definition to keep non-ANSI compilers happy. * sanity.sh (check_respository): Use ${CVSROOT_DIRNAME} instead of /tmp/cvs-sanity/cvsroot. 2001-05-25 Larry Jones * sanity.sh (modules5): Add sleep to script to help avoid out of order messages. * filesubr.c (mkdir_if_needed): Return 1 if the directory exists reguardless of what errno is set to. (Reported by "Robinson, Greg" .) 2001-05-25 Derek Price for Donald Sharp * checkout.c: Modified safe_location() to refuse checkout if the -d option to co specifies inside of the repository. * import.c: New parameter to safe_location needed to be added. * cvs.h: New parameter to safe_location needed to be added. * sanity.sh: Test case to test for failure mode. 2001-05-23 Larry Jones * checkout.c (checkout_proc): Don't build top_level_admin directory when exporting. (Reported by Tony Byrne .) 2001-05-21 Derek Price * client.c: Fix a mispelling in a comment. (Patch from Alexey Mahotkin ). 2001-05-05 Larry Jones * login.c (password_entry_operation): Only warn if unable to open .cvspass for reading: may be initial login and it doesn't exist yet. 2001-05-15 Derek Price * client.c (start_tcp_server): Use the struct sockaddr_in declared in the function. (Reported by Emil Isberg .) 2001-05-05 Larry Jones * annotate.c (annotate): Pass local to do_module and rannotate_proc so that -l actually works. * log.c (cvslog): Ditto. * patch.c (patch): Ditto; make local local instead of global. (patch_proc): Use local_specified parameter instead of global. * tag.c (cvstag, rtag_proc): Ditto. 2001-05-05 Larry Jones * client.h: Declare "struct buffer" outside prototype for __STDC__ compilers. 2001-05-04 Derek Price * client.c: General refactoring. Removed several global variables in favor of passing locals and/or dynamic evaluation. (recv_line): Removed this function. (make_bufs_from_fds): New function with factored code. (connect_to_forked_server): New prototype. Use new functions. (connect_to_pserver): New prototype. Use new functions. (connect_to_gserver): New prototype. Use new API. (auth_server): Factored this portion of the pserver code so it can be shared. Rewrote to use buffers rather than depending on a socket. (start_rsh_server): New prototype. Use new API. (start_tcp_server): New prototype. Use new API. (start_server): Factor some code. Use new API. * client.h: New prototypes. * cvs.h: Gratuitous reformatting. Use new root.h. * login.c (login): Use new connect_to_pserver API. * root.h: New file. Contains some code that used to be in cvs.h. 2001-05-04 Derek Price * client.c: Gratuitous reformatting. * client.h: Ditto. 2001-05-04 Derek Price * zlib.c (compress_buffer_shutdown_input): Use new buffer shutdown prototype. (compress_buffer_shutdown_output): Ditto. (Thanks to Pavel Roskin .) 2001-05-03 Derek Price * buffer.c (struct stdio_buffer_closure): New structure to hold a FILE * and the child's PID when necessary. (stdio_buffer_initialize): Change proto to accept PID. Set up new closure. Pass new stdio_buffer_shutdown to buf_initialize. (stdio_buffer_input): Use new closure. (stdio_buffer_output): Ditto. (stdio_buffer_flush): Ditto. (stdio_buffer_shutdown): New function. Teach buffer to close itself. (packetizing_buffer_shutdown): Use new buffer shutdown proto. * buffer.h (struct buffer): New buffer shutdown proto. (stdio_buffer_initialize): New proto. * client.c (log_buffer_shutdown): Use new proto. (socket_buffer_initialize): Pass shutdown func. (socket_buffer_shutdown): New function. * server.c (get_responses_and_close): Remove most of the guts. Rely on the buffer shutdown function from now on. (start_rsh_server): Return child PID. 2001-05-03 Larry Jones * history.c (history_write): Handle the case where the user's home directory doesn't exist gracefully instead of erroring out. (Reported by David Hoover .) 2001-05-03 Derek Price * cvs.h: s/allocate_and_strcat/xrealloc_and_strcat/ since that is what I wrote in the ChangeLog, oh, so long ago. * diff.c (diff): Ditto. * subr.c (allocate_and_strcat, xrealloc_and_strcat): Ditto. 2001-05-02 Larry Jones * rcs.c (RCS_getdate): Handle the (unusual!) case where we can't find any revisions at all. (Reported by Ryan Grow .) 2001-04-30 Larry Jones * sanity.sh (multiroot2-9a): Rename (from multiroot2-9) to avoid duplicate names; fix to work without SERVER_SUPPORT defined. (Reported by Pavel Roskin .) 2001-04-29 Derek Price * Makefile.am (check-local): Make dependent on localcheck and remotecheck and move old check target... (localcheck): here. * Makefile.in: Regenerated. 2001-04-27 Larry Jones * sanity.sh (pserver): Add tests for readers and writers. 2001-04-27 Derek Price * sanity.sh (version-2r): Update to handle patch releases in version numbers. 2001-04-27 Derek Price * version.c: Regenerated. 2001-04-27 Derek Price * version.c: Regenerated. 2001-04-27 Larry Jones * main.c (lookup_command_attribute): Lookup specified command, not whatever's in the global command_name. 2001-04-25 Derek Price * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400. * version.c: Regenerated. 2001-04-22 Larry Jones * tag.c (tag_check_valid): Make an unwritable val-tags file a warning instead of a fatal error. 2001-04-20 Larry Jones * annotate.c (annotate_usage): -r and -D are not mutually exclusive. * main.c (cmd_usage): Add missing version subcommand. * update.c (update_usage): Add missing -C option. * sanity.sh (death2): New tests for previous change. * classify.c (Classify_File): Treat a dead revision like the RCS file doesn't exist. * sanity.sh: Update to match. 2001-04-16 Larry Jones * checkout.c, update.c: Fix usage messages: -r and -D are not mutually exclusive. (Suggested by David L. Martin .) * logmsg.c (do_editor): Don't add a blank line to the message. * sanity.sh (editor-log-file*): Update to match. * checkout.c, update.c: Note in usage message that -k is sticky. * server.c: (server_cleanup, wait_sig): Remove ancient SunOS kludge. (Suggested by Rob Saccoccio .) 2001-04-04 Larry Jones * sanity.sh (dotest, dotest_lit, dotest_fail, dotest_status, dotest_sort): Don't count on $? being set in then or else clauses. * ignore.c (ignore_files): Collect unignored files into a list and sort it before calling PROC to avoid order dependencies. Rewrite the while loop to allow normal continues instead of goto. 2001-04-04 Derek Price * sanity.sh (ignore-on-branch-3): Fix in the remote case. 2001-04-03 Larry Jones * update.c (update_fileproc): Remove unused variable (resurrecting). 2001-04-03 Derek Price Larry Jones reported by Jakob Bøhm * update.c (update_fileproc): Don't store a file with T_UNKNOWN status in ignlist if present in the sandbox. * sanity.sh (ignore-on-branch): New test. (ignore): Tidy this test. 2001-04-02 Derek Price * sanity.sh: Make sure the test for `id' fails when a nonstandard `id' is used and the user is root. Fix some quoting in error messages. (fork): Take `cvs' out of the PATH. (TODO): Add note about the test suite not working with user names over eight characters in length. 2001-04-02 Derek Price * sanity.sh (fork): New test for CVS_SERVER default. (TODO): Note about eventually removing most of the references to CVS_SERVER. 2001-04-02 Larry Jones * client.c (connect_to_forked_server): Use program_path as the default server instead of "cvs". 2001-04-02 Derek Price * sanity.sh: Use less obfuscated English in my comment about sanity checking sanity.sh. 2001-04-02 Derek Price * sanity.sh (rm-update-message): Create a test directory again but change back to the correct directory upon completion this time. 2001-04-02 Derek Price * sanity.sh: Change last two '[.*]'s to 'test's for consistency and remove... (TODO): the note from the TODO list. 2001-04-02 Derek Price * sanity.sh: Add test for PWD before successful exit. 2001-03-30 Larry Jones * sanity.sh (rm-update-message): Remove duplicate code. 2001-03-30 Derek Price * sanity.sh (rm-update-message): New test for local/client-server warning message discrepency. 2001-03-30 Larry Jones * annotate.c: Move annotate() here from rcs.c, support rannotate. * Makefile.am, Makefile.in: Add annotate.c. * main.c (cmds[], cmd_usage[]): Add rannotate. * rcs.c: Move declarations of rcs_delta_op and RCS_deltas to... * rcs.h: ... here. * server.c (serve_rannotate): New. (requests[]): Add rannotate. * sanity.sh (ann): New tests for rannotate. * log.c (rlog_proc): Remove dead code. 2001-03-30 Derek Price * sanity.sh (join-readonly-conflict): Run more of this through dotest. 2001-03-30 Larry Jones * log.c (log_fileproc): Don't output working file for rlog. * sanity.sh (log): New tests for rlog. * cvs.h (mtype): Add MISC type. * log.c (cvslog): Support rlog as well as log. (rlog_proc): New. * main.c (cmds[], cmd_usage[]): Add rlog. (main): Remove old rlog warning message. * server.c (serve_rlog): New. (requests[]): Add rlog. 2001-03-29 Derek Price * sanity.sh: cd to $TESTDIR once after it is normalized. Make TODO on history and symlinks more specific. Tested properly this time. 2001-03-29 Larry Jones * main.c (cmds[], lookup_command_attribute, main): Include the command attributes in the global command table instead of inferring them from the command names. Change the sense of the CVS_CMD_IGNORE_ADMROOT attribute to match its name. 2001-03-29 Derek Price * sanity.sh (*, basic2-64): Remove references to TMPPWD. Fix FIXME at end of script now that $TESTDIR can't be relative. 2001-03-29 Derek Price * sanity.sh: Normalize TESTDIR even when the user set it. 2001-03-29 Larry Jones * client.c (connect_to_pserver, start_tcp_server): Add IP address to connect failed message. (connect_to_forked_server, connect_to_pserver, start_tcp_server): Add trace messages ala start_rsh_server. (start_rsh_server): Include entire command in trace message for START_RSH_WITH_POPEN_RW like ! START_RSH_WITH_POPEN_RW does. 2001-03-29 Derek Price * sanity.sh: Global search & replace ${TESTDIR}/cvsroot with ${CVSROOT_DIRNAME} for consistency. 2001-03-29 Derek Price * sanity.sh (conflicts-12[68].5): Remove sanity hack which has allowed for a CVS bug since May 96/97. Not sure when the bug went bye-bye, but the tests broke when $TESTDIR != $TMPPWD. 2001-03-26 Larry Jones * classify.c (Classify_File): Don't report a conflict for a removed file when piping. Also simplify the code structure. (Reported by Milos Kleint .) * sanity.sh (rmadd2-14[abc]): New tests for above. 2001-03-24 Noel Cragg * diff.c: mods to allow `-T' and `-y' options to be passed through to the diff library. This wasn't allowed earlier because of a similarly named options that got passed through to the old rcs programs. We've long since stopped sending `-T' to any rcs utility and have never used `-y'. Any users of moldly CVS versions which used to support `-T' have (hopefully) upgraded to one where that option isn't supported. It seems reasonable to enable them again and pass them through. (sanity.sh still works anyways...) (longopts): add short option equivalents for --initial-tab and --side-by-side. (diff): add new short options to getopt string and switch statement. 2001-03-22 Larry Jones * sanity.sh: Add check for ${DOTSTAR} with large matches. 2001-03-23 Derek Price * sanity.sh: Do the same as below for $keep. 2001-03-23 Derek Price * sanity.sh: Replace 'remote=(yes|no)' with 'remote=(:|false)' since often 'false' and more often ':' are shell builtins. This makes the succinct, 'if $remote; then' faster than 'if test $remote = yes; then'. Alter tests in the rest of the script to match the new usage. Added a suffix of 'r' to remote test names when it was appropriate and I remembered. Some reformatting. 2001-03-22 Larry Jones * sanity.sh (diffmerge1_yours, diffmerge1_mine): Check for exact output instead of using wildcards to avoid buffer overflows in some versions of expr. 2001-03-21 Derek Price * sanity.sh: cd to '/tmp' again rather than $HOME since HOME was set to a value inside ${TESTDIR} by the script. 2001-03-20 Derek Price * sanity.sh (diffmerge1): Minor formatting and syntax changes. for Jacob Burckhardt * sanity.sh (diffmerge1): More merging behavior tests. Specifically, test some cases which broke before in Karl Tomlinson's diff fix was checked in today. 2001-03-20 Derek Price * sanity.sh: Don't use unescaped parens in sh outside of quotes. 2001-03-20 Derek Price * sanity.sh: Don't remove ${TESTDIR} when -k (keep) set. 2001-03-20 Derek Price * sanity.sh: Change usage to match the new getopts format and comment. 2001-03-16 Derek Price * sanity.sh (modules2-nestedrename): New test. Verifies behavior of renames nested under an ampersand module. (modules2-ampertag): New test. Verifies an error condition which prevents some ampersand modules from being checked out when a tag is specified. 2001-03-16 Derek Price * sanity.sh (modules2): Additional test for ampersand module behavior with '-d'. for Greg Klanderman * checkout.c (build_one_dir): Fix typo where clauses of two conditionals were reversed in call to Create_Admin. This caused the CVS/Tag file to be removed in cases where it should have been set, and vice-versa. It only surfaced in rare cases as this code is only invoked when using the -d option to build the path to check out in. Further, the bug would only matter when checking out a module containing ampersand modules within it, via client/server CVS. 2001-03-16 Derek Price * sanity.sh (admin-28-5): Confirm that a missing tag during an 'admin -n' operation is not a fatal error. 2001-03-16 Derek Price * admin.c (admin_data): Remove 'quiet' member. (admin_fileproc): Use global 'really_quiet' rather than admin_data->quiet. 2001-03-16 Derek Price * sanity.sh (admin): Replace hardcoded testdir path with the variable. 2001-03-15 Derek Price * sanity.sh (basica, binfiles, head, admin): Adjust for new messages. * admin.c (admin_fileproc): Only print messages when not in really_quiet mode. for Stephen Rasku * rcs.c (RCS_tag2rev): Make a missing tag a survivable error. 2001-03-15 Larry Jones * subr.c (sleep_past): Fix various bugs that would result in a negative sleep time if it weren't unsigned; since it is, it would result in a very large sleep time. Ensure that us is always less than 1000000. Don't try to sleep for more 1 sec with usleep. Cast NULL select arguments to correct type just in case. 2001-03-14 Derek Price * subr.c (sleep_past): New function. * client.c (get_responses_and_close): Use new function. * commit.c (commit): Ditto. * update.c (do_update): Ditto. * cvs.h: Prototype new function. * stamp-h2.in: Regenerated. 2001-03-14 Derek Price * Makefile.in: Regenerated. * stamp-h2.in: Ditto. 2001-03-14 Larry Jones * commit.c (check_fileproc): Allow adding on the trunk when there's an existing non-Attic RCS file as long as the head revision is dead. This can happen due to an aborted resurrection. (commit_fileproc): When resurrecting, consider the dead revision along with the other files' revisions. (findmaxrev): Avoid unnecessary work. (checkaddfile): Only warn if file isn't in Attic as expected. (Reported by Ross Burton .) * sanity.sh (basica-r*): New tests for above. (basica-o4): Update to match. 2001-03-09 Larry Jones * edit.c (edit_fileproc, unedit_fileproc): Some implementations of asctime/ctime apparently use a leading zero on the date instead of the space required by the C Standard. Correct for this so that shared working directories work without hassle. (Reported by David L. Martin .) * entries.c (fgetentent): Ditto. * vers_ts.c (time_stamp_server, time_stamp) Ditto. 2001-03-07 Larry Jones * sanity.sh (basica, binfiles2, head, admin): Update to match change to admin.c. 2001-03-06 Larry Jones * client.c (recv_bytes): Handle EOF as in recv_line(). (Reported by Pavel Roskin .) * admin.c (admin_fileproc): Change final error message to clarify that CVS refused to modify the RCS file rather than being unable to. 2001-02-28 Jim Meyering * commit.c (commit_usage): Use `-F logfile' (rather than -F file') in the description of that option, to be consistent with the `-F logfile' in the Usage: line. Use spaces instead of TAB characters, and realign. 2001-03-02 Derek Price * sanity.sh (crerepos): Make failed ${CVS_RSH-rsh} attempt print the name of the command it actually used rather than 'rsh'. 2001-02-27 Derek Price * sanity.sh (modules2-ampermod-*): Added these tests to make sure the top level directory is created in an ampermodule when '-n' is passed to checkout. original bug report from Wolfgang Haefelinger 2001-02-27 Derek Price * sanity.sh (version-[12]): replace ' (client/server)' with .* in these two tests so that 'make check' works with whatever client/server options the executable was compiled with. 2001-02-23 Derek Price * main.c (main): Only check a cvsroot_t's isremote member when client support is enabled. * server.c: Include GSSAPI headers with client support as well as server support. 2001-02-21 Larry Jones * modules.c, cvs.h (do_module): Add build_dirs argument and use it instead of run_module_prog. Change all callers. * tag.c (cvstag): For rtag, don't build directories. * sanity.sh (modules3): Update to match. 2001-02-20 Derek Price * client.c: Use xgssapi.h. * server.c: Ditto. 2001-02-15 Derek Price * Makefile.am (cvs_SOURCES): Correct error from yesterday. * Makefile.in: Regenerated. 2001-02-14 Derek Price * server.c: Include xselect.h. * update.c (do_update): Use best available sleep function. 2001-02-14 Derek Price * Makefile.am (cvs_SOURCES): Alphabetize and split to one/line. (cvs_LDADD): Alphabetize and split to one/line. * Makefile.in: Regenerated. 2001-02-14 Larry Jones * build_src.com: Remove references to rtag.c & rtag.obj. 2001-02-13 Derek Price * main.c (date_to_tm): New function to convert an RCS date string to a struct tm. (tm_to_internet): New function to convert a struct tm to a date string as specified by RFC822 and amended by RFC 1123. (date_to_internet): Use the above two functions and a struct tm intermediary for conversion. * patch.c (patch_fileproc): Answer somebody's comment and use the new diff_exec API. * rcs.c (RCS_checkin): Use new diff_exec API. (RCS_delete_revs): Use new diff_exec API. (make_file_label): If the file name is DEVNULL, date it the Epoch for compatibility with the POSIX.2 spec and Larry Wall's patch implementation. * rcscmds.c (diff_exec): Accept new label arguments. * sanity.sh (death2): Update some diff tests to accept the new format. * update.c (patch_file): Use new diff_exec API. * diff.c (diff_fileproc): Create header labels appropriate for compatibility with the Larry Wall version of patch. (diff): Rename calls to strcat_and_allocate. (strcat_and_allocate): Rename and move... * subr.c (xrealloc_and_strcat): here. * cvs.h: Update prototypes to match. 2001-02-13 Derek Price * Makefile.am (cvs_SOURCES): Remove rtag.c. 2001-02-07 Larry Jones * sanity.sh (directory_cmp): Return status rather than setting ISDIFF. (basic2): Rewrite using dotest. 2001-02-06 Larry Jones * tag.c, rtag.c: Merge with tag.c being the surviving file. * Makefile.in: Update to match. * main.c (cmds): rtag() => cvstag(). * server.c (serve_rtag): Ditto, and set command name. 2001-02-06 Derek Price Rex Jolliff Shawn Smith * add.c: Replace opendir, closedir, & readdir calls with CVS_OPENDIR, CVS_CLOSEDIR, & CVS_READDIR in support of changes to handle VMS DEC C 5.7 {open,read,close}dir problems. Check today's entry in the vms subdir for more. * filesubr.c: ditto * find_names.c: ditto * ignore.c: ditto * import.c: ditto * lock.c: ditto * update.c: ditto 2001-02-02 Larry Jones * error.h: Changed include guard macro from _error_h_ to ERROR_H; names beginning with underscore are reserved. * login.c (password_entry_parseline, password_entry_operation, password_entry_operation_e, password_entry_operation_t): Removed leading underscore(s). (password_entry_parseline): Corrected error messages. (password_entry_operation): Fixed uninitialized variable (password). (login): Removed unused variable (found_password). * rtag.c (rtag_proc): Call lock_tree_for_write() before calling start_recursion. This fixes a serious problem where do_recursion was reading and caching RCS files without any locks in place and that information was subsequently being used to rewrite the file causing any intermediate changes to be lost. (rtag_filesdoneproc): Defunct. (Reported by Karl Tomlinson .) * tag.c (cvstag, tag_filesdoneproc): Ditto. * lock.c (lock_tree_for_write): Add which argument, change all callers to pass W_LOCAL. * rcs.h: Ditto. 2001-01-29 Derek Price * client.c (get_cvs_port_number): change the prototype to accept a const cvsroot_t * as input and add a FIXME comment * cvs.h: new prototypes for get_cvs_port_number & normalize_cvsroot * login.c (_password_entry_operation): consolidate all the ~/.cvspass access into a single new function which reads ~/.cvspass in a backwards compatible manner (logout): use the new _password_entry_operation function (login): ditto (get_cvs_password): ditto * root.c (normalize_cvsroot): move knowledge of default port & username values inside 2001-01-29 Larry Jones * subr.c (shell_escape): New function. * cvs.h: Declare it. * logmsg.c (logfile_write): Use it to avoid problems with filenames containing "'". (Reported by Gerhard Ahuis .) * server.c (outbuf_memory_error, pserver_authenticate_connection, kserver_authenticate_connection): If available, use syslog() to record some errors. 2001-01-25 Larry Jones * server.c (do_cvs_command): If there's a partial output line left over and the client doesn't support MT, go ahead and send it in an M response instead of just dropping it. (Reported by Milos Kleint .) * update.c (update_fileproc): Handle toss_local_changes in the T_NEEDS_MERGE case. (Inspired by Noel L Yap .) * sanity.sh (clean): New tests for above. 2001-01-23 Derek Price * run.c (run_exec): flush, if used, stderr and stdout before exit * server.c (cvs_flusherr): flush stderr & send a stderr flush command on the protocol pipe (cvs_flushout): like above, for stdout (do_cvs_command): handle flushes properly * sanity.sh (reserved): make the commitinfo script echo errors to stderr rather than stdin 2001-01-18 Larry Jones * log.c (option_revlist, revlist, log_usage, cvslog, log_parse_revlist, log_expand_revlist, log_version_requested): Add support for :: for exclusive ranges. * admin.c (admin_usage): Reorder -o to be parallel to log -r. * sanity.sh (log): New tests for above. 2001-01-18 Derek Price * main.c: Add '2001' to the range of copyright years listed by the --version option * version.c.in (version): check current_parsed_root before its isremote member to avoid a core dump * sanity.sh (version): add a test for the version command * version.c: regenerated 2001-01-12 Larry Jones * rcs.c, rcs.h (RCS_lock, RCS_unlock): Use RCS_gettag to find the correct revision so that symbolic tags work correctly. (This requires removing the "const" from the rev parameter since it's passed to RCS_gettag which might modify it.) (Reported by irina sturm .) 2001-01-11 Larry Jones * run.c (close_on_exec): Remove check for FD_CLOEXEC. As far as I can see, it's *never* been defined, which defeats the whole point. If F_SETFD is defined, it's probably safe to use it. * server.c (do_cvs_command): Call close_on_exec on the protocol and flow control pipes in the child process so they don't get inherited by any subsidiary processes. (Reported by Tristan Gingold .) * cvs.h (free_cvsroot_t): Spell correctly (was free_CVSroot_t). 2001-01-10 Derek Price Rex Jolliff * build_src.com: VMS changes * filesubr.c: replace calls to unlink() with CVS_UNLINK() for VMS * rcs.c: ditto 2001-01-10 Derek Price * main.c (current_root): explicitly list this as a static global 2001-01-10 Derek Price * cvs.h (get_cvs_port_number): change name & prototype from get_port_number * client.c (get_cvs_port_number): new function which returns a port number based on a cvsroot_t rather than requiring all possible sources passed in (connect_to_pserver): use new get_cvs_port_number function (connect_to_server): ditto * login.c (get_password): use new get_cvs_port_number function (login): ditto (logout): ditto 2001-01-10 Derek Price * Makefile.am ($(srcdir)/version.c): specify $(srcdir) for all subparts of the build since some systems don't allow mv's across partitions * Makefile.in: regenerated 2001-01-10 Derek Price * Makefile.am (version.c): specify $(srcdir) explicitly in target rule so version.c gets built properly for all makes. (version.o): specify $(srcdir)/version.c explicitly so dependency is found and built properly * Makefile.in: regenerated 2001-01-09 Derek Price * version.c: updated timestamp 2001-01-09 Larry Jones * server.c (server): Change to server_temp_dir immediately after creating it so that any stray files that happen to be created go there instead of in the server's initial directory, wherever that may be. * sanity.sh (modules5-15): Update to match. * version.c.in: Update to match Derek's change to version.c. 2001-01-09 Derek Price * cvs.h: Remove the various CVSroot_* bits and replace them with a single structure of type cvsroot_t (current_parsed_root) * root.c (parse_cvsroot): return pointer to a new cvsroot_t rather than altering global variables (local_cvsroot): return a pointer to a new cvsroot_t rather than setting globals. changed the name of this function from set_local_cvsroot to better explain new functionality (new_cvsroot_t): new initializer function (free_cvsroot_t): new function (others): use current_parsed_root rather than the old CVSroot_* globals * add.c: use current_parsed_root rather than the old CVSroot_* globals * admin.c: ditto * checkout.c: ditto * client.c: ditto * commit.c: ditto * create_adm.c: ditto * diff.c: ditto * edit.c: ditto * expand_path.c: ditto * find_names.c: ditto * history.c: ditto * ignore.c: ditto * import.c: ditto * lock.c: ditto * log.c: ditto * login.c: ditto * logmsg.c: ditto * main.c: ditto * mkmodules.c: ditto * modules.c: ditto * parseinfo.c: ditto * patch.c: ditto * rcs.c: ditto * recurse.c: ditto * release.c: ditto * remove.c: ditto * repos.c: ditto * rtag.c: ditto * server.c: ditto * status.c: ditto * tag.c: ditto * update.c: ditto * version.c: ditto * watch.c: ditto * wrapper.c: ditto 2001-01-05 Derek Price * cvs.h (enum CVSmethod): add null_method * root.c (method_names): correlate null_method & "undefined" (parse_cvsroot): make two error cases non fatal * sanity.sh (crerepos-6b): account for new error message, re above 2001-01-05 Derek Price * src/Makefile.am (cvsbug, cvsbug_EXTRA_DIST, EXTRA_DIST): move cvsbug target to configure.in - see ../ChangeLog for more * src/cvsbug.in: Rename from cvsbug.sh * src/cvsbug.sh: Rename to cvsbug.in 2001-01-04 Larry Jones * Makefile.am (cvsbug): Explicitly list input file ($< is only valid in inference rules). * Makefile.in: Ditto. 2001-01-04 Derek Price * sanity.sh: use getopts rather than getopt for portability reasons 2001-01-03 Derek Price * Makefile.am (remotecheck): depend on 'all' * Makefile.in: regenerated 2000-12-29 Derek Price * sanity.sh: remove explicit "$@" from last checkin and move the 'do' to the line following the 'for'. Apparently this is more portable. 2000-12-29 Derek Price * sanity.sh: make "$@" explicit in 'for' statement since Solaris 5.6's implementation of Bourne shell doesn't seem to implement this default behavior. 2000-12-27 Derek Price * sanity.sh: add a -f option for continuing from a particular test and shorten --keep to -k so we can use the getopt function. 2000-12-27 Derek Price * Makefile.am (remotecheck): Make remotecheck dependant on all * Makefile.in: regenerated 2000-12-26 Derek Price * Makefile.in: update timestamp * stamp-h2.in: ditto * version.c: ditto 2000-12-26 Derek Price * Makefile.am: new target for version.c (EXTRA_DIST): add version.c.in & version.c so builds work when configure doesn't * Makefile.in: Regenerated * stamp-h2.in: update timestamp * version.c: ditto 2000-12-26 Derek Price * Makefile.am (INCLUDES): add zlib * Makefile.in: Regenerated 2000-12-22 Derek Price * Makefile.am (DISTCLEANFILES): added a few files (INCLUDES): commented * Makefile.in: Regenerated 2000-12-21 Derek Price * .cvsignore: Added .deps directory and a new stamp file * Makefile.am: New file needed by Automake * Makefile.in: Regenerated * stamp-h2.in: New stamp file created by Automake * version.c.in: use configure to generate version.c 2000-12-16 Derek Price * server.c (server_update): Keep the vers structure up to date after sending a Remove or Remove-entry command to the client * update.c (update): remove call to server_updated() after scratch_file() (scratch_file): in server mode, call server_updated(), otherwise keep the vers structure up to date (join_file): add a trace, save the revision to Register() on a remove before calling server_scratch & server_updated * sanity.sh (join): Add test for a remove/add caused by an update to a new branch and a join in the same step. 2000-12-15 Larry Jones * error.c (error): Add %ld and %lu. * history.c: Change hrec.idx from int to long, reformat NEXT_BAR for readability, add hrec_idx. (fill_hrec): Change initialization to be portable and always set idx so it can be used as a line number in error messages; improve parsing and error checking. (read_hrecs): Initialize hrec_idx, handle embedded NULs, warn about no newline at end of file. (select_hrec): Add basic validity checking. 2000-12-07 Larry Jones * history.c (history): Allow multiple -m options as documented. 2000-11-29 Derek Price * root.c (parse_cvsroot): back out yesterday's redundant changes * main.c (main): fix CVSROOT trace message to look like other trace messages * sanity.sh (multiroot2-9): expect new trace message 2000-11-28 Derek Price * root.c (parse_cvsroot): add trace on this function * client.c (get_port_number): make trace print look like others 2000-11-16 Derek Price * filesubr.c (cvs_temp_file): back out the previous change in the interests of portability, add an assertion, and fix the header comment 2000-11-16 Derek Price * filesubr.c (cvs_temp_file): refine the exit behavior to notice if the out param was passed in NULL and, if so, avoid setting it and delete the temp file for later 2000-11-16 Derek Price * filesubr.c (cvs_temp_file): fixed a garble or two, added some additional error checking, and added a comment 2000-11-15 Derek Price * filesubr.c (cvs_temp_file): added cvs_temp_file function to use mkstemp rather than one of the other temp file generators as gcc keeps complaining I should. (cvs_temp_name): altered this function to simply wrap cvs_temp_file and deprecated it * cvs.h: added prototype for cvs_temp_file * commit.c (commit): use the new function instead of the old and plug an old (though related) memory leak. * import.c (import): use the new function * login.c (login): Ditto * logmsg.c (do_editor, do_verify): Ditto * patch.c (patch_fileproc): Ditto 2000-11-14 Larry Jones * update.c, update.h (do_update): Add xdotemplate parameter. Change all callers. (update_dirent_proc): Use dotemplate for Create_Admin, not 1. * checkout.c (checkout_proc): Don't create CVS/Template if exporting. (Reported by Andrey Podkolzin .) 2000-11-08 Larry Jones * admin.c (admin): Use getgroups() to check for membership in CVS_ADMIN_GROUP if it exists. In any event, check the user's primary group in addition to any additional groups. (Reported by Thomas Okken .) 2000-11-06 Jim Meyering Compile with gcc's -Wformat and fix the exposed problems. * root.c (parse_cvsroot) [! HAVE_KERBEROS]: Provide an argument for the %s error format spec. [! HAVE_GSSAPI]: Likewise. (normalize_cvsroot): Put comment delimiters around token after `#endif'. 2000-11-03 Larry Jones * sanity.sh: Some versions of sed require a space between -e and the value. 2000-10-27 Larry Jones * checkout.c (checkout): Don't check for a safe location if just cat'ing the module database. (Reported by Ilya Martynov .) Have -s set cat as well as status; it simplifies the code. 2000-10-26 Larry Jones * sanity.sh (join-admin-2): Check output from all commands instead of (mostly) discarding. (Some of the tests used to produce stray output in remote mode.) * sanity.sh (dotest_line_by_line): Handle empty lines in pattern (expr doesn't distingish between successfully matching nothing and failing to match anything). * sanity.sh (dotest_internal): Rearrange and use elif to simplify. 2000-10-24 Jim Meyering Fix a bug, introduced with my fix of 2000-07-10, whereby -kk would sometimes be ignored for some of the files involved in an update. * update.c (join_file): Restore the original value of `options' right after calling checkout_file. * sanity.sh (join-admin-2): New test for this. 2000-10-23 Derek Price James Youngman * sanity.sh: it's /gnu/bin, not /gun/bin. Thanks go to James Youngman for the bug report and patch. 2000-10-20 Jim Kingdon * server.c (switch_to_user): Set CVS_USER. Patch from Sudish Joseph and popularized by dozens (e.g. mozilla.org, also others). 2000-10-20 Derek Price KOIE Hidetaka * root.c (normalize_cvsroot): plug a memory leak. Thanks to KOIE Hidetaka 2000-10-18 Derek Price * client.c (connect_to_pserver): added a close brace the lack of which was preventing compilation when gssapi was enabled. Removed a redundant check for HAVE_KERBEROS. 2000-10-18 Derek Price * root.c (normalize_cvsroot): removed references to free_port_s and the now useless call to free now that port_s is on the stack. Thanks to Jon Miner. 2000-10-18 Derek Price * root.c (normalize_cvsroot): remove calls to snprintf for compatibility with M$ Windoze. 2000-10-18 Derek Price * sanity.sh (crerepos-6a, crerepos-6a-r): fix a "?" in a regex & pipe the output of a test to /dev/null since we don't know what error messages specific rsh implementations will output. 2000-10-17 Derek Price * cvs.h: added CVSroot_password variable. Provided prototypes for get_port_number & normalize_cvsroot. * client.c (get_port_number): Fixed an ANSI prototype I had included for get_port_number. * login.c (login, logout): Removed two checks for a non-null CVSroot_username since parse_cvsroot now supplies a default in pserver mode. allow for a password in CVSROOT (get_cvs_passsword): return CVSroot_password if it was supplied in the CVSROOT. * root.c (parse_cvsroot): Changed CVSROOT spec from :method:user@host/port:/cvsroot to :method:[[user][:password]@]host[:[port]]/cvsroot Removed the xstrdup function since we'd rather have the error checking from the version in subr.c anyhow. Moved some error messages which looked like they would print the wrong error message after a failed connect_to_gserver call. (normalize_cvsroot): return a normalized CVSROOT for use in the .cvspass file. * sanity.sh (crerepos-6): fix a test which was expecting an old error message. * client.c (connect_to_pserver): Moved some error messages which looked like they would print the wrong error message after a failed connect_to_gserver call. * login.c (login): Paranoiacly zero a password in memory. 2000-10-12 Derek Price * client.c (auth_server_port_number -> get_port_number, start_pserver, start_tcp_server): use a port specified in CVSROOT instead of the default port. Failing that, use the CVS_CLIENT_PORT environment variable. * cvs.h: Added global CVSroot_port & renamed auth_server_port_number. * root.c (parse_cvsroot): Parse the new CVSROOT format properly. Incidentally reformated some error messages for uniformity and readability. * sanity.sh (crerepos): fix two tests which were now expecting the wrong error message. 2000-10-11 Larry Jones * server.c (pserver_authenticate_connection): Fix stupid mistake in previous change. 2000-10-11 Derek Price * main.c (main): Dispose old CVSroot when parsing a '-d' option if free_CVSroot is set. * root.c (parse_cvsroot): remove references to 'cvsroot_parsed', a static boolean I expect hasn't been used since CVS learned to handle multiple CVSROOTs. 2000-10-10 Larry Jones * server.c (print_error): Make up a message if strerror fails. * server.c (pserver_authenticate_connection): Give a real error message for an invalid repository. 2000-10-06 Derek Price * add.c (add): Made quiet mode affect some warning messages as seemed appropriate. Specifically, some of the messages which a user might want to ignore so they don't have to be quite so specific on the command line: files added twice, files already in the repository and check out properly (i.e. but picked up by 'cvs add *'), & files which are readded in place of a dead revision or onto a branch. '-q' will not change the non-zero exit code for the cases where at least one passed in file name was already in the Entries file. There seems to be a precedent in remove.c. * remove.c (cvsremove): switched the "use cvs ci to make these changes permanent message" to only print w/o '-Q' to match the new behavior of add. This seems appropriate as '-Q' is defined to restrict messages to critical errors. * sanity.sh (adderrmsg): Added some tests for the above behavior. 2000-10-05 Larry Jones * client.c (call_in_directory): Create CVSADM directory if it doesn't exist in the directory. This makes client/server work more like standalone when checking out into an existing (non-CVS) directory. * sanity.sh (dirs2, conflicts3, toplevel): Update to match. 2000-10-03 Larry Jones * filesubr.c (get_homedir): Ignore $HOME when running in server mode. 2000-10-02 Larry Jones * cvs.h: Define (and use) T_PATCH as a valid file classification even when SERVER_SUPPORT isn't defined -- it simplifies the code. * classify.c (Classify_File): Ditto. * commit.c (check_fileproc): Ditto. * status.c (status_fileproc): Ditto. * update.c (update_fileproc): Ditto. * tag.c (check_fileproc): Accept T_PATCH in addition to T_CHECKOUT. * sanity.sh (tagc-10): Update to match. 2000-09-29 Larry Jones * client.c (get_responses_and_close): Reset server_fd to -1 after shutting down. (Reported by Joerg Thoennes .) 2000-09-27 Larry Jones * commit.c (commit): Don't sleep before returning in server mode, just let the client do it. * update.c (do_update): Ditto. * sanity.sh (find_tool): Correct method of checking for GNU tools. * checkout.c (checkout_proc): Match up user directories with repository directories instead of using Emptydir. * sanity.sh (cvsadm, emptydir): Update to match. 2000-09-19 Larry Jones * version.c: Push version number to 1.11.0.1. * version.c: Version 1.11. 2000-09-07 Larry Jones * Makefile.in: Use @bindir@, @libdir@, @infodir@, and @mandir@ from autoconf. 2000-08-23 Larry Jones * mkmodules.c (init): Create an empty val-tags file if it doesn't already exist to avoid problems with users not having sufficient permissions to create it later. 2000-09-06 Jim Kingdon * main.c (lookup_command_attribute): Add "release" to commands which can be done by a read-only user. 2000-08-23 Larry Jones * repos.c (Name_Repository): Use pathname_levels to detect attempts to get above the repository instead of checking for leading .. which isn't reliable. * sanity.sh (multiroot3-12 to multiroot3-15): New tests for above. 2000-08-21 Larry Jones * rcs.c (expand_keywords): Handle the unusual case of log == NULL. (Reported by Craig Metz .) 2000-08-01 Larry Jones * subr.c (pathname_levels): Fix bug that miscounts adjacent slashes. (Patch submitted by Tanaka Akira .) * loginc.c (login): If available, use getpassphrase instead of getpass to support long passwords on Solaris. 2000-07-28 Larry Jones * server.c (server_noop): Avoid do_cvs_command() overhead. (requests): Make noop RQ_ROOTLESS. 2000-07-27 Noel Cragg * root.c (parse_cvsroot): change fork method to behave like other remote methods -- let the server check that the repository directory is an absolute pathname. 2000-07-27 Larry Jones * lock.c (set_lock): Include actual lock directory in error message. * sanity.sh (multiroot3-10): Change to match. * sanity.sh (client-3): Allow for a potential "broken pipe". 2000-07-26 Larry Jones * commit.c (commit_filesdoneproc): Flush stdout before running script. * modules.c (do_module): Ditto. * update.c (update_dirleave_proc): Ditto. * server.c (do_cvs_command): Give input from the protocol pipe precedence over input from stdout/stderr. There's no particularly good justification for this other than helping to avoid out-of-order messages in sanity.sh. * admin.c (admin_usage): Add the supported options. * sanity.sh (info): Try to avoid out-of-order messages. * sanity.sh (info): Fix problems when running twice in a row. 2000-07-17 Larry Jones * sanity.sh (modules5-7, cvsadm-1e, emptydir-2): Allow for a nil commit (can happen if the test is run twice in a row). 2000-07-19 Pavel Roskin and Larry Jones * mkmodules.c (config_contents): Add a commented out example for LockDir. Don't suggest PreservePermissions unless it's enabled. 2000-07-17 Larry Jones * login.c (get_cvs_password): Handle malformed ~/.cvspass more gracefully. 2000-07-12 Larry Jones * sanity.sh (modules5): New tests for module programs. 2000-07-11 Larry Jones * filesubr.c (copy_file, xcmp): Handle systems (like Plan 9) that don't support mknod() and/or st_rdev. * import.c (add_rcs_file): Ditto. * rcs.c (RCS_checkout, RCS_checkin): Ditto. * update.c (special_file_mismatch): Ditto. 2000-07-10 Larry Jones * zlib.c (gunzip_and_write): Fix type clashes. * main.c (main): Remove unused variables. 2000-07-10 Jim Meyering When a command like `cvs update -kk -jT1 -jT2' creates a new file (because it had the T2 tag, but not T1), the subsequent commit of that just-added file would effectively set the admin `-kk' option for that file in the repository. * update.c (join_file): Rename global-shadowing local `options' to `t_options'. Set file-scoped global `options' to NULL just before check-out. * sanity.sh (join-admin): New test for this. 2000-07-08 Larry Jones * version.c, cvs.h (version): New function. * main.c (cmds[]): Add version command to invoke it. (main): Also use it in -v. * server.c (serve_version): New function. (requests[]): Add version command to invoke it. 2000-07-06 Karl Fogel * sanity.sh (pserver-14): remove this test for portability reasons (it was only recently added for the 2000-07-04 change). 2000-07-06 Larry Jones sanity.sh (modules-148): Don't test for specific revisions. * main.c (main): Catch SIGABRT to try to clean up after assertion failures. Don't bother SIG_register'ing Lock_Cleanup because main_cleanup calls it indirectly anyway. * patch.c (patch): Catch SIGABRT. * rcs.c (rcs_internal_lockfile): Ditto. * server.c (server): Ditto. * fileattr.c (fileattr_write): Don't delete the unrecog_head list when writing... (fileattr_free): Delete it when freeing! 2000-07-05 Larry Jones * admin.c (admin): Handle -t in client so reading from files works correctly in client/server mode. * sanity.sh (log2): Update to match. 2000-07-04 Karl Fogel * server.c (pserver_authenticate_connection): use new getline_safe() during authentication phase, to avoid a denial-of-service attack in which client sends arbitrary amounts of data with no newlines. (Reported by .) * sanity.sh: new test pserver-14 for above. * myndbm.c: #include getline.h. (mydbm_load_file): pass new GETLINE_NO_LIMIT flag to getstr(). 2000-07-03 Larry Jones * sanity.sh (modules): Rewrite using dotest. Add "modules-" prefix to test names. 2000-06-28 Larry Jones * error.c (error_exit): Call rcs_cleanup () to release any rcs locks. * rcs.c, rcs.h (rcs_cleanup): Make public, close file before trying to remove (some systems won't remove open files). (RCS_putdtree): Don't worry about cleaning up before call error since it now does it for us. (rcs_internal_lockfile, rcs_internal_unlockfile): Keep track of lock file fd for rcs_cleanup (). * client.c (handle_set_checkin_prog, handle_set_update_prog): Just ignore the request when exporting. 2000-06-27 Larry Jones * create_adm.c, cvs.h (Create_Admin): Add dotemplate argument. Change all callers. * checkout.c (checkout_proc): Don't create CVS/Template if exporting. 2000-06-26 Pavel Roskin and Larry Jones * server.c (switch_to_user): Only set CVS_Username if AUTH_SERVER_SUPPORT is defined. 2000-06-23 Larry Jones * client.c (send_dirent_proc): Don't allocate ignlist if you're going to skip the directory (plugs memory leak). (send_dirleave_proc): New function. (send_files): Use it (plugs memory leak). * root.c (root_allow_free): Plug memory leaks. * server.c (serve_directory, serve_notify, check_password, pserver_authenticate_connection): Ditto. * update.c (update): Ditto. This completes the memory leak shoot-out -- the Purify'ed version of CVS now runs the entire test suite, both local and remote (except for remote crerepos, which causes Purify to choke) with *no* memory leaks. * server.c (pserver_authenticate_connection): Don't free null pointer. 2000-06-21 Larry Jones * client.c (update_entries, get_responses_and_close): Plug memory leaks. * commit.c (find_fileproc, commit): Ditto. * import.c (import): Ditto. * log.c (cvslog): Ditto. * recurse.c (start_recursion): Ditto. * remove.c (cvsremove): Ditto. * server.c (fd_buffer_initialize, server_notify, do_cvs_command): Ditto. (fd_buffer_shutdown): New function. 2000-06-20 Larry Jones * root.c (parse_cvsroot): Put the terminating NUL byte into the string *before* copying it, not after. :-( 2000-06-19 Larry Jones * main.c (main): Plug memory leaks. * root.c (parse_cvsroot, set_local_cvsroot): Ditto. * server.c (serve_root): Ditto. 2000-06-16 Larry Jones * fileattr.c (fileattr_read): Plug memory leak. * rcs.c (RCS_whatbranch): Ditto. * update.c (update_dirleave_proc): Ditto. * ignore.c (ign_dir_add): Duplicate string so caller can free. * modules.c (do_module): Don't write into dbm's memory! 2000-06-15 Larry Jones * checkout.c (checkout_proc): Fix non-ANSI code in call to findslash(), minor cleanups. 2000-06-14 Larry Jones * tag.c (val_direntproc): Return R_PROCESS instead of 0. * client.c (update_entries): Fix type clash calling gunzip_and_write(). * server.c (receive_file): Fix type clash calling gunzip_and_write(). (server_updated): Fix type clash calling buf_output(). * error.c (error): Make buf char instead of unsigned char to avoid type clashes. * modules.c (do_module): Change callback_proc to pass argc by value instead of by reference: callback procs shouldn't be messing with the callers argc/argv, it makes correct memory management impossible. Plug memory leaks. * cvs.h: Change to match. * checkout.c (checkout_proc): Ditto; use a local argv array instead of messing with caller's. * modules.c (callback_proc): Ditto. * patch.c (patch_proc): Ditto; use a local argv array instead of messing with caller's. * rtag.c (rtag_proc): Ditto; use a local argv array instead of messing with caller's. * server.c (expand_proc): Ditto. * subr.c (line2argv): Change initial argv_allocated back to 1. * checkout.c (findslash): Fix non-ANSI code. * sanity.sh (modes3): Fix test names. 2000-06-13 Larry Jones * add.c (add): Plug memory leaks. * admin.c (admin_fileproc): Ditto. * checkout.c (build_dirs_and_chdir): Ditto. * edit.c (editors_fileproc): Ditto. * log.c (cvslog, log_parse_revlist, log_parse_date): Ditto. * rcs.c (RCS_addaccess): Ditto. * tag.c (check_fileproc): Ditto. * vers_ts.c (Version_TS): Ditto. * watch.c (watchers_fileproc): Ditto. 2000-06-12 Larry Jones * rcs.c (rcsbuf_valword): Set rcsbuf->vlen to keep rcsbuf_valcopy() from allocating more memory than needed for @ strings. Don't declare unless PRESERVE_PERMISSIONS_SUPPORT (since not defined). * rcs.c (RCS_abandon): New function to abandon changes. * rcs.h: Declare it. * admin.c (admin_fileproc): Use it instead of RCS_reparsercsfile. * commit.c (commit_fileproc): Fix memory leaks. * patch.c (patch_fileproc): Ditto. * rcs.c (RCS_nodeisbranch, RCS_copydeltas): Ditto. * tag.c (tag_fileproc): Ditto. * update.c (update): Ditto. 2000-06-09 Larry Jones * rcs.c (RCS_reparsercsfile, RCS_fully_parse, getdelta, RCS_getdeltatext): Handle newphrases with composite values. (rcsbuf_getkey): Don't remove @s in composite values -- it makes it impossible to parse the value! Set special flag to indicate a composite value. (rcsbuf_valcopy, rcsbuf_valpolish_internal): Handle composite values. (putrcsfield): Write composite values. (RCS_checkin): Set node types in other_delta list. * hash.h: Add RCSCMPFLD. * hash.c (nodetypestring): Ditto. * rcs.c (getdelta): Never allocate space for value, just return pointer into rcsbuf (fixes memory leaks). Use rcsbuf_getkey to read a key and value and then parse the value if needed rather than trying to read it in bits and pieces with rcsbuf_getid, rcsbuf_getstring, and rcsbuf_getword. (RCS_reparsercsfile): Change callers to compensate. (rcsbuf_valcmp, rcsbuf_valword): New functions. (rcsbuf_getid, rcsbuf_getstring, rcsbuf_getword): Deleted. * sanity.sh (rcs3-1): Now get slightly different error message. 2000-06-08 Larry Jones * main.c (usg): Update CVS home page URL. * main.c (main): Provide an actual error message for an unknown command in addition to the usage message. 2000-06-07 Larry Jones * server.c (serve_root, dirswitch, serve_repository, serve_static_directory, serve_sticky, receive_partial_file, receive_file, serve_modified, server_write_entries, serve_notify, serve_checkin_prog, serve_update_prog, server): Don't set pending_error before calling alloc_pending, it makes it fail; use alloc_pending instead of malloc when reasonable; be sure to save errno before calling functions that might change it. (Patch submitted by Dietmar Petras .) 2000-06-03 Larry Jones * commit.c (checkaddfile): Plug memory leak. * rcs.c (RCS_checkin): Plug memory leaks. * server.c (do_cvs_command): Plug file descriptor leaks. * tag.c (check_fileproc): Plug memory leak. 2000-05-26 Larry Jones * recurse.c (unroll_files_proc): Plug memory leak. * recurse.c (addfile): Fix nonportable pointer cast. * rcs.c (rcsbuf_getstring, rcsbuf_getword, getdelta): Plug memory leaks. 2000-05-25 Larry Jones * checkout.c (checkout, build_one_dir, checkout_proc): Move m_type to file scope and use it instead of continually doing strcmp on command_name. (build_one_dir, checkout_proc): Don't allow export if CVSADM directory already exists. 2000-05-23 Larry Jones * rcs.c (RCS_checkin, RCS_cmp_file): Plug memory leaks. (Patch submitted by Chris G. Demetriou .) 2000-05-20 Ian Lance Taylor * client.c (connect_to_gserver): Handle server error messages reasonably. 2000-05-19 Larry Jones * server.c (requests): Make Global_option RQ_ROOTLESS so it can be used with init. 2000-05-18 Larry Jones * client.c (start_server): Don't do encryption, authentication, compression, or case insensitivity when doing init because init is ROOTLESS and they're not. * client.c (connect_to_pserver): Include repository and username in authorization failed message -- if a directory tree crosses multiple repositories, it can be quite difficult for the user to figure out which one is the problem. 2000-05-17 Larry Jones * main.c (main): Use full set of options when looking for -f to avoid misparsing options that take values (previously, -sVAR=foo was incorrectly parsed as though it were -s -V -A -R -= -f -o -o because it didn't know that -s takes a value). * sanity.sh (info-6b): New test for above. * sanity.sh (conflicts-status): Fix tests so they work remotely, too. 2000-05-17 Jim Meyering * sanity.sh (TESTDIR): Fix braino in last change: cd to /tmp before invoking pwd. * sanity.sh: Set TESTDIR so that `make check' passes even when /tmp is a symlink. (join-36): Use $TESTDIR rather than hard-coding `/tmp/cvs-sanity'. (conflicts-132): Remove unnecessary `rm aa'. 2000-05-16 Jim Kingdon * cvs.h, checkout.c (safe_location): Make extern. * import.c (import): Call it rather than reimplementing (incompletely) the same check. 2000-05-16 Larry Jones * rcs.h, subr.c (file_has_markers): Check for any of the three conflict marker lines, not just one. * sanity.sh (conflicts-status): New tests for above. * sanity.sh: Revise to avoid tripping the above check when merging changes into sanity.sh itself. 2000-05-15 Larry Jones * update.c (join_file): When registering the result of the merge, make sure that the version number is valid (vers->vn_rcs may be null if the file doesn't exist on the branch yet). (Patch submitted by Robert de Vries .) * update.c (join_file): Correct diagnostics (previous change was not correct -- the file *does* exist in the specified revision, it just doesn't exist in the sandbox). * sanity.sh (import-113, join): New tests and changes for above. 2000-05-04 Larry Jones * sanity.sh: Look for a useful id program. Since we're getting the real username for some tests anyway, use it for all the tests instead of a generic regular expression that may or may not match the actual username. 2000-05-04 Larry Jones * server.c: More error messages. 2000-05-02 Donald Sharp and Larry Jones * history.c (report_hrecs): Added code to print out year instead of just month/day. * sanity.sh (basic2-64, history): Update to match. 2000-04-19 Larry Jones * server.c (dirswitch): Set pending_error_text in addition to pending_error to aid in problem determination. 2000-03-23 Larry Jones * mkmodules.c (mkmodules): Return without doing anything if noexec is set to avoid trashing existing files. 2000-03-23 Larry Jones * main.c: Alphabetize cmds[] and cmd_usage[] and add server commands to cmd_usage[]. 2000-03-21 Larry Jones * sanity.sh (client-1): May get "Broken pipe" message from the "server" in addition to the expected output. 2000-03-17 Larry Jones * server.c (switch_to_user): Set CVS_Username if it hasn't already been set elsewhere. (Patch submitted by Gordon Matzigkeit ). 2000-03-13 Larry Jones * parseinfo.c: Add extern to logHistory declaration. (Reported by .) (parse_config): Reformat logHistory code. 2000-03-10 Larry Jones * add.c (add): Don't try to set cvsroot_len until after checking for help only -- CVSroot_directory isn't set in that case. 2000-03-03 Larry Jones * mkmodules.c (init): Use mkdir_if_needed to create CVSROOT/Emptydir so we don't fail if run multiple times. (Reported by KOIE Hidetaka .) * sanity.sh (1a): New test for above. 2000-03-02 Larry Jones * main.c: Use identical #if's in the command table and the code for pserver and kserver to prevent "peculiar" configurations from having really perverse behavior because the command table entries are present but the related code isn't. 2000-03-01 Larry Jones * import.c (import): Don't allow importing the repository. * sanity.sh (errmsg2-20, errmsg2-21): New tests for above. 2000-03-01 Larry Jones * main.c (main): Update year in copyright message. 2000-03-01 Larry Jones * logmsg.c (do_editor): Correct previous change. 2000-02-29 Larry Jones * logmsg.c (do_editor): When reading temp file, check that message buffer is large enough to hold the next line and expand if needed. 2000-02-28 Larry Jones * commit.c (commit): Use get_file() to read log file correctly and in text mode rather than binary mode. * subr.c (get_file): Ignore bufsize if buf is NULL. Include terminating NUL byte when estimating required buffer size. 2000-02-28 Larry Jones * sanity.sh (find_tool): New function to replace duplicated code. 2000-02-25 Larry Jones * import.c (add_rcs_file): Don't abort just because lstat fails. 2000-02-16 Jim Meyering Avoid race condition whereby a catchable signal could end up corrupting the repository. * commit.c (checkaddfile): Put a critical section around the code that handles the first commit on the trunk of a file that's already been committed on a branch. * cvs.h (Sig_inCrSect): Declare new function. 2000-02-21 Karl Fogel * main.c (main): still check for repository, but not history file (correction to 2000-02-18 change -- that's what I get for believing the comment rather than the code). 2000-02-21 K.J. Paradise * history.c mkmodules.c parseinfo.c: control which actions get logged to the cvs history file via CVSROOT/config file and LogHistory keyword. (John P Cavanaugh ) 2000-02-18 Karl Fogel * history.c (history_write): don't die if history file not writable, just warn (unless `really_quiet') and skip out. * main.c (main): don't bother checking if history file is writable. * server.c (serve_root): same. 2000-02-17 Larry Jones * sanity.sh (perms symlinks symlinks2 hardlinks): Don't run by default since PreservePermissions code is now disabled. 2000-02-17 Larry Jones * sanity.sh (import-113): Revise to match Jim Meyering's fix. 2000-02-16 Larry Jones * add.c (add): Don't allow adding files or directories to Emptydir. (Patch submitted by Chris Cameron .) * sanity.sh (emptydir): Revise (emptydir-7 and emptydir-8) for this. 2000-02-16 Jim Meyering * update.c (join_file): Correct typo in diagnostic: change `file %s is present...' to `file %s is not present...'. 2000-02-10 Larry Jones * parseinfo.c (Parse_Info): Treat matching lines with bad expansions as errors rather than just ignoring. 2000-02-10 Larry Jones * edit.c (edit): Check for invalid characters in hostname and CurDir. (Reported by "Andrew S. Townley" .) * sanity.sh (devcom2): New tests for above. 2000-02-10 Larry Jones * cvs.h: Always #include "server.h" to prevent compile errors when neither CLIENT_SUPPORT nor SERVER_SUPPORT is defined. (Reported by "Crow, Ian" .) * log.c (send_one, send_arg_list): Only define when CLIENT_SUPPORT is defined to prevent link errors. * server.c (server): Always create a new temporary directory, don't try to reuse an existing one since we might not have correct permissions. Also, include directory name in error messages. 2000-01-29 Jim Kingdon * ignore.c (ignore_files): Correctly set errno to 0 when we go back to the top of the loop. Fixes spurious errors like "cvs update: error reading current directory: No such file or directory". 2000-01-26 Larry Jones * run.c (run_exec): Conditionalize K.J.'s change so that it only applies when SETXID_SUPPORT is defined since some platforms don't have setegid(). 2000-01-26 Larry Jones * sanity.sh: Make TESTDIR earlier then use it to check for versions of expr that don't work right with long expressions. * sanity.sh (dotest_line_by_line): Have wc read from stdin so it doesn't output the file name and confuse expr. Make the output a bit less verbose and easier to read. 2000-01-24 K.J. Paradise * run.c :> prevents a user from creating a privileged shell from the text editor when the SETXID_SUPPORT option is selected. This came from Bob Colle , and is his completely. 2000-01-22 Jim Kingdon * sanity.sh (emptydir): Add a case in which one might hope for a non-Emptydir result, but which result? 2000-01-18 Larry Jones * main.c (main): Allow -z0 to disable gzip compression. 2000-01-17 Larry Jones for K.J. Paradise (kj@sourcegear.com) * version.c: Push version number to 1.10.8.1. * version.c: Version 1.10.8. 2000-01-17 Larry Jones * mkmodules.c (init): Create CVSROOT/Emptydir to avoid problems with users not having sufficient permissions to create it later. 2000-01-04 Larry Jones * client.c (get_responses_and_close): Simplify time-stamp race avoidance code. * commit.c (commit): Ditto. * update.c (do_update): Ditto. (Prompted by patch submitted by Pavel Roskin .) * hardlink.c: sizeof (char) is 1, by definition. * logmsg.c: Ditto. * rcs.c: Ditto. 2000-01-03 Karl Fogel * filesubr.c, subr.c (backup_file): moved this function from filesubr.c to subr.c, at JimK's suggestion. 2000-01-03 Jim Kingdon * sanity.sh (clean): Test the contents of the .#cleanme.txt.1.1 file, not just its existence. 2000-01-03 Karl Fogel * cvs.h, filesubr.c (backup_file): use `const' for suffix too; correct suffix length calculation and appending behavior; discard unnecessary `void' cast. Thanks to Jim Meyering for noticing. 2000-01-03 Larry Jones * sanity.sh (clean): Fix up expected output. 2000-01-02 John P Cavanaugh and Karl Fogel New -C option to update: overwrites local changes with clean copies from the repository. (This is an unreversion of the 1999-12-10 change, further modified to work remotely.) * client.h (BACKUP_MODIFIED_FILES): new #define. * client.c (struct send_data): new element `backup_modified'. (send_files): set above element if BACKUP_MODIFIED_FILES flag is present. * filesubr.c (backup_file): new function. * cvs.h: prototype for new function `backup_file'. * update.c (toss_local_changes): new file-scoped global. (update): set toss_local_changes if -C flag seen. If client_active, send "-C" to server, and set SEND_NO_CONTENTS and BACKUP_MODIFIED_FILES flags before calling send_files(). (update_fileproc): if file is modified and toss_local_changes is set, then back the file up and then check out a fresh copy from the repository. Also, fixed indentation and formatting for a particularly bad stretch of code near (but unrelated to) these changes. * sanity.sh: new test `clean', for update -C option. 1999-12-29 Jim Kingdon * history.c (read_hrecs): st_blksize is unsigned long, not int. This isn't just cosmetic - getting it wrong will cause coredumps and such on 64 bit machines. * import.c (import_descend), ignore.c (ignore_files): Placate gcc -Wall by parenthesizing foo || (bar && baz). 1999-12-24 Larry Jones * release.c (release): Use fputs to echo lines from update instead of printf to avoid problems with lines containing "%". (Reported by Jean-Luc Simard .) * history.c (read_hrecs): Allocate a single 2-block buffer instead of allocating and freeing a buffer for each block. (fill_hrec): Remove redundant code. (select_hrec): Plug memory leak. 1999-12-22 Larry Jones * history.c (history): For "modified" or "checkout", sort on file if user specified -l, even if user also specified a date- oriented flag. * sanity.sh (history): Update to match; add new tests. 1999-12-15 Pavel Roskin and Larry Jones * lock.c (lock_name): fixed assertion failure for the top-level CVS directory when LockDir is used * sanity.sh (lockfiles-9): new test for this case 1999-12-11 Karl Fogel * Revert previous change -- it doesn't work remotely yet. 1999-12-10 John P Cavanaugh and Karl Fogel * update.c: new -C option to update, overwrites local changes with clean copies from the repository. Also, fixed indentation and formatting for a particularly bad stretch of code near these changes in update_fileproc(). * sanity.sh: test new update -C option. 1999-12-10 Larry Jones * commit.c (remove_file): Call history_write with update_dir NULL like Checkin() does for add and modify. * sanity.sh (basic2-64): Update to match, add "R" records to expected remote output. 1999-12-09 K.J. Paradise (kj@sourcegear.com) * history.c, commit.c, sanity.sh: found (I think) final cause of seg fault in history command. Also, added the "R" history functionality. Fixed basic2-64 so it looks correct for the change. 1999-11-30 K.J. Paradise (kj@sourcegear.com) * history.c: fixed seg fault caused by 11-03 changes. off by one in block memory allocations. 1999-11-29 Karl Fogel * login.c (logout): free `tmp_name' when done. Correct a comment. 1999-11-29 Larry Jones * cvs.h, error.c, import.c: Rename fperror to avoid name clash on LynxOS. (Reported by Markus Braun .) 1999-11-23 Larry Jones * checkout.c (checkout_proc): Split declaration and initialization of rp to placate neurotic compilers that gripe about jumping past an initialization, even when the variable is not subsequently used. 1999-11-19 Larry Jones * server.c (switch_to_user): Correct setgid error messages. 1999-11-19 Karl Fogel * edit.c (unedit_usage, unedit): new struct, use it. Now "cvs unedit" prints an accurate usage message (formerly it printed the message for "cvs edit", even though the two commands do not have identical usages). 1999-11-19 Larry Jones * history.c: Move -e documentation from Flags to Reports. (history): Add -e to list of report types in error message. * history.c (history): Process file arguments before client/server processing so they get sent to the server. * sanity.sh (history): New tests for above. (Also remove comments about variable spacing -- history output is in variable-width columns with exactly one space between.) 1999-11-19 Larry Jones * sanity.sh: Reestablish check for running as root (using ``id -u'' instead of ``whoami''). * sanity.sh(dotest, dotest_lit, dotest_fail, dotest_status, dotest_sort): Eval the command so quoting and pipes work right. (spacefiles, dirs, rcslib, modules, unedit-without-baserev, ignore, rcs, rcs2, history, tagdate, pserver, server, server2) Simplify various tests based on above. 1999-11-19 Karl Fogel * mkmodules.c (init): make history file world-writeable after creating it, since it needs to be writeable for virtually any CVS operation. 1999-11-10 Jim Kingdon * admin.c: Revert change to add -H command option. The help invocation is "cvs -H admin" not "cvs admin -H" (see cvs.texinfo, basicb-21 in sanity.sh; fix to cvs.1) 1999-11-08 Jim Kingdon * log.c (cvslog): If client_active, send options to the server based on our parsed options rather than trying to send the exact strings specified (using canonical forms, like RFC822/1123 dates, in the protocol is just cleaner). (send_one, send_arg_list): New functions, helpers for above. * sanity.sh (logopt-6a): New test, for this fix. 1999-11-09 K.J. Paradise * admin.c: made the -H option do what it is documented to do. a 1999-11-08 Tom Tromey * client.c (connect_to_gserver): Print more error text if gssapi initialization fails. From Assar Westerlund . 1999-11-06 Larry Jones *sanity.sh(rcs3-5): Remote output can be out-of-order, so need a more general pattern to match the assertion failure. 1999-11-05 K.J. Paradise (kj@sourcegear.com) * history.c: Added a trap to verify that if a read(file, buffer,blocksize) returns less than blocksize, that we really are at the end of the file. I can't easily come up with a test case where this code gets touched, so it may cause problems. All sanity tests still pass though. 1999-11-05 Jim Kingdon * sanity.sh (logopt): New test, for Larry's fix. * sanity.sh (log-18a, rcs-15 to rcs-19): New tests, to test -d and -r more thoroughly. 1999-11-05 Larry Jones * log.c (cvslog): Fix -s and -d with spaces on client side. (log_usage): Revert Karl's change once again. sanity.sh(rcs3-5): No longer get different results from local and client/server. 1999-11-04 Karl Fogel * log.c (log_usage): Revert Jim Kingdon's reversion of my change of 1999-11-03. Allowing a space between option and argument results in lossage; here is a reproduction recipe: run this from the top of a remote copy of the cvs source tree cvs log -d '>1999-03-01' > log-out.with-space and then run this (note there's no space after -d now): cvs log -d'>1999-03-01' > log-out.no-space The resulting files differ; furthermore, a glance at the output of cvs shows that the first command failed to recurse into subdirectories. Until this misbehavior can be fixed in the source code, the documentation should reflect the true state of affairs: if one simply omits the space, everything works fine. 1999-11-04 Jim Kingdon * log.c (log_usage): Revert Karl's change regarding -d and -s. A space is allowed (see sanity.sh for example). 1999-11-03 K.J. Paradise (kj@sourcegear.com> * history.c: cleaned up my prior change a bit, per Larry Jones' comments, and John O'Conner's additional comments about bits of non MS-Visual C++ compliancy of my code. 1999-11-04 Larry Jones * sanity.sh: Check that tr that correctly handles NULs; if not, try to find a version that does; if none can be found, warn user. Also fix warnings for defective expr. 1999-11-04 Karl Fogel Changes for empty/random passwords in anon pserver access: * server.c (check_repository_password): if password empty, grant access no matter what password is received; this is so anon CVS no longer requires a password but remains backwards-compatible with all those clients out there. * client.c (connect_to_pserver): proceed with login even if password not found in .cvspass file -- just use empty string as password. And if such a login fails, print a descriptive error. * login.c (get_cvs_password): don't complain if file or password not found. That condition is no longer a showstopper, now that empty passwords are permissible. Cleaned up conditional chaining a bit, too. * sanity.sh (pserver-9, pserver-10, pserver-11, pserver-12, pserver-13): new tests, about empty-password pserver access. 1999-11-03 K.J. Paradise (kj@sourcegear.com> * history.c: modify parsing routines to parse the history file a block at a time, rather than all at once. This allows people with large history files and small amount of memory to still get some functionality out of the history file. 1999-11-03 Karl Fogel * log.c (log_usage): correct usage message for -d and -s options. Because the space between the option letter and its argument has been eliminated, I capitalized the argument portion to distinguish it from the option letter. This makes it slightly inconsistent with other such usage summaries, but at least it is now both correct and readable. 1999-10-22 Larry Jones * sanity.sh (dotest_sort): Old versions of tr don't understand \t so use a literal tab instead. 1999-10-21 Larry Jones * sanity.sh (dotest_sort): Convert any tabs in the output into spaces before sorting to avoid POSIX.2 sort weirdness. (import-106, importb-2): Change expected output per above. 1999-10-18 K.J. Paradise Bug: users 'stan' and 'cartman' both have full read/write access to the cvs repository. 'cartman' does a 'cvs admin -l foo.c'. 'stan' then does a 'cvs admin -u foo.c'. The lock wouldn't be removed, and no warning/error would be given. This is now fixed. * rcs.c:(c.6157) remove caller/user check on the multiple lock detection routines. Sanity.sh runs with no errors after this fix. 1999-10-14 Larry Jones Make "cvs admin -e" (with no list of users) work: * admin.c (admin): Remove error message. (admin_fileproc): If no args for -e, call RCS_delaccess with NULL user. * rcs.c (RCS_delaccess): Interpret NULL user as request to delete entire access list. * sanity.sh (admin-19a-*): Test. 1999-09-29 Larry Jones * entries.c (Subdirs_Known): Use entfilename when opening CVSADM_ENTLOG like everywhere else. Although this isn't strictly necessary (since we immediately close it again), it keeps the code consistent and fixes a bug where an open error reported the wrong file name. 1999-09-16 Larry Jones * log.c (log_parse_revlist): Handle peculiar revision specs like "-r.", "-r:", and "-r," correctly. (Thanks to Pavel Roskin for submitting a patch, this fix is somewhat different.) * sanity.sh (log): New tests for above. 1999-09-15 Larry Jones * sanity.sh (basica-8b1): New test to check fix for bad diff options causing cvs to crash. 1999-09-02 Larry Jones * modules.c (do_module): Handle case where module definition has options and special options but no directory; fix potential problems running off beginning of string while stripping trailing blanks. * sanity.sh (modules2): New tests for above. 1999-08-26 Larry Jones * lock.c (lock_name): Remove side-effects from assert() expression since they won't occur if NDEBUG is defined (not that that's a good thing to do). (Reported by KOIE Hidetaka .) 1999-08-25 Larry Jones * sanity.sh: Use "${AWK}" instead of "awk" to make it easier for people to use nawk/gawk/etc.; use an explicit "-print" with find since some older version don't assume it; rename tests to avoid duplicate importc-8. (Changes along these lines suggested by Chris Cameron .) 1999-08-24 Larry Jones * commit.c (check_fileproc): Don't crash when a file has no repository, just treat it as unknown. (Reported by Stefaan Diericx .) * sanity.sh (errmsg2): New tests, for this fix. 1999-08-18 Larry Jones * update.c (special_file_mismatch): Initialize *_hardlinks to avoid trying to free garbage later on. (Reported by Jan Scheffczyk .) 1999-08-17 Larry Jones * sanity.sh (basicc-11): Older versions of sh don't understand ``if ! test...''. (Patch submitted by David J N Begley .) 1999-08-17 Larry Jones * client.c, hardlink.c, hash.c, hash.h, main.c, recurse.c: Change enum constant UNKNOWN to avoid conflicts on HPUX 11.0. (Reported by Laurent Duperval .) 1999-08-16 Larry Jones client.c: Eliminate redundant #if. (Patch submitted by Assar Westerlund .) 1999-07-30 Larry Jones * rcs.c (RCS_checkin): Terminate cleanly if RCS_addbranch fails rather than blithely continuing on and crashing. * sanity.sh (basica): New tests, for this fix. 1999-07-29 Larry Jones * import.c (add_rcs_file): change "cannot lstat" message to include userfile (the actual file causing the problem) instead of user (which may or may not be the same). 1999-07-29 Eric Sink * version.c: Push version number to 1.10.7.1. * version.c: Version 1.10.7. 1999-07-28 Eric Sink * sanity.sh: before running basicc-11, we need to see if the cwd has been deleted (by basicc-8). If so, we recreate it to allow basicc-11 to proceed. This may be something that only happens under the Linux 2.2 kernel. 1999-07-18 Karl Fogel * edit.c (notify_do): chop newline, if any, from the value obtained from CVSROOT/users. Otherwise it just gets passed along in the argument to the notification program (usually mail), which will misinterpret it as signifying the end of the command. 1999-07-19 Larry Jones * rcs.c (RCS_delete_revs): In the WIN32 kludge, be sure that the result of RCS_getexpand is not NULL before trying to use what it points to. (Patch submitted by Timothy L. Taylor .) 1999-07-16 Tom Tromey * admin.c (admin): Allow `-k' options to be used unrestricted. 1999-06-23 Jim Kingdon * sanity.sh (symlinks2): New test, for symlinks in working directory without PreservePermissions. This test (modulo a few details not relevant to testing whether we are following symlinks) worked remote as of now, or either remote or local for CVS 1.9. * subr.c (get_file): Revert 1998-02-15 change to special-case symlinks. This makes the above test work local too. * rcs.c (RCS_checkin): Move the logic to handle special-case symlinks (and other files other than regular files) here, and make it only happen if PreservePermissions is on. 1999-06-18 Larry Jones * sanity.sh (devcom3-9a): Be less specific about the expected error message (BSD/OS 4.0 has a bug that can cause exec* to fail with EACCES instead of ENOENT). 1999-06-08 Larry Jones * sanity.sh (diff-4, dirs2-10, tagf-13, importc-7, conflicts2-142b8): Use ${PROG} instead of "cvs". 1999-06-05 Jim Kingdon * recurse.c (do_recursion, do_dir_proc): Make the SERVER_ACTIVE #ifdef be only around the check for server_active. Modulo a few cosmetic tweaks, same as a patch submitted by Johannes Stezenbach of propack-data.de. 1999-06-01 Jim Kingdon * sanity.sh: Add comment about rcs2-7 failures on certain days. Make "cvs status -v" on a removed file work: * status.c (cvsstatus): Reindent the client code. (status_fileproc): Don't need a CVS/Entries listing to show the tags. * sanity.sh (rmadd2): New test rmadd2-16 tests the existing behavior with "cvs log"; new test rmadd2-17 tests the new behavior with "cvs status". * sanity.sh (basicc): To match no output in dotest, put the empty regexp first. Remove tests which check that first-dir exists, since that isn't true in the case where the OS let us delete it. (dotest_internal): Fix so that things work with two regexps, with an empty one first. 1999-05-28 Larry Jones * sanity.sh (server-4): Replace bogus directory with real one since the server now checks it. 1999-05-27 Jim Kingdon * sanity.sh (spacefiles): Clean up -c, top, and -b at end. (spacefiles, files): Fix bad references to CVSROOT_DIRNAME. Fix two problems pointed out by Olaf Kirch of swb.de/caldera.de: * server.c (outside_root): New function, contains expanded version of code from serve_directory. (serve_directory): Call outside_root. (outside_dir): New function (serve_modified, serve_is_modified, serve_notify, serve_questionable, serve_unchanged): Call outside_dir. * sanity.sh (server2): New tests, for these fixes. 1999-05-26 Jim Kingdon * cvs.h, subr.c (xmalloc): Return void* not char*, like xrealloc has done for some time. * modules.c (do_module): If we find the module as a directory/file (rather than in the modules file), skip a bunch of processing which was unnecessary and also broken in most of the cases now tested for by the spacefiles sanity.sh test. * sanity.sh (spacefiles): New test, for specifying filenames (containing spaces, or starting with '-', or starting with '/') to "cvs co". 1999-05-25 Jim Kingdon * client.c (update_entries): Make the old DONT_USE_PATCH code the only code. This means that if people are still on CVS 1.9 servers, then CVS will fall back to transferring entire files. This is better than looking for an external "patch" program which causes no end of troubles (especially on Windows, but someone just posted to info-cvs about a problem with the Solaris patch). (This change was run by devel-cvs and feedback was positive). * subr.c (xmalloc, xrealloc): The new error.c does not support %lu; use sprintf instead. 1999-05-25 Derek Price * sanity.sh (server): Escaped a few more newlines in another awk script. Solaris awk still don't like 'em. 1999-05-25 Derek Price and Jim Kingdon * log.c: Remove comment which said "you can delete [this line]" and which stuck around for over 3 years. * sanity.sh (errmsg2 & tagdate): Added tests to prove the current functionality with respect to combining -r and -D. 1999-05-20 Larry Jones * server.c (pserver_authenticate_connection): Previous changes broke verify_and_exit (reported by Robert Fitzsimons, thanks). * sanity.sh (pserver): New tests pserver-7 and pserver-8 for this. 1999-05-18 Derek Price * sanity.sh (keyword2): Escaped a newline in an awk script. Apparently Solaris awk don't like 'em. 1999-05-18 Jim Kingdon * sanity.sh (basicc): Allow the behavior whereby unlink(".") succeeds. Reported by Jeremy Buhler and Pavel Roskin. 1999-05-17 Steve Cameron of Compaq * sanity.sh: Modified to no longer use "test -e" for existence test as it has turned out to be not portable enough. Instead use "test -f", "test -d", etc. [SCO Unixware 7 apparently doesn't always support it -kingdon] 1999-05-17 Jim Kingdon * version.c: Push version number to 1.10.6.1. * version.c: Version 1.10.6. 1999-05-16 Jim Kingdon * update.c (patch_file): When we are passing vn_rcs to RCS_checkout, pass vn_tag as well. * sanity.sh (keyword): In test keyword-22, test for the fixed behavior rather than the buggy behavior. Adjust keyword-23. Add test keyword-24, to see whether keyword-23 really worked. 1999-05-12 Larry Jones * sanity.sh (pserver-4, pserver-5): Bogus error messages from non-root initgroups on some 4.4BSD derived systems now show up in different places in the output. 1999-05-12 Jim Kingdon * import.c (import): Don't allow the user to supply a repository directory which takes us out of the cvsroot. * sanity.sh (importc): New tests importc-10 to importc-12, for this. 1999-05-11 Larry Jones * server.c (serve_notify): Allocate enough memory to hold the "misformed Notify request" message in pending_error_text. 1999-05-11 Jim Kingdon * server.c (switch_to_user): Ignore EPERM from initgroups. Fixes pserver-4 in testsuite. (pserver_authenticate_connection): Only print "I LOVE YOU" after switch_to_user has come back successfully. * server.c (pserver_authenticate_connection): Call error_exit rather than reinventing the wheel ourselves. (switch_to_user): Check for errors from setuid, setgid, and initgroups. Fix the #ifdef's (the previous code would skip the setuid call if SETXID_SUPPORT). 1999-05-10 Jim Kingdon * server.c (serve_notify), edit.c (notify_do): Check for and reject characters which will get confused with delimiters. * sanity.sh (server): New tests server-7 through server-15 test for this and for other notify behaviors. * rcs.c (RCS_tag2rev): Also look for a physical branch with RCS_getversion. * sanity.sh (tagf): Adjust tagf-12 and following tests to test for the fixed behavior rather than the broken behavior. 1999-05-07 Jim Kingdon * server.c (server_notify): Also set last_node to NULL. * sanity.sh (server): New tests server-6 and server-7, for this. 1999-05-05 Jim Kingdon * rcs.c (rcs_internal_lockfile): Remove unused variable lockfile. * add.c (add): Look for directories with the same name in a different case where appropriate (analogous to fopen_case). In client code, add comment about how this doesn't do quite everything. 1999-05-03 Jim Meyering Remove rcs-style ,file, lock files upon signal. * rcs.c (rcs_lockfile): New file-scoped global. (rcs_cleanup): New function (similar to patch_cleanup). (rcs_internal_lockfile): Register rcs_cleanup the first time this function is called. Rename uses of local `lockfile' to refer to new global, `rcs_lockfile'. Don't free the lock file name string, now that it's global. (rcs_internal_unlockfile): Rename `lockfile', as above, and carefully free and NULL-out the global, rcs_lockfile. 1999-04-30 Jim Kingdon * rcs.c (annotate_fileproc): Don't cast NULL in passing it to RCS_deltas. Because there is a prototype in scope the cast is unnecessary (per HACKING's ANSI C or SunOS4 rule), and in fact it was causing failures on UNICOS because it cast to size_t instead of size_t*. (Thanks to Dean Kopesky for reporting this). 1999-04-29 Jim Kingdon * sanity.sh: If invoked without any arguments, print a usage message (thanks to Pavel Roskin for a report/patch). * run.c (piped_child): Make the error messages more verbose. (close_on_exec): Reindent. * sanity.sh (devcom3): Several errors are possible in devcom3-9a. Adjust for change to piped_child error message. 1999-04-28 Jim Kingdon * sanity.sh (devcom3): Add some tests of the CVS/Notify file and disconnected "cvs edit". * main.c (opt_usage): Remove -b. 1999-04-20 Derek Price * rcs.c (RCS_delete_revs): RCS_delete_revs uses an RCS_checkout call to get a new copy of a revision to be used internally after old revisions were deleted and it was performing keyword substitutions. This munged all the the revisions of the file on the branch containing the deleted revisions and its sub-branches, as the original they were being patched from was incorrect. Corrected this by passing in "-ko" as an option to RCS_checkout. * sanity.sh (keywordlog): modified this test to verify the correct behavior of 'cvs admin -o'. [Fixed use of \$ in keywordlog test; added code in RCS_delete_revs to abort on binary file on Windows -kingdon] 1999-04-21 Derek Price and Jim Kingdon * tag.c (tag_check_valid): A bug was causing CVS to spin indefinately when -j: was specified. CVS now returns an error. * sanity.sh: Added a test (tagdate-12) to test this. 1999-04-19 Jim Kingdon * sanity.sh (backuprecover): Clean up the repository at the end. 1999-04-18 Derek Price * sanity.sh added a test (backuprecover) to test cvs behavior with a repository that is out of date relative to the developer's workspaces. [Fix --keep code; move test to "Repository Storage" section since it doesn't really exercise the diff/diff3 library. -kingdon] 1999-04-13 Derek Price * sanity.sh (diff): Tests to verify correct operation of the --ifdef parameter to cvs diff. [indentation fixed -kingdon]. 1999-04-13 Derek Price for Noah Friedman * diff.c (diff): Put "--ifdef=" in opts string, not "-D"; the latter is confused by pserver for a date spec. 1999-04-14 Jim Kingdon * fileattr.h: Adjust comments to reflect the official version of the fileattr format now being in cvs.texinfo. 1999-04-05 Jim Kingdon * sanity.sh (watch5): Remove nonstandard --keep code. Don't pass -f to rm when cleaning up (that tends to mask bugs). Add watch5 to list of tests at start. Add comment explaining why we consider the behavior we test for the right one. Rename a few tests which had been erroneously named watch6* instead of watch5*. * client.c (update_entries): Add comment with brief discussion of whether there is a better way. 1999-04-05 Derek Price * client.c (update_entries): Only call mark_up_to_date (which deletes the CVS/Base/ file for watched and edited files) on commit. * sanity.sh: Make sure the CVS/Base/ file for a watched and edited file is not removed on a status or update of a touched/unmodfied file. 1999-03-30 Larry Jones * client.c (get_responses_and_close), commit.c (commit), update.c (do_update): If the sleep(1) call returns prematurely (due to the way wakeup is scheduled or receiving a signal), do it again. 1999-03-26 Jim Kingdon * server.c (server): Add comment about Gzip-stream vs. RQ_ROOTLESS. * sanity.sh (modules3-11b): Adjust exact text of error message to reflect 1999-03-24 change to dirswitch. 1999-03-25 Jim Kingdon * admin.c (admin): Make argument to -e optional, to match the documentation. * sanity.sh (admin-19a-2): Test for this. * server.c (serve_root): Update comment about checking for missing Root request. 1999-03-24 Jim Kingdon * server.c (dirswitch): Also check dir here, similar to what server_pathname_check does for other cases. * sanity.sh (files): Adjust files-14 to test for this. 1999-03-24 Derek Price and Jim Kingdon * sanity.sh: added a test (files-13) to test .. indirection in a path and another (files-14) to make sure we still fail out when the '..' indirection takes us into the $CVSROOT directory or beyond. 1999-03-24 Larry Jones * rcs.c: Change enum constants ADD and DELETE to something less likely to run into conflicts. 1999-03-21 Jim Kingdon * sanity.sh (tagf): New test, tests for moving a branch tag to a non-branch tag and trying to recover. 1999-03-12 Jim Kingdon * sanity.sh (branches): Tweak test branches-5 to test the case in which one modifies a file and then branches it. 1999-03-09 John Bley of duke.edu * mkmodules.c (filelist): Missed a NULL in this struct (should have 3 members, only had 2). 1999-03-07 Jim Kingdon * sanity.sh (Index): Rename new test from rm_CVS/Root to rmroot (we don't have a formal rule about funky punctuation in test names but both underscore and a slash is too funky for me :-)). Reindent a few tests which were off. * root.c: Remove the sentence which had the improper English; there isn't really a need for that sentence and it isn't particularly accurate any more. 1999-02-27 Derek Price * sanity.sh: Added rm_CVS/Root test to test that CVS uses $CVSROOT rather than dumping core when running remotely and the admin file CVS/Root is deleted from the workspace. Also, altered a few 'cvs commit' 's in regular expressions to fit the .${PROG} commit. portability syntax. * recurse.c: Stopped CVS from dumping core in the case tested above. * root.c: Fixed somebody's improper english. 1999-02-25 Larry Jones * sanity.sh (keyword2-12): Use ${QUESTION} instead of ? in the expected result. 1999-02-24 Jim Kingdon * sanity.sh (keyword2): Restore the original \\\$ instead of $. The latter ends up working due to various kludgy semantics in the shell and regular expressions, but the former is cleaner. * sanity.sh (keyword2): Protect keywords against accidental expansion in sanity.sh itself (most occurrences had this, but not all). 1999-02-23 Derek Price and Jim Kingdon. * sanity.sh (keyword2): New test, tests for merging with -kk. 1999-02-22 Jim Kingdon * version.c: Ease version number to 1.10.5.1. * version.c: Version 1.10.5. 1999-02-18 Jim Kingdon * sanity.sh (files): New test, for a relatively obscure spurious "Up-to-date check failed" in client/server. * main.c (lookup_command_attribute): Don't check for "history" twice. 1999-02-17 Jim Kingdon and Hallvard B Furuseth * root.c (parse_cvsroot): Rearrange ifdefs to squelch possible warnings about statement not reached. 1999-02-16 Jim Kingdon * recurse.c (start_recursion): If we are skipping the current directory (due to it being from the wrong repository), also adjust the arguments we send to the server accordingly (like we already do for the case in which there is no CVS directory). * sanity.sh (multiroot4): New test, for this. All these tests had passed locally, but remote multiroot4-12 tests for this fix. (multiroot): Adjust multiroot-diff-1, multiroot-update-2, multiroot-tag-1, multiroot-status-1, multiroot-update-3, and multiroot-log-1 to reflect the cosmetic change this produces (one less "Diffing ." message). (multiroot2): multiroot2-8 likewise. 1999-02-10 Jim Kingdon * tag.c (cvstag): Don't pass SEND_NO_CONTENTS if -c specified. * sanity.sh (tagc): New test, for various tag -c behaviors. Test tagc-6 tests for this fix. 1999-02-09 Jim Kingdon * error.c (error): Rewrite to no longer use vasprintf (see ../lib/ChangeLog for rationale). Note the slight change in interface - callers which want %8.8s or similar formats need to call sprintf. * lock.c (lock_wait, lock_obtained): Use sprintf. 1999-02-08 Jim Kingdon * rcs.c (RCS_delete_revs): Pass -a to diff_exec. * sanity.sh (binfiles3): New tests binfiles3-9 through binfiles3-13 test for this fix. * sanity.sh (binfiles): New tests binfiles-o4 and binfiles-o5 (which don't test this bug, just on general principles). 1999-02-04 Jim Kingdon * lock.c (lock_name): Permissions of directories in LockDir shouldn't depend on the umask. * sanity.sh (lockfiles): Set umask and CVSUMASK, to test for this. 1999-02-01 Jim Kingdon * sanity.sh (keywordlog): New tests keywordlog-22 and keywordlog-23 test keyword expansion and $Log. Adjust other tests so that revisions differ more from each other, so this is a better test. 1999-01-29 Jim Kingdon * commit.c (checkaddfile): If options is "", treat it the same as NULL. Centralize this check, and the one for it starting with "-k", at the start of the function. * rcs.c, rcs.h (RCS_setexpand): New function. * admin.c (admin_fileproc): Access keyword expansion field via RCS_getexpand and RCS_setexpand, rather than directly. * commit.c (checkaddfile): When resurrecting, set the keyword expansion mode. * sanity.sh (binfiles3): Adjust tests binfiles3-7 and binfiles3-8 for the new behavior. 1999-01-27 Jim Kingdon * sanity.sh (multiroot3): Add new variant of multiroot3-10 test for RELATIVE_REPOS. Move multiroot3-11 test out of the conditionals; it works the same for remote or local, RELATIVE_REPOS or no. * options.h.in: Make RELATIVE_REPOS the default, as has been announced as a future direction since 1997-10-11. * sanity.sh (multiroot): Tweak multiroot-update-1a and multiroot-update-1b tests to work with either RELATIVE_REPOS or non-RELATIVE_REPOS. * sanity.sh (client-9): Don't assume the time zone. 1999-01-26 Jim Kingdon Fix one facet of the "cvs add -kb" re-adding problem (the other known facet is tested for by binfiles3-8). * add.c (add): When re-adding a file, set the keyword expansion as we normally would. * sanity.sh (binfiles3): New test binfiles3-6a tests for this. 1999-01-22 Jim Kingdon * sanity.sh (rmadd2): New tests, for undoing a commit. 1999-01-21 Eric Mumpower * sanity.sh (reposmv): Actually modify CVSROOT in current environment when calling functions, rather than trying to achieve the same effect with "CVSROOT=foo functionname". (Many common bourne shells, including those in SunOS and Solaris 2.4-2.7, do not properly handle "ENVVAR=foo command" when "command" is a user-defined shell function rather than an actual executable.) 1999-01-15 Jim Kingdon * sanity.sh (rcs3): Redirect awk's stdin to /dev/null like all the other awk invocations. GNU awk seems not to read stdin in this case, but that behavior is hard to reconcile with the Single Unix Spec and some awks don't do it. * sanity.sh (binfiles, binfiles2, binfiles3, server): Use the same tr trick as in rcs3. People don't seem to have been complaining, and this should fix server-4 for HPUX. 1999-01-14 Jim Kingdon * client.c (recv_line): If the line we are reading contains a character which would sign-extend to EOF, don't treat it as end of file. recv() doesn't report end of file this way and this might fix bugs with 0xff characters. 1999-01-14 Larry Jones * client.c (recv_line): Handle EOF from server. * sanity.sh (importc-8, importc-9): Accept anything in the seconds fields of the timestamps since touch doesn't set it reliably. (This isn't great, but it's better than nothing.) 1999-01-14 Jim Kingdon * run.c (run_exec): Adjust comment about vfork; this isn't the place to get into a treatise about fork performance vs. vfork performance but it isn't quite as simple as whether one has copy-on-write. 1999-01-13 Larry Jones * sanity.sh (dotest_fail): Handle spurrious output from assert better. * sanity.sh (rcs3-4, rcs3-5a): Handle even more variants of the assertion failure message. 1999-01-12 Larry Jones * sanity.sh (mtfr-3): ls behavior varies wildly on nonexistant files, just use echo instead. 1999-01-11 Jim Meyering * sanity.sh (mkmodules-temp-file-removal): New test, for this. * mkmodules.c (mkmodules): Remove each `CVSROOT/.#[0-9]*' temporary file that's used to check out files listed in CVSROOT/checkoutlist. Remove extra semicolon at end of line. 1999-01-11 Larry Jones * sanity.sh (rcs3-5a): Allow for multiple lines of output before the assertion failure message. * sanity.sh (lockfiles-6, client-8): Work around bug in HP-UX chmod (doesn't allow anything to follow omitted permissions). 1999-01-09 Jim Kingdon * client.c (set_sticky): Nonfatal error if we can't write it. * sanity.sh (dirs2-8 through dirs2-14): New tests, for this. * sanity.sh (rcs3): Write NUL character with tr not awk, in accordance with Single Unix Specification. Hopefully will fix rcs3-7 for HPUX. Will not work on SunOS4, but then again neither did the old syntax. 1999-01-05 Jim Kingdon * client.c, update.c: Rename MD5* functions to cvs_MD5* per corresponding change to ../lib/md5.h. 1999-01-03 Jim Kingdon * sanity.sh (client): Give file1 a predictable mode so that the output in client-9 will not depend on the umask of the user running the tests. 1998-12-29 Jim Kingdon * client.c (client_senddate): Use date_to_internet rather than using our own "5/26/1997 13:01:40 GMT" date format. * main.c (date_to_internet): Check for errors from sscanf. Always send a four digit year. Send hours, minutes, and seconds as two digits per RFC822. * sanity.sh (client): New tests client-8 and client-9 test for this. * sanity.sh (rcs2): New tests rcs2-6 through rcs2-8 test for fix to lib/getdate.y (before the fix, "100 months" or "8 years" would tend to mean the year 1969, thus the tests would give "cvs update: file1 is no longer in the repository"). 1998-12-28 Larry Jones * entries.c (Register): Return if unable to open log file to avoid referencing the invalid file pointer. * sanity.sh (dirs2-7): With above change, no longer fails. * sanity.sh (rcs3-5a): Another assertion failure message. * sanity.sh (pserver-4, pserver-5): Some 4.4BSD derived systems spit out bogus error messages when initgroups is called as non-root. 1998-12-23 Larry Jones * sanity.sh (rcs3, dotest_fail): The assertion failure message varies wildly between different systems and the resulting abort call can even result in spurrious output. Fix the regexp to accept nearly anything containing some kind of assertion failure and ensure that any spurrious output ends up in the output file instead of on the terminal. 1998-12-23 Jim Kingdon * admin.c, checkout.c, commit.c, cvsrc.c, expand_path.c, history.c, ignore.c, import.c, log.c, mkmodules.c, modules.c, myndbm.c, parseinfo.c, rcs.c, remove.c, rtag.c, status.c, subr.c, tag.c, wrapper.c: Cast all char's to unsigned char before passing them to ctype.h functions (isalpha, isgraph, isalnum, isspace, isdigit, isprint, isupper). Whether using ctype.h is the right thing at all is unclear to me (having the server depend on locale seems wrong, as we don't necessarily have any good way to set the right locale, if there even is such a concept as 'right' locale in this context), but as long as we use ctype.h we might as use it according to the standards (this affects systems where plain char is signed but users supply characters with the 8th bit set). Thanks to Paul Eggert for suggesting this. 1998-12-22 Jim Kingdon * sanity.sh (rcs3): Oops, the earlier fix for srcdir only fixed the non-remote case, not the remote case. Fix the other occurrence. 1998-12-22 Jim Kingdon * sanity.sh (rcs3): The assertion failure message varies slightly depending on whether CVS was built with srcdir != ".". Fix regexp. 1998-12-21 Jim Kingdon * rcs.c (RCS_getdate): Reindent Jim Meyering's change; remove unused variable x_vers. * rcs.c: When printing an unexpected character we found in the RCS file, print it in hex rather than as a character (see comment for rationale). * sanity.sh (rcs3): Adjust rcs3-2 and rcs3-7 tests accordingly. * sanity.sh (rcs3): New test, for some error handling cases involving parsing RCS files. 1998-12-16 Jim Meyering * rcs.c (RCS_getdate): Handle the case in which a file is first imported after its initial version has been created. * sanity.sh (import-after-initial): New test for that. 1998-12-17 Jim Kingdon * server.c (serve_root): Pserver_Repos only exists if AUTH_SERVER_SUPPORT is defined. 1998-12-12 Jim Kingdon, and Derek R. Price of Stortek. * sanity.sh (multiroot): Change + to ${PLUS}. 1998-12-12 Jim Kingdon, and Gary Young of Motorola * sanity.sh (admin): In tests admin-13, admin-25, and admin-29, allow 4 digit year in addition to 2 digit year. 1998-12-12 Jim Kingdon * sanity.sh (log): New tests log-14a and log-14b test for -rHEAD and for HEAD as (nonexistent) file name. 1998-12-02 Jim Kingdon * version.c: Squish version number to 1.10.4.1. * version.c: Version 1.10.4. 1998-11-24 Jim Kingdon * recurse.c (do_file_proc): Check for errors from RCS_parse. * sanity.sh (rcslib-symlink-7 through rcslib-symlink-10): New tests, test for this. * sanity.sh (reposmv-2): Adjust for 22-Nov change to Find_Names. * entries.c (Register): If we can't write Entries.Log, make it a nonfatal error. * sanity.sh (dirs2): Test for this fix. * sanity.sh (dirs2): Clean up working directory at end of test. 1998-11-23 Jim Kingdon * sanity.sh (dirs2): New test, for some more cases involving deleting directories and such. * sanity.sh (dirs): Update for yesterday's change in Find_Names error handling. The error in dirs-4 is fairly different now; in dirs-3 and dirs-3a it is the obvious change. 1998-11-22 Jim Kingdon * sanity.sh (release): Move the commments listing "cvs release" tests from modules2-6 to here. * release.c (release): Update comment to reflect "? foo" case. * find_names.c (Find_Names): If we can't read the repository, make it a nonfatal error. Tell the caller whether this happened. (find_rcs): Add comment regarding this behavior. * recurse.c (do_recursion): If Find_Names gives an error, skip the directory and print a message saying so. * sanity.sh (modes3): New test, for this. 1998-11-18 Jim Kingdon * rtag.c (rtag_usage), tag.c (tag_usage): Use "-r rev" consistently. * sanity.sh (conflicts3): Tests conflicts3-24 through conflicts3-28 test for another case similar to conflicts3-22. 1998-11-14 Jim Kingdon * sanity.sh (diff): New test, for now just tests for the "I know nothing" message. * sanity.sh (conflicts2-142b7 through conflicts2-142b11): New tests; resurrecting doesn't work from one level up. * sanity.sh (mwrap-7): Remote prints the messages in a different order. 1998-11-13 Jim Kingdon * tag.c (check_fileproc): Log tag deletions. * rtag.c (check_fileproc): Likewise. * sanity.sh (taginfo-14 through taginfo-18): New tests, for these behaviors. 1998-11-12 Jim Kingdon * sanity.sh (mwrap-7): Update for the noexec fix. * server.c (server_copy_file): Add comment about noexec. * update.c (checkout_file): Handle noexec case involving revbuf and modes. (update_fileproc): In case T_NEEDS_MERGE, let merge_file take care of noexec, so it can tell the user if there would be conflicts. (merge_file): Print "conflicts found in FILE" message regardless of noexec. Add comment about checking for whether the file already contained the changes, and noexec. * sanity.sh (conflicts-192a): New test, for this. 1998-10-20 Jim Kingdon Use the gzip library on the server. Probably doesn't speed things up as currently implemented, but does avoid hassles in terms of finding an external gzip program. * zlib.c, server.h (gunzip_and_write, read_and_gzip): Now returns whether a fatal error occurred, rather than expecting error (1, ...) to work. * client.c (update_entries, send_modified): Change callers. * server.c (receive_file): Rewrite gzip code to use gunzip_and_write rather than filter_through_gunzip. (server_updated): Likewise, use read_and_gzip rather than filter_through_gzip. * client.c, client.h (filter_through_gzip, filter_through_gunzip), run.c, cvs.h (filter_stream_through_program): Removed; no longer used. * sanity.sh (server): New tests server-4 and server-5 test this feature (note that CVS 1.10 also passes these tests; the behavior is supposed to be unchanged). 1998-10-19 Jim Kingdon * sanity.sh (multiroot3): New test, tests for a few more multiroot cases. * lock.c (lock_name): Set the permissions on each directory we create to that of the parent directory. * sanity.sh (lockfiles): New chmod and tests lockfiles-7a and lockfiles-7b test for this. Adjust lockfiles-5 for new text of error message. 1998-10-15 Jim Kingdon * server.c (requests): Set RQ_ROOTLESS for "Set". * sanity.sh (info): Also clean up $HOME/.cvsrc. (server): Test that we can send Set before Root (had been tested by crerepos-6b, but only if you ran the info test first). Tests for this fix. 1998-10-14 Jim Kingdon * subr.c (expand_string): Tweak the algorithm so that the size that it allocates is generally a power of two. 1998-10-14 Eivind Eklund and Jim Kingdon * commit.c (commit): For the client, don't worry about whether we are root. 1998-10-13 Jim Kingdon * server.h (struct request): Change status field to flags and add RQ_ROOTLESS. * client.c (handle_valid_requests, supported_request): Change status to flags. * server.c (requests): Change status to flags. Add RQ_ROOTLESS. * server.c (server): If not RQ_ROOTLESS, and we haven't gotten a Root request, give an error. 1998-10-12 Jim Kingdon * version.c: Slide version number to 1.10.3.1. * Version 1.10.3. * sanity.sh (modules2-17): Update for 9 Oct 1998 change to update_dirent_proc. 1998-10-11 Jim Kingdon * commit.c (checkaddfile, commit_fileproc): A numeric value for 'tag' does not mean that we are adding on a branch. * sanity.sh (keywordlog): Adjust this test, to test for this (replaces comment saying we should be doing it). (rmadd): Likewise. * sanity.sh (rmadd): New test, tests for various existing behaviors with "cvs ci -r". 1998-10-09 Jim Kingdon * update.c (update_dirent_proc): For local CVS, if the directory does not exist in the working directory nor in the repository, just skip it. * sanity.sh (dirs): New tests dirs-3a, dirs-7 and dirs-8 test for this and related behaviors. Note that the new behavior was also the previous behavior for remote; we are only changing it for local. * wrapper.c, cvsrc.c, ignore.c: Add comments about ignoring .cvsrc and friends if we can't find a home directory. * expand_path.c (expand_path): If we can't find the home directory, give an error rather than a coredump (or worse). * login.c (construct_cvspass_filename): Don't use errno in error message; get_homedir doesn't set it. Add comment about this message. 1998-10-07 Jim Kingdon * diff.c (diff): Set variables to NULL at the start, and free memory at the end. * sanity.sh (multiroot2): Add tests for this (before the fix, multiroot2-12 would abort with "no more than two revisions/dates can be specified"). 1998-10-06 Jim Kingdon * Makefile.in (installcheck check): Remove references to RCSBIN; they don't do anything now that RCSBIN is ignored. * client.c: Clean up horrible confusion about whether stored_mode or stored_mode_valid (or nothing :-)) indicates whether stored_mode is allocated. Should fix crashes (for example, on NT when the server has renamed multiple files from uppercase to lowercase). * sanity.sh (dirs): New tests, tests for some cases involving admins who do surgery on the repository. 1998-10-03 Johannes Stezenbach * vers_ts.c (Version_TS): If UTIME_EXPECTS_WRITABLE, if necessary change the file to be writable temporarily to set its modification time. 1998-10-03 Jim Kingdon * client.c (handle_error): Add comment about indicating which errors are from the server. 1998-10-01 Jim Kingdon * sanity.sh (devcom-180): Allow one digit day. 1998-09-30 Jim Kingdon * main.c (main): Don't call Name_Root if -d specified. * recurse.c (do_recursion, do_dir_proc): Don't check CVS/Root if -d was specified. * import.c (import): Indentation fix. * sanity.sh (multiroot): Update for this change. (reposmv): New test, tests for this. 1998-09-28 Jim Kingdon * sanity.sh (multiroot2): New test, tests some nested directory cases. 1998-09-25 Jim Kingdon * sanity.sh (multiroot): Change a few comments which said modules when they meant directories. 1998-09-25 Jim Meyering * sanity.sh (devcom-180): Add 0-9 to the range of characters allowed in hostname regexp. 1998-09-25 Jim Kingdon * sanity.sh (log2): New test log2-7a tests for one error handling case. Add a comment about another. 1998-09-24 Jim Kingdon * sanity.sh: Change crerepos test back to :ext: (for several reasons; see comments). 1998-09-24 Noel Cragg * sanity.sh (rcslib-symlink-5, rcslib-symlink-6): new tests to check the operation of "tag" when there are symlinks in the repository. * rcs.c (RCS_checkin): remove old code that resolved the symlink and call resolve_symlink instead. (RCS_rewrite): call resolve_symlink before doing anything else to make sure we're operating on the file and not the symlink. * subr.c (resolve_symlink): new routine -- resolves a symbolic link chain to its destination. * cvs.h: add prototype. * sanity.sh (basica-6.2, basica-6.3): changed match expressions to reflect new diff output. * rcs.c (make_file_label): generate labels for files that include the pathname so that output from "cvs diff" is useable by patch. Looks like I came up with the mods as Andy Piper ; his patch was on the Cyclic unofficial patches page. * sanity.sh: change remote access method from ext to fork. This results in a significant speed improvement when running the testsuite. The ext method on my machine (i586 120MHz Linux 2.0.35 with TCP wrappers installed) runs in 450% of the time of the local method while the fork method runs in only 150% of the time of the local method! Yow! Am I SWAPPING yet?! (crerepos-6a, crerepos-6b): change to reflect different error messages for fork method. (modes-15): same. * client.c (connect_to_forked_server): new routine. (start_server): call the above when method is fork_method. * root.c: add a new method named "fork". This method uses the remote protocol, but does so by forking a "cvs server" process directly rather than doing "rsh host cvs server" (for example). This new method has few advantages for day-to-day use, but has three important benefits for debugging: 1) Most secure installations these days don't allow rsh access. With this new method, we can still test the remote protocol on these machines because we don't need to be able to make a local TCP connection. 2) Even if installations allow rsh access, they almost always have TCP wrappers to check permissions by IP/hostname. This causes a short delay for every connection. For invocations from the command line, this doesn't matter much, but it adds up to a significant amount of time when running the testsuite. 3) On machines that can't (or do not usually) provide rshd access (I'm thinking of WNT/W95 in particular), we can now run tests of the remote protocol using this method. Indeed, we can run remote protocol tests on any machine that has an implementation of piped_child(). (parse_cvsroot): handle new method. (error_exit, xstrdup, isabsolute): new stub functions to use when compiling root.c with the DEBUG option. (main): fix a few typos. * cvs.h (CVSmethod): add fork_method. * server.c (create_adm_p): use Emptydir as the placeholder directory instead of "." to avoid problems with "cvs update -d" et al. 1998-09-22 Noel Cragg * sanity.sh (devcom-180): fixed typo in regexp. * main.c (main): remove need_to_create_root and related code (including CVS_IGNORE_REMOTE_ROOT environment variable). The current implementation (just removed) of rewriting the contents of the CVS/Root file isn't desirable for a number of reasons: 1) Only the top-level CVS/Root directory is updated. If we're really interested in pointing our WD at another CVSROOT, we should have a separate command. 2) With the new multiroot mods, we don't ever want to rewrite CVS/Root files in the way the removed code did. Consider: cvs -d repository1 co a cd a cvs -d repository2 co b cvs -d repository2 update b The update command would rewrite the contents of a/CVS/Root to the incorrect value. Bad. We then wouldn't be talking to the correct repository for files in a. 3) The removed code seems to be a quick hack to support working directories checked out from multiple repositories. With the CVS_IGNORE_REMOTE_ROOT variable set, one could perform commands as in example 2, above, without worring about updating CVS/Root files. While in pre-1.10.1 recursive commands wouldn't handle that working directory hierarchy, one could use commands like "cvs foo -l" instead. While not great, this allows you (with a lot of manual interaction) to have a multiroot WD. Since we now have multiroot mods checked in, we don't need this code. (lookup_command_attribute): while we don't need the CVS_CMD_USES_WORK_DIR flag anymore (since it only was supporting the need_to_create_root code), I'm leaving it in. It may come in handy at some later date. 1998-09-18 Jim Kingdon * version.c: Advance version number to 1.10.2.1. * Version 1.10.2. 1998-09-13 Jim Kingdon * client.c: Refuse to Copy-file to another directory * sanity.sh (client): New test, tests for this. * edit.c (editors_fileproc), watch.c (watchers_fileproc): Use cvs_output rather than writing to stdout. * sanity.sh (devcom): Use dotest for tests 178, 180, and 183 (tests that we preserve existing behavior on "cvs editors"). * commit.c (check_fileproc): Don't allow commits in Emptydir. * sanity.sh (emptydir-8): Test for this change in behavior. * sanity.sh: Add some compatibility tests to TODO comments at end. 1998-09-10 Jim Kingdon * wrapper.c (wrap_add): Remove obsolete comment about -m. * server.c (server_updated): Check for error from CVS_UNLINK. 1998-09-09 Jim Kingdon * server.c (serve_root): Allocate with malloc, not xmalloc. * root.c (set_local_cvsroot): Move memory allocation from here... * server.c (serve_root): ...to here. Fixes error handling. * root.c (parse_cvsroot): Don't call check_root_consistent; parse_cvsroot is only used for local and client. * root.c (set_local_cvsroot): Move check_root_consistent functionality from here... * server.c (serve_root): ...to here. Fixes error handling. Also made the error more explicit, while I am at it. * server.c (Pserver_Repos): Now static. * cvs.h: Don't declare it. * root.c (check_root_consistent): Removed; no longer needed. * sanity.sh (pserver): New test, tests for this behavior and some other basic pserver stuff. * update.c (merge_file): Use cvs_output for "already contains the differences" message. Found this one when I actually observed the out-of-order bug in Real Life(TM). 1998-09-09 Jim Kingdon * find_names.c (find_dirs): Make sure to zero errno before going around the loop again. * find_names.c (find_rcs): Make sure to set save_errno. (thanks to Alexandre Parenteau for reporting both problems). 1998-09-09 Jim Kingdon and Michael Pakovic * edit.c (notify_do): Only free line if it is not NULL. 1998-09-07 Jim Kingdon * cvs.h: dirs_sent_to_server should not be inside AUTH_SERVER_SUPPORT (reported by both Richard Levitte and Murray Bishop, thanks). * lock.c, cvs.h: New variable lock_dir. * parseinfo.c (parse_config): New option LockDir. * lock.c (lock_name): New function, abstracts out lock file naming and also supports LockDir. * lock.c (lock_simple_remove, Reader_Lock, write_lock, set_lock): Call it (6 places, to create/remove read/write/master locks). (Lock_Cleanup): Refuse to reenter this function. * sanity.sh (lockfiles): New test, tests for this feature. 1998-09-03 Jim Kingdon * sanity.sh (multiroot): Expect ${TESTDIR} in output instead of assuming it is /tmp/cvs-sanity (thanks to Mark D. Baushke of Cisco). Clean up working directory when done (fixes apparent thinko). * server.c (create_adm_p): Fix one "return" which didn't return a value. (dirswitch): Check for errors from create_adm_p. * sanity.sh: Set LC_ALL rather than just LC_COLLATE. Wed Sep 2 02:30:22 1998 Jim Kingdon * version.c: Bump version number to 1.10.1.1. * Version 1.10.1. 1998-09-01 Jim Kingdon Administrative note regarding Noel's changes to allow one to switch from one CVS root to another in a single command: The ChangeLog entries for the changes which Noel just checked in appear for 1998-09-01, 1998-08-28, 1998-08-25, 1998-08-19, and 1998-08-18, rather than being all together. * main.c (set_root_directory): Fix whitespace. (main): Nuke new -m option and just have that message controlled by -t. * server.c (server): Revert the CVS_SERVER_SLEEP code back the way it was in CVS 1.10. Attaching to the parent process is relatively boring (you can just run "cvs server" under a debugger instead), but connecting to the child process is what the old code was for. * recurse.c, server.c: Remove DEBUG_NJC code. 1998-09-01 Noel Cragg * server.c (do_cvs_command): add another environment variable, CVS_SERVER_SLEEP2, after forking to pause the program so one can attach a debugger. * sanity.sh (crerepos): clean up crerepos-18 now that multiroot works in this case. (multiroot): finalize tests for local vs. remote operation. * recurse.c (start_recursion): near the beginning, save the list of directories to spoof as command-line arguments, if necessary. Use that list near the end and call send_file_names to send those arguments to the server. (do_argument_proc): removed, since we call send_file_names now. * main.c (main): re-initialize dirs_sent_to_server on each pass through the loop for each CVSROOT. * cvs.h: add proto for global variable which keeps track of which directories have been sent to the server when in client mode. * client.c (is_arg_a_parent_or_listed_dir): new function. (arg_should_not_be_sent_to_server): new function. Tries to decide whether the given argument should be sent to the server, based on the current CVSROOT and the list of directories sent to the server. (send_repository): add the directory name to the list of directories sent to the server. (send_file_names): call arg_should_not_be_sent_to_server. * add.c (add): switch the order of send_files and send_file_names to make multiple repository support possible. send_files needs to create a list of directories being requested so that send_file_names can decide which command-line arguments to send to the server for the given current CVSROOT. * admin.c (admin): same. * commit.c (commit): same. * diff.c (diff): same. * edit.c (editors): same. * log.c (cvslog): same. * rcs.c (annotate): same. * remove.c (cvsremove): same. * status.c (cvsstatus): same. * tag.c (cvstag): same. * update.c (update): same. * watch.c (watch_addremove): same. (watchers): same. 1998-08-31 Jim Kingdon * sanity.sh: Remove "debug" function; it was apparently checked in accidentally by Norbert Kiesel's change. 1998-08-31 Norbert Kiesel * release.c (release): modify last patch to release so that save_cwd is called only once and restore_cwd is always called when neccessary. Also fixed a tiny memory leak. * sanity.sh (release): added some more tests for "cvs release" including a test with two dirs and a "no" for the first one (which fails without the above patch). 1998-08-28 Noel Cragg * sanity.sh (crerepos-18): add new comment and change test slightly to support multiroot. (multiroot): add more tests. * server.c (create_adm_p): new function. (dirswitch): call create_adm_p. Modify the code to always write a new CVSADM_REP file, since create_adm_p might have put a placeholder there and our value is guaranteed to be correct. (server): move the CVS_SERVER_SLEEP check here so we can debug things at an earlier stage. * recurse.c (start_recursion): add large comment about the ideal solution to the "Argument xxx" problem. * main.c (main): move position of debugging comment for -m flag. * diff.c (diff): clear a static variable. * client.c (send_file_names): check to see if we should send this argument to the server based on the contents of the appropriate CVSADM directory. This avoids "nothing known about foo" messages and problems with duplicate modules names in multiple repositories. (send_a_repository): change method of calculating toplevel_repos to support multiple CVSROOTs. (start_server): clear some static variables. 1998-08-28 Jim Meyering * sanity.sh (basicc-8, basicc-11): Use `.*' instead of explicit `Operation not permitted'. Solaris2.5.1 gets a different error: `Invalid argument'. 1998-08-26 Eric M. Hopper * sanity.sh: Set LC_COLLATE to "C". 1998-08-25 Noel Cragg * sanity.sh (multiroot): new set of tests to check the behavior of multiroot. * diff.c (diff): set options value to NULL after freeing to reset the state for the next time around. 1998-08-25 Jim Kingdon Fix problems with trying to rename an open file: * rcs.c, rcs.h (RCS_setattic): New function. * commit.c (remove_file, checkaddfile): Call it. 1998-08-24 Jim Kingdon * release.c (release): Use save_cwd and restore_cwd to get back to where we started, rather than hoping that CVS_CHDIR ("..") will do something useful. This removes the need for most of release_delete, so remove that function and inline what is left. * sanity.sh (basicc): Adjust tests for this fix, also some tests with multiple arguments to "cvs release" (in the non-"-d"-case, it would seem like the old code would CVS_CHDIR into directories and not CVS_CHDIR back, but I'm not going to investigate this and it should be a moot point with this fix.). * sanity.sh (basicc): Add tests for a serious bug in "cvs release -d .". More error handling fixes: * ignore.c (ignore_files): Check for errors from opendir and readdir. * find_names.c (Find_Names): Check for errors from find_rcs. (find_rcs, find_dirs): Comment error handling better; also return an error if we got one from readdir. * filesubr.c (deep_remove_dir): Also check for errors from readdir. * import.c (import_descend): Print message on error from opendir or readdir. * commit.c (remove_file): Check for errors from CVS_MKDIR and CVS_RENAME. (remove_file): No need to remove the file in the temporary directory; server.c now informs time_stamp_server of what is going on via CVS/Entries rather than a file with a kludged up timestamp. * client.c, entries.c, login.c, logmsg.c, mkmodules.c, patch.c, remove.c, update.c: Check for errors from unlink_file. * mkmodules.c (write_dbmfile, rename_dbfile, rename_rcsfile): Check for errors from fclose, CVS_RENAME, and CVS_STAT. * mkmodules.c (checkout_file): Clarify error handling convention. * mkmodules.c (mkmodules): Call checkout_file accordingly. * entries.c (Entries_Open): Check for errors from fclose. 1998-08-21 Ian Lance Taylor * import.c (import): Output suggested merge command using cvs_output_tagged rather than just cvs_output. Don't put CVSroot_cmdline in the log file. * client.c (importmergecmd): New static struct. (handle_mt): Handle +importmergecmd tag. * sanity.sh (import): Use an explicit -d in importb-2, to test whether it is reported in the suggested merge command. 1998-08-20 Ian Lance Taylor * sanity.sh (import): Rewrite tests to use dotest. 1998-08-20 Jim Kingdon * sanity.sh: Add comments about binary files and cvs import. 1998-08-19 Jim Kingdon * sanity.sh (importc): Use ${username} in one place where I had missed it. Make import -d work client/server: * client.c, client.h (client_process_import_file): Take new argument, for whether -d is specified, and send Checkin-time request if it is set. * import.c (import_descend): Pass it. * main.c, cvs.h (date_to_internet): New function. * server.c (server_modtime): Call date_to_internet. * server.c (serve_checkin_time): New function. (requests): Add "Checkin-time" request. (serve_modified): If it was sent, set the timestamp in the temporary directory. * import.c (import): If the client sends a -d option, complain. (import): For the server, always use the timestamps from the temp directory. (import): Don't send a -d option to the server. * sanity.sh (importc): Add tests for import -d. Wed Aug 19 15:19:13 1998 Larry Jones * sanity.sh (unedit-without-baserev-5): use ${DOTSTAR} instead of .* since we expect to match multiple lines. 1998-08-19 Ian Lance Taylor * cvs.h (CVSroot_cmdline): Declare. * root.c (CVSroot_cmdline): Define. * main.c (main): Set CVSroot_cmdline if the -d option is used. * import.c (import): If CVSroot_cmdline is not NULL, then mention an explicit -d option in the suggested merge command line. Wed Aug 19 00:28:50 1998 Noel Cragg * recurse.c (do_dir_proc): don't muck with CVS/Root directories when running in server mode. (do_recursion): same. * main.c (main): add the command-line option `m' to help debug the multiroot environment; it prints out the value of CVSROOT for each iteration through the main loop. Also, changed the main loop so that it gets executed only once when running in server mode (the server will only deal with a single CVSROOT). * recurse.c (do_recursion): change default for PROCESS_THIS_DIRECTORY to true; we should always process a directory's contents unless there's an existing CVS/Root file with a different root than the current root to tell us otherwise. (do_dir_proc): same. Tue Aug 18 14:30:59 1998 Noel Cragg * recurse.c (do_recursion): check the current value of CVS/Root and add it to our list of CVSROOTs if it doesn't exist. Decide whether or not to process files in this directory based based on the value of CURRENT_ROOT. (do_dir_proc): same. * main.c: add two new globals -- root_directories and current_root -- which keep track of the values of CVSROOT we've seen and which value of CVSROOT we're currently processing. (main): put the main loop for stepping through cvsroot values here, since we might need to send command-specific arguments for every unique non-local cvsroot. Moved blocks of code around so that one-time initializations happen first (outside the loop) and the other stuff happens inside the loop. (set_root_directory): helper function. * cvs.h: add prototypes for root_directories and current_root, two new globals for keeping track of multiple CVSROOT information. 1998-08-18 Jim Kingdon * sanity.sh: Don't assume that the shell leaves $^ unexpanded in an unquoted here-document (suggested by Bart Schaefer to help when zsh is the shell). 1998-08-17 Ian Lance Taylor * commit.c (checkaddfile): Don't call fix_rcs_modes. (fix_rcs_modes): Remove. 1998-08-16 Jim Kingdon * create_adm.c (Create_Admin): Don't condition traces on SERVER_SUPPORT; SERVER_SUPPORT shouldn't do (much of) anything independent of server_active. * sanity.sh (binfiles3): New test, for yet another binary file bug (sigh). Thanks to Jason Aten for reporting this one. 1998-08-15 Jim Kingdon * rcscmds.c (call_diff_write_output): Update to reflect new calling convention for the write_output callback. 1998-08-15 Jim Meyering * update.c (merge_file): Warn about failed unlink when not due to ENOENT. * server.h (CLIENT_SERVER_STR): New macro * create_adm.c (Create_Admin): Use it. * entries.c (Scratch_Entry, Register): Use it. * filesubr.c (copy_file, xchmod, rename_file, unlink_file): Use it. * history.c (history_write): Use it. * modules.c (do_module): Use it. * no_diff.c (No_Difference): Use it. * run.c (run_popen): Use it. * server.c (server_register): Use it. 1998-08-14 Jim Meyering * hardlink.c (lookup_file_by_inode): Use existence_error rather than comparing errno to ENOENT directly. * client.c (copy_a_file): Unlink destination before doing copy. * sanity.sh (join-readonly-conflict): New test for this -- it would fail only in client/server mode. * sanity.sh (rcsmerge-symlink-4): Don't use `test -L', it's not portable. Instead, match against the output of `ls -l'. (dotest tag8k-16): Simplify tag-construction code and at the same time, avoid using expr's `length' and `substr' operators. Not all versions of expr support those. 1998-08-14 Jim Kingdon * version.c: Bump version number to 1.10.0.1. Thu Aug 13 11:15:24 1998 Noel Cragg * version.c: Change version number to 1.10 and name to `Halibut'. * sanity.sh (rcslib): new tests to check behavior of symlinks in the repository. Wed Aug 12 15:39:38 1998 Noel Cragg * main.c (lookup_command_attribute): the `annotate' command shouldn't require access to the repository. Add comment about commands that do not use the working directory. Mon Aug 10 10:26:38 1998 Noel Cragg * version.c: Change version number to 1.9.30. Thu Aug 6 17:44:50 1998 Noel Cragg * server.c (serve_rdiff): change the name of the command (for error reporting, etc.) from "patch" to "rdiff." (serve_remove): rename from "cvsremove" to "remove." * main.c (lookup_command_attribute): the `rdiff' command shouldn't require write access to the repository. 1998-08-06 David Masterson of kla-tencor.com and Jim Kingdon * commit.c (commit_filesdoneproc): Don't call strlen ("CVSROOT") from within the assert statement. Apparently HP's cc compiler on HPUX 10.20 has trouble with that. 1998-08-06 Jim Kingdon * rcs.c (RCS_checkin): When adding branch, if there is a lock on the branchpoint owned by someone else, leave it alone. This restores CVS 1.9 (RCS 5.7) behavior, fixing a core dump. * sanity.sh (reserved): New tests reserved-16 through reserved-19 test for this fix. 1998-08-05 Jim Kingdon * sanity.sh (unedit-without-baserev): Use ${QUESTION} not "?". This makes it work with GNU expr 1.12 as well as 1.16. Sun Aug 2 20:27:44 1998 Noel Cragg * mkmodules.c: add comment about TopLevelAdmin for the initial contents of CVSROOT/config. 1998-07-29 Jim Kingdon * rcs.c (RCS_checkin): Only try to call xreadlink if HAVE_READLINK is defined. Tue Jul 28 19:33:08 1998 Noel Cragg * version.c: Change version number to 1.9.29. * rcs.c (RCS_checkin): add code to follow symbolic links in the repository. Sun Jul 26 05:14:41 1998 Noel Cragg * This set of changes reverts the code to pre-1.9.2 behavior and does not create CVS directories at top-level (except for the obvious "cvs co ."). Added a new configuration option to switch between 1.9 and 1.9.2 behavior. * recurse.c (do_argument_proc): new function. (start_recursion): in the case that we've done a command from top-level but have no CVS directory there, the behavior should be the same as "cvs dir1 dir2 dir3...". Make sure that the appropriate "Argument" commands are sent to the server by calling walklist with do_argument_proc. * client.c (call_in_directory): only create the top-level CVS directory when we're checking out "." explicitly. The server will force creation of this directory in all other cases. * checkout.c (checkout_proc): only generate the top-level directory when the TopLevelAdmin=yes. Also send a message to the client to do the same. * parseinfo.c (parse_config): handle TopLevelAdmin option. Set top_level_admin. * main.c: add new variable top_level_admin. * cvs.h: add extern definition for above. * sanity.sh: since we're reverting to pre 1.9.2 behavior for top-level CVS directories, I needed to make changes to a bunch of tests that made assumptions about said directories. (preamble): make sure to add read and execute access to everything in TMPDIR before removing, since some tests make things read-only. (basicb-1a, basicb-1b, basicb-9a, basicb-9b): use dotest_fail because these tests check for the non-existant top-level CVS directory. (basicc-3, emptydir-6, emptydir-7, crerepos-6): use "rm -rf" so it won't complain when trying to remove the non-existant top-level CVS directory. (106.5): remove imported-f2-orig.tmp. (modules2-10, emptydir-4, abspath-1ba, abspath-1bb): cd into the directory where files exist before using the "add" command so cvs can find CVSROOT in CVS/Root. (cvsadm-2): look at a different CVS/Repository file, since the top-level one doesn't exist. (taginfo-3): create the directory in the repository directly rather than relying on the fact that the top-level CVS directory was created in a previous test. (serverpatch-6): update first-dir explicity, rather than relying on the non-existant top-level CVS/Entries file. (crerepos-18): look at CVS/Repository in a subdirectory rather than in the non-existant top-level CVS directory. (toplevel): add code to set TopLevelAdmin=yes. (toplevel2): new tests -- same as toplevel, but TopLevelAdmin=no. 1998-07-21 Jim Meyering * rcs.c (RCS_checkout): Hoist frees of rev and value. Warn and return 1 in several cases rather than exiting via `error (1, ...'. The latter could abort a multi-file commit in mid-stream, leaving stale locks in the repository. 1998-07-16 Jim Kingdon * build_src.com (rcscmds.c): Also look for include files in [-.diff], just like Ian's 1998-06-18 change to Makefile.in 1998-07-14 Jim Kingdon * tag.c (pretag_proc), rtag.c (pretag_proc): Don't pass RUN_REALLY to run_exec. This means that taginfo does not get executed if the global -n option is specified. Which makes it like loginfo, -i, -e, -o, -t, -u in modules, editinfo, and verifymsg and unlike commitinfo. The old behavior was pretty bad in the sense that it doesn't provide any way to log only the tags which actually happen. * sanity.sh (taginfo): New tests taginfo-11 to taginfo-13, for this. 1998-07-12 Jim Kingdon * sanity.sh (ann-id): Write the test so that it tests for the current (buggy) behavior. * sanity.sh (taginfo): Also clean up cvsroot/first-dir. 1998-07-12 Jim Meyering * sanity.sh (ann-id): New (currently failing) test for bug in how rcs keywords are expanded in the output of `cvs annotate'. 1998-07-12 Jim Kingdon * sanity.sh (taginfo): Write the TESTDIR into the script rather than having the script look at the environment. This means that it will work if TESTDIR is set by sanity.sh as well as if sanity.sh finds TESTDIR in the environment. 1998-07-11 Jim Kingdon * tag.c (check_fileproc): Calculate the revision to be tagged the same way that tag_fileproc does. * sanity.sh (taginfo): New tests, test for this (before this fix, brtag had said 1.1 not 1.1.2.1). 1998-07-10 Jim Kingdon * sanity.sh (unedit-without-baserev): Also clean up "2" directory. 1998-07-08 Jim Kingdon * edit.c (unedit_fileproc): If the Baserev file is missing, don't get the working file from CVS/Base. The previous code could get you version 1.1 of the working file and put 1.2 in CVS/Entries. * sanity.sh (unedit-without-baserev): New tests test for this. 1998-07-02 Jim Kingdon * sanity.sh (unedit-without-baserev): Move the test itself to be in the same order as in the "tests" variable. 1998-07-02 Ian Lance Taylor * rcscmds.c: Don't include or . Don't declare vasprintf. (call_diff_printf_output): Remove. (call_diff_stdout_callbacks): Don't initialize printf_output field--it has been removed from the interface. (call_diff_file_callbacks): Likewise. 1998-07-01 Jim Meyering * edit.c (unedit_fileproc): Handle the case in which base_get returns a NULL baserev. That happens when a file being `unedit'ed exists in the CVS/Base directory, but isn't listed in the CVS/Baserev file. The one case I've seen had no Baserev file at all. The symptom (if you're lucky) is a segmentation fault upon unedit. If you use SunOS4.1.4 for which printf prints NULL pointers as `(null)', your unedit command will complete normally, but it will have corrupted your CVS/Entries file and a subsequent update may result in an assertion failure, a core dump, and a stale lock in the repository. * sanity.sh (unedit-without-baserev): New test for this. 1998-07-01 Andy Mortimer of aeat.co.uk and Jim Kingdon * server.c (server_updated): Use a prototype if we are using them for declarations. 1998-06-29 Jim Kingdon * sanity.sh (commit-readonly): Protect keyword against expansion in sanity.sh itself. Keep the keyword in the file which we check in (or else this fails to test for the RCS_checkout change). 1998-06-27 Jim Meyering * rcs.c (RCS_checkout): If opening the local workfile fails due to lack of write access, try to chmod the file and retry the open. Before, a commit could fail part way through merely because the open to rewrite with newly expanded rcs keywords would fail. It's easy to make this happen if you use `cvs -r' or CVSREAD and you apply a patch to one of your read-only source files -- patch preserves the read-only setting for the file and your next commit will fail after committing that file, but before rewriting (checking out) your working copy. * sanity.sh (commit-readonly): New test for this. 1998-06-25 Jim Kingdon * update.c (patch_file): Update comments regarding context diffs to reflect diff library. 1998-06-23 Jim Kingdon * sanity.sh (modules4): Add tests for reversing the order of the "!first-dir/sdir" and "first-dir". 1998-06-23 Jim Kingdon and Dave Wolfe@Motorola. * sanity.sh (modes2): Touch the file before chmod'ing it. 1998-06-21 Ian Lance Taylor * update.c (merge_files): Revert changes of 1998-06-19. Instead, register a merged file with a dummy time stamp. Only set last_register_time if we need to. (join_file): Likewise. Always register a merged file, not just when the merge fails. 1998-06-21 Jim Kingdon * call_diff_write_output, call_diff_printf_output, call_diff_flush_output, call_diff_write_stdout, call_diff_error, call_diff_stdout_callbacks, call_diff_file_callbacks): Re-indent. 1998-06-19 Ian Lance Taylor * update.c (merge_file): Make sure the time stamp of the file is different from the time stamp we register in the Entries file. (join_file): Likewise. 1998-06-18 Ian Lance Taylor * rcscmds.c: Include . Include either or . Declare vasprintf. (call_diff_write_output): New static function. (call_diff_printf_output): New static function. (call_diff_flush_output): New static function. (call_diff_write_stdout): New static function. (call_diff_error): New static function. (call_diff_stdout_callbacks): New static variable. (call_diff_file_callbacks): New static variable. (call_diff): Don't sleep. Use a callback structure when calling the diff library. (call_diff3): Likewise. * rcscmds.c: Include diffrun.h. (call_diff, call_diff3): Pass NULL callback parameter. (diff_run, diff3_run): Don't declare. * Makefile.in (rcscmds.o): New target, to use -I for diff directory. (zlib.o): Depend upon zlib.h. 1998-06-09 Mike Sutton@SAIC Make it compile with Sun's bundled K&R C compiler: * rcs.c (count_delta_actions): Change to static to match declaration. * client.c (handle_wrapper_rcs_option): Rename error label to handle_error to avoid clash with function name. 1998-06-09 Jim Kingdon * rcs.c (RCS_delete_revs): If we are trying to delete all revisions, give an error rather than assertion failed. * sanity.sh (basicb): New tests basicb-o* test for this. 1998-06-04 Jim Kingdon * add.c (add): Only send "Directory" requests if we need to. 1998-06-02 Assar Westerlund * client.c: Check for HAVE_GSS_C_NT_HOSTBASED_SERVICE rather than assuming that GSS_C_NT_HOSTBASED_SERVICE is a macro. * server.c: Likewise. 1998-06-02 Jim Kingdon * fileattr.c (fileattr_read): Check for NULL return from strchr. * sanity.sh (devcom3): New test devcom3-10 checks for this. 1998-06-01 Assar Westerlund and Ian Lance Taylor * client.c: If HAVE_GSSAPI_H, include . Only include if HAVE_GSSAPI_GSSAPI_H. Only include if HAVE_GSSAPI_GSSAPI_GENERIC_H. (GSS_C_NT_HOSTBASED_SERVICE): Define if not defined. (connect_to_gserver): Use GSS_C_NT_HOSTBASED_SERVICE instead of gss_nt_service_name. * server.c: Same header file changes. (GSS_C_NT_HOSTBASED_SERVICE): Define if not defined. (gserver_authenticate_connection): Use GSS_C_NT_HOSTBASED_SERVICE instead of gss_nt_service_name. 1998-06-01 Jim Meyering * sanity.sh (tag8k): Add a test for the 1998-05-02 rcs.c bug fix. 1998-05-26 Jim Kingdon * rcs.c (annotate): Call tag_check_valid like the other functions which have a -r option. * sanity.sh (ann): New test ann-14 tests for this. 1998-05-24 Jim Kingdon * sanity.sh (importc): New tests importc-5 through importc-8 test for a (fairly obscure) regression from CVS 1.9. 1998-05-23 Jim Kingdon * sanity.sh (modules2): Add comment listing cvs release tests. (info): New test info-cleanup-0 tests "cvs -n release". * rcs.c (rcsbuf_getid): Remove semicolon at end of #undef. I'm kind of surprised that compilers accepted this at all, but removing it squelches a warning for some compilers. * version.c: Change version number to 1.9.28.1. * Version 1.9.28. 1998-05-22 Jim Kingdon * rcs.c (RCS_cmp_file): Check for errors from CVS_FOPEN. This restores the CVS 1.9 behavior (fatal error if we can't open the file), and corrects an apparent oversight in Ian's 13 Apr 1997 change. * sanity.sh (modes2): New test, tests for this. 1998-05-22 Ian Lance Taylor * server.c (server_updated): Correct test for whether to unlink the file. 1998-05-20 Jim Kingdon * wrapper.c (wrap_add): Disable -t/-f wrappers at least until the serious bug can be fixed. 1998-05-15 Jim Kingdon * checkout.c (checkout): Call server_pathname_check on the argument to "cvs co -d". * server.c (server_pathname_check): Add comment about how we could be handling absolute pathnames. * sanity.sh (abspath): Rewrite the tests which run "cvs co -d /foo" for remote, to reflect this. * sanity.sh (abspath): Also do the "cannot rename" work-around for abspath-7d. 1998-05-13 Jim Kingdon * commit.c (commit_filesdoneproc): Free admin_dir when done with it. 1998-05-13 Jim Meyering * sanity.sh (editor): Change bogus sed command, `s/^/x&/g', to `s/^/x/'. The former exercised a bug in GNU sed-3.01-beta3. (emptydir-8): Add `Rebuilding administrative file database' message, since now it does that. * commit.c (commit_filesdoneproc): Pass only the admin directory pathname to mkmodules. Remove #if 0, now that it's fixed. * status.c (cvsstatus): Rename from `status' to avoid shadowing lots of locals and parameters by the same name. * server.c (serve_status): Update caller. * main.c (cmds[]): Update table entry. * cvs.h: Update prototype. * commit.c (commit_filesdoneproc): Remove trailing blanks. (commit) [CLIENT_SUPPORT]: Remove unnecessary (and local-shadowing) declaration of `err'. Rename global `tag' to `saved_tag' to avoid overshadowing `tag' parameters of three functions. Rename global `message' to `saved_message' to avoid overshadowing `message' parameter of a function. Rename global `ulist' to `saved_ulist' and move dcl up with others. 1998-05-12 Jim Kingdon * commit.c (commit_filesdoneproc): #if 0 the new code until it can be fixed. * commit.c (commit_filesdoneproc): Add comment explaining last change. 1998-05-12 Jim Meyering * commit.c (commit_filesdoneproc): Call mkmodules not just when committing a file directly under CVSROOT, but also when committing files in subdirectories of CVSROOT. 1998-05-08 Jim Meyering * filesubr.c (xreadlink): NUL-terminate the symbolic link name. Use a much smaller initial buffer length. Test errno only if readlink fails. Use xstrdup then free the original link name so we don't waste space. 1998-05-02 Jim Meyering * rcs.c (rcsbuf_getword): Fix off-by-one error that would result in an abort (the first one in rcsbuf_getkey) when operating on on some ,v files with over 8192 bytes of tag and branch info. 1998-05-04 Jim Kingdon * sanity.sh (ann): New tests ann-12 and ann-13 test for specifying a numeric branch. 1998-05-02 Jim Kingdon * rcs.c: Add comments about getting rid of rcsbuf_getid, rcsbuf_getword, and rcsbuf_getstring. * sanity.sh (abspath): Revise the workarounds to deal with exit status. 1998-04-30 Jim Kingdon * sanity.sh (abspath): Work around the "cannot rename" bug. 1998-04-27 Jim Kingdon * classify.c (Classify_File): Add comments about checking whether command name is "update". 1998-04-22 Jim Kingdon * version.c: Change version number to 1.9.27.1. * Version 1.9.27. 1998-04-20 Jim Kingdon (This diff was run by devel-cvs and everyone seemed to like it). * diff.c (diff_file_nodiff): Make HEAD mean the head of the branch which contains the sticky tag, not the sticky tag itself. * rcs.c, rcs.h (RCS_branch_head): New function. * sanity.sh (head): Update for this changed behavior. 1998-04-19 Jim Kingdon * sanity.sh: Move emptydir tests from basicb to new test emptydir. This is because we now need a module definition to create Emptydir; "co -d" doesn't cut it anymore. 1998-04-17 Petri Virkkula * server.c (mkdir_p): Ignore EROFS error (like for EACCES). 1998-04-16 Jim Kingdon * checkout.c (checkout_proc): Don't create directories above the last one specified in "co -d". (build_dirs_and_chdir): Revert Noel's change of 17 Feb 1998. (struct dir_to_build): New field just_chdir. (build_dirs_and_chdir): Test it. * sanity.sh (abspath): New tests abspath-7* test for a bug which we fix, in which CVS would create bogus "D/////" entries in CVS/Entries. (abspath): Revise abspath-3* tests to test for the fact that we no longer create directories above the last one specified in "co -d". I checked that CVS 1.9 gives an error on this, so changing this behavior back should be OK. (cvsadm-2d3): Likewise (also checked CVS 1.9 for this case). (cvsadm-2d3d): Likewise (also checked CVS 1.9 for this case). (cvsadm-2d{4,5,6,7,8}, cvsadm-N2d{3,4,5,6,7,8}): Adjust for new behavior (same case as cvsadm-2d3). (cvsadm-2d{4,5,6,7,8}d, cvsadm-N2d{3,4,5,6,7,8}d): Remove test (same case as cvsadm-2d3d). (cvsadm): For remote, skip most these tests. (abspath): When cleaning up, delete mod1 and mod2 rather than mod1 twice (longstanding bug, apparently only becomes visible if you run the tests in a certain order). 1998-04-14 Wilfredo Sanchez * rcs.c: variable "lockfile" was being referenced after being free'd. Bad. Moved the free() call down. 1998-04-12 Jim Kingdon * sanity.sh (rcs): Add test for annotate and the year 2000. * server.c (do_cvs_command): If there are partial lines left when the child process is done, send them along. * sanity.sh (rcs, rcs2): Enable all tests for remote; tests for this fix. 1998-04-11 Jim Kingdon * client.c (client_senddate): Pass SDATEFORM not DATEFORM to sscanf. This fixes a Y2K bug. * history.c (history, select_hrec): Change since_date from time_t to RCS format. Use the usual machinery (in particular, Make_Date and client_senddate) so that it will work on VMS too. * main.c, cvs.h (date_from_time_t): New function. * sanity.sh (history): New test, to test that this didn't break anything (also tests client_senddate fix). 1998-04-11 Norbert Kiesel * server.c (cvs_output_binary): Shut up "gcc -Wall" by removing unnecessary else if test. * server.c (check_password): Fix uninitialized memory read if shadow passwords are used. Also added some comments. * rcs.c (RCS_checkout): Make sure to call chown with -1 for uid or gid if they should not be changed 1998-04-10 Jim Kingdon * sanity.sh (rcs2): New test, tests for various Y2K cases. * rcs.c (getdelta): Value for "state" keyword is optional (bug discovered incidentally in writing rcs2 test). 1998-04-09 Jim Kingdon * filesubr.c, cvs.h (link_file): Remove; no longer used. 1998-04-08 Jim Kingdon * recurse.c (do_dir_proc): Restore update_dir rather than a computation which appears to, but does not necessarily, restore it (reported by various people; this fix is from Greg Hudson). * sanity.sh (importc): New test, tests for this fix. 1998-03-27 Jim Kingdon * rcs.c (RCS_lock): If the revision is already locked, give an error rather than dumping core. * sanity.sh (reserved): New test reserved-13c tests for this. 1998-03-25 Loren J. Rittle * import.c (add_rev): Rewrite to use RCS_FLAGS_KEEPFILE option of RCS_checkin() to avoid damage to imported files instead of externally undoing damage after the fact. The side effect is that callers of add_rev() may now incrementally walk the entries of the current directory without seeing gratuitous changes to the directory structure (under at least one file system under at least one OS). 1998-03-18 Jim Kingdon * error.c (error): Save and restore errno. Should fix test case conflicts3-23 on SCO 5.0.2. Reported by Steve Cameron. * sanity.sh (admin): Rename admin-26-o* to admin-26-*; the "o" stands for "cvs admin -o". Add comment about length of tests. Use ${PLUS}. 1998-03-05 Dan Wilder * Fix problem with cvs admin in which -ntag:branch option associated tag with the branch's head revision. Should have used branch number. Entailed in this fix, the following. * Add new functions "RCS_exist_rev", "RCS_exist_tag", "RCS_tag2rev", and "RCS_valid_rev" to rcs.c. RCS_tag2rev is similar to RCS_gettag, but does less interpretation. * Plug a small memory leak. * Add tests admin-26 through admin-29 to sanity.sh, to test "cvs admin -n". 1998-03-17 Samuel Tardieu * server.c (server_register): protect dereferencing timestamp in the trace message when it is null, to avoid a segmentation fault. 1998-03-16 Jim Kingdon * options.h.in (MY_NDBM): Rewrite the comment explaining this option. It was not clear to everyone who "my" referred to, for example. * hardlink.c (list_linked_files_on_disk): Remove unused variables err and p. (list_linked_files_on_disk): Add comment about memory allocation of return value. * rcs.c (rcsbuf_getword): Shut up gcc -Wall with a "return 0". (RCS_checkin): Remove unused variable fullpath. * sanity.sh (hardlinks): Remove comment about spurious warnings; the warnings are gone. 1998-03-12 Tim Pierce New functions for parsing and writing hardlink fields. * rcs.c [PRESERVE_PERMISSIONS_SUPPORT] (puthardlink_proc): New function. (putdelta) [PRESERVE_PERMISSIONS_SUPPORT]: Use it. (rcsbuf_getid, rcsbuf_getstring, rcsbuf_getword): New functions. (getdelta): Call them, storing `hardlinks' field in vnode->hardlinks. (RCS_reparsercsfile): When setting rdata->desc, xstrdup value rather than rcsbuf_valcopying it (due to changes in how getdelta handles keys and values in newphrases). * sanity.sh (hardlinks): Use uglier filenames. Checking out hardlinked files no longer produces the same spurious diagnostics, so fix that test. (hardlinks-2.3): Renamed from hardlinks-2.2 (duplicate test name). New infrastructure for managing hardlink lists internally... * hardlink.c, hardlink.h (list_linked_files_on_disk, compare_linkage_lists, find_checkedout_proc): New functions. * rcs.h (struct rcsversnode) [PRESERVE_PERMISSIONS_SUPPORT]: New member `hardlinks'. * update.c (special_file_mismatch): Get hardlinks from vp->hardlinks instead of from vp->other_delta. * rcs.c (free_rcsvers_contents): Comment about freeing hardlinks member. (RCS_checkout) [PRESERVE_PERMISSIONS_SUPPORT]: Get hardlinks from vers->hardlinks list instead of vers->other_delta. ... and removed obsolete code from earlier revs. * hardlink.c, hardlink.h (list_files_linked_to, cache_hardlinks_proc, list_files_proc, set_hardlink_field_proc): Removed. * hardlink.h: Removed `links' member from hardlink_info struct. * commit.c (commit): Remove the call to cache_hardlinks_proc. (check_fileproc) [PRESERVE_PERMISSIONS_SUPPORT]: Removed reference to hlinfo->links. * hardlink.c (update_hardlink_info): Same. * update.c (get_linkinfo_proc): Same. * rcs.c (RCS_checkout) [PRESERVE_PERMISSIONS_SUPPORT]: Use vp->hardlinks and find_checkedout_proc to find recently-updated files that may be hardlinked. * update.c (special_file_mismatch): Use List * structures and compare_linkage_lists for rev1_hardlinks and rev2_hardlinks. 1998-03-16 Larry Jones * server.c (check_password): If shadow passwords are supported but no entry is found in the shadow file, check the regular password file. 1998-03-07 Jim Kingdon * sanity.sh: Rename permissions test to perms since that is what each of its individual tests are named. * sanity.sh (perms symlinks hardlinks): Change CVSROOT to CVSROOT_DIRNAME where appropriate. (perms symlinks hardlinks): Disable/adjust the meat of the tests for remote. (symlinks): Link to ${TESTDIR}/fumble rather than /fumble/mumble/grumble. We shouldn't be making assumptions about what might exist in random directories outside ${TESTDIR}. * hardlink.c (cache_hardlinks_proc): Add comment about trimming whitespace. 1998-03-07 Tim Pierce * rcs.c (RCS_checkout): Negation bug when checking out symlinks: existence_error should be !existence_error. * sanity.sh (permissions symlinks hardlinks): New tests, for PreservePermissions. 1998-03-04 Jim Kingdon * version.c: Change version number to 1.9.26.1. * Version 1.9.26. * entries.c, cvs.h (Entries_Open): New argument update_dir; use it in error message. * add.c, checkout.c, client.c, find_names.c, import.c, recurse.c, update.c: Pass it (as NULL except in call_in_directory). * entries.c (Subdirs_Known): Just return if there is no CVSADM directory (as in subdir_record). * sanity.sh (conflicts3): New tests conflicts3-20a and conflicts3-23 test for these fixes. * commit.c (commit): Only set up hardlist if preserve_perms. * commit.c, import.c, no_diff.c, parseinfo.c, rcs.c, rcscmds.c, update.c: Omit the preserve_perms code if PRESERVE_PERMISSIONS_SUPPORT is not defined. Much of that code won't even compile on non-unix systems. * hardlink.c, hardlink.h: Use the 'standard' copyright (as found in server.c). * commit.c, rcs.c: Minor whitespace changes to Tim's submission. * commit.c (check_fileproc), update.c (get_linkinfo_proc): Remove unused variable delta. * hardlink.c (set_hardlink_field_proc), update.c (get_linkinfo_proc): Return a value rather than falling off the end of the function. 1998-03-02 Tim Pierce * update.c (special_file_mismatch): Compare the hard links of the two revisions. * rcs.c (RCS_checkout): * hardlink.c, hardlink.h: New files. (hardlink_info): New struct. (hardlist, working_dir): New variables. (list_files_proc, cache_hardlinks_proc, set_hardlink_field_proc, lookup_file_by_inode, update_hardlink_info, list_files_linked_to): New functions. * Makefile.in (SOURCES): Add hardlink.c. (OBJECTS): Add hardlink.o. (HEADERS): Add hardlink.h. * commit.c: Include hardlink.h. (commit): Save the working directory before recursing. Walk the hardlink list, calling set_hardlink_field_proc on each node. (check_fileproc): Add each file's link information to hardlist. * rcs.c: Include hardlink.h. (RCS_checkin): Save list of hardlinks in delta node. (RCS_checkout): Look up the file's `hardlinks' delta field, and see if any of the files linked to it have been checked out already. Link to one of those files if so. * update.c: Include hardlink.h. (get_linkinfo_proc): New function. (do_update): Extra recursion to collect hardlink info. (special_file_mismatch): Reparse the RCS file if necessary. fsortcmp is now used by several files, so let's make it extern. * hash.c, hash.h (fsortcmp): New function. * find_names.c (fsortcmp): Removed. * lock.c (fsortcmp): Removed. 1998-03-03 Jim Kingdon * sanity.sh (conflicts3): New tests conflicts3-14a, conflicts3-14b, and conflicts3-21, conflicts3-22 test that we can skip over a working directory with a CVSADM directory missing. 1998-02-26 Jim Kingdon * sanity.sh (conflicts3): Tests conflicts3-16 and conflicts3-20 test that we include update_dir in messages. Rename test conflicts3-14 to fix typo. Sun Feb 22 23:14:25 1998 Steve Cameron and Ian Lance Taylor * update.c (tag_update_dir): New static variable. (update_dirent_proc): If no tag or date were specified when creating a subdirectory, use the tag and/or date of the parent directory. (update_dirleave_proc): If we set the tag and/or date in update_dirent_proc, reset them when we leave the directory. * sanity.sh (branches2): New set of tests for above patch, and related behaviour. Sun Feb 22 13:31:51 1998 Ian Lance Taylor * commit.c (lock_RCS): Don't call RCS_rewrite. * update.c (patch_file): If the revision is dead, let checkout_file handle it. * sanity.sh (death2): Add test for above patch: add death2-10a, death2-10b, death2-13a, and adjust death2-{2,4,5,11,14,diff-11,diff-12,19}. * cvs.h (RCS_FLAGS_KEEPFILE): Define. * rcs.c (RCS_checkin): If RCS_FLAGS_KEEPFILE is set in the flags parameter, don't unlink the working file. * checkin.c (Checkin): Don't copy the file. Instead pass RCS_FLAGS_KEEPFILE to RCS_checkin, and only check the file out again if it has changed. 1998-02-21 Jim Kingdon * rcs.c (rcs_internal_unlockfile, RCS_rewrite): Don't assume errno means anything just because ferror is set. Sat Feb 21 20:02:24 1998 Ian Lance Taylor * Makefile.in (clean): Change "/bin/rm" to "rm". * buffer.c (buf_append_buffer): Correct typo in comment. * rcs.c (RCS_putadmin): Likewise. Fri Feb 20 17:53:06 1998 Ian Lance Taylor * rcs.c (rcs_internal_unlockfile): Pass errno when calling error because ferror is true. 1998-02-20 Jim Kingdon * sanity.sh (abspath): Don't assume that we can't write to /; this is the kind of thing that is sure to break sooner or later (especially on Windows). * sanity.sh: Add summary of which modules tests are which (at "modules"). Move cvsadm, abspath, and toplevel next to modules. Add comments to clarify the structure (such as it is). Fri Feb 20 12:47:14 1998 Larry Jones * admin.c (admin_fileproc): Better fix for -b. * rcs.c (RCS_whatbranch): Back out previous change. (RCS_getversion): Ditto. (RCS_setbranch): Treat an empty revision string like a null pointer. 1998-02-18 Jim Kingdon * rcs.c (RCS_whatbranch): Fix indentation. * patch.c (patch_fileproc): Check for errors from fclose; check for errors from fopen properly. Wed Feb 18 16:03:37 1998 Larry Jones * admin.c (admin_fileproc): Convert -b argument from symbolic name to revision number before storing in the RCS file. * rcs.c (RCS_whatbranch): Allow numeric as well as symbolic revision. (RCS_getversion): Take advantage of above. * sanity.sh (admin): Add/revise/renumber admin-10c, admin-11a, admin-12, and admin-12a to check above. * commmit.c (lock_RCS): Minor clean-up. * sanity.sh (abspath-6a): Don't depend on the sepcific contents of CVSROOT, it depends on which other tests have been run. Wed Feb 18 01:56:04 1998 Ian Lance Taylor * rcs.c (putsymbol_proc): Use putc and fputs rather than fprintf. (RCS_putadmin): Don't call RCS_symbols if the symbols have not yet been converted to a list. * rcs.c (rcsbuf_cache, rcsbuf_cache_open, rcsbuf_cache_close): New static functions to avoid closing and reopening the RCS file. (cached_rcs, cached_rcsbuf): New static variables. (RCS_parse): Call rcsbuf_cache_close. Don't call fclose. (RCS_parsercsfile): Likewise. (RCS_parsercsfile_i): Call rcsbuf_cache rather than rcsbuf_close. Call fclose on error. Remove comment about inefficiency of opening file twice. (RCS_reparsercsfile): Call rcsbuf_cache_open rather than fopen and rcsbuf_open. Call rcsbuf_cache rather than rcsbuf_close and fclose. (RCS_fully_parse, RCS_checkout, RCS_deltas): Likewise. (RCS_rewrite): Likewise. (RCS_checkin): Call rcsbuf_cache_close. * rcs.c (RCS_copydeltas): Fix code which checks for an extra newline in buffered data. * rcs.c (rcsbuf_getkey): Save an indirection by using start rather than *valp when trimming trailing whitespace from value. * rcs.c (rcsbuf_get_buffered): New static function. (RCS_copydeltas): After we have done all the required special actions, and inserted any new revision, just copy the file bytes directly, rather than interpreting all the data. (count_delta_actions): New static function. * sanity.sh (rcs): Add rcs-6a and rcs-6b to commit a new branch revision, to force CVS to interpret all the data, rather than just copying it. Adjust rcs-5 to add a branch tag. Adjust rcs-8a and rcs-14 for the changes created by rcs-6b. Tue Feb 17 18:34:01 1998 Ian Lance Taylor * sanity.sh (cvsadm, diffmerge2): Remove directories at the end of the test. * import.c (expand_at_signs): Rewrite to use memchr and fwrite rather than putc. Rewrite RCS file reading routines for speed: * rcs.c (struct rcsbuffer): Define. (rcsbuf_open, rcsbuf_close, rcsbuf_getkey, rcsbuf_getrevnum, rcsbuf_fill, rcsbuf_valcopy, rcsbuf_valpolish, rcsbuf_valpolish_internal, rcsbuf_ftell): New static functions. (getrcskey, getrcsrev, getrevnum): Remove. (many functions): Change to use new rcsbuf functions instead of old getrcskey/getrcsrev/getrevnum functions. (RCS_reparsercsfile): Add rcsbufp parameter. Change all callers. (RCS_deltas): Add rcsbuf parameter. Change all callers. (getdelta): Change fp parameter to rcsbuf parameter. Change all callers. (RCS_getdeltatext): Add rcsbuf parameter. Change all callers. (RCS_copydeltas): Add rcsbufin parameter. Change all callers. * rcs.h (RCS_reparsercsfile): Update declaration. * admin.c (admin_fileproc): Update calls to RCS_reparsercsfile for new parameters. 1998-02-17 Jim Kingdon * sanity.sh (toplevel): Also clean up second-dir (not a new bug, but triggered by running tests as "toplevel abspath"). * create_adm.c (Create_Admin): Just print update_dir to tell the user where we are; not the whole xgetwd. Cleaner than Noel's change (which also had problems in errno handling). * sanity.sh (toplevel-12): Update accordingly. Tue Feb 17 02:32:21 1998 Noel Cragg [These mods make "checkout" work with "-d /absolute/pathname" once again.] * checkout.c (checkout_proc): the -d flag on the command line should override the -d flag in the modules file if the latter is an absolute path. The loop that assembles the list of directories to build has been reorganized slightly to prepare for rewriting with last_component rather than assuming '/' as a path separator. Also added to that loop was some code to handle absolute pathnames. (build_dirs_and_chdir): add a new argument that tells this routine whether or not to check before it creates and populates directories or not. * filesubr.c (last_component): return the top-level directory when asked about the top-level directory. * sanity.sh (toplevel-12): change test to reflect the new style of this error message. * create_adm.c (Create_Admin): include the directory in the error message. 1998-02-16 Jim Kingdon * diff.c (diff_fileproc), import.c (import, add_rcs_file), rcs.c (RCS_cmp_file): Don't ignore errors from CVS_UNLINK and fclose. * patch.c (patch_fileproc): Check for errors from fclose; if we get -1 from getline check for end of file vs. error. * rcs.c (RCS_checkout): Comment return value (0/1, not -1). * commit.c, diff.c, mkmodules.c, patch.c, rcs.c, update.c: Update to match this convention. Don't suppress errors based on quiet or really_quiet variables. Fix a longstanding bug which also makes stamps-8kw in make remotecheck work again (it stopped working with Ian's 8 Feb 98 checkin): * client.c, client.h (change_mode): If new argument respect_umask is set, then honor the umask. * client.c, server.c: Update callers. Cleanups to Tim's checkin: * rcs.c (RCS_checkout): Use existence_error not ENOENT. * commit.c (checkaddfile): Remove comment about whether we want to check for errors from fclose; there is no reason not to. * rcs.c (RCS_checkout), update.c (special_file_mismatch): sscanf on %ld requires an unsigned long, not a dev_t. * update.c (special_file_mismatch): Remove unused variable check_devnums. * mkmodules.c (config_contents): Between two settings, use a blank line not a "#" line. 1998-02-15 Tim Pierce [This is the code as submitted. I'll be checking in my cleanups shortly. This work sponsored by Abbott Labs. -kingdon] Support for device special files, symbolic links, user and group ownerships, and file permissions. * parseinfo.c: (parse_config): Handle new config variable `PreservePermissions'. * mkmodules.c (config_contents): Add new PreservePermissions var. * rcs.c, rcs.h (preserve_perms): New variable. (RCS_checkout, RCS_checkin): Support for newphrases `owner', `group', `permissions', `special', `symlink'. (RCS_checkout): If `workfile' and `sout' are symlinks, remove them before attempting to open them for writing. * import.c (add_rcs_file): Support for newphrases. Do not attempt to read data from special files or symlinks. Error message `cannot fstat' is now `cannot lstat'. New metrics for deciding when two files are different: * update.c, cvs.h (special_file_mismatch): New function. (merge_file, join_file): Call it. * no_diff.c (No_Difference): Call it. * filesubr.c (xcmp): Consider files to be different if they are of different types; if they are symlinks which link to different pathnames; or if they are devices with different device numbers. Error message is now `cannot lstat'. * rcs.c (RCS_cmp_file): Use `xcmp' to compare files, simplifying the special handling for nonregular files. * rcscmds.c (diff_exec, diff_execv): If asked to obtain diffs for special files, report no differences. Miscellaneous changes to make special file support possible: * commit.c (fix_rcs_modes): Don't attempt to `fix' permissions on a symlink. * import.c (add_rcs_file): Don't try to close fpuser if it was never opened (e.g. when operating on a symlink). * filesubr.c, cvs.h (isdevice, xreadlink): New functions. * filesubr.c (copy_file): Handle special files and symlinks. (xchmod): Do nothing if `preserve_perms' is set. * commit.c (checkaddfile): Replace `copy_file (DEVNULL, ...)' with fopen/fclose calls. Copy_file no longer attempts to read data from device files. * filesubr.c (islink): Use CVS_LSTAT, not lstat. * vers_ts.c (time_stamp, time_stamp_server): Use CVS_LSTAT, not stat, to get symlinks right. * subr.c (get_file): Same. Don't attempt to read from special files or symlinks. * classify.c (Classify_File): Doc fix. Fri Feb 13 17:07:32 1998 Eric Mumpower and Ian Lance Taylor Fix some file system ordering problems found on Irix 6.4: * sanity.sh (basic2): Use dotest_sort for test 56. (importb): Use dotest_sort for tests importb-1 and importb-2. (head): Use dotest_sort for test head-1. Thu Feb 12 15:15:33 1998 Jim Kingdon * import.c (add_rcs_file): If add_logfp is NULL, don't call fperror. 11 Feb 1998 Andy Piper * server.c (cvs_output_binary): Use OPEN_BINARY not _O_BINARY. Mon Feb 9 18:34:39 1998 Jim Kingdon Tweaks to Ian's checkin: * update.c (merge_file): Remove comment about sending file to client before the message. It doesn't apply to this code any more (it does apply to checkout_file, but I'm not sure it is important to have such a comment anyway). * buffer.c (buf_default_memory_error, buf_length): Reindent. * server.h: Declare struct buffer before use. Mon Feb 9 21:05:28 1998 Ian Lance Taylor * rcs.c (RCS_fully_parse): Call getrevnum rather than getrcsrev. Don't bother with ungetc. * rcs.c (getrcsrev): Rewrite to simply call getrevnum. Sun Feb 8 15:49:39 1998 Ian Lance Taylor Don't have the server check out a revision into a file and then immediately read the file; just read into a buffer instead. * update.c: Include buffer.h. (update_fileproc): Let checkout_file call server_updated. (checkout_file): Add merging and update_server parameters. Change all callers. If server_active, don't mess with backup files. If server_active, copy the revision into a buffer rather than a file when possible. If update_server, call server_updated. Fix handling of error status. (checkout_to_buffer): New static function used by checkout_file. (merge_file): Let checkout_file call server_updated. (join_file): Likewise. * server.c (server_updated): Change file_info parameter to mode parameter. Add filebuf parameter. Change all callers. If filebuf is not NULL, don't read the file. * server.h (server_updated): Update declaration. * buffer.c (buf_free): New function. (buf_append_buffer): New function. (buf_length): New function. * buffer.h (buf_free, buf_append_buffer, buf_length): Declare. * buffer.c: (buf_initialize): If the memory parameter is NULL, use buf_default_memory_error. (buf_default_memory_error): New static function. * buffer.h (BUFMEMERRPROC): Define typedef. * client.c (buf_memory_error): Remove. (start_server): Pass NULL rather than buf_memory_error as buffer memory error function. Sat Feb 7 16:27:30 1998 Ian Lance Taylor * rcs.c (RCS_parsercsfile_i): Read the expand keyword from the RCS file. We do this because Version_TS calls RCS_getexpand in many common cases, and we don't want to reopen the file just for that. (RCS_reparsercsfile): Skip the expand keyword. (RCS_getexpand): Don't call RCS_reparsercsfile. * rcs.c (STREQ): New macro. In all string equality tests in the file, replace strcmp with STREQ. Fri Feb 6 16:14:49 1998 Ian Lance Taylor * update.c (checkout_file): If we've already removed the backup file once, don't try to remove it again. * filesubr.c (unlink_file_dir): Call stat rather than isdir, and don't call unlink if the file does not exist. * myndbm.c (mydbm_load_file): Rename line_len to line_size. Call getstr rather than getline, to avoid any confusion between \n and \012. Use the line length returned by getstr rather than calling strlen. Remove local variable len. Fri Feb 6 13:23:46 1998 Jim Kingdon * rcs.c (RCS_parsercsfile_i): Don't suppress errors on really_quiet. (RCS_parsercsfile_i, RCS_reparsercsfile, RCS_fully_parse, RCS_deltas, getdelta, getrcskey, RCS_getdeltatext): Check for errors. Include errno in error messages. Include filename in error messages. Pass new argument to getrcskey. (getrcskey): New argument NAME, so we can report errors ourself. Fri Feb 6 12:10:18 1998 Ian Lance Taylor * rcs.c (RCS_reparsercsfile): Don't use ftell/fseek; just keep track of whether we've already read a key/value pair. Use sizeof rather than strlen for a constant string. Pass the current key and value to getdelta, and get them back as well. (getdelta): Add keyp and valp parameters. Don't use ftell/fseek; just return the key/value pair to the caller. Don't allocate vnode before we know we need it. Check one getrcskey return value. Use sizeof rather than strlen for a constant string. * rcs.c (getrcskey): Correct comment describing return value. Thu Feb 5 22:51:13 1998 Ian Lance Taylor * subr.c (getcaller): Cache the result, so that we don't keep searching the password file. Wed Feb 4 23:31:08 1998 Jim Kingdon * rcs.c (max_rev): Don't prototype. Interesting that noone complained about this until now. 4 Feb 1998 Jim Kingdon * rcs.c (RCS_checkin): When adding a new file, read it with "rb" if binary. Fri Jan 30 11:32:41 1998 Jim Kingdon * sanity.sh: Also test "first-dir" as the regexp in loginfo in addition to ALL. * main.c (main): Update year in copyright notice to 1998. Thu Jan 29 00:01:05 1998 Jim Kingdon * version.c: Change version number to 1.9.25. * Version 1.9.24. * sanity.sh (multibranch2): File file2 and tests multibranch2-13 through multibranch2-15 test a slightly different case than the rest of multibranch2. * mkmodules.c (cvswrappers_contents): Rewrite. The text didn't describe -k and had various other problems. 28 Jan 1998 Karl Fogel and Jim Kingdon New feature to let server tell client about wrappers. * client.h (struct response): Add comment about args being '\0' terminated when passed to handle_* functions. * client.c (start_server): send "wrapper-sendme-rcsOptions" to server iff supported. (responses): new response "Wrapper-rcsOption"; allows the server to send certain lines from its cvswrappers file. (handle_wrapper_rcs_option): new func, handles "Wrapper-rcsOption" response from server. * server.c (serve_wrapper_sendme_rcs_options): new func, sends server side CVSROOT/cvswrappers rcs option lines to client. (requests): new request "wrapper-sendme-rcsOptions"; if received, we know we can send "Wrapper-rcsOption..." to the client. * wrapper.c (wrap_unparse_rcs_options): new func; repeated calls step down the wrapper list returning rcs option entries, but repackaged as cvswrappers lines. (wrap_setup): new guard variable `wrap_setup_already_done'; if this function has run already, just return having done nothing. Add comment concerning environment variable. * cvs.h: declare wrap_unparse_rcs_options(). Tue Jan 27 18:27:19 1998 Ian Lance Taylor * rtag.c (rtag_dirproc): Call ignore_directory, and skip the directory if it returns true. * sanity.sh (modules4): New set of tests to test some aspects of excluding directories in the modules file, including the above patch. Thu Jan 22 10:05:55 1998 Jim Kingdon * server.c (serve_kopt): Check for length of arg. Based on inspection of the code, plugs a buffer overrun security hole which was introduced Monday. * server.c (serve_is_modified): Don't call xmalloc; we aren't allowed to call error() here. Remove duplicate (and potentially confusing) variable 'p'. * log.c (log_fileproc): Look for first character of version '0' AND second character '\0', rather than OR. I didn't try to come up with a test case but this looks like a simple thinko (albeit one which would show up in obscure cases if at all). Tue Jan 20 19:37:53 1998 Jim Kingdon * client.c (send_dirent_proc): Don't send nonexistent directories unless noexec. * sanity.sh (modules2): New tests modules2-13 through modules2-18 test for this fix. Mon Jan 19 11:17:51 1998 Jim Kingdon * server.c (serve_kopt): New function. (requests): Add "Kopt" request. (kopt): New variable. (serve_is_modified): Write kopts from there into entries. (serve_modified): Call serve_is_modified so we do the same. Declare serve_modified and serve_is_modified. * vers_ts.c (Version_TS): Set ->options even for a dummy ("D" timestamp) entry. * import.c (process_import_file): Check for -k options. * client.c (client_process_import_file): Send Kopt request. (send_fileproc): Likewise, for "cvs add". * sanity.sh: Enable test binwrap3-sub2-add1 for remote. Add -I .cvswrappers to binwrap3-2a; adjust binwrap3-2d accordingly. Tests for this fix. Mon Jan 19 08:48:59 1998 Larry Jones * sanity.sh (errmsg1): Append test 168 output to log file. Sat Jan 17 08:01:51 1998 Jim Kingdon * sanity.sh (ann-10, ann-11): Don't make assumptions about the number of characters in the username. Fri Jan 16 15:34:02 1998 Larry Jones * diff.c (diff_fileproc): Free label1 and label2 when finished. * edit.c (editor_set): Don't free edlist until after we're done using it. * rcscmds.c (RCS_merge): Free xrev1 and xrev2 when finished. * subr.c (make_message_rcslegal): Don't access uninitialized or unallocated memory; only strip trailing blank lines. * sanity.sh (log-3): Enhance to test this fix. Fri Jan 16 12:41:03 1998 Jim Kingdon * sanity.sh: Add keywordlog to list of tests run by default. * rcs.c (RCS_deltas): Don't call cvs_output if length is zero; passing zero length to cvs_output does not mean output zero bytes. The 27 Dec 1997 change to no longer '\0'-terminate the ->text field turned this from a time bomb to a user-visible bug. * sanity.sh (ann): New tests, test for this fix and other annotate behaviors. Thu Jan 15 23:52:00 1998 Jim Kingdon * root.c (root_allow_ok): If inetd.conf didn't specify an --allow-root options at all, we know we are in trouble. Give a specific error message. Thu Jan 15 21:24:59 1998 Ian Lance Taylor * sanity.sh (dotest_sort): New variant of dotest which sorts the output, for use when the output depends upon details of the file system, typically when doing an import. (rdiff): Use dotest_sort for rdiff-1. (ignore): Use dotest_sort for 188a, 188b, 189d, 190, and 191. * sanity.sh: (TESTSHELL): New variable. (editor, info, reserved): Use TESTSHELL in temporary script. * sanity.sh (ignore): Do all tests in subdirectory, to avoid conflict between cvsroot and CVSROOT on Windows. (binwrap3, mwrap, info, config): Likewise. * sanity.sh (binfiles2): Correct test name binfile2-7-brmod to binfiles2-7-brmod. * release.c (release_delete): If __CYGWIN32__ is defined, don't worry about mismatched inodes. This is a hack, but then I think the test is rather peculiar anyhow. Thu Jan 15 16:07:36 1998 Larry Jones * sanity.sh (reserved-9): Use ${PROG} instead of "cvs". Wed Jan 14 15:43:13 1998 Jim Kingdon * Split ChangeLog into ChangeLog-97 and ChangeLog. * Makefile.in (DISTFILES): Add ChangeLog-97. 13 Jan 1998 Jim Kingdon * client.c: Declare handle_mt. Tue Jan 13 22:21:30 1998 Jim Kingdon * sanity.sh: Add comment about how pwd and /bin/pwd often differ in behavior (but are not guaranteed to). Tue Jan 13 13:49:53 1998 Ian Lance Taylor * sanity.sh: When setting TMPPWD use just pwd, not /bin/pwd. * update.c (checkout_file): Don't pass set_time as true to Version_TS if the file is dead. * sanity.sh (modules): Add tests modules-155c6 through modules-155c8 to test for above patch (without the above patch, modules-155c8 will fail when remote). Tue Jan 13 10:37:02 1998 Larry Jones * client.c (send_modified): Change bufsize and newsize from int to size_t to avoid type clashes in call to read_and_gzip. Tue Jan 13 10:33:02 1998 Larry Jones * zlib.c (read_and_gzip): Set finish to 0; it was uninitialized. Tue Jan 13 10:26:43 1998 Larry Jones * add.c, rcs.c: Plug memory leaks. Mon Jan 12 10:45:27 1998 Larry Jones * server.c (mkdir_p): Don't try to create nameless directories (i.e., given "/foo//bar", don't try to create "/foo/", just "/foo" and "/foo//bar") since it isn't necessary and it fails on some systems in unexpected ways. 1998-01-11 enami tsugutomo * rcs.c (linevector_copy): Delete lines before overwriting them. Sat Jan 10 11:05:40 1998 Jim Kingdon * cvsrc.c, entries.c, login.c, logmsg.c, myndbm.c, patch.c, release.c, server.c: Check for errors from getline, CVS_FOPEN, fprintf, CVS_UNLINK and fclose. Note that the new errors are nonfatal. This is because of conservatism more than because it is always the best thing. * login.c (get_cvs_password): Close the file when done with it. * client.c (notified_a_file): If -1 return from getline, check feof rather than assuming errno is set. Fri Jan 9 14:38:54 1998 Jim Kingdon * server.c (expand_proc): Also output server_dir in "Module-expansion", not just in output_dir ("Created", &c). * sanity.sh (modules2): New tests modules2-9 through modules2-12 test for this. Thu Jan 8 12:56:55 1998 Yasutoshi Hiroe * import.c (import): Don't strcat on uninitialized memory. Fixes possible SIGSEGV with zero-length message. Tue Jan 6 22:56:29 1998 Jim Kingdon * sanity.sh (crerepos): Fix mistaken variable name which caused us not to clean up at the end of the test. Mon Dec 22 01:40:57 1997 Jim Kingdon * add.c (add): Also look for .cvswrappers files. * sanity.sh (binwrap3): New tests binwrap3-2*, binwrap3-sub2-add* test for this. Tue Jan 6 11:50:38 1998 Jim Kingdon * sanity.sh (crerepos): New tests crerepos-8 through crerepos-18 test behaviors when mixing repositories. Sun Jan 4 17:40:22 1998 Jim Kingdon * version.c: Change version number to 1.9.23. * Version 1.9.22. For older changes see ChangeLog-97.