diff options
author | 1996-04-27 19:40:47 +0000 | |
---|---|---|
committer | 1996-04-27 19:40:47 +0000 | |
commit | c26070a5a87b8b908afc23542b77914040a7b4e9 (patch) | |
tree | 77fba04cfe8deb71726e74ecfdd01a0609c31685 /gnu/usr.bin/cvs/src | |
parent | Bring forward the Amiga ISA support, and resolve a conflict with if_ed (diff) | |
download | wireguard-openbsd-c26070a5a87b8b908afc23542b77914040a7b4e9.tar.xz wireguard-openbsd-c26070a5a87b8b908afc23542b77914040a7b4e9.zip |
Latest public release from Cyclic; fixes numerous memory leaks and have
some performance improvements
Diffstat (limited to 'gnu/usr.bin/cvs/src')
57 files changed, 6533 insertions, 5203 deletions
diff --git a/gnu/usr.bin/cvs/src/ChangeLog b/gnu/usr.bin/cvs/src/ChangeLog index 5e731b5ab46..060f4cad503 100644 --- a/gnu/usr.bin/cvs/src/ChangeLog +++ b/gnu/usr.bin/cvs/src/ChangeLog @@ -1,3 +1,511 @@ +Mon Feb 26 16:07:56 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * Version 1.7.2. + +Mon Feb 26 1996 Jim Kingdon <kingdon@cyclic.com> + + * recurse.c (start_recursion): Use last_component rather than + checking for '/' directly. + (do_dir_proc): Likewise. + + Visual C++ lint: + * client.c (send_to_server): Change wrtn to size_t. + (connect_to_pserver): Put tofd and fromfd declarations inside + #ifndef NO_SOCKET_TO_FD. + * scramble.c (shifts): Change from array of char to array of + unsigned char. + +Mon Feb 26 13:31:25 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * server.c (check_repository_password): Remove unused variables + linelen, ch. + + * client.c (send_file_names): Translate ISDIRSEP characters to '/'. + +Sat Feb 24 21:25:46 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * checkout.c (safe_location): Re-indent one line. + +Sat Feb 24 10:50:42 1996 Karl Fogel <kfogel@floss.red-bean.com> + + * checkout.c (safe_location): put assignment to hardpath[x] in an + `else'-clause, so we don't do it when x == -1. + +Sat Feb 24 01:40:28 1996 Marcus Daniels <marcus@sayre.sysc.pdx.edu> + via Karl Fogel <kfogel@floss.red-bean.com> + + * server.c (check_repository_password): Return by reference an + optional username, the `host_user', from the passwd file. The + host_user will be the user-id under which the cvs repository is + run. + (check_repository_password): Use `read_line' instead of fgets to + allow for passwords larger than 32 characters, as well as the + optional host user argument. + (check_password): Modify to use host_user. + (authenticate_connection): Modify to use host_user. + +Sat Feb 24 01:05:21 1996 Karl Fogel <kfogel@floss.red-bean.com> + + * scramble.c (descramble): just shift descrambled string to get + rid of tag char, instead of allocating a whole new copy. + (scramble): cast return value of xmalloc to avoid unsightly + compiler warnings. + + * options.h.in (RCSBIN_DFLT): don't refer to AUTH_SERVER_SUPPORT + in comment anymore, now that it's not defined in this file. + +Fri Feb 23 1996 Jim Kingdon <kingdon@cyclic.com> + + * client.c: Ifdef HAVE_WINSOCK_H, include winsock.h + instead of sys/socket.h and friends. + * login.c: Don't include sys/socket.h and friends. + * login.c (login): Only fclose fp in the case where it was + successfully fopen'd. + * login.c: Declare getpass. + * filesubr.c, cvs.h (get_homedir): New function. + * cvsrc.c, expand_path.c, history.c, login.c: Call it instead + of getenv ("HOME"). + +Fri Feb 23 09:23:20 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * client.c (connect_to_pserver): Remove unused variable host. + * login.c: Include getline.h. + (login): Remove unused variables i and username. + (get_cvs_password): Move free of linebuf to where it actually will + be called. Add a "return NULL" at the end of the function to shut + up gcc -Wall. + + * options.h.in: Remove AUTH_SERVER_SUPPORT. + * client.h (authenticate_connection): Declare. + * scramble.c (scramble): Cast char to unsigned char before using + it to look up in table (char might be signed). + * server.c [AUTH_SERVER_SUPPORT]: Include grp.h + (authenticate_connection): Remove unused variables len and + server_user. + + * sanity.sh (basica): Add comments regarding creating a top-level + directory. + (basic1): Don't try to remove first-dir and + ${CVSROOT_DIRNAME}/first-dir at start of test; tests are now + responsible for cleaning up at the end. + (PLUS,DOTSTAR,ENDANCHOR): Add comments regarding fixed GNU expr. + +Thu Feb 22 22:34:11 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * cvs.h: Remove alloca cruft. + +Wed Feb 21 07:30:16 1996 J.T. Conklin <jtc@rtl.cygnus.com> + + * modules.c (do_module): call free_cwd before exiting. + + * recurse.c: Removed entries global variable. + (do_recursion): Declare entries. Moved call to Entries_Close so + entries list is closed on all code paths. + (start_recursion): Removed call to Entries_Close, entries list has + been moved to do_recursion only. + +Tue Feb 20 22:10:05 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * update.c (update_dirent_proc): If dir lacks a CVS subdirectory, + don't recurse into it. + * sanity.sh (conflicts): Test for above-fixed bug. + + * update.c (merge_file): Use write_letter not printf. + +Tue Feb 20 12:34:07 EST 1996: Gary Oberbrunner <garyo@avs.com> + and Jim Kingdon <kingdon@cyclic.com> + + * history.c (history_write): Change username to char * and call + getcaller() to set it. Setting username accidentally got deleted + 8 Feb 96. + * sanity.sh: Revise test 64 to test for above-fixed bug. + * sanity.sh (PLUS): New variable, work around yet another GNU expr + bug. + +Tue Feb 20 14:07:50 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * sanity.sh: Merge test rtags into test basic2. They never were + capable of running separately of each other. + + * sanity.sh (deep): New test, to test ability to operate in deeply + nested directories (more quickly than basic2 test did). + (basic2,rtags): Remove directories dir3 and dir4. Remove file8, + file10, file12, file9, file11, file13, file15, file16, file17. + These additional files slowed down the tests considerably without + significantly increasing coverage. + + * sanity.sh (PROG): New variable. Use it instead of "cvs" + to match the name cvs prints out for itself. + +Mon Feb 19 09:00:29 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + This fixes a bug whereby old default attributes would get + clobbered instead of added to on "cvs watch add". + * hash.c (findnode): Don't check for key == NULL; let the + assertion in hashp take care of it. + * fileattr.h, fileattr.c (fileattr_get): If filename is NULL, + return default attributes. + + * client.c (send_repository): Fix indentation. + +Mon Feb 19 01:10:01 1996 Karl Fogel <kfogel@floss.red-bean.com> + + * login.c (login): print out full repos so user knows which server + she's logging into. + + * client.c (send_repository): die if `repos' is NULL. This is a + lame solution; see comments in code. + +Thu Feb 15 15:04:01 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * error.c (error): Free entire and mess when done with them. + + * sanity.sh (info): Correct syntax of .cvsrc file. + + * cvs.h, expand_path.c, edit.c, parseinfo.c, wrapper.c: + expand_path now takes arguments containing file and line for error + message, and it prints the error message itself. + * sanity.sh (info-6a): Test printing of error message. + + * expand_path.c (expand_variable): Add USER internal variable. + * sanity.sh (info): Test USER and CVSROOT internal variables too. + +Wed Feb 14 19:11:08 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * main.c (usg): Add -s option. + +Tue Feb 13 20:26:06 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + gcc -Wall lint: + * mkmodules.c (mkmodules_usage): Remove declaration of + non-existent function. + * cvs.h (mkmodules): Declare. + +Mon Feb 12 12:20:04 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * mkmodules.c: Rename main to mkmodules and remove various pieces + of scaffolding which it used to emulate non-existent parts of CVS. + Change calling convention to just take a char * not argc,argv. + Save and restore working directory. + * commit.c (commit_filesdoneproc): Call it if checking files into + CVSROOT. + * Makefile.in (SOURCES): Add mkmodules.c. + (OBJECTS): Add mkmodules.o. + (MSOURCES,MOBJECTS): Removed. + (COMMON_OBJECTS): Removed; move former contents into OBJECTS. + Update other rules accordingly. + * sanity.sh: Adjust to reflect nonexistence of mkmodules. + + These changes introduce functions cvs_output and cvs_outerr; + eventually all server output will go through them rather than + stdio directly. + * server.c (saved_output, saved_outerr): New variables. + (do_cvs_command): Initialize them. + (buf_output): Don't require that buf->output be set; saved_* use + this to shove some data in a buffer which buf_copy_lines will + later want to get data from. + * server.c, cvs.h (cvs_output, cvs_outerr): New functions. + * mkmodules.c (cvs_outerr): New function, so error() works. + * error.c: Reindent. Don't declare program_name and command_name; + cvs.h declares them. + (error): Use vasprintf and cvs_outerr (or fputs in the + error_use_protocol case) rather than stdio directly. + * import.c (import_descend_dir): Remove kludge which had prevented + messages from error() from being out of order with respect to + messages from printf; cvs_output and cvs_outerr are a cleaner + solution to the problem. + (add_log, import): Use cvs_output not printf. + * update.c (write_letter): Use cvs_output not printf. + (checkout_file): Use write_letter not printf. + * sanity.sh: Use dotest for test 56 (test that output is actually + correct). In theory should test that the import.c bug is fixed, + but I was unable to reproduce the bug (it is timing dependent). + +Mon Feb 12 16:07:45 1996 Norbert Kiesel <nk@col.sw-ley.de> + + * commit.c: define last_register_time + (commit): make sure cvs doesn't exit in the same second it wrote + the last timestamp + (commit_fileproc): set last_register_time + (finaladd): set last_register_time + + * run.c, cvs.h: Changed more Popen() to run_popen() + +Mon Feb 12 03:06:50 1996 Benjamin J. Lee <benjamin@cyclic.com> + + * release.c, rtag.c, tag.c: changed 'delete' to 'delete_flag' + to avoid symbol collision with DEC C RTL function delete() + +Mon Feb 12 03:01:48 1996 Benjamin J. Lee <benjamin@cyclic.com> + + * mkmodules.c: changed 'void Lock_Cleanup()' to 'void static + Lock_Cleanup() to avoid conflict with more substantial + Lock_Cleanup() in lock.c + +Mon Feb 12 02:50:19 1996 Benjamin J. Lee <benjamin@cyclic.com> + + * edit.c, logmsg.c, release.c, run.c: Changed Popen() to + run_popen(). VMS' linker is not case sensitive and considered + popen() and Popen() to be identical symbols. + +Sun Feb 11 10:51:14 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * main.c (main) [!CLIENT_SUPPORT]: Silently ignore gzip level + rather than printing usage message. + + * cvs.h, expand_path.c (variable_list): New variable. + (variable_set): New function. + * hash.h (enum ntype), hash.c (nodetypestring): Add VARIABLE. + * expand_path.c (expand_path, expand_variable): Reindent. + (expand_variable): Use user variables not environment variables + for ${=VAR} syntax. The environment variables didn't work + client/server. + * main.c (main): Process new -s global option. + * client.c (send_variable_proc): New function. + (start_server): Call it, to send user variables. + * server.c (serve_set): New function. + (requests): Add Set request. + * sanity.sh: Revise info test to use user variables rather than + environment variables. + +Sat Feb 10 16:55:37 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + By itself this is only a small cleanup, but in the long run it + will be way cool (for reference, it takes CVS's text segment from + 290816 bytes to 294912, which I expect will be made up by future + changes which this enables): + * cvs.h (struct file_info): Added. + (FILEPROC): Replace 5 args with single struct file_info *. + * recurse.c (do_file_proc): Adjust args to fileproc; passed in + instead of from globals. + (do_recursion): Call do_file_proc accordingly. Remove srcfiles + global variable. + * update.c (update_fileproc): Renamed from update_file_proc. + * admin.c, client.c, commit.c, diff.c, edit.c, log.c, patch.c, + remove.c, rtag.c, status.c, tag.c, update.c, watch.c: Update + fileprocs to new calling convention. + +Fri Feb 9 15:30:32 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * expand_path.c (expand_variable): Accept a variable name starting + with '=' as a way to specify an environment variable. + * sanity.sh (info): New tests, for above behavior. + + * Makefile.in (clean): Also remove check.log check.plog. + + * import.c (comtable): Remove SYSTEM_COMMENT_TABLE; the table + should *not* depend on what kind of machine the server happens to + be. Add "mak", "rc", "dlg", "frm", and "bas" types which were + formerly included via SYSTEM_COMMENT_TABLE. + + * cvs.h, rcs.h, add.c, checkin.c, classify.c, commit.c, diff.c, + import.c, patch.c, rcs.c, update.c, vers_ts.c: Remove + DEATH_SUPPORT ifdefs. They were introduced to facilitate merging + between Cygnus and Berliner variants of CVS, not because it was + intended to subset CVS this way. And they clutter up the code + quite a bit. + * cvs.h, create_adm.c, main.c, update.c: Likewise, remove + CVSADM_ROOT ifdefs (it is still a #define, of course). I believe + they had a more-or-less similar motivation. + + * sanity.sh: Move setting of HOME from ignore test to the start of + the tests so it applies to all tests. + (CVS): Remove -f; the above change takes care of it. + + * rcs.h (RCS_MERGE): Removed; unused. + + * commit.c (checkaddfile): Fix memory leak. + + * admin.c, commit.c, diff.c, log.c, mkmodules.c: Pass -x,v/ to RCS + commands. + + * rcscmds.c, cvs.h (RCS_checkin): New function. + * checkin.c, commit.c, import.c: Call it, rather than run_*. + * cvs.h, commit.c: Remove DEATH_STATE define; the behavior + which used to be the default (DEATH_STATE) is now the only one. + Failing to define DEATH_STATE has been commented as obsolete at + least since CVS 1.5. We still can read repositories created with + such a CVS, however. + * rcs.h, rcs.c: Adjust comments regarding DEATH_STATE. + * subr.c (make_message_rcslegal): Add comment, describing + allocation of returned value. + +Fri Feb 9 09:53:44 MET 1996 Norbert Kiesel <nk@col.sw-ley.de> + + * sanity.sh: use "${testcvs}" instead of "cvs" in devcom tests + + * hash.c: fix "dereferencing a NULL pointer" bug triggered with + "cvs watch add" + (findnode): return NULL if key == NULL + (hashp): assert (key != NULL) + +Fri Feb 9 00:46:47 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * rcs.c (RCS_reparsercsfile): Remove unused variable date. + + * myndbm.c (mydbm_load_file): Fix typo ('015' -> '\015'). + +Thu Feb 8 13:00:00 1996 Jim Kingdon <kingdon@peary.cyclic.com> + + * rcs.c (RCS_parse, RCS_parsercsfile, RCS_reparsercsfile), + fileattr.c (fileattr_read), myndbm.c (myndbm_open): + Use FOPEN_BINARY_READ. + * fileattr.c (fileattr_write), myndbm.c (myndbm_close): + Use FOPEN_BINARY_WRITE. + * history.c (history_write, read_hrecs): Specify OPEN_BINARY. + * rcs.c: Remove calls to abort. + * myndbm.c (myndbm_load_file): Ignore CRs from ends of lines + if present. + * myndbm.c, fileattr.c: While I am at it, change \n to \012 + a few places where LF is intended. + * history.c (history_write): Use getenv ("HOME"), not getpwnam, + to find home directory. If it isn't set, just keep going; don't + print a message. + * rcscmds.c, cvs.h (RCS_checkout): New function. + * update.c, checkin.c, commit.c, diff.c, import.c, no_diff.c, + patch.c: Call it instead of run_*. + * patch.c (patch_fileproc): Clean up inconsistent handling of + noexec flag. + * rcscmds.c (RCS_*): Pass -x,v/ to RCS commands; elsewhere in + CVS it is assumed that ,v is a suffix. + +Fri Feb 2 14:07:32 1996 J.T. Conklin <jtc@rtl.cygnus.com> + + * rcs.h (struct rcsnode): Remove dates field (list of rcsversnodes + indexed by date). CVS maintained this list for each RCS file even + though it was never used. This resulted in higher then necessary + memory requirements (and run time too). Even if revision info was + needed, CVS' List data structure is inappropriate because can't + handle duplicate keys. The above was discovered by tracking down + a memory leak. + * rcs.c (RCS_reparsercsfile): Don't build dates list. + (freercsnode): Don't delete dates list. + (rcsvers_delproc): Free date field. + (null_delproc): Removed. + +Thu Feb 1 12:28:33 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * remove.c (cvsremove): Don't tell user the name of the program + which they use to remove files; we don't have any way of knowing + that, and besides which they might use a GUI or emacs 'dired' anyway. + * update.c (update_filesdone_proc, update_dirleave_proc): Call + unlink_file_dir instead of rm -rf. + * options.h.in: Remove RM; no longer used. + + * sanity.sh: New tests devcom-a* test "cvs watch add", + "cvs watch remove", and "cvs watchers". + + * sanity.sh: New test 171a0 tests for watch.c bug just fixed by kfogel. + + * Most .c files: Remove rcsids. + * cvs.h: Remove USE macro. + +Thu Feb 1 13:07:15 1996 J.T. Conklin <jtc@rtl.cygnus.com> + + * tag.c, rtag.c: Update various comments to reflect function name + changes. + +Thu Feb 1 14:14:31 1996 Karl Fogel <kfogel@floss.red-bean.com> + + * recurse.c (do_recursion): comment #endif. + + * edit.c (notify_check): surround with #ifdef CLIENT_SUPPORT; else + CVS won't compile if CLIENT_SUPPORT is undefined. + + * edit.h (notify_check): surround declaration with #ifdef + CLIENT_SUPPORT. + + * watch.c (watch): if argc <= 1, then just give usage (previously + was "argc == -1"). + +Thu Feb 1 12:28:33 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * README-rm-add: Remove information which is now in cvs.texinfo. + + * sanity.sh: Remove basic0 tests. Move a few to new tests + basica-1a* (but there is no need to test that *every* command + gracefully does nothing on an empty directory; exhaustive testing + is impractical and the generic recursion processor handles this + anyway). + + * sanity.sh: New tests 69a* test use of update -p to restore old + version of dead file. + +Wed Jan 31 18:32:34 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * ChangeLog-9395: Remove duplicate entries from 1996 which + accidentally got into this file. + + * client.c (read_line, read_from_server): Change "premature end of + file from server" message to "end of file from server (consult + above messages if any)" because 99% of the time it means rsh has + printed an error message and exited. + +Wed Jan 31 15:09:51 1996 J.T. Conklin <jtc@rtl.cygnus.com> + + * edit.c (ncheck_fileproc): Fix memory leak; free line before + returning. + +Tue Jan 30 18:06:12 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * recurse.c (do_recursion): Add comment about the fact that we + don't have locks in place at certain points. + +Tue Jan 30 09:43:34 1996 Vince Demarco <vdemarco@bou.shl.com> + + * edit.c (notify_proc): have notify_proc call expand_path with + the name of the filter program. The user may have used a + cvs environmental variable. (Popen will expand it, but it may not + use the correct value) + +Tue Jan 30 09:43:34 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * ChangeLog: take the pre-1996 changes and put them in a new file + ChangeLog-9395. + * ChangeLog-9194: Renamed from ChangeLog.fsf. + * ChangeLog-9194, ChangeLog-9395, ChangeLog: Add additional text + explaining the difference between all these logs and pointing to + older logs. + * Makefile.in (DISTFILES): Add ChangeLog-9194 and ChangeLog-9395; + remove ChangeLog.fsf. + + * modules.c (do_module): Don't fall through from 'l' to 'o' case + of option processing switch statement. + +Tue Jan 30 06:50:19 1996 J.T. Conklin <jtc@rtl.cygnus.com> + + * client.c (send_repository): Fix memory leak; free adm_name + before returning. + * diff.c (diff_file_nodiff): Fix memory leak; free xvers before + returning. + * rtag.c (rtag_fileproc): Fix memory leak; if branch_mode is set, + free rev before returning. + * status.c (status_fileproc, tag_list_proc): Fix memory leak; free + return value of RCS_whatbranch. + * tag.c (tag_fileproc): Fix memory leak; free vers before + returning. + (val_fileproc): Fix memory leak; free return value of RCS_gettag. + * watch.c (watch_modify_watchers): Fix memory leak; free mynewattr + before returning. + +Tue Jan 30 09:43:34 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + * lock.c (readers_exist): If stat gave an error, print an error + message saying it was from stat, rather than from "reading + directory". Skip the message completely if it was an + existence_error. + + * sanity.sh (branches): New tests (branches off of branches, etc.). + +Tue Jan 30 11:55:34 MET 1996 Norbert Kiesel <nk@col.sw-ley.de> + + * main.c (main): Add change to run getopt_long twice again. + +Mon Jan 29 15:59:31 1996 Jim Kingdon <kingdon@harvey.cyclic.com> + + gcc -Wall lint: + * client.c: Include edit.h + Sun Jan 28 09:45:53 1996 Jim Kingdon <kingdon@harvey.cyclic.com> * edit.c, edit.h (mark_up_to_date): New function, to remove file @@ -302,3721 +810,5 @@ Mon Jan 1 09:49:16 1996 Jim Kingdon <kingdon@harvey.cyclic.com> send arguments. * sanity.sh (modules): Add test of modules -d flag. -Sun Dec 31 17:33:47 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * import.c (add_rev): Revert portion of 31 Aug 95 change which - passes -u to ci instead of using a hard link. - * sanity.sh (import): Add test for above-fixed bug. - -Sun Dec 31 16:40:41 1995 Peter Chubb <peterc@bookworm.sw.oz.au> - and Jim Kingdon <kingdon@cyclic.com> - - * admin.c (admin_fileproc): Call freevers_ts before returning. - -Mon Dec 25 12:20:06 1995 Peter Wemm <peter@haywire.DIALix.COM> - - * logmsg.c (rcsinfo_proc): initialise line and - line_chars_allocated so they dont cause malloc problems within - getline(). This was causing rcsinfo templates to not work. - -Sun Dec 24 01:38:36 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * server.c (authenticate_connection): clarify protocol. - - * login.c (login): deprolixify the password prompt. - -Sat Dec 23 10:46:41 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * myndbm.h, myndbm.c (dbm_store): New function. - * myndbm.h (DBM): Add modified and filename fields. - * myndbm.c (dbm_open, dbm_close): Manipulate new fields. dbm_open - no longer fails if the file doesn't exist and O_CREAT is set. - * cvs.h (CVSROOTADM_VALTAGS): Added. - * tag.c, cvs.h (tag_check_valid): New function. - * update.c (update), checkout.c (checkout_proc), commit.c (commit), - diff.c (diff), patch.c (patch_proc), rtag.c (rtag_proc), tag.c (tag): - Call it. - * sanity.sh: Test for rejection of invalid tagname. - -Fri Dec 22 18:21:39 1995 Karl Fogel <kfogel@csxt.cs.oberlin.edu> - - * client.c (start_server): don't use kerberos if authenticating - server was specified. - -Fri Dec 22 16:35:57 1995 Karl Fogel <kfogel@csxt.cs.oberlin.edu> - - * login.c (login): deal with new scramble methods. - (get_cvs_password): same. - - * server.c (check_repository_password): remove arbitrary limit on - line length. - (authenticate_connection): use a separate variable for the - descrambled password, now that we no longer scramble in place. - Set `error_use_protocol' to 1 and just use error() where used to - do its job inline. - - * cvs.h (scramble, descramble): adjust prototype. - - * scramble.c (scramble, descramble): return char *. - -Fri Dec 22 13:00:00 1995 Jim Kingdon <kingdon@peary.cyclic.com> - - * release.c (release): If SERVER_SUPPORT is not defined, still - set up arg_start_idx. - - * release.c (release): When calling unedit, set argv[1] to - NULL (since argc is only 1). - - * edit.c: Pass dosrcs 0 to all calls to start_recursion. - None of the fileprocs were using it, so it just slowed things - down and caused potentially harmful checks for rcs files. - - * edit.c (send_notifications): In client case, do not readlock. - -Thu Dec 21 16:00:00 1995 Jim Kingdon <kingdon@peary.cyclic.com> - - Clean up Visual C++ lint: - * client.c (read_line): Change input_index and result_size to size_t. - (update_entries): Remove unused variables buf2, size_left, size_read. - (handle_mode): Prototype. - * client.c, client.h (send_to_server, read_from_server): Change - len to size_t. - * client.c (send_to_server): Change wrtn to size_t. - (read_from_server): Change red to size_t. - * client.c, myndbm.c, edit.c, fileattr.c: Include getline.h. - * checkin.c, commit.c, update.c: Include fileattr.h. - * commit.c, update.c: Include edit.h. - * edit.c (onoff_filesdoneproc): Prototype. - (ncheck_fileproc,edit_fileproc): Change "return" to "return 0". - (notify_do): Cast a signed value to unsigned before comparing - with unsigned value. - -Thu Dec 21 15:24:37 1995 Karl Fogel <kfogel@occs.cs.oberlin.edu> - - * client.c: don't include socket headers twice just because - both HAVE_KERBEROS and AUTH_CLIENT_SUPPORT are set. - (start_kerberos_server): if fail to connect to kerberos, print out - a more specific error message, mainly so pcl-cvs can know what - happened and not panic. - (start_server): don't assume sprintf() returns len - written (only some systems provide this); instead, have - send_to_server() calculate the length itself. - (send_modified): same. - (send_fileproc): same. - (send_file_names): same. - -Wed Dec 20 14:00:28 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * update.c (ignore_files): Move from here... - * ignore.c (ignore_files): ...to here. No longer static. Take - new argument PROC. - * cvs.h (ignore_files): Declare. - * client.c (send_filesdoneproc): Split off from - update_filesdone_proc. Pass new function send_ignproc to - ignore_files (to ask server about ignored file before printing - "?"). - * server.c: Rename outbuf from but_to_net and take it from - do_cvs_command to a global. Move initialization accordingly. - (serve_questionable): New function. - (requests): Add it. - * update.c (update_filesdone_proc): Remove client stuff. Pass new - function update_ignproc to ignore_files. - * cvs.h (joining, do_update): Move declarations from here... - * update.h: ...to here. - * cvs.h: Include update.h. - * update.c, client.c: Don't include update.h - * ignore.c, cvs.h: New variable ign_inhibit_server, set on -I !. - * import.c (import): Pass -I ! to server if specified. - (import_descend): If server, ignore CVS directories even if -I !. - * update.c (update), import.c (import): Only call ign_setup before - argument processing; don't call it again afterwards in client case. - * sanity.sh (ignore): Test above-fixed bugs and other ignore behaviors. - (dotest): New function. - Move modules checkin from modules test to start, so that other - tests can use mkmodules without a warning message. - -Wed Dec 20 13:06:17 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (send_to_server): don't check string's length twice. - -Wed Dec 20 02:05:19 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * login.c (login): took out debugging printf's. - (login): Removed unused variable `p'. - -Wed Dec 20 00:27:36 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * login.c (login): prefix scrambled password with 'A', so we know - which version of scrambling was used. This may be useful in the - future. - (get_cvs_password): skip past the leading 'A'. - Scramble $CVS_PASSWORD before returning it. - - * scramble.c: made this work. - -Tue Dec 19 17:45:11 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * login.c (cvs_password): new static var, init to NULL. - (login): scramble() the password before using it. - Verify the password with the server. - Check CVSroot more carefully to insure that it is - "fully-qualified". - (get_cvs_password): if cvs_password is not NULL, just return it. - Never prompt -- just tell user why failed, then exit. - Try CVS_PASSWORD environment variable first. - (construct_cvspass_filename): try CVS_PASSFILE environment - variable first. - - * client.h (connect_to_pserver): update prototype. - - * client.c (cvsroot_parsed): new static var. - (parse_cvsroot): set `cvsroot_parsed' to 1 when done. - (connect_to_pserver): return int. - Take `verify_only' arg. If it is non-zero, perform password - verification with the server and then shut down the connection and - return. - Call parse_cvsroot() before doing anything. - - * server.c (authenticate_connection): deal with verification - requests as well as authorization requests. - descramble() the password before hashing it. - - * cvs.h: prototype scramble() and descramble(). - - * Makefile.in: build scramble.o. - - * scramble.c: new file, provides trivial encoding but NOT real - encryption. - -Mon Dec 18 20:57:58 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * login.c (login): don't insert extra newlines. They were - harmless, but confusing. - -Mon Dec 18 15:32:32 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * hash.c, hash.h (findnode_fn): New function. - * hash.c (hashp): Tweak hash function so that findnode_fn works. - * update.c (ignore_files): Call findnode_fn, not findnode. - -Mon Dec 18 09:34:56 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * myndbm.c: Remove arbitrary limit. - - * client.c: Fix comment--Windows 95 requires NO_SOCKET_TO_FD, not - Windows NT. - -Mon Dec 18 01:06:20 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (server_sock): replaces `server_socket'. - (start_kerberos_server): added FIXME comment about how - NO_SOCKET_TO_FD is not dealt with in the kerberos case. - (connect_to_pserver): deal with NO_SOCKET_TO_FD case. - (read_line): deal with NO_SOCKET_TO_FD case. - (read_from_server): deal with NO_SOCKET_TO_FD case. - (send_to_server): deal with NO_SOCKET_TO_FD case. - (get_responses_and_close): deal with NO_SOCKET_TO_FD case. - - * client.c (send_to_server): error check logging. - (start_server): error check opening of logfiles. - (read_from_server): error check logging. - (read_line): use fwrite() to log, & error_check it. - Don't log if using socket style, because read_from_server() - already logged for us. - -Mon Dec 18 00:52:26 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (use_socket_style): new static var, init to 0. - (server_socket): new static var. - (connect_to_pserver): don't deal with logging here. - Caller changed. - (start_kerberos_server): don't deal with logging here either. - Caller changed. - -Mon Dec 18 00:40:46 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (send_modified): don't error-check `to_server'; - send_to_server() does that now. - -Mon Dec 18 00:19:16 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * login.c (get_cvs_password): Init `linebuf' to NULL. - free() `linebuf' and reset it for each new line. - (login): same as above. - - * client.c: Removed all the varargs prototyping gunk. - (to_server, from_server): make these static. - (from_server_logfile, to_server_logfile): new vars. - (start_server): init above two new vars to NULL. - (send_to_server): return void. - Correct bug in which amount to be written would be too high if the - loop ever ran more than once. - Log to `to_server_logfile' if it's non-NULL. - (read_from_server): new func, does raw reading from server. - Logs to `from_server_logfile' if it's non-NULL. - (update_entries): just use read_from_server() instead of looping - to fread() directly from `from_server'. - (read_line): Log to `from_server_logfile' if it's non-NULL. - - * client.h: send_to_server() returns void now. - (read_from_server): prototype. - -Sun Dec 17 19:38:03 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * checkout.c (checkout_proc), client.c, lock.c (readers_exist), - login.c, modules.c (cat_module, do_module): Remove arbitrary limits. - - * client.c (send_to_server): Fix typo (NULL -> '\0'). - (get_responses_and_close): Set server_started to 0 instead of - setting to_server and from_server to NULL. - * client.c: Make to_server and from_server static. - -Sun Dec 17 17:59:04 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.h (to_server, from_server): don't declare these anymore. - They are now entirely private to client.c (and in fact will go - away soon there too). - -Sun Dec 17 15:40:58 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.h: update prototype of send_to_server(). - - * client.c, watch.c, update.c, tag.c, status.c, rtag.c, remove.c, - release.c, patch.c, log.c, import.c, history.c, edit.c, diff.c, - commit.c, client.c, checkout.c, admin.c, add.c: - Convert all send_to_server() calls that used formatting to send - pre-formatted strings instead. And don't error check - send_to_server(), because it does its own error checking now. - - * client.c (send_to_server): don't use vasprintf(), just fwrite a - certain number of bytes to the server. And do error checking - here, so our callers don't have to. - (send_arg): use send_to_server() instead of putc()'ing - directly to `to_server'. - -Sun Dec 17 14:37:52 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * options.h.in (AUTH_CLIENT_SUPPORT, AUTH_SERVER_SUPPORT): - Define to 1 but leave commented out, instead of #undef'ing them. - This treats them like everything else in this file. - - * client.c: define server_started, init to 0. - (start_server): set server_started to 1. - - * client.h: declare `server_started', extern. - AUTH_CLIENT_SUPPORT moved here from cvs.h. - - * cvs.h: moved AUTH_CLIENT_SUPPORT stuff to client.h. - - * edit.c (notify_check): use new var server_started. - -Sun Dec 17 00:44:17 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * client.c (get_responses_and_close): Really stop ignoring ECHILD - errors. The Nov 30 1995 change claimed to do this, but the code - was not actually changed. - - * update.c (ignore_files): Revert H.J. Lu change; it was wrong for - directories and sometimes looked at sb.st_mode when it wasn't set. - * import.c (import_descend): Revert H.J. Lu change; it was wrong - for directories and the extra lstat call was an unnecessary - performance hit. - * sanity.sh (import): Add test for the second of these two bugs. - -Sat Dec 16 17:26:08 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * client.c (send_to_server): Remove arbitrary limit. Also remove - !HAVE_VPRINTF code; all relevant systems have vprintf these days. - -Sat Dec 16 21:35:31 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * checkout.c (checkout): use send_to_server() now. - -Sat Dec 16 21:18:16 1995 H.J. Lu (hjl@gnu.ai.mit.edu) - (applied by kfogel@cyclic.com) - - * import.c (import_descend): We ignore an entry if it is - 1. not a file, nor a link, nor a directory, or - 2. a file and on the ignore list. - - * update.c (ignore_files): We ignore any thing which is - 1. not a file, or - 2. it is a file on the ignore list. - -Sat Dec 16 00:14:19 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (send_to_server): corrected comment. - - * client.h: prototype new func send_to_server(). - - * add.c, admin.c, client.c, commit.c, diff.c, edit.c, history.c, - import.c, log.c, patch.c, release.c, remove.c, rtag.c, status.c, - tag.c, update.c, watch.c: - Use send_to_server() instead of writing directly to to_server. - - * client.c: conditionally include the right stuff for variable arg - lists. - (send_to_server): new func. - -Fri Dec 15 23:10:22 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * error.c: expanded comments. - - * client.c (connect_to_pserver): verbosify errors. - (connect_to_pserver): use send() and recv(), not write() and - read(). Sockets are not file descriptors on all systems. - -Fri Dec 15 22:36:05 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (connect_to_pserver): oops, removed old debugging - printf. - -Fri Dec 15 18:21:16 1995 Karl Fogel (kfogel@floss.cyclic.com) - - * client.c (auth_server_port_number): don't call htons(); - init_sockaddr() does that for us. - (init_sockaddr): zero the sockadder_in struct before doing - anything with it. IBM TCP/IP docs recommend this, and it can't - hurt. - -Fri Dec 15 15:21:53 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (connect_to_pserver): new var `port_number', initialize - with new func auth_server_port_number() and pass to - init_sockaddr(). - (auth_server_port_number): new func. Right now it just returns - `htons (CVS_AUTH_PORT)'. We'll probably add the ability to - specify the port at run time soon, anyway, so having this function - will make that easier. - -Wed Dec 6 18:08:40 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * cvs.h: Add CVSREP. - * find_names.c (find_dirs): Skip CVSREP too. - * fileattr.h, fileattr.c: New files, to manipulate file attributes. - * hash.c (nodetypestring), hash.h (enum ntype): Add FILEATTR. - * hash.c, hash.h (list_isempty): New function. - * recurse.c (do_recursion): Call fileattr_startdir before - processing files in a directory and fileattr_write and - fileattr_free (after files, before recursing). - * watch.c, watch.h: New files, to handle notification features. - * edit.c, edit.h: New file, to handle new read-only checkout features. - * client.c, server.c: Add "Mode" request, to change the mode of a file - when it is checked in. - * main.c (cmds): Add "watch", "edit", "unedit", "watchers", "editors". - * main.c: Split command help from usg into new variable cmd_usage, - which. - (main): Add --help-commands option to print out cmd_usage. - * cvs.h: Declare watch, edit, unedit, watchers, editors. - * client.c, client.h: Add client_watch, client_edit, client_unedit, - client_watchers, client_editors. - * client.c, server.c: Add notification stuff. - * update.c (checkout_file, patch_file), checkin.c (Checkin): Check - _watched attribute when deciding read-only or read-write. - * commit.c (checkaddfile): Call fileattr_newfile to set attributes - on newly created files. - * release.c (release): - * cvs.h: Add CVSADM_NOTIFY and CVSADM_NOTIFYBAK. - * recurse.c (do_recursion): Call notify_check. - * commit.c (commit_fileproc): Call notify_do after committing file. - * client.c (get_responses_and_close): Set to_server and from_server - to NULL so that it is possible to tell whether we are speaking to - the server. - * cvs.h: Add CVSROOTADM_NOTIFY. - * mkmodules.c (main): Add CVSROOTADM_NOTIFY to filelist. - * Makefile.in (SOURCES,OBJECTS,HEADERS): Add new files mentioned above. - * lock.c, cvs.h (lock_tree_for_write, lock_tree_cleanup): New - functions, taken from old commit.c writelock code. As part of - this, fsortcmp and lock_filesdoneproc go from commit.c to lock.c. - So does locklist but it gets renamed to lock_tree_list. - * commit.c: Use lock_tree_*. - -Fri Dec 15 10:37:00 1995 J.T. Conklin <jtc@slave.cygnus.com> - - * tag.c (tag_usage): Added -r and -D flags to usage string. - (tag): Detect when user specifies both -r and -D arguments. - Pass -r and -D arguments to server. - -Thu Dec 14 11:56:13 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (start_rsh_server): use RSH_NEEDS_BINARY_FLAG to - conditionalize "-b" option to "rsh". - - * run.c (filter_stream_through_program): document return value and - error behavior. - - * client.c (filter_through_gunzip): pass the supposedly - superfluous "-d" option to gunzip, to avoid stimulating what seems - to be an argument-passing bug in spawn() under OS/2 with IBM - C/C++. Yucko. - -Wed Dec 13 20:08:37 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * options.h.in (RCSBIN_DFLT): Recommend specifying -b in - inetd.conf for pserver. That is a pretty good solution. - -Wed Dec 13 18:29:59 1995 Preston L. Bannister <pbannister@ca.mdis.com> - and Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (send_modified): make sure that vers and vers->options - are non-NULL before strcmp()'ing them with "-kb". - Initialize `bin' near where it is used, not at beginning of - function. - (update_entries): make sure `options' is non-NULL before - strcmp()'ing with "-kb". - Initialize `bin' near where it is used, not at beginning of - function. - -Tue Dec 12 18:56:38 1995 Karl Fogel <kfogel@totoro.cyclic.com> - - * options.h.in (RCSBIN_DFLT): document the probable need for this - to be set in the authenticating server. - -Tue Dec 12 11:56:43 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * server.c (expand_proc): If mfile is non-NULL, return it too as - part of the expansion. - * sanity.sh (modules): Add tests for above-fixed bug. - -Mon Dec 11 21:39:07 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * dog.c (flea_bath): Take `suds' arg. - All collars changed. - -Mon Dec 11 15:58:47 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * login.c (login): if client password file doesn't exist, create - it, duh. - - * main.c (main): die if CVSroot has access-method but no - username. - - * root.c: added some comments. - - * main.c: removed all code pertaining to the "-a" option. We - specify access-method in CVSroot now. - - * client.c (parse_cvsroot): new var, `access_method'. If CVSroot - is prepended with an access method (i.e., - ":pserver:user@host:/path"), then handle it. - - * login.c (login): use || when checking if CVSroot is "fully - qualified". - Prepend ":pserver:" before writing to ~/.cvspass. - (get_cvs_password): Take no parameters; we'll just use CVSroot to - get the password. - -Mon Dec 11 12:43:35 1995 adamg <adamg@microsoft.com> - - * error.c, client.c, remove.c, main.c: Add explicit casts for some - function pointers to remove warnings under MS VC. - * main.c (main): remove use of NEED_CALL_SOCKINIT in favor of the - more generic INITIALIZE_SOCKET_SUBSYSTEM. Note that the code assumes - that if INITIALIZE_SOCKET_SUBSYSTEM() returns, socket subsystem - initialization has been successful. - -Sat Dec 9 22:01:41 1995 Dan O'Connor <doconnor@tii.com> - - * commit.c (check_fileproc): pass RUN_REALLY flag to run_exec, - because it's okay to examine the file with noexec set. - -Sat Dec 9 20:28:01 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (update_entries): new var, `bin, init to 0. - Use it in determining whether to convert the file. - (send_modified): same as above. - -Fri Dec 8 17:47:39 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * server.c (downcase_string): removed. - (check_repository_password): don't deal with case-insensitivity - anymore. - - * options.h.in (CVS_PASSWORDS_CASE_SENSITIVE): deleted this. No - need for it anymore. - -Thu Dec 7 21:08:39 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * server.c (check_repository_password): when checking for false - prefix-matches, look for ':', not '@'. Duh. - -Thu Dec 7 18:44:51 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * options.h.in (CVS_PASSWORDS_CASE_SENSITIVE): replaces - CVS_PASSWORDS_CASE_INSENSITIVE; passwords are now insensitive by - default. Expanded explanatory comment. - - * login.c (get_cvs_password): Use memset(), not bzero(). I - botched this change earlier. - - * server.c (check_repository_password): no need to check - xmalloc()'s return value. - (check_repository_password): check for false prefix-matches (for - example, username is "theo" and linebuf contains user - "theocracy"). - -Thu Dec 7 14:49:16 1995 Jim Meyering (meyering@comco.com) - - * filesubr.c (isaccessible): Rename from isaccessable. - Update callers. - * cvs.h: Update prototype. - * main.c (main): Update callers. - * server.c (main): Update callers. - -Thu Dec 7 12:50:20 1995 Adam Glass <glass@NetBSD.ORG> - - * cvs.h: "isaccessible" is the correct spelling. - Also add "const" to second arg to make prototype match - declaration. - -Thu Dec 7 11:06:51 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c, login.c: memset() instead of bzero(). - -Thu Dec 7 00:08:53 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * server.c (authenticate_connection): document server's side of - the Authentication Protocol too. - - * client.c (connect_to_pserver): when printing out "unrecognized - response", also print out the offending response. - - * server.c (check_password): take `repository' arg too now. - Call check_repository_password() before checking /etc/passwd. - (check_repository_password): new func. - - * options.h.in (CVS_PASSWORDS_CASE_INSENSITIVE): new define, unset - by default. - -Wed Dec 6 18:51:16 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * server.c (check_password): If user has a null password, then - return 1 if arg is also null. - Reverse sense of return value. Caller changed. - -Wed Dec 6 14:42:57 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * server.c (check_password): new func. - (authenticate_connection): call above new func. - - * login.c (login): use construct_cvspass_filename(). - If CVSroot is not "fully-qualified", then insist the user qualify - it before going on. - (get_cvs_password): fleshed out. Now reads from ~/.cvspass, or - prompts if no appropriate password found. - (construct_cvspass_filename): new func. - - * server.c (authenticate_connection): send ACK or NACK to client. - - * client.c (connect_to_pserver): check for ACK vs NACK response - from server after sending authorization request. - - * login.c (get_cvs_password): new func. - - * client.c (connect_to_pserver): use new func get_cvs_password(). - Prototype it at top of file. Hmmm. - -Wed Dec 6 13:29:22 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * server.c: same as below (AUTH_SERVER_SUPPORT). - - * main.c: same as below (AUTH_SERVER_SUPPORT where appropriate). - - * login.c: same same as below. - - * cvs.h: same as below. - - * client.c: use AUTH_CLIENT_SUPPORT, not CVS_LOGIN. - - * options.h.in (AUTH_CLIENT_SUPPORT, AUTH_SERVER_SUPPORT): these - replace CVS_LOGIN. - -Wed Dec 6 00:04:58 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * server.c (authenticate_connection): expanded comment. - -Tue Dec 5 23:37:39 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (connect_to_pserver): read password from prompt for - now. - - * server.c (authenticate_connection): if the password passes - muster, then don't abort. - -Tue Dec 5 22:46:37 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * subr.c (strip_trailing_newlines): new func. - - * client.c (connect_to_pserver): took out print statements. - - * server.c (authenticate_connection): removed print statments. - Use new func strip_trailing_newlines() to purify `repository', - `username', and `password'. - Run a primitive password check, just for testing. - - * client.c (connect_to_pserver): use CVS_AUTH_PORT. - Take tofdp, fromfdp, and log args. Caller changed. - (get_responses_and_close): either kerberos and CVS_LOGIN might - have one fd for both directions, so adjust #ifdef accordingly. - - * cvs.h (CVS_AUTH_PORT): new define, default to 2401. - Prototype strip_trailing_newlines(). - -Tue Dec 5 16:53:35 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * server.c (authenticate_connection): new func. - - * client.c (init_sockaddr): func moved here from login.c. - (connect_to_pserver): same as above. Take no args, now. - Include <sys/socket.h>, <netinet/in.h>, <netdb.h>, if CVS_LOGIN. - - * cvs.h: Declare use_authenticating_server, as extern int. - Declare connect_to_pserver(). - - * main.c (main): call authenticate_connection(). Removed testing - code. - Add 'a' to the short-option string in the getopt() call. - - * login.c (connect_to_pserver): moved to client.c. - -Tue Dec 5 16:01:42 1995 Peter Chubb <peterc@bookworm.sw.oz.au> - (patch applied by Karl Fogel <kfogel@cyclic.com>) - - * update.c (join_file): if vers->vn_user is "0", file has been - removed on the current branch, so print an error and return. - -Mon Dec 4 14:27:42 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * Version 1.6.3. - -Mon Dec 4 16:28:25 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * release.c (release): add return (0) as last line - - * cvs.h: declare program_path - - * main.c define program_path - (main): set program_path - - * release.c (release): use program_path for update_cmd - -Mon Dec 4 11:22:42 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * Version 1.6.2. - -Sun Dec 3 20:02:29 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * rcs.h (struct rcsnode), rcs.c (freercsnode): Add expand field. - * rcs.h (RCSEXPAND): New #define. - * rcs.c (RCS_reparsercsfile): Record keyword expansion in expand - field of struct rcsnode. - * update.c (checkout_file): Set keyword expansion in Entries file - from rcs file if there is nowhere else to set it from. - * client.c (send_modified, update_entries) [LINES_CRLF_TERMINATED]: - If -kb is in effect, don't convert. - - * update.c (update_file_proc), commit.c (check_fileproc), - rcscmds.c (RCS_merge): Direct stdout to DEVNULL rather than - passing -s option to grep. This avoids trouble with respect to - finding a grep which support -s and whether we should use the (GNU - grep) -q option if it exists. - * options.h.in: Change "@ggrep_path@" to "grep". - -Fri Dec 1 11:53:19 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * rcs.c (RCS_gettag): new parameter return_both force return both - tags: the symbolic and the numeric one. - (RCS_getversion): new parameter return_both is forwarded to - RCS_gettag. - - * rtag.c, tag.c, commit.c, patch.c, update.c: pass 0 as additional - last parameter to RCS_getversion and RCS_gettag - - * rcs.h (RCS_gettag): new parameter return_both. - (RCS_getversion): new parameter return_both. - - * cvs.h (struct vers_ts): add vn_tag slot for symbolic tag name - - * vers_ts.c (Version_TS): call RCS_getversion with 1 for - return_both and split output into vn_rcs and vn_tag - (freevers_ts): free vn_tag - - * update.c (checkout_file): use vn_tag instead of vn_rcs when - calling 'rcs co' to allow rcs expansion of :$Name : - -Thu Nov 30 20:44:30 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (get_responses_and_close): undo previous change - regarding waitpid(). The problem has been solved by modifying - os2/waitpid.c instead of its callers. - -Thu Nov 30 16:37:10 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c: All these changes are for OS/2, which will no longer have - a separate client.c: - (start_kerberos_server): new func, contains code that - used to be in start_server(). - (start_server): moved kerberos code to above function, reorganized - the rest. Added authentication clause. - (call_in_directory): test errno against EACCESS, if EACCESS is - defined (this is for OS/2's oddball mkdir). - (change_mode): don't set execute permission on anything if - EXECUTE_PERMISSION_LOSES is defined. - (get_responses_and_close): if START_RSH_WITH_POPEN_RW, then use - pclose() instead of fclose(). - If waitpid errors with ECHILD, don't die. This is okay. - (start_rsh_server): alternate definition if - START_RSH_WITH_POPEN_RW. - - * main.c: [all these changes conditional on CVS_LOGIN: ] - Don't prototype connect_to_pserver, don't enter it in cmds[] - (actually, it was never in there, I don't know why my previous - change said it was). - (use_authenticating_server): new global var. - (main): if "-a", then set above new var to TRUE. - (usg): document "-a" option. - -Wed Nov 29 12:55:10 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * main.c: Prototype connect_to_pserver(), and enter it in cmds[]. - (main): test some extremely primitive authentication. - - * login.c: Include <sys/socket.h> - (connect_to_pserver): new func. - (init_sockaddr): new func. - -Mon Nov 20 14:07:41 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * Makefile.in (TAGFILES): Separate out from DISTFILES, for C code. - (TAGS,tags): Use TAGFILES not DISTFILES. - -Sun Nov 19 11:22:43 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * recurse.c (do_recursion): Don't call server_pause_check if there - are writelocks around. Revise comment to reflect fact we are no - longer relying on a writelock'd operations being "unable" to - generate enough data to pause. - -Sun Nov 19 10:04:50 1995 Peter Wemm <peter@haywire.DIALix.COM> - - * server.c, server.h, options.h.in: Implement hooks for doing - simple flow control on the server to prevent VM exhaustion on a - slow network with a fast server. - * recurse.c: Call the flow control check at a convenient location - while no locks are active. This is a convenience tradeoff against - accurate flow control - if you have a large directory it will all - be queued up, bypassing the flow control check until the next - directory is processed. - -Sat Nov 18 16:22:06 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c, update.c, vers_ts.c, server.c, rcs.c, lock.c, - ignore.c, entries.c, diff.c, commit.c, checkin.c: - Use new macro `existence_error', instead of comparing errno to - ENOENT directly. - -Fri Nov 17 14:56:12 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (start_server): removed alternate version of this func, - since os2/client.c will now be used under OS/2. - -Thu Nov 16 22:57:12 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (start_server): ifdef HAVE_POPEN_RW, use a different - version of start_server(). This is maybe not the cleanest cut to - make, but it's better than mucking around with yet more #ifdefs in - the middle of the old start_server() function. Once things are - up, I may reposition this code. - -Wed Nov 15 15:33:37 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * main.c (main): ifdef NEED_CALL_SOCKINIT, then call SockInit(). - Only OS/2 needs this initialization. - -Tue Nov 14 18:54:01 1995 Greg A. Woods <woods@most.weird.com> - - * patch.c: - - fix orientation of test for result of getline() call - - use fputs() not printf() when just copying file out - - * cvsbug.sh: - - add space after #! - - new rcs id - - allow version to be edited by Makefile. - - * Makefile.in: - - make Makefile a dependent of all (this might not be perfect, but - it at least gives you a chance to catch up on the second - go-around). - - filter cvsbug.sh in a manner similar to cvsinit.sh to get the - version number set from version.c - -Tue Nov 14 13:28:17 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * sanity.sh: Call old log file check.plog, not check.olog. - - * sanity.sh: Convert remaining tests from old-style ('***' on fail - and nothing on pass), to new-style (FAIL on fail and PASS on pass). - - * sanity.sh: Fix ability to run only some of the tests (always run - tests 1-4.75 to set up repository, document better how it works). - - * sanity.sh: Change "completed successfully" to "completed" in - message--many tests, but not all, exit if they fail. - -Tue Nov 14 15:10:00 1995 Greg A. Woods <woods@most.weird.com> - - * sanity.sh: test 63 doesn't work and probably can't - -Tue Nov 14 12:22:00 1995 Greg A. Woods <woods@most.weird.com> - - * sanity.sh: many minor tweaks: - - make the optional arguments almost work - - use a function 'directory_cmp' instead of 'diff -r' - - fix up a few more tests that weren't working.... - -Mon Nov 13 07:33:55 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * cvs.h: ifdef USE_OWN_POPEN, #include "popen.h". Only OS/2 has - its own popen()/pclose() right now. - -Mon Nov 13 04:06:10 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * cvs.h: conform to 80 column standard (yes, I'm a pedant). - -Sat Nov 11 13:45:13 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * client.c (process_prune_candidates): use unlink_file_dir() to - remove the directory, instead of invoking "rm" via run_exec(). - -Fri Nov 10 14:38:56 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * main.c (main): removed "#define KF_GETOPT_LONG 1", since that - change is no longer in testing. - -Thu Nov 9 20:32:12 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * release.c (release): Use Popen(), not popen(). - -Wed Nov 8 10:20:20 1995 Jim Meyering (meyering@comco.com) - - * entries.c (ParseTag): Remove dcl of unused local. - - * patch.c: Include getline.h. - -Wed Nov 8 11:57:31 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * options.h.in: add configuration option STEXID_SUPPORT (default - is off i.e. old semantics) - - * filesubr.c (isaccessable): new function. Checks access-rights - for files like access(), but is getxid-safe. Falls back to - access() if SETXID_SUPPORT is not enabled. - (isfile): replace stat() by isaccessable(file, F_OK) - (isreadable): replace access() by isaccessable() - (iswritable): ditto - (make_directory): rename local variable buf to sb - - * cvs.h: add prototype for new function isaccessable. - - * server.c (serve_root): replace access() by isaccessable() - - * cvsrc.c (read_cvsrc): replace access() by isreadable() - - * main.c (main): replace access() by isaccessable() - -Wed Nov 8 10:22:41 1995 Greg A. Woods <woods@most.weird.com> - - * entries.c (fgetentent): change definition to static to match the - declaration at the top of the file - -Tue Nov 7 16:59:25 1995 J.T. Conklin <jtc@lestat.cygnus.com> - - * rcs.c (RCS_getbranch, RCS_getdate, RCS_getrevtime, RCS_gettag, - RCS_getversion, RCS_head): Use assert() instead of attempting to - "do the right thing" with a bogus RCSNode argument. - -Mon Nov 6 14:24:34 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * vers_ts.c: Remove ctime define. It is just asking for trouble. - -Mon Nov 6 11:58:26 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * vers_ts.c: ifdef ctime, undef it before redefining it. It is a - macro on some systems. - - * lock.c: don't prototype ctime() here. (See note below about - fgetentent() in entries.c.) - -Sun Nov 5 16:06:01 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * entries.c (fgetentent): don't prototype ctime here; we include - cvs.h, which includes system.h, which includes <time.h> - unconditionally (either as <time.h> or <sys/time.h>). Anyway, IBM - C/C++ chokes on mid-function, or even mid-file, prototypes. Sigh. - -Thu Nov 2 21:51:04 1995 Dan Wilder <dan@gasboy.com> - - * rtag.c (rtag): Fix typo ("-T" -> "-F"). - -Tue Oct 31 19:09:11 1995 Dan Wilder <dan@gasboy.com> - - * diff.c (diff_dirproc): just return R_SKIP_ALL if dir not exist. - (diff_file_nodiff): don't complain if file doesn't exist, just - ignore. - -Tue Oct 31 09:25:10 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * sanity.sh: Use absolute pathname for mkmodules. - -Sat Oct 28 01:01:41 1995 Jim Meyering (meyering@comco.com) - - * entries.c (ParseTag): Use getline instead of fgets. - -Fri Oct 27 13:44:20 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * cvs.h: do nothing about alloca ifdef ALLOCA_IN_STDLIB. I am - rather suspicious of this solution, and will not be surprised to - find out that there's a Right Way to handle this situation ("this - situation" being that OS/2 simply declares alloca in <stdlib.h>). - Suggestions are welcome; see src/cvs.h and lib/system.h to see why - I was getting a conflict in the first place. - -Wed Oct 25 16:03:20 1995 J.T. Conklin <jtc@slave.cygnus.com> - - * cvs.h (struct entnode): Add user field. - * entries.c (fputentent): New function, write entries line. - (write_ent_proc): Call fputentent to write entries line. - (Entnode_Create): New function, construct new Entnode. - (Entnode_Destroy): New function, destruct old Entnode. - (AddEntryNode): Changed to take an Entnode argument instead of - separate user, version, timestamp, etc. arguments. - (fgetentent): Changed to return Entnode. - (struct entent, free_entent): Removed. - -Wed Oct 25 12:44:32 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * admin.c (admin): Don't rely on ANSI C string concatenation; - SunOS 4.1.3 /bin/cc doesn't support it. - -Tue Oct 24 22:34:22 1995 Anthony J. Lill <ajlill@ajlc.waterloo.on.ca> - - * import.c (expand_at_signs): Check errno as well as return value - from putc. Some systems bogusly return EOF when successfully - writing 0xff. - -Tue Oct 24 14:32:45 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * admin.c (admin): use getcaller() instead of getpwuid - - * subr.c (getcaller): prefer getlogin() to $USER and $LOGNAME - (especially useful for NT where getuid always returns 0) - -Tue Oct 24 06:22:08 1995 Jim Meyering (meyering@comco.com) - - * cvsrc.c (read_cvsrc): Use getline instead of fgets. - * patch.c (patch_fileproc): Use getline instead of fgets. - - * entries.c (fgetentent): Use getline instead of fgets. - Use xmalloc to allocate space for each returned entry. - Since LINE is no longer static, save it in struct entent. - (struct entent): New member, line. - (free_entent): New function. - (Entries_Open): Call it after each call to fgetentent. - -Tue Oct 24 11:13:15 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * cvs.h: Declare valloc again, but this time with the right - signature (also changed in libs/valloc.c) - -Mon Oct 23 12:17:03 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * logmsg.c (do_editor): Check for errors from stdio calls. - -Mon Oct 23 12:37:06 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * cvs.h: Don't declare valloc. Some systems (e.g. linux) declare - it in stdlib.h in a conflicting way. - -Mon Oct 23 08:41:25 1995 Jim Meyering (meyering@comco.com) - - * commit.c (commit_filesdoneproc): Use getline instead of fgets. - - * logmsg.c (do_editor): Use getline instead of fgets. - (rcsinfo_proc): Likewise. - - * logmsg.c (do_editor): Lose if fclose of temp file output - stream fails. - -Mon Oct 23 11:59:41 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * cvs.h: add valloc declaration - - * server.h: add server_cleanup prototype - - * server.c: remove server_cleanup prototype - - * mkmodules.c (server_cleanup): fix parameter type - - * server.c: encapsulate wait_sig in #ifdef sun (it's only used in - code which is also encapsulated in #ifdef sun) - - * rcscmds.c (RCS_deltag, RCS_lock): add definition of noerr - parameter - - * error.c: include cvs.h instead of config.h, add USE(rcsid) - - * error.c (error): fix parameter type - - * update.c (join_file): encapsulate recent changes from garyo - within #ifdef SERVER_SUPPORT - -Sun Oct 22 13:47:53 1995 J.T. Conklin <jtc@slave.cygnus.com> - - * client.c (update_entries): Fix memory leak; free mode_string and - file_timestamp. - (send_fileproc): Fix memory leak; call freevers_ts before exiting. - - * module.c (do_module): Partially fix memory leak; added - variable so that the address of memory allocated by line2argv - is retained, but comment out the call to free_names. Freeing - the vector at that point loses because some of the elements - may be used later in the function. - (cat_module): fix memory leak. - - * recurse.c (start_recursion): Fix memory leak; free return - value of Name_Repository after it has been used. - -Sat Oct 21 23:24:26 1995 Jim Meyering (meyering@comco.com) - - * client.c (send_modified) [LINES_CRLF_TERMINATED]: Comment text - after #endif. - -Fri Oct 20 14:41:49 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * sanity.sh: Add test 87a, to test for bug fixed by garyo in - change below. - -Fri Oct 20 10:59:58 1995 Gary Oberbrunner <garyo@darkstar.avs.com> - - * update.c (join_file): send file back to client even if no - conflicts were detected, by calling Register(). - -Fri Oct 20 10:46:45 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * lock.c: Add prototype for Check_Owner - -Thu Oct 19 16:38:14 1995 Jim Meyering (meyering@comco.com) - - * lock.c (Check_Owner): Declare function `static int'. - -Thu Oct 19 14:58:40 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * expand_path.c (expand_variable): Fix typo ('*'->'('). - -Thu Oct 19 14:58:40 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * commit.c (commit_filesdoneproc): Check for errors from fopen, - fgets, and fclose. - - * rcscmds.c (RCS_merge): Remove comment about rcsmerge -E. - Hacking CVS was never a very good solution; the situation is fixed - in RCS 5.7, and is documented in ../INSTALL. - -Thu Oct 19 15:06:15 1995 Jim Meyering (meyering@comco.com) - - * filesubr.c (xchmod): Parenthesize arithmetic in operand of | - to placate gcc -Wall. - - * expand_path.c (expand_path): Parenthesize assignments used as - truth values to placate gcc -Wall. - - * commit.c (checkaddfile): Remove dcls of unused variables. - * lock.c (unlock): Remove dcl of unused variable. - -Thu Oct 19 14:58:40 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * root.c (Create_Root): If noexec, don't create CVS/Root. - -Wed Oct 18 11:19:40 1995 J.T. Conklin <jtc@slave.cygnus.com> - - * lock.c (unlock): Change order of comparison so that Check_Owner - is called only if other conditions are true. This performance - enhancement was broken when the AFS support was added. - -Wed Oct 18 12:51:33 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * main.c (main): check if argv[0] is "pserver" with else-if, not - if, since we've already asked if it's "kserver". - -Tue Oct 17 18:09:23 1995 Warren Jones <wjones@tc.fluke.com> - and Jim Kingdon <kingdon@harvey.cyclic.com> - - * sanity.sh: Deal with supplying a relative cvs filename, or - with a cvs filename which doesn't have basename "cvs". - -Mon Oct 16 15:58:31 1995 Vince Demarco <vdemarco@bou.shl.com> - - * parseinfo.c (Parse_Info): if the Keyword isn't ALL the current - version doesn't use the expanded variable, It should. - -Mon Oct 16 15:58:31 1995 Gary Oberbrunner <garyo@avs.com> - and Jim Kingdon <kingdon@harvey.cyclic.com> - - * server.c (server_register): Don't pass NULL to printf if tag, - date, or conflict is NULL. - -Thu Oct 12 12:13:42 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * main.c (main): begin to handle "pserver"; support not complete - yet, however. - -Thu Oct 12 02:52:13 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> - - * expand_path.c: Don't #include <pwd.h>, since cvs.h already does, - and not all systems' <pwd.h>s are protected from multiple inclusion. - * login.c: Likewise. - -Wed Oct 11 15:23:24 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * login.c (login): handle everything correctly now. - -Wed Oct 11 12:02:48 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * rcs.c (RCS_gettag): support RCS keyword Name - -Tue Oct 10 19:11:16 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * options.h.in (CVS_LOGIN): discuss, but leave commented out. - The "cvs login" command is still under construction; however, the - repository was changing so fast that instead of creating a branch - and dealing with the attendant hair, I'm just developing on the - trunk, making sure that everything is surrounded by "#ifdef - CVS_LOGIN ... #endif" so I don't get in anyone's way. - - * login.c: include cvs.h before checking CVS_LOGIN, so it has a - chance to get defined before we ask if it's defined. - (login): oops, use semi not comma in `for' loop init. - - * Makefile.in (SOURCES, OBJECTS): include login.c, login.o. - - * main.c: added protoype for login(). - Added "login" entry to cmds[]. - (usg): added line about "login". - - * login.c: new file. - -Tue Oct 10 18:33:47 1995 Karl Fogel <kfogel@totoro.cyclic.com> - - * Makefile.in (COMMON_OBJECTS): added error.o. - (OBJECTS): took error.o out; it's in COMMON_OBJECTS now. - -Tue Oct 10 12:02:37 1995 Thorsten Lockert <tholo@sigmasoft.com> - - * cvsbug.sh: Cater to lame versions of sh (4.4BSD ash) by using - ${foo-bar} instead of `if....`. - -Tue Oct 10 12:02:37 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * remove.c (remove_fileproc): If noexec, don't remove file. Check - for error when removing file. - -Sun Oct 8 12:32:15 1995 Peter Wemm <peter@haywire.DIALix.COM> - - * run.c: detect/use POSIX/BSD style reliable signals for critical - section masking etc. Helps prevent stray locks on interruption. - -Sat Oct 7 23:26:54 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * admin.c (admin): If group CVS_ADMIN_GROUP exists, allow only - users in that group to use "cvs admin". - * options.h.in: Default CVS_ADMIN_GROUP to "cvsadmin". - -Sat Oct 7 23:05:24 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * add.c, checkout.c, commit.c, cvs.h, filesubr.c, import.c, - lock.c, main.c, modules.c, options.h.in: New variable cvsumask - which is used to set mode of files in repository (regardless of - umask in effect when cvs is run). - -Sat Oct 7 22:40:17 1995 Stephen Bailey <sjbailey@sand.npl.washington.edu> - - * lock.c: Include AFSCVS ifdefs to deal with AFS's lack of - correspondance between userid's from stat and from geteuid. - -Sat Oct 7 22:28:49 1995 Scott Carson <sdc@TracerTech.COM> - - * add.c (add): Pass -ko, not -k -ko, to set keyword expansion options. - - * admin.c (admin): Don't skip first argument when sending to server. - -Fri Oct 6 21:45:03 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * version.c: Version 1.6.1. - -Fri Oct 6 21:31:28 1995 Jeff Johnson <jbj@brewster.jbj.org> - - * cvs.h, admin.c, client.c, commit.c, log.c, modules.c, - parseinfo.c, patch.c, recurse.c, rtag.c, status.c, tag.c: - Prototype when dealing in pointers to functions. - -Fri Oct 6 21:07:22 1995 Mark H. Wilkinson <mhw@minster.york.ac.uk> - - * cvsrc.c (read_cvsrc): fix look up of command names in cvsrc file - to use full name from command table rather than possible nickname - in argv. Fixes errors with things like `cvs di' when cvsrc has - `diff -u5' in it. - -Thu Aug 3 01:03:52 1995 Vince DeMarco <vdemarco@bou.shl.com> - - * parseinfo.c (Parse_Info): Add code to call expand_path function - instead of using built in code. - - * wrapper.c (wrap_add): Add code to call expand_path function to - expand all built in variables. - - * expand_path.c (New file): expand things that look like - environmental variables (only expand local CVS environmental - variables) and user names like ~/. - * cvs.h: Declare expand_path. - - * Makefile.in (SOURCES, OBJECTS): Added expand_path.c, - expand_path.o. - -Fri Oct 6 14:03:09 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * ignore.c (ign_setup): Don't try to look for a file in CVSroot if - client. (The recent tightening of the error checking detects this). - - * commit.c (checkaddfile): Don't try to pass options if it is "". - -Thu Oct 5 18:04:46 1995 Karl Fogel <kfogel@totoro.cyclic.com> - - * sanity.sh: unset CVSREAD, since it causes the script to bomb. - -Thu Oct 5 18:29:17 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * remove.c, add.c, commit.c, cvs.h: Remove CVSEXT_OPT stuff; it - has been broken for ages and the options are already stored in the - Entries file. - -Thu Oct 5 18:20:13 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * commit.c (checkaddfile): New argument options; pass it to RCS. - (commit_fileproc): Pass it. - -Tue Oct 3 09:26:00 1995 Karl Fogel <kfogel@totoro.cyclic.com> - - * version.c: upped to 1.6. - -Mon Oct 2 18:10:35 1995 Larry Jones <larry.jones@sdrc.com> - - * server.c: if HAVE_SYS_BSDTYPES_H, include <sys/bsdtypes.h>. - -Mon Oct 2 10:34:53 1995 Karl Fogel <kfogel@totoro.cyclic.com> - - * version.c: Upped version to 1.5.95. - -Mon Oct 2 15:16:47 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * tag.c, rtag.c: pass "mov" instead of "add" if tag will be moved - (i.e. invoked with -F) - -Sun Oct 1 18:36:34 1995 Karl Fogel <kfogel@totoro.cyclic.com> - - * version.c: upped to 1.5.94. - - * server.c: reverted earlier ISC change (of Sep. 28). - - * version.c: upped to 1.5.93, for Peter Wemm's new SVR4 patch. - -Sun Oct 1 14:51:59 1995 Harlan Stenn <Harlan.Stenn@pfcs.com> - - * main.c: don't #include <pwd.h>; cvs.h does that already. - -Fri Sep 29 15:21:35 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * version.c: upped to 1.5.91 for another pre-1.6 release. - -Fri Sep 29 14:41:14 1995 <bmeier@rzu.unizh.ch> - - * root.c: start rcsid[] with "CVSid". - -Fri Sep 29 13:22:44 1995 Jim Blandy <jimb@totoro.cyclic.com> - - * diff.c (diff): Doc fix. - -Fri Sep 29 14:32:36 1995 Norbert Kiesel <nk@col.sw-ley.de> - - * repos.c (Short_Repository): chop superfluous "/". - - * tag.c (pretag_proc): correct user-visible string. - - * rtag.c (pretag_proc): correct user-visible string. - -Fri Sep 29 13:45:36 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * cvs.h (USE): if __GNUC__ != 2, expand to a dummy var instead of - nothing. - -Thu Sep 28 13:37:05 1995 Larry Jones <larry.jones@sdrc.com> - - * server.c: ifdef ISC, include <sys/bsdtypes.h>. - -Fri Sep 29 07:54:22 1995 Mike Sutton <mws115@llcoolj.dayton.saic.com> - - * filesubr.c (last_component): Don't use ANSI style declaration. - -Wed Sep 27 15:24:00 1995 Del <del@matra.com.au> - - * tag.c, rtag.c: Pass a few extra options to the script - named in taginfo (del/add, and revision number). - - * tag.c: Support a -r option (at long last). Also needs - a -f option to tag the head if there is no matching -r tag. - -Tue Sep 26 11:41:08 1995 Karl Fogel <kfogel@totoro.cyclic.com> - - * version.c: Upped version to 1.5.89 for test release preceding - 1.6. - -Wed Sep 20 15:32:49 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * ignore.c (ign_add_file): Check for errors from fopen and fclose. - -Tue Sep 19 18:02:16 1995 Jim Blandy <jimb@totoro.cyclic.com> - - * Makefile.in (DISTFILES): Remove sanity.el from this list; the - file has been deleted. - -Thu Sep 14 14:17:52 1995 Peter Wemm <peter@haywire.dialix.com> - - * import.c: Recover from being unable to open the user file. - - * update.c (join_file): Print a message in the case where the file - was added. - - * mkmodules.c: Deal with .db as well as .pag/.dir (for use with - BSD 4.4 and real dbm support). - -Mon Sep 11 15:44:13 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * release.c (release): Revise comment regarding why and how we - skip argv[0]. - -Mon Sep 11 10:03:59 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * release.c (release): use return value of pclose to determine - success of update. - -Mon Sep 11 09:56:33 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * release.c (release_delete): Fix comment. - -Sun Sep 10 18:48:35 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * release.c (release): made work with client/server. - Don't ask if <arg> is mentioned in `modules'. - -Fri Sep 8 13:25:55 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * sanity.sh: When committing a removal, send stdout to LOGFILE; - this is no longer a silent operation. - - * sanity.sh: Remove OUTPUT variable; it is unused. - - * client.c: Add comment regarding deleting temp file. - * main.c: Add comment regarding getopt REQUIRE_ORDER. - -Thu Sep 7 20:24:46 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * main.c (main): use getopt_long(), accept "--help" and - "--version". - Don't assume EOF is -1. - -Thu Sep 7 19:18:00 1995 Jim Blandy <jimb@cyclic.com> - - * cvs.h (unlink_file_dir): Add prototype for this. - -Thu Sep 7 14:38:06 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * ALL FILES: add semicolon, as indicated below. - - * cvs.h (USE): don't provide semicolon in the expansion of the USE - macro; we'd rather the callers provided it themselves because that - way etags doesn't get fooled. - -Mon Sep 4 23:30:41 1995 Magnus Hyllander <mhy@os.se> - - * checkout.c: cvs export now takes -k option and does not default - to -kv. - * checkout.c, cvs.h, modules.c: Modules file now takes -e option - for cvs export. - -Mon Sep 4 23:30:41 1995 Kirby Koster <koster@sctc.com> - - * commit.c: When committing a removal, print a message saying what - we are doing. - -Wed Aug 2 10:06:51 1995 Vince DeMarco <vdemarco@bou.shl.com> - - * server.c: fix compiler warnings (on NeXT) (declare functions as - static inline instead of just static) functions: get_buffer_date, - buf_append_char, and buf_append_data - -Mon Sep 4 22:31:28 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * client.c (update_entries), import.c (expand_at_signs): Check for - errors from fread and putc. - -Fri Sep 1 00:03:17 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * sanity.sh: Fix TODO item pathname. - - * sanity.el: Removed. It was out of date, didn't do much, and I - doubt anyone was using it. - - * no_diff.c (No_Difference): Don't change the modes of the files. - -Thu Aug 31 13:14:34 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * version.c: Change version to 1.5.1. - - * client.c (start_rsh_server): Don't pass -d to "cvs server" - invocation via rsh (restore change which was lost when NT stuff - was merged in). - * sanity.sh: Add TODO item suggesting test for bug which this fixes. - -Wed Aug 30 12:36:37 1995 Jim Blandy <jimb@totoro.cyclic.com> - - * sanity.sh (basic1): Make sure first-dir is deleted before - running this set of tests. - - * subr.c: Extract file twiddling functions to a different file, - because we want to use different versions of many of these - routines under Windows NT. - (copy_file, isdir, islink, isfile, isreadable, iswritable, - open_file, make_directory, make_directories, xchmod, - rename_file, link_file, unlink_file, xcmp, tmpnam, - unlink_file_dir, deep_remove_dir): Moved to... - * filesubr.c: ...this file, which is new. - * Makefile.in (SOURCES): Mention filesubr.c. - (COMMON_OBJECTS): Mention filesubr.o. - - * subr.c: Extract process execution guts to a different file, - because we want to replace these routines entirely under - Windows NT. - (VA_START, va_alist, va_dcl): Move this stuff... - (run_add_arg, run_init_prog): and these declarations... - (run_prog, run_argv, run_argc, run_argc_allocated): and these - variables... - (run_setup, run_arg, run_args, run_add_arg, run_init_prog, - run_exec, run_print, Popen): and these functions... - * run.c: To this file, which is new. - * Makefile.in (SOURCES): Mention run.c. - (COMMON_OBJECTS): Mention run.o. - - * status.c (status): Call ign_setup, if client_active. Otherwise, - we don't end up ignoring CVS directories and such. - - * server.c (mkdir_p, dirswitch): Use CVS_MKDIR instead of mkdir. - - * repos.c (Name_Repository): Use the isabsolute function instead of - checking the first character of the path. - * root.c (Name_Root): Same. - - * release.c (release): Use fncmp instead of strcmp to compare - filenames. - - * rcs.c (RCS_parse, RCS_parsercsfile) [LINES_CRLF_TERMINATED]: - Abort, because we have strong reason to believe this code is - wrong. - - * patch.c (patch): Register signal handlers iff the signal name is - #defined. - - * no_diff.c (No_Difference): Don't try to include server_active in - trace message unless SERVER_SUPPORT is #defined. - - * modules.c (do_module): Use CVS_MKDIR instead of mkdir. - - * mkmodules.c (main): Call last_component instead of writing it out. - - * main.c (main): Call last_component instead of writing it out. - Break up the long copyright string into several strings; Microsoft - Visual C++ can't handle a line that long. Feh. - Use fncmp instead of strcmp to compare filenames. - Register signal handlers iff the signal name is #defined. - - * lock.c (readers_exist): Don't check return value of closedir. - Most of the rest of the code doesn't, and some systems don't - provide a return value anyway. - (set_lock): Use CVS_MKDIR instead of mkdir. - - * import.c (import): Use the isabsolute function instead of - checking the first character of the path. - Try to delete the temporary file again after we close it, so it'll - get deleted on systems that don't let you delete files that are - open. - (add_rev): Instead of making a hard link to the working file and - checking in the revision with ci -r, use ci -u and restore the - permission bits. - (comtable): Include lines from SYSTEM_COMMENT_TABLE, if it is - #defined. - (add_rcs_file) [LINES_CRLF_TERMINATED]: Abort, because we have - strong reason to believe this code is wrong. - (import_descend_dir): Use CVS_MKDIR instead of mkdir. - - * history.c (read_hrecs): Open the file with OPEN_BINARY. - - * find_names.c (add_entries_proc, fsortcmp): Add prototypes. - * entries.c (write_ent_proc): Add prototype. - * hash.c (walklist): Add prototype for PROC argument. - (sortlist): Add prototype for COMP argument. - (printnode): Add a prototype, and make it static. - - * cvs.h (wrap_add_file, wrap_add): Add extern decls for these; - they're used in import.c and update.c. - * wrapper.c (wrap_add_file, wrap_add): Remove them from here. - - * cvs.h (RUN_NORMAL, RUN_COMBINED, RUN_REALLY, RUN_STDOUT_APPEND, - RUN_STDERR_APPEND, RUN_SIGNIGNORE, RUN_TTY, run_arg, run_print, - run_setup, run_args, run_exec, Popen, piped_child, close_on_exec, - filter_stream_through_program, waitpid): Move all these - declarations and definitions to the same section. - - * cvs.h (error_set_cleanup): Fix prototype. - - * cvs.h (isabsolute, last_component): New extern decls. - - * cvs.h (link_file): Function is deleted; remove extern decl. - - * cvs.h (DEATH_STATE, DEATH_SUPPORT): Move #definitions of these - above the point where we #include rcs.h, since rcs.h tests them - (or DEATH_SUPPORT, at least). - - * cvs.h (DEVNULL): #define this iff it isn't already #defined. - config.h may want to override it. - - * cvs.h (SERVER_SUPPORT, CLIENT_SUPPORT): Don't #define these - here; let config.h do that. On some systems, we don't have any - server support. - - * cvs.h: Don't #include <io.h> or <direct.h>; we take care of - those in lib/system.h. - - * commit.c (commit): Open logfile with the OPEN_BINARY flag. - (precommit_proc): Use the isabsolute function, instead of - comparing the first character with /. - (remove_file, checkaddfile): Use CVS_MKDIR instead of mkdir. - - * client.c (send_repository): Use larger line buffers. - - * client.c [LINES_CRLF_TERMINATED] (update_entries): If we've just - received a gzipped file, copy it over, converting LF to CRLF, - instead of just renaming it into place. - [LINES_CRLF_TERMINATED] (send_modified): Convert file to LF format - before sending with gzip. - (send_modified): Don't be disturbed if we get fewer than - sb.st_size characters when we read. The read function may be - collapsing CRLF to LF for us. - - * client.c: Add forward declarations for all the cvs command - functions we call. - - * client.c: Add forward static declarations for all the - handle_mumble functions. - - On some systems, RSH converts LF to CRLF; this screws us up. - * client.c (rsh_pid): Declare this iff RSH_NOT_TRANSPARENT is not - #defined. - (get_responses_and_close): Use SHUTDOWN_SERVER if it is #defined. - Only wait for rsh process to exit if RSH_NOT_TRANSPARENT is not - #defined. - (start_rsh_server): Declare and define only if - RSH_NOT_TRANSPARENT is not #defined. Use piped_child, instead of - writing all that out. - (start_server): Only try to call start_rsh_server if - RSH_NOT_TRANSPARENT is not #defined. Use START_SERVER if it is - #defined. Convert file descriptors to stdio file pointers using - the FOPEN_BINARY_WRITE and FOPEN_BINARY_READ strings. - - * client.h (rsh_pid): Don't declare this; it's never used elsewhere. - (supported_request): Add external declaration for this; - it's used in checkout.c. - - Move process-running functions to run.c; we need to totally - replace these on other systems, like Windows NT. - * client.c (close_on_exec, filter_stream_through_program): Moved - to run.c. - * run.c (close_on_exec, filter_stream_through_program): Here they - are. - - * add.c (add_directory): Use CVS_MKDIR instead of straight mkdir. - * checkout.c (checkout, build_dirs_and_chdir): Same. - (checkout_proc): Use fncmp instead of strcmp. - * client.c (call_in_directory): Use CVS_MKDIR instead of straight - mkdir. - - * client.c (handle_checksum): Cast return value of strtol. - -Wed Aug 30 10:35:46 1995 Stefan Monnier <stefan.monnier@epfl.ch> - - * main.c (main): Allow -d to override CVSROOT_ENV. - -Thu Aug 24 18:57:49 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * cvs.h, rcscmds.c (RCS_unlock, RCS_deltag, RCS_lock): Add extra - parameter for whether to direct stderr to DEVNULL. - * checkin.c, tag.c, rtag.c, import.c, commit.c: Pass extra - argument. 1 if stderr had been directed to DEVNULL before - rcscmds.c was in use, 0 if it was RUN_TTY. - - * cvs.h: Add comment regarding attic. - -Tue Aug 22 10:09:29 1995 Alexander Dupuy <dupuy@smarts.com> - - * rcs.c (whitespace): Cast to unsigned char in case char is signed - and value is negative. - -Tue Aug 22 10:09:29 1995 Kirby Koster <koster@sctc.com> - and Jim Kingdon <kingdon@harvey.cyclic.com> - - * update.c (join_file): If vers->vn_user is NULL, just return. - -Tue Aug 22 10:09:29 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * server.c, client.c: Add comments about modes and umasks. - -Mon Aug 21 12:54:14 1995 Rick Sladkey <jrs@world.std.com> - - * update.c (update_filesdone_proc): If pipeout, don't try to - create CVS/Root. - -Mon Aug 21 12:54:14 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * client.c (start_rsh_server): Don't pass -d to "cvs server" - invocation via rsh. - - * server.c (serve_root): Report errors via pending_error_text. - (serve_valid_requests): Check for pending errors. - -Sun Aug 20 00:59:46 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * options.h.in: Document usage of DIFF in update.c - * update.c: Use DIFF -c, not DIFF -u. The small improvement in - diff size is not worth the hassle in terms of everyone having to - make sure that DIFF is GNU diff (IMHO). - -Sat Aug 19 22:05:46 1995 Jim Blandy <jimb@totoro.cyclic.com> - - * recurse.c (start_recursion): Doc fix. - - * server.c (do_cvs_command): Clear error_use_protocol in the - child. - (server): Set error_use_protocol. - -Sun Aug 13 15:33:37 1995 Jim Kingdon <kingdon@harvey.cyclic.com> - - * server.c (do_cvs_command): Don't select on exceptions. - -Fri Aug 4 00:13:47 1995 Jim Meyering (meyering@comco.com) - - * Makefile.in (LDFLAGS): Set to @LDFLAGS@. - (options.h): Depend on ../config.status and options.h.in. - Add rule to build it from dependents. - - * add.c: Include save-cwd.h. - (add_directory): Use save_cwd and restore_cwd instead of - explicit getwd then chdir. - * import.c (import_descend_dir): Likewise. - * modules.c (do_module): Likewise. - - * recurse.c (save_cwd, restore_cwd, free_cwd): Remove functions. - New versions have been broken out into save-cwd.c. - (do_dir_proc): Adapt to handle status code returned by new versions - of save_cwd and restore_cwd -- and one fewer argument to restore_cwd. - (unroll_files_proc): Likewise. - - * wrapper.c (wrap_name_has): Add default: abort () to switch - statement to avoid warning from gcc -Wall. - (wrap_matching_entry): Remove dcl of unused TEMP. - (wrap_tocvs_process_file): Remove dcl of unused ERR. - (wrap_fromcvs_process_file): Likewise. - - * cvs.h: Remove prototype for error. Instead, include error.h. - Also, remove trailing white space. - -Thu Aug 3 10:12:20 1995 Jim Meyering (meyering@comco.com) - - * import.c (import_descend_dir): Don't print probably-bogus CWD - in error messages saying `cannot get working directory'. - -Sun Jul 30 20:52:04 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * parseinfo.c (Parse_Info): Revise comments and indentation. - -Sun Jul 30 15:30:16 1995 Vince DeMarco <vdemarco@bou.shl.com> - - * history.c: put ifdef SERVER_SUPPORT around tracing code incase - the client/server code is not compiled into the program. - -Sat Jul 29 16:59:49 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * subr.c (deep_remove_dir): Use struct dirent, not struct direct. - -Sat Jul 29 18:32:06 1995 Vince DeMarco <vdemarco@bou.shl.com> - - * add.c: Check wrap_name_has. - - * diff.c, checkin.c, import.c: have code call unlink_file_dir in - the appropriate places instead of just calling unlink_file. - - * checkin.c: Remove one unlink call. - - * import.c (comtable): Add .m .psw .pswm. - - * import.c (add_rcs_file): Remove tocvsPath before returning. - - * subr.c (unlink_file_dir): Add new function. unlinks the file if - it is a file. or will do a recursive delete if the path is - actually a directory. - (deep_remove_dir): New function, helps unlink_file_dir. - - * mkmodules.c: Added CVSROOTADM_WRAPPER (cvswrappers file) to the - checkout file list. - -Fri Jul 28 16:27:56 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * checkout.c (safe_location): Use PATH_MAX not MAXPATHLEN. - -Fri Jul 28 19:37:03 1995 Paul Eggert <eggert@twinsun.com> - - * log.c (cvslog, log_fileproc): Pass all options (except -l) - to rlog as-is, so that users can put spaces in options, - can specify multiple -d options, etc. - (ac, av): New variables. - (log_option_with_arg, options): Remove. - - (log_fileproc): Don't prepend `/' to file name if update_dir is empty. - -Tue Jul 25 00:52:26 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * checkout.c (safe_location): Don't use PROTO in function definition. - -Mon Jul 24 18:32:06 1995 Vince DeMarco <vdemarco@bou.shl.com> - - * checkout.c (safe_location): fix a compiler warning. (Declare - safe_location). Changed code in safe_location to call getwd - instead of getcwd. getwd is declared in the ../lib directory and - used exclusively thoughout the code. (this helps portability on - non POSIX systems). - - * wrapper.c: updated Andrew Athan's email address. - - * main.c: fix an ifdef so the code will compile. syntax error in - the ifdef for CVS_NOADMIN. - -Mon Jul 24 13:25:00 1995 Del <del@babel.dialix.oz.au> - - * checkout.c: New procedure safe_location. - Ensures that you don't check out into the repository - itself. - - * tag.c, rtag.c, cvs.h, mkmodules.c: Added a "taginfo" file in - CVSROOT to perform pre-tag checks. - - * main.c, options.h.in: Added a compile time option to - disable the admin command. - -Fri Jul 21 17:07:42 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * update.c, status.c, patch.c, checkout.c, import.c, release.c, - rtag.c, tag.c: Now -q and -Q options just print an error message - telling you to use global -q and -Q options. The non-global - options were a mess because some commands accepted them and some - did not, and they were redundant with -q and -Q global options. - - * rcs.c, cvs.h, commit.c, log.c, find_names.c: Remove CVS.dea - stuff. It is slower than the alternatives and I don't think - anyone ever actually used it. - -Fri Jul 21 10:35:10 1995 Vince DeMarco <vdemarco@bou.shl.com> - - * Makefile.in (SOURCES, OBJECTS): Add wrapper.c, wrapper.o. - * add.c, admin.c, checkout.c, commit.c, diff.c, import.c, log.c, - remove.c, status.c: Call wrap_setup at start of commands. - * add.c (add): Check for wrapper, as well as directory, in repository. - * checkin.c: Add tocvsPath variable and associated handling. - * cvs.h: Add wrapper declarations. - * diff.c: Add tocvsPath variable and associated handling. - * import.c: Add -W option, CVSDOTWRAPPER handling. - (import_descend): check wrap_name_has. - (update_rcs_file, add_rev, add_rcs_file): add tocvsPath - variable and associated handling. - * no_diff.c: Add tocvsPath variable and associated handling. - * recurse.c (start_recursion): Check wrap_name_has. - * update.c: Copy, don't merge, copy-by-merge files. Attempt to - use -j on a copy-by-merge file generates a warning and no further - action. - * update.c: Add CVSDOTWRAPPER handling. - * wrapper.c: Added. - -Fri Jul 21 00:20:52 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * client.c: Revert David Lamkin patch, except for the bits about - removing temp_filename and the .rej file. - * sanity.sh (errmsg1): Test for the underlying bug which Lamkin - kludged around. - * client.c (call_in_directory): Set short_pathname to include the - filename, not just the directory. Improve comments regarding what - is passed to FUNC. - -Thu Jul 20 17:51:54 1995 David Lamkin <drl@net-tel.co.uk> - - * client.c (short_pathname): Fixes the fetching of the whole file - after a patch to bring it up to date has failed: - - failed_patches[] now holds short path to file that failed - - patch temp files are unlinked where the patch is done - -Thu Jul 20 12:37:10 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * cvs.h: Declare error_set_cleanup - * main.c: Call it. - (error_cleanup): New function. - -Thu Jul 20 12:17:16 1995 Mark H. Wilkinson <mhw@minster.york.ac.uk> - - * add.c, admin.c, checkin.c, checkout.c, classify.c, client.c, - client.h, commit.c, create_adm.c, cvs.h, diff.c, entries.c, - history.c, import.c, log.c, main.c, modules.c, no_diff.c, patch.c, - release.c, remove.c, repos.c, rtag.c, server.c, server.h, - status.c, subr.c, tag.c, update.c, vers_ts.c, version.c: Put - client code inside #ifdef CLIENT_SUPPORT, server code inside - #ifdef SERVER_SUPPORT. When reporting version, report whether - client and/or server are compiled in. - -Wed Jul 19 18:00:00 1995 Jim Blandy <jimb@cyclic.com> - - * subr.c (copy_file): Declare local var n to be an int, - not a size_t. size_t is unsigned, and the return values - of read and write are definitely not unsigned. - - * cvs.h [HAVE_IO_H]: #include <io.h>. - [HAVE_DIRECT_H]: #include <direct.h>. - -Fri Jul 14 22:28:46 1995 Jim Blandy <jimb@totoro.cyclic.com> - - * server.c (dirswitch, serve_static_directory, serve_sticky, - serve_lost, server_write_entries, serve_checkin_prog, - serve_update_prog): Include more information in error messages. - (Thanks, DJM.) - - * cvsbug.sh: Use /usr/sbin/sendmail, unless it doesn't - exist, in which case use /usr/lib/sendmail. (Thanks, DJM.) - - * server.c (server, server_cleanup): Use "/tmp" instead of - "/usr/tmp" when the TMPDIR environment variable isn't set. This - is what the rest of the code uses. - -Thu Jul 13 11:03:17 1995 Jim Meyering (meyering@comco.com) - - * recurse.c (free_cwd): New function. - (save_cwd, restore_cwd): Use it instead of simply freeing any - string. The function also closes any open file descriptor. - - * import.c (comtable): Now static. - (comtable): Put braces around each element of initializer. - - * cvs.h: Add prototype for xgetwd. - * recurse.c (save_cwd, restore_cwd): New functions to encapsulate - run-time solution to secure-SunOS vs. fchown problem. - (do_dir_proc, unroll_files_proc): Use new functions instead of - open-coded fchdir/chdir calls with cpp directives. - - * sanity.sh: Change out of TESTDIR before removing it. - Some versions of rm fail when asked to delete the current directory. - -Wed Jul 12 22:35:04 1995 Jim Meyering (meyering@comco.com) - - * client.c (get_short_pathname): Add const qualifier to parameter dcl. - (copy_a_file): Remove set-but-not-used variable, LEN. - (handle_clear_static_directory): Likewise: SHORT_PATHNAME. - (set_sticky): Likewise: LEN. - (handle_set_sticky): Likewise: SHORT_PATHNAME. - (handle_clear_sticky): Likewise: SHORT_PATHNAME. - (start_rsh_server): Convert perl-style `cond || stmt' to more - conventional C-style `if (cond) stmt.' Sheesh. - Remove dcl of unused file-static, SEND_CONTENTS. - - * history.c: Remove dcls of set-but-not-used file-statics, - HISTSIZE, HISTDATA. - (read_hrecs): Don't set them. - - * import.c (add_rev): Remove dcl of set-but-not-used local, RETCODE. - - * repos.c (Name_Repository): Remove dcl of set-but-not-used local, - HAS_CVSADM. - - * cvsrc.c (read_cvsrc): Parenthesize assignment used as truth value. - -Tue Jul 11 16:49:41 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * hash.h (struct entnode, Entnode): moved from here... - * cvs.h: to here. - -Wed Jul 12 19:45:24 1995 Dominik Westner (dominik@gowest.ppp.informatik.uni-muenchen.de) - - * client.c (server_user): new var. - (parse_cvsroot): set above if repo is "user@host:/dir". - (start_rsh_server): if server_user set, then use it. - -Wed Jul 12 10:53:36 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * sanity.sh: remove the TESTDIR after done. - - * cvsbug.sh (GNATS_ADDR): now bug-cvs@prep.ai.mit.edu again. - -Tue Jul 11 15:53:08 1995 Greg A. Woods <woods@most.weird.com> - - * options.h.in: depend on configure for grep and diff, now that - changes to configure.in are applied. - -Tue Jul 11 14:32:14 1995 Michael Shields <shields@tembel.org> - - * Makefile.in (LDFLAGS): Pick up from configure. - -Tue Jul 11 14:20:00 1995 Loren James Rittle <rittle@supra.comm.mot.com> - - * import.c (add_rev), commit.c (remove_file, ci_new_rev), - checkin.c (Checkin), subr.c (make_message_rcslegal), cvs.h: - Always perform sanity check and fix-up on messages to be passed - directly to RCS via the '-m' switch. RCS 5.7 requires that a - non-total-whitespace, non-null message be provided or it will - abort with an error. CVS is not setup to handle any returned - error from 'ci' gracefully and, thus, the repository entered a - trashed state. - - * sanity.sh: Add regression tests for new code and interactions - with RCS 5.7. - -Sun Jul 9 19:03:00 1995 Greg A. Woods <woods@most.weird.com> - - * .cvsignore: added new backup file - - * options.h.in: our new configure.in finds the right diff and - grep paths now.... - - * subr.c: quote the string in run_print() for visibility - - indent a comment - - Jun Hamano's xchmod() patch to prevent writable files - (from previous local changes) - - * logmsg.c: fix a NULL pointer de-reference - - clean up some string handling code... - (from previous local changes) - - * parseinfo.c: add hack to expand $CVSROOT in an *info file. - - document "ALL" and "DEFAULT" in opening comment for Parse_Info() - - fix the code to match the comments w.r.t. callbacks for "ALL" - - add a line of trace output... - (from previous local changes) - - * mkmodules.c: add support for comments in CVSROOT/checkoutlist - - add CVSroot used by something other .o, ala main.c - (from previous local changes) - - * main.c, cvs.h: add support for $VISUAL as log msg editor - (from previous local changes) - - * status.c: add support for -q and -Q (from previous local changes) - - -Sun Jul 9 18:44:32 1995 Karl Fogel <kfogel@floss.cyclic.com> - - * log.c: trivial change to test ChangeLog stuff. - -Sat Jul 8 20:33:57 1995 Paul Eggert <eggert@twinsun.com> - - * history.c: (history_write): Don't assume that fopen(..., "a") - lets one interleave writes to the history file from different processes - without interlocking. Use open's O_APPEND option instead. - Throw in an lseek to lessen the race bugs on non-Posix hosts. - * cvs.h, subr.c (Fopen): Remove. - - * log.c (log_fileproc): Pass working file name to rlog, so that - the name is reported correctly. - -Fri Jul 7 18:29:37 1995 Michael Hohmuth <hohmuth@inf.tu-dresden.de> - - * client.c, client.h (client_import_setup): New function. - (client_import_done, client_process_import_file): Add comments - regarding now-redundant code. - * import.c (import): Call client_import_setup. - -Tue Jul 4 09:21:26 1995 Bernd Leibing <bernd.leibing@rz.uni-ulm.de> - - * rcs.c (RCS_parsercsfile_i): Rename error to l_error; SunOS4 /bin/cc - doesn't like a label and function with the same name. - -Sun Jul 2 12:51:33 1995 Fred Appelman <Fred.Appelman@cv.ruu.nl> - - * logmsg.c: Rename strlist to str_list to avoid conflict with - Unixware 2.01. - -Thu Jun 29 17:37:22 1995 Paul Eggert <eggert@twinsun.com> - - * rcs.c (RCS_check_kflag): Allow RCS 5.7's new -kb option. - -Wed Jun 28 09:53:14 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * Makefile.in (HEADERS): Remove options.h.in. - (DISTFILES): Add options.h.in. - Depend on options.h in addition to HEADERS. - -Tue Jun 27 22:37:28 1995 Vince Demarco <vdemarco@bou.shl.com> - - * subr.c: Don't try to do fancy waitstatus stuff for NeXT, - lib/wait.h is sufficient. - -Mon Jun 26 15:17:45 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * Makefile.in (DISTFILES): Remove RCS-patches and convert.sh. - -Fri Jun 23 13:38:28 1995 J.T. Conklin (jtc@rtl.cygnus.com) - - * server.c (dirswitch, serve_co): Use CVSADM macro instead of - literal "CVS". - -Fri Jun 23 00:00:51 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * README-rm-add: Do not talk about patching RCS, that only - confuses people. - * RCS-patches, convert.sh: Removed (likewise). - -Thu Jun 22 10:41:41 1995 James Kingdon <kingdon@harvey.cyclic.com> - - * subr.c: Change -1 to (size_t)-1 when comparing against a size_t. - -Wed Jun 21 16:51:54 1995 nk@ipgate.col.sw-ley.de (Norbert Kiesel) - - * create_adm.c, entries.c, modules.c: Avoid coredumps if - timestamps, tags, etc., are NULL. - -Tue Jun 20 15:52:53 1995 Jim Meyering (meyering@comco.com) - - * checkout.c (checkout): Remove dcl of unused variable. - * client.c (call_in_directory, handle_clear_static_directory, - handle_set_sticky, handle_clear_sticky, send_a_repository, - send_modified, send_dirent_proc): Remove dcls of unused variables. - * server.c (receive_file, serve_modified, server_cleanup): - Remove dcls of unused variables. - * subr.c (copy_file): Remove dcl of unused variable. - * vers_ts.c (time_stamp_server): Remove dcl of unused variable. - -Mon Jun 19 13:49:35 1995 Jim Blandy <jimb@totoro.cyclic.com> - - * sanity.sh: Fix commencement message --- the test suite says - "Ok." when it's done. - -Fri Jun 16 11:23:44 1995 Jim Meyering (meyering@comco.com) - - * entries.c (fgetentent): Parenthesize assignment in if-conditional. - -Thu Jun 15 17:33:28 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * server.c (get_buffer_data, buf_append_char, buf_append_data): - Don't conditionalize use of "inline". Autoconf takes care of - defining it away on systems that don't grok it. - -Thu Jun 15 13:43:38 1995 Jim Kingdon (kingdon@cyclic.com) - - * options.h.in (DIFF): Default to "diff" not "diff -a" since diff - might not support the -a option. - -Wed Jun 14 11:29:42 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * import.c (import_descend): Initialize dirlist to NULL. - - * subr.c (copy_file): Fix infinite loop. - - * server.c (serve_directory): fix a memory leak. - - * checkout.c, commit.c, diff.c, history.c, import.c, log.c, - patch.c, release.c, remove.c, rtag.c, status.c, tag.c, update.c: - Use send_arg() to send command line arguments to server. - - * commit.c (fsortcmp), find_names (fsortcmp), hash.c (hashp, - findnode), hash.h (findnode), rcs.c (RCS_addnode, - RCS_check_kflag, RCS_check_tag, RCS_isdead, RCS_parse, - RCS_parsercsfile_i), rcs.h (RCS_addnode, RCS_check_kflag, - RCS_check_tag, RCS_parse): Added const qualifiers as - appropriate. - * rcs.h (RCS_isdead): Added prototype. - - * hash.h (walklist, sortlist): correct function prototypes. - - * ignore.c (ign_setup): don't bother checking to see if file - exists before calling ign_add_file. - -Fri Jun 9 11:24:06 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * all source files (rcsid): Added const qualifer. - * ignore.c (ign_default): Added const qualifier. - * subr.c (numdots): Added const qualifier to function argument. - * cvs.h (numdots): Added const qualifier to prototype argument. - - * client.c (change_mode): Tied consecutive if statements testing - the same variable together with else if. - - * import.c (import_descend): Build list of subdirectories when - reading directory, and then process the subdirectories in that - list. This change avoids I/O overhead of rereading directory - and reloading ignore list (.cvsignore) for each subdirectory. - -Thu Jun 8 11:54:24 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * import.c (import_descend): Use 4.4BSD d_type field if it is - present. - - * lock.c (set_lockers_name): Use %lu in format and cast st_uid - field to unsigned long. - - * import.c (import): Use RCS_check_kflag() to check -k options. - (keyword_usage, str2expmode, strn2expmode, expand_names): - Removed. - * rcs.c (RCS_check_kflag): Added keyword_usage array from import.c - for more descriptive error messages. - - * subr.c (run_setup, run_args): Changed variable argument - processing to work on machines that use <varargs.h>. - - * subr.c (copy_file, xcmp): Changed to read the file(s) by blocks - rather than by reading the whole file into a huge buffer. The - claim that this was reasonable because source files tend to be - small does not hold up in real world situations. CVS is used - to manage non-source files, and mallocs of 400K+ buffers (x2 - for xcmp) can easily fail due to lack of available memory or - even memory pool fragmentation. - (block_read): New function, taken from GNU cmp and slightly - modified. - - * subr.c (xcmp): Added const qualifier to function arguments. - * cvs.h (xcmp): Added const qualifer to prototype arguments. - -Wed Jun 7 11:28:31 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * cvs.h (Popen): Added prototype. - (Fopen, open_file, isreadable, iswritable, isdir, isfile, - islink, make_directory, make_directories, rename_file, - link_file, unlink_file, copy_file): Added const qualifer to - prototype arguments. - * subr.c (Fopen, Popen, open_file, isreadable, iswritable, isdir, - isfile, islink, make_directory, make_directories, rename_file, - link_file, unlink_file, copy_file): Added const qualifier to - function arguments. - - * logmsg.c (logfile_write), recurse.c (do_recursion, addfile): - Don't cast void functions to a void expression. There is at - least one compiler (MPW) that balks at this. - - * rcs.c (keysize, valsize): Change type to size_t. - - * add.c (add_directory): Don't cast umask() argument to int. - - * import.c (add_rcs_file): Changed type of mode to mode_t. - - * rcscmds.c (RCS_merge): New function. - * cvs.h (RCS_merge): Declare. - * update.c (merge_file, join_file): Call RCS_merge instead of - invoking rcsmerge directly. - - * cvs.h: Include <stdlib.h> if HAVE_STDC_HEADERS, otherwise - declared getenv(). - * cvsrc.c, ignore.c, main.c: Removed getenv() declaration. - - * client.c (mode_to_string): Changed to take mode_t instead of - struct statb argument. Simplified implementation, no longer - overallocates storage for returned mode string. - * client.h (mode_to_string): Updated declaration. - * server.c (server_updated): Updated for new calling conventions, - pass st_mode instead of pointer to struct statb. - - * cvs.h (CONST): Removed definition, use of const qualifier is - determined by autoconf. - * history.c, modules.c, parseinfo.c: Use const instead of CONST. - - * add.c, admin.c, checkout.c, commit.c, diff.c, import.c, log.c, - main.c, mkmodules.c, patch.c, recurse.c, remove.c, rtag.c, - server.c, status.c, subr.c, tag.c, update.c: Changed function - arguments "char *argv[]" to "char **argv" to silence lint - warnings about performing arithmetic on arrays. - -Tue Jun 6 18:57:21 1995 Jim Blandy <jimb@totoro.cyclic.com> - - * version.c: Fix up version string, to say that this is Cyclic - CVS. - -Tue Jun 6 15:26:16 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * subr.c (run_setup, run_args, run_add_arg, xstrdup): Add const - qualifier to format argument. - * cvs.h (run_setup, run_args, xstrdup): Likewise. - - * Makefile.in (SOURCES): Added rcscmds.c. - (OBJECTS): Added rcscmds.o. - - * rcscmds.c: New file, with new functions RCS_settag, RCS_deltag, - RCS_setbranch, RCS_lock, RCS_unlock. - * checkin.c, commit.c, import.c, rtag.c, tag.c: Call above - functions instead of exec'ing rcs commands. - * cvs.h: Declare new functions. - -Mon May 29 21:40:54 1995 J.T. Conklin (jtc@rtl.cygnus.com) - - * recurse.c (start_recursion, do_recursion): Set entries to NULL - after calling Entries_Close(). - -Sat May 27 08:08:18 1995 Jim Meyering (meyering@comco.com) - - * Makefile.in (check): Export RCSBIN only if there exists an - `rcs' executable in ../../rcs/src. Before, tests would fail when - the directory existed but contained no executables. - (distclean): Remove options.h, now that it's generated. - (Makefile): Regenerate only *this* file when Makefile.in is - out of date. Depend on ../config.status. - -Fri May 26 14:34:28 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * entries.c (Entries_Open): Added missing fclose(). - (Entries_Close): Don't write Entries unless Entries.Log exists. - - * entries.c (Entries_Open): Renamed from ParseEntries; changed to - process Entries Log files left over from previous crashes or - aborted runs. - (Entries_Close): New function, write out Entries file if - neccessary and erase Log file. - (Register): Append changed records to Log file instead of - re-writing file. - (fgetentent): New function, parse one Entry record from a file. - (AddEntryNode): It's no longer an error for two records with the - same name to be added to the list. New records replace older - ones. - * cvs.h (Entries_Open, Entries_Close): Add prototypes. - (CVSADM_ENTLOG): New constant, name of Entries Log file. - * add.c, checkout.c, client.c, find_names.c, recurse.c: Use - Entries_Open()/Entries_Close() instead of ParseEntries()/dellist(). - - * add.c, admin.c, checkout.c, client.c, commit.c, diff.c, - history.c, import.c, log.c, patch.c, release.c, remove.c, - rtag.c, server.c, status.c, tag.c, update.c: Changed - conditionals so that return value of *printf is tested less than - 0 instead of equal to EOF. - -Thu May 25 08:30:12 1995 Jim Kingdon (kingdon@lioth.cygnus.com) - - * subr.c (xmalloc): Never try to malloc zero bytes; if the user - asks for zero bytes, malloc one instead. - -Wed May 24 12:44:25 1995 Ken Raeburn <raeburn@cujo.cygnus.com> - - * subr.c (xmalloc): Don't complain about NULL if zero bytes were - requested. - -Tue May 16 21:49:05 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * subr.c (xmalloc): Never try to malloc zero bytes; if the user - asks for zero bytes, malloc one instead. - -Mon May 15 14:35:11 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * lock.c (L_LOCK_OWNED): Removed. - - * add.c, checkout.c, client.c, create_adm.c, cvs.h, entries.c, - find_names.c modules.c, recurse.c, release.c, repos.c, update.c: - removed CVS 1.2 compatibility/upgrade code. - -Mon May 8 11:25:07 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * lock.c (write_lock): Missed one instance where rmdir(tmp) should - have been changed to clear_lock(). - -Wed May 3 11:08:32 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * create_adm.c, entries.c, import.c, root.c: Changed conditionals - so that return value of *printf is tested less than 0 instead of - equal to EOF --- That's all Standard C requires. - -Wed May 3 18:03:37 1995 Samuel Tardieu <tardieu@emma.enst.fr> - - * rcs.h: removed #ifdef CVS_PRIVATE and #endif because cvs didn't - compile anymore. - -Mon May 1 13:58:53 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * rcs.c, rcs.h: Implemented lazy parsing of rcs files. - RCS_parsercsfile_i modified to read only the first two records - of rcs files, a new function RCS_reparsercsfile is called only - when additional information (tags, revision numbers, dates, - etc.) is required. - -Mon May 1 12:20:02 1995 Jim Kingdon (kingdon@lioth.cygnus.com) - - * Makefile.in (INCLUDES): Include -I. for options.h. - -Fri Apr 28 16:16:33 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * Makefile.in (SOURCES, HEADERS, DISTFILES): Updated. - (dist-dir): Renamed from dist; changed to work with DISTDIR - variable passed from parent. - - We don't want to include a file the user has to edit in the - distribution. - * options.h: No longer distributed. - * options.h.in: Distribute this instead. - * ../INSTALL, ../README: Installation instructions updated. - - * client.c (start_rsh_server): Send the remote command to rsh as a - single string. - -Fri Apr 28 00:29:49 1995 Noel Cragg <noel@vo.com> - - * commit.c: Added initializer for FORCE_CI - - * sanity.sh: Fix tests added 25 Apr -- they were expecting the - server to make noise, but the CVS_SERVER variable had been - accidentally set with the `-Q' flag. Ran all tests -- both - locally and remotely -- to verify that the change didn't break - anything. - -Thu Apr 27 12:41:52 1995 Jim Kingdon (kingdon@lioth.cygnus.com) - - * Makefile.in: Revise comment regarding check vs. remotecheck. - -Thu Apr 27 12:52:28 1995 Bryan O'Sullivan <bos@cyclic.com> - - * client.c (start_rsh_server): If the CVS_RSH environment variable - is set, use its contents as the name of the program to invoke - instead of `rsh'. - -Thu Apr 27 12:18:38 1995 Noel Cragg <noel@vo.com> - - * checkout.c (checkout): To fix new bug created by Apr 23 change, - re-enabled "expand-module" functionality, because it has the side - effect of setting the checkin/update programs for a directory. To - solve the local/remote checkout problem that prompted this change - in the first place, I performed the next change. - * server.c (expand_proc): Now returns expansions for aliases only. - -Wed Apr 26 12:07:42 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * rcs.c (getrcskey): Rewritten to process runs of whitespace chars - and rcs @ strings instead of using state variables "white" and - "funky". - -Fri Apr 7 15:49:25 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * lock.c (unlock): Only call stat if we need to. - -Wed Apr 26 10:48:44 1995 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c (new_entries_line): Don't prototype. - -Tue Apr 25 22:19:16 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * sanity.sh: Add new tests to catch bugs in Apr 23 change. - -Tue Apr 25 17:10:55 1995 Roland McGrath <roland@baalperazim.frob.com> - - * create_adm.c (Create_Admin): Use getwd instead of getcwd. - -Sun Apr 23 20:58:32 1995 Noel Cragg <noel@vo.com> - - * checkout.c (checkout): Disabled "expand-module" functionality on - remote checkout, since it makes modules behave like aliases (see - longer note there). This change necessitated the change below. - Also merged the like parts of a conditional. - - * client.c (call_in_directory): Changed the algorithm that created - nested and directories and the "CVS" administration directories - therein. The algoithm wrongly assumed that the name of the - directory that that was to be created and the repository name were - the same, which breaks modules. - - * create_adm.c (Create_Admin), module.c (do_module), server.c - (server_register), subr.c, entries.c: Added fprintfs for trace-mode - debugging. - - * client.c (client_send_expansions): Argument to function didn't - have a type -- added one. - - * server.c (new_entries_line): Arguments to this function are - never used -- reoved them and fixed callers. - -Sat Apr 22 11:17:20 1995 Jim Kingdon (kingdon@lioth.cygnus.com) - - * rcs.c (RCS_parse): If we can't open the file, give an error - message (except for ENOENT in case callers rely on that). - -Wed Apr 19 08:52:37 1995 Jim Kingdon (kingdon@lioth.cygnus.com) - - * client.c (send_repository): Check for CVSADM_ENTSTAT in `dir', not - in `.'. - - * sanity.sh: Add TODO list. Revise some comments. Add tests of - one working directory adding a file and other updating it. - -Sat Apr 8 14:52:55 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * Makefile.in (CFLAGS): Let configure set the default for CFLAGS. - Under GCC, we want -g -O. - -Fri Apr 7 15:49:25 1995 J.T. Conklin <jtc@rtl.cygnus.com> - - * root.c (Name_Root): merge identical adjacent conditionals. - - * create_admin.c (Create_Admin): Rearranged check for CVSADM and - OCVSADM directories so that CVSADM pathname is only built once. - - * update.c (update_dirleave_proc): Removed code to remove CVS - administration directory if command_name == "export" and to - create CVS/Root file if it is not present. Identical code - in update_filesdone_proc() will perform these same actions. - Also removed code that read and verfied CVS/Root. This is - expensive, and if it is necessary should happen in the - general recursion processor rather than in the update - callbacks. - - * lock.c (masterlock): New variable, pathname of master lockdir. - (set_lock): removed lockdir argument, now constructs it itself - and stores it in masterlock. - (clear_lock): new function, removes master lockdir. - (Reader_Lock, write_lock): call clear_lock instead of removing - master lockdir. - (Reader_Lock, write_lock): #ifdef'd out CVSTFL code. - - * main.c (main): register Lock_Cleanup signal handler. - * lock.c (Reader_Lock, write_lock): no longer register - Lock_Cleanup. - - * main.c (main): initialize new array hostname. - * lock.c (Reader_Lock, write_lock): Use global hostname array. - * logmsg.c (logfile_write): Likewise. - - * recurse.c (do_dir_proc, unroll_files_proc): Use open()/fchdir() - instead of getwd()/chdir() on systems that support the fchdir() - system call. - -Fri Apr 7 06:57:20 1995 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c: Include the word "server" in error message for memory - exhausted, so the user knows which machine ran out of memory. - - * sanity.sh: For remote, set CVS_SERVER to test the right server, - rather than a random one from the PATH. - - * commit.c [DEATH_STATE]: Pass -f to `ci'. - -Thu Apr 6 13:05:15 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * commit.c (checkaddfile): If we didn't manage to fopen the file, - don't try to fclose it. - - * client.c (handle_m, handle_e): Use fwrite, rather than a loop of - putc's. Sometimes these streams are unbuffered. - -Tue Apr 4 11:33:56 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * (DISTFILES): Include cvsbug.sh, ChangeLog, NOTES, RCS-patches, - README-rm-add, ChangeLog.fsf, sanity.sh, sanity.el, and - .cvsignore. - -Mon Mar 27 08:58:42 1995 Jim Kingdon (kingdon@lioth.cygnus.com) - - * rcs.c (RCS_parsercsfile_i): Accept `dead' state regardless of - DEATH_STATE define. Revise comments regarding DEATH_STATE versus - CVSDEA versus the scheme which uses a patched RCS. - * README-rm-add, RCS-patches: Explain what versions of CVS need - RCS patches. - -Sat Mar 25 18:51:39 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> - - * server.c (server_cleanup): Only do the abysmal kludge of waiting - for command and draining the pipe #ifdef sun. The code makes - assumptions not valid on all systems, and is only there to - workaround a SunOS bug. - -Wed Mar 22 21:55:56 1995 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c (mkdir_p): Call stat only if we get the EACCES. Faster - and more elegant. - -Tue Jan 31 20:59:19 1995 Ken Raeburn <raeburn@cujo.cygnus.com> - - * server.c: Try to avoid starting the "rm -rf" at cleanup time - until after subprocesses have finished. - (command_fds_to_drain, max_command_fd): New variables. - (do_cvs_command): Set them. - (command_pid_is_dead): New variable. - (wait_sig): New function. - (server_cleanup): If command_pid is nonzero, wait for it to die, - draining output from it in the meantime. If nonzero SIG was - passed, send a signal to the subprocess, to encourage it to die - soon. - - * main.c (usage): Argument is now `const char *const *'. - * cvs.h (usage): Changed prototype. - (USE): Make new variable `const'. - * add.c (add_usage), admin.c (admin_usage), checkout.c - (checkout_usage, export_usage, checkout), commit.c (commit_usage), - diff.c (diff_usage), history.c (history_usg), import.c - (import_usage, keyword_usage), log.c (log_usage), main.c (usg), - patch.c (patch_usage), release.c (release_usage), remove.c - (remove_usage), rtag.c (rtag_usage), server.c (server), status.c - (status_usage), tag.c (tag_usage), update.c (update_usage): Usage - messages are now const arrays of pointers to const char. - - * import.c (comtable): Now const. - * main.c (rcsid): Now static. - (cmd): Now const. - (main): Local variable CM now points to const. - * server.c (outbuf_memory_error): Local var MSG now const. - - * client.c (client_commit_usage): Deleted. - -Sat Dec 31 15:51:55 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * logmsg.c (do_editor): Allocate enough space for trailing '\0'. - -Fri Mar 3 11:59:49 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * cvsbug.sh: Call it "Cyclic CVS" now, not "Remote CVS". Call it - version C1.4A, not 1.4A2-remote. Send bugs to cyclic-cvs, not - remote-cvs. - - * classify.c (Classify_File): Put check for dead file inside - "#ifdef DEATH_SUPPORT". - -Thu Feb 23 23:03:43 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * update.c (join_file): Don't pass the -E option to rcsmerge here, - either (see Jan 22 change). - -Mon Feb 13 13:28:46 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * cvsbug.sh: Send bug reports to remote-cvs@cyclic.com, rather - than to the ordinary CVS bug address. This does mean we'll have - to wade through GNATS-style bug reports, sigh. - -Wed Feb 8 06:42:27 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> - - * server.c: Don't include <sys/stat.h>; system.h already does, and - 4.3BSD can't take it twice. - - * subr.c [! HAVE_VPRINTF] (run_setup, run_args): Don't use va_dcl - in declaration. Declare the a1..a8 args which are used in the - sprintf call. - * cvs.h [! HAVE_VPRINTF] (run_setup, run_args): Don't prototype - args, to avoid conflicting with the function definitions - themselves. - -Tue Feb 7 20:10:00 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * client.c (update_entries): Pass the patch subprocess the switch - "-b ~", not "-b~"; the latter form seems not to work with patch - version 2.0 and earlier --- it takes the next argv element as the - backup suffix, and thus doesn't notice that the patch file's name - has been specified, thus doesn't find the patch, thus... *aargh* - -Fri Feb 3 20:28:21 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * log.c (log_option_with_arg): New function. - (cvslog): Use it and send_arg to handle the rlog options that take - arguments. The code used to use send_option_string for - everything, which assumes that "-d1995/01/02" is equivalent to - "-d -1 -9 -9 -5 ...". - -Tue Jan 31 15:02:01 1995 Jim Blandy <jimb@floss.life.uiuc.edu> - - * server.c: #include <sys/stat.h> for the new stat call in mkdir_p. - (mkdir_p): Don't try to create the intermediate directory if it - exists already. Some systems return EEXIST, but others return - EACCES, which we can't otherwise distinguish from a real access - problem. - -Sun Jan 22 15:25:45 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> - - * update.c (merge_file): My rcsmerge doesn't accept a -E option, - and it doesn't look too important, so don't pass it. - -Fri Jan 20 14:24:58 1995 Ian Lance Taylor <ian@sanguine.cygnus.com> - - * client.c (do_deferred_progs): Don't try to chdir to toplevel_wd - if it has not been set. - (process_prune_candidates): Likewise. - -Mon Nov 28 09:59:14 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * client.c (client_commit): Move guts of function from here... - * commit.c (commit): ...to here. - -Mon Nov 28 15:14:36 1994 Ken Raeburn <raeburn@cujo.cygnus.com> - - * server.c (buf_input_data, buf_send_output): Start cpp directives - in column 1, otherwise Sun 4 pcc complains. - -Mon Nov 28 09:59:14 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * client.c (add_prune_candidate): Don't try to prune ".". - -Tue Nov 22 05:27:10 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c, client.c: More formatting cleanups. - - * client.h, client.c: New variable client_prune_dirs. - * update.c (update), checkout.c (checkout): Set it. - * client.c (add_prune_candidate, process_prune_candidates): New - functions. - (send_repository, call_in_directory, get_responses_and_close): - Call them. - -Wed Nov 23 01:17:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * server.c (do_cvs_command): Don't select on STDOUT_FILENO unless - we have something to write. - -Tue Nov 22 05:27:10 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * remove.c (remove_fileproc): Only call server_checked_in if we - actually are changing the entries file. - - * server.c (server_write_entries): New function. - (dirswitch, do_cvs_command): Call it. - (serve_entry, serve_updated): Just update in-memory data - structures, don't mess with CVS/Entries file. - -Mon Nov 21 10:15:11 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c (server_checked_in): Set scratched_file to NULL after - using it. - - * checkin.c (Checkin): If the file was changed by the checkin, - call server_updated not server_checked_in. - -Sun Nov 20 08:01:51 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * client.c (send_repository): Move check for update_dir NULL to - before where we check last_update_dir. Check for "" here too. - - * client.c (send_repository): Use new argument dir. - - * client.c: Pass new argument dir to send_repository and - send_a_repository. - - * server.c, server.h (server_prog): New function. - * modules.c (do_modules): Call it if server_expanding. - * client.c: Support Set-checkin-prog and Set-update-prog responses. - * server.c, client.c: Add Checkin-prog and Update-prog requests. - -Fri Nov 18 14:04:38 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * client.c (get_short_pathname, is_cvsroot_level, - call_in_directory): Base whether this is new-style or - old-style based on whether we actually used the Directory request, - not based on whether the pathname is absolute. Rename - directory_supported to use_directory. - * server.c: Rename use_relative_pathnames to use_dir_and_repos. - * client.c (send_a_repository): If update_dir is absolute, don't - use it to try to reconstruct how far we have recursed. - - * server.c, server.h, client.c, client.h, vers_ts.c, update.h: - More cosmetic changes (identation, PARAMS vs. PROTO, eliminate - alloca, etc.) to remote CVS to make it more like the rest of CVS. - - * server.c: Make server_temp_dir just the dir name, not the name - with "%s" at the end. - * server.c, client.c: Add "Max-dotdot" request, and use it to make - extra directories in server_temp_dir if needed. - -Thu Nov 17 09:03:28 1994 Jim Kingdon <kingdon@cygnus.com> - - * client.c: Fix two cases where NULL was used and 0 was meant. - -Mon Nov 14 08:48:41 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c (serve_unchanged): Set noexec to 0 when calling Register. - - * update.c (merge_file): Don't call xcmp if noexec. - -Fri Nov 11 13:58:22 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * client.c (call_in_directory): Deal with it if reposdirname is - not a subdirectory of toplevel_repos. - -Mon Nov 7 09:12:01 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * patch.c: If file is removed and we don't have a tag or date, - just print "current release". - - * classify.c (Classify_File): Treat dead files appropriately. - -Fri Nov 4 07:33:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * main.c (main) [SERVER_SUPPORT]: Move call to getwd past where we - know whether we are the server or not. Set CurDir to "<remote>" - if we are the server. - - * client.c: Remove #if 0'd function option_with_arg. - Remove #if 0'd code pertaining to the old way of logging the - session. - - * client.c (start_rsh_server): Don't invoke the server with the - -d option. - * server.c (serve_root): Test root for validity, just like main.c - does for non-remote CVS. - * main.c (main): If `cvs server' happens with a colon in the - CVSroot, just handle it normally; don't make it an error. - -Wed Nov 2 11:09:38 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * client.c (send_dirent_proc): If dir does not exist, just return - R_SKIP_ALL. - - * server.c, client.c: Add Directory request and support for - local relative pathnames (along with the repository absolute - pathnames). - * update.c, add.c, checkout.c, checkin.c, cvs.h, create_adm.c, - commit.c, modules.c, server.c, server.h, remove.c, client.h: - Pass update_dir to server_* functions. Include update_dir in - more error messages. - -Fri Oct 28 08:54:00 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * client.c: Reformat to bring closer to cvs standards for brace - position, comment formatting, etc. - - * sanity.sh: Remove wrong "last mod" line. Convert more tests to - put PASS or FAIL in log file. Change it so arguments to the - script specify which tests to run. - - * client.c, client.h, server.c, checkout.c: Expand modules in - separate step from the checkout itself. - -Sat Oct 22 20:33:35 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) - - * update.c (join_file): When checking for null return from - RCS_getversion, still do return even if quiet flag is set. - -Thu Oct 13 07:36:11 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * client.c (send_files): Call send_repository even if - toplevel_repos was NULL. - - * server.c (server_updated): If joining, don't remove file. - - * update.c (join_file): If server and file is unmodified, check it - out before joining. After joining, call server_updated. New - argument repository. - - * server.c, server.h (server_copy_file): New function. - * update.c (update_file_proc, join_file): Call it. - * client.c (copy_file, handle_copy_file): New functions. - * client.c (responses): Add "Copy-file". - - * client.c, client.h: Make toplevel_wd, failed_patches and - failed_patches_count extern. - * client.c (client_update): Move guts of function from here... - * update.c (update): ...to here. - - * client.c, checkout.c: Likewise for checkout. - - * client.c (is_cvsroot_level): New function. - (handle_set_sticky, handle_clear_sticky, - handle_clear_static_directory): Call it, instead of checking - short_pathname for a slash. - - * client.c, client.h (client_process_import_file, - client_import_done): New functions. - * import.c (import, import_descend): Use them. - * import.c (import_descend): If server, don't mention ignored CVS - directories. - * import.c (import_descend_dir): If client, don't print warm - fuzzies, or make directories in repository. If server, print warm - fuzzies to stdout not stderr. - * client.c (send_modified): New function, broken out from - send_fileproc. - (send_fileproc): Call it. - - * client.c (handle_clear_sticky, handle_set_sticky, - handle_clear_static_directory, handle_set_static_directory): If - command is export, just return. - (call_in_directory, update_entries): If command is export, don't - create CVS directories, CVS/Entries files, etc. - * update.c (update_filesdone_proc): Don't remove CVS directories if - client_active. - - * client.c (send_a_repository): Instead of insisting that - repository end with update_dir, just strip as many pathname - components from the end as there are in update_dir. - - * Makefile.in (remotecheck): New target, pass -r to sanity.sh. - * sanity.sh: Accept -r argument which means to test remote cvs. - - * tag.c (tag), rtag.c (rtag), patch.c (patch), import.c (import), - admin.c (admin), release.c (release): If client_active, connect to - the server and send the right requests. - * main.c (cmds): Add these commands. - (main): Remove code which would strip hostname off cvsroot and try - the command locally. There are no longer any commands which are - not supported. - * client.c, client.h (client_rdiff, client_tag, client_rtag, - client_import, client_admin, client_export, client_history, - client_release): New functions. - * server.c (serve_rdiff, serve_tag, serve_rtag, serve_import, - serve_admin, serve_export, serve_history, serve_release): New - functions. - (requests): List them. - * server.c: Declare cvs commands (add, admin, etc.). - * cvs.h, server.h: Don't declare any of them here. - * main.c: Restore declarations of cvs commands which were - previously removed. - - * cvs.h: New define DEATH_STATE, commented out for now. - * rcs.c (RCS_parsercsfile_i), commit.c (remove_file, checkaddfile) - [DEATH_STATE]: Use RCS state to record a dead file. - -Mon Oct 3 09:44:54 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * status.c (status_fileproc): Now that ts_rcs is just one time, - don't try to print the second time from it. (Same as raeburn 20 - Aug change, it accidentally got lost in 1.4 Alpha-1 merge). - - * cvs.h (CVSDEA): Added (but commented out for now). - * rcs.c (RCS_parsercsfile_i) [CVSDEA]: Also look in CVSDEA to see if - something is dead. - * commit.c (ci_new_rev, mark_file) [CVSDEA]: New functions. - (remove_file, checkaddfile) [CVSDEA]: Use them instead of ci -K. - * find_names.c (find_dirs) [CVSDEA]: Don't match CVSDEA directories. - * update.c (checkout_file): Check RCS_isdead rather than relying - on co to not create the file. - - * sanity.sh: Direct output to logfile, not /dev/null. - - * subr.c (run_exec): Print error message if we are unable to exec. - - * commit.c (remove_file): Call Scratch_Entry when removing tag - from file. The DEATH_SUPPORT ifdef was erroneous. - -Sun Oct 2 20:33:27 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * commit.c (checkaddfile): Instead of calling isdir before - attempting to create the directory, just ignore EEXIST errors from - mkdir. (This removes some DEATH_SUPPORT ifdefs which actually had - nothing to do with death support). - -Thu Sep 29 09:23:57 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * diff.c (diff): Search attic too if we have a second tag/date. - (diff_fileproc): If we have a second tag/date, don't do all the - checking regarding the user file. - -Mon Sep 26 12:02:15 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * checkin.c (Checkin): Check for error from unlink_file. - -Mon Sep 26 08:51:10 1994 Anthony J. Lill (ajlill@ajlc.waterloo.on.ca) - - * rcs.c (getrcskey): Allocate space for terminating '\0' if - necessary. - -Sat Sep 24 09:07:37 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * commit.c (commit_fileproc): Set got_message = 1 when calling - do_editor (accidentally omitted from last change). - -Fri Sep 23 11:59:25 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - Revert buggy parts of Rich's change of 1 Nov 1993 (keeping the - dynamic buffer allocation, which was the point of that change). - * logmsg.c (do_editor): Reinstate message arg, but make it char - **messagep instead of char *message. Change occurances of message - to *messagep. Char return type from char * back to void. - * cvs.h: Change do_editor declaration. - * commit.c: Reinstate got_message variable - (commit_filesdoneproc, commit_fileproc, commit_direntproc): Use it. - * import.c (import), commit.c (commit_fileproc, - commit_direntproc): Pass &message to do_editor; don't expect it to - return a value. - * client.c (client_commit): Likewise. - * import.c (import): Deal with it if message is NULL. - -Wed Sep 21 09:43:25 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c (server_updated): If the file doesn't exist, skip it. - - * diff.c, client.h, client.c: Rename diff_client_senddate to - client_senddate and move from diff.c to client.c. - * client.c (client_update, client_checkout): Use it. - -Sat Sep 17 08:36:58 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * checkout.c (checkout_proc): Don't pass NULL to Register for - version. (should fix "cvs co -r <nonexistent-tag> <file>" - coredump on Solaris). - -Fri Sep 16 08:38:02 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * diff.c (diff_fileproc): Set top_rev from vn_user, not vn_rcs. - Rename it to user_file_rev because it need not be the head of any - branch. - (diff_file_nodiff): After checking user_file_rev, if we have both - use_rev1 and use_rev2, compare them instead of going on to code - which assumes use_rev2 == NULL. - -Thu Sep 15 08:20:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * status.c (status): Return a value in client_active case. - -Thu Sep 15 15:02:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * server.c (serve_modified): Create the file even if the size is - zero. - -Thu Sep 15 08:20:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * lock.c (readers_exist): Clear errno each time around the loop, - not just the first time. - - * client.c (start_server): Don't send Global_option -q twice. - - * no_diff.c (No_Difference): Check for error from unlink. - - * no_diff.c, cvs.h (No_Difference): New args repository, - update_dir. Call server_update_entries if needed. Use update_dir - in error message. - * classify.c (Classify_File): Pass new args to No_Difference. - - * server.c (server_update_entries, server_checked_in, - server_updated): Don't do anything if noexec. - - * client.c (send_fileproc): Rather than guessing how big the gzip - output may be, just realloc the buffer as needed. - -Tue Sep 13 13:22:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * lock.c: Check for errors from unlink, readdir, and closedir. - - * classify.c (Classify_File): Pass repository and update_dir to - sticky_ck. - (sticky_ck): New args repository and update_dir. - * server.c, server.h (server_update_entries): New function. - * classify.c (sticky_ck): Call it. - * client.c: New response "New-entry". - * client.c (send_fileproc): Send tag/date from vers->entdata, not - from vers itself. - -Mon Sep 12 07:07:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c: Clean up formatting ("= (errno)" -> "= errno"). - - * cvs.h: Declare strerror. - - * client.c: Add code to deal with Set-sticky and Clear-sticky - responses, and Sticky request. - * server.c: Add code to deal with Sticky request. - * server.c, server.h (server_set_sticky): New function. - * create_adm.c (Create_Admin), update.c (update, update_dirent_proc), - commit.c (commit_dirleaveproc): Call it. - * client.c, client.h (send_files): Add parameter aflag. - * add.c (add), diff.c (diff), log.c (cvslog), remove.c (cvsremove), - status.c (status), - client.c (client_commit, client_update, client_checkout): Pass it. - * client.c (client_update): Add -A flag. - -Fri Sep 9 07:05:35 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * entries.c (WriteTag): Check for error from unlink_file. - - * server.c (server_updated): Initialize size to 0. Previously if - the file was zero length, the variable size got used without being - set. - -Thu Sep 8 14:23:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c (serve_repository): Check for error from fopen on - CVSADM_ENT. - - * update.c (update, update_dirent_proc): Check for errors when - removing Entries.Static. - - * client.c: Add code to deal with Set-static-directory and - Clear-static-directory responses, and Static-directory request. - * server.c, server.h (server_clear_entstat, server_set_entstat): - New functions. - * update.c, checkout.c, modules.c: Call them. - * server.c: Add code to deal with Static-directory request. - - * server.c, client.c: Use strchr and strrchr instead of index and - rindex. - - * server.c (serve_unchanged, serve_lost): Change comments which - referred to changing timestamp; we don't always change the - timestamp in those cases anymore. - -Wed Sep 7 10:58:12 1994 J.T. Conklin (jtc@rtl.cygnus.com) - - * cvsrc.c (read_cvsrc): Don't call getenv() three times when one - time will do. - - * subr.c (xmalloc, xrealloc): Change type of bytes argument from - int to size_t and remove the test that checks if it is less than - zero. - * cvs.h (xmalloc, xrealloc): Update prototype. - -Thu Sep 1 12:22:20 1994 Jim Kingdon (kingdon@cygnus.com) - - * update.c (merge_file, join_file): Pass -E to rcsmerge. - (merge_file): If rcsmerge doesn't change the file, say so. - - * recurse.c, cvs.h (start_recursion): New argument wd_is_repos. - * recurse.c (start_recursion): Use it instead of checking whether - command_name is rtag to find out if we are cd'd to the repository. - * client.c, update.c, commit.c, status.c, diff.c, log.c, admin.c, - remove.c, tag.c: Pass 0 for wd_is_repos. - * rtag.c, patch.c: Pass 1 for wd_is_repos. - - * classify.c, cvs.h (Classify_File): New argument pipeout. - * classify.c (Classify_File): If pipeout, don't complain if the - file is already there. - * update.c, commit.c, status.c: Change callers. - - * mkmodules.c (main): Don't print "reminders" if commitinfo, - loginfo, rcsinfo, or editinfo files are missing. - -Mon Aug 22 23:22:59 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) - - * server.c (strerror): Static definition replaced by extern - declaration. - -Sun Aug 21 07:16:27 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) - - * client.c (update_entries): Run "patch" with input from - /dev/null, so if it's the wrong version, it fails quickly rather - than waiting for EOF from terminal before failing. - -Sat Aug 20 04:16:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * server.c (serve_unchanged): Instead of creating a file with a - zero timestamp, rewrite the entries file to have "=" in the - timestamp field. - * vers_ts.c (mark_lost, mark_unchanged): New macros. - (time_stamp_server): Use them, for clarity. Interpret "=" - timestamp as an unchanged file. A zero-timestamp file should - never be encountered now in use_unchanged mode. - - * client.c (start_server): If CVS_CLIENT_PORT indicates a - non-positive port number, skip straight to rsh connection. - - * status.c (status_fileproc): Fix ts_rcs reference when printing - version info, to correspond to new Entries file format. Don't - print it at all if server_active, because it won't have any useful - data. - -Thu Aug 18 14:38:21 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * cvs.h (status): Declare. - * client.c (client_status): New function. - - * client.h (client_status): Declare. - * main.c (cmds): Include it. - * server.c (serve_status): New function. - (requests): Add it. - * status.c (status): Do the remote thing if client_active. - - * client.c (supported_request): New function. - (start_server): Use it. - - * server.c (receive_partial_file): New function, broken out from - serve_modified. Operate with fixed-size local buffer, instead of - growing stack frame by entire file size. - (receive_file): New function, broken out from serve_modified. - (serve_modified): Call it. - (server): Print out name of unrecognized request. - - More generic stream-filtering support: - * client.c (close_on_exec, filter_stream_through_program): New - functions. - (server_fd): New variable. - (get_responses_and_close): Direct non-rsh connection is now - indicated by server_fd being non-negative. File descriptors for - to_server and from_server may now be different in case "tee" - filtering is being done. Wait for rsh_pid specifically. - (start_server): Use filter_stream_through_program for "tee" - filter, and enable it for direct Kerberos-authenticated - connections. Use dup to create new file descriptors for server - connection if logging is enabled. - (start_rsh_server): Disable code that deals with logging. - - Per-file compression support: - * cvs.h (gzip_level): Declare. - * main.c (usg): Describe new -z argument. - (main): Recognize it and set gzip_level. - * client.c (filter_through_gzip, filter_through_gunzip): New - functions to handle compression. - (update_entries): If size starts with "z", uncompress - (start_server): If gzip_level is non-zero and server supports it, - issue gzip-file-contents request. - (send_fileproc): Optionally compress file contents. Use a - slightly larger buffer, anticipating the worst case. - * server.c (gzip_level): Define here. - (receive_file): Uncompress file contents if needed. - (serve_modified): Recognize "z" in file size and pass receive_file - appropriate flag. - (buf_read_file_to_eof, buf_chain_length): New functions. - (server_updated): Call them when sending a compressed file. - (serve_gzip_contents): New function; set gzip_level. - (requests): Added gzip-file-contents request. - -Wed Aug 17 09:37:44 1994 J.T. Conklin (jtc@cygnus.com) - - * find_names.c (find_dirs): Use 4.4BSD filesystem feature (it - contains the file type in the dirent structure) to avoid - stat'ing each file. - - * commit.c (remove_file,checkaddfile): Change type of umask - variables from int to mode_t. - * subr.c (): Likewise. - -Tue Aug 16 19:56:34 1994 Mark Eichin (eichin@cygnus.com) - - * diff.c (diff_fileproc): Don't use diff_rev* because they're - invariant across calls -- add new variable top_rev. - (diff_file_nodiff): After checking possible use_rev* values, if - top_rev is set drop it in as well (if we don't already have two - versions) and then clear it for next time around. - -Wed Aug 10 20:50:47 1994 Mark Eichin (eichin@cygnus.com) - - * diff.c (diff_fileproc): if ts_user and ts_rcs match, then the - file is at the top of the tree -- so we might not even have a - copy. Put the revision into diff_rev1 or diff_rev2. - -Wed Aug 10 14:55:38 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * server.c (do_cvs_command): Use waitpid. - - * subr.c (run_exec): Always use waitpid. - - * Makefile.in (CC, LIBS): Define here, in case "make" is run in - this directory instead of top level. - -Wed Aug 10 13:57:06 1994 Mark Eichin (eichin@cygnus.com) - - * client.c (krb_get_err_text): use HAVE_KRB_GET_ERR_TEXT to - determine if we need to use the array or the function. - * main.c: ditto. - -Tue Aug 9 16:43:30 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * entries.c (ParseEntries): If timestamp is in old format, rebuild - it in the new format. Fudge an unmatchable entry that won't - trigger this code next time around, if the file is modified. - - * vers_ts.c (time_stamp): Only put st_mtime field into timestamp, - and use GMT time for it. With st_ctime or in local time, copying - trees between machines in different time zones makes all the files - look modified. - (time_stamp_server): Likewise. - -Tue Aug 9 19:40:51 1994 Mark Eichin (eichin@cygnus.com) - - * main.c (main): use krb_get_err_text function instead of - krb_err_txt array. - -Thu Aug 4 15:37:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * main.c (main): When invoked as kserver, set LOGNAME and USER - environment variables to the remote user name. - -Thu Aug 4 07:44:37 1994 Mark Eichin (eichin@cygnus.com) - - * client.c: (handle_valid_requests): if we get an option that has - rq_enableme set, then send that option. If it is UseUnchanged, set - use_unchanged so that the rest of the client knows about - it. (Could become a more general method for dealing with protocol - upgrades.) - (send_fileproc): if use_unchanged didn't get set, send an - old-style "Lost" request, otherwise send an "Unchanged" request. - * server.c (serve_unchanged): new function, same as serve_lost, - but used in the opposite case. - (requests): add new UseUnchanged and Unchanged requests, and make - "Lost" optional (there isn't a good way to interlock these.) - * server.h (request.status): rq_enableme, new value for detecting - compatibility changes. - * vers_ts.c (time_stamp_server): swap meaning of zero timestamp if - use_unchanged is set. - -Tue Jul 26 10:19:30 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * sanity.sh: Separate CVSROOT_FILENAME, which must be the filename - of the root, from CVSROOT, which can include a hostname for - testing remote CVS. (but the tests aren't yet prepared to deal - with the bugs in remote CVS). - - * import.c (update_rcs_file): Change temporary file name in TMPDIR - from FILE_HOLDER to cvs-imp<process-id>. - - * sanity.sh: Add ">/dev/null" and "2>/dev/null" many places to - suppress spurious output. Comment out tests which don't work (cvs - add on top-level directory, cvs diff when non-committed adds or - removes have been made, cvs release, test 53 (already commented as - broken), retagging without deleting old tag, test 63). Now 'make - check' runs without any failures. - -Fri Jul 15 12:58:29 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * Makefile.in (install): Do not depend upon installdirs. - -Thu Jul 14 15:49:42 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * client.c, server.c: Don't try to handle alloca here; it's - handled by cvs.h. - -Tue Jul 12 13:32:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * client.c (update_entries): Reset stored_checksum_valid if we - quit early because of a patch failure. - -Fri Jul 8 11:13:05 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * client.c (responses): Mark "Remove-entry" as optional. - -Thu Jul 7 14:07:58 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * server.c (server_updated): Add new checksum argument. If it is - not NULL, and the client supports the "Checksum" response, send - it. - * server.h (server_updated): Update prototype. - * update.c: Include md5.h. - (update_file_proc): Pass new arguments to patch_file and - server_updated. - (patch_file): Add new checksum argument. Set it to the MD5 - checksum of the version of the file being checked out. - (merge_file): Pass new argument to server_updated. - * client.c: Include md5.h. - (stored_checksum_valid, stored_checksum): New static variables. - (handle_checksum): New static function. - (update_entries): If a checksum was received, check it against the - MD5 checksum of the final file. - (responses): Add "Checksum". - (start_server): Clear stored_checksum_valid. - * commit.c (commit_fileproc): Pass new argument to server_updated. - - * client.h (struct response): Move definition in from client.c, - add status field. - (responses): Declare. - * client.c (struct response): Remove definition; moved to - client.h. - (responses): Make non-static. Initialize status field. - * server.c (serve_valid_responses): Check and record valid - responses, just as in handle_valid_requests in client.c. - - * diff.c (diff_client_senddate): New function. - (diff): Use it to send -D arguments to server. - -Wed Jul 6 12:52:37 1994 J.T. Conklin (jtc@phishhead.cygnus.com) - - * rcs.c (RCS_parsercsfile_i): New function, parse RCS file - referenced by file ptr argument. - (RCS_parsercsfile): Open file and pass its file ptr to above function. - (RCS_parse): Likewise. - -Wed Jul 6 01:25:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * client.c (update_entries): Print message indicating that an - unpatchable file will be refetched. - (client_update): Print message when refetching unpatchable files. - -Fri Jul 1 07:16:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * client.c (send_dirent_proc): Don't call send_a_repository if - repository is "". - -Fri Jul 1 13:58:11 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * client.c (last_dirname, last_repos): Move out of function. - (failed_patches, failed_patches_count): New static variables. - (update_entries): If patch program fails, save short_pathname in - failed_patches array, only exit program if retcode is -1, and - return out of the function rather than update the Entries line. - (start_server): Clear toplevel_repos, last_dirname, last_repos. - (client_update): If failed_patches is not NULL after doing first - update, do another update, but remove all the failed files first. - -Thu Jun 30 09:08:57 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c (requests): Add request "Global_option". - (serve_global_option): New function, to handle it. - * client.c (start_server): Deal with global options. Check for - errors from fprintf. - - * client.c (send_fileproc): Split out code which sends repository - into new function send_a_repository. Also, deal with update_dir - being ".". - (send_dirent_proc): Call send_a_repository. - * add.c (add): If client_active, do special processing for - directories. - (add_directory): If server_active, don't try to create CVSADM - directory. - -Thu Jun 30 11:58:52 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * client.c (update_entries): If patch succeeds, remove the backup - file. - * server.c (server_updated): Add new argument file_info. If it is - not NULL, use it rather than sb to get the file mode. - * server.h (server_updated): Update prototype for new argument. - * update.c (update_file_proc): Pass new arguments to patch_file - and server_updated. - (patch_file): Add new argument file_info. Don't use -p to check - out new version, check it out into file and rename that to file2. - If result is not readable, assume file is dead and set docheckout. - Call xchmod on file2. Close the patch file after checking for a - binary diff. Set file_info to the results of stat on file2. - (merge_file): Pass new argument to server_updated. - * commit.c (commit_fileproc): Pass new argument to server_updated. - -Wed Jun 29 13:00:41 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * client.c (krb_realmofhost): Declare, since it's not the current - <krb.h>. - (start_server): Save the name returned by gethostbyname. Call - krb_realmofhost to get the realm. Pass the resulting realm to - krb_sendauth. Pass the saved real name to krb_sendauth, rather - than server_host. - - * update.c (update_file_proc): Pass &docheckout to patch_file. If - it is set to 1, fall through to T_CHECKOUT case. - (patch_file): Add docheckout argument. Set it to 1 if we can't - make a patch. Check out the files and run diff rather than - rcsdiff. If either file does not end in a newline, we can't make - a patch. If the patch starts with the string "Binary", assume - one or the other is a binary file, and that we can't make a patch. - -Tue Jun 28 11:57:29 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) - - * client.c (update_entries): If the patch file is empty, don't run - patch program; avoids error message. - - * classify.c (Classify_File): Return T_CHECKOUT, not T_PATCH, if - the file is in the Attic. - - * cvs.h (enum classify_type): Add T_PATCH. - * config.h (PATCH_PROGRAM): Define. - * classify.c (Classify_File): If user file exists and is not - modified, and using the same -k options, return T_PATCH instead of - T_CHECKOUT. - * update.c (patches): New static variable. - (update): Add u to gnu_getopt argument. Handle it. - (update_file_proc): Handle T_PATCH. - (patch_file): New static function. - * server.h (enum server_updated_arg4): Add SERVER_PATCHED. - * server.c (server_updated): Handle SERVER_PATCHED by sending - "Patched" command. - (serve_ignore): New static function. - (requests): Add "update-patches". - (client_update): If the server supports "update-patches", send -u. - * client.c (struct update_entries_data): Change contents field - from int to an unnamed enum. - (update_entries): Correponding change. If contents is - UPDATE_ENTRIES_PATCH, pass the input to the patch program. - (handle_checked_in): Initialize contents to enum value, not int. - (handle_updated, handle_merged): Likewise. - (handle_patched): New static function. - (responses): Add "Patched". - * commit.c (check_fileproc): Handle T_PATCH. - * status.c (status_fileproc): Likewise. - - * client.c (start_server): If CVS_CLIENT_PORT is set in the - environment, connect to that port, rather than looking up "cvs" in - /etc/services. For debugging. - -Tue Jun 21 12:48:16 1994 Ken Raeburn (raeburn@cujo.cygnus.com) - - * update.c (joining): Return result of comparing pointer with - NULL, not result of casting (truncating, on Alpha) pointer to int. - - * main.c (main) [HAVE_KERBEROS]: Impose a umask if starting as - Kerberos server, so temp directories won't be world-writeable. - - * update.c (update_filesdone_proc) [CVSADM_ROOT]: If environment - variable CVS_IGNORE_REMOTE_ROOT is set and repository is remote, - don't create CVS/Root file. - * main.c (main): If env var CVS_IGNORE_REMOTE_ROOT is set, don't - check CVS/Root. - -Fri Jun 10 18:48:32 1994 Mark Eichin (eichin@cygnus.com) - - * server.c (O_NDELAY): use POSIX O_NONBLOCK by default, unless it - isn't available (in which case substitute O_NDELAY.) - -Thu Jun 9 19:17:44 1994 Mark Eichin (eichin@cygnus.com) - - * server.c (server_cleanup): chdir out of server_temp_dir before - deleting it (so that it works on non-BSD systems.) Code for choice - of directory cloned from server(). - -Fri May 27 18:16:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * client.c (update_entries): Add return type of void. - (get_responses_and_close): If using Kerberos and from_server and - to_server are using the same file descriptor, use shutdown, not - fclose. Close from_server. - (start_server): New function; most of old version renamed to - start_rsh_server. - (start_rsh_server): Mostly renamed from old start_server. - (send_fileproc): Use %lu and cast sb.st_size in fprintf call. - (send_files): Remove unused variables repos and i. - (option_no_arg): Comment out; unused. - * main.c (main): Initialize cvs_update_env to 0. If command is - "kserver", authenticate and change command to "server". If - command is "server", don't call Name_Root, don't check access to - history file, and don't assume that CVSroot is not NULL. - * server.c (my_memmove): Removed. - (strerror): Change check from STRERROR_MISSING to HAVE_STRERROR. - (serve_root): Likewise for putenv. - (serve_modified): Initialize buf to NULL. - (struct output_buffer, buf_try_send): Remove old buffering code. - (struct buffer, struct buffer_data, BUFFER_DATA_SIZE, - allocate_buffer_datas, get_buffer_data, buf_empty_p, - buf_append_char, buf_append_data, buf_read_file, buf_input_data, - buf_copy_lines): New buffering code. - (buf_output, buf_output0, buf_send_output, set_nonblock, - set_block, buf_send_counted, buf_copy_counted): Rewrite for new - buffering code. - (protocol, protocol_memory_error, outbuf_memory_error, - do_cvs_command, server_updated): Rewrite for new buffering code. - (input_memory_error): New function. - (server): Put Rcsbin at start of PATH in environment. - * Makefile.in: Add @includeopt@ to DEFS. - -Fri May 20 08:13:10 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * cvs.h, classify.c (Classify_File): New argument update_dir. - Include it in user messages. - * commit.c (check_fileproc), status.c (status_fileproc), update.c - (update_file_proc): Pass update_dir to Classify_File. - * commit.c (check_fileproc), update.c (checkout_file): - Include update_dir in user messages. - * commit.c (check_fileproc) update.c (update_file_proc): Re-word - "unknown status" message. - - * server.c (server_checked_in): Deal with the case where - scratched_file is set rather than entries_line. - - * entries.c (Register): Write file even if server_active. - * add.c (add): Add comment about how we depend on above behavior. - -Tue May 17 08:16:42 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - * mkmodules.c: Add dummy server_active and server_cleanup, to go - with the dummy Lock_Cleanup already there. - - * server.c (server_cleanup): No longer static. - -Sat May 7 10:17:17 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - Deal with add and remove: - * commit.c (checkaddfile): If CVSEXT_OPT or CVSEXT_LOG file does - not exist, just silently keep going. - (remove_file): If server_active, remove file before creating - temporary file with that name. - * server.c (serve_remove, serve_add): New functions. - (requests): Add them. - * server.c (server_register): If options is NULL, it means there - are no options. - * server.c, server.h (server_scratch_entry_only): New function. - New variable kill_scratched_file. - (server_scratch, server_updated): Deal with kill_scratched_file. - * commit.c (commit_fileproc): If server_active, call - server_scratch_entry_only and server_updated. - * add.c (add): Add client_active code. - (add): If server_active, call server_checked_in for each file added. - * remove.c (remove): Add client_active code. - (remove_fileproc): If server_active, call server_checked_in. - * main.c (cmds), client.c, client.h: New functions client_add and - client_remove. - * Move declarations of add, cvsremove, diff, and cvslog from - main.c to cvs.h. - * client.c (call_in_directory): Update comment regarding Root and - Repository files. - (send_fileproc): Only send Entries line if Version_TS really finds - an entry. If it doesn't find one, send Modified. - (update_entries): If version is empty or starts with 0 or -, - create a dummy timestamp. - -Thu May 5 19:02:51 1994 Per Bothner (bothner@kalessin.cygnus.com) - - * recurse/c (start_recursion): If we're doing rtag, and thus - have cd'd to the reporsitory, add ,v to a file name before stat'ing. - -Wed Apr 20 15:01:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * client.c (client_commit): Call ign_setup. - (client_update, client_checkout): Likewise. - * diff.c (diff): If client, call ign_setup. - * log.c (cvslog): Likewise. - * update.h (ignlist): Change definition to declaration to avoid - depending upon common semantics (not required by ANSI C, and not - the default on Irix 5). - * update.c (ignlist): Define. - -Tue Apr 19 00:02:54 1994 John Gilmore (gnu@cygnus.com) - - Add support for remote `cvs log'; clean up `cvs diff' a bit. - - * client.c (send_arg): Make external. - (send_option_string): New function. - (client_diff_usage): Remove, unused. - (client_diff): Just call diff, not do_diff. - (client_log): Add. - * client.h (client_log, send_arg, send_option_string): Declare. - * cvs.h (cvslog): Declare. - * diff.c (do_diff): Fold back into diff(), distinguish by checking - client_active. - (diff): Remove `-*' arg parsing crud; use send_option_string. - * log.c (cvslog): If a client, start the server, pass options - and files, and handle server responses. - * main.c (cmds): Add client_log. - (main): Remove obnoxious message every time CVS/Root is used. - Now CVS will be quiet about it -- unless there is a conflict - between $CVSROOT or -d value versus CVS/Root. - * server.c (serve_log): Add. - (requests): Add "log". - -Mon Apr 18 22:07:53 1994 John Gilmore (gnu@cygnus.com) - - Add support for remote `cvs diff'. - - * diff.c (diff): Break guts out into new fn do_diff. - Add code to handle starting server, writing args, - sending files, and retrieving responses. - (includes): Use PARAMS for static function declarations. - * client.c (to_server, from_server, rsh_pid, - get_responses_and_close, start_server, send_files, - option_with_arg): Make external. - (send_file_names): New function. - (client_diff): New function. - * client.h (client_diff, to_server, from_server, - rsh_pid, option_with_arg, get_responses_and_close, start_server, - send_file_names, send_files): Declare. - * cvs.h (diff): Declare. - * main.c (cmds): Add client_diff to command table. - * server.c (serve_diff): New function. - (requests): Add serve_diff. - (server): Bug fix: avoid free()ing incremented cmd pointer. - * update.h (update_filesdone_proc): Declare with PARAMS. - -Sat Apr 16 04:20:09 1994 John Gilmore (gnu@cygnus.com) - - * root.c (Name_root): Fix tyop (CVSroot when root meant). - -Sat Apr 16 03:49:36 1994 John Gilmore (gnu@cygnus.com) - - Clean up remote `cvs update' to properly handle ignored - files (and files that CVS can't identify), and to create - CVS/Root entries on the client side, not the server side. - - * client.c (send_fileproc): Handle the ignore list. - (send_dirent_proc): New function for handling ignores. - (send_files): Use update_filesdone_proc and send_dirent_proc - while recursing through the local filesystem. - * update.h: New file. - * update.c: Move a few things into update.h so that client.c - can use them. - -Fri Mar 11 13:13:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) - - * server.c: If O_NDELAY is not defined, but O_NONBLOCK is, define - O_NDELAY to O_NONBLOCK. - -Wed Mar 9 21:08:30 1994 Jim Kingdon (kingdon@lioth.cygnus.com) - - Fix some spurious remote CVS errors caused by the CVS/Root patches: - * update.c (update_filesdone_proc): If server_active, don't try to - create CVS/Root. - * root.c (Name_Root): Make error messages which happen if root is - not an absolute pathname or if it doesn't exist a bit clearer. - Skip them if root contains a colon. - -Mon Nov 1 15:54:51 1993 K. Richard Pixley (rich@sendai.cygnus.com) - - * client.c (client_commit): dynamically allocate message. - -Tue Jun 1 17:03:05 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) - - * server.h: remove alloca cruft - - * server.c: replace with better alloca cruft - -Mon May 24 11:25:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * entries.c (Scratch_Entry): Update our local Entries file even if - server_active. - - * server.c (server_scratch, server_register): If both Register - and Scratch_Entry happen, use whichever one happened later. - If neither happen, silently continue. - - * client.c (client_checkout): Initialize tag and date (eichin and - I independently discovered this bug at the same time). - -Wed May 19 10:11:51 1993 Mark Eichin (eichin@cygnus.com) - - * client.c (update_entries): handle short reads over the net - (SVR4 fread is known to be broken, specifically for short - reads off of streams.) - -Tue May 18 15:53:44 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - * server.c (do_cvs_command): Fix fencepost error in setting - num_to_check. - - * server.c (do_cvs_command): If terminated with a core dump, print - message and set dont_delete_temp. - (server_cleanup): If dont_delete_temp, don't delete it. - - * client.c (get_server_responses): Don't change cmd since we - are going to "free (cmd)". - - * server.c: Rename memmove to my_memmove pending a real fix. - - * server.c (do_cvs_command): Set num_to_check to largest descriptor - we try to use, rather than using (non-portable) getdtablesize. - -Wed May 12 15:31:40 1993 Jim Kingdon (kingdon@lioth.cygnus.com) - - Add CVS client feature: - * client.{c,h}: New files. - * cvs.h: Include client.h. - * main.c: If CVSROOT has a colon, use client commands instead. - * vers_ts.c (Version_TS): If repository arg is NULL, don't worry - about the repository. - * logmsg.c (do_editor): If repository or changes is NULL, just don't - use those features. - * create_adm.c (Create_Admin), callers: Move the test for whether - the repository exists from here to callers. - * repos.c (Name_Repository): Don't test whether the repository exists - if client_active set (might be better to move test to callers). - - Add CVS server feature: - * server.{c,h}: New files. - * cvs.h: Include server.h. - * checkin.c (Checkin): Call server_checked_in. - * update.c (update_file_proc, merge_files): Call server_updated. - * entries.c (Register): Call server_register. - (Scratch_Entry): Call server_scratch. - * main.c: Add server to cmds. - * vers_ts.c (Version_TS): If server_active, call new function - time_stamp_server to set ts_user. - + +For older changes see ChangeLog-9395. diff --git a/gnu/usr.bin/cvs/src/ChangeLog-9194 b/gnu/usr.bin/cvs/src/ChangeLog-9194 new file mode 100644 index 00000000000..eb79efccd9b --- /dev/null +++ b/gnu/usr.bin/cvs/src/ChangeLog-9194 @@ -0,0 +1,524 @@ +Thu Sep 15 08:20:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * subr.c (run_setup, run_args): Check USE_PROTOTYPES if defined + instead of __STDC__, just like cvs.h does. + +Thu Sep 15 00:14:58 1994 david d `zoo' zuhn <zoo@monad.armadillo.com> + + * main.c: rename nocvsrc to use_cvsrc, don`t read ~/.cvsrc when -H + has been seen + +Wed Sep 14 21:55:17 1994 david d `zoo' zuhn <zoo@monad.armadillo.com> + + * cvs.h, subr.c: use size_t for xmalloc, xrealloc, and xstrdup + parameters + + * cvsrc.c: optimize away two calls of getenv + + * commit.c, subr.c: use mode_t for file mode values (Thanks to jtc@cygnus.com) + + * main.c: update copyrights in -v message + +Tue Sep 6 10:29:13 1994 J.T. Conklin (jtc@rtl.cygnus.com) + + * hash.c (hashp): Replace hash function with one from p436 of the + Dragon book (via libg++'s hash.cc) which has *much* better + behavior. + +Wed Aug 17 09:37:44 1994 J.T. Conklin (jtc@cygnus.com) + + * find_names.c (find_dirs): Use 4.4BSD filesystem feature (it + contains the file type in the dirent structure) to avoid + stat'ing each file. + +Tue Aug 16 11:15:12 1994 J.T. Conklin (jtc@cygnus.com) + + * rcs.h (struct rcsnode): add symbols_data field. + * rcs.c (RCS_parsercsfile_i): store value of rcs symbols in + symbols_data instead of parsing it. + (RCS_symbols): New function used for lazy symbols parsing. + Build a list out of symbols_data and store it in symbols if it + hasn't been done already, and return the list of symbols. + (RCS_gettag, RCS_magicrev, RCS_nodeisbranch, RCS_whatbranch): + Use RCS_symbols. + * status.c: (status_fileproc): Use RCS_symbols. + +Thu Jul 14 13:02:51 1994 david d `zoo' zuhn (zoo@monad.armadillo.com) + + * src/diff.c (diff_fileproc): add support for "cvs diff -N" which + allows for adding or removing files via patches. (from + K. Richard Pixley <rich@cygnus.com>) + +Wed Jul 13 10:52:56 1994 J.T. Conklin (jtc@phishhead.cygnus.com) + + * cvs.h: Add macro CVSRFLPAT, a string containing a shell wildcard + expression that matches read lock files. + * lock.c (readers_exist): Reorganized to use CVSRFLPAT and to not + compute the full pathname unless the file matches. + + * rcs.h: Add macro RCSPAT, a string containing a shell wildcard + expression that matches RCS files. + * find_names.c (find_rcs, find_dirs): Use RCSPAT. + +Fri Jul 8 07:02:08 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * entries.c (Register): Pass two arguments to write_ent_proc, in + accordance with its declaration. + +Thu Jun 30 09:08:57 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * logmsg.c (do_editor): Fix typo ("c)continue" -> "c)ontinue"). + +Thu Jun 23 18:28:12 1994 J.T. Conklin (jtc@phishhead.cygnus.com) + + * find_names.c (find_rcs, find_dirs): use fnmatch instead of + re_comp/re_exec for wildcard matching. + * lock.c (readers_exist): Likewise. + +Fri May 20 08:13:10 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * modules.c (do_module): If something is aliased to itself, print + an error message rather than recursing. + +Fri May 6 19:25:28 1994 david d zuhn (zoo@monad.armadillo.com) + + * cvsrc.c (read_cvsrc): use open_file for error checking + +Sat Feb 26 10:59:37 1994 david d zuhn (zoo@monad.armadillo.com) + + * import.c: use $TMPDIR if available, instead of relying on /tmp + +Mon Jan 24 19:10:03 1994 david d zuhn (zoo@monad.armadillo.com) + + * update.c (joining): compare join_rev1 with NULL instead of + casting pointer to an int + + * options.h: remove S_IWRITE, S_IWGRP, S_IWOTH macros + + * logmsg.c: #if 0 around gethostbyname prototype + + * hash.c (printnode), find_names.c (add_entries_proc), + entries.c (write_ent_proc): correct declaration for function + (added void *closure) + + * cvs.h: header include order reorganization: First include the + program config headers (config.h, options.h). Then include any + system headers (stdio.h, unistd.h). Last, get the program + headers and any cvs supplied library support + + * commit.c: use xstrdup instead of strdup + + * cvs.h: redefined USE(var) macro; comment after an #endif + + * all .c files: remove the semicolon from after the USE(var) + +Sat Dec 18 00:17:27 1993 david d zuhn (zoo@monad.armadillo.com) + + * cvs.h: include errno.h if available, otherwise declare errno if + it's not somehow else defined + + * commit.c (checkaddfile): remove unused file argument from + RCS_nodeisbranch call + + * rcs.c (RCS_nodeisbranch): remove file from arguments (was unused) + + * rcs.h (RCS_nodeisbranch): remove file from prototype + + * main.c: don't use rcsid when printing version number (the CVS + version number is independent of the repository that it comes + from) + + * hash.c (printlist, printnode): use %p to print pointers, not %x + (avoids gcc format warnings) + + * cvs.h: define USE if GCC 2, to avoid unused variable warning + + * all .c files: use USE(rcsid) + + * Makefile.in (VPATH): don't use $(srcdir), but @srcdir@ instead + (COMMON_OBJECTS): define, and use in several places + (OBJECTS): reorder alphabetically + + * hash.c (nodetypestring): handle default return value better + + * modules.c (do_module): remove extra argument to ign_dir_add + + * main.c (main): initialize cvs_update_env to 0 (zero) + + * modules.c (do_module): return error code when ignoring directory + (instead of a bare return). error code should be zero here + + * cvs.h: add prototypes for ignore_directory, ign_dir_add + + * ignore.c: add comments about ignore_directory + + * root.c (Name_Root): remove unused variables has_cvsadm and path + + * checkin.c (Checkin): only use -m<message> when message is non-NULL + + * cvsrc.c (read_cvsrc): make sure homeinit is never used while + uninitialized (could have happened if getenv("HOME") had failed) + + * cvs.h: include unistd.h if available + +Fri Dec 17 23:54:58 1993 david d zuhn (zoo@monad.armadillo.com) + + * all files: now use strchr, strrchr, and memset instead of index, + rindex, and bzero respectively + +Sat Dec 11 09:50:03 1993 david d zuhn (zoo@monad.armadillo.com) + + * version.c (version_string): bump to +104z + + * Makefile.in: set standard directory variables, CC, and other + variables needed to be able to do 'make all' in this directory + + * import.c: implement -k<subst> options, for setting the RCS + keyword expansion mode + + * all files: use PROTO() macro for ANSI function prototypes + instead of #ifdef __STDC__/#else/#endif around two sets of + declarations + +Thu Nov 18 19:02:51 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * add.c (add), import.c (import), commit.c (commit): change + xmalloc & strcpy to xstrdup. + + * commit.c (remove_file): correct another static buffer problem. + +Wed Nov 10 15:01:34 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * recurse.c (start_recursion): directories in repository but not + in working directory should be added to dirlist. Fixes "update + -d dir" case. + + * version.c (version_string): bump to +103r. + + * commit.c (checkaddfile): mkdir attic only if it does not already + exist. comment changes. changed diagnostic about adding on a + branch. if a file is added on a branch, remove and replace the + internal representation of that rcs file. + +Tue Nov 9 18:02:01 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * add.c (add): if a file is being added on a branch, then say so; + add quotes around file names in error messages. + +Thu Nov 4 16:58:33 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * version.c (version_string): bump to +102r. + + * recurse.c (unroll_files_proc, addfile): new files, forward + decls, and prototypes. + (recursion_frame): new struct. + (start_recursion): rewrite to handle the case of "file1 file2 + dir1/file3". + + * rcs.c (RCS_parsercsfile): trap and error out on the case where + getrcskey tells us it hit an error while reading the file. + + * commit.c (lock_filesdoneproc): add comment about untrapped error + condition. + + * hash.c (addnode): comment change. + + * subr.c: add comment about caching. + + * sanity.sh: updated copyright. + +Wed Nov 3 14:49:15 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * version.c (version_string): bump to +101r. + + * hash.c (walklist): add a closure for called routines. All + callers, callees, and prototypes changed. + + * hash.c (nodetypestring, printnode, printlist): new functions for + dumping lists & nodes. + + * tag.c (tag_fileproc): fatal out on failure to set tag. + +Tue Nov 2 14:26:38 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * version.c (version_string): bump version to +99. + +Mon Nov 1 15:54:51 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + Change buffer allocation for check in messages from static to + dynamic. + * add.c (add): dynamically allocate message. + (build_entry): check (message != NULL) now that message is a + pointer. + * commit.c (got_message, commit, commit_fileproc, + commit_filesdoneproc, commit_direntproc): removed. Replaced by + (message != NULL). Dynamically allocate message. + * cvs.h: adjust do_editor prototype and forward decl. + (MAXMESGLEN): removed. + * import.c (import): dynamically allocate message. + * logmsg.c (do_editor): change return type to char *. Remove + message parameter. Slight optimization to algorythm for + removing CVSEDITPREFIX lines. Add comment about fgets lossage. + + * subr.c (xmalloc): change error message to print number of bytes + we were attempting to allocate. + +Fri Oct 29 14:22:02 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * add.c (add): prevent adding a directory if there exists a dead + file of the same name. + + * sanity.sh: update argument to diff from "+ignore-file" to + "--exclude=". + + * Makefile.in (TAGS): extend to work from an objdir. + +Mon Oct 18 18:45:45 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) + + * tag.c, rtag.c: change the default actions to make writing over + existing tags harder (but not impossible) + +Thu Oct 14 18:00:53 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) + + CVS/Root changes from Mark Baushke (mdb@cisco.com) + + * Makefile.in: added new file called root.c + + * create_adm.c: will create CVS/Root at the same time that the + other CVS files are being created + + * cvs.h: new CVSADM_ROOT define plus new function externs + + * main.c: default to using CVS/Root contents for CVSROOT + if neither the environment variable or the command line + "-d" switch is given. If either are given, perform a + sanity check that this directory belongs to that repository. + + * update.c: if CVS/Root does not exist, then create it + during an update -- this may be removed if CVS/Root becomes a + standard feature + + * root.c: implement new functions to manipulate CVS/Root + [this may be integrated with other utility functions in + a future revision if CVS/Root becomes a standard feature.] + +Wed Sep 29 17:01:40 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) + + * patch.c (patch_fileproc): output an Index: line for each file + +Mon Sep 6 18:40:22 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com) + + * cvs.h: wrap definition of PATH_MAX in #ifndef PATH_MAX/#endif + +Tue Aug 9 21:52:10 1994 Mark Eichin (eichin@cygnus.com) + + * commit.c (remove_file): actually allocate space for the + filename, not just the directory. + +Tue Jul 6 19:05:37 1993 david d `zoo' zuhn (zoo@cygnus.com) + + * diff.c: patches to print an Index: line + +Mon Jun 14 12:19:35 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com) + + * Makefile.in: update install target + +Tue Jun 1 17:03:05 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: link cvs against libiberty + +Wed May 19 14:10:34 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * ignore.c: add code for keeping lists of directories to ignore. + + * modules.c: new syntax for modules file, !dirname is added to + the list of directories to ignore + + * update.c: don't process directories on the ignore list + +Tue Apr 6 14:22:48 1993 Ian Lance Taylor (ian@cygnus.com) + + * cvs.h: Removed gethostname prototype, since it is unnecessary + and does not match prototype in <unistd.h> on HP/UX. + +Mon Mar 22 23:25:16 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * Makefile.in: rename installtest to installcheck + +Mon Feb 1 12:53:34 1993 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.in (check, installtest): set RCSBIN so that we + explicitly test the appropriate version of rcs as well. + +Fri Jan 29 13:37:35 1993 K. Richard Pixley (rich@rtl.cygnus.com) + + * version.c: bump version to +2. + +Thu Jan 28 18:11:34 1993 K. Richard Pixley (rich@rtl.cygnus.com) + + * import.c (update_rcs_file): if a file was dead, be sure to check + in the new version. + + * update.c (checkout_file): if file_is_dead and we *did* have an + entry, scratch it. + +Tue Jan 26 16:16:48 1993 K. Richard Pixley (rich@rtl.cygnus.com) + + * sanity.sh: parcel into pieces for easier truncation when + debugging. + + * update.c (checkout_file): print the "no longer pertinent" + message only if there was a user file. + +Wed Jan 20 17:08:09 1993 K. Richard Pixley (rich@rtl.cygnus.com) + + * update.c (checkout_file): remove unused variable s. + (join_file): remove unused variables rev & baserev. Fix a typo. + + * commit.c (commit_fileproc): remove unused variable magicbranch. + + * sanity.sh: bring back test 45 even though it fails. Update + tests against imported files. + + * add.c (add_directory): move declaration of unused variable. + + * Makefile.in (xxx): when building in this directory, pass CC for + the recursion. + +Mon Jan 18 13:48:33 1993 K. Richard Pixley (rich@cygnus.com) + + * commit.c (remove_file): fix for files removed in trunk + immediately after import. + + * commit.c (remove_file): initialize some variables. Otherwise we + end up free'ing some rather inconvenient things. + +Wed Jan 13 15:55:36 1993 K. Richard Pixley (rich@rtl.cygnus.com) + + * Makefile.in (check, install, installtest): use the sanity test. + + * sanity.el: make into real functions and bind to sun keys. + + * sanity.sh: bring back to working order. Add test for death + after import. + +Tue Dec 22 17:45:19 1992 K. Richard Pixley (rich@cygnus.com) + + * commit.c (remove_file): when checking in a dead revision to a + branch as we are creating the branch, do not lock the underlying + revision. Also free some malloc'd memory. + +Wed Dec 2 13:09:48 1992 K. Richard Pixley (rich@cygnus.com) + + * RCS-patches: new file. + +Fri Nov 27 20:12:48 1992 K. Richard Pixley (rich@rtl.cygnus.com) + + Added support for adding previously removed files, as well as + adding and removing files in branches. + + * add.c (build_entry): add new argument, tag, so as to store in + Entries the per directory sticky tag under which a file is + added. Changed prototype and caller. + (build_entry): Do not prevent file additions if the file exists + in the Attic. + (add): if the file being adding was previously dead, say so, and + mark the Entries file with the addition. + * checkin.c (Checkin): adding with a tag no longer means to add, + then tag. Hence, remove the tagging operation. + * classify.c (Classify_File): if the base RCS version is dead, + then the file is being added. If a file being added already + exists in the attic, and the base RCS version is NOT dead, then + we have a conflict. + * commit.c (checkaddfile): add the list of srcfiles to calling + convention. Change prototype and callers. + (remove_file): add message and list of srcfiles to calling + convention. Change prototype and callers. When removing a file + with a tag, remove the tag only when the tag does not represent + a branch. Remove files by committing dead revisions in the + appropriate branch. When removing files from the trunk, also + move the RCS file into the Attic. + (check_fileproc): when adding, and looking for previously + existing RCS files, do not look in the Attic. + (commit_fileproc): adding files with tags now implies adding the + file on a branch with that tag. + (checkaddfile): When adding a file on a branch, in addition to + creating the rcs file in the Attic, also create a dead, initial + revision on the trunk and stub in a magic branch tag. + * cvs.h (joining, gca): added prototypes. + * rcs.c (RCS_getbranch): now global rather than static. + remove prototype and forward decl. + (parse_rcs_proc): use RCS_addnode. + (RCS_addnode): new function. + (RCS_parsercsfile): recognize the new RCS revision + newphrase, "dead". Mark the node for the revision. + (RCS_gettag): requesting the head of a file in the attic now + returns the head of the file in the attic rather than NULL. + (RCS_isbranch): use RCS_nodeisbranch. + (RCS_nodeisbranch): new function. + (RCS_isdead): new function. + * rcs.h (RCSDEAD): new macro for new rcs keyword. + (struct rcsversnode): new field to flag dead revisions. + (RCS_nodeisbranch, RCS_isdead, RCS_addnode): new functions, + new prototypes, new externs. + (RCS_getbranch): now global, so prototype and extern moved + to here. + * subr.c (gca): new function. + * update.c (join_file): add entries list to calling + convention. Caller changed. + (update): also search the Attic when joining. + (checkout_file): when joining, checkout dead revisions too. If + a file has died across an update then say so. + (join_file): support joins of dead files against live ones, live + files against dead ones, and added files. Change the semantic + of a join with only rev specified to mean join specified rev + against checked out files via the greatest common ancestor of + the specified rev and the base rev of the checked out files. + (joining): new function. + * vers_ts.c (Version_TS): ALWAYS get the rcs version number. + + * update.c (update): write the 'C' letter for conflicts. + + * cvs.h (ParseTag): remove duplicate extern. + + * add.c (add_directory): do not prompt for interactive + verification before adding a directory. Doing so prevents + scripted testing. + +Wed Feb 26 18:04:40 1992 K. Richard Pixley (rich@cygnus.com) + + * Makefile.in, configure.in: removed traces of namesubdir, + -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced + copyrights to '92, changed some from Cygnus to FSF. + +Tue Dec 10 01:24:40 1991 K. Richard Pixley (rich at cygnus.com) + + * diff.c: do not pass an empty -r option to rcsdiff. + + * update.c: fix bug where return code from rcsmerge wasn't being + handled properly. + + * main.c: "rm" and "delete" now synonyms for "remove". + + * commit.c: abort if editor session fails, but remember to clear + locks. + + * Makefile.in: remove conf.h and checkin.configured on clean. + infodir belongs in datadir. + +Thu Dec 5 22:46:03 1991 K. Richard Pixley (rich at rtl.cygnus.com) + + * Makefile.in: idestdir and ddestdir go away. Added copyrights + and shift gpl to v2. Added ChangeLog if it didn't exist. docdir + and mandir now keyed off datadir by default. + +Wed Nov 27 02:47:13 1991 K. Richard Pixley (rich at sendai) + + * brought Makefile.in's up to standards.text. + + * fresh changelog. + + +For older changes, there might be some relevant stuff in the bottom of +the NEWS file, but I'm afraid probably a lot of them are lost in the +mists of time. diff --git a/gnu/usr.bin/cvs/src/ChangeLog-9395 b/gnu/usr.bin/cvs/src/ChangeLog-9395 new file mode 100644 index 00000000000..9895149d650 --- /dev/null +++ b/gnu/usr.bin/cvs/src/ChangeLog-9395 @@ -0,0 +1,3731 @@ +Note: this log overlaps in time with ChangeLog-9194. There was a time +during which changes which had been merged into the official CVS +(which produced releases such as 1.4A1 and 1.4A2) went into what has +become ChangeLog-9194, and changes which existed only at Cygnus went +into this file (ChangeLog-9395). Eventually the Cygnus release became +Cyclic CVS (it is was then called), which became CVS 1.5, so probably +all the changes in both (what are now) ChangeLog-9194 and +ChangeLog-9395 made it into 1.5. + +Sun Dec 31 17:33:47 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * import.c (add_rev): Revert portion of 31 Aug 95 change which + passes -u to ci instead of using a hard link. + * sanity.sh (import): Add test for above-fixed bug. + +Sun Dec 31 16:40:41 1995 Peter Chubb <peterc@bookworm.sw.oz.au> + and Jim Kingdon <kingdon@cyclic.com> + + * admin.c (admin_fileproc): Call freevers_ts before returning. + +Mon Dec 25 12:20:06 1995 Peter Wemm <peter@haywire.DIALix.COM> + + * logmsg.c (rcsinfo_proc): initialise line and + line_chars_allocated so they dont cause malloc problems within + getline(). This was causing rcsinfo templates to not work. + +Sun Dec 24 01:38:36 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * server.c (authenticate_connection): clarify protocol. + + * login.c (login): deprolixify the password prompt. + +Sat Dec 23 10:46:41 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * myndbm.h, myndbm.c (dbm_store): New function. + * myndbm.h (DBM): Add modified and filename fields. + * myndbm.c (dbm_open, dbm_close): Manipulate new fields. dbm_open + no longer fails if the file doesn't exist and O_CREAT is set. + * cvs.h (CVSROOTADM_VALTAGS): Added. + * tag.c, cvs.h (tag_check_valid): New function. + * update.c (update), checkout.c (checkout_proc), commit.c (commit), + diff.c (diff), patch.c (patch_proc), rtag.c (rtag_proc), tag.c (tag): + Call it. + * sanity.sh: Test for rejection of invalid tagname. + +Fri Dec 22 18:21:39 1995 Karl Fogel <kfogel@csxt.cs.oberlin.edu> + + * client.c (start_server): don't use kerberos if authenticating + server was specified. + +Fri Dec 22 16:35:57 1995 Karl Fogel <kfogel@csxt.cs.oberlin.edu> + + * login.c (login): deal with new scramble methods. + (get_cvs_password): same. + + * server.c (check_repository_password): remove arbitrary limit on + line length. + (authenticate_connection): use a separate variable for the + descrambled password, now that we no longer scramble in place. + Set `error_use_protocol' to 1 and just use error() where used to + do its job inline. + + * cvs.h (scramble, descramble): adjust prototype. + + * scramble.c (scramble, descramble): return char *. + +Fri Dec 22 13:00:00 1995 Jim Kingdon <kingdon@peary.cyclic.com> + + * release.c (release): If SERVER_SUPPORT is not defined, still + set up arg_start_idx. + + * release.c (release): When calling unedit, set argv[1] to + NULL (since argc is only 1). + + * edit.c: Pass dosrcs 0 to all calls to start_recursion. + None of the fileprocs were using it, so it just slowed things + down and caused potentially harmful checks for rcs files. + + * edit.c (send_notifications): In client case, do not readlock. + +Thu Dec 21 16:00:00 1995 Jim Kingdon <kingdon@peary.cyclic.com> + + Clean up Visual C++ lint: + * client.c (read_line): Change input_index and result_size to size_t. + (update_entries): Remove unused variables buf2, size_left, size_read. + (handle_mode): Prototype. + * client.c, client.h (send_to_server, read_from_server): Change + len to size_t. + * client.c (send_to_server): Change wrtn to size_t. + (read_from_server): Change red to size_t. + * client.c, myndbm.c, edit.c, fileattr.c: Include getline.h. + * checkin.c, commit.c, update.c: Include fileattr.h. + * commit.c, update.c: Include edit.h. + * edit.c (onoff_filesdoneproc): Prototype. + (ncheck_fileproc,edit_fileproc): Change "return" to "return 0". + (notify_do): Cast a signed value to unsigned before comparing + with unsigned value. + +Thu Dec 21 15:24:37 1995 Karl Fogel <kfogel@occs.cs.oberlin.edu> + + * client.c: don't include socket headers twice just because + both HAVE_KERBEROS and AUTH_CLIENT_SUPPORT are set. + (start_kerberos_server): if fail to connect to kerberos, print out + a more specific error message, mainly so pcl-cvs can know what + happened and not panic. + (start_server): don't assume sprintf() returns len + written (only some systems provide this); instead, have + send_to_server() calculate the length itself. + (send_modified): same. + (send_fileproc): same. + (send_file_names): same. + +Wed Dec 20 14:00:28 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * update.c (ignore_files): Move from here... + * ignore.c (ignore_files): ...to here. No longer static. Take + new argument PROC. + * cvs.h (ignore_files): Declare. + * client.c (send_filesdoneproc): Split off from + update_filesdone_proc. Pass new function send_ignproc to + ignore_files (to ask server about ignored file before printing + "?"). + * server.c: Rename outbuf from but_to_net and take it from + do_cvs_command to a global. Move initialization accordingly. + (serve_questionable): New function. + (requests): Add it. + * update.c (update_filesdone_proc): Remove client stuff. Pass new + function update_ignproc to ignore_files. + * cvs.h (joining, do_update): Move declarations from here... + * update.h: ...to here. + * cvs.h: Include update.h. + * update.c, client.c: Don't include update.h + * ignore.c, cvs.h: New variable ign_inhibit_server, set on -I !. + * import.c (import): Pass -I ! to server if specified. + (import_descend): If server, ignore CVS directories even if -I !. + * update.c (update), import.c (import): Only call ign_setup before + argument processing; don't call it again afterwards in client case. + * sanity.sh (ignore): Test above-fixed bugs and other ignore behaviors. + (dotest): New function. + Move modules checkin from modules test to start, so that other + tests can use mkmodules without a warning message. + +Wed Dec 20 13:06:17 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (send_to_server): don't check string's length twice. + +Wed Dec 20 02:05:19 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * login.c (login): took out debugging printf's. + (login): Removed unused variable `p'. + +Wed Dec 20 00:27:36 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * login.c (login): prefix scrambled password with 'A', so we know + which version of scrambling was used. This may be useful in the + future. + (get_cvs_password): skip past the leading 'A'. + Scramble $CVS_PASSWORD before returning it. + + * scramble.c: made this work. + +Tue Dec 19 17:45:11 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * login.c (cvs_password): new static var, init to NULL. + (login): scramble() the password before using it. + Verify the password with the server. + Check CVSroot more carefully to insure that it is + "fully-qualified". + (get_cvs_password): if cvs_password is not NULL, just return it. + Never prompt -- just tell user why failed, then exit. + Try CVS_PASSWORD environment variable first. + (construct_cvspass_filename): try CVS_PASSFILE environment + variable first. + + * client.h (connect_to_pserver): update prototype. + + * client.c (cvsroot_parsed): new static var. + (parse_cvsroot): set `cvsroot_parsed' to 1 when done. + (connect_to_pserver): return int. + Take `verify_only' arg. If it is non-zero, perform password + verification with the server and then shut down the connection and + return. + Call parse_cvsroot() before doing anything. + + * server.c (authenticate_connection): deal with verification + requests as well as authorization requests. + descramble() the password before hashing it. + + * cvs.h: prototype scramble() and descramble(). + + * Makefile.in: build scramble.o. + + * scramble.c: new file, provides trivial encoding but NOT real + encryption. + +Mon Dec 18 20:57:58 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * login.c (login): don't insert extra newlines. They were + harmless, but confusing. + +Mon Dec 18 15:32:32 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * hash.c, hash.h (findnode_fn): New function. + * hash.c (hashp): Tweak hash function so that findnode_fn works. + * update.c (ignore_files): Call findnode_fn, not findnode. + +Mon Dec 18 09:34:56 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * myndbm.c: Remove arbitrary limit. + + * client.c: Fix comment--Windows 95 requires NO_SOCKET_TO_FD, not + Windows NT. + +Mon Dec 18 01:06:20 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (server_sock): replaces `server_socket'. + (start_kerberos_server): added FIXME comment about how + NO_SOCKET_TO_FD is not dealt with in the kerberos case. + (connect_to_pserver): deal with NO_SOCKET_TO_FD case. + (read_line): deal with NO_SOCKET_TO_FD case. + (read_from_server): deal with NO_SOCKET_TO_FD case. + (send_to_server): deal with NO_SOCKET_TO_FD case. + (get_responses_and_close): deal with NO_SOCKET_TO_FD case. + + * client.c (send_to_server): error check logging. + (start_server): error check opening of logfiles. + (read_from_server): error check logging. + (read_line): use fwrite() to log, & error_check it. + Don't log if using socket style, because read_from_server() + already logged for us. + +Mon Dec 18 00:52:26 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (use_socket_style): new static var, init to 0. + (server_socket): new static var. + (connect_to_pserver): don't deal with logging here. + Caller changed. + (start_kerberos_server): don't deal with logging here either. + Caller changed. + +Mon Dec 18 00:40:46 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (send_modified): don't error-check `to_server'; + send_to_server() does that now. + +Mon Dec 18 00:19:16 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * login.c (get_cvs_password): Init `linebuf' to NULL. + free() `linebuf' and reset it for each new line. + (login): same as above. + + * client.c: Removed all the varargs prototyping gunk. + (to_server, from_server): make these static. + (from_server_logfile, to_server_logfile): new vars. + (start_server): init above two new vars to NULL. + (send_to_server): return void. + Correct bug in which amount to be written would be too high if the + loop ever ran more than once. + Log to `to_server_logfile' if it's non-NULL. + (read_from_server): new func, does raw reading from server. + Logs to `from_server_logfile' if it's non-NULL. + (update_entries): just use read_from_server() instead of looping + to fread() directly from `from_server'. + (read_line): Log to `from_server_logfile' if it's non-NULL. + + * client.h: send_to_server() returns void now. + (read_from_server): prototype. + +Sun Dec 17 19:38:03 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * checkout.c (checkout_proc), client.c, lock.c (readers_exist), + login.c, modules.c (cat_module, do_module): Remove arbitrary limits. + + * client.c (send_to_server): Fix typo (NULL -> '\0'). + (get_responses_and_close): Set server_started to 0 instead of + setting to_server and from_server to NULL. + * client.c: Make to_server and from_server static. + +Sun Dec 17 17:59:04 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.h (to_server, from_server): don't declare these anymore. + They are now entirely private to client.c (and in fact will go + away soon there too). + +Sun Dec 17 15:40:58 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.h: update prototype of send_to_server(). + + * client.c, watch.c, update.c, tag.c, status.c, rtag.c, remove.c, + release.c, patch.c, log.c, import.c, history.c, edit.c, diff.c, + commit.c, client.c, checkout.c, admin.c, add.c: + Convert all send_to_server() calls that used formatting to send + pre-formatted strings instead. And don't error check + send_to_server(), because it does its own error checking now. + + * client.c (send_to_server): don't use vasprintf(), just fwrite a + certain number of bytes to the server. And do error checking + here, so our callers don't have to. + (send_arg): use send_to_server() instead of putc()'ing + directly to `to_server'. + +Sun Dec 17 14:37:52 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * options.h.in (AUTH_CLIENT_SUPPORT, AUTH_SERVER_SUPPORT): + Define to 1 but leave commented out, instead of #undef'ing them. + This treats them like everything else in this file. + + * client.c: define server_started, init to 0. + (start_server): set server_started to 1. + + * client.h: declare `server_started', extern. + AUTH_CLIENT_SUPPORT moved here from cvs.h. + + * cvs.h: moved AUTH_CLIENT_SUPPORT stuff to client.h. + + * edit.c (notify_check): use new var server_started. + +Sun Dec 17 00:44:17 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * client.c (get_responses_and_close): Really stop ignoring ECHILD + errors. The Nov 30 1995 change claimed to do this, but the code + was not actually changed. + + * update.c (ignore_files): Revert H.J. Lu change; it was wrong for + directories and sometimes looked at sb.st_mode when it wasn't set. + * import.c (import_descend): Revert H.J. Lu change; it was wrong + for directories and the extra lstat call was an unnecessary + performance hit. + * sanity.sh (import): Add test for the second of these two bugs. + +Sat Dec 16 17:26:08 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * client.c (send_to_server): Remove arbitrary limit. Also remove + !HAVE_VPRINTF code; all relevant systems have vprintf these days. + +Sat Dec 16 21:35:31 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * checkout.c (checkout): use send_to_server() now. + +Sat Dec 16 21:18:16 1995 H.J. Lu (hjl@gnu.ai.mit.edu) + (applied by kfogel@cyclic.com) + + * import.c (import_descend): We ignore an entry if it is + 1. not a file, nor a link, nor a directory, or + 2. a file and on the ignore list. + + * update.c (ignore_files): We ignore any thing which is + 1. not a file, or + 2. it is a file on the ignore list. + +Sat Dec 16 00:14:19 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (send_to_server): corrected comment. + + * client.h: prototype new func send_to_server(). + + * add.c, admin.c, client.c, commit.c, diff.c, edit.c, history.c, + import.c, log.c, patch.c, release.c, remove.c, rtag.c, status.c, + tag.c, update.c, watch.c: + Use send_to_server() instead of writing directly to to_server. + + * client.c: conditionally include the right stuff for variable arg + lists. + (send_to_server): new func. + +Fri Dec 15 23:10:22 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * error.c: expanded comments. + + * client.c (connect_to_pserver): verbosify errors. + (connect_to_pserver): use send() and recv(), not write() and + read(). Sockets are not file descriptors on all systems. + +Fri Dec 15 22:36:05 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (connect_to_pserver): oops, removed old debugging + printf. + +Fri Dec 15 18:21:16 1995 Karl Fogel (kfogel@floss.cyclic.com) + + * client.c (auth_server_port_number): don't call htons(); + init_sockaddr() does that for us. + (init_sockaddr): zero the sockadder_in struct before doing + anything with it. IBM TCP/IP docs recommend this, and it can't + hurt. + +Fri Dec 15 15:21:53 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (connect_to_pserver): new var `port_number', initialize + with new func auth_server_port_number() and pass to + init_sockaddr(). + (auth_server_port_number): new func. Right now it just returns + `htons (CVS_AUTH_PORT)'. We'll probably add the ability to + specify the port at run time soon, anyway, so having this function + will make that easier. + +Wed Dec 6 18:08:40 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * cvs.h: Add CVSREP. + * find_names.c (find_dirs): Skip CVSREP too. + * fileattr.h, fileattr.c: New files, to manipulate file attributes. + * hash.c (nodetypestring), hash.h (enum ntype): Add FILEATTR. + * hash.c, hash.h (list_isempty): New function. + * recurse.c (do_recursion): Call fileattr_startdir before + processing files in a directory and fileattr_write and + fileattr_free (after files, before recursing). + * watch.c, watch.h: New files, to handle notification features. + * edit.c, edit.h: New file, to handle new read-only checkout features. + * client.c, server.c: Add "Mode" request, to change the mode of a file + when it is checked in. + * main.c (cmds): Add "watch", "edit", "unedit", "watchers", "editors". + * main.c: Split command help from usg into new variable cmd_usage, + which. + (main): Add --help-commands option to print out cmd_usage. + * cvs.h: Declare watch, edit, unedit, watchers, editors. + * client.c, client.h: Add client_watch, client_edit, client_unedit, + client_watchers, client_editors. + * client.c, server.c: Add notification stuff. + * update.c (checkout_file, patch_file), checkin.c (Checkin): Check + _watched attribute when deciding read-only or read-write. + * commit.c (checkaddfile): Call fileattr_newfile to set attributes + on newly created files. + * release.c (release): + * cvs.h: Add CVSADM_NOTIFY and CVSADM_NOTIFYBAK. + * recurse.c (do_recursion): Call notify_check. + * commit.c (commit_fileproc): Call notify_do after committing file. + * client.c (get_responses_and_close): Set to_server and from_server + to NULL so that it is possible to tell whether we are speaking to + the server. + * cvs.h: Add CVSROOTADM_NOTIFY. + * mkmodules.c (main): Add CVSROOTADM_NOTIFY to filelist. + * Makefile.in (SOURCES,OBJECTS,HEADERS): Add new files mentioned above. + * lock.c, cvs.h (lock_tree_for_write, lock_tree_cleanup): New + functions, taken from old commit.c writelock code. As part of + this, fsortcmp and lock_filesdoneproc go from commit.c to lock.c. + So does locklist but it gets renamed to lock_tree_list. + * commit.c: Use lock_tree_*. + +Fri Dec 15 10:37:00 1995 J.T. Conklin <jtc@slave.cygnus.com> + + * tag.c (tag_usage): Added -r and -D flags to usage string. + (tag): Detect when user specifies both -r and -D arguments. + Pass -r and -D arguments to server. + +Thu Dec 14 11:56:13 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (start_rsh_server): use RSH_NEEDS_BINARY_FLAG to + conditionalize "-b" option to "rsh". + + * run.c (filter_stream_through_program): document return value and + error behavior. + + * client.c (filter_through_gunzip): pass the supposedly + superfluous "-d" option to gunzip, to avoid stimulating what seems + to be an argument-passing bug in spawn() under OS/2 with IBM + C/C++. Yucko. + +Wed Dec 13 20:08:37 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * options.h.in (RCSBIN_DFLT): Recommend specifying -b in + inetd.conf for pserver. That is a pretty good solution. + +Wed Dec 13 18:29:59 1995 Preston L. Bannister <pbannister@ca.mdis.com> + and Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (send_modified): make sure that vers and vers->options + are non-NULL before strcmp()'ing them with "-kb". + Initialize `bin' near where it is used, not at beginning of + function. + (update_entries): make sure `options' is non-NULL before + strcmp()'ing with "-kb". + Initialize `bin' near where it is used, not at beginning of + function. + +Tue Dec 12 18:56:38 1995 Karl Fogel <kfogel@totoro.cyclic.com> + + * options.h.in (RCSBIN_DFLT): document the probable need for this + to be set in the authenticating server. + +Tue Dec 12 11:56:43 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * server.c (expand_proc): If mfile is non-NULL, return it too as + part of the expansion. + * sanity.sh (modules): Add tests for above-fixed bug. + +Mon Dec 11 21:39:07 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * dog.c (flea_bath): Take `suds' arg. + All collars changed. + +Mon Dec 11 15:58:47 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * login.c (login): if client password file doesn't exist, create + it, duh. + + * main.c (main): die if CVSroot has access-method but no + username. + + * root.c: added some comments. + + * main.c: removed all code pertaining to the "-a" option. We + specify access-method in CVSroot now. + + * client.c (parse_cvsroot): new var, `access_method'. If CVSroot + is prepended with an access method (i.e., + ":pserver:user@host:/path"), then handle it. + + * login.c (login): use || when checking if CVSroot is "fully + qualified". + Prepend ":pserver:" before writing to ~/.cvspass. + (get_cvs_password): Take no parameters; we'll just use CVSroot to + get the password. + +Mon Dec 11 12:43:35 1995 adamg <adamg@microsoft.com> + + * error.c, client.c, remove.c, main.c: Add explicit casts for some + function pointers to remove warnings under MS VC. + * main.c (main): remove use of NEED_CALL_SOCKINIT in favor of the + more generic INITIALIZE_SOCKET_SUBSYSTEM. Note that the code assumes + that if INITIALIZE_SOCKET_SUBSYSTEM() returns, socket subsystem + initialization has been successful. + +Sat Dec 9 22:01:41 1995 Dan O'Connor <doconnor@tii.com> + + * commit.c (check_fileproc): pass RUN_REALLY flag to run_exec, + because it's okay to examine the file with noexec set. + +Sat Dec 9 20:28:01 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (update_entries): new var, `bin, init to 0. + Use it in determining whether to convert the file. + (send_modified): same as above. + +Fri Dec 8 17:47:39 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * server.c (downcase_string): removed. + (check_repository_password): don't deal with case-insensitivity + anymore. + + * options.h.in (CVS_PASSWORDS_CASE_SENSITIVE): deleted this. No + need for it anymore. + +Thu Dec 7 21:08:39 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * server.c (check_repository_password): when checking for false + prefix-matches, look for ':', not '@'. Duh. + +Thu Dec 7 18:44:51 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * options.h.in (CVS_PASSWORDS_CASE_SENSITIVE): replaces + CVS_PASSWORDS_CASE_INSENSITIVE; passwords are now insensitive by + default. Expanded explanatory comment. + + * login.c (get_cvs_password): Use memset(), not bzero(). I + botched this change earlier. + + * server.c (check_repository_password): no need to check + xmalloc()'s return value. + (check_repository_password): check for false prefix-matches (for + example, username is "theo" and linebuf contains user + "theocracy"). + +Thu Dec 7 14:49:16 1995 Jim Meyering (meyering@comco.com) + + * filesubr.c (isaccessible): Rename from isaccessable. + Update callers. + * cvs.h: Update prototype. + * main.c (main): Update callers. + * server.c (main): Update callers. + +Thu Dec 7 12:50:20 1995 Adam Glass <glass@NetBSD.ORG> + + * cvs.h: "isaccessible" is the correct spelling. + Also add "const" to second arg to make prototype match + declaration. + +Thu Dec 7 11:06:51 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c, login.c: memset() instead of bzero(). + +Thu Dec 7 00:08:53 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * server.c (authenticate_connection): document server's side of + the Authentication Protocol too. + + * client.c (connect_to_pserver): when printing out "unrecognized + response", also print out the offending response. + + * server.c (check_password): take `repository' arg too now. + Call check_repository_password() before checking /etc/passwd. + (check_repository_password): new func. + + * options.h.in (CVS_PASSWORDS_CASE_INSENSITIVE): new define, unset + by default. + +Wed Dec 6 18:51:16 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * server.c (check_password): If user has a null password, then + return 1 if arg is also null. + Reverse sense of return value. Caller changed. + +Wed Dec 6 14:42:57 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * server.c (check_password): new func. + (authenticate_connection): call above new func. + + * login.c (login): use construct_cvspass_filename(). + If CVSroot is not "fully-qualified", then insist the user qualify + it before going on. + (get_cvs_password): fleshed out. Now reads from ~/.cvspass, or + prompts if no appropriate password found. + (construct_cvspass_filename): new func. + + * server.c (authenticate_connection): send ACK or NACK to client. + + * client.c (connect_to_pserver): check for ACK vs NACK response + from server after sending authorization request. + + * login.c (get_cvs_password): new func. + + * client.c (connect_to_pserver): use new func get_cvs_password(). + Prototype it at top of file. Hmmm. + +Wed Dec 6 13:29:22 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * server.c: same as below (AUTH_SERVER_SUPPORT). + + * main.c: same as below (AUTH_SERVER_SUPPORT where appropriate). + + * login.c: same same as below. + + * cvs.h: same as below. + + * client.c: use AUTH_CLIENT_SUPPORT, not CVS_LOGIN. + + * options.h.in (AUTH_CLIENT_SUPPORT, AUTH_SERVER_SUPPORT): these + replace CVS_LOGIN. + +Wed Dec 6 00:04:58 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * server.c (authenticate_connection): expanded comment. + +Tue Dec 5 23:37:39 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (connect_to_pserver): read password from prompt for + now. + + * server.c (authenticate_connection): if the password passes + muster, then don't abort. + +Tue Dec 5 22:46:37 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * subr.c (strip_trailing_newlines): new func. + + * client.c (connect_to_pserver): took out print statements. + + * server.c (authenticate_connection): removed print statments. + Use new func strip_trailing_newlines() to purify `repository', + `username', and `password'. + Run a primitive password check, just for testing. + + * client.c (connect_to_pserver): use CVS_AUTH_PORT. + Take tofdp, fromfdp, and log args. Caller changed. + (get_responses_and_close): either kerberos and CVS_LOGIN might + have one fd for both directions, so adjust #ifdef accordingly. + + * cvs.h (CVS_AUTH_PORT): new define, default to 2401. + Prototype strip_trailing_newlines(). + +Tue Dec 5 16:53:35 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * server.c (authenticate_connection): new func. + + * client.c (init_sockaddr): func moved here from login.c. + (connect_to_pserver): same as above. Take no args, now. + Include <sys/socket.h>, <netinet/in.h>, <netdb.h>, if CVS_LOGIN. + + * cvs.h: Declare use_authenticating_server, as extern int. + Declare connect_to_pserver(). + + * main.c (main): call authenticate_connection(). Removed testing + code. + Add 'a' to the short-option string in the getopt() call. + + * login.c (connect_to_pserver): moved to client.c. + +Tue Dec 5 16:01:42 1995 Peter Chubb <peterc@bookworm.sw.oz.au> + (patch applied by Karl Fogel <kfogel@cyclic.com>) + + * update.c (join_file): if vers->vn_user is "0", file has been + removed on the current branch, so print an error and return. + +Mon Dec 4 14:27:42 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * Version 1.6.3. + +Mon Dec 4 16:28:25 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * release.c (release): add return (0) as last line + + * cvs.h: declare program_path + + * main.c define program_path + (main): set program_path + + * release.c (release): use program_path for update_cmd + +Mon Dec 4 11:22:42 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * Version 1.6.2. + +Sun Dec 3 20:02:29 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * rcs.h (struct rcsnode), rcs.c (freercsnode): Add expand field. + * rcs.h (RCSEXPAND): New #define. + * rcs.c (RCS_reparsercsfile): Record keyword expansion in expand + field of struct rcsnode. + * update.c (checkout_file): Set keyword expansion in Entries file + from rcs file if there is nowhere else to set it from. + * client.c (send_modified, update_entries) [LINES_CRLF_TERMINATED]: + If -kb is in effect, don't convert. + + * update.c (update_file_proc), commit.c (check_fileproc), + rcscmds.c (RCS_merge): Direct stdout to DEVNULL rather than + passing -s option to grep. This avoids trouble with respect to + finding a grep which support -s and whether we should use the (GNU + grep) -q option if it exists. + * options.h.in: Change "@ggrep_path@" to "grep". + +Fri Dec 1 11:53:19 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * rcs.c (RCS_gettag): new parameter return_both force return both + tags: the symbolic and the numeric one. + (RCS_getversion): new parameter return_both is forwarded to + RCS_gettag. + + * rtag.c, tag.c, commit.c, patch.c, update.c: pass 0 as additional + last parameter to RCS_getversion and RCS_gettag + + * rcs.h (RCS_gettag): new parameter return_both. + (RCS_getversion): new parameter return_both. + + * cvs.h (struct vers_ts): add vn_tag slot for symbolic tag name + + * vers_ts.c (Version_TS): call RCS_getversion with 1 for + return_both and split output into vn_rcs and vn_tag + (freevers_ts): free vn_tag + + * update.c (checkout_file): use vn_tag instead of vn_rcs when + calling 'rcs co' to allow rcs expansion of :$Name : + +Thu Nov 30 20:44:30 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (get_responses_and_close): undo previous change + regarding waitpid(). The problem has been solved by modifying + os2/waitpid.c instead of its callers. + +Thu Nov 30 16:37:10 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c: All these changes are for OS/2, which will no longer have + a separate client.c: + (start_kerberos_server): new func, contains code that + used to be in start_server(). + (start_server): moved kerberos code to above function, reorganized + the rest. Added authentication clause. + (call_in_directory): test errno against EACCESS, if EACCESS is + defined (this is for OS/2's oddball mkdir). + (change_mode): don't set execute permission on anything if + EXECUTE_PERMISSION_LOSES is defined. + (get_responses_and_close): if START_RSH_WITH_POPEN_RW, then use + pclose() instead of fclose(). + If waitpid errors with ECHILD, don't die. This is okay. + (start_rsh_server): alternate definition if + START_RSH_WITH_POPEN_RW. + + * main.c: [all these changes conditional on CVS_LOGIN: ] + Don't prototype connect_to_pserver, don't enter it in cmds[] + (actually, it was never in there, I don't know why my previous + change said it was). + (use_authenticating_server): new global var. + (main): if "-a", then set above new var to TRUE. + (usg): document "-a" option. + +Wed Nov 29 12:55:10 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * main.c: Prototype connect_to_pserver(), and enter it in cmds[]. + (main): test some extremely primitive authentication. + + * login.c: Include <sys/socket.h> + (connect_to_pserver): new func. + (init_sockaddr): new func. + +Mon Nov 20 14:07:41 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * Makefile.in (TAGFILES): Separate out from DISTFILES, for C code. + (TAGS,tags): Use TAGFILES not DISTFILES. + +Sun Nov 19 11:22:43 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * recurse.c (do_recursion): Don't call server_pause_check if there + are writelocks around. Revise comment to reflect fact we are no + longer relying on a writelock'd operations being "unable" to + generate enough data to pause. + +Sun Nov 19 10:04:50 1995 Peter Wemm <peter@haywire.DIALix.COM> + + * server.c, server.h, options.h.in: Implement hooks for doing + simple flow control on the server to prevent VM exhaustion on a + slow network with a fast server. + * recurse.c: Call the flow control check at a convenient location + while no locks are active. This is a convenience tradeoff against + accurate flow control - if you have a large directory it will all + be queued up, bypassing the flow control check until the next + directory is processed. + +Sat Nov 18 16:22:06 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c, update.c, vers_ts.c, server.c, rcs.c, lock.c, + ignore.c, entries.c, diff.c, commit.c, checkin.c: + Use new macro `existence_error', instead of comparing errno to + ENOENT directly. + +Fri Nov 17 14:56:12 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (start_server): removed alternate version of this func, + since os2/client.c will now be used under OS/2. + +Thu Nov 16 22:57:12 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (start_server): ifdef HAVE_POPEN_RW, use a different + version of start_server(). This is maybe not the cleanest cut to + make, but it's better than mucking around with yet more #ifdefs in + the middle of the old start_server() function. Once things are + up, I may reposition this code. + +Wed Nov 15 15:33:37 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * main.c (main): ifdef NEED_CALL_SOCKINIT, then call SockInit(). + Only OS/2 needs this initialization. + +Tue Nov 14 18:54:01 1995 Greg A. Woods <woods@most.weird.com> + + * patch.c: + - fix orientation of test for result of getline() call + - use fputs() not printf() when just copying file out + + * cvsbug.sh: + - add space after #! + - new rcs id + - allow version to be edited by Makefile. + + * Makefile.in: + - make Makefile a dependent of all (this might not be perfect, but + it at least gives you a chance to catch up on the second + go-around). + - filter cvsbug.sh in a manner similar to cvsinit.sh to get the + version number set from version.c + +Tue Nov 14 13:28:17 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * sanity.sh: Call old log file check.plog, not check.olog. + + * sanity.sh: Convert remaining tests from old-style ('***' on fail + and nothing on pass), to new-style (FAIL on fail and PASS on pass). + + * sanity.sh: Fix ability to run only some of the tests (always run + tests 1-4.75 to set up repository, document better how it works). + + * sanity.sh: Change "completed successfully" to "completed" in + message--many tests, but not all, exit if they fail. + +Tue Nov 14 15:10:00 1995 Greg A. Woods <woods@most.weird.com> + + * sanity.sh: test 63 doesn't work and probably can't + +Tue Nov 14 12:22:00 1995 Greg A. Woods <woods@most.weird.com> + + * sanity.sh: many minor tweaks: + - make the optional arguments almost work + - use a function 'directory_cmp' instead of 'diff -r' + - fix up a few more tests that weren't working.... + +Mon Nov 13 07:33:55 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * cvs.h: ifdef USE_OWN_POPEN, #include "popen.h". Only OS/2 has + its own popen()/pclose() right now. + +Mon Nov 13 04:06:10 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * cvs.h: conform to 80 column standard (yes, I'm a pedant). + +Sat Nov 11 13:45:13 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * client.c (process_prune_candidates): use unlink_file_dir() to + remove the directory, instead of invoking "rm" via run_exec(). + +Fri Nov 10 14:38:56 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * main.c (main): removed "#define KF_GETOPT_LONG 1", since that + change is no longer in testing. + +Thu Nov 9 20:32:12 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * release.c (release): Use Popen(), not popen(). + +Wed Nov 8 10:20:20 1995 Jim Meyering (meyering@comco.com) + + * entries.c (ParseTag): Remove dcl of unused local. + + * patch.c: Include getline.h. + +Wed Nov 8 11:57:31 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * options.h.in: add configuration option STEXID_SUPPORT (default + is off i.e. old semantics) + + * filesubr.c (isaccessable): new function. Checks access-rights + for files like access(), but is getxid-safe. Falls back to + access() if SETXID_SUPPORT is not enabled. + (isfile): replace stat() by isaccessable(file, F_OK) + (isreadable): replace access() by isaccessable() + (iswritable): ditto + (make_directory): rename local variable buf to sb + + * cvs.h: add prototype for new function isaccessable. + + * server.c (serve_root): replace access() by isaccessable() + + * cvsrc.c (read_cvsrc): replace access() by isreadable() + + * main.c (main): replace access() by isaccessable() + +Wed Nov 8 10:22:41 1995 Greg A. Woods <woods@most.weird.com> + + * entries.c (fgetentent): change definition to static to match the + declaration at the top of the file + +Tue Nov 7 16:59:25 1995 J.T. Conklin <jtc@lestat.cygnus.com> + + * rcs.c (RCS_getbranch, RCS_getdate, RCS_getrevtime, RCS_gettag, + RCS_getversion, RCS_head): Use assert() instead of attempting to + "do the right thing" with a bogus RCSNode argument. + +Mon Nov 6 14:24:34 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * vers_ts.c: Remove ctime define. It is just asking for trouble. + +Mon Nov 6 11:58:26 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * vers_ts.c: ifdef ctime, undef it before redefining it. It is a + macro on some systems. + + * lock.c: don't prototype ctime() here. (See note below about + fgetentent() in entries.c.) + +Sun Nov 5 16:06:01 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * entries.c (fgetentent): don't prototype ctime here; we include + cvs.h, which includes system.h, which includes <time.h> + unconditionally (either as <time.h> or <sys/time.h>). Anyway, IBM + C/C++ chokes on mid-function, or even mid-file, prototypes. Sigh. + +Thu Nov 2 21:51:04 1995 Dan Wilder <dan@gasboy.com> + + * rtag.c (rtag): Fix typo ("-T" -> "-F"). + +Tue Oct 31 19:09:11 1995 Dan Wilder <dan@gasboy.com> + + * diff.c (diff_dirproc): just return R_SKIP_ALL if dir not exist. + (diff_file_nodiff): don't complain if file doesn't exist, just + ignore. + +Tue Oct 31 09:25:10 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * sanity.sh: Use absolute pathname for mkmodules. + +Sat Oct 28 01:01:41 1995 Jim Meyering (meyering@comco.com) + + * entries.c (ParseTag): Use getline instead of fgets. + +Fri Oct 27 13:44:20 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * cvs.h: do nothing about alloca ifdef ALLOCA_IN_STDLIB. I am + rather suspicious of this solution, and will not be surprised to + find out that there's a Right Way to handle this situation ("this + situation" being that OS/2 simply declares alloca in <stdlib.h>). + Suggestions are welcome; see src/cvs.h and lib/system.h to see why + I was getting a conflict in the first place. + +Wed Oct 25 16:03:20 1995 J.T. Conklin <jtc@slave.cygnus.com> + + * cvs.h (struct entnode): Add user field. + * entries.c (fputentent): New function, write entries line. + (write_ent_proc): Call fputentent to write entries line. + (Entnode_Create): New function, construct new Entnode. + (Entnode_Destroy): New function, destruct old Entnode. + (AddEntryNode): Changed to take an Entnode argument instead of + separate user, version, timestamp, etc. arguments. + (fgetentent): Changed to return Entnode. + (struct entent, free_entent): Removed. + +Wed Oct 25 12:44:32 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * admin.c (admin): Don't rely on ANSI C string concatenation; + SunOS 4.1.3 /bin/cc doesn't support it. + +Tue Oct 24 22:34:22 1995 Anthony J. Lill <ajlill@ajlc.waterloo.on.ca> + + * import.c (expand_at_signs): Check errno as well as return value + from putc. Some systems bogusly return EOF when successfully + writing 0xff. + +Tue Oct 24 14:32:45 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * admin.c (admin): use getcaller() instead of getpwuid + + * subr.c (getcaller): prefer getlogin() to $USER and $LOGNAME + (especially useful for NT where getuid always returns 0) + +Tue Oct 24 06:22:08 1995 Jim Meyering (meyering@comco.com) + + * cvsrc.c (read_cvsrc): Use getline instead of fgets. + * patch.c (patch_fileproc): Use getline instead of fgets. + + * entries.c (fgetentent): Use getline instead of fgets. + Use xmalloc to allocate space for each returned entry. + Since LINE is no longer static, save it in struct entent. + (struct entent): New member, line. + (free_entent): New function. + (Entries_Open): Call it after each call to fgetentent. + +Tue Oct 24 11:13:15 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * cvs.h: Declare valloc again, but this time with the right + signature (also changed in libs/valloc.c) + +Mon Oct 23 12:17:03 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * logmsg.c (do_editor): Check for errors from stdio calls. + +Mon Oct 23 12:37:06 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * cvs.h: Don't declare valloc. Some systems (e.g. linux) declare + it in stdlib.h in a conflicting way. + +Mon Oct 23 08:41:25 1995 Jim Meyering (meyering@comco.com) + + * commit.c (commit_filesdoneproc): Use getline instead of fgets. + + * logmsg.c (do_editor): Use getline instead of fgets. + (rcsinfo_proc): Likewise. + + * logmsg.c (do_editor): Lose if fclose of temp file output + stream fails. + +Mon Oct 23 11:59:41 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * cvs.h: add valloc declaration + + * server.h: add server_cleanup prototype + + * server.c: remove server_cleanup prototype + + * mkmodules.c (server_cleanup): fix parameter type + + * server.c: encapsulate wait_sig in #ifdef sun (it's only used in + code which is also encapsulated in #ifdef sun) + + * rcscmds.c (RCS_deltag, RCS_lock): add definition of noerr + parameter + + * error.c: include cvs.h instead of config.h, add USE(rcsid) + + * error.c (error): fix parameter type + + * update.c (join_file): encapsulate recent changes from garyo + within #ifdef SERVER_SUPPORT + +Sun Oct 22 13:47:53 1995 J.T. Conklin <jtc@slave.cygnus.com> + + * client.c (update_entries): Fix memory leak; free mode_string and + file_timestamp. + (send_fileproc): Fix memory leak; call freevers_ts before exiting. + + * module.c (do_module): Partially fix memory leak; added + variable so that the address of memory allocated by line2argv + is retained, but comment out the call to free_names. Freeing + the vector at that point loses because some of the elements + may be used later in the function. + (cat_module): fix memory leak. + + * recurse.c (start_recursion): Fix memory leak; free return + value of Name_Repository after it has been used. + +Sat Oct 21 23:24:26 1995 Jim Meyering (meyering@comco.com) + + * client.c (send_modified) [LINES_CRLF_TERMINATED]: Comment text + after #endif. + +Fri Oct 20 14:41:49 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * sanity.sh: Add test 87a, to test for bug fixed by garyo in + change below. + +Fri Oct 20 10:59:58 1995 Gary Oberbrunner <garyo@darkstar.avs.com> + + * update.c (join_file): send file back to client even if no + conflicts were detected, by calling Register(). + +Fri Oct 20 10:46:45 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * lock.c: Add prototype for Check_Owner + +Thu Oct 19 16:38:14 1995 Jim Meyering (meyering@comco.com) + + * lock.c (Check_Owner): Declare function `static int'. + +Thu Oct 19 14:58:40 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * expand_path.c (expand_variable): Fix typo ('*'->'('). + +Thu Oct 19 14:58:40 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * commit.c (commit_filesdoneproc): Check for errors from fopen, + fgets, and fclose. + + * rcscmds.c (RCS_merge): Remove comment about rcsmerge -E. + Hacking CVS was never a very good solution; the situation is fixed + in RCS 5.7, and is documented in ../INSTALL. + +Thu Oct 19 15:06:15 1995 Jim Meyering (meyering@comco.com) + + * filesubr.c (xchmod): Parenthesize arithmetic in operand of | + to placate gcc -Wall. + + * expand_path.c (expand_path): Parenthesize assignments used as + truth values to placate gcc -Wall. + + * commit.c (checkaddfile): Remove dcls of unused variables. + * lock.c (unlock): Remove dcl of unused variable. + +Thu Oct 19 14:58:40 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * root.c (Create_Root): If noexec, don't create CVS/Root. + +Wed Oct 18 11:19:40 1995 J.T. Conklin <jtc@slave.cygnus.com> + + * lock.c (unlock): Change order of comparison so that Check_Owner + is called only if other conditions are true. This performance + enhancement was broken when the AFS support was added. + +Wed Oct 18 12:51:33 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * main.c (main): check if argv[0] is "pserver" with else-if, not + if, since we've already asked if it's "kserver". + +Tue Oct 17 18:09:23 1995 Warren Jones <wjones@tc.fluke.com> + and Jim Kingdon <kingdon@harvey.cyclic.com> + + * sanity.sh: Deal with supplying a relative cvs filename, or + with a cvs filename which doesn't have basename "cvs". + +Mon Oct 16 15:58:31 1995 Vince Demarco <vdemarco@bou.shl.com> + + * parseinfo.c (Parse_Info): if the Keyword isn't ALL the current + version doesn't use the expanded variable, It should. + +Mon Oct 16 15:58:31 1995 Gary Oberbrunner <garyo@avs.com> + and Jim Kingdon <kingdon@harvey.cyclic.com> + + * server.c (server_register): Don't pass NULL to printf if tag, + date, or conflict is NULL. + +Thu Oct 12 12:13:42 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * main.c (main): begin to handle "pserver"; support not complete + yet, however. + +Thu Oct 12 02:52:13 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * expand_path.c: Don't #include <pwd.h>, since cvs.h already does, + and not all systems' <pwd.h>s are protected from multiple inclusion. + * login.c: Likewise. + +Wed Oct 11 15:23:24 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * login.c (login): handle everything correctly now. + +Wed Oct 11 12:02:48 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * rcs.c (RCS_gettag): support RCS keyword Name + +Tue Oct 10 19:11:16 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * options.h.in (CVS_LOGIN): discuss, but leave commented out. + The "cvs login" command is still under construction; however, the + repository was changing so fast that instead of creating a branch + and dealing with the attendant hair, I'm just developing on the + trunk, making sure that everything is surrounded by "#ifdef + CVS_LOGIN ... #endif" so I don't get in anyone's way. + + * login.c: include cvs.h before checking CVS_LOGIN, so it has a + chance to get defined before we ask if it's defined. + (login): oops, use semi not comma in `for' loop init. + + * Makefile.in (SOURCES, OBJECTS): include login.c, login.o. + + * main.c: added protoype for login(). + Added "login" entry to cmds[]. + (usg): added line about "login". + + * login.c: new file. + +Tue Oct 10 18:33:47 1995 Karl Fogel <kfogel@totoro.cyclic.com> + + * Makefile.in (COMMON_OBJECTS): added error.o. + (OBJECTS): took error.o out; it's in COMMON_OBJECTS now. + +Tue Oct 10 12:02:37 1995 Thorsten Lockert <tholo@sigmasoft.com> + + * cvsbug.sh: Cater to lame versions of sh (4.4BSD ash) by using + ${foo-bar} instead of `if....`. + +Tue Oct 10 12:02:37 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * remove.c (remove_fileproc): If noexec, don't remove file. Check + for error when removing file. + +Sun Oct 8 12:32:15 1995 Peter Wemm <peter@haywire.DIALix.COM> + + * run.c: detect/use POSIX/BSD style reliable signals for critical + section masking etc. Helps prevent stray locks on interruption. + +Sat Oct 7 23:26:54 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * admin.c (admin): If group CVS_ADMIN_GROUP exists, allow only + users in that group to use "cvs admin". + * options.h.in: Default CVS_ADMIN_GROUP to "cvsadmin". + +Sat Oct 7 23:05:24 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * add.c, checkout.c, commit.c, cvs.h, filesubr.c, import.c, + lock.c, main.c, modules.c, options.h.in: New variable cvsumask + which is used to set mode of files in repository (regardless of + umask in effect when cvs is run). + +Sat Oct 7 22:40:17 1995 Stephen Bailey <sjbailey@sand.npl.washington.edu> + + * lock.c: Include AFSCVS ifdefs to deal with AFS's lack of + correspondance between userid's from stat and from geteuid. + +Sat Oct 7 22:28:49 1995 Scott Carson <sdc@TracerTech.COM> + + * add.c (add): Pass -ko, not -k -ko, to set keyword expansion options. + + * admin.c (admin): Don't skip first argument when sending to server. + +Fri Oct 6 21:45:03 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * version.c: Version 1.6.1. + +Fri Oct 6 21:31:28 1995 Jeff Johnson <jbj@brewster.jbj.org> + + * cvs.h, admin.c, client.c, commit.c, log.c, modules.c, + parseinfo.c, patch.c, recurse.c, rtag.c, status.c, tag.c: + Prototype when dealing in pointers to functions. + +Fri Oct 6 21:07:22 1995 Mark H. Wilkinson <mhw@minster.york.ac.uk> + + * cvsrc.c (read_cvsrc): fix look up of command names in cvsrc file + to use full name from command table rather than possible nickname + in argv. Fixes errors with things like `cvs di' when cvsrc has + `diff -u5' in it. + +Thu Aug 3 01:03:52 1995 Vince DeMarco <vdemarco@bou.shl.com> + + * parseinfo.c (Parse_Info): Add code to call expand_path function + instead of using built in code. + + * wrapper.c (wrap_add): Add code to call expand_path function to + expand all built in variables. + + * expand_path.c (New file): expand things that look like + environmental variables (only expand local CVS environmental + variables) and user names like ~/. + * cvs.h: Declare expand_path. + + * Makefile.in (SOURCES, OBJECTS): Added expand_path.c, + expand_path.o. + +Fri Oct 6 14:03:09 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * ignore.c (ign_setup): Don't try to look for a file in CVSroot if + client. (The recent tightening of the error checking detects this). + + * commit.c (checkaddfile): Don't try to pass options if it is "". + +Thu Oct 5 18:04:46 1995 Karl Fogel <kfogel@totoro.cyclic.com> + + * sanity.sh: unset CVSREAD, since it causes the script to bomb. + +Thu Oct 5 18:29:17 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * remove.c, add.c, commit.c, cvs.h: Remove CVSEXT_OPT stuff; it + has been broken for ages and the options are already stored in the + Entries file. + +Thu Oct 5 18:20:13 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * commit.c (checkaddfile): New argument options; pass it to RCS. + (commit_fileproc): Pass it. + +Tue Oct 3 09:26:00 1995 Karl Fogel <kfogel@totoro.cyclic.com> + + * version.c: upped to 1.6. + +Mon Oct 2 18:10:35 1995 Larry Jones <larry.jones@sdrc.com> + + * server.c: if HAVE_SYS_BSDTYPES_H, include <sys/bsdtypes.h>. + +Mon Oct 2 10:34:53 1995 Karl Fogel <kfogel@totoro.cyclic.com> + + * version.c: Upped version to 1.5.95. + +Mon Oct 2 15:16:47 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * tag.c, rtag.c: pass "mov" instead of "add" if tag will be moved + (i.e. invoked with -F) + +Sun Oct 1 18:36:34 1995 Karl Fogel <kfogel@totoro.cyclic.com> + + * version.c: upped to 1.5.94. + + * server.c: reverted earlier ISC change (of Sep. 28). + + * version.c: upped to 1.5.93, for Peter Wemm's new SVR4 patch. + +Sun Oct 1 14:51:59 1995 Harlan Stenn <Harlan.Stenn@pfcs.com> + + * main.c: don't #include <pwd.h>; cvs.h does that already. + +Fri Sep 29 15:21:35 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * version.c: upped to 1.5.91 for another pre-1.6 release. + +Fri Sep 29 14:41:14 1995 <bmeier@rzu.unizh.ch> + + * root.c: start rcsid[] with "CVSid". + +Fri Sep 29 13:22:44 1995 Jim Blandy <jimb@totoro.cyclic.com> + + * diff.c (diff): Doc fix. + +Fri Sep 29 14:32:36 1995 Norbert Kiesel <nk@col.sw-ley.de> + + * repos.c (Short_Repository): chop superfluous "/". + + * tag.c (pretag_proc): correct user-visible string. + + * rtag.c (pretag_proc): correct user-visible string. + +Fri Sep 29 13:45:36 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * cvs.h (USE): if __GNUC__ != 2, expand to a dummy var instead of + nothing. + +Thu Sep 28 13:37:05 1995 Larry Jones <larry.jones@sdrc.com> + + * server.c: ifdef ISC, include <sys/bsdtypes.h>. + +Fri Sep 29 07:54:22 1995 Mike Sutton <mws115@llcoolj.dayton.saic.com> + + * filesubr.c (last_component): Don't use ANSI style declaration. + +Wed Sep 27 15:24:00 1995 Del <del@matra.com.au> + + * tag.c, rtag.c: Pass a few extra options to the script + named in taginfo (del/add, and revision number). + + * tag.c: Support a -r option (at long last). Also needs + a -f option to tag the head if there is no matching -r tag. + +Tue Sep 26 11:41:08 1995 Karl Fogel <kfogel@totoro.cyclic.com> + + * version.c: Upped version to 1.5.89 for test release preceding + 1.6. + +Wed Sep 20 15:32:49 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * ignore.c (ign_add_file): Check for errors from fopen and fclose. + +Tue Sep 19 18:02:16 1995 Jim Blandy <jimb@totoro.cyclic.com> + + * Makefile.in (DISTFILES): Remove sanity.el from this list; the + file has been deleted. + +Thu Sep 14 14:17:52 1995 Peter Wemm <peter@haywire.dialix.com> + + * import.c: Recover from being unable to open the user file. + + * update.c (join_file): Print a message in the case where the file + was added. + + * mkmodules.c: Deal with .db as well as .pag/.dir (for use with + BSD 4.4 and real dbm support). + +Mon Sep 11 15:44:13 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * release.c (release): Revise comment regarding why and how we + skip argv[0]. + +Mon Sep 11 10:03:59 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * release.c (release): use return value of pclose to determine + success of update. + +Mon Sep 11 09:56:33 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * release.c (release_delete): Fix comment. + +Sun Sep 10 18:48:35 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * release.c (release): made work with client/server. + Don't ask if <arg> is mentioned in `modules'. + +Fri Sep 8 13:25:55 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * sanity.sh: When committing a removal, send stdout to LOGFILE; + this is no longer a silent operation. + + * sanity.sh: Remove OUTPUT variable; it is unused. + + * client.c: Add comment regarding deleting temp file. + * main.c: Add comment regarding getopt REQUIRE_ORDER. + +Thu Sep 7 20:24:46 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * main.c (main): use getopt_long(), accept "--help" and + "--version". + Don't assume EOF is -1. + +Thu Sep 7 19:18:00 1995 Jim Blandy <jimb@cyclic.com> + + * cvs.h (unlink_file_dir): Add prototype for this. + +Thu Sep 7 14:38:06 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * ALL FILES: add semicolon, as indicated below. + + * cvs.h (USE): don't provide semicolon in the expansion of the USE + macro; we'd rather the callers provided it themselves because that + way etags doesn't get fooled. + +Mon Sep 4 23:30:41 1995 Magnus Hyllander <mhy@os.se> + + * checkout.c: cvs export now takes -k option and does not default + to -kv. + * checkout.c, cvs.h, modules.c: Modules file now takes -e option + for cvs export. + +Mon Sep 4 23:30:41 1995 Kirby Koster <koster@sctc.com> + + * commit.c: When committing a removal, print a message saying what + we are doing. + +Wed Aug 2 10:06:51 1995 Vince DeMarco <vdemarco@bou.shl.com> + + * server.c: fix compiler warnings (on NeXT) (declare functions as + static inline instead of just static) functions: get_buffer_date, + buf_append_char, and buf_append_data + +Mon Sep 4 22:31:28 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * client.c (update_entries), import.c (expand_at_signs): Check for + errors from fread and putc. + +Fri Sep 1 00:03:17 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * sanity.sh: Fix TODO item pathname. + + * sanity.el: Removed. It was out of date, didn't do much, and I + doubt anyone was using it. + + * no_diff.c (No_Difference): Don't change the modes of the files. + +Thu Aug 31 13:14:34 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * version.c: Change version to 1.5.1. + + * client.c (start_rsh_server): Don't pass -d to "cvs server" + invocation via rsh (restore change which was lost when NT stuff + was merged in). + * sanity.sh: Add TODO item suggesting test for bug which this fixes. + +Wed Aug 30 12:36:37 1995 Jim Blandy <jimb@totoro.cyclic.com> + + * sanity.sh (basic1): Make sure first-dir is deleted before + running this set of tests. + + * subr.c: Extract file twiddling functions to a different file, + because we want to use different versions of many of these + routines under Windows NT. + (copy_file, isdir, islink, isfile, isreadable, iswritable, + open_file, make_directory, make_directories, xchmod, + rename_file, link_file, unlink_file, xcmp, tmpnam, + unlink_file_dir, deep_remove_dir): Moved to... + * filesubr.c: ...this file, which is new. + * Makefile.in (SOURCES): Mention filesubr.c. + (COMMON_OBJECTS): Mention filesubr.o. + + * subr.c: Extract process execution guts to a different file, + because we want to replace these routines entirely under + Windows NT. + (VA_START, va_alist, va_dcl): Move this stuff... + (run_add_arg, run_init_prog): and these declarations... + (run_prog, run_argv, run_argc, run_argc_allocated): and these + variables... + (run_setup, run_arg, run_args, run_add_arg, run_init_prog, + run_exec, run_print, Popen): and these functions... + * run.c: To this file, which is new. + * Makefile.in (SOURCES): Mention run.c. + (COMMON_OBJECTS): Mention run.o. + + * status.c (status): Call ign_setup, if client_active. Otherwise, + we don't end up ignoring CVS directories and such. + + * server.c (mkdir_p, dirswitch): Use CVS_MKDIR instead of mkdir. + + * repos.c (Name_Repository): Use the isabsolute function instead of + checking the first character of the path. + * root.c (Name_Root): Same. + + * release.c (release): Use fncmp instead of strcmp to compare + filenames. + + * rcs.c (RCS_parse, RCS_parsercsfile) [LINES_CRLF_TERMINATED]: + Abort, because we have strong reason to believe this code is + wrong. + + * patch.c (patch): Register signal handlers iff the signal name is + #defined. + + * no_diff.c (No_Difference): Don't try to include server_active in + trace message unless SERVER_SUPPORT is #defined. + + * modules.c (do_module): Use CVS_MKDIR instead of mkdir. + + * mkmodules.c (main): Call last_component instead of writing it out. + + * main.c (main): Call last_component instead of writing it out. + Break up the long copyright string into several strings; Microsoft + Visual C++ can't handle a line that long. Feh. + Use fncmp instead of strcmp to compare filenames. + Register signal handlers iff the signal name is #defined. + + * lock.c (readers_exist): Don't check return value of closedir. + Most of the rest of the code doesn't, and some systems don't + provide a return value anyway. + (set_lock): Use CVS_MKDIR instead of mkdir. + + * import.c (import): Use the isabsolute function instead of + checking the first character of the path. + Try to delete the temporary file again after we close it, so it'll + get deleted on systems that don't let you delete files that are + open. + (add_rev): Instead of making a hard link to the working file and + checking in the revision with ci -r, use ci -u and restore the + permission bits. + (comtable): Include lines from SYSTEM_COMMENT_TABLE, if it is + #defined. + (add_rcs_file) [LINES_CRLF_TERMINATED]: Abort, because we have + strong reason to believe this code is wrong. + (import_descend_dir): Use CVS_MKDIR instead of mkdir. + + * history.c (read_hrecs): Open the file with OPEN_BINARY. + + * find_names.c (add_entries_proc, fsortcmp): Add prototypes. + * entries.c (write_ent_proc): Add prototype. + * hash.c (walklist): Add prototype for PROC argument. + (sortlist): Add prototype for COMP argument. + (printnode): Add a prototype, and make it static. + + * cvs.h (wrap_add_file, wrap_add): Add extern decls for these; + they're used in import.c and update.c. + * wrapper.c (wrap_add_file, wrap_add): Remove them from here. + + * cvs.h (RUN_NORMAL, RUN_COMBINED, RUN_REALLY, RUN_STDOUT_APPEND, + RUN_STDERR_APPEND, RUN_SIGNIGNORE, RUN_TTY, run_arg, run_print, + run_setup, run_args, run_exec, Popen, piped_child, close_on_exec, + filter_stream_through_program, waitpid): Move all these + declarations and definitions to the same section. + + * cvs.h (error_set_cleanup): Fix prototype. + + * cvs.h (isabsolute, last_component): New extern decls. + + * cvs.h (link_file): Function is deleted; remove extern decl. + + * cvs.h (DEATH_STATE, DEATH_SUPPORT): Move #definitions of these + above the point where we #include rcs.h, since rcs.h tests them + (or DEATH_SUPPORT, at least). + + * cvs.h (DEVNULL): #define this iff it isn't already #defined. + config.h may want to override it. + + * cvs.h (SERVER_SUPPORT, CLIENT_SUPPORT): Don't #define these + here; let config.h do that. On some systems, we don't have any + server support. + + * cvs.h: Don't #include <io.h> or <direct.h>; we take care of + those in lib/system.h. + + * commit.c (commit): Open logfile with the OPEN_BINARY flag. + (precommit_proc): Use the isabsolute function, instead of + comparing the first character with /. + (remove_file, checkaddfile): Use CVS_MKDIR instead of mkdir. + + * client.c (send_repository): Use larger line buffers. + + * client.c [LINES_CRLF_TERMINATED] (update_entries): If we've just + received a gzipped file, copy it over, converting LF to CRLF, + instead of just renaming it into place. + [LINES_CRLF_TERMINATED] (send_modified): Convert file to LF format + before sending with gzip. + (send_modified): Don't be disturbed if we get fewer than + sb.st_size characters when we read. The read function may be + collapsing CRLF to LF for us. + + * client.c: Add forward declarations for all the cvs command + functions we call. + + * client.c: Add forward static declarations for all the + handle_mumble functions. + + On some systems, RSH converts LF to CRLF; this screws us up. + * client.c (rsh_pid): Declare this iff RSH_NOT_TRANSPARENT is not + #defined. + (get_responses_and_close): Use SHUTDOWN_SERVER if it is #defined. + Only wait for rsh process to exit if RSH_NOT_TRANSPARENT is not + #defined. + (start_rsh_server): Declare and define only if + RSH_NOT_TRANSPARENT is not #defined. Use piped_child, instead of + writing all that out. + (start_server): Only try to call start_rsh_server if + RSH_NOT_TRANSPARENT is not #defined. Use START_SERVER if it is + #defined. Convert file descriptors to stdio file pointers using + the FOPEN_BINARY_WRITE and FOPEN_BINARY_READ strings. + + * client.h (rsh_pid): Don't declare this; it's never used elsewhere. + (supported_request): Add external declaration for this; + it's used in checkout.c. + + Move process-running functions to run.c; we need to totally + replace these on other systems, like Windows NT. + * client.c (close_on_exec, filter_stream_through_program): Moved + to run.c. + * run.c (close_on_exec, filter_stream_through_program): Here they + are. + + * add.c (add_directory): Use CVS_MKDIR instead of straight mkdir. + * checkout.c (checkout, build_dirs_and_chdir): Same. + (checkout_proc): Use fncmp instead of strcmp. + * client.c (call_in_directory): Use CVS_MKDIR instead of straight + mkdir. + + * client.c (handle_checksum): Cast return value of strtol. + +Wed Aug 30 10:35:46 1995 Stefan Monnier <stefan.monnier@epfl.ch> + + * main.c (main): Allow -d to override CVSROOT_ENV. + +Thu Aug 24 18:57:49 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * cvs.h, rcscmds.c (RCS_unlock, RCS_deltag, RCS_lock): Add extra + parameter for whether to direct stderr to DEVNULL. + * checkin.c, tag.c, rtag.c, import.c, commit.c: Pass extra + argument. 1 if stderr had been directed to DEVNULL before + rcscmds.c was in use, 0 if it was RUN_TTY. + + * cvs.h: Add comment regarding attic. + +Tue Aug 22 10:09:29 1995 Alexander Dupuy <dupuy@smarts.com> + + * rcs.c (whitespace): Cast to unsigned char in case char is signed + and value is negative. + +Tue Aug 22 10:09:29 1995 Kirby Koster <koster@sctc.com> + and Jim Kingdon <kingdon@harvey.cyclic.com> + + * update.c (join_file): If vers->vn_user is NULL, just return. + +Tue Aug 22 10:09:29 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * server.c, client.c: Add comments about modes and umasks. + +Mon Aug 21 12:54:14 1995 Rick Sladkey <jrs@world.std.com> + + * update.c (update_filesdone_proc): If pipeout, don't try to + create CVS/Root. + +Mon Aug 21 12:54:14 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * client.c (start_rsh_server): Don't pass -d to "cvs server" + invocation via rsh. + + * server.c (serve_root): Report errors via pending_error_text. + (serve_valid_requests): Check for pending errors. + +Sun Aug 20 00:59:46 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * options.h.in: Document usage of DIFF in update.c + * update.c: Use DIFF -c, not DIFF -u. The small improvement in + diff size is not worth the hassle in terms of everyone having to + make sure that DIFF is GNU diff (IMHO). + +Sat Aug 19 22:05:46 1995 Jim Blandy <jimb@totoro.cyclic.com> + + * recurse.c (start_recursion): Doc fix. + + * server.c (do_cvs_command): Clear error_use_protocol in the + child. + (server): Set error_use_protocol. + +Sun Aug 13 15:33:37 1995 Jim Kingdon <kingdon@harvey.cyclic.com> + + * server.c (do_cvs_command): Don't select on exceptions. + +Fri Aug 4 00:13:47 1995 Jim Meyering (meyering@comco.com) + + * Makefile.in (LDFLAGS): Set to @LDFLAGS@. + (options.h): Depend on ../config.status and options.h.in. + Add rule to build it from dependents. + + * add.c: Include save-cwd.h. + (add_directory): Use save_cwd and restore_cwd instead of + explicit getwd then chdir. + * import.c (import_descend_dir): Likewise. + * modules.c (do_module): Likewise. + + * recurse.c (save_cwd, restore_cwd, free_cwd): Remove functions. + New versions have been broken out into save-cwd.c. + (do_dir_proc): Adapt to handle status code returned by new versions + of save_cwd and restore_cwd -- and one fewer argument to restore_cwd. + (unroll_files_proc): Likewise. + + * wrapper.c (wrap_name_has): Add default: abort () to switch + statement to avoid warning from gcc -Wall. + (wrap_matching_entry): Remove dcl of unused TEMP. + (wrap_tocvs_process_file): Remove dcl of unused ERR. + (wrap_fromcvs_process_file): Likewise. + + * cvs.h: Remove prototype for error. Instead, include error.h. + Also, remove trailing white space. + +Thu Aug 3 10:12:20 1995 Jim Meyering (meyering@comco.com) + + * import.c (import_descend_dir): Don't print probably-bogus CWD + in error messages saying `cannot get working directory'. + +Sun Jul 30 20:52:04 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * parseinfo.c (Parse_Info): Revise comments and indentation. + +Sun Jul 30 15:30:16 1995 Vince DeMarco <vdemarco@bou.shl.com> + + * history.c: put ifdef SERVER_SUPPORT around tracing code incase + the client/server code is not compiled into the program. + +Sat Jul 29 16:59:49 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * subr.c (deep_remove_dir): Use struct dirent, not struct direct. + +Sat Jul 29 18:32:06 1995 Vince DeMarco <vdemarco@bou.shl.com> + + * add.c: Check wrap_name_has. + + * diff.c, checkin.c, import.c: have code call unlink_file_dir in + the appropriate places instead of just calling unlink_file. + + * checkin.c: Remove one unlink call. + + * import.c (comtable): Add .m .psw .pswm. + + * import.c (add_rcs_file): Remove tocvsPath before returning. + + * subr.c (unlink_file_dir): Add new function. unlinks the file if + it is a file. or will do a recursive delete if the path is + actually a directory. + (deep_remove_dir): New function, helps unlink_file_dir. + + * mkmodules.c: Added CVSROOTADM_WRAPPER (cvswrappers file) to the + checkout file list. + +Fri Jul 28 16:27:56 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * checkout.c (safe_location): Use PATH_MAX not MAXPATHLEN. + +Fri Jul 28 19:37:03 1995 Paul Eggert <eggert@twinsun.com> + + * log.c (cvslog, log_fileproc): Pass all options (except -l) + to rlog as-is, so that users can put spaces in options, + can specify multiple -d options, etc. + (ac, av): New variables. + (log_option_with_arg, options): Remove. + + (log_fileproc): Don't prepend `/' to file name if update_dir is empty. + +Tue Jul 25 00:52:26 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * checkout.c (safe_location): Don't use PROTO in function definition. + +Mon Jul 24 18:32:06 1995 Vince DeMarco <vdemarco@bou.shl.com> + + * checkout.c (safe_location): fix a compiler warning. (Declare + safe_location). Changed code in safe_location to call getwd + instead of getcwd. getwd is declared in the ../lib directory and + used exclusively thoughout the code. (this helps portability on + non POSIX systems). + + * wrapper.c: updated Andrew Athan's email address. + + * main.c: fix an ifdef so the code will compile. syntax error in + the ifdef for CVS_NOADMIN. + +Mon Jul 24 13:25:00 1995 Del <del@babel.dialix.oz.au> + + * checkout.c: New procedure safe_location. + Ensures that you don't check out into the repository + itself. + + * tag.c, rtag.c, cvs.h, mkmodules.c: Added a "taginfo" file in + CVSROOT to perform pre-tag checks. + + * main.c, options.h.in: Added a compile time option to + disable the admin command. + +Fri Jul 21 17:07:42 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * update.c, status.c, patch.c, checkout.c, import.c, release.c, + rtag.c, tag.c: Now -q and -Q options just print an error message + telling you to use global -q and -Q options. The non-global + options were a mess because some commands accepted them and some + did not, and they were redundant with -q and -Q global options. + + * rcs.c, cvs.h, commit.c, log.c, find_names.c: Remove CVS.dea + stuff. It is slower than the alternatives and I don't think + anyone ever actually used it. + +Fri Jul 21 10:35:10 1995 Vince DeMarco <vdemarco@bou.shl.com> + + * Makefile.in (SOURCES, OBJECTS): Add wrapper.c, wrapper.o. + * add.c, admin.c, checkout.c, commit.c, diff.c, import.c, log.c, + remove.c, status.c: Call wrap_setup at start of commands. + * add.c (add): Check for wrapper, as well as directory, in repository. + * checkin.c: Add tocvsPath variable and associated handling. + * cvs.h: Add wrapper declarations. + * diff.c: Add tocvsPath variable and associated handling. + * import.c: Add -W option, CVSDOTWRAPPER handling. + (import_descend): check wrap_name_has. + (update_rcs_file, add_rev, add_rcs_file): add tocvsPath + variable and associated handling. + * no_diff.c: Add tocvsPath variable and associated handling. + * recurse.c (start_recursion): Check wrap_name_has. + * update.c: Copy, don't merge, copy-by-merge files. Attempt to + use -j on a copy-by-merge file generates a warning and no further + action. + * update.c: Add CVSDOTWRAPPER handling. + * wrapper.c: Added. + +Fri Jul 21 00:20:52 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * client.c: Revert David Lamkin patch, except for the bits about + removing temp_filename and the .rej file. + * sanity.sh (errmsg1): Test for the underlying bug which Lamkin + kludged around. + * client.c (call_in_directory): Set short_pathname to include the + filename, not just the directory. Improve comments regarding what + is passed to FUNC. + +Thu Jul 20 17:51:54 1995 David Lamkin <drl@net-tel.co.uk> + + * client.c (short_pathname): Fixes the fetching of the whole file + after a patch to bring it up to date has failed: + - failed_patches[] now holds short path to file that failed + - patch temp files are unlinked where the patch is done + +Thu Jul 20 12:37:10 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * cvs.h: Declare error_set_cleanup + * main.c: Call it. + (error_cleanup): New function. + +Thu Jul 20 12:17:16 1995 Mark H. Wilkinson <mhw@minster.york.ac.uk> + + * add.c, admin.c, checkin.c, checkout.c, classify.c, client.c, + client.h, commit.c, create_adm.c, cvs.h, diff.c, entries.c, + history.c, import.c, log.c, main.c, modules.c, no_diff.c, patch.c, + release.c, remove.c, repos.c, rtag.c, server.c, server.h, + status.c, subr.c, tag.c, update.c, vers_ts.c, version.c: Put + client code inside #ifdef CLIENT_SUPPORT, server code inside + #ifdef SERVER_SUPPORT. When reporting version, report whether + client and/or server are compiled in. + +Wed Jul 19 18:00:00 1995 Jim Blandy <jimb@cyclic.com> + + * subr.c (copy_file): Declare local var n to be an int, + not a size_t. size_t is unsigned, and the return values + of read and write are definitely not unsigned. + + * cvs.h [HAVE_IO_H]: #include <io.h>. + [HAVE_DIRECT_H]: #include <direct.h>. + +Fri Jul 14 22:28:46 1995 Jim Blandy <jimb@totoro.cyclic.com> + + * server.c (dirswitch, serve_static_directory, serve_sticky, + serve_lost, server_write_entries, serve_checkin_prog, + serve_update_prog): Include more information in error messages. + (Thanks, DJM.) + + * cvsbug.sh: Use /usr/sbin/sendmail, unless it doesn't + exist, in which case use /usr/lib/sendmail. (Thanks, DJM.) + + * server.c (server, server_cleanup): Use "/tmp" instead of + "/usr/tmp" when the TMPDIR environment variable isn't set. This + is what the rest of the code uses. + +Thu Jul 13 11:03:17 1995 Jim Meyering (meyering@comco.com) + + * recurse.c (free_cwd): New function. + (save_cwd, restore_cwd): Use it instead of simply freeing any + string. The function also closes any open file descriptor. + + * import.c (comtable): Now static. + (comtable): Put braces around each element of initializer. + + * cvs.h: Add prototype for xgetwd. + * recurse.c (save_cwd, restore_cwd): New functions to encapsulate + run-time solution to secure-SunOS vs. fchown problem. + (do_dir_proc, unroll_files_proc): Use new functions instead of + open-coded fchdir/chdir calls with cpp directives. + + * sanity.sh: Change out of TESTDIR before removing it. + Some versions of rm fail when asked to delete the current directory. + +Wed Jul 12 22:35:04 1995 Jim Meyering (meyering@comco.com) + + * client.c (get_short_pathname): Add const qualifier to parameter dcl. + (copy_a_file): Remove set-but-not-used variable, LEN. + (handle_clear_static_directory): Likewise: SHORT_PATHNAME. + (set_sticky): Likewise: LEN. + (handle_set_sticky): Likewise: SHORT_PATHNAME. + (handle_clear_sticky): Likewise: SHORT_PATHNAME. + (start_rsh_server): Convert perl-style `cond || stmt' to more + conventional C-style `if (cond) stmt.' Sheesh. + Remove dcl of unused file-static, SEND_CONTENTS. + + * history.c: Remove dcls of set-but-not-used file-statics, + HISTSIZE, HISTDATA. + (read_hrecs): Don't set them. + + * import.c (add_rev): Remove dcl of set-but-not-used local, RETCODE. + + * repos.c (Name_Repository): Remove dcl of set-but-not-used local, + HAS_CVSADM. + + * cvsrc.c (read_cvsrc): Parenthesize assignment used as truth value. + +Tue Jul 11 16:49:41 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * hash.h (struct entnode, Entnode): moved from here... + * cvs.h: to here. + +Wed Jul 12 19:45:24 1995 Dominik Westner (dominik@gowest.ppp.informatik.uni-muenchen.de) + + * client.c (server_user): new var. + (parse_cvsroot): set above if repo is "user@host:/dir". + (start_rsh_server): if server_user set, then use it. + +Wed Jul 12 10:53:36 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * sanity.sh: remove the TESTDIR after done. + + * cvsbug.sh (GNATS_ADDR): now bug-cvs@prep.ai.mit.edu again. + +Tue Jul 11 15:53:08 1995 Greg A. Woods <woods@most.weird.com> + + * options.h.in: depend on configure for grep and diff, now that + changes to configure.in are applied. + +Tue Jul 11 14:32:14 1995 Michael Shields <shields@tembel.org> + + * Makefile.in (LDFLAGS): Pick up from configure. + +Tue Jul 11 14:20:00 1995 Loren James Rittle <rittle@supra.comm.mot.com> + + * import.c (add_rev), commit.c (remove_file, ci_new_rev), + checkin.c (Checkin), subr.c (make_message_rcslegal), cvs.h: + Always perform sanity check and fix-up on messages to be passed + directly to RCS via the '-m' switch. RCS 5.7 requires that a + non-total-whitespace, non-null message be provided or it will + abort with an error. CVS is not setup to handle any returned + error from 'ci' gracefully and, thus, the repository entered a + trashed state. + + * sanity.sh: Add regression tests for new code and interactions + with RCS 5.7. + +Sun Jul 9 19:03:00 1995 Greg A. Woods <woods@most.weird.com> + + * .cvsignore: added new backup file + + * options.h.in: our new configure.in finds the right diff and + grep paths now.... + + * subr.c: quote the string in run_print() for visibility + - indent a comment + - Jun Hamano's xchmod() patch to prevent writable files + (from previous local changes) + + * logmsg.c: fix a NULL pointer de-reference + - clean up some string handling code... + (from previous local changes) + + * parseinfo.c: add hack to expand $CVSROOT in an *info file. + - document "ALL" and "DEFAULT" in opening comment for Parse_Info() + - fix the code to match the comments w.r.t. callbacks for "ALL" + - add a line of trace output... + (from previous local changes) + + * mkmodules.c: add support for comments in CVSROOT/checkoutlist + - add CVSroot used by something other .o, ala main.c + (from previous local changes) + + * main.c, cvs.h: add support for $VISUAL as log msg editor + (from previous local changes) + + * status.c: add support for -q and -Q (from previous local changes) + + +Sun Jul 9 18:44:32 1995 Karl Fogel <kfogel@floss.cyclic.com> + + * log.c: trivial change to test ChangeLog stuff. + +Sat Jul 8 20:33:57 1995 Paul Eggert <eggert@twinsun.com> + + * history.c: (history_write): Don't assume that fopen(..., "a") + lets one interleave writes to the history file from different processes + without interlocking. Use open's O_APPEND option instead. + Throw in an lseek to lessen the race bugs on non-Posix hosts. + * cvs.h, subr.c (Fopen): Remove. + + * log.c (log_fileproc): Pass working file name to rlog, so that + the name is reported correctly. + +Fri Jul 7 18:29:37 1995 Michael Hohmuth <hohmuth@inf.tu-dresden.de> + + * client.c, client.h (client_import_setup): New function. + (client_import_done, client_process_import_file): Add comments + regarding now-redundant code. + * import.c (import): Call client_import_setup. + +Tue Jul 4 09:21:26 1995 Bernd Leibing <bernd.leibing@rz.uni-ulm.de> + + * rcs.c (RCS_parsercsfile_i): Rename error to l_error; SunOS4 /bin/cc + doesn't like a label and function with the same name. + +Sun Jul 2 12:51:33 1995 Fred Appelman <Fred.Appelman@cv.ruu.nl> + + * logmsg.c: Rename strlist to str_list to avoid conflict with + Unixware 2.01. + +Thu Jun 29 17:37:22 1995 Paul Eggert <eggert@twinsun.com> + + * rcs.c (RCS_check_kflag): Allow RCS 5.7's new -kb option. + +Wed Jun 28 09:53:14 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * Makefile.in (HEADERS): Remove options.h.in. + (DISTFILES): Add options.h.in. + Depend on options.h in addition to HEADERS. + +Tue Jun 27 22:37:28 1995 Vince Demarco <vdemarco@bou.shl.com> + + * subr.c: Don't try to do fancy waitstatus stuff for NeXT, + lib/wait.h is sufficient. + +Mon Jun 26 15:17:45 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * Makefile.in (DISTFILES): Remove RCS-patches and convert.sh. + +Fri Jun 23 13:38:28 1995 J.T. Conklin (jtc@rtl.cygnus.com) + + * server.c (dirswitch, serve_co): Use CVSADM macro instead of + literal "CVS". + +Fri Jun 23 00:00:51 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * README-rm-add: Do not talk about patching RCS, that only + confuses people. + * RCS-patches, convert.sh: Removed (likewise). + +Thu Jun 22 10:41:41 1995 James Kingdon <kingdon@harvey.cyclic.com> + + * subr.c: Change -1 to (size_t)-1 when comparing against a size_t. + +Wed Jun 21 16:51:54 1995 nk@ipgate.col.sw-ley.de (Norbert Kiesel) + + * create_adm.c, entries.c, modules.c: Avoid coredumps if + timestamps, tags, etc., are NULL. + +Tue Jun 20 15:52:53 1995 Jim Meyering (meyering@comco.com) + + * checkout.c (checkout): Remove dcl of unused variable. + * client.c (call_in_directory, handle_clear_static_directory, + handle_set_sticky, handle_clear_sticky, send_a_repository, + send_modified, send_dirent_proc): Remove dcls of unused variables. + * server.c (receive_file, serve_modified, server_cleanup): + Remove dcls of unused variables. + * subr.c (copy_file): Remove dcl of unused variable. + * vers_ts.c (time_stamp_server): Remove dcl of unused variable. + +Mon Jun 19 13:49:35 1995 Jim Blandy <jimb@totoro.cyclic.com> + + * sanity.sh: Fix commencement message --- the test suite says + "Ok." when it's done. + +Fri Jun 16 11:23:44 1995 Jim Meyering (meyering@comco.com) + + * entries.c (fgetentent): Parenthesize assignment in if-conditional. + +Thu Jun 15 17:33:28 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * server.c (get_buffer_data, buf_append_char, buf_append_data): + Don't conditionalize use of "inline". Autoconf takes care of + defining it away on systems that don't grok it. + +Thu Jun 15 13:43:38 1995 Jim Kingdon (kingdon@cyclic.com) + + * options.h.in (DIFF): Default to "diff" not "diff -a" since diff + might not support the -a option. + +Wed Jun 14 11:29:42 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * import.c (import_descend): Initialize dirlist to NULL. + + * subr.c (copy_file): Fix infinite loop. + + * server.c (serve_directory): fix a memory leak. + + * checkout.c, commit.c, diff.c, history.c, import.c, log.c, + patch.c, release.c, remove.c, rtag.c, status.c, tag.c, update.c: + Use send_arg() to send command line arguments to server. + + * commit.c (fsortcmp), find_names (fsortcmp), hash.c (hashp, + findnode), hash.h (findnode), rcs.c (RCS_addnode, + RCS_check_kflag, RCS_check_tag, RCS_isdead, RCS_parse, + RCS_parsercsfile_i), rcs.h (RCS_addnode, RCS_check_kflag, + RCS_check_tag, RCS_parse): Added const qualifiers as + appropriate. + * rcs.h (RCS_isdead): Added prototype. + + * hash.h (walklist, sortlist): correct function prototypes. + + * ignore.c (ign_setup): don't bother checking to see if file + exists before calling ign_add_file. + +Fri Jun 9 11:24:06 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * all source files (rcsid): Added const qualifer. + * ignore.c (ign_default): Added const qualifier. + * subr.c (numdots): Added const qualifier to function argument. + * cvs.h (numdots): Added const qualifier to prototype argument. + + * client.c (change_mode): Tied consecutive if statements testing + the same variable together with else if. + + * import.c (import_descend): Build list of subdirectories when + reading directory, and then process the subdirectories in that + list. This change avoids I/O overhead of rereading directory + and reloading ignore list (.cvsignore) for each subdirectory. + +Thu Jun 8 11:54:24 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * import.c (import_descend): Use 4.4BSD d_type field if it is + present. + + * lock.c (set_lockers_name): Use %lu in format and cast st_uid + field to unsigned long. + + * import.c (import): Use RCS_check_kflag() to check -k options. + (keyword_usage, str2expmode, strn2expmode, expand_names): + Removed. + * rcs.c (RCS_check_kflag): Added keyword_usage array from import.c + for more descriptive error messages. + + * subr.c (run_setup, run_args): Changed variable argument + processing to work on machines that use <varargs.h>. + + * subr.c (copy_file, xcmp): Changed to read the file(s) by blocks + rather than by reading the whole file into a huge buffer. The + claim that this was reasonable because source files tend to be + small does not hold up in real world situations. CVS is used + to manage non-source files, and mallocs of 400K+ buffers (x2 + for xcmp) can easily fail due to lack of available memory or + even memory pool fragmentation. + (block_read): New function, taken from GNU cmp and slightly + modified. + + * subr.c (xcmp): Added const qualifier to function arguments. + * cvs.h (xcmp): Added const qualifer to prototype arguments. + +Wed Jun 7 11:28:31 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * cvs.h (Popen): Added prototype. + (Fopen, open_file, isreadable, iswritable, isdir, isfile, + islink, make_directory, make_directories, rename_file, + link_file, unlink_file, copy_file): Added const qualifer to + prototype arguments. + * subr.c (Fopen, Popen, open_file, isreadable, iswritable, isdir, + isfile, islink, make_directory, make_directories, rename_file, + link_file, unlink_file, copy_file): Added const qualifier to + function arguments. + + * logmsg.c (logfile_write), recurse.c (do_recursion, addfile): + Don't cast void functions to a void expression. There is at + least one compiler (MPW) that balks at this. + + * rcs.c (keysize, valsize): Change type to size_t. + + * add.c (add_directory): Don't cast umask() argument to int. + + * import.c (add_rcs_file): Changed type of mode to mode_t. + + * rcscmds.c (RCS_merge): New function. + * cvs.h (RCS_merge): Declare. + * update.c (merge_file, join_file): Call RCS_merge instead of + invoking rcsmerge directly. + + * cvs.h: Include <stdlib.h> if HAVE_STDC_HEADERS, otherwise + declared getenv(). + * cvsrc.c, ignore.c, main.c: Removed getenv() declaration. + + * client.c (mode_to_string): Changed to take mode_t instead of + struct statb argument. Simplified implementation, no longer + overallocates storage for returned mode string. + * client.h (mode_to_string): Updated declaration. + * server.c (server_updated): Updated for new calling conventions, + pass st_mode instead of pointer to struct statb. + + * cvs.h (CONST): Removed definition, use of const qualifier is + determined by autoconf. + * history.c, modules.c, parseinfo.c: Use const instead of CONST. + + * add.c, admin.c, checkout.c, commit.c, diff.c, import.c, log.c, + main.c, mkmodules.c, patch.c, recurse.c, remove.c, rtag.c, + server.c, status.c, subr.c, tag.c, update.c: Changed function + arguments "char *argv[]" to "char **argv" to silence lint + warnings about performing arithmetic on arrays. + +Tue Jun 6 18:57:21 1995 Jim Blandy <jimb@totoro.cyclic.com> + + * version.c: Fix up version string, to say that this is Cyclic + CVS. + +Tue Jun 6 15:26:16 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * subr.c (run_setup, run_args, run_add_arg, xstrdup): Add const + qualifier to format argument. + * cvs.h (run_setup, run_args, xstrdup): Likewise. + + * Makefile.in (SOURCES): Added rcscmds.c. + (OBJECTS): Added rcscmds.o. + + * rcscmds.c: New file, with new functions RCS_settag, RCS_deltag, + RCS_setbranch, RCS_lock, RCS_unlock. + * checkin.c, commit.c, import.c, rtag.c, tag.c: Call above + functions instead of exec'ing rcs commands. + * cvs.h: Declare new functions. + +Mon May 29 21:40:54 1995 J.T. Conklin (jtc@rtl.cygnus.com) + + * recurse.c (start_recursion, do_recursion): Set entries to NULL + after calling Entries_Close(). + +Sat May 27 08:08:18 1995 Jim Meyering (meyering@comco.com) + + * Makefile.in (check): Export RCSBIN only if there exists an + `rcs' executable in ../../rcs/src. Before, tests would fail when + the directory existed but contained no executables. + (distclean): Remove options.h, now that it's generated. + (Makefile): Regenerate only *this* file when Makefile.in is + out of date. Depend on ../config.status. + +Fri May 26 14:34:28 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * entries.c (Entries_Open): Added missing fclose(). + (Entries_Close): Don't write Entries unless Entries.Log exists. + + * entries.c (Entries_Open): Renamed from ParseEntries; changed to + process Entries Log files left over from previous crashes or + aborted runs. + (Entries_Close): New function, write out Entries file if + neccessary and erase Log file. + (Register): Append changed records to Log file instead of + re-writing file. + (fgetentent): New function, parse one Entry record from a file. + (AddEntryNode): It's no longer an error for two records with the + same name to be added to the list. New records replace older + ones. + * cvs.h (Entries_Open, Entries_Close): Add prototypes. + (CVSADM_ENTLOG): New constant, name of Entries Log file. + * add.c, checkout.c, client.c, find_names.c, recurse.c: Use + Entries_Open()/Entries_Close() instead of ParseEntries()/dellist(). + + * add.c, admin.c, checkout.c, client.c, commit.c, diff.c, + history.c, import.c, log.c, patch.c, release.c, remove.c, + rtag.c, server.c, status.c, tag.c, update.c: Changed + conditionals so that return value of *printf is tested less than + 0 instead of equal to EOF. + +Thu May 25 08:30:12 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + + * subr.c (xmalloc): Never try to malloc zero bytes; if the user + asks for zero bytes, malloc one instead. + +Wed May 24 12:44:25 1995 Ken Raeburn <raeburn@cujo.cygnus.com> + + * subr.c (xmalloc): Don't complain about NULL if zero bytes were + requested. + +Tue May 16 21:49:05 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * subr.c (xmalloc): Never try to malloc zero bytes; if the user + asks for zero bytes, malloc one instead. + +Mon May 15 14:35:11 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * lock.c (L_LOCK_OWNED): Removed. + + * add.c, checkout.c, client.c, create_adm.c, cvs.h, entries.c, + find_names.c modules.c, recurse.c, release.c, repos.c, update.c: + removed CVS 1.2 compatibility/upgrade code. + +Mon May 8 11:25:07 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * lock.c (write_lock): Missed one instance where rmdir(tmp) should + have been changed to clear_lock(). + +Wed May 3 11:08:32 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * create_adm.c, entries.c, import.c, root.c: Changed conditionals + so that return value of *printf is tested less than 0 instead of + equal to EOF --- That's all Standard C requires. + +Wed May 3 18:03:37 1995 Samuel Tardieu <tardieu@emma.enst.fr> + + * rcs.h: removed #ifdef CVS_PRIVATE and #endif because cvs didn't + compile anymore. + +Mon May 1 13:58:53 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * rcs.c, rcs.h: Implemented lazy parsing of rcs files. + RCS_parsercsfile_i modified to read only the first two records + of rcs files, a new function RCS_reparsercsfile is called only + when additional information (tags, revision numbers, dates, + etc.) is required. + +Mon May 1 12:20:02 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + + * Makefile.in (INCLUDES): Include -I. for options.h. + +Fri Apr 28 16:16:33 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * Makefile.in (SOURCES, HEADERS, DISTFILES): Updated. + (dist-dir): Renamed from dist; changed to work with DISTDIR + variable passed from parent. + + We don't want to include a file the user has to edit in the + distribution. + * options.h: No longer distributed. + * options.h.in: Distribute this instead. + * ../INSTALL, ../README: Installation instructions updated. + + * client.c (start_rsh_server): Send the remote command to rsh as a + single string. + +Fri Apr 28 00:29:49 1995 Noel Cragg <noel@vo.com> + + * commit.c: Added initializer for FORCE_CI + + * sanity.sh: Fix tests added 25 Apr -- they were expecting the + server to make noise, but the CVS_SERVER variable had been + accidentally set with the `-Q' flag. Ran all tests -- both + locally and remotely -- to verify that the change didn't break + anything. + +Thu Apr 27 12:41:52 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + + * Makefile.in: Revise comment regarding check vs. remotecheck. + +Thu Apr 27 12:52:28 1995 Bryan O'Sullivan <bos@cyclic.com> + + * client.c (start_rsh_server): If the CVS_RSH environment variable + is set, use its contents as the name of the program to invoke + instead of `rsh'. + +Thu Apr 27 12:18:38 1995 Noel Cragg <noel@vo.com> + + * checkout.c (checkout): To fix new bug created by Apr 23 change, + re-enabled "expand-module" functionality, because it has the side + effect of setting the checkin/update programs for a directory. To + solve the local/remote checkout problem that prompted this change + in the first place, I performed the next change. + * server.c (expand_proc): Now returns expansions for aliases only. + +Wed Apr 26 12:07:42 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * rcs.c (getrcskey): Rewritten to process runs of whitespace chars + and rcs @ strings instead of using state variables "white" and + "funky". + +Fri Apr 7 15:49:25 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * lock.c (unlock): Only call stat if we need to. + +Wed Apr 26 10:48:44 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c (new_entries_line): Don't prototype. + +Tue Apr 25 22:19:16 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * sanity.sh: Add new tests to catch bugs in Apr 23 change. + +Tue Apr 25 17:10:55 1995 Roland McGrath <roland@baalperazim.frob.com> + + * create_adm.c (Create_Admin): Use getwd instead of getcwd. + +Sun Apr 23 20:58:32 1995 Noel Cragg <noel@vo.com> + + * checkout.c (checkout): Disabled "expand-module" functionality on + remote checkout, since it makes modules behave like aliases (see + longer note there). This change necessitated the change below. + Also merged the like parts of a conditional. + + * client.c (call_in_directory): Changed the algorithm that created + nested and directories and the "CVS" administration directories + therein. The algoithm wrongly assumed that the name of the + directory that that was to be created and the repository name were + the same, which breaks modules. + + * create_adm.c (Create_Admin), module.c (do_module), server.c + (server_register), subr.c, entries.c: Added fprintfs for trace-mode + debugging. + + * client.c (client_send_expansions): Argument to function didn't + have a type -- added one. + + * server.c (new_entries_line): Arguments to this function are + never used -- reoved them and fixed callers. + +Sat Apr 22 11:17:20 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + + * rcs.c (RCS_parse): If we can't open the file, give an error + message (except for ENOENT in case callers rely on that). + +Wed Apr 19 08:52:37 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + + * client.c (send_repository): Check for CVSADM_ENTSTAT in `dir', not + in `.'. + + * sanity.sh: Add TODO list. Revise some comments. Add tests of + one working directory adding a file and other updating it. + +Sat Apr 8 14:52:55 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * Makefile.in (CFLAGS): Let configure set the default for CFLAGS. + Under GCC, we want -g -O. + +Fri Apr 7 15:49:25 1995 J.T. Conklin <jtc@rtl.cygnus.com> + + * root.c (Name_Root): merge identical adjacent conditionals. + + * create_admin.c (Create_Admin): Rearranged check for CVSADM and + OCVSADM directories so that CVSADM pathname is only built once. + + * update.c (update_dirleave_proc): Removed code to remove CVS + administration directory if command_name == "export" and to + create CVS/Root file if it is not present. Identical code + in update_filesdone_proc() will perform these same actions. + Also removed code that read and verfied CVS/Root. This is + expensive, and if it is necessary should happen in the + general recursion processor rather than in the update + callbacks. + + * lock.c (masterlock): New variable, pathname of master lockdir. + (set_lock): removed lockdir argument, now constructs it itself + and stores it in masterlock. + (clear_lock): new function, removes master lockdir. + (Reader_Lock, write_lock): call clear_lock instead of removing + master lockdir. + (Reader_Lock, write_lock): #ifdef'd out CVSTFL code. + + * main.c (main): register Lock_Cleanup signal handler. + * lock.c (Reader_Lock, write_lock): no longer register + Lock_Cleanup. + + * main.c (main): initialize new array hostname. + * lock.c (Reader_Lock, write_lock): Use global hostname array. + * logmsg.c (logfile_write): Likewise. + + * recurse.c (do_dir_proc, unroll_files_proc): Use open()/fchdir() + instead of getwd()/chdir() on systems that support the fchdir() + system call. + +Fri Apr 7 06:57:20 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c: Include the word "server" in error message for memory + exhausted, so the user knows which machine ran out of memory. + + * sanity.sh: For remote, set CVS_SERVER to test the right server, + rather than a random one from the PATH. + + * commit.c [DEATH_STATE]: Pass -f to `ci'. + +Thu Apr 6 13:05:15 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * commit.c (checkaddfile): If we didn't manage to fopen the file, + don't try to fclose it. + + * client.c (handle_m, handle_e): Use fwrite, rather than a loop of + putc's. Sometimes these streams are unbuffered. + +Tue Apr 4 11:33:56 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * (DISTFILES): Include cvsbug.sh, ChangeLog, NOTES, RCS-patches, + README-rm-add, ChangeLog.fsf, sanity.sh, sanity.el, and + .cvsignore. + +Mon Mar 27 08:58:42 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + + * rcs.c (RCS_parsercsfile_i): Accept `dead' state regardless of + DEATH_STATE define. Revise comments regarding DEATH_STATE versus + CVSDEA versus the scheme which uses a patched RCS. + * README-rm-add, RCS-patches: Explain what versions of CVS need + RCS patches. + +Sat Mar 25 18:51:39 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * server.c (server_cleanup): Only do the abysmal kludge of waiting + for command and draining the pipe #ifdef sun. The code makes + assumptions not valid on all systems, and is only there to + workaround a SunOS bug. + +Wed Mar 22 21:55:56 1995 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c (mkdir_p): Call stat only if we get the EACCES. Faster + and more elegant. + +Tue Jan 31 20:59:19 1995 Ken Raeburn <raeburn@cujo.cygnus.com> + + * server.c: Try to avoid starting the "rm -rf" at cleanup time + until after subprocesses have finished. + (command_fds_to_drain, max_command_fd): New variables. + (do_cvs_command): Set them. + (command_pid_is_dead): New variable. + (wait_sig): New function. + (server_cleanup): If command_pid is nonzero, wait for it to die, + draining output from it in the meantime. If nonzero SIG was + passed, send a signal to the subprocess, to encourage it to die + soon. + + * main.c (usage): Argument is now `const char *const *'. + * cvs.h (usage): Changed prototype. + (USE): Make new variable `const'. + * add.c (add_usage), admin.c (admin_usage), checkout.c + (checkout_usage, export_usage, checkout), commit.c (commit_usage), + diff.c (diff_usage), history.c (history_usg), import.c + (import_usage, keyword_usage), log.c (log_usage), main.c (usg), + patch.c (patch_usage), release.c (release_usage), remove.c + (remove_usage), rtag.c (rtag_usage), server.c (server), status.c + (status_usage), tag.c (tag_usage), update.c (update_usage): Usage + messages are now const arrays of pointers to const char. + + * import.c (comtable): Now const. + * main.c (rcsid): Now static. + (cmd): Now const. + (main): Local variable CM now points to const. + * server.c (outbuf_memory_error): Local var MSG now const. + + * client.c (client_commit_usage): Deleted. + +Sat Dec 31 15:51:55 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * logmsg.c (do_editor): Allocate enough space for trailing '\0'. + +Fri Mar 3 11:59:49 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * cvsbug.sh: Call it "Cyclic CVS" now, not "Remote CVS". Call it + version C1.4A, not 1.4A2-remote. Send bugs to cyclic-cvs, not + remote-cvs. + + * classify.c (Classify_File): Put check for dead file inside + "#ifdef DEATH_SUPPORT". + +Thu Feb 23 23:03:43 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * update.c (join_file): Don't pass the -E option to rcsmerge here, + either (see Jan 22 change). + +Mon Feb 13 13:28:46 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * cvsbug.sh: Send bug reports to remote-cvs@cyclic.com, rather + than to the ordinary CVS bug address. This does mean we'll have + to wade through GNATS-style bug reports, sigh. + +Wed Feb 8 06:42:27 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> + + * server.c: Don't include <sys/stat.h>; system.h already does, and + 4.3BSD can't take it twice. + + * subr.c [! HAVE_VPRINTF] (run_setup, run_args): Don't use va_dcl + in declaration. Declare the a1..a8 args which are used in the + sprintf call. + * cvs.h [! HAVE_VPRINTF] (run_setup, run_args): Don't prototype + args, to avoid conflicting with the function definitions + themselves. + +Tue Feb 7 20:10:00 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * client.c (update_entries): Pass the patch subprocess the switch + "-b ~", not "-b~"; the latter form seems not to work with patch + version 2.0 and earlier --- it takes the next argv element as the + backup suffix, and thus doesn't notice that the patch file's name + has been specified, thus doesn't find the patch, thus... *aargh* + +Fri Feb 3 20:28:21 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * log.c (log_option_with_arg): New function. + (cvslog): Use it and send_arg to handle the rlog options that take + arguments. The code used to use send_option_string for + everything, which assumes that "-d1995/01/02" is equivalent to + "-d -1 -9 -9 -5 ...". + +Tue Jan 31 15:02:01 1995 Jim Blandy <jimb@floss.life.uiuc.edu> + + * server.c: #include <sys/stat.h> for the new stat call in mkdir_p. + (mkdir_p): Don't try to create the intermediate directory if it + exists already. Some systems return EEXIST, but others return + EACCES, which we can't otherwise distinguish from a real access + problem. + +Sun Jan 22 15:25:45 1995 Jim Blandy <jimb@totoro.bio.indiana.edu> + + * update.c (merge_file): My rcsmerge doesn't accept a -E option, + and it doesn't look too important, so don't pass it. + +Fri Jan 20 14:24:58 1995 Ian Lance Taylor <ian@sanguine.cygnus.com> + + * client.c (do_deferred_progs): Don't try to chdir to toplevel_wd + if it has not been set. + (process_prune_candidates): Likewise. + +Mon Nov 28 09:59:14 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * client.c (client_commit): Move guts of function from here... + * commit.c (commit): ...to here. + +Mon Nov 28 15:14:36 1994 Ken Raeburn <raeburn@cujo.cygnus.com> + + * server.c (buf_input_data, buf_send_output): Start cpp directives + in column 1, otherwise Sun 4 pcc complains. + +Mon Nov 28 09:59:14 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * client.c (add_prune_candidate): Don't try to prune ".". + +Tue Nov 22 05:27:10 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c, client.c: More formatting cleanups. + + * client.h, client.c: New variable client_prune_dirs. + * update.c (update), checkout.c (checkout): Set it. + * client.c (add_prune_candidate, process_prune_candidates): New + functions. + (send_repository, call_in_directory, get_responses_and_close): + Call them. + +Wed Nov 23 01:17:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * server.c (do_cvs_command): Don't select on STDOUT_FILENO unless + we have something to write. + +Tue Nov 22 05:27:10 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * remove.c (remove_fileproc): Only call server_checked_in if we + actually are changing the entries file. + + * server.c (server_write_entries): New function. + (dirswitch, do_cvs_command): Call it. + (serve_entry, serve_updated): Just update in-memory data + structures, don't mess with CVS/Entries file. + +Mon Nov 21 10:15:11 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c (server_checked_in): Set scratched_file to NULL after + using it. + + * checkin.c (Checkin): If the file was changed by the checkin, + call server_updated not server_checked_in. + +Sun Nov 20 08:01:51 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * client.c (send_repository): Move check for update_dir NULL to + before where we check last_update_dir. Check for "" here too. + + * client.c (send_repository): Use new argument dir. + + * client.c: Pass new argument dir to send_repository and + send_a_repository. + + * server.c, server.h (server_prog): New function. + * modules.c (do_modules): Call it if server_expanding. + * client.c: Support Set-checkin-prog and Set-update-prog responses. + * server.c, client.c: Add Checkin-prog and Update-prog requests. + +Fri Nov 18 14:04:38 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * client.c (get_short_pathname, is_cvsroot_level, + call_in_directory): Base whether this is new-style or + old-style based on whether we actually used the Directory request, + not based on whether the pathname is absolute. Rename + directory_supported to use_directory. + * server.c: Rename use_relative_pathnames to use_dir_and_repos. + * client.c (send_a_repository): If update_dir is absolute, don't + use it to try to reconstruct how far we have recursed. + + * server.c, server.h, client.c, client.h, vers_ts.c, update.h: + More cosmetic changes (identation, PARAMS vs. PROTO, eliminate + alloca, etc.) to remote CVS to make it more like the rest of CVS. + + * server.c: Make server_temp_dir just the dir name, not the name + with "%s" at the end. + * server.c, client.c: Add "Max-dotdot" request, and use it to make + extra directories in server_temp_dir if needed. + +Thu Nov 17 09:03:28 1994 Jim Kingdon <kingdon@cygnus.com> + + * client.c: Fix two cases where NULL was used and 0 was meant. + +Mon Nov 14 08:48:41 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c (serve_unchanged): Set noexec to 0 when calling Register. + + * update.c (merge_file): Don't call xcmp if noexec. + +Fri Nov 11 13:58:22 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * client.c (call_in_directory): Deal with it if reposdirname is + not a subdirectory of toplevel_repos. + +Mon Nov 7 09:12:01 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * patch.c: If file is removed and we don't have a tag or date, + just print "current release". + + * classify.c (Classify_File): Treat dead files appropriately. + +Fri Nov 4 07:33:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * main.c (main) [SERVER_SUPPORT]: Move call to getwd past where we + know whether we are the server or not. Set CurDir to "<remote>" + if we are the server. + + * client.c: Remove #if 0'd function option_with_arg. + Remove #if 0'd code pertaining to the old way of logging the + session. + + * client.c (start_rsh_server): Don't invoke the server with the + -d option. + * server.c (serve_root): Test root for validity, just like main.c + does for non-remote CVS. + * main.c (main): If `cvs server' happens with a colon in the + CVSroot, just handle it normally; don't make it an error. + +Wed Nov 2 11:09:38 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * client.c (send_dirent_proc): If dir does not exist, just return + R_SKIP_ALL. + + * server.c, client.c: Add Directory request and support for + local relative pathnames (along with the repository absolute + pathnames). + * update.c, add.c, checkout.c, checkin.c, cvs.h, create_adm.c, + commit.c, modules.c, server.c, server.h, remove.c, client.h: + Pass update_dir to server_* functions. Include update_dir in + more error messages. + +Fri Oct 28 08:54:00 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * client.c: Reformat to bring closer to cvs standards for brace + position, comment formatting, etc. + + * sanity.sh: Remove wrong "last mod" line. Convert more tests to + put PASS or FAIL in log file. Change it so arguments to the + script specify which tests to run. + + * client.c, client.h, server.c, checkout.c: Expand modules in + separate step from the checkout itself. + +Sat Oct 22 20:33:35 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) + + * update.c (join_file): When checking for null return from + RCS_getversion, still do return even if quiet flag is set. + +Thu Oct 13 07:36:11 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * client.c (send_files): Call send_repository even if + toplevel_repos was NULL. + + * server.c (server_updated): If joining, don't remove file. + + * update.c (join_file): If server and file is unmodified, check it + out before joining. After joining, call server_updated. New + argument repository. + + * server.c, server.h (server_copy_file): New function. + * update.c (update_file_proc, join_file): Call it. + * client.c (copy_file, handle_copy_file): New functions. + * client.c (responses): Add "Copy-file". + + * client.c, client.h: Make toplevel_wd, failed_patches and + failed_patches_count extern. + * client.c (client_update): Move guts of function from here... + * update.c (update): ...to here. + + * client.c, checkout.c: Likewise for checkout. + + * client.c (is_cvsroot_level): New function. + (handle_set_sticky, handle_clear_sticky, + handle_clear_static_directory): Call it, instead of checking + short_pathname for a slash. + + * client.c, client.h (client_process_import_file, + client_import_done): New functions. + * import.c (import, import_descend): Use them. + * import.c (import_descend): If server, don't mention ignored CVS + directories. + * import.c (import_descend_dir): If client, don't print warm + fuzzies, or make directories in repository. If server, print warm + fuzzies to stdout not stderr. + * client.c (send_modified): New function, broken out from + send_fileproc. + (send_fileproc): Call it. + + * client.c (handle_clear_sticky, handle_set_sticky, + handle_clear_static_directory, handle_set_static_directory): If + command is export, just return. + (call_in_directory, update_entries): If command is export, don't + create CVS directories, CVS/Entries files, etc. + * update.c (update_filesdone_proc): Don't remove CVS directories if + client_active. + + * client.c (send_a_repository): Instead of insisting that + repository end with update_dir, just strip as many pathname + components from the end as there are in update_dir. + + * Makefile.in (remotecheck): New target, pass -r to sanity.sh. + * sanity.sh: Accept -r argument which means to test remote cvs. + + * tag.c (tag), rtag.c (rtag), patch.c (patch), import.c (import), + admin.c (admin), release.c (release): If client_active, connect to + the server and send the right requests. + * main.c (cmds): Add these commands. + (main): Remove code which would strip hostname off cvsroot and try + the command locally. There are no longer any commands which are + not supported. + * client.c, client.h (client_rdiff, client_tag, client_rtag, + client_import, client_admin, client_export, client_history, + client_release): New functions. + * server.c (serve_rdiff, serve_tag, serve_rtag, serve_import, + serve_admin, serve_export, serve_history, serve_release): New + functions. + (requests): List them. + * server.c: Declare cvs commands (add, admin, etc.). + * cvs.h, server.h: Don't declare any of them here. + * main.c: Restore declarations of cvs commands which were + previously removed. + + * cvs.h: New define DEATH_STATE, commented out for now. + * rcs.c (RCS_parsercsfile_i), commit.c (remove_file, checkaddfile) + [DEATH_STATE]: Use RCS state to record a dead file. + +Mon Oct 3 09:44:54 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * status.c (status_fileproc): Now that ts_rcs is just one time, + don't try to print the second time from it. (Same as raeburn 20 + Aug change, it accidentally got lost in 1.4 Alpha-1 merge). + + * cvs.h (CVSDEA): Added (but commented out for now). + * rcs.c (RCS_parsercsfile_i) [CVSDEA]: Also look in CVSDEA to see if + something is dead. + * commit.c (ci_new_rev, mark_file) [CVSDEA]: New functions. + (remove_file, checkaddfile) [CVSDEA]: Use them instead of ci -K. + * find_names.c (find_dirs) [CVSDEA]: Don't match CVSDEA directories. + * update.c (checkout_file): Check RCS_isdead rather than relying + on co to not create the file. + + * sanity.sh: Direct output to logfile, not /dev/null. + + * subr.c (run_exec): Print error message if we are unable to exec. + + * commit.c (remove_file): Call Scratch_Entry when removing tag + from file. The DEATH_SUPPORT ifdef was erroneous. + +Sun Oct 2 20:33:27 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * commit.c (checkaddfile): Instead of calling isdir before + attempting to create the directory, just ignore EEXIST errors from + mkdir. (This removes some DEATH_SUPPORT ifdefs which actually had + nothing to do with death support). + +Thu Sep 29 09:23:57 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * diff.c (diff): Search attic too if we have a second tag/date. + (diff_fileproc): If we have a second tag/date, don't do all the + checking regarding the user file. + +Mon Sep 26 12:02:15 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * checkin.c (Checkin): Check for error from unlink_file. + +Mon Sep 26 08:51:10 1994 Anthony J. Lill (ajlill@ajlc.waterloo.on.ca) + + * rcs.c (getrcskey): Allocate space for terminating '\0' if + necessary. + +Sat Sep 24 09:07:37 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * commit.c (commit_fileproc): Set got_message = 1 when calling + do_editor (accidentally omitted from last change). + +Fri Sep 23 11:59:25 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + Revert buggy parts of Rich's change of 1 Nov 1993 (keeping the + dynamic buffer allocation, which was the point of that change). + * logmsg.c (do_editor): Reinstate message arg, but make it char + **messagep instead of char *message. Change occurances of message + to *messagep. Char return type from char * back to void. + * cvs.h: Change do_editor declaration. + * commit.c: Reinstate got_message variable + (commit_filesdoneproc, commit_fileproc, commit_direntproc): Use it. + * import.c (import), commit.c (commit_fileproc, + commit_direntproc): Pass &message to do_editor; don't expect it to + return a value. + * client.c (client_commit): Likewise. + * import.c (import): Deal with it if message is NULL. + +Wed Sep 21 09:43:25 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c (server_updated): If the file doesn't exist, skip it. + + * diff.c, client.h, client.c: Rename diff_client_senddate to + client_senddate and move from diff.c to client.c. + * client.c (client_update, client_checkout): Use it. + +Sat Sep 17 08:36:58 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * checkout.c (checkout_proc): Don't pass NULL to Register for + version. (should fix "cvs co -r <nonexistent-tag> <file>" + coredump on Solaris). + +Fri Sep 16 08:38:02 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * diff.c (diff_fileproc): Set top_rev from vn_user, not vn_rcs. + Rename it to user_file_rev because it need not be the head of any + branch. + (diff_file_nodiff): After checking user_file_rev, if we have both + use_rev1 and use_rev2, compare them instead of going on to code + which assumes use_rev2 == NULL. + +Thu Sep 15 08:20:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * status.c (status): Return a value in client_active case. + +Thu Sep 15 15:02:12 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * server.c (serve_modified): Create the file even if the size is + zero. + +Thu Sep 15 08:20:23 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * lock.c (readers_exist): Clear errno each time around the loop, + not just the first time. + + * client.c (start_server): Don't send Global_option -q twice. + + * no_diff.c (No_Difference): Check for error from unlink. + + * no_diff.c, cvs.h (No_Difference): New args repository, + update_dir. Call server_update_entries if needed. Use update_dir + in error message. + * classify.c (Classify_File): Pass new args to No_Difference. + + * server.c (server_update_entries, server_checked_in, + server_updated): Don't do anything if noexec. + + * client.c (send_fileproc): Rather than guessing how big the gzip + output may be, just realloc the buffer as needed. + +Tue Sep 13 13:22:03 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * lock.c: Check for errors from unlink, readdir, and closedir. + + * classify.c (Classify_File): Pass repository and update_dir to + sticky_ck. + (sticky_ck): New args repository and update_dir. + * server.c, server.h (server_update_entries): New function. + * classify.c (sticky_ck): Call it. + * client.c: New response "New-entry". + * client.c (send_fileproc): Send tag/date from vers->entdata, not + from vers itself. + +Mon Sep 12 07:07:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c: Clean up formatting ("= (errno)" -> "= errno"). + + * cvs.h: Declare strerror. + + * client.c: Add code to deal with Set-sticky and Clear-sticky + responses, and Sticky request. + * server.c: Add code to deal with Sticky request. + * server.c, server.h (server_set_sticky): New function. + * create_adm.c (Create_Admin), update.c (update, update_dirent_proc), + commit.c (commit_dirleaveproc): Call it. + * client.c, client.h (send_files): Add parameter aflag. + * add.c (add), diff.c (diff), log.c (cvslog), remove.c (cvsremove), + status.c (status), + client.c (client_commit, client_update, client_checkout): Pass it. + * client.c (client_update): Add -A flag. + +Fri Sep 9 07:05:35 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * entries.c (WriteTag): Check for error from unlink_file. + + * server.c (server_updated): Initialize size to 0. Previously if + the file was zero length, the variable size got used without being + set. + +Thu Sep 8 14:23:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c (serve_repository): Check for error from fopen on + CVSADM_ENT. + + * update.c (update, update_dirent_proc): Check for errors when + removing Entries.Static. + + * client.c: Add code to deal with Set-static-directory and + Clear-static-directory responses, and Static-directory request. + * server.c, server.h (server_clear_entstat, server_set_entstat): + New functions. + * update.c, checkout.c, modules.c: Call them. + * server.c: Add code to deal with Static-directory request. + + * server.c, client.c: Use strchr and strrchr instead of index and + rindex. + + * server.c (serve_unchanged, serve_lost): Change comments which + referred to changing timestamp; we don't always change the + timestamp in those cases anymore. + +Wed Sep 7 10:58:12 1994 J.T. Conklin (jtc@rtl.cygnus.com) + + * cvsrc.c (read_cvsrc): Don't call getenv() three times when one + time will do. + + * subr.c (xmalloc, xrealloc): Change type of bytes argument from + int to size_t and remove the test that checks if it is less than + zero. + * cvs.h (xmalloc, xrealloc): Update prototype. + +Thu Sep 1 12:22:20 1994 Jim Kingdon (kingdon@cygnus.com) + + * update.c (merge_file, join_file): Pass -E to rcsmerge. + (merge_file): If rcsmerge doesn't change the file, say so. + + * recurse.c, cvs.h (start_recursion): New argument wd_is_repos. + * recurse.c (start_recursion): Use it instead of checking whether + command_name is rtag to find out if we are cd'd to the repository. + * client.c, update.c, commit.c, status.c, diff.c, log.c, admin.c, + remove.c, tag.c: Pass 0 for wd_is_repos. + * rtag.c, patch.c: Pass 1 for wd_is_repos. + + * classify.c, cvs.h (Classify_File): New argument pipeout. + * classify.c (Classify_File): If pipeout, don't complain if the + file is already there. + * update.c, commit.c, status.c: Change callers. + + * mkmodules.c (main): Don't print "reminders" if commitinfo, + loginfo, rcsinfo, or editinfo files are missing. + +Mon Aug 22 23:22:59 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) + + * server.c (strerror): Static definition replaced by extern + declaration. + +Sun Aug 21 07:16:27 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) + + * client.c (update_entries): Run "patch" with input from + /dev/null, so if it's the wrong version, it fails quickly rather + than waiting for EOF from terminal before failing. + +Sat Aug 20 04:16:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * server.c (serve_unchanged): Instead of creating a file with a + zero timestamp, rewrite the entries file to have "=" in the + timestamp field. + * vers_ts.c (mark_lost, mark_unchanged): New macros. + (time_stamp_server): Use them, for clarity. Interpret "=" + timestamp as an unchanged file. A zero-timestamp file should + never be encountered now in use_unchanged mode. + + * client.c (start_server): If CVS_CLIENT_PORT indicates a + non-positive port number, skip straight to rsh connection. + + * status.c (status_fileproc): Fix ts_rcs reference when printing + version info, to correspond to new Entries file format. Don't + print it at all if server_active, because it won't have any useful + data. + +Thu Aug 18 14:38:21 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * cvs.h (status): Declare. + * client.c (client_status): New function. + + * client.h (client_status): Declare. + * main.c (cmds): Include it. + * server.c (serve_status): New function. + (requests): Add it. + * status.c (status): Do the remote thing if client_active. + + * client.c (supported_request): New function. + (start_server): Use it. + + * server.c (receive_partial_file): New function, broken out from + serve_modified. Operate with fixed-size local buffer, instead of + growing stack frame by entire file size. + (receive_file): New function, broken out from serve_modified. + (serve_modified): Call it. + (server): Print out name of unrecognized request. + + More generic stream-filtering support: + * client.c (close_on_exec, filter_stream_through_program): New + functions. + (server_fd): New variable. + (get_responses_and_close): Direct non-rsh connection is now + indicated by server_fd being non-negative. File descriptors for + to_server and from_server may now be different in case "tee" + filtering is being done. Wait for rsh_pid specifically. + (start_server): Use filter_stream_through_program for "tee" + filter, and enable it for direct Kerberos-authenticated + connections. Use dup to create new file descriptors for server + connection if logging is enabled. + (start_rsh_server): Disable code that deals with logging. + + Per-file compression support: + * cvs.h (gzip_level): Declare. + * main.c (usg): Describe new -z argument. + (main): Recognize it and set gzip_level. + * client.c (filter_through_gzip, filter_through_gunzip): New + functions to handle compression. + (update_entries): If size starts with "z", uncompress + (start_server): If gzip_level is non-zero and server supports it, + issue gzip-file-contents request. + (send_fileproc): Optionally compress file contents. Use a + slightly larger buffer, anticipating the worst case. + * server.c (gzip_level): Define here. + (receive_file): Uncompress file contents if needed. + (serve_modified): Recognize "z" in file size and pass receive_file + appropriate flag. + (buf_read_file_to_eof, buf_chain_length): New functions. + (server_updated): Call them when sending a compressed file. + (serve_gzip_contents): New function; set gzip_level. + (requests): Added gzip-file-contents request. + +Wed Aug 17 09:37:44 1994 J.T. Conklin (jtc@cygnus.com) + + * find_names.c (find_dirs): Use 4.4BSD filesystem feature (it + contains the file type in the dirent structure) to avoid + stat'ing each file. + + * commit.c (remove_file,checkaddfile): Change type of umask + variables from int to mode_t. + * subr.c (): Likewise. + +Tue Aug 16 19:56:34 1994 Mark Eichin (eichin@cygnus.com) + + * diff.c (diff_fileproc): Don't use diff_rev* because they're + invariant across calls -- add new variable top_rev. + (diff_file_nodiff): After checking possible use_rev* values, if + top_rev is set drop it in as well (if we don't already have two + versions) and then clear it for next time around. + +Wed Aug 10 20:50:47 1994 Mark Eichin (eichin@cygnus.com) + + * diff.c (diff_fileproc): if ts_user and ts_rcs match, then the + file is at the top of the tree -- so we might not even have a + copy. Put the revision into diff_rev1 or diff_rev2. + +Wed Aug 10 14:55:38 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * server.c (do_cvs_command): Use waitpid. + + * subr.c (run_exec): Always use waitpid. + + * Makefile.in (CC, LIBS): Define here, in case "make" is run in + this directory instead of top level. + +Wed Aug 10 13:57:06 1994 Mark Eichin (eichin@cygnus.com) + + * client.c (krb_get_err_text): use HAVE_KRB_GET_ERR_TEXT to + determine if we need to use the array or the function. + * main.c: ditto. + +Tue Aug 9 16:43:30 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * entries.c (ParseEntries): If timestamp is in old format, rebuild + it in the new format. Fudge an unmatchable entry that won't + trigger this code next time around, if the file is modified. + + * vers_ts.c (time_stamp): Only put st_mtime field into timestamp, + and use GMT time for it. With st_ctime or in local time, copying + trees between machines in different time zones makes all the files + look modified. + (time_stamp_server): Likewise. + +Tue Aug 9 19:40:51 1994 Mark Eichin (eichin@cygnus.com) + + * main.c (main): use krb_get_err_text function instead of + krb_err_txt array. + +Thu Aug 4 15:37:50 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * main.c (main): When invoked as kserver, set LOGNAME and USER + environment variables to the remote user name. + +Thu Aug 4 07:44:37 1994 Mark Eichin (eichin@cygnus.com) + + * client.c: (handle_valid_requests): if we get an option that has + rq_enableme set, then send that option. If it is UseUnchanged, set + use_unchanged so that the rest of the client knows about + it. (Could become a more general method for dealing with protocol + upgrades.) + (send_fileproc): if use_unchanged didn't get set, send an + old-style "Lost" request, otherwise send an "Unchanged" request. + * server.c (serve_unchanged): new function, same as serve_lost, + but used in the opposite case. + (requests): add new UseUnchanged and Unchanged requests, and make + "Lost" optional (there isn't a good way to interlock these.) + * server.h (request.status): rq_enableme, new value for detecting + compatibility changes. + * vers_ts.c (time_stamp_server): swap meaning of zero timestamp if + use_unchanged is set. + +Tue Jul 26 10:19:30 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * sanity.sh: Separate CVSROOT_FILENAME, which must be the filename + of the root, from CVSROOT, which can include a hostname for + testing remote CVS. (but the tests aren't yet prepared to deal + with the bugs in remote CVS). + + * import.c (update_rcs_file): Change temporary file name in TMPDIR + from FILE_HOLDER to cvs-imp<process-id>. + + * sanity.sh: Add ">/dev/null" and "2>/dev/null" many places to + suppress spurious output. Comment out tests which don't work (cvs + add on top-level directory, cvs diff when non-committed adds or + removes have been made, cvs release, test 53 (already commented as + broken), retagging without deleting old tag, test 63). Now 'make + check' runs without any failures. + +Fri Jul 15 12:58:29 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * Makefile.in (install): Do not depend upon installdirs. + +Thu Jul 14 15:49:42 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * client.c, server.c: Don't try to handle alloca here; it's + handled by cvs.h. + +Tue Jul 12 13:32:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * client.c (update_entries): Reset stored_checksum_valid if we + quit early because of a patch failure. + +Fri Jul 8 11:13:05 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * client.c (responses): Mark "Remove-entry" as optional. + +Thu Jul 7 14:07:58 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * server.c (server_updated): Add new checksum argument. If it is + not NULL, and the client supports the "Checksum" response, send + it. + * server.h (server_updated): Update prototype. + * update.c: Include md5.h. + (update_file_proc): Pass new arguments to patch_file and + server_updated. + (patch_file): Add new checksum argument. Set it to the MD5 + checksum of the version of the file being checked out. + (merge_file): Pass new argument to server_updated. + * client.c: Include md5.h. + (stored_checksum_valid, stored_checksum): New static variables. + (handle_checksum): New static function. + (update_entries): If a checksum was received, check it against the + MD5 checksum of the final file. + (responses): Add "Checksum". + (start_server): Clear stored_checksum_valid. + * commit.c (commit_fileproc): Pass new argument to server_updated. + + * client.h (struct response): Move definition in from client.c, + add status field. + (responses): Declare. + * client.c (struct response): Remove definition; moved to + client.h. + (responses): Make non-static. Initialize status field. + * server.c (serve_valid_responses): Check and record valid + responses, just as in handle_valid_requests in client.c. + + * diff.c (diff_client_senddate): New function. + (diff): Use it to send -D arguments to server. + +Wed Jul 6 12:52:37 1994 J.T. Conklin (jtc@phishhead.cygnus.com) + + * rcs.c (RCS_parsercsfile_i): New function, parse RCS file + referenced by file ptr argument. + (RCS_parsercsfile): Open file and pass its file ptr to above function. + (RCS_parse): Likewise. + +Wed Jul 6 01:25:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * client.c (update_entries): Print message indicating that an + unpatchable file will be refetched. + (client_update): Print message when refetching unpatchable files. + +Fri Jul 1 07:16:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * client.c (send_dirent_proc): Don't call send_a_repository if + repository is "". + +Fri Jul 1 13:58:11 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * client.c (last_dirname, last_repos): Move out of function. + (failed_patches, failed_patches_count): New static variables. + (update_entries): If patch program fails, save short_pathname in + failed_patches array, only exit program if retcode is -1, and + return out of the function rather than update the Entries line. + (start_server): Clear toplevel_repos, last_dirname, last_repos. + (client_update): If failed_patches is not NULL after doing first + update, do another update, but remove all the failed files first. + +Thu Jun 30 09:08:57 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c (requests): Add request "Global_option". + (serve_global_option): New function, to handle it. + * client.c (start_server): Deal with global options. Check for + errors from fprintf. + + * client.c (send_fileproc): Split out code which sends repository + into new function send_a_repository. Also, deal with update_dir + being ".". + (send_dirent_proc): Call send_a_repository. + * add.c (add): If client_active, do special processing for + directories. + (add_directory): If server_active, don't try to create CVSADM + directory. + +Thu Jun 30 11:58:52 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * client.c (update_entries): If patch succeeds, remove the backup + file. + * server.c (server_updated): Add new argument file_info. If it is + not NULL, use it rather than sb to get the file mode. + * server.h (server_updated): Update prototype for new argument. + * update.c (update_file_proc): Pass new arguments to patch_file + and server_updated. + (patch_file): Add new argument file_info. Don't use -p to check + out new version, check it out into file and rename that to file2. + If result is not readable, assume file is dead and set docheckout. + Call xchmod on file2. Close the patch file after checking for a + binary diff. Set file_info to the results of stat on file2. + (merge_file): Pass new argument to server_updated. + * commit.c (commit_fileproc): Pass new argument to server_updated. + +Wed Jun 29 13:00:41 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * client.c (krb_realmofhost): Declare, since it's not the current + <krb.h>. + (start_server): Save the name returned by gethostbyname. Call + krb_realmofhost to get the realm. Pass the resulting realm to + krb_sendauth. Pass the saved real name to krb_sendauth, rather + than server_host. + + * update.c (update_file_proc): Pass &docheckout to patch_file. If + it is set to 1, fall through to T_CHECKOUT case. + (patch_file): Add docheckout argument. Set it to 1 if we can't + make a patch. Check out the files and run diff rather than + rcsdiff. If either file does not end in a newline, we can't make + a patch. If the patch starts with the string "Binary", assume + one or the other is a binary file, and that we can't make a patch. + +Tue Jun 28 11:57:29 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + + * client.c (update_entries): If the patch file is empty, don't run + patch program; avoids error message. + + * classify.c (Classify_File): Return T_CHECKOUT, not T_PATCH, if + the file is in the Attic. + + * cvs.h (enum classify_type): Add T_PATCH. + * config.h (PATCH_PROGRAM): Define. + * classify.c (Classify_File): If user file exists and is not + modified, and using the same -k options, return T_PATCH instead of + T_CHECKOUT. + * update.c (patches): New static variable. + (update): Add u to gnu_getopt argument. Handle it. + (update_file_proc): Handle T_PATCH. + (patch_file): New static function. + * server.h (enum server_updated_arg4): Add SERVER_PATCHED. + * server.c (server_updated): Handle SERVER_PATCHED by sending + "Patched" command. + (serve_ignore): New static function. + (requests): Add "update-patches". + (client_update): If the server supports "update-patches", send -u. + * client.c (struct update_entries_data): Change contents field + from int to an unnamed enum. + (update_entries): Correponding change. If contents is + UPDATE_ENTRIES_PATCH, pass the input to the patch program. + (handle_checked_in): Initialize contents to enum value, not int. + (handle_updated, handle_merged): Likewise. + (handle_patched): New static function. + (responses): Add "Patched". + * commit.c (check_fileproc): Handle T_PATCH. + * status.c (status_fileproc): Likewise. + + * client.c (start_server): If CVS_CLIENT_PORT is set in the + environment, connect to that port, rather than looking up "cvs" in + /etc/services. For debugging. + +Tue Jun 21 12:48:16 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * update.c (joining): Return result of comparing pointer with + NULL, not result of casting (truncating, on Alpha) pointer to int. + + * main.c (main) [HAVE_KERBEROS]: Impose a umask if starting as + Kerberos server, so temp directories won't be world-writeable. + + * update.c (update_filesdone_proc) [CVSADM_ROOT]: If environment + variable CVS_IGNORE_REMOTE_ROOT is set and repository is remote, + don't create CVS/Root file. + * main.c (main): If env var CVS_IGNORE_REMOTE_ROOT is set, don't + check CVS/Root. + +Fri Jun 10 18:48:32 1994 Mark Eichin (eichin@cygnus.com) + + * server.c (O_NDELAY): use POSIX O_NONBLOCK by default, unless it + isn't available (in which case substitute O_NDELAY.) + +Thu Jun 9 19:17:44 1994 Mark Eichin (eichin@cygnus.com) + + * server.c (server_cleanup): chdir out of server_temp_dir before + deleting it (so that it works on non-BSD systems.) Code for choice + of directory cloned from server(). + +Fri May 27 18:16:01 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * client.c (update_entries): Add return type of void. + (get_responses_and_close): If using Kerberos and from_server and + to_server are using the same file descriptor, use shutdown, not + fclose. Close from_server. + (start_server): New function; most of old version renamed to + start_rsh_server. + (start_rsh_server): Mostly renamed from old start_server. + (send_fileproc): Use %lu and cast sb.st_size in fprintf call. + (send_files): Remove unused variables repos and i. + (option_no_arg): Comment out; unused. + * main.c (main): Initialize cvs_update_env to 0. If command is + "kserver", authenticate and change command to "server". If + command is "server", don't call Name_Root, don't check access to + history file, and don't assume that CVSroot is not NULL. + * server.c (my_memmove): Removed. + (strerror): Change check from STRERROR_MISSING to HAVE_STRERROR. + (serve_root): Likewise for putenv. + (serve_modified): Initialize buf to NULL. + (struct output_buffer, buf_try_send): Remove old buffering code. + (struct buffer, struct buffer_data, BUFFER_DATA_SIZE, + allocate_buffer_datas, get_buffer_data, buf_empty_p, + buf_append_char, buf_append_data, buf_read_file, buf_input_data, + buf_copy_lines): New buffering code. + (buf_output, buf_output0, buf_send_output, set_nonblock, + set_block, buf_send_counted, buf_copy_counted): Rewrite for new + buffering code. + (protocol, protocol_memory_error, outbuf_memory_error, + do_cvs_command, server_updated): Rewrite for new buffering code. + (input_memory_error): New function. + (server): Put Rcsbin at start of PATH in environment. + * Makefile.in: Add @includeopt@ to DEFS. + +Fri May 20 08:13:10 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * cvs.h, classify.c (Classify_File): New argument update_dir. + Include it in user messages. + * commit.c (check_fileproc), status.c (status_fileproc), update.c + (update_file_proc): Pass update_dir to Classify_File. + * commit.c (check_fileproc), update.c (checkout_file): + Include update_dir in user messages. + * commit.c (check_fileproc) update.c (update_file_proc): Re-word + "unknown status" message. + + * server.c (server_checked_in): Deal with the case where + scratched_file is set rather than entries_line. + + * entries.c (Register): Write file even if server_active. + * add.c (add): Add comment about how we depend on above behavior. + +Tue May 17 08:16:42 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + * mkmodules.c: Add dummy server_active and server_cleanup, to go + with the dummy Lock_Cleanup already there. + + * server.c (server_cleanup): No longer static. + +Sat May 7 10:17:17 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + Deal with add and remove: + * commit.c (checkaddfile): If CVSEXT_OPT or CVSEXT_LOG file does + not exist, just silently keep going. + (remove_file): If server_active, remove file before creating + temporary file with that name. + * server.c (serve_remove, serve_add): New functions. + (requests): Add them. + * server.c (server_register): If options is NULL, it means there + are no options. + * server.c, server.h (server_scratch_entry_only): New function. + New variable kill_scratched_file. + (server_scratch, server_updated): Deal with kill_scratched_file. + * commit.c (commit_fileproc): If server_active, call + server_scratch_entry_only and server_updated. + * add.c (add): Add client_active code. + (add): If server_active, call server_checked_in for each file added. + * remove.c (remove): Add client_active code. + (remove_fileproc): If server_active, call server_checked_in. + * main.c (cmds), client.c, client.h: New functions client_add and + client_remove. + * Move declarations of add, cvsremove, diff, and cvslog from + main.c to cvs.h. + * client.c (call_in_directory): Update comment regarding Root and + Repository files. + (send_fileproc): Only send Entries line if Version_TS really finds + an entry. If it doesn't find one, send Modified. + (update_entries): If version is empty or starts with 0 or -, + create a dummy timestamp. + +Thu May 5 19:02:51 1994 Per Bothner (bothner@kalessin.cygnus.com) + + * recurse/c (start_recursion): If we're doing rtag, and thus + have cd'd to the reporsitory, add ,v to a file name before stat'ing. + +Wed Apr 20 15:01:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * client.c (client_commit): Call ign_setup. + (client_update, client_checkout): Likewise. + * diff.c (diff): If client, call ign_setup. + * log.c (cvslog): Likewise. + * update.h (ignlist): Change definition to declaration to avoid + depending upon common semantics (not required by ANSI C, and not + the default on Irix 5). + * update.c (ignlist): Define. + +Tue Apr 19 00:02:54 1994 John Gilmore (gnu@cygnus.com) + + Add support for remote `cvs log'; clean up `cvs diff' a bit. + + * client.c (send_arg): Make external. + (send_option_string): New function. + (client_diff_usage): Remove, unused. + (client_diff): Just call diff, not do_diff. + (client_log): Add. + * client.h (client_log, send_arg, send_option_string): Declare. + * cvs.h (cvslog): Declare. + * diff.c (do_diff): Fold back into diff(), distinguish by checking + client_active. + (diff): Remove `-*' arg parsing crud; use send_option_string. + * log.c (cvslog): If a client, start the server, pass options + and files, and handle server responses. + * main.c (cmds): Add client_log. + (main): Remove obnoxious message every time CVS/Root is used. + Now CVS will be quiet about it -- unless there is a conflict + between $CVSROOT or -d value versus CVS/Root. + * server.c (serve_log): Add. + (requests): Add "log". + +Mon Apr 18 22:07:53 1994 John Gilmore (gnu@cygnus.com) + + Add support for remote `cvs diff'. + + * diff.c (diff): Break guts out into new fn do_diff. + Add code to handle starting server, writing args, + sending files, and retrieving responses. + (includes): Use PARAMS for static function declarations. + * client.c (to_server, from_server, rsh_pid, + get_responses_and_close, start_server, send_files, + option_with_arg): Make external. + (send_file_names): New function. + (client_diff): New function. + * client.h (client_diff, to_server, from_server, + rsh_pid, option_with_arg, get_responses_and_close, start_server, + send_file_names, send_files): Declare. + * cvs.h (diff): Declare. + * main.c (cmds): Add client_diff to command table. + * server.c (serve_diff): New function. + (requests): Add serve_diff. + (server): Bug fix: avoid free()ing incremented cmd pointer. + * update.h (update_filesdone_proc): Declare with PARAMS. + +Sat Apr 16 04:20:09 1994 John Gilmore (gnu@cygnus.com) + + * root.c (Name_root): Fix tyop (CVSroot when root meant). + +Sat Apr 16 03:49:36 1994 John Gilmore (gnu@cygnus.com) + + Clean up remote `cvs update' to properly handle ignored + files (and files that CVS can't identify), and to create + CVS/Root entries on the client side, not the server side. + + * client.c (send_fileproc): Handle the ignore list. + (send_dirent_proc): New function for handling ignores. + (send_files): Use update_filesdone_proc and send_dirent_proc + while recursing through the local filesystem. + * update.h: New file. + * update.c: Move a few things into update.h so that client.c + can use them. + +Fri Mar 11 13:13:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) + + * server.c: If O_NDELAY is not defined, but O_NONBLOCK is, define + O_NDELAY to O_NONBLOCK. + +Wed Mar 9 21:08:30 1994 Jim Kingdon (kingdon@lioth.cygnus.com) + + Fix some spurious remote CVS errors caused by the CVS/Root patches: + * update.c (update_filesdone_proc): If server_active, don't try to + create CVS/Root. + * root.c (Name_Root): Make error messages which happen if root is + not an absolute pathname or if it doesn't exist a bit clearer. + Skip them if root contains a colon. + +Mon Nov 1 15:54:51 1993 K. Richard Pixley (rich@sendai.cygnus.com) + + * client.c (client_commit): dynamically allocate message. + +Tue Jun 1 17:03:05 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com) + + * server.h: remove alloca cruft + + * server.c: replace with better alloca cruft + +Mon May 24 11:25:11 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * entries.c (Scratch_Entry): Update our local Entries file even if + server_active. + + * server.c (server_scratch, server_register): If both Register + and Scratch_Entry happen, use whichever one happened later. + If neither happen, silently continue. + + * client.c (client_checkout): Initialize tag and date (eichin and + I independently discovered this bug at the same time). + +Wed May 19 10:11:51 1993 Mark Eichin (eichin@cygnus.com) + + * client.c (update_entries): handle short reads over the net + (SVR4 fread is known to be broken, specifically for short + reads off of streams.) + +Tue May 18 15:53:44 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * server.c (do_cvs_command): Fix fencepost error in setting + num_to_check. + + * server.c (do_cvs_command): If terminated with a core dump, print + message and set dont_delete_temp. + (server_cleanup): If dont_delete_temp, don't delete it. + + * client.c (get_server_responses): Don't change cmd since we + are going to "free (cmd)". + + * server.c: Rename memmove to my_memmove pending a real fix. + + * server.c (do_cvs_command): Set num_to_check to largest descriptor + we try to use, rather than using (non-portable) getdtablesize. + +Wed May 12 15:31:40 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + Add CVS client feature: + * client.{c,h}: New files. + * cvs.h: Include client.h. + * main.c: If CVSROOT has a colon, use client commands instead. + * vers_ts.c (Version_TS): If repository arg is NULL, don't worry + about the repository. + * logmsg.c (do_editor): If repository or changes is NULL, just don't + use those features. + * create_adm.c (Create_Admin), callers: Move the test for whether + the repository exists from here to callers. + * repos.c (Name_Repository): Don't test whether the repository exists + if client_active set (might be better to move test to callers). + + Add CVS server feature: + * server.{c,h}: New files. + * cvs.h: Include server.h. + * checkin.c (Checkin): Call server_checked_in. + * update.c (update_file_proc, merge_files): Call server_updated. + * entries.c (Register): Call server_register. + (Scratch_Entry): Call server_scratch. + * main.c: Add server to cmds. + * vers_ts.c (Version_TS): If server_active, call new function + time_stamp_server to set ts_user. + + +For older changes, there might be some relevant stuff in the bottom of +the NEWS file, but I'm afraid probably a lot of them are lost in the +mists of time. diff --git a/gnu/usr.bin/cvs/src/Makefile.in b/gnu/usr.bin/cvs/src/Makefile.in index 436d1ef6cef..acb3343f6ab 100644 --- a/gnu/usr.bin/cvs/src/Makefile.in +++ b/gnu/usr.bin/cvs/src/Makefile.in @@ -46,34 +46,30 @@ LIBS = @LIBS@ SOURCES = add.c admin.c checkin.c checkout.c classify.c client.c commit.c \ create_adm.c cvsrc.c diff.c edit.c entries.c error.c expand_path.c \ fileattr.c find_names.c hash.c history.c ignore.c import.c \ -lock.c log.c login.c logmsg.c main.c modules.c myndbm.c no_diff.c \ +lock.c log.c login.c logmsg.c main.c mkmodules.c modules.c myndbm.c no_diff.c \ parseinfo.c patch.c rcs.c rcscmds.c recurse.c release.c remove.c repos.c \ root.c rtag.c scramble.c server.c status.c subr.c filesubr.c run.c \ tag.c update.c watch.c wrapper.c vers_ts.c version.c -MSOURCES = mkmodules.c OBJECTS = add.o admin.o checkin.o checkout.o classify.o client.o commit.o \ create_adm.o cvsrc.o diff.o edit.o entries.o expand_path.o \ fileattr.o find_names.o hash.o history.o ignore.o import.o \ -lock.o log.o login.o logmsg.o main.o modules.o myndbm.o no_diff.o \ +lock.o log.o login.o logmsg.o main.o mkmodules.o modules.o myndbm.o no_diff.o \ parseinfo.o patch.o rcs.o rcscmds.o recurse.o release.o remove.o repos.o \ root.o rtag.o scramble.o server.o status.o tag.o update.o \ -watch.o wrapper.o vers_ts.o - -MOBJECTS = hash.o mkmodules.o myndbm.o - -COMMON_OBJECTS = subr.o filesubr.o run.o version.o error.o +watch.o wrapper.o vers_ts.o \ +subr.o filesubr.o run.o version.o error.o HEADERS = cvs.h rcs.h hash.h myndbm.h \ update.h server.h client.h error.h fileattr.h edit.h watch.h -TAGFILES = $(HEADERS) options.h.in $(SOURCES) $(MSOURCES) +TAGFILES = $(HEADERS) options.h.in $(SOURCES) -DISTFILES = .cvsignore Makefile.in ChangeLog ChangeLog.fsf \ +DISTFILES = .cvsignore Makefile.in ChangeLog ChangeLog-9395 ChangeLog-9194 \ NOTES README-rm-add \ sanity.sh cvsbug.sh $(TAGFILES) -PROGS = cvs mkmodules cvsbug +PROGS = cvs cvsbug DEFS = @DEFS@ @includeopt@ @@ -136,7 +132,7 @@ ls: .PHONY: ls clean: - /bin/rm -f $(PROGS) *.o core + /bin/rm -f $(PROGS) *.o core check.log check.plog .PHONY: clean distclean: clean @@ -157,8 +153,8 @@ dist-dir: $(PROGS): ../lib/libcvs.a -cvs: $(OBJECTS) $(COMMON_OBJECTS) - $(CC) $(OBJECTS) $(COMMON_OBJECTS) ../lib/libcvs.a $(LIBS) $(LDFLAGS) -o $@ +cvs: $(OBJECTS) + $(CC) $(OBJECTS) ../lib/libcvs.a $(LIBS) $(LDFLAGS) -o $@ xlint: $(SOURCES) files= ; \ @@ -172,9 +168,6 @@ saber: $(SOURCES) # load $(CFLAGS) $(SOURCES) # load ../lib/libcvs.a $(LIBS) -mkmodules: $(MOBJECTS) $(COMMON_OBJECTS) - $(CC) $(LDFLAGS) -o $@ $(MOBJECTS) $(COMMON_OBJECTS) ../lib/libcvs.a $(LIBS) $(LIBIBERTY) - cvsbug: cvsbug.sh echo > .fname \ cvs-`sed < $(srcdir)/version.c \ @@ -189,7 +182,7 @@ cvsbug: cvsbug.sh # Compilation rules. -$(OBJECTS) $(COMMON_OBJECTS) mkmodules.o: $(HEADERS) options.h +$(OBJECTS): $(HEADERS) options.h subdir = src Makefile: ../config.status Makefile.in diff --git a/gnu/usr.bin/cvs/src/README-rm-add b/gnu/usr.bin/cvs/src/README-rm-add index 17c721fd958..87fd7c6d277 100644 --- a/gnu/usr.bin/cvs/src/README-rm-add +++ b/gnu/usr.bin/cvs/src/README-rm-add @@ -1,23 +1,15 @@ WHAT THE "DEATH SUPPORT" FEATURES DO: -(this really should be in the main manual, but noone has gotten around -to updating it). +(Some of the death support stuff is documented in the main manual, but +this file is for stuff which noone has gotten around to adding to the +main manual yet). CVS with death support can record when a file is active, or alive, and when it is removed, or dead. With this facility you can record the history of a file, including the fact that at some point in its life the file was removed and then later added. -First, the following now works as expected: - - touch foo - cvs add foo ; cvs ci -m "added" foo - rm foo - cvs rm foo ; cvs ci -m "removed" foo - touch foo - cvs add foo ; cvs ci -m "resurrected" foo - -Second, files can now be added or removed in a branch and later merged +Files can now be added or removed in a branch and later merged into the trunk. cvs update -A @@ -37,12 +29,3 @@ Files removed in the trunk may be merged into branches. Files added on the trunk are a special case. They cannot be merged into a branch. Instead, simply branch the file by hand. - -I also extended the "cvs update -j" semantic slightly. Like before, -if you use two -j options, the changes made between the first and the -second will be merged into your working files. This has not changed. - -If you use only one -j option, it is used as the second -j option. -The first is assumed to be the greatest common ancestor revision -between the revision specified by the -j and the BASE revision of your -working file. diff --git a/gnu/usr.bin/cvs/src/add.c b/gnu/usr.bin/cvs/src/add.c index fd800763254..e481f2937ea 100644 --- a/gnu/usr.bin/cvs/src/add.c +++ b/gnu/usr.bin/cvs/src/add.c @@ -25,12 +25,7 @@ */ #include "cvs.h" -#include "save-cwd.h" - -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)add.c 1.55 94/10/22 $"; -USE(rcsid); -#endif +#include "savecwd.h" static int add_directory PROTO((char *repository, char *dir)); static int build_entry PROTO((char *repository, char *user, char *options, @@ -194,7 +189,6 @@ add (argc, argv) added_files++; if (!quiet) { -#ifdef DEATH_SUPPORT if (vers->tag) error (0, 0, "\ scheduling %s `%s' for addition on branch `%s'", @@ -203,7 +197,6 @@ scheduling %s `%s' for addition on branch `%s'", : "file"), user, vers->tag); else -#endif /* DEATH_SUPPORT */ error (0, 0, "scheduling %s `%s' for addition", (wrap_name_has (user, WRAP_TOCVS) ? "wrapper" @@ -213,7 +206,6 @@ scheduling %s `%s' for addition on branch `%s'", } } } -#ifdef DEATH_SUPPORT else if (RCS_isdead (vers->srcfile, vers->vn_rcs)) { if (isdir (user) && !wrap_name_has (user, WRAP_TOCVS)) @@ -234,7 +226,6 @@ scheduling %s `%s' for addition on branch `%s'", ++added_files; } } -#endif /* DEATH_SUPPORT */ else { /* @@ -497,22 +488,6 @@ build_entry (repository, user, options, message, entries, tag) char line[MAXLINELEN]; FILE *fp; -#ifndef DEATH_SUPPORT - /* when using the rcs death support, this case is not a problem. */ - /* - * There may be an old file with the same name in the Attic! This is, - * perhaps, an awkward place to check for this, but other places are - * equally awkward. - */ - (void) sprintf (fname, "%s/%s/%s%s", repository, CVSATTIC, user, RCSEXT); - if (isreadable (fname)) - { - error (0, 0, "there is an old file %s already in %s/%s", user, - repository, CVSATTIC); - return (1); - } -#endif /* no DEATH_SUPPORT */ - if (noexec) return (0); diff --git a/gnu/usr.bin/cvs/src/admin.c b/gnu/usr.bin/cvs/src/admin.c index ebbda9a122c..c7aa719e18b 100644 --- a/gnu/usr.bin/cvs/src/admin.c +++ b/gnu/usr.bin/cvs/src/admin.c @@ -16,15 +16,8 @@ #include <grp.h> #endif -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)admin.c 1.20 94/09/30 $"; -USE(rcsid); -#endif - static Dtype admin_dirproc PROTO((char *dir, char *repos, char *update_dir)); -static int admin_fileproc PROTO((char *file, char *update_dir, - char *repository, List *entries, - List *srcfiles)); +static int admin_fileproc PROTO((struct file_info *finfo)); static const char *const admin_usage[] = { @@ -120,12 +113,8 @@ admin (argc, argv) */ /* ARGSUSED */ static int -admin_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +admin_fileproc (finfo) + struct file_info *finfo; { Vers_TS *vers; char *version; @@ -134,19 +123,19 @@ admin_fileproc (file, update_dir, repository, entries, srcfiles) int retcode = 0; int status = 0; - vers = Version_TS (repository, (char *) NULL, (char *) NULL, (char *) NULL, - file, 0, 0, entries, srcfiles); + vers = Version_TS (finfo->repository, (char *) NULL, (char *) NULL, (char *) NULL, + finfo->file, 0, 0, finfo->entries, finfo->srcfiles); version = vers->vn_user; if (version == NULL) goto exitfunc; else if (strcmp (version, "0") == 0) { - error (0, 0, "cannot admin newly added file `%s'", file); + error (0, 0, "cannot admin newly added file `%s'", finfo->file); goto exitfunc; } - run_setup ("%s%s", Rcsbin, RCS); + run_setup ("%s%s -x,v/", Rcsbin, RCS); for (argc = ac, argv = av; argc; argc--, argv++) run_arg (*argv); run_arg (vers->srcfile->path); @@ -154,7 +143,7 @@ admin_fileproc (file, update_dir, repository, entries, srcfiles) { if (!quiet) error (0, retcode == -1 ? errno : 0, - "%s failed for `%s'", RCS, file); + "%s failed for `%s'", RCS, finfo->file); status = 1; goto exitfunc; } diff --git a/gnu/usr.bin/cvs/src/checkin.c b/gnu/usr.bin/cvs/src/checkin.c index 6a75b4cd736..2e5b284892a 100644 --- a/gnu/usr.bin/cvs/src/checkin.c +++ b/gnu/usr.bin/cvs/src/checkin.c @@ -19,11 +19,6 @@ #include "fileattr.h" #include "edit.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)checkin.c 1.48 94/10/07 $"; -USE(rcsid); -#endif - int Checkin (type, file, update_dir, repository, rcs, rev, tag, options, message, entries) @@ -78,12 +73,7 @@ Checkin (type, file, update_dir, repository, } } - run_setup ("%s%s -f %s%s", Rcsbin, RCS_CI, - rev ? "-r" : "", rev ? rev : ""); - run_args ("-m%s", make_message_rcslegal (message)); - run_arg (rcs); - - switch (run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL)) + switch (RCS_checkin (rcs, NULL, message, rev, 0, 0)) { case 0: /* everything normal */ @@ -98,10 +88,10 @@ Checkin (type, file, update_dir, repository, if (strcmp (options, "-V4") == 0) /* upgrade to V5 now */ options[0] = '\0'; - run_setup ("%s%s -q %s %s%s", Rcsbin, RCS_CO, options, - rev ? "-r" : "", rev ? rev : ""); - run_arg (rcs); - (void) run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); + + /* FIXME: should be checking for errors. */ + (void) RCS_checkout (rcs, "", rev, options, RUN_TTY, 0, 0); + xchmod (file, 1); if (xcmp (file, fname) == 0) { @@ -126,16 +116,6 @@ Checkin (type, file, update_dir, repository, if (cvswrite == FALSE || fileattr_get (file, "_watched")) xchmod (file, 0); -#ifndef DEATH_SUPPORT - /* With death_support, files added with tags go into branches immediately. */ - - /* for added files with symbolic tags, need to add the tag too */ - if (type == 'A' && tag && !isdigit (*tag)) - { - (void) RCS_settag(rcs, tag, rev); - } -#endif /* No DEATH_SUPPORT */ - /* re-register with the new data */ vers = Version_TS (repository, (char *) NULL, tag, (char *) NULL, file, 1, set_time, entries, (List *) NULL); diff --git a/gnu/usr.bin/cvs/src/checkout.c b/gnu/usr.bin/cvs/src/checkout.c index b78eb97388e..005a73f91dd 100644 --- a/gnu/usr.bin/cvs/src/checkout.c +++ b/gnu/usr.bin/cvs/src/checkout.c @@ -35,11 +35,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)checkout.c 1.78 94/10/07 $"; -USE(rcsid); -#endif - static char *findslash PROTO((char *start, char *p)); static int build_dirs_and_chdir PROTO((char *dir, char *prepath, char *realdir, int sticky)); @@ -431,7 +426,10 @@ safe_location () { strcpy(hardpath, CVSroot); } - hardpath[x] = '\0'; + else + { + hardpath[x] = '\0'; + } getwd (current); if (strncmp(current, hardpath, strlen(hardpath)) == 0) { diff --git a/gnu/usr.bin/cvs/src/classify.c b/gnu/usr.bin/cvs/src/classify.c index 23fafca9b2c..9e18309332f 100644 --- a/gnu/usr.bin/cvs/src/classify.c +++ b/gnu/usr.bin/cvs/src/classify.c @@ -9,11 +9,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)classify.c 1.17 94/10/07 $"; -USE(rcsid); -#endif - #ifdef SERVER_SUPPORT static void sticky_ck PROTO((char *file, int aflag, Vers_TS * vers, List * entries, @@ -79,7 +74,6 @@ Classify_File (file, tag, date, options, force_tag_match, aflag, repository, ret = T_UNKNOWN; } } -#ifdef DEATH_SUPPORT else if (RCS_isdead (vers->srcfile, vers->vn_rcs)) { if (vers->ts_user == NULL) @@ -97,7 +91,6 @@ Classify_File (file, tag, date, options, force_tag_match, aflag, repository, ret = T_UNKNOWN; } } -#endif else { /* there is an rcs file */ @@ -158,39 +151,35 @@ Classify_File (file, tag, date, options, force_tag_match, aflag, repository, if (vers->vn_rcs == NULL) /* There is no RCS file, added file */ ret = T_ADDED; -#ifdef DEATH_SUPPORT else if (RCS_isdead (vers->srcfile, vers->vn_rcs)) /* we are resurrecting. */ ret = T_ADDED; -#endif /* DEATH_SUPPORT */ else { -#ifdef DEATH_SUPPORT - if (vers->srcfile->flags & INATTIC - && vers->srcfile->flags & VALID) - { - /* This file has been added on some branch other than - the one we are looking at. In the branch we are - looking at, the file was already valid. */ - if (!really_quiet) - error (0, 0, - "conflict: %s has been added, but already exists", - fullname); - } - else - { -#endif /* DEATH_SUPPORT */ - /* - * There is an RCS file, so someone else must have checked - * one in behind our back; conflict - */ - if (!really_quiet) - error (0, 0, - "conflict: %s created independently by second party", - fullname); -#ifdef DEATH_SUPPORT - } -#endif + if (vers->srcfile->flags & INATTIC + && vers->srcfile->flags & VALID) + { + /* This file has been added on some branch other than + the one we are looking at. In the branch we are + looking at, the file was already valid. */ + if (!really_quiet) + error (0, 0, + "\ +conflict: %s has been added, but already exists", + fullname); + } + else + { + /* + * There is an RCS file, so someone else must have checked + * one in behind our back; conflict + */ + if (!really_quiet) + error (0, 0, + "\ +conflict: %s created independently by second party", + fullname); + } ret = T_CONFLICT; } } diff --git a/gnu/usr.bin/cvs/src/client.c b/gnu/usr.bin/cvs/src/client.c index 0fa3299e4d9..d49a239f6b5 100644 --- a/gnu/usr.bin/cvs/src/client.c +++ b/gnu/usr.bin/cvs/src/client.c @@ -2,15 +2,20 @@ #include "cvs.h" #include "getline.h" +#include "edit.h" #ifdef CLIENT_SUPPORT #include "md5.h" #if defined(AUTH_CLIENT_SUPPORT) || HAVE_KERBEROS +#ifdef HAVE_WINSOCK_H +#include <winsock.h> +#else /* No winsock.h */ #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> +#endif /* No winsock.h */ #endif /* defined(AUTH_CLIENT_SUPPORT) || HAVE_KERBEROS */ #ifdef AUTH_CLIENT_SUPPORT @@ -390,7 +395,7 @@ read_line (resultp, eof_ok) if (eof_ok) return 0; else - error (1, 0, "premature end of file from server"); + error (1, 0, "end of file from server (consult above messages if any)"); } if (c == '\n') @@ -1793,6 +1798,27 @@ send_repository (dir, repos, update_dir) { char *adm_name; + /* FIXME: this is probably not the best place to check; I wish I + * knew where in here's callers to really trap this bug. To + * reproduce the bug, just do this: + * + * mkdir junk + * cd junk + * cvs -d some_repos update foo + * + * Poof, CVS seg faults and dies! It's because it's trying to + * send a NULL string to the server but dies in send_to_server. + * That string was supposed to be the repository, but it doesn't + * get set because there's no CVSADM dir, and somehow it's not + * getting set from the -d argument either... ? + */ + if (repos == NULL) + { + /* Lame error. I want a real fix but can't stay up to track + this down right now. */ + error (1, 0, "no repository"); + } + if (update_dir == NULL || update_dir[0] == '\0') update_dir = "."; @@ -1942,6 +1968,7 @@ send_repository (dir, repos, update_dir) error (0, errno, "closing %s", adm_name); } } + free (adm_name); if (last_repos != NULL) free (last_repos); if (last_update_dir != NULL) @@ -2216,7 +2243,7 @@ send_to_server (str, len) if (use_socket_style) { int just_wrtn = 0; - int wrtn = 0; + size_t wrtn = 0; while (wrtn < len) { @@ -2266,7 +2293,7 @@ read_from_server (buf, len) if (use_socket_style) { int just_red = 0; - int red = 0; + size_t red = 0; while (red < len) { @@ -2295,7 +2322,7 @@ read_from_server (buf, len) if (ferror (from_server)) error (1, errno, "reading from server"); if (feof (from_server)) - error (1, 0, "premature end-of-file from server"); + error (1, 0, "end of file from server (consult above messages if any)"); } } @@ -2498,9 +2525,10 @@ connect_to_pserver (tofdp, fromfdp, verify_only) int verify_only; { int sock; +#ifndef NO_SOCKET_TO_FD int tofd, fromfd; +#endif int port_number; - struct hostent *host; struct sockaddr_in client_sai; /* Does nothing if already called before now. */ @@ -2777,6 +2805,21 @@ start_kerberos_server (tofdp, fromfdp) #endif /* HAVE_KERBEROS */ +static int send_variable_proc PROTO ((Node *, void *)); + +static int +send_variable_proc (node, closure) + Node *node; + void *closure; +{ + send_to_server ("Set ", 0); + send_to_server (node->key, 0); + send_to_server ("=", 1); + send_to_server (node->data, 0); + send_to_server ("\012", 1); + return 0; +} + /* Contact the server. */ void start_server () @@ -2984,22 +3027,29 @@ start_server () } } if (gzip_level) - { + { if (supported_request ("gzip-file-contents")) - { + { char gzip_level_buf[5]; send_to_server ("gzip-file-contents ", 0); sprintf (gzip_level_buf, "%d", gzip_level); send_to_server (gzip_level_buf, 0); send_to_server ("\012", 1); - } + } else - { + { fprintf (stderr, "server doesn't support gzip-file-contents\n"); gzip_level = 0; - } - } + } + } + /* If "Set" is not supported, just silently fail to send the variables. + Users with an old server should get a useful error message when it + fails to recognize the ${=foo} syntax. This way if someone uses + several server, some of which are new and some old, they can still + set user variables in their .cvsrc without trouble. */ + if (supported_request ("Set")) + walklist (variable_list, send_variable_proc, NULL); } #ifndef RSH_NOT_TRANSPARENT @@ -3176,8 +3226,8 @@ send_arg (string) } else { - buf[0] = *p; - send_to_server (buf, 1); + buf[0] = *p; + send_to_server (buf, 1); } ++p; } @@ -3379,39 +3429,35 @@ send_modified (file, short_pathname, vers) free (mode_string); } -static int send_fileproc PROTO ((char *, char *, char *, List *, List *)); +static int send_fileproc PROTO ((struct file_info *finfo)); /* Deal with one file. */ static int -send_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +send_fileproc (finfo) + struct file_info *finfo; { Vers_TS *vers; - int update_dir_len = strlen (update_dir); - char *short_pathname = xmalloc (update_dir_len + strlen (file) + 40); - strcpy (short_pathname, update_dir); - if (update_dir[0] != '\0') + int update_dir_len = strlen (finfo->update_dir); + char *short_pathname = xmalloc (update_dir_len + strlen (finfo->file) + 40); + strcpy (short_pathname, finfo->update_dir); + if (finfo->update_dir[0] != '\0') strcat (short_pathname, "/"); - strcat (short_pathname, file); + strcat (short_pathname, finfo->file); - send_a_repository ("", repository, update_dir); + send_a_repository ("", finfo->repository, finfo->update_dir); vers = Version_TS ((char *)NULL, (char *)NULL, (char *)NULL, (char *)NULL, - file, 0, 0, entries, (List *)NULL); + finfo->file, 0, 0, finfo->entries, (List *)NULL); if (vers->vn_user != NULL) { char *tmp; - tmp = xmalloc (strlen (file) + strlen (vers->vn_user) + tmp = xmalloc (strlen (finfo->file) + strlen (vers->vn_user) + strlen (vers->options) + 200); sprintf (tmp, "Entry /%s/%s/%s%s/%s/", - file, vers->vn_user, + finfo->file, vers->vn_user, vers->ts_conflict == NULL ? "" : "+", (vers->ts_conflict == NULL ? "" : (vers->ts_user != NULL && @@ -3448,7 +3494,7 @@ send_fileproc (file, update_dir, repository, entries, srcfiles) { /* if the server is old, use the old request... */ send_to_server ("Lost ", 0); - send_to_server (file, 0); + send_to_server (finfo->file, 0); send_to_server ("\012", 1); /* * Otherwise, don't do anything for missing files, @@ -3459,7 +3505,7 @@ send_fileproc (file, update_dir, repository, entries, srcfiles) else if (vers->ts_rcs == NULL || strcmp (vers->ts_user, vers->ts_rcs) != 0) { - send_modified (file, short_pathname, vers); + send_modified (finfo->file, short_pathname, vers); } else { @@ -3467,7 +3513,7 @@ send_fileproc (file, update_dir, repository, entries, srcfiles) if (use_unchanged) { send_to_server ("Unchanged ", 0); - send_to_server (file, 0); + send_to_server (finfo->file, 0); send_to_server ("\012", 1); } } @@ -3479,7 +3525,7 @@ send_fileproc (file, update_dir, repository, entries, srcfiles) p = getnode (); p->type = FILES; - p->key = xstrdup (file); + p->key = xstrdup (finfo->file); (void) addnode (ignlist, p); } @@ -3674,7 +3720,32 @@ send_file_names (argc, argv) } for (i = 0; i < argc; ++i) - send_arg (argv[i]); + { + char buf[1]; + char *p = argv[i]; + + send_to_server ("Argument ", 0); + + while (*p) + { + if (*p == '\n') + { + send_to_server ("\012Argumentx ", 0); + } + else if (ISDIRSEP (*p)) + { + buf[0] = '/'; + send_to_server (buf, 1); + } + else + { + buf[0] = *p; + send_to_server (buf, 1); + } + ++p; + } + send_to_server ("\012", 1); + } } diff --git a/gnu/usr.bin/cvs/src/client.h b/gnu/usr.bin/cvs/src/client.h index 53043857527..a8011ac3a99 100644 --- a/gnu/usr.bin/cvs/src/client.h +++ b/gnu/usr.bin/cvs/src/client.h @@ -59,6 +59,10 @@ int connect_to_pserver PROTO((int *tofdp, int* fromfdp, int verify_only)); # endif /* CVS_AUTH_PORT */ #endif /* AUTH_CLIENT_SUPPORT */ +#ifdef AUTH_SERVER_SUPPORT +extern void authenticate_connection PROTO ((void)); +#endif + /* Talking to the server. */ void send_to_server PROTO((char *str, size_t len)); void read_from_server PROTO((char *buf, size_t len)); diff --git a/gnu/usr.bin/cvs/src/create_adm.c b/gnu/usr.bin/cvs/src/create_adm.c index 1fe81855adf..d7ee2dc6f6c 100644 --- a/gnu/usr.bin/cvs/src/create_adm.c +++ b/gnu/usr.bin/cvs/src/create_adm.c @@ -13,11 +13,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)create_adm.c 1.28 94/09/23 $"; -USE(rcsid); -#endif - /* update_dir includes dir as its last component. */ void @@ -56,11 +51,9 @@ Create_Admin (dir, update_dir, repository, tag, date) make_directory (tmp); -#ifdef CVSADM_ROOT /* record the current cvs root for later use */ Create_Root (dir, CVSroot); -#endif /* CVSADM_ROOT */ if (dir != NULL) (void) sprintf (tmp, "%s/%s", dir, CVSADM_REP); else diff --git a/gnu/usr.bin/cvs/src/cvsrc.c b/gnu/usr.bin/cvs/src/cvsrc.c index 5882afceb26..1d2946912b5 100644 --- a/gnu/usr.bin/cvs/src/cvsrc.c +++ b/gnu/usr.bin/cvs/src/cvsrc.c @@ -12,11 +12,6 @@ #include "cvs.h" #include "getline.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)cvsrc.c 1.9 94/09/30 $"; -USE(rcsid); -#endif /* lint */ - /* this file is to be found in the user's home directory */ #ifndef CVSRC_FILENAME @@ -65,7 +60,7 @@ read_cvsrc (argc, argv) /* determine filename for ~/.cvsrc */ - homedir = getenv ("HOME"); + homedir = get_homedir (); if (!homedir) return; diff --git a/gnu/usr.bin/cvs/src/diff.c b/gnu/usr.bin/cvs/src/diff.c index f798f7ae567..ffe2a3d5c57 100644 --- a/gnu/usr.bin/cvs/src/diff.c +++ b/gnu/usr.bin/cvs/src/diff.c @@ -16,18 +16,12 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)diff.c 1.61 94/10/22 $"; -USE(rcsid); -#endif - static Dtype diff_dirproc PROTO((char *dir, char *pos_repos, char *update_dir)); static int diff_filesdoneproc PROTO((int err, char *repos, char *update_dir)); static int diff_dirleaveproc PROTO((char *dir, int err, char *update_dir)); static int diff_file_nodiff PROTO((char *file, char *repository, List *entries, List *srcfiles, Vers_TS *vers)); -static int diff_fileproc PROTO((char *file, char *update_dir, char *repository, - List * entries, List * srcfiles)); +static int diff_fileproc PROTO((struct file_info *finfo)); static void diff_mark_errors PROTO((int err)); static char *diff_rev1, *diff_rev2; @@ -227,12 +221,8 @@ diff (argc, argv) */ /* ARGSUSED */ static int -diff_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +diff_fileproc (finfo) + struct file_info *finfo; { int status, err = 2; /* 2 == trouble, like rcsdiff */ Vers_TS *vers; @@ -249,8 +239,8 @@ diff_fileproc (file, update_dir, repository, entries, srcfiles) #ifdef SERVER_SUPPORT user_file_rev = 0; #endif - vers = Version_TS (repository, (char *) NULL, (char *) NULL, (char *) NULL, - file, 1, 0, entries, srcfiles); + vers = Version_TS (finfo->repository, (char *) NULL, (char *) NULL, (char *) NULL, + finfo->file, 1, 0, finfo->entries, finfo->srcfiles); if (diff_rev2 != NULL || diff_date2 != NULL) { @@ -259,7 +249,7 @@ diff_fileproc (file, update_dir, repository, entries, srcfiles) } else if (vers->vn_user == NULL) { - error (0, 0, "I know nothing about %s", file); + error (0, 0, "I know nothing about %s", finfo->file); freevers_ts (&vers); diff_mark_errors (err); return (err); @@ -270,7 +260,7 @@ diff_fileproc (file, update_dir, repository, entries, srcfiles) empty_file = DIFF_ADDED; else { - error (0, 0, "%s is a new entry, no comparison available", file); + error (0, 0, "%s is a new entry, no comparison available", finfo->file); freevers_ts (&vers); diff_mark_errors (err); return (err); @@ -282,7 +272,7 @@ diff_fileproc (file, update_dir, repository, entries, srcfiles) empty_file = DIFF_REMOVED; else { - error (0, 0, "%s was removed, no comparison available", file); + error (0, 0, "%s was removed, no comparison available", finfo->file); freevers_ts (&vers); diff_mark_errors (err); return (err); @@ -292,7 +282,7 @@ diff_fileproc (file, update_dir, repository, entries, srcfiles) { if (vers->vn_rcs == NULL && vers->srcfile == NULL) { - error (0, 0, "cannot find revision control file for %s", file); + error (0, 0, "cannot find revision control file for %s", finfo->file); freevers_ts (&vers); diff_mark_errors (err); return (err); @@ -301,7 +291,7 @@ diff_fileproc (file, update_dir, repository, entries, srcfiles) { if (vers->ts_user == NULL) { - error (0, 0, "cannot find %s", file); + error (0, 0, "cannot find %s", finfo->file); freevers_ts (&vers); diff_mark_errors (err); return (err); @@ -318,64 +308,65 @@ diff_fileproc (file, update_dir, repository, entries, srcfiles) } } - if (empty_file == DIFF_NEITHER && diff_file_nodiff (file, repository, entries, srcfiles, vers)) + if (empty_file == DIFF_NEITHER && diff_file_nodiff (finfo->file, finfo->repository, finfo->entries, finfo->srcfiles, vers)) { freevers_ts (&vers); return (0); } -#ifdef DEATH_SUPPORT /* FIXME: Check whether use_rev1 and use_rev2 are dead and deal accordingly. */ -#endif /* Output an "Index:" line for patch to use */ (void) fflush (stdout); - if (update_dir[0]) - (void) printf ("Index: %s/%s\n", update_dir, file); + if (finfo->update_dir[0]) + (void) printf ("Index: %s/%s\n", finfo->update_dir, finfo->file); else - (void) printf ("Index: %s\n", file); + (void) printf ("Index: %s\n", finfo->file); (void) fflush (stdout); - tocvsPath = wrap_tocvs_process_file(file); + tocvsPath = wrap_tocvs_process_file(finfo->file); if (tocvsPath) { /* Backup the current version of the file to CVS/,,filename */ - sprintf(fname,"%s/%s%s",CVSADM, CVSPREFIX, file); + sprintf(fname,"%s/%s%s",CVSADM, CVSPREFIX, finfo->file); if (unlink_file_dir (fname) < 0) if (! existence_error (errno)) - error (1, errno, "cannot remove %s", file); - rename_file (file, fname); + error (1, errno, "cannot remove %s", finfo->file); + rename_file (finfo->file, fname); /* Copy the wrapped file to the current directory then go to work */ - copy_file (tocvsPath, file); + copy_file (tocvsPath, finfo->file); } if (empty_file == DIFF_ADDED || empty_file == DIFF_REMOVED) { (void) printf ("===================================================================\nRCS file: %s\n", - file); - (void) printf ("diff -N %s\n", file); + finfo->file); + (void) printf ("diff -N %s\n", finfo->file); if (empty_file == DIFF_ADDED) { - run_setup ("%s %s %s %s", DIFF, opts, DEVNULL, file); + run_setup ("%s %s %s %s", DIFF, opts, DEVNULL, finfo->file); } else { + int retcode; + /* * FIXME: Should be setting use_rev1 using the logic in * diff_file_nodiff, and using that revision. This code * is broken for "cvs diff -N -r foo". */ - run_setup ("%s%s -p -q %s -r%s", Rcsbin, RCS_CO, - *options ? options : vers->options, vers->vn_rcs); - run_arg (vers->srcfile->path); - if (run_exec (RUN_TTY, tmpnam (tmp), RUN_TTY, RUN_REALLY) == -1) + retcode = RCS_checkout (vers->srcfile->path, NULL, vers->vn_rcs, + *options ? options : vers->options, tmpnam (tmp), + 0, 0); + if (retcode == -1) { (void) unlink (tmp); error (1, errno, "fork failed during checkout of %s", vers->srcfile->path); } + /* FIXME: what if retcode > 0? */ run_setup ("%s %s %s %s", DIFF, opts, tmp, DEVNULL); } @@ -384,13 +375,13 @@ diff_fileproc (file, update_dir, repository, entries, srcfiles) { if (use_rev2) { - run_setup ("%s%s %s %s -r%s -r%s", Rcsbin, RCS_DIFF, + run_setup ("%s%s -x,v/ %s %s -r%s -r%s", Rcsbin, RCS_DIFF, opts, *options ? options : vers->options, use_rev1, use_rev2); } else { - run_setup ("%s%s %s %s -r%s", Rcsbin, RCS_DIFF, opts, + run_setup ("%s%s -x,v/ %s %s -r%s", Rcsbin, RCS_DIFF, opts, *options ? options : vers->options, use_rev1); } run_arg (vers->srcfile->path); @@ -412,13 +403,13 @@ diff_fileproc (file, update_dir, repository, entries, srcfiles) if (tocvsPath) { - if (unlink_file_dir (file) < 0) + if (unlink_file_dir (finfo->file) < 0) if (! existence_error (errno)) - error (1, errno, "cannot remove %s", file); + error (1, errno, "cannot remove %s", finfo->file); - rename_file (fname,file); + rename_file (fname,finfo->file); if (unlink_file (tocvsPath) < 0) - error (1, errno, "cannot remove %s", file); + error (1, errno, "cannot remove %s", finfo->file); } if (empty_file == DIFF_REMOVED) @@ -503,6 +494,7 @@ diff_file_nodiff (file, repository, entries, srcfiles, vers) { Vers_TS *xvers; char tmp[L_tmpnam+1]; + int retcode; /* free up any old use_rev* variables and reset 'em */ if (use_rev1) @@ -530,6 +522,8 @@ diff_file_nodiff (file, repository, entries, srcfiles, vers) else error (0, 0, "no revision for date %s in file %s", diff_date1, file); + + freevers_ts (&xvers); return (1); } use_rev1 = xstrdup (xvers->vn_rcs); @@ -555,6 +549,8 @@ diff_file_nodiff (file, repository, entries, srcfiles, vers) else error (0, 0, "no revision for date %s in file %s", diff_date2, file); + + freevers_ts (&xvers); return (1); } use_rev2 = xstrdup (xvers->vn_rcs); @@ -602,10 +598,9 @@ diff_file_nodiff (file, repository, entries, srcfiles, vers) * with 0 or 1 -r option specified, run a quick diff to see if we * should bother with it at all. */ - run_setup ("%s%s -p -q %s -r%s", Rcsbin, RCS_CO, - *options ? options : vers->options, use_rev1); - run_arg (vers->srcfile->path); - switch (run_exec (RUN_TTY, tmpnam (tmp), RUN_TTY, RUN_REALLY)) + retcode = RCS_checkout (vers->srcfile->path, NULL, use_rev1, + *options ? options : vers->options, tmpnam (tmp), 0, 0); + switch (retcode) { case 0: /* everything ok */ if (xcmp (file, tmp) == 0) diff --git a/gnu/usr.bin/cvs/src/edit.c b/gnu/usr.bin/cvs/src/edit.c index 8eeecb51e45..a337e0d4ee3 100644 --- a/gnu/usr.bin/cvs/src/edit.c +++ b/gnu/usr.bin/cvs/src/edit.c @@ -29,17 +29,13 @@ static int setting_tedit; static int setting_tunedit; static int setting_tcommit; -static int onoff_fileproc PROTO ((char *, char *, char *, List *, List *)); +static int onoff_fileproc PROTO ((struct file_info *finfo)); static int -onoff_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +onoff_fileproc (finfo) + struct file_info *finfo; { - fileattr_set (file, "_watched", turning_on ? "" : NULL); + fileattr_set (finfo->file, "_watched", turning_on ? "" : NULL); return 0; } @@ -132,15 +128,11 @@ watch_off (argc, argv) return watch_onoff (argc, argv); } -static int dummy_fileproc PROTO ((char *, char *, char *, List *, List *)); +static int dummy_fileproc PROTO ((struct file_info *finfo)); static int -dummy_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +dummy_fileproc (finfo) + struct file_info *finfo; { /* This is a pretty hideous hack, but the gist of it is that recurse.c won't call notify_check unless there is a fileproc, so we can't just @@ -148,9 +140,7 @@ dummy_fileproc (file, update_dir, repository, entries, srcfiles) return 0; } -static int ncheck_fileproc PROTO ((char *file, char *update_dir, - char *repository, - List * entries, List * srcfiles)); +static int ncheck_fileproc PROTO ((struct file_info *finfo)); /* Check for and process notifications. Local only. I think that doing this as a fileproc is the only way to catch all the @@ -159,12 +149,8 @@ static int ncheck_fileproc PROTO ((char *file, char *update_dir, processed the directory. */ static int -ncheck_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +ncheck_fileproc (finfo) + struct file_info *finfo; { int notif_type; char *filename; @@ -186,6 +172,7 @@ ncheck_fileproc (file, update_dir, repository, entries, srcfiles) error (0, errno, "cannot open %s", CVSADM_NOTIFY); return 0; } + while (getline (&line, &line_len, fp) > 0) { notif_type = line[0]; @@ -216,8 +203,9 @@ ncheck_fileproc (file, update_dir, repository, entries, srcfiles) *cp = '\0'; notify_do (notif_type, filename, getcaller (), val, watches, - repository); + finfo->repository); } + free (line); if (ferror (fp)) error (0, errno, "cannot read %s", CVSADM_NOTIFY); @@ -280,15 +268,11 @@ send_notifications (argc, argv, local) return err; } -static int edit_fileproc PROTO ((char *, char *, char *, List *, List *)); +static int edit_fileproc PROTO ((struct file_info *finfo)); static int -edit_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +edit_fileproc (finfo) + struct file_info *finfo; { FILE *fp; time_t now; @@ -303,7 +287,7 @@ edit_fileproc (file, update_dir, repository, entries, srcfiles) (void) time (&now); ascnow = asctime (gmtime (&now)); ascnow[24] = '\0'; - fprintf (fp, "E%s\t%s GMT\t%s\t%s\t", file, + fprintf (fp, "E%s\t%s GMT\t%s\t%s\t", finfo->file, ascnow, hostname, CurDir); if (setting_tedit) fprintf (fp, "E"); @@ -315,13 +299,13 @@ edit_fileproc (file, update_dir, repository, entries, srcfiles) if (fclose (fp) < 0) { - if (update_dir[0] == '\0') - error (0, errno, "cannot close %s", file); + if (finfo->update_dir[0] == '\0') + error (0, errno, "cannot close %s", finfo->file); else - error (0, errno, "cannot close %s/%s", update_dir, file); + error (0, errno, "cannot close %s/%s", finfo->update_dir, finfo->file); } - xchmod (file, 1); + xchmod (finfo->file, 1); /* Now stash the file away in CVSADM so that unedit can revert even if it can't communicate with the server. We stash away a writable @@ -341,11 +325,11 @@ edit_fileproc (file, update_dir, repository, entries, srcfiles) ) error (1, errno, "cannot mkdir %s", CVSADM_BASE); } - basefilename = xmalloc (10 + sizeof CVSADM_BASE + strlen (file)); + basefilename = xmalloc (10 + sizeof CVSADM_BASE + strlen (finfo->file)); strcpy (basefilename, CVSADM_BASE); strcat (basefilename, "/"); - strcat (basefilename, file); - copy_file (file, basefilename); + strcat (basefilename, finfo->file); + copy_file (finfo->file, basefilename); free (basefilename); return 0; @@ -436,15 +420,11 @@ edit (argc, argv) return err; } -static int unedit_fileproc PROTO ((char *, char *, char *, List *, List *)); +static int unedit_fileproc PROTO ((struct file_info *finfo)); static int -unedit_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +unedit_fileproc (finfo) + struct file_info *finfo; { FILE *fp; time_t now; @@ -454,10 +434,10 @@ unedit_fileproc (file, update_dir, repository, entries, srcfiles) if (noexec) return 0; - basefilename = xmalloc (10 + sizeof CVSADM_BASE + strlen (file)); + basefilename = xmalloc (10 + sizeof CVSADM_BASE + strlen (finfo->file)); strcpy (basefilename, CVSADM_BASE); strcat (basefilename, "/"); - strcat (basefilename, file); + strcat (basefilename, finfo->file); if (!isfile (basefilename)) { /* This file apparently was never cvs edit'd (e.g. we are uneditting @@ -466,11 +446,11 @@ unedit_fileproc (file, update_dir, repository, entries, srcfiles) return 0; } - if (xcmp (file, basefilename) != 0) + if (xcmp (finfo->file, basefilename) != 0) { - if (update_dir[0] != '\0') - printf ("%s/", update_dir); - printf ("%s has been modified; revert changes? ", file); + if (finfo->update_dir[0] != '\0') + printf ("%s/", finfo->update_dir); + printf ("%s has been modified; revert changes? ", finfo->file); if (!yesno ()) { /* "no". */ @@ -478,7 +458,7 @@ unedit_fileproc (file, update_dir, repository, entries, srcfiles) return 0; } } - rename_file (basefilename, file); + rename_file (basefilename, finfo->file); free (basefilename); fp = open_file (CVSADM_NOTIFY, "a"); @@ -486,18 +466,18 @@ unedit_fileproc (file, update_dir, repository, entries, srcfiles) (void) time (&now); ascnow = asctime (gmtime (&now)); ascnow[24] = '\0'; - fprintf (fp, "U%s\t%s GMT\t%s\t%s\t\n", file, + fprintf (fp, "U%s\t%s GMT\t%s\t%s\t\n", finfo->file, ascnow, hostname, CurDir); if (fclose (fp) < 0) { - if (update_dir[0] == '\0') - error (0, errno, "cannot close %s", file); + if (finfo->update_dir[0] == '\0') + error (0, errno, "cannot close %s", finfo->file); else - error (0, errno, "cannot close %s/%s", update_dir, file); + error (0, errno, "cannot close %s/%s", finfo->update_dir, finfo->file); } - xchmod (file, 0); + xchmod (finfo->file, 0); return 0; } @@ -607,6 +587,7 @@ notify_proc (repository, filter) { FILE *pipefp; char *prog; + char *expanded_prog; char *p; char *q; char *srepos; @@ -636,11 +617,21 @@ notify_proc (repository, filter) } *q = '\0'; - pipefp = Popen (prog, "w"); + /* FIXME: why are we calling expand_proc? Didn't we already + expand it in Parse_Info, before passing it to notify_proc? */ + expanded_prog = expand_path (prog, "notify", 0); + if (!expanded_prog) + { + free (prog); + return 1; + } + + pipefp = run_popen (expanded_prog, "w"); if (pipefp == NULL) { error (0, errno, "cannot write entry to notify filter: %s", prog); free (prog); + free (expanded_prog); return 1; } @@ -652,6 +643,7 @@ notify_proc (repository, filter) logfile_write for inspiration. */ free (prog); + free (expanded_prog); return (pclose (pipefp)); } @@ -859,6 +851,7 @@ notify_do (type, filename, who, val, watches, repository) } } +#ifdef CLIENT_SUPPORT /* Check and send notifications. This is only for the client. */ void notify_check (repository, update_dir) @@ -913,6 +906,8 @@ notify_check (repository, update_dir) /* Leave the CVSADM_NOTIFY file there, until the server tells us it has dealt with it. */ } +#endif /* CLIENT_SUPPORT */ + static const char *const editors_usage[] = { @@ -920,27 +915,23 @@ static const char *const editors_usage[] = NULL }; -static int editors_fileproc PROTO ((char *, char *, char *, List *, List *)); +static int editors_fileproc PROTO ((struct file_info *finfo)); static int -editors_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +editors_fileproc (finfo) + struct file_info *finfo; { char *them; char *p; - them = fileattr_get0 (file, "_editors"); + them = fileattr_get0 (finfo->file, "_editors"); if (them == NULL) return 0; - if (update_dir[0] == '\0') - printf ("%s", file); + if (finfo->update_dir[0] == '\0') + printf ("%s", finfo->file); else - printf ("%s/%s", update_dir, file); + printf ("%s/%s", finfo->update_dir, finfo->file); p = them; while (1) diff --git a/gnu/usr.bin/cvs/src/edit.h b/gnu/usr.bin/cvs/src/edit.h index 416ba79c24c..0a823ad84d9 100644 --- a/gnu/usr.bin/cvs/src/edit.h +++ b/gnu/usr.bin/cvs/src/edit.h @@ -17,10 +17,12 @@ extern int watch_on PROTO ((int argc, char **argv)); extern int watch_off PROTO ((int argc, char **argv)); +#ifdef CLIENT_SUPPORT /* Check to see if any notifications are sitting around in need of being sent. These are the notifications stored in CVSADM_NOTIFY (edit,unedit); commit calls notify_do directly. */ extern void notify_check PROTO ((char *repository, char *update_dir)); +#endif /* CLIENT_SUPPORT */ /* Issue a notification for file FILENAME. TYPE is 'E' for edit, 'U' for unedit, and 'C' for commit. WHO is the user currently running. diff --git a/gnu/usr.bin/cvs/src/entries.c b/gnu/usr.bin/cvs/src/entries.c index 19890f2f098..df860214e70 100644 --- a/gnu/usr.bin/cvs/src/entries.c +++ b/gnu/usr.bin/cvs/src/entries.c @@ -14,11 +14,6 @@ #include "cvs.h" #include "getline.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)entries.c 1.44 94/10/07 $"; -USE(rcsid); -#endif - static Node *AddEntryNode PROTO((List * list, Entnode *entnode)); static Entnode *fgetentent PROTO((FILE *)); diff --git a/gnu/usr.bin/cvs/src/error.c b/gnu/usr.bin/cvs/src/error.c index beee0633090..e5e2916cfa5 100644 --- a/gnu/usr.bin/cvs/src/error.c +++ b/gnu/usr.bin/cvs/src/error.c @@ -20,11 +20,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)error.c 1.13 94/09/30 $"; -USE(rcsid); -#endif /* not lint */ - #include <stdio.h> /* If non-zero, error will use the CVS protocol to stdout to report error @@ -68,6 +63,8 @@ void exit (); extern char *strerror (); +extern int vasprintf (); + typedef void (*fn_returning_void) PROTO((void)); /* Function to call before exiting. */ @@ -77,9 +74,9 @@ fn_returning_void error_set_cleanup (arg) fn_returning_void arg; { - fn_returning_void retval = cleanup_fn; - cleanup_fn = arg; - return retval; + fn_returning_void retval = cleanup_fn; + cleanup_fn = arg; + return retval; } /* Print the program name and error message MESSAGE, which is a printf-style @@ -92,52 +89,124 @@ void error (int status, int errnum, const char *message, ...) #else error (status, errnum, message, va_alist) - int status; - int errnum; - const char *message; - va_dcl + int status; + int errnum; + const char *message; + va_dcl #endif { - FILE *out = stderr; - extern char *program_name; - extern char *command_name; + FILE *out = stderr; #ifdef HAVE_VPRINTF - va_list args; + va_list args; #endif - if (error_use_protocol) + if (error_use_protocol) { - out = stdout; - printf ("E "); + out = stdout; + printf ("E "); } - if (command_name && *command_name) - if (status) - fprintf (out, "%s [%s aborted]: ", program_name, command_name); +#ifdef HAVE_VPRINTF + { + char *mess = NULL; + char *entire; + size_t len; + + VA_START (args, message); + vasprintf (&mess, message, args); + va_end (args); + + if (mess == NULL) + { + entire = NULL; + status = 1; + } + else + { + len = strlen (mess) + strlen (program_name) + 80; + if (command_name != NULL) + len += strlen (command_name); + if (errnum != 0) + len += strlen (strerror (errnum)); + entire = malloc (len); + if (entire == NULL) + { + free (mess); + status = 1; + } + else + { + strcpy (entire, program_name); + if (command_name != NULL && command_name[0] != '\0') + { + strcat (entire, " "); + if (status != 0) + strcat (entire, "["); + strcat (entire, command_name); + if (status != 0) + strcat (entire, " aborted]"); + } + strcat (entire, ": "); + strcat (entire, mess); + if (errnum != 0) + { + strcat (entire, ": "); + strcat (entire, strerror (errnum)); + } + strcat (entire, "\n"); + free (mess); + } + } + if (error_use_protocol) + fputs (entire ? entire : "out of memory", out); + else + cvs_outerr (entire ? entire : "out of memory", 0); + if (entire != NULL) + free (entire); + } + +#else /* No HAVE_VPRINTF */ + /* I think that all relevant systems have vprintf these days. But + just in case, I'm leaving this code here. */ + + if (command_name && *command_name) + { + if (status) + fprintf (out, "%s [%s aborted]: ", program_name, command_name); + else + fprintf (out, "%s %s: ", program_name, command_name); + } else - fprintf (out, "%s %s: ", program_name, command_name); - else - fprintf (out, "%s: ", program_name); + fprintf (out, "%s: ", program_name); + #ifdef HAVE_VPRINTF - VA_START (args, message); - vfprintf (out, message, args); - va_end (args); + VA_START (args, message); + vfprintf (out, message, args); + va_end (args); #else #ifdef HAVE_DOPRNT - _doprnt (message, &args, out); + _doprnt (message, &args, out); #else - fprintf (out, message, a1, a2, a3, a4, a5, a6, a7, a8); + fprintf (out, message, a1, a2, a3, a4, a5, a6, a7, a8); #endif #endif - if (errnum) - fprintf (out, ": %s", strerror (errnum)); - putc ('\n', out); - fflush (out); - if (status) + if (errnum) + fprintf (out, ": %s", strerror (errnum)); + putc ('\n', out); + +#endif /* No HAVE_VPRINTF */ + + /* In the error_use_protocol case, this probably does something useful. + In most other cases, I suspect it is a noop (either stderr is line + buffered or we haven't written anything to stderr) or unnecessary + (if stderr is not line buffered, maybe there is a reason....). */ + fflush (out); + + if (status) { - if (cleanup_fn) - (*cleanup_fn) (); - exit (status); + if (cleanup_fn) + (*cleanup_fn) (); + exit (status); } } @@ -151,38 +220,37 @@ void fperror (FILE *fp, int status, int errnum, char *message, ...) #else fperror (fp, status, errnum, message, va_alist) - FILE *fp; - int status; - int errnum; - char *message; - va_dcl + FILE *fp; + int status; + int errnum; + char *message; + va_dcl #endif { - extern char *program_name; #ifdef HAVE_VPRINTF - va_list args; + va_list args; #endif - fprintf (fp, "%s: ", program_name); + fprintf (fp, "%s: ", program_name); #ifdef HAVE_VPRINTF - VA_START (args, message); - vfprintf (fp, message, args); - va_end (args); + VA_START (args, message); + vfprintf (fp, message, args); + va_end (args); #else #ifdef HAVE_DOPRNT - _doprnt (message, &args, fp); + _doprnt (message, &args, fp); #else - fprintf (fp, message, a1, a2, a3, a4, a5, a6, a7, a8); + fprintf (fp, message, a1, a2, a3, a4, a5, a6, a7, a8); #endif #endif - if (errnum) - fprintf (fp, ": %s", strerror (errnum)); - putc ('\n', fp); - fflush (fp); - if (status) + if (errnum) + fprintf (fp, ": %s", strerror (errnum)); + putc ('\n', fp); + fflush (fp); + if (status) { - if (cleanup_fn) - (*cleanup_fn) (); - exit (status); + if (cleanup_fn) + (*cleanup_fn) (); + exit (status); } } diff --git a/gnu/usr.bin/cvs/src/expand_path.c b/gnu/usr.bin/cvs/src/expand_path.c index f63ddff0035..5cb8d7203c6 100644 --- a/gnu/usr.bin/cvs/src/expand_path.c +++ b/gnu/usr.bin/cvs/src/expand_path.c @@ -15,120 +15,229 @@ #include "cvs.h" #include <sys/types.h> -static char *expand_variable PROTO((char *env)); +static char *expand_variable PROTO((char *env, char *file, int line)); extern char *xmalloc (); extern void free (); -/* char *expand_pathname(char *name) - * - * This routine will expand the pathname to account for ~ - * and $ characters as described above. If an error occurs, NULL - * is returned. - * Will only expand Built in CVS variables all others are ignored. - */ + +/* User variables. */ + +List *variable_list = NULL; + +static void variable_delproc PROTO ((Node *)); + +static void +variable_delproc (node) + Node *node; +{ + free (node->data); +} + +/* Currently used by -s option; we might want a way to set user + variables in a file in the $CVSROOT/CVSROOT directory too. */ + +void +variable_set (nameval) + char *nameval; +{ + char *p; + char *name; + Node *node; + + p = nameval; + while (isalnum (*p) || *p == '_') + ++p; + if (*p != '=') + error (1, 0, "illegal character in user variable name in %s", nameval); + if (p == nameval) + error (1, 0, "empty user variable name in %s", nameval); + name = xmalloc (p - nameval + 1); + strncpy (name, nameval, p - nameval); + name[p - nameval] = '\0'; + /* Make p point to the value. */ + ++p; + if (strchr (p, '\012') != NULL) + error (1, 0, "linefeed in user variable value in %s", nameval); + + if (variable_list == NULL) + variable_list = getlist (); + + node = findnode (variable_list, name); + if (node == NULL) + { + node = getnode (); + node->type = VARIABLE; + node->delproc = variable_delproc; + node->key = name; + node->data = xstrdup (p); + (void) addnode (variable_list, node); + } + else + { + /* Replace the old value. For example, this means that -s + options on the command line override ones from .cvsrc. */ + free (node->data); + node->data = xstrdup (p); + free (name); + } +} + +/* This routine will expand the pathname to account for ~ and $ + characters as described above. If an error occurs, an error + message is printed via error() and NULL is returned. FILE and + LINE are the filename and linenumber to include in the error + message. */ char * -expand_path (name) +expand_path (name, file, line) char *name; + char *file; + int line; { - char *s; - char *d; - char mybuf[PATH_MAX]; - char buf[PATH_MAX]; - char *result; - s = name; - d = mybuf; - while ((*d++ = *s)) - if (*s++ == '$') - { - char *p = d; - char *e; - int flag = (*s == '{'); - - for (; (*d++ = *s); s++) - if (flag ? *s =='}' : - isalnum (*s) == 0 && *s!='_' ) - break; - *--d = 0; - e = expand_variable (&p[flag]); - - if (e) - { - for (d = &p[-1]; (*d++ = *e++);) - ; - --d; - if (flag && *s) - s++; - } - else - return NULL; /* no env variable */ - } - *d = 0; - s = mybuf; - d = buf; - /* If you don't want ~username ~/ to be expanded simply remove - * This entire if statement including the else portion - */ - if (*s++ == '~') + char *s; + char *d; + /* FIXME: arbitrary limit. */ + char mybuf[PATH_MAX]; + char buf[PATH_MAX]; + char *result; + s = name; + d = mybuf; + while ((*d++ = *s)) + if (*s++ == '$') { - char *t; - char *p=s; - if (*s=='/' || *s==0) - t = getenv ("HOME"); - else - { - struct passwd *ps; - for (; *p!='/' && *p; p++) - ; - *p = 0; - ps = getpwnam (s); - if (ps == 0) - return NULL; /* no such user */ - t = ps->pw_dir; - } - while ((*d++ = *t++)) + char *p = d; + char *e; + int flag = (*s == '{'); + + for (; (*d++ = *s); s++) + if (flag + ? *s =='}' + : isalnum (*s) == 0 && *s != '_') + break; + *--d = 0; + e = expand_variable (&p[flag], file, line); + + if (e) + { + for (d = &p[-1]; (*d++ = *e++);) ; --d; - if (*p == 0) - *p = '/'; /* always add / */ - s=p; + if (flag && *s) + s++; + } + else + /* expand_variable has already printed an error message. */ + return NULL; } + *d = 0; + s = mybuf; + d = buf; + /* If you don't want ~username ~/ to be expanded simply remove + * This entire if statement including the else portion + */ + if (*s++ == '~') + { + char *t; + char *p=s; + if (*s=='/' || *s==0) + t = get_homedir (); else - --s; - /* Kill up to here */ - while ((*d++ = *s++)) + { + struct passwd *ps; + for (; *p!='/' && *p; p++) + ; + *p = 0; + ps = getpwnam (s); + if (ps == 0) + { + if (line != 0) + error (0, 0, "%s:%d: no such user %s", + file, line, s); + else + error (0, 0, "%s: no such user %s", file, s); + return NULL; + } + t = ps->pw_dir; + } + while ((*d++ = *t++)) ; - *d=0; - result = xmalloc (sizeof(char) * strlen(buf)+1); - strcpy (result, buf); - return result; + --d; + if (*p == 0) + *p = '/'; /* always add / */ + s=p; + } + else + --s; + /* Kill up to here */ + while ((*d++ = *s++)) + ; + *d=0; + result = xmalloc (sizeof(char) * strlen(buf)+1); + strcpy (result, buf); + return result; } + static char * -expand_variable (name) - char *name; +expand_variable (name, file, line) + char *name; + char *file; + int line; { - /* There is nothing expanding this function to allow it - * to read a file in the $CVSROOT/CVSROOT directory that - * says which environmental variables could be expanded - * or just say everything is fair game to be expanded - */ - if ( strcmp (name, CVSROOT_ENV) == 0 ) - return CVSroot; - else - if ( strcmp (name, RCSBIN_ENV) == 0 ) - return Rcsbin; - else - if ( strcmp (name, EDITOR1_ENV) == 0 ) - return Editor; - else - if ( strcmp (name, EDITOR2_ENV) == 0 ) - return Editor; + if (strcmp (name, CVSROOT_ENV) == 0) + return CVSroot; + else if (strcmp (name, RCSBIN_ENV) == 0) + return Rcsbin; + else if (strcmp (name, EDITOR1_ENV) == 0) + return Editor; + else if (strcmp (name, EDITOR2_ENV) == 0) + return Editor; + else if (strcmp (name, EDITOR3_ENV) == 0) + return Editor; + else if (strcmp (name, "USER") == 0) + return getcaller (); + else if (isalpha (name[0])) + { + /* These names are reserved for future versions of CVS, + so that is why it is an error. */ + if (line != 0) + error (0, 0, "%s:%d: no such internal variable $%s", + file, line, name); else - if ( strcmp (name, EDITOR3_ENV) == 0 ) - return Editor; + error (0, 0, "%s: no such internal variable $%s", + file, name); + return NULL; + } + else if (name[0] == '=') + { + Node *node; + /* Crazy syntax for a user variable. But we want + *something* that lets the user name a user variable + anything he wants, without interference from + (existing or future) internal variables. */ + node = findnode (variable_list, name + 1); + if (node == NULL) + { + if (line != 0) + error (0, 0, "%s:%d: no such user variable ${%s}", + file, line, name); + else + error (0, 0, "%s: no such user variable ${%s}", + file, name); + return NULL; + } + return node->data; + } + else + { + /* It is an unrecognized character. We return an error to + reserve these for future versions of CVS; it is plausible + that various crazy syntaxes might be invented for inserting + information about revisions, branches, etc. */ + if (line != 0) + error (0, 0, "%s:%d: unrecognized varaible syntax %s", + file, line, name); else - return NULL; - /* The code here could also just - * return whatever getenv would - * return. - */ + error (0, 0, "%s: unrecognized varaible syntax %s", + file, name); + return NULL; + } } diff --git a/gnu/usr.bin/cvs/src/fileattr.c b/gnu/usr.bin/cvs/src/fileattr.c index 44987006bc8..be52cbf39c5 100644 --- a/gnu/usr.bin/cvs/src/fileattr.c +++ b/gnu/usr.bin/cvs/src/fileattr.c @@ -82,7 +82,7 @@ fileattr_read () strcat (fname, CVSREP_FILEATTR); attr_read_attempted = 1; - fp = fopen (fname, "r"); + fp = fopen (fname, FOPEN_BINARY_READ); if (fp == NULL) { if (!existence_error (errno)) @@ -149,12 +149,18 @@ fileattr_get (filename, attrname) an error message. */ return NULL; - node = findnode (attrlist, filename); - if (node == NULL) - /* A file not mentioned has no attributes. */ - return NULL; - p = node->data; - while (1) { + if (filename == NULL) + p = fileattr_default_attrs; + else + { + node = findnode (attrlist, filename); + if (node == NULL) + /* A file not mentioned has no attributes. */ + return NULL; + p = node->data; + } + while (1) + { if (strncmp (attrname, p, attrname_len) == 0 && p[attrname_len] == '=') { @@ -384,7 +390,7 @@ writeattr_proc (node, data) fputs (node->key, fp); fputs ("\t", fp); fputs (node->data, fp); - fputs ("\n", fp); + fputs ("\012", fp); return 0; } @@ -447,7 +453,7 @@ fileattr_write () } omask = umask (cvsumask); - fp = fopen (fname, "w"); + fp = fopen (fname, FOPEN_BINARY_WRITE); if (fp == NULL) { if (existence_error (errno)) @@ -472,7 +478,7 @@ fileattr_write () } free (repname); - fp = fopen (fname, "w"); + fp = fopen (fname, FOPEN_BINARY_WRITE); } if (fp == NULL) { @@ -487,7 +493,7 @@ fileattr_write () { fputs ("D\t", fp); fputs (fileattr_default_attrs, fp); - fputs ("\n", fp); + fputs ("\012", fp); } if (fclose (fp) < 0) error (0, errno, "cannot close %s", fname); diff --git a/gnu/usr.bin/cvs/src/fileattr.h b/gnu/usr.bin/cvs/src/fileattr.h index 1a83ab43de5..c24c0359088 100644 --- a/gnu/usr.bin/cvs/src/fileattr.h +++ b/gnu/usr.bin/cvs/src/fileattr.h @@ -63,7 +63,9 @@ extern void fileattr_startdir PROTO ((char *repos)); points into memory managed by the fileattr_* routines, should not be altered by the caller, and is only good until the next call to fileattr_clear or fileattr_set. It points to the value, terminated - by '\0' or ';'. Return NULL if said file lacks said attribute. */ + by '\0' or ';'. Return NULL if said file lacks said attribute. + If FILENAME is NULL, return default attributes (attributes for + files created in the future). */ extern char *fileattr_get PROTO ((char *filename, char *attrname)); /* Like fileattr_get, but return a pointer to a newly malloc'd string diff --git a/gnu/usr.bin/cvs/src/filesubr.c b/gnu/usr.bin/cvs/src/filesubr.c index 41bbfc89846..ebc30538a9b 100644 --- a/gnu/usr.bin/cvs/src/filesubr.c +++ b/gnu/usr.bin/cvs/src/filesubr.c @@ -23,11 +23,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid:$"; -USE(rcsid); -#endif - /* * I don't know of a convenient way to test this at configure time, or else * I'd certainly do it there. @@ -641,3 +636,11 @@ last_component (path) else return path; } + +/* Return the home directory. Returns a pointer to storage + managed by this function or its callees (currently getenv). */ +char * +get_homedir () +{ + return getenv ("HOME"); +} diff --git a/gnu/usr.bin/cvs/src/find_names.c b/gnu/usr.bin/cvs/src/find_names.c index b7bf42bc070..a5658813dde 100644 --- a/gnu/usr.bin/cvs/src/find_names.c +++ b/gnu/usr.bin/cvs/src/find_names.c @@ -18,11 +18,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)find_names.c 1.45 94/10/22 $"; -USE(rcsid); -#endif - static int find_dirs PROTO((char *dir, List * list, int checkadm)); static int find_rcs PROTO((char *dir, List * list)); diff --git a/gnu/usr.bin/cvs/src/hash.c b/gnu/usr.bin/cvs/src/hash.c index 084fdf2c0e4..a94f46f020a 100644 --- a/gnu/usr.bin/cvs/src/hash.c +++ b/gnu/usr.bin/cvs/src/hash.c @@ -8,11 +8,7 @@ */ #include "cvs.h" - -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)hash.c 1.19 94/09/23 $"; -USE(rcsid); -#endif +#include <assert.h> /* global caches */ static List *listcache = NULL; @@ -28,6 +24,8 @@ hashp (key) unsigned int h = 0; unsigned int g; + assert(key != NULL); + while (*key != 0) { unsigned int c = *key++; @@ -260,11 +258,15 @@ findnode (list, key) { Node *head, *p; - if (list == (List *) NULL) + /* This probably should be "assert (list != NULL)" (or if not we + should document the current behavior), but only if we check all + the callers to see if any are relying on this behavior. */ + if ((list == (List *) NULL)) return ((Node *) NULL); head = list->hasharray[hashp (key)]; if (head == (Node *) NULL) + /* Not found. */ return ((Node *) NULL); for (p = head->hashnext; p != head; p = p->hashnext) @@ -391,6 +393,7 @@ nodetypestring (type) case LOCK: return("LOCK"); case NDBMNODE: return("NDBMNODE"); case FILEATTR: return("FILEATTR"); + case VARIABLE: return("VARIABLE"); } return("<trash>"); diff --git a/gnu/usr.bin/cvs/src/hash.h b/gnu/usr.bin/cvs/src/hash.h index 5dcc4f6d6f1..dd83665c4c8 100644 --- a/gnu/usr.bin/cvs/src/hash.h +++ b/gnu/usr.bin/cvs/src/hash.h @@ -19,7 +19,8 @@ enum ntype { UNKNOWN, HEADER, ENTRIES, FILES, LIST, RCSNODE, - RCSVERS, DIRS, UPDATE, LOCK, NDBMNODE, FILEATTR + RCSVERS, DIRS, UPDATE, LOCK, NDBMNODE, FILEATTR, + VARIABLE }; typedef enum ntype Ntype; diff --git a/gnu/usr.bin/cvs/src/history.c b/gnu/usr.bin/cvs/src/history.c index 47310a91654..3bc42395587 100644 --- a/gnu/usr.bin/cvs/src/history.c +++ b/gnu/usr.bin/cvs/src/history.c @@ -178,11 +178,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)history.c 1.33 94/09/21 $"; -USE(rcsid); -#endif - static struct hrec { char *type; /* Type of record (In history record) */ @@ -673,7 +668,7 @@ history_write (type, update_dir, revs, name, repository) char *repository; { char fname[PATH_MAX], workdir[PATH_MAX], homedir[PATH_MAX]; - static char username[20]; /* !!! Should be global */ + char *username = getcaller (); int fd; char *line; char *slash = "", *cp, *cp2, *repos; @@ -701,24 +696,23 @@ history_write (type, update_dir, revs, name, repository) #endif if (noexec) return; - if ((fd = open (fname, O_WRONLY | O_APPEND | O_CREAT, 0666)) < 0) + fd = open (fname, O_WRONLY | O_APPEND | O_CREAT | OPEN_BINARY, 0666); + if (fd < 0) error (1, errno, "cannot open history file: %s", fname); repos = Short_Repository (repository); if (!PrCurDir) { - struct passwd *pw; + char *pwdir; - (void) strcpy (username, getcaller ()); + pwdir = get_homedir (); PrCurDir = CurDir; - if (!(pw = (struct passwd *) getpwnam (username))) - error (0, 0, "cannot find own username"); - else + if (pwdir != NULL) { - /* Assumes neither CurDir nor pw->pw_dir ends in '/' */ - i = strlen (pw->pw_dir); - if (!strncmp (CurDir, pw->pw_dir, i)) + /* Assumes neither CurDir nor pwdir ends in '/' */ + i = strlen (pwdir); + if (!strncmp (CurDir, pwdir, i)) { PrCurDir += i; /* Point to '/' separator */ tilde = "~"; @@ -728,10 +722,10 @@ history_write (type, update_dir, revs, name, repository) /* Try harder to find a "homedir" */ if (!getwd (workdir)) error (1, errno, "can't getwd in history"); - if (chdir (pw->pw_dir) < 0) - error (1, errno, "can't chdir(%s)", pw->pw_dir); + if (chdir (pwdir) < 0) + error (1, errno, "can't chdir(%s)", pwdir); if (!getwd (homedir)) - error (1, errno, "can't getwd in %s", pw->pw_dir); + error (1, errno, "can't getwd in %s", pwdir); (void) chdir (workdir); i = strlen (homedir); @@ -1000,7 +994,7 @@ read_hrecs (fname) struct hrec *hr; struct stat st_buf; - if ((fd = open (fname, O_RDONLY)) < 0) + if ((fd = open (fname, O_RDONLY | OPEN_BINARY)) < 0) error (1, errno, "cannot open history file: %s", fname); if (fstat (fd, &st_buf) < 0) diff --git a/gnu/usr.bin/cvs/src/import.c b/gnu/usr.bin/cvs/src/import.c index 9fdf5a11be3..af8091aab6f 100644 --- a/gnu/usr.bin/cvs/src/import.c +++ b/gnu/usr.bin/cvs/src/import.c @@ -17,12 +17,7 @@ */ #include "cvs.h" -#include "save-cwd.h" - -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)import.c 1.63 94/09/30 $"; -USE(rcsid); -#endif +#include "savecwd.h" #define FILE_HOLDER ".#cvsxxx" @@ -264,11 +259,21 @@ import (argc, argv) { if (!really_quiet) { - (void) printf ("\n%d conflicts created by this import.\n", - conflicts); - (void) printf ("Use the following command to help the merge:\n\n"); - (void) printf ("\t%s checkout -j%s:yesterday -j%s %s\n\n", - program_name, argv[1], argv[1], argv[0]); + char buf[80]; + sprintf (buf, "\n%d conflicts created by this import.\n", + conflicts); + cvs_output (buf, 0); + cvs_output ("Use the following command to help the merge:\n\n", + 0); + cvs_output ("\t", 1); + cvs_output (program_name, 0); + cvs_output (" checkout -j", 0); + cvs_output (argv[1], 0); + cvs_output (":yesterday -j", 0); + cvs_output (argv[1], 0); + cvs_output (" ", 1); + cvs_output (argv[0], 0); + cvs_output ("\n\n", 0); } (void) fprintf (logfp, "\n%d conflicts created by this import.\n", @@ -281,7 +286,7 @@ import (argc, argv) else { if (!really_quiet) - (void) printf ("\nNo conflicts created by this import\n\n"); + cvs_output ("\nNo conflicts created by this import\n\n", 0); (void) fprintf (logfp, "\nNo conflicts created by this import\n\n"); } @@ -471,12 +476,8 @@ update_rcs_file (message, vfile, vtag, targc, targv, inattic) vers = Version_TS (repository, (char *) NULL, vbranch, (char *) NULL, vfile, 1, 0, (List *) NULL, (List *) NULL); -#ifdef DEATH_SUPPORT if (vers->vn_rcs != NULL && !RCS_isdead(vers->srcfile, vers->vn_rcs)) -#else - if (vers->vn_rcs != NULL) -#endif { char xtmpfile[PATH_MAX]; int different; @@ -497,14 +498,16 @@ update_rcs_file (message, vfile, vtag, targc, targv, inattic) * This is to try to cut down the number of "C" conflict messages for * locally modified import source files. */ + /* Why is RCS_FLAGS_FORCE here? I wouldn't think that it would have any + effect in conjunction with passing NULL for workfile (i.e. to stdout). */ + retcode = RCS_checkout (vers->srcfile->path, NULL, vers->vn_rcs, #ifdef HAVE_RCS5 - run_setup ("%s%s -q -f -r%s -p -ko", Rcsbin, RCS_CO, vers->vn_rcs); + "-ko", #else - run_setup ("%s%s -q -f -r%s -p", Rcsbin, RCS_CO, vers->vn_rcs); + NULL, #endif - run_arg (vers->srcfile->path); - if ((retcode = run_exec (RUN_TTY, xtmpfile, RUN_TTY, - RUN_NORMAL|RUN_REALLY)) != 0) + xtmpfile, RCS_FLAGS_FORCE, 0); + if (retcode != 0) { ierrno = errno; fperror (logfp, 0, retcode == -1 ? ierrno : 0, @@ -616,13 +619,11 @@ add_rev (message, rcs, vfile, vers) } } - run_setup ("%s%s -q -f -r%s", Rcsbin, RCS_CI, vbranch); - run_args ("-m%s", make_message_rcslegal (message)); - if (use_file_modtime) - run_arg ("-d"); - run_arg (tocvsPath == NULL ? vfile : tocvsPath); - run_arg (rcs); - status = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); + status = RCS_checkin (rcs, tocvsPath == NULL ? vfile : tocvsPath, + message, vbranch, + (RCS_FLAGS_QUIET + | (use_file_modtime ? RCS_FLAGS_MODTIME : 0)), + 0); ierrno = errno; if (tocvsPath == NULL) @@ -717,6 +718,7 @@ static const struct compair comtable[] = {"adb", "-- "}, {"asm", ";; "}, /* assembler (MS-DOS) */ {"ads", "-- "}, /* Ada */ + {"bas", "' "}, /* Visual Basic code */ {"bat", ":: "}, /* batch (MS-DOS) */ {"body", "-- "}, /* Ada */ {"c", " * "}, /* C */ @@ -730,12 +732,14 @@ static const struct compair comtable[] = {"cmf", "c "}, /* CM Fortran */ {"cs", " * "}, /* C* */ {"csh", "# "}, /* shell */ + {"dlg", " * "}, /* MS Windows dialog file */ {"e", "# "}, /* efl */ {"epsf", "% "}, /* encapsulated postscript */ {"epsi", "% "}, /* encapsulated postscript */ {"el", "; "}, /* Emacs Lisp */ {"f", "c "}, /* Fortran */ {"for", "c "}, + {"frm", "' "}, /* Visual Basic form */ {"h", " * "}, /* C-header */ {"hh", "// "}, /* C++ header */ {"hpp", "// "}, @@ -745,6 +749,7 @@ static const struct compair comtable[] = * franzlisp) */ {"mac", ";; "}, /* macro (DEC-10, MS-DOS, PDP-11, * VMS, etc) */ + {"mak", "# "}, /* makefile, e.g. Visual C++ */ {"me", ".\\\" "}, /* me-macros t/nroff */ {"ml", "; "}, /* mocklisp */ {"mm", ".\\\" "}, /* mm-macros t/nroff */ @@ -766,6 +771,7 @@ static const struct compair comtable[] = {"psw", "% "}, /* postscript wrap */ {"pswm", "% "}, /* postscript wrap */ {"r", "# "}, /* ratfor */ + {"rc", " * "}, /* Microsoft Windows resource file */ {"red", "% "}, /* psl/rlisp */ #ifdef sparc {"s", "! "}, /* assembler */ @@ -790,9 +796,6 @@ static const struct compair comtable[] = {"y", " * "}, /* yacc */ {"ye", " * "}, /* yacc-efl */ {"yr", " * "}, /* yacc-ratfor */ -#ifdef SYSTEM_COMMENT_TABLE - SYSTEM_COMMENT_TABLE -#endif {"", "# "}, /* default for empty suffix */ {NULL, "# "} /* default for unknown suffix; */ /* must always be last */ @@ -1084,12 +1087,22 @@ add_log (ch, fname) { if (!really_quiet) /* write to terminal */ { + char buf[2]; + buf[0] = ch; + buf[1] = ' '; + cvs_output (buf, 2); if (repos_len) - (void) printf ("%c %s/%s\n", ch, repository + repos_len + 1, fname); - else if (repository[0]) - (void) printf ("%c %s/%s\n", ch, repository, fname); - else - (void) printf ("%c %s\n", ch, fname); + { + cvs_output (repository + repos_len + 1, 0); + cvs_output ("/", 1); + } + else if (repository[0] != '\0') + { + cvs_output (repository, 0); + cvs_output ("/", 1); + } + cvs_output (fname, 0); + cvs_output ("\n", 1); } if (repos_len) /* write to logfile */ @@ -1139,14 +1152,7 @@ import_descend_dir (message, dir, vtag, targc, targv) #else if (!quiet) #endif -#ifdef SERVER_SUPPORT - /* Needs to go on stdout, not stderr, to avoid being interspersed - with the add_log messages. */ - printf ("%s %s: Importing %s\n", - program_name, command_name, repository); -#else error (0, 0, "Importing %s", repository); -#endif if (chdir (dir) < 0) { diff --git a/gnu/usr.bin/cvs/src/log.c b/gnu/usr.bin/cvs/src/log.c index cbe24fc4801..3be79281d21 100644 --- a/gnu/usr.bin/cvs/src/log.c +++ b/gnu/usr.bin/cvs/src/log.c @@ -17,14 +17,8 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)log.c 1.44 94/09/30 $"; -USE(rcsid); -#endif - static Dtype log_dirproc PROTO((char *dir, char *repository, char *update_dir)); -static int log_fileproc PROTO((char *file, char *update_dir, char *repository, - List * entries, List * srcfiles)); +static int log_fileproc PROTO((struct file_info *finfo)); static const char *const log_usage[] = { @@ -95,22 +89,18 @@ cvslog (argc, argv) */ /* ARGSUSED */ static int -log_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +log_fileproc (finfo) + struct file_info *finfo; { Node *p; RCSNode *rcsfile; int retcode = 0; - p = findnode (srcfiles, file); + p = findnode (finfo->srcfiles, finfo->file); if (p == NULL || (rcsfile = (RCSNode *) p->data) == NULL) { /* no rcs file. What *do* we know about this file? */ - p = findnode (entries, file); + p = findnode (finfo->entries, finfo->file); if (p != NULL) { Entnode *e; @@ -120,18 +110,18 @@ log_fileproc (file, update_dir, repository, entries, srcfiles) { if (!really_quiet) error (0, 0, "%s has been added, but not committed", - file); + finfo->file); return(0); } } if (!really_quiet) - error (0, 0, "nothing known about %s", file); + error (0, 0, "nothing known about %s", finfo->file); return (1); } - run_setup ("%s%s", Rcsbin, RCS_RLOG); + run_setup ("%s%s -x,v/", Rcsbin, RCS_RLOG); { int i; for (i = 1; i < ac && av[i][0] == '-'; i++) @@ -140,17 +130,17 @@ log_fileproc (file, update_dir, repository, entries, srcfiles) } run_arg (rcsfile->path); - if (*update_dir) + if (*finfo->update_dir) { - char *workfile = xmalloc (strlen (update_dir) + strlen (file) + 2); - sprintf (workfile, "%s/%s", update_dir, file); + char *workfile = xmalloc (strlen (finfo->update_dir) + strlen (finfo->file) + 2); + sprintf (workfile, "%s/%s", finfo->update_dir, finfo->file); run_arg (workfile); free (workfile); } if ((retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_REALLY)) == -1) { - error (1, errno, "fork failed for rlog on %s", file); + error (1, errno, "fork failed for rlog on %s", finfo->file); } return (retcode); } diff --git a/gnu/usr.bin/cvs/src/login.c b/gnu/usr.bin/cvs/src/login.c index c6001514ff7..fc3a1783665 100644 --- a/gnu/usr.bin/cvs/src/login.c +++ b/gnu/usr.bin/cvs/src/login.c @@ -8,17 +8,11 @@ */ #include "cvs.h" +#include "getline.h" #ifdef AUTH_CLIENT_SUPPORT /* This covers the rest of the file. */ -#include <sys/socket.h> -#include <netinet/in.h> -#include <netdb.h> - -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)login.c 1.1 95/10/01 $"; -USE(rcsid); -#endif +extern char *getpass (); #ifndef CVS_PASSWORD_FILE #define CVS_PASSWORD_FILE ".cvspass" @@ -39,8 +33,8 @@ construct_cvspass_filename () return xstrdup (passfile); /* Construct absolute pathname to user's password file. */ - /* todo: does this work under Win-NT and OS/2 ? */ - homedir = getenv ("HOME"); + /* todo: does this work under OS/2 ? */ + homedir = get_homedir (); if (! homedir) { error (1, errno, "could not find out home directory"); @@ -90,8 +84,6 @@ login (argc, argv) int argc; char **argv; { - char *username; - int i; char *passfile; FILE *fp; char *typed_password, *found_password; @@ -158,6 +150,23 @@ login (argc, argv) } } + /* CVSroot is now fully qualified and has ":pserver:" prepended. + We'll print out most of it so user knows exactly what is being + dealt with here. */ + { + char *s; + s = strchr (CVSroot, ':'); + s++; + s = strchr (s, ':'); + s++; + + if (s == NULL) + error (1, 0, "NULL CVSroot"); + + printf ("(Logging in to %s)\n", s); + fflush (stdout); + } + passfile = construct_cvspass_filename (); typed_password = getpass ("CVS password: "); typed_password = scramble (typed_password); @@ -192,6 +201,8 @@ login (argc, argv) inefficient, but we're not talking about a gig of data here. */ fp = fopen (passfile, "r"); + /* FIXME: should be printing a message if fp == NULL and not + existence_error (errno). */ if (fp != NULL) { /* Check each line to see if we have this entry already. */ @@ -208,9 +219,8 @@ login (argc, argv) linebuf = (char *) NULL; } } + fclose (fp); } - fclose (fp); - if (already_entered) { @@ -365,6 +375,7 @@ get_cvs_password () strcpy (tmp, password); tmp[strlen (password)] = '\0'; memset (password, 0, strlen (password)); + free (linebuf); return tmp; } else @@ -373,7 +384,8 @@ get_cvs_password () error (0, 0, "use \"cvs login\" to log in first"); error (1, 0, "or set the CVS_PASSWORD environment variable"); } - free (linebuf); + /* NOTREACHED */ + return NULL; } #endif /* AUTH_CLIENT_SUPPORT from beginning of file. */ diff --git a/gnu/usr.bin/cvs/src/logmsg.c b/gnu/usr.bin/cvs/src/logmsg.c index 7686a3680a6..55ac32d0caf 100644 --- a/gnu/usr.bin/cvs/src/logmsg.c +++ b/gnu/usr.bin/cvs/src/logmsg.c @@ -9,11 +9,6 @@ #include "cvs.h" #include "getline.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)logmsg.c 1.48 94/09/29 $"; -USE(rcsid); -#endif - static int find_type PROTO((Node * p, void *closure)); static int fmt_proc PROTO((Node * p, void *closure)); static int logfile_write PROTO((char *repository, char *filter, char *title, @@ -426,7 +421,7 @@ logfile_write (repository, filter, title, message, revision, logfp, changes) List *changes; { char cwd[PATH_MAX]; - FILE *pipefp, *Popen (); + FILE *pipefp, *run_popen (); char *prog = xmalloc (MAXPROGLEN); char *cp; int c; @@ -436,7 +431,7 @@ logfile_write (repository, filter, title, message, revision, logfp, changes) * A maximum of 6 %s arguments are supported in the filter */ (void) sprintf (prog, filter, title, title, title, title, title, title); - if ((pipefp = Popen (prog, "w")) == NULL) + if ((pipefp = run_popen (prog, "w")) == NULL) { if (!noexec) error (0, 0, "cannot write entry to log filter: %s", prog); diff --git a/gnu/usr.bin/cvs/src/mkmodules.c b/gnu/usr.bin/cvs/src/mkmodules.c index 999833e95d4..5929880b8aa 100644 --- a/gnu/usr.bin/cvs/src/mkmodules.c +++ b/gnu/usr.bin/cvs/src/mkmodules.c @@ -3,35 +3,17 @@ * Copyright (c) 1989-1992, Brian Berliner * * You may distribute under the terms of the GNU General Public License as - * specified in the README file that comes with the CVS 1.4 kit. - * - * mkmodules - * - * Re-build the modules database for the CVS system. Accepts one argument, - * which is the directory that the modules,v file lives in. - */ + * specified in the README file that comes with the CVS kit. */ #include "cvs.h" - -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)mkmodules.c 1.45 94/09/30 $"; -USE(rcsid); -#endif +#include "savecwd.h" #ifndef DBLKSIZ #define DBLKSIZ 4096 /* since GNU ndbm doesn't define it */ #endif -char *program_name, *command_name; - -char *Rcsbin = RCSBIN_DFLT; -char *CVSroot = CVSROOT_DFLT; -int noexec = 0; /* Here only to satisfy use in subr.c */ -int trace = 0; /* Here only to satisfy use in subr.c */ - static int checkout_file PROTO((char *file, char *temp)); static void make_tempfile PROTO((char *temp)); -static void mkmodules_usage PROTO((void)); static void rename_rcsfile PROTO((char *temp, char *real)); #ifndef MY_NDBM @@ -40,17 +22,20 @@ static void write_dbmfile PROTO((char *temp)); #endif /* !MY_NDBM */ +/* Rebuild the checked out administrative files in directory DIR. */ int -main (argc, argv) - int argc; - char **argv; +mkmodules (dir) + char *dir; { + struct saved_cwd cwd; + /* FIXME: arbitrary limit */ char temp[PATH_MAX]; char *cp, *last, *fname; #ifdef MY_NDBM DBM *db; #endif FILE *fp; + /* FIXME: arbitrary limit */ char line[512]; static struct _checkout_file { char *filename; @@ -76,37 +61,11 @@ main (argc, argv) "a %s file can be used to specify where notifications go"}, {NULL, NULL}}; - /* - * Just save the last component of the path for error messages - */ - program_name = last_component (argv[0]); - - if (argc != 2) - mkmodules_usage (); - - if ((cp = getenv (RCSBIN_ENV)) != NULL) - Rcsbin = cp; - - /* - * If Rcsbin is set to something, make sure it is terminated with a slash - * character. If not, add one. - */ - if (Rcsbin[0] != '\0') - { - int len = strlen (Rcsbin); - char *rcsbin; - - if (Rcsbin[len - 1] != '/') - { - rcsbin = Rcsbin; - Rcsbin = xmalloc (len + 2); /* one for '/', one for NULL */ - (void) strcpy (Rcsbin, rcsbin); - (void) strcat (Rcsbin, "/"); - } - } + if (save_cwd (&cwd)) + exit (1); - if (chdir (argv[1]) < 0) - error (1, errno, "cannot chdir to %s", argv[1]); + if (chdir (dir) < 0) + error (1, errno, "cannot chdir to %s", dir); /* * First, do the work necessary to update the "modules" database. @@ -204,6 +163,10 @@ main (argc, argv) (void) fclose (fp); } + if (restore_cwd (&cwd, NULL)) + exit (1); + free_cwd (&cwd); + return (0); } @@ -242,7 +205,7 @@ checkout_file (file, temp) (void) sprintf (rcs, "%s%s", file, RCSEXT); if (!isfile (rcs)) return (1); - run_setup ("%s%s -q -p", Rcsbin, RCS_CO); + run_setup ("%s%s -x,v/ -q -p", Rcsbin, RCS_CO); run_arg (rcs); if ((retcode = run_exec (RUN_TTY, temp, RUN_TTY, RUN_NORMAL)) != 0) { @@ -412,26 +375,3 @@ rename_rcsfile (temp, real) (void) rename (real, bak); /* mv loginfo .#loginfo */ (void) rename (temp, real); /* mv "temp" loginfo */ } - -/* - * For error() only - */ -void -Lock_Cleanup () -{ -} - -int server_active = 0; - -void -server_cleanup (sig) - int sig; -{ -} - -static void -mkmodules_usage () -{ - (void) fprintf (stderr, "Usage: %s modules-directory\n", program_name); - exit (1); -} diff --git a/gnu/usr.bin/cvs/src/modules.c b/gnu/usr.bin/cvs/src/modules.c index 2f1a6155deb..3f3911c40cd 100644 --- a/gnu/usr.bin/cvs/src/modules.c +++ b/gnu/usr.bin/cvs/src/modules.c @@ -21,12 +21,7 @@ */ #include "cvs.h" -#include "save-cwd.h" - -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)modules.c 1.62 94/09/29 $"; -USE(rcsid); -#endif +#include "savecwd.h" struct sortrec { @@ -124,10 +119,6 @@ do_module (db, mname, m_type, msg, callback_proc, where, } #endif - /* remember where we start */ - if (save_cwd (&cwd)) - exit (1); - /* if this is a directory to ignore, add it to that list */ if (mname[0] == '!' && mname[1] != '\0') { @@ -302,6 +293,10 @@ do_module (db, mname, m_type, msg, callback_proc, where, */ found: + /* remember where we start */ + if (save_cwd (&cwd)) + exit (1); + /* copy value to our own string since if we go recursive we'll be really screwed if we do another dbm lookup */ zvalue = xstrdup (value); @@ -422,6 +417,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, break; case 'l': local_specified = 1; + break; case 'o': checkout_prog = optarg; break; @@ -442,6 +438,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, if (mwhere) free (mwhere); free (zvalue); + free_cwd (&cwd); return (err); } } @@ -453,6 +450,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, if (mwhere) free (mwhere); free (zvalue); + free_cwd (&cwd); return (++err); } @@ -475,6 +473,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, if (mwhere) free (mwhere); free (zvalue); + free_cwd (&cwd); return (err); } diff --git a/gnu/usr.bin/cvs/src/myndbm.c b/gnu/usr.bin/cvs/src/myndbm.c index f5d8f4f4dea..527f7eee9cb 100644 --- a/gnu/usr.bin/cvs/src/myndbm.c +++ b/gnu/usr.bin/cvs/src/myndbm.c @@ -19,11 +19,6 @@ #ifdef MY_NDBM -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)myndbm.c 1.7 94/09/23 $"; -USE(rcsid); -#endif - static void mydbm_load_file (); /* ARGSUSED */ @@ -36,7 +31,7 @@ mydbm_open (file, flags, mode) FILE *fp; DBM *db; - fp = fopen (file, "r"); + fp = fopen (file, FOPEN_BINARY_READ); if (fp == NULL && !(existence_error (errno) && (flags & O_CREAT))) return ((DBM *) 0); @@ -65,7 +60,7 @@ write_item (node, data) fputs (node->key, fp); fputs (" ", fp); fputs (node->data, fp); - fputs ("\n", fp); + fputs ("\012", fp); return 0; } @@ -76,7 +71,7 @@ mydbm_close (db) if (db->modified) { FILE *fp; - fp = fopen (db->name, "w"); + fp = fopen (db->name, FOPEN_BINARY_WRITE); if (fp == NULL) error (1, errno, "cannot write %s", db->name); walklist (db->dbm_list, write_item, (void *)fp); @@ -211,8 +206,15 @@ mydbm_load_file (fp, list) for (cont = 0; getline (&line, &line_len, fp) >= 0;) { - if ((cp = strrchr (line, '\n')) != NULL) + if ((cp = strrchr (line, '\012')) != NULL) *cp = '\0'; /* strip the newline */ + cp = line + strlen (line); + if (cp > line && cp[-1] == '\015') + /* If the file (e.g. modules) was written on an NT box, it will + contain CRLF at the ends of lines. Strip them (we can't do + this by opening the file in text mode because we might be + running on unix). */ + cp[-1] = '\0'; /* * Add the line to the value, at the end if this is a continuation diff --git a/gnu/usr.bin/cvs/src/no_diff.c b/gnu/usr.bin/cvs/src/no_diff.c index 281d34866bc..a0d00f5a861 100644 --- a/gnu/usr.bin/cvs/src/no_diff.c +++ b/gnu/usr.bin/cvs/src/no_diff.c @@ -16,11 +16,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)no_diff.c 1.39 94/10/07 $"; -USE(rcsid); -#endif - int No_Difference (file, vers, entries, repository, update_dir) char *file; @@ -44,10 +39,9 @@ No_Difference (file, vers, entries, repository, update_dir) else options = xstrdup (""); - run_setup ("%s%s -p -q -r%s %s", Rcsbin, RCS_CO, - vers->vn_user ? vers->vn_user : "", options); - run_arg (vers->srcfile->path); - if ((retcode = run_exec (RUN_TTY, tmpnam (tmp), RUN_TTY, RUN_REALLY)) == 0) + retcode = RCS_checkout (vers->srcfile->path, NULL, vers->vn_user, options, + tmpnam (tmp), 0, 0); + if (retcode == 0) { #if 0 /* Why would we want to munge the modes? And only if the timestamps diff --git a/gnu/usr.bin/cvs/src/options.h.in b/gnu/usr.bin/cvs/src/options.h.in index d7166a9affd..d6c46d1b5df 100644 --- a/gnu/usr.bin/cvs/src/options.h.in +++ b/gnu/usr.bin/cvs/src/options.h.in @@ -80,23 +80,6 @@ #endif /* - * The "rm" program to execute when pruning directories that are not part of - * a release. This "rm" must support the "-fr" options. Specify a full - * pathname if your site wants to use a particular rm. - */ -#ifndef RM -#define RM "rm" -#endif - -/* - * The "sort" program to execute when displaying the module database. Specify - * a full pathname if your site wants to use a particular sort. - */ -#ifndef SORT -#define SORT "sort" -#endif - -/* * The "patch" program to run when using the CVS server and accepting * patches across the network. Specify a full pathname if your site * wants to use a particular patch. @@ -114,20 +97,24 @@ * unless the user overrides the default with the RCSBIN environment variable * or the "-b" option to CVS. * - * If you're compiling the authenticating server (see - * AUTH_SERVER_SUPPORT farther down), then you probably want to set - * RCSBIN_DFLT. The authenticating server starts out running as root, - * and then switches to run as the appropriate user once - * authentication is complete. No shell is ever started by that user, - * so the PATH environment variable may not contain the directory with - * the RCS binaries, even though if that user logged in normally, PATH - * would include the directory. An alternative to setting RCSBIN_DFLT - * is to make sure that root has the right directory in its path - * already. Another, probably better alternative is to specify -b in - * /etc/inetd.conf. + * If you use the password-authenticating server, then you need to + * make sure that the server can find the RCS programs to invoke them. + * The authenticating server starts out running as root, and then + * switches to run as the appropriate user once authentication is + * complete. But no actual shell is ever started by that user, so the + * PATH environment variable may not contain the directory with the + * RCS binaries, even though if that user logged in normally, PATH + * would include the directory. + * + * One way to solve this problem is to set RCSBIN_DFLT here. An + * alternative is to make sure that root has the right directory in + * its path already. Another, probably better alternative is to + * specify -b in /etc/inetd.conf. * - * This define should be either the empty string ("") or a full pathname to the - * directory containing all the installed programs from the RCS distribution. */ + * This define should be either the empty string ("") or a full + * pathname to the directory containing all the installed programs + * from the RCS distribution. + */ #ifndef RCSBIN_DFLT #define RCSBIN_DFLT "" #endif @@ -241,13 +228,11 @@ /* #define SETXID_SUPPORT */ #endif -/* - * The client and server will not perform password-authentication - * unless you explicitly ask for it. You can build a binary that only - * serves or only clients (sure it's a verb), or one that does both. +/* The client will not perform password-authentication unless you + * explicitly ask for it. Whether to include the authenticating + * server is set in config.h. */ /* #define AUTH_CLIENT_SUPPORT 1 */ -/* #define AUTH_SERVER_SUPPORT 1 */ /* * If you are working with a large remote repository and a 'cvs checkout' is diff --git a/gnu/usr.bin/cvs/src/parseinfo.c b/gnu/usr.bin/cvs/src/parseinfo.c index 6d59884db9a..c567ef83e97 100644 --- a/gnu/usr.bin/cvs/src/parseinfo.c +++ b/gnu/usr.bin/cvs/src/parseinfo.c @@ -8,11 +8,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)parseinfo.c 1.18 94/09/23 $"; -USE(rcsid); -#endif - /* * Parse the INFOFILE file for the specified REPOSITORY. Invoke CALLPROC for * the first line in the file that matches the REPOSITORY, or if ALL != 0, any lines @@ -98,14 +93,10 @@ Parse_Info (infofile, repository, callproc, all) if ((cp = strrchr (value, '\n')) != NULL) *cp = '\0'; - expanded_value = expand_path (value); + expanded_value = expand_path (value, infofile, line_number); if (!expanded_value) { - error (0, 0, - "Invalid environmental variable at line %d in file %s", - line_number, infofile); continue; - } /* diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c index 43282a668ff..8ec3267e587 100644 --- a/gnu/usr.bin/cvs/src/rcs.c +++ b/gnu/usr.bin/cvs/src/rcs.c @@ -11,11 +11,6 @@ #include <assert.h> #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)rcs.c 1.40 94/10/07 $"; -USE(rcsid); -#endif - static RCSNode *RCS_parsercsfile_i PROTO((FILE * fp, const char *rcsfile)); static char *RCS_getdatebranch PROTO((RCSNode * rcs, char *date, char *branch)); static int getrcskey PROTO((FILE * fp, char **keyp, char **valp)); @@ -23,7 +18,6 @@ static int parse_rcs_proc PROTO((Node * file, void *closure)); static int checkmagic_proc PROTO((Node *p, void *closure)); static void do_branches PROTO((List * list, char *val)); static void do_symbols PROTO((List * list, char *val)); -static void null_delproc PROTO((Node * p)); static void rcsnode_delproc PROTO((Node * p)); static void rcsvers_delproc PROTO((Node * p)); @@ -136,14 +130,8 @@ RCS_parse (file, repos) FILE *fp; char rcsfile[PATH_MAX]; -#ifdef LINES_CRLF_TERMINATED - /* Some ports of RCS to Windows NT write RCS files with newline- - delimited lines. We would need to pass fopen a "binary" flag. */ - abort (); -#endif - (void) sprintf (rcsfile, "%s/%s%s", repos, file, RCSEXT); - if ((fp = fopen (rcsfile, "r")) != NULL) + if ((fp = fopen (rcsfile, FOPEN_BINARY_READ)) != NULL) { rcs = RCS_parsercsfile_i(fp, rcsfile); if (rcs != NULL) @@ -158,14 +146,8 @@ RCS_parse (file, repos) return NULL; } -#ifdef LINES_CRLF_TERMINATED - /* Some ports of RCS to Windows NT write RCS files with newline- - delimited lines. We would need to pass fopen a "binary" flag. */ - abort (); -#endif - (void) sprintf (rcsfile, "%s/%s/%s%s", repos, CVSATTIC, file, RCSEXT); - if ((fp = fopen (rcsfile, "r")) != NULL) + if ((fp = fopen (rcsfile, FOPEN_BINARY_READ)) != NULL) { rcs = RCS_parsercsfile_i(fp, rcsfile); if (rcs != NULL) @@ -196,14 +178,8 @@ RCS_parsercsfile (rcsfile) FILE *fp; RCSNode *rcs; -#ifdef LINES_CRLF_TERMINATED - /* Some ports of RCS to Windows NT write RCS files with newline- - delimited lines. We would need to pass fopen a "binary" flag. */ - abort (); -#endif - /* open the rcsfile */ - if ((fp = fopen (rcsfile, "r")) == NULL) + if ((fp = fopen (rcsfile, FOPEN_BINARY_READ)) == NULL) { error (0, errno, "Couldn't open rcs file `%s'", rcsfile); return (NULL); @@ -293,7 +269,7 @@ RCS_reparsercsfile (rdata) FILE *fp; char *rcsfile; - Node *q, *r; + Node *q; RCSVers *vnode; int n; char *cp; @@ -301,19 +277,12 @@ RCS_reparsercsfile (rdata) rcsfile = rdata->path; -#ifdef LINES_CRLF_TERMINATED - /* Some ports of RCS to Windows NT write RCS files with newline- - delimited lines. We would need to pass fopen a "binary" flag. */ - abort (); -#endif - - fp = fopen(rcsfile, "r"); + fp = fopen(rcsfile, FOPEN_BINARY_READ); if (fp == NULL) error (1, 0, "unable to reopen `%s'", rcsfile); /* make a node */ rdata->versions = getlist (); - rdata->dates = getlist (); /* * process all the special header information, break out when we get to @@ -374,36 +343,25 @@ RCS_reparsercsfile (rdata) for (;;) { char *valp; - char date[MAXDATELEN]; + + vnode = (RCSVers *) xmalloc (sizeof (RCSVers)); + memset (vnode, 0, sizeof (RCSVers)); + + /* fill in the version before we forget it */ + vnode->version = xstrdup (key); /* grab the value of the date from value */ valp = value + strlen (RCSDATE);/* skip the "date" keyword */ while (whitespace (*valp)) /* take space off front of value */ valp++; - (void) strcpy (date, valp); - /* get the nodes (q is by version, r is by date) */ - q = getnode (); - r = getnode (); - q->type = RCSVERS; - r->type = RCSVERS; - q->delproc = rcsvers_delproc; - r->delproc = null_delproc; - q->data = r->data = xmalloc (sizeof (RCSVers)); - memset (q->data, 0, sizeof (RCSVers)); - vnode = (RCSVers *) q->data; - - /* fill in the version before we forget it */ - q->key = vnode->version = xstrdup (key); + vnode->date = xstrdup (valp); /* throw away the author field */ (void) getrcskey (fp, &key, &value); /* throw away the state field */ (void) getrcskey (fp, &key, &value); -#ifdef DEATH_SUPPORT - /* Accept this regardless of DEATH_STATE, so that we can read - repositories created with different versions of CVS. */ if (strcmp (key, "state") != 0) error (1, 0, "\ unable to parse rcs file; `state' not in the expected place"); @@ -411,10 +369,6 @@ unable to parse rcs file; `state' not in the expected place"); { vnode->dead = 1; } -#endif - - /* fill in the date field */ - r->key = vnode->date = xstrdup (date); /* fill in the branch list (if any branches exist) */ (void) getrcskey (fp, &key, &value); @@ -435,15 +389,15 @@ unable to parse rcs file; `state' not in the expected place"); */ while ((n = getrcskey (fp, &key, &value)) >= 0) { -#ifdef DEATH_SUPPORT - /* Enable use of repositories created with a CVS which defines - DEATH_SUPPORT and not DEATH_STATE. */ + /* Enable use of repositories created by certain obsolete + versions of CVS. This code should remain indefinately; + there is no procedure for converting old repositories, and + checking for it is harmless. */ if (strcmp(key, RCSDEAD) == 0) { vnode->dead = 1; continue; } -#endif /* if we have a revision, break and do it */ for (cp = key; (isdigit (*cp) || *cp == '.') && *cp != '\0'; cp++) /* do nothing */ ; @@ -451,9 +405,22 @@ unable to parse rcs file; `state' not in the expected place"); break; } - /* add the nodes to the lists */ - (void) addnode (rdata->versions, q); - (void) addnode (rdata->dates, r); + /* get the node */ + q = getnode (); + q->type = RCSVERS; + q->delproc = rcsvers_delproc; + q->data = (char *) vnode; + q->key = vnode->version; + + /* add the nodes to the list */ + if (addnode (rdata->versions, q) != 0) + { +#if 0 + purify_printf("WARNING: Adding duplicate version: %s (%s)\n", + q->key, rcsfile); + freenode (q); +#endif + } /* * if we left the loop because there were no more keys, we break out @@ -495,7 +462,6 @@ freercsnode (rnodep) } free ((*rnodep)->path); dellist (&(*rnodep)->versions); - dellist (&(*rnodep)->dates); if ((*rnodep)->symbols != (List *) NULL) dellist (&(*rnodep)->symbols); if ((*rnodep)->symbols_data != (char *) NULL) @@ -523,23 +489,14 @@ rcsvers_delproc (p) if (rnode->branches != (List *) NULL) dellist (&rnode->branches); + if (rnode->date != (char *) NULL) + free (rnode->date); if (rnode->next != (char *) NULL) free (rnode->next); free ((char *) rnode); } /* - * null_delproc - don't free anything since it will be free'd by someone else - */ -/* ARGSUSED */ -static void -null_delproc (p) - Node *p; -{ - /* don't do anything */ -} - -/* * getrcskey - fill in the key and value from the rcs file the algorithm is * as follows * @@ -1701,7 +1658,6 @@ RCS_check_tag (tag) error (1, 0, "tag `%s' must start with a letter", tag); } -#ifdef DEATH_SUPPORT /* * Return true if RCS revision with TAG is a dead revision. */ @@ -1723,4 +1679,3 @@ RCS_isdead (rcs, tag) version = (RCSVers *) p->data; return (version->dead); } -#endif /* DEATH_SUPPORT */ diff --git a/gnu/usr.bin/cvs/src/rcs.h b/gnu/usr.bin/cvs/src/rcs.h index f64501d71e6..899a74de42c 100644 --- a/gnu/usr.bin/cvs/src/rcs.h +++ b/gnu/usr.bin/cvs/src/rcs.h @@ -15,7 +15,6 @@ #define RCS_CO "co" #define RCS_RLOG "rlog" #define RCS_DIFF "rcsdiff" -#define RCS_MERGE "merge" #define RCS_RCSMERGE "rcsmerge" #define RCS_MERGE_PAT "^>>>>>>> " /* runs "grep" with this pattern */ #define RCSEXT ",v" @@ -27,9 +26,10 @@ #define RCSDESC "desc" #define RCSEXPAND "expand" -/* Used by the version of death support which results if you define - DEATH_SUPPORT and not DEATH_STATE. Requires a hacked up RCS. Considered - obsolete. */ +/* Used by the version of death support which resulted from old + versions of CVS (e.g. 1.5 if you define DEATH_SUPPORT and not + DEATH_STATE). Only a hacked up RCS (used by those old versions of + CVS) will put this into RCS files. Considered obsolete. */ #define RCSDEAD "dead" #define DATEFORM "%02d.%02d.%02d.%02d.%02d.%02d" @@ -53,7 +53,6 @@ struct rcsnode char *expand; List *symbols; List *versions; - List *dates; }; typedef struct rcsnode RCSNode; @@ -102,6 +101,4 @@ void freercsnode PROTO((RCSNode ** rnodep)); void RCS_addnode PROTO((const char *file, RCSNode *rcs, List *list)); char *RCS_getbranch PROTO((RCSNode * rcs, char *tag, int force_tag_match)); -#ifdef DEATH_SUPPORT int RCS_isdead PROTO((RCSNode *, const char *)); -#endif diff --git a/gnu/usr.bin/cvs/src/rcscmds.c b/gnu/usr.bin/cvs/src/rcscmds.c index af32cea1d6d..c8785857ca2 100644 --- a/gnu/usr.bin/cvs/src/rcscmds.c +++ b/gnu/usr.bin/cvs/src/rcscmds.c @@ -10,6 +10,7 @@ */ #include "cvs.h" +#include <assert.h> int RCS_settag(path, tag, rev) @@ -17,7 +18,7 @@ RCS_settag(path, tag, rev) const char *tag; const char *rev; { - run_setup ("%s%s -q -N%s:%s", Rcsbin, RCS, tag, rev); + run_setup ("%s%s -x,v/ -q -N%s:%s", Rcsbin, RCS, tag, rev); run_arg (path); return run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); } @@ -30,7 +31,7 @@ RCS_deltag(path, tag, noerr) const char *tag; int noerr; { - run_setup ("%s%s -q -N%s", Rcsbin, RCS, tag); + run_setup ("%s%s -x,v/ -q -N%s", Rcsbin, RCS, tag); run_arg (path); return run_exec (RUN_TTY, RUN_TTY, noerr ? DEVNULL : RUN_TTY, RUN_NORMAL); } @@ -41,7 +42,7 @@ RCS_setbranch(path, rev) const char *path; const char *rev; { - run_setup ("%s%s -q -b%s", Rcsbin, RCS, rev ? rev : ""); + run_setup ("%s%s -x,v/ -q -b%s", Rcsbin, RCS, rev ? rev : ""); run_arg (path); return run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); } @@ -54,7 +55,7 @@ RCS_lock(path, rev, noerr) const char *rev; int noerr; { - run_setup ("%s%s -q -l%s", Rcsbin, RCS, rev ? rev : ""); + run_setup ("%s%s -x,v/ -q -l%s", Rcsbin, RCS, rev ? rev : ""); run_arg (path); return run_exec (RUN_TTY, RUN_TTY, noerr ? DEVNULL : RUN_TTY, RUN_NORMAL); } @@ -67,7 +68,7 @@ RCS_unlock(path, rev, noerr) const char *rev; int noerr; { - run_setup ("%s%s -q -u%s", Rcsbin, RCS, rev ? rev : ""); + run_setup ("%s%s -x,v/ -q -u%s", Rcsbin, RCS, rev ? rev : ""); run_arg (path); return run_exec (RUN_TTY, RUN_TTY, noerr ? DEVNULL : RUN_TTY, RUN_NORMAL); } @@ -84,7 +85,7 @@ RCS_merge(path, options, rev1, rev2) /* XXX - Do merge by hand instead of using rcsmerge, due to -k handling */ - run_setup ("%s%s %s -r%s -r%s %s", Rcsbin, RCS_RCSMERGE, + run_setup ("%s%s -x,v/ %s -r%s -r%s %s", Rcsbin, RCS_RCSMERGE, options, rev1, rev2, path); status = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); #ifndef HAVE_RCS5 @@ -100,3 +101,72 @@ RCS_merge(path, options, rev1, rev2) #endif return status; } + +/* Check out a revision from RCSFILE into WORKFILE, or to standard output + if WORKFILE is NULL. If WORKFILE is "", let RCS pick the working file + name. TAG is the tag to check out, or NULL if one should check out + the head of the default branch. OPTIONS is a string such as + -kb or -kkv, for keyword expansion options, or NULL if there are none. + If WORKFILE is NULL, run regardless of noexec; if non-NULL, noexec + inhibits execution. SOUT is what to do with standard output + (typically RUN_TTY). If FLAGS & RCS_FLAGS_LOCK, lock it. If + FLAGS & RCS_FLAGS_FORCE, check out even on top of an existing file. + If NOERR is nonzero, suppress errors. */ +int +RCS_checkout (rcsfile, workfile, tag, options, sout, flags, noerr) + char *rcsfile; + char *workfile; + char *tag; + char *options; + char *sout; + int flags; + int noerr; +{ + run_setup ("%s%s -x,v/ -q %s%s", Rcsbin, RCS_CO, + tag ? "-r" : "", tag ? tag : ""); + if (options != NULL && options[0] != '\0') + run_arg (options); + if (workfile == NULL) + run_arg ("-p"); + if (flags & RCS_FLAGS_LOCK) + run_arg ("-l"); + if (flags & RCS_FLAGS_FORCE) + run_arg ("-f"); + run_arg (rcsfile); + if (workfile != NULL && workfile[0] != '\0') + run_arg (workfile); + return run_exec (RUN_TTY, sout, noerr ? DEVNULL : RUN_TTY, + workfile == NULL ? (RUN_NORMAL | RUN_REALLY) : RUN_NORMAL); +} + +/* Check in to RCSFILE with revision REV (which must be greater than the + largest revision) and message MESSAGE (which is checked for legality). + If FLAGS & RCS_FLAGS_DEAD, check in a dead revision. If NOERR, do not + report errors. If FLAGS & RCS_FLAGS_QUIET suppress errors somewhat more + selectively. If FLAGS & RCS_FLAGS_MODTIME, use the working file's + modification time for the checkin time. WORKFILE is the working file + to check in from, or NULL to use the usual RCS rules for deriving it + from the RCSFILE. */ +int +RCS_checkin (rcsfile, workfile, message, rev, flags, noerr) + char *rcsfile; + char *workfile; + char *message; + char *rev; + int flags; + int noerr; +{ + run_setup ("%s%s -x,v/ -f %s%s", Rcsbin, RCS_CI, + rev ? "-r" : "", rev ? rev : ""); + if (flags & RCS_FLAGS_DEAD) + run_arg ("-sdead"); + if (flags & RCS_FLAGS_QUIET) + run_arg ("-q"); + if (flags & RCS_FLAGS_MODTIME) + run_arg ("-d"); + run_args ("-m%s", make_message_rcslegal (message)); + if (workfile != NULL) + run_arg (workfile); + run_arg (rcsfile); + return run_exec (RUN_TTY, RUN_TTY, noerr ? DEVNULL : RUN_TTY, RUN_NORMAL); +} diff --git a/gnu/usr.bin/cvs/src/recurse.c b/gnu/usr.bin/cvs/src/recurse.c index d11bdf4a499..400856d75ac 100644 --- a/gnu/usr.bin/cvs/src/recurse.c +++ b/gnu/usr.bin/cvs/src/recurse.c @@ -9,15 +9,10 @@ */ #include "cvs.h" -#include "save-cwd.h" +#include "savecwd.h" #include "fileattr.h" #include "edit.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)recurse.c 1.31 94/09/30 $"; -USE(rcsid); -#endif - static int do_dir_proc PROTO((Node * p, void *closure)); static int do_file_proc PROTO((Node * p, void *closure)); static void addlist PROTO((List ** listp, char *key)); @@ -39,9 +34,6 @@ static int readlock; static int dosrcs; static char update_dir[PATH_MAX]; static char *repository = NULL; -static List *entries = NULL; -static List *srcfiles = NULL; - static List *filelist = NULL; /* holds list of files on which to operate */ static List *dirlist = NULL; /* holds list of directories on which to operate */ @@ -105,13 +97,6 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, free (repository); repository = (char *) NULL; } - if (entries) - { - Entries_Close (entries); - entries = NULL; - } - if (srcfiles) - dellist (&srcfiles); if (filelist) dellist (&filelist); /* FIXME-krp: no longer correct. */ /* FIXME-krp: clean up files_by_dir */ @@ -167,18 +152,20 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, char tmp[PATH_MAX]; char *file_to_try; + /* Now break out argv[i] into directory part (DIR) and file part (COMP). + DIR and COMP will each point to a newly malloc'd string. */ dir = xstrdup (argv[i]); - if ((comp = strrchr (dir, '/')) == NULL) + comp = last_component (dir); + if (comp == dir) { /* no dir component. What we have is an implied "./" */ - comp = dir; dir = xstrdup("."); } else { char *p = comp; - *p++ = '\0'; + p[-1] = '\0'; comp = xstrdup (p); } @@ -282,6 +269,7 @@ do_recursion (xfileproc, xfilesdoneproc, xdirentproc, xdirleaveproc, int err = 0; int dodoneproc = 1; char *srepository; + List *entries = NULL; /* do nothing if told */ if (xflags == R_SKIP_ALL) @@ -298,6 +286,38 @@ do_recursion (xfileproc, xfilesdoneproc, xdirentproc, xdirleaveproc, readlock = noexec ? 0 : xreadlock; dosrcs = xdosrcs; + /* The fact that locks are not active here is what makes us fail to have + the + + If someone commits some changes in one cvs command, + then an update by someone else will either get all the + changes, or none of them. + + property (see node Concurrency in cvs.texinfo). + + The most straightforward fix would just to readlock the whole + tree before starting an update, but that means that if a commit + gets blocked on a big update, it might need to wait a *long* + time. + + A more adequate fix would be a two-pass design for update, + checkout, etc. The first pass would go through the repository, + with the whole tree readlocked, noting what versions of each + file we want to get. The second pass would release all locks + (except perhaps short-term locks on one file at a + time--although I think RCS already deals with this) and + actually get the files, specifying the particular versions it wants. + + This could be sped up by separating out the data needed for the + first pass into a separate file(s)--for example a file + attribute for each file whose value contains the head revision + for each branch. The structure should be designed so that + commit can relatively quickly update the information for a + single file or a handful of files (file attributes, as + implemented in Jan 96, are probably acceptable; improvements + would be possible such as branch attributes which are in + separate files for each branch). */ + #if defined(SERVER_SUPPORT) && defined(SERVER_FLOWCONTROL) /* * Now would be a good time to check to see if we need to stop @@ -378,6 +398,8 @@ do_recursion (xfileproc, xfilesdoneproc, xdirentproc, xdirleaveproc, /* process the files (if any) */ if (filelist != NULL) { + struct file_info finfo_struct; + /* read lock it if necessary */ if (readlock && repository && Reader_Lock (repository) != 0) error (1, 0, "read lock failed - giving up"); @@ -389,16 +411,21 @@ do_recursion (xfileproc, xfilesdoneproc, xdirentproc, xdirleaveproc, here. */ if (client_active) notify_check (repository, update_dir); -#endif +#endif /* CLIENT_SUPPORT */ /* pre-parse the source files */ if (dosrcs && repository) - srcfiles = RCS_parsefiles (filelist, repository); + finfo_struct.srcfiles = RCS_parsefiles (filelist, repository); else - srcfiles = (List *) NULL; + finfo_struct.srcfiles = (List *) NULL; + + finfo_struct.repository = repository; + finfo_struct.update_dir = update_dir; + finfo_struct.entries = entries; + /* do_file_proc will fill in finfo_struct.file. */ /* process the files */ - err += walklist (filelist, do_file_proc, NULL); + err += walklist (filelist, do_file_proc, &finfo_struct); /* unlock it */ if (readlock) @@ -406,7 +433,11 @@ do_recursion (xfileproc, xfilesdoneproc, xdirentproc, xdirleaveproc, /* clean up */ dellist (&filelist); - dellist (&srcfiles); + dellist (&finfo_struct.srcfiles); + } + + if (entries) + { Entries_Close (entries); entries = NULL; } @@ -445,8 +476,10 @@ do_file_proc (p, closure) Node *p; void *closure; { + struct file_info *finfo = (struct file_info *)closure; + finfo->file = p->key; if (fileproc != NULL) - return (fileproc (p->key, update_dir, repository, entries, srcfiles)); + return fileproc (finfo); else return (0); } @@ -553,8 +586,9 @@ do_dir_proc (p, closure) } /* put back update_dir */ - if ((cp = strrchr (update_dir, '/')) != NULL) - *cp = '\0'; + cp = last_component (update_dir); + if (cp > update_dir) + cp[-1] = '\0'; else update_dir[0] = '\0'; diff --git a/gnu/usr.bin/cvs/src/release.c b/gnu/usr.bin/cvs/src/release.c index c7cd55c9410..b3ebb2be49d 100644 --- a/gnu/usr.bin/cvs/src/release.c +++ b/gnu/usr.bin/cvs/src/release.c @@ -11,11 +11,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)release.c 1.23 94/09/21 $"; -USE(rcsid); -#endif - static void release_delete PROTO((char *dir)); static const char *const release_usage[] = @@ -25,7 +20,7 @@ static const char *const release_usage[] = NULL }; -static short delete; +static short delete_flag; /* FIXME: This implementation is cheezy in quite a few ways: @@ -78,7 +73,7 @@ release (argc, argv) command_name); break; case 'd': - delete++; + delete_flag++; break; case '?': default: @@ -174,7 +169,7 @@ release (argc, argv) * modified, and asking if she still wants to do the * release. */ - fp = Popen (update_cmd, "r"); + fp = run_popen (update_cmd, "r"); c = 0; while (fgets (line, sizeof (line), fp)) @@ -198,7 +193,7 @@ release (argc, argv) (void) printf ("You have [%d] altered files in this repository.\n", c); (void) printf ("Are you sure you want to release %smodule `%s': ", - delete ? "(and delete) " : "", thisarg); + delete_flag ? "(and delete) " : "", thisarg); c = !yesno (); if (c) /* "No" */ { @@ -246,7 +241,7 @@ release (argc, argv) #endif /* CLIENT_SUPPORT */ free (repository); - if (delete) release_delete (thisarg); + if (delete_flag) release_delete (thisarg); #ifdef CLIENT_SUPPORT if (client_active) diff --git a/gnu/usr.bin/cvs/src/remove.c b/gnu/usr.bin/cvs/src/remove.c index ee3d81f5fda..e130657a4c3 100644 --- a/gnu/usr.bin/cvs/src/remove.c +++ b/gnu/usr.bin/cvs/src/remove.c @@ -17,14 +17,7 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)remove.c 1.39 94/10/07 $"; -USE(rcsid); -#endif - -static int remove_fileproc PROTO((char *file, char *update_dir, - char *repository, List *entries, - List *srcfiles)); +static int remove_fileproc PROTO((struct file_info *finfo)); static Dtype remove_dirproc PROTO((char *dir, char *repos, char *update_dir)); static int force; @@ -101,9 +94,9 @@ cvsremove (argc, argv) if (existing_files) error (0, 0, ((existing_files == 1) ? - "%d file exists; use `%s' to remove it first" : - "%d files exist; use `%s' to remove them first"), - existing_files, RM); + "%d file exists; remove it first" : + "%d files exist; remove them first"), + existing_files); return (err); } @@ -113,12 +106,8 @@ cvsremove (argc, argv) */ /* ARGSUSED */ static int -remove_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +remove_fileproc (finfo) + struct file_info *finfo; { char fname[PATH_MAX]; Vers_TS *vers; @@ -127,32 +116,32 @@ remove_fileproc (file, update_dir, repository, entries, srcfiles) { if (!noexec) { - if (unlink (file) < 0 && ! existence_error (errno)) + if (unlink (finfo->file) < 0 && ! existence_error (errno)) { - if (update_dir[0] == '\0') - error (0, errno, "unable to remove %s", file); + if (finfo->update_dir[0] == '\0') + error (0, errno, "unable to remove %s", finfo->file); else - error (0, errno, "unable to remove %s/%s", update_dir, - file); + error (0, errno, "unable to remove %s/%s", finfo->update_dir, + finfo->file); } } /* else FIXME should probably act as if the file doesn't exist in doing the following checks. */ } - vers = Version_TS (repository, (char *) NULL, (char *) NULL, (char *) NULL, - file, 0, 0, entries, srcfiles); + vers = Version_TS (finfo->repository, (char *) NULL, (char *) NULL, (char *) NULL, + finfo->file, 0, 0, finfo->entries, finfo->srcfiles); if (vers->ts_user != NULL) { existing_files++; if (!quiet) - error (0, 0, "file `%s' still in working directory", file); + error (0, 0, "file `%s' still in working directory", finfo->file); } else if (vers->vn_user == NULL) { if (!quiet) - error (0, 0, "nothing known about `%s'", file); + error (0, 0, "nothing known about `%s'", finfo->file); } else if (vers->vn_user[0] == '0' && vers->vn_user[1] == '\0') { @@ -160,36 +149,36 @@ remove_fileproc (file, update_dir, repository, entries, srcfiles) * It's a file that has been added, but not commited yet. So, * remove the ,t file for it and scratch it from the * entries file. */ - Scratch_Entry (entries, file); - (void) sprintf (fname, "%s/%s%s", CVSADM, file, CVSEXT_LOG); + Scratch_Entry (finfo->entries, finfo->file); + (void) sprintf (fname, "%s/%s%s", CVSADM, finfo->file, CVSEXT_LOG); (void) unlink_file (fname); if (!quiet) - error (0, 0, "removed `%s'", file); + error (0, 0, "removed `%s'", finfo->file); #ifdef SERVER_SUPPORT if (server_active) - server_checked_in (file, update_dir, repository); + server_checked_in (finfo->file, finfo->update_dir, finfo->repository); #endif } else if (vers->vn_user[0] == '-') { if (!quiet) - error (0, 0, "file `%s' already scheduled for removal", file); + error (0, 0, "file `%s' already scheduled for removal", finfo->file); } else { /* Re-register it with a negative version number. */ (void) strcpy (fname, "-"); (void) strcat (fname, vers->vn_user); - Register (entries, file, fname, vers->ts_rcs, vers->options, + Register (finfo->entries, finfo->file, fname, vers->ts_rcs, vers->options, vers->tag, vers->date, vers->ts_conflict); if (!quiet) - error (0, 0, "scheduling `%s' for removal", file); + error (0, 0, "scheduling `%s' for removal", finfo->file); removed_files++; #ifdef SERVER_SUPPORT if (server_active) - server_checked_in (file, update_dir, repository); + server_checked_in (finfo->file, finfo->update_dir, finfo->repository); #endif } diff --git a/gnu/usr.bin/cvs/src/repos.c b/gnu/usr.bin/cvs/src/repos.c index 85664334afe..a61b5c7a1d4 100644 --- a/gnu/usr.bin/cvs/src/repos.c +++ b/gnu/usr.bin/cvs/src/repos.c @@ -12,11 +12,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)repos.c 1.32 94/09/23 $"; -USE(rcsid); -#endif - char * Name_Repository (dir, update_dir) char *dir; diff --git a/gnu/usr.bin/cvs/src/root.c b/gnu/usr.bin/cvs/src/root.c index 3129c3b6610..0742cf07fdb 100644 --- a/gnu/usr.bin/cvs/src/root.c +++ b/gnu/usr.bin/cvs/src/root.c @@ -13,11 +13,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)root.c,v 1.2 1994/09/15 05:32:17 zoo Exp"; -USE(rcsid); -#endif - char * Name_Root(dir, update_dir) char *dir; diff --git a/gnu/usr.bin/cvs/src/rtag.c b/gnu/usr.bin/cvs/src/rtag.c index bf476297c51..b175f7bfbc4 100644 --- a/gnu/usr.bin/cvs/src/rtag.c +++ b/gnu/usr.bin/cvs/src/rtag.c @@ -13,14 +13,7 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)rtag.c 1.61 94/09/30 $"; -USE(rcsid); -#endif - -static int check_fileproc PROTO((char *file, char *update_dir, - char *repository, List * entries, - List * srcfiles)); +static int check_fileproc PROTO((struct file_info *finfo)); static int check_filesdoneproc PROTO((int err, char *repos, char *update_dir)); static int pretag_proc PROTO((char *repository, char *filter)); static void masterlist_delproc PROTO((Node *p)); @@ -28,9 +21,7 @@ static void tag_delproc PROTO((Node *p)); static int pretag_list_proc PROTO((Node *p, void *closure)); static Dtype rtag_dirproc PROTO((char *dir, char *repos, char *update_dir)); -static int rtag_fileproc PROTO((char *file, char *update_dir, - char *repository, List * entries, - List * srcfiles)); +static int rtag_fileproc PROTO((struct file_info *finfo)); static int rtag_proc PROTO((int *pargc, char **argv, char *xwhere, char *mwhere, char *mfile, int shorten, int local_specified, char *mname, char *msg)); @@ -56,7 +47,7 @@ static List *tlist; static char *symtag; static char *numtag; static int numtag_validated = 0; -static int delete; /* adding a tag by default */ +static int delete_flag; /* adding a tag by default */ static int attic_too; /* remove tag from Attic files */ static int branch_mode; /* make an automagic "branch" tag */ static char *date; @@ -122,7 +113,7 @@ rtag (argc, argv) local = 0; break; case 'd': - delete = 1; + delete_flag = 1; break; case 'f': force_tag_match = 0; @@ -157,7 +148,7 @@ rtag (argc, argv) if (date && numtag) error (1, 0, "-r and -D options are mutually exclusive"); - if (delete && branch_mode) + if (delete_flag && branch_mode) error (0, 0, "warning: -b ignored with -d options"); RCS_check_tag (symtag); @@ -171,7 +162,7 @@ rtag (argc, argv) if (local) send_arg("-l"); - if (delete) + if (delete_flag) send_arg("-d"); if (branch_mode) send_arg("-b"); @@ -204,9 +195,9 @@ rtag (argc, argv) for (i = 0; i < argc; i++) { /* XXX last arg should be repository, but doesn't make sense here */ - history_write ('T', (delete ? "D" : (numtag ? numtag : + history_write ('T', (delete_flag ? "D" : (numtag ? numtag : (date ? date : "A"))), symtag, argv[i], ""); - err += do_module (db, argv[i], TAG, delete ? "Untagging" : "Tagging", + err += do_module (db, argv[i], TAG, delete_flag ? "Untagging" : "Tagging", rtag_proc, (char *) NULL, 0, 0, run_module_prog, symtag); } @@ -284,7 +275,7 @@ rtag_proc (pargc, argv, xwhere, mwhere, mfile, shorten, local_specified, return (1); } - if (delete || attic_too || (force_tag_match && numtag)) + if (delete_flag || attic_too || (force_tag_match && numtag)) which = W_REPOS | W_ATTIC; else which = W_REPOS; @@ -323,21 +314,17 @@ rtag_proc (pargc, argv, xwhere, mwhere, mfile, shorten, local_specified, /* All we do here is add it to our list */ static int -check_fileproc(file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List * entries; - List * srcfiles; +check_fileproc (finfo) + struct file_info *finfo; { char *xdir; Node *p; Vers_TS *vers; - if (update_dir[0] == '\0') + if (finfo->update_dir[0] == '\0') xdir = "."; else - xdir = update_dir; + xdir = finfo->update_dir; if ((p = findnode (mtlist, xdir)) != NULL) { tlist = ((struct master_lists *) p->data)->tlist; @@ -359,11 +346,11 @@ check_fileproc(file, update_dir, repository, entries, srcfiles) } /* do tlist */ p = getnode (); - p->key = xstrdup (file); + p->key = xstrdup (finfo->file); p->type = UPDATE; p->delproc = tag_delproc; - vers = Version_TS (repository, (char *) NULL, (char *) NULL, - (char *) NULL, file, 0, 0, entries, srcfiles); + vers = Version_TS (finfo->repository, (char *) NULL, (char *) NULL, + (char *) NULL, finfo->file, 0, 0, finfo->entries, finfo->srcfiles); p->data = RCS_getversion(vers->srcfile, numtag, date, force_tag_match, 0); if (p->data != NULL) { @@ -373,7 +360,7 @@ check_fileproc(file, update_dir, repository, entries, srcfiles) oversion = RCS_getversion (vers->srcfile, symtag, (char *) NULL, 1, 0); if (oversion == NULL) { - if (delete) + if (delete_flag) { addit = 0; } @@ -460,7 +447,7 @@ pretag_proc(repository, filter) run_setup("%s %s %s %s", filter, symtag, - delete ? "del" : force_tag_move ? "mov" : "add", + delete_flag ? "del" : force_tag_move ? "mov" : "add", repository); walklist(tlist, pretag_list_proc, NULL); return (run_exec(RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL|RUN_REALLY)); @@ -509,12 +496,8 @@ pretag_list_proc(p, closure) */ /* ARGSUSED */ static int -rtag_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +rtag_fileproc (finfo) + struct file_info *finfo; { Node *p; RCSNode *rcsfile; @@ -522,7 +505,7 @@ rtag_fileproc (file, update_dir, repository, entries, srcfiles) int retcode = 0; /* find the parsed RCS data */ - p = findnode (srcfiles, file); + p = findnode (finfo->srcfiles, finfo->file); if (p == NULL) return (1); rcsfile = (RCSNode *) p->data; @@ -533,7 +516,7 @@ rtag_fileproc (file, update_dir, repository, entries, srcfiles) * correctly without breaking your link! */ - if (delete) + if (delete_flag) return (rtag_delete (rcsfile)); /* @@ -582,7 +565,7 @@ rtag_fileproc (file, update_dir, repository, entries, srcfiles) /* * As an enhancement for the case where a tag is being re-applied to - * a large body of a module, make one extra call to Version_Number to + * a large body of a module, make one extra call to RCS_getversion to * see if the tag is already set in the RCS file. If so, check to * see if it needs to be moved. If not, do nothing. This will * likely save a lot of time when simply moving the tag to the @@ -593,7 +576,7 @@ rtag_fileproc (file, update_dir, repository, entries, srcfiles) oversion = RCS_getversion (rcsfile, symtag, (char *) NULL, 1, 0); if (oversion != NULL) { - int isbranch = RCS_isbranch (file, symtag, srcfiles); + int isbranch = RCS_isbranch (finfo->file, symtag, finfo->srcfiles); /* * if versions the same and neither old or new are branches don't @@ -607,10 +590,10 @@ rtag_fileproc (file, update_dir, repository, entries, srcfiles) } if (!force_tag_move) { /* we're NOT going to move the tag */ - if (update_dir[0]) - (void) printf ("W %s/%s", update_dir, file); + if (finfo->update_dir[0]) + (void) printf ("W %s/%s", finfo->update_dir, finfo->file); else - (void) printf ("W %s", file); + (void) printf ("W %s", finfo->file); (void) printf (" : %s already exists on %s %s", symtag, isbranch ? "branch" : "version", oversion); @@ -630,16 +613,20 @@ rtag_fileproc (file, update_dir, repository, entries, srcfiles) error (1, retcode == -1 ? errno : 0, "failed to set tag `%s' to revision `%s' in `%s'", symtag, rev, rcsfile->path); - free (version); - return (1); + if (branch_mode) + free (rev); + free (version); + return (1); } + if (branch_mode) + free (rev); free (version); return (0); } /* * If -d is specified, "force_tag_match" is set, so that this call to - * Version_Number() will return a NULL version string if the symbolic + * RCS_getversion() will return a NULL version string if the symbolic * tag does not exist in the RCS file. * * If the -r flag was used, numtag is set, and we only delete the @@ -690,7 +677,7 @@ rtag_dirproc (dir, repos, update_dir) char *update_dir; { if (!quiet) - error (0, 0, "%s %s", delete ? "Untagging" : "Tagging", update_dir); + error (0, 0, "%s %s", delete_flag ? "Untagging" : "Tagging", update_dir); return (R_PROCESS); } diff --git a/gnu/usr.bin/cvs/src/run.c b/gnu/usr.bin/cvs/src/run.c index 0909878267a..42eeb27a430 100644 --- a/gnu/usr.bin/cvs/src/run.c +++ b/gnu/usr.bin/cvs/src/run.c @@ -398,16 +398,16 @@ run_print (fp) } FILE * -Popen (cmd, mode) +run_popen (cmd, mode) const char *cmd; const char *mode; { if (trace) #ifdef SERVER_SUPPORT - (void) fprintf (stderr, "%c-> Popen(%s,%s)\n", + (void) fprintf (stderr, "%c-> run_popen(%s,%s)\n", (server_active) ? 'S' : ' ', cmd, mode); #else - (void) fprintf (stderr, "-> Popen(%s,%s)\n", cmd, mode); + (void) fprintf (stderr, "-> run_popen(%s,%s)\n", cmd, mode); #endif if (noexec) return (NULL); diff --git a/gnu/usr.bin/cvs/src/sanity.sh b/gnu/usr.bin/cvs/src/sanity.sh index a47632de71a..c47233d17a1 100644 --- a/gnu/usr.bin/cvs/src/sanity.sh +++ b/gnu/usr.bin/cvs/src/sanity.sh @@ -1,8 +1,6 @@ #! /bin/sh : -# sanity.sh -- a growing sanity test for cvs. -# -#ident "$CVSid$" +# sanity.sh -- a growing testsuite for cvs. # # Copyright (C) 1992, 1993 Cygnus Support # @@ -45,9 +43,11 @@ esac shift -# Use full path for mkmodules, so that the right one will be invoked -# -testmkmodules=`pwd`/mkmodules +# Regexp to match what CVS will call itself in output that it prints. +# FIXME: we don't properly quote this--if the name contains . we'll +# just spuriously match a few things; if the name contains other regexp +# special characters we are probably in big trouble. +PROG=`basename ${testcvs}` # FIXME: try things (what things? checkins?) without -m. # @@ -56,7 +56,7 @@ testmkmodules=`pwd`/mkmodules # So new tests probably should invoke ${testcvs} directly, rather than ${CVS}. # and then they've obviously got to do something with the output.... # -CVS="${testcvs} -Q -f" +CVS="${testcvs} -Q" LOGFILE=`pwd`/check.log @@ -69,8 +69,9 @@ fi # That we should have to do this is total bogosity, but GNU expr # version 1.9.4 uses the emacs definition of "$" instead of the unix -# (e.g. SunOS 4.1.3 expr) one. IMHO, this is a GNU expr bug, but I -# don't have a copy of POSIX.2 handy to check. +# (e.g. SunOS 4.1.3 expr) one. Rumor has it this will be fixed in the +# next release of GNU expr after 1.12 (but we still have to cater to the old +# ones for some time because they are in many linux distributions). ENDANCHOR="$" if expr 'abc def' : 'abc$' >/dev/null; then @@ -82,6 +83,9 @@ fi # Note that the workaround is not a complete equivalent of .* because # the first parenthesized expression in the regexp must match something # in order for expr to return a successful exit status. +# Rumor has it this will be fixed in the +# next release of GNU expr after 1.12 (but we still have to cater to the old +# ones for some time because they are in many linux distributions). DOTSTAR='.*' if expr 'abc def' : "a${DOTSTAR}f" >/dev/null; then @@ -91,6 +95,20 @@ else \)*' fi +# Work around yet another GNU expr (version 1.10) bug/incompatibility. +# "+" is a special character, yet for unix expr (e.g. SunOS 4.1.3) +# it is not. I doubt that POSIX allows us to use \+ and assume it means +# (non-special) +, so here is another workaround +# Rumor has it this will be fixed in the +# next release of GNU expr after 1.12 (but we still have to cater to the old +# ones for some time because they are in many linux distributions). +PLUS='+' +if expr 'a +b' : "a ${PLUS}b" >/dev/null; then + : good, it works +else + PLUS='\+' +fi + # Cause NextStep 3.3 users to lose in a more graceful fashion. if expr 'abc def' : 'abc @@ -228,16 +246,19 @@ rm -rf ${TESTDIR} mkdir ${TESTDIR} cd ${TESTDIR} +# Avoid picking up any stray .cvsrc, etc., from the user running the tests +mkdir home +HOME=${TESTDIR}/home; export HOME + # Remaining arguments are the names of tests to run. # -# FIXME: not all combinations are possible; rtags depends on files set -# up by basic2, for example. This should be changed. The goal is -# that tests can be run in manageably-sized chunks, so that one can -# quickly get a result from a cvs or testsuite change, and to -# facilitate understanding the tests. +# The testsuite is broken up into (hopefully manageably-sized) +# independently runnable tests, so that one can quickly get a result +# from a cvs or testsuite change, and to facilitate understanding the +# tests. if test x"$*" = x; then - tests="basica basic0 basic1 basic2 rtags death import new conflicts modules mflag errmsg1 devcom ignore binfiles" + tests="basica basic1 deep basic2 death branches import new conflicts modules mflag errmsg1 devcom ignore binfiles info" else tests="$*" fi @@ -274,7 +295,9 @@ ${CVS} -d `pwd`/../cvsroot co CVSROOT 2>> ${LOGFILE} cd .. ; rm -rf tmp # set up a minimal modules file... -echo "CVSROOT -i ${testmkmodules} CVSROOT" > cvsroot/CVSROOT/modules +# (now that mkmodules is gone, this doesn't test -i the way it +# used to. In fact, it looks like a noop to me). +echo "CVSROOT CVSROOT" > cvsroot/CVSROOT/modules # The following line stolen from cvsinit.sh. FIXME: create our # repository via cvsinit.sh; that way we test it too. (cd cvsroot/CVSROOT; ci -q -u -t/dev/null \ @@ -363,12 +386,27 @@ touch ${CVSROOT_DIRNAME}/CVSROOT/history for what in $tests; do case $what in basica) - # Similar in spirit to some of the basic0, basic1, and basic2 + # Similar in spirit to some of the basic1, and basic2 # tests, but hopefully a lot faster. Also tests operating on # files two directories down *without* operating on the parent dirs. + + # Using mkdir in the repository is used throughout these + # tests to create a top-level directory. I think instead it + # should be: + # cvs co -l . + # mkdir first-dir + # cvs add first-dir + # but currently that works only for local CVS, not remote. mkdir ${CVSROOT_DIRNAME}/first-dir dotest basica-1 "${testcvs} -q co first-dir" '' cd first-dir + + # Test a few operations, to ensure they gracefully do + # nothing in an empty directory. + dotest basica-1a0 "${testcvs} -q update" '' + dotest basica-1a1 "${testcvs} -q diff -c" '' + dotest basica-1a2 "${testcvs} -q status" '' + mkdir sdir dotest basica-2 "${testcvs} add sdir" \ 'Directory /tmp/cvs-sanity/cvsroot/first-dir/sdir added to the repository' @@ -379,8 +417,8 @@ for what in $tests; do cd ssdir echo ssfile >ssfile dotest basica-4 "${testcvs} add ssfile" \ -'cvs [a-z]*: scheduling file `ssfile'\'' for addition -cvs [a-z]*: use '\''cvs commit'\'' to add this file permanently' +"${PROG}"' [a-z]*: scheduling file `ssfile'\'' for addition +'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to add this file permanently' cd ../.. dotest basica-5 "${testcvs} -q ci -m add-it" \ 'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/sdir/ssdir/ssfile,v @@ -397,8 +435,8 @@ done' new revision: 1.2; previous revision: 1.1 done' dotest_fail basica-nonexist "${testcvs} -q ci nonexist" \ -'cvs [a-z]*: nothing known about `nonexist'\'' -cvs \[[a-z]* aborted\]: correct above errors first!' +"${PROG}"' [a-z]*: nothing known about `nonexist'\'' +'"${PROG}"' \[[a-z]* aborted\]: correct above errors first!' dotest basica-8 "${testcvs} -q update" '' cd .. @@ -406,81 +444,7 @@ cvs \[[a-z]* aborted\]: correct above errors first!' rm -r first-dir ;; - basic0) # Now, let's build something. -# mkdir first-dir - # this doesn't yet work, though I think maybe it should. xoxorich. -# if ${CVS} add first-dir ; then -# true -# else -# echo cvs does not yet add top level directories cleanly. - mkdir ${CVSROOT_DIRNAME}/first-dir -# fi -# rm -rf first-dir - - # check out an empty directory - if ${CVS} co first-dir ; then - if [ -r first-dir/CVS/Entries ] ; then - echo "PASS: test 6" >>${LOGFILE} - else - echo "FAIL: test 6" | tee -a ${LOGFILE}; exit 1 - fi - else - echo "FAIL: test 6" | tee -a ${LOGFILE}; exit 1 - fi - - # update the empty directory - if ${CVS} update first-dir ; then - echo "PASS: test 7" >>${LOGFILE} - else - echo "FAIL: test 7" | tee -a ${LOGFILE}; exit 1 - fi - - # diff -u the empty directory - if ${CVS} diff -u first-dir ; then - echo "PASS: test 8" >>${LOGFILE} - else - echo "FAIL: test 8" | tee -a ${LOGFILE}; exit 1 - fi - - # diff -c the empty directory - if ${CVS} diff -c first-dir ; then - echo "PASS: test 9" >>${LOGFILE} - else - echo "FAIL: test 9" | tee -a ${LOGFILE}; exit 1 - fi - - # log the empty directory - if ${CVS} log first-dir ; then - echo "PASS: test 10" >>${LOGFILE} - else - echo "FAIL: test 10" | tee -a ${LOGFILE}; exit 1 - fi - - # status the empty directory - if ${CVS} status first-dir ; then - echo "PASS: test 11" >>${LOGFILE} - else - echo "FAIL: test 11" | tee -a ${LOGFILE}; exit 1 - fi - - # tag the empty directory - if ${CVS} tag first first-dir ; then - echo "PASS: test 12" >>${LOGFILE} - else - echo "FAIL: test 12" | tee -a ${LOGFILE}; exit 1 - fi - - # rtag the empty directory - if ${CVS} rtag empty first-dir ; then - echo "PASS: test 13" >>${LOGFILE} - else - echo "FAIL: test 13" | tee -a ${LOGFILE}; exit 1 - fi - ;; - basic1) # first dive - add a files, first singly, then in a group. - rm -rf ${CVSROOT_DIRNAME}/first-dir - rm -rf first-dir mkdir ${CVSROOT_DIRNAME}/first-dir # check out an empty directory if ${CVS} co first-dir ; then @@ -626,12 +590,90 @@ cvs \[[a-z]* aborted\]: correct above errors first!' rm -rf first-dir ;; + deep) + # Test the ability to operate on directories nested rather deeply. + mkdir ${CVSROOT_DIRNAME}/first-dir + dotest deep-1 "${testcvs} -q co first-dir" '' + cd first-dir + for i in dir1 dir2 dir3 dir4 dir5 dir6 dir7 dir8; do + mkdir $i + dotest deep-2-$i "${testcvs} add $i" \ +'Directory /tmp/cvs-sanity/cvsroot/first-dir/dir1[/dir0-9]* added to the repository' + cd $i + echo file1 >file1 + dotest deep-3-$i "${testcvs} add file1" \ +"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition +'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to add this file permanently' + done + cd ../../../../../../../../.. + dotest deep-4 "${testcvs} -q ci -m add-them first-dir" \ +'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/dir1/file1,v +done +Checking in first-dir/dir1/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/file1,v <-- file1 +initial revision: 1.1 +done +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/file1,v +done +Checking in first-dir/dir1/dir2/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/file1,v <-- file1 +initial revision: 1.1 +done +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/file1,v +done +Checking in first-dir/dir1/dir2/dir3/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/file1,v <-- file1 +initial revision: 1.1 +done +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/file1,v +done +Checking in first-dir/dir1/dir2/dir3/dir4/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/file1,v <-- file1 +initial revision: 1.1 +done +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v +done +Checking in first-dir/dir1/dir2/dir3/dir4/dir5/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1 +initial revision: 1.1 +done +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v +done +Checking in first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- file1 +initial revision: 1.1 +done +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v +done +Checking in first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- file1 +initial revision: 1.1 +done +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v +done +Checking in first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1 +initial revision: 1.1 +done' + + if echo "yes" | ${testcvs} release -d first-dir >>${LOGFILE}; then + pass deep-5 + else + fail deep-5 + fi + rm -rf ${CVSROOT_DIRNAME}/first-dir + ;; + basic2) - # second dive - add bunch o' files in bunch o' added - # directories + # Test rtag, import, history, various miscellaneous operations + + # First empty the history file + rm ${CVSROOT_DIRNAME}/CVSROOT/history + touch ${CVSROOT_DIRNAME}/CVSROOT/history + mkdir ${CVSROOT_DIRNAME}/first-dir dotest basic2-1 "${testcvs} -q co first-dir" '' - for i in first-dir dir1 dir2 dir3 dir4 ; do + for i in first-dir dir1 dir2 ; do if [ ! -d $i ] ; then mkdir $i if ${CVS} add $i >> ${LOGFILE}; then @@ -643,17 +685,17 @@ cvs \[[a-z]* aborted\]: correct above errors first!' cd $i - for j in file6 file7 file8 file9 file10 file11 file12 file13; do + for j in file6 file7; do echo $j > $j done - if ${CVS} add file6 file7 file8 file9 file10 file11 file12 file13 2>> ${LOGFILE}; then + if ${CVS} add file6 file7 2>> ${LOGFILE}; then echo "PASS: test 30-$i-$j" >>${LOGFILE} else echo "FAIL: test 30-$i-$j" | tee -a ${LOGFILE} ; exit 1 fi done - cd ../../../../.. + cd ../../.. if ${CVS} update first-dir ; then echo "PASS: test 31" >>${LOGFILE} else @@ -694,35 +736,31 @@ cvs \[[a-z]* aborted\]: correct above errors first!' # third dive - in bunch o' directories, add bunch o' files, # delete some, change some. - for i in first-dir dir1 dir2 dir3 dir4 ; do + for i in first-dir dir1 dir2 ; do cd $i - # modify some files - for j in file6 file8 file10 file12 ; do - echo $j >> $j - done + # modify a file + echo file6 >>file6 - # delete some files - rm file7 file9 file11 file13 + # delete a file + rm file7 - if ${CVS} rm file7 file9 file11 file13 2>> ${LOGFILE}; then + if ${CVS} rm file7 2>> ${LOGFILE}; then echo "PASS: test 37-$i" >>${LOGFILE} else echo "FAIL: test 37-$i" | tee -a ${LOGFILE} ; exit 1 fi - # and add some new ones - for j in file14 file15 file16 file17 ; do - echo $j > $j - done + # and add a new file + echo file14 >file14 - if ${CVS} add file14 file15 file16 file17 2>> ${LOGFILE}; then + if ${CVS} add file14 2>> ${LOGFILE}; then echo "PASS: test 38-$i" >>${LOGFILE} else echo "FAIL: test 38-$i" | tee -a ${LOGFILE} ; exit 1 fi done - cd ../../../../.. + cd ../../.. if ${CVS} update first-dir ; then echo "PASS: test 39" >>${LOGFILE} else @@ -774,9 +812,8 @@ cvs \[[a-z]* aborted\]: correct above errors first!' echo "PASS: test 45.5" >>${LOGFILE} fi - ;; + # now try some rtags - rtags) # now try some rtags # rtag HEADS if ${CVS} rtag rtagged-by-head first-dir ; then echo "PASS: test 46" >>${LOGFILE} @@ -855,11 +892,21 @@ cvs \[[a-z]* aborted\]: correct above errors first!' # interrupt, while we've got a clean 1.1 here, let's import it into another tree. cd export-dir - if ${CVS} import -m "first-import" second-dir first-immigration immigration1 immigration1_0 ; then - echo "PASS: test 56" >>${LOGFILE} - else - echo "FAIL: test 56" | tee -a ${LOGFILE} ; exit 1 - fi + dotest 56 "${testcvs} import -m first-import second-dir first-immigration immigration1 immigration1_0" \ +'N second-dir/file14 +N second-dir/file6 +N second-dir/file7 +'"${PROG}"' [a-z]*: Importing /tmp/cvs-sanity/cvsroot/second-dir/dir1 +N second-dir/dir1/file14 +N second-dir/dir1/file6 +N second-dir/dir1/file7 +'"${PROG}"' [a-z]*: Importing /tmp/cvs-sanity/cvsroot/second-dir/dir1/dir2 +N second-dir/dir1/dir2/file14 +N second-dir/dir1/dir2/file6 +N second-dir/dir1/dir2/file7 + +No conflicts created by this import' + cd .. if ${CVS} export -r HEAD second-dir ; then @@ -932,11 +979,57 @@ cvs \[[a-z]* aborted\]: correct above errors first!' # fi rm -rf 1dir first-dir - if ${CVS} his -e -a >> ${LOGFILE}; then - echo "PASS: test 64" >>${LOGFILE} - else - echo "FAIL: test 64" | tee -a ${LOGFILE} ; exit 1 - fi + # Test the cvs history command. + + # The reason that there are two patterns rather than using + # \(/tmp/cvs-sanity\|<remote>\) is that we are trying to + # make this portable. Perhaps at some point we should + # ditch that notion and require GNU expr (or dejagnu or....) + # since it seems to be so painful. + + # why are there two lines at the end of the local output + # which don't exist in the remote output? would seem to be + # a CVS bug. + dotest basic2-64 "${testcvs} his -e -a" \ +'O [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* first-dir =first-dir= /tmp/cvs-sanity/\* +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file6 first-dir == /tmp/cvs-sanity +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file7 first-dir == /tmp/cvs-sanity +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file6 first-dir/dir1 == /tmp/cvs-sanity +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file7 first-dir/dir1 == /tmp/cvs-sanity +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file6 first-dir/dir1/dir2 == /tmp/cvs-sanity +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file7 first-dir/dir1/dir2 == /tmp/cvs-sanity +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file14 first-dir == /tmp/cvs-sanity +M [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.2 file6 first-dir == /tmp/cvs-sanity +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file14 first-dir/dir1 == /tmp/cvs-sanity +M [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.2 file6 first-dir/dir1 == /tmp/cvs-sanity +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file14 first-dir/dir1/dir2 == /tmp/cvs-sanity +M [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.2 file6 first-dir/dir1/dir2 == /tmp/cvs-sanity +F [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* =first-dir= /tmp/cvs-sanity/\* +T [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* first-dir \[rtagged-by-head:A\] +T [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* first-dir \[rtagged-by-tag:rtagged-by-head\] +T [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* first-dir \[rtagged-by-revision:1.1\] +O [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* \[1.1\] first-dir =first-dir= /tmp/cvs-sanity/\* +U [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.2 file6 first-dir == /tmp/cvs-sanity/first-dir +U [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.2 file7 first-dir == /tmp/cvs-sanity/first-dir' \ +'O [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* first-dir =first-dir= <remote>/\* +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file6 first-dir == <remote> +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file7 first-dir == <remote> +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file6 first-dir/dir1 == <remote> +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file7 first-dir/dir1 == <remote> +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file6 first-dir/dir1/dir2 == <remote> +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file7 first-dir/dir1/dir2 == <remote> +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file14 first-dir == <remote> +M [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.2 file6 first-dir == <remote> +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file14 first-dir/dir1 == <remote> +M [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.2 file6 first-dir/dir1 == <remote> +A [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.1 file14 first-dir/dir1/dir2 == <remote> +M [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* 1.2 file6 first-dir/dir1/dir2 == <remote> +F [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* =first-dir= <remote>/\* +T [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* first-dir \[rtagged-by-head:A\] +T [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* first-dir \[rtagged-by-tag:rtagged-by-head\] +T [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* first-dir \[rtagged-by-revision:1.1\] +O [0-9/]* [0-9:]* '"${PLUS}"'0000 [a-z@][a-z@]* \[1.1\] first-dir =first-dir= <remote>/\*' + rm -rf ${CVSROOT_DIRNAME}/first-dir rm -rf ${CVSROOT_DIRNAME}/second-dir ;; @@ -959,8 +1052,8 @@ cvs \[[a-z]* aborted\]: correct above errors first!' cd subdir echo file in subdir >sfile dotest 65a1 "${testcvs} add sfile" \ -'cvs [a-z]*: scheduling file `sfile'\'' for addition -cvs [a-z]*: use '\''cvs commit'\'' to add this file permanently' +"${PROG}"' [a-z]*: scheduling file `sfile'\'' for addition +'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to add this file permanently' dotest 65a2 "${testcvs} -q ci -m add-it" \ 'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/subdir/sfile,v done @@ -970,8 +1063,8 @@ initial revision: 1.1 done' rm sfile dotest 65a3 "${testcvs} rm sfile" \ -'cvs [a-z]*: scheduling `sfile'\'' for removal -cvs [a-z]*: use '\''cvs commit'\'' to remove this file permanently' +"${PROG}"' [a-z]*: scheduling `sfile'\'' for removal +'"${PROG}"' [a-z]*: use '\'"${PROG}"' commit'\'' to remove this file permanently' dotest 65a4 "${testcvs} -q ci -m remove-it" \ 'Removing sfile; /tmp/cvs-sanity/cvsroot/first-dir/subdir/sfile,v <-- sfile @@ -1011,8 +1104,17 @@ done' echo "FAIL: test 69" | tee -a ${LOGFILE} ; exit 1 fi - # add again and create second file - touch file1 file2 + dotest_fail 69a0 "test -f file1" '' + # get the old contents of file1 back + if ${testcvs} update -p -r 1.1 file1 >file1 2>>${LOGFILE}; then + pass 69a1 + else + fail 69a1 + fi + dotest 69a2 "cat file1" '' + + # create second file + touch file2 if ${CVS} add file1 file2 2>> ${LOGFILE}; then echo "PASS: test 70" >>${LOGFILE} else @@ -1036,8 +1138,8 @@ done' # file4 will be dead at the time of branching and stay dead. echo file4 > file4 dotest death-file4-add "${testcvs} add file4" \ -'cvs [a-z]*: scheduling file `file4'\'' for addition -cvs [a-z]*: use '\''cvs commit'\'' to add this file permanently' +"${PROG}"' [a-z]*: scheduling file `file4'\'' for addition +'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to add this file permanently' dotest death-file4-ciadd "${testcvs} -q ci -m add file4" \ 'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file4,v done @@ -1047,8 +1149,8 @@ initial revision: 1.1 done' rm file4 dotest death-file4-rm "${testcvs} remove file4" \ -'cvs [a-z]*: scheduling `file4'\'' for removal -cvs [a-z]*: use '\''cvs commit'\'' to remove this file permanently' +"${PROG}"' [a-z]*: scheduling `file4'\'' for removal +'"${PROG}"' [a-z]*: use '\'"${PROG}"' commit'\'' to remove this file permanently' dotest death-file4-cirm "${testcvs} -q ci -m remove file4" \ 'Removing file4; /tmp/cvs-sanity/cvsroot/first-dir/file4,v <-- file4 @@ -1216,7 +1318,7 @@ done' # typo; try to get to the branch and fail dotest_fail 92.1a "${testcvs} update -r brnach1" \ - 'cvs \[[a-z]* aborted\]: no such tag brnach1' + "${PROG}"' \[[a-z]* aborted\]: no such tag brnach1' # Make sure we are still on the trunk if test -f file1 ; then echo "FAIL: 92.1b" | tee -a ${LOGFILE} ; exit 1 @@ -1255,6 +1357,94 @@ done' cd .. ; rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir ;; + branches) + # More branch tests, including branches off of branches + mkdir ${CVSROOT_DIRNAME}/first-dir + dotest branches-1 "${testcvs} -q co first-dir" '' + cd first-dir + echo 1:ancest >file1 + echo 2:ancest >file2 + echo 3:ancest >file3 + dotest branches-2 "${testcvs} add file1 file2 file3" \ +"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition +'"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition +'"${PROG}"' [a-z]*: scheduling file `file3'\'' for addition +'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to add these files permanently' + dotest branches-3 "${testcvs} -q ci -m add-it" \ +'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v +done +Checking in file1; +/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 +initial revision: 1.1 +done +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file2,v +done +Checking in file2; +/tmp/cvs-sanity/cvsroot/first-dir/file2,v <-- file2 +initial revision: 1.1 +done +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file3,v +done +Checking in file3; +/tmp/cvs-sanity/cvsroot/first-dir/file3,v <-- file3 +initial revision: 1.1 +done' + dotest branches-4 "${testcvs} tag -b br1" "${PROG}"' [a-z]*: Tagging \. +T file1 +T file2 +T file3' + dotest branches-5 "${testcvs} update -r br1" \ +"${PROG}"' [a-z]*: Updating \.' + echo 1:br1 >file1 + echo 2:br1 >file2 + dotest branches-6 "${testcvs} -q ci -m modify" \ +'Checking in file1; +/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 +new revision: 1.1.2.1; previous revision: 1.1 +done +Checking in file2; +/tmp/cvs-sanity/cvsroot/first-dir/file2,v <-- file2 +new revision: 1.1.2.1; previous revision: 1.1 +done' + dotest branches-7 "${testcvs} -q tag -b brbr" 'T file1 +T file2 +T file3' + dotest branches-8 "${testcvs} -q update -r brbr" '' + echo 1:brbr >file1 + dotest branches-9 "${testcvs} -q ci -m modify" \ +'Checking in file1; +/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 +new revision: 1.1.2.1.2.1; previous revision: 1.1.2.1 +done' + dotest branches-10 "cat file1 file2 file3" '1:brbr +2:br1 +3:ancest' + dotest branches-11 "${testcvs} -q update -r br1" 'U file1' 'P file1' + dotest branches-12 "cat file1 file2 file3" '1:br1 +2:br1 +3:ancest' + dotest branches-13 "${testcvs} -q update -A" '. file1 +. file2' + dotest branches-14 "cat file1 file2 file3" '1:ancest +2:ancest +3:ancest' + dotest branches-15 \ + "${testcvs} update -j 1.1.2.1 -j 1.1.2.1.2.1 file1" \ + 'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v +retrieving revision 1.1.2.1 +retrieving revision 1.1.2.1.2.1 +Merging differences between 1.1.2.1 and 1.1.2.1.2.1 into file1 +rcsmerge: warning: conflicts during merge' + dotest branches-16 "cat file1" '<<<<<<< file1 +1:ancest +======= +1:brbr +>>>>>>> 1.1.2.1.2.1' + cd .. + + rm -rf ${CVSROOT_DIRNAME}/first-dir + rm -r first-dir + ;; import) # test death after import # import @@ -1558,28 +1748,40 @@ done' cd ../../1/first-dir echo add a line >>a - if ${CVS} ci -m changed >>${LOGFILE} 2>&1; then - echo 'PASS: test 128' >>${LOGFILE} - else - echo 'FAIL: test 128' | tee -a ${LOGFILE} - fi - + mkdir dir1 + dotest conflicts-127b "${testcvs} add dir1" \ +'Directory /tmp/cvs-sanity/cvsroot/first-dir/dir1 added to the repository' + dotest conflicts-128 "${testcvs} -q ci -m changed" \ +'Checking in a; +/tmp/cvs-sanity/cvsroot/first-dir/a,v <-- a +new revision: 1.2; previous revision: 1.1 +done' cd ../../2/first-dir echo add a conflicting line >>a - if ${CVS} ci -m changed >>${LOGFILE} 2>&1; then - echo 'FAIL: test 129' | tee -a ${LOGFILE} - else - # Should be printing `out of date check failed'. - echo 'PASS: test 129' >>${LOGFILE} - fi - - if ${CVS} update 2>>${LOGFILE}; then - # We should get a conflict, but that doesn't affect - # exit status - echo 'PASS: test 130' >>${LOGFILE} - else - echo 'FAIL: test 130' | tee -a ${LOGFILE} - fi + dotest_fail conflicts-129 "${testcvs} -q ci -m changed" \ +"${PROG}"' [a-z]*: Up-to-date check failed for `a'\'' +'"${PROG}"' \[[a-z]* aborted\]: correct above errors first!' + mkdir dir1 + mkdir sdir + dotest conflicts-130 "${testcvs} -q update" \ +'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/a,v +retrieving revision 1.1 +retrieving revision 1.2 +Merging differences between 1.1 and 1.2 into a +rcsmerge: warning: conflicts during merge +'"${PROG}"' [a-z]*: conflicts found in a +C a +\? dir1 +\? sdir' \ +'\? dir1 +\? sdir +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/a,v +retrieving revision 1.1 +retrieving revision 1.2 +Merging differences between 1.1 and 1.2 into a +rcsmerge: warning: conflicts during merge +'"${PROG}"' [a-z]*: conflicts found in a +C a' # Try to check in the file with the conflict markers in it. if ${CVS} ci -m try 2>>${LOGFILE}; then @@ -1620,16 +1822,15 @@ done' echo 'FAIL: test 135' | tee -a ${LOGFILE} fi cd ../../2 - if ${testcvs} -q update >>${LOGFILE}; then - echo 'PASS: test 136' >>${LOGFILE} - else - echo 'FAIL: test 136' | tee -a ${LOGFILE} - fi - if test -f first-dir/abc; then - echo 'PASS: test 137' >>${LOGFILE} - else - echo 'FAIL: test 137' | tee -a ${LOGFILE} - fi + dotest conflicts-136 "${testcvs} -q update" \ +'[UP] first-dir/abc +\? first-dir/dir1 +\? first-dir/sdir' \ +'\? first-dir/dir1 +\? first-dir/sdir +[UP] first-dir/abc' + dotest conflicts-137 'test -f first-dir/abc' '' + rmdir first-dir/dir1 first-dir/sdir # Now test something similar, but in which the parent directory # (not the directory in question) has the Entries.Static flag @@ -1978,7 +2179,9 @@ U nameddir/b' echo 'FAIL: test 167' | tee -a ${LOGFILE} exit 1 fi + cd ../../2/1dir + # FIXME: should be using dotest and PROG. ${testcvs} -q update 2>../tst167.err CVSBASE=`basename $testcvs` # Get basename of CVS executable. cat <<EOF >../tst167.ans @@ -2025,6 +2228,7 @@ EOF echo 'FAIL: test 171' | tee -a ${LOGFILE} exit 1 fi + dotest_fail 171a0 "${testcvs} watch" "Usage${DOTSTAR}" if ${testcvs} watch on; then echo 'PASS: test 172' >>${LOGFILE} else @@ -2162,18 +2366,25 @@ EOF echo 'FAIL: test 186a7' | tee -a ${LOGFILE} fi + dotest devcom-a0 "${testcvs} watchers" '' + dotest devcom-a1 "${testcvs} watch add" '' + dotest devcom-a2 "${testcvs} watchers" \ +'abb [a-z0-9]* edit unedit commit +abc [a-z0-9]* edit unedit commit' + dotest devcom-a3 "${testcvs} watch remove -a unedit abb" '' + dotest devcom-a4 "${testcvs} watchers abb" \ +'abb [a-z0-9]* edit commit' + cd ../.. rm -rf 1 2 ${CVSROOT_DIRNAME}/first-dir ;; ignore) - mkdir home - HOME=${TESTDIR}/home; export HOME dotest 187a1 "${testcvs} -q co CVSROOT" 'U CVSROOT/modules' cd CVSROOT echo rootig.c >cvsignore - dotest 187a2 "${testcvs} add cvsignore" 'cvs [a-z]*: scheduling file `cvsignore'"'"' for addition -cvs [a-z]*: use '"'"'cvs commit'"'"' to add this file permanently' + dotest 187a2 "${testcvs} add cvsignore" "${PROG}"' [a-z]*: scheduling file `cvsignore'"'"' for addition +'"${PROG}"' [a-z]*: use '"'"'cvs commit'"'"' to add this file permanently' # As of Jan 96, local CVS prints "Examining ." and remote doesn't. # Accept either. @@ -2184,7 +2395,7 @@ Checking in cvsignore; /tmp/cvs-sanity/cvsroot/CVSROOT/cvsignore,v <-- cvsignore initial revision: 1.1 done -cvs [a-z]*: Executing '"'"''"'"'.*mkmodules'"'"' '"'"'/tmp/cvs-sanity/cvsroot/CVSROOT'"'"''"'"'' +'"${PROG}"' [a-z]*: Rebuilding administrative file database' cd .. if echo "yes" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then @@ -2268,8 +2479,8 @@ U first-dir/foobar.c' cd first-dir cp ../binfile.dat binfile dotest binfiles-2 "${testcvs} add -kb binfile" \ -'cvs [a-z]*: scheduling file `binfile'\'' for addition -cvs [a-z]*: use '\''cvs commit'\'' to add this file permanently' +"${PROG}"' [a-z]*: scheduling file `binfile'\'' for addition +'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to add this file permanently' dotest binfiles-3 "${testcvs} -q ci -m add-it" \ 'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/binfile,v done @@ -2296,6 +2507,66 @@ done' rm -rf ${CVSROOT_DIRNAME}/first-dir rm -r 1 2 ;; + info) + # Test CVS's ability to handle *info files. + dotest info-1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}" + cd CVSROOT + echo "ALL echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog" > loginfo + dotest info-2 "${testcvs} add loginfo" \ +"${PROG}"' [a-z]*: scheduling file `loginfo'"'"' for addition +'"${PROG}"' [a-z]*: use '"'"'cvs commit'"'"' to add this file permanently' + dotest info-3 "${testcvs} -q ci -m new-loginfo" \ +'RCS file: /tmp/cvs-sanity/cvsroot/CVSROOT/loginfo,v +done +Checking in loginfo; +/tmp/cvs-sanity/cvsroot/CVSROOT/loginfo,v <-- loginfo +initial revision: 1.1 +done +'"${PROG}"' [a-z]*: Rebuilding administrative file database' + cd .. + if echo "yes" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then + pass info-4 + else + fail info-4 + fi + + mkdir ${CVSROOT_DIRNAME}/first-dir + dotest info-5 "${testcvs} -q co first-dir" '' + cd first-dir + touch file1 + dotest info-6 "${testcvs} add file1" \ +"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition +'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to add this file permanently' + echo "cvs -s OTHER=not-this -s MYENV=env-" >>$HOME/.cvsrc + dotest info-6a "${testcvs} -q -s OTHER=value ci -m add-it" \ +'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v +done +Checking in file1; +/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 +initial revision: 1.1 +done +'"${PROG}"' [a-z]*: loginfo:1: no such user variable ${=ZEE}' + echo line1 >>file1 + dotest info-7 "${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it" \ +'Checking in file1; +/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 +new revision: 1.2; previous revision: 1.1 +done' + cd .. + if echo "yes" | ${testcvs} release -d first-dir >>${LOGFILE} ; then + pass info-8 + else + fail info-8 + fi + dotest info-9 "cat $TESTDIR/testlog" 'xenv-valueyz=[a-z@][a-z@]*=/tmp/cvs-sanity/cvsroot=' + + # I think this might be doable with cvs remove, or at least + # checking in a version with only comments, but I'm too lazy + # at the moment. Blow it away. + rm -f ${CVSROOT_DIRNAME}/CVSROOT/loginfo* + + rm -rf ${CVSROOT_DIRNAME}/first-dir + ;; *) echo $what is not the name of a test -- ignored ;; @@ -2327,9 +2598,9 @@ echo "OK, all tests completed." # gives an appropriate error (e.g. # Cannot access /tmp/cvs-sanity/non-existent/CVSROOT # No such file or directory). -# * Test "cvs watch add", "cvs watch remove", "cvs watchers", that -# notify script gets called where appropriate. -# * Test "cvs unedit" and that it really reverts a change. +# * Test ability to send notifications in response to watches. (currently +# hard to test because CVS doesn't send notifications if username is the +# same). # * Test that remote edit and/or unedit works when disconnected from # server (e.g. set CVS_SERVER to "foobar"). # End of TODO list. diff --git a/gnu/usr.bin/cvs/src/scramble.c b/gnu/usr.bin/cvs/src/scramble.c index 4bf92447366..b1a17a5f97f 100644 --- a/gnu/usr.bin/cvs/src/scramble.c +++ b/gnu/usr.bin/cvs/src/scramble.c @@ -49,7 +49,7 @@ * carriage-return are safely handled. */ -static char +static unsigned char shifts[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 114, 120, 53, 79, 96, 109, 72, 108, 70, 64, 76, 67, 116, 74, 68, 87, 111, 52, @@ -94,13 +94,13 @@ scramble (str) * scrambling this is (the first, obviously, since we only do one * kind of scrambling so far), and then the '\0' of course. */ - s = xmalloc (strlen (str) + 2); + s = (char *) xmalloc (strlen (str) + 2); s[0] = 'A'; /* Scramble (TM) version prefix. */ strcpy (s + 1, str); for (i = 1; s[i]; i++) - s[i] = shifts[(s[i])]; + s[i] = shifts[(unsigned char)(s[i])]; return s; } @@ -110,7 +110,8 @@ char * descramble (str) char *str; { - char *s, *ret; + char *s; + int i; /* For now we can only handle one kind of scrambling. In the future * there may be other kinds, and this `if' will become a `switch'. @@ -129,12 +130,12 @@ descramble (str) /* Method `A' is symmetrical, so scramble again to decrypt. */ s = scramble (str + 1); - /* Make sure the string we return can be free()'d! */ - ret = xmalloc (strlen (s)); - strcpy (ret, s + 1); /* scoot past the 'A' */ - free (s); + /* Shift the whole string one char to the left, pushing the unwanted + 'A' off the left end. Safe, because s is null-terminated. */ + for (i = 0; s[i]; i++) + s[i] = s[i + 1]; - return ret; + return s; } #endif /* (AUTH_CLIENT_SUPPORT || AUTH_SERVER_SUPPORT) from top of file */ diff --git a/gnu/usr.bin/cvs/src/status.c b/gnu/usr.bin/cvs/src/status.c index eb12fe9f7a4..6c8ec95d8ae 100644 --- a/gnu/usr.bin/cvs/src/status.c +++ b/gnu/usr.bin/cvs/src/status.c @@ -10,15 +10,8 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)status.c 1.56 94/10/07 $"; -USE(rcsid); -#endif - static Dtype status_dirproc PROTO((char *dir, char *repos, char *update_dir)); -static int status_fileproc PROTO((char *file, char *update_dir, - char *repository, List * entries, - List * srcfiles)); +static int status_fileproc PROTO((struct file_info *finfo)); static int tag_list_proc PROTO((Node * p, void *closure)); static int local = 0; @@ -107,20 +100,16 @@ status (argc, argv) */ /* ARGSUSED */ static int -status_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +status_fileproc (finfo) + struct file_info *finfo; { Ctype status; char *sstat; Vers_TS *vers; - status = Classify_File (file, (char *) NULL, (char *) NULL, (char *) NULL, - 1, 0, repository, entries, srcfiles, &vers, - update_dir, 0); + status = Classify_File (finfo->file, (char *) NULL, (char *) NULL, (char *) NULL, + 1, 0, finfo->repository, finfo->entries, finfo->srcfiles, &vers, + finfo->update_dir, 0); switch (status) { case T_UNKNOWN: @@ -165,12 +154,12 @@ status_fileproc (file, update_dir, repository, entries, srcfiles) (void) printf ("===================================================================\n"); if (vers->ts_user == NULL) - (void) printf ("File: no file %s\t\tStatus: %s\n\n", file, sstat); + (void) printf ("File: no file %s\t\tStatus: %s\n\n", finfo->file, sstat); else - (void) printf ("File: %-17s\tStatus: %s\n\n", file, sstat); + (void) printf ("File: %-17s\tStatus: %s\n\n", finfo->file, sstat); if (vers->vn_user == NULL) - (void) printf (" Working revision:\tNo entry for %s\n", file); + (void) printf (" Working revision:\tNo entry for %s\n", finfo->file); else if (vers->vn_user[0] == '0' && vers->vn_user[1] == '\0') (void) printf (" Working revision:\tNew file!\n"); #ifdef SERVER_SUPPORT @@ -204,14 +193,18 @@ status_fileproc (file, update_dir, repository, entries, srcfiles) (void) printf (" Sticky Tag:\t\t%s\n", edata->tag); else { - int isbranch = RCS_isbranch (file, edata->tag, srcfiles); + char *branch = NULL; + + if (RCS_isbranch (finfo->file, edata->tag, finfo->srcfiles)) + branch = RCS_whatbranch(finfo->file, edata->tag, finfo->srcfiles); (void) printf (" Sticky Tag:\t\t%s (%s: %s)\n", edata->tag, - isbranch ? "branch" : "revision", - isbranch ? - RCS_whatbranch(file, edata->tag, srcfiles) : - vers->vn_rcs); + branch ? "branch" : "revision", + branch ? branch : vers->vn_rcs); + + if (branch) + free (branch); } } } @@ -235,8 +228,8 @@ status_fileproc (file, update_dir, repository, entries, srcfiles) (void) printf ("\n Existing Tags:\n"); if (symbols) { - xfile = file; - xsrcfiles = srcfiles; + xfile = finfo->file; + xsrcfiles = finfo->srcfiles; (void) walklist (symbols, tag_list_proc, NULL); } else @@ -272,11 +265,17 @@ tag_list_proc (p, closure) Node *p; void *closure; { - int isbranch = RCS_isbranch (xfile, p->key, xsrcfiles); + char *branch = NULL; + + if (RCS_isbranch (xfile, p->key, xsrcfiles)) + branch = RCS_whatbranch(xfile, p->key, xsrcfiles) ; (void) printf ("\t%-25.25s\t(%s: %s)\n", p->key, - isbranch ? "branch" : "revision", - isbranch ? RCS_whatbranch(xfile, p->key, xsrcfiles) : - p->data); + branch ? "branch" : "revision", + branch ? branch : p->data); + + if (branch) + free (branch); + return (0); } diff --git a/gnu/usr.bin/cvs/src/subr.c b/gnu/usr.bin/cvs/src/subr.c index 228581c5b1e..77e0a926bba 100644 --- a/gnu/usr.bin/cvs/src/subr.c +++ b/gnu/usr.bin/cvs/src/subr.c @@ -10,11 +10,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)subr.c 1.64 94/10/07 $"; -USE(rcsid); -#endif - extern char *getlogin (); /* @@ -300,7 +295,8 @@ gca (rev1, rev2) /* * Sanity checks and any required fix-up on message passed to RCS via '-m'. * RCS 5.7 requires that a non-total-whitespace, non-null message be provided - * with '-m'. + * with '-m'. Returns the original argument or a pointer to readonly + * static storage. */ char * make_message_rcslegal (message) diff --git a/gnu/usr.bin/cvs/src/tag.c b/gnu/usr.bin/cvs/src/tag.c index 21da5f4d733..69e78423287 100644 --- a/gnu/usr.bin/cvs/src/tag.c +++ b/gnu/usr.bin/cvs/src/tag.c @@ -12,16 +12,9 @@ */ #include "cvs.h" -#include "save-cwd.h" +#include "savecwd.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)tag.c 1.60 94/09/30 $"; -USE(rcsid); -#endif - -static int check_fileproc PROTO((char *file, char *update_dir, - char *repository, List * entries, - List * srcfiles)); +static int check_fileproc PROTO((struct file_info *finfo)); static int check_filesdoneproc PROTO((int err, char *repos, char *update_dir)); static int pretag_proc PROTO((char *repository, char *filter)); static void masterlist_delproc PROTO((Node *p)); @@ -29,14 +22,12 @@ static void tag_delproc PROTO((Node *p)); static int pretag_list_proc PROTO((Node *p, void *closure)); static Dtype tag_dirproc PROTO((char *dir, char *repos, char *update_dir)); -static int tag_fileproc PROTO((char *file, char *update_dir, - char *repository, List * entries, - List * srcfiles)); +static int tag_fileproc PROTO((struct file_info *finfo)); static char *numtag; static char *date = NULL; static char *symtag; -static int delete; /* adding a tag by default */ +static int delete_flag; /* adding a tag by default */ static int branch_mode; /* make an automagic "branch" tag */ static int local; /* recursive by default */ static int force_tag_match = 1; /* force tag to match by default */ @@ -105,7 +96,7 @@ tag (argc, argv) local = 0; break; case 'd': - delete = 1; + delete_flag = 1; break; case 'r': numtag = optarg; @@ -141,7 +132,7 @@ tag (argc, argv) if (date && numtag) error (1, 0, "-r and -D options are mutually exclusive"); - if (delete && branch_mode) + if (delete_flag && branch_mode) error (0, 0, "warning: -b ignored with -d options"); RCS_check_tag (symtag); @@ -155,7 +146,7 @@ tag (argc, argv) if (local) send_arg("-l"); - if (delete) + if (delete_flag) send_arg("-d"); if (branch_mode) send_arg("-b"); @@ -208,21 +199,17 @@ tag (argc, argv) /* All we do here is add it to our list */ static int -check_fileproc(file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List * entries; - List * srcfiles; +check_fileproc (finfo) + struct file_info *finfo; { char *xdir; Node *p; Vers_TS *vers; - if (update_dir[0] == '\0') + if (finfo->update_dir[0] == '\0') xdir = "."; else - xdir = update_dir; + xdir = finfo->update_dir; if ((p = findnode (mtlist, xdir)) != NULL) { tlist = ((struct master_lists *) p->data)->tlist; @@ -244,11 +231,11 @@ check_fileproc(file, update_dir, repository, entries, srcfiles) } /* do tlist */ p = getnode (); - p->key = xstrdup (file); + p->key = xstrdup (finfo->file); p->type = UPDATE; p->delproc = tag_delproc; - vers = Version_TS (repository, (char *) NULL, (char *) NULL, (char *) NULL, - file, 0, 0, entries, srcfiles); + vers = Version_TS (finfo->repository, (char *) NULL, (char *) NULL, (char *) NULL, + finfo->file, 0, 0, finfo->entries, finfo->srcfiles); p->data = RCS_getversion(vers->srcfile, numtag, date, force_tag_match, 0); if (p->data != NULL) { @@ -258,7 +245,7 @@ check_fileproc(file, update_dir, repository, entries, srcfiles) oversion = RCS_getversion (vers->srcfile, symtag, (char *) NULL, 1, 0); if (oversion == NULL) { - if (delete) + if (delete_flag) { addit = 0; } @@ -345,7 +332,7 @@ pretag_proc(repository, filter) run_setup("%s %s %s %s", filter, symtag, - delete ? "del" : force_tag_move ? "mov" : "add", + delete_flag ? "del" : force_tag_move ? "mov" : "add", repository); walklist(tlist, pretag_list_proc, NULL); return (run_exec(RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL|RUN_REALLY)); @@ -395,12 +382,8 @@ pretag_list_proc(p, closure) */ /* ARGSUSED */ static int -tag_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +tag_fileproc (finfo) + struct file_info *finfo; { char *version, *oversion; char *nversion = NULL; @@ -408,8 +391,8 @@ tag_fileproc (file, update_dir, repository, entries, srcfiles) Vers_TS *vers; int retcode = 0; - vers = Version_TS (repository, (char *) NULL, (char *) NULL, (char *) NULL, - file, 0, 0, entries, srcfiles); + vers = Version_TS (finfo->repository, (char *) NULL, (char *) NULL, (char *) NULL, + finfo->file, 0, 0, finfo->entries, finfo->srcfiles); if ((numtag != NULL) || (date != NULL)) { @@ -423,12 +406,12 @@ tag_fileproc (file, update_dir, repository, entries, srcfiles) return (0); } } - if (delete) + if (delete_flag) { /* * If -d is specified, "force_tag_match" is set, so that this call to - * Version_Number() will return a NULL version string if the symbolic + * RCS_getversion() will return a NULL version string if the symbolic * tag does not exist in the RCS file. * * This is done here because it's MUCH faster than just blindly calling @@ -456,10 +439,10 @@ tag_fileproc (file, update_dir, repository, entries, srcfiles) /* warm fuzzies */ if (!really_quiet) { - if (update_dir[0]) - (void) printf ("D %s/%s\n", update_dir, file); + if (finfo->update_dir[0]) + (void) printf ("D %s/%s\n", finfo->update_dir, finfo->file); else - (void) printf ("D %s\n", file); + (void) printf ("D %s\n", finfo->file); } freevers_ts (&vers); @@ -486,29 +469,29 @@ tag_fileproc (file, update_dir, repository, entries, srcfiles) else if (strcmp (version, "0") == 0) { if (!quiet) - error (0, 0, "couldn't tag added but un-commited file `%s'", file); + error (0, 0, "couldn't tag added but un-commited file `%s'", finfo->file); freevers_ts (&vers); return (0); } else if (version[0] == '-') { if (!quiet) - error (0, 0, "skipping removed but un-commited file `%s'", file); + error (0, 0, "skipping removed but un-commited file `%s'", finfo->file); freevers_ts (&vers); return (0); } else if (vers->srcfile == NULL) { if (!quiet) - error (0, 0, "cannot find revision control file for `%s'", file); + error (0, 0, "cannot find revision control file for `%s'", finfo->file); freevers_ts (&vers); return (0); } /* * As an enhancement for the case where a tag is being re-applied to a - * large number of files, make one extra call to Version_Number to see if - * the tag is already set in the RCS file. If so, check to see if it + * large number of files, make one extra call to RCS_getversion to see + * if the tag is already set in the RCS file. If so, check to see if it * needs to be moved. If not, do nothing. This will likely save a lot of * time when simply moving the tag to the "current" head revisions of a * module -- which I have found to be a typical tagging operation. @@ -517,7 +500,7 @@ tag_fileproc (file, update_dir, repository, entries, srcfiles) oversion = RCS_getversion (vers->srcfile, symtag, (char *) NULL, 1, 0); if (oversion != NULL) { - int isbranch = RCS_isbranch (file, symtag, srcfiles); + int isbranch = RCS_isbranch (finfo->file, symtag, finfo->srcfiles); /* * if versions the same and neither old or new are branches don't have @@ -531,10 +514,10 @@ tag_fileproc (file, update_dir, repository, entries, srcfiles) } if (!force_tag_move) { /* we're NOT going to move the tag */ - if (update_dir[0]) - (void) printf ("W %s/%s", update_dir, file); + if (finfo->update_dir[0]) + (void) printf ("W %s/%s", finfo->update_dir, finfo->file); else - (void) printf ("W %s", file); + (void) printf ("W %s", finfo->file); (void) printf (" : %s already exists on %s %s", symtag, isbranch ? "branch" : "version", oversion); @@ -559,17 +542,17 @@ tag_fileproc (file, update_dir, repository, entries, srcfiles) /* more warm fuzzies */ if (!really_quiet) { - if (update_dir[0]) - (void) printf ("T %s/%s\n", update_dir, file); + if (finfo->update_dir[0]) + (void) printf ("T %s/%s\n", finfo->update_dir, finfo->file); else - (void) printf ("T %s\n", file); + (void) printf ("T %s\n", finfo->file); } - freevers_ts (&vers); if (nversion != NULL) { free(nversion); } + freevers_ts (&vers); return (0); } @@ -584,7 +567,7 @@ tag_dirproc (dir, repos, update_dir) char *update_dir; { if (!quiet) - error (0, 0, "%s %s", delete ? "Untagging" : "Tagging", update_dir); + error (0, 0, "%s %s", delete_flag ? "Untagging" : "Tagging", update_dir); return (R_PROCESS); } @@ -605,30 +588,30 @@ struct val_args { a void * where we can stash it. */ static struct val_args *val_args_static; -static int val_fileproc PROTO ((char *, char *, char *, List *, List *)); +static int val_fileproc PROTO ((struct file_info *finfo)); static int -val_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +val_fileproc (finfo) + struct file_info *finfo; { RCSNode *rcsdata; Node *node; struct val_args *args = val_args_static; + char *tag; - node = findnode (srcfiles, file); + node = findnode (finfo->srcfiles, finfo->file); if (node == NULL) /* Not sure this can happen, after all we passed only W_REPOS | W_ATTIC. */ return 0; rcsdata = (RCSNode *) node->data; - if (RCS_gettag (rcsdata, args->name, 1, 0) != NULL) + + tag = RCS_gettag (rcsdata, args->name, 1, 0); + if (tag != NULL) { /* FIXME: should find out a way to stop the search at this point. */ args->found = 1; + free (tag); } return 0; } diff --git a/gnu/usr.bin/cvs/src/update.c b/gnu/usr.bin/cvs/src/update.c index cae9cb32690..32c4c8c2fec 100644 --- a/gnu/usr.bin/cvs/src/update.c +++ b/gnu/usr.bin/cvs/src/update.c @@ -41,11 +41,6 @@ #include "fileattr.h" #include "edit.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)update.c 1.95 94/10/22 $"; -USE(rcsid); -#endif - static int checkout_file PROTO((char *file, char *repository, List *entries, List *srcfiles, Vers_TS *vers_ts, char *update_dir)); #ifdef SERVER_SUPPORT @@ -61,8 +56,7 @@ static int scratch_file PROTO((char *file, char *repository, List * entries, char *update_dir)); static Dtype update_dirent_proc PROTO((char *dir, char *repository, char *update_dir)); static int update_dirleave_proc PROTO((char *dir, int err, char *update_dir)); -static int update_file_proc PROTO((char *file, char *update_dir, char *repository, - List * entries, List * srcfiles)); +static int update_fileproc PROTO ((struct file_info *)); static int update_filesdone_proc PROTO((int err, char *repository, char *update_dir)); static int write_letter PROTO((char *file, int letter, char *update_dir)); @@ -407,7 +401,7 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag, date_rev2 = (char *) NULL; /* call the recursion processor */ - err = start_recursion (update_file_proc, update_filesdone_proc, + err = start_recursion (update_fileproc, update_filesdone_proc, update_dirent_proc, update_dirleave_proc, argc, argv, local, which, aflag, 1, preload_update_dir, 1, 0); @@ -437,20 +431,16 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag, * appropriate magic for checkout */ static int -update_file_proc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +update_fileproc (finfo) + struct file_info *finfo; { int retval; Ctype status; Vers_TS *vers; - status = Classify_File (file, tag, date, options, force_tag_match, - aflag, repository, entries, srcfiles, &vers, - update_dir, pipeout); + status = Classify_File (finfo->file, tag, date, options, force_tag_match, + aflag, finfo->repository, finfo->entries, finfo->srcfiles, &vers, + finfo->update_dir, pipeout); if (pipeout) { /* @@ -479,13 +469,13 @@ update_file_proc (file, update_dir, repository, entries, srcfiles) #ifdef SERVER_SUPPORT case T_PATCH: /* needs patch */ #endif - retval = checkout_file (file, repository, entries, srcfiles, - vers, update_dir); + retval = checkout_file (finfo->file, finfo->repository, finfo->entries, finfo->srcfiles, + vers, finfo->update_dir); break; default: /* can't ever happen :-) */ error (0, 0, - "unknown file status %d for file %s", status, file); + "unknown file status %d for file %s", status, finfo->file); retval = 0; break; } @@ -501,24 +491,24 @@ update_file_proc (file, update_dir, repository, entries, srcfiles) break; case T_CONFLICT: /* old punt-type errors */ retval = 1; - (void) write_letter (file, 'C', update_dir); + (void) write_letter (finfo->file, 'C', finfo->update_dir); break; case T_NEEDS_MERGE: /* needs merging */ if (noexec) { retval = 1; - (void) write_letter (file, 'C', update_dir); + (void) write_letter (finfo->file, 'C', finfo->update_dir); } else { - if (wrap_merge_is_copy (file)) + if (wrap_merge_is_copy (finfo->file)) /* Should we be warning the user that we are * overwriting the user's copy of the file? */ - retval = checkout_file (file, repository, entries, - srcfiles, vers, update_dir); + retval = checkout_file (finfo->file, finfo->repository, finfo->entries, + finfo->srcfiles, vers, finfo->update_dir); else - retval = merge_file (file, repository, entries, - vers, update_dir); + retval = merge_file (finfo->file, finfo->repository, finfo->entries, + vers, finfo->update_dir); } break; case T_MODIFIED: /* locally modified */ @@ -536,12 +526,12 @@ update_file_proc (file, update_dir, repository, entries, srcfiles) if (server_active) retcode = vers->ts_conflict[0] != '='; else { - filestamp = time_stamp (file); + filestamp = time_stamp (finfo->file); retcode = strcmp (vers->ts_conflict, filestamp); free (filestamp); } #else - filestamp = time_stamp (file); + filestamp = time_stamp (finfo->file); retcode = strcmp (vers->ts_conflict, filestamp); free (filestamp); #endif @@ -554,36 +544,36 @@ update_file_proc (file, update_dir, repository, entries, srcfiles) */ run_setup ("%s", GREP); run_arg (RCS_MERGE_PAT); - run_arg (file); + run_arg (finfo->file); retcode = run_exec (RUN_TTY, DEVNULL, RUN_TTY,RUN_NORMAL); if (retcode == -1) { - if (update_dir[0] == '\0') + if (finfo->update_dir[0] == '\0') error (1, errno, "fork failed while examining conflict in `%s'", - file); + finfo->file); else error (1, errno, "fork failed while examining conflict in `%s/%s'", - update_dir, file); + finfo->update_dir, finfo->file); } } if (!retcode) { - (void) write_letter (file, 'C', update_dir); + (void) write_letter (finfo->file, 'C', finfo->update_dir); retval = 1; } else { /* Reregister to clear conflict flag. */ - Register (entries, file, vers->vn_rcs, vers->ts_rcs, + Register (finfo->entries, finfo->file, vers->vn_rcs, vers->ts_rcs, vers->options, vers->tag, vers->date, (char *)0); } } if (!retval) - retval = write_letter (file, 'M', update_dir); + retval = write_letter (finfo->file, 'M', finfo->update_dir); break; #ifdef SERVER_SUPPORT case T_PATCH: /* needs patch */ @@ -593,13 +583,13 @@ update_file_proc (file, update_dir, repository, entries, srcfiles) struct stat file_info; unsigned char checksum[16]; - retval = patch_file (file, repository, entries, srcfiles, - vers, update_dir, &docheckout, + retval = patch_file (finfo->file, finfo->repository, finfo->entries, finfo->srcfiles, + vers, finfo->update_dir, &docheckout, &file_info, checksum); if (! docheckout) { if (server_active && retval == 0) - server_updated (file, update_dir, repository, + server_updated (finfo->file, finfo->update_dir, finfo->repository, SERVER_PATCHED, &file_info, checksum); break; @@ -612,33 +602,33 @@ update_file_proc (file, update_dir, repository, entries, srcfiles) /* Fall through. */ #endif case T_CHECKOUT: /* needs checkout */ - retval = checkout_file (file, repository, entries, srcfiles, - vers, update_dir); + retval = checkout_file (finfo->file, finfo->repository, finfo->entries, finfo->srcfiles, + vers, finfo->update_dir); #ifdef SERVER_SUPPORT if (server_active && retval == 0) - server_updated (file, update_dir, repository, + server_updated (finfo->file, finfo->update_dir, finfo->repository, SERVER_UPDATED, (struct stat *) NULL, (unsigned char *) NULL); #endif break; case T_ADDED: /* added but not committed */ - retval = write_letter (file, 'A', update_dir); + retval = write_letter (finfo->file, 'A', finfo->update_dir); break; case T_REMOVED: /* removed but not committed */ - retval = write_letter (file, 'R', update_dir); + retval = write_letter (finfo->file, 'R', finfo->update_dir); break; case T_REMOVE_ENTRY: /* needs to be un-registered */ - retval = scratch_file (file, repository, entries, update_dir); + retval = scratch_file (finfo->file, finfo->repository, finfo->entries, finfo->update_dir); #ifdef SERVER_SUPPORT if (server_active && retval == 0) - server_updated (file, update_dir, repository, + server_updated (finfo->file, finfo->update_dir, finfo->repository, SERVER_UPDATED, (struct stat *) NULL, (unsigned char *) NULL); #endif break; default: /* can't ever happen :-) */ error (0, 0, - "unknown file status %d for file %s", status, file); + "unknown file status %d for file %s", status, finfo->file); retval = 0; break; } @@ -647,9 +637,9 @@ update_file_proc (file, update_dir, repository, entries, srcfiles) /* only try to join if things have gone well thus far */ if (retval == 0 && join_rev1) #ifdef SERVER_SUPPORT - join_file (file, srcfiles, vers, update_dir, entries, repository); + join_file (finfo->file, finfo->srcfiles, vers, finfo->update_dir, finfo->entries, finfo->repository); #else - join_file (file, srcfiles, vers, update_dir, entries); + join_file (finfo->file, finfo->srcfiles, vers, finfo->update_dir, finfo->entries); #endif /* if this directory has an ignore list, add this file to it */ @@ -659,7 +649,7 @@ update_file_proc (file, update_dir, repository, entries, srcfiles) p = getnode (); p->type = FILES; - p->key = xstrdup (file); + p->key = xstrdup (finfo->file); if (addnode (ignlist, p) != 0) freenode (p); } @@ -695,11 +685,12 @@ update_filesdone_proc (err, repository, update_dir) /* Clean up CVS admin dirs if we are export */ if (strcmp (command_name, "export") == 0) { - run_setup ("%s -fr", RM); - run_arg (CVSADM); - (void) run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); + /* I'm not sure the existence_error is actually possible (except + in cases where we really should print a message), but since + this code used to ignore all errors, I'll play it safe. */ + if (unlink_file_dir (CVSADM) < 0 && !existence_error (errno)) + error (0, errno, "cannot remove %s directory", CVSADM); } -#ifdef CVSADM_ROOT #ifdef SERVER_SUPPORT else if (!server_active && !pipeout) #else @@ -710,7 +701,6 @@ update_filesdone_proc (err, repository, update_dir) if (!isfile (CVSADM_ROOT)) Create_Root( (char *) NULL, CVSroot ); } -#endif /* CVSADM_ROOT */ return (err); } @@ -756,6 +746,28 @@ update_dirent_proc (dir, repository, update_dir) Create_Admin (dir, update_dir, repository, tag, date); } } + else + { + char *cvsadmdir; + + /* The directory exists. Check to see if it has a CVS + subdirectory. */ + + cvsadmdir = xmalloc (strlen (dir) + 80); + strcpy (cvsadmdir, dir); + strcat (cvsadmdir, "/"); + strcat (cvsadmdir, CVSADM); + + if (!isdir (cvsadmdir)) + { + /* We cannot successfully recurse into a directory without a CVS + subdirectory. Generally we will have already printed + "? foo". */ + free (cvsadmdir); + return R_SKIP_ALL; + } + free (cvsadmdir); + } /* * If we are building dirs and not going to stdout, we make sure there is @@ -839,9 +851,11 @@ update_dirleave_proc (dir, err, update_dir) (void) chdir (".."); if (update_prune_dirs && isemptydir (dir)) { - run_setup ("%s -fr", RM); - run_arg (dir); - (void) run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); + /* I'm not sure the existence_error is actually possible (except + in cases where we really should print a message), but since + this code used to ignore all errors, I'll play it safe. */ + if (unlink_file_dir (dir) < 0 && !existence_error (errno)) + error (0, errno, "cannot remove %s directory", dir); } return (err); @@ -907,9 +921,8 @@ checkout_file (file, repository, entries, srcfiles, vers_ts, update_dir) char backup[PATH_MAX]; int set_time, retval = 0; int retcode = 0; -#ifdef DEATH_SUPPORT + int status; int file_is_dead; -#endif /* don't screw with backup files if we're going to stdout */ if (!pipeout) @@ -921,53 +934,39 @@ checkout_file (file, repository, entries, srcfiles, vers_ts, update_dir) (void) unlink_file (backup); } -#ifdef DEATH_SUPPORT file_is_dead = RCS_isdead (vers_ts->srcfile, vers_ts->vn_rcs); - if (!file_is_dead) { -#endif - - run_setup ("%s%s -q -r%s %s", Rcsbin, RCS_CO, vers_ts->vn_tag, - vers_ts->options); - - /* - * if we are checking out to stdout, print a nice message to stderr, and - * add the -p flag to the command - */ - if (pipeout) + if (!file_is_dead) { - run_arg ("-p"); - if (!quiet) + /* + * if we are checking out to stdout, print a nice message to + * stderr, and add the -p flag to the command */ + if (pipeout) { - (void) fprintf (stderr, "===================================================================\n"); - if (update_dir[0]) - (void) fprintf (stderr, "Checking out %s/%s\n", - update_dir, file); - else - (void) fprintf (stderr, "Checking out %s\n", file); - (void) fprintf (stderr, "RCS: %s\n", vers_ts->srcfile->path); - (void) fprintf (stderr, "VERS: %s\n", vers_ts->vn_rcs); - (void) fprintf (stderr, "***************\n"); + if (!quiet) + { + (void) fprintf (stderr, "\ +===================================================================\n"); + if (update_dir[0]) + (void) fprintf (stderr, "Checking out %s/%s\n", + update_dir, file); + else + (void) fprintf (stderr, "Checking out %s\n", file); + (void) fprintf (stderr, "RCS: %s\n", vers_ts->srcfile->path); + (void) fprintf (stderr, "VERS: %s\n", vers_ts->vn_rcs); + (void) fprintf (stderr, "***************\n"); + } } - } - - /* tack on the rcs and maybe the user file */ - run_arg (vers_ts->srcfile->path); - if (!pipeout) - run_arg (file); -#ifdef DEATH_SUPPORT + status = RCS_checkout (vers_ts->srcfile->path, + pipeout ? NULL : file, vers_ts->vn_tag, + vers_ts->options, RUN_TTY, 0, 0); } - if (file_is_dead || (retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, -#else - if ((retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, -#endif - (pipeout ? (RUN_NORMAL|RUN_REALLY) : RUN_NORMAL))) == 0) + if (file_is_dead || status == 0) { if (!pipeout) { Vers_TS *xvers_ts; -#ifdef DEATH_SUPPORT int resurrecting; resurrecting = 0; @@ -982,14 +981,15 @@ checkout_file (file, repository, entries, srcfiles, vers_ts, update_dir) { /* when joining, we need to get dead files checked out. Try harder. */ - run_setup ("%s%s -q -r%s %s", Rcsbin, RCS_CO, - vers_ts->vn_rcs, - vers_ts->options); - - run_arg ("-f"); - run_arg (vers_ts->srcfile->path); - run_arg (file); - retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); + /* I think that RCS_FLAGS_FORCE is here only because + passing -f to co used to enable checking out + a dead revision in the old version of death + support which used a hacked RCS instead of using + the RCS state. */ + retcode = RCS_checkout (vers_ts->srcfile->path, file, + vers_ts->vn_rcs, + vers_ts->options, RUN_TTY, + RCS_FLAGS_FORCE, 0); if (retcode != 0) { error (retcode == -1 ? 1 : 0, @@ -1009,12 +1009,9 @@ checkout_file (file, repository, entries, srcfiles, vers_ts, update_dir) return 0; } } -#endif /* DEATH_SUPPORT */ if (cvswrite == TRUE -#ifdef DEATH_SUPPORT && !file_is_dead -#endif && !fileattr_get (file, "_watched")) xchmod (file, 1); @@ -1066,7 +1063,6 @@ checkout_file (file, repository, entries, srcfiles, vers_ts, update_dir) (void) time (&last_register_time); -#ifdef DEATH_SUPPORT if (file_is_dead) { if (xvers_ts->vn_user != NULL) @@ -1096,11 +1092,6 @@ checkout_file (file, repository, entries, srcfiles, vers_ts, update_dir) xvers_ts->ts_user, xvers_ts->options, xvers_ts->tag, xvers_ts->date, (char *)0); /* Clear conflict flag on fresh checkout */ -#else /* No DEATH_SUPPORT */ - Register (entries, file, xvers_ts->vn_rcs, xvers_ts->ts_user, - xvers_ts->options, xvers_ts->tag, xvers_ts->date, - (char *)0); /* Clear conflict flag on fresh checkout */ -#endif /* No DEATH_SUPPORT */ /* fix up the vers structure, in case it is used by join */ if (join_rev1) @@ -1120,16 +1111,9 @@ checkout_file (file, repository, entries, srcfiles, vers_ts, update_dir) freevers_ts (&xvers_ts); -#ifdef DEATH_SUPPORT if (!really_quiet && !file_is_dead) -#else - if (!really_quiet) -#endif { - if (update_dir[0]) - (void) printf ("U %s/%s\n", update_dir, file); - else - (void) printf ("U %s\n", file); + write_letter (file, 'U', update_dir); } } } @@ -1200,9 +1184,13 @@ patch_file (file, repository, entries, srcfiles, vers_ts, update_dir, /* We need to check out both revisions first, to see if either one has a trailing newline. Because of this, we don't use rcsdiff, but just use diff. */ - run_setup ("%s%s -q -p -r%s %s %s", Rcsbin, RCS_CO, vers_ts->vn_user, - vers_ts->options, vers_ts->srcfile->path); - if (run_exec (RUN_TTY, file1, RUN_TTY, RUN_NORMAL) != 0) + if (noexec) + retcode = 0; + else + retcode = RCS_checkout (vers_ts->srcfile->path, NULL, + vers_ts->vn_user, + vers_ts->options, file1, 0, 0); + if (retcode != 0) fail = 1; else { @@ -1226,9 +1214,10 @@ patch_file (file, repository, entries, srcfiles, vers_ts, update_dir, can get the right modes into *FILE_INFO. We can't check it out directly into file2 because co doesn't understand how to do that. */ - run_setup ("%s%s -q -r%s %s %s %s", Rcsbin, RCS_CO, vers_ts->vn_rcs, - vers_ts->options, vers_ts->srcfile->path, file); - if (run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL) != 0) + retcode = RCS_checkout (vers_ts->srcfile->path, file, + vers_ts->vn_rcs, + vers_ts->options, RUN_TTY, 0, 0); + if (retcode != 0) fail = 1; else { @@ -1276,6 +1265,7 @@ patch_file (file, repository, entries, srcfiles, vers_ts, update_dir, } } + retcode = 0; if (! fail) { /* FIXME: This whole thing with diff/patch is rather more @@ -1344,10 +1334,7 @@ patch_file (file, repository, entries, srcfiles, vers_ts, update_dir, if (!really_quiet) { - if (update_dir[0]) - (void) printf ("P %s/%s\n", update_dir, file); - else - (void) printf ("P %s\n", file); + write_letter (file, 'P', update_dir); } } else @@ -1385,10 +1372,17 @@ write_letter (file, letter, update_dir) { if (!really_quiet) { + char buf[2]; + buf[0] = letter; + buf[1] = ' '; + cvs_output (buf, 2); if (update_dir[0]) - (void) printf ("%c %s/%s\n", letter, update_dir, file); - else - (void) printf ("%c %s\n", letter, file); + { + cvs_output (update_dir, 0); + cvs_output ("/", 1); + } + cvs_output (file, 0); + cvs_output ("\n", 1); } return (0); } @@ -1485,8 +1479,7 @@ merge_file (file, repository, entries, vers, update_dir) if (!noexec) error (0, 0, "conflicts found in %s", user); - if (!really_quiet) - (void) printf ("C %s\n", user); + write_letter (file, 'C', update_dir); history_write ('C', update_dir, vers->vn_rcs, file, repository); @@ -1497,8 +1490,7 @@ merge_file (file, repository, entries, vers, update_dir) } else { - if (!really_quiet) - (void) printf ("M %s\n", user); + write_letter (file, 'M', update_dir); history_write ('G', update_dir, vers->vn_rcs, file, repository); } return (0); @@ -1772,9 +1764,8 @@ join_file (file, srcfiles, vers, update_dir, entries) { int retcode; /* The file is up to date. Need to check out the current contents. */ - run_setup ("%s%s -q -r%s", Rcsbin, RCS_CO, vers->vn_user); - run_arg (vers->srcfile->path); - retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); + retcode = RCS_checkout (vers->srcfile->path, "", vers->vn_user, NULL, + RUN_TTY, 0, 0); if (retcode != 0) error (1, retcode == -1 ? errno : 0, "failed to check out %s file", file); diff --git a/gnu/usr.bin/cvs/src/vers_ts.c b/gnu/usr.bin/cvs/src/vers_ts.c index ebb7ca8d305..650a4e63677 100644 --- a/gnu/usr.bin/cvs/src/vers_ts.c +++ b/gnu/usr.bin/cvs/src/vers_ts.c @@ -8,11 +8,6 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)vers_ts.c 1.45 94/10/07 $"; -USE(rcsid); -#endif - #ifdef SERVER_SUPPORT static void time_stamp_server PROTO((char *, Vers_TS *)); #endif @@ -138,39 +133,29 @@ Version_TS (repository, options, tag, date, user, force_tag_match, /* squirrel away the rcsdata pointer for others */ vers_ts->srcfile = rcsdata; -#ifndef DEATH_SUPPORT - /* (is this indeed death support? I haven't looked carefully). */ - /* get RCS version number into vn_rcs (if appropriate) */ - if (((vers_ts->tag || vers_ts->date) && force_tag_match) || - ((rcsdata->flags & VALID) && (rcsdata->flags & INATTIC) == 0)) + if (vers_ts->tag && strcmp (vers_ts->tag, TAG_BASE) == 0) { -#endif - if (vers_ts->tag && strcmp (vers_ts->tag, TAG_BASE) == 0) - { - vers_ts->vn_rcs = xstrdup (vers_ts->vn_user); - vers_ts->vn_tag = xstrdup (vers_ts->vn_user); - } + vers_ts->vn_rcs = xstrdup (vers_ts->vn_user); + vers_ts->vn_tag = xstrdup (vers_ts->vn_user); + } + else + { + vers_ts->vn_rcs = RCS_getversion (rcsdata, vers_ts->tag, + vers_ts->date, force_tag_match, 1); + if (vers_ts->vn_rcs == NULL) + vers_ts->vn_tag = NULL; else { - vers_ts->vn_rcs = RCS_getversion (rcsdata, vers_ts->tag, - vers_ts->date, force_tag_match, 1); - if (vers_ts->vn_rcs == NULL) - vers_ts->vn_tag = NULL; - else + char *colon = strchr (vers_ts->vn_rcs, ':'); + if (colon) { - char *colon = strchr (vers_ts->vn_rcs, ':'); - if (colon) - { - vers_ts->vn_tag = xstrdup (colon+1); - *colon = '\0'; - } - else - vers_ts->vn_tag = xstrdup (vers_ts->vn_rcs); + vers_ts->vn_tag = xstrdup (colon+1); + *colon = '\0'; } + else + vers_ts->vn_tag = xstrdup (vers_ts->vn_rcs); } -#ifndef DEATH_SUPPORT - } -#endif + } /* * If the source control file exists and has the requested revision, diff --git a/gnu/usr.bin/cvs/src/version.c b/gnu/usr.bin/cvs/src/version.c index e2ddd0fa331..89b7dd53225 100644 --- a/gnu/usr.bin/cvs/src/version.c +++ b/gnu/usr.bin/cvs/src/version.c @@ -12,12 +12,7 @@ #include "cvs.h" -#ifndef lint -static const char rcsid[] = "$CVSid: @(#)version.c 1.15 94/10/03 $"; -USE(rcsid); -#endif - -char *version_string = "\nConcurrent Versions System (CVS) 1.7.1"; +char *version_string = "\nConcurrent Versions System (CVS) 1.7.2"; #ifdef CLIENT_SUPPORT #ifdef SERVER_SUPPORT diff --git a/gnu/usr.bin/cvs/src/watch.c b/gnu/usr.bin/cvs/src/watch.c index b84926fb429..b5e3ed87d94 100644 --- a/gnu/usr.bin/cvs/src/watch.c +++ b/gnu/usr.bin/cvs/src/watch.c @@ -211,19 +211,17 @@ watch_modify_watchers (file, what) free (curattr); if (mycurattr != NULL) free (mycurattr); + if (mynewattr != NULL) + free (mynewattr); } -static int addremove_fileproc PROTO ((char *, char *, char *, List *, List *)); +static int addremove_fileproc PROTO ((struct file_info *finfo)); static int -addremove_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +addremove_fileproc (finfo) + struct file_info *finfo; { - watch_modify_watchers (file, &the_args); + watch_modify_watchers (finfo->file, &the_args); return 0; } @@ -381,7 +379,7 @@ watch (argc, argv) int argc; char **argv; { - if (argc == -1) + if (argc <= 1) usage (watch_usage); if (strcmp (argv[1], "on") == 0) { @@ -418,27 +416,23 @@ static const char *const watchers_usage[] = NULL }; -static int watchers_fileproc PROTO ((char *, char *, char *, List *, List *)); +static int watchers_fileproc PROTO ((struct file_info *finfo)); static int -watchers_fileproc (file, update_dir, repository, entries, srcfiles) - char *file; - char *update_dir; - char *repository; - List *entries; - List *srcfiles; +watchers_fileproc (finfo) + struct file_info *finfo; { char *them; char *p; - them = fileattr_get0 (file, "_watchers"); + them = fileattr_get0 (finfo->file, "_watchers"); if (them == NULL) return 0; - if (update_dir[0] == '\0') - printf ("%s", file); + if (finfo->update_dir[0] == '\0') + printf ("%s", finfo->file); else - printf ("%s/%s", update_dir, file); + printf ("%s/%s", finfo->update_dir, finfo->file); p = them; while (1) diff --git a/gnu/usr.bin/cvs/src/wrapper.c b/gnu/usr.bin/cvs/src/wrapper.c index ec5f43e8dcf..8a6ff9471e4 100644 --- a/gnu/usr.bin/cvs/src/wrapper.c +++ b/gnu/usr.bin/cvs/src/wrapper.c @@ -217,26 +217,29 @@ wrap_add (line, isTemp) case 'f': if(e.fromcvsFilter) free(e.fromcvsFilter); - e.fromcvsFilter=expand_path (temp); + /* FIXME: error message should say where the bad value + came from. */ + e.fromcvsFilter=expand_path (temp, "<wrapper>", 0); if (!e.fromcvsFilter) - error (1, 0, - "Invalid environmental variable string '%s'",temp); + error (1, 0, "Correct above errors first"); break; case 't': if(e.tocvsFilter) free(e.tocvsFilter); - e.tocvsFilter=expand_path (temp); + /* FIXME: error message should say where the bad value + came from. */ + e.tocvsFilter=expand_path (temp, "<wrapper>", 0); if (!e.tocvsFilter) - error (1, 0, - "Invalid environmental variable string '%s'",temp); + error (1, 0, "Correct above errors first"); break; case 'c': if(e.conflictHook) free(e.conflictHook); - e.conflictHook=expand_path (temp); + /* FIXME: error message should say where the bad value + came from. */ + e.conflictHook=expand_path (temp, "<wrapper>", 0); if (!e.conflictHook) - error (1, 0, - "Invalid environmental variable string '%s'",temp); + error (1, 0, "Correct above errors first"); break; case 'm': if(*temp=='C' || *temp=='c') |