diff options
author | peter <peter@FreeBSD.org> | 2002-12-02 03:13:37 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-12-02 03:13:37 +0000 |
commit | 3dc96f7243ece1d1f7f87b03334f840415e0db63 (patch) | |
tree | 15f00bd8ebd718713d8c0a8707ebebfced99c550 /contrib/cvs/src | |
parent | cf46dfb750863d760d19b9858b0a336b158275da (diff) | |
download | FreeBSD-src-3dc96f7243ece1d1f7f87b03334f840415e0db63.zip FreeBSD-src-3dc96f7243ece1d1f7f87b03334f840415e0db63.tar.gz |
Import cvs-1.11.2.1 as of 2002/12/01 onto vendor branch. This fixes all
of the bugs that I know of. We've been running a slightly older version
of this on freefall/repoman, where it was afflicted by a silly merge error
on my part (fixed).
Approved by: re
Diffstat (limited to 'contrib/cvs/src')
45 files changed, 1919 insertions, 1586 deletions
diff --git a/contrib/cvs/src/ChangeLog b/contrib/cvs/src/ChangeLog index 727332c..ed1188b 100644 --- a/contrib/cvs/src/ChangeLog +++ b/contrib/cvs/src/ChangeLog @@ -1,3 +1,467 @@ +2002-11-22 Larry Jones <lawrence.jones@eds.com> + + * sanity.sh: Note that the tests run for a long time. + + * checkout.c (safe_location): Use xstrdup, not strdup. + (Reported by Terrence Enger <tenger@iSeries-guru.com>.) + +2002-11-19 Larry Jones <lawrence.jones@eds.com> + + * log.c (log_expand_revlist): Fix cross-branch correction code. + + * sanity.sh: Set $LANG for systems that ignore $LC_ALL. + (rcs2-7): Change date offset from 100 months to 96 months to reduce + periodic problems with invalid dates. + +2002-11-12 Derek Price <derek@ximbiot.com> + + * sanity.sh (rcslib-symlink): Use rm -f rather than a simple rm when + removing links because under some configurations of RH Linux 8.0 the + script pauses to ask for removal approval. + +2002-11-08 Derek Price <derek@ximbiot.com> + + * sanity.sh (importc): Update the use of the touch command to be + compliant with POSIX 1003.1-2001, SUS2, and SUS3 now that GNU touch + supports this. If this breaks any test platforms we should test + the behavior of touch like we do for other tools. + +2002-11-03 Derek Price <derek@ximbiot.com> + + * sanity.sh (rcs2-7): Notate with a wild untested hypothesis. + +2002-11-03 Derek Price <derek@ximbiot.com> + + * sanity.sh (rcs2-7): Notate with three more failure dates. + +2002-10-25 Derek Price <derek@ximbiot.com> + + * root.c: Change some calls to SYSTEM_CLEANUP() and then exit() to + more appropriate calls to error_exit(). + * server.c: Ditto. + * tag.c: Ditto. + +2002-10-24 Derek Price <derek@ximbiot.com> + + * buffer.c (stdio_buffer_shutdown): Remove the getc() call used to + detect spurious output from clients since getc() would sometimes + block and hang indefinately if the client kept the conection open but + sent no data. Bug reports state that this hapened frequently with + older clients connecting to 1.11.2 servers, especially when + compression is enabled. + (Original report from Mark D. Baushke <mdb@juniper.net>. + Original patch from Ralf S. Engelschall <rse@engelschall.com> + via Peter Wemm <peter@freebsd.org>.) + +2002-10-05 Larry Jones <lawrence.jones@eds.com> + + * recurse.c (start_recursion, do_recursion): Allow write locking + in addition to read locking. Change all callers. + * cvs.h: Change prototype to match, add lock types. + * tag.c (rtag_proc, rtag_fileproc, tag_fileproc): Have start_recursion + use write locks rather than calling lock_dir_for_write to avoid deadly + embrace. + +2002-10-04 Larry Jones <lawrence.jones@eds.com> + + * client.c (get_responses_and_close, connect_to_pserver): Set + to_server and from_server to NULL after freeing. + * main.c (main): Clear server_active when finished. Also neaten + up the SERVER_SUPPORT ifdef's. + * server.c (do_cvs_command): Set protocol_inbuf, stderrbuf, and + stdoutbuf to NULL after freeing. + (server_cleanup): Free buf_from_net and buf_to_set and set to NULL. + Also reset error_use_protocol. + (server): Don't SIG_register server_cleanup. main_cleanup (which + is already registered) outputs a fatal error which causes it to + be called; registering it directly results in it being called twice. + (cvs_output): Don't try to use buf_to_net or protocol if they're NULL. + +2002-10-03 Larry Jones <lawrence.jones@eds.com> + + * lock.c (readers_exist): Ignore our own read lock, if any, to + allow upgrading an existing read lock to a write lock. + * tag.c (rtag_proc, rtag_fileproc, tag_fileproc): Rather than + locking the entire tree, have start_recursion establish read + locks and then upgrade the read lock to a write lock (so only + one directory is locked at a time). + +2002-09-27 Larry Jones <lawrence.jones@eds.com> + + * add.c (add): Send "--" before file names. + * admin.c (admin): Ditto. + * annotate.c (annotate): Ditto. + * commit.c (commit): Ditto. + * diff.c (diff): Ditto. + * edit.c (watch_onoff, editors): Ditto. + * log.c (cvslog): Ditto. + * remove.c (cvsremove): Ditto. + * status.c (cvsstatus): Ditto. + * tag.c (cvstag): Ditto. + * update.c (update): Ditto. + * watch.c (watch_addremove, watchers): Ditto. + + * sanity.sh (client-9): Update to match. + +2002-09-24 Derek Price <derek@ximbiot.com> + + * options.h: Remove prototype of STDC exit() function. If this breaks + a build, this should be detected in configure.in somehow rather than + restoring the line to this file. + +2002-09-24 Derek Price <derek@ximbiot.com> + + * options.h: Move definition of AUTH_CLIENT_SUPPORT into configure.in. + +2002-09-24 Derek Price <derek@ximbiot.com> + + * options.h: Move definition of FORCE_USE_EDITOR into configure.in. + +2002-09-24 Derek Price <derek@ximbiot.com> + + * options.h: Move definition of UMASK_DFLT into configure.in. + +2002-09-24 Derek Price <derek@ximbiot.com> + + * Makefile.in: Regenerated using Automake 1.6.3. + +2002-09-24 Larry Jones <lawrence.jones@eds.com> + + * filesubr.c, history.c, import.c, rcs.c, update.c: Use + HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_RDEV instead of + the obsolete HAVE_ST_BLKSIZE and HAVE_ST_RDEV. + +2002-09-24 Derek Price <derek@ximbiot.com> + + * options.h: Move definition of TMPDIR_DFLT into configure.in. + +2002-09-24 Derek Price <derek@ximbiot.com> + + * options.h: Move defininition of EDITOR_DFLT into configure.in. + + * Makefile.in: Regenerated. + +2002-09-23 Jim Meyering <meyering@lucent.com> + + If `cvs -d REPO commit ...' was used to override CVS/Root, + then modified files in the directory from which cvs is invoked + would not be committed. + * client.c (arg_should_not_be_sent_to_server): The above would happen + because this function would throw out a file name when CVS/Root + did not match the current server. Fix by allowing the command-line- + specified repository to take precedence over the value returned + by Name_Root. Patch by Simon Walton <simonw@lucent.com>. + * sanity.sh (commit-d): New tests for the above. + Patch by Simon Walton <simonw@lucent.com>. + +2002-09-20 Derek Price <derek@ximbiot.com> + + * options.h: Move definition of SERVER_FLOWCONTROL, SERVER_HI_WATER, + and SERVER_LO_WATER into configure.in. + +2002-09-20 Derek Price <derek@ximbiot.com> + + * options.h: Move definition of PATCH_PROGRAM to configure.in. + +2002-09-18 Larry Jones <lawrence.jones@eds.com> + + * client.c (call_in_directory): Don't create admin directory when + exporting into an existing directory. + (Reported by Jens Engel <Jens.Engel@marconi.com>.) + * sanity.sh (basic2): New tests for above. + +2002-09-16 Jim Meyering <meyering@lucent.com> + + * server.c (do_cvs_command): Move declarations of locals, timeout and + timeout_ptr, `up', out of enclosing `#ifdef SERVER_FLOWCONTROL' block. + Otherwise, this file would not compile with SERVER_FLOWCONTROL + turned off. Patch by Ed Santiago <esm@ascend.com>. + +2002-09-15 Larry Jones <lawrence.jones@eds.com> + + * myndbm.c (mydbm_open): Open the file read/write rather than read- + only if that's what the user asked for to ensure that the later open + for write will succeed. + (Patch submitted by Josh Lehan <cvs@krellan.com>.) + +2002-08-28 Larry Jones <lawrence.jones@eds.com> + + * logmsg.c (do_editor): Fix bug which prevented reusing log messages. + (Reported by Eric Siegerman <erics@telepres.com>.) + +2002-08-16 Derek Price <derek@ximbiot.com> + + * create_adm.c (Create_Admin): Assume RELATIVE_REPOS is set. + * server.c (outside_root): Add comment. + * options.h: Remove RELATIVE_REPOS & CVS_BADROOT. + * sanity.sh: Remove a lot of !RELATIVE_REPOS cruft from tests. + +2002-08-14 Derek Price <oberon@umich.edu> + + * server.c (server): Dispose of the correct pointer. Tidy comment. + +2002-08-13 Derek Price <oberon@umich.edu> + + * client.c (get_cvs_port_number): Fix typo in comment. Add comments. + * server.c (server): Fix a FIXME. Remove an errant "const" directive. + Remove some redundant memory allocation and error handling code. + +2002-08-08 Derek Price <oberon@umich.edu> + + * import.c (import): Surrounded `server_active' with + #ifdef SERVER_SUPPORT/#endif. + * commit.c (commit_fileproc, commit_direntproc): Likewise. + (Patch from John Tytgat <John.Tytgat@aaug.net>.) + +2002-07-31 Derek Price <oberon@umich.edu> + + * filesubr.c: Add a line so VIM can determine tab stops and shift widths. + * root.c: Ditto. + * (parse_cvsroot): Add comments and tidy slightly. + +2002-07-31 Derek Price <oberon@umich.edu> + + * sanity.sh: Add another date to the comment about rcs2-7 failing. + +2002-07-26 Jim Meyering <meyering@lucent.com> + + * commit.c (find_fileproc): When committing in client mode, + arrange to fail if a `cvs add'ed file no longer exists in the + working directory. + * sanity.sh (commit-add-missing): New test for above. + +2002-07-25 Larry Jones <lawrence.jones@eds.com> + + * sanity.sh: Set $TMPDIR if it's not already set and use it rather + than /tmp for the expected server temp directory path. + +2002-07-09 Larry Jones <lawrence.jones@eds.com> + + * vers_ts.c (time_stamp_server, time_stamp): Eliminate unneeded + struct_tm copying. + + * lock.c (lock_wait, lock_obtained): Display time in UTC if possible + to reduce confusion in client/server mode. + (Original patch from Eduardo Perez Ureta <eperez@it.uc3m.es>.) + +2002-06-26 Larry Jones <lawrence.jones@eds.com> + + * tag.c (check_fileproc): When checking up-to-date, T_REMOVE_ENTRY + is also a valid status. + (Reported by David Everly <David.Everly@wcom.com>.) + * sanity.sh (tagc): New tests for above. + +2002-06-18 Larry Jones <lawrence.jones@eds.com> + + * update.c (patch_file): Don't patch if diff bigger than file. + Don't bother adjusting the permission on the diff output if + we're not going to use it. + + +2002-06-18 Derek Price <oberon@umich.edu> + + * server.c: Handle HPUX password expiration fields in the passwd + string in case we are set up on a server with NIS passwords served + from HPUX. + (Original patch from John Cavanaugh <john_cavanaugh@agilent.com>.) + +2002-06-17 Larry Jones <lawrence.jones@eds.com> + and Jonathan Kamens <jik@kamens.brookline.ma.us> + + * commit.c (commit_fileproc, commit_direntproc): Don't try to call + an editor to get the log message if running as a server. Instead, + just use an empty log message. + * import.c (import): Ditto. + + * import.c (import): In client mode, always send a message to the + server, even if it's empty (this parallels a change made by Larry + Jones to commit.c on May 7). + +2002-05-31 Larry Jones <lawrence.jones@eds.com> + + * rcs.c: Conditionally define MAP_FAILED for old systems that don't + have it in <mman.h>. + (Reported by jeremy brand <jeremy@earth.care2.com>.) + +2002-05-24 Larry Jones <lawrence.jones@eds.com> + + * rcscmds.c (diff_exec): Add a -- before the first file name just + in case it looks like an option. + (Reported by Zooko <zooko@zooko.com>.) + + * rcscmds.c (diff_execv): Remove -- same as diff_exec. Change + only caller. + * cvs.h: Ditto. + +2002-05-23 Larry Jones <lawrence.jones@eds.com> + + * cvs.h (strcat_filename_onto_homedir): Make arguments const. + * filesubr.c (strcat_filename_onto_homedir): Make arguments const, + move more code here from callers, change all callers. + +2002-05-22 Derek Price <oberon@umich.edu> + + * cvs.h: Add prototype for this... + * filesubr.c (strcat_filename_onto_homedir): new function. + * login.c (): Use new function. + + * cvsrc.c (read_cvsrc): Use new function due to problems on VMS. + * ignore.c (ign_setup): Ditto. + * wrapper.c (wrap_setup): Ditto. + (Original patch from Karsten Spang <ksp@dannet.dk>.) + +2002-05-21 Larry Jones <lawrence.jones@eds.com> + + * rcs.c (rcsbuf_getkey): Correct off-by-one error in ptr assertion + and add a similar assertion for ptrend. + (Reported by Rebecca Young <raygirl@cvshome.org>.) + (rcsbuf_fill): Remove redundant code. + +2002-05-20 Derek Price <oberon@umich.edu> + + * buffer.h: New prototype for... + * buffer.c (stdio_buffer_get_file): this new function to abstract + access to a buffer's file descriptor. + * client.c (auth_server): Use the new function. + (Original patch from Jonathan Kamens <jik@kamens.brookline.ma.us>.) + +2002-05-20 Derek Price <oberon@umich.edu> + + * main.c (main): Add 2002 to the copyright years output with the + version string. + +2002-05-15 Larry Jones <lawrence.jones@eds.com> + + * log.c (log_parse_list): Fix off-by-one error which caused + incorrect handling of 'cvs log -wuser1,user2 foo.c' command. + (Patch from Alexey Mahotkin <alexm@hsys.msk.ru>, + reported by Alex Morozov <morozov@novosoft.ru>.) + +2002-05-09 Larry Jones <lawrence.jones@eds.com> + + * login.c (password_entry_operation): Get cvsroot_canonical before + trying to read the user's password file so we have it even if the + file doesn't exist. + (Reported by Sarah Thompson <sthompson@fsl.noaa.gov>.) + +2002-05-08 Derek Price <oberon@umich.edu> + + * Makefile.am (cvs_SOURCES): Add options.h explicitly - since we + stopped generating it dynamically, Automake stopped noticing it and + including it in dists. See TODO item #214 for notes. + +2002-05-08 Derek Price <oberon@umich.edu> + + * cvs.h: Use the HAVE_CONFIG_H define. + +2002-05-07 Larry Jones <lawrence.jones@eds.com> + + * filesubr.c (isaccessible): Set errno before returning failure + in the SETXID_SUPPORT code. + + * logmsg (do_verify): Avoid even more work if there's no verifymsg + script to run. + + * logmsg: Use fputs/putc rather than fprintf where appropriate. + (do_verify): Run the verifymsg script even if there's no log + message. (Reported by Andy Baker <Andy.Baker2@t-mobile.co.uk>.) + Don't reread the log message unless a verifymsg script was run. + + * commit.c (commit): Always send -m to the server, even if there's + no message. + + * create_adm.c (Create_Admin): Add dotemplate parameter to trace. + Remove unreachable code. + +2002-05-03 Larry Jones <lawrence.jones@eds.com> + + * server.c (serve_watch_on, serve_watch_off, serve_watch_add, + serve_watch_remove): Just pass "watch" as the command name + to do_cvs_command to avoid unknown command errors. + (Reported by Gary Hennigan <gary@ieee.org>.) + + * rcs.c (RCS_checkin): Fix bad call to error () in buggy + PRESERVE_PERMISSIONS code. + (rcs_internal_unlockfile): Include current value of errno in error + message even though it may well be irrelevant (it's still better + than nothing). + +2002-05-02 Derek Price <oberon@umich.edu> + + * .cvsignore: Remove lines for files obsoleted by new autotools. + +2002-05-02 Derek Price <oberon@umich.edu> + + * stamp-h2.in: Remove this uneeded file. + +2002-05-01 Derek Price <oberon@umich.edu> + + * options.h.in: Move to... + * options.h: here. + +2002-04-30 Derek Price <oberon@umich.edu> + + * version.h.in: Remove this file. + * version.h: Ditto. + + * Makefile.am: Remove references to version.h. + * cvs.h: Use <> rather than "" around the config.h #include. I didn't + quite bother to understand why, but autoconf recommends it. + * cvsbug.in: Use PACKAGE_BUGREPORT defined by configure for the bug + report email address. + * version.c (version): Use PACKAGE_STRING defined in config.h instead + of the version_string that used to be defined in version.h. + + * Makefile.in: Regenerated with automake 1.6. + +2002-04-28 Derek Price <oberon@umich.edu> + + * cvs.h: Use `"'s around includes when we mean a local file. + +2002-04-28 Derek Price <oberon@umich.edu> + + * cvs.h: #define new names for functions and variables when they + might conflict with system definitions (namely on Mac OS X 10.1 with + the most recent dev packages - This should be removable after the Mac + dev packages are fixed.). + +2002-04-26 Larry Jones <larry.jones@sdrc.com> + + * logmsg.c (do_editor): Fix assertion when CLIENT_SUPPORT not defined. + (Reported by Matthias Andree <matthias.andree@stud.uni-dortmund.de>.) + +2002-04-19 Larry Jones <larry.jones@sdrc.com> + + * log.c (log_expand_revlist): First cut at code to allow logging + between a revision and *any* ancestor, not just one explicitly on + the same branch (e.g., from 1.1 to 4.1.2.3.6.1). + + * subr.c (gca): Simplify and optimize. + +2002-04-19 Jim Meyering <meyering@lucent.com> + and Ed Santiago <easm@lucent.com> + + * classify.c (Classify_File): Fix it so that `cvs update -p -r...' + works, even under some slightly unusual (though perfectly legitimate) + circumstances. + * sanity.sh (update-p): New tests for this. + +2002-04-18 Derek Price <oberon@umich.edu> + + * sanity.sh: Move test for regex metacharacters in username until + after we're sure we found the version of expr that we're going to use. + +2002-04-18 Larry Jones <larry.jones@sdrc.com> + + * admin.c (admin_fileproc): Allow admin to be used on RCS files with + no local version (e.g., removed files) like most other subcommands. + + * wrapper.c (wrap_add): Update URL of -t/-f wrapper discussion. + +2002-04-18 Derek Price <oberon@umich.edu> + + * version.h: Regenerated for 1.11.2.1 version update. + 2002-04-17 Derek Price <oberon@umich.edu> * version.h: Regenerated for 1.11.2. @@ -344,7 +808,7 @@ * Makefile.am: Various modifications to make Automake, make dist, and windows targets work like they are supposed to. * version.h: New (generated) file. - + * Makefile.in: Regenerated. 2001-08-09 Derek Price <dprice@collab.net> @@ -581,7 +1045,7 @@ * tag.c: (rtag_fileproc, rtag_delete, tag_fileproc) Changed behavior of "cvs tag -F", "cvs tag -d", "cvs rtag -F" - and "cvs rtag -d" so that they will not disturb existing + and "cvs rtag -d" so that they will not disturb existing branch tags unless a new "-B" option is given. * sanity.sh (tagf-16 - tagf-33): Added tests for new -B option to "cvs tag" and "cvs rtag" diff --git a/contrib/cvs/src/Makefile.am b/contrib/cvs/src/Makefile.am index 2020141..3338eec 100644 --- a/contrib/cvs/src/Makefile.am +++ b/contrib/cvs/src/Makefile.am @@ -89,15 +89,13 @@ cvs_SOURCES = \ hardlink.h \ hash.h \ myndbm.h \ + options.h \ rcs.h \ root.h \ server.h \ update.h \ - version.h \ watch.h -BUILT_SOURCES = version.h - cvs_LDADD = \ ../diff/libdiff.a \ ../lib/libcvs.a \ @@ -105,7 +103,7 @@ cvs_LDADD = \ # extra clean targets # wish this could be distclean-hdr-local but it's not part of automake -DISTCLEANFILES = options.h-SAVED check.log check.plog +DISTCLEANFILES = check.log check.plog # General EXTRA_DIST = \ diff --git a/contrib/cvs/src/Makefile.in b/contrib/cvs/src/Makefile.in index a4d5966..3a56e0c 100644 --- a/contrib/cvs/src/Makefile.in +++ b/contrib/cvs/src/Makefile.in @@ -1,6 +1,7 @@ -# Makefile.in generated automatically by automake 1.5 from Makefile.am. +# Makefile.in generated by automake 1.6.3 from Makefile.am. +# @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -26,7 +27,6 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. - srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -55,9 +55,13 @@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ @@ -67,22 +71,28 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : + +EXEEXT = @EXEEXT@ +OBJEXT = @OBJEXT@ +PATH_SEPARATOR = @PATH_SEPARATOR@ + +SHELL = /bin/sh AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ CSH = @CSH@ DEPDIR = @DEPDIR@ -EXEEXT = @EXEEXT@ +EDITOR = @EDITOR@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB4 = @KRB4@ LN_S = @LN_S@ -OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PERL = @PERL@ PR = @PR@ PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ ROFF = @ROFF@ +STRIP = @STRIP@ TEXI2DVI = @TEXI2DVI@ VERSION = @VERSION@ YACC = @YACC@ @@ -91,8 +101,6 @@ am__quote = @am__quote@ includeopt = @includeopt@ install_sh = @install_sh@ -SHELL = /bin/sh - # $(includeopt) is CVS specific and set by configure # FIXME - This includes line is dependant on its order. This means there is # some namespace hackery going on that maybe shouldn't be. Long term fix is to @@ -167,16 +175,14 @@ cvs_SOURCES = \ hardlink.h \ hash.h \ myndbm.h \ + options.h \ rcs.h \ root.h \ server.h \ update.h \ - version.h \ watch.h -BUILT_SOURCES = version.h - cvs_LDADD = \ ../diff/libdiff.a \ ../lib/libcvs.a \ @@ -185,7 +191,7 @@ cvs_LDADD = \ # extra clean targets # wish this could be distclean-hdr-local but it's not part of automake -DISTCLEANFILES = options.h-SAVED check.log check.plog +DISTCLEANFILES = check.log check.plog # General EXTRA_DIST = \ @@ -199,8 +205,8 @@ EXTRA_DIST = \ subdir = src mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h options.h -CONFIG_CLEAN_FILES = cvsbug version.h +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = cvsbug bin_PROGRAMS = cvs$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) @@ -228,50 +234,49 @@ SCRIPTS = $(bin_SCRIPTS) DEFS = @DEFS@ -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I. +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/depcomp -@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/add.Po $(DEPDIR)/admin.Po \ -@AMDEP_TRUE@ $(DEPDIR)/annotate.Po $(DEPDIR)/buffer.Po \ -@AMDEP_TRUE@ $(DEPDIR)/checkin.Po $(DEPDIR)/checkout.Po \ -@AMDEP_TRUE@ $(DEPDIR)/classify.Po $(DEPDIR)/client.Po \ -@AMDEP_TRUE@ $(DEPDIR)/commit.Po $(DEPDIR)/create_adm.Po \ -@AMDEP_TRUE@ $(DEPDIR)/cvsrc.Po $(DEPDIR)/diff.Po \ -@AMDEP_TRUE@ $(DEPDIR)/edit.Po $(DEPDIR)/entries.Po \ -@AMDEP_TRUE@ $(DEPDIR)/error.Po $(DEPDIR)/expand_path.Po \ -@AMDEP_TRUE@ $(DEPDIR)/fileattr.Po $(DEPDIR)/filesubr.Po \ -@AMDEP_TRUE@ $(DEPDIR)/find_names.Po $(DEPDIR)/hardlink.Po \ -@AMDEP_TRUE@ $(DEPDIR)/hash.Po $(DEPDIR)/history.Po \ -@AMDEP_TRUE@ $(DEPDIR)/ignore.Po $(DEPDIR)/import.Po \ -@AMDEP_TRUE@ $(DEPDIR)/lock.Po $(DEPDIR)/log.Po \ -@AMDEP_TRUE@ $(DEPDIR)/login.Po $(DEPDIR)/logmsg.Po \ -@AMDEP_TRUE@ $(DEPDIR)/main.Po $(DEPDIR)/mkmodules.Po \ -@AMDEP_TRUE@ $(DEPDIR)/modules.Po $(DEPDIR)/myndbm.Po \ -@AMDEP_TRUE@ $(DEPDIR)/no_diff.Po $(DEPDIR)/parseinfo.Po \ -@AMDEP_TRUE@ $(DEPDIR)/patch.Po $(DEPDIR)/rcs.Po \ -@AMDEP_TRUE@ $(DEPDIR)/rcscmds.Po $(DEPDIR)/recurse.Po \ -@AMDEP_TRUE@ $(DEPDIR)/release.Po $(DEPDIR)/remove.Po \ -@AMDEP_TRUE@ $(DEPDIR)/repos.Po $(DEPDIR)/root.Po \ -@AMDEP_TRUE@ $(DEPDIR)/run.Po $(DEPDIR)/scramble.Po \ -@AMDEP_TRUE@ $(DEPDIR)/server.Po $(DEPDIR)/status.Po \ -@AMDEP_TRUE@ $(DEPDIR)/subr.Po $(DEPDIR)/tag.Po \ -@AMDEP_TRUE@ $(DEPDIR)/update.Po $(DEPDIR)/vers_ts.Po \ -@AMDEP_TRUE@ $(DEPDIR)/version.Po $(DEPDIR)/watch.Po \ -@AMDEP_TRUE@ $(DEPDIR)/wrapper.Po $(DEPDIR)/zlib.Po +am__depfiles_maybe = depfiles +@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/add.Po ./$(DEPDIR)/admin.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/annotate.Po ./$(DEPDIR)/buffer.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/checkin.Po ./$(DEPDIR)/checkout.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/classify.Po ./$(DEPDIR)/client.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/commit.Po ./$(DEPDIR)/create_adm.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/cvsrc.Po ./$(DEPDIR)/diff.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/edit.Po ./$(DEPDIR)/entries.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/error.Po ./$(DEPDIR)/expand_path.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/fileattr.Po ./$(DEPDIR)/filesubr.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/find_names.Po ./$(DEPDIR)/hardlink.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/hash.Po ./$(DEPDIR)/history.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/ignore.Po ./$(DEPDIR)/import.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/lock.Po ./$(DEPDIR)/log.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/login.Po ./$(DEPDIR)/logmsg.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/main.Po ./$(DEPDIR)/mkmodules.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/modules.Po ./$(DEPDIR)/myndbm.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/no_diff.Po ./$(DEPDIR)/parseinfo.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/patch.Po ./$(DEPDIR)/rcs.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/rcscmds.Po ./$(DEPDIR)/recurse.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/release.Po ./$(DEPDIR)/remove.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/repos.Po ./$(DEPDIR)/root.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/run.Po ./$(DEPDIR)/scramble.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/server.Po ./$(DEPDIR)/status.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/subr.Po ./$(DEPDIR)/tag.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/update.Po ./$(DEPDIR)/vers_ts.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/version.Po ./$(DEPDIR)/watch.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/wrapper.Po ./$(DEPDIR)/zlib.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ CFLAGS = @CFLAGS@ DIST_SOURCES = $(cvs_SOURCES) -DIST_COMMON = ./stamp-h2.in ChangeLog Makefile.am Makefile.in cvsbug.in \ - options.h.in version.h.in +DIST_COMMON = ChangeLog Makefile.am Makefile.in cvsbug.in SOURCES = $(cvs_SOURCES) -all: $(BUILT_SOURCES) options.h - $(MAKE) $(AM_MAKEFLAGS) all-am +all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj @@ -279,38 +284,10 @@ $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && \ - CONFIG_HEADERS= CONFIG_LINKS= \ - CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status -options.h: stamp-h2 - @if test ! -f $@; then \ - rm -f stamp-h2; \ - $(MAKE) stamp-h2; \ - else :; fi -stamp-h2: $(srcdir)/options.h.in $(top_builddir)/config.status - @rm -f stamp-h2 stamp-h2T - @echo timestamp > stamp-h2T 2> /dev/null - cd $(top_builddir) \ - && CONFIG_FILES= CONFIG_HEADERS=src/options.h \ - $(SHELL) ./config.status - @mv stamp-h2T stamp-h2 -$(srcdir)/options.h.in: $(srcdir)/./stamp-h2.in - @if test ! -f $@; then \ - rm -f $(srcdir)/./stamp-h2.in; \ - $(MAKE) $(srcdir)/./stamp-h2.in; \ - else :; fi -$(srcdir)/./stamp-h2.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h - @rm -f $(srcdir)/./stamp-h2.in $(srcdir)/./stamp-h2.inT - @echo timestamp > $(srcdir)/./stamp-h2.inT 2> /dev/null - cd $(top_srcdir) && $(AUTOHEADER) - @mv $(srcdir)/./stamp-h2.inT $(srcdir)/./stamp-h2.in - -distclean-hdr: - -rm -f options.h + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) cvsbug: $(top_builddir)/config.status cvsbug.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status -version.h: $(top_builddir)/config.status version.h.in - cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @@ -318,16 +295,16 @@ install-binPROGRAMS: $(bin_PROGRAMS) p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ - f=`echo $$p1|sed '$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ + $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done @@ -337,24 +314,23 @@ clean-binPROGRAMS: cvs$(EXEEXT): $(cvs_OBJECTS) $(cvs_DEPENDENCIES) @rm -f cvs$(EXEEXT) $(LINK) $(cvs_LDFLAGS) $(cvs_OBJECTS) $(cvs_LDADD) $(LIBS) +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_SCRIPTS)'; for p in $$list; do \ - f="`echo $$p|sed '$(transform)'`"; \ - if test -f $$p; then \ - echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/$$f; \ - elif test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/$$f; \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \ + $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ - f="`echo $$p|sed '$(transform)'`"; \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done @@ -365,69 +341,69 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/add.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/admin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/annotate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/buffer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/checkin.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/checkout.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/classify.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/client.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/commit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/create_adm.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/cvsrc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/diff.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/edit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/entries.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/error.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/expand_path.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/fileattr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/filesubr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/find_names.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hardlink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/hash.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/history.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/ignore.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/import.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/log.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/login.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/logmsg.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkmodules.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/modules.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/myndbm.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/no_diff.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/parseinfo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/patch.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rcs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/rcscmds.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/recurse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/release.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/remove.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/repos.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/root.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/run.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/scramble.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/server.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/status.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/subr.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/tag.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/update.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/vers_ts.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/version.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/watch.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/wrapper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/zlib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/add.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/admin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/annotate.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkin.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkout.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/classify.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_adm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cvsrc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diff.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edit.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/entries.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expand_path.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fileattr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filesubr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/find_names.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hardlink.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/history.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ignore.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/import.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lock.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/login.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logmsg.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkmodules.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modules.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/myndbm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/no_diff.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseinfo.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/patch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rcscmds.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recurse.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/release.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remove.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repos.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/root.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/run.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scramble.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/status.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tag.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/update.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vers_ts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/watch.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrapper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zlib.Po@am__quote@ distclean-depend: - -rm -rf $(DEPDIR) + -rm -rf ./$(DEPDIR) .c.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(COMPILE) -c `test -f $< || echo '$(srcdir)/'`$< + $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @@ -437,53 +413,61 @@ distclean-depend: CCDEPMODE = @CCDEPMODE@ uninstall-info-am: +ETAGS = etags +ETAGSFLAGS = + tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - mkid -fID $$unique $(LISP) + mkid -fID $$unique -TAGS: $(HEADERS) $(SOURCES) options.h.in $(TAGS_DEPENDENCIES) \ +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)options.h.in$$unique$(LISP)$$tags" \ - || etags $(ETAGS_ARGS) $$tags options.h.in $$unique $(LISP) + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique GTAGS: - here=`CDPATH=: && cd $(top_builddir) && pwd` \ + here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) - @for file in $(DISTFILES); do \ - if test -f $$file; then d=.; else d=$(srcdir); fi; \ + @list='$(DISTFILES)'; for file in $$list; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - $(mkinstalldirs) "$(distdir)/$$dir"; \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ fi; \ if test -d $$d/$$file; then \ - cp -pR $$d/$$file $(distdir) \ - || exit 1; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ @@ -493,7 +477,7 @@ distdir: $(DISTFILES) check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) options.h +all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) @@ -509,6 +493,7 @@ install-am: all-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: @@ -516,13 +501,12 @@ mostlyclean-generic: clean-generic: distclean-generic: - -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* + -rm -f Makefile $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am @@ -530,7 +514,7 @@ clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am distclean-am: clean-am distclean-compile distclean-depend \ - distclean-generic distclean-hdr distclean-tags + distclean-generic distclean-tags dvi: dvi-am @@ -563,15 +547,15 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \ .PHONY: GTAGS all all-am check check-am check-local clean \ clean-binPROGRAMS clean-generic distclean distclean-compile \ - distclean-depend distclean-generic distclean-hdr distclean-tags \ - distdir dvi dvi-am info info-am install install-am \ - install-binPROGRAMS install-binSCRIPTS install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic tags uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-info-am + distclean-depend distclean-generic distclean-tags distdir dvi \ + dvi-am info info-am install install-am install-binPROGRAMS \ + install-binSCRIPTS install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic tags uninstall \ + uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS \ + uninstall-info-am check-local: localcheck remotecheck diff --git a/contrib/cvs/src/add.c b/contrib/cvs/src/add.c index 9ec6a3d..0ff6f69 100644 --- a/contrib/cvs/src/add.c +++ b/contrib/cvs/src/add.c @@ -167,6 +167,7 @@ add (argc, argv) free (options); } option_with_arg ("-m", message); + send_arg ("--"); /* If !found_slash, refrain from sending "Directory", for CVS 1.9 compatibility. If we only tried to deal with servers diff --git a/contrib/cvs/src/admin.c b/contrib/cvs/src/admin.c index 2a35d71..8c4fce3 100644 --- a/contrib/cvs/src/admin.c +++ b/contrib/cvs/src/admin.c @@ -496,6 +496,7 @@ admin (argc, argv) for (i = 0; i < admin_data.ac; ++i) send_arg (admin_data.av[i]); + send_arg ("--"); send_files (argc, argv, 0, 0, SEND_NO_CONTENTS); send_file_names (argc, argv, SEND_EXPAND_WILD); send_to_server ("admin\012", 0); @@ -509,7 +510,7 @@ admin (argc, argv) err = start_recursion (admin_fileproc, (FILESDONEPROC) NULL, admin_dirproc, (DIRLEAVEPROC) NULL, (void *)&admin_data, argc, argv, 0, - W_LOCAL, 0, 0, (char *) NULL, 1); + W_LOCAL, 0, LOCK_NONE, (char *) NULL, 1); Lock_Cleanup (); return_it: @@ -550,9 +551,7 @@ admin_fileproc (callerdat, finfo) vers = Version_TS (finfo, NULL, NULL, NULL, 0, 0); version = vers->vn_user; - if (version == NULL) - goto exitfunc; - else if (strcmp (version, "0") == 0) + if (version != NULL && strcmp (version, "0") == 0) { error (0, 0, "cannot admin newly added file `%s'", finfo->file); goto exitfunc; diff --git a/contrib/cvs/src/annotate.c b/contrib/cvs/src/annotate.c index 41acdf7..8c72962 100644 --- a/contrib/cvs/src/annotate.c +++ b/contrib/cvs/src/annotate.c @@ -110,6 +110,7 @@ annotate (argc, argv) option_with_arg ("-r", tag); if (date) client_senddate (date); + send_arg ("--"); if (is_rannotate) { int i; @@ -247,7 +248,7 @@ rannotate_proc (argc, argv, xwhere, mwhere, mfile, shorten, local, mname, msg) err = start_recursion (annotate_fileproc, (FILESDONEPROC) NULL, (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, - argc - 1, argv + 1, local, which, 0, 1, + argc - 1, argv + 1, local, which, 0, LOCK_READ, where, 1); return err; } diff --git a/contrib/cvs/src/buffer.c b/contrib/cvs/src/buffer.c index 0c13cde..ba98b4f 100644 --- a/contrib/cvs/src/buffer.c +++ b/contrib/cvs/src/buffer.c @@ -1247,6 +1247,20 @@ stdio_buffer_initialize (fp, child_pid, input, memory) (void *) bc); } +/* Return the file associated with a stdio buffer. */ +FILE * +stdio_buffer_get_file (buf) + struct buffer *buf; +{ + struct stdio_buffer_closure *bc; + + assert(buf->shutdown == stdio_buffer_shutdown); + + bc = (struct stdio_buffer_closure *) buf->closure; + + return(bc->fp); +} + /* The buffer input function for a buffer built on a stdio FILE. */ static int @@ -1378,8 +1392,7 @@ stdio_buffer_shutdown (buf) if (buf->input) { - if (! buf_empty_p (buf) - || getc (bc->fp) != EOF) + if ( !buf_empty_p (buf) ) { # ifdef SERVER_SUPPORT if (server_active) diff --git a/contrib/cvs/src/buffer.h b/contrib/cvs/src/buffer.h index ebf1b7a..d76f43a 100644 --- a/contrib/cvs/src/buffer.h +++ b/contrib/cvs/src/buffer.h @@ -112,6 +112,7 @@ extern void buf_free PROTO((struct buffer *)); extern struct buffer *buf_nonio_initialize PROTO((void (*) (struct buffer *))); extern struct buffer *stdio_buffer_initialize PROTO((FILE *, int, int, void (*) (struct buffer *))); +extern FILE *stdio_buffer_get_file PROTO((struct buffer *)); extern struct buffer *compress_buffer_initialize PROTO((struct buffer *, int, int, void (*) (struct buffer *))); extern struct buffer *packetizing_buffer_initialize diff --git a/contrib/cvs/src/checkout.c b/contrib/cvs/src/checkout.c index 6b1f769..fe30695 100644 --- a/contrib/cvs/src/checkout.c +++ b/contrib/cvs/src/checkout.c @@ -457,7 +457,7 @@ safe_location (where) char *parent; /* strip the last_component */ - where_location = strdup( where ); + where_location = xstrdup( where ); parent = last_component( where_location ); parent[-1] = '\0'; diff --git a/contrib/cvs/src/classify.c b/contrib/cvs/src/classify.c index 9a6489e..285153c 100644 --- a/contrib/cvs/src/classify.c +++ b/contrib/cvs/src/classify.c @@ -102,13 +102,21 @@ Classify_File (finfo, tag, date, options, force_tag_match, aflag, versp, if (vers->ts_user == NULL) { - /* - * There is no user file, but there should be one; remove the - * entry - */ - if (!really_quiet) - error (0, 0, "warning: new-born %s has disappeared", finfo->fullname); - ret = T_REMOVE_ENTRY; + if (pipeout) + { + ret = T_CHECKOUT; + } + else + { + /* + * There is no user file, but there should be one; remove the + * entry + */ + if (!really_quiet) + error (0, 0, "warning: new-born %s has disappeared", + finfo->fullname); + ret = T_REMOVE_ENTRY; + } } else if (vers->vn_rcs == NULL || RCS_isdead (vers->srcfile, vers->vn_rcs)) @@ -116,29 +124,36 @@ Classify_File (finfo, tag, date, options, force_tag_match, aflag, versp, ret = T_ADDED; else { - if (vers->srcfile->flags & INATTIC - && vers->srcfile->flags & VALID) + if (pipeout) { - /* 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", - finfo->fullname); + ret = T_CHECKOUT; } else { - /* - * There is an RCS file, so someone else must have checked - * one in behind our back; conflict - */ - if (!really_quiet) - error (0, 0, + 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", + finfo->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", - finfo->fullname); + finfo->fullname); + } + ret = T_CONFLICT; } - ret = T_CONFLICT; } } else if (vers->vn_user[0] == '-') diff --git a/contrib/cvs/src/client.c b/contrib/cvs/src/client.c index 4773b4f..a5a15e14 100644 --- a/contrib/cvs/src/client.c +++ b/contrib/cvs/src/client.c @@ -247,7 +247,8 @@ arg_should_not_be_sent_to_server (arg) { /* We're at the beginning of the string. Look at the CVSADM files in cwd. */ - this_root = Name_Root ((char *) NULL, (char *) NULL); + this_root = (CVSroot_cmdline ? xstrdup(CVSroot_cmdline) + : Name_Root ((char *) NULL, (char *) NULL)); } /* Now check the value for root. */ @@ -1320,6 +1321,9 @@ warning: server is not creating directories one at a time"); if ( CVS_CHDIR (dir_name) < 0) error (1, errno, "could not chdir to %s", dir_name); } + else if (strcmp (command_name, "export") == 0) + /* Don't create CVSADM directories if this is export. */ + ; else if (!isdir (CVSADM)) { /* @@ -3609,12 +3613,14 @@ get_responses_and_close () status = buf_shutdown (to_server); if (status != 0) error (0, status, "shutting down buffer to server"); + buf_free (to_server); + to_server = NULL; + status = buf_shutdown (from_server); if (status != 0) error (0, status, "shutting down buffer from server"); - - buf_free (to_server); buf_free (from_server); + from_server = NULL; server_started = 0; /* see if we need to sleep before returning to avoid time-stamp races */ @@ -3720,14 +3726,18 @@ get_port_number (envname, portname, defaultport) * we do this here instead of in parse_cvsroot so that we can keep network * code confined to a localized area and also to delay the lookup until the * last possible moment so it remains possible to run cvs client commands that - * skip opening connections to the server (i.e. skip network operations entirely) + * skip opening connections to the server (i.e. skip network operations + * entirely) * - * and yes, I know none of the the commands do that now, but here's to planning + * and yes, I know none of the commands do that now, but here's to planning * for the future, eh? cheers. * * FIXME - We could cache the port lookup safely right now as we never change * it for a single root on the fly, but we'd have to un'const some other - * functions + * functions - REMOVE_FIXME? This may be unecessary. We're talking about, + * what, usually one, sometimes two lookups of the port per invocation. I + * think twice is by far the rarer of the two cases - only the login function + * will need to do it to save the canonical CVSROOT. -DRP */ int get_cvs_port_number (root) @@ -3907,12 +3917,14 @@ connect_to_pserver (root, to_server_p, from_server_p, verify_only, do_gssapi) status = buf_shutdown (to_server); if (status != 0) error (0, status, "shutting down buffer to server"); + buf_free (to_server); + to_server = NULL; + status = buf_shutdown (from_server); if (status != 0) error (0, status, "shutting down buffer from server"); - - buf_free (to_server); buf_free (from_server); + from_server = NULL; /* Don't need to set server_started = 0 since we don't set it to 1 * until returning from this call. @@ -3957,10 +3969,11 @@ auth_server (root, lto_server, lfrom_server, verify_only, do_gssapi, hostinfo) if (do_gssapi) { #ifdef HAVE_GSSAPI - int fd = (int) lto_server->closure; + FILE *fp = stdio_buffer_get_file(lto_server); + int fd = fp ? fileno(fp) : -1; struct stat s; - if (fstat (fd, &s) < 0 || !S_ISSOCK(s.st_mode)) + if ((fd < 0) || (fstat (fd, &s) < 0) || !S_ISSOCK(s.st_mode)) { error (1, 0, "gserver currently only enabled for socket connections"); } @@ -5618,7 +5631,7 @@ send_files (argc, argv, local, aflag, flags) err = start_recursion (send_fileproc, send_filesdoneproc, send_dirent_proc, send_dirleave_proc, (void *) &args, - argc, argv, local, W_LOCAL, aflag, 0, (char *)NULL, 0); + argc, argv, local, W_LOCAL, aflag, LOCK_NONE, (char *)NULL, 0); if (err) error_exit (); if (toplevel_repos == NULL) diff --git a/contrib/cvs/src/commit.c b/contrib/cvs/src/commit.c index ba5dc5c..d67d0a1 100644 --- a/contrib/cvs/src/commit.c +++ b/contrib/cvs/src/commit.c @@ -250,12 +250,23 @@ find_fileproc (callerdat, finfo) vers = Version_TS (&xfinfo, NULL, saved_tag, NULL, 0, 0); if (vers->ts_user == NULL && vers->vn_user != NULL - && vers->vn_user[0] == '-') - /* FIXME: If vn_user is starts with "-" but ts_user is - non-NULL, what classify_file does is print "%s should be - removed and is still there". I'm not sure what it does - then. We probably should do the same. */ - status = T_REMOVED; + && (vers->vn_user[0] == '0' || vers->vn_user[0] == '-')) + { + if ( vers->vn_user[0] == '0') + { + /* This happens when one has `cvs add'ed a file, but it no + longer exists in the working directory at commit time. */ + status = T_ADDED; + } + else + { + /* FIXME: If vn_user is starts with "-" but ts_user is + non-NULL, what classify_file does is print "%s should be + removed and is still there". I'm not sure what it does + then. We probably should do the same. */ + status = T_REMOVED; + } + } else if (vers->vn_user == NULL) { if (vers->ts_user == NULL) @@ -271,7 +282,8 @@ find_fileproc (callerdat, finfo) && vers->vn_user[0] == '0') /* FIXME: If vn_user is "0" but ts_user is NULL, what classify_file does is print "new-born %s has disappeared" and removes the entry. - We probably should do the same. */ + We probably should do the same. No! Not here. Otherwise, a commit + would succeed in some cases when it should fail. See above. */ status = T_ADDED; else if (vers->ts_user != NULL && vers->ts_rcs != NULL @@ -454,7 +466,7 @@ commit (argc, argv) err = start_recursion (find_fileproc, find_filesdoneproc, find_dirent_proc, (DIRLEAVEPROC) NULL, (void *)&find_args, - argc, argv, local, W_LOCAL, 0, 0, + argc, argv, local, W_LOCAL, 0, LOCK_NONE, (char *)NULL, 0); if (err) error (1, 0, "correct above errors first!"); @@ -497,9 +509,7 @@ commit (argc, argv) do_editor (".", &saved_message, (char *)NULL, find_args.ulist); /* We always send some sort of message, even if empty. */ - /* FIXME: is that true? There seems to be some code in do_editor - which can leave the message NULL. */ - option_with_arg ("-m", saved_message); + option_with_arg ("-m", saved_message ? saved_message : ""); /* OK, now process all the questionable files we have been saving up. */ @@ -549,6 +559,7 @@ commit (argc, argv) if (!run_module_prog) send_arg("-n"); option_with_arg ("-r", saved_tag); + send_arg ("--"); /* FIXME: This whole find_args.force/SEND_FORCE business is a kludge. It would seem to be a server bug that we have to @@ -636,7 +647,8 @@ commit (argc, argv) */ err = start_recursion (check_fileproc, check_filesdoneproc, check_direntproc, (DIRLEAVEPROC) NULL, NULL, argc, - argv, local, W_LOCAL, aflag, 0, (char *) NULL, 1); + argv, local, W_LOCAL, aflag, LOCK_NONE, + (char *) NULL, 1); if (err) { Lock_Cleanup (); @@ -650,7 +662,7 @@ commit (argc, argv) if (noexec == 0) err = start_recursion (commit_fileproc, commit_filesdoneproc, commit_direntproc, commit_dirleaveproc, NULL, - argc, argv, local, W_LOCAL, aflag, 0, + argc, argv, local, W_LOCAL, aflag, LOCK_NONE, (char *) NULL, 1); /* @@ -1220,13 +1232,17 @@ commit_fileproc (callerdat, finfo) * with files as args from the command line. In that latter case, we * need to get the commit message ourselves */ - if (!(got_message)) + if (!got_message) { got_message = 1; - if (use_editor) + if ( +#ifdef SERVER_SUPPORT + !server_active && +#endif + use_editor) do_editor (finfo->update_dir, &saved_message, finfo->repository, ulist); - do_verify (&saved_message, finfo->repository); + do_verify (&saved_message, finfo->repository); } p = findnode (cilist, finfo->file); @@ -1546,7 +1562,11 @@ commit_direntproc (callerdat, dir, repos, update_dir, entries) /* get commit message */ real_repos = Name_Repository (dir, update_dir); got_message = 1; - if (use_editor) + if ( +#ifdef SERVER_SUPPORT + !server_active && +#endif + use_editor) do_editor (update_dir, &saved_message, real_repos, ulist); do_verify (&saved_message, real_repos); free (real_repos); diff --git a/contrib/cvs/src/create_adm.c b/contrib/cvs/src/create_adm.c index 1ab0f28..779bd0d 100644 --- a/contrib/cvs/src/create_adm.c +++ b/contrib/cvs/src/create_adm.c @@ -40,20 +40,17 @@ Create_Admin (dir, update_dir, repository, tag, date, nonbranch, warn, if (trace) { - fprintf (stderr, "%s-> Create_Admin (%s, %s, %s, %s, %s, %d, %d)\n", + fprintf (stderr, "%s-> Create_Admin (%s, %s, %s, %s, %s, %d, %d, %d)\n", CLIENT_SERVER_STR, dir, update_dir, repository, tag ? tag : "", - date ? date : "", nonbranch, warn); + date ? date : "", nonbranch, warn, dotemplate); } if (noexec) return 0; tmp = xmalloc (strlen (dir) + 100); - if (dir != NULL) - (void) sprintf (tmp, "%s/%s", dir, CVSADM); - else - (void) strcpy (tmp, CVSADM); + (void) sprintf (tmp, "%s/%s", dir, CVSADM); if (isfile (tmp)) error (1, 0, "there is a version in %s already", update_dir); @@ -114,7 +111,6 @@ Create_Admin (dir, update_dir, repository, tag, date, nonbranch, warn, cp = reposcopy; -#ifdef RELATIVE_REPOS /* * If the Repository file is to hold a relative path, try to strip off * the leading CVSroot argument. @@ -127,7 +123,6 @@ Create_Admin (dir, update_dir, repository, tag, date, nonbranch, warn, cp += strlen (path); free (path); } -#endif if (fprintf (fout, "%s\n", cp) < 0) { diff --git a/contrib/cvs/src/cvs.h b/contrib/cvs/src/cvs.h index 70e8a95..799a3f3 100644 --- a/contrib/cvs/src/cvs.h +++ b/contrib/cvs/src/cvs.h @@ -12,7 +12,9 @@ */ -#include "config.h" /* this is stuff found via autoconf */ +#ifdef HAVE_CONFIG_H +# include <config.h> /* this is stuff found via autoconf */ +#endif /* CONFIG_H */ #include "options.h" /* these are some larger questions which can't easily be automatically checked for */ @@ -64,7 +66,11 @@ extern char *getenv(); char *strerror (); #endif -#include <fnmatch.h> /* This is supposed to be available on Posix systems */ +#ifdef HAVE_FNMATCH +# include <fnmatch.h> /* This is supposed to be available on Posix systems */ +#else /* HAVE_FNMATCH */ +# include "fnmatch.h" /* Our substitute */ +#endif /* HAVE_FNMATCH */ #include <ctype.h> #include <pwd.h> @@ -358,6 +364,11 @@ typedef int Dtype; typedef enum direnter_type Dtype; #endif +/* Recursion processor lock types */ +#define LOCK_NONE 0 +#define LOCK_READ 1 +#define LOCK_WRITE 2 + extern char *program_name, *program_path, *command_name; extern char *Tmpdir, *Editor; extern int cvsadmin_root; @@ -421,10 +432,6 @@ extern int RCS_exec_rcsdiff PROTO ((RCSNode *rcsfile, extern int diff_exec PROTO ((char *file1, char *file2, char *label1, char *label2, char *options, char *out)); -extern int diff_execv PROTO ((char *file1, char *file2, - char *label1, char *label2, - char *options, char *out)); - #include "error.h" @@ -487,6 +494,7 @@ int isabsolute PROTO((const char *filename)); char *xreadlink PROTO((const char *link)); char *last_component PROTO((char *path)); char *get_homedir PROTO ((void)); +char *strcat_filename_onto_homedir PROTO ((const char *, const char *)); char *cvs_temp_name PROTO ((void)); FILE *cvs_temp_file PROTO ((char **filename)); @@ -637,7 +645,7 @@ int start_recursion PROTO((FILEPROC fileproc, FILESDONEPROC filesdoneproc, DIRENTPROC direntproc, DIRLEAVEPROC dirleaveproc, void *callerdat, int argc, char *argv[], int local, int which, - int aflag, int readlock, char *update_preload, + int aflag, int locktype, char *update_preload, int dosrcs)); void SIG_beginCrSect PROTO((void)); void SIG_endCrSect PROTO((void)); @@ -851,8 +859,17 @@ extern int history PROTO ((int argc, char **argv)); extern int import PROTO ((int argc, char **argv)); extern int cvslog PROTO ((int argc, char **argv)); #ifdef AUTH_CLIENT_SUPPORT +/* Some systems (namely Mac OS X) have conflicting definitions for these + * functions. Avoid them. + */ +#ifdef HAVE_LOGIN +# define login cvs_login +#endif /* HAVE_LOGIN */ +#ifdef HAVE_LOGOUT +# define logout cvs_logout +#endif /* HAVE_LOGOUT */ extern int login PROTO((int argc, char **argv)); -int logout PROTO((int argc, char **argv)); +extern int logout PROTO((int argc, char **argv)); #endif /* AUTH_CLIENT_SUPPORT */ extern int patch PROTO((int argc, char **argv)); extern int release PROTO((int argc, char **argv)); diff --git a/contrib/cvs/src/cvsbug.in b/contrib/cvs/src/cvsbug.in index 8a8dc0d..db46f6e 100755 --- a/contrib/cvs/src/cvsbug.in +++ b/contrib/cvs/src/cvsbug.in @@ -28,7 +28,7 @@ SUBMITTER=net ## GNATS_ROOT=/usr/local/lib/gnats/gnats-db # The default mail address for PR submissions. -GNATS_ADDR=bug-cvs@gnu.org +GNATS_ADDR=@PACKAGE_BUGREPORT@ ## # Where the gnats category tree lives. ## DATADIR=/usr/local/lib diff --git a/contrib/cvs/src/cvsrc.c b/contrib/cvs/src/cvsrc.c index accc53f..5c870ce 100644 --- a/contrib/cvs/src/cvsrc.c +++ b/contrib/cvs/src/cvsrc.c @@ -73,10 +73,7 @@ read_cvsrc (argc, argv, cmdname) if (!homedir) return; - homeinit = (char *) xmalloc (strlen (homedir) + strlen (cvsrc) + 10); - strcpy (homeinit, homedir); - strcat (homeinit, "/"); - strcat (homeinit, cvsrc); + homeinit = strcat_filename_onto_homedir (homedir, cvsrc); /* if it can't be read, there's no point to continuing */ diff --git a/contrib/cvs/src/diff.c b/contrib/cvs/src/diff.c index c3d0e83..2efa1e3 100644 --- a/contrib/cvs/src/diff.c +++ b/contrib/cvs/src/diff.c @@ -390,6 +390,7 @@ diff (argc, argv) option_with_arg ("-r", diff_rev2); if (diff_date2) client_senddate (diff_date2); + send_arg ("--"); /* Send the current files unless diffing two revs from the archive */ if (diff_rev2 == NULL && diff_date2 == NULL) @@ -421,7 +422,7 @@ diff (argc, argv) /* start the recursion processor */ err = start_recursion (diff_fileproc, diff_filesdoneproc, diff_dirproc, diff_dirleaveproc, NULL, argc, argv, local, - which, 0, 1, (char *) NULL, 1); + which, 0, LOCK_READ, (char *) NULL, 1); /* clean up */ free (options); diff --git a/contrib/cvs/src/edit.c b/contrib/cvs/src/edit.c index b627105..e0995e5 100644 --- a/contrib/cvs/src/edit.c +++ b/contrib/cvs/src/edit.c @@ -89,6 +89,7 @@ watch_onoff (argc, argv) if (local) send_arg ("-l"); + send_arg ("--"); send_files (argc, argv, local, 0, SEND_NO_CONTENTS); send_file_names (argc, argv, SEND_EXPAND_WILD); send_to_server (turning_on ? "watch-on\012" : "watch-off\012", 0); @@ -102,8 +103,8 @@ watch_onoff (argc, argv) err = start_recursion (onoff_fileproc, onoff_filesdoneproc, (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, - argc, argv, local, W_LOCAL, 0, 0, (char *)NULL, - 0); + argc, argv, local, W_LOCAL, 0, LOCK_NONE, + (char *)NULL, 0); Lock_Cleanup (); return err; @@ -1125,6 +1126,7 @@ editors (argc, argv) if (local) send_arg ("-l"); + send_arg ("--"); send_files (argc, argv, local, 0, SEND_NO_CONTENTS); send_file_names (argc, argv, SEND_EXPAND_WILD); send_to_server ("editors\012", 0); diff --git a/contrib/cvs/src/filesubr.c b/contrib/cvs/src/filesubr.c index 5b9c076..381945d 100644 --- a/contrib/cvs/src/filesubr.c +++ b/contrib/cvs/src/filesubr.c @@ -52,7 +52,7 @@ copy_file (from, to) if (isdevice (from)) { -#if defined(HAVE_MKNOD) && defined(HAVE_ST_RDEV) +#if defined(HAVE_MKNOD) && defined(HAVE_STRUCT_STAT_ST_RDEV) if (stat (from, &sb) < 0) error (1, errno, "cannot stat %s", from); mknod (to, sb.st_mode, sb.st_rdev); @@ -216,7 +216,7 @@ isaccessible (file, mode) int umask = 0; int gmask = 0; int omask = 0; - int uid; + int uid, mask; if (stat(file, &sb) == -1) return 0; @@ -226,10 +226,11 @@ isaccessible (file, mode) uid = geteuid(); if (uid == 0) /* superuser */ { - if (mode & X_OK) - return sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH); - else + if (!(mode & X_OK) || (sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH))) return 1; + + errno = EACCES; + return 0; } if (mode & R_OK) @@ -251,12 +252,11 @@ isaccessible (file, mode) omask |= S_IXOTH; } - if (sb.st_uid == uid) - return (sb.st_mode & umask) == umask; - else if (sb.st_gid == getegid()) - return (sb.st_mode & gmask) == gmask; - else - return (sb.st_mode & omask) == omask; + mask = sb.st_uid == uid ? umask : sb.st_gid == getegid() ? gmask : omask; + if ((sb.st_mode & mask) == mask) + return 1; + errno = EACCES; + return 0; #else return access(file, mode) == 0; #endif @@ -624,7 +624,7 @@ xcmp (file1, file2) numbers match. */ if (S_ISBLK (sb1.st_mode) || S_ISCHR (sb1.st_mode)) { -#ifdef HAVE_ST_RDEV +#ifdef HAVE_STRUCT_STAT_ST_RDEV if (sb1.st_rdev == sb2.st_rdev) return 0; else @@ -954,6 +954,26 @@ get_homedir () return home; } +/* Compose a path to a file in the home directory. This is necessary because + * of different behavior on UNIX and VMS. See the notes in vms/filesubr.c. + * + * A more clean solution would be something more along the lines of a + * "join a directory to a filename" kind of thing which was not specific to + * the homedir. This should aid portability between UNIX, Mac, Windows, VMS, + * and possibly others. This is already handled by Perl - it might be + * interesting to see how much of the code was written in C since Perl is under + * the GPL and the Artistic license - we might be able to use it. + */ +char * +strcat_filename_onto_homedir (dir, file) + const char *dir; + const char *file; +{ + char *path = xmalloc (strlen (dir) + 1 + strlen(file) + 1); + sprintf (path, "%s/%s", dir, file); + return path; +} + /* See cvs.h for description. On unix this does nothing, because the shell expands the wildcards. */ void @@ -1098,3 +1118,5 @@ fopen_case (name, mode, fp, pathp) return retval; } #endif /* SERVER_SUPPORT */ +/* vim:tabstop=8:shiftwidth=4 + */ diff --git a/contrib/cvs/src/history.c b/contrib/cvs/src/history.c index 40b5e14..076a9b1 100644 --- a/contrib/cvs/src/history.c +++ b/contrib/cvs/src/history.c @@ -1031,7 +1031,7 @@ fill_hrec (line, hr) #ifndef STAT_BLOCKSIZE -#if HAVE_ST_BLKSIZE +#if HAVE_STRUCT_STAT_ST_BLKSIZE #define STAT_BLOCKSIZE(s) (s).st_blksize #else #define STAT_BLOCKSIZE(s) (4 * 1024) diff --git a/contrib/cvs/src/ignore.c b/contrib/cvs/src/ignore.c index b52632b..54606a9 100644 --- a/contrib/cvs/src/ignore.c +++ b/contrib/cvs/src/ignore.c @@ -89,8 +89,7 @@ ign_setup () .cvsignore is). */ if (home_dir) { - char *file = xmalloc (strlen (home_dir) + sizeof (CVSDOTIGNORE) + 10); - (void) sprintf (file, "%s/%s", home_dir, CVSDOTIGNORE); + char *file = strcat_filename_onto_homedir (home_dir, CVSDOTIGNORE); ign_add_file (file, 0); free (file); } diff --git a/contrib/cvs/src/import.c b/contrib/cvs/src/import.c index 4d8ddce..6765d8e 100644 --- a/contrib/cvs/src/import.c +++ b/contrib/cvs/src/import.c @@ -216,7 +216,11 @@ import (argc, argv) } #endif - if (use_editor) + if ( +#ifdef SERVER_SUPPORT + !server_active && +#endif + use_editor) { do_editor ((char *) NULL, &message, #ifdef CLIENT_SUPPORT @@ -247,8 +251,7 @@ import (argc, argv) if (vbranch[0] != '\0') option_with_arg ("-b", vbranch); - if (message) - option_with_arg ("-m", message); + option_with_arg ("-m", message ? message : ""); if (keyword_opt != NULL) option_with_arg ("-k", keyword_opt); /* The only ignore processing which takes place on the server side @@ -1225,7 +1228,7 @@ add_rcs_file (message, rcs, user, add_vhead, key_opt, case S_IFREG: break; case S_IFCHR: case S_IFBLK: -#ifdef HAVE_ST_RDEV +#ifdef HAVE_STRUCT_STAT_ST_RDEV if (fprintf (fprcs, "special\t%s %lu;\012", (file_type == S_IFCHR ? "character" @@ -1282,7 +1285,7 @@ userfile); case S_IFREG: break; case S_IFCHR: case S_IFBLK: -#ifdef HAVE_ST_RDEV +#ifdef HAVE_STRUCT_STAT_ST_RDEV if (fprintf (fprcs, "special\t%s %lu;\012", (file_type == S_IFCHR ? "character" diff --git a/contrib/cvs/src/lock.c b/contrib/cvs/src/lock.c index 088f206..986e0cb 100644 --- a/contrib/cvs/src/lock.c +++ b/contrib/cvs/src/lock.c @@ -635,64 +635,66 @@ readers_exist (repository) DIR *dirp; struct dirent *dp; struct stat sb; - int ret = 0; - + int ret; #ifdef CVS_FUDGELOCKS -again: + time_t now; + (void) time (&now); #endif - if ((dirp = CVS_OPENDIR (repository)) == NULL) - error (1, 0, "cannot open directory %s", repository); + do { + if ((dirp = CVS_OPENDIR (repository)) == NULL) + error (1, 0, "cannot open directory %s", repository); - errno = 0; - while ((dp = CVS_READDIR (dirp)) != NULL) - { - if (CVS_FNMATCH (CVSRFLPAT, dp->d_name, 0) == 0) + ret = 0; + errno = 0; + while ((dp = CVS_READDIR (dirp)) != NULL) { -#ifdef CVS_FUDGELOCKS - time_t now; - (void) time (&now); -#endif - - line = xmalloc (strlen (repository) + strlen (dp->d_name) + 5); - (void) sprintf (line, "%s/%s", repository, dp->d_name); - if ( CVS_STAT (line, &sb) != -1) + if (CVS_FNMATCH (CVSRFLPAT, dp->d_name, 0) == 0) { + /* ignore our own readlock, if any */ + if (readlock && strcmp (readlock, dp->d_name) == 0) + continue; + + line = xmalloc (strlen (repository) + strlen (dp->d_name) + 5); + (void) sprintf (line, "%s/%s", repository, dp->d_name); + if ( CVS_STAT (line, &sb) != -1) + { #ifdef CVS_FUDGELOCKS - /* - * If the create time of the file is more than CVSLCKAGE - * seconds ago, try to clean-up the lock file, and if - * successful, re-open the directory and try again. - */ - if (now >= (sb.st_ctime + CVSLCKAGE) && CVS_UNLINK (line) != -1) + /* + * If the create time of the file is more than CVSLCKAGE + * seconds ago, try to clean-up the lock file, and if + * successful, re-open the directory and try again. + */ + if (now >= (sb.st_ctime + CVSLCKAGE) && + CVS_UNLINK (line) != -1) + { + free (line); + ret = -1; + break; + } +#endif + set_lockers_name (&sb); + } + else { - (void) CVS_CLOSEDIR (dirp); - free (line); - goto again; + /* If the file doesn't exist, it just means that it disappeared + between the time we did the readdir and the time we did + the stat. */ + if (!existence_error (errno)) + error (0, errno, "cannot stat %s", line); } -#endif - set_lockers_name (&sb); - } - else - { - /* If the file doesn't exist, it just means that it disappeared - between the time we did the readdir and the time we did - the stat. */ - if (!existence_error (errno)) - error (0, errno, "cannot stat %s", line); + errno = 0; + free (line); + ret = 1; + break; } errno = 0; - free (line); - - ret = 1; - break; } - errno = 0; - } - if (errno != 0) - error (0, errno, "error reading directory %s", repository); + if (errno != 0) + error (0, errno, "error reading directory %s", repository); - CVS_CLOSEDIR (dirp); + CVS_CLOSEDIR (dirp); + } while (ret < 0); return (ret); } @@ -837,10 +839,13 @@ lock_wait (repos) { time_t now; char *msg; + struct tm *tm_p; (void) time (&now); + tm_p = gmtime (&now); msg = xmalloc (100 + strlen (lockers_name) + strlen (repos)); - sprintf (msg, "[%8.8s] waiting for %s's lock in %s", ctime (&now) + 11, + sprintf (msg, "[%8.8s] waiting for %s's lock in %s", + (tm_p ? asctime (tm_p) : ctime (&now)) + 11, lockers_name, repos); error (0, 0, "%s", msg); /* Call cvs_flusherr to ensure that the user sees this message as @@ -859,10 +864,13 @@ lock_obtained (repos) { time_t now; char *msg; + struct tm *tm_p; (void) time (&now); + tm_p = gmtime (&now); msg = xmalloc (100 + strlen (repos)); - sprintf (msg, "[%8.8s] obtained lock in %s", ctime (&now) + 11, repos); + sprintf (msg, "[%8.8s] obtained lock in %s", + (tm_p ? asctime (tm_p) : ctime (&now)) + 11, repos); error (0, 0, "%s", msg); /* Call cvs_flusherr to ensure that the user sees this message as soon as possible. */ @@ -917,7 +925,8 @@ lock_tree_for_write (argc, argv, local, which, aflag) lock_tree_list = getlist (); err = start_recursion ((FILEPROC) NULL, lock_filesdoneproc, (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, argc, - argv, local, which, aflag, 0, (char *) NULL, 0); + argv, local, which, aflag, LOCK_NONE, + (char *) NULL, 0); sortlist (lock_tree_list, fsortcmp); if (Writer_Lock (lock_tree_list) != 0) error (1, 0, "lock failed - giving up"); diff --git a/contrib/cvs/src/log.c b/contrib/cvs/src/log.c index ad780bb..c7e5600 100644 --- a/contrib/cvs/src/log.c +++ b/contrib/cvs/src/log.c @@ -383,6 +383,7 @@ cvslog (argc, argv) dellist (&log_data.statelist); send_arg_list ("-w", log_data.authorlist); dellist (&log_data.authorlist); + send_arg ("--"); if (is_rlog) { @@ -549,7 +550,7 @@ rlog_proc (argc, argv, xwhere, mwhere, mfile, shorten, local, mname, msg) err = start_recursion (log_fileproc, (FILESDONEPROC) NULL, log_dirproc, (DIRLEAVEPROC) NULL, (void *) &log_data, - argc - 1, argv + 1, local, which, 0, 1, + argc - 1, argv + 1, local, which, 0, LOCK_READ, where, 1); return err; } @@ -753,7 +754,7 @@ log_parse_list (plist, argstring) len = cp - argstring; p->key = xmalloc (len + 1); strncpy (p->key, argstring, len); - p->key[len + 1] = '\0'; + p->key[len] = '\0'; } if (*plist == NULL) @@ -1108,21 +1109,26 @@ log_expand_revlist (rcs, revlist, default_branch) does. This code is a bit cryptic for my tastes, but keeping the same implementation as rlog ensures a certain degree of compatibility. */ - if (r->first == NULL && nr->last != NULL) + if (r->first == NULL) { - nr->fields = numdots (nr->last) + 1; - if (nr->fields < 2) - nr->first = xstrdup (".0"); + if (nr->last == NULL) + nr->fields = 0; else { - char *cp; - - nr->first = xstrdup (nr->last); - cp = strrchr (nr->first, '.'); - strcpy (cp, ".0"); + nr->fields = numdots (nr->last) + 1; + if (nr->fields < 2) + nr->first = xstrdup (".0"); + else + { + char *cp; + + nr->first = xstrdup (nr->last); + cp = strrchr (nr->first, '.'); + strcpy (cp + 1, "0"); + } } } - else if (r->last == NULL && nr->first != NULL) + else if (r->last == NULL) { nr->fields = numdots (nr->first) + 1; nr->last = xstrdup (nr->first); @@ -1136,13 +1142,30 @@ log_expand_revlist (rcs, revlist, default_branch) *cp = '\0'; } } - else if (nr->first != NULL && nr->last != NULL) + else if (nr->first == NULL || nr->last == NULL) + nr->fields = 0; + else if (strcmp (nr->first, nr->last) == 0) + nr->fields = numdots (nr->last) + 1; + else { - nr->fields = numdots (nr->first) + 1; - if (nr->fields != numdots (nr->last) + 1 - || (nr->fields > 2 - && version_compare (nr->first, nr->last, - nr->fields - 1) != 0)) + int ord; + int dots1 = numdots (nr->first); + int dots2 = numdots (nr->last); + if (dots1 > dots2 || (dots1 == dots2 && + version_compare (nr->first, nr->last, dots1 + 1) > 0)) + { + char *tmp = nr->first; + nr->first = nr->last; + nr->last = tmp; + nr->fields = dots2 + 1; + dots2 = dots1; + dots1 = nr->fields - 1; + } + else + nr->fields = dots1 + 1; + dots1 += (nr->fields & 1); + ord = version_compare (nr->first, nr->last, dots1); + if (ord > 0 || (nr->fields > 2 && ord < 0)) { error (0, 0, "invalid branch or revision pair %s:%s in `%s'", @@ -1153,17 +1176,46 @@ log_expand_revlist (rcs, revlist, default_branch) nr->last = NULL; nr->fields = 0; } - else if (version_compare (nr->first, nr->last, nr->fields) > 0) + else { - char *tmp; - - tmp = nr->first; - nr->first = nr->last; - nr->last = tmp; + if (nr->fields <= dots2 && (nr->fields & 1)) + { + char *p = xmalloc (strlen (nr->first) + 3); + strcpy (p, nr->first); + strcat (p, ".0"); + free (nr->first); + nr->first = p; + ++nr->fields; + } + while (nr->fields <= dots2) + { + char *p; + int i; + + nr->next = NULL; + *pr = nr; + nr = (struct revlist *) xmalloc (sizeof *nr); + nr->inclusive = 1; + nr->first = xstrdup ((*pr)->last); + nr->last = xstrdup ((*pr)->last); + nr->fields = (*pr)->fields; + p = (*pr)->last; + for (i = 0; i < nr->fields; i++) + p = strchr (p, '.') + 1; + p[-1] = '\0'; + p = strchr (nr->first + (p - (*pr)->last), '.'); + if (p != NULL) + { + *++p = '0'; + *++p = '\0'; + nr->fields += 2; + } + else + ++nr->fields; + pr = &(*pr)->next; + } } } - else - nr->fields = 0; } nr->next = NULL; diff --git a/contrib/cvs/src/login.c b/contrib/cvs/src/login.c index b23d767..4d395dd 100644 --- a/contrib/cvs/src/login.c +++ b/contrib/cvs/src/login.c @@ -65,17 +65,7 @@ construct_cvspass_filename () return (char *) NULL; } - passfile = - (char *) xmalloc (strlen (homedir) + strlen (CVS_PASSWORD_FILE) + 3); - strcpy (passfile, homedir); -#ifndef NO_SLASH_AFTER_HOME - /* NO_SLASH_AFTER_HOME is defined for VMS, where foo:[bar]/.cvspass is not - a legal filename but foo:[bar].cvspass is. A more clean solution would - be something more along the lines of a "join a directory to a filename" - kind of thing.... */ - strcat (passfile, "/"); -#endif - strcat (passfile, CVS_PASSWORD_FILE); + passfile = strcat_filename_onto_homedir (homedir, CVS_PASSWORD_FILE); /* Safety first and last, Scouts. */ if (isfile (passfile)) @@ -313,6 +303,8 @@ password_entry_operation (operation, root, newpassword) error (1, 0, "CVSROOT: %s", root->original); } + cvsroot_canonical = normalize_cvsroot (root); + /* Yes, the method below reads the user's password file twice when we have * to delete an entry. It's inefficient, but we're not talking about a gig of * data here. @@ -326,8 +318,6 @@ password_entry_operation (operation, root, newpassword) goto process; } - cvsroot_canonical = normalize_cvsroot (root); - /* Check each line to see if we have this entry already. */ line = 0; while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0) diff --git a/contrib/cvs/src/logmsg.c b/contrib/cvs/src/logmsg.c index f9d47cd..5296e24 100644 --- a/contrib/cvs/src/logmsg.c +++ b/contrib/cvs/src/logmsg.c @@ -134,7 +134,7 @@ fmt_proc (p, closure) { if (col > 0) (void) fprintf (fp, "\n"); - (void) fprintf (fp, "%s", prefix); + (void) fputs (prefix, fp); col = strlen (prefix); while (col < 6) { @@ -195,8 +195,11 @@ do_editor (dir, messagep, repository, changes) struct stat pre_stbuf, post_stbuf; int retcode = 0; - assert (current_parsed_root->isremote && !repository - || !current_parsed_root->isremote && repository); +#ifdef CLIENT_SUPPORT + assert (!current_parsed_root->isremote != !repository); +#else + assert (repository); +#endif if (noexec || reuse_log_message) return; @@ -216,7 +219,7 @@ do_editor (dir, messagep, repository, changes) if (*messagep) { - (void) fprintf (fp, "%s", *messagep); + (void) fputs (*messagep, fp); if ((*messagep)[0] == '\0' || (*messagep)[strlen (*messagep) - 1] != '\n') @@ -351,16 +354,16 @@ do_editor (dir, messagep, repository, changes) if (fclose (fp) < 0) error (0, errno, "warning: cannot close %s", fname); - if (pre_stbuf.st_mtime == post_stbuf.st_mtime || - *messagep == NULL || - (*messagep)[0] == '\0' || - strcmp (*messagep, "\n") == 0) + /* canonicalize emply messages */ + if (*messagep != NULL && + (**messagep == '\0' || strcmp (*messagep, "\n") == 0)) + { + free (*messagep); + *messagep = NULL; + } + + if (pre_stbuf.st_mtime == post_stbuf.st_mtime || *messagep == NULL) { - if (*messagep) - { - free (*messagep); - *messagep = NULL; - } for (;;) { (void) printf ("\nLog message unchanged or not specified\n"); @@ -429,13 +432,13 @@ do_verify (messagep, repository) if (noexec) return; - /* If there's no message, then we have nothing to verify. Can this - case happen? And if so why would we print a message? */ - if (*messagep == NULL) - { - cvs_output ("No message to verify\n", 0); + /* Get the name of the verification script to run */ + + if (repository != NULL) + (void) Parse_Info (CVSROOTADM_VERIFYMSG, repository, + verifymsg_proc, 0); + if (!verifymsg_script) return; - } /* open a temporary file, write the message to the temp file, and close the file. */ @@ -443,10 +446,12 @@ do_verify (messagep, repository) if ((fp = cvs_temp_file (&fname)) == NULL) error (1, errno, "cannot create temporary file %s", fname); - fprintf (fp, "%s", *messagep); - if ((*messagep)[0] == '\0' || + if (*messagep != NULL) + fputs (*messagep, fp); + if (*messagep == NULL || + (*messagep)[0] == '\0' || (*messagep)[strlen (*messagep) - 1] != '\n') - (void) fprintf (fp, "%s", "\n"); + putc ('\n', fp); if (fclose (fp) == EOF) error (1, errno, "%s", fname); @@ -463,28 +468,17 @@ do_verify (messagep, repository) sleep_past (pre_stbuf.st_mtime); } - /* Get the name of the verification script to run */ - - if (repository != NULL) - (void) Parse_Info (CVSROOTADM_VERIFYMSG, repository, - verifymsg_proc, 0); - - /* Run the verification script */ - - if (verifymsg_script) + run_setup (verifymsg_script); + run_arg (fname); + if ((retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, + RUN_NORMAL | RUN_SIGIGNORE)) != 0) { - run_setup (verifymsg_script); - run_arg (fname); - if ((retcode = run_exec (RUN_TTY, RUN_TTY, RUN_TTY, - RUN_NORMAL | RUN_SIGIGNORE)) != 0) - { - /* Since following error() exits, delete the temp file now. */ - if (unlink_file (fname) < 0) - error (0, errno, "cannot remove %s", fname); + /* Since following error() exits, delete the temp file now. */ + if (unlink_file (fname) < 0) + error (0, errno, "cannot remove %s", fname); - error (1, retcode == -1 ? errno : 0, - "Message verification failed"); - } + error (1, retcode == -1 ? errno : 0, + "Message verification failed"); } /* Get the mod time and size of the possibly new log message @@ -506,8 +500,6 @@ do_verify (messagep, repository) pre_stbuf.st_size != post_stbuf.st_size))) { /* put the entire message back into the *messagep variable */ - if ( (fp = open_file (fname, "r")) == NULL ) - error (1, errno, "cannot open temporary file %s", fname); if (*messagep) free (*messagep); @@ -515,18 +507,18 @@ do_verify (messagep, repository) *messagep = NULL; else { - /* On NT, we might read less than st_size bytes, - but we won't read more. So this works. */ - *messagep = (char *) xmalloc (post_stbuf.st_size + 1); - *messagep[0] = '\0'; - } - - if (*messagep) - { char *line = NULL; int line_length; size_t line_chars_allocated = 0; - char *p = *messagep; + char *p; + + if ( (fp = open_file (fname, "r")) == NULL ) + error (1, errno, "cannot open temporary file %s", fname); + + /* On NT, we might read less than st_size bytes, + but we won't read more. So this works. */ + p = *messagep = (char *) xmalloc (post_stbuf.st_size + 1); + *messagep[0] = '\0'; while (1) { @@ -548,9 +540,9 @@ do_verify (messagep, repository) p += line_length; } if (line) free (line); + if (fclose (fp) < 0) + error (0, errno, "warning: cannot close %s", fname); } - if (fclose (fp) < 0) - error (0, errno, "warning: cannot close %s", fname); } /* Delete the temp file */ @@ -712,6 +704,11 @@ title_proc (p, closure) fields). This way if future CVS versions add formatting characters, one can write a loginfo file which at least won't blow up on an old CVS. */ + /* Note that people who have to deal with spaces in file + and directory names are using space to get a known + delimiter for the directory name, so it's probably + not a good idea to ever define that as a formatting + character. */ } if (*(c + 1) != '\0') { diff --git a/contrib/cvs/src/main.c b/contrib/cvs/src/main.c index 6d7be2f..e925142 100644 --- a/contrib/cvs/src/main.c +++ b/contrib/cvs/src/main.c @@ -545,7 +545,7 @@ main (argc, argv) version (0, (char **) NULL); (void) fputs ("\n", stdout); (void) fputs ("\ -Copyright (c) 1989-2001 Brian Berliner, david d `zoo' zuhn, \n\ +Copyright (c) 1989-2002 Brian Berliner, david d `zoo' zuhn, \n\ Jeff Polk, and other authors\n", stdout); (void) fputs ("\n", stdout); (void) fputs ("CVS may be copied only under the terms of the GNU General Public License,\n", stdout); @@ -678,7 +678,9 @@ Copyright (c) 1989-2001 Brian Berliner, david d `zoo' zuhn, \n\ CVSUMASK_ENV, cp); } -#if defined (HAVE_KERBEROS) && defined (SERVER_SUPPORT) +#ifdef SERVER_SUPPORT + +# ifdef HAVE_KERBEROS /* If we are invoked with a single argument "kserver", then we are running as Kerberos server as root. Do the authentication as the very first thing, to minimize the amount of time we are @@ -690,10 +692,10 @@ Copyright (c) 1989-2001 Brian Berliner, david d `zoo' zuhn, \n\ /* Pretend we were invoked as a plain server. */ command_name = "server"; } -#endif /* HAVE_KERBEROS */ +# endif /* HAVE_KERBEROS */ -#if (defined(AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)) && defined(SERVER_SUPPORT) +# if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI) if (strcmp (command_name, "pserver") == 0) { /* The reason that --allow-root is not a command option @@ -710,11 +712,11 @@ Copyright (c) 1989-2001 Brian Berliner, david d `zoo' zuhn, \n\ /* Pretend we were invoked as a plain server. */ command_name = "server"; } -#endif /* (AUTH_SERVER_SUPPORT || HAVE_GSSAPI) && SERVER_SUPPORT */ +# endif /* AUTH_SERVER_SUPPORT || HAVE_GSSAPI */ -#ifdef SERVER_SUPPORT server_active = strcmp (command_name, "server") == 0; -#endif + +#endif /* SERVER_SUPPORT */ /* This is only used for writing into the history file. For remote connections, it might be nice to have hostname @@ -1007,7 +1009,10 @@ Copyright (c) 1989-2001 Brian Berliner, david d `zoo' zuhn, \n\ #ifdef SERVER_SUPPORT if (server_active) - break; + { + server_active = 0; + break; + } #endif } /* end of loop for cvsroot values */ diff --git a/contrib/cvs/src/myndbm.c b/contrib/cvs/src/myndbm.c index 600b3aa..69c0836 100644 --- a/contrib/cvs/src/myndbm.c +++ b/contrib/cvs/src/myndbm.c @@ -33,7 +33,8 @@ mydbm_open (file, flags, mode) FILE *fp; DBM *db; - fp = CVS_FOPEN (file, FOPEN_BINARY_READ); + fp = CVS_FOPEN (file, (flags & O_ACCMODE) != O_RDONLY ? + FOPEN_BINARY_READWRITE : FOPEN_BINARY_READ); if (fp == NULL && !(existence_error (errno) && (flags & O_CREAT))) return ((DBM *) 0); diff --git a/contrib/cvs/src/options.h b/contrib/cvs/src/options.h new file mode 100644 index 0000000..6a0219e --- /dev/null +++ b/contrib/cvs/src/options.h @@ -0,0 +1,79 @@ +/* + * Copyright (c) 1992, Brian Berliner and Jeff Polk + * 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 source distribution. + * + * This file holds (most of) the configuration tweaks that can be made to + * customize CVS for your site. CVS comes configured for a typical SunOS 4.x + * environment. The comments for each configurable item are intended to be + * self-explanatory. All #defines are tested first to see if an over-riding + * option was specified on the "make" command line. + * + * If special libraries are needed, you will have to edit the Makefile.in file + * or the configure script directly. Sorry. + */ + +/* By default, CVS stores its modules and other such items in flat + text files (MY_NDBM enables this). Turning off MY_NDBM causes CVS + to look for a system-supplied ndbm database library and use it + instead. That may speed things up, but the default setting + generally works fine too. */ + +#ifndef MY_NDBM +#define MY_NDBM +#endif + +/* + * The cvs admin command is restricted to the members of the group + * CVS_ADMIN_GROUP. If this group does not exist, all users are + * allowed to run cvs admin. To disable the cvs admin for all users, + * create an empty group CVS_ADMIN_GROUP. To disable access control + * for cvs admin, comment out the define below. + */ +#ifndef CVS_ADMIN_GROUP +#define CVS_ADMIN_GROUP "cvsadmin" +#endif + +/* + * When locking the repository, some sites like to remove locks and + * assume the program that created them went away if the lock has + * existed for a long time. This used to be the default for previous + * versions of CVS. CVS now attempts to be much more robust, so lock + * files should not be left around by mistake. The new behaviour will + * never remove old locks (they must now be removed by hand). + * Enabling CVS_FUDGELOCKS will cause CVS to remove locks that are + * older than CVSLCKAGE seconds. + * + * Use of this option is NOT recommended. + */ +#ifndef CVS_FUDGELOCKS +/* #define CVS_FUDGELOCKS */ +#endif + +/* Define this to enable the SETXID support. The way to use this is + to create a group with no users in it (except perhaps cvs + administrators), set the cvs executable to setgid that group, chown + all the repository files to that group, and change all directory + permissions in the repository to 770. The last person to modify a + file will own it, but as long as directory permissions are set + right that won't matter. You'll need a system which inherits file + groups from the parent directory (WARNING: using the wrong kind of + system (I think Solaris 2.4 is the wrong kind, for example) will + create a security hole! You will receive no warning other than the + fact that files in the working directory are owned by the group + which cvs is setgid to). + + One security hole which has been reported is that setgid is not + turned off when the editor is invoked--most editors provide a way + to execute a shell, or the user can specify an editor (this one is + large enough to drive a truck through). Don't assume that the + holes described here are the only ones; I don't know how carefully + SETXID has been inspected for security holes. */ +#ifndef SETXID_SUPPORT +/* #define SETXID_SUPPORT */ +#endif + + +/* End of CVS configuration section */ diff --git a/contrib/cvs/src/patch.c b/contrib/cvs/src/patch.c index 8852f3d..4a027a1 100644 --- a/contrib/cvs/src/patch.c +++ b/contrib/cvs/src/patch.c @@ -356,7 +356,7 @@ patch_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified, err = start_recursion (patch_fileproc, (FILESDONEPROC) NULL, patch_dirproc, (DIRLEAVEPROC) NULL, NULL, argc - 1, argv + 1, local_specified, - which, 0, 1, where, 1); + which, 0, LOCK_READ, where, 1); free (where); return (err); diff --git a/contrib/cvs/src/rcs.c b/contrib/cvs/src/rcs.c index f087187..7105540 100644 --- a/contrib/cvs/src/rcs.c +++ b/contrib/cvs/src/rcs.c @@ -19,6 +19,9 @@ # ifndef HAVE_GETPAGESIZE # include "getpagesize.h" # endif +# ifndef MAP_FAILED +# define MAP_FAILED NULL +# endif #endif int preserve_perms = 0; @@ -1092,7 +1095,8 @@ rcsbuf_getkey (rcsbuf, keyp, valp) ptrend = rcsbuf->ptrend; /* Sanity check. */ - assert (ptr >= rcsbuf_buffer && ptr < rcsbuf_buffer + rcsbuf_buffer_size); + assert (ptr >= rcsbuf_buffer && ptr <= rcsbuf_buffer + rcsbuf_buffer_size); + assert (ptrend >= rcsbuf_buffer && ptrend <= rcsbuf_buffer + rcsbuf_buffer_size); #ifndef HAVE_MMAP /* If the pointer is more than RCSBUF_BUFSIZE bytes into the @@ -1586,10 +1590,6 @@ rcsbuf_fill (rcsbuf, ptr, keyp, valp) poff = ptr - rcsbuf_buffer; peoff = rcsbuf->ptrend - rcsbuf_buffer; - if (keyp != NULL && *keyp != NULL) - koff = *keyp - rcsbuf_buffer; - if (valp != NULL && *valp != NULL) - voff = *valp - rcsbuf_buffer; koff = keyp == NULL ? 0 : *keyp - rcsbuf_buffer; voff = valp == NULL ? 0 : *valp - rcsbuf_buffer; @@ -1598,9 +1598,9 @@ rcsbuf_fill (rcsbuf, ptr, keyp, valp) ptr = rcsbuf_buffer + poff; rcsbuf->ptrend = rcsbuf_buffer + peoff; - if (keyp != NULL && *keyp != NULL) + if (keyp != NULL) *keyp = rcsbuf_buffer + koff; - if (valp != NULL && *valp != NULL) + if (valp != NULL) *valp = rcsbuf_buffer + voff; } @@ -5008,7 +5008,7 @@ RCS_checkin (rcs, workfile, message, rev, flags) delta->other_delta = getlist(); if (CVS_LSTAT (workfile, &sb) < 0) - error (1, 1, "cannot lstat %s", workfile); + error (1, errno, "cannot lstat %s", workfile); if (S_ISLNK (sb.st_mode)) { @@ -5047,7 +5047,7 @@ RCS_checkin (rcs, workfile, message, rev, flags) case S_IFREG: break; case S_IFCHR: case S_IFBLK: -# ifdef HAVE_ST_RDEV +# ifdef HAVE_STRUCT_STAT_ST_RDEV np = getnode(); np->type = RCSFIELD; np->key = xstrdup ("special"); @@ -8379,13 +8379,12 @@ rcs_internal_unlockfile (fp, rcsfile) corrupting the repository. */ if (ferror (fp)) - /* The only case in which using errno here would be meaningful - is if we happen to have left errno unmolested since the call - which produced the error (e.g. fprintf). That is pretty - fragile even if it happens to sometimes be true. The real - solution is to check each call to fprintf rather than waiting + /* Using errno here may well be misleanding since the most recent + call that set errno may not have anything whatsoever to do with + the error that set the flag, but it's better than nothing. The + real solution is to check each call to fprintf rather than waiting until the end like this. */ - error (1, 0, "error writing to lock file %s", rcs_lockfile); + error (1, errno, "error writing to lock file %s", rcs_lockfile); if (fclose (fp) == EOF) error (1, errno, "error closing lock file %s", rcs_lockfile); rcs_lockfd = -1; diff --git a/contrib/cvs/src/rcscmds.c b/contrib/cvs/src/rcscmds.c index 43be168..178913e 100644 --- a/contrib/cvs/src/rcscmds.c +++ b/contrib/cvs/src/rcscmds.c @@ -452,7 +452,7 @@ RCS file: ", 0); } RCS_output_diff_options (opts, rev1, rev2, workfile); - status = diff_execv (tmpfile1, use_file2, label1, label2, opts, RUN_TTY); + status = diff_exec (tmpfile1, use_file2, label1, label2, opts, RUN_TTY); if (status >= 0) { retval = status; @@ -581,55 +581,7 @@ diff_exec (file1, file2, label1, label2, options, out) call_diff_arg (label1); if (label2) call_diff_arg (label2); - call_diff_arg (file1); - call_diff_arg (file2); - free (args); - - return call_diff (out); -} - -int -diff_execv (file1, file2, label1, label2, options, out) - char *file1; - char *file2; - char *label1; - char *label2; - char *options; - char *out; -{ - char *args; - -#ifdef PRESERVE_PERMISSIONS_SUPPORT - /* Pretend that special files are /dev/null for purposes of making - diffs. See comments in diff_exec. */ - - if (preserve_perms && - strcmp (file1, DEVNULL) != 0 && - strcmp (file2, DEVNULL) != 0) - { - struct stat sb1, sb2; - - if (CVS_LSTAT (file1, &sb1) < 0) - error (1, errno, "cannot get file information for %s", file1); - if (CVS_LSTAT (file2, &sb2) < 0) - error (1, errno, "cannot get file information for %s", file2); - - if (!S_ISREG (sb1.st_mode) && !S_ISDIR (sb1.st_mode)) - file1 = DEVNULL; - if (!S_ISREG (sb2.st_mode) && !S_ISDIR (sb2.st_mode)) - file2 = DEVNULL; - } -#endif - - args = xmalloc (strlen (options) + 10); - /* The first word in this string is used only for error reporting. */ - /* I guess we are pretty confident that options starts with a space. */ - sprintf (args, "diff%s", options); - call_diff_setup (args); - if (label1) - call_diff_arg (label1); - if (label2) - call_diff_arg (label2); + call_diff_arg ("--"); call_diff_arg (file1); call_diff_arg (file2); free (args); diff --git a/contrib/cvs/src/recurse.c b/contrib/cvs/src/recurse.c index 200cbf6..e7cb861 100644 --- a/contrib/cvs/src/recurse.c +++ b/contrib/cvs/src/recurse.c @@ -33,7 +33,7 @@ struct recursion_frame { Dtype flags; int which; int aflag; - int readlock; + int locktype; int dosrcs; }; @@ -66,7 +66,7 @@ struct frame_and_entries { default to ".". */ int start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat, - argc, argv, local, which, aflag, readlock, + argc, argv, local, which, aflag, locktype, update_preload, dosrcs) FILEPROC fileproc; FILESDONEPROC filesdoneproc; @@ -102,7 +102,7 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat, int which; int aflag; - int readlock; + int locktype; char *update_preload; int dosrcs; { @@ -121,7 +121,7 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat, frame.flags = local ? R_SKIP_DIRS : R_PROCESS; frame.which = which; frame.aflag = aflag; - frame.readlock = readlock; + frame.locktype = locktype; frame.dosrcs = dosrcs; expand_wild (argc, argv, &argc, &argv); @@ -504,14 +504,14 @@ do_recursion (frame) int dodoneproc = 1; char *srepository; List *entries = NULL; - int should_readlock; + int locktype; int process_this_directory = 1; /* do nothing if told */ if (frame->flags == R_SKIP_ALL) return (0); - should_readlock = noexec ? 0 : frame->readlock; + locktype = noexec ? LOCK_NONE : frame->locktype; /* The fact that locks are not active here is what makes us fail to have the @@ -549,11 +549,9 @@ do_recursion (frame) /* * Now would be a good time to check to see if we need to stop * generating data, to give the buffers a chance to drain to the - * remote client. We should not have locks active at this point. - */ - if (server_active - /* If there are writelocks around, we cannot pause here. */ - && (should_readlock || noexec)) + * remote client. We should not have locks active at this point, + * but if there are writelocks around, we cannot pause here. */ + if (server_active && locktype != LOCK_NONE) server_pause_check(); #endif @@ -706,8 +704,16 @@ do_recursion (frame) struct frame_and_file frfile; /* read lock it if necessary */ - if (should_readlock && repository && Reader_Lock (repository) != 0) - error (1, 0, "read lock failed - giving up"); + if (repository) + { + if (locktype == LOCK_READ) + { + if (Reader_Lock (repository) != 0) + error (1, 0, "read lock failed - giving up"); + } + else if (locktype == LOCK_WRITE) + lock_dir_for_write (repository); + } #ifdef CLIENT_SUPPORT /* For the server, we handle notifications in a completely different @@ -730,7 +736,7 @@ do_recursion (frame) err += walklist (filelist, do_file_proc, &frfile); /* unlock it */ - if (should_readlock) + if (locktype != LOCK_NONE) Lock_Cleanup (); /* clean up */ diff --git a/contrib/cvs/src/remove.c b/contrib/cvs/src/remove.c index 691d141..c9224bd 100644 --- a/contrib/cvs/src/remove.c +++ b/contrib/cvs/src/remove.c @@ -90,7 +90,7 @@ cvsremove (argc, argv) start_recursion (remove_force_fileproc, (FILESDONEPROC) NULL, (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, (void *) NULL, argc, argv, local, W_LOCAL, - 0, 0, (char *) NULL, 0); + 0, LOCK_NONE, (char *) NULL, 0); } /* else FIXME should probably act as if the file doesn't exist in doing the following checks. */ @@ -100,6 +100,7 @@ cvsremove (argc, argv) ign_setup (); if (local) send_arg("-l"); + send_arg ("--"); /* FIXME: Can't we set SEND_NO_CONTENTS here? Needs investigation. */ send_files (argc, argv, local, 0, 0); send_file_names (argc, argv, 0); @@ -113,7 +114,7 @@ cvsremove (argc, argv) err = start_recursion (remove_fileproc, (FILESDONEPROC) NULL, remove_dirproc, (DIRLEAVEPROC) NULL, NULL, argc, argv, - local, W_LOCAL, 0, 1, (char *) NULL, 1); + local, W_LOCAL, 0, LOCK_READ, (char *) NULL, 1); if (removed_files && !really_quiet) error (0, 0, "use '%s commit' to remove %s permanently", program_name, diff --git a/contrib/cvs/src/root.c b/contrib/cvs/src/root.c index 1a6d648..9bbbe47 100644 --- a/contrib/cvs/src/root.c +++ b/contrib/cvs/src/root.c @@ -1,5 +1,6 @@ /* * Copyright (c) 1992, Mark D. Baushke + * Copyright (c) 2002, Derek R. Price * * You may distribute under the terms of the GNU General Public License as * specified in the README file that comes with the CVS source distribution. @@ -208,18 +209,7 @@ root_allow_add (arg) printf ("E Fatal server error, aborting.\n\ error ENOMEM Virtual memory exhausted.\n"); - /* I'm doing this manually rather than via error_exit () - because I'm not sure whether we want to call server_cleanup. - Needs more investigation.... */ - -#ifdef SYSTEM_CLEANUP - /* Hook for OS-specific behavior, for example socket - subsystems on NT and OS2 or dealing with windows - and arguments on Mac. */ - SYSTEM_CLEANUP (); -#endif - - exit (EXIT_FAILURE); + error_exit (); } } p = malloc (strlen (arg) + 1); @@ -270,22 +260,11 @@ error 0 Server configuration missing --allow-root in inetd.conf\n"); /* This global variable holds the global -d option. It is NULL if -d was not used, which means that we must get the CVSroot information from the CVSROOT environment variable or from a CVS/Root file. */ - char *CVSroot_cmdline; -/* Parse a CVSROOT variable into its constituent parts -- method, - * username, hostname, directory. The prototypical CVSROOT variable - * looks like: - * - * :method:user@host:path - * - * Some methods may omit fields; local, for example, doesn't need user - * and host. - * - * Returns pointer to new cvsroot_t on success, NULL on failure. */ - +/* FIXME - Deglobalize this. */ cvsroot_t *current_parsed_root = NULL; @@ -347,7 +326,27 @@ free_cvsroot_t (root) /* - * parse a CVSROOT string to allocate and return a new cvsroot_t structure + * Parse a CVSROOT string to allocate and return a new cvsroot_t structure. + * Valid specifications are: + * + * :(gserver|kserver|pserver):[[user][:password]@]host[:[port]]/path + * [:(ext|server):][[user]@]host[:]/path + * [:local:[e:]]/path + * :fork:/path + * + * INPUTS + * root_in C String containing the CVSROOT to be parsed. + * + * RETURNS + * A pointer to a newly allocated cvsroot_t structure upon success and + * NULL upon failure. The caller is responsible for disposing of + * new structures with a call to free_cvsroot_t(). + * + * NOTES + * This would have been a lot easier to write in Perl. + * + * SEE ALSO + * free_cvsroot_t() */ cvsroot_t * parse_cvsroot (root_in) @@ -388,7 +387,6 @@ parse_cvsroot (root_in) if (! (p = strchr (method, ':'))) { error (0, 0, "No closing `:' on method in CVSROOT."); - free (cvsroot_save); goto error_exit; } *p = '\0'; @@ -413,22 +411,16 @@ parse_cvsroot (root_in) else { error (0, 0, "Unknown method (`%s') in CVSROOT.", method); - free (cvsroot_save); goto error_exit; } } else { - /* If the method isn't specified, assume - SERVER_METHOD/EXT_METHOD if the string looks like a relative path or - LOCAL_METHOD otherwise. */ + /* If the method isn't specified, assume EXT_METHOD if the string looks + like a relative path and LOCAL_METHOD otherwise. */ newroot->method = ((*cvsroot_copy != '/' && strchr (cvsroot_copy, '/')) -/*#ifdef RSH_NOT_TRANSPARENT - ? server_method -#else*/ ? ext_method -/*#endif*/ : local_method); } @@ -450,7 +442,6 @@ parse_cvsroot (root_in) error (0, 0, "CVSROOT requires a path spec:"); error (0, 0, ":(gserver|kserver|pserver):[[user][:password]@]host[:[port]]/path"); error (0, 0, "[:(ext|server):][[user]@]host[:]/path"); - free (cvsroot_save); goto error_exit; } firstslash = p; /* == NULL if '/' not in string */ @@ -467,6 +458,7 @@ parse_cvsroot (root_in) newroot->password = xstrdup (++q); /* Don't check for *newroot->password == '\0' since * a user could conceivably wish to specify a blank password + * * (newroot->password == NULL means to use the * password from .cvspass) */ @@ -499,7 +491,6 @@ parse_cvsroot (root_in) error (0, 0, "CVSROOT may only specify a positive, non-zero, integer port (not `%s').", p); error (0, 0, "Perhaps you entered a relative pathname?"); - free (cvsroot_save); goto error_exit; } } @@ -508,7 +499,6 @@ parse_cvsroot (root_in) error (0, 0, "CVSROOT may only specify a positive, non-zero, integer port (not `%s').", p); error (0, 0, "Perhaps you entered a relative pathname?"); - free (cvsroot_save); goto error_exit; } } @@ -528,7 +518,6 @@ parse_cvsroot (root_in) /* parse the path for all methods */ newroot->directory = xstrdup(cvsroot_copy); - free (cvsroot_save); /* * Do various sanity checks. @@ -663,9 +652,11 @@ parse_cvsroot (root_in) } /* Hooray! We finally parsed it! */ + free (cvsroot_save); return newroot; error_exit: + free (cvsroot_save); free_cvsroot_t (newroot); return NULL; } @@ -799,3 +790,5 @@ main (argc, argv) /* NOTREACHED */ } #endif +/* vim:tabstop=8:shiftwidth=4 + */ diff --git a/contrib/cvs/src/sanity.sh b/contrib/cvs/src/sanity.sh index 22c1a98..935b78c 100755 --- a/contrib/cvs/src/sanity.sh +++ b/contrib/cvs/src/sanity.sh @@ -42,6 +42,8 @@ unset CVSREAD # 'sort' and tabs and spaces (LC_COLLATE). # Messages from getopt (LC_MESSAGES) (in the future, CVS itself might # also alter its messages based on LC_MESSAGES). +LANG=C +export LANG LC_ALL=C export LC_ALL @@ -104,7 +106,10 @@ shift # "debugger" #set -x -echo 'This test should produce no other output than this line, and a final "OK".' +echo 'This test should produce no other output than this message, and a final "OK".' +echo '(Note that the test can take an hour or more to run and periodically stops' +echo 'for as long as one minute. Do not assume there is a problem just because' +echo 'nothing seems to happen for a long time.)' # 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 @@ -172,6 +177,7 @@ fi # if we wanted to get baroque we could start making symlinks # to ensure the two are different. tmp=`(cd /tmp; /bin/pwd || pwd) 2>/dev/null` +: ${TMPDIR=$tmp} # Now: # 1) Set TESTDIR if it's not set already @@ -264,14 +270,6 @@ for pass in false :; do ;; esac done -username=`$ID -un` -if $EXPR "${username}" : "${username}" >/dev/null; then - : good, it works -else - echo "Test suite does not work correctly when run by a username" >&2 - echo "containing regular expression meta-characters." >&2 - exit 1 -fi # Cause NextStep 3.3 users to lose in a more graceful fashion. if $EXPR 'abc @@ -397,6 +395,16 @@ else QUESTION='\?' fi +# Now test the username to make sure it contains only valid characters +username=`$ID -un` +if $EXPR "${username}" : "${username}" >/dev/null; then + : good, it works +else + echo "Test suite does not work correctly when run by a username" >&2 + echo "containing regular expression meta-characters." >&2 + exit 1 +fi + # now make sure that tr works on NULs if $EXPR `echo "123" | ${TR} '2' '\0'` : "123" >/dev/null 2>&1; then TR=`find_tool tr` @@ -664,11 +672,12 @@ if test x"$*" = x; then # Basic/miscellaneous functionality tests="version basica basicb basicc basic1 deep basic2" tests="${tests} files spacefiles commit-readonly" + tests="${tests} commit-add-missing" # Branching, tagging, removing, adding, multiple directories tests="${tests} rdiff diff death death2 rm-update-message rmadd rmadd2" tests="${tests} dirs dirs2 branches branches2 tagc tagf" tests="${tests} rcslib multibranch import importb importc" - tests="${tests} import-after-initial" + tests="${tests} update-p import-after-initial" tests="${tests} join join2 join3 join-readonly-conflict" tests="${tests} join-admin join-admin-2" tests="${tests} new newb conflicts conflicts2 conflicts3" @@ -707,7 +716,7 @@ if test x"$*" = x; then # Multiple root directories and low-level protocol tests. tests="${tests} multiroot multiroot2 multiroot3 multiroot4" tests="${tests} rmroot reposmv pserver server server2 client" - tests="${tests} fork" + tests="${tests} fork commit-d" else tests="$*" fi @@ -1927,16 +1936,7 @@ done" dotest_fail basicb-1a "test -d CVS" '' - # In 1b and 1c, the first string matches if we're using absolute - # paths, while the second matches if RELATIVE_REPOS is defined - # (we're using relative paths). - -: dotest basicb-1b "cat CVS/Repository" \ -"${CVSROOT_DIRNAME}/\." \ -"\." - dotest basicb-1c "cat first-dir/CVS/Repository" \ -"${CVSROOT_DIRNAME}/first-dir" \ -"first-dir" + dotest basicb-1c "cat first-dir/CVS/Repository" "first-dir" cd first-dir # Note that the name Emptydir is chosen to test that CVS just @@ -2041,16 +2041,7 @@ U newdir/first-dir/sdir2/sfile2' dotest_fail basicb-9a "test -d CVS" '' - # In 9b through 9f, the first string matches if we're using - # absolute paths, while the second matches if RELATIVE_REPOS - # is defined (we're using relative paths). - -: dotest basicb-9b "cat CVS/Repository" \ -"${CVSROOT_DIRNAME}/\." \ -"\." - dotest basicb-9c "cat newdir/CVS/Repository" \ -"${CVSROOT_DIRNAME}/\." \ -"\." + dotest basicb-9c "cat newdir/CVS/Repository" "\." dotest basicb-9d "cat newdir/first-dir/CVS/Repository" \ "${CVSROOT_DIRNAME}/first-dir" \ "first-dir" @@ -3283,18 +3274,20 @@ diff -c first-dir/dir1/dir2/file7:1\.1 first-dir/dir1/dir2/file7:removed - file7 --- 0 ----" # now export by rtagged-by-head and rtagged-by-tag and compare. - dotest basic2-25 "${testcvs} export -r rtagged-by-head first-dir" \ -"${PROG} [a-z]*: Updating first-dir -U first-dir/file14 -U first-dir/file6 -${PROG} [a-z]*: Updating first-dir/dir1 -U first-dir/dir1/file14 -U first-dir/dir1/file6 -${PROG} [a-z]*: Updating first-dir/dir1/dir2 -U first-dir/dir1/dir2/file14 -U first-dir/dir1/dir2/file6" + dotest basic2-25 "${testcvs} export -r rtagged-by-head -d 1dir first-dir" \ +"${PROG} [a-z]*: Updating 1dir +U 1dir/file14 +U 1dir/file6 +${PROG} [a-z]*: Updating 1dir/dir1 +U 1dir/dir1/file14 +U 1dir/dir1/file6 +${PROG} [a-z]*: Updating 1dir/dir1/dir2 +U 1dir/dir1/dir2/file14 +U 1dir/dir1/dir2/file6" + dotest_fail basic2-25a "test -d 1dir/CVS" + dotest_fail basic2-25b "test -d 1dir/dir1/CVS" + dotest_fail basic2-25c "test -d 1dir/dir1/dir2/CVS" - mv first-dir 1dir dotest basic2-26 "${testcvs} export -r rtagged-by-tag first-dir" \ "${PROG} [a-z]*: Updating first-dir U first-dir/file14 @@ -3305,11 +3298,15 @@ U first-dir/dir1/file6 ${PROG} [a-z]*: Updating first-dir/dir1/dir2 U first-dir/dir1/dir2/file14 U first-dir/dir1/dir2/file6" + dotest_fail basic2-26a "test -d first-dir/CVS" + dotest_fail basic2-26b "test -d first-dir/dir1/CVS" + dotest_fail basic2-26c "test -d first-dir/dir1/dir2/CVS" dotest basic2-27 "directory_cmp 1dir first-dir" rm -r 1dir first-dir # checkout by revision vs export by rtagged-by-revision and compare. + mkdir export-dir dotest basic2-28 "${testcvs} export -rrtagged-by-revision -d export-dir first-dir" \ "${PROG} [a-z]*: Updating export-dir U export-dir/file14 @@ -3323,6 +3320,9 @@ ${PROG} [a-z]*: Updating export-dir/dir1/dir2 U export-dir/dir1/dir2/file14 U export-dir/dir1/dir2/file6 U export-dir/dir1/dir2/file7" + dotest_fail basic2-28a "test -d export-dir/CVS" + dotest_fail basic2-28b "test -d export-dir/dir1/CVS" + dotest_fail basic2-28c "test -d export-dir/dir1/dir2/CVS" dotest basic2-29 "${testcvs} co -r1.1 first-dir" \ "${PROG} [a-z]*: Updating first-dir @@ -5711,45 +5711,177 @@ File: file5 Status: Up-to-date dotest tagc-2 "${testcvs} add first-dir" \ "Directory ${CVSROOT_DIRNAME}/first-dir added to the repository" cd first-dir - touch file1 - dotest tagc-3 "${testcvs} add file1" \ + touch file1 file2 + dotest tagc-3 "${testcvs} add file1 file2" \ "${PROG} [a-z]*: scheduling file .file1. for addition -${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" +${PROG} [a-z]*: scheduling file .file2. for addition +${PROG} [a-z]*: use .${PROG} commit. to add these files permanently" dotest tagc-4 "${testcvs} -q ci -m add" \ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v done Checking in file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 initial revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v +done +Checking in file2; +${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 +initial revision: 1\.1 done" - dotest tagc-5 "${testcvs} -q tag -c tag1" "T file1" - touch file1 - dotest tagc-6 "${testcvs} -q tag -c tag2" "T file1" + dotest tagc-5 "${testcvs} -q tag -c tag1" \ +"T file1 +T file2" + touch file1 file2 + dotest tagc-6 "${testcvs} -q tag -c tag2" \ +"T file1 +T file2" # Avoid timestamp granularity bugs (FIXME: CVS should be # doing the sleep, right?). sleep 1 echo myedit >>file1 + dotest tagc-6a "${testcvs} rm -f file2" \ +"${PROG} [a-z]*: scheduling .file2. for removal +${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently" + touch file3 + dotest tagc-6b "${testcvs} add file3" \ +"${PROG} [a-z]*: scheduling file .file3. for addition +${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" dotest_fail tagc-7 "${testcvs} -q tag -c tag3" \ "${PROG} [a-z]*: file1 is locally modified +${PROG} [a-z]*: file2 is locally modified +${PROG} [a-z]*: file3 is locally modified ${PROG} \[[a-z]* aborted\]: correct the above errors first!" cd ../.. mkdir 2 cd 2 - dotest tagc-8 "${testcvs} -q co first-dir" "U first-dir/file1" + dotest tagc-8 "${testcvs} -q co first-dir" \ +"U first-dir/file1 +U first-dir/file2" cd ../1/first-dir dotest tagc-9 "${testcvs} -q ci -m modify" \ "Checking in file1; ${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1 new revision: 1\.2; previous revision: 1\.1 +done +Removing file2; +${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2 +new revision: delete; previous revision: 1\.1 +done +RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v +done +Checking in file3; +${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3 +initial revision: 1\.1 done" cd ../../2/first-dir - dotest tagc-10 "${testcvs} -q tag -c tag4" "T file1" + dotest tagc-10 "${testcvs} -q tag -c tag4" \ +"${PROG} [a-z]*: file2 is no longer in the repository +T file1 +T file2" cd ../.. rm -r 1 2 rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + update-p) + # Make sure `cvs update -p -rT FILE' works from a branch when + # FILE is already on the trunk and is being added to that branch. + + mkdir 1; cd 1 + module=x + + echo > unused-file + + # Create the module. + dotest update-p-1 \ + "$testcvs -Q import -m. $module X Y" '' + + file=F + # Check it out and tag it. + dotest update-p-2 "$testcvs -Q co $module" '' + cd $module + dotest update-p-3 "$testcvs -Q tag -b B" '' + echo v1 > $file + dotest update-p-4 "$testcvs -Q add $file" '' + dotest update-p-5 "$testcvs -Q ci -m. $file" \ +"RCS file: ${TESTDIR}/cvsroot/$module/$file,v +done +Checking in $file; +${TESTDIR}/cvsroot/$module/$file,v <-- $file +initial revision: 1\.1 +done" + dotest update-p-6 "$testcvs -Q tag T $file" '' + dotest update-p-7 "$testcvs -Q update -rB" '' + + # This merge effectively adds file F on branch B. + dotest update-p-8 "$testcvs -Q update -jT" '' + + # Before the fix that prompted the addition of this test, + # the following command would fail with this diagnostic: + # cvs update: conflict: F created independently by second party + dotest update-p-9 "$testcvs update -p -rT $file" \ +"=================================================================== +Checking out $file +RCS: ${TESTDIR}/cvsroot/$module/$file,v +VERS: 1\.1 +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +v1" + + # Repeat the above, but with $file removed. + # This exercises a slightly different code path. + rm $file + # Before the fix that prompted the addition of this test, + # the following command would fail with this diagnostic: + # cvs update: warning: new-born F has disappeared + dotest update-p-10 "$testcvs update -p -rT $file" \ +"=================================================================== +Checking out $file +RCS: ${TESTDIR}/cvsroot/$module/$file,v +VERS: 1\.1 +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +v1" + + # Exercise yet another code path: + # the one that involves reviving a `dead' file. + # And a little more, for good measure... + touch new + dotest update-p-a1 "$testcvs -Q add new" '' + dotest update-p-a2 "$testcvs -Q update -p new" '' + dotest update-p-a3 "$testcvs -Q rm -f new" '' + + # Both an update -A, *and* the following update are required + # to return to the state of being on the trunk with a $file + # that we can then remove. + dotest update-p-undead-0 "$testcvs update -A" \ +"${PROG} [a-z]*: Updating \. +${PROG} [a-z]*: warning: new-born $file has disappeared" + dotest update-p-undead-1 "$testcvs update" \ +"${PROG} [a-z]*: Updating \. +U $file" + dotest update-p-undead-2 "$testcvs -Q update -p -rT $file" v1 + dotest update-p-undead-3 "$testcvs -Q rm -f $file" '' + dotest update-p-undead-4 "$testcvs -Q update -p -rT $file" v1 + dotest update-p-undead-5 "$testcvs -Q ci -m. $file" \ +"Removing $file; +${TESTDIR}/cvsroot/$module/$file,v <-- $file +new revision: delete; previous revision: 1\.1 +done" + dotest update-p-undead-6 "$testcvs -Q update -p -rT $file" v1 + echo v2 > $file + dotest update-p-undead-7 "$testcvs -Q update -p -rT $file" v1 + dotest update-p-undead-8 "$testcvs add $file" \ +"${PROG} [a-z]*: re-adding file $file (in place of dead revision 1\.2) +${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + + dotest update-p-undead-9 "$testcvs -Q update -p -rT $file" v1 + + cd ../.. + rm -rf 1 + rm -rf ${CVSROOT_DIRNAME}/$module + ;; + tagf) # More tagging tests, including using tag -F -B to convert a # branch tag to a regular tag and recovering thereof. @@ -6213,7 +6345,7 @@ Checking in file3; ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3 new revision: 1\.1\.2\.1; previous revision: 1\.1 done" - rm ${CVSROOT_DIRNAME}/first-dir/file2,v + rm -f ${CVSROOT_DIRNAME}/first-dir/file2,v dotest rcslib-symlink-3f "ln -s Attic/file3,v ${CVSROOT_DIRNAME}/first-dir/file2,v" dotest rcslib-symlink-3g "${testcvs} update file2" "U file2" @@ -6224,7 +6356,7 @@ done" ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3 new revision: delete; previous revision: 1\.1\.2\.1 done" - rm ${CVSROOT_DIRNAME}/first-dir/file2,v + rm -f ${CVSROOT_DIRNAME}/first-dir/file2,v rm -f ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v dotest rcslib-symlink-3h "ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v" @@ -6694,16 +6826,8 @@ add mkdir adir/sub1/ssdir mkdir bdir/subdir touch adir/sub1/file1 adir/sub2/file2 adir/sub1/ssdir/ssfile - # If I'm correctly reading the Single Unix Specification, - # version 2, then "touch -t 197107040343" or "touch -t 203412251801" - # should work. But GNU touch seems to have other ideas. - # I sort of wonder if this is lossage by the standards bodies, - # I'm not sure. - # Note that some versions of touch when used without -t don't handle - # y2k and/or set the seconds reliably. - # We should probably find a different way of doing this. - touch 0704034371 bdir/subdir/file1 - touch 1225180134 cdir/cfile + touch -t 197107040343 bdir/subdir/file1 + touch -t 203412251801 cdir/cfile dotest_sort importc-1 \ "${testcvs} import -d -m import-it first-dir vendor release" \ " @@ -9676,7 +9800,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database" dotest modules5-8 "${testcvs} co realmodule" \ "U realmodule/a ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule.. -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: realmodule" else dotest modules5-8 "${testcvs} co realmodule" \ @@ -9689,11 +9813,11 @@ args: realmodule" dotest_fail modules5-10 "test -f realmodule/b" "" if $remote; then dotest modules5-11 "${testcvs} -q co realmodule" \ -"checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +"checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: realmodule" dotest modules5-12 "${testcvs} -q update" \ "${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${tmp}/cvs-serv[0-9a-z]*/realmodule +update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/realmodule args: ${CVSROOT_DIRNAME}/first-dir/subdir" echo "change" >>realmodule/a dotest modules5-13 "${testcvs} -q ci -m." \ @@ -9702,7 +9826,7 @@ ${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a new revision: 1\.2; previous revision: 1\.1 done ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkin\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -checkin script invoked in ${tmp}/cvs-serv[0-9a-z]*/realmodule +checkin script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/realmodule args: ${CVSROOT_DIRNAME}/first-dir/subdir" else dotest modules5-11 "${testcvs} -q co realmodule" \ @@ -9728,12 +9852,12 @@ Are you sure you want to release (and delete) directory .realmodule.: " dotest modules5-15 "${testcvs} -q rtag -Dnow MYTAG realmodule" \ "tag script invoked in ${TESTDIR}/1 args: realmodule MYTAG" \ -"tag script invoked in ${tmp}/cvs-serv[0-9a-z]* +"tag script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: realmodule MYTAG" if $remote; then dotest modules5-16 "${testcvs} -q export -r MYTAG realmodule" \ "U realmodule/a -export script invoked in ${tmp}/cvs-serv[0-9a-z]* +export script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: realmodule" else dotest modules5-16 "${testcvs} -q export -r MYTAG realmodule" \ @@ -9753,7 +9877,7 @@ args: realmodule" dotest modules5-18 "${testcvs} co dirmodule/a" \ "U dirmodule/a ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule.. -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: dirmodule" else dotest modules5-18 "${testcvs} co dirmodule/a" \ @@ -9778,7 +9902,7 @@ Are you sure you want to release (and delete) directory .dirmodule.: " dotest modules5-22 "${testcvs} co dirmodule/nonexist" \ "${PROG} [a-z]*: warning: new-born dirmodule/nonexist has disappeared ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .dirmodule.. -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: dirmodule" else dotest modules5-22 "${testcvs} co dirmodule/nonexist" \ @@ -9799,7 +9923,7 @@ args: dirmodule" dotest modules5-24 "${testcvs} -q co namedmodule" \ "U nameddir/a U nameddir/b -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: nameddir" else dotest modules5-24 "${testcvs} -q co namedmodule" \ @@ -9817,9 +9941,9 @@ args: nameddir" dotest modules5-26 "${testcvs} -q co namedmodule" \ "M nameddir/a ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${tmp}/cvs-serv[0-9a-z]*/nameddir +update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/nameddir args: ${CVSROOT_DIRNAME}/first-dir/subdir -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: nameddir" else dotest modules5-26 "${testcvs} -q co namedmodule" \ @@ -9836,9 +9960,9 @@ args: nameddir" dotest modules5-27 "${testcvs} -q co namedmodule" \ "U nameddir/a ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${tmp}/cvs-serv[0-9a-z]*/nameddir +update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/nameddir args: ${CVSROOT_DIRNAME}/first-dir/subdir -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: nameddir" else dotest modules5-27 "${testcvs} -q co namedmodule" \ @@ -9860,7 +9984,7 @@ Are you sure you want to release (and delete) directory .nameddir.: " dotest modules5-29 "${testcvs} co -d mydir realmodule" \ "U mydir/a ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-29 "${testcvs} co -d mydir realmodule" \ @@ -9873,11 +9997,11 @@ args: mydir" dotest_fail modules5-31 "test -d realmodule || test -f mydir/b" "" if $remote; then dotest modules5-32 "${testcvs} -q co -d mydir realmodule" \ -"checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +"checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" dotest modules5-33 "${testcvs} -q update" \ "${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${tmp}/cvs-serv[0-9a-z]*/mydir +update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/mydir args: ${CVSROOT_DIRNAME}/first-dir/subdir" echo "change" >>mydir/a dotest modules5-34 "${testcvs} -q ci -m." \ @@ -9886,7 +10010,7 @@ ${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a new revision: 1\.3; previous revision: 1\.2 done ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkin\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -checkin script invoked in ${tmp}/cvs-serv[0-9a-z]*/mydir +checkin script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/mydir args: ${CVSROOT_DIRNAME}/first-dir/subdir" else dotest modules5-32 "${testcvs} -q co -d mydir realmodule" \ @@ -9911,11 +10035,11 @@ args: ${CVSROOT_DIRNAME}/first-dir/subdir" Are you sure you want to release (and delete) directory .mydir.: " if $remote; then dotest modules5-36 "${testcvs} -q rtag -Dnow MYTAG2 realmodule" \ -"tag script invoked in ${tmp}/cvs-serv[0-9a-z]* +"tag script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: realmodule MYTAG2" dotest modules5-37 "${testcvs} -q export -r MYTAG2 -d mydir realmodule" \ "U mydir/a -export script invoked in ${tmp}/cvs-serv[0-9a-z]* +export script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-36 "${testcvs} -q rtag -Dnow MYTAG2 realmodule" \ @@ -9933,7 +10057,7 @@ args: mydir" dotest modules5-38 "${testcvs} co -d mydir dirmodule/a" \ "U mydir/a ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-38 "${testcvs} co -d mydir dirmodule/a" \ @@ -9958,7 +10082,7 @@ Are you sure you want to release (and delete) directory .mydir.: " dotest modules5-42 "${testcvs} co -d mydir dirmodule/nonexist" \ "${PROG} [a-z]*: warning: new-born mydir/nonexist has disappeared ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .mydir.. -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-42 "${testcvs} co -d mydir dirmodule/nonexist" \ @@ -9977,7 +10101,7 @@ args: mydir" dotest modules5-44 "${testcvs} -q co -d mydir namedmodule" \ "U mydir/a U mydir/b -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-44 "${testcvs} -q co -d mydir namedmodule" \ @@ -9996,9 +10120,9 @@ args: mydir" dotest modules5-47 "${testcvs} -q co -d mydir namedmodule" \ "M mydir/a ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${tmp}/cvs-serv[0-9a-z]*/mydir +update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/mydir args: ${CVSROOT_DIRNAME}/first-dir/subdir -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-47 "${testcvs} -q co -d mydir namedmodule" \ @@ -10015,9 +10139,9 @@ args: mydir" dotest modules5-48 "${testcvs} -q co -d mydir namedmodule" \ "U mydir/a ${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/update\.sh. .${CVSROOT_DIRNAME}/first-dir/subdir.. -update script invoked in ${tmp}/cvs-serv[0-9a-z]*/mydir +update script invoked in ${TMPDIR}/cvs-serv[0-9a-z]*/mydir args: ${CVSROOT_DIRNAME}/first-dir/subdir -checkout script invoked in ${tmp}/cvs-serv[0-9a-z]* +checkout script invoked in ${TMPDIR}/cvs-serv[0-9a-z]* args: mydir" else dotest modules5-48 "${testcvs} -q co -d mydir namedmodule" \ @@ -10174,29 +10298,13 @@ ${PROG} [a-z]*: Rebuilding administrative file database" dotest cvsadm-1 "${testcvs} co CVSROOT/modules" \ "U CVSROOT/modules" - # Try to determine whether RELATIVE_REPOS is defined - # so that we can make the following a lot less - # verbose. - - echo "${CVSROOT_DIRNAME}/." > ${TESTDIR}/dotest.abs - echo "." > ${TESTDIR}/dotest.rel - if cmp ${TESTDIR}/dotest.abs CVS/Repository >/dev/null 2>&1; then - AREP="${CVSROOT_DIRNAME}/" - elif cmp ${TESTDIR}/dotest.rel CVS/Repository >/dev/null 2>&1; then - AREP="" - else - fail "Cannot figure out if RELATIVE_REPOS is defined." - fi - # Test CVS/Root once. Since there is only one part of # the code which writes CVS/Root files (Create_Admin), # there is no point in testing this every time. dotest cvsadm-1a "cat CVS/Root" ${REP} - dotest cvsadm-1b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1b "cat CVS/Repository" "\." dotest cvsadm-1c "cat CVSROOT/CVS/Root" ${REP} - dotest cvsadm-1d "cat CVSROOT/CVS/Repository" \ -"${AREP}CVSROOT" + dotest cvsadm-1d "cat CVSROOT/CVS/Repository" "CVSROOT" # All of the defined module names begin with a number. # All of the top-level directory names begin with "dir". # All of the subdirectory names begin with "sub". @@ -10301,59 +10409,45 @@ done" dotest cvsadm-3 "${testcvs} co 1mod" \ "${PROG} [a-z]*: Updating 1mod U 1mod/file1" - dotest cvsadm-3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-3d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-3b "cat CVS/Repository" "\." + dotest cvsadm-3d "cat 1mod/CVS/Repository" "mod1" rm -rf CVS 1mod dotest cvsadm-4 "${testcvs} co 2mod" \ "${PROG} [a-z]*: Updating 2mod U 2mod/file2" - dotest cvsadm-4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-4d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-4b "cat CVS/Repository" "\." + dotest cvsadm-4d "cat 2mod/CVS/Repository" "mod2/sub2" rm -rf CVS 2mod dotest cvsadm-5 "${testcvs} co 1d1mod" \ "${PROG} [a-z]*: Updating dir1d1 U dir1d1/file1" - dotest cvsadm-5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-5d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-5b "cat CVS/Repository" "\." + dotest cvsadm-5d "cat dir1d1/CVS/Repository" "mod1" rm -rf CVS dir1d1 dotest cvsadm-6 "${testcvs} co 1d2mod" \ "${PROG} [a-z]*: Updating dir1d2 U dir1d2/file2" - dotest cvsadm-6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-6d "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-6b "cat CVS/Repository" "\." + dotest cvsadm-6d "cat dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir1d2 dotest cvsadm-7 "${testcvs} co 2d1mod" \ "${PROG} [a-z]*: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" - dotest cvsadm-7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-7d "cat dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-7f "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-7b "cat CVS/Repository" "\." + dotest cvsadm-7d "cat dir2d1/CVS/Repository" "\." + dotest cvsadm-7f "cat dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS dir2d1 dotest cvsadm-8 "${testcvs} co 2d2mod" \ "${PROG} [a-z]*: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" - dotest cvsadm-8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-8d "cat dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-8f "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-8b "cat CVS/Repository" "\." + dotest cvsadm-8d "cat dir2d2/CVS/Repository" "mod2" + dotest cvsadm-8f "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir2d2 ################################################## @@ -10369,14 +10463,11 @@ U 1mod/file1 ${PROG} [a-z]*: Updating 1mod-2 U 1mod-2/file1-2" # the usual for the top level - dotest cvsadm-9b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-9b "cat CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-9d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-9d "cat 1mod/CVS/Repository" "mod1" # the usual for 1mod copy - dotest cvsadm-9f "cat 1mod-2/CVS/Repository" \ -"${AREP}mod1-2" + dotest cvsadm-9f "cat 1mod-2/CVS/Repository" "mod1-2" rm -rf CVS 1mod 1mod-2 # 1mod 2mod redmod bluemod @@ -10386,14 +10477,11 @@ U 1mod/file1 ${PROG} [a-z]*: Updating 2mod U 2mod/file2" # the usual for the top level - dotest cvsadm-10b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-10b "cat CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-10d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-10d "cat 1mod/CVS/Repository" "mod1" # the usual for 2dmod - dotest cvsadm-10f "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-10f "cat 2mod/CVS/Repository" "mod2/sub2" rm -rf CVS 1mod 2mod dotest cvsadm-11 "${testcvs} co 1mod 1d1mod" \ @@ -10402,14 +10490,11 @@ U 1mod/file1 ${PROG} [a-z]*: Updating dir1d1 U dir1d1/file1" # the usual for the top level - dotest cvsadm-11b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-11b "cat CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-11d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-11d "cat 1mod/CVS/Repository" "mod1" # the usual for 1d1mod - dotest cvsadm-11f "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-11f "cat dir1d1/CVS/Repository" "mod1" rm -rf CVS 1mod dir1d1 dotest cvsadm-12 "${testcvs} co 1mod 1d2mod" \ @@ -10418,14 +10503,11 @@ U 1mod/file1 ${PROG} [a-z]*: Updating dir1d2 U dir1d2/file2" # the usual for the top level - dotest cvsadm-12b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-12b "cat CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-12d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-12d "cat 1mod/CVS/Repository" "mod1" # the usual for 1d2mod - dotest cvsadm-12f "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-12f "cat dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS 1mod dir1d2 dotest cvsadm-13 "${testcvs} co 1mod 2d1mod" \ @@ -10434,16 +10516,12 @@ U 1mod/file1 ${PROG} [a-z]*: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" # the usual for the top level - dotest cvsadm-13b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-13b "cat CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-13d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-13d "cat 1mod/CVS/Repository" "mod1" # the usual for 2d1mod - dotest cvsadm-13f "cat dir2d1/CVS/Repository" \ -"${AREP}." - dotest cvsadm-13h "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-13f "cat dir2d1/CVS/Repository" "\." + dotest cvsadm-13h "cat dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS 1mod dir2d1 dotest cvsadm-14 "${testcvs} co 1mod 2d2mod" \ @@ -10452,16 +10530,12 @@ U 1mod/file1 ${PROG} [a-z]*: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" # the usual for the top level - dotest cvsadm-14b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-14b "cat CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-14d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-14d "cat 1mod/CVS/Repository" "mod1" # the usual for 2d2mod - dotest cvsadm-14f "cat dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-14h "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-14f "cat dir2d2/CVS/Repository" "mod2" + dotest cvsadm-14h "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS 1mod dir2d2 @@ -10473,14 +10547,11 @@ U 2mod/file2 ${PROG} [a-z]*: Updating 2mod-2 U 2mod-2/file2-2" # the usual for the top level - dotest cvsadm-15b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-15b "cat CVS/Repository" "\." # the usual for 2mod - dotest cvsadm-15d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-15d "cat 2mod/CVS/Repository" "mod2/sub2" # the usual for 2mod copy - dotest cvsadm-15f "cat 2mod-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" + dotest cvsadm-15f "cat 2mod-2/CVS/Repository" "mod2-2/sub2-2" rm -rf CVS 2mod 2mod-2 @@ -10490,14 +10561,11 @@ U 2mod/file2 ${PROG} [a-z]*: Updating dir1d1 U dir1d1/file1" # the usual for the top level - dotest cvsadm-16b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-16b "cat CVS/Repository" "\." # the usual for 2mod - dotest cvsadm-16d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-16d "cat 2mod/CVS/Repository" "mod2/sub2" # the usual for 1d1mod - dotest cvsadm-16f "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-16f "cat dir1d1/CVS/Repository" "mod1" rm -rf CVS 2mod dir1d1 dotest cvsadm-17 "${testcvs} co 2mod 1d2mod" \ @@ -10506,14 +10574,11 @@ U 2mod/file2 ${PROG} [a-z]*: Updating dir1d2 U dir1d2/file2" # the usual for the top level - dotest cvsadm-17b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-17b "cat CVS/Repository" "\." # the usual for 2mod - dotest cvsadm-17d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-17d "cat 2mod/CVS/Repository" "mod2/sub2" # the usual for 1d2mod - dotest cvsadm-17f "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-17f "cat dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS 2mod dir1d2 dotest cvsadm-18 "${testcvs} co 2mod 2d1mod" \ @@ -10522,16 +10587,12 @@ U 2mod/file2 ${PROG} [a-z]*: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" # the usual for the top level - dotest cvsadm-18b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-18b "cat CVS/Repository" "\." # the usual for 2mod - dotest cvsadm-18d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-18d "cat 2mod/CVS/Repository" "mod2/sub2" # the usual for 2d1mod - dotest cvsadm-18f "cat dir2d1/CVS/Repository" \ -"${AREP}." - dotest cvsadm-18h "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-18f "cat dir2d1/CVS/Repository" "\." + dotest cvsadm-18h "cat dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS 2mod dir2d1 dotest cvsadm-19 "${testcvs} co 2mod 2d2mod" \ @@ -10540,16 +10601,12 @@ U 2mod/file2 ${PROG} [a-z]*: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" # the usual for the top level - dotest cvsadm-19b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-19b "cat CVS/Repository" "\." # the usual for 2mod - dotest cvsadm-19d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-19d "cat 2mod/CVS/Repository" "mod2/sub2" # the usual for 2d2mod - dotest cvsadm-19f "cat dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-19h "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-19f "cat dir2d2/CVS/Repository" "mod2" + dotest cvsadm-19h "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS 2mod dir2d2 @@ -10561,14 +10618,11 @@ U dir1d1/file1 ${PROG} [a-z]*: Updating dir1d1-2 U dir1d1-2/file1-2" # the usual for the top level - dotest cvsadm-20b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-20b "cat CVS/Repository" "\." # the usual for 1d1mod - dotest cvsadm-20d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-20d "cat dir1d1/CVS/Repository" "mod1" # the usual for 1d1mod copy - dotest cvsadm-20f "cat dir1d1-2/CVS/Repository" \ -"${AREP}mod1-2" + dotest cvsadm-20f "cat dir1d1-2/CVS/Repository" "mod1-2" rm -rf CVS dir1d1 dir1d1-2 dotest cvsadm-21 "${testcvs} co 1d1mod 1d2mod" \ @@ -10577,14 +10631,11 @@ U dir1d1/file1 ${PROG} [a-z]*: Updating dir1d2 U dir1d2/file2" # the usual for the top level - dotest cvsadm-21b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-21b "cat CVS/Repository" "\." # the usual for 1d1mod - dotest cvsadm-21d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-21d "cat dir1d1/CVS/Repository" "mod1" # the usual for 1d2mod - dotest cvsadm-21f "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-21f "cat dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir1d1 dir1d2 dotest cvsadm-22 "${testcvs} co 1d1mod 2d1mod" \ @@ -10593,16 +10644,12 @@ U dir1d1/file1 ${PROG} [a-z]*: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" # the usual for the top level - dotest cvsadm-22b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-22b "cat CVS/Repository" "\." # the usual for 1d1mod - dotest cvsadm-22d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-22d "cat dir1d1/CVS/Repository" "mod1" # the usual for 2d1mod - dotest cvsadm-22f "cat dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-22h "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-22f "cat dir2d1/CVS/Repository" "\." + dotest cvsadm-22h "cat dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS dir1d1 dir2d1 dotest cvsadm-23 "${testcvs} co 1d1mod 2d2mod" \ @@ -10611,16 +10658,12 @@ U dir1d1/file1 ${PROG} [a-z]*: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" # the usual for the top level - dotest cvsadm-23b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-23b "cat CVS/Repository" "\." # the usual for 1d1mod - dotest cvsadm-23d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-23d "cat dir1d1/CVS/Repository" "mod1" # the usual for 2d2mod - dotest cvsadm-23f "cat dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-23h "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-23f "cat dir2d2/CVS/Repository" "mod2" + dotest cvsadm-23h "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir1d1 dir2d2 @@ -10632,14 +10675,11 @@ U dir1d2/file2 ${PROG} [a-z]*: Updating dir1d2-2 U dir1d2-2/file2-2" # the usual for the top level - dotest cvsadm-24b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-24b "cat CVS/Repository" "\." # the usual for 1d2mod - dotest cvsadm-24d "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-24d "cat dir1d2/CVS/Repository" "mod2/sub2" # the usual for 1d2mod copy - dotest cvsadm-24f "cat dir1d2-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" + dotest cvsadm-24f "cat dir1d2-2/CVS/Repository" "mod2-2/sub2-2" rm -rf CVS dir1d2 dir1d2-2 dotest cvsadm-25 "${testcvs} co 1d2mod 2d1mod" \ @@ -10648,16 +10688,12 @@ U dir1d2/file2 ${PROG} [a-z]*: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" # the usual for the top level - dotest cvsadm-25b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-25b "cat CVS/Repository" "\." # the usual for 1d2mod - dotest cvsadm-25d "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-25d "cat dir1d2/CVS/Repository" "mod2/sub2" # the usual for 2d1mod - dotest cvsadm-25f "cat dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-25h "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-25f "cat dir2d1/CVS/Repository" "\." + dotest cvsadm-25h "cat dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS dir1d2 dir2d1 dotest cvsadm-26 "${testcvs} co 1d2mod 2d2mod" \ @@ -10666,16 +10702,12 @@ U dir1d2/file2 ${PROG} [a-z]*: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" # the usual for the top level - dotest cvsadm-26b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-26b "cat CVS/Repository" "\." # the usual for 1d2mod - dotest cvsadm-26d "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-26d "cat dir1d2/CVS/Repository" "mod2/sub2" # the usual for 2d2mod - dotest cvsadm-26f "cat dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-26h "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-26f "cat dir2d2/CVS/Repository" "mod2" + dotest cvsadm-26h "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir1d2 dir2d2 @@ -10687,18 +10719,13 @@ U dir2d1/sub2d1/file1 ${PROG} [a-z]*: Updating dir2d1-2/sub2d1-2 U dir2d1-2/sub2d1-2/file1-2" # the usual for the top level - dotest cvsadm-27b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-27b "cat CVS/Repository" "\." # the usual for 2d1mod - dotest cvsadm-27d "cat dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-27f "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-27d "cat dir2d1/CVS/Repository" "\." + dotest cvsadm-27f "cat dir2d1/sub2d1/CVS/Repository" "mod1" # the usual for 2d1mod - dotest cvsadm-27h "cat dir2d1-2/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-27j "cat dir2d1-2/sub2d1-2/CVS/Repository" \ -"${AREP}mod1-2" + dotest cvsadm-27h "cat dir2d1-2/CVS/Repository" "\." + dotest cvsadm-27j "cat dir2d1-2/sub2d1-2/CVS/Repository" "mod1-2" rm -rf CVS dir2d1 dir2d1-2 dotest cvsadm-28 "${testcvs} co 2d1mod 2d2mod" \ @@ -10707,18 +10734,13 @@ U dir2d1/sub2d1/file1 ${PROG} [a-z]*: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" # the usual for the top level - dotest cvsadm-28b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-28b "cat CVS/Repository" "\." # the usual for 2d1mod - dotest cvsadm-28d "cat dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-28f "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-28d "cat dir2d1/CVS/Repository" "\." + dotest cvsadm-28f "cat dir2d1/sub2d1/CVS/Repository" "mod1" # the usual for 2d2mod - dotest cvsadm-28h "cat dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-28j "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-28h "cat dir2d2/CVS/Repository" "mod2" + dotest cvsadm-28j "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir2d1 dir2d2 @@ -10730,18 +10752,14 @@ U dir2d2/sub2d2/file2 ${PROG} [a-z]*: Updating dir2d2-2/sub2d2-2 U dir2d2-2/sub2d2-2/file2-2" # the usual for the top level - dotest cvsadm-29b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-29b "cat CVS/Repository" "\." # the usual for 2d2mod - dotest cvsadm-29d "cat dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-29f "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-29d "cat dir2d2/CVS/Repository" "mod2" + dotest cvsadm-29f "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2" # the usual for 2d2mod - dotest cvsadm-29h "cat dir2d2-2/CVS/Repository" \ -"${AREP}mod2-2" + dotest cvsadm-29h "cat dir2d2-2/CVS/Repository" "mod2-2" dotest cvsadm-29j "cat dir2d2-2/sub2d2-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" +"mod2-2/sub2-2" rm -rf CVS dir2d2 dir2d2-2 ################################################## @@ -10752,55 +10770,43 @@ U dir2d2-2/sub2d2-2/file2-2" dotest cvsadm-1d3 "${testcvs} co -d dir 1mod" \ "${PROG} [a-z]*: Updating dir U dir/file1" - dotest cvsadm-1d3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d3d "cat dir/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d3b "cat CVS/Repository" "\." + dotest cvsadm-1d3d "cat dir/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d4 "${testcvs} co -d dir 2mod" \ "${PROG} [a-z]*: Updating dir U dir/file2" - dotest cvsadm-1d4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d4d "cat dir/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d4b "cat CVS/Repository" "\." + dotest cvsadm-1d4d "cat dir/CVS/Repository" "mod2/sub2" rm -rf CVS dir dotest cvsadm-1d5 "${testcvs} co -d dir 1d1mod" \ "${PROG} [a-z]*: Updating dir U dir/file1" - dotest cvsadm-1d5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d5d "cat dir/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d5b "cat CVS/Repository" "\." + dotest cvsadm-1d5d "cat dir/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d6 "${testcvs} co -d dir 1d2mod" \ "${PROG} [a-z]*: Updating dir U dir/file2" - dotest cvsadm-1d6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d6d "cat dir/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d6b "cat CVS/Repository" "\." + dotest cvsadm-1d6d "cat dir/CVS/Repository" "mod2/sub2" rm -rf CVS dir dotest cvsadm-1d7 "${testcvs} co -d dir 2d1mod" \ "${PROG} [a-z]*: Updating dir U dir/file1" - dotest cvsadm-1d7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d7d "cat dir/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d7b "cat CVS/Repository" "\." + dotest cvsadm-1d7d "cat dir/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d8 "${testcvs} co -d dir 2d2mod" \ "${PROG} [a-z]*: Updating dir U dir/file2" - dotest cvsadm-1d8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d8d "cat dir/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d8b "cat CVS/Repository" "\." + dotest cvsadm-1d8d "cat dir/CVS/Repository" "mod2/sub2" rm -rf CVS dir ################################################## @@ -10815,17 +10821,13 @@ U dir/1mod/file1 ${PROG} [a-z]*: Updating dir/1mod-2 U dir/1mod-2/file1-2" # the usual for the top level - dotest cvsadm-1d9b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d9b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d9d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d9d "cat dir/CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-1d9f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d9f "cat dir/1mod/CVS/Repository" "mod1" # the usual for 1mod copy - dotest cvsadm-1d9h "cat dir/1mod-2/CVS/Repository" \ -"${AREP}mod1-2" + dotest cvsadm-1d9h "cat dir/1mod-2/CVS/Repository" "mod1-2" rm -rf CVS dir # 1mod 2mod redmod bluemod @@ -10834,17 +10836,13 @@ U dir/1mod-2/file1-2" U dir/1mod/file1 ${PROG} [a-z]*: Updating dir/2mod U dir/2mod/file2" - dotest cvsadm-1d10b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d10b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d10d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d10d "cat dir/CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-1d10f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d10f "cat dir/1mod/CVS/Repository" "mod1" # the usual for 2dmod - dotest cvsadm-1d10h "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d10h "cat dir/2mod/CVS/Repository" "mod2/sub2" rm -rf CVS dir dotest cvsadm-1d11 "${testcvs} co -d dir 1mod 1d1mod" \ @@ -10852,17 +10850,13 @@ U dir/2mod/file2" U dir/1mod/file1 ${PROG} [a-z]*: Updating dir/dir1d1 U dir/dir1d1/file1" - dotest cvsadm-1d11b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d11b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d11d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d11d "cat dir/CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-1d11f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d11f "cat dir/1mod/CVS/Repository" "mod1" # the usual for 1d1mod - dotest cvsadm-1d11h "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d11h "cat dir/dir1d1/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d12 "${testcvs} co -d dir 1mod 1d2mod" \ @@ -10870,17 +10864,13 @@ U dir/dir1d1/file1" U dir/1mod/file1 ${PROG} [a-z]*: Updating dir/dir1d2 U dir/dir1d2/file2" - dotest cvsadm-1d12b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d12b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d12d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d12d "cat dir/CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-1d12f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d12f "cat dir/1mod/CVS/Repository" "mod1" # the usual for 1d2mod - dotest cvsadm-1d12h "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d12h "cat dir/dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir dotest cvsadm-1d13 "${testcvs} co -d dir 1mod 2d1mod" \ @@ -10888,19 +10878,14 @@ U dir/dir1d2/file2" U dir/1mod/file1 ${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1" - dotest cvsadm-1d13b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d13b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d13d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d13d "cat dir/CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-1d13f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d13f "cat dir/1mod/CVS/Repository" "mod1" # the usual for 2d1mod - dotest cvsadm-1d13h "cat dir/dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d13j "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d13h "cat dir/dir2d1/CVS/Repository" "\." + dotest cvsadm-1d13j "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d14 "${testcvs} co -d dir 1mod 2d2mod" \ @@ -10908,19 +10893,14 @@ U dir/dir2d1/sub2d1/file1" U dir/1mod/file1 ${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" - dotest cvsadm-1d14b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d14b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d14d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d14d "cat dir/CVS/Repository" "\." # the usual for 1mod - dotest cvsadm-1d14f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d14f "cat dir/1mod/CVS/Repository" "mod1" # the usual for 2d2mod - dotest cvsadm-1d14h "cat dir/dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-1d14j "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d14h "cat dir/dir2d2/CVS/Repository" "mod2" + dotest cvsadm-1d14j "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir @@ -10931,17 +10911,13 @@ U dir/dir2d2/sub2d2/file2" U dir/2mod/file2 ${PROG} [a-z]*: Updating dir/2mod-2 U dir/2mod-2/file2-2" - dotest cvsadm-1d15b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d15b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d15d "cat dir/CVS/Repository" \ -"${AREP}mod2" + dotest cvsadm-1d15d "cat dir/CVS/Repository" "mod2" # the usual for 2mod - dotest cvsadm-1d15f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d15f "cat dir/2mod/CVS/Repository" "mod2/sub2" # the usual for 2mod copy - dotest cvsadm-1d15h "cat dir/2mod-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" + dotest cvsadm-1d15h "cat dir/2mod-2/CVS/Repository" "mod2-2/sub2-2" rm -rf CVS dir dotest cvsadm-1d16 "${testcvs} co -d dir 2mod 1d1mod" \ @@ -10949,17 +10925,13 @@ U dir/2mod-2/file2-2" U dir/2mod/file2 ${PROG} [a-z]*: Updating dir/dir1d1 U dir/dir1d1/file1" - dotest cvsadm-1d16b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d16b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d16d "cat dir/CVS/Repository" \ -"${AREP}mod2" + dotest cvsadm-1d16d "cat dir/CVS/Repository" "mod2" # the usual for 2mod - dotest cvsadm-1d16f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d16f "cat dir/2mod/CVS/Repository" "mod2/sub2" # the usual for 1d1mod - dotest cvsadm-1d16h "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d16h "cat dir/dir1d1/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d17 "${testcvs} co -d dir 2mod 1d2mod" \ @@ -10967,17 +10939,13 @@ U dir/dir1d1/file1" U dir/2mod/file2 ${PROG} [a-z]*: Updating dir/dir1d2 U dir/dir1d2/file2" - dotest cvsadm-1d17b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d17b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d17d "cat dir/CVS/Repository" \ -"${AREP}mod2" + dotest cvsadm-1d17d "cat dir/CVS/Repository" "mod2" # the usual for 2mod - dotest cvsadm-1d17f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d17f "cat dir/2mod/CVS/Repository" "mod2/sub2" # the usual for 1d2mod - dotest cvsadm-1d17h "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d17h "cat dir/dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir dotest cvsadm-1d18 "${testcvs} co -d dir 2mod 2d1mod" \ @@ -10985,19 +10953,14 @@ U dir/dir1d2/file2" U dir/2mod/file2 ${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1" - dotest cvsadm-1d18b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d18b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d18d "cat dir/CVS/Repository" \ -"${AREP}mod2" + dotest cvsadm-1d18d "cat dir/CVS/Repository" "mod2" # the usual for 2mod - dotest cvsadm-1d18f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d18f "cat dir/2mod/CVS/Repository" "mod2/sub2" # the usual for 2d1mod - dotest cvsadm-1d18h "cat dir/dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d18j "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d18h "cat dir/dir2d1/CVS/Repository" "\." + dotest cvsadm-1d18j "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d19 "${testcvs} co -d dir 2mod 2d2mod" \ @@ -11005,19 +10968,14 @@ U dir/dir2d1/sub2d1/file1" U dir/2mod/file2 ${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" - dotest cvsadm-1d19b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d19b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d19d "cat dir/CVS/Repository" \ -"${AREP}mod2" + dotest cvsadm-1d19d "cat dir/CVS/Repository" "mod2" # the usual for 2mod - dotest cvsadm-1d19f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d19f "cat dir/2mod/CVS/Repository" "mod2/sub2" # the usual for 2d2mod - dotest cvsadm-1d19h "cat dir/dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-1d19j "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d19h "cat dir/dir2d2/CVS/Repository" "mod2" + dotest cvsadm-1d19j "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir @@ -11028,17 +10986,13 @@ U dir/dir2d2/sub2d2/file2" U dir/dir1d1/file1 ${PROG} [a-z]*: Updating dir/dir1d1-2 U dir/dir1d1-2/file1-2" - dotest cvsadm-1d20b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d20b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d20d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d20d "cat dir/CVS/Repository" "\." # the usual for 1d1mod - dotest cvsadm-1d20f "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d20f "cat dir/dir1d1/CVS/Repository" "mod1" # the usual for 1d1mod copy - dotest cvsadm-1d20h "cat dir/dir1d1-2/CVS/Repository" \ -"${AREP}mod1-2" + dotest cvsadm-1d20h "cat dir/dir1d1-2/CVS/Repository" "mod1-2" rm -rf CVS dir dotest cvsadm-1d21 "${testcvs} co -d dir 1d1mod 1d2mod" \ @@ -11046,17 +11000,13 @@ U dir/dir1d1-2/file1-2" U dir/dir1d1/file1 ${PROG} [a-z]*: Updating dir/dir1d2 U dir/dir1d2/file2" - dotest cvsadm-1d21b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d21b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d21d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d21d "cat dir/CVS/Repository" "\." # the usual for 1d1mod - dotest cvsadm-1d21f "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d21f "cat dir/dir1d1/CVS/Repository" "mod1" # the usual for 1d2mod - dotest cvsadm-1d21h "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d21h "cat dir/dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir dotest cvsadm-1d22 "${testcvs} co -d dir 1d1mod 2d1mod" \ @@ -11064,19 +11014,14 @@ U dir/dir1d2/file2" U dir/dir1d1/file1 ${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1" - dotest cvsadm-1d22b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d22b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d22d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d22d "cat dir/CVS/Repository" "\." # the usual for 1d1mod - dotest cvsadm-1d22f "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d22f "cat dir/dir1d1/CVS/Repository" "mod1" # the usual for 2d1mod - dotest cvsadm-1d22h "cat dir/dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d22j "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d22h "cat dir/dir2d1/CVS/Repository" "\." + dotest cvsadm-1d22j "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d23 "${testcvs} co -d dir 1d1mod 2d2mod" \ @@ -11084,19 +11029,14 @@ U dir/dir2d1/sub2d1/file1" U dir/dir1d1/file1 ${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" - dotest cvsadm-1d23b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d23b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d23d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d23d "cat dir/CVS/Repository" "\." # the usual for 1d1mod - dotest cvsadm-1d23f "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d23f "cat dir/dir1d1/CVS/Repository" "mod1" # the usual for 2d2mod - dotest cvsadm-1d23h "cat dir/dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-1d23j "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d23h "cat dir/dir2d2/CVS/Repository" "mod2" + dotest cvsadm-1d23j "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir @@ -11107,17 +11047,13 @@ U dir/dir2d2/sub2d2/file2" U dir/dir1d2/file2 ${PROG} [a-z]*: Updating dir/dir1d2-2 U dir/dir1d2-2/file2-2" - dotest cvsadm-1d24b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d24b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d24d "cat dir/CVS/Repository" \ -"${AREP}mod2" + dotest cvsadm-1d24d "cat dir/CVS/Repository" "mod2" # the usual for 1d2mod - dotest cvsadm-1d24f "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d24f "cat dir/dir1d2/CVS/Repository" "mod2/sub2" # the usual for 1d2mod copy - dotest cvsadm-1d24h "cat dir/dir1d2-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" + dotest cvsadm-1d24h "cat dir/dir1d2-2/CVS/Repository" "mod2-2/sub2-2" rm -rf CVS dir dotest cvsadm-1d25 "${testcvs} co -d dir 1d2mod 2d1mod" \ @@ -11125,19 +11061,14 @@ U dir/dir1d2-2/file2-2" U dir/dir1d2/file2 ${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1" - dotest cvsadm-1d25b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d25b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d25d "cat dir/CVS/Repository" \ -"${AREP}mod2" + dotest cvsadm-1d25d "cat dir/CVS/Repository" "mod2" # the usual for 1d2mod - dotest cvsadm-1d25f "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d25f "cat dir/dir1d2/CVS/Repository" "mod2/sub2" # the usual for 2d1mod - dotest cvsadm-1d25h "cat dir/dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d25j "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d25h "cat dir/dir2d1/CVS/Repository" "\." + dotest cvsadm-1d25j "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-1d26 "${testcvs} co -d dir 1d2mod 2d2mod" \ @@ -11145,19 +11076,14 @@ U dir/dir2d1/sub2d1/file1" U dir/dir1d2/file2 ${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" - dotest cvsadm-1d26b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d26b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d26d "cat dir/CVS/Repository" \ -"${AREP}mod2" + dotest cvsadm-1d26d "cat dir/CVS/Repository" "mod2" # the usual for 1d2mod - dotest cvsadm-1d26f "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d26f "cat dir/dir1d2/CVS/Repository" "mod2/sub2" # the usual for 2d2mod - dotest cvsadm-1d26h "cat dir/dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-1d26j "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d26h "cat dir/dir2d2/CVS/Repository" "mod2" + dotest cvsadm-1d26j "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir @@ -11168,21 +11094,16 @@ U dir/dir2d2/sub2d2/file2" U dir/dir2d1/sub2d1/file1 ${PROG} [a-z]*: Updating dir/dir2d1-2/sub2d1-2 U dir/dir2d1-2/sub2d1-2/file1-2" - dotest cvsadm-1d27b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d27b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d27d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d27d "cat dir/CVS/Repository" "CVSROOT/Emptydir" # the usual for 2d1mod - dotest cvsadm-1d27f "cat dir/dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d27h "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d27f "cat dir/dir2d1/CVS/Repository" "\." + dotest cvsadm-1d27h "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1" # the usual for 2d1mod - dotest cvsadm-1d27j "cat dir/dir2d1-2/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d27j "cat dir/dir2d1-2/CVS/Repository" "\." dotest cvsadm-1d27l "cat dir/dir2d1-2/sub2d1-2/CVS/Repository" \ -"${AREP}mod1-2" +"mod1-2" rm -rf CVS dir dotest cvsadm-1d28 "${testcvs} co -d dir 2d1mod 2d2mod" \ @@ -11190,21 +11111,15 @@ U dir/dir2d1-2/sub2d1-2/file1-2" U dir/dir2d1/sub2d1/file1 ${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" - dotest cvsadm-1d28b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d28b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d28d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" + dotest cvsadm-1d28d "cat dir/CVS/Repository" "CVSROOT/Emptydir" # the usual for 2d1mod - dotest cvsadm-1d28f "cat dir/dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-1d28h "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-1d28f "cat dir/dir2d1/CVS/Repository" "\." + dotest cvsadm-1d28h "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1" # the usual for 2d2mod - dotest cvsadm-1d28j "cat dir/dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-1d28l "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d28j "cat dir/dir2d2/CVS/Repository" "mod2" + dotest cvsadm-1d28l "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir @@ -11215,21 +11130,16 @@ U dir/dir2d2/sub2d2/file2" U dir/dir2d2/sub2d2/file2 ${PROG} [a-z]*: Updating dir/dir2d2-2/sub2d2-2 U dir/dir2d2-2/sub2d2-2/file2-2" - dotest cvsadm-1d29b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d29b "cat CVS/Repository" "\." # the usual for the dir level - dotest cvsadm-1d29d "cat dir/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-1d29d "cat dir/CVS/Repository" "\." # the usual for 2d2mod - dotest cvsadm-1d29f "cat dir/dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-1d29h "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-1d29f "cat dir/dir2d2/CVS/Repository" "mod2" + dotest cvsadm-1d29h "cat dir/dir2d2/sub2d2/CVS/Repository" "mod2/sub2" # the usual for 2d2mod - dotest cvsadm-1d29j "cat dir/dir2d2-2/CVS/Repository" \ -"${AREP}mod2-2" + dotest cvsadm-1d29j "cat dir/dir2d2-2/CVS/Repository" "mod2-2" dotest cvsadm-1d29l "cat dir/dir2d2-2/sub2d2-2/CVS/Repository" \ -"${AREP}mod2-2/sub2-2" +"mod2-2/sub2-2" rm -rf CVS dir ################################################## @@ -11248,61 +11158,49 @@ U dir/dir2d2-2/sub2d2-2/file2-2" dotest cvsadm-2d3 "${testcvs} co -d dir/dir2 1mod" \ "${PROG} [a-z]*: Updating dir/dir2 U dir/dir2/file1" - dotest cvsadm-2d3b "cat CVS/Repository" \ -"${AREP}\." + dotest cvsadm-2d3b "cat CVS/Repository" "\." dotest_fail cvsadm-2d3d "test -f dir/CVS/Repository" "" - dotest cvsadm-2d3f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-2d3f "cat dir/dir2/CVS/Repository" "mod1" rm -rf CVS dir mkdir dir dotest cvsadm-2d4 "${testcvs} co -d dir/dir2 2mod" \ "${PROG} [a-z]*: Updating dir/dir2 U dir/dir2/file2" - dotest cvsadm-2d4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-2d4b "cat CVS/Repository" "\." + dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" "mod2/sub2" rm -rf CVS dir mkdir dir dotest cvsadm-2d5 "${testcvs} co -d dir/dir2 1d1mod" \ "${PROG} [a-z]*: Updating dir/dir2 U dir/dir2/file1" - dotest cvsadm-2d5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-2d5b "cat CVS/Repository" "\." + dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" "mod1" rm -rf CVS dir mkdir dir dotest cvsadm-2d6 "${testcvs} co -d dir/dir2 1d2mod" \ "${PROG} [a-z]*: Updating dir/dir2 U dir/dir2/file2" - dotest cvsadm-2d6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-2d6b "cat CVS/Repository" "\." + dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" "mod2/sub2" rm -rf CVS dir mkdir dir dotest cvsadm-2d7 "${testcvs} co -d dir/dir2 2d1mod" \ "${PROG} [a-z]*: Updating dir/dir2 U dir/dir2/file1" - dotest cvsadm-2d7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-2d7b "cat CVS/Repository" "\." + dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" "mod1" rm -rf CVS dir mkdir dir dotest cvsadm-2d8 "${testcvs} co -d dir/dir2 2d2mod" \ "${PROG} [a-z]*: Updating dir/dir2 U dir/dir2/file2" - dotest cvsadm-2d8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-2d8b "cat CVS/Repository" "\." + dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" "mod2/sub2" rm -rf CVS dir ################################################## @@ -11313,59 +11211,45 @@ U dir/dir2/file2" dotest cvsadm-N3 "${testcvs} co -N 1mod" \ "${PROG} [a-z]*: Updating 1mod U 1mod/file1" - dotest cvsadm-N3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N3d "cat 1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-N3b "cat CVS/Repository" "\." + dotest cvsadm-N3d "cat 1mod/CVS/Repository" "mod1" rm -rf CVS 1mod dotest cvsadm-N4 "${testcvs} co -N 2mod" \ "${PROG} [a-z]*: Updating 2mod U 2mod/file2" - dotest cvsadm-N4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N4d "cat 2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-N4b "cat CVS/Repository" "\." + dotest cvsadm-N4d "cat 2mod/CVS/Repository" "mod2/sub2" rm -rf CVS 2mod dotest cvsadm-N5 "${testcvs} co -N 1d1mod" \ "${PROG} [a-z]*: Updating dir1d1 U dir1d1/file1" - dotest cvsadm-N5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N5d "cat dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-N5b "cat CVS/Repository" "\." + dotest cvsadm-N5d "cat dir1d1/CVS/Repository" "mod1" rm -rf CVS dir1d1 dotest cvsadm-N6 "${testcvs} co -N 1d2mod" \ "${PROG} [a-z]*: Updating dir1d2 U dir1d2/file2" - dotest cvsadm-N6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N6d "cat dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-N6b "cat CVS/Repository" "\." + dotest cvsadm-N6d "cat dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir1d2 dotest cvsadm-N7 "${testcvs} co -N 2d1mod" \ "${PROG} [a-z]*: Updating dir2d1/sub2d1 U dir2d1/sub2d1/file1" - dotest cvsadm-N7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N7d "cat dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N7f "cat dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-N7b "cat CVS/Repository" "\." + dotest cvsadm-N7d "cat dir2d1/CVS/Repository" "\." + dotest cvsadm-N7f "cat dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS dir2d1 dotest cvsadm-N8 "${testcvs} co -N 2d2mod" \ "${PROG} [a-z]*: Updating dir2d2/sub2d2 U dir2d2/sub2d2/file2" - dotest cvsadm-N8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N8d "cat dir2d2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-N8f "cat dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-N8b "cat CVS/Repository" "\." + dotest cvsadm-N8d "cat dir2d2/CVS/Repository" "mod2" + dotest cvsadm-N8f "cat dir2d2/sub2d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir2d2 ## the ones in one-deep directories @@ -11373,71 +11257,52 @@ U dir2d2/sub2d2/file2" dotest cvsadm-N1d3 "${testcvs} co -N -d dir 1mod" \ "${PROG} [a-z]*: Updating dir/1mod U dir/1mod/file1" - dotest cvsadm-N1d3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d3d "cat dir/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d3f "cat dir/1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-N1d3b "cat CVS/Repository" "\." + dotest cvsadm-N1d3d "cat dir/CVS/Repository" "\." + dotest cvsadm-N1d3f "cat dir/1mod/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-N1d4 "${testcvs} co -N -d dir 2mod" \ "${PROG} [a-z]*: Updating dir/2mod U dir/2mod/file2" - dotest cvsadm-N1d4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d4d "cat dir/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-N1d4f "cat dir/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-N1d4b "cat CVS/Repository" "\." + dotest cvsadm-N1d4d "cat dir/CVS/Repository" "mod2" + dotest cvsadm-N1d4f "cat dir/2mod/CVS/Repository" "mod2/sub2" rm -rf CVS dir dotest cvsadm-N1d5 "${testcvs} co -N -d dir 1d1mod" \ "${PROG} [a-z]*: Updating dir/dir1d1 U dir/dir1d1/file1" - dotest cvsadm-N1d5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d5d "cat dir/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d5d "cat dir/dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-N1d5b "cat CVS/Repository" "\." + dotest cvsadm-N1d5d "cat dir/CVS/Repository" "\." + dotest cvsadm-N1d5d "cat dir/dir1d1/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-N1d6 "${testcvs} co -N -d dir 1d2mod" \ "${PROG} [a-z]*: Updating dir/dir1d2 U dir/dir1d2/file2" - dotest cvsadm-N1d6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d6d "cat dir/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-N1d6f "cat dir/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-N1d6b "cat CVS/Repository" "\." + dotest cvsadm-N1d6d "cat dir/CVS/Repository" "mod2" + dotest cvsadm-N1d6f "cat dir/dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir dotest cvsadm-N1d7 "${testcvs} co -N -d dir 2d1mod" \ "${PROG} [a-z]*: Updating dir/dir2d1/sub2d1 U dir/dir2d1/sub2d1/file1" - dotest cvsadm-N1d7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d7d "cat dir/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N1d7f "cat dir/dir2d1/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d7h "cat dir/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-N1d7b "cat CVS/Repository" "\." + dotest cvsadm-N1d7d "cat dir/CVS/Repository" "CVSROOT/Emptydir" + dotest cvsadm-N1d7f "cat dir/dir2d1/CVS/Repository" "\." + dotest cvsadm-N1d7h "cat dir/dir2d1/sub2d1/CVS/Repository" "mod1" rm -rf CVS dir dotest cvsadm-N1d8 "${testcvs} co -N -d dir 2d2mod" \ "${PROG} [a-z]*: Updating dir/dir2d2/sub2d2 U dir/dir2d2/sub2d2/file2" - dotest cvsadm-N1d8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d8d "cat dir/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N1d8d "cat dir/dir2d2/CVS/Repository" \ -"${AREP}mod2" + dotest cvsadm-N1d8b "cat CVS/Repository" "\." + dotest cvsadm-N1d8d "cat dir/CVS/Repository" "\." + dotest cvsadm-N1d8d "cat dir/dir2d2/CVS/Repository" "mod2" dotest cvsadm-N1d8d "cat dir/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" +"mod2/sub2" rm -rf CVS dir ## the ones in two-deep directories @@ -11446,76 +11311,58 @@ U dir/dir2d2/sub2d2/file2" dotest cvsadm-N2d3 "${testcvs} co -N -d dir/dir2 1mod" \ "${PROG} [a-z]*: Updating dir/dir2/1mod U dir/dir2/1mod/file1" - dotest cvsadm-N2d3b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d3h "cat dir/dir2/1mod/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-N2d3b "cat CVS/Repository" "\." + dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" "\." + dotest cvsadm-N2d3h "cat dir/dir2/1mod/CVS/Repository" "mod1" rm -rf CVS dir mkdir dir dotest cvsadm-N2d4 "${testcvs} co -N -d dir/dir2 2mod" \ "${PROG} [a-z]*: Updating dir/dir2/2mod U dir/dir2/2mod/file2" - dotest cvsadm-N2d4b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d4f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-N2d4h "cat dir/dir2/2mod/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-N2d4b "cat CVS/Repository" "\." + dotest cvsadm-N2d4f "cat dir/dir2/CVS/Repository" "mod2" + dotest cvsadm-N2d4h "cat dir/dir2/2mod/CVS/Repository" "mod2/sub2" rm -rf CVS dir mkdir dir dotest cvsadm-N2d5 "${testcvs} co -N -d dir/dir2 1d1mod" \ "${PROG} [a-z]*: Updating dir/dir2/dir1d1 U dir/dir2/dir1d1/file1" - dotest cvsadm-N2d5b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d5h "cat dir/dir2/dir1d1/CVS/Repository" \ -"${AREP}mod1" + dotest cvsadm-N2d5b "cat CVS/Repository" "\." + dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" "\." + dotest cvsadm-N2d5h "cat dir/dir2/dir1d1/CVS/Repository" "mod1" rm -rf CVS dir mkdir dir dotest cvsadm-N2d6 "${testcvs} co -N -d dir/dir2 1d2mod" \ "${PROG} [a-z]*: Updating dir/dir2/dir1d2 U dir/dir2/dir1d2/file2" - dotest cvsadm-N2d6b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d6f "cat dir/dir2/CVS/Repository" \ -"${AREP}mod2" - dotest cvsadm-N2d6h "cat dir/dir2/dir1d2/CVS/Repository" \ -"${AREP}mod2/sub2" + dotest cvsadm-N2d6b "cat CVS/Repository" "\." + dotest cvsadm-N2d6f "cat dir/dir2/CVS/Repository" "mod2" + dotest cvsadm-N2d6h "cat dir/dir2/dir1d2/CVS/Repository" "mod2/sub2" rm -rf CVS dir mkdir dir dotest cvsadm-N2d7 "${testcvs} co -N -d dir/dir2 2d1mod" \ "${PROG} [a-z]*: Updating dir/dir2/dir2d1/sub2d1 U dir/dir2/dir2d1/sub2d1/file1" - dotest cvsadm-N2d7b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d7f "cat dir/dir2/CVS/Repository" \ -"${AREP}CVSROOT/Emptydir" - dotest cvsadm-N2d7g "cat dir/dir2/dir2d1/CVS/Repository" \ -"${AREP}\." + dotest cvsadm-N2d7b "cat CVS/Repository" "\." + dotest cvsadm-N2d7f "cat dir/dir2/CVS/Repository" "CVSROOT/Emptydir" + dotest cvsadm-N2d7g "cat dir/dir2/dir2d1/CVS/Repository" "\." dotest cvsadm-N2d7h "cat dir/dir2/dir2d1/sub2d1/CVS/Repository" \ -"${AREP}mod1" +"mod1" rm -rf CVS dir mkdir dir dotest cvsadm-N2d8 "${testcvs} co -N -d dir/dir2 2d2mod" \ "${PROG} [a-z]*: Updating dir/dir2/dir2d2/sub2d2 U dir/dir2/dir2d2/sub2d2/file2" - dotest cvsadm-N2d8b "cat CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" \ -"${AREP}\." - dotest cvsadm-N2d8h "cat dir/dir2/dir2d2/CVS/Repository" \ -"${AREP}mod2" + dotest cvsadm-N2d8b "cat CVS/Repository" "\." + dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" "\." + dotest cvsadm-N2d8h "cat dir/dir2/dir2d2/CVS/Repository" "mod2" dotest cvsadm-N2d8j "cat dir/dir2/dir2d2/sub2d2/CVS/Repository" \ -"${AREP}mod2/sub2" +"mod2/sub2" rm -rf CVS dir fi # end of tests to be skipped for remote @@ -11718,20 +11565,7 @@ U 1/file1" U ${TESTDIR}/1/file1" fi # remote workaround - # Are we relative or absolute in our Repository file? - echo "${CVSROOT_DIRNAME}/mod1" > ${TESTDIR}/dotest.abs - echo "mod1" > ${TESTDIR}/dotest.rel - if cmp ${TESTDIR}/dotest.abs ${TESTDIR}/1/CVS/Repository >/dev/null 2>&1; then - AREP="${CVSROOT_DIRNAME}/" - elif cmp ${TESTDIR}/dotest.rel ${TESTDIR}/1/CVS/Repository >/dev/null 2>&1; then - AREP="" - else - fail "Cannot figure out if RELATIVE_REPOS is defined." - fi - rm -f ${TESTDIR}/dotest.rel ${TESTDIR}/dotest.abs - - dotest abspath-2b "cat ${TESTDIR}/1/CVS/Repository" \ -"${AREP}mod1" + dotest abspath-2b "cat ${TESTDIR}/1/CVS/Repository" "mod1" # Done. Clean up. rm -rf ${TESTDIR}/1 @@ -11771,8 +11605,7 @@ U 2/file1" "${PROG} [a-z]*: Updating ${TESTDIR}/1/2 U ${TESTDIR}/1/2/file1" fi # remote workaround - dotest abspath-3b "cat ${TESTDIR}/1/2/CVS/Repository" \ -"${AREP}mod1" + dotest abspath-3b "cat ${TESTDIR}/1/2/CVS/Repository" "mod1" # For all the same reasons that we want "1" to already # exist, we don't to mess with it to traverse it, for @@ -11812,12 +11645,9 @@ U ${TESTDIR}/1/mod1/file1 ${PROG} [a-z]*: Updating ${TESTDIR}/1/mod2 U ${TESTDIR}/1/mod2/file2" fi # end remote workaround - dotest abspath-5b "cat ${TESTDIR}/1/CVS/Repository" \ -"${AREP}." - dotest abspath-5c "cat ${TESTDIR}/1/mod1/CVS/Repository" \ -"${AREP}mod1" - dotest abspath-5d "cat ${TESTDIR}/1/mod2/CVS/Repository" \ -"${AREP}mod2" + dotest abspath-5b "cat ${TESTDIR}/1/CVS/Repository" "\." + dotest abspath-5c "cat ${TESTDIR}/1/mod1/CVS/Repository" "mod1" + dotest abspath-5d "cat ${TESTDIR}/1/mod2/CVS/Repository" "mod2" # Done. Clean up. rm -rf ${TESTDIR}/1 @@ -11842,14 +11672,10 @@ U ${TESTDIR}/1/mod1/file1 ${PROG} [a-z]*: Updating ${TESTDIR}/1/mod2 U ${TESTDIR}/1/mod2/file2" fi # end of remote workaround - dotest abspath-6b "cat ${TESTDIR}/1/CVS/Repository" \ -"${AREP}." - dotest abspath-6c "cat ${TESTDIR}/1/CVSROOT/CVS/Repository" \ -"${AREP}CVSROOT" - dotest abspath-6c "cat ${TESTDIR}/1/mod1/CVS/Repository" \ -"${AREP}mod1" - dotest abspath-6d "cat ${TESTDIR}/1/mod2/CVS/Repository" \ -"${AREP}mod2" + dotest abspath-6b "cat ${TESTDIR}/1/CVS/Repository" "\." + dotest abspath-6c "cat ${TESTDIR}/1/CVSROOT/CVS/Repository" "CVSROOT" + dotest abspath-6c "cat ${TESTDIR}/1/mod1/CVS/Repository" "mod1" + dotest abspath-6d "cat ${TESTDIR}/1/mod2/CVS/Repository" "mod2" # Done. Clean up. rm -rf ${TESTDIR}/1 @@ -17348,12 +17174,12 @@ EOF # someone feels like documenting them and things go downhill # from there). # - # Hmm, if this test is run on the 31st of the month, and 100 - # months from now is a month with only 30 days (e.g. run on - # 31 May 1999, 31 May 2001), it seems to fail. - # - # Sigh. - dotest rcs2-7 "${testcvs} -q update -p -D '100 months' file1" \ + # These tests can be expected to fail 3 times every 400 years + # starting Feb. 29, 2096 (because 8 years from that date would + # be Feb. 29, 2100, which is an invalid date -- 2100 isn't a + # leap year because it's divisible by 100 but not by 400). + + dotest rcs2-7 "${testcvs} -q update -p -D '96 months' file1" \ "head revision" dotest rcs2-8 "${testcvs} -q update -p -D '8 years' file1" \ "head revision" @@ -21825,39 +21651,22 @@ U mod2-2/file2-2" U mod1-2/file1-2" cd .. - # Try to determine whether RELATIVE_REPOS is defined - # so that we can make the following a lot less - # verbose. - - echo "${CVSROOT1_DIRNAME}/mod1-1" > dotest.abs - echo "mod1-1" > dotest.rel - if cmp dotest.abs mod1-1/CVS/Repository >/dev/null 2>&1; then - AREP1="${CVSROOT1_DIRNAME}/" - AREP2="${CVSROOT2_DIRNAME}/" - elif cmp dotest.rel mod1-1/CVS/Repository >/dev/null 2>&1; then - AREP1="" - AREP2="" - else - fail "Cannot figure out if RELATIVE_REPOS is defined." - fi - rm -f dotest.abs dotest.rel - # # Make sure that the Root and Repository files contain the # correct information. # dotest multiroot-cvsadm-1a "cat mod1-1/CVS/Root" "${CVSROOT1}" - dotest multiroot-cvsadm-1b "cat mod1-1/CVS/Repository" "${AREP1}mod1-1" + dotest multiroot-cvsadm-1b "cat mod1-1/CVS/Repository" "mod1-1" dotest multiroot-cvsadm-2a "cat mod2-1/CVS/Root" "${CVSROOT2}" - dotest multiroot-cvsadm-2b "cat mod2-1/CVS/Repository" "${AREP2}mod2-1" + dotest multiroot-cvsadm-2b "cat mod2-1/CVS/Repository" "mod2-1" dotest multiroot-cvsadm-3a "cat mod1-2/CVS/Root" "${CVSROOT1}" - dotest multiroot-cvsadm-3b "cat mod1-2/CVS/Repository" "${AREP1}mod1-2" + dotest multiroot-cvsadm-3b "cat mod1-2/CVS/Repository" "mod1-2" dotest multiroot-cvsadm-3c "cat mod1-2/mod2-2/CVS/Root" "${CVSROOT2}" - dotest multiroot-cvsadm-3d "cat mod1-2/mod2-2/CVS/Repository" "${AREP2}mod2-2" + dotest multiroot-cvsadm-3d "cat mod1-2/mod2-2/CVS/Repository" "mod2-2" dotest multiroot-cvsadm-4a "cat mod2-2/CVS/Root" "${CVSROOT2}" - dotest multiroot-cvsadm-4b "cat mod2-2/CVS/Repository" "${AREP2}mod2-2" + dotest multiroot-cvsadm-4b "cat mod2-2/CVS/Repository" "mod2-2" dotest multiroot-cvsadm-4c "cat mod2-2/mod1-2/CVS/Root" "${CVSROOT1}" - dotest multiroot-cvsadm-4d "cat mod2-2/mod1-2/CVS/Repository" "${AREP1}mod1-2" + dotest multiroot-cvsadm-4d "cat mod2-2/mod1-2/CVS/Repository" "mod1-2" # # Start testing various cvs commands. Begin with commands @@ -21869,9 +21678,7 @@ U mod1-2/file1-2" # that there's not some kind of unexpected dependency on the # choice of which CVSROOT is specified on the command line. - if test "${AREP1}" = ""; then - # RELATIVE_REPOS. - dotest multiroot-update-1a "${testcvs1} update" \ + dotest multiroot-update-1a "${testcvs1} update" \ "${PROG} [a-z]*: Updating \. ${PROG} [a-z]*: Updating mod1-1 ${PROG} [a-z]*: Updating mod1-2 @@ -21885,8 +21692,8 @@ ${PROG} [a-z]*: Updating mod2-2 ${PROG} [a-z]*: cannot open directory ${TESTDIR}/root1/mod2-2: No such file or directory ${PROG} [a-z]*: skipping directory mod2-2" - # Same deal but with -d ${CVSROOT2}. - dotest multiroot-update-1b "${testcvs2} update" \ + # Same deal but with -d ${CVSROOT2}. + dotest multiroot-update-1b "${testcvs2} update" \ "${PROG} [a-z]*: Updating \. ${PROG} [a-z]*: Updating mod1-1 ${PROG} [a-z]*: cannot open directory ${TESTDIR}/root2/mod1-1: No such file or directory @@ -21899,44 +21706,6 @@ ${PROG} [a-z]*: Updating mod2-2 ${PROG} [a-z]*: Updating mod2-2/mod1-2 ${PROG} [a-z]*: cannot open directory ${TESTDIR}/root2/mod1-2: No such file or directory ${PROG} [a-z]*: skipping directory mod2-2/mod1-2" - else - # non-RELATIVE_REPOS. - if $remote; then - # Hmm, this one is specific to non-RELATIVE_REPOS too I think. - dotest_fail multiroot-update-1ar "${testcvs1} update" \ -"protocol error: directory '${TESTDIR}/root2/mod2-2' not within root '${TESTDIR}/root1'" - else - # The basic idea is that -d overrides CVS/Root. - # With RELATIVE_REPOS, CVS could print an error when it - # tries to recurse to mod2-2, which doesn't exist in - # this repository (?) With absolute, CVS will just look at the - # CVS/Repository for the other root (and log to the wrong - # history file and that sort of thing). - dotest multiroot-update-1a "${testcvs1} update" \ -"${PROG} update: Updating \. -${PROG} [a-z]*: Updating mod1-1 -${PROG} [a-z]*: Updating mod1-2 -${PROG} [a-z]*: Updating mod1-2/mod2-2 -${PROG} [a-z]*: Updating mod2-1 -${PROG} [a-z]*: Updating mod2-2 -${PROG} [a-z]*: Updating mod2-2/mod1-2" - fi # remote - - # Same deal but with -d ${CVSROOT2}. - if $remote; then - dotest_fail multiroot-update-1b "${testcvs2} update" \ -"protocol error: directory '${TESTDIR}/root1' not within root '${TESTDIR}/root2'" - else - dotest multiroot-update-1b "${testcvs2} update" \ -"${PROG} update: Updating \. -${PROG} [a-z]*: Updating mod1-1 -${PROG} [a-z]*: Updating mod1-2 -${PROG} [a-z]*: Updating mod1-2/mod2-2 -${PROG} [a-z]*: Updating mod2-1 -${PROG} [a-z]*: Updating mod2-2 -${PROG} [a-z]*: Updating mod2-2/mod1-2" - fi # remote - fi # non-RELATIVE_REPOS # modify all files and do a diff @@ -23110,30 +22879,14 @@ ${TESTDIR}/root1/dir1/file1,v <-- file1 initial revision: 1\.1 done" - if test "`cat dir1/CVS/Repository`" = "dir1"; then - # RELATIVE_REPOS - # That this is an error is good - we are asking CVS to do - # something which doesn't make sense. - dotest_fail multiroot3-10 \ + # That this is an error is good - we are asking CVS to do + # something which doesn't make sense. + dotest_fail multiroot3-10 \ "${testcvs} -q -d ${CVSROOT1} diff dir1/file1 dir2/file2" \ "${PROG} [a-z]*: failed to create lock directory for .${TESTDIR}/root1/dir2' (${TESTDIR}/root1/dir2/#cvs.lock): No such file or directory ${PROG} [a-z]*: failed to obtain dir lock in repository .${TESTDIR}/root1/dir2' ${PROG} \[[a-z]* aborted\]: read lock failed - giving up" - else - # Not RELATIVE_REPOS. - if $remote; then - # This is good behavior - we are asking CVS to do something - # which doesn't make sense. - dotest_fail multiroot3-10 \ -"${testcvs} -q -d ${CVSROOT1} diff dir1/file1 dir2/file2" \ -"protocol error: directory '${TESTDIR}/root2/dir2' not within root '${TESTDIR}/root1'" - else - # Local isn't as picky as we'd want in terms of getting - # the wrong root. - dotest multiroot3-10 \ -"${testcvs} -q -d ${CVSROOT1} diff dir1/file1 dir2/file2" "" - fi - fi + # This one is supposed to work. dotest multiroot3-11 "${testcvs} -q diff dir1/file1 dir2/file2" "" @@ -24141,6 +23894,7 @@ Valid-responses [-a-zA-Z ]* valid-requests Argument -D Argument [34] Oct 1999 [0-9][0-9]:00:00 -0000 +Argument -- Directory \. ${CVSROOT_DIRNAME}/first-dir Entry /file1/1\.2/// @@ -24186,6 +23940,58 @@ Server: \1' fi ;; + commit-add-missing) + # Make sure that a commit fails when a `cvs add'ed file has + # been removed from the working directory. + + mkdir 1; cd 1 + module=c-a-m + echo > unused-file + dotest commit-add-missing-1 \ + "$testcvs -Q import -m. $module X Y" '' + + file=F + # Check it out and tag it. + dotest commit-add-missing-2 "$testcvs -Q co $module" '' + cd $module + dotest commit-add-missing-3 "$testcvs -Q tag -b B" '' + echo v1 > $file + dotest commit-add-missing-4 "$testcvs -Q add $file" '' + rm -f $file + dotest_fail commit-add-missing-5 "$testcvs -Q ci -m. $file" \ +"${PROG} [a-z]*: Up-to-date check failed for .$file' +${PROG} \[[a-z]* aborted\]: correct above errors first!" + + cd ../.. + rm -rf 1 + rm -rf ${CVSROOT_DIRNAME}/$module + ;; + + commit-d) + # Check that top-level commits work when CVS/Root + # is overridden by cvs -d. + + mkdir -p 1/subdir; cd 1 + touch file1 subdir/file2 + dotest commit-d-1 "$testcvs -Q import -m. c-d-c X Y" "" + dotest commit-d-2 "$testcvs -Q co c-d-c" "" + cd c-d-c + echo change >>file1; echo another change >>subdir/file2 + # Changing working root, then override with -d + echo nosuchhost:/cvs > CVS/Root + dotest commit-d-3 "$testcvs -Q -d $CVSROOT commit -m." \ +"Checking in file1; +${TESTDIR}/cvsroot/c-d-c/file1,v <-- file1 +new revision: 1.2; previous revision: 1.1 +done +Checking in subdir/file2; +${TESTDIR}/cvsroot/c-d-c/subdir/file2,v <-- file2 +new revision: 1.2; previous revision: 1.1 +done" + cd ../.. + rm -rf 1 cvsroot/c-d-c + ;; + *) echo $what is not the name of a test -- ignored ;; diff --git a/contrib/cvs/src/server.c b/contrib/cvs/src/server.c index 76b5008..9a0c132 100644 --- a/contrib/cvs/src/server.c +++ b/contrib/cvs/src/server.c @@ -710,17 +710,7 @@ serve_valid_responses (arg) cause deadlock, as noted in server_cleanup. */ buf_flush (buf_to_net, 1); - /* I'm doing this manually rather than via error_exit () - because I'm not sure whether we want to call server_cleanup. - Needs more investigation.... */ - -#ifdef SYSTEM_CLEANUP - /* Hook for OS-specific behavior, for example socket subsystems on - NT and OS2 or dealing with windows and arguments on Mac. */ - SYSTEM_CLEANUP (); -#endif - - exit (EXIT_FAILURE); + error_exit (); } else if (rs->status == rs_optional) rs->status = rs_not_supported; @@ -862,7 +852,10 @@ outside_root (repos) /* I think isabsolute (repos) should always be true, and that any RELATIVE_REPOS stuff should only be in CVS/Repository files, not the protocol (for compatibility), but I'm putting - in the isabsolute check just in case. */ + in the isabsolute check just in case. + + This is a good security precaution regardless. -DRP + */ if (!isabsolute (repos)) { if (alloc_pending (repos_len + 80)) @@ -2915,10 +2908,10 @@ error \n"); fd_set readfds; fd_set writefds; int numfds; -#ifdef SERVER_FLOWCONTROL - int bufmemsize; struct timeval *timeout_ptr; struct timeval timeout; +#ifdef SERVER_FLOWCONTROL + int bufmemsize; /* * See if we are swamping the remote client and filling our VM. @@ -3210,10 +3203,13 @@ E CVS locks may need cleaning up.\n"); buf_flush (buf_to_net, 1); buf_shutdown (protocol_inbuf); buf_free (protocol_inbuf); + protocol_inbuf = NULL; buf_shutdown (stderrbuf); buf_free (stderrbuf); + stderrbuf = NULL; buf_shutdown (stdoutbuf); buf_free (stdoutbuf); + stdoutbuf = NULL; } if (errs) @@ -3712,7 +3708,7 @@ static void serve_watch_on (arg) char *arg; { - do_cvs_command ("watch_on", watch_on); + do_cvs_command ("watch", watch_on); } static void serve_watch_off PROTO ((char *)); @@ -3721,7 +3717,7 @@ static void serve_watch_off (arg) char *arg; { - do_cvs_command ("watch_off", watch_off); + do_cvs_command ("watch", watch_off); } static void serve_watch_add PROTO ((char *)); @@ -3730,7 +3726,7 @@ static void serve_watch_add (arg) char *arg; { - do_cvs_command ("watch_add", watch_add); + do_cvs_command ("watch", watch_add); } static void serve_watch_remove PROTO ((char *)); @@ -3739,7 +3735,7 @@ static void serve_watch_remove (arg) char *arg; { - do_cvs_command ("watch_remove", watch_remove); + do_cvs_command ("watch", watch_remove); } static void serve_watchers PROTO ((char *)); @@ -4888,9 +4884,9 @@ server_cleanup (sig) status = buf_shutdown (buf_from_net); if (status != 0) - { error (0, status, "shutting down buffer from client"); - } + buf_free (buf_from_net); + buf_from_net = NULL; } if (dont_delete_temp) @@ -4899,6 +4895,9 @@ server_cleanup (sig) { (void) buf_flush (buf_to_net, 1); (void) buf_shutdown (buf_to_net); + buf_free (buf_to_net); + buf_to_net = NULL; + error_use_protocol = 0; } return; } @@ -5000,6 +4999,9 @@ server_cleanup (sig) { (void) buf_flush (buf_to_net, 1); (void) buf_shutdown (buf_to_net); + buf_free (buf_to_net); + buf_to_net = NULL; + error_use_protocol = 0; } } @@ -5010,6 +5012,8 @@ server (argc, argv) int argc; char **argv; { + char *error_prog_name; /* Used in error messages */ + if (argc == -1) { static const char *const msg[] = @@ -5066,18 +5070,7 @@ server (argc, argv) printf ("E Fatal server error, aborting.\n\ error ENOMEM Virtual memory exhausted.\n"); - /* I'm doing this manually rather than via error_exit () - because I'm not sure whether we want to call server_cleanup. - Needs more investigation.... */ - -#ifdef SYSTEM_CLEANUP - /* Hook for OS-specific behavior, for example socket - subsystems on NT and OS2 or dealing with windows - and arguments on Mac. */ - SYSTEM_CLEANUP (); -#endif - - exit (EXIT_FAILURE); + error_exit (); } strcpy (server_temp_dir, Tmpdir); @@ -5141,63 +5134,23 @@ error ENOMEM Virtual memory exhausted.\n"); } } -#ifdef SIGABRT - (void) SIG_register (SIGABRT, server_cleanup); -#endif -#ifdef SIGHUP - (void) SIG_register (SIGHUP, server_cleanup); -#endif -#ifdef SIGINT - (void) SIG_register (SIGINT, server_cleanup); -#endif -#ifdef SIGQUIT - (void) SIG_register (SIGQUIT, server_cleanup); -#endif -#ifdef SIGPIPE - (void) SIG_register (SIGPIPE, server_cleanup); -#endif -#ifdef SIGTERM - (void) SIG_register (SIGTERM, server_cleanup); -#endif - /* Now initialize our argument vector (for arguments from the client). */ /* Small for testing. */ argument_vector_size = 1; argument_vector = - (char **) malloc (argument_vector_size * sizeof (char *)); - if (argument_vector == NULL) - { - /* - * Strictly speaking, we're not supposed to output anything - * now. But we're about to exit(), give it a try. - */ - printf ("E Fatal server error, aborting.\n\ -error ENOMEM Virtual memory exhausted.\n"); - - /* I'm doing this manually rather than via error_exit () - because I'm not sure whether we want to call server_cleanup. - Needs more investigation.... */ - -#ifdef SYSTEM_CLEANUP - /* Hook for OS-specific behavior, for example socket subsystems on - NT and OS2 or dealing with windows and arguments on Mac. */ - SYSTEM_CLEANUP (); -#endif - - exit (EXIT_FAILURE); - } - + (char **) xmalloc (argument_vector_size * sizeof (char *)); argument_count = 1; /* This gets printed if the client supports an option which the server doesn't, causing the server to print a usage message. - FIXME: probably should be using program_name here. FIXME: just a nit, I suppose, but the usage message the server prints isn't literally true--it suggests "cvs server" followed by options which are for a particular command. Might be nice to say something like "client apparently supports an option not supported by this server" or something like that instead of usage message. */ - argument_vector[0] = "cvs server"; + error_prog_name = xmalloc( strlen(program_name) + 8 ); + sprintf(error_prog_name, "%s server", program_name); + argument_vector[0] = error_prog_name; while (1) { @@ -5270,6 +5223,7 @@ error ENOMEM Virtual memory exhausted.\n"); } free (orig_cmd); } + free(error_prog_name); server_cleanup (0); return 0; } @@ -5419,8 +5373,8 @@ check_repository_password (username, password, repository, host_user_ptr) int found_it = 0; int namelen; - /* We don't use current_parsed_root->directory because it hasn't been set yet - * -- our `repository' argument came from the authentication + /* We don't use current_parsed_root->directory because it hasn't been + * set yet -- our `repository' argument came from the authentication * protocol, not the regular CVS protocol. */ @@ -5578,7 +5532,7 @@ check_password (username, password, repository) { /* No cvs password found, so try /etc/passwd. */ - const char *found_passwd = NULL; + char *found_passwd = NULL; struct passwd *pw; #ifdef HAVE_GETSPNAM struct spwd *spw; @@ -5600,19 +5554,24 @@ check_password (username, password, repository) printf ("E Fatal error, aborting.\n\ error 0 %s: no such user\n", username); - /* I'm doing this manually rather than via error_exit () - because I'm not sure whether we want to call server_cleanup. - Needs more investigation.... */ - -#ifdef SYSTEM_CLEANUP - /* Hook for OS-specific behavior, for example socket subsystems on - NT and OS2 or dealing with windows and arguments on Mac. */ - SYSTEM_CLEANUP (); -#endif - - exit (EXIT_FAILURE); + error_exit (); } + /* Allow for dain bramaged HPUX passwd aging + * - Basically, HPUX adds a comma and some data + * about whether the passwd has expired or not + * on the end of the passwd field. + * - This code replaces the ',' with '\0'. + * + * FIXME - our workaround is brain damaged too. I'm + * guessing that HPUX WANTED other systems to think the + * password was wrong so logins would fail if the + * system didn't handle expired passwds and the passwd + * might be expired. I think the way to go here + * is with PAM. + */ + strtok (found_passwd, ","); + if (*found_passwd) { /* user exists and has a password */ @@ -5645,16 +5604,7 @@ error 0 %s: no such user\n", username); outweighs this. */ printf ("error 0 no such user %s in CVSROOT/passwd\n", username); - /* I'm doing this manually rather than via error_exit () - because I'm not sure whether we want to call server_cleanup. - Needs more investigation.... */ - -#ifdef SYSTEM_CLEANUP - /* Hook for OS-specific behavior, for example socket subsystems on - NT and OS2 or dealing with windows and arguments on Mac. */ - SYSTEM_CLEANUP (); -#endif - exit (EXIT_FAILURE); + error_exit (); } else { @@ -5911,12 +5861,8 @@ kserver_authenticate_connection () { printf ("E Fatal error, aborting.\n\ error %s getpeername or getsockname failed\n", strerror (errno)); -#ifdef SYSTEM_CLEANUP - /* Hook for OS-specific behavior, for example socket subsystems on - NT and OS2 or dealing with windows and arguments on Mac. */ - SYSTEM_CLEANUP (); -#endif - exit (EXIT_FAILURE); + + error_exit (); } #ifdef SO_KEEPALIVE @@ -5942,12 +5888,8 @@ error %s getpeername or getsockname failed\n", strerror (errno)); { printf ("E Fatal error, aborting.\n\ error 0 kerberos: %s\n", krb_get_err_text(status)); -#ifdef SYSTEM_CLEANUP - /* Hook for OS-specific behavior, for example socket subsystems on - NT and OS2 or dealing with windows and arguments on Mac. */ - SYSTEM_CLEANUP (); -#endif - exit (EXIT_FAILURE); + + error_exit (); } memcpy (kblock, auth.session, sizeof (C_Block)); @@ -5958,12 +5900,8 @@ error 0 kerberos: %s\n", krb_get_err_text(status)); { printf ("E Fatal error, aborting.\n\ error 0 kerberos: can't get local name: %s\n", krb_get_err_text(status)); -#ifdef SYSTEM_CLEANUP - /* Hook for OS-specific behavior, for example socket subsystems on - NT and OS2 or dealing with windows and arguments on Mac. */ - SYSTEM_CLEANUP (); -#endif - exit (EXIT_FAILURE); + + error_exit (); } /* Switch to run as this user. */ @@ -6352,12 +6290,12 @@ cvs_output (str, len) if (len == 0) len = strlen (str); #ifdef SERVER_SUPPORT - if (error_use_protocol) + if (error_use_protocol && buf_to_net != NULL) { buf_output (saved_output, str, len); buf_copy_lines (buf_to_net, saved_output, 'M'); } - else if (server_active) + else if (server_active && protocol != NULL) { buf_output (saved_output, str, len); buf_copy_lines (protocol, saved_output, 'M'); diff --git a/contrib/cvs/src/status.c b/contrib/cvs/src/status.c index 7b64d30..6057ec2 100644 --- a/contrib/cvs/src/status.c +++ b/contrib/cvs/src/status.c @@ -77,6 +77,7 @@ cvsstatus (argc, argv) send_arg("-v"); if (local) send_arg("-l"); + send_arg ("--"); /* For a while, we tried setting SEND_NO_CONTENTS here so this could be a fast operation. That prevents the @@ -106,7 +107,7 @@ cvsstatus (argc, argv) err = start_recursion (status_fileproc, (FILESDONEPROC) NULL, status_dirproc, (DIRLEAVEPROC) NULL, NULL, argc, argv, local, - W_LOCAL, 0, 1, (char *) NULL, 1); + W_LOCAL, 0, LOCK_READ, (char *) NULL, 1); return (err); } diff --git a/contrib/cvs/src/subr.c b/contrib/cvs/src/subr.c index 75f26cb..7a6acfb 100644 --- a/contrib/cvs/src/subr.c +++ b/contrib/cvs/src/subr.c @@ -403,9 +403,9 @@ gca (rev1, rev2) const char *rev2; { int dots; - char *gca; - const char *p[2]; - int j[2]; + char *gca, *g; + const char *p1, *p2; + int r1, r2; char *retval; if (rev1 == NULL || rev2 == NULL) @@ -417,52 +417,27 @@ gca (rev1, rev2) /* The greatest common ancestor will have no more dots, and numbers of digits for each component no greater than the arguments. Therefore this string will be big enough. */ - gca = xmalloc (strlen (rev1) + strlen (rev2) + 100); + g = gca = xmalloc (strlen (rev1) + strlen (rev2) + 100); /* walk the strings, reading the common parts. */ - gca[0] = '\0'; - p[0] = rev1; - p[1] = rev2; + p1 = rev1; + p2 = rev2; do { - int i; - char c[2]; - char *s[2]; - - for (i = 0; i < 2; ++i) - { - /* swap out the dot */ - s[i] = strchr (p[i], '.'); - if (s[i] != NULL) { - c[i] = *s[i]; - } - - /* read an int */ - j[i] = atoi (p[i]); - - /* swap back the dot... */ - if (s[i] != NULL) { - *s[i] = c[i]; - p[i] = s[i] + 1; - } - else - { - /* or mark us at the end */ - p[i] = NULL; - } - - } + r1 = strtol (p1, (char **) &p1, 10); + r2 = strtol (p2, (char **) &p2, 10); /* use the lowest. */ - (void) sprintf (gca + strlen (gca), "%d.", - j[0] < j[1] ? j[0] : j[1]); - - } while (j[0] == j[1] - && p[0] != NULL - && p[1] != NULL); + (void) sprintf (g, "%d.", r1 < r2 ? r1 : r2); + g += strlen (g); + if (*p1 == '.') ++p1; + else break; + if (*p2 == '.') ++p2; + else break; + } while (r1 == r2); - /* back up over that last dot. */ - gca[strlen(gca) - 1] = '\0'; + /* erase that last dot. */ + *--g = '\0'; /* numbers differ, or we ran out of strings. we're done with the common parts. */ @@ -472,12 +447,8 @@ gca (rev1, rev2) { /* revisions differ in trunk major number. */ - char *q; - const char *s; - - s = (j[0] < j[1]) ? p[0] : p[1]; - - if (s == NULL) + if (r2 < r1) p1 = p2; + if (*p1 == '\0') { /* we only got one number. this is strange. */ error (0, 0, "bad revisions %s or %s", rev1, rev2); @@ -486,13 +457,10 @@ gca (rev1, rev2) else { /* we have a minor number. use it. */ - q = gca + strlen (gca); - - *q++ = '.'; - for ( ; *s != '.' && *s != '\0'; ) - *q++ = *s++; - - *q = '\0'; + *g++ = '.'; + while (*p1 != '.' && *p1 != '\0') + *g++ = *p1++; + *g = '\0'; } } else if ((dots & 1) == 0) @@ -500,10 +468,8 @@ gca (rev1, rev2) /* if we have an even number of dots, then we have a branch. remove the last number in order to make it a revision. */ - char *s; - - s = strrchr(gca, '.'); - *s = '\0'; + g = strrchr (gca, '.'); + *g = '\0'; } retval = xstrdup (gca); diff --git a/contrib/cvs/src/tag.c b/contrib/cvs/src/tag.c index 0b93e09..467ba9d 100644 --- a/contrib/cvs/src/tag.c +++ b/contrib/cvs/src/tag.c @@ -222,6 +222,8 @@ cvstag (argc, argv) if (date) client_senddate (date); + send_arg ("--"); + send_arg (symtag); if (is_rtag) @@ -233,7 +235,6 @@ cvstag (argc, argv) } else { - send_files (argc, argv, local, 0, /* I think the -c case is like "cvs status", in @@ -380,8 +381,8 @@ rtag_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified, mtlist = getlist(); err = start_recursion (check_fileproc, check_filesdoneproc, (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, - argc - 1, argv + 1, local_specified, which, 0, 1, - where, 1); + argc - 1, argv + 1, local_specified, which, 0, + LOCK_READ, where, 1); if (err) { @@ -390,19 +391,13 @@ rtag_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified, /* It would be nice to provide consistency with respect to commits; however CVS lacks the infrastructure to do that (see - Concurrency in cvs.texinfo and comment in do_recursion). We - do need to ensure that the RCS file info that gets read and - cached in do_recursion isn't stale by the time we get around - to using it to rewrite the RCS file in the callback, and this - is the easiest way to accomplish that. */ - lock_tree_for_write (argc - 1, argv + 1, local_specified, which, 0); + Concurrency in cvs.texinfo and comment in do_recursion). */ /* start the recursion processor */ err = start_recursion (is_rtag ? rtag_fileproc : tag_fileproc, (FILESDONEPROC) NULL, tag_dirproc, (DIRLEAVEPROC) NULL, NULL, argc - 1, argv + 1, - local_specified, which, 0, 0, where, 1); - Lock_Cleanup (); + local_specified, which, 0, LOCK_WRITE, where, 1); dellist (&mtlist); if (where != NULL) free (where); @@ -423,11 +418,21 @@ check_fileproc (callerdat, finfo) if (check_uptodate) { - Ctype status = Classify_File (finfo, (char *) NULL, (char *) NULL, - (char *) NULL, 1, 0, &vers, 0); - if ((status != T_UPTODATE) && (status != T_CHECKOUT) && - (status != T_PATCH)) + switch (Classify_File (finfo, (char *) NULL, (char *) NULL, + (char *) NULL, 1, 0, &vers, 0)) { + case T_UPTODATE: + case T_CHECKOUT: + case T_PATCH: + case T_REMOVE_ENTRY: + break; + case T_UNKNOWN: + case T_CONFLICT: + case T_NEEDS_MERGE: + case T_MODIFIED: + case T_ADDED: + case T_REMOVED: + default: error (0, 0, "%s is locally modified", finfo->fullname); freevers_ts (&vers); return (1); @@ -1280,11 +1285,11 @@ Numeric tag %s contains characters other than digits and '.'", name); val_direntproc, (DIRLEAVEPROC) NULL, (void *)&the_val_args, argc, argv, local, which, aflag, - 1, NULL, 1); + LOCK_READ, NULL, 1); if (repository != NULL && repository[0] != '\0') { if (restore_cwd (&cwd, NULL)) - exit (EXIT_FAILURE); + error_exit (); free_cwd (&cwd); } diff --git a/contrib/cvs/src/update.c b/contrib/cvs/src/update.c index 3dbe26d..af9a2bd 100644 --- a/contrib/cvs/src/update.c +++ b/contrib/cvs/src/update.c @@ -291,6 +291,8 @@ update (argc, argv) if (supported_request ("update-patches")) send_arg ("-u"); + send_arg ("--"); + if (update_build_dirs) flags |= SEND_BUILD_DIRS; @@ -318,6 +320,8 @@ update (argc, argv) error (1, errno, "could not chdir to %s", toplevel_wd); } + send_arg ("--"); + for (i = 0; i < failed_patches_count; i++) if (unlink_file (failed_patches[i]) < 0 && !existence_error (errno)) @@ -488,7 +492,7 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag, follows it; someone should make sure that I did it right. */ err = start_recursion (get_linkinfo_proc, (FILESDONEPROC) NULL, (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, - argc, argv, local, which, aflag, 1, + argc, argv, local, which, aflag, LOCK_READ, preload_update_dir, 1); if (err) return (err); @@ -504,7 +508,7 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag, /* call the recursion processor */ err = start_recursion (update_fileproc, update_filesdone_proc, update_dirent_proc, update_dirleave_proc, NULL, - argc, argv, local, which, aflag, 1, + argc, argv, local, which, aflag, LOCK_READ, preload_update_dir, 1); #ifdef SERVER_SUPPORT @@ -1777,46 +1781,60 @@ patch_file (finfo, vers_ts, docheckout, file_info, checksum) { fail = 1; } - else - { + } + + if (! fail) + { + struct stat file2_info; + + /* Check to make sure the patch is really shorter */ + if (CVS_STAT (file2, &file2_info) < 0) + error (1, errno, "could not stat %s", file2); + if (CVS_STAT (finfo->file, file_info) < 0) + error (1, errno, "could not stat %s", finfo->file); + if (file2_info.st_size <= file_info->st_size) + fail = 1; + } + + if (! fail) + { # define BINARY "Binary" - char buf[sizeof BINARY]; - unsigned int c; - - /* Stat the original RCS file, and then adjust it the way - that RCS_checkout would. FIXME: This is an abstraction - violation. */ - if (CVS_STAT (vers_ts->srcfile->path, file_info) < 0) - error (1, errno, "could not stat %s", vers_ts->srcfile->path); - if (chmod (finfo->file, - file_info->st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH)) - < 0) - error (0, errno, "cannot change mode of file %s", finfo->file); - if (cvswrite - && !fileattr_get (finfo->file, "_watched")) - xchmod (finfo->file, 1); - - /* Check the diff output to make sure patch will be handle it. */ - e = CVS_FOPEN (finfo->file, "r"); - if (e == NULL) - error (1, errno, "could not open diff output file %s", - finfo->fullname); - c = fread (buf, 1, sizeof BINARY - 1, e); - buf[c] = '\0'; - if (strcmp (buf, BINARY) == 0) - { - /* These are binary files. We could use diff -a, but - patch can't handle that. */ - fail = 1; - } - fclose (e); + char buf[sizeof BINARY]; + unsigned int c; + + /* Check the diff output to make sure patch will be handle it. */ + e = CVS_FOPEN (finfo->file, "r"); + if (e == NULL) + error (1, errno, "could not open diff output file %s", + finfo->fullname); + c = fread (buf, 1, sizeof BINARY - 1, e); + buf[c] = '\0'; + if (strcmp (buf, BINARY) == 0) + { + /* These are binary files. We could use diff -a, but + patch can't handle that. */ + fail = 1; } + fclose (e); } if (! fail) { Vers_TS *xvers_ts; + /* Stat the original RCS file, and then adjust it the way + that RCS_checkout would. FIXME: This is an abstraction + violation. */ + if (CVS_STAT (vers_ts->srcfile->path, file_info) < 0) + error (1, errno, "could not stat %s", vers_ts->srcfile->path); + if (chmod (finfo->file, + file_info->st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH)) + < 0) + error (0, errno, "cannot change mode of file %s", finfo->file); + if (cvswrite + && !fileattr_get (finfo->file, "_watched")) + xchmod (finfo->file, 1); + /* This stuff is just copied blindly from checkout_file. I don't really know what it does. */ xvers_ts = Version_TS (finfo, options, tag, date, @@ -2675,7 +2693,7 @@ special_file_mismatch (finfo, rev1, rev2) rev1_symlink = xreadlink (finfo->file); else { -# ifdef HAVE_ST_RDEV +# ifdef HAVE_STRUCT_STAT_ST_RDEV if (CVS_LSTAT (finfo->file, &sb) < 0) error (1, errno, "could not get file information for %s", finfo->file); @@ -2753,7 +2771,7 @@ special_file_mismatch (finfo, rev1, rev2) rev2_symlink = xreadlink (finfo->file); else { -# ifdef HAVE_ST_RDEV +# ifdef HAVE_STRUCT_STAT_ST_RDEV if (CVS_LSTAT (finfo->file, &sb) < 0) error (1, errno, "could not get file information for %s", finfo->file); diff --git a/contrib/cvs/src/vers_ts.c b/contrib/cvs/src/vers_ts.c index c41affd..9f71218 100644 --- a/contrib/cvs/src/vers_ts.c +++ b/contrib/cvs/src/vers_ts.c @@ -302,7 +302,6 @@ time_stamp_server (file, vers_ts, entdata) else { struct tm *tm_p; - struct tm local_tm; vers_ts->ts_user = xmalloc (25); /* We want to use the same timestamp format as is stored in the @@ -313,14 +312,7 @@ time_stamp_server (file, vers_ts, entdata) stored in local time, and therefore it is not possible to cause st_mtime to be out of sync by changing the timezone. */ tm_p = gmtime (&sb.st_mtime); - if (tm_p) - { - memcpy (&local_tm, tm_p, sizeof (local_tm)); - cp = asctime (&local_tm); /* copy in the modify time */ - } - else - cp = ctime (&sb.st_mtime); - + cp = tm_p ? asctime (tm_p) : ctime (&sb.st_mtime); cp[24] = 0; /* Fix non-standard format. */ if (cp[8] == '0') cp[8] = ' '; @@ -357,7 +349,6 @@ time_stamp (file) if (mtime) { struct tm *tm_p; - struct tm local_tm; ts = xmalloc (25); /* We want to use the same timestamp format as is stored in the st_mtime. For unix (and NT I think) this *must* be universal @@ -367,14 +358,7 @@ time_stamp (file) stored in local time, and therefore it is not possible to cause st_mtime to be out of sync by changing the timezone. */ tm_p = gmtime (&sb.st_mtime); - if (tm_p) - { - memcpy (&local_tm, tm_p, sizeof (local_tm)); - cp = asctime (&local_tm); /* copy in the modify time */ - } - else - cp = ctime(&sb.st_mtime); - + cp = tm_p ? asctime (tm_p) : ctime (&sb.st_mtime); cp[24] = 0; /* Fix non-standard format. */ if (cp[8] == '0') cp[8] = ' '; diff --git a/contrib/cvs/src/version.c b/contrib/cvs/src/version.c index aba91ae..8c76a16 100644 --- a/contrib/cvs/src/version.c +++ b/contrib/cvs/src/version.c @@ -11,7 +11,6 @@ */ #include "cvs.h" -#include "version.h" #ifdef CLIENT_SUPPORT #ifdef SERVER_SUPPORT @@ -62,7 +61,7 @@ version (argc, argv) /* Having the year here is a good idea, so people have some idea of how long ago their version of CVS was released. */ - (void) fputs (version_string, stdout); + (void) fputs (PACKAGE_STRING, stdout); (void) fputs (config_string, stdout); #ifdef CLIENT_SUPPORT diff --git a/contrib/cvs/src/watch.c b/contrib/cvs/src/watch.c index d86968b..96d6b04 100644 --- a/contrib/cvs/src/watch.c +++ b/contrib/cvs/src/watch.c @@ -318,25 +318,14 @@ watch_addremove (argc, argv) /* FIXME: copes poorly with "all" if server is extended to have new watch types and client is still running an old version. */ if (the_args.edit) - { - send_arg ("-a"); - send_arg ("edit"); - } + option_with_arg ("-a", "edit"); if (the_args.unedit) - { - send_arg ("-a"); - send_arg ("unedit"); - } + option_with_arg ("-a", "unedit"); if (the_args.commit) - { - send_arg ("-a"); - send_arg ("commit"); - } + option_with_arg ("-a", "commit"); if (!the_args.edit && !the_args.unedit && !the_args.commit) - { - send_arg ("-a"); - send_arg ("none"); - } + option_with_arg ("-a", "none"); + send_arg ("--"); send_files (argc, argv, local, 0, SEND_NO_CONTENTS); send_file_names (argc, argv, SEND_EXPAND_WILD); send_to_server (the_args.adding ? @@ -352,8 +341,8 @@ watch_addremove (argc, argv) err = start_recursion (addremove_fileproc, addremove_filesdoneproc, (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, - argc, argv, local, W_LOCAL, 0, 0, (char *)NULL, - 1); + argc, argv, local, W_LOCAL, 0, LOCK_NONE, + (char *)NULL, 1); Lock_Cleanup (); return err; @@ -516,6 +505,7 @@ watchers (argc, argv) if (local) send_arg ("-l"); + send_arg ("--"); send_files (argc, argv, local, 0, SEND_NO_CONTENTS); send_file_names (argc, argv, SEND_EXPAND_WILD); send_to_server ("watchers\012", 0); @@ -525,6 +515,6 @@ watchers (argc, argv) return start_recursion (watchers_fileproc, (FILESDONEPROC) NULL, (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, - argc, argv, local, W_LOCAL, 0, 1, (char *)NULL, - 1); + argc, argv, local, W_LOCAL, 0, LOCK_READ, + (char *)NULL, 1); } diff --git a/contrib/cvs/src/wrapper.c b/contrib/cvs/src/wrapper.c index bb071b1..ab0b19f 100644 --- a/contrib/cvs/src/wrapper.c +++ b/contrib/cvs/src/wrapper.c @@ -125,10 +125,7 @@ void wrap_setup() .cvswrappers is). */ if (homedir != NULL) { - char *file; - - file = xmalloc (strlen (homedir) + sizeof (CVSDOTWRAPPER) + 10); - (void) sprintf (file, "%s/%s", homedir, CVSDOTWRAPPER); + char *file = strcat_filename_onto_homedir (homedir, CVSDOTWRAPPER); if (isfile (file)) { wrap_add_file (file, 0); @@ -399,7 +396,7 @@ wrap_add (line, isTemp) switch(opt){ case 'f': /* Before this is reenabled, need to address the problem in - commit.c (see http://www.cyclic.com/cvs/dev-wrap.txt). */ + commit.c (see http://www.cvshome.org/docs/infowrapper.html). */ error (1, 0, "-t/-f wrappers not supported by this version of CVS"); @@ -413,7 +410,7 @@ wrap_add (line, isTemp) break; case 't': /* Before this is reenabled, need to address the problem in - commit.c (see http://www.cyclic.com/cvs/dev-wrap.txt). */ + commit.c (see http://www.cvshome.org/docs/infowrapper.html). */ error (1, 0, "-t/-f wrappers not supported by this version of CVS"); |