aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-08-10 09:43:22 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-08-10 09:43:22 +0000
commit7f22ecb0da2f5623c8ad69cbab0e478a9709fb61 (patch)
tree2b4dc24b830b514680009ead3884ecb1c40974c7
parenta3b502f88fd3d67bf547634d411d567524c4c1b1 (diff)
downloadsrc-7f22ecb0da2f5623c8ad69cbab0e478a9709fb61.tar.gz
src-7f22ecb0da2f5623c8ad69cbab0e478a9709fb61.zip
Import cvs-1.11.1p1 onto vendor branch
Notes
Notes: svn path=/vendor/cvs/dist/; revision=81404
-rw-r--r--contrib/cvs/AUTHORS4
-rw-r--r--contrib/cvs/ChangeLog406
-rw-r--r--contrib/cvs/INSTALL38
-rw-r--r--contrib/cvs/Makefile.am66
-rw-r--r--contrib/cvs/Makefile.in681
-rw-r--r--contrib/cvs/NEWS42
-rw-r--r--contrib/cvs/TODO23
-rw-r--r--contrib/cvs/acconfig.h7
-rw-r--r--contrib/cvs/acinclude.m4231
-rw-r--r--contrib/cvs/aclocal.m4861
-rw-r--r--contrib/cvs/config.h.in47
-rwxr-xr-xcontrib/cvs/configure2428
-rw-r--r--contrib/cvs/configure.in168
-rw-r--r--contrib/cvs/contrib/ChangeLog57
-rw-r--r--contrib/cvs/contrib/Makefile.am108
-rw-r--r--contrib/cvs/contrib/Makefile.in420
-rwxr-xr-xcontrib/cvs/contrib/clmerge.in152
-rwxr-xr-xcontrib/cvs/contrib/cln_hist.in91
-rwxr-xr-xcontrib/cvs/contrib/commit_prep.in215
-rwxr-xr-xcontrib/cvs/contrib/cvs_acls.in141
-rwxr-xr-xcontrib/cvs/contrib/debug_check_log.sh197
-rwxr-xr-xcontrib/cvs/contrib/log.in208
-rwxr-xr-xcontrib/cvs/contrib/log_accum.in576
-rwxr-xr-xcontrib/cvs/contrib/mfpipe.in85
-rwxr-xr-xcontrib/cvs/contrib/rcslock.in235
-rwxr-xr-xcontrib/cvs/contrib/sccs2rcs.in281
-rwxr-xr-xcontrib/cvs/depcomp358
-rw-r--r--contrib/cvs/diff/ChangeLog67
-rw-r--r--contrib/cvs/diff/Makefile.am24
-rw-r--r--contrib/cvs/diff/Makefile.in369
-rw-r--r--contrib/cvs/diff/analyze.c39
-rw-r--r--contrib/cvs/diff/diff.c2
-rw-r--r--contrib/cvs/diff/diff3.c67
-rw-r--r--contrib/cvs/diff/dir.c10
-rw-r--r--contrib/cvs/diff/system.h13
-rw-r--r--contrib/cvs/doc/CVSvn.texi.in1
-rw-r--r--contrib/cvs/doc/ChangeLog145
-rw-r--r--contrib/cvs/doc/Makefile.am157
-rw-r--r--contrib/cvs/doc/Makefile.in601
-rw-r--r--contrib/cvs/doc/cvs.texinfo357
-rw-r--r--contrib/cvs/doc/cvsclient.texi12
-rwxr-xr-xcontrib/cvs/install-sh22
-rw-r--r--contrib/cvs/lib/ChangeLog66
-rw-r--r--contrib/cvs/lib/Makefile.am88
-rw-r--r--contrib/cvs/lib/Makefile.in490
-rw-r--r--contrib/cvs/lib/getdate.y46
-rw-r--r--contrib/cvs/lib/rename.c4
-rw-r--r--contrib/cvs/lib/system.h43
-rw-r--r--contrib/cvs/lib/xgssapi.h30
-rw-r--r--contrib/cvs/lib/xselect.h21
-rw-r--r--contrib/cvs/lib/xtime.h57
-rw-r--r--contrib/cvs/man/ChangeLog17
-rw-r--r--contrib/cvs/man/Makefile.am22
-rw-r--r--contrib/cvs/man/Makefile.in370
-rwxr-xr-xcontrib/cvs/missing265
-rwxr-xr-xcontrib/cvs/mkinstalldirs21
-rw-r--r--contrib/cvs/src/ChangeLog1077
-rw-r--r--contrib/cvs/src/Makefile.am144
-rw-r--r--contrib/cvs/src/Makefile.in676
-rw-r--r--contrib/cvs/src/add.c54
-rw-r--r--contrib/cvs/src/admin.c92
-rw-r--r--contrib/cvs/src/annotate.c277
-rw-r--r--contrib/cvs/src/checkout.c125
-rw-r--r--contrib/cvs/src/classify.c245
-rw-r--r--contrib/cvs/src/client.c343
-rw-r--r--contrib/cvs/src/commit.c84
-rw-r--r--contrib/cvs/src/create_adm.c15
-rw-r--r--contrib/cvs/src/cvs.h56
-rwxr-xr-xcontrib/cvs/src/cvsbug.in526
-rw-r--r--contrib/cvs/src/diff.c116
-rw-r--r--contrib/cvs/src/edit.c18
-rw-r--r--contrib/cvs/src/entries.c4
-rw-r--r--contrib/cvs/src/error.c18
-rw-r--r--contrib/cvs/src/error.h6
-rw-r--r--contrib/cvs/src/expand_path.c2
-rw-r--r--contrib/cvs/src/filesubr.c227
-rw-r--r--contrib/cvs/src/find_names.c18
-rw-r--r--contrib/cvs/src/history.c74
-rw-r--r--contrib/cvs/src/ignore.c42
-rw-r--r--contrib/cvs/src/import.c28
-rw-r--r--contrib/cvs/src/lock.c22
-rw-r--r--contrib/cvs/src/log.c197
-rw-r--r--contrib/cvs/src/login.c758
-rw-r--r--contrib/cvs/src/logmsg.c35
-rw-r--r--contrib/cvs/src/main.c219
-rw-r--r--contrib/cvs/src/mkmodules.c10
-rw-r--r--contrib/cvs/src/modules.c38
-rw-r--r--contrib/cvs/src/parseinfo.c10
-rw-r--r--contrib/cvs/src/patch.c51
-rw-r--r--contrib/cvs/src/rcs.c240
-rw-r--r--contrib/cvs/src/rcs.h10
-rw-r--r--contrib/cvs/src/rcscmds.c8
-rw-r--r--contrib/cvs/src/recurse.c24
-rw-r--r--contrib/cvs/src/release.c14
-rw-r--r--contrib/cvs/src/remove.c4
-rw-r--r--contrib/cvs/src/repos.c12
-rw-r--r--contrib/cvs/src/root.c473
-rw-r--r--contrib/cvs/src/run.c12
-rwxr-xr-xcontrib/cvs/src/sanity.sh6365
-rw-r--r--contrib/cvs/src/server.c445
-rw-r--r--contrib/cvs/src/stamp-h2.in1
-rw-r--r--contrib/cvs/src/status.c4
-rw-r--r--contrib/cvs/src/subr.c115
-rw-r--r--contrib/cvs/src/tag.c557
-rw-r--r--contrib/cvs/src/update.c131
-rw-r--r--contrib/cvs/src/update.h3
-rw-r--r--contrib/cvs/src/vers_ts.c4
-rw-r--r--contrib/cvs/src/version.c17
-rw-r--r--contrib/cvs/src/version.c.in86
-rw-r--r--contrib/cvs/src/watch.c6
-rw-r--r--contrib/cvs/src/wrapper.c8
-rw-r--r--contrib/cvs/stamp-h1.in1
-rw-r--r--contrib/cvs/tools/ChangeLog17
-rw-r--r--contrib/cvs/tools/Makefile.am21
-rw-r--r--contrib/cvs/tools/Makefile.in234
115 files changed, 20372 insertions, 5599 deletions
diff --git a/contrib/cvs/AUTHORS b/contrib/cvs/AUTHORS
new file mode 100644
index 000000000000..7184d29d177d
--- /dev/null
+++ b/contrib/cvs/AUTHORS
@@ -0,0 +1,4 @@
+Authors of GNU CVS
+
+Um, yeah. There were lots of 'em. See the "Credits" section of the
+README file and the individual ChangeLog files for more.
diff --git a/contrib/cvs/ChangeLog b/contrib/cvs/ChangeLog
index eaa0aea155c1..f22a7ba177d0 100644
--- a/contrib/cvs/ChangeLog
+++ b/contrib/cvs/ChangeLog
@@ -1,3 +1,409 @@
+2001-04-26 Derek Price <dprice@collab.net>
+
+ * cvs.spec.in: Don't include %{_infodir}/dir.
+ (krb5): Remove krb5-config from dependencies.
+
+ * cvs.spec: Regenerated.
+
+2001-04-25 Derek Price <dprice@collab.net>
+
+ * configure.in: Update version to 1.11.1.
+
+ * Makefile.in: Regenerated with AM 1.4e as of today at 18:10 -0400
+ (EDT).
+ * aclocal.m4: Ditto.
+ * configure: Ditto.
+
+2001-04-25 Derek Price <dprice@collab.net>
+
+ * NEWS: Correct punctuation.
+
+2001-04-25 Larry Jones <larry.jones@sdr.com>
+
+ * depcomp (aix, sgi): Correct previous fixes.
+
+2001-04-24 Larry Jones <larry.jones@sdr.com>
+
+ * depcomp (sgi): Remove stray HP-UX code.
+
+2001-04-18 Derek Price <dprice@collab.net>
+
+ * noautoconf.sh: New shell script to touch Makefile.in files and
+ prevent unecessary AUtomake rebuilds after updates.
+ * NEWS: Note this new scipt.
+
+2001-04-16 Larry Jones <larry.jones@sdr.com>
+
+ * depcomp (aix): Remove stray HP-UX code.
+
+2001-04-12 Larry Jones <larry.jones@sdr.com>
+
+ * mkinstalldirs: Newer version from Automake.
+
+2001-04-12 Larry Jones <larry.jones@sdr.com>
+
+ * depcomp: Newer version from Automake.
+
+2001-04-04 Larry Jones <larry.jones@sdr.com>
+
+ * depcomp: Don't count on $? being set in then or else clauses.
+
+2001-03-30 Larry Jones <larry.jones@sdr.com>
+
+ * NEWS: Note new rlog and rannotate commands.
+
+2001-03-14 Derek Price <derek.price@openavenue.com>
+
+ * configure.in (AC_CHECK_FUNCS): Look for gettimeofday.
+
+ * config.h.in: Regenerated:
+ * configure: Ditto.
+ * stamp-h1.in: Ditto.
+
+2001-03-14 Derek Price <derek.price@openavenue.com>
+
+ New version of Automake (1.4e). With luck it works with the quirky BSD
+ Make.
+
+ * aclocal.m4: Regenerated.
+ * configure: Ditto.
+ * Makefile.in: Ditto.
+ * stamp-h1.in: Ditto.
+
+2001-02-28 Derek Price <derek.price@openavenue.com>
+
+ * acinclude.m4 (ACX_WITH_GSSAPI): Move the -L linker option back into
+ LIBS where it should be. LDFLAGS is a user variable.
+
+ * aclocal.m4: Regenerated.
+ * configure: Regenerated.
+
+2001-02-23 Derek Price <derek.price@openavenue.com>
+
+ * configure.in: Comment definition of PR_PROGRAM.
+
+ * configure: Regenerated.
+
+2001-02-22 Derek Price <derek.price@openavenue.com>
+ Pavel Roskin <proski@gnu.org>
+
+ * configure.in: Define PR_PROGRAM if `pr' has been found.
+
+ * config.h.in: Regenerated.
+ * configure: Regenerated.
+
+2001-02-20 Derek Price <derek.price@openavenue.com>
+
+ * acconfig.h (HAVE_GSSAPI): Removed. Entries in acconfig.h aren't
+ necesary when the full functionality of AC_DEFINE is used.
+ (HAVE_GSS_C_NT_HOSTBASED_SERVICE): Ditto.
+ * acinclude.m4 (ACX_WITH_GSSAPI): New file with GSSAPI configure code.
+ * configure.in: Use ACX_WITH_GSSAPI instead of writing GSSAPI code in
+ place.
+
+ * aclocal.m4: Regenerated.
+ * config.h.in: Regenerated.
+ * configure: Regenerated.
+
+2001-02-15 Derek Price <derek.price@openavenue.com>
+
+ * configure: Regenerated without beta automake macros.
+
+2001-02-14 Derek Price <derek.price@openavenue.com>
+
+ * configure.in (AC_CHECK_FUNCS): Alphebetize & reorganize. Add
+ cascading search for nanosleep, usleep, & select, in that order.
+ * config.h.in: Regenerated.
+ * configure: Regenerated.
+ * cvsnt.mak: List xtime.h & xselect.h dependancies.
+
+2001-02-14 Larry Jones <larry.jones@sdrc.com>
+
+ * cvsnt.dsp: Remove references to rtag.c & rtag.obj.
+ * cvsnt.mak: Ditto.
+
+2001-02-13 Derek Price <derek.price@openavenue.com>
+
+ * TODO: Add note about merging rdiff & diff.
+
+2001-02-13 Derek Price <derek.price@openavenue.com>
+
+ * TODO: Add note about cvs_temp_file.
+
+2001-02-07 Derek Price <derek.price@openavenue.com>
+
+ * cvs.spec.in (build): Remove the info 'dir' file so it doesn't get
+ installed accidentally.
+ (post): Install info files _into_ system dir file
+ (preun): uninstall info files from dir file
+ * cvs.spec: regenerated
+
+2001-01-31 Derek Price <derek.price@openavenue.com>
+
+ * TODO: Add a note about 'cvs add' w/o write access
+
+2001-01-29 Derek Price <derek.price@openavenue.com>
+
+ * NEWS: Rewrite the comment on the new ~/.cvspass functionality
+ * TODO: Add a note about testing login/logout
+
+2001-01-29 Derek Price <derek.price@openavenue.com>
+
+ * configure.in: Rewrite args to AC_TRY_COMMAND in a form that is
+ acceptable to both Autoconf 1.13 and the new 1.49 beta.
+
+ * configure: regenerated
+
+2001-01-29 Larry Jones <larry.jones@sdrc.com>
+
+ * configure.in: Check for syslog.h.
+ * configure, config.h.in: Regenerated.
+
+2001-01-17 Derek Price <derek.price@openavenue.com>
+
+ * configure.in: add machinery to check for the BSD VPATH bug
+ and check for texi2dvi.
+ * doc/Makefile.am: use the machinery
+ * diff/Makefile.in: changes to support 'make dist' from a build dir
+ * emx/Makefile.in: changes to support 'make dist' from a build dir
+ * os2/Makefile.in: changes to support 'make dist' from a build dir
+ * zlib/Makefile.in: changes to support 'make dist' from a build dir
+
+ * Makefile.in: regenerated
+ * aclocal.m4: regenerated
+ * configure: regenerated
+ * contrib/Makefile.in: regenerated
+ * doc/Makefile.in: regenerated
+ * lib/Makefile.in: regenerated
+ * man/Makefile.in: regenerated
+ * src/Makefile.in: regenerated
+ * tools/Makefile.in: regenerated
+ * vms/Makefile.in: regenerated
+ * windows-NT/Makefile.in: regenerated
+ * windows-NT/SCC/Makefile.in: regenerated
+
+2001-01-10 Derek Price <derek.price@openavenue.com>
+ Rex Jolliff <Rex_Jolliff@notes.ymp.gov>
+
+ * NEWS (new since 1.11): Add comment about VMS wildcards
+
+2001-01-05 Derek Price <derek.price@openavenue.com>
+
+ * configure.in (AC_OUTPUT): Move some script targets here
+ * contrib/Makefile.am (EXTRA_DIST, SUFFIXES, .pl:, .csh:): Move some
+ script targets to configure.in
+ * src/Makefile.am (cvsbug, cvsbug_EXTRA_DIST, EXTRA_DIST): move cvsbug
+ target to configure.in
+
+ * aclocal.m4: Regenerated due to change in Automake installation
+
+ * Makefile.in: Regenerated
+ * configure: ditto
+ * contrib/Makefile.in: ditto
+ * doc/Makefile.in: ditto
+ * lib/Makefile.in: ditto
+ * man/Makefile.in: ditto
+ * src/Makefile.in: ditto
+ * tools/Makefile.in: ditto
+ * vms/Makefile.in: ditto
+ * windows-NT/Makefile.in: ditto
+ * windows-NT/SCC/Makefile.in: ditto
+
+ * cvs.spec: updated timestamp
+ * stamp-h1.in: ditto
+ * doc/CVSvn.texi: ditto
+ * src/stamp-h2.in: ditto
+ * src/version.c: ditto
+
+ * contrib/clmerge.in: Rename from clmerge.pl
+ * contrib/cln_hist.in: Rename from cln_hist.pl
+ * contrib/commit_prep.in: Rename from commit_prep.pl
+ * contrib/cvs_acls.in: Rename from cvs_acls.pl
+ * contrib/log.in: Rename from log.pl
+ * contrib/log_accum.in: Rename from log_accum.pl
+ * contrib/mfpipe.in: Rename from mfpipe.pl
+ * contrib/rcslock.in: Rename from rcslock.pl
+ * contrib/sccs2rcs.in: Rename from scc2rcs.csh
+ * src/cvsbug.in: Rename from cvsbug.sh
+
+ * contrib/clmerge.pl: Rename to clmerge.in
+ * contrib/cln_hist.pl: Rename to cln_hist.in
+ * contrib/commit_prep.pl: Rename to commit_prep.in
+ * contrib/cvs_acls.pl: Rename to cvs_acls.in
+ * contrib/log.pl: Rename to log.in
+ * contrib/log_accum.pl: Rename to log_accum.in
+ * contrib/mfpipe.pl: Rename to mfpipe.in
+ * contrib/rcslock.pl: Rename to rcslock.in
+ * contrib/sccs2rcs.csh: Rename to sccs2rcs.in
+ * src/cvsbug.sh: Rename to cvsbug.in
+
+2001-01-03 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (remotecheck): depend on 'all'
+ * Makefile.in: regenerated
+
+2001-01-03 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in (DEP_FILES): Regenerated with new version of Automake
+ (DEP_FILES_conditional patch for BSD make compatibility)
+ * contrib/Makefile.in: ditto
+ * doc/Makefile.in: ditto
+ * lib/Makefile.in: ditto
+ * man/Makefile.in: ditto
+ * src/Makefile.in: ditto
+ * tools/Makefile.in: ditto
+ * vms/Makefile.in: ditto
+ * windows-NT/Makefile.in: ditto
+ * windows-NT/SCC/Makefile.in: ditto
+
+2000-12-28 Derek Price <derek.price@openavenue.com>
+
+ * INSTALL (BUILDING FROM SOURCES): Added a couple more platforms to the
+ build and test list.
+ (Building ... under Unix): Added note about BSD make and
+ --disable-dependency-tracking
+ (Building ... under Windows ...): Added note about using MSVC++ 6.0
+ (Building [on] other platforms): Added note about wincvs.org and
+ cvsnt.org. Added more complete note about BSD make and
+ --disable-dependency-tracking than the above
+
+2000-12-27 Derek Price <derek.price@openavenue.com>
+
+ * NEWS: Fix comments about the changes to ~/.cvspass
+
+2000-12-26 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (EXTRA_DIST): Add cvs.spec.in
+ (cvs.spec): new target
+ * Makefile.in: Regenerated
+ * aclocal.m4: update timestamp
+ * configure: Regenerated
+ * configure.in (AC_OUTPUT): Remove cvs.spec, doc/CVSvn.texi,
+ & src/version.c
+ * stamp-h1.in: update timestamp
+ * contrib/Makefile.in: ditto
+ * lib/Makefile.in: ditto
+ * man/Makefile.in: ditto
+ * tools/Makefile.in: ditto
+ * vms/Makefile.in: ditto
+ * windows-NT/Makefile.in: ditto
+ * windows-NT/SCC/Makefile.in: ditto
+
+2000-12-22 Derek Price <derek.price@openavenue.com>
+
+ * configure.in (AC_OUTPUT): Stretched
+ * configure: Regenerated
+
+2000-12-22 Derek Price <derek.price@openavenue.com>
+
+ * aclocal.m4: Regenerated due to Automake update
+
+2000-12-22 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated
+ * aclocal.m4: Regenerated due to a change to AM_PROG_ETAGS
+ * configure: Regenerated
+
+2000-12-21 Derek Price <derek.price@openavenue.com>
+
+ * .cvsignore: removed newly unused files, added new stamp file,
+ and alphabetized.
+ * AUTHORS: Added this file to please Automake. Apparently, its
+ presence is mandated by the GNU coding standards.
+ * Makefile.am: New file needed by Automake
+ * Makefile.in: Regenerated
+ * NEWS: Add a comment about the Automake conversion
+ * aclocal.m4: Added this file for Automake
+ * config.h.in: Regenerated
+ * configure: Regenerated
+ * configure.in: Some changes to support Automake and support for
+ missing roff & ps2pdf programs.
+ * cvs.spec: Regenerated
+ * cvs.spec.in: New file leveraging Automake support
+ * depcomp: New Automake file
+ * install-sh: Newer version from Automake
+ * missing: New Automake file
+ * mkinstalldirs: Newer version from Automake
+ * stamp-h.in: Remove unused file
+ * stamp-h1.in: New Automake generated stamp file
+
+2000-11-30 Derek Price <derek.price@openavenue.com>
+ Stephen Kennedy <Stephen.Kennedy@havok.com>
+
+ * cvs.spec (krb5): Require krb5-devel for a build of the krb5 target
+
+2000-11-29 Derek Price <derek.price@openavenue.com>
+ Stephen Kennedy <Stephen.Kennedy@havok.com>
+
+ * cvs.spec (build, post, preun): remove an old, commented out
+ line and replace hardcoded paths with _infodir and _bindir as
+ appropriate
+ (files): replace file list with more generic and succinct one
+
+2000-11-15 Derek Price <derek.price@openavenue.com>
+
+ * TODO (198): added note about deprecating cvs_temp_name
+ * configure.in (AC_CHECK_FUNCS): added mkstemp to support
+ new cvs_temp_file function.
+ * config.h.in: regenerated
+ * configure: regenerated
+
+2000-11-08 Larry Jones <larry.jones@sdrc.com>
+
+ * configure.in: Check for getgroups function.
+ * configure, config.h.in: Regenerated.
+
+2000-11-07 Larry Jones <larry.jones@sdrc.com>
+
+ * Makefile.in (FLAGS_TO_PASS): Add INSTALL, INSTALL_DATA, and
+ INSTALL_PROGRAM.
+ (Reported by Christian Brechbuehler <christian@arsdigita.com>.)
+
+2000-11-03 Derek Price <derek.price@openavenue.com>
+
+ * cvs.spec (build): pass in --without-gssapi when configuring the main
+ package so that the Kerberized version of CVS doesn't get built when
+ the user happens to have Kerberos installed in the default location.
+
+2000-10-31 Derek Price <derek.price@openavenue.com>
+
+ * NEWS: Mention zlib was updated to 1.1.3.
+
+2000-10-30 Derek Price <derek.price@openavenue.com>
+
+ * cvs.spec: Fixed trapping for gssapi so that the RPM can be built
+ on a machine without Kerberos. Should now build standard RPM on a
+ machine without Kerberos and the standard RPM + the Kerberos RPM on
+ a machine with the Kerberos devel libraries.
+
+2000-10-26 Larry Jones <larry.jones@sdrc.com>
+
+ * configure.in: Get path to pr for diff.
+ (Patch submitted by Urs Thuermann <urs@isnogud.escape.de>.)
+ * configure: Regenerated.
+
+2000-10-18 Derek Price <derek.price@openavenue.com>
+
+ * .cvsignore: Added .fname & .version, two temporary files used in spec
+ file creation.
+ * Makefile.in (distclean-local): clean .fname & .version
+ * cvs.spec: Replaced with a new version based on RedHat 6.2's spec file
+ for cvs 1.10.7. Edited heavily to include a krb5 subpackage for the
+ gssapi binary and fixed RedHat's info and man file placement.
+
+2000-10-17 Derek Price <derek.price@openavenue.com>
+
+ * NEWS: added a comment about the new CVSROOT format for pserver.
+
+2000-10-17 Derek Price <derek.price@openavenue.com>
+
+ * NEWS: added a comment about the new format of ~/.cvspass
+
+2000-10-09 Derek Price <derek.price@openavenue.com>
+
+ * cvsnt.mak: Some minor changes to allow CVS to compile correctly
+ under NT and Visual C++ 6.0.
+
2000-09-07 Larry Jones <larry.jones@sdrc.com>
* Makefile.in: Use @bindir@, @libdir@, @infodir@, and @mandir@
diff --git a/contrib/cvs/INSTALL b/contrib/cvs/INSTALL
index 1a1da8c99e62..589599ed1deb 100644
--- a/contrib/cvs/INSTALL
+++ b/contrib/cvs/INSTALL
@@ -134,6 +134,8 @@ i386 family:
Linux (kernel 1.2.x) (1.8.86)
Linux (kernel 2.0.x, RedHat 4.2) (1.10)
Linux (kernel 2.0.x, RedHat 5.x) (1.10)
+ Linux (kernel 2.2.x, RedHat 6.x) (1.10.8)
+ Linux (kernel 2.2.x, RedHat 7.x) (1.11)
BSDI 4.0 (1.10.7)
FreeBSD 2.1.5-stable (1.8.87)
NextSTEP 3.3 (1.7)
@@ -146,6 +148,7 @@ i386 family:
Windows NT 3.51 service pack 4 (1.9)
Windows NT 3.51 service pack 5 (1.9) -- DOES NOT WORK (footnote 11)
Windows NT 4.0 (1.9 client and local)
+ Windows NT 4.0 (1.11 client and local - build & test, but no test suite)
Windows 95 (1.9 client and local)
QNX (1.9.1 + patches for strippath() and va_list)
OS/2 Version 3 using IBM C/C++ Tools 2.01 (1.8.86 + patches, client)
@@ -284,6 +287,14 @@ Building from source code under Unix:
the --enable-encryption option. This option is disabled by
default.
+ If you want to disable automatic dependency tracking in the makefiles,
+ use the '--disable-dependency-tracking' option:
+
+ $ ./configure --disable-dependency-tracking
+
+ This avoids problems on some platforms. See the note at the end of this
+ file on BSD.
+
Try './configure --help' for further information on its usage.
NOTE ON CVS's USE OF NDBM:
@@ -390,7 +401,7 @@ behaviour:
-------------------------------------------------------------------------------
-Building from source code under Windows NT/95:
+Building from source code under Windows NT/95/98/2000:
You may find interesting information in windows-NT/README.
@@ -401,6 +412,14 @@ You may find interesting information in windows-NT/README.
3) MSVC will place the executable file cvs.exe in WinRel, or whatever
your target directory is.
+* From the top level directory, with MSVC++ 6.0 installed, something like the
+following also works:
+
+ C:\> vcvars32
+ C:\> nmake /f cvsnt.mak CFG="cvsnt - Win32 Debug"
+
+* You might also try http://wincvs.org & http://www.cvsnt.org
+
-------------------------------------------------------------------------------
Building from source code under other platforms:
@@ -409,10 +428,25 @@ For OS/2, see os2/README and emx/README.
For VMS, see README.VMS
-For Macintosh, see macintosh/README.MacCVS
+For Macintosh, see macintosh/README.MacCVS, or, since that file isn't there
+anymore, you might try http://wincvs.org .
For a Java client, see jCVS (which is a separate package from CVS
itself, but which might be preferable to the Macintosh port mentioned
above, for example).
+ **** ****
+
+Builds are breaking on some systems (notably,
+BSD/OS thor.sdrc.com 4.0.1 BSDI BSD/OS 4.0.1 Kernel #3: Thu Mar 9 11:29:16 EST 2000
+) due to Automake's dependency tracking code. The work around for this is to
+comile without it by passing the '--disable-dependency-tracking' option to
+configure:
+
+ $ ./configure --disable-dependency-tracking
+
+This will allow a compile but make will no longer be tracking header
+dependencies. This means that if you make any changes to header files you may
+have to run 'make clean' before running a 'make' to get everything to compile.
+
-------------------------------------------------------------------------------
diff --git a/contrib/cvs/Makefile.am b/contrib/cvs/Makefile.am
new file mode 100644
index 000000000000..90b7324f7615
--- /dev/null
+++ b/contrib/cvs/Makefile.am
@@ -0,0 +1,66 @@
+## Process this file with automake to produce Makefile.in
+# Master Makefile for the GNU Concurrent Versions System.
+# Copyright (C) 1986, 1988-1992, 1994, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+AUTOMAKE_OPTIONS = 1.4a dist-bzip2
+
+## Subdirectories to run make in for the primary targets.
+# Unix source subdirs, where we'll want to run lint and etags:
+# This is a legacy variable from b4 Automake
+USOURCE_SUBDIRS = lib zlib diff src
+# All other subdirs:
+SUBDIRS = $(USOURCE_SUBDIRS) man doc contrib tools \
+ windows-NT os2 emx vms
+
+EXTRA_DIST = \
+ .cvsignore \
+ BUGS \
+ ChangeLog.zoo \
+ DEVEL-CVS \
+ FAQ \
+ HACKING \
+ MINOR-BUGS \
+ PROJECTS \
+ README.VMS \
+ TESTS \
+ build.com \
+ cvs-format.el \
+ cvs.spec \
+ cvs.spec.in \
+ cvsnt.dsp \
+ cvsnt.dsw \
+ cvsnt.mak
+
+.PHONY: remotecheck
+remotecheck: all
+ cd src && $(MAKE) $(AM_MAKEFLAGS) "$@"
+
+.PHONY: doc
+doc:
+ cd doc && $(MAKE) $(AM_MAKEFLAGS) "$@"
+
+## MAINTAINER Targets
+
+## cvs.spec ##
+# - cvs.spec needs to be updated only once, since it depends on
+# configure.in, not on the results of a 'configure' run.
+# - It is guaranteed (with GNU Make) that when the version in configure.in
+# is changed, acversion.m4 is built only after the new version number is
+# propagated to the Makefile. (Libtool uses the same guarantee.)
+cvs.spec: $(srcdir)/cvs.spec.in $(top_srcdir)/configure.in
+ sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/cvs.spec.in >cvs.tspec
+ mv cvs.tspec $(srcdir)/cvs.spec
+
+# for backwards compatibility with the old makefiles
+.PHONY: realclean
+realclean: maintainer-clean
diff --git a/contrib/cvs/Makefile.in b/contrib/cvs/Makefile.in
index f8384e173533..27af9dc6dc50 100644
--- a/contrib/cvs/Makefile.in
+++ b/contrib/cvs/Makefile.in
@@ -1,5 +1,20 @@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
# Master Makefile for the GNU Concurrent Versions System.
-# Copyright (C) 1986, 1988-1992, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1986, 1988-1992, 1994, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -11,274 +26,454 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-SHELL = /bin/sh
-#### Start of system configuration section. ####
+SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-
-# If you use gcc, you should either run the fixincludes script that
-# comes with it or else use gcc with the -traditional option. Otherwise
-# ioctl calls will be compiled incorrectly on some systems.
-CC = @CC@
-AR = ar
-
-@SET_MAKE@
-
-# Set RANLIB = echo if your system doesn't have or need ranlib.
-RANLIB = @RANLIB@
-# Set YACC = bison or yacc, depending on which you have on your system
-YACC = @YACC@
-# Use cp if you don't have install.
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-
-DEFS = @DEFS@
-LIBS = @LIBS@
-
-INCLUDES = -I. -I../lib @includeopt@
-CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
-
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-
prefix = @prefix@
exec_prefix = @exec_prefix@
-# Where to install the executables.
bindir = @bindir@
-
-# Where to put the system-wide .cvsrc file
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
libdir = @libdir@
-
-# Where to put the Info files
infodir = @infodir@
-
-# Where to put the manual pages.
mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
-#### End of system configuration section. ####
-
-FLAGS_TO_PASS = \
- AR='$(AR)' \
- CC='$(CC)' \
- CFLAGS='$(CFLAGS)' \
- LDFLAGS='$(LDFLAGS)' \
- LIBPROGS='$(LIBPROGS)' \
- LIBS='$(LIBS)' \
- MAKE='$(MAKE)' \
- MAKEINFO='$(MAKEINFO)' \
- RANLIB='$(RANLIB)' \
- TEXI2DVI='$(TEXI2DVI)' \
- YACC='$(YACC)' \
- bindir='$(bindir)' \
- infodir='$(infodir)' \
- libdir='$(libdir)' \
- mandir='$(mandir)' \
- prefix='$(prefix)' \
- exec_prefix='$(exec_prefix)'
-
-DISTFILES = \
- COPYING COPYING.LIB INSTALL README TODO PROJECTS \
- BUGS MINOR-BUGS FAQ HACKING DEVEL-CVS TESTS \
- README.VMS build.com \
- ChangeLog NEWS ChangeLog.zoo \
- configure configure.in stamp-h.in config.h.in Makefile.in acconfig.h \
- cvs-format.el mkinstalldirs install-sh \
- cvsnt.mak cvsnt.dsp cvsnt.dsw \
- .cvsignore cvs.spec
-
-### Subdirectories to run make in for the primary targets.
-# Unix source subdirs, where we'll want to run lint and etags:
-USOURCE_SUBDIRS = lib zlib diff src
-# All other subdirs:
-SUBDIRS = ${USOURCE_SUBDIRS} man doc contrib tools \
- windows-NT os2 emx vms
-# Only make TAGS/tags files in these directories.
-TSUBDIRS= src lib
-
-# Set default target.
-all:
-
-.PHONY: all install uninstall installdirs
-all install uninstall installdirs: config.h Makefile all-local
- @for subdir in $(SUBDIRS); do \
- echo "making $@ in $$subdir"; \
- ( cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@ ) || exit 1; \
- done
-
-installdirs: installdirs-local
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
-install: all install-local install-info
+top_builddir = .
-.PHONY: all-local
-all-local:
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-.PHONY: info dvi clean-info install-info
-info dvi clean-info install-info:
- cd doc && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1
-
-.PHONY: install-local
-install-local: all-local
- @: nothing to do locally
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
-.PHONY: installdirs-local
-installdirs-local: all-local
- @: nothing to do locally
+AUTOMAKE_OPTIONS = 1.4a dist-bzip2
-.PHONY: tags
-tags:
- @for dir in $(TSUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
- @echo making $@ in .
- @ctags `for i in \`$(MAKE) SUBDIRS="$(TSUBDIRS)" ls\` ; do echo $(srcdir)/$$i ; done`
+# Unix source subdirs, where we'll want to run lint and etags:
+# This is a legacy variable from b4 Automake
+USOURCE_SUBDIRS = lib zlib diff src
+# All other subdirs:
+SUBDIRS = $(USOURCE_SUBDIRS) man doc contrib tools \
+ windows-NT os2 emx vms
-.PHONY: TAGS
-TAGS:
- @for dir in $(TSUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
- @echo making $@ in .
- @etags `for i in \`$(MAKE) SUBDIRS="$(TSUBDIRS)" ls | grep -v 'make\[[0-9]\]'\` ; do echo $(srcdir)/$$i ; done`
-.PHONY: ls
-ls:
- @echo $(DISTFILES)
- @for dir in $(SUBDIRS); do \
- for i in `cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ | grep -v 'make\[[0-9]\]'` ; do \
- echo $$dir/$$i ; \
- done ; \
+EXTRA_DIST = \
+ .cvsignore \
+ BUGS \
+ ChangeLog.zoo \
+ DEVEL-CVS \
+ FAQ \
+ HACKING \
+ MINOR-BUGS \
+ PROJECTS \
+ README.VMS \
+ TESTS \
+ build.com \
+ cvs-format.el \
+ cvs.spec \
+ cvs.spec.in \
+ cvsnt.dsp \
+ cvsnt.dsw \
+ cvsnt.mak
+
+EXEEXT =
+OBJEXT = o
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES = emx/Makefile os2/Makefile zlib/Makefile
+DIST_SOURCES =
+
+RECURSIVE_TARGETS = all-recursive install-data-recursive \
+ install-exec-recursive installdirs-recursive install-recursive \
+ uninstall-recursive check-recursive installcheck-recursive
+DIST_COMMON = README ./stamp-h1.in AUTHORS COPYING COPYING.LIB \
+ ChangeLog INSTALL Makefile.am Makefile.in NEWS TODO acconfig.h \
+ acinclude.m4 aclocal.m4 config.h.in configure configure.in \
+ depcomp install-sh missing mkinstalldirs
+DIST_SUBDIRS = $(SUBDIRS)
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$@ $(SHELL) ./config.status
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+ cd $(srcdir) && $(AUTOCONF)
+
+$(ACLOCAL_M4): configure.in acinclude.m4
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) stamp-h1; \
+ else :; fi
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1 stamp-h1T
+ @echo timestamp > stamp-h1T 2> /dev/null
+ cd $(top_builddir) \
+ && CONFIG_FILES= CONFIG_HEADERS=config.h \
+ $(SHELL) ./config.status
+ @mv stamp-h1T stamp-h1
+$(srcdir)/config.h.in: $(srcdir)/./stamp-h1.in
+ @if test ! -f $@; then \
+ rm -f $(srcdir)/./stamp-h1.in; \
+ $(MAKE) $(srcdir)/./stamp-h1.in; \
+ else :; fi
+$(srcdir)/./stamp-h1.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h
+ @rm -f $(srcdir)/./stamp-h1.in $(srcdir)/./stamp-h1.inT
+ @echo timestamp > $(srcdir)/./stamp-h1.inT 2> /dev/null
+ cd $(top_srcdir) && $(AUTOHEADER)
+ @mv $(srcdir)/./stamp-h1.inT $(srcdir)/./stamp-h1.in
+
+distclean-hdr:
+ -rm -f config.h
+emx/Makefile: $(top_builddir)/config.status $(top_srcdir)/emx/Makefile.in
+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+os2/Makefile: $(top_builddir)/config.status $(top_srcdir)/os2/Makefile.in
+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+zlib/Makefile: $(top_builddir)/config.status $(top_srcdir)/zlib/Makefile.in
+ cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+ @set fnord $(MAKEFLAGS); amf=$$2; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
-.PHONY: clean
-clean: clean-local
- @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
-
-.PHONY: distclean
-distclean: distclean-local
- @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
- rm -f config.status
-
-.PHONY: realclean
-realclean: realclean-local
- @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
- rm -f config.status
-
-.PHONY: mostlyclean-local
-mostlyclean-local:
- rm -f *~
-
-.PHONY: clean-local
-clean-local: mostlyclean-local
-
-.PHONY: distclean-local
-distclean-local: clean-local
- rm -f Makefile config.cache config.h config.log stamp-h
- rm -f tags TAGS
-
-.PHONY: realclean-local
-realclean-local: distclean-local
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -f $$subdir/TAGS && tags="$$tags $(ETAGS_INCLUDE_OPTION)$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ unique=`for i in $$list @CONFIG@; 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)config.h.in$$unique$(LISP)$$tags" \
+ || $(ETAGS) $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)
+
+GTAGS:
+ here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $$here
+
+distclean-tags:
+ -rm -f TAGS ID
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = .
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+GZIP_ENV = --best
+
+distdir: $(DISTFILES)
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+ mkdir $(distdir)
+ $(mkinstalldirs) $(distdir)/contrib $(distdir)/emx $(distdir)/os2 $(distdir)/src $(distdir)/zlib
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ for subdir in $(SUBDIRS); do \
+ if test "$$subdir" = .; then :; else \
+ test -d $(distdir)/$$subdir \
+ || mkdir $(distdir)/$$subdir \
+ || exit 1; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" \
+ distdir=../$(distdir)/$$subdir \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist: distdir
+ $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+dist-bzip2: distdir
+ $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2
+ -chmod -R a+w $(distdir) >/dev/null 2>&1; rm -rf $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/=build
+ mkdir $(distdir)/=inst
+ chmod a-w $(distdir)
+ dc_install_base=`CDPATH=: && cd $(distdir)/=inst && pwd` \
+ && cd $(distdir)/=build \
+ && ../configure --srcdir=.. --prefix=$$dc_install_base \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && test `find $$dc_install_base -type f -print | wc -l` -le 1 \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && $(MAKE) $(AM_MAKEFLAGS) distclean \
+ && rm -f $(distdir).tar.gz \
+ && (test `find . -type f -print | wc -l` -eq 0 \
+ || (echo "Error: files left after distclean" 1>&2; \
+ exit 1) )
+ -chmod -R a+w $(distdir) > /dev/null 2>&1; rm -rf $(distdir)
+ @echo "$(distdir).tar.gz is ready for distribution" | \
+ sed 'h;s/./=/g;p;x;p;x'
+check-am: all-am
+check: check-recursive
+all-am: Makefile config.h
+
+installdirs: installdirs-recursive
+installdirs-am:
+
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f Makefile.in
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+dist-all: dist dist-bzip2
+
+distclean: distclean-recursive
+ -rm -f config.status
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi:
+
+dvi-am:
+
+info:
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info:
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f config.status
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
-.PHONY: saber
-saber:
- @for dir in $(SUBDIRS); do cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
+mostlyclean-am: mostlyclean-generic
+
+.PHONY: $(RECURSIVE_TARGETS) all all-am check check-am clean \
+ clean-generic clean-recursive dist dist-all dist-bzip2 \
+ distcheck distclean distclean-generic distclean-hdr \
+ distclean-recursive distclean-tags distdir dvi dvi-am info \
+ info-am install install-am install-data install-data-am \
+ install-data-recursive install-exec install-exec-am \
+ install-exec-recursive install-info install-man \
+ install-recursive install-strip installcheck installcheck-am \
+ installdirs installdirs-am installdirs-recursive \
+ maintainer-clean maintainer-clean-generic \
+ maintainer-clean-recursive mostlyclean mostlyclean-generic \
+ mostlyclean-recursive tags tags-recursive uninstall \
+ uninstall-am uninstall-recursive
-.PHONY: check
-check:
- cd lib ; $(MAKE) $(FLAGS_TO_PASS)
- cd zlib ; $(MAKE) $(FLAGS_TO_PASS)
- cd diff ; $(MAKE) $(FLAGS_TO_PASS)
- cd src ; $(MAKE) $(FLAGS_TO_PASS) check
.PHONY: remotecheck
-remotecheck:
- cd lib ; $(MAKE) $(FLAGS_TO_PASS)
- cd zlib ; $(MAKE) $(FLAGS_TO_PASS)
- cd diff ; $(MAKE) $(FLAGS_TO_PASS)
- cd src ; $(MAKE) $(FLAGS_TO_PASS) remotecheck
-
-.PHONY: installcheck
-installcheck:
- cd lib ; $(MAKE) $(FLAGS_TO_PASS)
- cd zlib ; $(MAKE) $(FLAGS_TO_PASS)
- cd diff ; $(MAKE) $(FLAGS_TO_PASS)
- cd src ; $(MAKE) $(FLAGS_TO_PASS) installcheck
-
-.PHONY: lint
-lint:
- @for dir in $(USOURCE_SUBDIRS); do cd $$dir && $(MAKE) $(FLAGS_TO_PASS) xlint || exit 1; cd ..; done
-
-.PHONY: dist
-GZIP=gzip --best
-GZIP_EXT=.gz
-TAR_VERBOSE=
-dist: spec
- rm -rf `cat .fname`
- ${MAKE} dist-dir DISTDIR="`cat .fname`"
- for dir in ${SUBDIRS}; do \
- ( DISTDIR="../`cat .fname`/$${dir}"; \
- cd $${dir} && \
- ${MAKE} dist-dir DISTDIR="$${DISTDIR}" \
- ); \
- done
- (unset GZIP; tar chf${TAR_VERBOSE} - `cat .fname` | ${GZIP} > "`cat .fname`.tar${GZIP_EXT}")
- rm -rf `cat .fname` .fname .version
-
-.PHONY: dist-dir
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
- done
+remotecheck: all
+ cd src && $(MAKE) $(AM_MAKEFLAGS) "$@"
+
+.PHONY: doc
+doc:
+ cd doc && $(MAKE) $(AM_MAKEFLAGS) "$@"
+
+# - cvs.spec needs to be updated only once, since it depends on
+# configure.in, not on the results of a 'configure' run.
+# - It is guaranteed (with GNU Make) that when the version in configure.in
+# is changed, acversion.m4 is built only after the new version number is
+# propagated to the Makefile. (Libtool uses the same guarantee.)
+cvs.spec: $(srcdir)/cvs.spec.in $(top_srcdir)/configure.in
+ sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/cvs.spec.in >cvs.tspec
+ mv cvs.tspec $(srcdir)/cvs.spec
+
+# for backwards compatibility with the old makefiles
+.PHONY: realclean
+realclean: maintainer-clean
-.PHONY: spec
-spec:
- rm -f .version .fname
- sed < $(srcdir)/src/version.c \
- -e '/version_string/!d' \
- -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
- -e q > .version
- echo > .fname cvs-`cat .version`
- rm -f `cat .fname`.spec
- sed < $(top_srcdir)/cvs.spec \
- -e 's/@VERSION@/'`cat .version`'/g' \
- > `cat .fname`.spec
-
-
-# For the justification of the following Makefile rules, see node
-# `Automatic Remaking' in GNU Autoconf documentation.
-Makefile: Makefile.in config.status
- CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
-
-# Use @CFLAGS@ not $(CFLAGS) because it would be confusing for "make CFLAGS="
-# to sometimes (i.e., if configure is modified) change the configured CFLAGS,
-# and sometimes not.
-config.status: configure
- CFLAGS="@CFLAGS@" ./config.status --recheck
-
-# The rules to run autoconf and autoheader are commented out. This is because
-# when the user unpacks a tarfile, configure.in might end up newer than
-# configure, but the user might not have (and does not need to have) autoconf
-# installed.
-#configure: configure.in #aclocal.m4
-# cd $(srcdir); autoconf
-
-config.h: stamp-h
-
-# This used to do a ./config.status --recheck, to update config.status with
-# any new #defines from config.h.in. The problem was that the rule itself
-# depends on config.status, so that the --recheck would get run several
-# times, which is bad if the user was trying to specify CFLAGS manually.
-# It was a big pain in the neck.
-stamp-h: config.h.in config.status
- CONFIG_FILES=$@ CONFIG_HEADERS=config.h ./config.status
-
-#config.h.in: stamp-h.in
-#stamp-h.in: configure.in #aclocal.m4 acconfig.h
-# cd $(srcdir); autoheader
-# date > $(srcdir)/stamp-h.in
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/cvs/NEWS b/contrib/cvs/NEWS
index cd5ad8717adb..cf6d4d5fc8da 100644
--- a/contrib/cvs/NEWS
+++ b/contrib/cvs/NEWS
@@ -1,3 +1,45 @@
+Changes since 1.11.1:
+
+* Read only access was broken - now fixed.
+
+Changes since 1.11:
+
+* There was a bug in the diff code which caused conflicts to be flagged which shouldn't
+have been. This has been fixed.
+
+* New "cvs rlog" and "cvs rannotate" commands have been added to get log
+messages and annotations without having to have a checked-out copy.
+
+* The VMS client now accepts wildcards if you're running VMS 7.x.
+
+* ZLIB has been updated to version 1.1.3, the most current version. This
+includes mostly some optimizations and minor bug fixes.
+
+* The ~/.cvspass file has a slightly modified format. CVSROOTs are now
+stored in a new canonical form - hostnames are now case insensitive and port
+numbers are always stored in the new format. Until a new login for a
+particular CVSROOT is performed with the new version of CVS, new and old
+versions of CVS should interoperate invisibly. After that point, an extra login
+using the old version of CVS may be necessary to continue to allow the new and
+old versions of CVS to interoperate using the same ~/.cvspass file and CVSROOT.
+The exception to this rule occurs when the CVSROOTs used with the different
+versions use case insensitively different hostnames, for example, "empress",
+and "empress.2-wit.com".
+
+* A password and a port number may now be specified in CVSROOT for pserver
+connections. The new format is:
+
+ :pserver:[[user][:password]@]host[:[port]]/path
+
+Note that passwords specified in a checkout command will be saved in the clear
+in the CVS/Root file in each created directory, so this is not recommended,
+except perhaps when accessing anonymous repositories or the like.
+
+* The distribution has been converted to use Automake. This shouldn't affect
+most users except to ease some portability concerns, but if you are building
+from the repository and encounter problems with the makefiles, you might try
+running ./noautoconf.sh after a fresh update -AC.
+
Changes since 1.10:
* The new "cvs version" command gives a short version message. If
diff --git a/contrib/cvs/TODO b/contrib/cvs/TODO
index 06d1ebc1d10b..1747b684cca3 100644
--- a/contrib/cvs/TODO
+++ b/contrib/cvs/TODO
@@ -790,3 +790,26 @@ reduced to zero, and the client need not even contact the server.
196. Using a CVSROOT with a trailing slash will confuse CVS. I think
we need to add a call to strip_trailing_slashes in root.c
(parse_cvsroot), but I haven't considered all of the ramifications.
+
+197. Analyze the difference between CVS_UNLINK & unlink_file. As far as I
+can tell, unlink_file aborts in noexec mode and CVS_UNLINK does not. I'm not
+sure it would be possible to remove even the use of temp files in noexec mode,
+but most unlinks should probably be using unlink_file and not CVS_UNLINK.
+
+198. Remove references to deprecated cvs_temp_name function.
+
+199. Add test for login & logout functionality, including support for
+backwards compatibility with old CVSROOTs.
+
+200. Make a 'cvs add' without write access a non-fatal error so that the
+user's Entries file is updated and future 'cvs diffs' will work properly. This
+should ease patch submission.
+
+201. cvs_temp_file should be creating temporary files in a privately owned
+subdirectory of of temp due to security issues on some systems.
+
+**
+202. Merge most of the diff & rdiff code. Enable rdiff to accept most diff
+options. Make rdiff output look like diff's. Make diff garbage go to stderr
+and only standard diff output go to stdout.
+** In progress - DRP
diff --git a/contrib/cvs/acconfig.h b/contrib/cvs/acconfig.h
index 15589e8f7a36..de9d3792b747 100644
--- a/contrib/cvs/acconfig.h
+++ b/contrib/cvs/acconfig.h
@@ -1,13 +1,6 @@
/* Define if you have MIT Kerberos version 4 available. */
#undef HAVE_KERBEROS
-/* Define if you have GSSAPI with MIT Kerberos version 5 available. */
-#undef HAVE_GSSAPI
-
-/* Define if GSS_C_NT_HOSTBASED_SERVICE is defined in the gssapi.h
- header file. Only relevant when using GSSAPI. */
-#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
-
/* Define if you want CVS to be able to be a remote repository client. */
#undef CLIENT_SUPPORT
diff --git a/contrib/cvs/acinclude.m4 b/contrib/cvs/acinclude.m4
new file mode 100644
index 000000000000..9968adf4d67d
--- /dev/null
+++ b/contrib/cvs/acinclude.m4
@@ -0,0 +1,231 @@
+/* This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details. */
+
+AC_DEFUN(ACX_WITH_GSSAPI,[
+#
+# Use --with-gssapi[=DIR] to enable GSSAPI support.
+#
+# defaults to enabled with DIR in default list below
+#
+# Search for /SUNHEA/ and read the comments about this default below.
+#
+AC_ARG_WITH([gssapi],
+ [ --with-gssapi=value GSSAPI directory],
+ [acx_gssapi_withgssapi=$withval], [acx_gssapi_withgssapi=yes])dnl
+
+dnl
+dnl FIXME - cache withval and obliterate later cache values when options change
+dnl
+#
+# Try to locate a GSSAPI installation if no location was specified, assuming
+# GSSAPI was enabled (the default).
+#
+if test -n "$acx_gssapi_cv_gssapi"; then
+ # Granted, this is a slightly ugly way to print this info, but the
+ # AC_CHECK_HEADER used in the search for a GSSAPI installation makes using
+ # AC_CACHE_CHECK worse
+ AC_MSG_CHECKING([for GSSAPI])
+else :; fi
+AC_CACHE_VAL([acx_gssapi_cv_gssapi], [
+if test x$acx_gssapi_withgssapi = xyes; then
+ # --with but no location specified
+ # assume a gssapi.h or gssapi/gssapi.h locates our install.
+ #
+ # This isn't always strictly true. For instance Solaris 7's SUNHEA (header)
+ # package installs gssapi.h whether or not the necessary libraries are
+ # installed. I'm still not sure whether to consider this a bug. The long
+ # way around is to not consider GSSPAI installed unless gss_import_name is
+ # found, but that brings up a lot of other hassles, like continuing to let
+ # gcc & ld generate the error messages when the user uses --with-gssapi=dir
+ # as a debugging aid. The short way around is to disable GSSAPI by default,
+ # but I think Sun users have been faced with this for awhile and I haven't
+ # heard many complaints.
+ acx_gssapi_save_CPPFLAGS=$CPPFLAGS
+ for acx_gssapi_cv_gssapi in yes /usr/kerberos /usr/cygnus/kerbnet no; do
+ if test x$acx_gssapi_cv_gssapi = xno; then
+ break
+ fi
+ if test x$acx_gssapi_cv_gssapi = xyes; then
+ AC_CHECKING([for GSSAPI])
+ else
+ CPPFLAGS="$acx_gssapi_save_CPPFLAGS -I$acx_gssapi_cv_gssapi/include"
+ AC_CHECKING([for GSSAPI in $acx_gssapi_cv_gssapi])
+ fi
+ unset ac_cv_header_gssapi_h
+ unset ac_cv_header_gssapi_gssapi_h
+ AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h])
+ if test "$ac_cv_header_gssapi_h" = "yes" ||
+ test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
+ break
+ fi
+ done
+ CPPFLAGS=$acx_gssapi_save_CPPFLAGS
+else
+ acx_gssapi_cv_gssapi=$acx_gssapi_withgssapi
+fi
+AC_MSG_CHECKING([for GSSAPI])
+])dnl
+AC_MSG_RESULT([$acx_gssapi_cv_gssapi])
+
+#
+# Set up GSSAPI includes for later use. We don't bother to check for
+# $acx_gssapi_cv_gssapi=no here since that will be caught later.
+#
+if test x$acx_gssapi_cv_gssapi = yes; then
+ # no special includes necessary
+ GSSAPI_INCLUDES=""
+else
+ # GSSAPI at $acx_gssapi_cv_gssapi (could be 'no')
+ GSSAPI_INCLUDES=" -I$acx_gssapi_cv_gssapi/include"
+fi
+
+#
+# Get the rest of the information CVS needs to compile with GSSAPI support
+#
+if test x$acx_gssapi_cv_gssapi != xno; then
+ # define HAVE_GSSAPI and set up the includes
+ AC_DEFINE([HAVE_GSSAPI],, [Define if you have GSSAPI with Kerberos version 5 available.])
+ includeopt=$includeopt$GSSAPI_INCLUDES
+
+ # locate any other headers
+ acx_gssapi_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS=$CPPFLAGS$GSSAPI_INCLUDES
+ dnl We don't use HAVE_KRB5_H anywhere, but including it here might make it
+ dnl easier to spot errors by reading configure output
+ AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h krb5.h])
+ # And look through them for GSS_C_NT_HOSTBASED_SERVICE or its alternatives
+ AC_CACHE_CHECK([for GSS_C_NT_HOSTBASED_SERVICE], [acx_gssapi_cv_gss_c_nt_hostbased_service],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service=no
+ if test "$ac_cv_header_gssapi_h" = "yes"; then
+ AC_EGREP_HEADER([GSS_C_NT_HOSTBASED_SERVICE], [gssapi.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service=yes],
+ AC_EGREP_HEADER([gss_nt_service_name], [gssapi.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]))
+ fi
+ if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
+ test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
+ AC_EGREP_HEADER([GSS_C_NT_HOSTBASED_SERVICE], [gssapi/gssapi.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service],
+ AC_EGREP_HEADER([gss_nt_service_name], [gssapi/gssapi.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]))
+ fi
+ if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
+ test "$ac_cv_header_gssapi_gssapi_generic_h" = "yes"; then
+ AC_EGREP_HEADER([GSS_C_NT_HOSTBASED_SERVICE], [gssapi/gssapi_generic.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service],
+ AC_EGREP_HEADER([gss_nt_service_name], [gssapi/gssapi_generic.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]))
+ fi])
+ if test $acx_gssapi_cv_gss_c_nt_hostbased_service != yes &&
+ test $acx_gssapi_cv_gss_c_nt_hostbased_service != no; then
+ # don't define for yes since that means it already means something and
+ # don't define for no since we'd rather the compiler catch the error
+ AC_DEFINE_UNQUOTED([GSS_C_NT_HOSTBASED_SERVICE], [$acx_gssapi_cv_gss_c_nt_hostbased_service],
+[Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined
+in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only relevant
+when using GSSAPI.])
+ fi
+ CPPFLAGS=$acx_gssapi_save_CPPFLAGS
+
+ # Expect the libs to be installed parallel to the headers
+ #
+ # We could try once with and once without, but I'm not sure it's worth the
+ # trouble.
+ if test x$acx_gssapi_cv_gssapi != xyes; then
+ if test -z "$LIBS"; then
+ LIBS="-L$acx_gssapi_cv_gssapi/lib"
+ else
+ LIBS="-L$acx_gssapi_cv_gssapi/lib $LIBS"
+ fi
+ else :; fi
+
+ dnl What happens if we want to enable, say, krb5 and some other GSSAPI
+ dnl authentication method at the same time?
+ #
+ # Some of the order below is particular due to library dependencies
+ #
+
+ #
+ # des Heimdal K 0.3d, but Heimdal seems to be set up such
+ # that it could have been installed from elsewhere.
+ #
+ AC_SEARCH_LIBS([des_set_odd_parity], [des])
+
+ #
+ # com_err Heimdal K 0.3d
+ #
+ # com_err MIT K5 v1.2.2-beta1
+ #
+ AC_SEARCH_LIBS([com_err], [com_err])
+
+ #
+ # asn1 Heimdal K 0.3d -lcom_err
+ #
+ AC_SEARCH_LIBS([initialize_asn1_error_table_r], [asn1])
+
+ #
+ # resolv required, but not installed by Heimdal K 0.3d
+ #
+ # resolv MIT K5 1.2.2-beta1
+ # Linux 2.2.17
+ #
+ AC_SEARCH_LIBS([__dn_expand], [resolv])
+
+ #
+ # roken Heimdal K 0.3d -lresolv
+ #
+ AC_SEARCH_LIBS([roken_gethostbyaddr], [roken])
+
+ #
+ # k5crypto MIT K5 v1.2.2-beta1
+ #
+ AC_SEARCH_LIBS([valid_enctype], [k5crypto])
+
+ #
+ # gen ? ? ? Needed on Irix 5.3 with some
+ # Irix 5.3 version of Kerberos. I'm not
+ # sure which since Irix didn't
+ # get any testing this time
+ # around. Original comment:
+ #
+ # This is necessary on Irix 5.3, in order to link against libkrb5 --
+ # there, an_to_ln.o refers to things defined only in -lgen.
+ #
+ AC_SEARCH_LIBS([compile], [gen])
+
+ #
+ # krb5 ? ? ? -lgen -l???
+ # Irix 5.3
+ #
+ # krb5 MIT K5 v1.1.1
+ #
+ # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err
+ # Linux 2.2.17
+ #
+ # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err -lresolv
+ #
+ # krb5 Heimdal K 0.3d -lasn1 -lroken -ldes
+ #
+ AC_SEARCH_LIBS([krb5_free_context], [krb5])
+
+ #
+ # gssapi_krb5 Only lib needed with MIT K5 v1.2.1, so find it first in
+ # order to prefer MIT Kerberos. If both MIT & Heimdal
+ # Kerberos are installed and in the path, this will leave
+ # some of the libraries above in LIBS unnecessarily, but
+ # noone would ever do that, right?
+ #
+ # gssapi_krb5 MIT K5 v1.2.2-beta1 -lkrb5
+ #
+ # gssapi Heimdal K 0.3d -lkrb5
+ #
+ AC_SEARCH_LIBS([gss_import_name], [gssapi_krb5 gssapi])
+fi
+])dnl
diff --git a/contrib/cvs/aclocal.m4 b/contrib/cvs/aclocal.m4
new file mode 100644
index 000000000000..a9c5488653fb
--- /dev/null
+++ b/contrib/cvs/aclocal.m4
@@ -0,0 +1,861 @@
+# aclocal.m4 generated automatically by aclocal 1.4e
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+# Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+/* This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details. */
+
+AC_DEFUN(ACX_WITH_GSSAPI,[
+#
+# Use --with-gssapi[=DIR] to enable GSSAPI support.
+#
+# defaults to enabled with DIR in default list below
+#
+# Search for /SUNHEA/ and read the comments about this default below.
+#
+AC_ARG_WITH([gssapi],
+ [ --with-gssapi=value GSSAPI directory],
+ [acx_gssapi_withgssapi=$withval], [acx_gssapi_withgssapi=yes])dnl
+
+dnl
+dnl FIXME - cache withval and obliterate later cache values when options change
+dnl
+#
+# Try to locate a GSSAPI installation if no location was specified, assuming
+# GSSAPI was enabled (the default).
+#
+if test -n "$acx_gssapi_cv_gssapi"; then
+ # Granted, this is a slightly ugly way to print this info, but the
+ # AC_CHECK_HEADER used in the search for a GSSAPI installation makes using
+ # AC_CACHE_CHECK worse
+ AC_MSG_CHECKING([for GSSAPI])
+else :; fi
+AC_CACHE_VAL([acx_gssapi_cv_gssapi], [
+if test x$acx_gssapi_withgssapi = xyes; then
+ # --with but no location specified
+ # assume a gssapi.h or gssapi/gssapi.h locates our install.
+ #
+ # This isn't always strictly true. For instance Solaris 7's SUNHEA (header)
+ # package installs gssapi.h whether or not the necessary libraries are
+ # installed. I'm still not sure whether to consider this a bug. The long
+ # way around is to not consider GSSPAI installed unless gss_import_name is
+ # found, but that brings up a lot of other hassles, like continuing to let
+ # gcc & ld generate the error messages when the user uses --with-gssapi=dir
+ # as a debugging aid. The short way around is to disable GSSAPI by default,
+ # but I think Sun users have been faced with this for awhile and I haven't
+ # heard many complaints.
+ acx_gssapi_save_CPPFLAGS=$CPPFLAGS
+ for acx_gssapi_cv_gssapi in yes /usr/kerberos /usr/cygnus/kerbnet no; do
+ if test x$acx_gssapi_cv_gssapi = xno; then
+ break
+ fi
+ if test x$acx_gssapi_cv_gssapi = xyes; then
+ AC_CHECKING([for GSSAPI])
+ else
+ CPPFLAGS="$acx_gssapi_save_CPPFLAGS -I$acx_gssapi_cv_gssapi/include"
+ AC_CHECKING([for GSSAPI in $acx_gssapi_cv_gssapi])
+ fi
+ unset ac_cv_header_gssapi_h
+ unset ac_cv_header_gssapi_gssapi_h
+ AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h])
+ if test "$ac_cv_header_gssapi_h" = "yes" ||
+ test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
+ break
+ fi
+ done
+ CPPFLAGS=$acx_gssapi_save_CPPFLAGS
+else
+ acx_gssapi_cv_gssapi=$acx_gssapi_withgssapi
+fi
+AC_MSG_CHECKING([for GSSAPI])
+])dnl
+AC_MSG_RESULT([$acx_gssapi_cv_gssapi])
+
+#
+# Set up GSSAPI includes for later use. We don't bother to check for
+# $acx_gssapi_cv_gssapi=no here since that will be caught later.
+#
+if test x$acx_gssapi_cv_gssapi = yes; then
+ # no special includes necessary
+ GSSAPI_INCLUDES=""
+else
+ # GSSAPI at $acx_gssapi_cv_gssapi (could be 'no')
+ GSSAPI_INCLUDES=" -I$acx_gssapi_cv_gssapi/include"
+fi
+
+#
+# Get the rest of the information CVS needs to compile with GSSAPI support
+#
+if test x$acx_gssapi_cv_gssapi != xno; then
+ # define HAVE_GSSAPI and set up the includes
+ AC_DEFINE([HAVE_GSSAPI],, [Define if you have GSSAPI with Kerberos version 5 available.])
+ includeopt=$includeopt$GSSAPI_INCLUDES
+
+ # locate any other headers
+ acx_gssapi_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS=$CPPFLAGS$GSSAPI_INCLUDES
+ dnl We don't use HAVE_KRB5_H anywhere, but including it here might make it
+ dnl easier to spot errors by reading configure output
+ AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h krb5.h])
+ # And look through them for GSS_C_NT_HOSTBASED_SERVICE or its alternatives
+ AC_CACHE_CHECK([for GSS_C_NT_HOSTBASED_SERVICE], [acx_gssapi_cv_gss_c_nt_hostbased_service],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service=no
+ if test "$ac_cv_header_gssapi_h" = "yes"; then
+ AC_EGREP_HEADER([GSS_C_NT_HOSTBASED_SERVICE], [gssapi.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service=yes],
+ AC_EGREP_HEADER([gss_nt_service_name], [gssapi.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]))
+ fi
+ if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
+ test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
+ AC_EGREP_HEADER([GSS_C_NT_HOSTBASED_SERVICE], [gssapi/gssapi.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service],
+ AC_EGREP_HEADER([gss_nt_service_name], [gssapi/gssapi.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]))
+ fi
+ if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
+ test "$ac_cv_header_gssapi_gssapi_generic_h" = "yes"; then
+ AC_EGREP_HEADER([GSS_C_NT_HOSTBASED_SERVICE], [gssapi/gssapi_generic.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service],
+ AC_EGREP_HEADER([gss_nt_service_name], [gssapi/gssapi_generic.h],
+ [acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name]))
+ fi])
+ if test $acx_gssapi_cv_gss_c_nt_hostbased_service != yes &&
+ test $acx_gssapi_cv_gss_c_nt_hostbased_service != no; then
+ # don't define for yes since that means it already means something and
+ # don't define for no since we'd rather the compiler catch the error
+ AC_DEFINE_UNQUOTED([GSS_C_NT_HOSTBASED_SERVICE], [$acx_gssapi_cv_gss_c_nt_hostbased_service],
+[Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined
+in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only relevant
+when using GSSAPI.])
+ fi
+ CPPFLAGS=$acx_gssapi_save_CPPFLAGS
+
+ # Expect the libs to be installed parallel to the headers
+ #
+ # We could try once with and once without, but I'm not sure it's worth the
+ # trouble.
+ if test x$acx_gssapi_cv_gssapi != xyes; then
+ if test -z "$LIBS"; then
+ LIBS="-L$acx_gssapi_cv_gssapi/lib"
+ else
+ LIBS="-L$acx_gssapi_cv_gssapi/lib $LIBS"
+ fi
+ else :; fi
+
+ dnl What happens if we want to enable, say, krb5 and some other GSSAPI
+ dnl authentication method at the same time?
+ #
+ # Some of the order below is particular due to library dependencies
+ #
+
+ #
+ # des Heimdal K 0.3d, but Heimdal seems to be set up such
+ # that it could have been installed from elsewhere.
+ #
+ AC_SEARCH_LIBS([des_set_odd_parity], [des])
+
+ #
+ # com_err Heimdal K 0.3d
+ #
+ # com_err MIT K5 v1.2.2-beta1
+ #
+ AC_SEARCH_LIBS([com_err], [com_err])
+
+ #
+ # asn1 Heimdal K 0.3d -lcom_err
+ #
+ AC_SEARCH_LIBS([initialize_asn1_error_table_r], [asn1])
+
+ #
+ # resolv required, but not installed by Heimdal K 0.3d
+ #
+ # resolv MIT K5 1.2.2-beta1
+ # Linux 2.2.17
+ #
+ AC_SEARCH_LIBS([__dn_expand], [resolv])
+
+ #
+ # roken Heimdal K 0.3d -lresolv
+ #
+ AC_SEARCH_LIBS([roken_gethostbyaddr], [roken])
+
+ #
+ # k5crypto MIT K5 v1.2.2-beta1
+ #
+ AC_SEARCH_LIBS([valid_enctype], [k5crypto])
+
+ #
+ # gen ? ? ? Needed on Irix 5.3 with some
+ # Irix 5.3 version of Kerberos. I'm not
+ # sure which since Irix didn't
+ # get any testing this time
+ # around. Original comment:
+ #
+ # This is necessary on Irix 5.3, in order to link against libkrb5 --
+ # there, an_to_ln.o refers to things defined only in -lgen.
+ #
+ AC_SEARCH_LIBS([compile], [gen])
+
+ #
+ # krb5 ? ? ? -lgen -l???
+ # Irix 5.3
+ #
+ # krb5 MIT K5 v1.1.1
+ #
+ # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err
+ # Linux 2.2.17
+ #
+ # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err -lresolv
+ #
+ # krb5 Heimdal K 0.3d -lasn1 -lroken -ldes
+ #
+ AC_SEARCH_LIBS([krb5_free_context], [krb5])
+
+ #
+ # gssapi_krb5 Only lib needed with MIT K5 v1.2.1, so find it first in
+ # order to prefer MIT Kerberos. If both MIT & Heimdal
+ # Kerberos are installed and in the path, this will leave
+ # some of the libraries above in LIBS unnecessarily, but
+ # noone would ever do that, right?
+ #
+ # gssapi_krb5 MIT K5 v1.2.2-beta1 -lkrb5
+ #
+ # gssapi Heimdal K 0.3d -lkrb5
+ #
+ AC_SEARCH_LIBS([gss_import_name], [gssapi_krb5 gssapi])
+fi
+])dnl
+
+# Do all the work for Automake. This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 5
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# We require 2.13 because we rely on SHELL being computed by configure.
+AC_PREREQ([2.13])
+
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
+# The purpose of this macro is to provide the user with a means to
+# check macros which are provided without letting her know how the
+# information is coded.
+# If this macro is not defined by Autoconf, define it here.
+ifdef([AC_PROVIDE_IFELSE],
+ [],
+ [define([AC_PROVIDE_IFELSE],
+ [ifdef([AC_PROVIDE_$1],
+ [$2], [$3])])])
+
+
+# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
+# ----------------------------------------------
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
+fi
+
+# Define the identity of the package.
+PACKAGE=$1
+AC_SUBST(PACKAGE)dnl
+VERSION=$2
+AC_SUBST(VERSION)dnl
+ifelse([$3],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+ifdef([m4_pattern_allow],
+ [m4_pattern_allow([^AM_(C|CPP|CXX|OBJC|F|R|GCJ)FLAGS])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal)
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake)
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_MISSING_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_PROG_ETAGS])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_PROVIDE_IFELSE([AC_PROG_][CC],
+ [AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_][CC],
+ defn([AC_PROG_][CC])[AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_][CXX],
+ [AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_][CXX],
+ defn([AC_PROG_][CXX])[AM_DEPENDENCIES(CXX)])])dnl
+])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+
+# serial 2
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_INSTALL_SH
+# ---------------------
+# Like AM_MISSING_PROG, but only looks for install-sh.
+AC_DEFUN([AM_MISSING_INSTALL_SH],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+if test -z "$install_sh"; then
+ for install_sh in "$ac_aux_dir/install-sh" \
+ "$ac_aux_dir/install.sh" \
+ "${am_missing_run}${ac_auxdir}/install-sh";
+ do
+ test -f "$install_sh" && break
+ done
+ # FIXME: an evil hack: we remove the SHELL invocation from
+ # install_sh because automake adds it back in. Sigh.
+ install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
+fi
+AC_SUBST(install_sh)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[test x"${MISSING+set}" = xset ||
+ MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ am_backtick='`'
+ AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to ${srcdir}/foo. In other projects, it is set to `.'.
+# Of course, Automake must honor this variable whenever it call a tool
+# from the auxiliary directory. The problem is that $srcdir (hence
+# $ac_aux_dir) can be either an absolute path or a path relative to
+# $top_srcdir or absolute, this depends on how configure is run. This
+# is pretty anoying since it makes $ac_aux_dir quite unusable in
+# subdirectories: on the top source directory, any form will work
+# fine, but in subdirectories relative pat needs to be adapted.
+# - calling $top_srcidr/$ac_aux_dir/missing would success if $srcdir is
+# relative, but fail if $srcdir is absolute
+# - conversly, calling $ax_aux_dir/missing would fail if $srcdir is
+# absolute, and success on relative paths.
+#
+# Consequently, we define and use $am_aux_dir, the "always absolute"
+# version of $ac_aux_dir.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
+])
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross=compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so if we ever
+# need to use a non standard strip, we just have to make sure we use
+# install-sh with the STRIPPROG variable set.
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_MISSING_INSTALL_SH])
+dnl Don't test for $cross_compiling = yes, it might be `maybe'...
+# We'd like to do this but we can't because it will unconditionally
+# require config.guess. One way would be if autoconf had the capability
+# to let us compile in this code only when config.guess was already
+# a possibility.
+#if test "$cross_compiling" != no; then
+# # since we are cross-compiling, we need to check for a suitable `strip'
+# AM_PROG_STRIP
+# if test -z "$STRIP"; then
+# AC_MSG_WARN([strip missing, install-strip will not strip binaries])
+# fi
+#fi
+
+# If $STRIP is defined (either by the user, or by AM_PROG_STRIP),
+# instruct install-strip to use install-sh and the given $STRIP program.
+# Otherwise, just use ${INSTALL}: the idea is to use the vendor install
+# as much as possible, because it's faster.
+if test -z "$STRIP"; then
+ # The top level make will set INSTALL_PROGRAM=$(INSTALL_STRIP_PROGRAM)
+ # and the double dolard below is there to make sure that ${INSTALL}
+ # is substitued in the sub-makes, not at the top-level; this is
+ # needed if ${INSTALL} is a relative path (ajusted in each subdirectory
+ # by config.status).
+ INSTALL_STRIP_PROGRAM='$${INSTALL} -s'
+ INSTALL_STRIP_PROGRAM_ENV=''
+else
+ _am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
+ INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && pwd\`/install-sh -c -s"
+ INSTALL_STRIP_PROGRAM_ENV="STRIPPROG='\$(STRIP)'"
+fi
+AC_SUBST([STRIP])
+AC_SUBST([INSTALL_STRIP_PROGRAM])
+AC_SUBST([INSTALL_STRIP_PROGRAM_ENV])])
+
+#AC_DEFUN([AM_PROG_STRIP],
+#[# Check for `strip', unless the installer
+# has set the STRIP environment variable.
+# Note: don't explicitly check for -z "$STRIP" here because
+# that will cause problems if AC_CANONICAL_* is AC_REQUIREd after
+# this macro, and anyway it doesn't have an effect anyway.
+#AC_CHECK_TOOL([STRIP],[strip])
+#])
+
+#
+# Find some information about the etags program
+#
+# Sets
+# ETAGS = path to etags
+# ETAGS_INCLUDE_OPTION = option to pass to etags with arg for includes
+#
+
+AC_DEFUN([AM_PROG_ETAGS],
+[AC_BEFORE([$0], [AM_PROG_ETAGS_WORKS])dnl
+AC_CHECK_PROG(ETAGS, etags, etags)
+if test -z "$ETAGS"; then
+ AC_CHECK_PROG(ETAGS, ctags, ctags -e)
+fi
+if test -n "$ETAGS"; then
+ AM_PROG_ETAGS_WORKS
+ if test "$am_cv_prog_etags_works" = yes ; then
+ AM_PROG_ETAGS_INCLUDE_OPTION
+ else
+ AM_MISSING_PROG(ETAGS, etags)
+ fi
+else
+ AM_MISSING_PROG(ETAGS, etags)
+fi])
+
+
+AC_DEFUN([AM_PROG_ETAGS_WORKS],
+[AC_CACHE_CHECK([whether ${ETAGS-etags} works], [am_cv_prog_etags_works],
+[cat >conftest.c <<EOF
+int globalvar;
+EOF
+if AC_TRY_COMMAND([${ETAGS-etags} -f - conftest.c |egrep ^int\ globalvar\; >&2]); then
+ am_cv_prog_etags_works=yes
+else
+ am_cv_prog_etags_works=no
+fi
+rm -f conftest.c])])
+
+AC_DEFUN([AM_PROG_ETAGS_INCLUDE_OPTION],
+[AC_REQUIRE([AM_PROG_ETAGS_WORKS])dnl
+if test "$am_cv_prog_etags_works" = yes ; then
+ AC_CACHE_CHECK([for etags include option],
+ [am_cv_prog_etags_include_option],
+ [cat >conftest.c <<EOF
+int globalvar;
+EOF
+ if AC_TRY_COMMAND([${ETAGS-etags} --etags-include=TAGS.inc -f - conftest.c |egrep ^TAGS.inc,include\$ >&2]); then
+ am_cv_prog_etags_include_option=--etags-include=
+ elif AC_TRY_COMMAND([${ETAGS-etags} -i TAGS.inc -f - conftest.c |egrep ^TAGS.inc,include\$ >&2]); then
+ am_cv_prog_etags_include_option='"-i "'
+ else :
+ # AC_MSG_ERROR(unfamiliar etags implementation)
+ fi
+ rm -f conftest.c])
+else
+ :
+fi
+ETAGS_INCLUDE_OPTION="$am_cv_prog_etags_include_option"
+AC_SUBST(ETAGS_INCLUDE_OPTION)])
+
+# serial 3
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+# AM_DEPENDENCIES(NAME)
+# ---------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX" or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+AC_DEFUN([AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+ifelse([$1], CC,
+ [AC_REQUIRE([AC_PROG_][CC])dnl
+AC_REQUIRE([AC_PROG_][CPP])
+depcc="$CC"
+depcpp="$CPP"],
+ [$1], CXX, [AC_REQUIRE([AC_PROG_][CXX])dnl
+AC_REQUIRE([AC_PROG_][CXXCPP])
+depcc="$CXX"
+depcpp="$CXXCPP"],
+ [$1], OBJC, [am_cv_OBJC_dependencies_compiler_type=gcc],
+ [AC_REQUIRE([AC_PROG_][$1])dnl
+depcc="$$1"
+depcpp=""])
+
+AC_REQUIRE([AM_MAKE_INCLUDE])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir confdir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" confdir
+ cd confdir
+
+ am_cv_$1_dependencies_compiler_type=none
+ for depmode in `sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < "./depcomp"`; do
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
+
+ case "$depmode" in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode="$depmode" \
+ source=conftest.c object=conftest.o \
+ depfile=conftest.Po tmpdepfile=conftest.TPo \
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ grep conftest.h conftest.Po > /dev/null 2>&1; then
+ am_cv_$1_dependencies_compiler_type="$depmode"
+ break
+ fi
+ done
+
+ cd ..
+ rm -rf confdir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+$1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
+AC_SUBST([$1DEPMODE])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
+ DEPDIR=.deps
+ # We redirect because .deps might already exist and be populated.
+ # In this situation we don't want to see an error.
+ rmdir .deps > /dev/null 2>&1
+else
+ DEPDIR=_deps
+fi
+AC_SUBST(DEPDIR)
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+pushdef([subst], defn([AC_SUBST]))
+subst(AMDEPBACKSLASH)
+popdef([subst])
+])
+
+# Generate code to set up dependency tracking.
+# This macro should only be invoked once -- use via AC_REQUIRE.
+# Usage:
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
+AC_OUTPUT_COMMANDS([
+test x"$AMDEP" != x"" ||
+for mf in $CONFIG_FILES; do
+ case "$mf" in
+ Makefile) dirpart=.;;
+ */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+ *) continue;;
+ esac
+ grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
+ $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+], [AMDEP="$AMDEP"
+ac_aux_dir="$ac_aux_dir"])])
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+ @echo done
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+_am_include='#'
+_am_quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ _am_include=include
+ _am_quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$_am_include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ _am_include=.include
+ _am_quote='"'
+ _am_result=BSD
+ fi
+fi
+AC_SUBST(_am_include)
+AC_SUBST(_am_quote)
+AC_MSG_RESULT($_am_result)
+rm -f confinc confmf
+])
+
+# serial 3
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+#
+# FIXME: Once using 2.50, use this:
+# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],
+ [errprint(__file__:__line__: [$0: invalid condition: $1
+])dnl
+m4exit(1)])dnl
+ifelse([$1], [FALSE],
+ [errprint(__file__:__line__: [$0: invalid condition: $1
+])dnl
+m4exit(1)])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+# serial 3
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. We must strip everything past the first ":",
+# and everything past the last "/".
+
+AC_PREREQ([2.12])
+
+AC_DEFUN([AM_CONFIG_HEADER],
+[ifdef([AC_FOREACH],dnl
+ [dnl init our file count if it isn't already
+ m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
+ dnl prepare to store our destination file list for use in config.status
+ AC_FOREACH([_AM_File], [$1],
+ [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
+ m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
+ dnl and add it to the list of files AC keeps track of, along
+ dnl with our hook
+ AC_CONFIG_HEADERS(_AM_File,
+dnl COMMANDS, [, INIT-CMDS]
+[# update the timestamp
+echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
+][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
+ m4_popdef([_AM_Dest])])],dnl
+[AC_CONFIG_HEADER([$1])
+ AC_OUTPUT_COMMANDS(
+ ifelse(patsubst([$1], [[^ ]], []),
+ [],
+ [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
+ patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
+[am_indx=1
+for am_file in $1; do
+ case " \$CONFIG_HEADERS " in
+ *" \$am_file "*)
+ am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
+ if test -n "\$am_dir"; then
+ am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
+ for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
+ am_tmpdir=\$am_tmpdir\$am_subdir/
+ if test ! -d \$am_tmpdir; then
+ mkdir \$am_tmpdir
+ fi
+ done
+ fi
+ echo timestamp > "\$am_dir"stamp-h\$am_indx
+ ;;
+ esac
+ am_indx=\`expr \$am_indx + 1\`
+done])
+])]) # AM_CONFIG_HEADER
+
+# _AM_DIRNAME(PATH)
+# -----------------
+# Like AS_DIRNAME, only do it during macro expansion
+AC_DEFUN([_AM_DIRNAME],
+ [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
+ m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
+ m4_if(m4_regexp([$1], [^/.*]), -1,
+ [.],
+ m4_patsubst([$1], [^\(/\).*], [\1])),
+ m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
+ m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
+]) # _AM_DIRNAME
+
diff --git a/contrib/cvs/config.h.in b/contrib/cvs/config.h.in
index 438b798d3dc3..986998f0712e 100644
--- a/contrib/cvs/config.h.in
+++ b/contrib/cvs/config.h.in
@@ -77,13 +77,6 @@
/* Define if you have MIT Kerberos version 4 available. */
#undef HAVE_KERBEROS
-/* Define if you have GSSAPI with MIT Kerberos version 5 available. */
-#undef HAVE_GSSAPI
-
-/* Define if GSS_C_NT_HOSTBASED_SERVICE is defined in the gssapi.h
- header file. Only relevant when using GSSAPI. */
-#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE
-
/* Define if you want CVS to be able to be a remote repository client. */
#undef CLIENT_SUPPORT
@@ -147,12 +140,18 @@
/* Define if you have the ftruncate function. */
#undef HAVE_FTRUNCATE
+/* Define if you have the getgroups function. */
+#undef HAVE_GETGROUPS
+
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the getpassphrase function. */
#undef HAVE_GETPASSPHRASE
+/* Define if you have the gettimeofday function. */
+#undef HAVE_GETTIMEOFDAY
+
/* Define if you have the initgroups function. */
#undef HAVE_INITGROUPS
@@ -168,9 +167,15 @@
/* Define if you have the mknod function. */
#undef HAVE_MKNOD
+/* Define if you have the mkstemp function. */
+#undef HAVE_MKSTEMP
+
/* Define if you have the mktemp function. */
#undef HAVE_MKTEMP
+/* Define if you have the nanosleep function. */
+#undef HAVE_NANOSLEEP
+
/* Define if you have the putenv function. */
#undef HAVE_PUTENV
@@ -180,6 +185,9 @@
/* Define if you have the rename function. */
#undef HAVE_RENAME
+/* Define if you have the select function. */
+#undef HAVE_SELECT
+
/* Define if you have the sigaction function. */
#undef HAVE_SIGACTION
@@ -213,6 +221,9 @@
/* Define if you have the tzset function. */
#undef HAVE_TZSET
+/* Define if you have the usleep function. */
+#undef HAVE_USLEEP
+
/* Define if you have the valloc function. */
#undef HAVE_VALLOC
@@ -294,11 +305,29 @@
/* Define if you have the <sys/timeb.h> header file. */
#undef HAVE_SYS_TIMEB_H
+/* Define if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the <utime.h> header file. */
#undef HAVE_UTIME_H
-/* Define if you have the gen library (-lgen). */
-#undef HAVE_LIBGEN
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Path to the pr utility */
+#undef PR_PROGRAM
+
+/* Define if you have GSSAPI with Kerberos version 5 available. */
+#undef HAVE_GSSAPI
+
+/* Define to an alternative value if GSS_C_NT_HOSTBASED_SERVICE isn't defined
+in the gssapi.h header file. MIT Kerberos 1.2.1 requires this. Only relevant
+when using GSSAPI. */
+#undef GSS_C_NT_HOSTBASED_SERVICE
+
diff --git a/contrib/cvs/configure b/contrib/cvs/configure
index f1ead553576b..d4777323898c 100755
--- a/contrib/cvs/configure
+++ b/contrib/cvs/configure
@@ -12,6 +12,9 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
+ --disable-dependency-tracking Speeds up one-time builds
+ --enable-dependency-tracking Do not reject slow dependency extractors"
+ac_help="$ac_help
--with-krb4=value set default \$(KRB4) from value"
ac_help="$ac_help
--with-gssapi=value GSSAPI directory"
@@ -533,13 +536,461 @@ else
fi
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:571: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
+ for ac_dir in $PATH; do
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ if test -f $ac_dir/$ac_prog; then
+ if test $ac_prog = install &&
+ grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ else
+ ac_cv_path_install="$ac_dir/$ac_prog -c"
+ break 2
+ fi
+ fi
+ done
+ ;;
+ esac
+ done
+ IFS="$ac_save_IFS"
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL="$ac_cv_path_install"
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL="$ac_install_sh"
+ fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:624: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+test x"${MISSING+set}" = xset ||
+ MISSING="\${SHELL} `CDPATH=:; cd $ac_aux_dir && pwd`/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ am_backtick='`'
+ echo "configure: warning: ${am_backtick}missing' script is too old or missing" 1>&2
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:696: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AWK="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AWK="$ac_cv_prog_AWK"
+if test -n "$AWK"; then
+ echo "$ac_t""$AWK" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AWK" && break
+done
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:726: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftestmake <<\EOF
+all:
+ @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ SET_MAKE=
+else
+ echo "$ac_t""no" 1>&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Extract the first word of "etags", so it can be a program name with args.
+set dummy etags; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:755: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$ETAGS"; then
+ ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ETAGS="etags"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+ETAGS="$ac_cv_prog_ETAGS"
+if test -n "$ETAGS"; then
+ echo "$ac_t""$ETAGS" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$ETAGS"; then
+ # Extract the first word of "ctags", so it can be a program name with args.
+set dummy ctags; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:785: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$ETAGS"; then
+ ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_ETAGS="ctags -e"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+ETAGS="$ac_cv_prog_ETAGS"
+if test -n "$ETAGS"; then
+ echo "$ac_t""$ETAGS" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+if test -n "$ETAGS"; then
+ echo $ac_n "checking whether ${ETAGS-etags} works""... $ac_c" 1>&6
+echo "configure:814: checking whether ${ETAGS-etags} works" >&5
+if eval "test \"`echo '$''{'am_cv_prog_etags_works'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat >conftest.c <<EOF
+int globalvar;
+EOF
+if { ac_try='${ETAGS-etags} -f - conftest.c |egrep ^int\ globalvar\; >&2'; { (eval echo configure:821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ am_cv_prog_etags_works=yes
+else
+ am_cv_prog_etags_works=no
+fi
+rm -f conftest.c
+fi
+
+echo "$ac_t""$am_cv_prog_etags_works" 1>&6
+ if test "$am_cv_prog_etags_works" = yes ; then
+ if test "$am_cv_prog_etags_works" = yes ; then
+ echo $ac_n "checking for etags include option""... $ac_c" 1>&6
+echo "configure:833: checking for etags include option" >&5
+if eval "test \"`echo '$''{'am_cv_prog_etags_include_option'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat >conftest.c <<EOF
+int globalvar;
+EOF
+ if { ac_try='${ETAGS-etags} --etags-include=TAGS.inc -f - conftest.c |egrep ^TAGS.inc,include\$ >&2'; { (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ am_cv_prog_etags_include_option=--etags-include=
+ elif { ac_try='${ETAGS-etags} -i TAGS.inc -f - conftest.c |egrep ^TAGS.inc,include\$ >&2'; { (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ am_cv_prog_etags_include_option='"-i "'
+ else :
+ # AC_MSG_ERROR(unfamiliar etags implementation)
+ fi
+ rm -f conftest.c
+fi
+
+echo "$ac_t""$am_cv_prog_etags_include_option" 1>&6
+else
+ :
+fi
+ETAGS_INCLUDE_OPTION="$am_cv_prog_etags_include_option"
+
+ else
+
+ETAGS=${ETAGS-"${am_missing_run}etags"}
+
+ fi
+else
+
+ETAGS=${ETAGS-"${am_missing_run}etags"}
+
+fi
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval="$enable_dependency_tracking"
+ :
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+
+if test -d .deps || mkdir .deps 2> /dev/null || test -d .deps; then
+ DEPDIR=.deps
+ # We redirect because .deps might already exist and be populated.
+ # In this situation we don't want to see an error.
+ rmdir .deps > /dev/null 2>&1
+else
+ DEPDIR=_deps
+fi
+
+
+# test to see if srcdir already configured
+if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+ test -f $srcdir/config.status; then
+ { echo "configure: error: source directory already configured; run \"make distclean\" there first" 1>&2; exit 1; }
+fi
+
+# Define the identity of the package.
+PACKAGE=cvs
+VERSION=1.11.1p1
+cat >> confdefs.h <<EOF
+#define PACKAGE "$PACKAGE"
+EOF
+
+cat >> confdefs.h <<EOF
+#define VERSION "$VERSION"
+EOF
+
+
+# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
+# the ones we care about.
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+
+if test -z "$install_sh"; then
+ for install_sh in "$ac_aux_dir/install-sh" \
+ "$ac_aux_dir/install.sh" \
+ "${am_missing_run}${ac_auxdir}/install-sh";
+ do
+ test -f "$install_sh" && break
+ done
+ # FIXME: an evil hack: we remove the SHELL invocation from
+ # install_sh because automake adds it back in. Sigh.
+ install_sh=`echo $install_sh | sed -e 's/\${SHELL}//'`
+fi
+
+
+# We'd like to do this but we can't because it will unconditionally
+# require config.guess. One way would be if autoconf had the capability
+# to let us compile in this code only when config.guess was already
+# a possibility.
+#if test "$cross_compiling" != no; then
+# # since we are cross-compiling, we need to check for a suitable `strip'
+# AM_PROG_STRIP
+# if test -z "$STRIP"; then
+# AC_MSG_WARN([strip missing, install-strip will not strip binaries])
+# fi
+#fi
+
+# If $STRIP is defined (either by the user, or by AM_PROG_STRIP),
+# instruct install-strip to use install-sh and the given $STRIP program.
+# Otherwise, just use ${INSTALL}: the idea is to use the vendor install
+# as much as possible, because it's faster.
+if test -z "$STRIP"; then
+ # The top level make will set INSTALL_PROGRAM=$(INSTALL_STRIP_PROGRAM)
+ # and the double dolard below is there to make sure that ${INSTALL}
+ # is substitued in the sub-makes, not at the top-level; this is
+ # needed if ${INSTALL} is a relative path (ajusted in each subdirectory
+ # by config.status).
+ INSTALL_STRIP_PROGRAM='$${INSTALL} -s'
+ INSTALL_STRIP_PROGRAM_ENV=''
+else
+ _am_dirpart="`echo $install_sh | sed -e 's,//*[^/]*$,,'`"
+ INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && pwd\`/install-sh -c -s"
+ INSTALL_STRIP_PROGRAM_ENV="STRIPPROG='\$(STRIP)'"
+fi
+
+
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+
if test "x$prefix" = xNONE; then
echo $ac_n "checking for prefix by $ac_c" 1>&6
# Extract the first word of "cvs", so it can be a program name with args.
set dummy cvs; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:543: checking for $ac_word" >&5
+echo "configure:994: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_CVS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -577,13 +1028,15 @@ fi
fi
+
+
-for ac_prog in mawk gawk nawk awk
+for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:587: checking for $ac_word" >&5
+echo "configure:1040: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -615,7 +1068,7 @@ done
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:619: checking for $ac_word" >&5
+echo "configure:1072: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -645,7 +1098,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:649: checking for $ac_word" >&5
+echo "configure:1102: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -696,7 +1149,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:700: checking for $ac_word" >&5
+echo "configure:1153: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -728,7 +1181,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1185: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -739,12 +1192,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 743 "configure"
+#line 1196 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -770,12 +1223,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:774: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1227: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:779: checking whether we are using GNU C" >&5
+echo "configure:1232: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -784,7 +1237,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -803,7 +1256,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:807: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1260: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -834,24 +1287,186 @@ else
fi
fi
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install-sh -c"
- break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/install.sh -c"
- break
- fi
-done
-if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1293: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ # This must be in double quotes, not single quotes, because CPP may get
+ # substituted into the Makefile and "${CC-cc}" will confuse make.
+ CPP="${CC-cc} -E"
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp.
+ cat > conftest.$ac_ext <<EOF
+#line 1308 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -E -traditional-cpp"
+ cat > conftest.$ac_ext <<EOF
+#line 1325 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP="${CC-cc} -nologo -E"
+ cat > conftest.$ac_ext <<EOF
+#line 1342 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ :
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+ ac_cv_prog_CPP="$CPP"
+fi
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+doit:
+ @echo done
+END
+# If we don't find an include directive, just comment out the code.
+echo $ac_n "checking for style of include used by $am_make""... $ac_c" 1>&6
+echo "configure:1379: checking for style of include used by $am_make" >&5
+_am_include='#'
+_am_quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ _am_include=include
+ _am_quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$_am_include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ _am_include=.include
+ _am_quote='"'
+ _am_result=BSD
+ fi
+fi
+
+
+echo "$ac_t""$_am_result" 1>&6
+rm -f confinc confmf
+
+
+depcc="$CC"
+depcpp="$CPP"
+
+
+
+echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6
+echo "configure:1411: checking dependency style of $depcc" >&5
+if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -z "$AMDEP"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir confdir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" confdir
+ cd confdir
+
+ am_cv_CC_dependencies_compiler_type=none
+ for depmode in `sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < "./depcomp"`; do
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ echo '#include "conftest.h"' > conftest.c
+ echo 'int i;' > conftest.h
+
+ case "$depmode" in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode="$depmode" \
+ source=conftest.c object=conftest.o \
+ depfile=conftest.Po tmpdepfile=conftest.TPo \
+ $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
+ grep conftest.h conftest.Po > /dev/null 2>&1; then
+ am_cv_CC_dependencies_compiler_type="$depmode"
+ break
+ fi
+ done
+
+ cd ..
+ rm -rf confdir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+
+echo "$ac_t""$am_cv_CC_dependencies_compiler_type" 1>&6
+CCDEPMODE="depmode=$am_cv_CC_dependencies_compiler_type"
+
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -865,7 +1480,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:869: checking for a BSD compatible install" >&5
+echo "configure:1484: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -918,7 +1533,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:922: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1537: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -944,10 +1559,11 @@ else
SET_MAKE="MAKE=${MAKE-make}"
fi
+# Automake's more advanced version of AC_PROG_RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:951: checking for $ac_word" >&5
+echo "configure:1567: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -979,7 +1595,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:983: checking for $ac_word" >&5
+echo "configure:1599: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1009,20 +1625,41 @@ test -n "$YACC" && break
done
test -n "$YACC" || YACC="yacc"
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1630: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+ rm -f conftestdata
+ ac_cv_prog_LN_S="ln -s"
+else
+ ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+ echo "$ac_t""yes" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1017: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_perl_path'+set}'`\" = set"; then
+echo "configure:1654: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$perl_path" in
+ case "$PERL" in
/*)
- ac_cv_path_perl_path="$perl_path" # Let the user override the test with a path.
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
;;
?:/*)
- ac_cv_path_perl_path="$perl_path" # Let the user override the test with a dos path.
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
@@ -1030,18 +1667,18 @@ else
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_path_perl_path="$ac_dir/$ac_word"
+ ac_cv_path_PERL="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_perl_path" && ac_cv_path_perl_path="no"
+ test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no"
;;
esac
fi
-perl_path="$ac_cv_path_perl_path"
-if test -n "$perl_path"; then
- echo "$ac_t""$perl_path" 1>&6
+PERL="$ac_cv_path_PERL"
+if test -n "$PERL"; then
+ echo "$ac_t""$PERL" 1>&6
else
echo "$ac_t""no" 1>&6
fi
@@ -1049,16 +1686,16 @@ fi
# Extract the first word of "csh", so it can be a program name with args.
set dummy csh; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1053: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_csh_path'+set}'`\" = set"; then
+echo "configure:1690: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_CSH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$csh_path" in
+ case "$CSH" in
/*)
- ac_cv_path_csh_path="$csh_path" # Let the user override the test with a path.
+ ac_cv_path_CSH="$CSH" # Let the user override the test with a path.
;;
?:/*)
- ac_cv_path_csh_path="$csh_path" # Let the user override the test with a dos path.
+ ac_cv_path_CSH="$CSH" # Let the user override the test with a dos path.
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
@@ -1066,18 +1703,177 @@ else
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_path_csh_path="$ac_dir/$ac_word"
+ ac_cv_path_CSH="$ac_dir/$ac_word"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_csh_path" && ac_cv_path_csh_path="no"
+ test -z "$ac_cv_path_CSH" && ac_cv_path_CSH="no"
;;
esac
fi
-csh_path="$ac_cv_path_csh_path"
-if test -n "$csh_path"; then
- echo "$ac_t""$csh_path" 1>&6
+CSH="$ac_cv_path_CSH"
+if test -n "$CSH"; then
+ echo "$ac_t""$CSH" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "pr", so it can be a program name with args.
+set dummy pr; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1726: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PR'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$PR" in
+ /*)
+ ac_cv_path_PR="$PR" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_PR="$PR" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_PR="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_PR" && ac_cv_path_PR="no"
+ ;;
+esac
+fi
+PR="$ac_cv_path_PR"
+if test -n "$PR"; then
+ echo "$ac_t""$PR" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# For diff/util.c
+if test x"$PR" != xno; then
+ cat >> confdefs.h <<EOF
+#define PR_PROGRAM "$PR"
+EOF
+
+fi
+
+missing_dir=`cd $ac_aux_dir && pwd`
+glocs="$PATH:/usr/local/bin:/usr/contrib/bin:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin"
+for ac_prog in groff roff
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1774: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_ROFF'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$ROFF" in
+ /*)
+ ac_cv_path_ROFF="$ROFF" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_ROFF="$ROFF" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$glocs"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_ROFF="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+esac
+fi
+ROFF="$ac_cv_path_ROFF"
+if test -n "$ROFF"; then
+ echo "$ac_t""$ROFF" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$ROFF" && break
+done
+test -n "$ROFF" || ROFF="$missing_dir/missing roff"
+
+# Extract the first word of "ps2pdf", so it can be a program name with args.
+set dummy ps2pdf; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1813: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_PS2PDF'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$PS2PDF" in
+ /*)
+ ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_PS2PDF="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_PS2PDF" && ac_cv_path_PS2PDF="$missing_dir/missing ps2pdf"
+ ;;
+esac
+fi
+PS2PDF="$ac_cv_path_PS2PDF"
+if test -n "$PS2PDF"; then
+ echo "$ac_t""$PS2PDF" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "texi2dvi", so it can be a program name with args.
+set dummy texi2dvi; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1849: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_TEXI2DVI'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$TEXI2DVI" in
+ /*)
+ ac_cv_path_TEXI2DVI="$TEXI2DVI" # Let the user override the test with a path.
+ ;;
+ ?:/*)
+ ac_cv_path_TEXI2DVI="$TEXI2DVI" # Let the user override the test with a dos path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_TEXI2DVI="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_TEXI2DVI" && ac_cv_path_TEXI2DVI="$missing_dir/missing texi2dvi"
+ ;;
+esac
+fi
+TEXI2DVI="$ac_cv_path_TEXI2DVI"
+if test -n "$TEXI2DVI"; then
+ echo "$ac_t""$TEXI2DVI" 1>&6
else
echo "$ac_t""no" 1>&6
fi
@@ -1086,7 +1882,7 @@ fi
# Pull the hash mark out of the macro call to avoid m4 problems.
ac_msg="whether #! works in shell scripts"
echo $ac_n "checking $ac_msg""... $ac_c" 1>&6
-echo "configure:1090: checking $ac_msg" >&5
+echo "configure:1886: checking $ac_msg" >&5
if eval "test \"`echo '$''{'ac_cv_sys_interpreter'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1112,90 +1908,53 @@ if test X"$ac_cv_sys_interpreter" != X"yes" ; then
echo "configure: warning: $ac_msg" 1>&2
fi
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1117: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+# BSD's logo is a devil for a reason, hey?
+echo $ac_n "checking for BSD VPATH bug in make""... $ac_c" 1>&6
+echo "configure:1914: checking for BSD VPATH bug in make" >&5
+if eval "test \"`echo '$''{'ccvs_cv_bsd_make_vpath_bug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- # This must be in double quotes, not single quotes, because CPP may get
- # substituted into the Makefile and "${CC-cc}" will confuse make.
- CPP="${CC-cc} -E"
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp.
- cat > conftest.$ac_ext <<EOF
-#line 1132 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -E -traditional-cpp"
- cat > conftest.$ac_ext <<EOF
-#line 1149 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP="${CC-cc} -nologo -E"
- cat > conftest.$ac_ext <<EOF
-#line 1166 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
+ if test ! -d ac_test_dir ; then
+ { ac_try='mkdir ac_test_dir'; { (eval echo configure:1919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
+fi
+cat >conftestmake <<EOF
+VPATH = ac_test_dir
+ac_test_target: ac_test_dep
+ echo BSD VPATH bug present >&2
+ac_test_dep: ac_test_dep_dep
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- :
+touch ac_test_dir/ac_test_dep_dep
+touch ac_test_dir/ac_test_dep
+touch ac_test_target
+# Don't know why, but the following test doesn't work under FreeBSD 4.2
+# without this sleep command
+sleep 1
+if { ac_try='make -f conftestmake 2>&1 >/dev/null |grep ^BSD\ VPATH\ bug\ present\$ >/dev/null'; { (eval echo configure:1933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } ; then
+ ccvs_cv_bsd_make_vpath_bug=yes
else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- CPP=/lib/cpp
+ ccvs_cv_bsd_make_vpath_bug=no
fi
-rm -f conftest*
+{ ac_try='rm -rf ac_test_dir ac_test_target conftestmake'; { (eval echo configure:1938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }
fi
-rm -f conftest*
-fi
-rm -f conftest*
- ac_cv_prog_CPP="$CPP"
-fi
- CPP="$ac_cv_prog_CPP"
+
+echo "$ac_t""$ccvs_cv_bsd_make_vpath_bug" 1>&6
+# We also don't need to worry about the bug when $srcdir = $builddir
+
+
+if \
+ test $ccvs_cv_bsd_make_vpath_bug = no \
+ || test $srcdir = .; then
+ MAKE_TARGETS_IN_VPATH_TRUE=
+ MAKE_TARGETS_IN_VPATH_FALSE='#'
else
- ac_cv_prog_CPP="$CPP"
+ MAKE_TARGETS_IN_VPATH_TRUE='#'
+ MAKE_TARGETS_IN_VPATH_FALSE=
fi
-echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:1197: checking for AIX" >&5
+echo "configure:1956: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 1199 "configure"
+#line 1958 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -1218,17 +1977,17 @@ rm -f conftest*
ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
-echo "configure:1222: checking for minix/config.h" >&5
+echo "configure:1981: checking for minix/config.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1227 "configure"
+#line 1986 "configure"
#include "confdefs.h"
#include <minix/config.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1266,7 +2025,7 @@ EOF
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1270: checking for POSIXized ISC" >&5
+echo "configure:2029: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -1296,12 +2055,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1300: checking for $ac_hdr that defines DIR" >&5
+echo "configure:2059: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1305 "configure"
+#line 2064 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -1309,7 +2068,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -1334,7 +2093,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1338: checking for opendir in -ldir" >&5
+echo "configure:2097: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1342,7 +2101,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1346 "configure"
+#line 2105 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1353,7 +2112,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1375,7 +2134,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1379: checking for opendir in -lx" >&5
+echo "configure:2138: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1383,7 +2142,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1387 "configure"
+#line 2146 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1394,7 +2153,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1417,12 +2176,12 @@ fi
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1421: checking for ANSI C header files" >&5
+echo "configure:2180: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1426 "configure"
+#line 2185 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1430,7 +2189,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1447,7 +2206,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1451 "configure"
+#line 2210 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1465,7 +2224,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1469 "configure"
+#line 2228 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1486,7 +2245,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1490 "configure"
+#line 2249 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1497,7 +2256,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1521,12 +2280,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1525: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2284: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1530 "configure"
+#line 2289 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -1542,7 +2301,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -1565,21 +2324,21 @@ fi
for ac_hdr in errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
limits.h sys/file.h \
sys/param.h sys/select.h sys/time.h sys/timeb.h \
- io.h direct.h sys/bsdtypes.h sys/resource.h
+ io.h direct.h sys/bsdtypes.h sys/resource.h syslog.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1573: checking for $ac_hdr" >&5
+echo "configure:2332: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1578 "configure"
+#line 2337 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1606,12 +2365,12 @@ fi
done
echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
-echo "configure:1610: checking whether stat file-mode macros are broken" >&5
+echo "configure:2369: checking whether stat file-mode macros are broken" >&5
if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1615 "configure"
+#line 2374 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1662,12 +2421,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1666: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2425: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1671 "configure"
+#line 2430 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1676,7 +2435,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1698,12 +2457,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1702: checking for working const" >&5
+echo "configure:2461: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1707 "configure"
+#line 2466 "configure"
#include "confdefs.h"
int main() {
@@ -1752,7 +2511,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:1756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -1773,12 +2532,12 @@ EOF
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:1777: checking for uid_t in sys/types.h" >&5
+echo "configure:2536: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1782 "configure"
+#line 2541 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -1807,12 +2566,12 @@ EOF
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1811: checking for mode_t" >&5
+echo "configure:2570: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1816 "configure"
+#line 2575 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1840,12 +2599,12 @@ EOF
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1844: checking for pid_t" >&5
+echo "configure:2603: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1849 "configure"
+#line 2608 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1873,12 +2632,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1877: checking for size_t" >&5
+echo "configure:2636: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1882 "configure"
+#line 2641 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1906,12 +2665,12 @@ EOF
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1910: checking return type of signal handlers" >&5
+echo "configure:2669: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1915 "configure"
+#line 2674 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -1928,7 +2687,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:1932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -1948,12 +2707,12 @@ EOF
echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
-echo "configure:1952: checking for st_blksize in struct stat" >&5
+echo "configure:2711: checking for st_blksize in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1957 "configure"
+#line 2716 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1961,7 +2720,7 @@ int main() {
struct stat s; s.st_blksize;
; return 0; }
EOF
-if { (eval echo configure:1965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_blksize=yes
else
@@ -1982,12 +2741,12 @@ EOF
fi
echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
-echo "configure:1986: checking for st_rdev in struct stat" >&5
+echo "configure:2745: checking for st_rdev in struct stat" >&5
if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1991 "configure"
+#line 2750 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1995,7 +2754,7 @@ int main() {
struct stat s; s.st_rdev;
; return 0; }
EOF
-if { (eval echo configure:1999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_st_rdev=yes
else
@@ -2018,12 +2777,12 @@ fi
for ac_func in mkdir rename strstr dup2 strerror valloc waitpid memmove strtoul
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2022: checking for $ac_func" >&5
+echo "configure:2781: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2027 "configure"
+#line 2786 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2046,7 +2805,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2072,15 +2831,41 @@ fi
done
-for ac_func in fchmod fsync ftime mktemp putenv vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock tempnam tzset readlink wait3 mknod getpassphrase
+for ac_func in \
+ fchdir \
+ fchmod \
+ fsync \
+ ftime \
+ ftruncate \
+ getgroups \
+ getpagesize \
+ getpassphrase \
+ gettimeofday \
+ initgroups \
+ mknod \
+ mkstemp \
+ mktemp \
+ putenv \
+ readlink \
+ sigaction \
+ sigblock \
+ sigprocmask \
+ sigsetmask \
+ sigvec \
+ tempnam \
+ timezone \
+ tzset \
+ vprintf \
+ wait3 \
+
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2079: checking for $ac_func" >&5
+echo "configure:2864: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2084 "configure"
+#line 2869 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2103,7 +2888,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2127,6 +2912,66 @@ else
fi
done
+# we only need one of the following
+for ac_func in \
+ nanosleep \
+ usleep \
+ select \
+
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2924: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2929 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ break
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
cat >> confdefs.h <<\EOF
#define HAVE_STRCHR 1
@@ -2147,17 +2992,17 @@ EOF
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2151: checking for vfork.h" >&5
+echo "configure:2996: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2156 "configure"
+#line 3001 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2182,18 +3027,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2186: checking for working vfork" >&5
+echo "configure:3031: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2192: checking for vfork" >&5
+echo "configure:3037: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2197 "configure"
+#line 3042 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -2216,7 +3061,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:2220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -2238,7 +3083,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 2242 "configure"
+#line 3087 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -2333,7 +3178,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -2356,7 +3201,7 @@ EOF
fi
echo $ac_n "checking whether closedir returns void""... $ac_c" 1>&6
-echo "configure:2360: checking whether closedir returns void" >&5
+echo "configure:3205: checking whether closedir returns void" >&5
if eval "test \"`echo '$''{'ac_cv_func_closedir_void'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2364,13 +3209,13 @@ else
ac_cv_func_closedir_void=yes
else
cat > conftest.$ac_ext <<EOF
-#line 2368 "configure"
+#line 3213 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }
EOF
-if { (eval echo configure:2374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_closedir_void=no
else
@@ -2395,14 +3240,14 @@ fi
echo $ac_n "checking for library containing getspnam""... $ac_c" 1>&6
-echo "configure:2399: checking for library containing getspnam" >&5
+echo "configure:3244: checking for library containing getspnam" >&5
if eval "test \"`echo '$''{'ac_cv_search_getspnam'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_getspnam="no"
cat > conftest.$ac_ext <<EOF
-#line 2406 "configure"
+#line 3251 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2413,7 +3258,7 @@ int main() {
getspnam()
; return 0; }
EOF
-if { (eval echo configure:2417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_getspnam="none required"
else
@@ -2424,7 +3269,7 @@ rm -f conftest*
test "$ac_cv_search_getspnam" = "no" && for i in sec gen; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2428 "configure"
+#line 3273 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2435,7 +3280,7 @@ int main() {
getspnam()
; return 0; }
EOF
-if { (eval echo configure:2439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_getspnam="-l$i"
break
@@ -2460,7 +3305,7 @@ else :
fi
echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
-echo "configure:2464: checking whether utime accepts a null argument" >&5
+echo "configure:3309: checking whether utime accepts a null argument" >&5
if eval "test \"`echo '$''{'ac_cv_func_utime_null'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2470,7 +3315,7 @@ if test "$cross_compiling" = yes; then
ac_cv_func_utime_null=no
else
cat > conftest.$ac_ext <<EOF
-#line 2474 "configure"
+#line 3319 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -2481,7 +3326,7 @@ exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
&& t.st_mtime - s.st_mtime < 120));
}
EOF
-if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_utime_null=yes
else
@@ -2505,7 +3350,7 @@ EOF
fi
echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:2509: checking for long file names" >&5
+echo "configure:3354: checking for long file names" >&5
if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2550,7 +3395,7 @@ fi
echo $ac_n "checking for working fnmatch""... $ac_c" 1>&6
-echo "configure:2554: checking for working fnmatch" >&5
+echo "configure:3399: checking for working fnmatch" >&5
if eval "test \"`echo '$''{'ac_cv_func_fnmatch_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2561,11 +3406,11 @@ if test "$cross_compiling" = yes; then
ac_cv_func_fnmatch_works=no
else
cat > conftest.$ac_ext <<EOF
-#line 2565 "configure"
+#line 3410 "configure"
#include "confdefs.h"
main() { exit (fnmatch ("a*", "abc", 0) != 0); }
EOF
-if { (eval echo configure:2569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_fnmatch_works=yes
else
@@ -2593,7 +3438,7 @@ fi
# Try to find connect and gethostbyname.
echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:2597: checking for main in -lnsl" >&5
+echo "configure:3442: checking for main in -lnsl" >&5
ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2601,14 +3446,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2605 "configure"
+#line 3450 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2625,14 +3470,14 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for library containing connect""... $ac_c" 1>&6
-echo "configure:2629: checking for library containing connect" >&5
+echo "configure:3474: checking for library containing connect" >&5
if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_connect="no"
cat > conftest.$ac_ext <<EOF
-#line 2636 "configure"
+#line 3481 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2643,7 +3488,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:2647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_connect="none required"
else
@@ -2654,7 +3499,7 @@ rm -f conftest*
test "$ac_cv_search_connect" = "no" && for i in xnet socket inet; do
LIBS="-l$i -lnsl $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2658 "configure"
+#line 3503 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2665,7 +3510,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_connect="-l$i"
break
@@ -2692,14 +3537,14 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for library containing connect""... $ac_c" 1>&6
-echo "configure:2696: checking for library containing connect" >&5
+echo "configure:3541: checking for library containing connect" >&5
if eval "test \"`echo '$''{'ac_cv_search_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_connect="no"
cat > conftest.$ac_ext <<EOF
-#line 2703 "configure"
+#line 3548 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2710,7 +3555,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:2714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_connect="none required"
else
@@ -2721,7 +3566,7 @@ rm -f conftest*
test "$ac_cv_search_connect" = "no" && for i in xnet socket inet; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2725 "configure"
+#line 3570 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2732,7 +3577,7 @@ int main() {
connect()
; return 0; }
EOF
-if { (eval echo configure:2736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_connect="-l$i"
break
@@ -2759,14 +3604,14 @@ fi
echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
-echo "configure:2763: checking for library containing gethostbyname" >&5
+echo "configure:3608: checking for library containing gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_gethostbyname="no"
cat > conftest.$ac_ext <<EOF
-#line 2770 "configure"
+#line 3615 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2777,7 +3622,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:2781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gethostbyname="none required"
else
@@ -2788,7 +3633,7 @@ rm -f conftest*
test "$ac_cv_search_gethostbyname" = "no" && for i in netinet nsl; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2792 "configure"
+#line 3637 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2799,7 +3644,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:2803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gethostbyname="-l$i"
break
@@ -2832,19 +3677,19 @@ echo "default place for krb4 is $KRB4"
krb_h=
echo $ac_n "checking for krb.h""... $ac_c" 1>&6
-echo "configure:2836: checking for krb.h" >&5
+echo "configure:3681: checking for krb.h" >&5
if test "$cross_compiling" != yes && test -r $KRB4/include/krb.h; then
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -I$KRB4/include"
cat > conftest.$ac_ext <<EOF
-#line 2841 "configure"
+#line 3686 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
krb_h=yes krb_incdir=$KRB4/include
else
@@ -2853,14 +3698,14 @@ else
rm -rf conftest*
CFLAGS=$hold_cflags
cat > conftest.$ac_ext <<EOF
-#line 2857 "configure"
+#line 3702 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
krb_h=yes krb_incdir=
else
@@ -2873,14 +3718,14 @@ rm -f conftest*
CFLAGS=$hold_cflags
else
cat > conftest.$ac_ext <<EOF
-#line 2877 "configure"
+#line 3722 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
krb_h=yes krb_incdir=
else
@@ -2891,14 +3736,14 @@ rm -f conftest*
fi
if test -z "$krb_h"; then
cat > conftest.$ac_ext <<EOF
-#line 2895 "configure"
+#line 3740 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
krb_h=yes krb_incdir=
else
@@ -2909,14 +3754,14 @@ else
hold_cflags=$CFLAGS
CFLAGS="$CFLAGS -I$KRB4/include/kerberosIV"
cat > conftest.$ac_ext <<EOF
-#line 2913 "configure"
+#line 3758 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
krb_h=yes krb_incdir=$KRB4/include/kerberosIV
else
@@ -2939,7 +3784,7 @@ if test -n "$krb_h"; then
hold_ldflags=$LDFLAGS
LDFLAGS="-L${KRB4}/lib $LDFLAGS"
echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6
-echo "configure:2943: checking for printf in -lkrb" >&5
+echo "configure:3788: checking for printf in -lkrb" >&5
ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2947,7 +3792,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lkrb $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2951 "configure"
+#line 3796 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2958,7 +3803,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:2962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2980,7 +3825,7 @@ LDFLAGS=$hold_ldflags
# Using open here instead of printf so we don't
# get confused by the cached value for printf from above.
echo $ac_n "checking for open in -lkrb""... $ac_c" 1>&6
-echo "configure:2984: checking for open in -lkrb" >&5
+echo "configure:3829: checking for open in -lkrb" >&5
ac_lib_var=`echo krb'_'open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2988,7 +3833,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lkrb $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2992 "configure"
+#line 3837 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2999,7 +3844,7 @@ int main() {
open()
; return 0; }
EOF
-if { (eval echo configure:3003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3024,7 +3869,7 @@ fi
LDFLAGS=$hold_ldflags
else
echo $ac_n "checking for printf in -lkrb""... $ac_c" 1>&6
-echo "configure:3028: checking for printf in -lkrb" >&5
+echo "configure:3873: checking for printf in -lkrb" >&5
ac_lib_var=`echo krb'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3032,7 +3877,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lkrb $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3036 "configure"
+#line 3881 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3043,7 +3888,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:3047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3077,7 +3922,7 @@ EOF
hold_ldflags=$LDFLAGS
test -n "${krb_libdir}" && LDFLAGS="$LDFLAGS -L${krb_libdir}"
echo $ac_n "checking for printf in -ldes""... $ac_c" 1>&6
-echo "configure:3081: checking for printf in -ldes" >&5
+echo "configure:3926: checking for printf in -ldes" >&5
ac_lib_var=`echo des'_'printf | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3085,7 +3930,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldes $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3089 "configure"
+#line 3934 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3096,7 +3941,7 @@ int main() {
printf()
; return 0; }
EOF
-if { (eval echo configure:3100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3125,12 +3970,12 @@ fi
for ac_func in krb_get_err_text
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3129: checking for $ac_func" >&5
+echo "configure:3974: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3134 "configure"
+#line 3979 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3153,7 +3998,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3178,33 +4023,80 @@ fi
done
-GSSAPI=/usr/cygnus/kerbnet
+#
+# Use --with-gssapi[=DIR] to enable GSSAPI support.
+#
+# defaults to enabled with DIR in default list below
+#
+# Search for /SUNHEA/ and read the comments about this default below.
+#
# Check whether --with-gssapi or --without-gssapi was given.
if test "${with_gssapi+set}" = set; then
withval="$with_gssapi"
- GSSAPI=$withval
+ acx_gssapi_withgssapi=$withval
+else
+ acx_gssapi_withgssapi=yes
fi
-echo "default place for GSSAPI is $GSSAPI"
-
-hold_cppflags=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS -I$GSSAPI/include "
-for ac_hdr in krb5.h gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h
+#
+# Try to locate a GSSAPI installation if no location was specified, assuming
+# GSSAPI was enabled (the default).
+#
+if test -n "$acx_gssapi_cv_gssapi"; then
+ # Granted, this is a slightly ugly way to print this info, but the
+ # AC_CHECK_HEADER used in the search for a GSSAPI installation makes using
+ # AC_CACHE_CHECK worse
+ echo $ac_n "checking for GSSAPI""... $ac_c" 1>&6
+echo "configure:4052: checking for GSSAPI" >&5
+else :; fi
+if eval "test \"`echo '$''{'acx_gssapi_cv_gssapi'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+if test x$acx_gssapi_withgssapi = xyes; then
+ # --with but no location specified
+ # assume a gssapi.h or gssapi/gssapi.h locates our install.
+ #
+ # This isn't always strictly true. For instance Solaris 7's SUNHEA (header)
+ # package installs gssapi.h whether or not the necessary libraries are
+ # installed. I'm still not sure whether to consider this a bug. The long
+ # way around is to not consider GSSPAI installed unless gss_import_name is
+ # found, but that brings up a lot of other hassles, like continuing to let
+ # gcc & ld generate the error messages when the user uses --with-gssapi=dir
+ # as a debugging aid. The short way around is to disable GSSAPI by default,
+ # but I think Sun users have been faced with this for awhile and I haven't
+ # heard many complaints.
+ acx_gssapi_save_CPPFLAGS=$CPPFLAGS
+ for acx_gssapi_cv_gssapi in yes /usr/kerberos /usr/cygnus/kerbnet no; do
+ if test x$acx_gssapi_cv_gssapi = xno; then
+ break
+ fi
+ if test x$acx_gssapi_cv_gssapi = xyes; then
+ echo "checking for GSSAPI" 1>&6
+echo "configure:4078: checking for GSSAPI" >&5
+ else
+ CPPFLAGS="$acx_gssapi_save_CPPFLAGS -I$acx_gssapi_cv_gssapi/include"
+ echo "checking for GSSAPI in $acx_gssapi_cv_gssapi" 1>&6
+echo "configure:4082: checking for GSSAPI in $acx_gssapi_cv_gssapi" >&5
+ fi
+ unset ac_cv_header_gssapi_h
+ unset ac_cv_header_gssapi_gssapi_h
+ for ac_hdr in gssapi.h gssapi/gssapi.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3198: checking for $ac_hdr" >&5
+echo "configure:4090: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3203 "configure"
+#line 4095 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3230,70 +4122,632 @@ else
fi
done
-CPPFLAGS=$hold_cppflags
+ if test "$ac_cv_header_gssapi_h" = "yes" ||
+ test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
+ break
+ fi
+ done
+ CPPFLAGS=$acx_gssapi_save_CPPFLAGS
+else
+ acx_gssapi_cv_gssapi=$acx_gssapi_withgssapi
+fi
+echo $ac_n "checking for GSSAPI""... $ac_c" 1>&6
+echo "configure:4136: checking for GSSAPI" >&5
-if test "$ac_cv_header_krb5_h" = "yes" &&
- (test "$ac_cv_header_gssapi_h" = "yes" ||
- test "$ac_cv_header_gssapi_gssapi_h" = "yes"); then
+fi
+echo "$ac_t""$acx_gssapi_cv_gssapi" 1>&6
+
+#
+# Set up GSSAPI includes for later use. We don't bother to check for
+# $acx_gssapi_cv_gssapi=no here since that will be caught later.
+#
+if test x$acx_gssapi_cv_gssapi = yes; then
+ # no special includes necessary
+ GSSAPI_INCLUDES=""
+else
+ # GSSAPI at $acx_gssapi_cv_gssapi (could be 'no')
+ GSSAPI_INCLUDES=" -I$acx_gssapi_cv_gssapi/include"
+fi
+
+#
+# Get the rest of the information CVS needs to compile with GSSAPI support
+#
+if test x$acx_gssapi_cv_gssapi != xno; then
+ # define HAVE_GSSAPI and set up the includes
cat >> confdefs.h <<\EOF
-#define HAVE_GSSAPI 1
+#define HAVE_GSSAPI
EOF
- includeopt="${includeopt} -I$GSSAPI/include"
- # FIXME: This is ugly, but these things don't seem to be standardized.
- if test "$ac_cv_header_gssapi_h" = "yes"; then
- LIBS="$LIBS -L$GSSAPI/lib -lgssapi -lkrb5 -lasn1 -ldes -lroken"
- else
- LIBS="$LIBS -L$GSSAPI/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err"
- fi
- save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="-I$GSSAPI/include $CPPFLAGS"
- if test "$ac_cv_header_gssapi_h" = "yes"; then
- cat > conftest.$ac_ext <<EOF
-#line 3254 "configure"
+ includeopt=$includeopt$GSSAPI_INCLUDES
+
+ # locate any other headers
+ acx_gssapi_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS=$CPPFLAGS$GSSAPI_INCLUDES
+ for ac_hdr in gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h krb5.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4171: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4176 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ # And look through them for GSS_C_NT_HOSTBASED_SERVICE or its alternatives
+ echo $ac_n "checking for GSS_C_NT_HOSTBASED_SERVICE""... $ac_c" 1>&6
+echo "configure:4209: checking for GSS_C_NT_HOSTBASED_SERVICE" >&5
+if eval "test \"`echo '$''{'acx_gssapi_cv_gss_c_nt_hostbased_service'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ acx_gssapi_cv_gss_c_nt_hostbased_service=no
+ if test "$ac_cv_header_gssapi_h" = "yes"; then
+ cat > conftest.$ac_ext <<EOF
+#line 4216 "configure"
#include "confdefs.h"
#include <gssapi.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
rm -rf conftest*
- cat >> confdefs.h <<\EOF
-#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
+ acx_gssapi_cv_gss_c_nt_hostbased_service=yes
+else
+ rm -rf conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 4227 "configure"
+#include "confdefs.h"
+#include <gssapi.h>
EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "gss_nt_service_name" >/dev/null 2>&1; then
+ rm -rf conftest*
+ acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name
+fi
+rm -f conftest*
fi
rm -f conftest*
- else
- cat > conftest.$ac_ext <<EOF
-#line 3270 "configure"
+ fi
+ if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
+ test "$ac_cv_header_gssapi_gssapi_h" = "yes"; then
+ cat > conftest.$ac_ext <<EOF
+#line 4245 "configure"
#include "confdefs.h"
#include <gssapi/gssapi.h>
EOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
egrep "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
rm -rf conftest*
- cat >> confdefs.h <<\EOF
-#define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
+ acx_gssapi_cv_gss_c_nt_hostbased_service
+else
+ rm -rf conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 4256 "configure"
+#include "confdefs.h"
+#include <gssapi/gssapi.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "gss_nt_service_name" >/dev/null 2>&1; then
+ rm -rf conftest*
+ acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+ fi
+ if test $acx_gssapi_cv_gss_c_nt_hostbased_service = no &&
+ test "$ac_cv_header_gssapi_gssapi_generic_h" = "yes"; then
+ cat > conftest.$ac_ext <<EOF
+#line 4274 "configure"
+#include "confdefs.h"
+#include <gssapi/gssapi_generic.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then
+ rm -rf conftest*
+ acx_gssapi_cv_gss_c_nt_hostbased_service
+else
+ rm -rf conftest*
+ cat > conftest.$ac_ext <<EOF
+#line 4285 "configure"
+#include "confdefs.h"
+#include <gssapi/gssapi_generic.h>
EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "gss_nt_service_name" >/dev/null 2>&1; then
+ rm -rf conftest*
+ acx_gssapi_cv_gss_c_nt_hostbased_service=gss_nt_service_name
+fi
+rm -f conftest*
fi
rm -f conftest*
+ fi
+fi
+
+echo "$ac_t""$acx_gssapi_cv_gss_c_nt_hostbased_service" 1>&6
+ if test $acx_gssapi_cv_gss_c_nt_hostbased_service != yes &&
+ test $acx_gssapi_cv_gss_c_nt_hostbased_service != no; then
+ # don't define for yes since that means it already means something and
+ # don't define for no since we'd rather the compiler catch the error
+ cat >> confdefs.h <<EOF
+#define GSS_C_NT_HOSTBASED_SERVICE $acx_gssapi_cv_gss_c_nt_hostbased_service
+EOF
+
fi
- CPPFLAGS=$save_CPPFLAGS
+ CPPFLAGS=$acx_gssapi_save_CPPFLAGS
+
+ # Expect the libs to be installed parallel to the headers
+ #
+ # We could try once with and once without, but I'm not sure it's worth the
+ # trouble.
+ if test x$acx_gssapi_cv_gssapi != xyes; then
+ if test -z "$LIBS"; then
+ LIBS="-L$acx_gssapi_cv_gssapi/lib"
+ else
+ LIBS="-L$acx_gssapi_cv_gssapi/lib $LIBS"
+ fi
+ else :; fi
+
+ #
+ # Some of the order below is particular due to library dependencies
+ #
+
+ #
+ # des Heimdal K 0.3d, but Heimdal seems to be set up such
+ # that it could have been installed from elsewhere.
+ #
+
+echo $ac_n "checking for library containing des_set_odd_parity""... $ac_c" 1>&6
+echo "configure:4336: checking for library containing des_set_odd_parity" >&5
+if eval "test \"`echo '$''{'ac_cv_search_des_set_odd_parity'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_des_set_odd_parity="no"
+cat > conftest.$ac_ext <<EOF
+#line 4343 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char des_set_odd_parity();
+
+int main() {
+des_set_odd_parity()
+; return 0; }
+EOF
+if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_des_set_odd_parity="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_des_set_odd_parity" = "no" && for i in des; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4365 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char des_set_odd_parity();
+
+int main() {
+des_set_odd_parity()
+; return 0; }
+EOF
+if { (eval echo configure:4376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_des_set_odd_parity="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_des_set_odd_parity" 1>&6
+if test "$ac_cv_search_des_set_odd_parity" != "no"; then
+ test "$ac_cv_search_des_set_odd_parity" = "none required" || LIBS="$ac_cv_search_des_set_odd_parity $LIBS"
+
+else :
+
+fi
+
+ #
+ # com_err Heimdal K 0.3d
+ #
+ # com_err MIT K5 v1.2.2-beta1
+ #
+
+echo $ac_n "checking for library containing com_err""... $ac_c" 1>&6
+echo "configure:4404: checking for library containing com_err" >&5
+if eval "test \"`echo '$''{'ac_cv_search_com_err'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_com_err="no"
+cat > conftest.$ac_ext <<EOF
+#line 4411 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char com_err();
+
+int main() {
+com_err()
+; return 0; }
+EOF
+if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_com_err="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_com_err" = "no" && for i in com_err; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4433 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char com_err();
+
+int main() {
+com_err()
+; return 0; }
+EOF
+if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_com_err="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_com_err" 1>&6
+if test "$ac_cv_search_com_err" != "no"; then
+ test "$ac_cv_search_com_err" = "none required" || LIBS="$ac_cv_search_com_err $LIBS"
+
+else :
+
+fi
+
+ #
+ # asn1 Heimdal K 0.3d -lcom_err
+ #
+
+echo $ac_n "checking for library containing initialize_asn1_error_table_r""... $ac_c" 1>&6
+echo "configure:4470: checking for library containing initialize_asn1_error_table_r" >&5
+if eval "test \"`echo '$''{'ac_cv_search_initialize_asn1_error_table_r'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_initialize_asn1_error_table_r="no"
+cat > conftest.$ac_ext <<EOF
+#line 4477 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initialize_asn1_error_table_r();
+
+int main() {
+initialize_asn1_error_table_r()
+; return 0; }
+EOF
+if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_initialize_asn1_error_table_r="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_initialize_asn1_error_table_r" = "no" && for i in asn1; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4499 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char initialize_asn1_error_table_r();
+
+int main() {
+initialize_asn1_error_table_r()
+; return 0; }
+EOF
+if { (eval echo configure:4510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_initialize_asn1_error_table_r="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_initialize_asn1_error_table_r" 1>&6
+if test "$ac_cv_search_initialize_asn1_error_table_r" != "no"; then
+ test "$ac_cv_search_initialize_asn1_error_table_r" = "none required" || LIBS="$ac_cv_search_initialize_asn1_error_table_r $LIBS"
+
+else :
+
+fi
+
+ #
+ # resolv required, but not installed by Heimdal K 0.3d
+ #
+ # resolv MIT K5 1.2.2-beta1
+ # Linux 2.2.17
+ #
+
+echo $ac_n "checking for library containing __dn_expand""... $ac_c" 1>&6
+echo "configure:4539: checking for library containing __dn_expand" >&5
+if eval "test \"`echo '$''{'ac_cv_search___dn_expand'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search___dn_expand="no"
+cat > conftest.$ac_ext <<EOF
+#line 4546 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char __dn_expand();
+
+int main() {
+__dn_expand()
+; return 0; }
+EOF
+if { (eval echo configure:4557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search___dn_expand="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search___dn_expand" = "no" && for i in resolv; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4568 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char __dn_expand();
+
+int main() {
+__dn_expand()
+; return 0; }
+EOF
+if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search___dn_expand="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search___dn_expand" 1>&6
+if test "$ac_cv_search___dn_expand" != "no"; then
+ test "$ac_cv_search___dn_expand" = "none required" || LIBS="$ac_cv_search___dn_expand $LIBS"
+
+else :
+
+fi
+
+ #
+ # roken Heimdal K 0.3d -lresolv
+ #
+
+echo $ac_n "checking for library containing roken_gethostbyaddr""... $ac_c" 1>&6
+echo "configure:4605: checking for library containing roken_gethostbyaddr" >&5
+if eval "test \"`echo '$''{'ac_cv_search_roken_gethostbyaddr'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_roken_gethostbyaddr="no"
+cat > conftest.$ac_ext <<EOF
+#line 4612 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char roken_gethostbyaddr();
+
+int main() {
+roken_gethostbyaddr()
+; return 0; }
+EOF
+if { (eval echo configure:4623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_roken_gethostbyaddr="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_roken_gethostbyaddr" = "no" && for i in roken; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4634 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char roken_gethostbyaddr();
+
+int main() {
+roken_gethostbyaddr()
+; return 0; }
+EOF
+if { (eval echo configure:4645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_roken_gethostbyaddr="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_roken_gethostbyaddr" 1>&6
+if test "$ac_cv_search_roken_gethostbyaddr" != "no"; then
+ test "$ac_cv_search_roken_gethostbyaddr" = "none required" || LIBS="$ac_cv_search_roken_gethostbyaddr $LIBS"
+
+else :
+
+fi
+
+ #
+ # k5crypto MIT K5 v1.2.2-beta1
+ #
+
+echo $ac_n "checking for library containing valid_enctype""... $ac_c" 1>&6
+echo "configure:4671: checking for library containing valid_enctype" >&5
+if eval "test \"`echo '$''{'ac_cv_search_valid_enctype'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_valid_enctype="no"
+cat > conftest.$ac_ext <<EOF
+#line 4678 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char valid_enctype();
+
+int main() {
+valid_enctype()
+; return 0; }
+EOF
+if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_valid_enctype="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_valid_enctype" = "no" && for i in k5crypto; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4700 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char valid_enctype();
+
+int main() {
+valid_enctype()
+; return 0; }
+EOF
+if { (eval echo configure:4711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_valid_enctype="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+
+echo "$ac_t""$ac_cv_search_valid_enctype" 1>&6
+if test "$ac_cv_search_valid_enctype" != "no"; then
+ test "$ac_cv_search_valid_enctype" = "none required" || LIBS="$ac_cv_search_valid_enctype $LIBS"
+
+else :
+
+fi
+
+ #
+ # gen ? ? ? Needed on Irix 5.3 with some
+ # Irix 5.3 version of Kerberos. I'm not
+ # sure which since Irix didn't
+ # get any testing this time
+ # around. Original comment:
+ #
# This is necessary on Irix 5.3, in order to link against libkrb5 --
# there, an_to_ln.o refers to things defined only in -lgen.
- echo $ac_n "checking for compile in -lgen""... $ac_c" 1>&6
-echo "configure:3289: checking for compile in -lgen" >&5
-ac_lib_var=`echo gen'_'compile | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ #
+
+echo $ac_n "checking for library containing compile""... $ac_c" 1>&6
+echo "configure:4744: checking for library containing compile" >&5
+if eval "test \"`echo '$''{'ac_cv_search_compile'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- ac_save_LIBS="$LIBS"
-LIBS="-lgen $LIBS"
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_compile="no"
cat > conftest.$ac_ext <<EOF
-#line 3297 "configure"
+#line 4751 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3304,34 +4758,200 @@ int main() {
compile()
; return 0; }
EOF
-if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
+ ac_cv_search_compile="none required"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_compile" = "no" && for i in gen; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4773 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char compile();
+
+int main() {
+compile()
+; return 0; }
+EOF
+if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ ac_cv_search_compile="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
fi
rm -f conftest*
-LIBS="$ac_save_LIBS"
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+echo "$ac_t""$ac_cv_search_compile" 1>&6
+if test "$ac_cv_search_compile" != "no"; then
+ test "$ac_cv_search_compile" = "none required" || LIBS="$ac_cv_search_compile $LIBS"
+
+else :
+
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
+
+ #
+ # krb5 ? ? ? -lgen -l???
+ # Irix 5.3
+ #
+ # krb5 MIT K5 v1.1.1
+ #
+ # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err
+ # Linux 2.2.17
+ #
+ # krb5 MIT K5 v1.2.2-beta1 -lcrypto -lcom_err -lresolv
+ #
+ # krb5 Heimdal K 0.3d -lasn1 -lroken -ldes
+ #
+
+echo $ac_n "checking for library containing krb5_free_context""... $ac_c" 1>&6
+echo "configure:4820: checking for library containing krb5_free_context" >&5
+if eval "test \"`echo '$''{'ac_cv_search_krb5_free_context'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_krb5_free_context="no"
+cat > conftest.$ac_ext <<EOF
+#line 4827 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char krb5_free_context();
+
+int main() {
+krb5_free_context()
+; return 0; }
EOF
+if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_krb5_free_context="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_krb5_free_context" = "no" && for i in krb5; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4849 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char krb5_free_context();
- LIBS="-lgen $LIBS"
+int main() {
+krb5_free_context()
+; return 0; }
+EOF
+if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_krb5_free_context="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
+fi
+echo "$ac_t""$ac_cv_search_krb5_free_context" 1>&6
+if test "$ac_cv_search_krb5_free_context" != "no"; then
+ test "$ac_cv_search_krb5_free_context" = "none required" || LIBS="$ac_cv_search_krb5_free_context $LIBS"
+
+else :
+
+fi
+
+ #
+ # gssapi_krb5 Only lib needed with MIT K5 v1.2.1, so find it first in
+ # order to prefer MIT Kerberos. If both MIT & Heimdal
+ # Kerberos are installed and in the path, this will leave
+ # some of the libraries above in LIBS unnecessarily, but
+ # noone would ever do that, right?
+ #
+ # gssapi_krb5 MIT K5 v1.2.2-beta1 -lkrb5
+ #
+ # gssapi Heimdal K 0.3d -lkrb5
+ #
+
+echo $ac_n "checking for library containing gss_import_name""... $ac_c" 1>&6
+echo "configure:4894: checking for library containing gss_import_name" >&5
+if eval "test \"`echo '$''{'ac_cv_search_gss_import_name'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
- echo "$ac_t""no" 1>&6
+ ac_func_search_save_LIBS="$LIBS"
+ac_cv_search_gss_import_name="no"
+cat > conftest.$ac_ext <<EOF
+#line 4901 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_import_name();
+
+int main() {
+gss_import_name()
+; return 0; }
+EOF
+if { (eval echo configure:4912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_gss_import_name="none required"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+test "$ac_cv_search_gss_import_name" = "no" && for i in gssapi_krb5 gssapi; do
+LIBS="-l$i $ac_func_search_save_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4923 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gss_import_name();
+
+int main() {
+gss_import_name()
+; return 0; }
+EOF
+if { (eval echo configure:4934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_cv_search_gss_import_name="-l$i"
+break
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+LIBS="$ac_func_search_save_LIBS"
fi
+echo "$ac_t""$ac_cv_search_gss_import_name" 1>&6
+if test "$ac_cv_search_gss_import_name" != "no"; then
+ test "$ac_cv_search_gss_import_name" = "none required" || LIBS="$ac_cv_search_gss_import_name $LIBS"
+
+else :
+
fi
+fi
+
# Check whether --enable-encryption or --disable-encryption was given.
if test "${enable_encryption+set}" = set; then
@@ -3353,12 +4973,12 @@ EOF
fi
echo $ac_n "checking for gethostname""... $ac_c" 1>&6
-echo "configure:3357: checking for gethostname" >&5
+echo "configure:4977: checking for gethostname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3362 "configure"
+#line 4982 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostname(); below. */
@@ -3381,7 +5001,7 @@ gethostname();
; return 0; }
EOF
-if { (eval echo configure:3385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostname=yes"
else
@@ -3446,14 +5066,14 @@ fi
if test "$enable_server" = yes; then
echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
-echo "configure:3450: checking for library containing crypt" >&5
+echo "configure:5070: checking for library containing crypt" >&5
if eval "test \"`echo '$''{'ac_cv_search_crypt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_crypt="no"
cat > conftest.$ac_ext <<EOF
-#line 3457 "configure"
+#line 5077 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3464,7 +5084,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_crypt="none required"
else
@@ -3475,7 +5095,7 @@ rm -f conftest*
test "$ac_cv_search_crypt" = "no" && for i in crypt; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3479 "configure"
+#line 5099 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3486,7 +5106,7 @@ int main() {
crypt()
; return 0; }
EOF
-if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_crypt="-l$i"
break
@@ -3516,19 +5136,19 @@ fi # enable_server
echo $ac_n "checking for cygwin32""... $ac_c" 1>&6
-echo "configure:3520: checking for cygwin32" >&5
+echo "configure:5140: checking for cygwin32" >&5
if eval "test \"`echo '$''{'ccvs_cv_sys_cygwin32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3525 "configure"
+#line 5145 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN32__;
; return 0; }
EOF
-if { (eval echo configure:3532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ccvs_cv_sys_cygwin32=yes
else
@@ -3668,12 +5288,30 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
- man/Makefile tools/Makefile \
+trap 'rm -fr `echo "Makefile \
contrib/Makefile \
- windows-NT/Makefile windows-NT/SCC/Makefile \
- os2/Makefile emx/Makefile vms/Makefile \
- stamp-h config.h src/options.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+ contrib/clmerge \
+ contrib/cln_hist \
+ contrib/commit_prep \
+ contrib/cvs_acls \
+ contrib/log \
+ contrib/log_accum \
+ contrib/mfpipe \
+ contrib/rcslock \
+ contrib/sccs2rcs \
+ diff/Makefile \
+ doc/Makefile \
+ emx/Makefile \
+ lib/Makefile \
+ man/Makefile \
+ os2/Makefile \
+ src/Makefile \
+ src/cvsbug \
+ tools/Makefile \
+ vms/Makefile \
+ windows-NT/Makefile \
+ windows-NT/SCC/Makefile \
+ zlib/Makefile config.h src/options.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -3705,22 +5343,49 @@ s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
-s%@CVS@%$CVS%g
-s%@AWK@%$AWK%g
-s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@PACKAGE@%$PACKAGE%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@AMTAR@%$AMTAR%g
+s%@install_sh@%$install_sh%g
+s%@STRIP@%$STRIP%g
+s%@INSTALL_STRIP_PROGRAM@%$INSTALL_STRIP_PROGRAM%g
+s%@INSTALL_STRIP_PROGRAM_ENV@%$INSTALL_STRIP_PROGRAM_ENV%g
+s%@AWK@%$AWK%g
s%@SET_MAKE@%$SET_MAKE%g
+s%@ETAGS@%$ETAGS%g
+s%@ETAGS_INCLUDE_OPTION@%$ETAGS_INCLUDE_OPTION%g
+s%@AMDEP_TRUE@%$AMDEP_TRUE%g
+s%@AMDEP_FALSE@%$AMDEP_FALSE%g
+s%@AMDEPBACKSLASH@%$AMDEPBACKSLASH%g
+s%@DEPDIR@%$DEPDIR%g
+s%@CVS@%$CVS%g
+s%@CC@%$CC%g
+s%@CPP@%$CPP%g
+s%@_am_include@%$_am_include%g
+s%@_am_quote@%$_am_quote%g
+s%@CCDEPMODE@%$CCDEPMODE%g
s%@RANLIB@%$RANLIB%g
s%@YACC@%$YACC%g
-s%@perl_path@%$perl_path%g
-s%@csh_path@%$csh_path%g
-s%@CPP@%$CPP%g
+s%@LN_S@%$LN_S%g
+s%@PERL@%$PERL%g
+s%@CSH@%$CSH%g
+s%@PR@%$PR%g
+s%@ROFF@%$ROFF%g
+s%@PS2PDF@%$PS2PDF%g
+s%@TEXI2DVI@%$TEXI2DVI%g
+s%@MAKE_TARGETS_IN_VPATH_TRUE@%$MAKE_TARGETS_IN_VPATH_TRUE%g
+s%@MAKE_TARGETS_IN_VPATH_FALSE@%$MAKE_TARGETS_IN_VPATH_FALSE%g
s%@LIBOBJS@%$LIBOBJS%g
s%@KRB4@%$KRB4%g
s%@includeopt@%$includeopt%g
-s%@GSSAPI@%$GSSAPI%g
CEOF
EOF
@@ -3762,12 +5427,30 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
- man/Makefile tools/Makefile \
+CONFIG_FILES=\${CONFIG_FILES-"Makefile \
contrib/Makefile \
- windows-NT/Makefile windows-NT/SCC/Makefile \
- os2/Makefile emx/Makefile vms/Makefile \
- stamp-h"}
+ contrib/clmerge \
+ contrib/cln_hist \
+ contrib/commit_prep \
+ contrib/cvs_acls \
+ contrib/log \
+ contrib/log_accum \
+ contrib/mfpipe \
+ contrib/rcslock \
+ contrib/sccs2rcs \
+ diff/Makefile \
+ doc/Makefile \
+ emx/Makefile \
+ lib/Makefile \
+ man/Makefile \
+ os2/Makefile \
+ src/Makefile \
+ src/cvsbug \
+ tools/Makefile \
+ vms/Makefile \
+ windows-NT/Makefile \
+ windows-NT/SCC/Makefile \
+ zlib/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
@@ -3935,10 +5618,81 @@ fi; done
EOF
cat >> $CONFIG_STATUS <<EOF
+am_indx=1
+for am_file in config.h src/options.h; do
+ case " \$CONFIG_HEADERS " in
+ *" \$am_file "*)
+ am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
+ if test -n "\$am_dir"; then
+ am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
+ for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
+ am_tmpdir=\$am_tmpdir\$am_subdir/
+ if test ! -d \$am_tmpdir; then
+ mkdir \$am_tmpdir
+ fi
+ done
+ fi
+ echo timestamp > "\$am_dir"stamp-h\$am_indx
+ ;;
+ esac
+ am_indx=\`expr \$am_indx + 1\`
+done
+AMDEP="$AMDEP"
+ac_aux_dir="$ac_aux_dir"
EOF
cat >> $CONFIG_STATUS <<\EOF
+
+test x"$AMDEP" != x"" ||
+for mf in $CONFIG_FILES; do
+ case "$mf" in
+ Makefile) dirpart=.;;
+ */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
+ *) continue;;
+ esac
+ grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+ # Extract the definition of DEP_FILES from the Makefile without
+ # running `make'.
+ DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n -e '/^U = / s///p' < "$mf"`
+ test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+ # We invoke sed twice because it is the simplest approach to
+ # changing $(DEPDIR) to its actual value in the expansion.
+ for file in `sed -n -e '
+ /^DEP_FILES = .*\\\\$/ {
+ s/^DEP_FILES = //
+ :loop
+ s/\\\\$//
+ p
+ n
+ /\\\\$/ b loop
+ p
+ }
+ /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
+ $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+
+chmod -f +x \
+ contrib/clmerge \
+ contrib/cln_hist \
+ contrib/commit_prep \
+ contrib/cvs_acls \
+ contrib/log \
+ contrib/log_accum \
+ contrib/mfpipe \
+ contrib/rcslock \
+ contrib/sccs2rcs \
+ src/cvsbug
exit 0
EOF
chmod +x $CONFIG_STATUS
diff --git a/contrib/cvs/configure.in b/contrib/cvs/configure.in
index cf35ccdd7617..2a6a39088a48 100644
--- a/contrib/cvs/configure.in
+++ b/contrib/cvs/configure.in
@@ -1,18 +1,35 @@
dnl configure.in for cvs
AC_INIT(src/cvs.h)
+AM_INIT_AUTOMAKE(cvs, 1.11.1p1)
AC_PREREQ(2.13)
AC_PREFIX_PROGRAM(cvs)
-AC_CONFIG_HEADER(config.h src/options.h)
+AM_CONFIG_HEADER(config.h src/options.h)
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
+# Automake's more advanced version of AC_PROG_RANLIB
AC_PROG_RANLIB
AC_PROG_YACC
+AC_PROG_LN_S
-AC_PATH_PROG(perl_path, perl, no)
-AC_PATH_PROG(csh_path, csh, no)
+AC_PATH_PROG(PERL, perl, no)
+AC_PATH_PROG(CSH, csh, no)
+AC_PATH_PROG(PR, pr, no)
+# For diff/util.c
+if test x"$PR" != xno; then
+ AC_DEFINE_UNQUOTED([PR_PROGRAM], ["$PR"], [Path to the pr utility])
+fi
+
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+dnl FIXME I pulled this default list from sanity.sh. Perhaps these lists
+dnl can be stored in one location?
+glocs="$PATH:/usr/local/bin:/usr/contrib/bin:/usr/gnu/bin:/local/bin:/local/gnu/bin:/gnu/bin"
+AC_PATH_PROGS(ROFF, groff roff, $missing_dir/missing roff, $glocs)
+AC_PATH_PROG(PS2PDF, ps2pdf, $missing_dir/missing ps2pdf)
+AC_PATH_PROG(TEXI2DVI, texi2dvi, $missing_dir/missing texi2dvi)
AC_SYS_INTERPRETER
if test X"$ac_cv_sys_interpreter" != X"yes" ; then
@@ -21,6 +38,34 @@ if test X"$ac_cv_sys_interpreter" != X"yes" ; then
AC_MSG_WARN($ac_msg)
fi
+# BSD's logo is a devil for a reason, hey?
+AC_CACHE_CHECK(for BSD VPATH bug in make, ccvs_cv_bsd_make_vpath_bug,
+[if test ! -d ac_test_dir ; then
+ AC_TRY_COMMAND([mkdir ac_test_dir])
+fi
+cat >conftestmake <<EOF
+VPATH = ac_test_dir
+ac_test_target: ac_test_dep
+ echo BSD VPATH bug present >&2
+ac_test_dep: ac_test_dep_dep
+EOF
+touch ac_test_dir/ac_test_dep_dep
+touch ac_test_dir/ac_test_dep
+touch ac_test_target
+# Don't know why, but the following test doesn't work under FreeBSD 4.2
+# without this sleep command
+sleep 1
+if AC_TRY_COMMAND([make -f conftestmake 2>&1 >/dev/null |grep ^BSD\ VPATH\ bug\ present\$ >/dev/null]) ; then
+ ccvs_cv_bsd_make_vpath_bug=yes
+else
+ ccvs_cv_bsd_make_vpath_bug=no
+fi
+AC_TRY_COMMAND([rm -rf ac_test_dir ac_test_target conftestmake])])
+# We also don't need to worry about the bug when $srcdir = $builddir
+AM_CONDITIONAL(MAKE_TARGETS_IN_VPATH, \
+ test $ccvs_cv_bsd_make_vpath_bug = no \
+ || test $srcdir = .)
+
AC_AIX
AC_MINIX
AC_ISC_POSIX
@@ -35,7 +80,7 @@ AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(errno.h unistd.h string.h memory.h utime.h fcntl.h ndbm.h \
limits.h sys/file.h \
sys/param.h sys/select.h sys/time.h sys/timeb.h \
- io.h direct.h sys/bsdtypes.h sys/resource.h)
+ io.h direct.h sys/bsdtypes.h sys/resource.h syslog.h)
AC_HEADER_STAT
AC_HEADER_TIME
@@ -49,7 +94,39 @@ AC_TYPE_SIGNAL
AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_RDEV
AC_REPLACE_FUNCS(mkdir rename strstr dup2 strerror valloc waitpid memmove strtoul)
-AC_CHECK_FUNCS(fchmod fsync ftime mktemp putenv vprintf ftruncate timezone getpagesize initgroups fchdir sigaction sigprocmask sigvec sigsetmask sigblock tempnam tzset readlink wait3 mknod getpassphrase)
+AC_CHECK_FUNCS(\
+ fchdir \
+ fchmod \
+ fsync \
+ ftime \
+ ftruncate \
+ getgroups \
+ getpagesize \
+ getpassphrase \
+ gettimeofday \
+ initgroups \
+ mknod \
+ mkstemp \
+ mktemp \
+ putenv \
+ readlink \
+ sigaction \
+ sigblock \
+ sigprocmask \
+ sigsetmask \
+ sigvec \
+ tempnam \
+ timezone \
+ tzset \
+ vprintf \
+ wait3 \
+)
+# we only need one of the following
+AC_CHECK_FUNCS([\
+ nanosleep \
+ usleep \
+ select \
+], [break])
dnl
dnl The CVS coding standard (as specified in HACKING) is that if it exists
@@ -182,47 +259,7 @@ if test -n "$krb_h"; then
fi
AC_CHECK_FUNCS(krb_get_err_text)
-dnl
-dnl Use --with-gssapi=DIR to enable GSSAPI support.
-dnl
-GSSAPI=/usr/cygnus/kerbnet
-define(WITH_GSSAPI,[
-AC_ARG_WITH([gssapi],
- [ --with-gssapi=value GSSAPI directory],
- [GSSAPI=$withval],
-)dnl
-echo "default place for GSSAPI is $GSSAPI"
-AC_SUBST(GSSAPI)])dnl
-WITH_GSSAPI
-
-hold_cppflags=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS -I$GSSAPI/include "
-AC_CHECK_HEADERS(krb5.h gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h)
-CPPFLAGS=$hold_cppflags
-
-if test "$ac_cv_header_krb5_h" = "yes" &&
- (test "$ac_cv_header_gssapi_h" = "yes" ||
- test "$ac_cv_header_gssapi_gssapi_h" = "yes"); then
- AC_DEFINE(HAVE_GSSAPI)
- includeopt="${includeopt} -I$GSSAPI/include"
- # FIXME: This is ugly, but these things don't seem to be standardized.
- if test "$ac_cv_header_gssapi_h" = "yes"; then
- LIBS="$LIBS -L$GSSAPI/lib -lgssapi -lkrb5 -lasn1 -ldes -lroken"
- else
- LIBS="$LIBS -L$GSSAPI/lib -lgssapi_krb5 -lkrb5 -lcrypto -lcom_err"
- fi
- save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="-I$GSSAPI/include $CPPFLAGS"
- if test "$ac_cv_header_gssapi_h" = "yes"; then
- AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE))
- else
- AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE))
- fi
- CPPFLAGS=$save_CPPFLAGS
- # This is necessary on Irix 5.3, in order to link against libkrb5 --
- # there, an_to_ln.o refers to things defined only in -lgen.
- AC_CHECK_LIB(gen, compile)
-fi
+ACX_WITH_GSSAPI
dnl
dnl Use --with-encryption to turn on encryption support
@@ -307,9 +344,38 @@ test -f src/options.h && (
cp ./src/options.h ./src/options.h-SAVED
)
-AC_OUTPUT(Makefile lib/Makefile src/Makefile zlib/Makefile diff/Makefile doc/Makefile \
- man/Makefile tools/Makefile \
+AC_OUTPUT([Makefile \
contrib/Makefile \
- windows-NT/Makefile windows-NT/SCC/Makefile \
- os2/Makefile emx/Makefile vms/Makefile \
- stamp-h)
+ contrib/clmerge \
+ contrib/cln_hist \
+ contrib/commit_prep \
+ contrib/cvs_acls \
+ contrib/log \
+ contrib/log_accum \
+ contrib/mfpipe \
+ contrib/rcslock \
+ contrib/sccs2rcs \
+ diff/Makefile \
+ doc/Makefile \
+ emx/Makefile \
+ lib/Makefile \
+ man/Makefile \
+ os2/Makefile \
+ src/Makefile \
+ src/cvsbug \
+ tools/Makefile \
+ vms/Makefile \
+ windows-NT/Makefile \
+ windows-NT/SCC/Makefile \
+ zlib/Makefile],
+ [chmod -f +x \
+ contrib/clmerge \
+ contrib/cln_hist \
+ contrib/commit_prep \
+ contrib/cvs_acls \
+ contrib/log \
+ contrib/log_accum \
+ contrib/mfpipe \
+ contrib/rcslock \
+ contrib/sccs2rcs \
+ src/cvsbug])
diff --git a/contrib/cvs/contrib/ChangeLog b/contrib/cvs/contrib/ChangeLog
index 6a2ee13d066a..d1ae3319f631 100644
--- a/contrib/cvs/contrib/ChangeLog
+++ b/contrib/cvs/contrib/ChangeLog
@@ -1,3 +1,60 @@
+2001-04-25 Derek Price <dprice@collab.net>
+
+ * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400.
+
+2001-04-16 Derek Price <dprice@collab.net>
+
+ * log.pl: Accept new '-V' option for non-verbose status messages.
+
+2001-03-14 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated
+
+2001-01-05 Derek Price <derek.price@openavenue.com>
+
+ * contrib/Makefile.am (EXTRA_DIST, SUFFIXES, .pl:, .csh:): Move some
+ script targets to configure.in - see ../ChangeLog for more
+
+ * contrib/clmerge.in: Rename from clmerge.pl
+ * contrib/cln_hist.in: Rename from cln_hist.pl
+ * contrib/commit_prep.in: Rename from commit_prep.pl
+ * contrib/cvs_acls.in: Rename from cvs_acls.pl
+ * contrib/log.in: Rename from log.pl
+ * contrib/log_accum.in: Rename from log_accum.pl
+ * contrib/mfpipe.in: Rename from mfpipe.pl
+ * contrib/rcslock.in: Rename from rcslock.pl
+ * contrib/sccs2rcs.in: Rename from scc2rcs.csh
+
+ * contrib/clmerge.pl: Rename to clmerge.in
+ * contrib/cln_hist.pl: Rename to cln_hist.in
+ * contrib/commit_prep.pl: Rename to commit_prep.in
+ * contrib/cvs_acls.pl: Rename to cvs_acls.in
+ * contrib/log.pl: Rename to log.in
+ * contrib/log_accum.pl: Rename to log_accum.in
+ * contrib/mfpipe.pl: Rename to mfpipe.in
+ * contrib/rcslock.pl: Rename to rcslock.in
+ * contrib/sccs2rcs.csh: Rename to sccs2rcs.in
+
+2000-12-22 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated
+
+2000-12-21 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am: New file needed by Automake
+ * Makefile.in: Regenerated
+
+2000-12-14 Derek Price <derek.price@openavenue.com>
+ Thomas Maeder <maeder@glue.ch>
+
+ * sccs2rcs.csh: unkludge a Y2k workaround
+
+2000-10-23 Derek Price <derek.price@openavenue.com>
+
+ * debug_check_log.sh: added this script for analyzing sanity.sh output
+ * Makefile.in: add above file to DISTFILES and CONTRIB_PROGS
+ * .cvsignore: add debug_check_log
+
2000-09-07 Larry Jones <larry.jones@sdrc.com>
* Makefile.in: Use @bindir@, @libdir@, @infodir@, and @mandir@
diff --git a/contrib/cvs/contrib/Makefile.am b/contrib/cvs/contrib/Makefile.am
new file mode 100644
index 000000000000..7bee1806b1ff
--- /dev/null
+++ b/contrib/cvs/contrib/Makefile.am
@@ -0,0 +1,108 @@
+## Process this file with automake to produce Makefile.in
+# Makefile for GNU CVS contributed sources.
+# Do not use this makefile directly, but only from `../Makefile'.
+# Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# DISTFILES = \
+# ChangeLog README .cvsignore intro.doc \
+# Makefile.in clmerge.pl cln_hist.pl commit_prep.pl cvs2vendor.sh \
+# cvs_acls.pl cvscheck.sh cvscheck.man cvshelp.man debug_check_log.sh \
+# descend.sh \
+# descend.man dirfns.shar log.pl log_accum.pl mfpipe.pl rcs-to-cvs.sh \
+# rcs2log.sh rcslock.pl sccs2rcs.csh rcs2sccs.sh
+
+# files installed in $(pkgdatadir)
+#
+# CONTRIB_FILES = README intro.doc cvscheck.man
+
+contribdir = $(pkgdatadir)/contrib
+
+contrib_SCRIPTS = \
+ clmerge \
+ cln_hist \
+ commit_prep \
+ cvs2vendor \
+ cvs_acls \
+ cvscheck \
+ debug_check_log \
+ log \
+ log_accum \
+ mfpipe \
+ rcs-to-cvs \
+ rcs2log \
+ rcslock \
+ sccs2rcs
+
+contrib_DATA = \
+ README \
+ intro.doc
+
+contrib_MANS = \
+ cvscheck.man
+
+bin_LINKS = \
+ rcs2log
+
+EXTRA_DIST = \
+ .cvsignore \
+ $(contrib_DATA) \
+ $(contrib_MANS) \
+ cvs2vendor.sh \
+ cvscheck.sh \
+ cvshelp.man \
+ debug_check_log.sh \
+ descend.sh \
+ descend.man \
+ dirfns.shar \
+ rcs-to-cvs.sh \
+ rcs2log.sh \
+ rcs2sccs.sh
+
+CLEANFILES = $(bin_SCRIPTS) $(contrib_SCRIPTS)
+
+# we'd rather have a link here rather than two copies of a script
+install-data-local:
+ # FIXME - this path should be determined dynamically from bindir
+ # & contribdir
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_LINKS)'; for p in $$list; do \
+ echo "test ! -e $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ echo " && cd $(DESTDIR)$(bindir) && $(LN_S) ../share/$(PACKAGE)/contrib/`echo $$p|sed '$(transform)'` ."; \
+ (test ! -e $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'` \
+ && cd $(DESTDIR)$(bindir) && $(LN_S) ../share/$(PACKAGE)/contrib/`echo $$p|sed '$(transform)'` .) \
+ || (echo "Link creation failed" && if test -f $$p; then \
+ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else :; fi; fi); \
+ done
+
+uninstall-local:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_LINKS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+
+SUFFIXES = .sh
+
+.sh:
+ rm -f $@
+ cp $< $@
+ chmod +x $@
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
diff --git a/contrib/cvs/contrib/Makefile.in b/contrib/cvs/contrib/Makefile.in
index 3e59cf100dd8..910546e282ed 100644
--- a/contrib/cvs/contrib/Makefile.in
+++ b/contrib/cvs/contrib/Makefile.in
@@ -1,3 +1,18 @@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
# Makefile for GNU CVS contributed sources.
# Do not use this makefile directly, but only from `../Makefile'.
# Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
@@ -12,116 +27,365 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-SHELL = /bin/sh
+# DISTFILES = \
+# ChangeLog README .cvsignore intro.doc \
+# Makefile.in clmerge.pl cln_hist.pl commit_prep.pl cvs2vendor.sh \
+# cvs_acls.pl cvscheck.sh cvscheck.man cvshelp.man debug_check_log.sh \
+# descend.sh \
+# descend.man dirfns.shar log.pl log_accum.pl mfpipe.pl rcs-to-cvs.sh \
+# rcs2log.sh rcslock.pl sccs2rcs.csh rcs2sccs.sh
+
+# files installed in $(pkgdatadir)
+#
+# CONTRIB_FILES = README intro.doc cvscheck.man
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
-# Where to install the executables.
bindir = @bindir@
-
-# Where to put the system-wide .cvsrc file
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
libdir = @libdir@
-
-# Where to put the manual pages.
+infodir = @infodir@
mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
-# where to find command interpreters
-perl_path = @perl_path@
-csh_path = @csh_path@
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-# Use cp if you don't have install.
INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
-DISTFILES = \
- ChangeLog README .cvsignore intro.doc \
- Makefile.in clmerge.pl cln_hist.pl commit_prep.pl cvs2vendor.sh \
- cvs_acls.pl cvscheck.sh cvscheck.man cvshelp.man descend.sh \
- descend.man dirfns.shar log.pl log_accum.pl mfpipe.pl rcs-to-cvs.sh \
- rcs2log.sh rcslock.pl sccs2rcs.csh rcs2sccs.sh
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
-# files installed in $(libdir)/cvs/contrib
-#
-CONTRIB_FILES = README intro.doc cvscheck.man
+contribdir = $(pkgdatadir)/contrib
-# things we actually build and install....
-#
-PROGS = rcs2log
-CONTRIB_PROGS = clmerge cln_hist commit_prep cvs2vendor cvs_acls cvscheck \
- log log_accum mfpipe rcs-to-cvs rcs2log rcslock sccs2rcs
+contrib_SCRIPTS = \
+ clmerge \
+ cln_hist \
+ commit_prep \
+ cvs2vendor \
+ cvs_acls \
+ cvscheck \
+ debug_check_log \
+ log \
+ log_accum \
+ mfpipe \
+ rcs-to-cvs \
+ rcs2log \
+ rcslock \
+ sccs2rcs
-.SUFFIXES: .pl .sh .csh
-.pl:
- rm -f $@
- sed -e 's,xPERL_PATHx,$(perl_path),' $< > $@-t
- mv $@-t $@
- chmod +x $@
+contrib_DATA = \
+ README \
+ intro.doc
-.csh:
- rm -f $@
- sed -e 's,xCSH_PATHx,$(csh_path),' $< > $@-t
- mv $@-t $@
- chmod +x $@
-.sh:
- rm -f $@
- cp $< $@
- chmod +x $@
+contrib_MANS = \
+ cvscheck.man
+
+
+bin_LINKS = \
+ rcs2log
+
+
+EXTRA_DIST = \
+ .cvsignore \
+ $(contrib_DATA) \
+ $(contrib_MANS) \
+ cvs2vendor.sh \
+ cvscheck.sh \
+ cvshelp.man \
+ debug_check_log.sh \
+ descend.sh \
+ descend.man \
+ dirfns.shar \
+ rcs-to-cvs.sh \
+ rcs2log.sh \
+ rcs2sccs.sh
-all: Makefile $(PROGS) $(CONTRIB_PROGS)
-.PHONY: all
-install: all installdirs
- for f in $(CONTRIB_FILES) ; do\
- $(INSTALL_DATA) $(srcdir)/$$f $(libdir)/cvs/contrib/$$f; \
+CLEANFILES = $(bin_SCRIPTS) $(contrib_SCRIPTS)
+
+SUFFIXES = .sh
+EXEEXT =
+OBJEXT = o
+subdir = contrib
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES = clmerge cln_hist commit_prep cvs_acls log log_accum \
+ mfpipe rcslock sccs2rcs
+SCRIPTS = $(contrib_SCRIPTS)
+
+DIST_SOURCES =
+DATA = $(contrib_DATA)
+
+DIST_COMMON = README ChangeLog Makefile.am Makefile.in clmerge.in \
+ cln_hist.in commit_prep.in cvs_acls.in log.in log_accum.in \
+ mfpipe.in rcslock.in sccs2rcs.in
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .sh
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu contrib/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+clmerge: $(top_builddir)/config.status clmerge.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+cln_hist: $(top_builddir)/config.status cln_hist.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+commit_prep: $(top_builddir)/config.status commit_prep.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+cvs_acls: $(top_builddir)/config.status cvs_acls.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+log: $(top_builddir)/config.status log.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+log_accum: $(top_builddir)/config.status log_accum.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+mfpipe: $(top_builddir)/config.status mfpipe.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+rcslock: $(top_builddir)/config.status rcslock.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+sccs2rcs: $(top_builddir)/config.status sccs2rcs.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+install-contribSCRIPTS: $(contrib_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(contribdir)
+ @list='$(contrib_SCRIPTS)'; for p in $$list; do \
+ f="`echo $$p|sed '$(transform)'`"; \
+ if test -f $$p; then \
+ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(contribdir)/$$f"; \
+ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(contribdir)/$$f; \
+ elif test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(contribdir)/$$f"; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(contribdir)/$$f; \
+ else :; fi; \
done
- for f in $(CONTRIB_PROGS) ; do\
- $(INSTALL_PROGRAM) $$f $(libdir)/cvs/contrib/$$f; \
+
+uninstall-contribSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(contrib_SCRIPTS)'; for p in $$list; do \
+ f="`echo $$p|sed '$(transform)'`"; \
+ echo " rm -f $(DESTDIR)$(contribdir)/$$f"; \
+ rm -f $(DESTDIR)$(contribdir)/$$f; \
done
- for f in $(PROGS) ; do\
- $(INSTALL_PROGRAM) $$f $(bindir)/$$f; \
+install-contribDATA: $(contrib_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(contribdir)
+ @list='$(contrib_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(contribdir)/$$f"; \
+ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(contribdir)/$$f; \
done
-.PHONY: install
+
+uninstall-contribDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(contrib_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(contribdir)/$$f"; \
+ rm -f $(DESTDIR)$(contribdir)/$$f; \
+ done
+tags: TAGS
+TAGS:
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS) $(DATA)
installdirs:
- $(top_srcdir)/mkinstalldirs $(libdir)/cvs/contrib
-.PHONY: installdirs
+ $(mkinstalldirs) $(DESTDIR)$(contribdir) $(DESTDIR)$(contribdir)
-tags:
-.PHONY: tags
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-TAGS:
-.PHONY: TAGS
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-ls:
- @echo $(DISTFILES)
-.PHONY: ls
+installcheck: installcheck-am
-clean:
- rm -f *.o core
-.PHONY: clean
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-distclean: clean
- rm -f Makefile $(PROGS) $(CONTRIB_PROGS)
-.PHONY: distclean
+mostlyclean-generic:
-realclean: distclean
-.PHONY: realclean
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f Makefile.in
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic
+
+dvi:
+
+dvi-am:
+
+info:
+
+info-am:
+
+install-data-am: install-contribDATA install-contribSCRIPTS \
+ install-data-local
+
+install-exec-am:
+
+install-info:
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+uninstall-am: uninstall-contribDATA uninstall-contribSCRIPTS \
+ uninstall-local
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am info info-am install \
+ install-am install-contribDATA install-contribSCRIPTS \
+ install-data install-data-am install-data-local install-exec \
+ install-exec-am install-info install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ uninstall uninstall-am uninstall-contribDATA \
+ uninstall-contribSCRIPTS uninstall-local
+
+
+# we'd rather have a link here rather than two copies of a script
+install-data-local:
+ # FIXME - this path should be determined dynamically from bindir
+ # & contribdir
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_LINKS)'; for p in $$list; do \
+ echo "test ! -e $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ echo " && cd $(DESTDIR)$(bindir) && $(LN_S) ../share/$(PACKAGE)/contrib/`echo $$p|sed '$(transform)'` ."; \
+ (test ! -e $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'` \
+ && cd $(DESTDIR)$(bindir) && $(LN_S) ../share/$(PACKAGE)/contrib/`echo $$p|sed '$(transform)'` .) \
+ || (echo "Link creation failed" && if test -f $$p; then \
+ echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else if test -f $(srcdir)/$$p; then \
+ echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ else :; fi; fi); \
done
-.PHONY: dist-dir
-subdir = contrib
-Makefile: ../config.status Makefile.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+uninstall-local:
+ @$(NORMAL_UNINSTALL)
+ list='$(bin_LINKS)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+
+.sh:
+ rm -f $@
+ cp $< $@
+ chmod +x $@
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/cvs/contrib/clmerge.in b/contrib/cvs/contrib/clmerge.in
new file mode 100755
index 000000000000..5e5251ac1b0a
--- /dev/null
+++ b/contrib/cvs/contrib/clmerge.in
@@ -0,0 +1,152 @@
+#! @PERL@
+
+# Merge conflicted ChangeLogs
+# tromey Mon Aug 15 1994
+
+# Usage is:
+#
+# cl-merge [-i] file ...
+#
+# With -i, it works in place (backups put in a ~ file). Otherwise the
+# merged ChangeLog is printed to stdout.
+
+# Please report any bugs to me. I wrote this yesterday, so there are no
+# guarantees about its performance. I recommend checking its output
+# carefully. If you do send a bug report, please include the failing
+# ChangeLog, so I can include it in my test suite.
+#
+# Tom
+# ---
+# tromey@busco.lanl.gov Member, League for Programming Freedom
+# Sadism and farce are always inexplicably linked.
+# -- Alexander Theroux
+
+
+# Month->number mapping. Used for sorting.
+%months = ('Jan', 0,
+ 'Feb', 1,
+ 'Mar', 2,
+ 'Apr', 3,
+ 'May', 4,
+ 'Jun', 5,
+ 'Jul', 6,
+ 'Aug', 7,
+ 'Sep', 8,
+ 'Oct', 9,
+ 'Nov', 10,
+ 'Dec', 11);
+
+# If '-i' is given, do it in-place.
+if ($ARGV[0] eq '-i') {
+ shift (@ARGV);
+ $^I = '~';
+}
+
+$lastkey = '';
+$lastval = '';
+$conf = 0;
+%conflist = ();
+
+$tjd = 0;
+
+# Simple state machine. The states:
+#
+# 0 Not in conflict. Just copy input to output.
+# 1 Beginning an entry. Next non-blank line is key.
+# 2 In entry. Entry beginner transitions to state 1.
+while (<>) {
+ if (/^<<<</ || /^====/) {
+ # Start of a conflict.
+
+ # Copy last key into array.
+ if ($lastkey ne '') {
+ $conflist{$lastkey} = $lastval;
+
+ $lastkey = '';
+ $lastval = '';
+ }
+
+ $conf = 1;
+ } elsif (/^>>>>/) {
+ # End of conflict. Output.
+
+ # Copy last key into array.
+ if ($lastkey ne '') {
+ $conflist{$lastkey} = $lastval;
+
+ $lastkey = '';
+ $lastval = '';
+ }
+
+ foreach (reverse sort clcmp keys %conflist) {
+ print STDERR "doing $_" if $tjd;
+ print $_;
+ print $conflist{$_};
+ }
+
+ $lastkey = '';
+ $lastval = '';
+ $conf = 0;
+ %conflist = ();
+ } elsif ($conf == 1) {
+ # Beginning an entry. Skip empty lines. Error if not a real
+ # beginner.
+ if (/^$/) {
+ # Empty line; just skip at this point.
+ } elsif (/^[MTWFS]/) {
+ # Looks like the name of a day; assume opener and move to
+ # "in entry" state.
+ $lastkey = $_;
+ $conf = 2;
+ print STDERR "found $_" if $tjd;
+ } else {
+ die ("conflict crosses entry boundaries: $_");
+ }
+ } elsif ($conf == 2) {
+ # In entry. Copy into variable until we see beginner line.
+ if (/^[MTWFS]/) {
+ # Entry beginner line.
+
+ # Copy last key into array.
+ if ($lastkey ne '') {
+ $conflist{$lastkey} = $lastval;
+
+ $lastkey = '';
+ $lastval = '';
+ }
+
+ $lastkey = $_;
+ print STDERR "found $_" if $tjd;
+ $lastval = '';
+ } else {
+ $lastval .= $_;
+ }
+ } else {
+ # Just copy.
+ print;
+ }
+}
+
+# Compare ChangeLog time strings like <=>.
+#
+# 0 1 2 3
+# Thu Aug 11 13:22:42 1994 Tom Tromey (tromey@creche.colorado.edu)
+# 0123456789012345678901234567890
+#
+sub clcmp {
+ # First check year.
+ $r = substr ($a, 20, 4) <=> substr ($b, 20, 4);
+
+ # Now check month.
+ $r = $months{substr ($a, 4, 3)} <=> $months{substr ($b, 4, 3)} if !$r;
+
+ # Now check day.
+ $r = substr ($a, 8, 2) <=> substr ($b, 8, 2) if !$r;
+
+ # Now check time (3 parts).
+ $r = substr ($a, 11, 2) <=> substr ($b, 11, 2) if !$r;
+ $r = substr ($a, 14, 2) <=> substr ($b, 14, 2) if !$r;
+ $r = substr ($a, 17, 2) <=> substr ($b, 17, 2) if !$r;
+
+ $r;
+}
diff --git a/contrib/cvs/contrib/cln_hist.in b/contrib/cvs/contrib/cln_hist.in
new file mode 100755
index 000000000000..d9818471cf41
--- /dev/null
+++ b/contrib/cvs/contrib/cln_hist.in
@@ -0,0 +1,91 @@
+#! @PERL@
+# -*-Perl-*-
+#
+# Contributed by David G. Grubbs <dgg@ksr.com>
+#
+# Clean up the history file. 10 Record types: MAR OFT WUCG
+#
+# WUCG records are thrown out.
+# MAR records are retained.
+# T records: retain only last tag with same combined tag/module.
+#
+# Two passes: Walk through the first time and remember the
+# 1. Last Tag record with same "tag" and "module" names.
+# 2. Last O record with unique user/module/directory, unless followed
+# by a matching F record.
+#
+
+$r = $ENV{"CVSROOT"};
+$c = "$r/CVSROOT";
+$h = "$c/history";
+
+eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';"
+ while ($ARGV[0] =~ /^(\w+)=/ && shift(@ARGV));
+exit 255 if $die; # process any variable=value switches
+
+%tags = ();
+%outs = ();
+
+#
+# Move history file to safe place and re-initialize a new one.
+#
+rename($h, "$h.bak");
+open(XX, ">$h");
+close(XX);
+
+#
+# Pass1 -- remember last tag and checkout.
+#
+open(HIST, "$h.bak");
+while (<HIST>) {
+ next if /^[MARWUCG]/;
+
+ # Save whole line keyed by tag|module
+ if (/^T/) {
+ @tmp = split(/\|/, $_);
+ $tags{$tmp[4] . '|' . $tmp[5]} = $_;
+ }
+ # Save whole line
+ if (/^[OF]/) {
+ @tmp = split(/\|/, $_);
+ $outs{$tmp[1] . '|' . $tmp[2] . '|' . $tmp[5]} = $_;
+ }
+}
+
+#
+# Pass2 -- print out what we want to save.
+#
+open(SAVE, ">$h.work");
+open(HIST, "$h.bak");
+while (<HIST>) {
+ next if /^[FWUCG]/;
+
+ # If whole line matches saved (i.e. "last") one, print it.
+ if (/^T/) {
+ @tmp = split(/\|/, $_);
+ next if $tags{$tmp[4] . '|' . $tmp[5]} ne $_;
+ }
+ # Save whole line
+ if (/^O/) {
+ @tmp = split(/\|/, $_);
+ next if $outs{$tmp[1] . '|' . $tmp[2] . '|' . $tmp[5]} ne $_;
+ }
+
+ print SAVE $_;
+}
+
+#
+# Put back the saved stuff
+#
+system "cat $h >> $h.work";
+
+if (-s $h) {
+ rename ($h, "$h.interim");
+ print "history.interim has non-zero size.\n";
+} else {
+ unlink($h);
+}
+
+rename ("$h.work", $h);
+
+exit(0);
diff --git a/contrib/cvs/contrib/commit_prep.in b/contrib/cvs/contrib/commit_prep.in
new file mode 100755
index 000000000000..d46ffdfc4744
--- /dev/null
+++ b/contrib/cvs/contrib/commit_prep.in
@@ -0,0 +1,215 @@
+#! @PERL@
+# -*-Perl-*-
+#
+#
+# Perl filter to handle pre-commit checking of files. This program
+# records the last directory where commits will be taking place for
+# use by the log_accum.pl script. For new files, it forces the
+# existence of a RCS "Id" keyword in the first ten lines of the file.
+# For existing files, it checks version number in the "Id" line to
+# prevent losing changes because an old version of a file was copied
+# into the direcory.
+#
+# Possible future enhancements:
+#
+# Check for cruft left by unresolved conflicts. Search for
+# "^<<<<<<<$", "^-------$", and "^>>>>>>>$".
+#
+# Look for a copyright and automagically update it to the
+# current year. [[ bad idea! -- woods ]]
+#
+#
+# Contributed by David Hampton <hampton@cisco.com>
+#
+# Hacked on lots by Greg A. Woods <woods@web.net>
+
+#
+# Configurable options
+#
+
+# Constants (remember to protect strings from RCS keyword substitution)
+#
+$LAST_FILE = "/tmp/#cvs.lastdir"; # must match name in log_accum.pl
+$ENTRIES = "CVS/Entries";
+
+# Patterns to find $Log keywords in files
+#
+$LogString1 = "\\\$\\Log: .* \\\$";
+$LogString2 = "\\\$\\Log\\\$";
+$NoLog = "%s - contains an RCS \$Log keyword. It must not!\n";
+
+# pattern to match an RCS Id keyword line with an existing ID
+#
+$IDstring = "\"@\\(#\\)[^:]*:.*\\\$\Id: .*\\\$\"";
+$NoId = "
+%s - Does not contain a properly formatted line with the keyword \"Id:\".
+ I.e. no lines match \"" . $IDstring . "\".
+ Please see the template files for an example.\n";
+
+# pattern to match an RCS Id keyword line for a new file (i.e. un-expanded)
+#
+$NewId = "\"@(#)[^:]*:.*\\$\Id\\$\"";
+
+$NoName = "
+%s - The ID line should contain only \"@(#)module/path:\$Name\$:\$\Id\$\"
+ for a newly created file.\n";
+
+$BadName = "
+%s - The file name '%s' in the ID line does not match
+ the actual filename.\n";
+
+$BadVersion = "
+%s - How dare you!!! You replaced your copy of the file '%s',
+ which was based upon version %s, with an %s version based
+ upon %s. Please move your '%s' out of the way, perform an
+ update to get the current version, and them merge your changes
+ into that file, then try the commit again.\n";
+
+#
+# Subroutines
+#
+
+sub write_line {
+ local($filename, $line) = @_;
+ open(FILE, ">$filename") || die("Cannot open $filename, stopped");
+ print(FILE $line, "\n");
+ close(FILE);
+}
+
+sub check_version {
+ local($i, $id, $rname, $version);
+ local($filename, $cvsversion) = @_;
+
+ open(FILE, "<$filename") || return(0);
+
+ @all_lines = ();
+ $idpos = -1;
+ $newidpos = -1;
+ for ($i = 0; <FILE>; $i++) {
+ chop;
+ push(@all_lines, $_);
+ if ($_ =~ /$IDstring/) {
+ $idpos = $i;
+ }
+ if ($_ =~ /$NewId/) {
+ $newidpos = $i;
+ }
+ }
+
+ if (grep(/$LogString1/, @all_lines) || grep(/$LogString2/, @all_lines)) {
+ print STDERR sprintf($NoLog, $filename);
+ return(1);
+ }
+
+ if ($debug != 0) {
+ print STDERR sprintf("file = %s, version = %d.\n", $filename, $cvsversion{$filename});
+ }
+
+ if ($cvsversion{$filename} == 0) {
+ if ($newidpos != -1 && $all_lines[$newidpos] !~ /$NewId/) {
+ print STDERR sprintf($NoName, $filename);
+ return(1);
+ }
+ return(0);
+ }
+
+ if ($idpos == -1) {
+ print STDERR sprintf($NoId, $filename);
+ return(1);
+ }
+
+ $line = $all_lines[$idpos];
+ $pos = index($line, "Id: ");
+ if ($debug != 0) {
+ print STDERR sprintf("%d in '%s'.\n", $pos, $line);
+ }
+ ($id, $rname, $version) = split(' ', substr($line, $pos));
+ if ($rname ne "$filename,v") {
+ print STDERR sprintf($BadName, $filename, substr($rname, 0, length($rname)-2));
+ return(1);
+ }
+ if ($cvsversion{$filename} < $version) {
+ print STDERR sprintf($BadVersion, $filename, $filename, $cvsversion{$filename},
+ "newer", $version, $filename);
+ return(1);
+ }
+ if ($cvsversion{$filename} > $version) {
+ print STDERR sprintf($BadVersion, $filename, $filename, $cvsversion{$filename},
+ "older", $version, $filename);
+ return(1);
+ }
+ return(0);
+}
+
+#
+# Main Body
+#
+
+$id = getpgrp(); # You *must* use a shell that does setpgrp()!
+
+# Check each file (except dot files) for an RCS "Id" keyword.
+#
+$check_id = 0;
+
+# Record the directory for later use by the log_accumulate stript.
+#
+$record_directory = 0;
+
+# parse command line arguments
+#
+while (@ARGV) {
+ $arg = shift @ARGV;
+
+ if ($arg eq '-d') {
+ $debug = 1;
+ print STDERR "Debug turned on...\n";
+ } elsif ($arg eq '-c') {
+ $check_id = 1;
+ } elsif ($arg eq '-r') {
+ $record_directory = 1;
+ } else {
+ push(@files, $arg);
+ }
+}
+
+$directory = shift @files;
+
+if ($debug != 0) {
+ print STDERR "dir - ", $directory, "\n";
+ print STDERR "files - ", join(":", @files), "\n";
+ print STDERR "id - ", $id, "\n";
+}
+
+# Suck in the CVS/Entries file
+#
+open(ENTRIES, $ENTRIES) || die("Cannot open $ENTRIES.\n");
+while (<ENTRIES>) {
+ local($filename, $version) = split('/', substr($_, 1));
+ $cvsversion{$filename} = $version;
+}
+
+# Now check each file name passed in, except for dot files. Dot files
+# are considered to be administrative files by this script.
+#
+if ($check_id != 0) {
+ $failed = 0;
+ foreach $arg (@files) {
+ if (index($arg, ".") == 0) {
+ next;
+ }
+ $failed += &check_version($arg);
+ }
+ if ($failed) {
+ print STDERR "\n";
+ exit(1);
+ }
+}
+
+# Record this directory as the last one checked. This will be used
+# by the log_accumulate script to determine when it is processing
+# the final directory of a multi-directory commit.
+#
+if ($record_directory != 0) {
+ &write_line("$LAST_FILE.$id", $directory);
+}
+exit(0);
diff --git a/contrib/cvs/contrib/cvs_acls.in b/contrib/cvs/contrib/cvs_acls.in
new file mode 100755
index 000000000000..7bd991840e63
--- /dev/null
+++ b/contrib/cvs/contrib/cvs_acls.in
@@ -0,0 +1,141 @@
+#! @PERL@
+# -*-Perl-*-
+#
+# Access control lists for CVS. dgg@ksr.com (David G. Grubbs)
+#
+# CVS "commitinfo" for matching repository names, running the program it finds
+# on the same line. More information is available in the CVS man pages.
+#
+# ==== INSTALLATION:
+#
+# To use this program as I intended, do the following four things:
+#
+# 0. Install PERL. :-)
+#
+# 1. Put one line, as the *only* non-comment line, in your commitinfo file:
+#
+# DEFAULT /usr/local/bin/cvs_acls
+#
+# 2. Install this file as /usr/local/bin/cvs_acls and make it executable.
+#
+# 3. Create a file named $CVSROOT/CVSROOT/avail.
+#
+# ==== FORMAT OF THE avail FILE:
+#
+# The avail file determines whether you may commit files. It contains lines
+# read from top to bottom, keeping track of a single "bit". The "bit"
+# defaults to "on". It can be turned "off" by "unavail" lines and "on" by
+# "avail" lines. ==> Last one counts.
+#
+# Any line not beginning with "avail" or "unavail" is ignored.
+#
+# Lines beginning with "avail" or "unavail" are assumed to be '|'-separated
+# triples: (All spaces and tabs are ignored in a line.)
+#
+# {avail.*,unavail.*} [| user,user,... [| repos,repos,...]]
+#
+# 1. String starting with "avail" or "unavail".
+# 2. Optional, comma-separated list of usernames.
+# 3. Optional, comma-separated list of repository pathnames.
+# These are pathnames relative to $CVSROOT. They can be directories or
+# filenames. A directory name allows access to all files and
+# directories below it.
+#
+# Example: (Text from the ';;' rightward may not appear in the file.)
+#
+# unavail ;; Make whole repository unavailable.
+# avail|dgg ;; Except for user "dgg".
+# avail|fred, john|bin/ls ;; Except when "fred" or "john" commit to
+# ;; the module whose repository is "bin/ls"
+#
+# PROGRAM LOGIC:
+#
+# CVS passes to @ARGV an absolute directory pathname (the repository
+# appended to your $CVSROOT variable), followed by a list of filenames
+# within that directory.
+#
+# We walk through the avail file looking for a line that matches both
+# the username and repository.
+#
+# A username match is simply the user's name appearing in the second
+# column of the avail line in a space-or-comma separate list.
+#
+# A repository match is either:
+# - One element of the third column matches $ARGV[0], or some
+# parent directory of $ARGV[0].
+# - Otherwise *all* file arguments ($ARGV[1..$#ARGV]) must be
+# in the file list in one avail line.
+# - In other words, using directory names in the third column of
+# the avail file allows committing of any file (or group of
+# files in a single commit) in the tree below that directory.
+# - If individual file names are used in the third column of
+# the avail file, then files must be committed individually or
+# all files specified in a single commit must all appear in
+# third column of a single avail line.
+#
+
+$debug = 0;
+$cvsroot = $ENV{'CVSROOT'};
+$availfile = $cvsroot . "/CVSROOT/avail";
+$myname = $ENV{"USER"} if !($myname = $ENV{"LOGNAME"});
+
+eval "print STDERR \$die='Unknown parameter $1\n' if !defined \$$1; \$$1=\$';"
+ while ($ARGV[0] =~ /^(\w+)=/ && shift(@ARGV));
+exit 255 if $die; # process any variable=value switches
+
+die "Must set CVSROOT\n" if !$cvsroot;
+($repos = shift) =~ s:^$cvsroot/::;
+grep($_ = $repos . '/' . $_, @ARGV);
+
+print "$$ Repos: $repos\n","$$ ==== ",join("\n$$ ==== ",@ARGV),"\n" if $debug;
+
+$exit_val = 0; # Good Exit value
+
+$universal_off = 0;
+open (AVAIL, $availfile) || exit(0); # It is ok for avail file not to exist
+while (<AVAIL>) {
+ chop;
+ next if /^\s*\#/;
+ next if /^\s*$/;
+ ($flagstr, $u, $m) = split(/[\s,]*\|[\s,]*/, $_);
+
+ # Skip anything not starting with "avail" or "unavail" and complain.
+ (print "Bad avail line: $_\n"), next
+ if ($flagstr !~ /^avail/ && $flagstr !~ /^unavail/);
+
+ # Set which bit we are playing with. ('0' is OK == Available).
+ $flag = (($& eq "avail") ? 0 : 1);
+
+ # If we find a "universal off" flag (i.e. a simple "unavail") remember it
+ $universal_off = 1 if ($flag && !$u && !$m);
+
+ # $myname considered "in user list" if actually in list or is NULL
+ $in_user = (!$u || grep ($_ eq $myname, split(/[\s,]+/,$u)));
+ print "$$ \$myname($myname) in user list: $_\n" if $debug && $in_user;
+
+ # Module matches if it is a NULL module list in the avail line. If module
+ # list is not null, we check every argument combination.
+ if (!($in_repo = !$m)) {
+ @tmp = split(/[\s,]+/,$m);
+ for $j (@tmp) {
+ # If the repos from avail is a parent(or equal) dir of $repos, OK
+ $in_repo = 1, last if ($repos eq $j || $repos =~ /^$j\//);
+ }
+ if (!$in_repo) {
+ $in_repo = 1;
+ for $j (@ARGV) {
+ last if !($in_repo = grep ($_ eq $j, @tmp));
+ }
+ }
+ }
+ print "$$ \$repos($repos) in repository list: $_\n" if $debug && $in_repo;
+
+ $exit_val = $flag if ($in_user && $in_repo);
+ print "$$ ==== \$exit_val = $exit_val\n$$ ==== \$flag = $flag\n" if $debug;
+}
+close(AVAIL);
+print "$$ ==== \$exit_val = $exit_val\n" if $debug;
+print "**** Access denied: Insufficient Karma ($myname|$repos)\n" if $exit_val;
+print "**** Access allowed: Personal Karma exceeds Environmental Karma.\n"
+ if $universal_off && !$exit_val;
+exit($exit_val);
diff --git a/contrib/cvs/contrib/debug_check_log.sh b/contrib/cvs/contrib/debug_check_log.sh
new file mode 100755
index 000000000000..f14b26d7f050
--- /dev/null
+++ b/contrib/cvs/contrib/debug_check_log.sh
@@ -0,0 +1,197 @@
+#!/bin/sh
+
+#
+# This program is intended to take a check.log file generated by a failed run of
+# sanity.sh as input and run expr line by line on it. It seems a much easier
+# way of spotting a single failed line in a 100 line test result.
+#
+
+#
+# This script falls under the GNU General Public License and is intended to
+# be distributed with CVS.
+#
+
+#
+# No warranties, express or implied.
+#
+
+#
+# Contributed by Derek R. Price <derek.price@openavenue.com>
+#
+
+
+
+usage ()
+{
+ echo "\
+usage: $0 [-afh] [file...]
+
+ -a process alternate pattern
+ -f process first pattern (default)
+ -h print this text
+
+ file files to process (default = check.log)"
+}
+
+# Do a line by line match with expr
+#
+# INPUTS
+# $1 = text file name
+# $2 = pattern file name
+expr_line_by_line ()
+{
+ dcl_line=0
+ dcl_wrong=
+ # We are assuming a newline at the end of the file. The way sanity.sh
+ # uses echo to create the log message guarantees this newline and since
+ # expr ignores the last newline when the anchor is present anyhow, no
+ # information is being lost in the transition
+ while test $dcl_line -lt `wc -l <$1` -a $dcl_line -lt `wc -l <$2`; do
+ dcl_line=`expr $dcl_line + 1`
+ if test `sed -ne${dcl_line}p <$1 |wc -c` -eq 1 \
+ -a `sed -ne${dcl_line}p <$2 |wc -c` -eq 1; then
+ # This is a workaround for what I am calling a bug in GNU
+ # expr - it won't match the empty string to the empty
+ # string. In this case the assumption is that a single
+ # character is always a newline. Since we already checked
+ # for the end of the file, we know sed will echo the
+ # newline.
+ :
+ elif expr "`sed -ne${dcl_line}p <$1`" : \
+ "`sed -ne${dcl_line}p <$2`\$" >/dev/null; then
+ :
+ else
+ echo "$dcl_line: `sed -ne${dcl_line}p <$1`"
+ echo "$dcl_line: `sed -ne${dcl_line}p <$2`\$"
+ dcl_wrong="$dcl_wrong $dcl_line"
+ fi
+ done
+ if test `wc -l <$1` -ne `wc -l <$2`; then
+ echo "output & pattern contain differing number of lines"
+ elif test -z "$dcl_wrong"; then
+ echo "no mismatched lines"
+ else
+ echo "mismatched lines: $dcl_wrong"
+ fi
+}
+
+# Process a single check.log file
+#
+# INPUTS
+# $1 = filename
+process_check_log ()
+{
+ # abort if we can't find any expressions
+ if grep '^\*\* got: $' <$1 >/dev/null; then
+ :
+ else
+ echo "WARNING: No expressions in file: $1" >&2
+ echo " Either not a check.log or sanity.sh exited for some other reason," >&2
+ echo " like bad exit status. Try tail." >&2
+ return
+ fi
+
+ dcl_exprfiles=""
+ if grep '^\*\* or: $' <$1 >/dev/null; then
+ # file contains a second regex
+ if test $dcl_dofirst -eq 1; then
+ # get the first pattern
+ sed -ne '/^\*\* expected: $/,/^\*\* or: $/p' <$1 >/tmp/dcle$$
+ dcl_exprfiles="$dcl_exprfiles /tmp/dcle$$"
+ fi
+ if test $dcl_doalternate -eq 1; then
+ # get the alternate pattern
+ sed -ne '/^\*\* or: $/,/^\*\* got: $/p' <$1 >/tmp/dclo$$
+ dcl_exprfiles="$dcl_exprfiles /tmp/dclo$$"
+ else
+ echo "WARNING: Ignoring alternate pattern in file: $1" >&2
+ fi
+ else
+ # file doesn't contain a second regex
+ if test $dcl_dofirst = 1; then
+ # get the only pattern
+ sed -ne '/^\*\* expected: $/,/^\*\* got: $/p' <$1 >/tmp/dcle$$
+ dcl_exprfiles="$dcl_exprfiles /tmp/dcle$$"
+ fi
+ if test $dcl_doalternate -eq 1; then
+ echo "WARNING: No alternate pattern in file: $1" >&2
+ fi
+ fi
+
+ # and get the actual output
+ sed -ne '/^\*\* got: $/,$p' <$1 >/tmp/dclg$$
+ sed -ne '1D
+$D
+p' </tmp/dclg$$ >/tmp/dclh$$
+ mv /tmp/dclh$$ /tmp/dclg$$
+
+ # compare the output against each pattern requested
+ for dcl_f in $dcl_exprfiles; do
+ sed -ne '1D
+$D
+p' <$dcl_f >/tmp/dclp$$
+ mv /tmp/dclp$$ $dcl_f
+
+ case $dcl_f in
+ /tmp/dcle*)
+ echo "********** $1 : Primary **********"
+ ;;
+ /tmp/dclo*)
+ echo "********** $1 : Alternate **********"
+ ;;
+ esac
+
+ expr_line_by_line /tmp/dclg$$ $dcl_f
+
+ rm $dcl_f
+ done
+
+ rm /tmp/dclg$$
+}
+
+###
+### MAIN
+###
+
+# set up defaults
+dcl_doalternate=0
+dcl_dofirst=0
+
+# process options
+while getopts afh arg; do
+ case $arg in
+ a)
+ dcl_doalternate=1
+ ;;
+ f)
+ dcl_dofirst=1
+ ;;
+ \?|h)
+ usage
+ exit 1
+ ;;
+ esac
+done
+
+# dispose of processed args
+shift `expr $OPTIND - 1`
+OPTIND=1
+
+# set the default mode
+if test $dcl_doalternate -eq 0; then
+ dcl_dofirst=1
+fi
+
+# set default arg
+if test $# -eq 0; then
+ dcl_argvar=dcl_default
+ dcl_default=check.log
+else
+ dcl_argvar=@
+fi
+
+eval for file in \"\$$dcl_argvar\"\; do \
+ process_check_log \$file\; \
+done
+
+exit 0
diff --git a/contrib/cvs/contrib/log.in b/contrib/cvs/contrib/log.in
new file mode 100755
index 000000000000..87f40b55b5b6
--- /dev/null
+++ b/contrib/cvs/contrib/log.in
@@ -0,0 +1,208 @@
+#! @PERL@
+# -*-Perl-*-
+#
+# XXX: FIXME: handle multiple '-f logfile' arguments
+#
+# XXX -- I HATE Perl! This *will* be re-written in shell/awk/sed soon!
+#
+
+# Usage: log.pl [-u user] [[-m mailto] ...] [-s] [-V] -f logfile 'dirname file ...'
+#
+# -u user - $USER passed from loginfo
+# -m mailto - for each user to receive cvs log reports
+# (multiple -m's permitted)
+# -s - to prevent "cvs status -v" messages
+# -V - without '-s', don't pass '-v' to cvs status
+# -f logfile - for the logfile to append to (mandatory,
+# but only one logfile can be specified).
+
+# here is what the output looks like:
+#
+# From: woods@kuma.domain.top
+# Subject: CVS update: testmodule
+#
+# Date: Wednesday November 23, 1994 @ 14:15
+# Author: woods
+#
+# Update of /local/src-CVS/testmodule
+# In directory kuma:/home/kuma/woods/work.d/testmodule
+#
+# Modified Files:
+# test3
+# Added Files:
+# test6
+# Removed Files:
+# test4
+# Log Message:
+# - wow, what a test
+#
+# (and for each file the "cvs status -v" output is appended unless -s is used)
+#
+# ==================================================================
+# File: test3 Status: Up-to-date
+#
+# Working revision: 1.41 Wed Nov 23 14:15:59 1994
+# Repository revision: 1.41 /local/src-CVS/cvs/testmodule/test3,v
+# Sticky Options: -ko
+#
+# Existing Tags:
+# local-v2 (revision: 1.7)
+# local-v1 (revision: 1.1.1.2)
+# CVS-1_4A2 (revision: 1.1.1.2)
+# local-v0 (revision: 1.2)
+# CVS-1_4A1 (revision: 1.1.1.1)
+# CVS (branch: 1.1.1)
+
+use strict;
+use IO::File;
+
+my $cvsroot = $ENV{'CVSROOT'};
+
+# turn off setgid
+#
+$) = $(;
+
+my $dostatus = 1;
+my $verbosestatus = 1;
+my $users;
+my $login;
+my $donefiles;
+my $logfile;
+my @files;
+
+# parse command line arguments
+#
+while (@ARGV) {
+ my $arg = shift @ARGV;
+
+ if ($arg eq '-m') {
+ $users = "$users " . shift @ARGV;
+ } elsif ($arg eq '-u') {
+ $login = shift @ARGV;
+ } elsif ($arg eq '-f') {
+ ($logfile) && die "Too many '-f' args";
+ $logfile = shift @ARGV;
+ } elsif ($arg eq '-s') {
+ $dostatus = 0;
+ } elsif ($arg eq '-V') {
+ $verbosestatus = 0;
+ } else {
+ ($donefiles) && die "Too many arguments!\n";
+ $donefiles = 1;
+ @files = split(/ /, $arg);
+ }
+}
+
+# the first argument is the module location relative to $CVSROOT
+#
+my $modulepath = shift @files;
+
+my $mailcmd = "| Mail -s 'CVS update: $modulepath'";
+
+# Initialise some date and time arrays
+#
+my @mos = ('January','February','March','April','May','June','July',
+ 'August','September','October','November','December');
+my @days = ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
+
+my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
+$year += 1900;
+
+# get a login name for the guy doing the commit....
+#
+if ($login eq '') {
+ $login = getlogin || (getpwuid($<))[0] || "nobody";
+}
+
+# open log file for appending
+#
+my $logfh = new IO::File ">>" . $logfile
+ or die "Could not open(" . $logfile . "): $!\n";
+
+# send mail, if there's anyone to send to!
+#
+my $mailfh;
+if ($users) {
+ $mailcmd = "$mailcmd $users";
+ $mailfh = new IO::File $mailcmd
+ or die "Could not Exec($mailcmd): $!\n";
+}
+
+# print out the log Header
+#
+$logfh->print ("\n");
+$logfh->print ("****************************************\n");
+$logfh->print ("Date:\t$days[$wday] $mos[$mon] $mday, $year @ $hour:" . sprintf("%02d", $min) . "\n");
+$logfh->print ("Author:\t$login\n\n");
+
+if ($mailfh) {
+ $mailfh->print ("\n");
+ $mailfh->print ("Date:\t$days[$wday] $mos[$mon] $mday, $year @ $hour:" . sprintf("%02d", $min) . "\n");
+ $mailfh->print ("Author:\t$login\n\n");
+}
+
+# print the stuff from logmsg that comes in on stdin to the logfile
+#
+my $infh = new IO::File "< -";
+foreach ($infh->getlines) {
+ $logfh->print;
+ if ($mailfh) {
+ $mailfh->print ($_);
+ }
+}
+undef $infh;
+
+$logfh->print ("\n");
+
+# after log information, do an 'cvs -Qq status -v' on each file in the arguments.
+#
+if ($dostatus != 0) {
+ while (@files) {
+ my $file = shift @files;
+ if ($file eq "-") {
+ $logfh->print ("[input file was '-']\n");
+ if ($mailfh) {
+ $mailfh->print ("[input file was '-']\n");
+ }
+ last;
+ }
+ my $rcsfh = new IO::File;
+ my $pid = $rcsfh->open ("-|");
+ if ( !defined $pid )
+ {
+ die "fork failed: $!";
+ }
+ if ($pid == 0)
+ {
+ my @command = ('cvs', '-nQq', 'status');
+ if ($verbosestatus)
+ {
+ push @command, '-v';
+ }
+ push @command, $file;
+ exec @command;
+ die "cvs exec failed: $!";
+ }
+ my $line;
+ while ($line = $rcsfh->getline) {
+ $logfh->print ($line);
+ if ($mailfh) {
+ $mailfh->print ($line);
+ }
+ }
+ undef $rcsfh;
+ }
+}
+
+$logfh->close()
+ or die "Write to $logfile failed: $!";
+
+if ($mailfh)
+{
+ $mailfh->close;
+ die "Pipe to $mailcmd failed" if $?;
+}
+
+## must exit cleanly
+##
+exit 0;
diff --git a/contrib/cvs/contrib/log_accum.in b/contrib/cvs/contrib/log_accum.in
new file mode 100755
index 000000000000..8591784ceded
--- /dev/null
+++ b/contrib/cvs/contrib/log_accum.in
@@ -0,0 +1,576 @@
+#! @PERL@
+# -*-Perl-*-
+#
+# Perl filter to handle the log messages from the checkin of files in
+# a directory. This script will group the lists of files by log
+# message, and mail a single consolidated log message at the end of
+# the commit.
+#
+# This file assumes a pre-commit checking program that leaves the
+# names of the first and last commit directories in a temporary file.
+#
+# Contributed by David Hampton <hampton@cisco.com>
+#
+# hacked greatly by Greg A. Woods <woods@planix.com>
+
+# Usage: log_accum.pl [-d] [-s] [-w] [-M module] [-u user] [[-m mailto] ...] [[-R replyto] ...] [-f logfile]
+# -d - turn on debugging
+# -m mailto - send mail to "mailto" (multiple)
+# -R replyto - set the "Reply-To:" to "replyto" (multiple)
+# -M modulename - set module name to "modulename"
+# -f logfile - write commit messages to logfile too
+# -s - *don't* run "cvs status -v" for each file
+# -w - show working directory with log message
+# -u user - $USER passed from loginfo
+
+#
+# Configurable options
+#
+
+# set this to something that takes a whole message on stdin
+$MAILER = "/usr/lib/sendmail -t";
+
+#
+# End user configurable options.
+#
+
+# Constants (don't change these!)
+#
+$STATE_NONE = 0;
+$STATE_CHANGED = 1;
+$STATE_ADDED = 2;
+$STATE_REMOVED = 3;
+$STATE_LOG = 4;
+
+$LAST_FILE = "/tmp/#cvs.lastdir";
+
+$CHANGED_FILE = "/tmp/#cvs.files.changed";
+$ADDED_FILE = "/tmp/#cvs.files.added";
+$REMOVED_FILE = "/tmp/#cvs.files.removed";
+$LOG_FILE = "/tmp/#cvs.files.log";
+
+$FILE_PREFIX = "#cvs.files";
+
+#
+# Subroutines
+#
+
+sub cleanup_tmpfiles {
+ local($wd, @files);
+
+ $wd = `pwd`;
+ chdir("/tmp") || die("Can't chdir('/tmp')\n");
+ opendir(DIR, ".");
+ push(@files, grep(/^$FILE_PREFIX\..*\.$id$/, readdir(DIR)));
+ closedir(DIR);
+ foreach (@files) {
+ unlink $_;
+ }
+ unlink $LAST_FILE . "." . $id;
+
+ chdir($wd);
+}
+
+sub write_logfile {
+ local($filename, @lines) = @_;
+
+ open(FILE, ">$filename") || die("Cannot open log file $filename.\n");
+ print FILE join("\n", @lines), "\n";
+ close(FILE);
+}
+
+sub append_to_logfile {
+ local($filename, @lines) = @_;
+
+ open(FILE, ">$filename") || die("Cannot open log file $filename.\n");
+ print FILE join("\n", @lines), "\n";
+ close(FILE);
+}
+
+sub format_names {
+ local($dir, @files) = @_;
+ local(@lines);
+
+ $format = "\t%-" . sprintf("%d", length($dir)) . "s%s ";
+
+ $lines[0] = sprintf($format, $dir, ":");
+
+ if ($debug) {
+ print STDERR "format_names(): dir = ", $dir, "; files = ", join(":", @files), ".\n";
+ }
+ foreach $file (@files) {
+ if (length($lines[$#lines]) + length($file) > 65) {
+ $lines[++$#lines] = sprintf($format, " ", " ");
+ }
+ $lines[$#lines] .= $file . " ";
+ }
+
+ @lines;
+}
+
+sub format_lists {
+ local(@lines) = @_;
+ local(@text, @files, $lastdir);
+
+ if ($debug) {
+ print STDERR "format_lists(): ", join(":", @lines), "\n";
+ }
+ @text = ();
+ @files = ();
+ $lastdir = shift @lines; # first thing is always a directory
+ if ($lastdir !~ /.*\/$/) {
+ die("Damn, $lastdir doesn't look like a directory!\n");
+ }
+ foreach $line (@lines) {
+ if ($line =~ /.*\/$/) {
+ push(@text, &format_names($lastdir, @files));
+ $lastdir = $line;
+ @files = ();
+ } else {
+ push(@files, $line);
+ }
+ }
+ push(@text, &format_names($lastdir, @files));
+
+ @text;
+}
+
+sub append_names_to_file {
+ local($filename, $dir, @files) = @_;
+
+ if (@files) {
+ open(FILE, ">>$filename") || die("Cannot open file $filename.\n");
+ print FILE $dir, "\n";
+ print FILE join("\n", @files), "\n";
+ close(FILE);
+ }
+}
+
+sub read_line {
+ local($line);
+ local($filename) = @_;
+
+ open(FILE, "<$filename") || die("Cannot open file $filename.\n");
+ $line = <FILE>;
+ close(FILE);
+ chop($line);
+ $line;
+}
+
+sub read_logfile {
+ local(@text);
+ local($filename, $leader) = @_;
+
+ open(FILE, "<$filename");
+ while (<FILE>) {
+ chop;
+ push(@text, $leader.$_);
+ }
+ close(FILE);
+ @text;
+}
+
+sub build_header {
+ local($header);
+ local($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
+ $header = sprintf("CVSROOT:\t%s\nModule name:\t%s\nRepository:\t%s\nChanges by:\t%s@%s\t%02d/%02d/%02d %02d:%02d:%02d",
+ $cvsroot,
+ $modulename,
+ $dir,
+ $login, $hostdomain,
+ $year%100, $mon+1, $mday,
+ $hour, $min, $sec);
+}
+
+sub mail_notification {
+ local(@text) = @_;
+
+ # if only we had strftime()... stuff stolen from perl's ctime.pl:
+ local($[) = 0;
+
+ @DoW = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
+ @MoY = ('Jan','Feb','Mar','Apr','May','Jun',
+ 'Jul','Aug','Sep','Oct','Nov','Dec');
+
+ # Determine what time zone is in effect.
+ # Use GMT if TZ is defined as null, local time if TZ undefined.
+ # There's no portable way to find the system default timezone.
+ #
+ $TZ = defined($ENV{'TZ'}) ? ( $ENV{'TZ'} ? $ENV{'TZ'} : 'GMT' ) : '';
+
+ # Hack to deal with 'PST8PDT' format of TZ
+ # Note that this can't deal with all the esoteric forms, but it
+ # does recognize the most common: [:]STDoff[DST[off][,rule]]
+ #
+ if ($TZ =~ /^([^:\d+\-,]{3,})([+-]?\d{1,2}(:\d{1,2}){0,2})([^\d+\-,]{3,})?/) {
+ $TZ = $isdst ? $4 : $1;
+ $tzoff = sprintf("%05d", -($2) * 100);
+ }
+
+ # perl-4.036 doesn't have the $zone or $gmtoff...
+ ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst, $zone, $gmtoff) =
+ ($TZ eq 'GMT') ? gmtime(time) : localtime(time);
+
+ $year += ($year < 70) ? 2000 : 1900;
+
+ if ($gmtoff != 0) {
+ $tzoff = sprintf("%05d", ($gmtoff / 60) * 100);
+ }
+ if ($zone ne '') {
+ $TZ = $zone;
+ }
+
+ # ok, let's try....
+ $rfc822date = sprintf("%s, %2d %s %4d %2d:%02d:%02d %s (%s)",
+ $DoW[$wday], $mday, $MoY[$mon], $year,
+ $hour, $min, $sec, $tzoff, $TZ);
+
+ open(MAIL, "| $MAILER");
+ print MAIL "Date: " . $rfc822date . "\n";
+ print MAIL "Subject: CVS Update: " . $modulename . "\n";
+ print MAIL "To: " . $mailto . "\n";
+ print MAIL "Reply-To: " . $replyto . "\n";
+ print MAIL "\n";
+ print MAIL join("\n", @text), "\n";
+ close(MAIL);
+}
+
+sub write_commitlog {
+ local($logfile, @text) = @_;
+
+ open(FILE, ">>$logfile");
+ print FILE join("\n", @text), "\n";
+ close(FILE);
+}
+
+#
+# Main Body
+#
+
+# Initialize basic variables
+#
+$debug = 0;
+$id = getpgrp(); # note, you *must* use a shell which does setpgrp()
+$state = $STATE_NONE;
+chop($hostname = `hostname`);
+chop($domainname = `domainname`);
+if ($domainname !~ '^\..*') {
+ $domainname = '.' . $domainname;
+}
+$hostdomain = $hostname . $domainname;
+$cvsroot = $ENV{'CVSROOT'};
+$do_status = 1; # moderately useful
+$show_wd = 0; # useless in client/server
+$modulename = "";
+
+# parse command line arguments (file list is seen as one arg)
+#
+while (@ARGV) {
+ $arg = shift @ARGV;
+
+ if ($arg eq '-d') {
+ $debug = 1;
+ print STDERR "Debug turned on...\n";
+ } elsif ($arg eq '-m') {
+ if ($mailto eq '') {
+ $mailto = shift @ARGV;
+ } else {
+ $mailto = $mailto . ", " . shift @ARGV;
+ }
+ } elsif ($arg eq '-R') {
+ if ($replyto eq '') {
+ $replyto = shift @ARGV;
+ } else {
+ $replyto = $replyto . ", " . shift @ARGV;
+ }
+ } elsif ($arg eq '-M') {
+ $modulename = shift @ARGV;
+ } elsif ($arg eq '-u') {
+ $login = shift @ARGV;
+ } elsif ($arg eq '-s') {
+ $do_status = 0;
+ } elsif ($arg eq '-w') {
+ $show_wd = 1;
+ } elsif ($arg eq '-f') {
+ ($commitlog) && die("Too many '-f' args\n");
+ $commitlog = shift @ARGV;
+ } else {
+ ($donefiles) && die("Too many arguments! Check usage.\n");
+ $donefiles = 1;
+ @files = split(/ /, $arg);
+ }
+}
+if ($login eq '') {
+ $login = getlogin || (getpwuid($<))[0] || "nobody";
+}
+($mailto) || die("No mail recipient specified (use -m)\n");
+if ($replyto eq '') {
+ $replyto = $login;
+}
+
+# for now, the first "file" is the repository directory being committed,
+# relative to the $CVSROOT location
+#
+@path = split('/', $files[0]);
+
+# XXX There are some ugly assumptions in here about module names and
+# XXX directories relative to the $CVSROOT location -- really should
+# XXX read $CVSROOT/CVSROOT/modules, but that's not so easy to do, since
+# XXX we have to parse it backwards.
+# XXX
+# XXX Fortunately it's relatively easy for the user to specify the
+# XXX module name as appropriate with a '-M' via the directory
+# XXX matching in loginfo.
+#
+if ($modulename eq "") {
+ $modulename = $path[0]; # I.e. the module name == top-level dir
+}
+if ($#path == 0) {
+ $dir = ".";
+} else {
+ $dir = join('/', @path);
+}
+$dir = $dir . "/";
+
+if ($debug) {
+ print STDERR "module - ", $modulename, "\n";
+ print STDERR "dir - ", $dir, "\n";
+ print STDERR "path - ", join(":", @path), "\n";
+ print STDERR "files - ", join(":", @files), "\n";
+ print STDERR "id - ", $id, "\n";
+}
+
+# Check for a new directory first. This appears with files set as follows:
+#
+# files[0] - "path/name/newdir"
+# files[1] - "-"
+# files[2] - "New"
+# files[3] - "directory"
+#
+if ($files[2] =~ /New/ && $files[3] =~ /directory/) {
+ local(@text);
+
+ @text = ();
+ push(@text, &build_header());
+ push(@text, "");
+ push(@text, $files[0]);
+ push(@text, "");
+
+ while (<STDIN>) {
+ chop; # Drop the newline
+ push(@text, $_);
+ }
+
+ &mail_notification($mailto, @text);
+
+ exit 0;
+}
+
+# Check for an import command. This appears with files set as follows:
+#
+# files[0] - "path/name"
+# files[1] - "-"
+# files[2] - "Imported"
+# files[3] - "sources"
+#
+if ($files[2] =~ /Imported/ && $files[3] =~ /sources/) {
+ local(@text);
+
+ @text = ();
+ push(@text, &build_header());
+ push(@text, "");
+ push(@text, $files[0]);
+ push(@text, "");
+
+ while (<STDIN>) {
+ chop; # Drop the newline
+ push(@text, $_);
+ }
+
+ &mail_notification(@text);
+
+ exit 0;
+}
+
+# Iterate over the body of the message collecting information.
+#
+while (<STDIN>) {
+ chop; # Drop the newline
+
+ if (/^In directory/) {
+ if ($show_wd) { # useless in client/server mode
+ push(@log_lines, $_);
+ push(@log_lines, "");
+ }
+ next;
+ }
+
+ if (/^Modified Files/) { $state = $STATE_CHANGED; next; }
+ if (/^Added Files/) { $state = $STATE_ADDED; next; }
+ if (/^Removed Files/) { $state = $STATE_REMOVED; next; }
+ if (/^Log Message/) { $state = $STATE_LOG; next; }
+
+ s/^[ \t\n]+//; # delete leading whitespace
+ s/[ \t\n]+$//; # delete trailing whitespace
+
+ if ($state == $STATE_CHANGED) { push(@changed_files, split); }
+ if ($state == $STATE_ADDED) { push(@added_files, split); }
+ if ($state == $STATE_REMOVED) { push(@removed_files, split); }
+ if ($state == $STATE_LOG) { push(@log_lines, $_); }
+}
+
+# Strip leading and trailing blank lines from the log message. Also
+# compress multiple blank lines in the body of the message down to a
+# single blank line.
+#
+while ($#log_lines > -1) {
+ last if ($log_lines[0] ne "");
+ shift(@log_lines);
+}
+while ($#log_lines > -1) {
+ last if ($log_lines[$#log_lines] ne "");
+ pop(@log_lines);
+}
+for ($i = $#log_lines; $i > 0; $i--) {
+ if (($log_lines[$i - 1] eq "") && ($log_lines[$i] eq "")) {
+ splice(@log_lines, $i, 1);
+ }
+}
+
+if ($debug) {
+ print STDERR "Searching for log file index...";
+}
+# Find an index to a log file that matches this log message
+#
+for ($i = 0; ; $i++) {
+ local(@text);
+
+ last if (! -e "$LOG_FILE.$i.$id"); # the next available one
+ @text = &read_logfile("$LOG_FILE.$i.$id", "");
+ last if ($#text == -1); # nothing in this file, use it
+ last if (join(" ", @log_lines) eq join(" ", @text)); # it's the same log message as another
+}
+if ($debug) {
+ print STDERR " found log file at $i.$id, now writing tmp files.\n";
+}
+
+# Spit out the information gathered in this pass.
+#
+&append_names_to_file("$CHANGED_FILE.$i.$id", $dir, @changed_files);
+&append_names_to_file("$ADDED_FILE.$i.$id", $dir, @added_files);
+&append_names_to_file("$REMOVED_FILE.$i.$id", $dir, @removed_files);
+&write_logfile("$LOG_FILE.$i.$id", @log_lines);
+
+# Check whether this is the last directory. If not, quit.
+#
+if ($debug) {
+ print STDERR "Checking current dir against last dir.\n";
+}
+$_ = &read_line("$LAST_FILE.$id");
+
+if ($_ ne $cvsroot . "/" . $files[0]) {
+ if ($debug) {
+ print STDERR sprintf("Current directory %s is not last directory %s.\n", $cvsroot . "/" .$files[0], $_);
+ }
+ exit 0;
+}
+if ($debug) {
+ print STDERR sprintf("Current directory %s is last directory %s -- all commits done.\n", $files[0], $_);
+}
+
+#
+# End Of Commits!
+#
+
+# This is it. The commits are all finished. Lump everything together
+# into a single message, fire a copy off to the mailing list, and drop
+# it on the end of the Changes file.
+#
+
+#
+# Produce the final compilation of the log messages
+#
+@text = ();
+@status_txt = ();
+push(@text, &build_header());
+push(@text, "");
+
+for ($i = 0; ; $i++) {
+ last if (! -e "$LOG_FILE.$i.$id"); # we're done them all!
+ @lines = &read_logfile("$CHANGED_FILE.$i.$id", "");
+ if ($#lines >= 0) {
+ push(@text, "Modified files:");
+ push(@text, &format_lists(@lines));
+ }
+ @lines = &read_logfile("$ADDED_FILE.$i.$id", "");
+ if ($#lines >= 0) {
+ push(@text, "Added files:");
+ push(@text, &format_lists(@lines));
+ }
+ @lines = &read_logfile("$REMOVED_FILE.$i.$id", "");
+ if ($#lines >= 0) {
+ push(@text, "Removed files:");
+ push(@text, &format_lists(@lines));
+ }
+ if ($#text >= 0) {
+ push(@text, "");
+ }
+ @lines = &read_logfile("$LOG_FILE.$i.$id", "\t");
+ if ($#lines >= 0) {
+ push(@text, "Log message:");
+ push(@text, @lines);
+ push(@text, "");
+ }
+ if ($do_status) {
+ local(@changed_files);
+
+ @changed_files = ();
+ push(@changed_files, &read_logfile("$CHANGED_FILE.$i.$id", ""));
+ push(@changed_files, &read_logfile("$ADDED_FILE.$i.$id", ""));
+ push(@changed_files, &read_logfile("$REMOVED_FILE.$i.$id", ""));
+
+ if ($debug) {
+ print STDERR "main: pre-sort changed_files = ", join(":", @changed_files), ".\n";
+ }
+ sort(@changed_files);
+ if ($debug) {
+ print STDERR "main: post-sort changed_files = ", join(":", @changed_files), ".\n";
+ }
+
+ foreach $dofile (@changed_files) {
+ if ($dofile =~ /\/$/) {
+ next; # ignore the silly "dir" entries
+ }
+ if ($debug) {
+ print STDERR "main(): doing 'cvs -nQq status -v $dofile'\n";
+ }
+ open(STATUS, "-|") || exec 'cvs', '-nQq', 'status', '-v', $dofile;
+ while (<STATUS>) {
+ chop;
+ push(@status_txt, $_);
+ }
+ }
+ }
+}
+
+# Write to the commitlog file
+#
+if ($commitlog) {
+ &write_commitlog($commitlog, @text);
+}
+
+if ($#status_txt >= 0) {
+ push(@text, @status_txt);
+}
+
+# Mailout the notification.
+#
+&mail_notification(@text);
+
+# cleanup
+#
+if (! $debug) {
+ &cleanup_tmpfiles();
+}
+
+exit 0;
diff --git a/contrib/cvs/contrib/mfpipe.in b/contrib/cvs/contrib/mfpipe.in
new file mode 100755
index 000000000000..1ecceb069018
--- /dev/null
+++ b/contrib/cvs/contrib/mfpipe.in
@@ -0,0 +1,85 @@
+#! @PERL@
+# -*-Perl-*-
+#
+# From: clyne@niwot.scd.ucar.EDU (John Clyne)
+# Date: Fri, 28 Feb 92 09:54:21 MST
+#
+# BTW, i wrote a perl script that is similar to 'nfpipe' except that in
+# addition to logging to a file it provides a command line option for mailing
+# change notices to a group of users. Obviously you probably wouldn't want
+# to mail every change. But there may be certain directories that are commonly
+# accessed by a group of users who would benefit from an email notice.
+# Especially if they regularly beat on the same directory. Anyway if you
+# think anyone would be interested here it is.
+#
+# File: mfpipe
+#
+# Author: John Clyne
+# National Center for Atmospheric Research
+# PO 3000, Boulder, Colorado
+#
+# Date: Wed Feb 26 18:34:53 MST 1992
+#
+# Description: Tee standard input to mail a list of users and to
+# a file. Used by CVS logging.
+#
+# Usage: mfpipe [-f file] [user@host...]
+#
+# Environment: CVSROOT
+# Path to CVS root.
+#
+# Files:
+#
+#
+# Options: -f file
+# Capture output to 'file'
+#
+
+$header = "Log Message:\n";
+
+$mailcmd = "| mail -s 'CVS update notice'";
+$whoami = `whoami`;
+chop $whoami;
+$date = `date`;
+chop $date;
+
+$cvsroot = $ENV{'CVSROOT'};
+
+while (@ARGV) {
+ $arg = shift @ARGV;
+
+ if ($arg eq '-f') {
+ $file = shift @ARGV;
+ }
+ else {
+ $users = "$users $arg";
+ }
+}
+
+if ($users) {
+ $mailcmd = "$mailcmd $users";
+ open(MAIL, $mailcmd) || die "Execing $mail: $!\n";
+}
+
+if ($file) {
+ $logfile = "$cvsroot/LOG/$file";
+ open(FILE, ">> $logfile") || die "Opening $logfile: $!\n";
+}
+
+print FILE "$whoami $date--------BEGIN LOG ENTRY-------------\n" if ($logfile);
+
+while (<>) {
+ print FILE $log if ($log && $logfile);
+
+ print FILE $_ if ($logfile);
+ print MAIL $_ if ($users);
+
+ $log = "log: " if ($_ eq $header);
+}
+
+close FILE;
+die "Write failed" if $?;
+close MAIL;
+die "Mail failed" if $?;
+
+exit 0;
diff --git a/contrib/cvs/contrib/rcslock.in b/contrib/cvs/contrib/rcslock.in
new file mode 100755
index 000000000000..e17356b9b1cb
--- /dev/null
+++ b/contrib/cvs/contrib/rcslock.in
@@ -0,0 +1,235 @@
+#! @PERL@
+# -*-Perl-*-
+
+# Author: John Rouillard (rouilj@cs.umb.edu)
+# Supported: Yeah right. (Well what do you expect for 2 hours work?)
+# Blame-to: rouilj@cs.umb.edu
+# Complaints to: Anybody except Brian Berliner, he's blameless for
+# this script.
+# Acknowlegements: The base code for this script has been acquired
+# from the log.pl script.
+
+# rcslock.pl - A program to prevent commits when a file to be ckecked
+# in is locked in the repository.
+
+# There are times when you need exclusive access to a file. This
+# often occurs when binaries are checked into the repository, since
+# cvs's (actually rcs's) text based merging mechanism won't work. This
+# script allows you to use the rcs lock mechanism (rcs -l) to make
+# sure that no changes to a repository are able to be committed if
+# those changes would result in a locked file being changed.
+
+# WARNING:
+# This script will work only if locking is set to strict.
+#
+
+# Setup:
+# Add the following line to the commitinfo file:
+
+# ALL /local/location/for/script/lockcheck [options]
+
+# Where ALL is replaced by any suitable regular expression.
+# Options are -v for verbose info, or -d for debugging info.
+# The %s will provide the repository directory name and the names of
+# all changed files.
+
+# Use:
+# When a developer needs exclusive access to a version of a file, s/he
+# should use "rcs -l" in the repository tree to lock the version they
+# are working on. CVS will automagically release the lock when the
+# commit is performed.
+
+# Method:
+# An "rlog -h" is exec'ed to give info on all about to be
+# committed files. This (header) information is parsed to determine
+# if any locks are outstanding and what versions of the file are
+# locked. This filename, version number info is used to index an
+# associative array. All of the files to be committed are checked to
+# see if any locks are outstanding. If locks are outstanding, the
+# version number of the current file (taken from the CVS/Entries
+# subdirectory) is used in the key to determine if that version is
+# locked. If the file being checked in is locked by the person doing
+# the checkin, the commit is allowed, but if the lock is held on that
+# version of a file by another person, the commit is not allowed.
+
+$ext = ",v"; # The extension on your rcs files.
+
+$\="\n"; # I hate having to put \n's at the end of my print statements
+$,=' '; # Spaces should occur between arguments to print when printed
+
+# turn off setgid
+#
+$) = $(;
+
+#
+# parse command line arguments
+#
+require 'getopts.pl';
+
+&Getopts("vd"); # verbose or debugging
+
+# Verbose is useful when debugging
+$opt_v = $opt_d if defined $opt_d;
+
+# $files[0] is really the name of the subdirectory.
+# @files = split(/ /,$ARGV[0]);
+@files = @ARGV[0..$#ARGV];
+$cvsroot = $ENV{'CVSROOT'};
+
+#
+# get login name
+#
+$login = getlogin || (getpwuid($<))[0] || "nobody";
+
+#
+# save the current directory since we have to return here to parse the
+# CVS/Entries file if a lock is found.
+#
+$pwd = `/bin/pwd`;
+chop $pwd;
+
+print "Starting directory is $pwd" if defined $opt_d ;
+
+#
+# cd to the repository directory and check on the files.
+#
+print "Checking directory ", $files[0] if defined $opt_v ;
+
+if ( $files[0] =~ /^\// )
+{
+ print "Directory path is $files[0]" if defined $opt_d ;
+ chdir $files[0] || die "Can't change to repository directory $files[0]" ;
+}
+else
+{
+ print "Directory path is $cvsroot/$files[0]" if defined $opt_d ;
+ chdir ($cvsroot . "/" . $files[0]) ||
+ die "Can't change to repository directory $files[0] in $cvsroot" ;
+}
+
+
+# Open the rlog process and apss all of the file names to that one
+# process to cut down on exec overhead. This may backfire if there
+# are too many files for the system buffer to handle, but if there are
+# that many files, chances are that the cvs repository is not set up
+# cleanly.
+
+print "opening rlog -h @files[1..$#files] |" if defined $opt_d;
+
+open( RLOG, "rlog -h @files[1..$#files] |") || die "Can't run rlog command" ;
+
+# Create the locks associative array. The elements in the array are
+# of two types:
+#
+# The name of the RCS file with a value of the total number of locks found
+# for that file,
+# or
+#
+# The name of the rcs file concatenated with the version number of the lock.
+# The value of this element is the name of the locker.
+
+# The regular expressions used to split the rcs info may have to be changed.
+# The current ones work for rcs 5.6.
+
+$lock = 0;
+
+while (<RLOG>)
+{
+ chop;
+ next if /^$/; # ditch blank lines
+
+ if ( $_ =~ /^RCS file: (.*)$/ )
+ {
+ $curfile = $1;
+ next;
+ }
+
+ if ( $_ =~ /^locks: strict$/ )
+ {
+ $lock = 1 ;
+ next;
+ }
+
+ if ( $lock )
+ {
+ # access list: is the line immediately following the list of locks.
+ if ( /^access list:/ )
+ { # we are done getting lock info for this file.
+ $lock = 0;
+ }
+ else
+ { # We are accumulating lock info.
+
+ # increment the lock count
+ $locks{$curfile}++;
+ # save the info on the version that is locked. $2 is the
+ # version number $1 is the name of the locker.
+ $locks{"$curfile" . "$2"} = $1
+ if /[ ]*([a-zA-Z._]*): ([0-9.]*)$/;
+
+ print "lock by $1 found on $curfile version $2" if defined $opt_d;
+
+ }
+ }
+}
+
+# Lets go back to the starting directory and see if any locked files
+# are ones we are interested in.
+
+chdir $pwd;
+
+# fo all of the file names (remember $files[0] is the directory name
+foreach $i (@files[1..$#files])
+{
+ if ( defined $locks{$i . $ext} )
+ { # well the file has at least one lock outstanding
+
+ # find the base version number of our file
+ &parse_cvs_entry($i,*entry);
+
+ # is our version of this file locked?
+ if ( defined $locks{$i . $ext . $entry{"version"}} )
+ { # if so, it is by us?
+ if ( $login ne ($by = $locks{$i . $ext . $entry{"version"}}) )
+ {# crud somebody else has it locked.
+ $outstanding_lock++ ;
+ print "$by has file $i locked for version " , $entry{"version"};
+ }
+ else
+ { # yeah I have it locked.
+ print "You have a lock on file $i for version " , $entry{"version"}
+ if defined $opt_v;
+ }
+ }
+ }
+}
+
+exit $outstanding_lock;
+
+
+### End of main program
+
+sub parse_cvs_entry
+{ # a very simple minded hack at parsing an entries file.
+local ( $file, *entry ) = @_;
+local ( @pp );
+
+
+open(ENTRIES, "< CVS/Entries") || die "Can't open entries file";
+
+while (<ENTRIES>)
+ {
+ if ( $_ =~ /^\/$file\// )
+ {
+ @pp = split('/');
+
+ $entry{"name"} = $pp[1];
+ $entry{"version"} = $pp[2];
+ $entry{"dates"} = $pp[3];
+ $entry{"name"} = $pp[4];
+ $entry{"name"} = $pp[5];
+ $entry{"sticky"} = $pp[6];
+ return;
+ }
+ }
+}
diff --git a/contrib/cvs/contrib/sccs2rcs.in b/contrib/cvs/contrib/sccs2rcs.in
new file mode 100755
index 000000000000..018b4ff48c7e
--- /dev/null
+++ b/contrib/cvs/contrib/sccs2rcs.in
@@ -0,0 +1,281 @@
+#! @CSH@ -f
+#
+# Sccs2rcs is a script to convert an existing SCCS
+# history into an RCS history without losing any of
+# the information contained therein.
+# It has been tested under the following OS's:
+# SunOS 3.5, 4.0.3, 4.1
+# Ultrix-32 2.0, 3.1
+#
+# Things to note:
+# + It will NOT delete or alter your ./SCCS history under any circumstances.
+#
+# + Run in a directory where ./SCCS exists and where you can
+# create ./RCS
+#
+# + /usr/local/bin is put in front of the default path.
+# (SCCS under Ultrix is set-uid sccs, bad bad bad, so
+# /usr/local/bin/sccs here fixes that)
+#
+# + Date, time, author, comments, branches, are all preserved.
+#
+# + If a command fails somewhere in the middle, it bombs with
+# a message -- remove what it's done so far and try again.
+# "rm -rf RCS; sccs unedit `sccs tell`; sccs clean"
+# There is no recovery and exit is far from graceful.
+# If a particular module is hanging you up, consider
+# doing it separately; move it from the current area so that
+# the next run will have a better chance or working.
+# Also (for the brave only) you might consider hacking
+# the s-file for simpler problems: I've successfully changed
+# the date of a delta to be in sync, then run "sccs admin -z"
+# on the thing.
+#
+# + After everything finishes, ./SCCS will be moved to ./old-SCCS.
+#
+# This file may be copied, processed, hacked, mutilated, and
+# even destroyed as long as you don't tell anyone you wrote it.
+#
+# Ken Cox
+# Viewlogic Systems, Inc.
+# kenstir@viewlogic.com
+# ...!harvard!cg-atla!viewlog!kenstir
+#
+# Various hacks made by Brian Berliner before inclusion in CVS contrib area.
+
+
+#we'll assume the user set up the path correctly
+# for the Pmax, /usr/ucb/sccs is suid sccs, what a pain
+# /usr/local/bin/sccs should override /usr/ucb/sccs there
+set path = (/usr/local/bin $path)
+
+
+############################################################
+# Error checking
+#
+if (! -w .) then
+ echo "Error: ./ not writeable by you."
+ exit 1
+endif
+if (! -d SCCS) then
+ echo "Error: ./SCCS directory not found."
+ exit 1
+endif
+set edits = (`sccs tell`)
+if ($#edits) then
+ echo "Error: $#edits file(s) out for edit...clean up before converting."
+ exit 1
+endif
+if (-d RCS) then
+ echo "Warning: RCS directory exists"
+ if (`ls -a RCS | wc -l` > 2) then
+ echo "Error: RCS directory not empty
+ exit 1
+ endif
+else
+ mkdir RCS
+endif
+
+sccs clean
+
+set logfile = /tmp/sccs2rcs_$$_log
+rm -f $logfile
+set tmpfile = /tmp/sccs2rcs_$$_tmp
+rm -f $tmpfile
+set emptyfile = /tmp/sccs2rcs_$$_empty
+echo -n "" > $emptyfile
+set initialfile = /tmp/sccs2rcs_$$_init
+echo "Initial revision" > $initialfile
+set sedfile = /tmp/sccs2rcs_$$_sed
+rm -f $sedfile
+set revfile = /tmp/sccs2rcs_$$_rev
+rm -f $revfile
+
+# the quotes surround the dollar signs to fool RCS when I check in this script
+set sccs_keywords = (\
+ '%W%[ ]*%G%'\
+ '%W%[ ]*%E%'\
+ '%W%'\
+ '%Z%%M%[ ]*%I%[ ]*%G%'\
+ '%Z%%M%[ ]*%I%[ ]*%E%'\
+ '%M%[ ]*%I%[ ]*%G%'\
+ '%M%[ ]*%I%[ ]*%E%'\
+ '%M%'\
+ '%I%'\
+ '%G%'\
+ '%E%'\
+ '%U%')
+set rcs_keywords = (\
+ '$'Id'$'\
+ '$'Id'$'\
+ '$'Id'$'\
+ '$'SunId'$'\
+ '$'SunId'$'\
+ '$'Id'$'\
+ '$'Id'$'\
+ '$'RCSfile'$'\
+ '$'Revision'$'\
+ '$'Date'$'\
+ '$'Date'$'\
+ '')
+
+
+############################################################
+# Get some answers from user
+#
+echo ""
+echo "Do you want to be prompted for a description of each"
+echo "file as it is checked in to RCS initially?"
+echo -n "(y=prompt for description, n=null description) [y] ?"
+set ans = $<
+if ((_$ans == _) || (_$ans == _y) || (_$ans == _Y)) then
+ set nodesc = 0
+else
+ set nodesc = 1
+endif
+echo ""
+echo "The default keyword substitutions are as follows and are"
+echo "applied in the order specified:"
+set i = 1
+while ($i <= $#sccs_keywords)
+# echo ' '\"$sccs_keywords[$i]\"' ==> '\"$rcs_keywords[$i]\"
+ echo " $sccs_keywords[$i] ==> $rcs_keywords[$i]"
+ @ i = $i + 1
+end
+echo ""
+echo -n "Do you want to change them [n] ?"
+set ans = $<
+if ((_$ans != _) && (_$ans != _n) && (_$ans != _N)) then
+ echo "You can't always get what you want."
+ echo "Edit this script file and change the variables:"
+ echo ' $sccs_keywords'
+ echo ' $rcs_keywords'
+else
+ echo "good idea."
+endif
+
+# create the sed script
+set i = 1
+while ($i <= $#sccs_keywords)
+ echo "s,$sccs_keywords[$i],$rcs_keywords[$i],g" >> $sedfile
+ @ i = $i + 1
+end
+
+onintr ERROR
+
+############################################################
+# Loop over every s-file in SCCS dir
+#
+foreach sfile (SCCS/s.*)
+ # get rid of the "s." at the beginning of the name
+ set file = `echo $sfile:t | sed -e "s/^..//"`
+
+ # work on each rev of that file in ascending order
+ set firsttime = 1
+ sccs prs $file | grep "^D " | awk '{print $2}' | sed -e 's/\./ /g' | sort -n -u +0 +1 +2 +3 +4 +5 +6 +7 +8 | sed -e 's/ /./g' > $revfile
+ foreach rev (`cat $revfile`)
+ if ($status != 0) goto ERROR
+
+ # get file into current dir and get stats
+ set year = `echo $date | cut -c3-4`
+ if ($year < 70) then
+ # Y2K Bug, change century to 20
+ set date = `sccs prs -r$rev $file | grep "^D " | awk '{printf("20%s %s", $3, $4); exit}'`
+ else
+ set date = `sccs prs -r$rev $file | grep "^D " | awk '{printf("19%s %s", $3, $4); exit}'`
+ endif
+ set author = `sccs prs -r$rev $file | grep "^D " | awk '{print $5; exit}'`
+ echo ""
+ echo "==> file $file, rev=$rev, date=$date, author=$author"
+ sccs edit -r$rev $file >>& $logfile
+ if ($status != 0) goto ERROR
+ echo checked out of SCCS
+
+ # add RCS keywords in place of SCCS keywords
+ sed -f $sedfile $file > $tmpfile
+ if ($status != 0) goto ERROR
+ echo performed keyword substitutions
+ cp $tmpfile $file
+
+ # check file into RCS
+ if ($firsttime) then
+ set firsttime = 0
+ if ($nodesc) then
+ echo about to do ci
+ echo ci -f -r$rev -d"$date" -w$author -t$emptyfile $file
+ ci -f -r$rev -d"$date" -w$author -t$emptyfile $file < $initialfile >>& $logfile
+ if ($status != 0) goto ERROR
+ echo initial rev checked into RCS without description
+ else
+ echo ""
+ echo Enter a brief description of the file $file \(end w/ Ctrl-D\):
+ cat > $tmpfile
+ ci -f -r$rev -d"$date" -w$author -t$tmpfile $file < $initialfile >>& $logfile
+ if ($status != 0) goto ERROR
+ echo initial rev checked into RCS
+ endif
+ else
+ # get RCS lock
+ set lckrev = `echo $rev | sed -e 's/\.[0-9]*$//'`
+ if ("$lckrev" =~ [0-9]*.*) then
+ # need to lock the brach -- it is OK if the lock fails
+ rcs -l$lckrev $file >>& $logfile
+ else
+ # need to lock the trunk -- must succeed
+ rcs -l $file >>& $logfile
+ if ($status != 0) goto ERROR
+ endif
+ echo got lock
+ sccs prs -r$rev $file | grep "." > $tmpfile
+ # it's OK if grep fails here and gives status == 1
+ # put the delta message in $tmpfile
+ ed $tmpfile >>& $logfile <<EOF
+/COMMENTS
+1,.d
+w
+q
+EOF
+ ci -f -r$rev -d"$date" -w$author $file < $tmpfile >>& $logfile
+ if ($status != 0) goto ERROR
+ echo checked into RCS
+ endif
+ sccs unedit $file >>& $logfile
+ if ($status != 0) goto ERROR
+ end
+ rm -f $file
+end
+
+
+############################################################
+# Clean up
+#
+echo cleaning up...
+mv SCCS old-SCCS
+rm -f $tmpfile $emptyfile $initialfile $sedfile
+echo ===================================================
+echo " Conversion Completed Successfully"
+echo ""
+echo " SCCS history now in old-SCCS/"
+echo ===================================================
+set exitval = 0
+goto cleanup
+
+ERROR:
+foreach f (`sccs tell`)
+ sccs unedit $f
+end
+echo ""
+echo ""
+echo Danger\! Danger\!
+echo Some command exited with a non-zero exit status.
+echo Log file exists in $logfile.
+echo ""
+echo Incomplete history in ./RCS -- remove it
+echo Original unchanged history in ./SCCS
+set exitval = 1
+
+cleanup:
+# leave log file
+rm -f $tmpfile $emptyfile $initialfile $sedfile $revfile
+
+exit $exitval
diff --git a/contrib/cvs/depcomp b/contrib/cvs/depcomp
new file mode 100755
index 000000000000..86774be1e7cd
--- /dev/null
+++ b/contrib/cvs/depcomp
@@ -0,0 +1,358 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay!
+ "$@" -MT "$object" -MF "$tmpdepfile" -MD -MP
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ rm -f "$depfile"
+ cp "$tmpdepfile" "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file.
+ tr ' ' '
+' < "$tmpdepfile" | \
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' -e '/^#/d' | sed -e 's/$/ :/' >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file.
+ tmpdepfile=`echo "$object" | sed 's/\(.*\)\..*$/\1.u/'`
+ if test "$libtool" = yes; then
+ "$@" -Wc,-M
+ else
+ "$@" -M
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then
+ rm -f "$depfile"
+ cp "$tmpdepfile" "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file.
+ tr ' ' '
+' < "$tmpdepfile" | \
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ test -z "$dashmflag" && dashmflag=-M
+ ( IFS=" "
+ case " $* " in
+ *" --mode=compile "*) # this is libtool, let us make it quiet
+ for arg
+ do # cycle over the arguments
+ case "$arg" in
+ "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+ esac
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # "$arg"
+ done
+ ;;
+ esac
+ "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ # X makedepend
+ (
+ shift
+ cleared=no
+ for arg in "$@"; do
+ case $cleared in no)
+ set ""; shift
+ cleared=yes
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift;;
+ -*)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift;;
+ esac
+ done
+ obj_suffix="`echo $object | sed 's/^.*\././'`"
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tail +3 "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ ( IFS=" "
+ case " $* " in
+ *" --mode=compile "*)
+ for arg
+ do # cycle over the arguments
+ case $arg in
+ "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+ esac
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # "$arg"
+ done
+ ;;
+ esac
+ "$@" -E |
+ sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the proprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ ( IFS=" "
+ case " $* " in
+ *" --mode=compile "*)
+ for arg
+ do # cycle over the arguments
+ case $arg in
+ "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+ esac
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # "$arg"
+ done
+ ;;
+ esac
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ ) &
+ proc=$!
+ "$@"
+ stat=$?
+ wait "$proc"
+ if test "$stat" != 0; then exit $stat; fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/contrib/cvs/diff/ChangeLog b/contrib/cvs/diff/ChangeLog
index e3272e84c2dd..565bdb781780 100644
--- a/contrib/cvs/diff/ChangeLog
+++ b/contrib/cvs/diff/ChangeLog
@@ -1,3 +1,70 @@
+2001-04-25 Derek Price <dprice@collab.net>
+
+ * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400.
+
+2001-03-24 Noel Cragg <noel@shave.red-bean.com>
+
+ * diff.c: fix typo in usage string.
+
+2001-03-20 Derek Price <derek.price@openavenue.com>
+ for Karl Tomlinson <k.tomlinson@auckland.ac.nz>
+
+ * diff3.c (main): changed the common file of the two diffs to
+ OLDFILE for merges and edscripts so that the diffs are more likely
+ to contain the intended changes. Not changing the horizon-lines
+ arg for the second diff. If the two diffs have the same parameters
+ equal changes in each diff are more likely to appear the same.
+
+ * analyze.c (shift_boundaries): undid Paul Eggert's patch to fix
+ the diff3 merge bug described in ccvs/doc/DIFFUTILS-2.7-BUG. The
+ patch is no longer necessary now that diff3 does its differences
+ differently. I think the hunk merges provide a better indication
+ of the area modified by the user now that the diffs are actually
+ done between the appropriate revisions.
+
+2001-03-15 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (INCLUDES): Add -I$(top_srcdir)/lib for platforms which
+ need the regex library there.
+
+ * Makefile.in: Regenerated.
+
+2001-03-14 Derek Price <derek.price@openavenue.com>
+
+ * .cvsignore: Added '.deps'.
+
+ Pavel Roskin <proski@gnu.org>
+
+ * Makefile.am: New file.
+ * Makefile.in: Regenerated.
+
+2001-02-22 Derek Price <derek.price@openavenue.com>
+ Pavel Roskin <proski@gnu.org>
+
+ * Makefile.in: Don't define PR_PROGRAM - it's defined by configure.
+ Remove separate rule for util.c.
+
+2001-02-06 Derek Price <derek.price@openavenue.com>
+ Rex Jolliff <Rex_Jolliff@notes.ymp.gov>
+ Shawn Smith <Shawn_Smith@notes.ymp.gov>
+
+ * dir.c: Replace opendir, closedir, & readdir calls with CVS_OPENDIR,
+ CVS_CLOSEDIR, & CVS_READDIR in support of changes to handle VMS DEC C
+ 5.7 {open,read,close}dir problems. Check today's entry in the vms
+ subdir for more.
+ * system.h: definitions of CVS_*DIR provided here.
+
+2000-12-21 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Some changes to support Automake targets
+
+2000-10-26 Larry Jones <larry.jones@sdrc.com>
+
+ * Makefile.in: Get PR_PROGRAM from autoconf instead of hard coding.
+ (Patch submitted by Urs Thuermann <urs@isnogud.escape.de>.)
+ Also add a dependency for util.o on Makefile since PR_PROGRAM gets
+ compiled in.
+
2000-08-03 Larry Jones <larry.jones@sdrc.com>
* diff3.c (read_diff): Use cvs_temp_name () instead of tmpnam () so
diff --git a/contrib/cvs/diff/Makefile.am b/contrib/cvs/diff/Makefile.am
new file mode 100644
index 000000000000..38ed80ed88b4
--- /dev/null
+++ b/contrib/cvs/diff/Makefile.am
@@ -0,0 +1,24 @@
+## Makefile.am for GNU DIFF
+## Copyright (C) 2001 Free Software Foundation, Inc.
+##
+## This file is part of GNU DIFF.
+##
+## GNU DIFF is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## GNU DIFF is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+INCLUDES = -I$(top_srcdir)/lib
+
+noinst_LIBRARIES = libdiff.a
+
+libdiff_a_SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c \
+ context.c ed.c normal.c ifdef.c util.c dir.c version.c diff.h \
+ side.c system.h diffrun.h
+
+EXTRA_DIST = ChangeLog build_diff.com diagmeet.note libdiff.dsp
diff --git a/contrib/cvs/diff/Makefile.in b/contrib/cvs/diff/Makefile.in
index 31f491020666..d9d1703d9a88 100644
--- a/contrib/cvs/diff/Makefile.in
+++ b/contrib/cvs/diff/Makefile.in
@@ -1,102 +1,327 @@
-# Makefile for GNU DIFF
-# Copyright (C) 1988,1989,1991,1992,1993,1994,1997,1998 Free Software Foundation, Inc.
-#
-# This file is part of GNU DIFF.
-#
-# GNU DIFF is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# GNU DIFF is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-#### Start of system configuration section. ####
-
-srcdir = @srcdir@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-subdir = diff
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
+
+INCLUDES = -I$(top_srcdir)/lib
+
+noinst_LIBRARIES = libdiff.a
+
+libdiff_a_SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c \
+ context.c ed.c normal.c ifdef.c util.c dir.c version.c diff.h \
+ side.c system.h diffrun.h
+
+
+EXTRA_DIST = ChangeLog build_diff.com diagmeet.note libdiff.dsp
+EXEEXT =
+OBJEXT = o
+subdir = diff
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+
+libdiff_a_AR = $(AR) cru
+libdiff_a_LIBADD =
+am_libdiff_a_OBJECTS = diff.$(OBJEXT) diff3.$(OBJEXT) analyze.$(OBJEXT) \
+ cmpbuf.$(OBJEXT) io.$(OBJEXT) context.$(OBJEXT) ed.$(OBJEXT) \
+ normal.$(OBJEXT) ifdef.$(OBJEXT) util.$(OBJEXT) dir.$(OBJEXT) \
+ version.$(OBJEXT) side.$(OBJEXT)
+libdiff_a_OBJECTS = $(am_libdiff_a_OBJECTS)
AR = ar
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CFLAGS = @CFLAGS@
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-CPPFLAGS = @CPPFLAGS@
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/src
DEFS = @DEFS@
-RANLIB = @RANLIB@
-CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+DIST_SOURCES = $(libdiff_a_SOURCES)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/analyze.Po $(DEPDIR)/cmpbuf.Po \
+@AMDEP_TRUE@ $(DEPDIR)/context.Po $(DEPDIR)/diff.Po \
+@AMDEP_TRUE@ $(DEPDIR)/diff3.Po $(DEPDIR)/dir.Po $(DEPDIR)/ed.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ifdef.Po $(DEPDIR)/io.Po \
+@AMDEP_TRUE@ $(DEPDIR)/normal.Po $(DEPDIR)/side.Po \
+@AMDEP_TRUE@ $(DEPDIR)/util.Po $(DEPDIR)/version.Po
+DIST_COMMON = ChangeLog Makefile.am Makefile.in
+SOURCES = $(libdiff_a_SOURCES)
+OBJECTS = $(am_libdiff_a_OBJECTS)
-prefix = @prefix@
-exec_prefix = @exec_prefix@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu diff/Makefile
-PR_PROGRAM = /bin/pr
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
-#### End of system configuration section. ####
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-SHELL = /bin/sh
+libdiff.a: $(libdiff_a_OBJECTS) $(libdiff_a_DEPENDENCIES)
+ -rm -f libdiff.a
+ $(libdiff_a_AR) libdiff.a $(libdiff_a_OBJECTS) $(libdiff_a_LIBADD)
+ $(RANLIB) libdiff.a
-# The source files for all of the programs.
-SOURCES = diff.c diff3.c analyze.c cmpbuf.c cmpbuf.h io.c context.c ed.c \
- normal.c ifdef.c util.c dir.c version.c diff.h side.c system.h \
- diffrun.h
-OBJECTS = diff.o diff3.o analyze.o cmpbuf.o dir.o io.o util.o \
- context.o ed.o ifdef.o normal.o side.o version.o
-DISTFILES = $(SOURCES) ChangeLog build_diff.com Makefile.in diagmeet.note \
- libdiff.dsp .cvsignore
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
-all: libdiff.a
+distclean-compile:
+ -rm -f *.tab.c
-# $(top_srcdir)/lib is so we don't get the system-supplied headers for
-# functions that we supply ourselves in lib. $(srcdir) is perhaps not
-# necessary if we assume the unix compiler behavior whereby "" looks
-# in the directory containing the .c file first.
-# -I. is probably unnecessary (I don't think we generate any .h files).
-# -I.. is for config.h.
-COMPILE = $(CC) -c $(CPPFLAGS) $(DEFS) \
- -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib $(CFLAGS)
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ unique=`for i in $$list @CONFIG@; 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)$$unique$(LISP)$$tags" \
+ || $(ETAGS) $(ETAGS_ARGS) $$tags $$unique $(LISP)
+
+GTAGS:
+ here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $$here
+
+distclean-tags:
+ -rm -f TAGS ID
+
+@_am_include@ @_am_quote@$(DEPDIR)/analyze.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/cmpbuf.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/context.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/diff.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/diff3.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/dir.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/ed.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/ifdef.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/io.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/normal.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/side.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/util.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/version.Po@_am_quote@
+
+distclean-depend:
+ -rm -rf $(DEPDIR)
+
+CCDEPMODE = @CCDEPMODE@
.c.o:
- $(COMPILE) $<
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
-libdiff libdiff.a: $(OBJECTS)
- $(AR) cr libdiff.a $(OBJECTS)
- -$(RANLIB) libdiff.a
+.c.obj:
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `cygpath -w $<`
-$(OBJECTS): diff.h diffrun.h system.h
-analyze.o cmpbuf.o: cmpbuf.h
-util.o: util.c
- $(COMPILE) -DPR_PROGRAM=\"$(PR_PROGRAM)\" $<
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-install: all
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
installdirs:
- @: nothing to do for installdirs
-.PHONY: installdirs
-TAGS: $(SOURCES)
- etags $(SOURCES)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-clean:
- rm -f *.o *.a core
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-mostlyclean: clean
+installcheck: installcheck-am
-distclean: clean
- rm -f TAGS tags Makefile
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-realclean: distclean
+mostlyclean-generic:
-Makefile: Makefile.in ../config.status
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f Makefile.in
+clean: clean-am
+
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-tags
+
+dvi:
+
+dvi-am:
+
+info:
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info:
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+.PHONY: all all-am check check-am clean clean-generic \
+ clean-noinstLIBRARIES distclean distclean-compile \
+ distclean-depend distclean-generic distclean-tags distdir dvi \
+ dvi-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-man install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic tags \
+ uninstall uninstall-am
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
- done
-# Prevent GNU make v3 from overflowing arg limit on SysV.
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/cvs/diff/analyze.c b/contrib/cvs/diff/analyze.c
index f2925946e38f..3262444e6b17 100644
--- a/contrib/cvs/diff/analyze.c
+++ b/contrib/cvs/diff/analyze.c
@@ -621,7 +621,9 @@ shift_boundaries (filevec)
struct file_data filevec[];
{
int f;
- int inhibit_hunk_merge = horizon_lines != context;
+
+ if (inhibit)
+ return;
for (f = 0; f < 2; f++)
{
@@ -664,21 +666,18 @@ shift_boundaries (filevec)
we can later determine whether the run has grown. */
runlength = i - start;
- if (! inhibit_hunk_merge)
- {
- /* Move the changed region back, so long as the
- previous unchanged line matches the last changed one.
- This merges with previous changed regions. */
+ /* Move the changed region back, so long as the
+ previous unchanged line matches the last changed one.
+ This merges with previous changed regions. */
- while (start && equivs[start - 1] == equivs[i - 1])
- {
- changed[--start] = 1;
- changed[--i] = 0;
- while (changed[start - 1])
- start--;
- while (other_changed[--j])
- continue;
- }
+ while (start && equivs[start - 1] == equivs[i - 1])
+ {
+ changed[--start] = 1;
+ changed[--i] = 0;
+ while (changed[start - 1])
+ start--;
+ while (other_changed[--j])
+ continue;
}
/* Set CORRESPONDING to the end of the changed run, at the last
@@ -686,15 +685,13 @@ shift_boundaries (filevec)
CORRESPONDING == I_END means no such point has been found. */
corresponding = other_changed[j - 1] ? i : i_end;
- /* Shift the changed region forward, so long as the
- first changed line matches the following unchanged one,
- but if INHIBIT_HUNK_MERGE is 1 do not shift if
- this would merge with another changed region.
+ /* Move the changed region forward, so long as the
+ first changed line matches the following unchanged one.
+ This merges with following changed regions.
Do this second, so that if there are no merges,
the changed region is moved forward as far as possible. */
- while (i != i_end && equivs[start] == equivs[i]
- && ! (inhibit_hunk_merge & other_changed[j + 1]))
+ while (i != i_end && equivs[start] == equivs[i])
{
changed[start++] = 0;
changed[i++] = 1;
diff --git a/contrib/cvs/diff/diff.c b/contrib/cvs/diff/diff.c
index aa91913fe61a..ebd78aebfd19 100644
--- a/contrib/cvs/diff/diff.c
+++ b/contrib/cvs/diff/diff.c
@@ -775,7 +775,7 @@ static char const * const option_help[] = {
"-e --ed Output an ed script.",
"-n --rcs Output an RCS format diff.",
"-y --side-by-side Output in two columns.",
-" -w NUM --width=NUM Output at most NUM (default 130) characters per line.",
+" -W NUM --width=NUM Output at most NUM (default 130) characters per line.",
" --left-column Output only the left column of common lines.",
" --suppress-common-lines Do not output common lines.",
"-DNAME --ifdef=NAME Output merged file to show `#ifdef NAME' diffs.",
diff --git a/contrib/cvs/diff/diff3.c b/contrib/cvs/diff/diff3.c
index 2f05d165fc92..4a6fba618c23 100644
--- a/contrib/cvs/diff/diff3.c
+++ b/contrib/cvs/diff/diff3.c
@@ -171,7 +171,7 @@ static int edscript;
static int flagging;
/* Number of lines to keep in identical prefix and suffix. */
-static int horizon_lines = 10;
+static int const horizon_lines = 10;
/* Use a tab to align output lines (-T). */
static int tab_align_flag;
@@ -370,28 +370,44 @@ diff3_run (argc, argv, out, callbacks_arg)
file0-file1 diffs didn't line up with the file0-file2 diffs
(which is entirely possible since we don't use diff's -n option),
diff3 might report phantom changes from file1 to file2. */
+ /* Also try to compare file0 to file1 because this is the where
+ changes are expected to come from. Diffing between these pairs
+ of files is is most likely to return the intended changes. There
+ can also be the same problem with phantom changes from file0 to
+ file1. */
+ /* Historically, the default common file was file2. Ediff for emacs
+ and possibly other applications, have therefore made file2 the
+ ancestor. So, for compatibility, if this is simply a three
+ way diff (not a merge or edscript) then use the old way with
+ file2 as the common file. */
+
+ {
+ int common;
+ if (edscript || merge )
+ {
+ common = 1;
+ }
+ else
+ {
+ common = 2;
+ }
+ if (strcmp (file[common], "-") == 0)
+ {
+ /* Sigh. We've got standard input as the arg corresponding to
+ the desired common file. We can't call diff twice on
+ stdin. Use another arg as the common file instead. */
+ common = 3 - common;
+ if (strcmp (file[0], "-") == 0 || strcmp (file[common], "-") == 0)
+ {
+ diff_error ("%s", "`-' specified for more than one input file", 0);
+ return 2;
+ }
+ }
- if (strcmp (file[2], "-") == 0)
- {
- /* Sigh. We've got standard input as the last arg. We can't
- call diff twice on stdin. Use the middle arg as the common
- file instead. */
- if (strcmp (file[0], "-") == 0 || strcmp (file[1], "-") == 0)
- {
- diff_error ("%s", "`-' specified for more than one input file", 0);
- return 2;
- }
- mapping[0] = 0;
- mapping[1] = 2;
- mapping[2] = 1;
- }
- else
- {
- /* Normal, what you'd expect */
- mapping[0] = 0;
- mapping[1] = 1;
- mapping[2] = 2;
- }
+ mapping[0] = 0;
+ mapping[1] = 3 - common;
+ mapping[2] = common;
+ }
for (i = 0; i < 3; i++)
rev_mapping[mapping[i]] = i;
@@ -444,12 +460,18 @@ diff3_run (argc, argv, out, callbacks_arg)
commonname = file[rev_mapping[FILEC]];
thread1 = process_diff (file[rev_mapping[FILE1]], commonname, &last_block,
&content1);
+ /* What is the intention behind determining horizon_lines from first
+ diff? I think it is better to use the same parameters for each
+ diff so that equal differences in each diff will appear the
+ same. */
+ /*
if (thread1)
for (i = 0; i < 2; i++)
{
horizon_lines = max (horizon_lines, D_NUMLINES (thread1, i));
horizon_lines = max (horizon_lines, D_NUMLINES (last_block, i));
}
+ */
thread0 = process_diff (file[rev_mapping[FILE0]], commonname, &last_block,
&content0);
diff3 = make_3way_diff (thread0, thread1);
@@ -1855,7 +1877,6 @@ initialize_main (argcp, argvp)
always_text = 0;
edscript = 0;
flagging = 0;
- horizon_lines = 10;
tab_align_flag = 0;
simple_only = 0;
overlap_only = 0;
diff --git a/contrib/cvs/diff/dir.c b/contrib/cvs/diff/dir.c
index fae74e82c653..da497dc4a6b6 100644
--- a/contrib/cvs/diff/dir.c
+++ b/contrib/cvs/diff/dir.c
@@ -61,7 +61,7 @@ dir_sort (dir, dirdata)
if (dir->desc != -1)
{
/* Open the directory and check for errors. */
- register DIR *reading = opendir (dir->name);
+ register DIR *reading = CVS_OPENDIR (dir->name);
if (!reading)
return -1;
@@ -74,7 +74,7 @@ dir_sort (dir, dirdata)
/* Read the directory entries, and insert the subfiles
into the `data' table. */
- while ((errno = 0, (next = readdir (reading)) != 0))
+ while ((errno = 0, (next = CVS_READDIR (reading)) != 0))
{
char *d_name = next->d_name;
size_t d_size = NAMLEN (next) + 1;
@@ -96,14 +96,14 @@ dir_sort (dir, dirdata)
if (errno)
{
int e = errno;
- closedir (reading);
+ CVS_CLOSEDIR (reading);
errno = e;
return -1;
}
#if CLOSEDIR_VOID
- closedir (reading);
+ CVS_CLOSEDIR (reading);
#else
- if (closedir (reading) != 0)
+ if (CVS_CLOSEDIR (reading) != 0)
return -1;
#endif
}
diff --git a/contrib/cvs/diff/system.h b/contrib/cvs/diff/system.h
index 76bc1631feec..f5037ecf70a9 100644
--- a/contrib/cvs/diff/system.h
+++ b/contrib/cvs/diff/system.h
@@ -269,3 +269,16 @@ extern int errno;
*(q)++ = '\''; \
}
#endif
+
+/* these come from CVS's lib/system.h, but I wasn't sure how to include that
+ * properly or even if I really should
+ */
+#ifndef CVS_OPENDIR
+#define CVS_OPENDIR opendir
+#endif
+#ifndef CVS_READDIR
+#define CVS_READDIR readdir
+#endif
+#ifndef CVS_CLOSEDIR
+#define CVS_CLOSEDIR closedir
+#endif
diff --git a/contrib/cvs/doc/CVSvn.texi.in b/contrib/cvs/doc/CVSvn.texi.in
new file mode 100644
index 000000000000..9cc02ea58982
--- /dev/null
+++ b/contrib/cvs/doc/CVSvn.texi.in
@@ -0,0 +1 @@
+@set CVSVN @VERSION@
diff --git a/contrib/cvs/doc/ChangeLog b/contrib/cvs/doc/ChangeLog
index 6a9206d58531..eca8f91f86e1 100644
--- a/contrib/cvs/doc/ChangeLog
+++ b/contrib/cvs/doc/ChangeLog
@@ -1,3 +1,148 @@
+2001-04-25 Derek Price <dprice@collab.net>
+
+ * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400.
+ * CVSvn.texi: Regenerated.
+
+2001-03-30 Larry Jones <larry.jones@sdrc.com>
+
+ * cvsclient.texi (Dates, Requests): Add rannotate and rlog.
+
+2001-03-26 Larry Jones <larry.jones@sdrc.com>
+
+ * cvs.texinfo (admin options): Fix typo: should be @pxref, not @xref.
+
+2001-03-26 Larry Jones <larry.jones@sdrc.com>
+
+ * cvs.texinfo (admin options): Update description of -u option to
+ refer back to notify.
+
+2001-03-23 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (ps): Make 'ps' an alias for 'doc'.
+ (doc, pdf, ps, txt): declare as '.PHONY'.
+
+ * Makefile.in: Regenerated.
+
+2001-03-23 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (MOSTLYCLEANFILES): Add cvs.cps & cvs.fns as a temporary
+ workaround for an Automake deficiency.
+
+ * Makefile.in: Regenerated.
+
+2001-03-14 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated
+
+2001-02-20 Larry Jones <larry.jones@sdrc.com>
+
+ * cvs.texinfo (BUGS): There's only one company listed now, not two.
+
+2001-02-13 Larry Jones <larry.jones@sdrc.com>
+
+ * cvs.texinfo (Password authentication server, First import): Use
+ @ref instead of @xref when not at the beginning of a sentence.
+
+2001-02-01 Larry Jones <larry.jones@sdrc.com>
+
+ * cvs.texinfo (Connection): Add still more notes about common
+ pserver error messages.
+
+2001-01-18 Derek Price <derek.price@openavenue.com>
+
+ * cvs.texinfo (Quick reference to CVS commands): add index entry for
+ version subcommand
+
+2001-01-18 Larry Jones <larry.jones@sdrc.com>
+
+ * cvs.texinfo (log options): Document new :: syntax for -r.
+
+2001-01-10 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (CVSvn.texi): specify $(srcdir) explicitly in target rule
+ so CVSvn.texi gets built properly for all makes.
+ (cvs_TEXINFOS): specify $(srcdir) explicitly for CVSvn.texi
+ (cvsclient_TEXINFOS): ditto
+ * Makefile.in: regenerated
+
+2000-12-26 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: update timestamp
+ * CVSvn.texi: ditto
+
+2000-12-26 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am: new target for creation of CVSvn.texi
+ (EXTRA_DIST): add CVSvn.texi.in & CVSvn.texi
+ * Makefile.in: Regenerated
+ * CVSvn.texi: new file
+ * .cvsignore: remove CVSvn.texi since it is now included in dist
+
+2000-12-22 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated
+
+2000-12-21 Derek Price <derek.price@openavenue.com>
+
+ * cvs-paper.ps: Backout accidental regeneration.
+
+2000-12-21 Derek Price <derek.price@openavenue.com>
+
+ * .cvsignore: Added *.pdf versions of the *.ps docs
+ * CVSvn.texi.in: Use configure to generate CVSvn.texi
+ * Makefile.am: New file needed by Automake
+ * Makefile.in: Regenerated
+ * cvs-paper.ps: Regenerated
+ * texinfo.tex: New file added to placate Automake. Apparently, its
+ inclusion is mandated by the GNU coding standards.
+
+2000-12-14 Derek Price <derek.price@openavenue.com>
+ Linus Tolke <linus@epact.se>
+
+ * cvs.texinfo (Merging a branch): changed some references to "BRANCH"
+ to "BRANCHNAME" for consistancy. Add a warning about merging using a
+ single tagname reference with an xref to "Merging adds and removals"
+ for the long explanation
+ (Merging adds and removals): Add the long explanation of why merging
+ from a single tagname can be tricky
+ (update): Add a warning about merging using a single tagname reference
+ with an xref to "Merging adds and removals" for the long explanation
+
+2000-11-13 Derek Price <derek.price@openavenue.com>
+
+ * cvs.texinfo: use '@sc{cvs}' instead of 'CVS' in various locations
+
+2000-11-08 Derek Price <derek.price@openavenue.com>
+
+ * cvs.texinfo (settitle): stick a 'v' in front of the version number
+ to make it harder to confuse with chapter, section, and page numbers.
+
+2000-11-08 Derek Price <derek.price@openavenue.com>
+
+ * cvs.texinfo (settitle): add the version number to the title string
+ so that it is easier to find on HTML pages and the like.
+
+2000-10-20 Jim Kingdon <http://sourceforge.net/users/kingdon/>
+
+ * cvs.texinfo (Variables): Document CVS_USER.
+
+2000-10-17 Derek Price <derek.price@openavenue.com>
+
+ * cvs.texinfo (Remote repositories): added a comment about specifying
+ a password in the repository name when performaing a checkout.
+
+2000-10-17 Derek Price <derek.price@openavenue.com>
+
+ * cvs.texinfo (Remote repositories, password authenticated, GSSAPI
+ authenticated, Kerberos authenticated, Environment variables):
+ Documented CVSROOT spec change & CVS_CLIENT_PORT.
+
+2000-10-10 Larry Jones <larry.jones@sdrc.com>
+
+ * cvs.texinfo (Connection): Add additional notes about common
+ pserver error messages. Remove information about unsetting $HOME
+ since CVS no longer pays any attention to it in server mode.
+
2000-09-07 Larry Jones <larry.jones@sdrc.com>
* Makefile.in: Use @bindir@, @libdir@, @infodir@, and @mandir@
diff --git a/contrib/cvs/doc/Makefile.am b/contrib/cvs/doc/Makefile.am
new file mode 100644
index 000000000000..7821058baa07
--- /dev/null
+++ b/contrib/cvs/doc/Makefile.am
@@ -0,0 +1,157 @@
+## Process this file with automake to produce Makefile.in
+# Makefile for GNU CVS documentation (excluding man pages - see ../man).
+# Copyright (C) 1986, 1988-1990, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+#DISTFILES = \
+# .cvsignore \
+# RCSFILES \
+
+# AUTOMAKE_OPTIONS = no-texinfo.tex
+
+# FIXME - these rebuild every 'make dist' with some BSD makes due to a bug
+# that prevents make from searching VPATH for targets. There is some
+# machinery in place in configure.in to work around this for some targets
+# (see the CVSvn.texi target below) now, but fixing the two info_TEXINFOS
+# targets below is probably going to require work on Automake
+info_TEXINFOS = cvs.texinfo cvsclient.texi
+cvs_TEXINFOS = CVSvn.texi
+cvsclient_TEXINFOS = CVSvn.texi
+
+POSTSCRIPTS = \
+ cvs.ps \
+ cvs-paper.ps \
+ cvsclient.ps
+
+PDFS = \
+ cvs-paper.pdf \
+ cvs.pdf \
+ cvsclient.pdf
+
+TXTS = \
+ cvs.txt \
+ cvsclient.txt
+
+EXTRA_DIST = \
+ $(POSTSCRIPTS) \
+ .cvsignore \
+ CVSvn.texi.in \
+ ChangeLog.fsf \
+ RCSFILES \
+ cvs-paper.ms \
+ cvs.aux \
+ cvsclient.aux
+
+# Listing cvs.cps & cvs.fns here is a workaround for an Automake deficiency
+MOSTLYCLEANFILES = \
+ cvs.cps \
+ cvs.fns
+
+CLEANFILES = \
+ $(PDFS) \
+ $(TXTS)
+
+MAINTAINERCLEANFILES = \
+ cvs-paper.ps
+
+doc ps: $(POSTSCRIPTS)
+.PHONY: doc ps
+
+pdf: $(PDFS)
+.PHONY: pdf
+
+txt: $(TXTS)
+.PHONY: txt
+
+dvi: cvs.dvi cvsclient.dvi
+.PHONY: dvi
+
+cvs.aux cvs.pdf cvs.txt: cvs.texinfo $(cvs_TEXINFOS)
+cvsclient.aux cvsclient.pdf cvsclient.txt: cvsclient.texi $(cvsclient_TEXINFOS)
+
+# These targets need to be very specific so that the other PDFs get generated correctly.
+# If they are more generic and cvs.ps is made before cvs.pdf, then cvs.pdf will be
+# generated from the generic target and the PS source, which contains less information
+# than the usual texinfo source.
+cvs-paper.pdf: cvs-paper.ps
+ $(ROFF) -t -p -ms -Tps $< > $@-t
+ mv $@-t $@
+
+cvs-paper.ps: cvs-paper.ms
+ $(PS2PDF) $< $@
+
+SUFFIXES = .aux .txt .pdf
+
+# texinfo based targets automake neglects to include
+.texinfo.pdf:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) --pdf $<
+.txi.pdf:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) --pdf $<
+.texi.pdf:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) --pdf $<
+
+.texinfo.aux:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+.txi.aux:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+.texi.aux:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.texinfo.txt:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(MAKEINFO) $< --no-headers -o $@
+.txi.txt:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(MAKEINFO) $< --no-headers -o $@
+.texi.txt:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(MAKEINFO) $< --no-headers -o $@
+
+## MAINTAINER Targets
+
+## CVSvn.texi ##
+# - CVSvn.texi needs to be updated only once, since it depends on
+# configure.in, not on the results of a 'configure' run.
+# - It is guaranteed (with GNU Make) that when the version in configure.in
+# is changed, acversion.m4 is built only after the new version number is
+# propagated to the Makefile. (Libtool uses the same guarantee.)
+# - Of the next three targets, only the next one or the following two should be
+# enabled, not all three
+if MAKE_TARGETS_IN_VPATH
+# - This is the target for systems without the BSD VPATH bug in make or with
+# $(srcdir) = $(builddir)
+CVSvn.texi: $(srcdir)/CVSvn.texi.in $(top_srcdir)/configure.in
+ sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/CVSvn.texi.in >$(srcdir)/CVSvn.ttexi
+ mv $(srcdir)/CVSvn.ttexi $(srcdir)/CVSvn.texi
+else
+# - The next two targets are a workaround for the fact that some BSD makes
+# don't look through VPATH for targets, but only for sources.
+# - They should be disabled on systems without the bug and in environments
+# where $(srcdir) = $(builddir)
+CVSvn.texi: $(srcdir)/CVSvn.texi
+ # use cat so the time stamp gets set properly
+ cat $(srcdir)/CVSvn.texi >$@
+$(srcdir)/CVSvn.texi: $(srcdir)/CVSvn.texi.in $(top_srcdir)/configure.in
+ sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/CVSvn.texi.in >$(srcdir)/CVSvn.ttexi
+ mv $(srcdir)/CVSvn.ttexi $(srcdir)/CVSvn.texi
+endif
+
+## realclean ##
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
diff --git a/contrib/cvs/doc/Makefile.in b/contrib/cvs/doc/Makefile.in
index b5da032bf224..a47f45d8b2cc 100644
--- a/contrib/cvs/doc/Makefile.in
+++ b/contrib/cvs/doc/Makefile.in
@@ -1,6 +1,20 @@
-# Makefile for GNU CVS documentation.
-# Do not use this makefile directly, but only from `../Makefile'.
-# Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Makefile for GNU CVS documentation (excluding man pages - see ../man).
+# Copyright (C) 1986, 1988-1990, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -12,186 +26,465 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-SHELL = /bin/sh
+#DISTFILES = \
+# .cvsignore \
+# RCSFILES \
+
+# AUTOMAKE_OPTIONS = no-texinfo.tex
+
+# FIXME - these rebuild every 'make dist' with some BSD makes due to a bug
+# that prevents make from searching VPATH for targets. There is some
+# machinery in place in configure.in to work around this for some targets
+# (see the CVSvn.texi target below) now, but fixing the two info_TEXINFOS
+# targets below is probably going to require work on Automake
+
+
+SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
-
prefix = @prefix@
exec_prefix = @exec_prefix@
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
-DISTFILES = \
- .cvsignore ChangeLog ChangeLog.fsf Makefile.in \
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
+
+info_TEXINFOS = cvs.texinfo cvsclient.texi
+cvs_TEXINFOS = CVSvn.texi
+cvsclient_TEXINFOS = CVSvn.texi
+
+POSTSCRIPTS = \
+ cvs.ps \
+ cvs-paper.ps \
+ cvsclient.ps
+
+
+PDFS = \
+ cvs-paper.pdf \
+ cvs.pdf \
+ cvsclient.pdf
+
+
+TXTS = \
+ cvs.txt \
+ cvsclient.txt
+
+
+EXTRA_DIST = \
+ $(POSTSCRIPTS) \
+ .cvsignore \
+ CVSvn.texi.in \
+ ChangeLog.fsf \
RCSFILES \
- cvs-paper.ms cvs-paper.ps \
- cvs.texinfo \
- cvsclient.texi
+ cvs-paper.ms \
+ cvs.aux \
+ cvsclient.aux
+
+
+# Listing cvs.cps & cvs.fns here is a workaround for an Automake deficiency
+MOSTLYCLEANFILES = \
+ cvs.cps \
+ cvs.fns
-OBJDIR_DISTFILES = cvs.ps cvs.info cvs.aux \
- cvsclient.ps cvsclient.info cvsclient.aux CVSvn.texi
-# these are part of the texinfo distribution
-MAKEINFO=makeinfo
-TEXI2DVI = texi2dvi
+CLEANFILES = \
+ $(PDFS) \
+ $(TXTS)
-# where to find texinfo;
-TEXIDIR=${gdbdir}/../texinfo
-SET_TEXINPUTS = TEXINPUTS=.:$(srcdir):$$TEXINPUTS
+MAINTAINERCLEANFILES = \
+ cvs-paper.ps
-# Don Knuth's TeX formatter
-TEX = tex
-# auxiliary program for sorting Texinfo indices
-TEXINDEX = texindex
+SUFFIXES = .aux .txt .pdf
+EXEEXT =
+OBJEXT = o
+subdir = doc
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES =
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES =
+INFO_DEPS = cvs.info cvsclient.info
+DVIS = cvs.dvi cvsclient.dvi
+TEXINFOS = cvs.texinfo cvsclient.texi
+DIST_COMMON = $(cvs_TEXINFOS) $(cvsclient_TEXINFOS) ChangeLog \
+ Makefile.am Makefile.in texinfo.tex
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .aux .txt .pdf .dvi .info .ps .texi .texinfo .txi
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+
+cvs.info: cvs.texinfo $(cvs_TEXINFOS)
+cvs.dvi: cvs.texinfo $(cvs_TEXINFOS)
+
+cvsclient.info: cvsclient.texi $(cvsclient_TEXINFOS)
+cvsclient.dvi: cvsclient.texi $(cvsclient_TEXINFOS)
+
+.texi.info:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texi.dvi:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.texi:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texinfo.info:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.texinfo.dvi:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.texinfo:
+ @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ cd $(srcdir) \
+ && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
DVIPS = dvips
-DVIPSFLAGS =
-
-ROFF = groff
-
-# CYGNUS LOCAL: all does not depend upon info
-all:
-.PHONY: all
-
-# CYGNUS LOCAL: install does not depend on install-info
-install: all
-.PHONY: install
-
-doc: cvs.ps cvs-paper.ps cvsclient.ps
-
-info: cvs.info cvsclient.info
-
-cvs.info: cvs.texinfo CVSvn.texi
- if [ ! -f ./CVSvn.texi ]; then \
- ln -s $(srcdir)/CVSvn.texi . || \
- ln $(srcdir)/CVSvn.texi . || \
- cp $(srcdir)/CVSvn.texi . ; else true; fi
- $(MAKEINFO) $(srcdir)/cvs.texinfo -o cvs.info
-
-cvsclient.info: cvsclient.texi CVSvn.texi
- if [ ! -f ./CVSvn.texi ]; then \
- ln -s $(srcdir)/CVSvn.texi . || \
- ln $(srcdir)/CVSvn.texi . || \
- cp $(srcdir)/CVSvn.texi . ; else true; fi
- $(MAKEINFO) $(srcdir)/cvsclient.texi -o cvsclient.info
-
-# Version of the protocol suitable for emailing
-cvsclient.txt: cvsclient.texi CVSvn.texi
- if [ ! -f ./CVSvn.texi ]; then \
- ln -s $(srcdir)/CVSvn.texi . || \
- ln $(srcdir)/CVSvn.texi . || \
- cp $(srcdir)/CVSvn.texi . ; else true; fi
- $(MAKEINFO) $(srcdir)/cvsclient.texi --no-headers -o cvsclient.txt
-
-# If the user gets a distribution (which contains *.info), unpacks
-# it, and builds it in a seperate build dir, then *.info* are in srcdir.
-# If the user builds *.info (e.g. after editing *.texi), then *.info* are
-# in the build dir.
-# (Note: don't solve this problem with "cd"; INSTALL_DATA might be a
-# relative path to install-sh).
-install-info: info installdirs
- if test -f cvs.info ; then docdir=.; else docdir=$(srcdir);fi; \
- for i in $$docdir/*.info* ; do \
- $(INSTALL_DATA) $$i $(infodir)/`basename $$i` ; \
+.dvi.ps:
+ $(DVIPS) $< -o $@
+
+uninstall-info-am:
+ $(PRE_UNINSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
+ install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
+ done; \
+ else :; fi
+ @$(NORMAL_UNINSTALL)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ (if cd $(DESTDIR)$(infodir); then \
+ echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
+ rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
+ else :; fi); \
done
-installdirs:
- $(SHELL) $(top_srcdir)/mkinstalldirs $(infodir)
-.PHONY: installdirs
+dist-info: $(INFO_DEPS)
+ list='$(INFO_DEPS)'; \
+ for base in $$list; do \
+ d=$(srcdir); \
+ for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done; \
+ done
-dvi: cvs.dvi cvsclient.dvi
+mostlyclean-aminfo:
+ -rm -f cvs.aux cvs.cp cvs.cps cvs.dvi cvs.fn cvs.fns cvs.ky cvs.log cvs.pg \
+ cvs.ps cvs.toc cvs.tp cvs.vr cvsclient.aux cvsclient.cp \
+ cvsclient.dvi cvsclient.fn cvsclient.ky cvsclient.log \
+ cvsclient.pg cvsclient.ps cvsclient.toc cvsclient.tp \
+ cvsclient.vr
+
+maintainer-clean-aminfo:
+ cd $(srcdir) && \
+ for i in $(INFO_DEPS); do \
+ rm -f $$i; \
+ if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
+ rm -f $$i-[0-9]*; \
+ fi; \
+ done
+tags: TAGS
+TAGS:
-CVSvn.texi: $(top_srcdir)/src/version.c
- echo "@set CVSVN `sed < $(top_srcdir)/src/version.c \
- -e '/version_string/!d' \
- -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
- -e q`" >CVSvn.new
- mv CVSvn.new CVSvn.texi
-
-cvs.dvi cvs.aux: cvs.texinfo CVSvn.texi
- if [ ! -f ./CVSvn.texi ]; then \
- ln -s $(srcdir)/CVSvn.texi . || \
- ln $(srcdir)/CVSvn.texi . || \
- cp $(srcdir)/CVSvn.texi . ; else true; fi
- $(TEXI2DVI) $(srcdir)/cvs.texinfo
-
-cvsclient.dvi cvsclient.aux: cvsclient.texi CVSvn.texi
- if [ ! -f ./CVSvn.texi ]; then \
- ln -s $(srcdir)/CVSvn.texi . || \
- ln $(srcdir)/CVSvn.texi . || \
- cp $(srcdir)/CVSvn.texi . ; else true; fi
- $(TEXI2DVI) $(srcdir)/cvsclient.texi
- rm -f cvsclient.?? cvsclient.log cvsclient.toc cvsclient.??s
-
-cvs.ps: cvs.dvi
- $(DVIPS) $(DVIPSFLAGS) cvs.dvi -o cvs.ps
-cvs-paper.ps: cvs-paper.ms
- $(ROFF) -t -p -ms -Tps $(srcdir)/cvs-paper.ms > $@-t
- mv $@-t $@
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-cvsclient.ps: cvsclient.dvi
- $(DVIPS) $(DVIPSFLAGS) cvsclient.dvi -o cvsclient.ps
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="${top_distdir}" distdir="$(distdir)" \
+ dist-info
+check-am: all-am
+check: check-am
+all-am: Makefile $(INFO_DEPS)
-tags:
-.PHONY: tags
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
-TAGS:
-.PHONY: TAGS
-
-ls:
- @echo $(DISTFILES)
-.PHONY: ls
-
-clean:
- rm -f *.o core
- rm -f cvs.cp cvs.fn cvs.ky cvs.pg cvs.tp cvs.vr
- rm -f cvs.cps cvs.fns cvs.kys cvs.pgs cvs.tps cvs.vrs
- rm -f cvs.aux cvs.dvi cvs.log cvs.toc
- rm -f cvsclient.cp cvsclient.fn cvsclient.ky cvsclient.pg
- rm -f cvsclient.tp cvsclient.vr cvsclient.cps cvsclient.fns
- rm -f cvsclient.kys cvsclient.pgs cvsclient.tps cvsclient.vrs
- rm -f cvsclient.aux cvsclient.dvi cvsclient.log cvsclient.toc
-
-.PHONY: clean
-
-distclean: clean
- rm -f Makefile
-.PHONY: distclean
-
-realclean: distclean
- rm -f cvs.info* cvs.ps cvs-paper.ps cvsclient.info* cvsclient.ps
-.PHONY: realclean
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-dist-dir: $(DISTFILES) $(OBJDIR_DISTFILES)
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f Makefile.in
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am: $(DVIS)
+
+info: info-am
+
+info-am: $(INFO_DEPS)
+
+install-data-am: install-info-am
+
+install-exec-am:
+
+install-info: install-info-am
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(infodir)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ d=$(srcdir); \
+ for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+ if test -f $$d/$$ifile; then \
+ echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
+ $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
+ else : ; fi; \
+ done; \
done
- ln ${OBJDIR_DISTFILES} ${DISTDIR}
- if [ -f cvs.info-1 ]; \
- then ln -f cvs.info-* ${DISTDIR}; \
- else : Pacify Ultrix sh; \
- fi
- if [ -f cvsclient.info-1 ]; \
- then ln -f cvsclient.info-* ${DISTDIR}; \
- else : Pacify Ultrix sh; \
- fi
-.PHONY: dist-dir
+ @$(POST_INSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
+ done; \
+ else : ; fi
+install-man:
-subdir = doc
-Makefile: ../config.status Makefile.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+ maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
-#../config.status: ../configure
-# cd .. ; $(SHELL) config.status --recheck
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
+
+uninstall-am: uninstall-info-am
+
+uninstall-info: uninstall-info-am
+
+.PHONY: all all-am check check-am clean clean-generic dist-info \
+ distclean distclean-generic distdir dvi dvi-am info info-am \
+ install install-am 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-aminfo \
+ maintainer-clean-generic mostlyclean mostlyclean-aminfo \
+ mostlyclean-generic uninstall uninstall-am uninstall-info-am
+
+
+doc ps: $(POSTSCRIPTS)
+.PHONY: doc ps
+
+pdf: $(PDFS)
+.PHONY: pdf
+
+txt: $(TXTS)
+.PHONY: txt
+
+dvi: cvs.dvi cvsclient.dvi
+.PHONY: dvi
+
+cvs.aux cvs.pdf cvs.txt: cvs.texinfo $(cvs_TEXINFOS)
+cvsclient.aux cvsclient.pdf cvsclient.txt: cvsclient.texi $(cvsclient_TEXINFOS)
+
+# These targets need to be very specific so that the other PDFs get generated correctly.
+# If they are more generic and cvs.ps is made before cvs.pdf, then cvs.pdf will be
+# generated from the generic target and the PS source, which contains less information
+# than the usual texinfo source.
+cvs-paper.pdf: cvs-paper.ps
+ $(ROFF) -t -p -ms -Tps $< > $@-t
+ mv $@-t $@
+
+cvs-paper.ps: cvs-paper.ms
+ $(PS2PDF) $< $@
+
+# texinfo based targets automake neglects to include
+.texinfo.pdf:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) --pdf $<
+.txi.pdf:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) --pdf $<
+.texi.pdf:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) --pdf $<
+
+.texinfo.aux:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+.txi.aux:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+.texi.aux:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.texinfo.txt:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(MAKEINFO) $< --no-headers -o $@
+.txi.txt:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(MAKEINFO) $< --no-headers -o $@
+.texi.txt:
+ TEXINPUTS=$(srcdir):$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(MAKEINFO) $< --no-headers -o $@
+
+# - CVSvn.texi needs to be updated only once, since it depends on
+# configure.in, not on the results of a 'configure' run.
+# - It is guaranteed (with GNU Make) that when the version in configure.in
+# is changed, acversion.m4 is built only after the new version number is
+# propagated to the Makefile. (Libtool uses the same guarantee.)
+# - Of the next three targets, only the next one or the following two should be
+# enabled, not all three
+# - This is the target for systems without the BSD VPATH bug in make or with
+# $(srcdir) = $(builddir)
+@MAKE_TARGETS_IN_VPATH_TRUE@CVSvn.texi: $(srcdir)/CVSvn.texi.in $(top_srcdir)/configure.in
+@MAKE_TARGETS_IN_VPATH_TRUE@ sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/CVSvn.texi.in >$(srcdir)/CVSvn.ttexi
+@MAKE_TARGETS_IN_VPATH_TRUE@ mv $(srcdir)/CVSvn.ttexi $(srcdir)/CVSvn.texi
+# - The next two targets are a workaround for the fact that some BSD makes
+# don't look through VPATH for targets, but only for sources.
+# - They should be disabled on systems without the bug and in environments
+# where $(srcdir) = $(builddir)
+@MAKE_TARGETS_IN_VPATH_FALSE@CVSvn.texi: $(srcdir)/CVSvn.texi
+@MAKE_TARGETS_IN_VPATH_FALSE@ # use cat so the time stamp gets set properly
+@MAKE_TARGETS_IN_VPATH_FALSE@ cat $(srcdir)/CVSvn.texi >$@
+@MAKE_TARGETS_IN_VPATH_FALSE@$(srcdir)/CVSvn.texi: $(srcdir)/CVSvn.texi.in $(top_srcdir)/configure.in
+@MAKE_TARGETS_IN_VPATH_FALSE@ sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/CVSvn.texi.in >$(srcdir)/CVSvn.ttexi
+@MAKE_TARGETS_IN_VPATH_FALSE@ mv $(srcdir)/CVSvn.ttexi $(srcdir)/CVSvn.texi
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
-#../configure: ../configure.in
-# cd $(top_srcdir) ; autoconf
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/cvs/doc/cvs.texinfo b/contrib/cvs/doc/cvs.texinfo
index 8d5de53ade45..82ccea04793e 100644
--- a/contrib/cvs/doc/cvs.texinfo
+++ b/contrib/cvs/doc/cvs.texinfo
@@ -39,7 +39,7 @@
@setfilename cvs.info
@include CVSvn.texi
-@settitle CVS---Concurrent Versions System
+@settitle CVS---Concurrent Versions System v@value{CVSVN}
@setchapternewpage odd
@c -- TODO list:
@@ -1100,13 +1100,13 @@ particular program to run with the ability to perform
operations which the caller of the program could not.
For example, the set user ID (setuid) or set group ID
(setgid) features of unix or the installed image
-feature of VMS. CVS was not written to use such
-features and therefore attempting to install CVS in
+feature of VMS. @sc{cvs} was not written to use such
+features and therefore attempting to install @sc{cvs} in
this fashion will provide protection against only
accidental lapses; anyone who is trying to circumvent
the measure will be able to do so, and depending on how
you have set it up may gain access to more than just
-CVS. You may wish to instead consider pserver. It
+@sc{cvs}. You may wish to instead consider pserver. It
shares some of the same attributes, in terms of
possibly providing a false sense of security or opening
security holes wider than the ones you are trying to
@@ -1126,14 +1126,14 @@ presumably future operating systems in this family.
Some of the following might apply to OS/2 but I'm not
sure).
-If you are using local CVS and the repository is on a
+If you are using local @sc{cvs} and the repository is on a
networked file system which is served by the Samba SMB
server, some people have reported problems with
permissions. Enabling WRITE=YES in the samba
configuration is said to fix/workaround it.
Disclaimer: I haven't investigated enough to know the
implications of enabling that option, nor do I know
-whether there is something which CVS could be doing
+whether there is something which @sc{cvs} could be doing
differently in order to avoid the problem. If you find
something out, please let us know as described in
@ref{BUGS}.
@@ -1205,9 +1205,9 @@ attributes for that file.
and @var{filename} empty, to specify default attributes
to be used for newly added files.
-Other @var{ent-type} are reserved for future expansion. CVS 1.9 and older
+Other @var{ent-type} are reserved for future expansion. @sc{cvs} 1.9 and older
will delete them any time it writes file attributes.
-CVS 1.10 and later will preserve them.
+@sc{cvs} 1.10 and later will preserve them.
Note that the order of the lines is not significant;
a program writing the fileattr file may
@@ -1220,7 +1220,7 @@ don't handle a NUL character in any of the fields, but
implementations are encouraged to allow it.
By convention, @var{attrname} starting with @samp{_} is for an attribute given
-special meaning by CVS; other @var{attrname}s are for user-defined attributes
+special meaning by @sc{cvs}; other @var{attrname}s are for user-defined attributes
(or will be, once implementations start supporting user-defined attributes).
Builtin attributes:
@@ -1277,10 +1277,10 @@ there must be a single tab character there and no spaces.
@cindex #cvs.wfl, technical details
@cindex #cvs.lock, technical details
@cindex Locks, cvs, technical details
-For an introduction to CVS locks focusing on
+For an introduction to @sc{cvs} locks focusing on
user-visible behavior, see @ref{Concurrency}. The
following section is aimed at people who are writing
-tools which want to access a CVS repository without
+tools which want to access a @sc{cvs} repository without
interfering with other tools acessing the same
repository. If you find yourself confused by concepts
described here, like @dfn{read lock}, @dfn{write lock},
@@ -1291,8 +1291,8 @@ operating systems or databases.
Any file in the repository with a name starting
with @file{#cvs.rfl.} is a read lock. Any file in
the repository with a name starting with
-@file{#cvs.wfl} is a write lock. Old versions of CVS
-(before CVS 1.5) also created files with names starting
+@file{#cvs.wfl} is a write lock. Old versions of @sc{cvs}
+(before @sc{cvs} 1.5) also created files with names starting
with @file{#cvs.tfl}, but they are not discussed here.
The directory @file{#cvs.lock} serves as a master
lock. That is, one must obtain this lock first before
@@ -1436,7 +1436,7 @@ convention for the system in question. This means that
working directories are not portable between systems
with differing conventions for storing text files.
This is intentional, on the theory that the files being
-managed by CVS probably will not be portable between
+managed by @sc{cvs} probably will not be portable between
such systems either.
@table @file
@@ -1861,7 +1861,7 @@ another system, the size of those files is the
approximate initial size of your repository, or if you
are starting without any version history, a rule of
thumb is to allow for the server approximately three
-times the size of the code to be under CVS for the
+times the size of the code to be under @sc{cvs} for the
repository (you will eventually outgrow this, but not
for a while). On the machines on which the developers
will be working, you'll want disk space for
@@ -1991,6 +1991,13 @@ isn't worth it.
@cindex Remote repositories
@cindex Client/Server Operation
@cindex Server, CVS
+@cindex Remote repositories, port specification
+@cindex Repositories, remote, port specification
+@cindex Client/Server Operation, port specification
+@cindex pserver (client/server connection method), port specification
+@cindex kserver (client/server connection method), port specification
+@cindex gserver (client/server connection method), port specification
+@cindex port, specifying for remote repositories
Your working copy of the sources can be on a
different machine than the repository. Using @sc{cvs}
@@ -2004,9 +2011,14 @@ repository is just like using a local one, except that
the format of the repository name is:
@example
-:@var{method}:@var{user}@@@var{hostname}:/path/to/repository
+:@var{method}:[[@var{user}][:@var{password}]@@]@var{hostname}[:[@var{port}]]/path/to/repository
@end example
+Specifying a password in the repository name is not recommended during
+checkout, since this will cause @sc{cvs} to store a cleartext copy of the
+password in each created directory. @code{cvs login} first instead
+(@pxref{Password authentication client}).
+
The details of exactly what needs to be set up depend
on how you are connecting to the server.
@@ -2134,7 +2146,7 @@ For information on disk space requirements, see
@subsection Connecting with rsh
@cindex rsh
-CVS uses the @file{rsh} protocol to perform these
+@sc{cvs} uses the @file{rsh} protocol to perform these
operations, so the remote user host needs to have a
@file{.rhosts} file which grants access to the local
user.
@@ -2181,7 +2193,7 @@ There is no need to edit @file{inetd.conf} or start a
@cindex rsh replacements (Kerberized, SSH, &c)
There are two access methods that you use in @code{CVSROOT}
for rsh. @code{:server:} specifies an internal rsh
-client, which is supported only by some CVS ports.
+client, which is supported only by some @sc{cvs} ports.
@code{:ext:} specifies an external rsh program. By
default this is @code{rsh} but you may set the
@code{CVS_RSH} environment variable to invoke another
@@ -2191,7 +2203,7 @@ something different). It must be a program which can
transmit data to and from the server without modifying
it; for example the Windows NT @code{rsh} is not
suitable since it by default translates between CRLF
-and LF. The OS/2 CVS port has a hack to pass @samp{-b}
+and LF. The OS/2 @sc{cvs} port has a hack to pass @samp{-b}
to @code{rsh} to get around this, but since this could
potentially cause problems for programs other than the
standard @code{rsh}, it may change in the future. If
@@ -2214,7 +2226,7 @@ the module @file{foo} in the repository
@file{faun.example.org}, you are ready to go:
@example
-cvs -d :ext:bach@@faun.example.org:/usr/local/cvsroot checkout foo
+cvs -d :ext:bach@@faun.example.org/usr/local/cvsroot checkout foo
@end example
(The @file{bach@@} can be omitted if the username is
@@ -2253,6 +2265,13 @@ permissions on the @file{$CVSROOT} and
authentication security}, for more details.
@cindex pserver (subcommand)
+@cindex Remote repositories, port specification
+@cindex Repositories, remote, port specification
+@cindex Client/Server Operation, port specification
+@cindex pserver (client/server connection method), port specification
+@cindex kserver (client/server connection method), port specification
+@cindex gserver (client/server connection method), port specification
+@cindex port, specifying for remote repositories
@cindex Password server, setting up
@cindex Authenticating server, setting up
@c FIXME: this isn't quite right regarding port
@@ -2264,7 +2283,9 @@ command @code{cvs pserver} when it receives a
connection on the right port. By default, the port
number is 2401; it would be different if your client
were compiled with @code{CVS_AUTH_PORT} defined to
-something else, though.
+something else, though. This can also be sepcified in the CVSROOT variable
+(@pxref{Remote repositories}) or overridden with the CVS_CLIENT_PORT
+environment variable (@pxref{Environment variables}).
If your @code{inetd} allows raw port numbers in
@file{/etc/inetd.conf}, then the following (all on a
@@ -2342,7 +2363,7 @@ The first line in the example will grant access to any
including an empty password. (This is typical for
sites granting anonymous read-only access; for
information on how to do the "read-only" part, see
-@xref{Read-only access}.)
+@ref{Read-only access}.)
The second and third lines will grant access to
@code{bach} and @code{spwang} if they supply their
@@ -2365,7 +2386,7 @@ repository, and give each developer their own line in
the @file{$CVSROOT/CVSROOT/passwd} file. The @sc{cvs}
username on each line would be different, but the
system username would be the same. The reason to have
-different @sc{cvs} usernames is that CVS will log their
+different @sc{cvs} usernames is that @sc{cvs} will log their
actions under those names: when @code{melissa} commits
a change to a project, the checkin is recorded in the
project's history under the name @code{melissa}, not
@@ -2401,7 +2422,7 @@ password, including the empty string. However, the
colon after the @sc{cvs} username is always necessary,
even if the password is empty.
-CVS can also fall back to use system authentication.
+@sc{cvs} can also fall back to use system authentication.
When authenticating a password, the server first checks
for the user in the @file{$CVSROOT/CVSROOT/passwd}
file. If it finds the user, it will use that entry for
@@ -2430,7 +2451,7 @@ rather than via @sc{cvs}. This is because of the
possible security risks of having the @file{passwd}
file checked out to people's working copies. If you do
want to include the @file{passwd} file in checkouts of
-@file{$CVSROOT/CVSROOT}, see @xref{checkoutlist}.
+@file{$CVSROOT/CVSROOT}, see @ref{checkoutlist}.
@c We might also suggest using the @code{htpasswd} command
@c from freely available web servers as well, but that
@@ -2448,32 +2469,39 @@ want to include the @file{passwd} file in checkouts of
@cindex :pserver:, setting up
To run a @sc{cvs} command on a remote repository via
the password-authenticating server, one specifies the
-@code{pserver} protocol, username, repository host, and
-path to the repository. For example:
+@code{pserver} protocol, optional username, repository host, an
+optional port number, and path to the repository. For example:
@example
-cvs -d :pserver:bach@@faun.example.org:/usr/local/cvsroot checkout someproj
+cvs -d :pserver:faun.example.org:/usr/local/cvsroot checkout someproj
@end example
or
@example
-CVSROOT=:pserver:bach@@faun.example.org:/usr/local/cvsroot
+CVSROOT=:pserver:bach@@faun.example.org:2401/usr/local/cvsroot
cvs checkout someproj
@end example
However, unless you're connecting to a public-access
repository (i.e., one where that username doesn't
-require a password), you'll need to @dfn{log in} first.
-Logging in verifies your password with the repository.
+require a password), you'll need to supply a password or @dfn{log in} first.
+Logging in verifies your password with the repository and stores it in a file.
It's done with the @code{login} command, which will
-prompt you interactively for the password:
+prompt you interactively for the password if you didn't supply one as part of
+@var{$CVSROOT}:
@example
cvs -d :pserver:bach@@faun.example.org:/usr/local/cvsroot login
CVS password:
@end example
+or
+
+@example
+cvs -d :pserver:bach:p4ss30rd@@faun.example.org:/usr/local/cvsroot login
+@end example
+
After you enter the password, @sc{cvs} verifies it with
the server. If the verification succeeds, then that
combination of username, host, repository, and password
@@ -2683,8 +2711,8 @@ request encryption.
You need to edit @file{inetd.conf} on the server
machine to run @code{cvs kserver}. The client uses
port 1999 by default; if you want to use another port
-specify it in the @code{CVS_CLIENT_PORT} environment
-variable on the client.
+specify it in the @code{CVSROOT} (@pxref{Remote repositories})
+or the @code{CVS_CLIENT_PORT} environment variable on the client.
@cindex kinit
When you want to use @sc{cvs}, get a ticket in the
@@ -3348,7 +3376,7 @@ based on information such as the name of the program
and the version number of the release. For example,
one might take the name of the program, immediately
followed by the version number with @samp{.} changed to
-@samp{-}, so that CVS 1.9 would be tagged with the name
+@samp{-}, so that @sc{cvs} 1.9 would be tagged with the name
@code{cvs1-9}. If you choose a consistent convention,
then you won't constantly be guessing whether a tag is
@code{cvs-1-9} or @code{cvs1_9} or what. You might
@@ -3748,7 +3776,7 @@ discussion see @ref{Merging two revisions}.
@cindex Changes, copying between branches
@cindex Modifications, copying between branches
-CVS allows you to isolate changes onto a separate
+@sc{cvs} allows you to isolate changes onto a separate
line of development, known as a @dfn{branch}. When you
change files on a branch, those changes do not appear
on the main trunk or other branches.
@@ -4124,8 +4152,8 @@ no way to see how the tag was assigned yesterday).
@cindex -j (merging branches)
You can merge changes made on a branch into your working copy by giving
-the @samp{-j @var{branch}} flag to the @code{update} command. With one
-@samp{-j @var{branch}} option it merges the changes made between the
+the @samp{-j @var{branchname}} flag to the @code{update} subcommand. With one
+@samp{-j @var{branchname}} option it merges the changes made between the
point where the branch forked and newest revision on that branch (into
your working copy).
@@ -4172,7 +4200,7 @@ If your source files contain keywords (@pxref{Keyword substitution}),
you might be getting more conflicts than strictly necessary. See
@ref{Merging and keywords}, for information on how to avoid this.
-The @code{checkout} command also supports the @samp{-j @var{branch}} flag. The
+The @code{checkout} command also supports the @samp{-j @var{branchname}} flag. The
same effect as above could be achieved with this:
@example
@@ -4180,6 +4208,9 @@ $ cvs checkout -j R1fix mod
$ cvs commit -m "Included R1fix"
@end example
+It should be noted that @code{update -j @var{tagname}} will also work but may
+not produce the desired result. @xref{Merging adds and removals}, for more.
+
@node Merging more than once
@section Merging from a branch several times
@@ -4326,6 +4357,15 @@ After these commands are executed and a @samp{cvs commit} is done,
file @file{a} will be removed and file @file{d} added in the main branch.
@c (which was determined by trying it)
+Note that using a single static tag (@samp{-j @var{tagname}})
+rather than a dynamic tag (@samp{-j @var{branchname}}) to merge
+changes from a branch will usually not remove files which were removed on the
+branch since @sc{cvs} does not automatically add static tags to dead revisions.
+The exception to this rule occurs when
+a static tag has been attached to a dead revision manually. Use the branch tag
+to merge all changes from the branch or use two static tags as merge endpoints
+to be sure that all intended changes are propogated in the merge.
+
@c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@node Merging and keywords
@section Merging and keywords
@@ -4726,7 +4766,7 @@ When you commit the removal of the file, @sc{cvs}
records the fact that the file no longer exists. It is
possible for a file to exist on only some branches and
not on others, or to re-add another file with the same
-name later. CVS will correctly create or not create
+name later. @sc{cvs} will correctly create or not create
the file, based on the @samp{-r} and @samp{-D} options
specified to @code{checkout} or @code{update}.
@@ -5648,7 +5688,7 @@ details, assuming "cvs watch lock" and
CVS/Watched file? Or try to fit this into CVS/Entries somehow?
Cases: (1) file is checked out (unreserved or with watch on) by old
-version of CVS, now we do something with new one, (2) file is checked
+version of @sc{cvs}, now we do something with new one, (2) file is checked
out by new version, now we do something with old one.
Remote protocol would have a "Watched" analogous to "Mode". Of course
@@ -6235,12 +6275,12 @@ certain files are to be watched.
@cindex Read-only files, and watches
Specify that developers should run @code{cvs edit}
-before editing @var{files}. CVS will create working
+before editing @var{files}. @sc{cvs} will create working
copies of @var{files} read-only, to remind developers
to run the @code{cvs edit} command before working on
them.
-If @var{files} includes the name of a directory, CVS
+If @var{files} includes the name of a directory, @sc{cvs}
arranges to watch all files added to the corresponding
repository directory, and sets a default for files
added in the future; this allows the user to set
@@ -6261,7 +6301,7 @@ Do not create @var{files} read-only on checkout; thus,
developers will not be reminded to use @code{cvs edit}
and @code{cvs unedit}.
@ignore
-CVS will check out @var{files}
+@sc{cvs} will check out @var{files}
read-write as usual, unless other permissions override
due to the @code{PreservePermissions} option being
enabled in the @file{config} administrative file
@@ -6289,7 +6329,7 @@ command.
Add the current user to the list of people to receive notification of
work done on @var{files}.
-The @code{-a} option specifies what kinds of events CVS should notify
+The @code{-a} option specifies what kinds of events @sc{cvs} should notify
the user about. @var{action} is one of the following:
@table @code
@@ -6420,13 +6460,13 @@ source}), an operation which those systems call a
@cindex edit (subcommand)
@deffn Command {cvs edit} [options] files @dots{}
-Prepare to edit the working files @var{files}. CVS makes the
+Prepare to edit the working files @var{files}. @sc{cvs} makes the
@var{files} read-write, and notifies users who have requested
@code{edit} notification for any of @var{files}.
The @code{cvs edit} command accepts the same @var{options} as the
@code{cvs watch add} command, and establishes a temporary watch for the
-user on @var{files}; CVS will remove the watch when @var{files} are
+user on @var{files}; @sc{cvs} will remove the watch when @var{files} are
@code{unedit}ed or @code{commit}ted. If the user does not wish to
receive notifications, she should specify @code{-a none}.
@@ -6436,10 +6476,10 @@ watch} commands.
@ignore
@strong{Caution:} If the @code{PreservePermissions}
option is enabled in the repository (@pxref{config}),
-CVS will not change the permissions on any of the
+@sc{cvs} will not change the permissions on any of the
@var{files}. The reason for this change is to ensure
that using @samp{cvs edit} does not interfere with the
-ability to store file permissions in the CVS
+ability to store file permissions in the @sc{cvs}
repository.
@end ignore
@@ -6458,9 +6498,9 @@ the @code{cvs unedit} command.
@deffn Command {cvs unedit} [@code{-lR}] files @dots{}
Abandon work on the working files @var{files}, and revert them to the
-repository versions on which they are based. CVS makes those
+repository versions on which they are based. @sc{cvs} makes those
@var{files} read-only for which users have requested notification using
-@code{cvs watch on}. CVS notifies users who have requested @code{unedit}
+@code{cvs watch on}. @sc{cvs} notifies users who have requested @code{unedit}
notification for any of @var{files}.
The @var{files} and options are processed as for the
@@ -6666,7 +6706,7 @@ But as soon as you export the files from your
development environment it becomes harder to identify
which revisions they are.
-CVS can use a mechanism known as @dfn{keyword
+@sc{cvs} can use a mechanism known as @dfn{keyword
substitution} (or @dfn{keyword expansion}) to help
identifying the files. Embedded strings of the form
@code{$@var{keyword}$} and
@@ -7046,7 +7086,7 @@ command to track third-party sources, the @dfn{vendor
tag} and @dfn{release tags} are useful. The
@dfn{vendor tag} is a symbolic name for the branch
(which is always 1.1.1, unless you use the @samp{-b
-@var{branch}} flag---@xref{Multiple vendor branches}.). The
+@var{branch}} flag---see @ref{Multiple vendor branches}.). The
@dfn{release tags} are symbolic names for a particular
release, such as @samp{FSF_0_04}.
@@ -7189,7 +7229,7 @@ a project where many different people and teams are
modifying the software. There are a variety of ways to
handle this, but in some cases you have a bunch of
source trees lying around and what you want to do more
-than anything else is just to all put them in CVS so
+than anything else is just to all put them in @sc{cvs} so
that you at least have them in one place.
For handling situations in which there may be more than
@@ -7210,7 +7250,7 @@ $ cvs import -b 1.1.3 dir BLUE BLUE_1-5
@end example
Note that if your vendor tag does not match your
-@samp{-b} option, CVS will not detect this case! For
+@samp{-b} option, @sc{cvs} will not detect this case! For
example,
@example
@@ -7221,7 +7261,7 @@ $ cvs import -b 1.1.3 dir RED RED_1-0
Be careful; this kind of mismatch is sure to sow
confusion or worse. I can't think of a useful purpose
for the ability to specify a mismatch here, but if you
-discover such a use, don't. CVS is likely to make this
+discover such a use, don't. @sc{cvs} is likely to make this
an error in some future release.
@c Probably should say more about the semantics of
@@ -7338,20 +7378,20 @@ is Odin (see
@cindex Hard links
@cindex Symbolic links
-In normal circumstances, CVS works only with regular
+In normal circumstances, @sc{cvs} works only with regular
files. Every file in a project is assumed to be
persistent; it must be possible to open, read and close
-them; and so on. CVS also ignores file permissions and
+them; and so on. @sc{cvs} also ignores file permissions and
ownerships, leaving such issues to be resolved by the
developer at installation time. In other words, it is
not possible to "check in" a device into a repository;
-if the device file cannot be opened, CVS will refuse to
+if the device file cannot be opened, @sc{cvs} will refuse to
handle it. Files also lose their ownerships and
permissions during repository transactions.
@ignore
If the configuration variable @code{PreservePermissions}
-(@pxref{config}) is set in the repository, CVS will
+(@pxref{config}) is set in the repository, @sc{cvs} will
save the following file characteristics in the
repository:
@@ -7364,30 +7404,30 @@ repository:
@end itemize
Using the @code{PreservePermissions} option affects the
-behavior of CVS in several ways. First, some of the
-new operations supported by CVS are not accessible to
+behavior of @sc{cvs} in several ways. First, some of the
+new operations supported by @sc{cvs} are not accessible to
all users. In particular, file ownership and special
file characteristics may only be changed by the
superuser. When the @code{PreservePermissions}
configuration variable is set, therefore, users will
-have to be `root' in order to perform CVS operations.
+have to be `root' in order to perform @sc{cvs} operations.
-When @code{PreservePermissions} is in use, some CVS
+When @code{PreservePermissions} is in use, some @sc{cvs}
operations (such as @samp{cvs status}) will not
recognize a file's hard link structure, and so will
emit spurious warnings about mismatching hard links.
-The reason is that CVS's internal structure does not
+The reason is that @sc{cvs}'s internal structure does not
make it easy for these operations to collect all the
necessary data about hard links, so they check for file
conflicts with inaccurate data.
-A more subtle difference is that CVS considers a file
+A more subtle difference is that @sc{cvs} considers a file
to have changed only if its contents have changed
(specifically, if the modification time of the working
file does not match that of the repository's file).
Therefore, if only the permissions, ownership or hard
linkage have changed, or if a device's major or minor
-numbers have changed, CVS will not notice. In order to
+numbers have changed, @sc{cvs} will not notice. In order to
commit such a change to the repository, you must force
the commit with @samp{cvs commit -f}. This also means
that if a file's permissions have changed and the
@@ -7395,7 +7435,7 @@ repository file is newer than the working copy,
performing @samp{cvs update} will silently change the
permissions on the working copy.
-Changing hard links in a CVS repository is particularly
+Changing hard links in a @sc{cvs} repository is particularly
delicate. Suppose that file @file{foo} is linked to
file @file{old}, but is later relinked to file
@file{new}. You can wind up in the unusual situation
@@ -7416,7 +7456,7 @@ It is worth noting that only regular files may
be merged, for reasons that hopefully are obvious. If
@samp{cvs update} or @samp{cvs checkout -j} attempts to
merge a symbolic link with a regular file, or two
-device files for different kinds of devices, CVS will
+device files for different kinds of devices, @sc{cvs} will
report a conflict and refuse to perform the merge. At
the same time, @samp{cvs diff} will not report any
differences between these files, since no meaningful
@@ -7522,7 +7562,7 @@ the documentation instead.
@appendixsec CVS's exit status
@cindex Exit status, of CVS
-CVS can indicate to the calling environment whether it
+@sc{cvs} can indicate to the calling environment whether it
succeeded or failed by setting its @dfn{exit status}.
The exact way of testing the exit status will vary from
one operating system to another. For example in a unix
@@ -7530,7 +7570,7 @@ shell script the @samp{$?} variable will be 0 if the
last command returned a successful exit status, or
greater than 0 if the exit status indicated failure.
-If CVS is successful, it returns a successful status;
+If @sc{cvs} is successful, it returns a successful status;
if there is an error, it prints an error message and
returns a failure status. The one exception to this is
the @code{cvs diff} command. It will return a
@@ -7917,7 +7957,7 @@ are:
@c bizarre and it has lots of gratuitous multiple ways
@c to specify the same thing.
-There are a lot more ISO8601 date formats, and CVS
+There are a lot more ISO8601 date formats, and @sc{cvs}
accepts many of them, but you probably don't want to
hear the @emph{whole} long story :-).
@@ -8320,7 +8360,7 @@ If you are short on disc this option might help you.
But think twice before using it---there is no way short
of restoring the latest backup to undo this command!
If you delete different revisions than you planned,
-either due to carelessness or (heaven forbid) a CVS
+either due to carelessness or (heaven forbid) a @sc{cvs}
bug, there is no opportunity to correct the error
before the revisions are deleted. It probably would be
a good idea to experiment on a copy of the repository
@@ -8331,7 +8371,7 @@ Specify @var{range} in one of the following ways:
@table @code
@item @var{rev1}::@var{rev2}
Collapse all revisions between rev1 and rev2, so that
-CVS only stores the differences associated with going
+@sc{cvs} only stores the differences associated with going
from rev1 to rev2, not intermediate steps. For
example, after @samp{-o 1.3::1.5} one can retrieve
revision 1.3, revision 1.5, or the differences to get
@@ -8472,16 +8512,11 @@ using this option with @sc{cvs}. Unlock the revision
with number @var{rev}. If a branch is given, unlock
the latest revision on that branch. If @var{rev} is
omitted, remove the latest lock held by the caller.
-Normally, only the locker of a revision may unlock it.
-Somebody else unlocking a revision breaks the lock.
-This causes a mail message to be sent to the original
-locker. The message contains a commentary solicited
-from the breaker. The commentary is terminated by
-end-of-file or by a line containing @code{.} by itself.
+Normally, only the locker of a revision may unlock it;
+somebody else unlocking a revision breaks the lock.
+This causes the original locker to be sent a @code{commit}
+notification (@pxref{Getting Notified}).
There can be no space between @samp{-u} and its argument.
-@c In the future "send mail" probably will go via the
-@c CVSROOT/notify mechanism. But for now it means
-@c whatever it means to "rcs".
@item -V@var{n}
In previous versions of @sc{cvs}, this option meant to
@@ -8664,7 +8699,7 @@ There is an important exception, however. It is very
convenient when checking out a single item to have the
output appear in a directory that doesn't contain empty
intermediate directories. In this case @emph{only},
-CVS tries to ``shorten'' pathnames to avoid those empty
+@sc{cvs} tries to ``shorten'' pathnames to avoid those empty
directories.
For example, given a module @samp{foo} that contains
@@ -9712,19 +9747,31 @@ range formats:
Revisions @var{rev1} to @var{rev2} (which must be on
the same branch).
+@item @var{rev1}::@var{rev2}
+Revisions between, but not including, @var{rev1} and @var{rev2}.
+
@item :@var{rev}
Revisions from the beginning of the branch up to
and including @var{rev}.
+@item ::@var{rev}
+Revisions from the beginning of the branch up to,
+but not including, @var{rev}.
+
@item @var{rev}:
Revisions starting with @var{rev} to the end of the
branch containing @var{rev}.
+@item @var{rev}:
+Revisions starting just after @var{rev} to the end of the
+branch containing @var{rev}.
+
@item @var{branch}
An argument that is a branch means all revisions on
that branch.
@item @var{branch1}:@var{branch2}
+@itemx @var{branch1}::@var{branch2}
A range of branches means all revisions
on the branches in that range.
@@ -9862,7 +9909,7 @@ you should probably not use @samp{-u}.
Expand keywords according to the rules current in
@sc{rcs} version @var{vn} (the expansion format changed with
@sc{rcs} version 5). Note that this option is no
-longer accepted. CVS will always expand keywords the
+longer accepted. @sc{cvs} will always expand keywords the
way that @sc{rcs} version 5 does.
@end table
@@ -10155,6 +10202,11 @@ ancestor revision is the common ancestor of the
revision which the working directory is based on, and
the revision specified in the @samp{-j} option.
+Note that using a single @samp{-j @var{tagname}} option rather than
+@samp{-j @var{branchname}} to merge changes from a branch will
+often not remove files which were removed on the branch.
+@xref{Merging adds and removals}, for more.
+
In addition, each @samp{-j} option can contain an optional
date specification which, when used with branches, can
limit the chosen revision to one within a specific
@@ -10624,7 +10676,7 @@ behavior}.
@end table
@item export [@var{options}] @var{modules}@dots{}
-Export files from CVS. See @ref{export}.
+Export files from @sc{cvs}. See @ref{export}.
@table @code
@item -D @var{date}
@@ -10725,7 +10777,7 @@ options}.
@end table
@item import [@var{options}] @var{repository} @var{vendor-tag} @var{release-tags}@dots{}
-Import files into CVS, using vendor branches. See
+Import files into @sc{cvs}, using vendor branches. See
@ref{import}.
@table @code
@@ -10754,7 +10806,7 @@ More wrappers. See @ref{import options}.
@end table
@item init
-Create a CVS repository if it doesn't exist. See
+Create a @sc{cvs} repository if it doesn't exist. See
@ref{Creating a repository}.
@item log [@var{options}] [@var{files}@dots{}]
@@ -11034,6 +11086,7 @@ More wrappers. See @ref{import options}.
@end table
@item version
+@cindex version (subcommand)
Display the version of @sc{cvs} being used. If the repository
is remote, display both the client and server versions.
@@ -11457,7 +11510,7 @@ For checkout, rtag, and export, the program is server-based, and as such the
following applies:-
If using remote access methods (pserver, ext, etc.),
-CVS will execute this program on the server from a temporary
+@sc{cvs} will execute this program on the server from a temporary
directory. The path is searched for this program.
If using ``local access'' (on a local or remote NFS filesystem, i.e.
@@ -11527,7 +11580,7 @@ means that @code{cvs update} will refuse to merge
files, as it also does for files specified as binary
with @samp{-kb} (but if the file is specified as
binary, there is no need to specify @samp{-m 'COPY'}).
-CVS will provide the user with the
+@sc{cvs} will provide the user with the
two versions of the files, and require the user using
mechanisms outside @sc{cvs}, to insert any necessary
changes. @strong{WARNING}: do not use @code{COPY} with
@@ -11608,11 +11661,11 @@ result of this filter will be a file in the users directory
that they can work on as they normally would.
Note that the @samp{-t}/@samp{-f} features do not
-conveniently handle one portion of CVS's operation:
-determining when files are modified. CVS will still
+conveniently handle one portion of @sc{cvs}'s operation:
+determining when files are modified. @sc{cvs} will still
want a file (or directory) to exist, and it will use
its modification time to determine whether a file is
-modified. If CVS erroneously thinks a file is
+modified. If @sc{cvs} erroneously thinks a file is
unmodified (for example, a directory is unchanged but
one of the files within it is changed), you can force
it to check in the file anyway by specifying the
@@ -12540,6 +12593,21 @@ All other strings containing @samp{$} are reserved;
there is no way to quote a @samp{$} character so that
@samp{$} represents itself.
+Environment variables passed to administrative files are:
+
+@table @code
+@cindex environment variables, passed to administrative files
+@c FIXME: should document USER, LOGNAME, and whatever else is
+@c available both in internal variables and environment variables.
+
+@item CVS_USER
+The @sc{cvs}-specific username provided by the user, if it
+can be provided (currently just for the pserver access
+method), and to the empty string otherwise. (CVS_USER
+and USER may differ when @file{$CVSROOT/CVSROOT/passwd}
+is used to map cvs usernames to system usernames.)
+@end table
+
@node config
@appendixsec The CVSROOT/config configuration file
@@ -12609,24 +12677,24 @@ storage}).
@cindex LockDir, in CVSROOT/config
@item LockDir=@var{directory}
-Put CVS lock files in @var{directory} rather than
+Put @sc{cvs} lock files in @var{directory} rather than
directly in the repository. This is useful if you want
to let users read from the repository while giving them
write access only to @var{directory}, not to the
repository. You need to create @var{directory}, but
-CVS will create subdirectories of @var{directory} as it
-needs them. For information on CVS locks, see
+@sc{cvs} will create subdirectories of @var{directory} as it
+needs them. For information on @sc{cvs} locks, see
@ref{Concurrency}.
@c Mention this in Compatibility section?
Before enabling the LockDir option, make sure that you
-have tracked down and removed any copies of CVS 1.9 or
+have tracked down and removed any copies of @sc{cvs} 1.9 or
older. Such versions neither support LockDir, nor will
give an error indicating that they don't support it.
The result, if this is allowed to happen, is that some
-CVS users will put the locks one place, and others will
+@sc{cvs} users will put the locks one place, and others will
put them another place, and therefore the repository
-could become corrupted. CVS 1.10 does not support
+could become corrupted. @sc{cvs} 1.10 does not support
LockDir but it will print a warning if run on a
repository with LockDir enabled.
@@ -12704,7 +12772,7 @@ programs it uses.
@cindex HOMEDRIVE, environment variable
@item $HOMEDRIVE
Used to locate the directory where the @file{.cvsrc}
-file, and other such files, are searched. On Unix, CVS
+file, and other such files, are searched. On Unix, @sc{cvs}
just checks for @code{HOME}. On Windows NT, the system will
set @code{HOMEDRIVE}, for example to @samp{d:} and @code{HOMEPATH},
for example to @file{\joe}. On Windows 95, you'll
@@ -12714,7 +12782,7 @@ probably need to set @code{HOMEDRIVE} and @code{HOMEPATH} yourself.
@cindex CVS_RSH, environment variable
@item $CVS_RSH
-Specifies the external program which CVS connects with,
+Specifies the external program which @sc{cvs} connects with,
when @code{:ext:} access method is specified.
@pxref{Connecting via rsh}.
@@ -12732,8 +12800,9 @@ login server}. Default value is @file{$HOME/.cvspass}.
@item $CVS_CLIENT_PORT
Used in client-server mode when accessing the server
-via Kerberos.
-@pxref{Kerberos authenticated}
+via Kerberos, GSSAPI, or @sc{cvs}'s password authentication if the port is not
+specified in $CVSROOT.
+@pxref{Remote repositories}
@cindex CVS_RCMD_PORT, environment variable
@item $CVS_RCMD_PORT
@@ -13015,7 +13084,7 @@ here for the benefit of @sc{cvs} 1.9 and older.
@item cvs [checkout aborted]: cannot rename file @var{file} to CVS/,,@var{file}: Invalid argument
This message has been reported as intermittently
-happening with CVS 1.9 on Solaris 2.5. The cause is
+happening with @sc{cvs} 1.9 on Solaris 2.5. The cause is
unknown; if you know more about what causes it, let us
know as described in @ref{BUGS}.
@@ -13030,7 +13099,7 @@ client at all, you probably forgot to specify
@code{:local:}, as described in @ref{Repository}.
@item ci: @var{file},v: bad diff output line: Binary files - and /tmp/T2a22651 differ
-CVS 1.9 and older will print this message
+@sc{cvs} 1.9 and older will print this message
when trying to check in a binary file if
@sc{rcs} is not correctly installed. Re-read the
instructions that came with your @sc{rcs} distribution
@@ -13040,13 +13109,13 @@ version of @sc{cvs}, which checks in files itself
rather than via @sc{rcs}.
@item cvs checkout: could not check out @var{file}
-With CVS 1.9, this can mean that the @code{co} program
+With @sc{cvs} 1.9, this can mean that the @code{co} program
(part of @sc{rcs}) returned a failure. It should be
preceded by another error message, however it has been
observed without another error message and the cause is
-not well-understood. With the current version of CVS,
+not well-understood. With the current version of @sc{cvs},
which does not run @code{co}, if this message occurs
-without another error message, it is definitely a CVS
+without another error message, it is definitely a @sc{cvs}
bug (@pxref{BUGS}).
@c My current suspicion is that the RCS in the rcs (not
@c cvs/winnt/rcs57nt.zip) directory on the _Practical_
@@ -13056,15 +13125,15 @@ bug (@pxref{BUGS}).
@item cvs [login aborted]: could not find out home directory
This means that you need to set the environment
-variables that CVS uses to locate your home directory.
+variables that @sc{cvs} uses to locate your home directory.
See the discussion of @code{HOME}, @code{HOMEDRIVE}, and @code{HOMEPATH} in
@ref{Environment variables}.
@item cvs update: could not merge revision @var{rev} of @var{file}: No such file or directory
-CVS 1.9 and older will print this message if there was
+@sc{cvs} 1.9 and older will print this message if there was
a problem finding the @code{rcsmerge} program. Make
sure that it is in your @code{PATH}, or upgrade to a
-current version of CVS, which does not require
+current version of @sc{cvs}, which does not require
an external @code{rcsmerge} program.
@item cvs [update aborted]: could not patch @var{file}: No such file or directory
@@ -13150,7 +13219,7 @@ see @ref{modules}.
@c for this message.
@item missing author
Typically this can happen if you created an RCS file
-with your username set to empty. CVS will, bogusly,
+with your username set to empty. @sc{cvs} will, bogusly,
create an illegal RCS file with no value for the author
field. The solution is to make sure your username is
set to a non-empty value and re-create the RCS file.
@@ -13177,11 +13246,11 @@ this check; see @ref{Common options}.
@item *PANIC* administration files missing
This typically means that there is a directory named
-CVS but it does not contain the administrative files
-which CVS puts in a CVS directory. If the problem is
+@sc{cvs} but it does not contain the administrative files
+which @sc{cvs} puts in a CVS directory. If the problem is
that you created a CVS directory via some mechanism
-other than CVS, then the answer is simple, use a name
-other than CVS. If not, it indicates a CVS bug
+other than @sc{cvs}, then the answer is simple, use a name
+other than @sc{cvs}. If not, it indicates a @sc{cvs} bug
(@pxref{BUGS}).
@item rcs error: Unknown option: -x,v/
@@ -13242,7 +13311,7 @@ See @ref{Connection}.
This means that someone else has committed a change to
that file since the last time that you did a @code{cvs
update}. So before proceeding with your @code{cvs
-commit} you need to @code{cvs update}. CVS will merge
+commit} you need to @code{cvs update}. @sc{cvs} will merge
the changes that you made and the changes that the
other person made. If it does not detect any conflicts
it will report @samp{M @var{file}} and you are ready
@@ -13276,9 +13345,9 @@ non-unix rsh versions, which does not by default
provide a transparent data stream. In such cases you
probably want to try @samp{:server:} instead of
@samp{:ext:}. If @var{text} is something else, this
-may signify a problem with your CVS server.
+may signify a problem with your @sc{cvs} server.
Double-check your installation against the instructions
-for setting up the CVS server.
+for setting up the @sc{cvs} server.
@c FIXCVS: should be printing CR as \r or \015 or some
@c such, probably.
@@ -13338,6 +13407,18 @@ directions given for :ext:.
@cindex :pserver:, troubleshooting
@item :pserver:
+Errors along the lines of "connection refused" typically indicate
+that inetd isn't even listening for connections on port 2401
+whereas errors like "connection reset by peer" or "recv() from
+server: EOF" typically indicate that inetd is listening for
+connections but is unable to start @sc{cvs} (this is frequently
+caused by having an incorrect path in @file{inetd.conf}).
+"unrecognized auth response" errors are caused by a bad command
+line in @file{inetd.conf}, typically an invalid option or forgetting
+to put the @samp{pserver} command at the end of the line.
+Another less common problem is invisible control characters that
+your editor "helpfully" added without you noticing.
+
One good debugging tool is to "telnet servername
2401". After connecting, send any text (for example
"foo" followed by return). If @sc{cvs} is working
@@ -13347,7 +13428,32 @@ correctly, it will respond with
cvs [pserver aborted]: bad auth protocol start: foo
@end example
-If this fails to work, then make sure inetd is working
+If instead you get:
+
+@example
+Usage: cvs [cvs-options] command [command-options-and-arguments]
+...
+@end example
+
+then you're missing the @samp{pserver} command at the end of the
+line in @file{inetd.conf}; check to make sure that the entire command
+is on one line and that it's complete.
+
+Likewise, if you get something like:
+
+@example
+Unknown command: `pserved'
+
+CVS commands are:
+ add Add a new file/directory to the repository
+...
+@end example
+
+then you've misspelled @samp{pserver} in some way. If it isn't
+obvious, check for invisible control characters (particularly
+carriage returns) in @file{inetd.conf}.
+
+If it fails to work at all, then make sure inetd is working
right. Change the invocation in @file{inetd.conf} to run the
echo program instead of cvs. For example:
@@ -13379,12 +13485,7 @@ cvs server: cannot open /root/.cvsignore: Permission denied
cvs [server aborted]: can't chdir(/root): Permission denied
@end example
-then either you haven't specified @samp{-f} in @file{inetd.conf}
-or your system is setting the @code{HOME} environment variable
-for programs being run by inetd. In the latter case, you can either
-have inetd run a shell script that unsets @code{HOME} and then runs
-@sc{cvs}, or you can use @code{env} to run @sc{cvs} with a pristine
-environment.
+then you probably haven't specified @samp{-f} in @file{inetd.conf}.
If you can connect successfully for a while but then can't,
you've probably hit inetd's rate limit.
@@ -13408,7 +13509,7 @@ On Windows, if there is a 30 second or so delay when
you run a @sc{cvs} command, it may mean that you have
your home directory set to @file{C:/}, for example (see
@code{HOMEDRIVE} and @code{HOMEPATH} in
-@ref{Environment variables}). CVS expects the home
+@ref{Environment variables}). @sc{cvs} expects the home
directory to not end in a slash, for example @file{C:}
or @file{C:\cvs}.
@c FIXCVS: CVS should at least detect this and print an
@@ -13490,7 +13591,7 @@ something about as well as problems with @sc{cvs} itself.
@item
If you want someone to help you and fix bugs that you
report, there are companies which will do that for a
-fee. Two such companies are:
+fee. One such company is:
@cindex Signum Support
@cindex Support, getting CVS support
diff --git a/contrib/cvs/doc/cvsclient.texi b/contrib/cvs/doc/cvsclient.texi
index 5ba7ed6b4eb2..b81a7736c560 100644
--- a/contrib/cvs/doc/cvsclient.texi
+++ b/contrib/cvs/doc/cvsclient.texi
@@ -484,7 +484,8 @@ in use, or sticks to a common subset.
The protocol contains times and dates in various places.
For the @samp{-D} option to the @code{annotate}, @code{co}, @code{diff},
-@code{export}, @code{history}, @code{rdiff}, @code{rtag}, @code{tag},
+@code{export}, @code{history}, @code{rannotate}, @code{rdiff},
+@code{rtag}, @code{tag},
and @code{update} requests, the server should support two formats:
@example
@@ -495,7 +496,8 @@ and @code{update} requests, the server should support two formats:
The former format is preferred; the latter however is sent by the CVS
command line client (versions 1.5 through at least 1.9).
-For the @samp{-d} option to the @code{log} request, servers should at
+For the @samp{-d} option to the @code{log} and @code{rlog} requests,
+servers should at
least support RFC 822/1123 format. Clients are encouraged to use this
format too (the command line CVS client, version 1.10 and older, just passed
along the date format specified by the user, however).
@@ -1160,12 +1162,14 @@ and send it in a future @code{Entry} request. Note that the entries
line in the @code{Created} response must indicate whether the file is
binary or text, so the client can create it correctly.
-@item rdiff \n
+@item rannotate \n
+@itemx rdiff \n
+@itemx rlog \n
@itemx rtag \n
Response expected: yes. Actually do a cvs command. This uses any
previous @code{Argument} requests, if they have been sent. The client
should not send @code{Directory}, @code{Entry}, or @code{Modified}
-requests for this command; they are not used. Arguments to these
+requests for these commands; they are not used. Arguments to these
commands are module names, as described for @code{co}.
@item init @var{root-name} \n
diff --git a/contrib/cvs/install-sh b/contrib/cvs/install-sh
index 402d456bd151..e9de23842dcd 100755
--- a/contrib/cvs/install-sh
+++ b/contrib/cvs/install-sh
@@ -1,16 +1,27 @@
#!/bin/sh
#
# install - install a program, script, or datafile
-# This comes from X11R5.
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-#
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
# set DOITPROG to echo to test this script
@@ -30,7 +41,7 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
-tranformbasename=""
+transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
@@ -107,6 +118,7 @@ if [ x"$dir_arg" != x ]; then
if [ -d $dst ]; then
instcmd=:
+ chmodcmd=""
else
instcmd=mkdir
fi
diff --git a/contrib/cvs/lib/ChangeLog b/contrib/cvs/lib/ChangeLog
index 102ca4cf4efe..107445d779cb 100644
--- a/contrib/cvs/lib/ChangeLog
+++ b/contrib/cvs/lib/ChangeLog
@@ -1,3 +1,69 @@
+2001-04-25 Derek Price <dprice@collab.net>
+
+ * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400.
+
+2001-04-02 Derek Price <dprice@collab.net>
+ for Alon Ziv <alonz@zapper.com>
+
+ * getdate.y: Add a declaration for yyparse().
+
+ * getdate.c: Regenerated.
+
+2001-03-14 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated
+
+2001-02-20 Derek Price <derek.price@openavenue.com>
+
+ * xgssapi.h: New file to perform GSSAPI include magic.
+ * Makefile.am (EXTRA_DIST): Add xgssapi.h.
+
+ * Makefile.in: Regenerated.
+
+2001-02-14 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (libcvs_a_SOURCES): Add xtime.h & xselect.h.
+ * Makefile.in: Regenerated.
+ * getdate.y: Include xtime.h.
+ * getdate.c: Regenerated.
+ * system.h: Include xtime.h.
+ * xtime.h: New file to do include magic for time functions.
+ * xselect.h: New file to do select include magic.
+
+2001-02-06 Derek Price <derek.price@openavenue.com>
+ Rex Jolliff <Rex_Jolliff@notes.ymp.gov>
+ Shawn Smith <Shawn_Smith@notes.ymp.gov>
+
+ * system.h: definitions of CVS_OPENDIR, CVS_READDIR, & CVS_CLOSEDIR
+ provided here in support of changes to handle VMS DEC C 5.7
+ {open,read,close}dir problems. Check today's entry in the vms subdir
+ for more.
+
+2001-01-10 Derek Price <derek.price@openavenue.com>
+ Rex Jolliff <Rex_Jolliff@notes.ymp.gov>
+
+ * rename.c: replace calls to unlink() with CVS_UNLINK() for VMS
+
+2000-12-22 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (INCLUDES): Fixed typo
+ * Makefile.in: Regenerated
+
+2000-12-22 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (INCLUDES): Added $(top_srcdir)/src
+ * Makefile.in: Regenerated
+
+2000-12-21 Derek Price <derek.price@openavenue.com>
+
+ * .cvsignore: Added .deps directory and alphabetized
+ * Makefile.am: New file needed by Automake
+ * Makefile.in: Regenerated
+
+2000-11-15 Derek Price <derek.price@openavenue.com>
+
+ * system.h: Added CVS_FDOPEN to conform to CVS_FOPEN precedent
+
2000-07-10 Larry Jones <larry.jones@sdrc.com>
* savecwd.c: #include <sys/types.h> before <fcntl.h>.
diff --git a/contrib/cvs/lib/Makefile.am b/contrib/cvs/lib/Makefile.am
new file mode 100644
index 000000000000..5984fcf0c667
--- /dev/null
+++ b/contrib/cvs/lib/Makefile.am
@@ -0,0 +1,88 @@
+## Process this file with automake to produce Makefile.in
+# Makefile for library files used by GNU CVS.
+# Copyright (C) 1986, 1988-1994, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# For now we need to include $(top_srcdir)/src because some systems
+# (at least 'AIX rioscpu2 3 4 000030498200',
+# 'HP-UX hp60 B.10.20 A 9000/770 hp60 two-user license', &
+# 'IRIX64 sgiop110 6.5 07151433 IP30') have trouble finding error.h
+# when compiling savecwd.c
+#
+# FIXME - the fact that compiling on my Linux 2.2.16 system finds
+# /usr/include/error.h instead of $(top_srcdir)/src/error.h but
+# everything compiles and tests anyhow implies that src/error.h may
+# be unecessary now. Should look more deeply into this
+#
+# $(includeopt) is CVS specific and set by configure
+INCLUDES = -I$(top_srcdir)/src $(includeopt)
+
+noinst_LIBRARIES = libcvs.a
+
+# Always use CVS's regular expression matcher regex.o, because of
+# variations in regular expression syntax - we want to be the same
+# across systems and (probably) compared with old versions of CVS too.
+#
+# On a more mundane/detail level, having regex.h match regex.c can be
+# an issue if we aren't careful.
+#
+# Also should look into unifying regular expression matching in CVS
+# with the diff library (perhaps to have the caller, CVS, do the
+# matching?)
+libcvs_a_SOURCES = \
+ argmatch.c \
+ ftruncate.c \
+ getdate.y \
+ getline.c \
+ getopt.c \
+ getopt1.c \
+ md5.c \
+ regex.c \
+ savecwd.c \
+ sighandle.c \
+ stripslash.c \
+ xgetwd.c \
+ yesno.c \
+ getline.h \
+ getopt.h \
+ fnmatch.h \
+ md5.h \
+ regex.h \
+ savecwd.h \
+ system.h \
+ wait.h \
+ xselect.h \
+ xtime.h
+## because @LIBOBJS@ is included below, automake automatically knows about
+## dup2.c
+## fncase.c
+## fnmatch.c
+## hostname.c
+## memmove.c
+## mkdir.c
+## rename.c
+## strstr.c
+## strerror.c
+## strtoul.c
+## valloc.c
+## waitpid.c
+libcvs_a_LIBADD = @LIBOBJS@
+
+EXTRA_DIST = \
+ .cvsignore \
+ ChangeLog.fsf \
+ build_lib.com \
+ xgssapi.h
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
diff --git a/contrib/cvs/lib/Makefile.in b/contrib/cvs/lib/Makefile.in
index 736f1319e3fc..f53c852ea32f 100644
--- a/contrib/cvs/lib/Makefile.in
+++ b/contrib/cvs/lib/Makefile.in
@@ -1,6 +1,20 @@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
# Makefile for library files used by GNU CVS.
-# Do not use this makefile directly, but only from `../Makefile'.
-# Copyright (C) 1986, 1988-1994 Free Software Foundation, Inc.
+# Copyright (C) 1986, 1988-1994, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -12,157 +26,403 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-cvs_srcdir = @top_srcdir@/src
-VPATH = @srcdir@
+# For now we need to include $(top_srcdir)/src because some systems
+# (at least 'AIX rioscpu2 3 4 000030498200',
+# 'HP-UX hp60 B.10.20 A 9000/770 hp60 two-user license', &
+# 'IRIX64 sgiop110 6.5 07151433 IP30') have trouble finding error.h
+# when compiling savecwd.c
+#
+# FIXME - the fact that compiling on my Linux 2.2.16 system finds
+# /usr/include/error.h instead of $(top_srcdir)/src/error.h but
+# everything compiles and tests anyhow implies that src/error.h may
+# be unecessary now. Should look more deeply into this
+#
+# $(includeopt) is CVS specific and set by configure
+
-SHELL = /bin/sh
+SHELL = @SHELL@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
-SOURCES = \
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
+
+INCLUDES = -I$(top_srcdir)/src $(includeopt)
+
+noinst_LIBRARIES = libcvs.a
+
+# Always use CVS's regular expression matcher regex.o, because of
+# variations in regular expression syntax - we want to be the same
+# across systems and (probably) compared with old versions of CVS too.
+#
+# On a more mundane/detail level, having regex.h match regex.c can be
+# an issue if we aren't careful.
+#
+# Also should look into unifying regular expression matching in CVS
+# with the diff library (perhaps to have the caller, CVS, do the
+# matching?)
+libcvs_a_SOURCES = \
argmatch.c \
- dup2.c \
- fncase.c \
- fnmatch.c \
ftruncate.c \
- getdate.c \
getdate.y \
getline.c \
getopt.c \
getopt1.c \
- hostname.c \
md5.c \
- memmove.c \
- mkdir.c \
regex.c \
- rename.c \
savecwd.c \
sighandle.c \
- strstr.c \
- strerror.c \
stripslash.c \
- strtoul.c \
- valloc.c \
- waitpid.c \
xgetwd.c \
- yesno.c
+ yesno.c \
+ getline.h \
+ getopt.h \
+ fnmatch.h \
+ md5.h \
+ regex.h \
+ savecwd.h \
+ system.h \
+ wait.h \
+ xselect.h \
+ xtime.h
-HEADERS = getline.h getopt.h fnmatch.h regex.h system.h wait.h md5.h savecwd.h
+libcvs_a_LIBADD = @LIBOBJS@
-# Always use CVS's regular expression matcher regex.o, because of
-# variations in regular expression syntax - we want to be the same
-# across systems and (probably) compared with old versions of CVS too.
-#
-# On a more mundane/detail level, having regex.h match regex.c can be
-# an issue if we aren't careful.
-#
-# Also should look into unifying regular expression matching in CVS
-# with the diff library (perhaps to have the caller, CVS, do the
-# matching?)
-OBJECTS = \
- @LIBOBJS@ \
- argmatch.o \
- getline.o \
- getopt.o \
- getopt1.o \
- md5.o \
- regex.o \
- savecwd.o \
- sighandle.o \
- stripslash.o \
- xgetwd.o \
- yesno.o \
- getdate.o
-
-DISTFILES = \
- .cvsignore ChangeLog ChangeLog.fsf Makefile.in \
- ${SOURCES} ${HEADERS} build_lib.com
+EXTRA_DIST = \
+ .cvsignore \
+ ChangeLog.fsf \
+ build_lib.com \
+ xgssapi.h
-DEFS = @DEFS@
-RANLIB = @RANLIB@
+EXEEXT =
+OBJEXT = o
+subdir = lib
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
-CC = @CC@
+libcvs_a_AR = $(AR) cru
+libcvs_a_DEPENDENCIES = @LIBOBJS@
+am_libcvs_a_OBJECTS = argmatch.$(OBJEXT) ftruncate.$(OBJEXT) \
+ getdate.$(OBJEXT) getline.$(OBJEXT) getopt.$(OBJEXT) \
+ getopt1.$(OBJEXT) md5.$(OBJEXT) regex.$(OBJEXT) \
+ savecwd.$(OBJEXT) sighandle.$(OBJEXT) stripslash.$(OBJEXT) \
+ xgetwd.$(OBJEXT) yesno.$(OBJEXT)
+libcvs_a_OBJECTS = $(am_libcvs_a_OBJECTS)
+AR = ar
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CFLAGS = @CFLAGS@
-CPPFLAGS=
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-YACC = @YACC@
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I$(top_builddir)/src
+DEFS = @DEFS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+DIST_SOURCES = $(libcvs_a_SOURCES)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/argmatch.Po $(DEPDIR)/dup2.Po \
+@AMDEP_TRUE@ $(DEPDIR)/fncase.Po $(DEPDIR)/fnmatch.Po \
+@AMDEP_TRUE@ $(DEPDIR)/ftruncate.Po $(DEPDIR)/getdate.Po \
+@AMDEP_TRUE@ $(DEPDIR)/getline.Po $(DEPDIR)/getopt.Po \
+@AMDEP_TRUE@ $(DEPDIR)/getopt1.Po $(DEPDIR)/hostname.Po \
+@AMDEP_TRUE@ $(DEPDIR)/md5.Po $(DEPDIR)/memmove.Po \
+@AMDEP_TRUE@ $(DEPDIR)/mkdir.Po $(DEPDIR)/regex.Po \
+@AMDEP_TRUE@ $(DEPDIR)/rename.Po $(DEPDIR)/savecwd.Po \
+@AMDEP_TRUE@ $(DEPDIR)/sighandle.Po $(DEPDIR)/strerror.Po \
+@AMDEP_TRUE@ $(DEPDIR)/stripslash.Po $(DEPDIR)/strstr.Po \
+@AMDEP_TRUE@ $(DEPDIR)/strtoul.Po $(DEPDIR)/valloc.Po \
+@AMDEP_TRUE@ $(DEPDIR)/waitpid.Po $(DEPDIR)/xgetwd.Po \
+@AMDEP_TRUE@ $(DEPDIR)/yesno.Po
+DIST_COMMON = ChangeLog Makefile.am Makefile.in dup2.c fncase.c \
+ fnmatch.c getdate.c hostname.c memmove.c mkdir.c rename.c \
+ strerror.c strstr.c strtoul.c valloc.c waitpid.c
+SOURCES = $(libcvs_a_SOURCES)
+OBJECTS = $(am_libcvs_a_OBJECTS)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj .y
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu lib/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+libcvs.a: $(libcvs_a_OBJECTS) $(libcvs_a_DEPENDENCIES)
+ -rm -f libcvs.a
+ $(libcvs_a_AR) libcvs.a $(libcvs_a_OBJECTS) $(libcvs_a_LIBADD)
+ $(RANLIB) libcvs.a
+
+.y.c:
+ $(YACC) $(AM_YFLAGS) $(YFLAGS) $< && mv y.tab.c $*.c
+ if test -f y.tab.h; then \
+ if cmp -s y.tab.h $*.h; then \
+ rm -f y.tab.h; \
+ else \
+ mv y.tab.h $*.h; \
+ fi; \
+ fi
+
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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)
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ unique=`for i in $$list @CONFIG@; 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)$$unique$(LISP)$$tags" \
+ || $(ETAGS) $(ETAGS_ARGS) $$tags $$unique $(LISP)
+
+GTAGS:
+ here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $$here
+
+distclean-tags:
+ -rm -f TAGS ID
+
+@_am_include@ @_am_quote@$(DEPDIR)/argmatch.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/dup2.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/fncase.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/fnmatch.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/ftruncate.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/getdate.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/getline.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/getopt.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/getopt1.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/hostname.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/md5.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/memmove.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/mkdir.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/regex.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/rename.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/savecwd.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/sighandle.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/strerror.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/stripslash.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/strstr.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/strtoul.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/valloc.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/waitpid.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/xgetwd.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/yesno.Po@_am_quote@
+
+distclean-depend:
+ -rm -rf $(DEPDIR)
+
+CCDEPMODE = @CCDEPMODE@
.c.o:
- $(CC) $(CPPFLAGS) -I.. -I$(srcdir) -I$(cvs_srcdir) \
- $(DEFS) $(CFLAGS) -c $<
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+
+.c.obj:
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `cygpath -w $<`
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-all: libcvs.a
-.PHONY: all
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
-install: all
-.PHONY: install
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
installdirs:
-.PHONY: installdirs
-tags: $(DISTFILES)
- ctags `for i in $(DISTFILES); do echo $(srcdir)/$$i; done`
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-TAGS: $(DISTFILES)
- etags `for i in $(DISTFILES); do echo $(srcdir)/$$i; done`
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-ls:
- @echo $(DISTFILES)
-.PHONY: ls
+installcheck: installcheck-am
-clean:
- rm -f *.a *.o
-.PHONY: clean
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-distclean: clean
- rm -f tags TAGS Makefile
-.PHONY: distclean
+mostlyclean-generic:
-realclean: distclean
- rm -f *.tab.c getdate.c
-.PHONY: realclean
+clean-generic:
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
- done
-.PHONY: dist-dir
-
-libcvs.a: $(OBJECTS)
- $(AR) cr $@ $(OBJECTS)
- -$(RANLIB) $@
-
-getdate.c: getdate.y
- @echo expect 10 shift/reduce conflicts
- $(YACC) $(srcdir)/getdate.y
- -@if test -f y.tab.c; then \
- mv y.tab.c getdate.c ;\
- else \
- if test -f getdate.tab.c ; then \
- mv getdate.tab.c getdate.c ; \
- else \
- echo '*** Unable to create getdate.c' ;\
- fi ;\
- fi
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-fnmatch.o: fnmatch.h
-getopt1.o: getopt.h
-regex.o: regex.h
-md5.o: md5.h
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f Makefile.in
+ -test -z "getdate.c" || rm -f getdate.c
+clean: clean-am
-xlint:
- @echo xlint does nothing
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
-subdir = lib
-Makefile: ../config.status Makefile.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-tags
+
+dvi:
+
+dvi-am:
+
+info:
+
+info-am:
+
+install-data-am:
-#../config.status: ../configure
-# cd .. ; $(SHELL) config.status --recheck
+install-exec-am:
+
+install-info:
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+.PHONY: all all-am check check-am clean clean-generic \
+ clean-noinstLIBRARIES distclean distclean-compile \
+ distclean-depend distclean-generic distclean-tags distdir dvi \
+ dvi-am info info-am install install-am install-data \
+ install-data-am install-exec install-exec-am install-info \
+ install-man install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic tags \
+ uninstall uninstall-am
+
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
-#../configure: ../configure.in
-# cd $(top_srcdir) ; autoconf
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/cvs/lib/getdate.y b/contrib/cvs/lib/getdate.y
index c3f18c6ef396..a2786eda7759 100644
--- a/contrib/cvs/lib/getdate.y
+++ b/contrib/cvs/lib/getdate.y
@@ -39,46 +39,11 @@
Include <sys/time.h> if that will be used. */
#if defined(vms)
-
-#include <types.h>
-#include <time.h>
-
-#else
-
-#include <sys/types.h>
-
-#ifdef TIME_WITH_SYS_TIME
-#include <sys/time.h>
-#include <time.h>
-#else
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#endif
-#endif
-
-#ifdef timezone
-#undef timezone /* needed for sgi */
-#endif
-
-#if defined(HAVE_SYS_TIMEB_H)
-#include <sys/timeb.h>
-#else
-/*
-** We use the obsolete `struct timeb' as part of our interface!
-** Since the system doesn't have it, we define it here;
-** our callers must do likewise.
-*/
-struct timeb {
- time_t time; /* Seconds since the epoch */
- unsigned short millitm; /* Field not used */
- short timezone; /* Minutes west of GMT */
- short dstflag; /* Field not used */
-};
-#endif /* defined(HAVE_SYS_TIMEB_H) */
-
-#endif /* defined(vms) */
+# include <types.h>
+#else /* defined(vms) */
+# include <sys/types.h>
+# include "xtime.h"
+#endif /* !defined(vms) */
#if defined (STDC_HEADERS) || defined (USG)
#include <string.h>
@@ -115,6 +80,7 @@ extern struct tm *localtime();
#define yylex getdate_yylex
#define yyerror getdate_yyerror
+static int yyparse ();
static int yylex ();
static int yyerror ();
diff --git a/contrib/cvs/lib/rename.c b/contrib/cvs/lib/rename.c
index ae3d36ebb430..8dc023909743 100644
--- a/contrib/cvs/lib/rename.c
+++ b/contrib/cvs/lib/rename.c
@@ -37,7 +37,7 @@ rename (from, to)
{
/* We don't check existence_error because the systems which need it
have rename(). */
- if (unlink (to) && errno != ENOENT)
+ if (CVS_UNLINK (to) && errno != ENOENT)
return -1;
if ((from_stats.st_mode & S_IFMT) == S_IFDIR)
{
@@ -72,7 +72,7 @@ rename (from, to)
{
/* We don't check existence_error because the systems which need it
have rename(). */
- if (link (from, to) == 0 && (unlink (from) == 0 || errno == ENOENT))
+ if (link (from, to) == 0 && (CVS_UNLINK (from) == 0 || errno == ENOENT))
return 0;
}
}
diff --git a/contrib/cvs/lib/system.h b/contrib/cvs/lib/system.h
index 8beedf0eda78..2c3adbd45d34 100644
--- a/contrib/cvs/lib/system.h
+++ b/contrib/cvs/lib/system.h
@@ -156,16 +156,7 @@ off_t lseek ();
char *getcwd ();
#endif
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
+#include "xtime.h"
#ifdef HAVE_IO_H
#include <io.h>
@@ -175,26 +166,6 @@ char *getcwd ();
#include <direct.h>
#endif
-#ifdef timezone
-#undef timezone /* needed for sgi */
-#endif
-
-#ifdef HAVE_SYS_TIMEB_H
-#include <sys/timeb.h>
-#else
-struct timeb {
- time_t time; /* Seconds since the epoch */
- unsigned short millitm; /* Field not used */
- short timezone;
- short dstflag; /* Field not used */
-};
-#endif
-
-#if !defined(HAVE_FTIME) && !defined(HAVE_TIMEZONE)
-#if !defined(timezone)
-extern long timezone;
-#endif
-#endif
/*
@@ -429,6 +400,10 @@ extern int errno;
#define CVS_FOPEN fopen
#endif
+#ifndef CVS_FDOPEN
+#define CVS_FDOPEN fdopen
+#endif
+
#ifndef CVS_MKDIR
#define CVS_MKDIR mkdir
#endif
@@ -437,6 +412,14 @@ extern int errno;
#define CVS_OPEN open
#endif
+#ifndef CVS_READDIR
+#define CVS_READDIR readdir
+#endif
+
+#ifndef CVS_CLOSEDIR
+#define CVS_CLOSEDIR closedir
+#endif
+
#ifndef CVS_OPENDIR
#define CVS_OPENDIR opendir
#endif
diff --git a/contrib/cvs/lib/xgssapi.h b/contrib/cvs/lib/xgssapi.h
new file mode 100644
index 000000000000..31b8e39c29a1
--- /dev/null
+++ b/contrib/cvs/lib/xgssapi.h
@@ -0,0 +1,30 @@
+/* This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details. */
+
+/* This file performs the generic include magic necessary for using
+ * cross platform gssapi which configure doesn't perform itself.
+ */
+
+/* Can't include both of these headers at the same time with Solaris 7 &
+ * Heimdal Kerberos 0.3. If some system ends up requiring both, a configure
+ * test like TIME_AND_SYS_TIME will probably be necessary.
+ */
+#ifdef HAVE_GSSAPI_H
+# include <gssapi.h>
+#else
+/* Assume existance of this header so that the user will get an informative
+ * message if HAVE_GSSAPI somehow gets defined with both headers missing.
+ */
+# include <gssapi/gssapi.h>
+#endif
+#ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H
+/* MIT Kerberos 5 v1.2.1 */
+# include <gssapi/gssapi_generic.h>
+#endif
diff --git a/contrib/cvs/lib/xselect.h b/contrib/cvs/lib/xselect.h
new file mode 100644
index 000000000000..f1df204cdb46
--- /dev/null
+++ b/contrib/cvs/lib/xselect.h
@@ -0,0 +1,21 @@
+/* This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details. */
+
+/* This file simply performs the include magic necessary for using select */
+#include <sys/types.h>
+#ifdef HAVE_SYS_BSDTYPES_H
+# include <sys/bsdtypes.h>
+#endif
+
+#include "xtime.h"
+
+#if HAVE_SYS_SELECT_H
+# include <sys/select.h>
+#endif
diff --git a/contrib/cvs/lib/xtime.h b/contrib/cvs/lib/xtime.h
new file mode 100644
index 000000000000..00d9fae874c3
--- /dev/null
+++ b/contrib/cvs/lib/xtime.h
@@ -0,0 +1,57 @@
+/* This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details. */
+
+/* This file simply performs the include magic necessary for using time
+ * functions
+ */
+
+#ifdef vms
+# include <time.h>
+#else /* vms */
+
+# if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+# else /* TIME_WITH_SYS_TIME */
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else /* HAVE_SYS_TIME_H */
+# include <time.h>
+# endif /* !HAVE_SYS_TIME_H */
+# endif /* !TIME_WITH_SYS_TIME */
+
+# ifdef HAVE_SYS_TIMEB_H
+# include <sys/timeb.h>
+# else /* HAVE_SYS_TIMEB_H */
+/*
+ * We use the obsolete `struct timeb' as part of our interface!
+ * Since the system doesn't have it, we define it here;
+ * our callers must do likewise.
+ *
+ * At the least we were using this in lib/getdate.y, but lib/system.h used to
+ * define it too, so maybe CVS is using it elsewhere.
+ */
+struct timeb {
+ time_t time; /* Seconds since the epoch */
+ unsigned short millitm; /* Field not used */
+ short timezone; /* Minutes west of GMT */
+ short dstflag; /* Field not used */
+};
+# endif /* !HAVE_SYS_TIMEB_H */
+
+# ifdef timezone
+# undef timezone /* needed for sgi */
+# endif /* timezone */
+
+# if !defined(HAVE_FTIME) && !defined(HAVE_TIMEZONE)
+extern long timezone;
+# endif /* !defined(HAVE_FTIME) && !defined(HAVE_TIMEZONE) */
+
+#endif /* !vms */
diff --git a/contrib/cvs/man/ChangeLog b/contrib/cvs/man/ChangeLog
index adb8e2dfec08..ed9563c8f30a 100644
--- a/contrib/cvs/man/ChangeLog
+++ b/contrib/cvs/man/ChangeLog
@@ -1,3 +1,20 @@
+2001-04-25 Derek Price <dprice@collab.net>
+
+ * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400.
+
+2001-03-14 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated
+
+2000-12-22 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated
+
+2000-12-21 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am: New file needed by Automake
+ * Makefile.in: Regenerated
+
2000-09-07 Larry Jones <larry.jones@sdrc.com>
* Makefile.in: Use @bindir@, @libdir@, @infodir@, and @mandir@
diff --git a/contrib/cvs/man/Makefile.am b/contrib/cvs/man/Makefile.am
new file mode 100644
index 000000000000..bd750c2586fc
--- /dev/null
+++ b/contrib/cvs/man/Makefile.am
@@ -0,0 +1,22 @@
+## Process this file with automake to produce Makefile.in
+# Makefile.am for GNU CVS man pages.
+# Copyright (C) 1986-1992, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+man_MANS = cvs.1 cvs.5 cvsbug.8
+EXTRA_DIST = \
+ .cvsignore \
+ $(man_MANS)
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
diff --git a/contrib/cvs/man/Makefile.in b/contrib/cvs/man/Makefile.in
index f9b566585eb7..7efae1228e02 100644
--- a/contrib/cvs/man/Makefile.in
+++ b/contrib/cvs/man/Makefile.in
@@ -1,6 +1,20 @@
-# Makefile for GNU CVS documentation.
-# Do not use this makefile directly, but only from `../Makefile'.
-# Copyright (C) 1986-1992 Free Software Foundation, Inc.
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Makefile.am for GNU CVS man pages.
+# Copyright (C) 1986-1992, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -12,80 +26,328 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-SHELL = /bin/sh
-srcdir = @srcdir@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
top_srcdir = @top_srcdir@
-VPATH = @srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
-MAN1FILES = cvs.1
-MAN5FILES = cvs.5
-MAN8FILES = cvsbug.8
-MANFILES = $(MAN1FILES) $(MAN5FILES) $(MAN8FILES)
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-DISTFILES = .cvsignore ChangeLog Makefile.in $(MANFILES)
INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
-prefix = @prefix@
-mandir = @mandir@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
+
+man_MANS = cvs.1 cvs.5 cvsbug.8
+EXTRA_DIST = \
+ .cvsignore \
+ $(man_MANS)
+
+EXEEXT =
+OBJEXT = o
+subdir = man
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+
+NROFF = nroff
+MANS = $(man_MANS)
+DIST_COMMON = ChangeLog Makefile.am Makefile.in
+all: all-am
+
+.SUFFIXES:
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu man/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+
man1dir = $(mandir)/man1
+install-man1: $(man1_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(man1dir)
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+ done
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man1_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.1*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man1dir)/$$inst; \
+ done
+
man5dir = $(mandir)/man5
-man8dir = $(mandir)/man8
+install-man5: $(man5_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(man5dir)
+ @list='$(man5_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.5*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man5dir)/$$inst; \
+ done
-all:
-.PHONY: all
+uninstall-man5:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man5_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.5*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man5dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man5dir)/$$inst; \
+ done
-# This needs to depend on installdirs so that (for example) the
-# install will not fail if $(prefix)/man/man5 does not yet exist.
-install: all installdirs
- for f in $(MAN1FILES); do \
- $(INSTALL_DATA) $(srcdir)/$$f $(man1dir)/$$f; \
+man8dir = $(mandir)/man8
+install-man8: $(man8_MANS) $(man_MANS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(man8dir)
+ @list='$(man8_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.8*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+ else file=$$i; fi; \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst"; \
+ $(INSTALL_DATA) $$file $(DESTDIR)$(man8dir)/$$inst; \
done
- for f in $(MAN5FILES); do \
- $(INSTALL_DATA) $(srcdir)/$$f $(man5dir)/$$f; \
+
+uninstall-man8:
+ @$(NORMAL_UNINSTALL)
+ @list='$(man8_MANS)'; \
+ l2='$(man_MANS)'; for i in $$l2; do \
+ case "$$i" in \
+ *.8*) list="$$list $$i" ;; \
+ esac; \
+ done; \
+ for i in $$list; do \
+ ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+ inst=`echo $$inst | sed -e 's/^.*\///'`; \
+ inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+ echo " rm -f $(DESTDIR)$(man8dir)/$$inst"; \
+ rm -f $(DESTDIR)$(man8dir)/$$inst; \
done
- for f in $(MAN8FILES); do \
- $(INSTALL_DATA) $(srcdir)/$$f $(man8dir)/$$f; \
+tags: TAGS
+TAGS:
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
done
+check-am: all-am
+check: check-am
+all-am: Makefile $(MANS)
installdirs:
- $(SHELL) $(top_srcdir)/mkinstalldirs $(man1dir) $(man5dir) $(man8dir)
+ $(mkinstalldirs) $(DESTDIR)$(man1dir) $(DESTDIR)$(man5dir) $(DESTDIR)$(man8dir)
-.PHONY: install installdirs
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-tags:
-.PHONY: tags
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-TAGS:
-.PHONY: TAGS
+installcheck: installcheck-am
-ls:
- @true
-.PHONY: ls
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-clean:
-.PHONY: clean
+mostlyclean-generic:
-distclean: clean
- rm -f Makefile
-.PHONY: distclean
+clean-generic:
-realclean: distclean
-.PHONY: realclean
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
- done
-.PHONY: dist-dir
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f Makefile.in
+clean: clean-am
-subdir = man
-Makefile: ../config.status Makefile.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic
+
+dvi:
+
+dvi-am:
+
+info:
-#../config.status: ../configure
-# cd .. ; $(SHELL) config.status --recheck
+info-am:
+
+install-data-am: install-man
+
+install-exec-am:
+
+install-info:
+
+install-man: install-man1 install-man5 install-man8
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+uninstall-am: uninstall-man
+
+uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am info info-am install \
+ install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-man install-man1 \
+ install-man5 install-man8 install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ uninstall uninstall-am uninstall-man uninstall-man1 \
+ uninstall-man5 uninstall-man8
+
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
-#../configure: ../configure.in
-# cd $(top_srcdir) ; autoconf
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/cvs/missing b/contrib/cvs/missing
new file mode 100755
index 000000000000..5f9da90636f5
--- /dev/null
+++ b/contrib/cvs/missing
@@ -0,0 +1,265 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+
+case "$1" in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing 0.3 - GNU automake"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`configure.in'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`configure.in'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`configure.in'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case "$f" in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+ fi
+ if [ -f "$file" ]; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ tar)
+ shift
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ fi
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar ${1+"$@"} && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar ${1+"$@"} && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case "$firstarg" in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" ${1+"$@"} && exit 0
+ ;;
+ esac
+ case "$firstarg" in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" ${1+"$@"} && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/contrib/cvs/mkinstalldirs b/contrib/cvs/mkinstalldirs
index 9259785ed4f0..1e240e3e4cdd 100755
--- a/contrib/cvs/mkinstalldirs
+++ b/contrib/cvs/mkinstalldirs
@@ -1,27 +1,34 @@
-#!/bin/sh
+#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
-# Last modified: 1994-03-25
# Public domain
-#
+
+# $Id: mkinstalldirs,v 1.4 2001/04/12 13:02:39 dprice Exp $
errstatus=0
-for file in ${1+"$@"} ; do
+for file
+do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
- for d in ${1+"$@"} ; do
+ for d
+ do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp" 1>&2
- mkdir "$pathcomp" || errstatus=$?
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ fi
fi
pathcomp="$pathcomp/"
diff --git a/contrib/cvs/src/ChangeLog b/contrib/cvs/src/ChangeLog
index a33464d08b41..f483a7b23095 100644
--- a/contrib/cvs/src/ChangeLog
+++ b/contrib/cvs/src/ChangeLog
@@ -1,4 +1,1079 @@
-2000-09-19 Larry Jones <larry.jones@sdrc.com>
+2001-04-27 Larry Jones <larry.jones@sdrc.com>
+
+ * main.c (lookup_command_attribute): Lookup specified command, not
+ whatever's in the global command_name.
+
+2001-04-25 Derek Price <dprice@collab.net>
+
+ * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400.
+ * version.c: Regenerated.
+
+2001-04-22 Larry Jones <larry.jones@sdrc.com>
+
+ * tag.c (tag_check_valid): Make an unwritable val-tags file a
+ warning instead of a fatal error.
+
+2001-04-20 Larry Jones <larry.jones@sdrc.com>
+
+ * annotate.c (annotate_usage): -r and -D are not mutually exclusive.
+ * main.c (cmd_usage): Add missing version subcommand.
+ * update.c (update_usage): Add missing -C option.
+
+ * sanity.sh (death2): New tests for previous change.
+
+ * classify.c (Classify_File): Treat a dead revision like the RCS
+ file doesn't exist.
+ * sanity.sh: Update to match.
+
+2001-04-16 Larry Jones <larry.jones@sdrc.com>
+
+ * checkout.c, update.c: Fix usage messages: -r and -D are not
+ mutually exclusive.
+ (Suggested by David L. Martin <dlmart2@home.com>.)
+
+ * logmsg.c (do_editor): Don't add a blank line to the message.
+ * sanity.sh (editor-log-file*): Update to match.
+
+ * checkout.c, update.c: Note in usage message that -k is sticky.
+
+ * server.c: (server_cleanup, wait_sig): Remove ancient SunOS kludge.
+ (Suggested by Rob Saccoccio <robs@chelsea.net>.)
+
+2001-04-04 Larry Jones <larry.jones@sdrc.com>
+
+ * sanity.sh (dotest, dotest_lit, dotest_fail, dotest_status,
+ dotest_sort): Don't count on $? being set in then or else clauses.
+
+ * ignore.c (ignore_files): Collect unignored files into a list and
+ sort it before calling PROC to avoid order dependencies. Rewrite
+ the while loop to allow normal continues instead of goto.
+
+2001-04-04 Derek Price <dprice@collab.net>
+
+ * sanity.sh (ignore-on-branch-3): Fix in the remote case.
+
+2001-04-03 Larry Jones <larry.jones@sdrc.com>
+
+ * update.c (update_fileproc): Remove unused variable (resurrecting).
+
+2001-04-03 Derek Price <dprice@collab.net>
+ Larry Jones <larry.jones@sdrc.com>
+ reported by Jakob Bøhm <JB@Danware.dk>
+
+ * update.c (update_fileproc): Don't store a file with T_UNKNOWN status
+ in ignlist if present in the sandbox.
+ * sanity.sh (ignore-on-branch): New test.
+ (ignore): Tidy this test.
+
+2001-04-02 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Make sure the test for `id' fails when a nonstandard `id'
+ is used and the user is root. Fix some quoting in error messages.
+ (fork): Take `cvs' out of the PATH.
+ (TODO): Add note about the test suite not working with user names over
+ eight characters in length.
+
+2001-04-02 Derek Price <dprice@collab.net>
+
+ * sanity.sh (fork): New test for CVS_SERVER default.
+ (TODO): Note about eventually removing most of the references to
+ CVS_SERVER.
+
+2001-04-02 Larry Jones <larry.jones@sdrc.com>
+
+ * client.c (connect_to_forked_server): Use program_path as the default
+ server instead of "cvs".
+
+2001-04-02 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Use less obfuscated English in my comment about sanity
+ checking sanity.sh.
+
+2001-04-02 Derek Price <dprice@collab.net>
+
+ * sanity.sh (rm-update-message): Create a test directory again but
+ change back to the correct directory upon completion this time.
+
+2001-04-02 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Change last two '[.*]'s to 'test's for
+ consistency and remove...
+ (TODO): the note from the TODO list.
+
+2001-04-02 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Add test for PWD before successful exit.
+
+2001-03-30 Larry Jones <larry.jones@sdrc.com>
+
+ * sanity.sh (rm-update-message): Remove duplicate code.
+
+2001-03-30 Derek Price <dprice@collab.net>
+
+ * sanity.sh (rm-update-message): New test for local/client-server
+ warning message discrepency.
+
+2001-03-30 Larry Jones <larry.jones@sdrc.com>
+
+ * annotate.c: Move annotate() here from rcs.c, support rannotate.
+ * Makefile.am, Makefile.in: Add annotate.c.
+ * main.c (cmds[], cmd_usage[]): Add rannotate.
+ * rcs.c: Move declarations of rcs_delta_op and RCS_deltas to...
+ * rcs.h: ... here.
+ * server.c (serve_rannotate): New.
+ (requests[]): Add rannotate.
+ * sanity.sh (ann): New tests for rannotate.
+
+ * log.c (rlog_proc): Remove dead code.
+
+2001-03-30 Derek Price <dprice@collab.net>
+
+ * sanity.sh (join-readonly-conflict): Run more of this through dotest.
+
+2001-03-30 Larry Jones <larry.jones@sdrc.com>
+
+ * log.c (log_fileproc): Don't output working file for rlog.
+ * sanity.sh (log): New tests for rlog.
+
+ * cvs.h (mtype): Add MISC type.
+ * log.c (cvslog): Support rlog as well as log.
+ (rlog_proc): New.
+ * main.c (cmds[], cmd_usage[]): Add rlog.
+ (main): Remove old rlog warning message.
+ * server.c (serve_rlog): New.
+ (requests[]): Add rlog.
+
+2001-03-29 Derek Price <dprice@collab.net>
+
+ * sanity.sh: cd to $TESTDIR once after it is normalized. Make TODO
+ on history and symlinks more specific. Tested properly this time.
+
+2001-03-29 Larry Jones <larry.jones@sdrc.com>
+
+ * main.c (cmds[], lookup_command_attribute, main): Include the
+ command attributes in the global command table instead of inferring
+ them from the command names. Change the sense of the
+ CVS_CMD_IGNORE_ADMROOT attribute to match its name.
+
+2001-03-29 Derek Price <dprice@collab.net>
+
+ * sanity.sh (*, basic2-64): Remove references to TMPPWD. Fix FIXME
+ at end of script now that $TESTDIR can't be relative.
+
+2001-03-29 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Normalize TESTDIR even when the user set it.
+
+2001-03-29 Larry Jones <larry.jones@sdrc.com>
+
+ * client.c (connect_to_pserver, start_tcp_server): Add IP address
+ to connect failed message.
+ (connect_to_forked_server, connect_to_pserver, start_tcp_server): Add
+ trace messages ala start_rsh_server.
+ (start_rsh_server): Include entire command in trace message for
+ START_RSH_WITH_POPEN_RW like ! START_RSH_WITH_POPEN_RW does.
+
+2001-03-29 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Global search & replace ${TESTDIR}/cvsroot with
+ ${CVSROOT_DIRNAME} for consistency.
+
+2001-03-29 Derek Price <dprice@collab.net>
+
+ * sanity.sh (conflicts-12[68].5): Remove sanity hack which has allowed
+ for a CVS bug since May 96/97. Not sure when the bug went bye-bye, but
+ the tests broke when $TESTDIR != $TMPPWD.
+
+2001-03-26 Larry Jones <larry.jones@sdrc.com>
+
+ * classify.c (Classify_File): Don't report a conflict for a removed
+ file when piping. Also simplify the code structure.
+ (Reported by Milos Kleint <milos.kleint@netbeans.com>.)
+ * sanity.sh (rmadd2-14[abc]): New tests for above.
+
+2001-03-24 Noel Cragg <noel@shave.cnet.com>
+
+ * diff.c: mods to allow `-T' and `-y' options to be passed through
+ to the diff library. This wasn't allowed earlier because of a
+ similarly named options that got passed through to the old rcs
+ programs. We've long since stopped sending `-T' to any rcs
+ utility and have never used `-y'. Any users of moldly CVS
+ versions which used to support `-T' have (hopefully) upgraded to
+ one where that option isn't supported. It seems reasonable to
+ enable them again and pass them through. (sanity.sh still works
+ anyways...)
+ (longopts): add short option equivalents for --initial-tab and
+ --side-by-side.
+ (diff): add new short options to getopt string and switch
+ statement.
+
+2001-03-22 Larry Jones <larry.jones@sdrc.com>
+
+ * sanity.sh: Add check for ${DOTSTAR} with large matches.
+
+2001-03-23 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Do the same as below for $keep.
+
+2001-03-23 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Replace 'remote=(yes|no)' with 'remote=(:|false)' since
+ often 'false' and more often ':' are shell builtins. This makes the
+ succinct, 'if $remote; then' faster than 'if test $remote = yes; then'.
+ Alter tests in the rest of the script to match the new usage. Added
+ a suffix of 'r' to remote test names when it was appropriate and I
+ remembered. Some reformatting.
+
+2001-03-22 Larry Jones <larry.jones@sdrc.com>
+
+ * sanity.sh (diffmerge1_yours, diffmerge1_mine): Check for exact
+ output instead of using wildcards to avoid buffer overflows in some
+ versions of expr.
+
+2001-03-21 Derek Price <dprice@collab.net>
+
+ * sanity.sh: cd to '/tmp' again rather than $HOME since HOME was set to
+ a value inside ${TESTDIR} by the script.
+
+2001-03-20 Derek Price <dprice@collab.net>
+
+ * sanity.sh (diffmerge1): Minor formatting and syntax changes.
+
+ for Jacob Burckhardt <bjacob@ca.metsci.com>
+
+ * sanity.sh (diffmerge1): More merging behavior tests. Specifically,
+ test some cases which broke before in Karl Tomlinson's diff fix was
+ checked in today.
+
+2001-03-20 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Don't use unescaped parens in sh outside of quotes.
+
+2001-03-20 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Don't remove ${TESTDIR} when -k (keep) set.
+
+2001-03-20 Derek Price <dprice@collab.net>
+
+ * sanity.sh: Change usage to match the new getopts format and comment.
+
+2001-03-16 Derek Price <dprice@collab.net>
+
+ * sanity.sh (modules2-nestedrename): New test. Verifies behavior of
+ renames nested under an ampersand module.
+ (modules2-ampertag): New test. Verifies an error condition which
+ prevents some ampersand modules from being checked out when a tag
+ is specified.
+
+2001-03-16 Derek Price <dprice@collab.net>
+
+ * sanity.sh (modules2): Additional test for ampersand module behavior
+ with '-d'.
+
+ for Greg Klanderman <greg@itasoftware.com>
+
+ * checkout.c (build_one_dir): Fix typo where clauses of two
+ conditionals were reversed in call to Create_Admin. This caused
+ the CVS/Tag file to be removed in cases where it should have been
+ set, and vice-versa. It only surfaced in rare cases as this code
+ is only invoked when using the -d option to build the path to
+ check out in. Further, the bug would only matter when checking
+ out a module containing ampersand modules within it, via
+ client/server CVS.
+
+2001-03-16 Derek Price <dprice@collab.net>
+
+ * sanity.sh (admin-28-5): Confirm that a missing tag during an
+ 'admin -n' operation is not a fatal error.
+
+2001-03-16 Derek Price <dprice@collab.net>
+
+ * admin.c (admin_data): Remove 'quiet' member.
+ (admin_fileproc): Use global 'really_quiet' rather than
+ admin_data->quiet.
+
+2001-03-16 Derek Price <dprice@collab.net>
+
+ * sanity.sh (admin): Replace hardcoded testdir path with the variable.
+
+2001-03-15 Derek Price <derek.price@openavenue.com>
+
+ * sanity.sh (basica, binfiles, head, admin): Adjust for new messages.
+ * admin.c (admin_fileproc): Only print messages when not in
+ really_quiet mode.
+
+ for Stephen Rasku <stephen@tgivan.com>
+
+ * rcs.c (RCS_tag2rev): Make a missing tag a survivable error.
+
+2001-03-15 Larry Jones <larry.jones@sdrc.com>
+
+ * subr.c (sleep_past): Fix various bugs that would result in a
+ negative sleep time if it weren't unsigned; since it is, it would
+ result in a very large sleep time. Ensure that us is always less
+ than 1000000. Don't try to sleep for more 1 sec with usleep.
+ Cast NULL select arguments to correct type just in case.
+
+2001-03-14 Derek Price <derek.price@openavenue.com>
+
+ * subr.c (sleep_past): New function.
+ * client.c (get_responses_and_close): Use new function.
+ * commit.c (commit): Ditto.
+ * update.c (do_update): Ditto.
+ * cvs.h: Prototype new function.
+
+ * stamp-h2.in: Regenerated.
+
+2001-03-14 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated.
+ * stamp-h2.in: Ditto.
+
+2001-03-14 Larry Jones <larry.jones@sdrc.com>
+
+ * commit.c (check_fileproc): Allow adding on the trunk when there's
+ an existing non-Attic RCS file as long as the head revision is dead.
+ This can happen due to an aborted resurrection.
+ (commit_fileproc): When resurrecting, consider the dead revision
+ along with the other files' revisions.
+ (findmaxrev): Avoid unnecessary work.
+ (checkaddfile): Only warn if file isn't in Attic as expected.
+ (Reported by Ross Burton <r.burton@180sw.com>.)
+ * sanity.sh (basica-r*): New tests for above.
+ (basica-o4): Update to match.
+
+2001-03-09 Larry Jones <larry.jones@sdrc.com>
+
+ * edit.c (edit_fileproc, unedit_fileproc): Some implementations of
+ asctime/ctime apparently use a leading zero on the date instead
+ of the space required by the C Standard. Correct for this so that
+ shared working directories work without hassle.
+ (Reported by David L. Martin <dlmart2@home.com>.)
+ * entries.c (fgetentent): Ditto.
+ * vers_ts.c (time_stamp_server, time_stamp) Ditto.
+
+2001-03-07 Larry Jones <larry.jones@sdrc.com>
+
+ * sanity.sh (basica, binfiles2, head, admin): Update to match
+ change to admin.c.
+
+2001-03-06 Larry Jones <larry.jones@sdrc.com>
+
+ * client.c (recv_bytes): Handle EOF as in recv_line().
+ (Reported by Pavel Roskin <proski@gnu.org>.)
+
+ * admin.c (admin_fileproc): Change final error message to clarify
+ that CVS refused to modify the RCS file rather than being unable to.
+
+2001-02-28 Jim Meyering <meyering@lucent.com>
+
+ * commit.c (commit_usage): Use `-F logfile' (rather than -F file') in
+ the description of that option, to be consistent with the `-F logfile'
+ in the Usage: line. Use spaces instead of TAB characters, and realign.
+
+2001-03-02 Derek Price <derek.price@openavenue.com>
+
+ * sanity.sh (crerepos): Make failed ${CVS_RSH-rsh} attempt print the
+ name of the command it actually used rather than 'rsh'.
+
+2001-02-27 Derek Price <derek.price@openavenue.com>
+
+ * sanity.sh (modules2-ampermod-*): Added these tests to make sure the
+ top level directory is created in an ampermodule when '-n' is passed to
+ checkout.
+
+ original bug report from
+ Wolfgang Haefelinger <Wolfgang.Haefelinger@Dresdner-Bank.com>
+
+2001-02-27 Derek Price <derek.price@openavenue.com>
+
+ * sanity.sh (version-[12]): replace ' (client/server)' with .* in these
+ two tests so that 'make check' works with whatever client/server
+ options the executable was compiled with.
+
+2001-02-23 Derek Price <derek.price@openavenue.com>
+
+ * main.c (main): Only check a cvsroot_t's isremote member when client
+ support is enabled.
+ * server.c: Include GSSAPI headers with client support as well as
+ server support.
+
+2001-02-21 Larry Jones <larry.jones@sdrc.com>
+
+ * modules.c, cvs.h (do_module): Add build_dirs argument and use it
+ instead of run_module_prog. Change all callers.
+ * tag.c (cvstag): For rtag, don't build directories.
+ * sanity.sh (modules3): Update to match.
+
+2001-02-20 Derek Price <derek.price@openavenue.com>
+
+ * client.c: Use xgssapi.h.
+ * server.c: Ditto.
+
+2001-02-15 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (cvs_SOURCES): Correct error from yesterday.
+ * Makefile.in: Regenerated.
+
+2001-02-14 Derek Price <derek.price@openavenue.com>
+
+ * server.c: Include xselect.h.
+ * update.c (do_update): Use best available sleep function.
+
+2001-02-14 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (cvs_SOURCES): Alphabetize and split to one/line.
+ (cvs_LDADD): Alphabetize and split to one/line.
+ * Makefile.in: Regenerated.
+
+2001-02-14 Larry Jones <larry.jones@sdrc.com>
+
+ * build_src.com: Remove references to rtag.c & rtag.obj.
+
+2001-02-13 Derek Price <derek.price@openavenue.com>
+
+ * main.c (date_to_tm): New function to convert an RCS date string to a
+ struct tm.
+ (tm_to_internet): New function to convert a struct tm to a date string
+ as specified by RFC822 and amended by RFC 1123.
+ (date_to_internet): Use the above two functions and a struct tm
+ intermediary for conversion.
+ * patch.c (patch_fileproc): Answer somebody's comment and use the new
+ diff_exec API.
+ * rcs.c (RCS_checkin): Use new diff_exec API.
+ (RCS_delete_revs): Use new diff_exec API.
+ (make_file_label): If the file name is DEVNULL, date it the Epoch for
+ compatibility with the POSIX.2 spec and Larry Wall's patch
+ implementation.
+ * rcscmds.c (diff_exec): Accept new label arguments.
+ * sanity.sh (death2): Update some diff tests to accept the new format.
+ * update.c (patch_file): Use new diff_exec API.
+ * diff.c (diff_fileproc): Create header labels appropriate for
+ compatibility with the Larry Wall version of patch.
+ (diff): Rename calls to strcat_and_allocate.
+ (strcat_and_allocate): Rename and move...
+ * subr.c (xrealloc_and_strcat): here.
+ * cvs.h: Update prototypes to match.
+
+2001-02-13 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (cvs_SOURCES): Remove rtag.c.
+
+2001-02-07 Larry Jones <larry.jones@sdrc.com>
+
+ * sanity.sh (directory_cmp): Return status rather than setting ISDIFF.
+ (basic2): Rewrite using dotest.
+
+2001-02-06 Larry Jones <larry.jones@sdrc.com>
+
+ * tag.c, rtag.c: Merge with tag.c being the surviving file.
+ * Makefile.in: Update to match.
+ * main.c (cmds): rtag() => cvstag().
+ * server.c (serve_rtag): Ditto, and set command name.
+
+2001-02-06 Derek Price <derek.price@openavenue.com>
+ Rex Jolliff <Rex_Jolliff@notes.ymp.gov>
+ Shawn Smith <Shawn_Smith@notes.ymp.gov>
+
+ * add.c: Replace opendir, closedir, & readdir calls with CVS_OPENDIR,
+ CVS_CLOSEDIR, & CVS_READDIR in support of changes to handle VMS DEC C
+ 5.7 {open,read,close}dir problems. Check today's entry in the vms
+ subdir for more.
+ * filesubr.c: ditto
+ * find_names.c: ditto
+ * ignore.c: ditto
+ * import.c: ditto
+ * lock.c: ditto
+ * update.c: ditto
+
+2001-02-02 Larry Jones <larry.jones@sdrc.com>
+
+ * error.h: Changed include guard macro from _error_h_ to ERROR_H;
+ names beginning with underscore are reserved.
+ * login.c (password_entry_parseline, password_entry_operation,
+ password_entry_operation_e, password_entry_operation_t): Removed
+ leading underscore(s).
+ (password_entry_parseline): Corrected error messages.
+ (password_entry_operation): Fixed uninitialized variable (password).
+ (login): Removed unused variable (found_password).
+
+ * rtag.c (rtag_proc): Call lock_tree_for_write() before calling
+ start_recursion. This fixes a serious problem where do_recursion
+ was reading and caching RCS files without any locks in place and
+ that information was subsequently being used to rewrite the file
+ causing any intermediate changes to be lost.
+ (rtag_filesdoneproc): Defunct.
+ (Reported by Karl Tomlinson <k.tomlinson@auckland.ac.nz>.)
+ * tag.c (cvstag, tag_filesdoneproc): Ditto.
+ * lock.c (lock_tree_for_write): Add which argument, change all
+ callers to pass W_LOCAL.
+ * rcs.h: Ditto.
+
+2001-01-29 Derek Price <derek.price@openavenue.com>
+
+ * client.c (get_cvs_port_number): change the prototype to accept a
+ const cvsroot_t * as input and add a FIXME comment
+ * cvs.h: new prototypes for get_cvs_port_number & normalize_cvsroot
+ * login.c (_password_entry_operation): consolidate all the ~/.cvspass
+ access into a single new function which reads ~/.cvspass in a backwards
+ compatible manner
+ (logout): use the new _password_entry_operation function
+ (login): ditto
+ (get_cvs_password): ditto
+ * root.c (normalize_cvsroot): move knowledge of default port & username
+ values inside
+
+2001-01-29 Larry Jones <larry.jones@sdrc.com>
+
+ * subr.c (shell_escape): New function.
+ * cvs.h: Declare it.
+ * logmsg.c (logfile_write): Use it to avoid problems with filenames
+ containing "'".
+ (Reported by Gerhard Ahuis <gerhard@ats.xs4all.nl>.)
+
+ * server.c (outbuf_memory_error, pserver_authenticate_connection,
+ kserver_authenticate_connection): If available, use syslog() to
+ record some errors.
+
+2001-01-25 Larry Jones <larry.jones@sdrc.com>
+
+ * server.c (do_cvs_command): If there's a partial output line left
+ over and the client doesn't support MT, go ahead and send it in an
+ M response instead of just dropping it.
+ (Reported by Milos Kleint <Milos.Kleint@netbeans.com>.)
+
+ * update.c (update_fileproc): Handle toss_local_changes in the
+ T_NEEDS_MERGE case.
+ (Inspired by Noel L Yap <yap_noel@jpmorgan.com>.)
+ * sanity.sh (clean): New tests for above.
+
+2001-01-23 Derek Price <derek.price@openavenue.com>
+
+ * run.c (run_exec): flush, if used, stderr and stdout before exit
+ * server.c (cvs_flusherr): flush stderr & send a stderr flush command
+ on the protocol pipe
+ (cvs_flushout): like above, for stdout
+ (do_cvs_command): handle flushes properly
+ * sanity.sh (reserved): make the commitinfo script echo errors to
+ stderr rather than stdin
+
+2001-01-18 Larry Jones <larry.jones@sdrc.com>
+
+ * log.c (option_revlist, revlist, log_usage, cvslog,
+ log_parse_revlist, log_expand_revlist, log_version_requested): Add
+ support for :: for exclusive ranges.
+ * admin.c (admin_usage): Reorder -o to be parallel to log -r.
+ * sanity.sh (log): New tests for above.
+
+2001-01-18 Derek Price <derek.price@openavenue.com>
+
+ * main.c: Add '2001' to the range of copyright years listed by the
+ --version option
+ * version.c.in (version): check current_parsed_root before its isremote
+ member to avoid a core dump
+ * sanity.sh (version): add a test for the version command
+
+ * version.c: regenerated
+
+2001-01-12 Larry Jones <larry.jones@sdrc.com>
+
+ * rcs.c, rcs.h (RCS_lock, RCS_unlock): Use RCS_gettag to find the
+ correct revision so that symbolic tags work correctly. (This
+ requires removing the "const" from the rev parameter since it's
+ passed to RCS_gettag which might modify it.)
+ (Reported by irina sturm <irina.sturm@st.com>.)
+
+2001-01-11 Larry Jones <larry.jones@sdrc.com>
+
+ * run.c (close_on_exec): Remove check for FD_CLOEXEC. As far as I
+ can see, it's *never* been defined, which defeats the whole point.
+ If F_SETFD is defined, it's probably safe to use it.
+
+ * server.c (do_cvs_command): Call close_on_exec on the protocol and
+ flow control pipes in the child process so they don't get inherited
+ by any subsidiary processes.
+ (Reported by Tristan Gingold <tgi@netgem.com>.)
+
+ * cvs.h (free_cvsroot_t): Spell correctly (was free_CVSroot_t).
+
+2001-01-10 Derek Price <derek.price@openavenue.com>
+ Rex Jolliff <Rex_Jolliff@notes.ymp.gov>
+
+ * build_src.com: VMS changes
+ * filesubr.c: replace calls to unlink() with CVS_UNLINK() for VMS
+ * rcs.c: ditto
+
+2001-01-10 Derek Price <derek.price@openavenue.com>
+
+ * main.c (current_root): explicitly list this as a static global
+
+2001-01-10 Derek Price <derek.price@openavenue.com>
+
+ * cvs.h (get_cvs_port_number): change name & prototype from
+ get_port_number
+ * client.c (get_cvs_port_number): new function which returns a port
+ number based on a cvsroot_t rather than requiring all possible sources
+ passed in
+ (connect_to_pserver): use new get_cvs_port_number function
+ (connect_to_server): ditto
+ * login.c (get_password): use new get_cvs_port_number function
+ (login): ditto
+ (logout): ditto
+
+2001-01-10 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am ($(srcdir)/version.c): specify $(srcdir) for all subparts
+ of the build since some systems don't allow mv's across partitions
+ * Makefile.in: regenerated
+
+2001-01-10 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (version.c): specify $(srcdir) explicitly in target rule
+ so version.c gets built properly for all makes.
+ (version.o): specify $(srcdir)/version.c explicitly so dependency is
+ found and built properly
+ * Makefile.in: regenerated
+
+2001-01-09 Derek Price <derek.price@openavenue.com>
+
+ * version.c: updated timestamp
+
+2001-01-09 Larry Jones <larry.jones@sdrc.com>
+
+ * server.c (server): Change to server_temp_dir immediately after
+ creating it so that any stray files that happen to be created go
+ there instead of in the server's initial directory, wherever that
+ may be.
+ * sanity.sh (modules5-15): Update to match.
+
+ * version.c.in: Update to match Derek's change to version.c.
+
+2001-01-09 Derek Price <derek.price@openavenue.com>
+
+ * cvs.h: Remove the various CVSroot_* bits and replace them with a
+ single structure of type cvsroot_t (current_parsed_root)
+
+ * root.c (parse_cvsroot): return pointer to a new cvsroot_t rather than
+ altering global variables
+ (local_cvsroot): return a pointer to a new cvsroot_t rather than
+ setting globals. changed the name of this function from
+ set_local_cvsroot to better explain new functionality
+ (new_cvsroot_t): new initializer function
+ (free_cvsroot_t): new function
+ (others): use current_parsed_root rather than the old CVSroot_* globals
+
+ * add.c: use current_parsed_root rather than the old CVSroot_* globals
+ * admin.c: ditto
+ * checkout.c: ditto
+ * client.c: ditto
+ * commit.c: ditto
+ * create_adm.c: ditto
+ * diff.c: ditto
+ * edit.c: ditto
+ * expand_path.c: ditto
+ * find_names.c: ditto
+ * history.c: ditto
+ * ignore.c: ditto
+ * import.c: ditto
+ * lock.c: ditto
+ * log.c: ditto
+ * login.c: ditto
+ * logmsg.c: ditto
+ * main.c: ditto
+ * mkmodules.c: ditto
+ * modules.c: ditto
+ * parseinfo.c: ditto
+ * patch.c: ditto
+ * rcs.c: ditto
+ * recurse.c: ditto
+ * release.c: ditto
+ * remove.c: ditto
+ * repos.c: ditto
+ * rtag.c: ditto
+ * server.c: ditto
+ * status.c: ditto
+ * tag.c: ditto
+ * update.c: ditto
+ * version.c: ditto
+ * watch.c: ditto
+ * wrapper.c: ditto
+
+2001-01-05 Derek Price <derek.price@openavenue.com>
+
+ * cvs.h (enum CVSmethod): add null_method
+ * root.c (method_names): correlate null_method & "undefined"
+ (parse_cvsroot): make two error cases non fatal
+ * sanity.sh (crerepos-6b): account for new error message, re above
+
+2001-01-05 Derek Price <derek.price@openavenue.com>
+
+ * src/Makefile.am (cvsbug, cvsbug_EXTRA_DIST, EXTRA_DIST): move cvsbug
+ target to configure.in - see ../ChangeLog for more
+ * src/cvsbug.in: Rename from cvsbug.sh
+ * src/cvsbug.sh: Rename to cvsbug.in
+
+2001-01-04 Larry Jones <larry.jones@sdrc.com>
+
+ * Makefile.am (cvsbug): Explicitly list input file ($< is only
+ valid in inference rules).
+ * Makefile.in: Ditto.
+
+2001-01-04 Derek Price <derek.price@openavenue.com>
+
+ * sanity.sh: use getopts rather than getopt for portability reasons
+
+2001-01-03 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (remotecheck): depend on 'all'
+ * Makefile.in: regenerated
+
+2000-12-29 Derek Price <derek.price@openavenue.com>
+
+ * sanity.sh: remove explicit "$@" from last checkin and move the 'do'
+ to the line following the 'for'. Apparently this is more portable.
+
+2000-12-29 Derek Price <derek.price@openavenue.com>
+
+ * sanity.sh: make "$@" explicit in 'for' statement since Solaris 5.6's
+ implementation of Bourne shell doesn't seem to implement this default
+ behavior.
+
+2000-12-27 Derek Price <derek.price@openavenue.com>
+
+ * sanity.sh: add a -f option for continuing from a particular test
+ and shorten --keep to -k so we can use the getopt function.
+
+2000-12-27 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (remotecheck): Make remotecheck dependant on all
+ * Makefile.in: regenerated
+
+2000-12-26 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: update timestamp
+ * stamp-h2.in: ditto
+ * version.c: ditto
+
+2000-12-26 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am: new target for version.c
+ (EXTRA_DIST): add version.c.in & version.c so builds work when
+ configure doesn't
+ * Makefile.in: Regenerated
+ * stamp-h2.in: update timestamp
+ * version.c: ditto
+
+2000-12-26 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (INCLUDES): add zlib
+ * Makefile.in: Regenerated
+
+2000-12-22 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am (DISTCLEANFILES): added a few files
+ (INCLUDES): commented
+ * Makefile.in: Regenerated
+
+2000-12-21 Derek Price <derek.price@openavenue.com>
+
+ * .cvsignore: Added .deps directory and a new stamp file
+ * Makefile.am: New file needed by Automake
+ * Makefile.in: Regenerated
+ * stamp-h2.in: New stamp file created by Automake
+ * version.c.in: use configure to generate version.c
+
+2000-12-16 Derek Price <derek.price@openavenue.com>
+
+ * server.c (server_update): Keep the vers structure up to date after
+ sending a Remove or Remove-entry command to the client
+ * update.c (update): remove call to server_updated() after
+ scratch_file()
+ (scratch_file): in server mode, call server_updated(), otherwise keep
+ the vers structure up to date
+ (join_file): add a trace, save the revision to Register() on a remove
+ before calling server_scratch & server_updated
+ * sanity.sh (join): Add test for a remove/add caused by an update
+ to a new branch and a join in the same step.
+
+2000-12-15 Larry Jones <larry.jones@sdrc.com>
+
+ * error.c (error): Add %ld and %lu.
+
+ * history.c: Change hrec.idx from int to long, reformat NEXT_BAR
+ for readability, add hrec_idx.
+ (fill_hrec): Change initialization to be portable and always set
+ idx so it can be used as a line number in error messages; improve
+ parsing and error checking.
+ (read_hrecs): Initialize hrec_idx, handle embedded NULs, warn about
+ no newline at end of file.
+ (select_hrec): Add basic validity checking.
+
+2000-12-07 Larry Jones <larry.jones@sdrc.com>
+
+ * history.c (history): Allow multiple -m options as documented.
+
+2000-11-29 Derek Price <derek.price@openavenue.com>
+
+ * root.c (parse_cvsroot): back out yesterday's redundant changes
+ * main.c (main): fix CVSROOT trace message to look like other trace
+ messages
+ * sanity.sh (multiroot2-9): expect new trace message
+
+2000-11-28 Derek Price <derek.price@openavenue.com>
+
+ * root.c (parse_cvsroot): add trace on this function
+ * client.c (get_port_number): make trace print look like others
+
+2000-11-16 Derek Price <derek.price@openavenue.com>
+
+ * filesubr.c (cvs_temp_file): back out the previous change in the
+ interests of portability, add an assertion, and fix the header comment
+
+2000-11-16 Derek Price <derek.price@openavenue.com>
+
+ * filesubr.c (cvs_temp_file): refine the exit behavior to notice if
+ the out param was passed in NULL and, if so, avoid setting it and delete
+ the temp file for later
+
+2000-11-16 Derek Price <derek.price@openavenue.com>
+
+ * filesubr.c (cvs_temp_file): fixed a garble or two, added some
+ additional error checking, and added a comment
+
+2000-11-15 Derek Price <derek.price@openavenue.com>
+
+ * filesubr.c (cvs_temp_file): added cvs_temp_file
+ function to use mkstemp rather than one of the other temp file
+ generators as gcc keeps complaining I should.
+ (cvs_temp_name): altered this function to simply wrap cvs_temp_file
+ and deprecated it
+ * cvs.h: added prototype for cvs_temp_file
+ * commit.c (commit): use the new function instead of the old and plug
+ an old (though related) memory leak.
+ * import.c (import): use the new function
+ * login.c (login): Ditto
+ * logmsg.c (do_editor, do_verify): Ditto
+ * patch.c (patch_fileproc): Ditto
+
+2000-11-14 Larry Jones <larry.jones@sdrc.com>
+
+ * update.c, update.h (do_update): Add xdotemplate parameter.
+ Change all callers.
+ (update_dirent_proc): Use dotemplate for Create_Admin, not 1.
+ * checkout.c (checkout_proc): Don't create CVS/Template if
+ exporting.
+ (Reported by Andrey Podkolzin <mdh@zenon.net>.)
+
+2000-11-08 Larry Jones <larry.jones@sdrc.com>
+
+ * admin.c (admin): Use getgroups() to check for membership in
+ CVS_ADMIN_GROUP if it exists. In any event, check the user's
+ primary group in addition to any additional groups.
+ (Reported by Thomas Okken <TOkken@refco.com>.)
+
+2000-11-06 Jim Meyering <meyering@lucent.com>
+
+ Compile with gcc's -Wformat and fix the exposed problems.
+ * root.c (parse_cvsroot) [! HAVE_KERBEROS]: Provide an argument
+ for the %s error format spec.
+ [! HAVE_GSSAPI]: Likewise.
+ (normalize_cvsroot): Put comment delimiters around token after `#endif'.
+
+2000-11-03 Larry Jones <larry.jones@sdrc.com>
+
+ * sanity.sh: Some versions of sed require a space between -e and
+ the value.
+
+2000-10-27 Larry Jones <larry.jones@sdrc.com>
+
+ * checkout.c (checkout): Don't check for a safe location if just
+ cat'ing the module database.
+ (Reported by Ilya Martynov <m_ilya@agava.com>.)
+ Have -s set cat as well as status; it simplifies the code.
+
+2000-10-26 Larry Jones <larry.jones@sdrc.com>
+
+ * sanity.sh (join-admin-2): Check output from all commands instead
+ of (mostly) discarding. (Some of the tests used to produce stray
+ output in remote mode.)
+
+ * sanity.sh (dotest_line_by_line): Handle empty lines in pattern
+ (expr doesn't distingish between successfully matching nothing
+ and failing to match anything).
+
+ * sanity.sh (dotest_internal): Rearrange and use elif to simplify.
+
+2000-10-24 Jim Meyering <meyering@lucent.com>
+
+ Fix a bug, introduced with my fix of 2000-07-10, whereby -kk would
+ sometimes be ignored for some of the files involved in an update.
+
+ * update.c (join_file): Restore the original value of `options'
+ right after calling checkout_file.
+ * sanity.sh (join-admin-2): New test for this.
+
+2000-10-23 Derek Price <derek.price@openavenue.com>
+ James Youngman <jay@gnu.org>
+
+ * sanity.sh: it's /gnu/bin, not /gun/bin. Thanks go to James Youngman
+ <jay@gnu.org> for the bug report and patch.
+
+2000-10-20 Jim Kingdon <http://sourceforge.net/users/kingdon/>
+
+ * server.c (switch_to_user): Set CVS_USER. Patch from Sudish
+ Joseph and popularized by dozens (e.g. mozilla.org, also others).
+
+2000-10-20 Derek Price <derek.price@openavenue.com>
+ KOIE Hidetaka <hide@koie.org>
+
+ * root.c (normalize_cvsroot): plug a memory leak. Thanks to
+ KOIE Hidetaka <hide@koie.org>
+
+2000-10-18 Derek Price <derek.price@openavenue.com>
+
+ * client.c (connect_to_pserver): added a close brace the lack of which
+ was preventing compilation when gssapi was enabled. Removed a
+ redundant check for HAVE_KERBEROS.
+
+2000-10-18 Derek Price <derek.price@openavenue.com>
+
+ * root.c (normalize_cvsroot): removed references to free_port_s and the
+ now useless call to free now that port_s is on the stack. Thanks to
+ Jon Miner.
+
+2000-10-18 Derek Price <derek.price@openavenue.com>
+
+ * root.c (normalize_cvsroot): remove calls to snprintf for
+ compatibility with M$ Windoze.
+
+2000-10-18 Derek Price <derek.price@openavenue.com>
+
+ * sanity.sh (crerepos-6a, crerepos-6a-r): fix a "?" in a regex & pipe
+ the output of a test to /dev/null since we don't know what error
+ messages specific rsh implementations will output.
+
+2000-10-17 Derek Price <derek.price@openavenue.com>
+
+ * cvs.h: added CVSroot_password variable. Provided prototypes for
+ get_port_number & normalize_cvsroot.
+ * client.c (get_port_number): Fixed an ANSI prototype I had included
+ for get_port_number.
+ * login.c (login, logout): Removed two checks for a non-null
+ CVSroot_username since parse_cvsroot now supplies a default in pserver
+ mode. allow for a password in CVSROOT
+ (get_cvs_passsword): return CVSroot_password if it was supplied
+ in the CVSROOT.
+ * root.c (parse_cvsroot): Changed CVSROOT spec from
+ :method:user@host/port:/cvsroot to
+ :method:[[user][:password]@]host[:[port]]/cvsroot
+ Removed the xstrdup function since we'd rather have the error checking
+ from the version in subr.c anyhow. Moved some error messages which
+ looked like they would print the wrong error message after a failed
+ connect_to_gserver call.
+ (normalize_cvsroot): return a normalized CVSROOT for use in the
+ .cvspass file.
+ * sanity.sh (crerepos-6): fix a test which was expecting an old error
+ message.
+
+ * client.c (connect_to_pserver): Moved some error messages which looked like they
+ would print the wrong error message after a failed connect_to_gserver
+ call.
+
+ * login.c (login): Paranoiacly zero a password in memory.
+
+2000-10-12 Derek Price <derek.price@openavenue.com>
+
+ * client.c (auth_server_port_number -> get_port_number, start_pserver,
+ start_tcp_server): use a port specified in CVSROOT instead of the
+ default port. Failing that, use the CVS_CLIENT_PORT environment
+ variable.
+ * cvs.h: Added global CVSroot_port & renamed auth_server_port_number.
+ * root.c (parse_cvsroot): Parse the new CVSROOT format properly.
+ Incidentally reformated some error messages for uniformity and
+ readability.
+ * sanity.sh (crerepos): fix two tests which were now expecting the
+ wrong error message.
+
+2000-10-11 Larry Jones <larry.jones@sdrc.com>
+
+ * server.c (pserver_authenticate_connection): Fix stupid mistake
+ in previous change.
+
+2000-10-11 Derek Price <derek.price@openavenue.com>
+
+ * main.c (main): Dispose old CVSroot when parsing a '-d' option if
+ free_CVSroot is set.
+ * root.c (parse_cvsroot): remove references to 'cvsroot_parsed', a
+ static boolean I expect hasn't been used since CVS learned to handle
+ multiple CVSROOTs.
+
+2000-10-10 Larry Jones <larry.jones@sdrc.com>
+
+ * server.c (print_error): Make up a message if strerror fails.
+
+ * server.c (pserver_authenticate_connection): Give a real error
+ message for an invalid repository.
+
+2000-10-06 Derek Price <derek.price@openavenue.com>
+
+ * add.c (add): Made quiet mode affect some warning messages as seemed
+ appropriate. Specifically, some of the messages which a user might
+ want to ignore so they don't have to be quite so specific on the
+ command line: files added twice, files already in the repository and
+ check out properly (i.e. but picked up by 'cvs add *'), & files which
+ are readded in place of a dead revision or onto a branch. '-q' will
+ not change the non-zero exit code for the cases where at least one
+ passed in file name was already in the Entries file. There seems to
+ be a precedent in remove.c.
+ * remove.c (cvsremove): switched the "use cvs ci to make these changes
+ permanent message" to only print w/o '-Q' to match the new behavior of
+ add. This seems appropriate as '-Q' is defined to restrict messages
+ to critical errors.
+ * sanity.sh (adderrmsg): Added some tests for the above behavior.
+
+2000-10-05 Larry Jones <larry.jones@sdrc.com>
+
+ * client.c (call_in_directory): Create CVSADM directory if it doesn't
+ exist in the directory. This makes client/server work more like
+ standalone when checking out into an existing (non-CVS) directory.
+ * sanity.sh (dirs2, conflicts3, toplevel): Update to match.
+
+2000-10-03 Larry Jones <larry.jones@sdrc.com>
+
+ * filesubr.c (get_homedir): Ignore $HOME when running in server mode.
+
+2000-10-02 Larry Jones <larry.jones@sdrc.com>
+
+ * cvs.h: Define (and use) T_PATCH as a valid file classification
+ even when SERVER_SUPPORT isn't defined -- it simplifies the code.
+ * classify.c (Classify_File): Ditto.
+ * commit.c (check_fileproc): Ditto.
+ * status.c (status_fileproc): Ditto.
+ * update.c (update_fileproc): Ditto.
+ * tag.c (check_fileproc): Accept T_PATCH in addition to T_CHECKOUT.
+ * sanity.sh (tagc-10): Update to match.
+
+2000-09-29 Larry Jones <larry.jones@sdrc.com>
+
+ * client.c (get_responses_and_close): Reset server_fd to -1 after
+ shutting down.
+ (Reported by Joerg Thoennes <Joerg.Thoennes@data-sciences.de>.)
+
+2000-09-27 Larry Jones <larry.jones@sdrc.com>
+
+ * commit.c (commit): Don't sleep before returning in server mode,
+ just let the client do it.
+ * update.c (do_update): Ditto.
+
+ * sanity.sh (find_tool): Correct method of checking for GNU tools.
+
+ * checkout.c (checkout_proc): Match up user directories with
+ repository directories instead of using Emptydir.
+ * sanity.sh (cvsadm, emptydir): Update to match.
+
+2000-09-19 Larry Jones <larry.jones@sdrc.com>
+
+ * version.c: Push version number to 1.11.0.1.
* version.c: Version 1.11.
diff --git a/contrib/cvs/src/Makefile.am b/contrib/cvs/src/Makefile.am
new file mode 100644
index 000000000000..768d4f8651a4
--- /dev/null
+++ b/contrib/cvs/src/Makefile.am
@@ -0,0 +1,144 @@
+## Process this file with automake to produce Makefile.in
+# Makefile for GNU CVS program.
+# Copyright (C) 1986, 1988-1990, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+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
+# try and remove naming ocnflicts and fix Automake to allow particular includes
+# to be attached only to particular object files. Short term fix is either or.
+##INCLUDES = -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib
+INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/diff -I$(top_srcdir)/zlib $(includeopt)
+
+bin_PROGRAMS = cvs
+bin_SCRIPTS = cvsbug
+
+# The cvs executable
+cvs_SOURCES = \
+ add.c \
+ admin.c \
+ annotate.c \
+ buffer.c \
+ checkin.c \
+ checkout.c \
+ classify.c \
+ client.c \
+ commit.c \
+ create_adm.c \
+ cvsrc.c diff.c \
+ edit.c \
+ entries.c \
+ error.c \
+ expand_path.c \
+ fileattr.c \
+ filesubr.c \
+ find_names.c \
+ hardlink.c \
+ hash.c \
+ history.c \
+ ignore.c \
+ import.c \
+ lock.c \
+ log.c \
+ login.c \
+ logmsg.c \
+ main.c \
+ mkmodules.c \
+ modules.c \
+ myndbm.c \
+ no_diff.c \
+ parseinfo.c \
+ patch.c \
+ rcs.c \
+ rcscmds.c \
+ recurse.c \
+ release.c \
+ remove.c \
+ repos.c \
+ root.c \
+ run.c \
+ scramble.c \
+ server.c \
+ status.c \
+ subr.c \
+ tag.c \
+ update.c \
+ vers_ts.c \
+ watch.c \
+ wrapper.c \
+ zlib.c \
+ buffer.h \
+ client.h \
+ cvs.h \
+ edit.h \
+ error.h \
+ fileattr.h \
+ hardlink.h \
+ hash.h \
+ myndbm.h \
+ rcs.h \
+ server.h \
+ update.h \
+ watch.h
+cvs_LDADD = \
+ ../diff/libdiff.a \
+ ../lib/libcvs.a \
+ ../zlib/libz.a \
+ version.o
+cvs_EXTRA_DIST = version.c
+
+# 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
+
+# General
+EXTRA_DIST = \
+ $(cvs_EXTRA_DIST) \
+ .cvsignore \
+ ChangeLog-9194 \
+ ChangeLog-9395 \
+ ChangeLog-96 \
+ ChangeLog-97 \
+ build_src.com \
+ sanity.sh \
+ version.c \
+ version.c.in
+
+check-local:
+ $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs
+
+.PHONY: remotecheck
+remotecheck: all
+ $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs
+
+## MAINTAINER Targets
+
+# version.c
+# - build this here so that we can distribute it
+# - version.c needs to be updated only once, since it depends on
+# configure.in, not on the results of a 'configure' run.
+# - It is guaranteed (with GNU Make) that when the version in configure.in
+# is changed, acversion.m4 is built only after the new version number is
+# propagated to the Makefile. (Libtool uses the same guarantee.)
+# - need the explicit version.o dependency or else make won't match
+# $(srcdir)/version.c when looking for a dependency for version.c
+version.o: $(srcdir)/version.c
+$(srcdir)/version.c: $(srcdir)/version.c.in $(top_srcdir)/configure.in
+ sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/version.c.in >$(srcdir)/version.tc
+ mv $(srcdir)/version.tc $(srcdir)/version.c
+
+# for backwards compatibility with the old makefiles
+.PHONY: realclean
+realclean: maintainer-clean
diff --git a/contrib/cvs/src/Makefile.in b/contrib/cvs/src/Makefile.in
index d09b0cb1c023..c80deab8794a 100644
--- a/contrib/cvs/src/Makefile.in
+++ b/contrib/cvs/src/Makefile.in
@@ -1,6 +1,20 @@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
# Makefile for GNU CVS program.
-# Do not use this makefile directly, but only from `../Makefile'.
-# Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
+# Copyright (C) 1986, 1988-1990, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -12,182 +26,584 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-SHELL = /bin/sh
-srcdir = @srcdir@
+srcdir = @srcdir@
top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-
+VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
-# Where to install the executables.
bindir = @bindir@
-
-# Where to put the system-wide .cvsrc file
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
libdir = @libdir@
-
-# Where to put the manual pages.
+infodir = @infodir@
mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-# Use cp if you don't have install.
INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
-LIBS = @LIBS@
+SHELL = /bin/sh
-SOURCES = add.c admin.c buffer.c checkin.c checkout.c classify.c client.c \
-commit.c create_adm.c cvsrc.c diff.c edit.c entries.c error.c expand_path.c \
-fileattr.c find_names.c hardlink.c hash.c history.c ignore.c import.c \
-lock.c log.c login.c logmsg.c main.c mkmodules.c modules.c myndbm.c no_diff.c \
-parseinfo.c patch.c rcs.c rcscmds.c recurse.c release.c remove.c repos.c \
-root.c rtag.c scramble.c server.c status.c subr.c filesubr.c run.c \
-tag.c update.c watch.c wrapper.c vers_ts.c version.c zlib.c
+# $(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
+# try and remove naming ocnflicts and fix Automake to allow particular includes
+# to be attached only to particular object files. Short term fix is either or.
+INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/diff -I$(top_srcdir)/zlib $(includeopt)
+
+bin_PROGRAMS = cvs
+bin_SCRIPTS = cvsbug
+
+# The cvs executable
+cvs_SOURCES = \
+ add.c \
+ admin.c \
+ annotate.c \
+ buffer.c \
+ checkin.c \
+ checkout.c \
+ classify.c \
+ client.c \
+ commit.c \
+ create_adm.c \
+ cvsrc.c diff.c \
+ edit.c \
+ entries.c \
+ error.c \
+ expand_path.c \
+ fileattr.c \
+ filesubr.c \
+ find_names.c \
+ hardlink.c \
+ hash.c \
+ history.c \
+ ignore.c \
+ import.c \
+ lock.c \
+ log.c \
+ login.c \
+ logmsg.c \
+ main.c \
+ mkmodules.c \
+ modules.c \
+ myndbm.c \
+ no_diff.c \
+ parseinfo.c \
+ patch.c \
+ rcs.c \
+ rcscmds.c \
+ recurse.c \
+ release.c \
+ remove.c \
+ repos.c \
+ root.c \
+ run.c \
+ scramble.c \
+ server.c \
+ status.c \
+ subr.c \
+ tag.c \
+ update.c \
+ vers_ts.c \
+ watch.c \
+ wrapper.c \
+ zlib.c \
+ buffer.h \
+ client.h \
+ cvs.h \
+ edit.h \
+ error.h \
+ fileattr.h \
+ hardlink.h \
+ hash.h \
+ myndbm.h \
+ rcs.h \
+ server.h \
+ update.h \
+ watch.h
+
+cvs_LDADD = \
+ ../diff/libdiff.a \
+ ../lib/libcvs.a \
+ ../zlib/libz.a \
+ version.o
+
+cvs_EXTRA_DIST = version.c
+
+# 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
+
+# General
+EXTRA_DIST = \
+ $(cvs_EXTRA_DIST) \
+ .cvsignore \
+ ChangeLog-9194 \
+ ChangeLog-9395 \
+ ChangeLog-96 \
+ ChangeLog-97 \
+ build_src.com \
+ sanity.sh \
+ version.c \
+ version.c.in
+
+EXEEXT =
+OBJEXT = o
+subdir = src
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h options.h
+CONFIG_CLEAN_FILES = cvsbug
+bin_PROGRAMS = cvs$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_cvs_OBJECTS = add.$(OBJEXT) admin.$(OBJEXT) annotate.$(OBJEXT) \
+ buffer.$(OBJEXT) checkin.$(OBJEXT) checkout.$(OBJEXT) \
+ classify.$(OBJEXT) client.$(OBJEXT) commit.$(OBJEXT) \
+ create_adm.$(OBJEXT) cvsrc.$(OBJEXT) diff.$(OBJEXT) \
+ edit.$(OBJEXT) entries.$(OBJEXT) error.$(OBJEXT) \
+ expand_path.$(OBJEXT) fileattr.$(OBJEXT) filesubr.$(OBJEXT) \
+ find_names.$(OBJEXT) hardlink.$(OBJEXT) hash.$(OBJEXT) \
+ history.$(OBJEXT) ignore.$(OBJEXT) import.$(OBJEXT) \
+ lock.$(OBJEXT) log.$(OBJEXT) login.$(OBJEXT) logmsg.$(OBJEXT) \
+ main.$(OBJEXT) mkmodules.$(OBJEXT) modules.$(OBJEXT) \
+ myndbm.$(OBJEXT) no_diff.$(OBJEXT) parseinfo.$(OBJEXT) \
+ patch.$(OBJEXT) rcs.$(OBJEXT) rcscmds.$(OBJEXT) \
+ recurse.$(OBJEXT) release.$(OBJEXT) remove.$(OBJEXT) \
+ repos.$(OBJEXT) root.$(OBJEXT) run.$(OBJEXT) scramble.$(OBJEXT) \
+ server.$(OBJEXT) status.$(OBJEXT) subr.$(OBJEXT) tag.$(OBJEXT) \
+ update.$(OBJEXT) vers_ts.$(OBJEXT) watch.$(OBJEXT) \
+ wrapper.$(OBJEXT) zlib.$(OBJEXT)
+cvs_OBJECTS = $(am_cvs_OBJECTS)
+cvs_DEPENDENCIES = ../diff/libdiff.a ../lib/libcvs.a ../zlib/libz.a \
+ version.o
+cvs_LDFLAGS =
+SCRIPTS = $(bin_SCRIPTS)
+
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CFLAGS = @CFLAGS@
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-OBJECTS = add.o admin.o buffer.o checkin.o checkout.o classify.o client.o \
-commit.o create_adm.o cvsrc.o diff.o edit.o entries.o expand_path.o \
-fileattr.o find_names.o hardlink.o hash.o history.o ignore.o import.o \
-lock.o log.o login.o logmsg.o main.o mkmodules.o modules.o myndbm.o no_diff.o \
-parseinfo.o patch.o rcs.o rcscmds.o recurse.o release.o remove.o repos.o \
-root.o rtag.o scramble.o server.o status.o tag.o update.o \
-watch.o wrapper.o vers_ts.o \
-subr.o filesubr.o run.o version.o error.o zlib.o
+DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -I.
+DEFS = @DEFS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+DIST_SOURCES = $(cvs_SOURCES)
+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)/watch.Po $(DEPDIR)/wrapper.Po \
+@AMDEP_TRUE@ $(DEPDIR)/zlib.Po
+DIST_COMMON = ./stamp-h2.in ChangeLog Makefile.am Makefile.in cvsbug.in \
+ options.h.in
+SOURCES = $(cvs_SOURCES)
+OBJECTS = $(am_cvs_OBJECTS)
+
+all: options.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+
+$(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
+cvsbug: $(top_builddir)/config.status cvsbug.in
+ cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
+ done
-HEADERS = buffer.h cvs.h rcs.h hardlink.h hash.h myndbm.h \
- update.h server.h client.h error.h fileattr.h edit.h watch.h
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
-TAGFILES = $(HEADERS) options.h.in $(SOURCES)
+clean-binPROGRAMS:
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+cvs$(EXEEXT): $(cvs_OBJECTS) $(cvs_DEPENDENCIES)
+ @rm -f cvs$(EXEEXT)
+ $(LINK) $(cvs_LDFLAGS) $(cvs_OBJECTS) $(cvs_LDADD) $(LIBS)
+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; \
+ else :; fi; \
+ done
-DISTFILES = .cvsignore Makefile.in \
- ChangeLog ChangeLog-97 ChangeLog-96 ChangeLog-9395 ChangeLog-9194 \
- sanity.sh cvsbug.sh $(TAGFILES) build_src.com
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; for p in $$list; do \
+ f="`echo $$p|sed '$(transform)'`"; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
-PROGS = cvs cvsbug
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(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)
+
+TAGS: $(HEADERS) $(SOURCES) options.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(TAGS_FILES)'; \
+ unique=`for i in $$list @CONFIG@; 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)
+
+GTAGS:
+ here=`CDPATH=: && cd $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $$here
+
+distclean-tags:
+ -rm -f TAGS ID
+
+@_am_include@ @_am_quote@$(DEPDIR)/add.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/admin.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/annotate.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/buffer.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/checkin.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/checkout.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/classify.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/client.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/commit.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/create_adm.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/cvsrc.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/diff.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/edit.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/entries.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/error.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/expand_path.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/fileattr.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/filesubr.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/find_names.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/hardlink.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/hash.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/history.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/ignore.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/import.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/lock.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/log.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/login.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/logmsg.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/main.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/mkmodules.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/modules.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/myndbm.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/no_diff.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/parseinfo.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/patch.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/rcs.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/rcscmds.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/recurse.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/release.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/remove.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/repos.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/root.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/run.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/scramble.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/server.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/status.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/subr.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/tag.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/update.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/vers_ts.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/watch.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/wrapper.Po@_am_quote@
+@_am_include@ @_am_quote@$(DEPDIR)/zlib.Po@_am_quote@
+
+distclean-depend:
+ -rm -rf $(DEPDIR)
+
+CCDEPMODE = @CCDEPMODE@
-DEFS = @DEFS@ @includeopt@
+.c.o:
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+
+.c.obj:
+ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(COMPILE) -c -o $@ `cygpath -w $<`
+
+
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: check-am
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) options.h
-CC = @CC@
-CFLAGS = @CFLAGS@
-CPPFLAGS =
-LDFLAGS = @LDFLAGS@
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir)
-INCLUDES = -I. -I.. -I$(srcdir) -I$(top_srcdir)/lib
-.c.o:
- $(CC) $(CPPFLAGS) $(INCLUDES) $(DEFS) $(CFLAGS) -c $<
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-all: Makefile $(PROGS)
-.PHONY: all
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-saber_cvs:
- @cd ..; $(MAKE) saber SUBDIRS=src
+installcheck: installcheck-am
-lint:
- @cd ..; $(MAKE) lint SUBDIRS=src
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-install: installdirs
- @for prog in $(PROGS); do \
- echo Installing $$prog in $(bindir); \
- $(INSTALL) $$prog $(bindir)/$$prog ; \
- done
+mostlyclean-generic:
-installdirs:
- $(SHELL) $(top_srcdir)/mkinstalldirs $(bindir)
+clean-generic:
-.PHONY: install installdirs
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
-installcheck:
- $(SHELL) $(srcdir)/sanity.sh $(bindir)/cvs
-.PHONY: installcheck
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f Makefile.in
+clean: clean-am
-check: all
- $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs
-.PHONY: check
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
-# I'm not sure there is any remaining reason for this to be separate from
-# `make check'.
-remotecheck: all
- $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs
-.PHONY: remotecheck
+distclean: distclean-am
-tags: $(TAGFILES)
- ctags $(TAGFILES)
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-hdr distclean-tags
-TAGS: $(TAGFILES)
- etags `for i in $(TAGFILES); do echo $(srcdir)/$$i; done`
+dvi:
-ls:
- @echo $(DISTFILES)
-.PHONY: ls
+dvi-am:
-clean:
- rm -f $(PROGS) *.o core check.log check.plog
-.PHONY: clean
+info:
-distclean: clean
- rm -f tags TAGS Makefile options.h
-.PHONY: distclean
+info-am:
-realclean: distclean
-.PHONY: realclean
+install-data-am:
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
- done
-.PHONY: dist-dir
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
-# Linking rules.
+install-info:
-$(PROGS): ../lib/libcvs.a ../zlib/libz.a ../diff/libdiff.a
+install-man:
-cvs: $(OBJECTS)
- $(CC) $(OBJECTS) ../lib/libcvs.a ../zlib/libz.a ../diff/libdiff.a $(LIBS) $(LDFLAGS) -o $@
+installcheck-am:
-xlint: $(SOURCES)
- files= ; \
- for i in $(SOURCES) ; do \
- files="$$files $(srcdir)/$$i" ; \
- done ; \
- sh -c "lint $(DEFS) $(INCLUDES) $$files | grep -v \"possible pointer alignment problem\" \
- | grep -v \"argument closure unused\""
+maintainer-clean: maintainer-clean-am
-saber: $(SOURCES)
- # load $(CFLAGS) $(SOURCES)
- # load ../lib/libcvs.a $(LIBS)
+maintainer-clean-am: distclean-am maintainer-clean-generic
-cvsbug: cvsbug.sh $(srcdir)/version.c
- echo > .fname \
- cvs-`sed < $(srcdir)/version.c \
- -e '/version_string/!d' \
- -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
- -e q`
- sed -e 's,xLIBDIRx,$(libdir)/cvs,g' \
- -e "s,xVERSIONx,`cat .fname`,g" $(srcdir)/$@.sh > $@-t
- rm -f .fname
- mv $@-t $@
- chmod a+x $@
+mostlyclean: mostlyclean-am
-# Compilation rules.
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
-$(OBJECTS): $(HEADERS) options.h
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS
-rcscmds.o: rcscmds.c $(top_srcdir)/diff/diffrun.h
- $(CC) $(CPPFLAGS) $(INCLUDES) -I$(top_srcdir)/diff $(DEFS) $(CFLAGS) -c $(srcdir)/rcscmds.c
+.PHONY: 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-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
-zlib.o: zlib.c $(top_srcdir)/zlib/zlib.h
- $(CC) $(CPPFLAGS) $(INCLUDES) -I$(top_srcdir)/zlib $(DEFS) $(CFLAGS) -c $(srcdir)/zlib.c
-subdir = src
-Makefile: ../config.status Makefile.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+check-local:
+ $(SHELL) $(srcdir)/sanity.sh `pwd`/cvs
-options.h: ../config.status options.h.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+.PHONY: remotecheck
+remotecheck: all
+ $(SHELL) $(srcdir)/sanity.sh -r `pwd`/cvs
-#../config.status: ../configure
-# cd .. ; $(SHELL) config.status --recheck
+# version.c
+# - build this here so that we can distribute it
+# - version.c needs to be updated only once, since it depends on
+# configure.in, not on the results of a 'configure' run.
+# - It is guaranteed (with GNU Make) that when the version in configure.in
+# is changed, acversion.m4 is built only after the new version number is
+# propagated to the Makefile. (Libtool uses the same guarantee.)
+# - need the explicit version.o dependency or else make won't match
+# $(srcdir)/version.c when looking for a dependency for version.c
+version.o: $(srcdir)/version.c
+$(srcdir)/version.c: $(srcdir)/version.c.in $(top_srcdir)/configure.in
+ sed 's,@VERSION\@,$(VERSION),g' $(srcdir)/version.c.in >$(srcdir)/version.tc
+ mv $(srcdir)/version.tc $(srcdir)/version.c
+
+# for backwards compatibility with the old makefiles
+.PHONY: realclean
+realclean: maintainer-clean
-#../configure: ../configure.in
-# cd $(top_srcdir) ; autoconf
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/cvs/src/add.c b/contrib/cvs/src/add.c
index dbefda59ca5a..9ec6a3d63d41 100644
--- a/contrib/cvs/src/add.c
+++ b/contrib/cvs/src/add.c
@@ -93,7 +93,7 @@ add (argc, argv)
if (argc <= 0)
usage (add_usage);
- cvsroot_len = strlen (CVSroot_directory);
+ cvsroot_len = strlen (current_parsed_root->directory);
/* First some sanity checks. I know that the CVS case is (sort of)
also handled by add_directory, but we need to check here so the
@@ -111,7 +111,8 @@ add (argc, argv)
|| strcmp (argv[i], "..") == 0
|| fncmp (argv[i], CVSADM) == 0)
{
- error (0, 0, "cannot add special file `%s'; skipping", argv[i]);
+ if (!quiet)
+ error (0, 0, "cannot add special file `%s'; skipping", argv[i]);
skip_file = 1;
}
else
@@ -147,7 +148,7 @@ add (argc, argv)
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
int i;
@@ -227,7 +228,7 @@ add (argc, argv)
repository = Name_Repository (NULL, update_dir);
/* don't add stuff to Emptydir */
- if (strncmp (repository, CVSroot_directory, cvsroot_len) == 0
+ if (strncmp (repository, current_parsed_root->directory, cvsroot_len) == 0
&& ISDIRSEP (repository[cvsroot_len])
&& strncmp (repository + cvsroot_len + 1,
CVSROOTADM,
@@ -323,7 +324,7 @@ add (argc, argv)
repository = Name_Repository (NULL, finfo.update_dir);
/* don't add stuff to Emptydir */
- if (strncmp (repository, CVSroot_directory, cvsroot_len) == 0
+ if (strncmp (repository, current_parsed_root->directory, cvsroot_len) == 0
&& ISDIRSEP (repository[cvsroot_len])
&& strncmp (repository + cvsroot_len + 1,
CVSROOTADM,
@@ -356,7 +357,7 @@ add (argc, argv)
error (1, errno, "cannot read directory %s", finfo.repository);
found_name = NULL;
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (cvs_casecmp (dp->d_name, finfo.file) == 0)
{
@@ -368,7 +369,7 @@ add (argc, argv)
}
if (errno != 0)
error (1, errno, "cannot read directory %s", finfo.repository);
- closedir (dirp);
+ CVS_CLOSEDIR (dirp);
if (found_name != NULL)
{
@@ -448,8 +449,8 @@ add (argc, argv)
if (vers->nonbranch)
{
error (0, 0,
- "cannot add file on non-branch tag %s",
- vers->tag);
+ "cannot add file on non-branch tag %s",
+ vers->tag);
++err;
}
else
@@ -505,18 +506,21 @@ same name already exists in the repository.");
}
else
{
- if (vers->tag)
- error (0, 0, "\
+ if (!quiet)
+ {
+ if (vers->tag)
+ error (0, 0, "\
file `%s' will be added on branch `%s' from version %s",
- finfo.fullname, vers->tag, vers->vn_rcs);
- else
- /* I'm not sure that mentioning
- vers->vn_rcs makes any sense here; I
- can't think of a way to word the
- message which is not confusing. */
- error (0, 0, "\
+ finfo.fullname, vers->tag, vers->vn_rcs);
+ else
+ /* I'm not sure that mentioning
+ vers->vn_rcs makes any sense here; I
+ can't think of a way to word the
+ message which is not confusing. */
+ error (0, 0, "\
re-adding file %s (in place of dead revision %s)",
- finfo.fullname, vers->vn_rcs);
+ finfo.fullname, vers->vn_rcs);
+ }
Register (entries, finfo.file, "0", vers->ts_user,
vers->options,
vers->tag, NULL, NULL);
@@ -542,7 +546,8 @@ re-adding file %s (in place of dead revision %s)",
* An entry for a new-born file, ts_rcs is dummy, but that is
* inappropriate here
*/
- error (0, 0, "%s has already been entered", finfo.fullname);
+ if (!quiet)
+ error (0, 0, "%s has already been entered", finfo.fullname);
err++;
}
else if (vers->vn_user[0] == '-')
@@ -607,9 +612,10 @@ cannot resurrect %s; RCS file removed by second party", finfo.fullname);
else
{
/* A normal entry, ts_rcs is valid, so it must already be there */
- error (0, 0, "%s already exists, with version number %s",
- finfo.fullname,
- vers->vn_user);
+ if (!quiet)
+ error (0, 0, "%s already exists, with version number %s",
+ finfo.fullname,
+ vers->vn_user);
err++;
}
freevers_ts (&vers);
@@ -641,7 +647,7 @@ cannot resurrect %s; RCS file removed by second party", finfo.fullname);
free (found_name);
#endif
}
- if (added_files)
+ if (added_files && !really_quiet)
error (0, 0, "use '%s commit' to add %s permanently",
program_name,
(added_files == 1) ? "this file" : "these files");
diff --git a/contrib/cvs/src/admin.c b/contrib/cvs/src/admin.c
index 637663a569dd..359bedf1a653 100644
--- a/contrib/cvs/src/admin.c
+++ b/contrib/cvs/src/admin.c
@@ -46,13 +46,13 @@ static const char *const admin_usage[] =
"\t revision on the default branch.\n",
"\t-N tag[:[rev]] Same as -n except override existing tag.\n",
"\t-o range Delete (outdate) specified range of revisions:\n",
+ "\t rev1:rev2 Between rev1 and rev2, including rev1 and rev2.\n",
"\t rev1::rev2 Between rev1 and rev2, excluding rev1 and rev2.\n",
+ "\t rev: rev and following revisions on the same branch.\n",
"\t rev:: After rev on the same branch.\n",
+ "\t :rev rev and previous revisions on the same branch.\n",
"\t ::rev Before rev on the same branch.\n",
"\t rev Just rev.\n",
- "\t rev1:rev2 Between rev1 and rev2, including rev1 and rev2.\n",
- "\t rev: rev and following revisions on the same branch.\n",
- "\t :rev rev and previous revisions on the same branch.\n",
"\t-q Run quietly.\n",
"\t-s state[:rev] Set revision state (latest revision on branch,\n",
"\t latest revision on trunk if omitted).\n",
@@ -97,10 +97,6 @@ struct admin_data
/* Interactive (-I). Problematic with client/server. */
int interactive;
- /* Quiet (-q). Not the same as the global -q option, which is a bit
- on the confusing side, perhaps. */
- int quiet;
-
/* This is the cheesy part. It is a vector with the options which
we don't deal with above (e.g. "-afoo" "-abar,baz"). In the future
this presumably will be replaced by other variables which break
@@ -337,7 +333,15 @@ admin (argc, argv)
break;
case 'q':
- admin_data.quiet = 1;
+ /* Silently set the global really_quiet flag. This keeps admin in
+ * sync with the RCS man page and allows us to silently support
+ * older servers when necessary.
+ *
+ * Some logic says we might want to output a deprecation warning
+ * here, but I'm opting not to in order to stay quietly in sync
+ * with the RCS man page.
+ */
+ really_quiet = 1;
break;
case 'x':
@@ -372,29 +376,40 @@ admin (argc, argv)
argv += optind;
#ifdef CVS_ADMIN_GROUP
- grp = getgrnam(CVS_ADMIN_GROUP);
- /* skip usage right check if group CVS_ADMIN_GROUP does not exist */
- if (grp != NULL)
+ /* The use of `cvs admin -k' is unrestricted. However, any other
+ option is restricted if the group CVS_ADMIN_GROUP exists. */
+ if (!only_k_option &&
+ (grp = getgrnam(CVS_ADMIN_GROUP)) != NULL)
{
+#ifdef HAVE_GETGROUPS
+ gid_t *grps;
+ int n;
+
+ /* get number of auxiliary groups */
+ n = getgroups (0, NULL);
+ if (n < 0)
+ error (1, errno, "unable to get number of auxiliary groups");
+ grps = (gid_t *) xmalloc((n + 1) * sizeof *grps);
+ n = getgroups (n, grps);
+ if (n < 0)
+ error (1, errno, "unable to get list of auxiliary groups");
+ grps[n] = getgid();
+ for (i = 0; i <= n; i++)
+ if (grps[i] == grp->gr_gid) break;
+ free (grps);
+ if (i > n)
+ error (1, 0, "usage is restricted to members of the group %s",
+ CVS_ADMIN_GROUP);
+#else
char *me = getcaller();
- char **grnam = grp->gr_mem;
- /* The use of `cvs admin -k' is unrestricted. However, any
- other option is restricted. */
- int denied = ! only_k_option;
+ char **grnam;
- while (*grnam)
- {
- if (strcmp(*grnam, me) == 0)
- {
- denied = 0;
- break;
- }
- grnam++;
- }
-
- if (denied)
+ for (grnam = grp->gr_mem; *grnam; grnam++)
+ if (strcmp (*grnam, me) == 0) break;
+ if (!*grnam && getgid() != grp->gr_gid)
error (1, 0, "usage is restricted to members of the group %s",
CVS_ADMIN_GROUP);
+#endif
}
#endif
@@ -427,7 +442,7 @@ admin (argc, argv)
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
/* We're the client side. Fire up the remote server. */
start_server ();
@@ -470,7 +485,10 @@ admin (argc, argv)
}
send_to_server ("\012", 1);
}
- if (admin_data.quiet)
+ /* Send this for all really_quiets since we know that it will be silently
+ * ignored when unneeded. This supports old servers.
+ */
+ if (really_quiet)
send_arg ("-q");
if (admin_data.kflag != NULL)
send_arg (admin_data.kflag);
@@ -486,7 +504,7 @@ admin (argc, argv)
}
#endif /* CLIENT_SUPPORT */
- lock_tree_for_write (argc, argv, 0, 0);
+ lock_tree_for_write (argc, argv, 0, W_LOCAL, 0);
err = start_recursion (admin_fileproc, (FILESDONEPROC) NULL, admin_dirproc,
(DIRLEAVEPROC) NULL, (void *)&admin_data,
@@ -546,7 +564,7 @@ admin_fileproc (callerdat, finfo)
status = 0;
- if (!admin_data->quiet)
+ if (!really_quiet)
{
cvs_output ("RCS file: ", 0);
cvs_output (rcs->path, 0);
@@ -767,9 +785,10 @@ admin_fileproc (callerdat, finfo)
}
else
{
- error (0, 0,
- "%s: Symbolic name or revision %s is undefined",
- rcs->path, p);
+ if (!really_quiet)
+ error (0, 0,
+ "%s: Symbolic name or revision %s is undefined.",
+ rcs->path, p);
status = 1;
}
free (tag);
@@ -854,12 +873,10 @@ admin_fileproc (callerdat, finfo)
}
}
- /* TODO: reconcile the weird discrepancies between
- admin_data->quiet and quiet. */
if (status == 0)
{
RCS_rewrite (rcs, NULL, NULL);
- if (!admin_data->quiet)
+ if (!really_quiet)
cvs_output ("done\n", 5);
}
else
@@ -868,7 +885,8 @@ admin_fileproc (callerdat, finfo)
message has given a more specific error. The point of this
additional message is to make it clear that the previous problems
caused CVS to forget about the idea of modifying the RCS file. */
- error (0, 0, "cannot modify RCS file for `%s'", finfo->file);
+ if (!really_quiet)
+ error (0, 0, "RCS file for `%s' not modified.", finfo->file);
RCS_abandon (rcs);
}
diff --git a/contrib/cvs/src/annotate.c b/contrib/cvs/src/annotate.c
new file mode 100644
index 000000000000..827619d29b36
--- /dev/null
+++ b/contrib/cvs/src/annotate.c
@@ -0,0 +1,277 @@
+/*
+ * 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.
+ *
+ * Show last revision where each line modified
+ *
+ * Prints the specified files with each line annotated with the revision
+ * number where it was last modified. With no argument, annotates all
+ * all the files in the directory (recursive by default).
+ */
+
+#include "cvs.h"
+
+/* Options from the command line. */
+
+static int force_tag_match = 1;
+static char *tag = NULL;
+static int tag_validated;
+static char *date = NULL;
+
+static int is_rannotate;
+
+static int annotate_fileproc PROTO ((void *callerdat, struct file_info *));
+static int rannotate_proc PROTO((int argc, char **argv, char *xwhere,
+ char *mwhere, char *mfile, int shorten,
+ int local, char *mname, char *msg));
+
+static const char *const annotate_usage[] =
+{
+ "Usage: %s %s [-lRf] [-r rev] [-D date] [files...]\n",
+ "\t-l\tLocal directory only, no recursion.\n",
+ "\t-R\tProcess directories recursively.\n",
+ "\t-f\tUse head revision if tag/date not found.\n",
+ "\t-r rev\tAnnotate file as of specified revision/tag.\n",
+ "\t-D date\tAnnotate file as of specified date.\n",
+ "(Specify the --help global option for a list of other help options)\n",
+ NULL
+};
+
+/* Command to show the revision, date, and author where each line of a
+ file was modified. */
+
+int
+annotate (argc, argv)
+ int argc;
+ char **argv;
+{
+ int local = 0;
+ int err = 0;
+ int c;
+
+ is_rannotate = (strcmp(command_name, "rannotate") == 0);
+
+ if (argc == -1)
+ usage (annotate_usage);
+
+ optind = 0;
+ while ((c = getopt (argc, argv, "+lr:D:fR")) != -1)
+ {
+ switch (c)
+ {
+ case 'l':
+ local = 1;
+ break;
+ case 'R':
+ local = 0;
+ break;
+ case 'r':
+ tag = optarg;
+ break;
+ case 'D':
+ date = Make_Date (optarg);
+ break;
+ case 'f':
+ force_tag_match = 0;
+ break;
+ case '?':
+ default:
+ usage (annotate_usage);
+ break;
+ }
+ }
+ argc -= optind;
+ argv += optind;
+
+#ifdef CLIENT_SUPPORT
+ if (current_parsed_root->isremote)
+ {
+ start_server ();
+
+ if (is_rannotate && !supported_request ("rannotate"))
+ error (1, 0, "server does not support rannotate");
+
+ ign_setup ();
+
+ if (local)
+ send_arg ("-l");
+ if (!force_tag_match)
+ send_arg ("-f");
+ option_with_arg ("-r", tag);
+ if (date)
+ client_senddate (date);
+ if (is_rannotate)
+ {
+ int i;
+ for (i = 0; i < argc; i++)
+ send_arg (argv[i]);
+ send_to_server ("rannotate\012", 0);
+ }
+ else
+ {
+ send_files (argc, argv, local, 0, SEND_NO_CONTENTS);
+ send_file_names (argc, argv, SEND_EXPAND_WILD);
+ send_to_server ("annotate\012", 0);
+ }
+ return get_responses_and_close ();
+ }
+#endif /* CLIENT_SUPPORT */
+
+ if (is_rannotate)
+ {
+ DBM *db;
+ int i;
+ db = open_module ();
+ for (i = 0; i < argc; i++)
+ {
+ err += do_module (db, argv[i], MISC, "Annotating", rannotate_proc,
+ (char *) NULL, 0, 0, 0, 0, (char *) NULL);
+ }
+ close_module (db);
+ }
+ else
+ {
+ err = rannotate_proc (argc + 1, argv - 1, (char *) NULL,
+ (char *) NULL, (char *) NULL, 0, 0, (char *) NULL,
+ (char *) NULL);
+ }
+
+ return err;
+}
+
+
+static int
+rannotate_proc (argc, argv, xwhere, mwhere, mfile, shorten, local, mname, msg)
+ int argc;
+ char **argv;
+ char *xwhere;
+ char *mwhere;
+ char *mfile;
+ int shorten;
+ int local;
+ char *mname;
+ char *msg;
+{
+ /* Begin section which is identical to patch_proc--should this
+ be abstracted out somehow? */
+ char *myargv[2];
+ int err = 0;
+ int which;
+ char *repository;
+ char *where;
+
+ if (is_rannotate)
+ {
+ repository = xmalloc (strlen (current_parsed_root->directory) + strlen (argv[0])
+ + (mfile == NULL ? 0 : strlen (mfile) + 1) + 2);
+ (void) sprintf (repository, "%s/%s", current_parsed_root->directory, argv[0]);
+ where = xmalloc (strlen (argv[0]) + (mfile == NULL ? 0 : strlen (mfile) + 1)
+ + 1);
+ (void) strcpy (where, argv[0]);
+
+ /* if mfile isn't null, we need to set up to do only part of the module */
+ if (mfile != NULL)
+ {
+ char *cp;
+ char *path;
+
+ /* if the portion of the module is a path, put the dir part on repos */
+ if ((cp = strrchr (mfile, '/')) != NULL)
+ {
+ *cp = '\0';
+ (void) strcat (repository, "/");
+ (void) strcat (repository, mfile);
+ (void) strcat (where, "/");
+ (void) strcat (where, mfile);
+ mfile = cp + 1;
+ }
+
+ /* take care of the rest */
+ path = xmalloc (strlen (repository) + strlen (mfile) + 5);
+ (void) sprintf (path, "%s/%s", repository, mfile);
+ if (isdir (path))
+ {
+ /* directory means repository gets the dir tacked on */
+ (void) strcpy (repository, path);
+ (void) strcat (where, "/");
+ (void) strcat (where, mfile);
+ }
+ else
+ {
+ myargv[0] = argv[0];
+ myargv[1] = mfile;
+ argc = 2;
+ argv = myargv;
+ }
+ free (path);
+ }
+
+ /* cd to the starting repository */
+ if ( CVS_CHDIR (repository) < 0)
+ {
+ error (0, errno, "cannot chdir to %s", repository);
+ free (repository);
+ return (1);
+ }
+ free (repository);
+ /* End section which is identical to patch_proc. */
+
+ if (force_tag_match && tag != NULL)
+ which = W_REPOS | W_ATTIC;
+ else
+ which = W_REPOS;
+ repository = NULL;
+ }
+ else
+ {
+ where = NULL;
+ which = W_LOCAL;
+ repository = "";
+ }
+
+ if (tag != NULL && !tag_validated)
+ {
+ tag_check_valid (tag, argc - 1, argv + 1, local, 0, repository);
+ tag_validated = 1;
+ }
+
+ err = start_recursion (annotate_fileproc, (FILESDONEPROC) NULL,
+ (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
+ argc - 1, argv + 1, local, which, 0, 1,
+ where, 1);
+ return err;
+}
+
+
+static int
+annotate_fileproc (callerdat, finfo)
+ void *callerdat;
+ struct file_info *finfo;
+{
+ char *version;
+
+ if (finfo->rcs == NULL)
+ return (1);
+
+ if (finfo->rcs->flags & PARTIAL)
+ RCS_reparsercsfile (finfo->rcs, (FILE **) NULL, (struct rcsbuffer *) NULL);
+
+ version = RCS_getversion (finfo->rcs, tag, date, force_tag_match,
+ (int *) NULL);
+ if (version == NULL)
+ return 0;
+
+ /* Distinguish output for various files if we are processing
+ several files. */
+ cvs_outerr ("Annotations for ", 0);
+ cvs_outerr (finfo->fullname, 0);
+ cvs_outerr ("\n***************\n", 0);
+
+ RCS_deltas (finfo->rcs, (FILE *) NULL, (struct rcsbuffer *) NULL,
+ version, RCS_ANNOTATE, NULL, NULL, NULL, NULL);
+ free (version);
+ return 0;
+}
diff --git a/contrib/cvs/src/checkout.c b/contrib/cvs/src/checkout.c
index 1a66b5be6f95..86dc9510eb0b 100644
--- a/contrib/cvs/src/checkout.c
+++ b/contrib/cvs/src/checkout.c
@@ -44,7 +44,7 @@ static int checkout_proc PROTO((int argc, char **argv, char *where,
static const char *const checkout_usage[] =
{
- "Usage:\n %s %s [-ANPRcflnps] [-r rev | -D date] [-d dir]\n",
+ "Usage:\n %s %s [-ANPRcflnps] [-r rev] [-D date] [-d dir]\n",
" [-j rev1] [-j rev2] [-k kopt] modules...\n",
"\t-A\tReset any sticky tags/date/kopts.\n",
"\t-N\tDon't shorten module paths if -d specified.\n",
@@ -59,7 +59,7 @@ static const char *const checkout_usage[] =
"\t-r rev\tCheck out revision or tag. (implies -P) (is sticky)\n",
"\t-D date\tCheck out revisions as of date. (implies -P) (is sticky)\n",
"\t-d dir\tCheck out into dir instead of module name.\n",
- "\t-k kopt\tUse RCS kopt -k option on checkout.\n",
+ "\t-k kopt\tUse RCS kopt -k option on checkout. (is sticky)\n",
"\t-j rev\tMerge in changes made between current revision and rev.\n",
"(Specify the --help global option for a list of other help options)\n",
NULL
@@ -67,7 +67,7 @@ static const char *const checkout_usage[] =
static const char *const export_usage[] =
{
- "Usage: %s %s [-NRfln] [-r rev | -D date] [-d dir] [-k kopt] module...\n",
+ "Usage: %s %s [-NRfln] [-r rev] [-D date] [-d dir] [-k kopt] module...\n",
"\t-N\tDon't shorten module paths if -d specified.\n",
"\t-f\tForce a head revision match if tag/date not found.\n",
"\t-l\tLocal directory only, not recursive\n",
@@ -190,7 +190,7 @@ checkout (argc, argv)
shorten = 1;
break;
case 's':
- status = 1;
+ cat = status = 1;
break;
case 'f':
force_tag_match = 0;
@@ -223,10 +223,10 @@ checkout (argc, argv)
if (shorten == -1)
shorten = 0;
- if ((cat || status) && argc != 0)
+ if (cat && argc != 0)
error (1, 0, "-c and -s must not get any arguments");
- if (!(cat || status) && argc == 0)
+ if (!cat && argc == 0)
error (1, 0, "must specify at least one module or directory");
if (where && pipeout)
@@ -248,12 +248,12 @@ checkout (argc, argv)
}
#endif
- if (!safe_location()) {
+ if (!cat && !safe_location()) {
error(1, 0, "Cannot check out files into the repository itself");
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
int expand_modules;
@@ -269,7 +269,7 @@ checkout (argc, argv)
below in !expand_modules), those files (CVS/Checkin.prog
or CVS/Update.prog) don't get created. Grrr. */
- expand_modules = (!cat && !status && !pipeout
+ expand_modules = (!cat && !pipeout
&& supported_request ("expand-modules"));
if (expand_modules)
@@ -296,7 +296,7 @@ checkout (argc, argv)
if (checkout_prune_dirs && m_type == CHECKOUT)
send_arg("-P");
client_prune_dirs = checkout_prune_dirs;
- if (cat)
+ if (cat && !status)
send_arg("-c");
if (where != NULL)
option_with_arg ("-d", where);
@@ -329,7 +329,7 @@ checkout (argc, argv)
}
#endif /* CLIENT_SUPPORT */
- if (cat || status)
+ if (cat)
{
cat_module (status);
if (options)
@@ -367,7 +367,7 @@ checkout (argc, argv)
for (i = 0; i < argc; i++)
err += do_module (db, argv[i], m_type, "Updating", checkout_proc,
- where, shorten, local, run_module_prog,
+ where, shorten, local, run_module_prog, !pipeout,
(char *) NULL);
close_module (db);
if (options)
@@ -391,13 +391,13 @@ safe_location ()
/* FIXME-arbitrary limit: should be retrying this like xgetwd.
But how does readlink let us know that the buffer was too small?
(by returning sizeof hardpath - 1?). */
- x = readlink(CVSroot_directory, hardpath, sizeof hardpath - 1);
+ x = readlink(current_parsed_root->directory, hardpath, sizeof hardpath - 1);
#else
x = -1;
#endif
if (x == -1)
{
- strcpy(hardpath, CVSroot_directory);
+ strcpy(hardpath, current_parsed_root->directory);
}
else
{
@@ -466,8 +466,8 @@ build_one_dir (repository, dirpath, sticky)
error (1, 0, "there is no repository %s", repository);
if (Create_Admin (".", dirpath, repository,
- sticky ? (char *) NULL : tag,
- sticky ? (char *) NULL : date,
+ sticky ? tag : (char *) NULL,
+ sticky ? date : (char *) NULL,
/* FIXME? This is a guess. If it is important
for nonbranch to be set correctly here I
@@ -529,11 +529,11 @@ checkout_proc (argc, argv, where_orig, mwhere, mfile, shorten,
/* Set up the repository (maybe) for the bottom directory.
Allocate more space than we need so we don't need to keep
reallocating this string. */
- repository = xmalloc (strlen (CVSroot_directory)
+ repository = xmalloc (strlen (current_parsed_root->directory)
+ strlen (argv[0])
+ (mfile == NULL ? 0 : strlen (mfile))
+ 10);
- (void) sprintf (repository, "%s/%s", CVSroot_directory, argv[0]);
+ (void) sprintf (repository, "%s/%s", current_parsed_root->directory, argv[0]);
Sanitize_Repository_Name (repository);
@@ -709,11 +709,11 @@ checkout_proc (argc, argv, where_orig, mwhere, mfile, shorten,
struct dir_to_build *head;
char *reposcopy;
- if (strncmp (repository, CVSroot_directory,
- strlen (CVSroot_directory)) != 0)
+ if (strncmp (repository, current_parsed_root->directory,
+ strlen (current_parsed_root->directory)) != 0)
error (1, 0, "\
internal error: %s doesn't start with %s in checkout_proc",
- repository, CVSroot_directory);
+ repository, current_parsed_root->directory);
/* We always create at least one directory, which corresponds to
the entire strings for WHERE and REPOSITORY. */
@@ -798,7 +798,7 @@ internal error: %s doesn't start with %s in checkout_proc",
bar -> Emptydir (generated dir -- not in repos)
baz -> quux (finally!) */
- if (strcmp (reposcopy, CVSroot_directory) == 0)
+ if (strcmp (reposcopy, current_parsed_root->directory) == 0)
{
/* We can't walk up past CVSROOT. Instead, the
repository should be Emptydir. */
@@ -806,55 +806,30 @@ internal error: %s doesn't start with %s in checkout_proc",
}
else
{
- if ((where_orig != NULL)
- && (strcmp (new->dirpath, where_orig) == 0))
- {
- /* It's the case that the user specified a
- * destination directory with the "-d" flag. The
- * repository in this directory should be "."
- * since the user's command is equivalent to:
- *
- * cd <dir>; cvs co blah */
-
- strcpy (reposcopy, CVSroot_directory);
- goto allocate_repos;
- }
- else if (mwhere != NULL)
- {
- /* This is a generated directory, so point to
- CVSNULLREPOS. */
-
- new->repository = emptydir_name ();
- }
- else
- {
- /* It's a directory in the repository! */
+ /* It's a directory in the repository! */
- char *rp;
+ char *rp;
- /* We'll always be below CVSROOT, but check for
- paranoia's sake. */
- rp = strrchr (reposcopy, '/');
- if (rp == NULL)
- error (1, 0,
- "internal error: %s doesn't contain a slash",
- reposcopy);
+ /* We'll always be below CVSROOT, but check for
+ paranoia's sake. */
+ rp = strrchr (reposcopy, '/');
+ if (rp == NULL)
+ error (1, 0,
+ "internal error: %s doesn't contain a slash",
+ reposcopy);
- *rp = '\0';
-
- allocate_repos:
- new->repository = xmalloc (strlen (reposcopy) + 5);
- (void) strcpy (new->repository, reposcopy);
+ *rp = '\0';
+ new->repository = xmalloc (strlen (reposcopy) + 5);
+ (void) strcpy (new->repository, reposcopy);
- if (strcmp (reposcopy, CVSroot_directory) == 0)
- {
- /* Special case -- the repository name needs
- to be "/path/to/repos/." (the trailing dot
- is important). We might be able to get rid
- of this after the we check out the other
- code that handles repository names. */
- (void) strcat (new->repository, "/.");
- }
+ if (strcmp (reposcopy, current_parsed_root->directory) == 0)
+ {
+ /* Special case -- the repository name needs
+ to be "/path/to/repos/." (the trailing dot
+ is important). We might be able to get rid
+ of this after the we check out the other
+ code that handles repository names. */
+ (void) strcat (new->repository, "/.");
}
}
}
@@ -866,7 +841,7 @@ internal error: %s doesn't start with %s in checkout_proc",
int where_is_absolute = isabsolute (where);
/* The top-level CVSADM directory should always be
- CVSroot_directory. Create it, but only if WHERE is
+ current_parsed_root->directory. Create it, but only if WHERE is
relative. If WHERE is absolute, our current directory
may not have a thing to do with where the sources are
being checked out. If it does, build_dirs_and_chdir
@@ -880,7 +855,7 @@ internal error: %s doesn't start with %s in checkout_proc",
{
/* It may be argued that we shouldn't set any sticky
bits for the top-level repository. FIXME? */
- build_one_dir (CVSroot_directory, ".", argc <= 1);
+ build_one_dir (current_parsed_root->directory, ".", argc <= 1);
#ifdef SERVER_SUPPORT
/* We _always_ want to have a top-level admin
@@ -892,7 +867,7 @@ internal error: %s doesn't start with %s in checkout_proc",
will be ignored on the client side. */
if (server_active)
- server_clear_entstat (".", CVSroot_directory);
+ server_clear_entstat (".", current_parsed_root->directory);
#endif
}
@@ -1033,7 +1008,7 @@ internal error: %s doesn't start with %s in checkout_proc",
force_tag_match, 0 /* !local */ ,
1 /* update -d */ , aflag, checkout_prune_dirs,
pipeout, which, join_rev1, join_rev2,
- preload_update_dir);
+ preload_update_dir, m_type == CHECKOUT);
goto out;
}
@@ -1089,7 +1064,7 @@ internal error: %s doesn't start with %s in checkout_proc",
err += do_update (argc - 1, argv + 1, options, tag, date,
force_tag_match, local_specified, 1 /* update -d */,
aflag, checkout_prune_dirs, pipeout, which, join_rev1,
- join_rev2, preload_update_dir);
+ join_rev2, preload_update_dir, m_type == CHECKOUT);
out:
free (preload_update_dir);
preload_update_dir = oldupdate;
@@ -1121,11 +1096,11 @@ emptydir_name ()
{
char *repository;
- repository = xmalloc (strlen (CVSroot_directory)
+ repository = xmalloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
+ sizeof (CVSNULLREPOS)
- + 10);
- (void) sprintf (repository, "%s/%s/%s", CVSroot_directory,
+ + 3);
+ (void) sprintf (repository, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSNULLREPOS);
if (!isfile (repository))
{
diff --git a/contrib/cvs/src/classify.c b/contrib/cvs/src/classify.c
index b0084a3d0fab..9a6489e03842 100644
--- a/contrib/cvs/src/classify.c
+++ b/contrib/cvs/src/classify.c
@@ -74,6 +74,7 @@ Classify_File (finfo, tag, date, options, force_tag_match, aflag, versp,
}
else if (RCS_isdead (vers->srcfile, vers->vn_rcs))
{
+ /* there is an RCS file, but it's dead */
if (vers->ts_user == NULL)
ret = T_UPTODATE;
else
@@ -83,43 +84,17 @@ Classify_File (finfo, tag, date, options, force_tag_match, aflag, versp,
ret = T_UNKNOWN;
}
}
- else
+ else if (!pipeout && vers->ts_user && No_Difference (finfo, vers))
{
- /* there is an rcs file */
-
- if (vers->ts_user == NULL)
- {
- /* There is no user file; needs checkout */
- ret = T_CHECKOUT;
- }
- else
- {
- if (pipeout)
- {
- /*
- * The user file doesn't necessarily have anything
- * to do with this.
- */
- ret = T_CHECKOUT;
- }
- /*
- * There is a user file; print a warning and add it to the
- * conflict list, only if it is indeed different from what we
- * plan to extract
- */
- else if (No_Difference (finfo, vers))
- {
- /* the files were different so it is a conflict */
- if (!really_quiet)
- error (0, 0, "move away %s; it is in the way",
- finfo->fullname);
- ret = T_CONFLICT;
- }
- else
- /* since there was no difference, still needs checkout */
- ret = T_CHECKOUT;
- }
+ /* the files were different so it is a conflict */
+ if (!really_quiet)
+ error (0, 0, "move away %s; it is in the way",
+ finfo->fullname);
+ ret = T_CONFLICT;
}
+ else
+ /* no user file or no difference, just checkout */
+ ret = T_CHECKOUT;
}
else if (strcmp (vers->vn_user, "0") == 0)
{
@@ -135,44 +110,35 @@ Classify_File (finfo, tag, date, options, force_tag_match, aflag, versp,
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))
+ /* No RCS file or RCS file revision is dead */
+ ret = T_ADDED;
else
{
- /* There is a user file */
-
- if (vers->vn_rcs == NULL)
- /* There is no RCS file, added file */
- ret = T_ADDED;
- else if (RCS_isdead (vers->srcfile, vers->vn_rcs))
- /* we are resurrecting. */
- ret = T_ADDED;
+ 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
{
- 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);
- }
- ret = T_CONFLICT;
+ /*
+ * 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);
}
+ ret = T_CONFLICT;
}
}
else if (vers->vn_user[0] == '-')
@@ -193,14 +159,18 @@ conflict: %s created independently by second party",
*/
ret = T_REMOVE_ENTRY;
}
- else if (vers->vn_rcs == NULL
- ? vers->vn_user[1] == '\0'
- : strcmp (vers->vn_rcs, vers->vn_user + 1) == 0)
+ else if (strcmp (vers->vn_rcs, vers->vn_user + 1) == 0)
/*
* The RCS file is the same version as the user file was, and
* that's OK; remove it
*/
ret = T_REMOVED;
+ else if (pipeout)
+ /*
+ * The RCS file doesn't match the user's file, but it doesn't
+ * matter in this case
+ */
+ ret = T_NEEDS_MERGE;
else
{
@@ -227,7 +197,7 @@ conflict: %s created independently by second party",
else
{
/* A normal entry, TS_Rcs is valid */
- if (vers->vn_rcs == NULL)
+ if (vers->vn_rcs == NULL || RCS_isdead (vers->srcfile, vers->vn_rcs))
{
/* There is no RCS file */
@@ -251,30 +221,23 @@ conflict: %s created independently by second party",
finfo->fullname);
ret = T_REMOVE_ENTRY;
}
- else
+ else if (No_Difference (finfo, vers))
{
- /*
- * The user file has been modified and since it is no longer
- * in the repository, a conflict is raised
- */
- if (No_Difference (finfo, vers))
- {
- /* they are different -> conflict */
- if (!really_quiet)
- error (0, 0,
+ /* they are different -> conflict */
+ if (!really_quiet)
+ error (0, 0,
"conflict: %s is modified but no longer in the repository",
finfo->fullname);
- ret = T_CONFLICT;
- }
- else
- {
- /* they weren't really different */
- if (!really_quiet)
- error (0, 0,
- "warning: %s is not (any longer) pertinent",
- finfo->fullname);
- ret = T_REMOVE_ENTRY;
- }
+ ret = T_CONFLICT;
+ }
+ else
+ {
+ /* they weren't really different */
+ if (!really_quiet)
+ error (0, 0,
+ "warning: %s is not (any longer) pertinent",
+ finfo->fullname);
+ ret = T_REMOVE_ENTRY;
}
}
else if (strcmp (vers->vn_rcs, vers->vn_user) == 0)
@@ -321,50 +284,39 @@ conflict: %s created independently by second party",
ret = T_UPTODATE;
}
}
- else
+ else if (No_Difference (finfo, vers))
{
/*
- * The user file appears to have been modified, but we call
- * No_Difference to verify that it really has been modified
+ * they really are different; modified if we aren't
+ * changing any sticky -k options, else needs merge
*/
- if (No_Difference (finfo, vers))
- {
-
- /*
- * they really are different; modified if we aren't
- * changing any sticky -k options, else needs merge
- */
#ifdef XXX_FIXME_WHEN_RCSMERGE_IS_FIXED
- if (strcmp (vers->entdata->options ?
- vers->entdata->options : "", vers->options) == 0)
- ret = T_MODIFIED;
- else
- ret = T_NEEDS_MERGE;
-#else
+ if (strcmp (vers->entdata->options ?
+ vers->entdata->options : "", vers->options) == 0)
ret = T_MODIFIED;
- sticky_ck (finfo, aflag, vers);
-#endif
- }
else
- {
- /* file has not changed; check out if -k changed */
- if (strcmp (vers->entdata->options ?
- vers->entdata->options : "", vers->options) != 0)
- {
- ret = T_CHECKOUT;
- }
- else
- {
+ ret = T_NEEDS_MERGE;
+#else
+ ret = T_MODIFIED;
+ sticky_ck (finfo, aflag, vers);
+#endif
+ }
+ else if (strcmp (vers->entdata->options ?
+ vers->entdata->options : "", vers->options) != 0)
+ {
+ /* file has not changed; check out if -k changed */
+ ret = T_CHECKOUT;
+ }
+ else
+ {
- /*
- * else -> note that No_Difference will Register the
- * file already for us, using the new tag/date. This
- * is the desired behaviour
- */
- ret = T_UPTODATE;
- }
- }
+ /*
+ * else -> note that No_Difference will Register the
+ * file already for us, using the new tag/date. This
+ * is the desired behaviour
+ */
+ ret = T_UPTODATE;
}
}
else
@@ -388,7 +340,6 @@ conflict: %s created independently by second party",
/*
* The user file is still unmodified, so just get it as well
*/
-#ifdef SERVER_SUPPORT
if (strcmp (vers->entdata->options ?
vers->entdata->options : "", vers->options) != 0
|| (vers->srcfile != NULL
@@ -396,31 +347,19 @@ conflict: %s created independently by second party",
ret = T_CHECKOUT;
else
ret = T_PATCH;
-#else
- ret = T_CHECKOUT;
-#endif
}
+ else if (No_Difference (finfo, vers))
+ /* really modified, needs to merge */
+ ret = T_NEEDS_MERGE;
+ else if ((strcmp (vers->entdata->options ?
+ vers->entdata->options : "", vers->options)
+ != 0)
+ || (vers->srcfile != NULL
+ && (vers->srcfile->flags & INATTIC) != 0))
+ /* not really modified, check it out */
+ ret = T_CHECKOUT;
else
- {
- if (No_Difference (finfo, vers))
- /* really modified, needs to merge */
- ret = T_NEEDS_MERGE;
-#ifdef SERVER_SUPPORT
- else if ((strcmp (vers->entdata->options ?
- vers->entdata->options : "", vers->options)
- != 0)
- || (vers->srcfile != NULL
- && (vers->srcfile->flags & INATTIC) != 0))
- /* not really modified, check it out */
- ret = T_CHECKOUT;
- else
- ret = T_PATCH;
-#else
- else
- /* not really modified, check it out */
- ret = T_CHECKOUT;
-#endif
- }
+ ret = T_PATCH;
}
}
diff --git a/contrib/cvs/src/client.c b/contrib/cvs/src/client.c
index c451b28de26b..0b57b35408f9 100644
--- a/contrib/cvs/src/client.c
+++ b/contrib/cvs/src/client.c
@@ -32,6 +32,7 @@
# else /* No winsock.h */
# include <sys/socket.h>
# include <netinet/in.h>
+# include <arpa/inet.h>
# include <netdb.h>
# endif /* No winsock.h */
#endif
@@ -77,19 +78,7 @@ static Key_schedule sched;
#ifdef HAVE_GSSAPI
-#ifdef HAVE_GSSAPI_H
-#include <gssapi.h>
-#endif
-#ifdef HAVE_GSSAPI_GSSAPI_H
-#include <gssapi/gssapi.h>
-#endif
-#ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H
-#include <gssapi/gssapi_generic.h>
-#endif
-
-#ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
-#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
-#endif
+# include "xgssapi.h"
/* This is needed for GSSAPI encryption. */
static gss_ctx_id_t gcontext;
@@ -97,7 +86,7 @@ static gss_ctx_id_t gcontext;
static int connect_to_gserver PROTO((int, struct hostent *));
#endif /* HAVE_GSSAPI */
-
+
static void add_prune_candidate PROTO((char *));
/* All the commands. */
@@ -198,7 +187,7 @@ arg_should_not_be_sent_to_server (arg)
4) the argument lies within one of the paths in
dirs_sent_to_server.
- 4) */
+ */
if (list_isempty (dirs_sent_to_server))
return 0; /* always send it */
@@ -263,8 +252,8 @@ arg_should_not_be_sent_to_server (arg)
}
/* Now check the value for root. */
- if (this_root && current_root
- && (strcmp (this_root, current_root) != 0))
+ if (this_root && current_parsed_root
+ && (strcmp (this_root, current_parsed_root->original) != 0))
{
/* Don't send this, since the CVSROOTs don't match. */
free (this_root);
@@ -1277,6 +1266,32 @@ 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 (!isdir (CVSADM))
+ {
+ /*
+ * Put repository in CVS/Repository. For historical
+ * (pre-CVS/Root) reasons, this is an absolute pathname,
+ * but what really matters is the part of it which is
+ * relative to cvsroot.
+ */
+ char *repo;
+
+ if (reposdirname_absolute)
+ repo = reposdirname;
+ else
+ {
+ repo = xmalloc (strlen (reposdirname)
+ + strlen (toplevel_repos)
+ + 10);
+ strcpy (repo, toplevel_repos);
+ strcat (repo, "/");
+ strcat (repo, reposdirname);
+ }
+
+ Create_Admin (".", ".", repo, (char *)NULL, (char *)NULL, 0, 1, 1);
+ if (repo != reposdirname)
+ free (repo);
+ }
if (strcmp (command_name, "export") != 0)
{
@@ -2282,7 +2297,7 @@ static int
is_cvsroot_level (pathname)
char *pathname;
{
- if (strcmp (toplevel_repos, CVSroot_directory) != 0)
+ if (strcmp (toplevel_repos, current_parsed_root->directory) != 0)
return 0;
return strchr (pathname, '/') == NULL;
@@ -2922,14 +2937,14 @@ send_a_repository (dir, repository, update_dir)
from REPOSITORY. If the path elements don't exist
in REPOSITORY, or the removal of those path
elements mean that we "step above"
- CVSroot_directory, set toplevel_repos to
- CVSroot_directory. */
+ current_parsed_root->directory, set toplevel_repos to
+ current_parsed_root->directory. */
if ((repository_len > update_dir_len)
&& (strcmp (repository + repository_len - update_dir_len,
update_dir) == 0)
- /* TOPLEVEL_REPOS shouldn't be above CVSroot_directory */
+ /* TOPLEVEL_REPOS shouldn't be above current_parsed_root->directory */
&& ((repository_len - update_dir_len)
- > strlen (CVSroot_directory)))
+ > strlen (current_parsed_root->directory)))
{
/* The repository name contains UPDATE_DIR. Set
toplevel_repos to the repository name without
@@ -2943,7 +2958,7 @@ send_a_repository (dir, repository, update_dir)
}
else
{
- toplevel_repos = xstrdup (CVSroot_directory);
+ toplevel_repos = xstrdup (current_parsed_root->directory);
}
}
}
@@ -3001,7 +3016,7 @@ client_expand_modules (argc, argv, local)
for (i = 0; i < argc; ++i)
send_arg (argv[i]);
- send_a_repository ("", CVSroot_directory, "");
+ send_a_repository ("", current_parsed_root->directory, "");
send_to_server ("expand-modules\012", 0);
@@ -3039,13 +3054,13 @@ client_send_expansions (local, where, build_dirs)
if (isfile (argv[0]))
send_files (1, argv, local, 0, build_dirs ? SEND_BUILD_DIRS : 0);
}
- send_a_repository ("", CVSroot_directory, "");
+ send_a_repository ("", current_parsed_root->directory, "");
}
void
client_nonexpanded_setup ()
{
- send_a_repository ("", CVSroot_directory, "");
+ send_a_repository ("", current_parsed_root->directory, "");
}
/* Receive a cvswrappers line from the server; it must be a line
@@ -3560,7 +3575,8 @@ get_responses_and_close ()
{
if (shutdown (server_fd, 1) < 0)
error (1, 0, "shutting down connection to %s: %s",
- CVSroot_hostname, SOCK_STRERROR (SOCK_ERRNO));
+ current_parsed_root->hostname, SOCK_STRERROR (SOCK_ERRNO));
+ server_fd = -1;
/*
* This test will always be true because we dup the descriptor
*/
@@ -3569,7 +3585,7 @@ get_responses_and_close ()
if (fclose (to_server_fp) != 0)
error (1, errno,
"closing down connection to %s",
- CVSroot_hostname);
+ current_parsed_root->hostname);
}
}
else
@@ -3587,15 +3603,15 @@ get_responses_and_close ()
#endif /* START_RSH_WITH_POPEN_RW */
{
error (1, errno, "closing connection to %s",
- CVSroot_hostname);
+ current_parsed_root->hostname);
}
}
if (! buf_empty_p (from_server)
|| getc (from_server_fp) != EOF)
- error (0, 0, "dying gasps from %s unexpected", CVSroot_hostname);
+ error (0, 0, "dying gasps from %s unexpected", current_parsed_root->hostname);
else if (ferror (from_server_fp))
- error (0, errno, "reading from %s", CVSroot_hostname);
+ error (0, errno, "reading from %s", current_parsed_root->hostname);
fclose (from_server_fp);
#endif /* SHUTDOWN_SERVER */
@@ -3612,8 +3628,7 @@ get_responses_and_close ()
/* see if we need to sleep before returning to avoid time-stamp races */
if (last_register_time)
{
- while (time ((time_t *) NULL) == last_register_time)
- sleep (1);
+ sleep_past (last_register_time);
}
return errs;
@@ -3637,7 +3652,8 @@ supported_request (name)
return 0;
}
-
+
+
#if defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS)
static struct hostent *init_sockaddr PROTO ((struct sockaddr_in *, char *,
unsigned int));
@@ -3666,22 +3682,86 @@ init_sockaddr (name, hostname, port)
#endif /* defined (AUTH_CLIENT_SUPPORT) || defined (HAVE_KERBEROS) */
-#ifdef AUTH_CLIENT_SUPPORT
-static int auth_server_port_number PROTO ((void));
+#ifdef AUTH_CLIENT_SUPPORT
+
+/* Generic function to do port number lookup tasks.
+ *
+ * In order of precedence, will return:
+ * getenv (envname), if defined
+ * getservbyname (portname), if defined
+ * defaultport
+ */
static int
-auth_server_port_number ()
+get_port_number (envname, portname, defaultport)
+ const char *envname;
+ const char *portname;
+ int defaultport;
{
- struct servent *s = getservbyname ("cvspserver", "tcp");
+ struct servent *s;
+ char *port_s;
- if (s)
+ if (envname && (port_s = getenv (envname)))
+ {
+ int port = atoi (port_s);
+ if (port <= 0)
+ {
+ error (0, 0, "%s must be a positive integer! If you", envname);
+ error (0, 0, "are trying to force a connection via rsh, please");
+ error (0, 0, "put \":server:\" at the beginning of your CVSROOT");
+ error (1, 0, "variable.");
+ }
+ return port;
+ }
+ else if (portname && (s = getservbyname (portname, "tcp")))
return ntohs (s->s_port);
else
- return CVS_AUTH_PORT;
+ return defaultport;
+}
+
+
+
+/* get the port number for a client to connect to based on the port
+ * and method of a cvsroot_t.
+ *
+ * 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)
+ *
+ * and yes, I know none of the 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
+ */
+int
+get_cvs_port_number (root)
+ const cvsroot_t *root;
+{
+
+ if (root->port) return root->port;
+
+ switch (root->method)
+ {
+ case gserver_method:
+ case pserver_method:
+ return get_port_number ("CVS_CLIENT_PORT", "cvspserver", CVS_AUTH_PORT);
+#ifdef HAVE_KERBEROS
+ case kserver_method:
+ return get_port_number ("CVS_CLIENT_PORT", "cvs", CVS_PORT);
+#endif
+ default:
+ error(1, EINVAL, "internal error: get_cvs_port_number called for invalid connection method (%s)",
+ method_names[root->method]);
+ break;
+ }
}
+
/* Read a line from socket SOCK. Result does not include the
terminating linefeed. This is only used by the authentication
protocol, which we call before we set up all the buffering stuff.
@@ -3709,7 +3789,7 @@ recv_line (sock, resultp)
int n;
n = recv (sock, &ch, 1, 0);
if (n <= 0)
- error (1, 0, "recv() from server %s: %s", CVSroot_hostname,
+ error (1, 0, "recv() from server %s: %s", current_parsed_root->hostname,
n == 0 ? "EOF" : SOCK_STRERROR (SOCK_ERRNO));
if (ch == '\012')
@@ -3747,11 +3827,15 @@ connect_to_forked_server (tofdp, fromfdp)
command[0] = getenv ("CVS_SERVER");
if (! command[0])
- command[0] = "cvs";
+ command[0] = program_path;
command[1] = "server";
command[2] = NULL;
+ if (trace)
+ {
+ fprintf (stderr, " -> Forking server: %s %s\n", command[0], command[1]);
+ }
if (! piped_child (command, tofdp, fromfdp))
error (1, 0, "could not fork server process");
}
@@ -3779,20 +3863,29 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
int tofd, fromfd;
#endif
int port_number;
+ char *username; /* the username we use to connect */
struct sockaddr_in client_sai;
struct hostent *hostinfo;
- char no_passwd = 0; /* gets set if no password found */
+ char no_passwd = 0; /* gets set if no password found */
sock = socket (AF_INET, SOCK_STREAM, 0);
if (sock == -1)
{
error (1, 0, "cannot create socket: %s", SOCK_STRERROR (SOCK_ERRNO));
}
- port_number = auth_server_port_number ();
- hostinfo = init_sockaddr (&client_sai, CVSroot_hostname, port_number);
+ port_number = get_cvs_port_number (current_parsed_root);
+ hostinfo = init_sockaddr (&client_sai, current_parsed_root->hostname, port_number);
+ if (trace)
+ {
+ fprintf (stderr, " -> Connecting to %s(%s):%d\n",
+ current_parsed_root->hostname,
+ inet_ntoa (client_sai.sin_addr), port_number);
+ }
if (connect (sock, (struct sockaddr *) &client_sai, sizeof (client_sai))
< 0)
- error (1, 0, "connect to %s:%d failed: %s", CVSroot_hostname,
+ error (1, 0, "connect to %s(%s):%d failed: %s",
+ current_parsed_root->hostname,
+ inet_ntoa (client_sai.sin_addr),
port_number, SOCK_STRERROR (SOCK_ERRNO));
/* Run the authorization mini-protocol before anything else. */
@@ -3800,7 +3893,12 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
{
#ifdef HAVE_GSSAPI
if (! connect_to_gserver (sock, hostinfo))
+ {
+ error (0, 0,
+ "authorization failed: server %s rejected access to %s",
+ current_parsed_root->hostname, current_parsed_root->directory);
goto rejected;
+ }
#else
error (1, 0, "This client does not support GSSAPI authentication");
#endif
@@ -3808,11 +3906,9 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
else
{
char *begin = NULL;
- char *repository = CVSroot_directory;
- char *username = CVSroot_username;
char *password = NULL;
char *end = NULL;
-
+
if (verify_only)
{
begin = "BEGIN VERIFICATION REQUEST\012";
@@ -3826,7 +3922,8 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
/* Get the password, probably from ~/.cvspass. */
password = get_cvs_password ();
-
+ username = current_parsed_root->username ? current_parsed_root->username : getcaller();
+
/* Send the empty string by default. This is so anonymous CVS
access doesn't require client to have done "cvs login". */
if (password == NULL)
@@ -3840,7 +3937,7 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
error (1, 0, "cannot send: %s", SOCK_STRERROR (SOCK_ERRNO));
/* Send the data the server needs. */
- if (send (sock, repository, strlen (repository), 0) < 0)
+ if (send (sock, current_parsed_root->directory, strlen (current_parsed_root->directory), 0) < 0)
error (1, 0, "cannot send: %s", SOCK_STRERROR (SOCK_ERRNO));
if (send (sock, "\012", 1, 0) < 0)
error (1, 0, "cannot send: %s", SOCK_STRERROR (SOCK_ERRNO));
@@ -3871,7 +3968,29 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
if (strcmp (read_buf, "I HATE YOU") == 0)
{
- /* Authorization not granted. */
+ /* Authorization not granted.
+ *
+ * This is a little confusing since we can reach this while loop in GSSAPI
+ * mode, but if GSSAPI authentication failed, we already jumped to the
+ * rejected label (there is no case where the connect_to_gserver function
+ * can return 1 and we will not receive "I LOVE YOU" from the server, barring
+ * broken connections and garbled messages, of course).
+ *
+ * i.e. This is a pserver specific error message and shoiuld be since
+ * GSSAPI doesn't use username.
+ */
+ error (0, 0,
+ "authorization failed: server %s rejected access to %s for user %s",
+ current_parsed_root->hostname, current_parsed_root->directory, username);
+
+ /* Output a special error message if authentication was attempted
+ with no password -- the user should be made aware that they may
+ have missed a step. */
+ if (no_passwd)
+ {
+ error (0, 0,
+ "used empty password; try \"cvs login\" with a real password");
+ }
goto rejected;
}
else if (strncmp (read_buf, "E ", 2) == 0)
@@ -3909,15 +4028,15 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
{
error (0, 0,
"unrecognized auth response from %s: %s",
- CVSroot_hostname, read_buf);
+ current_parsed_root->hostname, read_buf);
error (1, 0,
"shutdown() failed, server %s: %s",
- CVSroot_hostname,
+ current_parsed_root->hostname,
SOCK_STRERROR (SOCK_ERRNO));
}
error (1, 0,
"unrecognized auth response from %s: %s",
- CVSroot_hostname, read_buf);
+ current_parsed_root->hostname, read_buf);
}
free (read_buf);
}
@@ -3926,7 +4045,7 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
if (verify_only)
{
if (shutdown (sock, 2) < 0)
- error (0, 0, "shutdown() failed, server %s: %s", CVSroot_hostname,
+ error (0, 0, "shutdown() failed, server %s: %s", current_parsed_root->hostname,
SOCK_STRERROR (SOCK_ERRNO));
return;
}
@@ -3951,24 +4070,11 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
return;
rejected:
- error (0, 0,
- "authorization failed: server %s rejected access to %s for user %s",
- CVSroot_hostname, CVSroot_directory, CVSroot_username);
-
- /* Output a special error message if authentication was attempted
- with no password -- the user should be made aware that they may
- have missed a step. */
- if (no_passwd)
- {
- error (0, 0,
- "used empty password; try \"cvs login\" with a real password");
- }
-
if (shutdown (sock, 2) < 0)
{
error (0, 0,
"shutdown() failed (server %s): %s",
- CVSroot_hostname,
+ current_parsed_root->hostname,
SOCK_STRERROR (SOCK_ERRNO));
}
@@ -3976,8 +4082,9 @@ connect_to_pserver (tofdp, fromfdp, verify_only, do_gssapi)
}
#endif /* AUTH_CLIENT_SUPPORT */
-
-#if HAVE_KERBEROS
+
+
+#ifdef HAVE_KERBEROS
/* This function has not been changed to deal with NO_SOCKET_TO_FD
(i.e., systems on which sockets cannot be converted to file
@@ -3999,42 +4106,26 @@ start_tcp_server (tofdp, fromfdp)
if (s < 0)
error (1, 0, "cannot create socket: %s", SOCK_STRERROR (SOCK_ERRNO));
- /* Get CVS_CLIENT_PORT or look up cvs/tcp with CVS_PORT as default */
- portenv = getenv ("CVS_CLIENT_PORT");
- if (portenv != NULL)
- {
- port = atoi (portenv);
- if (port <= 0)
- {
- error (0, 0, "CVS_CLIENT_PORT must be a positive number! If you");
- error (0, 0, "are trying to force a connection via rsh, please");
- error (0, 0, "put \":server:\" at the beginning of your CVSROOT");
- error (1, 0, "variable.");
- }
- if (trace)
- fprintf(stderr, "Using TCP port %d to contact server.\n", port);
- }
- else
- {
- struct servent *sp;
-
- sp = getservbyname ("cvs", "tcp");
- if (sp == NULL)
- port = CVS_PORT;
- else
- port = ntohs (sp->s_port);
- }
+ port = get_cvs_port_number (current_parsed_root);
- hp = init_sockaddr (&sin, CVSroot_hostname, port);
+ hp = init_sockaddr (&sin, current_parsed_root->hostname, port);
hname = xmalloc (strlen (hp->h_name) + 1);
strcpy (hname, hp->h_name);
+ if (trace)
+ {
+ fprintf (stderr, " -> Connecting to %s(%s):%d\n",
+ current_parsed_root->hostname,
+ inet_ntoa (client_sai.sin_addr), port);
+ }
+
if (connect (s, (struct sockaddr *) &sin, sizeof sin) < 0)
- error (1, 0, "connect to %s:%d failed: %s", CVSroot_hostname,
+ error (1, 0, "connect to %s(%s):%d failed: %s",
+ current_parsed_root->hostname,
+ inet_ntoa (client_sai.sin_addr),
port, SOCK_STRERROR (SOCK_ERRNO));
-#ifdef HAVE_KERBEROS
{
const char *realm;
struct sockaddr_in laddr;
@@ -4059,7 +4150,6 @@ start_tcp_server (tofdp, fromfdp)
krb_get_err_text (status));
memcpy (kblock, cred.session, sizeof (C_Block));
}
-#endif /* HAVE_KERBEROS */
server_fd = s;
close_on_exec (server_fd);
@@ -4088,9 +4178,10 @@ recv_bytes (sock, buf, need)
int got;
got = recv (sock, buf, need, 0);
- if (got < 0)
- error (1, 0, "recv() from server %s: %s", CVSroot_hostname,
- SOCK_STRERROR (SOCK_ERRNO));
+ if (got <= 0)
+ error (1, 0, "recv() from server %s: %s", current_parsed_root->hostname,
+ got == 0 ? "EOF" : SOCK_STRERROR (SOCK_ERRNO));
+
buf += got;
need -= got;
}
@@ -4183,11 +4274,11 @@ connect_to_gserver (sock, hostinfo)
got = recv (sock, buf + 2, sizeof buf - 2, 0);
if (got < 0)
error (1, 0, "recv() from server %s: %s",
- CVSroot_hostname, SOCK_STRERROR (SOCK_ERRNO));
+ current_parsed_root->hostname, SOCK_STRERROR (SOCK_ERRNO));
buf[got + 2] = '\0';
if (buf[got + 1] == '\n')
buf[got + 1] = '\0';
- error (1, 0, "error from server %s: %s", CVSroot_hostname,
+ error (1, 0, "error from server %s: %s", current_parsed_root->hostname,
buf);
}
@@ -4239,7 +4330,7 @@ start_server ()
(*really* slow on a 14.4kbps link); the clean way to have a CVS
which supports several ways of connecting is with access methods. */
- switch (CVSroot_method)
+ switch (current_parsed_root->method)
{
#ifdef AUTH_CLIENT_SUPPORT
@@ -4256,7 +4347,7 @@ start_server ()
break;
#endif
-#if HAVE_GSSAPI
+#ifdef HAVE_GSSAPI
case gserver_method:
/* GSSAPI authentication is handled by the pserver. */
connect_to_pserver (&tofd, &fromfd, 0, 1);
@@ -4275,8 +4366,8 @@ start_server ()
case server_method:
#if defined(START_SERVER)
START_SERVER (&tofd, &fromfd, getcaller (),
- CVSroot_username, CVSroot_hostname,
- CVSroot_directory);
+ current_parsed_root->username, current_parsed_root->hostname,
+ current_parsed_root->directory);
# if defined (START_SERVER_RETURNS_SOCKET) && defined (NO_SOCKET_TO_FD)
/* This is a system on which we can only write to a socket
using send/recv. Therefore its START_SERVER needs to
@@ -4407,7 +4498,7 @@ the :server: access method is not supported by this port of CVS");
if (!rootless)
{
send_to_server ("Root ", 0);
- send_to_server (CVSroot_directory, 0);
+ send_to_server (current_parsed_root->directory, 0);
send_to_server ("\012", 1);
}
@@ -4537,7 +4628,7 @@ the :server: access method is not supported by this port of CVS");
on encryption, bomb out; don't let the user think the data
is being encrypted when it is not. */
#ifdef HAVE_KERBEROS
- if (CVSroot_method == kserver_method)
+ if (current_parsed_root->method == kserver_method)
{
if (! supported_request ("Kerberos-encrypt"))
error (1, 0, "This server does not support encryption");
@@ -4552,7 +4643,7 @@ the :server: access method is not supported by this port of CVS");
else
#endif /* HAVE_KERBEROS */
#ifdef HAVE_GSSAPI
- if (CVSroot_method == gserver_method)
+ if (current_parsed_root->method == gserver_method)
{
if (! supported_request ("Gssapi-encrypt"))
error (1, 0, "This server does not support encryption");
@@ -4625,7 +4716,7 @@ the :server: access method is not supported by this port of CVS");
ability to decrypt the data stream is itself a form of
authentication. */
#ifdef HAVE_GSSAPI
- if (CVSroot_method == gserver_method)
+ if (current_parsed_root->method == gserver_method)
{
if (! supported_request ("Gssapi-authenticate"))
error (1, 0,
@@ -4729,13 +4820,13 @@ start_rsh_server (tofdp, fromfdp)
#endif /* RSH_NEEDS_BINARY_FLAG */
/* Then we strcat more things on the end one by one. */
- if (CVSroot_username != NULL)
+ if (current_parsed_root->username != NULL)
{
rsh_argv[i++] = "-l";
- rsh_argv[i++] = CVSroot_username;
+ rsh_argv[i++] = current_parsed_root->username;
}
- rsh_argv[i++] = CVSroot_hostname;
+ rsh_argv[i++] = current_parsed_root->hostname;
rsh_argv[i++] = cvs_server;
rsh_argv[i++] = "server";
@@ -4745,6 +4836,8 @@ start_rsh_server (tofdp, fromfdp)
if (trace)
{
fprintf (stderr, " -> Starting server: ");
+ for (i = 0; rsh_argv[i]; i++)
+ fprintf (stderr, "%s ", rsh_argv[i]);
putc ('\n', stderr);
}
@@ -4782,7 +4875,7 @@ start_rsh_server (tofdp, fromfdp)
versions of rsh that grab switches out of the middle of the
command (they're calling the GNU getopt routines incorrectly). */
command = xmalloc (strlen (cvs_server)
- + strlen (CVSroot_directory)
+ + strlen (current_parsed_root->directory)
+ 50);
/* If you are running a very old (Nov 3, 1994, before 1.5)
@@ -4796,15 +4889,15 @@ start_rsh_server (tofdp, fromfdp)
char **p = argv;
*p++ = cvs_rsh;
- *p++ = CVSroot_hostname;
+ *p++ = current_parsed_root->hostname;
/* If the login names differ between client and server
* pass it on to rsh.
*/
- if (CVSroot_username != NULL)
+ if (current_parsed_root->username != NULL)
{
*p++ = "-l";
- *p++ = CVSroot_username;
+ *p++ = current_parsed_root->username;
}
*p++ = command;
@@ -5531,7 +5624,7 @@ send_files (argc, argv, local, aflag, flags)
* latter case; I don't think toplevel_repos matters for the
* former.
*/
- toplevel_repos = xstrdup (CVSroot_directory);
+ toplevel_repos = xstrdup (current_parsed_root->directory);
send_repository ("", toplevel_repos, ".");
}
@@ -5650,7 +5743,7 @@ client_import_done ()
*/
/* FIXME: "can't happen" now that we call client_import_setup
at the beginning. */
- toplevel_repos = xstrdup (CVSroot_directory);
+ toplevel_repos = xstrdup (current_parsed_root->directory);
send_repository ("", toplevel_repos, ".");
}
@@ -5830,9 +5923,9 @@ client_senddate (date)
void
send_init_command ()
{
- /* This is here because we need the CVSroot_directory variable. */
+ /* This is here because we need the current_parsed_root->directory variable. */
send_to_server ("init ", 0);
- send_to_server (CVSroot_directory, 0);
+ send_to_server (current_parsed_root->directory, 0);
send_to_server ("\012", 0);
}
diff --git a/contrib/cvs/src/commit.c b/contrib/cvs/src/commit.c
index 1c1f71c48a3e..149da7cb74d3 100644
--- a/contrib/cvs/src/commit.c
+++ b/contrib/cvs/src/commit.c
@@ -85,13 +85,13 @@ static time_t last_register_time;
static const char *const commit_usage[] =
{
"Usage: %s %s [-nRlf] [-m msg | -F logfile] [-r rev] files...\n",
- "\t-n\tDo not run the module program (if any).\n",
- "\t-R\tProcess directories recursively.\n",
- "\t-l\tLocal directory only (not recursive).\n",
- "\t-f\tForce the file to be committed; disables recursion.\n",
- "\t-F file\tRead the log message from file.\n",
- "\t-m msg\tLog message.\n",
- "\t-r rev\tCommit to this branch or trunk revision.\n",
+ " -n Do not run the module program (if any).\n",
+ " -R Process directories recursively.\n",
+ " -l Local directory only (not recursive).\n",
+ " -f Force the file to be committed; disables recursion.\n",
+ " -F logfile Read the log message from file.\n",
+ " -m msg Log message.\n",
+ " -r rev Commit to this branch or trunk revision.\n",
"(Specify the --help global option for a list of other help options)\n",
NULL
};
@@ -344,7 +344,7 @@ commit (argc, argv)
if (geteuid () == (uid_t) 0
# ifdef CLIENT_SUPPORT
/* Who we are on the client side doesn't affect logging. */
- && !client_active
+ && !current_parsed_root->isremote
# endif
)
{
@@ -432,7 +432,7 @@ commit (argc, argv)
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
struct find_data find_args;
@@ -591,8 +591,7 @@ commit (argc, argv)
char *fname;
FILE *fp;
- fname = cvs_temp_name ();
- fp = CVS_FOPEN (fname, "w+");
+ fp = cvs_temp_file (&fname);
if (fp == NULL)
error (1, 0, "cannot create temporary file %s", fname);
if (fwrite (saved_message, 1, strlen (saved_message), fp)
@@ -601,6 +600,7 @@ commit (argc, argv)
if (fclose (fp) < 0)
error (0, errno, "cannot close temporary file %s", fname);
error (0, 0, "saving log message in %s", fname);
+ free (fname);
}
return err;
}
@@ -615,7 +615,7 @@ commit (argc, argv)
wrap_setup ();
- lock_tree_for_write (argc, argv, local, aflag);
+ lock_tree_for_write (argc, argv, local, W_LOCAL, aflag);
/*
* Set up the master update list and hard link list
@@ -663,11 +663,15 @@ commit (argc, argv)
Lock_Cleanup ();
dellist (&mulist);
+#ifdef SERVER_SUPPORT
+ if (server_active)
+ return err;
+#endif
+
/* see if we need to sleep before returning to avoid time-stamp races */
if (last_register_time)
{
- while (time ((time_t *) NULL) == last_register_time)
- sleep (1);
+ sleep_past (last_register_time);
}
return (err);
@@ -778,7 +782,7 @@ check_fileproc (callerdat, finfo)
struct commit_info *ci;
struct logfile_info *li;
- size_t cvsroot_len = strlen (CVSroot_directory);
+ size_t cvsroot_len = strlen (current_parsed_root->directory);
if (!finfo->repository)
{
@@ -786,7 +790,7 @@ check_fileproc (callerdat, finfo)
return (1);
}
- if (strncmp (finfo->repository, CVSroot_directory, cvsroot_len) == 0
+ if (strncmp (finfo->repository, current_parsed_root->directory, cvsroot_len) == 0
&& ISDIRSEP (finfo->repository[cvsroot_len])
&& strncmp (finfo->repository + cvsroot_len + 1,
CVSROOTADM,
@@ -810,9 +814,7 @@ check_fileproc (callerdat, finfo)
switch (status)
{
case T_CHECKOUT:
-#ifdef SERVER_SUPPORT
case T_PATCH:
-#endif
case T_NEEDS_MERGE:
case T_CONFLICT:
case T_REMOVE_ENTRY:
@@ -829,7 +831,7 @@ check_fileproc (callerdat, finfo)
* Also,
* - if status is T_REMOVED, can't have a numeric tag
* - if status is T_ADDED, rcs file must not exist unless on
- * a branch
+ * a branch or head is dead
* - if status is T_ADDED, can't have a non-trunk numeric rev
* - if status is T_MODIFIED and a Conflict marker exists, don't
* allow the commit if timestamp is identical or if we find
@@ -926,29 +928,17 @@ warning: file `%s' seems to still contain conflict indicators",
{
if (vers->tag == NULL)
{
- char *rcs;
-
- rcs = xmalloc (strlen (finfo->repository)
- + strlen (finfo->file)
- + sizeof RCSEXT
- + 5);
-
- /* Don't look in the attic; if it exists there we
- will move it back out in checkaddfile. */
- sprintf(rcs, "%s/%s%s", finfo->repository, finfo->file,
- RCSEXT);
- if (isreadable (rcs))
+ if (finfo->rcs != NULL &&
+ !RCS_isdead (finfo->rcs, finfo->rcs->head))
{
error (0, 0,
"cannot add file `%s' when RCS file `%s' already exists",
- finfo->fullname, rcs);
+ finfo->fullname, finfo->rcs->path);
freevers_ts (&vers);
- free (rcs);
return (1);
}
- free (rcs);
}
- if (vers->tag && isdigit ((unsigned char) *vers->tag) &&
+ else if (isdigit ((unsigned char) *vers->tag) &&
numdots (vers->tag) > 1)
{
error (0, 0,
@@ -1311,6 +1301,12 @@ commit_fileproc (callerdat, finfo)
/* find the max major rev number in this directory */
maxrev = 0;
(void) walklist (finfo->entries, findmaxrev, NULL);
+ if (finfo->rcs->head) {
+ /* resurrecting: include dead revision */
+ int thisrev = atoi (finfo->rcs->head);
+ if (thisrev > maxrev)
+ maxrev = thisrev;
+ }
if (maxrev == 0)
maxrev = 1;
xrev = xmalloc (20);
@@ -1430,12 +1426,12 @@ commit_filesdoneproc (callerdat, err, repository, update_dir, entries)
{
char *p;
- if (strncmp (CVSroot_directory, repository,
- strlen (CVSroot_directory)) != 0)
+ if (strncmp (current_parsed_root->directory, repository,
+ strlen (current_parsed_root->directory)) != 0)
error (0, 0,
"internal error: repository (%s) doesn't begin with root (%s)",
- repository, CVSroot_directory);
- p = repository + strlen (CVSroot_directory);
+ repository, current_parsed_root->directory);
+ p = repository + strlen (current_parsed_root->directory);
if (*p == '/')
++p;
if (strcmp ("CVSROOT", p) == 0
@@ -1596,19 +1592,13 @@ findmaxrev (p, closure)
Node *p;
void *closure;
{
- char *cp;
int thisrev;
Entnode *entdata;
entdata = (Entnode *) p->data;
if (entdata->type != ENT_FILE)
return (0);
- cp = strchr (entdata->version, '.');
- if (cp != NULL)
- *cp = '\0';
thisrev = atoi (entdata->version);
- if (cp != NULL)
- *cp = '.';
if (thisrev > maxrev)
maxrev = thisrev;
return (0);
@@ -1956,10 +1946,8 @@ checkaddfile (file, repository, tag, options, rcsnode)
Attic. */
if (!(rcsfile->flags & INATTIC))
{
- error (0, 0, "internal error: confused about attic for %s",
+ error (0, 0, "warning: expected %s to be in Attic",
rcsfile->path);
- retval = 1;
- goto out;
}
sprintf (rcs, "%s/%s%s", repository, file, RCSEXT);
diff --git a/contrib/cvs/src/create_adm.c b/contrib/cvs/src/create_adm.c
index 878b05891a4e..1ab0f286cd3c 100644
--- a/contrib/cvs/src/create_adm.c
+++ b/contrib/cvs/src/create_adm.c
@@ -84,7 +84,7 @@ Create_Admin (dir, update_dir, repository, tag, date, nonbranch, warn,
/* record the current cvs root for later use */
- Create_Root (dir, CVSroot_original);
+ Create_Root (dir, current_parsed_root->original);
if (dir != NULL)
(void) sprintf (tmp, "%s/%s", dir, CVSADM_REP);
else
@@ -106,7 +106,7 @@ Create_Admin (dir, update_dir, repository, tag, date, nonbranch, warn,
spend the time making sure all of the code can handle it if we
don't do it. */
- if (strcmp (reposcopy, CVSroot_directory) == 0)
+ if (strcmp (reposcopy, current_parsed_root->directory) == 0)
{
reposcopy = xrealloc (reposcopy, strlen (reposcopy) + 3);
strcat (reposcopy, "/.");
@@ -119,14 +119,13 @@ Create_Admin (dir, update_dir, repository, tag, date, nonbranch, warn,
* If the Repository file is to hold a relative path, try to strip off
* the leading CVSroot argument.
*/
- if (CVSroot_directory != NULL)
{
- char *path = xmalloc (strlen (CVSroot_directory) + 10);
+ char *path = xmalloc (strlen (current_parsed_root->directory) + 2);
- (void) sprintf (path, "%s/", CVSroot_directory);
- if (strncmp (cp, path, strlen (path)) == 0)
- cp += strlen (path);
- free (path);
+ (void) sprintf (path, "%s/", current_parsed_root->directory);
+ if (strncmp (cp, path, strlen (path)) == 0)
+ cp += strlen (path);
+ free (path);
}
#endif
diff --git a/contrib/cvs/src/cvs.h b/contrib/cvs/src/cvs.h
index 0277c869fbe6..b4e3fa1f85e5 100644
--- a/contrib/cvs/src/cvs.h
+++ b/contrib/cvs/src/cvs.h
@@ -314,7 +314,7 @@ typedef struct entnode Entnode;
/* The type of request that is being done in do_module() */
enum mtype
{
- CHECKOUT, TAG, PATCH, EXPORT
+ CHECKOUT, TAG, PATCH, EXPORT, MISC
};
/*
@@ -366,28 +366,34 @@ extern mode_t cvsumask;
/* Access method specified in CVSroot. */
typedef enum {
- local_method, server_method, pserver_method, kserver_method, gserver_method,
+ null_method, local_method, server_method, pserver_method, kserver_method, gserver_method,
ext_method, fork_method
} CVSmethod;
extern char *method_names[]; /* change this in root.c if you change
the enum above */
+typedef struct cvsroot_s {
+ char *original; /* the complete source CVSroot string */
+ CVSmethod method; /* one of the enum values above */
+ char *username; /* the username or NULL if method == local */
+ char *password; /* the username or NULL if method == local */
+ char *hostname; /* the hostname or NULL if method == local */
+ int port; /* the port or zero if method == local */
+ char *directory; /* the directory name */
+#ifdef CLIENT_SUPPORT
+ unsigned char isremote; /* nonzero if we are doing remote access */
+#endif /* CLIENT_SUPPORT */
+} cvsroot_t;
+
/* 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. */
extern char *CVSroot_cmdline;
-extern char *CVSroot_original; /* the active, complete CVSroot string */
-extern int client_active; /* nonzero if we are doing remote access */
-extern CVSmethod CVSroot_method; /* one of the enum values above */
-extern char *CVSroot_username; /* the username or NULL if method == local */
-extern char *CVSroot_hostname; /* the hostname or NULL if method == local */
-extern char *CVSroot_directory; /* the directory name */
-
/* These variables keep track of all of the CVSROOT directories that
have been seen by the client and the current one of those selected. */
extern List *root_directories;
-extern char *current_root;
+extern cvsroot_t *current_parsed_root;
extern char *emptydir_name PROTO ((void));
extern int safe_location PROTO ((void));
@@ -422,8 +428,9 @@ extern int RCS_exec_rcsdiff PROTO ((RCSNode *rcsfile,
char *rev1, char *rev2,
char *label1, char *label2,
char *workfile));
-extern int diff_exec PROTO ((char *file1, char *file2, char *options,
- char *out));
+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));
@@ -443,15 +450,18 @@ void Subdir_Deregister PROTO((List *, const char *, const char *));
char *Make_Date PROTO((char *rawdate));
char *date_from_time_t PROTO ((time_t));
-void date_to_internet PROTO ((char *, char *));
+void date_to_internet PROTO ((char *, const char *));
+void date_to_tm PROTO ((struct tm *, const char *));
+void tm_to_internet PROTO ((char *, const struct tm *));
char *Name_Repository PROTO((char *dir, char *update_dir));
char *Short_Repository PROTO((char *repository));
void Sanitize_Repository_Name PROTO((char *repository));
char *Name_Root PROTO((char *dir, char *update_dir));
-int parse_cvsroot PROTO((char *CVSroot));
-void set_local_cvsroot PROTO((char *dir));
+void free_cvsroot_t PROTO((cvsroot_t *root_in));
+cvsroot_t *parse_cvsroot PROTO((char *root));
+cvsroot_t *local_cvsroot PROTO((char *dir));
void Create_Root PROTO((char *dir, char *rootdir));
void root_allow_add PROTO ((char *));
void root_allow_free PROTO ((void));
@@ -465,6 +475,7 @@ char *time_stamp PROTO((char *file));
void *xmalloc PROTO((size_t bytes));
void *xrealloc PROTO((void *ptr, size_t bytes));
void expand_string PROTO ((char **, size_t *, size_t));
+void allocate_and_strcat PROTO ((char **, size_t *, const char *));
char *xstrdup PROTO((const char *str));
void strip_trailing_newlines PROTO((char *str));
int pathname_levels PROTO ((char *path));
@@ -487,6 +498,7 @@ char *xreadlink PROTO((const char *link));
char *last_component PROTO((char *path));
char *get_homedir PROTO ((void));
char *cvs_temp_name PROTO ((void));
+FILE *cvs_temp_file PROTO ((char **filename));
int numdots PROTO((const char *s));
char *increment_revnum PROTO ((const char *));
@@ -510,7 +522,8 @@ void Lock_Cleanup PROTO((void));
/* Writelock an entire subtree, well the part specified by ARGC, ARGV, LOCAL,
and AFLAG, anyway. */
-void lock_tree_for_write PROTO ((int argc, char **argv, int local, int aflag));
+void lock_tree_for_write PROTO ((int argc, char **argv, int local, int which,
+ int aflag));
/* See lock.c for description. */
extern void lock_dir_for_write PROTO ((char *));
@@ -547,7 +560,6 @@ void make_directories PROTO((const char *name));
void make_directory PROTO((const char *name));
extern int mkdir_if_needed PROTO ((char *name));
void rename_file PROTO((const char *from, const char *to));
-char *backup_file PROTO((const char *file, const char *suffix));
/* Expand wildcards in each element of (ARGC,ARGV). This is according to the
files which exist in the current directory, and accordingly to OS-specific
conventions regarding wildcard syntax. It might be desirable to change the
@@ -627,7 +639,8 @@ extern int init PROTO ((int argc, char **argv));
int do_module PROTO((DBM * db, char *mname, enum mtype m_type, char *msg,
CALLBACKPROC callback_proc, char *where, int shorten,
- int local_specified, int run_module_prog, char *extra_arg));
+ int local_specified, int run_module_prog, int build_dirs,
+ char *extra_arg));
void history_write PROTO((int type, char *update_dir, char *revs, char *name,
char *repository));
int start_recursion PROTO((FILEPROC fileproc, FILESDONEPROC filesdoneproc,
@@ -645,7 +658,10 @@ char *make_message_rcslegal PROTO((char *message));
extern int file_has_markers PROTO ((const struct file_info *));
extern void get_file PROTO ((const char *, const char *, const char *,
char **, size_t *, size_t *));
+extern char *shell_escape PROTO((char *buf, const char *str));
+char *backup_file PROTO((const char *file, const char *suffix));
extern void resolve_symlink PROTO ((char **filename));
+void sleep_past PROTO ((time_t desttime));
/* flags for run_exec(), the fast system() for CVS */
#define RUN_NORMAL 0x0000 /* no special behaviour */
@@ -775,9 +791,7 @@ enum classify_type
T_REMOVED, /* R (removed file) list */
T_REMOVE_ENTRY, /* W (removed entry) list */
T_UPTODATE, /* File is up-to-date */
-#ifdef SERVER_SUPPORT
T_PATCH, /* P Like C, but can patch */
-#endif
T_TITLE /* title for node type */
};
typedef enum classify_type Ctype;
@@ -867,6 +881,8 @@ char *descramble PROTO ((char *str));
#ifdef AUTH_CLIENT_SUPPORT
char *get_cvs_password PROTO((void));
+int get_cvs_port_number PROTO((const cvsroot_t *root));
+char *normalize_cvsroot PROTO((const cvsroot_t *root));
#endif /* AUTH_CLIENT_SUPPORT */
extern void tag_check_valid PROTO ((char *, int, char **, int, int, char *));
diff --git a/contrib/cvs/src/cvsbug.in b/contrib/cvs/src/cvsbug.in
new file mode 100755
index 000000000000..8a8dc0dde3b3
--- /dev/null
+++ b/contrib/cvs/src/cvsbug.in
@@ -0,0 +1,526 @@
+#! /bin/sh
+# Submit a problem report to a GNATS site.
+# Copyright (C) 1993 Free Software Foundation, Inc.
+# Contributed by Brendan Kehoe (brendan@cygnus.com), based on a
+# version written by Heinz G. Seidl (hgs@ide.com).
+#
+# This file is part of GNU GNATS.
+# Modified by Berliner for CVS.
+#
+# GNU GNATS is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# GNU GNATS is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# The version of this send-pr.
+VERSION=3.2
+
+# The submitter-id for your site.
+SUBMITTER=net
+
+## # Where the GNATS directory lives, if at all.
+## [ -z "$GNATS_ROOT" ] &&
+## GNATS_ROOT=/usr/local/lib/gnats/gnats-db
+
+# The default mail address for PR submissions.
+GNATS_ADDR=bug-cvs@gnu.org
+
+## # Where the gnats category tree lives.
+## DATADIR=/usr/local/lib
+
+## # If we've been moved around, try using GCC_EXEC_PREFIX.
+## [ ! -d $DATADIR/gnats -a -d "$GCC_EXEC_PREFIX" ] && DATADIR=${GCC_EXEC_PREFIX}..
+
+# The default release for this host.
+DEFAULT_RELEASE="@VERSION@"
+
+# The default organization.
+DEFAULT_ORGANIZATION="net"
+
+## # The default site to look for.
+## GNATS_SITE=unknown
+
+## # Newer config information?
+## [ -f ${GNATS_ROOT}/gnats-adm/config ] && . ${GNATS_ROOT}/gnats-adm/config
+
+# What mailer to use. This must come after the config file, since it is
+# host-dependent.
+if [ -f /usr/sbin/sendmail ]; then
+ MAIL_AGENT="/usr/sbin/sendmail -oi -t"
+else
+ MAIL_AGENT="/usr/lib/sendmail -oi -t"
+fi
+MAILER=`echo $MAIL_AGENT | sed -e 's, .*,,'`
+if [ ! -f "$MAILER" ] ; then
+ echo "$COMMAND: Cannot file mail program \"$MAILER\"."
+ echo "$COMMAND: Please fix the MAIL_AGENT entry in the $COMMAND file."
+ exit 1
+fi
+
+if test "`echo -n foo`" = foo ; then
+ ECHON=bsd
+elif test "`echo 'foo\c'`" = foo ; then
+ ECHON=sysv
+else
+ ECHON=none
+fi
+
+if [ $ECHON = bsd ] ; then
+ ECHON1="echo -n"
+ ECHON2=
+elif [ $ECHON = sysv ] ; then
+ ECHON1=echo
+ ECHON2='\c'
+else
+ ECHON1=echo
+ ECHON2=
+fi
+
+#
+
+[ -z "$TMPDIR" ] && TMPDIR=/tmp
+
+TEMP=$TMPDIR/p$$
+BAD=$TMPDIR/pbad$$
+REF=$TMPDIR/pf$$
+
+if [ -z "$LOGNAME" -a -n "$USER" ]; then
+ LOGNAME=$USER
+fi
+
+FROM="$LOGNAME"
+REPLY_TO="$LOGNAME"
+
+# Find out the name of the originator of this PR.
+if [ -n "$NAME" ]; then
+ ORIGINATOR="$NAME"
+elif [ -f $HOME/.fullname ]; then
+ ORIGINATOR="`sed -e '1q' $HOME/.fullname`"
+elif [ -f /bin/domainname ]; then
+ if [ "`/bin/domainname`" != "" -a -f /usr/bin/ypcat ]; then
+ # Must use temp file due to incompatibilities in quoting behavior
+ # and to protect shell metacharacters in the expansion of $LOGNAME
+ /usr/bin/ypcat passwd 2>/dev/null | cat - /etc/passwd | grep "^$LOGNAME:" |
+ cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
+ ORIGINATOR="`cat $TEMP`"
+ rm -f $TEMP
+ fi
+fi
+
+if [ "$ORIGINATOR" = "" ]; then
+ grep "^$LOGNAME:" /etc/passwd | cut -f5 -d':' | sed -e 's/,.*//' > $TEMP
+ ORIGINATOR="`cat $TEMP`"
+ rm -f $TEMP
+fi
+
+if [ -n "$ORGANIZATION" ]; then
+ if [ -f "$ORGANIZATION" ]; then
+ ORGANIZATION="`cat $ORGANIZATION`"
+ fi
+else
+ if [ -n "$DEFAULT_ORGANIZATION" ]; then
+ ORGANIZATION="$DEFAULT_ORGANIZATION"
+ elif [ -f $HOME/.organization ]; then
+ ORGANIZATION="`cat $HOME/.organization`"
+ elif [ -f $HOME/.signature ]; then
+ ORGANIZATION="`cat $HOME/.signature`"
+ fi
+fi
+
+# If they don't have a preferred editor set, then use
+if [ -z "$VISUAL" ]; then
+ if [ -z "$EDITOR" ]; then
+ EDIT=vi
+ else
+ EDIT="$EDITOR"
+ fi
+else
+ EDIT="$VISUAL"
+fi
+
+# Find out some information.
+SYSTEM=`( [ -f /bin/uname ] && /bin/uname -a ) || \
+ ( [ -f /usr/bin/uname ] && /usr/bin/uname -a ) || echo ""`
+ARCH=`[ -f /bin/arch ] && /bin/arch`
+MACHINE=`[ -f /bin/machine ] && /bin/machine`
+
+COMMAND=`echo $0 | sed -e 's,.*/,,'`
+## USAGE="Usage: $COMMAND [-PVL] [-t address] [-f filename] [--request-id]
+USAGE="Usage: $COMMAND [-PVL]
+[--version]"
+REMOVE=
+BATCH=
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -r) ;; # Ignore for backward compat.
+## -t | --to) if [ $# -eq 1 ]; then echo "$USAGE"; exit 1; fi
+## shift ; GNATS_ADDR="$1"
+## EXPLICIT_GNATS_ADDR=true
+## ;;
+## -f | --file) if [ $# -eq 1 ]; then echo "$USAGE"; exit 1; fi
+## shift ; IN_FILE="$1"
+## if [ "$IN_FILE" != "-" -a ! -r "$IN_FILE" ]; then
+## echo "$COMMAND: cannot read $IN_FILE"
+## exit 1
+## fi
+## ;;
+ -b | --batch) BATCH=true ;;
+ -p | -P | --print) PRINT=true ;;
+ -L | --list) FORMAT=norm ;;
+ -l | -CL | --lisp) FORMAT=lisp ;;
+## --request-id) REQUEST_ID=true ;;
+ -h | --help) echo "$USAGE"; exit 0 ;;
+ -V | --version) echo "$VERSION"; exit 0 ;;
+ -*) echo "$USAGE" ; exit 1 ;;
+ *) echo "$USAGE" ; exit 1
+## if [ -z "$USER_GNATS_SITE" ]; then
+## if [ ! -r "$DATADIR/gnats/$1" ]; then
+## echo "$COMMAND: the GNATS site $1 does not have a categories list."
+## exit 1
+## else
+## # The site name is the alias they'll have to have created.
+## USER_GNATS_SITE=$1
+## fi
+## else
+## echo "$USAGE" ; exit 1
+## fi
+ ;;
+ esac
+ shift
+done
+
+if [ -n "$USER_GNATS_SITE" ]; then
+ GNATS_SITE=$USER_GNATS_SITE
+ GNATS_ADDR=$USER_GNATS_SITE-gnats
+fi
+
+if [ "$SUBMITTER" = "unknown" -a -z "$REQUEST_ID" -a -z "$IN_FILE" ]; then
+ cat << '__EOF__'
+It seems that send-pr is not installed with your unique submitter-id.
+You need to run
+
+ install-sid YOUR-SID
+
+where YOUR-SID is the identification code you received with `send-pr'.
+`send-pr' will automatically insert this value into the template field
+`>Submitter-Id'. If you've downloaded `send-pr' from the Net, use `net'
+for this value. If you do not know your id, run `send-pr --request-id' to
+get one from your support site.
+__EOF__
+ exit 1
+fi
+
+## if [ -r "$DATADIR/gnats/$GNATS_SITE" ]; then
+## CATEGORIES=`grep -v '^#' $DATADIR/gnats/$GNATS_SITE | sort`
+## else
+## echo "$COMMAND: could not read $DATADIR/gnats/$GNATS_SITE for categories list."
+## exit 1
+## fi
+CATEGORIES="contrib cvs doc pcl-cvs portability"
+
+if [ -z "$CATEGORIES" ]; then
+ echo "$COMMAND: the categories list for $GNATS_SITE was empty!"
+ exit 1
+fi
+
+case "$FORMAT" in
+ lisp) echo "$CATEGORIES" | \
+ awk 'BEGIN {printf "( "}
+ {printf "(\"%s\") ",$0}
+ END {printf ")\n"}'
+ exit 0
+ ;;
+ norm) l=`echo "$CATEGORIES" | \
+ awk 'BEGIN {max = 0; }
+ { if (length($0) > max) { max = length($0); } }
+ END {print max + 1;}'`
+ c=`expr 70 / $l`
+ if [ $c -eq 0 ]; then c=1; fi
+ echo "$CATEGORIES" | \
+ awk 'BEGIN {print "Known categories:"; i = 0 }
+ { printf ("%-'$l'.'$l's", $0); if ((++i % '$c') == 0) { print "" } }
+ END { print ""; }'
+ exit 0
+ ;;
+esac
+
+ORIGINATOR_C='<name of the PR author (one line)>'
+ORGANIZATION_C='<organization of PR author (multiple lines)>'
+CONFIDENTIAL_C='<[ yes | no ] (one line)>'
+SYNOPSIS_C='<synopsis of the problem (one line)>'
+SEVERITY_C='<[ non-critical | serious | critical ] (one line)>'
+PRIORITY_C='<[ low | medium | high ] (one line)>'
+CATEGORY_C='<name of the product (one line)>'
+CLASS_C='<[ sw-bug | doc-bug | change-request | support ] (one line)>'
+RELEASE_C='<release number or tag (one line)>'
+ENVIRONMENT_C='<machine, os, target, libraries (multiple lines)>'
+DESCRIPTION_C='<precise description of the problem (multiple lines)>'
+HOW_TO_REPEAT_C='<code/input/activities to reproduce the problem (multiple lines)>'
+FIX_C='<how to correct or work around the problem, if known (multiple lines)>'
+
+# Catch some signals. ($xs kludge needed by Sun /bin/sh)
+xs=0
+trap 'rm -f $REF $TEMP; exit $xs' 0
+trap 'echo "$COMMAND: Aborting ..."; rm -f $REF $TEMP; xs=1; exit' 1 2 3 13 15
+
+# If they told us to use a specific file, then do so.
+if [ -n "$IN_FILE" ]; then
+ if [ "$IN_FILE" = "-" ]; then
+ # The PR is coming from the standard input.
+ if [ -n "$EXPLICIT_GNATS_ADDR" ]; then
+ sed -e "s;^[Tt][Oo]:.*;To: $GNATS_ADDR;" > $TEMP
+ else
+ cat > $TEMP
+ fi
+ else
+ # Use the file they named.
+ if [ -n "$EXPLICIT_GNATS_ADDR" ]; then
+ sed -e "s;^[Tt][Oo]:.*;To: $GNATS_ADDR;" $IN_FILE > $TEMP
+ else
+ cat $IN_FILE > $TEMP
+ fi
+ fi
+else
+
+ if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then
+ # If their PR_FORM points to a bogus entry, then bail.
+ if [ ! -f "$PR_FORM" -o ! -r "$PR_FORM" -o ! -s "$PR_FORM" ]; then
+ echo "$COMMAND: can't seem to read your template file (\`$PR_FORM'), ignoring PR_FORM"
+ sleep 1
+ PRINT_INTERN=bad_prform
+ fi
+ fi
+
+ if [ -n "$PR_FORM" -a -z "$PRINT_INTERN" ]; then
+ cp $PR_FORM $TEMP ||
+ ( echo "$COMMAND: could not copy $PR_FORM" ; xs=1; exit )
+ else
+ for file in $TEMP $REF ; do
+ cat > $file << '__EOF__'
+SEND-PR: -*- send-pr -*-
+SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
+SEND-PR: will all comments (text enclosed in `<' and `>').
+SEND-PR:
+SEND-PR: Choose from the following categories:
+SEND-PR:
+__EOF__
+
+ # Format the categories so they fit onto lines.
+ l=`echo "$CATEGORIES" | \
+ awk 'BEGIN {max = 0; }
+ { if (length($0) > max) { max = length($0); } }
+ END {print max + 1;}'`
+ c=`expr 61 / $l`
+ if [ $c -eq 0 ]; then c=1; fi
+ echo "$CATEGORIES" | \
+ awk 'BEGIN {printf "SEND-PR: "; i = 0 }
+ { printf ("%-'$l'.'$l's", $0);
+ if ((++i % '$c') == 0) { printf "\nSEND-PR: " } }
+ END { printf "\nSEND-PR:\n"; }' >> $file
+
+ cat >> $file << __EOF__
+To: $GNATS_ADDR
+Subject:
+From: $FROM
+Reply-To: $REPLY_TO
+X-send-pr-version: $VERSION
+
+
+>Submitter-Id: $SUBMITTER
+>Originator: $ORIGINATOR
+>Organization:
+${ORGANIZATION-$ORGANIZATION_C}
+>Confidential: $CONFIDENTIAL_C
+>Synopsis: $SYNOPSIS_C
+>Severity: $SEVERITY_C
+>Priority: $PRIORITY_C
+>Category: $CATEGORY_C
+>Class: $CLASS_C
+>Release: ${DEFAULT_RELEASE-$RELEASE_C}
+>Environment:
+ $ENVIRONMENT_C
+`[ -n "$SYSTEM" ] && echo System: $SYSTEM`
+`[ -n "$ARCH" ] && echo Architecture: $ARCH`
+`[ -n "$MACHINE" ] && echo Machine: $MACHINE`
+>Description:
+ $DESCRIPTION_C
+>How-To-Repeat:
+ $HOW_TO_REPEAT_C
+>Fix:
+ $FIX_C
+__EOF__
+ done
+ fi
+
+ if [ "$PRINT" = true -o "$PRINT_INTERN" = true ]; then
+ cat $TEMP
+ xs=0; exit
+ fi
+
+ chmod u+w $TEMP
+ if [ -z "$REQUEST_ID" ]; then
+ eval $EDIT $TEMP
+ else
+ ed -s $TEMP << '__EOF__'
+/^Subject/s/^Subject:.*/Subject: request for a customer id/
+/^>Category/s/^>Category:.*/>Category: send-pr/
+w
+q
+__EOF__
+ fi
+
+ if cmp -s $REF $TEMP ; then
+ echo "$COMMAND: problem report not filled out, therefore not sent"
+ xs=1; exit
+ fi
+fi
+
+#
+# Check the enumeration fields
+
+# This is a "sed-subroutine" with one keyword parameter
+# (with workaround for Sun sed bug)
+#
+SED_CMD='
+/$PATTERN/{
+s|||
+s|<.*>||
+s|^[ ]*||
+s|[ ]*$||
+p
+q
+}'
+
+
+while [ -z "$REQUEST_ID" ]; do
+ CNT=0
+
+ # 1) Confidential
+ #
+ PATTERN=">Confidential:"
+ CONFIDENTIAL=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
+ case "$CONFIDENTIAL" in
+ ""|yes|no) CNT=`expr $CNT + 1` ;;
+ *) echo "$COMMAND: \`$CONFIDENTIAL' is not a valid value for \`Confidential'." ;;
+ esac
+ #
+ # 2) Severity
+ #
+ PATTERN=">Severity:"
+ SEVERITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
+ case "$SEVERITY" in
+ ""|non-critical|serious|critical) CNT=`expr $CNT + 1` ;;
+ *) echo "$COMMAND: \`$SEVERITY' is not a valid value for \`Severity'."
+ esac
+ #
+ # 3) Priority
+ #
+ PATTERN=">Priority:"
+ PRIORITY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
+ case "$PRIORITY" in
+ ""|low|medium|high) CNT=`expr $CNT + 1` ;;
+ *) echo "$COMMAND: \`$PRIORITY' is not a valid value for \`Priority'."
+ esac
+ #
+ # 4) Category
+ #
+ PATTERN=">Category:"
+ CATEGORY=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
+ FOUND=
+ for C in $CATEGORIES
+ do
+ if [ "$C" = "$CATEGORY" ]; then FOUND=true ; break ; fi
+ done
+ if [ -n "$FOUND" ]; then
+ CNT=`expr $CNT + 1`
+ else
+ if [ -z "$CATEGORY" ]; then
+ echo "$COMMAND: you must include a Category: field in your report."
+ else
+ echo "$COMMAND: \`$CATEGORY' is not a known category."
+ fi
+ fi
+ #
+ # 5) Class
+ #
+ PATTERN=">Class:"
+ CLASS=`eval sed -n -e "\"$SED_CMD\"" $TEMP`
+ case "$CLASS" in
+ ""|sw-bug|doc-bug|change-request|support) CNT=`expr $CNT + 1` ;;
+ *) echo "$COMMAND: \`$CLASS' is not a valid value for \`Class'."
+ esac
+
+ [ $CNT -lt 5 -a -z "$BATCH" ] &&
+ echo "Errors were found with the problem report."
+
+ while true; do
+ if [ -z "$BATCH" ]; then
+ $ECHON1 "a)bort, e)dit or s)end? $ECHON2"
+ read input
+ else
+ if [ $CNT -eq 5 ]; then
+ input=s
+ else
+ input=a
+ fi
+ fi
+ case "$input" in
+ a*)
+ if [ -z "$BATCH" ]; then
+ echo "$COMMAND: the problem report remains in $BAD and is not sent."
+ mv $TEMP $BAD
+ else
+ echo "$COMMAND: the problem report is not sent."
+ fi
+ xs=1; exit
+ ;;
+ e*)
+ eval $EDIT $TEMP
+ continue 2
+ ;;
+ s*)
+ break 2
+ ;;
+ esac
+ done
+done
+#
+# Remove comments and send the problem report
+# (we have to use patterns, where the comment contains regex chars)
+#
+# /^>Originator:/s;$ORIGINATOR;;
+sed -e "
+/^SEND-PR:/d
+/^>Organization:/,/^>[A-Za-z-]*:/s;$ORGANIZATION_C;;
+/^>Confidential:/s;<.*>;;
+/^>Synopsis:/s;$SYNOPSIS_C;;
+/^>Severity:/s;<.*>;;
+/^>Priority:/s;<.*>;;
+/^>Category:/s;$CATEGORY_C;;
+/^>Class:/s;<.*>;;
+/^>Release:/,/^>[A-Za-z-]*:/s;$RELEASE_C;;
+/^>Environment:/,/^>[A-Za-z-]*:/s;$ENVIRONMENT_C;;
+/^>Description:/,/^>[A-Za-z-]*:/s;$DESCRIPTION_C;;
+/^>How-To-Repeat:/,/^>[A-Za-z-]*:/s;$HOW_TO_REPEAT_C;;
+/^>Fix:/,/^>[A-Za-z-]*:/s;$FIX_C;;
+" $TEMP > $REF
+
+if $MAIL_AGENT < $REF; then
+ echo "$COMMAND: problem report sent"
+ xs=0; exit
+else
+ echo "$COMMAND: mysterious mail failure."
+ if [ -z "$BATCH" ]; then
+ echo "$COMMAND: the problem report remains in $BAD and is not sent."
+ mv $REF $BAD
+ else
+ echo "$COMMAND: the problem report is not sent."
+ fi
+ xs=1; exit
+fi
diff --git a/contrib/cvs/src/diff.c b/contrib/cvs/src/diff.c
index e98938d9b55b..9732f5d1e91d 100644
--- a/contrib/cvs/src/diff.c
+++ b/contrib/cvs/src/diff.c
@@ -117,7 +117,7 @@ static struct option const longopts[] =
{"ignore-matching-lines", 1, 0, 'I'},
{"label", 1, 0, 'L'},
{"new-file", 0, 0, 'N'},
- {"initial-tab", 0, 0, 148},
+ {"initial-tab", 0, 0, 'T'},
{"width", 1, 0, 'W'},
{"text", 0, 0, 'a'},
{"ignore-space-change", 0, 0, 'b'},
@@ -138,7 +138,7 @@ static struct option const longopts[] =
{"report-identical-files", 0, 0, 's'},
{"expand-tabs", 0, 0, 't'},
{"ignore-all-space", 0, 0, 'w'},
- {"side-by-side", 0, 0, 147},
+ {"side-by-side", 0, 0, 'y'},
{"unified", 2, 0, 146},
{"left-column", 0, 0, 129},
{"suppress-common-lines", 0, 0, 130},
@@ -186,28 +186,6 @@ static struct option const longopts[] =
mostly to ignore -q. Maybe this should be fixed, but I think it's
a larger issue than the changes included here. */
-static void strcat_and_allocate PROTO ((char **, size_t *, const char *));
-
-/* *STR is a pointer to a malloc'd string. *LENP is its allocated
- length. Add SRC to the end of it, reallocating if necessary. */
-static void
-strcat_and_allocate (str, lenp, src)
- char **str;
- size_t *lenp;
- const char *src;
-{
- size_t new_size;
-
- new_size = strlen (*str) + strlen (src) + 1;
- if (*str == NULL || new_size >= *lenp)
- {
- while (new_size >= *lenp)
- *lenp *= 2;
- *str = xrealloc (*str, *lenp);
- }
- strcat (*str, src);
-}
-
int
diff (argc, argv)
int argc;
@@ -246,18 +224,19 @@ diff (argc, argv)
optind = 0;
while ((c = getopt_long (argc, argv,
- "+abcdefhilnpstuw0123456789BHNRC:D:F:I:L:U:V:W:k:r:",
+ "+abcdefhilnpstuwy0123456789BHNRTC:D:F:I:L:U:V:W:k:r:",
longopts, &option_index)) != -1)
{
switch (c)
{
case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
case 'h': case 'i': case 'n': case 'p': case 's': case 't':
- case 'u': case 'w': case '0': case '1': case '2':
- case '3': case '4': case '5': case '6': case '7': case '8':
- case '9': case 'B': case 'H':
+ case 'u': case 'w': case 'y':
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ case 'B': case 'H': case 'T':
(void) sprintf (tmp, " -%c", (char) c);
- strcat_and_allocate (&opts, &opts_allocated, tmp);
+ allocate_and_strcat (&opts, &opts_allocated, tmp);
break;
case 'L':
if (have_rev1_label++)
@@ -267,32 +246,31 @@ diff (argc, argv)
break;
}
- strcat_and_allocate (&opts, &opts_allocated, " -L");
- strcat_and_allocate (&opts, &opts_allocated, optarg);
+ allocate_and_strcat (&opts, &opts_allocated, " -L");
+ allocate_and_strcat (&opts, &opts_allocated, optarg);
break;
case 'C': case 'F': case 'I': case 'U': case 'V': case 'W':
(void) sprintf (tmp, " -%c", (char) c);
- strcat_and_allocate (&opts, &opts_allocated, tmp);
- strcat_and_allocate (&opts, &opts_allocated, optarg);
+ allocate_and_strcat (&opts, &opts_allocated, tmp);
+ allocate_and_strcat (&opts, &opts_allocated, optarg);
break;
case 131:
/* --ifdef. */
- strcat_and_allocate (&opts, &opts_allocated, " --ifdef=");
- strcat_and_allocate (&opts, &opts_allocated, optarg);
+ allocate_and_strcat (&opts, &opts_allocated, " --ifdef=");
+ allocate_and_strcat (&opts, &opts_allocated, optarg);
break;
case 129: case 130: case 132: case 133: case 134:
case 135: case 136: case 137: case 138: case 139: case 140:
case 141: case 142: case 143: case 144: case 145: case 146:
- case 147: case 148:
- strcat_and_allocate (&opts, &opts_allocated, " --");
- strcat_and_allocate (&opts, &opts_allocated,
+ allocate_and_strcat (&opts, &opts_allocated, " --");
+ allocate_and_strcat (&opts, &opts_allocated,
longopts[option_index].name);
if (longopts[option_index].has_arg == 1
|| (longopts[option_index].has_arg == 2
&& optarg != NULL))
{
- strcat_and_allocate (&opts, &opts_allocated, "=");
- strcat_and_allocate (&opts, &opts_allocated, optarg);
+ allocate_and_strcat (&opts, &opts_allocated, "=");
+ allocate_and_strcat (&opts, &opts_allocated, optarg);
}
break;
case 'R':
@@ -341,7 +319,7 @@ diff (argc, argv)
options = xstrdup ("");
#ifdef CLIENT_SUPPORT
- if (client_active) {
+ if (current_parsed_root->isremote) {
/* We're the client side. Fire up the remote server. */
start_server ();
@@ -422,6 +400,8 @@ diff_fileproc (callerdat, finfo)
char *tmp;
char *tocvsPath;
char *fname;
+ char *label1;
+ char *label2;
/* Initialize these solely to avoid warnings from gcc -Wall about
variables that might be used uninitialized. */
@@ -632,24 +612,53 @@ diff_fileproc (callerdat, finfo)
copy_file (tocvsPath, finfo->file);
}
+ /* Set up file labels appropriate for compatibility with the Larry Wall
+ * implementation of patch if the user didn't specify. This is irrelevant
+ * according to the POSIX.2 specification.
+ */
+ label1 = NULL;
+ label2 = NULL;
+ if (!have_rev1_label)
+ {
+ if (empty_file == DIFF_ADDED)
+ label1 =
+ make_file_label (DEVNULL, NULL, NULL);
+ else
+ label1 =
+ make_file_label (finfo->fullname, use_rev1, vers ? vers->srcfile : NULL);
+ }
+
+ if (!have_rev2_label)
+ {
+ if (empty_file == DIFF_REMOVED)
+ label2 =
+ make_file_label (DEVNULL, NULL, NULL);
+ else
+ label2 =
+ make_file_label (finfo->fullname, use_rev2, vers ? vers->srcfile : NULL);
+ }
+
if (empty_file == DIFF_ADDED || empty_file == DIFF_REMOVED)
{
- /* This is file, not fullname, because it is the "Index:" line which
- is supposed to contain the directory. */
+ /* This is fullname, not file, possibly despite the POSIX.2
+ * specification, because that's the way all the Larry Wall
+ * implementations of patch (are there other implementations?) want
+ * things and the POSIX.2 spec appears to leave room for this.
+ */
cvs_output ("\
===================================================================\n\
RCS file: ", 0);
- cvs_output (finfo->file, 0);
+ cvs_output (finfo->fullname, 0);
cvs_output ("\n", 1);
cvs_output ("diff -N ", 0);
- cvs_output (finfo->file, 0);
+ cvs_output (finfo->fullname, 0);
cvs_output ("\n", 1);
if (empty_file == DIFF_ADDED)
{
if (use_rev2 == NULL)
- status = diff_exec (DEVNULL, finfo->file, opts, RUN_TTY);
+ status = diff_exec (DEVNULL, finfo->file, label1, label2, opts, RUN_TTY);
else
{
int retcode;
@@ -668,7 +677,7 @@ RCS file: ", 0);
return err;
}
- status = diff_exec (DEVNULL, tmp, opts, RUN_TTY);
+ status = diff_exec (DEVNULL, tmp, label1, label2, opts, RUN_TTY);
}
}
else
@@ -687,22 +696,11 @@ RCS file: ", 0);
return err;
}
- status = diff_exec (tmp, DEVNULL, opts, RUN_TTY);
+ status = diff_exec (tmp, DEVNULL, label1, label2, opts, RUN_TTY);
}
}
else
{
- char *label1 = NULL;
- char *label2 = NULL;
-
- if (!have_rev1_label)
- label1 =
- make_file_label (finfo->fullname, use_rev1, vers->srcfile);
-
- if (!have_rev2_label)
- label2 =
- make_file_label (finfo->fullname, use_rev2, vers->srcfile);
-
status = RCS_exec_rcsdiff (vers->srcfile, opts,
*options ? options : vers->options,
use_rev1, use_rev2,
diff --git a/contrib/cvs/src/edit.c b/contrib/cvs/src/edit.c
index df649b61967e..b62710573cbc 100644
--- a/contrib/cvs/src/edit.c
+++ b/contrib/cvs/src/edit.c
@@ -81,7 +81,7 @@ watch_onoff (argc, argv)
argv += optind;
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
start_server ();
@@ -98,7 +98,7 @@ watch_onoff (argc, argv)
setting_default = (argc <= 0);
- lock_tree_for_write (argc, argv, local, 0);
+ lock_tree_for_write (argc, argv, local, W_LOCAL, 0);
err = start_recursion (onoff_fileproc, onoff_filesdoneproc,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
@@ -235,7 +235,7 @@ send_notifications (argc, argv, local)
/* OK, we've done everything which needs to happen on the client side.
Now we can try to contact the server; if we fail, then the
notifications stay in CVSADM_NOTIFY to be sent next time. */
- if (client_active)
+ if (current_parsed_root->isremote)
{
if (strcmp (command_name, "release") != 0)
{
@@ -259,7 +259,7 @@ send_notifications (argc, argv, local)
{
/* Local. */
- lock_tree_for_write (argc, argv, local, 0);
+ lock_tree_for_write (argc, argv, local, W_LOCAL, 0);
err += start_recursion (ncheck_fileproc, (FILESDONEPROC) NULL,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
argc, argv, local, W_LOCAL, 0, 0, (char *)NULL,
@@ -301,6 +301,8 @@ edit_fileproc (callerdat, finfo)
(void) time (&now);
ascnow = asctime (gmtime (&now));
ascnow[24] = '\0';
+ /* Fix non-standard format. */
+ if (ascnow[8] == '0') ascnow[8] = ' ';
fprintf (fp, "E%s\t%s GMT\t%s\t%s\t", finfo->file,
ascnow, hostname, CurDir);
if (setting_tedit)
@@ -493,6 +495,8 @@ unedit_fileproc (callerdat, finfo)
(void) time (&now);
ascnow = asctime (gmtime (&now));
ascnow[24] = '\0';
+ /* Fix non-standard format. */
+ if (ascnow[8] == '0') ascnow[8] = ' ';
fprintf (fp, "U%s\t%s GMT\t%s\t%s\t\n", finfo->file,
ascnow, hostname, CurDir);
@@ -869,11 +873,11 @@ notify_do (type, filename, who, val, watches, repository)
size_t line_len = 0;
args.notifyee = NULL;
- usersname = xmalloc (strlen (CVSroot_directory)
+ usersname = xmalloc (strlen (current_parsed_root->directory)
+ sizeof CVSROOTADM
+ sizeof CVSROOTADM_USERS
+ 20);
- strcpy (usersname, CVSroot_directory);
+ strcpy (usersname, current_parsed_root->directory);
strcat (usersname, "/");
strcat (usersname, CVSROOTADM);
strcat (usersname, "/");
@@ -1114,7 +1118,7 @@ editors (argc, argv)
argv += optind;
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
start_server ();
ign_setup ();
diff --git a/contrib/cvs/src/entries.c b/contrib/cvs/src/entries.c
index 14163bb8ae60..686244dbb332 100644
--- a/contrib/cvs/src/entries.c
+++ b/contrib/cvs/src/entries.c
@@ -381,7 +381,9 @@ fgetentent(fpin, cmd, sawdir)
if (strlen (ts) > 30 && CVS_STAT (user, &sb) == 0)
{
char *c = ctime (&sb.st_mtime);
-
+ /* Fix non-standard format. */
+ if (c[8] == '0') c[8] = ' ';
+
if (!strncmp (ts + 25, c, 24))
ts = time_stamp (user);
else
diff --git a/contrib/cvs/src/error.c b/contrib/cvs/src/error.c
index fe5877f3d6e0..9655a97ba968 100644
--- a/contrib/cvs/src/error.c
+++ b/contrib/cvs/src/error.c
@@ -121,7 +121,9 @@ error (status, errnum, message, va_alist)
char *q;
char *str;
int num;
+ long lnum;
unsigned int unum;
+ unsigned long ulnum;
int ch;
char buf[100];
@@ -157,6 +159,21 @@ error (status, errnum, message, va_alist)
sprintf (buf, "%d", num);
cvs_outerr (buf, strlen (buf));
break;
+ case 'l':
+ if (q[2] == 'd')
+ {
+ lnum = va_arg (args, long);
+ sprintf (buf, "%ld", lnum);
+ }
+ else if (q[2] == 'u')
+ {
+ ulnum = va_arg (args, unsigned long);
+ sprintf (buf, "%lu", ulnum);
+ }
+ else goto bad;
+ cvs_outerr (buf, strlen (buf));
+ q++;
+ break;
case 'x':
unum = va_arg (args, unsigned int);
sprintf (buf, "%x", unum);
@@ -171,6 +188,7 @@ error (status, errnum, message, va_alist)
cvs_outerr ("%", 1);
break;
default:
+ bad:
cvs_outerr (msg, sizeof (msg) - 1);
/* Don't just keep going, because q + 1 might point to the
terminating '\0'. */
diff --git a/contrib/cvs/src/error.h b/contrib/cvs/src/error.h
index e0fde4a5bec3..c7268cea7bc6 100644
--- a/contrib/cvs/src/error.h
+++ b/contrib/cvs/src/error.h
@@ -11,8 +11,8 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. */
-#ifndef _error_h_
-#define _error_h_
+#ifndef ERROR_H
+#define ERROR_H
/* Add prototype support. Normally this is done in cvs.h, but that
doesn't get included from lib/savecwd.c. */
@@ -54,4 +54,4 @@ extern void error_exit PROTO ((void));
process and packages up its stderr in the protocol. */
extern int error_use_protocol;
-#endif /* _error_h_ */
+#endif /* ERROR_H */
diff --git a/contrib/cvs/src/expand_path.c b/contrib/cvs/src/expand_path.c
index 25e561cc0e65..f46b39bebdc6 100644
--- a/contrib/cvs/src/expand_path.c
+++ b/contrib/cvs/src/expand_path.c
@@ -272,7 +272,7 @@ expand_variable (name, file, line)
int line;
{
if (strcmp (name, CVSROOT_ENV) == 0)
- return CVSroot_original;
+ return current_parsed_root->original;
else if (strcmp (name, "RCSBIN") == 0)
{
error (0, 0, "RCSBIN internal variable is no longer supported");
diff --git a/contrib/cvs/src/filesubr.c b/contrib/cvs/src/filesubr.c
index 3a800a92799b..28575a352692 100644
--- a/contrib/cvs/src/filesubr.c
+++ b/contrib/cvs/src/filesubr.c
@@ -17,6 +17,7 @@
definitions under operating systems (like, say, Windows NT) with different
file system semantics. */
+#include <assert.h>
#include "cvs.h"
static int deep_remove_dir PROTO((const char *path));
@@ -413,12 +414,12 @@ unlink_file (f)
const char *f;
{
if (trace)
- (void) fprintf (stderr, "%s-> unlink(%s)\n",
+ (void) fprintf (stderr, "%s-> unlink_file(%s)\n",
CLIENT_SERVER_STR, f);
if (noexec)
return (0);
- return (unlink (f));
+ return (CVS_UNLINK (f));
}
/*
@@ -464,7 +465,7 @@ unlink_file_dir (f)
else if (S_ISDIR (sb.st_mode))
return deep_remove_dir (f);
- return unlink (f);
+ return CVS_UNLINK (f);
}
/* Remove a directory and everything it contains. Returns 0 for
@@ -487,14 +488,14 @@ deep_remove_dir (path)
returns 87). */
|| (ENOTEMPTY == 17 && EEXIST == 17 && errno == 87))
{
- if ((dirp = opendir (path)) == NULL)
+ if ((dirp = CVS_OPENDIR (path)) == NULL)
/* If unable to open the directory return
* an error
*/
return -1;
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
char *buf;
@@ -512,16 +513,16 @@ deep_remove_dir (path)
{
if (deep_remove_dir(buf))
{
- closedir(dirp);
+ CVS_CLOSEDIR(dirp);
free (buf);
return -1;
}
}
else
{
- if (unlink (buf) != 0)
+ if (CVS_UNLINK (buf) != 0)
{
- closedir(dirp);
+ CVS_CLOSEDIR(dirp);
free (buf);
return -1;
}
@@ -533,11 +534,11 @@ deep_remove_dir (path)
if (errno != 0)
{
int save_errno = errno;
- closedir (dirp);
+ CVS_CLOSEDIR (dirp);
errno = save_errno;
return -1;
}
- closedir (dirp);
+ CVS_CLOSEDIR (dirp);
return rmdir (path);
}
else
@@ -684,53 +685,167 @@ xcmp (file1, file2)
}
/* Generate a unique temporary filename. Returns a pointer to a newly
- malloc'd string containing the name. Returns successfully or not at
- all. */
-/* There are at least three functions for generating temporary
- filenames. We use tempnam (SVID 3) if possible, else mktemp (BSD
- 4.3), and as last resort tmpnam (POSIX). Reason is that tempnam and
- mktemp both allow to specify the directory in which the temporary
- file will be created. */
-#ifdef HAVE_TEMPNAM
+ * malloc'd string containing the name. Returns successfully or not at
+ * all.
+ *
+ * THIS FUNCTION IS DEPRECATED!!! USE cvs_temp_file INSTEAD!!!
+ *
+ * and yes, I know about the way the rcs commands use temp files. I think
+ * they should be converted too but I don't have time to look into it right
+ * now.
+ */
char *
cvs_temp_name ()
{
- char *retval;
+ char *fn;
+ FILE *fp;
- retval = tempnam (Tmpdir, "cvs");
- if (retval == NULL)
- error (1, errno, "cannot generate temporary filename");
- /* tempnam returns a pointer to a newly malloc'd string, so there's
- no need for a xstrdup */
- return retval;
+ fp = cvs_temp_file (&fn);
+ if (fp == NULL)
+ error (1, errno, "Failed to create temporary file");
+ if (fclose (fp) == EOF)
+ error (0, errno, "Failed to close temporary file %s", fn);
+ return fn;
}
-#else
-char *
-cvs_temp_name ()
+
+/* Generate a unique temporary filename and return an open file stream
+ * to the truncated file by that name
+ *
+ * INPUTS
+ * filename where to place the pointer to the newly allocated file
+ * name string
+ *
+ * OUTPUTS
+ * filename dereferenced, will point to the newly allocated file
+ * name string. This value is undefined if the function
+ * returns an error.
+ *
+ * RETURNS
+ * An open file pointer to a read/write mode empty temporary file with the
+ * unique file name or NULL on failure.
+ *
+ * ERRORS
+ * on error, errno will be set to some value either by CVS_FOPEN or
+ * whatever system function is called to generate the temporary file name
+ */
+/* There are at least four functions for generating temporary
+ * filenames. We use mkstemp (BSD 4.3) if possible, else tempnam (SVID 3),
+ * else mktemp (BSD 4.3), and as last resort tmpnam (POSIX). Reason is that
+ * mkstemp, tempnam, and mktemp both allow to specify the directory in which
+ * the temporary file will be created.
+ *
+ * And the _correct_ way to use the deprecated functions probably involves
+ * opening file descriptors using O_EXCL & O_CREAT and even doing the annoying
+ * NFS locking thing, but until I hear of more problems, I'm not going to
+ * bother.
+ */
+FILE *cvs_temp_file (filename)
+ char **filename;
{
-# ifdef HAVE_MKTEMP
- char *value;
- char *retval;
-
- value = xmalloc (strlen (Tmpdir) + 40);
- sprintf (value, "%s/%s", Tmpdir, "cvsXXXXXX" );
- retval = mktemp (value);
-
- if (retval == NULL)
- error (1, errno, "cannot generate temporary filename");
- return value;
-# else
- char value[L_tmpnam + 1];
- char *retval;
-
- retval = tmpnam (value);
- if (retval == NULL)
- error (1, errno, "cannot generate temporary filename");
- return xstrdup (value);
-# endif
-}
+ char *fn;
+ FILE *fp;
+
+ /* FIXME - I'd like to be returning NULL here in noexec mode, but I think
+ * some of the rcs & diff functions which rely on a temp file run in
+ * noexec mode too.
+ */
+
+ assert (filename != NULL);
+
+#ifdef HAVE_MKSTEMP
+
+ {
+ int fd;
+
+ fn = xmalloc (strlen (Tmpdir) + 11);
+ sprintf (fn, "%s/%s", Tmpdir, "cvsXXXXXX" );
+ fd = mkstemp (fn);
+
+ /* a NULL return will be interpreted by callers as an error and
+ * errno should still be set
+ */
+ if (fd == -1) fp = NULL;
+ else if ((fp = CVS_FDOPEN (fd, "w+")) == NULL)
+ {
+ /* attempt to close and unlink the file since mkstemp returned sucessfully and
+ * we believe it's been created and opened
+ */
+ int save_errno = errno;
+ if (close (fd))
+ error (0, errno, "Failed to close temporary file %s", fn);
+ if (CVS_UNLINK (fn))
+ error (0, errno, "Failed to unlink temporary file %s", fn);
+ errno = save_errno;
+ }
+
+ if (fp == NULL) free (fn);
+ /* mkstemp is defined to open mode 0600 using glibc 2.0.7+ */
+ /* FIXME - configure can probably tell us which version of glibc we are
+ * linking to and not chmod for 2.0.7+
+ */
+ else chmod (fn, 0600);
+
+ }
+
+#elif HAVE_TEMPNAM
+
+ /* tempnam has been deprecated due to under-specification */
+
+ fn = tempnam (Tmpdir, "cvs");
+ if (fn == NULL) fp = NULL;
+ else if ((fp = CVS_FOPEN (fn, "w+")) == NULL) free (fn);
+ else chmod (fn, 0600);
+
+ /* tempnam returns a pointer to a newly malloc'd string, so there's
+ * no need for a xstrdup
+ */
+
+#elif HAVE_MKTEMP
+
+ /* mktemp has been deprecated due to the BSD 4.3 specification specifying
+ * that XXXXXX will be replaced by a PID and a letter, creating only 26
+ * possibilities, a security risk, and a race condition.
+ */
+
+ {
+ char *ifn;
+
+ ifn = xmalloc (strlen (Tmpdir) + 11);
+ sprintf (ifn, "%s/%s", Tmpdir, "cvsXXXXXX" );
+ fn = mktemp (ifn);
+
+ if (fn == NULL) fp = NULL;
+ else fp = CVS_FOPEN (fn, "w+");
+
+ if (fp == NULL) free (ifn);
+ else chmod (fn, 0600);
+
+ }
+
+#else /* use tmpnam if all else fails */
+
+ /* tmpnam is deprecated */
+
+ {
+ char ifn[L_tmpnam + 1];
+
+ fn = tmpnam (ifn);
+
+ if (fn == NULL) fp = NULL;
+ else if ((fp = CVS_FOPEN (ifn, "w+")) != NULL)
+ {
+ fn = xstrdup (ifn);
+ chmod (fn, 0600);
+ }
+
+ }
+
#endif
-
+
+ *filename = fn;
+ return fp;
+}
+
/* Return non-zero iff FILENAME is absolute.
Trivial under Unix, but more complicated under other systems. */
int
@@ -819,13 +934,17 @@ char *
get_homedir ()
{
static char *home = NULL;
- char *env = getenv ("HOME");
+ char *env;
struct passwd *pw;
if (home != NULL)
return home;
- if (env)
+ if (
+#ifdef SERVER_SUPPORT
+ !server_active &&
+#endif
+ (env = getenv ("HOME")) != NULL)
home = env;
else if ((pw = (struct passwd *) getpwuid (getuid ()))
&& pw->pw_dir)
@@ -932,7 +1051,7 @@ fopen_case (name, mode, fp, pathp)
}
}
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (cvs_casecmp (dp->d_name, fname) == 0)
{
@@ -944,7 +1063,7 @@ fopen_case (name, mode, fp, pathp)
}
if (errno != 0)
error (1, errno, "cannot read directory %s", dir);
- closedir (dirp);
+ CVS_CLOSEDIR (dirp);
if (found_name == NULL)
{
diff --git a/contrib/cvs/src/find_names.c b/contrib/cvs/src/find_names.c
index 6fb927bf6a9f..e34232efdc71 100644
--- a/contrib/cvs/src/find_names.c
+++ b/contrib/cvs/src/find_names.c
@@ -269,7 +269,7 @@ find_rcs (dir, list)
/* read the dir, grabbing the ,v files */
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (CVS_FNMATCH (RCSPAT, dp->d_name, 0) == 0)
{
@@ -288,11 +288,11 @@ find_rcs (dir, list)
if (errno != 0)
{
int save_errno = errno;
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
errno = save_errno;
return 1;
}
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
return (0);
}
@@ -321,9 +321,9 @@ find_dirs (dir, list, checkadm, entries)
Emptydir. Except in the CVSNULLREPOS case, Emptydir is just
a normal directory name. */
if (isabsolute (dir)
- && strncmp (dir, CVSroot_directory, strlen (CVSroot_directory)) == 0
- && ISDIRSEP (dir[strlen (CVSroot_directory)])
- && strcmp (dir + strlen (CVSroot_directory) + 1, CVSROOTADM) == 0)
+ && strncmp (dir, current_parsed_root->directory, strlen (current_parsed_root->directory)) == 0
+ && ISDIRSEP (dir[strlen (current_parsed_root->directory)])
+ && strcmp (dir + strlen (current_parsed_root->directory) + 1, CVSROOTADM) == 0)
skip_emptydir = 1;
/* set up to read the dir */
@@ -332,7 +332,7 @@ find_dirs (dir, list, checkadm, entries)
/* read the dir, grabbing sub-dirs */
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (strcmp (dp->d_name, ".") == 0 ||
strcmp (dp->d_name, "..") == 0 ||
@@ -414,11 +414,11 @@ find_dirs (dir, list, checkadm, entries)
if (errno != 0)
{
int save_errno = errno;
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
errno = save_errno;
return 1;
}
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
if (tmp != NULL)
free (tmp);
return (0);
diff --git a/contrib/cvs/src/history.c b/contrib/cvs/src/history.c
index 9f66e866d567..4979398c19cf 100644
--- a/contrib/cvs/src/history.c
+++ b/contrib/cvs/src/history.c
@@ -131,7 +131,7 @@
* -p repository - Only records in which the "repository" string is a
* prefix of the "repos" field are considered.
*
- * -m modulename - Only records which contain "modulename" in the
+ * -n modulename - Only records which contain "modulename" in the
* "module" field are considered.
*
*
@@ -191,8 +191,9 @@ static struct hrec
char *end; /* Ptr into repository to copy at end of workdir */
char *mod; /* The module within which the file is contained */
time_t date; /* Calculated from date stored in record */
- int idx; /* Index of record, for "stable" sort. */
+ long idx; /* Index of record, for "stable" sort. */
} *hrec_head;
+static long hrec_idx;
static void fill_hrec PROTO((char *line, struct hrec * hr));
@@ -439,8 +440,8 @@ history (argc, argv)
save_file ("", optarg, (char *) NULL);
break;
case 'm': /* Full module report */
- report_count++;
- module_report++;
+ if (!module_report++) report_count++;
+ /* fall through */
case 'n': /* Look for specified module */
save_module (optarg);
break;
@@ -538,7 +539,7 @@ history (argc, argv)
error (1, 0, "Only one report type allowed from: \"-Tcomxe\".");
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
struct file_list_str *f1;
char **mod;
@@ -669,9 +670,9 @@ history (argc, argv)
fname = xstrdup (histfile);
else
{
- fname = xmalloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM)
+ fname = xmalloc (strlen (current_parsed_root->directory) + sizeof (CVSROOTADM)
+ sizeof (CVSROOTADM_HISTORY) + 10);
- (void) sprintf (fname, "%s/%s/%s", CVSroot_directory,
+ (void) sprintf (fname, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSROOTADM_HISTORY);
}
@@ -715,9 +716,9 @@ history_write (type, update_dir, revs, name, repository)
return;
if ( strchr(logHistory, type) == NULL )
return;
- fname = xmalloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM)
- + sizeof (CVSROOTADM_HISTORY) + 10);
- (void) sprintf (fname, "%s/%s/%s", CVSroot_directory,
+ fname = xmalloc (strlen (current_parsed_root->directory) + sizeof (CVSROOTADM)
+ + sizeof (CVSROOTADM_HISTORY) + 3);
+ (void) sprintf (fname, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSROOTADM_HISTORY);
/* turn off history logging if the history file does not exist */
@@ -984,7 +985,12 @@ expand_modules ()
*
*/
-#define NEXT_BAR(here) do { while (isspace(*line)) line++; hr->here = line; while ((c = *line++) && c != '|') ; if (!c) return; *(line - 1) = '\0'; } while (0)
+#define NEXT_BAR(here) do { \
+ while (isspace(*line)) line++; \
+ hr->here = line; \
+ while ((c = *line++) && c != '|') ; \
+ if (!c) return; line[-1] = '\0'; \
+ } while (0)
static void
fill_hrec (line, hr)
@@ -993,37 +999,31 @@ fill_hrec (line, hr)
{
char *cp;
int c;
- int off;
- static int idx = 0;
- unsigned long date;
- memset ((char *) hr, 0, sizeof (*hr));
+ hr->type = hr->user = hr->dir = hr->repos = hr->rev = hr->file =
+ hr->end = hr->mod = NULL;
+ hr->date = -1;
+ hr->idx = ++hrec_idx;
while (isspace ((unsigned char) *line))
line++;
hr->type = line++;
- (void) sscanf (line, "%lx", &date);
- hr->date = date;
- while (*line && strchr ("0123456789abcdefABCDEF", *line))
- line++;
- if (*line == '\0')
+ hr->date = strtoul (line, &cp, 16);
+ if (cp == line || *cp != '|')
return;
-
- line++;
+ line = cp + 1;
NEXT_BAR (user);
NEXT_BAR (dir);
if ((cp = strrchr (hr->dir, '*')) != NULL)
{
*cp++ = '\0';
- (void) sscanf (cp, "%x", &off);
- hr->end = line + off;
+ hr->end = line + strtoul (cp, NULL, 16);
}
else
hr->end = line - 1; /* A handy pointer to '\0' */
NEXT_BAR (repos);
NEXT_BAR (rev);
- hr->idx = idx++;
if (strchr ("FOET", *(hr->type)))
hr->mod = line;
@@ -1055,7 +1055,7 @@ static void
read_hrecs (fname)
char *fname;
{
- unsigned char *cpstart, *cp, *nl;
+ unsigned char *cpstart, *cpend, *cp, *nl;
char *hrline;
int i;
int fd;
@@ -1072,21 +1072,22 @@ read_hrecs (fname)
cpstart = xmalloc (2 * STAT_BLOCKSIZE(st_buf));
cpstart[0] = '\0';
- cp = cpstart;
+ cp = cpend = cpstart;
hrec_max = HREC_INCREMENT;
hrec_head = xmalloc (hrec_max * sizeof (struct hrec));
+ hrec_idx = 0;
for (;;)
{
- for (nl = cp; *nl && *nl != '\n'; nl++)
+ for (nl = cp; nl < cpend && *nl != '\n'; nl++)
if (!isprint(*nl)) *nl = ' ';
- if (!*nl)
+ if (nl >= cpend)
{
if (nl - cp >= STAT_BLOCKSIZE(st_buf))
{
- error(1, 0, "history line too long (> %lu)",
+ error(1, 0, "history line %ld too long (> %lu)", hrec_idx + 1,
(unsigned long) STAT_BLOCKSIZE(st_buf));
}
if (nl > cp)
@@ -1096,13 +1097,14 @@ read_hrecs (fname)
i = read (fd, nl, STAT_BLOCKSIZE(st_buf));
if (i > 0)
{
- nl[i] = '\0';
+ cpend = nl + i;
+ *cpend = '\0';
continue;
}
if (i < 0)
error (1, errno, "error reading history file");
if (nl == cp) break;
- nl[1] = '\0';
+ error (0, 0, "warning: no newline at end of history file");
}
*nl = '\0';
@@ -1192,6 +1194,14 @@ select_hrec (hr)
struct file_list_str *fl;
int count;
+ /* basic validity checking */
+ if (!hr->type || !hr->user || !hr->dir || !hr->repos || !hr->rev ||
+ !hr->file || !hr->end)
+ {
+ error (0, 0, "warning: history line %ld invalid", hr->idx);
+ return (0);
+ }
+
/* "Since" checking: The argument parser guarantees that only one of the
* following four choices is set:
*
diff --git a/contrib/cvs/src/ignore.c b/contrib/cvs/src/ignore.c
index 4ea61ad8bab2..b52632b422ff 100644
--- a/contrib/cvs/src/ignore.c
+++ b/contrib/cvs/src/ignore.c
@@ -68,13 +68,13 @@ ign_setup ()
processing, and only if !ign_inhibit_server), letting the server
know about the files and letting it decide whether to ignore
them based on CVSROOOTADM_IGNORE. */
- if (!client_active)
+ if (!current_parsed_root->isremote)
#endif
{
- char *file = xmalloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM)
+ char *file = xmalloc (strlen (current_parsed_root->directory) + sizeof (CVSROOTADM)
+ sizeof (CVSROOTADM_IGNORE) + 10);
/* Then add entries found in repository, if it exists */
- (void) sprintf (file, "%s/%s/%s", CVSroot_directory,
+ (void) sprintf (file, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSROOTADM_IGNORE);
ign_add_file (file, 0);
free (file);
@@ -379,6 +379,8 @@ ignore_files (ilist, entries, update_dir, proc)
struct stat sb;
char *file;
char *xdir;
+ List *files;
+ Node *p;
/* Set SUBDIRS if we have subdirectory information in ENTRIES. */
if (entries == NULL)
@@ -407,14 +409,16 @@ ignore_files (ilist, entries, update_dir, proc)
ign_add_file (CVSDOTIGNORE, 1);
wrap_add_file (CVSDOTWRAPPER, 1);
- errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ /* Make a list for the files. */
+ files = getlist ();
+
+ while (errno = 0, (dp = CVS_READDIR (dirp)) != NULL)
{
file = dp->d_name;
if (strcmp (file, ".") == 0 || strcmp (file, "..") == 0)
- goto continue_loop;
+ continue;
if (findnode_fn (ilist, file) != NULL)
- goto continue_loop;
+ continue;
if (subdirs)
{
Node *node;
@@ -435,14 +439,14 @@ ignore_files (ilist, entries, update_dir, proc)
dir = isdir (p);
free (p);
if (dir)
- goto continue_loop;
+ continue;
}
}
/* We could be ignoring FIFOs and other files which are neither
regular files nor directories here. */
if (ign_name (file))
- goto continue_loop;
+ continue;
if (
#ifdef DT_DIR
@@ -469,7 +473,7 @@ ignore_files (ilist, entries, update_dir, proc)
if (isdir (temp))
{
free (temp);
- goto continue_loop;
+ continue;
}
free (temp);
}
@@ -484,16 +488,22 @@ ignore_files (ilist, entries, update_dir, proc)
#endif
)
{
- goto continue_loop;
+ continue;
}
#endif
- }
+ }
- (*proc) (file, xdir);
- continue_loop:
- errno = 0;
+ p = getnode ();
+ p->type = FILES;
+ p->key = xstrdup (file);
+ (void) addnode (files, p);
}
if (errno != 0)
error (0, errno, "error reading current directory");
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
+
+ sortlist (files, fsortcmp);
+ for (p = files->list->next; p != files->list; p = p->next)
+ (*proc) (p->key, xdir);
+ dellist (&files);
}
diff --git a/contrib/cvs/src/import.c b/contrib/cvs/src/import.c
index e1fb460920a2..6bd6abdf2dde 100644
--- a/contrib/cvs/src/import.c
+++ b/contrib/cvs/src/import.c
@@ -171,16 +171,17 @@ import (argc, argv)
if (! isabsolute (argv[0])
&& pathname_levels (argv[0]) == 0)
{
- if (CVSroot_directory == NULL)
+ if (current_parsed_root == NULL)
{
error (0, 0, "missing CVSROOT environment variable\n");
error (1, 0, "Set it or specify the '-d' option to %s.",
program_name);
}
- repository = xmalloc (strlen (CVSroot_directory) + strlen (argv[0])
- + 10);
- (void) sprintf (repository, "%s/%s", CVSroot_directory, argv[0]);
- repos_len = strlen (CVSroot_directory);
+ repository = xmalloc (strlen (current_parsed_root->directory)
+ + strlen (argv[0])
+ + 2);
+ (void) sprintf (repository, "%s/%s", current_parsed_root->directory, argv[0]);
+ repos_len = strlen (current_parsed_root->directory);
}
else
{
@@ -207,7 +208,7 @@ import (argc, argv)
*cp = '\0';
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
/* For rationale behind calling start_server before do_editor, see
commit.c */
@@ -236,7 +237,7 @@ import (argc, argv)
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
int err;
@@ -290,8 +291,7 @@ import (argc, argv)
make_directories (repository);
/* Create the logfile that will be logged upon completion */
- tmpfile = cvs_temp_name ();
- if ((logfp = CVS_FOPEN (tmpfile, "w+")) == NULL)
+ if ((logfp = cvs_temp_file (&tmpfile)) == NULL)
error (1, errno, "cannot create temporary file `%s'", tmpfile);
/* On systems where we can unlink an open file, do so, so it will go
away no matter how we exit. FIXME-maybe: Should be checking for
@@ -425,7 +425,7 @@ import_descend (message, vtag, targc, targv)
else
{
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (strcmp (dp->d_name, ".") == 0 || strcmp (dp->d_name, "..") == 0)
goto one_more_time_boys;
@@ -476,7 +476,7 @@ import_descend (message, vtag, targc, targv)
else
{
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
err += client_process_import_file (message, dp->d_name,
vtag, targc, targv,
repository,
@@ -496,7 +496,7 @@ import_descend (message, vtag, targc, targv)
error (0, errno, "cannot read directory");
++err;
}
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
}
if (dirlist != NULL)
@@ -1567,7 +1567,7 @@ import_descend_dir (message, dir, vtag, targc, targv)
}
#ifdef CLIENT_SUPPORT
- if (!quiet && !client_active)
+ if (!quiet && !current_parsed_root->isremote)
#else
if (!quiet)
#endif
@@ -1582,7 +1582,7 @@ import_descend_dir (message, dir, vtag, targc, targv)
goto out;
}
#ifdef CLIENT_SUPPORT
- if (!client_active && !isdir (repository))
+ if (!current_parsed_root->isremote && !isdir (repository))
#else
if (!isdir (repository))
#endif
diff --git a/contrib/cvs/src/lock.c b/contrib/cvs/src/lock.c
index 1b981805b46b..c05b83ec1b47 100644
--- a/contrib/cvs/src/lock.c
+++ b/contrib/cvs/src/lock.c
@@ -172,12 +172,13 @@ lock_name (repository, name)
/* The interesting part of the repository is the part relative
to CVSROOT. */
- assert (CVSroot_directory != NULL);
- assert (strncmp (repository, CVSroot_directory,
- strlen (CVSroot_directory)) == 0);
- short_repos = repository + strlen (CVSroot_directory) + 1;
+ assert (current_parsed_root != NULL);
+ assert (current_parsed_root->directory != NULL);
+ assert (strncmp (repository, current_parsed_root->directory,
+ strlen (current_parsed_root->directory)) == 0);
+ short_repos = repository + strlen (current_parsed_root->directory) + 1;
- if (strcmp (repository, CVSroot_directory) == 0)
+ if (strcmp (repository, current_parsed_root->directory) == 0)
short_repos = ".";
else
assert (short_repos[-1] == '/');
@@ -633,7 +634,7 @@ again:
error (1, 0, "cannot open directory %s", repository);
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (CVS_FNMATCH (CVSRFLPAT, dp->d_name, 0) == 0)
{
@@ -654,7 +655,7 @@ again:
*/
if (now >= (sb.st_ctime + CVSLCKAGE) && CVS_UNLINK (line) != -1)
{
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
free (line);
goto again;
}
@@ -680,7 +681,7 @@ again:
if (errno != 0)
error (0, errno, "error reading directory %s", repository);
- closedir (dirp);
+ CVS_CLOSEDIR (dirp);
return (ret);
}
@@ -890,10 +891,11 @@ lock_filesdoneproc (callerdat, err, repository, update_dir, entries)
}
void
-lock_tree_for_write (argc, argv, local, aflag)
+lock_tree_for_write (argc, argv, local, which, aflag)
int argc;
char **argv;
int local;
+ int which;
int aflag;
{
int err;
@@ -904,7 +906,7 @@ lock_tree_for_write (argc, argv, local, aflag)
lock_tree_list = getlist ();
err = start_recursion ((FILEPROC) NULL, lock_filesdoneproc,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL, argc,
- argv, local, W_LOCAL, aflag, 0, (char *) NULL, 0);
+ argv, local, which, aflag, 0, (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 2e230e33138b..1930ae549932 100644
--- a/contrib/cvs/src/log.c
+++ b/contrib/cvs/src/log.c
@@ -30,6 +30,8 @@ struct option_revlist
/* Nonzero if there was a trailing `.', which means to print only
the head revision of a branch. */
int branchhead;
+ /* Nonzero if first and last are inclusive. */
+ int inclusive;
};
/* This structure holds information derived from option_revlist given
@@ -46,6 +48,8 @@ struct revlist
/* The number of fields in these revisions (one more than
numdots). */
int fields;
+ /* Whether first & last are to be included or excluded. */
+ int inclusive;
};
/* This structure holds information parsed from the -d option. */
@@ -105,6 +109,9 @@ struct log_data_and_rcs
RCSNode *rcs;
};
+static int rlog_proc PROTO((int argc, char **argv, char *xwhere,
+ char *mwhere, char *mfile, int shorten,
+ int local_specified, char *mname, char *msg));
static Dtype log_dirproc PROTO ((void *callerdat, char *dir,
char *repository, char *update_dir,
List *entries));
@@ -131,6 +138,9 @@ static void log_version PROTO ((struct log_data *, struct revlist *,
static int log_branch PROTO ((Node *, void *));
static int version_compare PROTO ((const char *, const char *, int));
+static struct log_data log_data;
+static int is_rlog;
+
static const char *const log_usage[] =
{
"Usage: %s %s [-lRhtNb] [-r[revisions]] [-d dates] [-s states]\n",
@@ -142,6 +152,15 @@ static const char *const log_usage[] =
"\t-N\tDo not list tags.\n",
"\t-b\tOnly list revisions on the default branch.\n",
"\t-r[revisions]\tSpecify revision(s)s to list.\n",
+ "\t rev1:rev2 Between rev1 and rev2, including rev1 and rev2.\n",
+ "\t rev1::rev2 Between rev1 and rev2, excluding rev1 and rev2.\n",
+ "\t rev: rev and following revisions on the same branch.\n",
+ "\t rev:: After rev on the same branch.\n",
+ "\t :rev rev and previous revisions on the same branch.\n",
+ "\t ::rev Before rev on the same branch.\n",
+ "\t rev Just rev.\n",
+ "\t branch All revisions on the branch.\n",
+ "\t branch. The last revision on the branch.\n",
"\t-d dates\tSpecify dates (D1<D2 for range, D for latest before).\n",
"\t-s states\tOnly list revisions with specified states.\n",
"\t-w[logins]\tOnly list revisions checked in by specified logins.\n",
@@ -198,9 +217,10 @@ cvslog (argc, argv)
int c;
int err = 0;
int local = 0;
- struct log_data log_data;
struct option_revlist **prl;
+ is_rlog = (strcmp (command_name, "rlog") == 0);
+
if (argc == -1)
usage (log_usage);
@@ -252,11 +272,13 @@ cvslog (argc, argv)
break;
}
}
+ argc -= optind;
+ argv += optind;
wrap_setup ();
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
struct datelist *p;
struct option_revlist *rp;
@@ -264,7 +286,10 @@ cvslog (argc, argv)
/* We're the local client. Fire up the remote server. */
start_server ();
-
+
+ if (is_rlog && !supported_request ("rlog"))
+ error (1, 0, "server does not support rlog");
+
ign_setup ();
if (log_data.default_branch)
@@ -332,6 +357,8 @@ cvslog (argc, argv)
if (rp->first != NULL)
send_to_server (rp->first, 0);
send_to_server (":", 1);
+ if (!rp->inclusive)
+ send_to_server (":", 1);
if (rp->last != NULL)
send_to_server (rp->last, 0);
}
@@ -347,10 +374,19 @@ cvslog (argc, argv)
send_arg_list ("-w", log_data.authorlist);
dellist (&log_data.authorlist);
- send_files (argc - optind, argv + optind, local, 0, SEND_NO_CONTENTS);
- send_file_names (argc - optind, argv + optind, SEND_EXPAND_WILD);
-
- send_to_server ("log\012", 0);
+ if (is_rlog)
+ {
+ int i;
+ for (i = 0; i < argc; i++)
+ send_arg (argv[i]);
+ send_to_server ("rlog\012", 0);
+ }
+ else
+ {
+ send_files (argc, argv, local, 0, SEND_NO_CONTENTS);
+ send_file_names (argc, argv, SEND_EXPAND_WILD);
+ send_to_server ("log\012", 0);
+ }
err = get_responses_and_close ();
return err;
}
@@ -361,11 +397,24 @@ cvslog (argc, argv)
if (findnode (log_data.authorlist, "@@MYSELF") != NULL)
log_parse_list (&log_data.authorlist, getcaller ());
- err = start_recursion (log_fileproc, (FILESDONEPROC) NULL, log_dirproc,
- (DIRLEAVEPROC) NULL, (void *) &log_data,
- argc - optind, argv + optind, local,
- W_LOCAL | W_REPOS | W_ATTIC, 0, 1,
- (char *) NULL, 1);
+ if (is_rlog)
+ {
+ DBM *db;
+ int i;
+ db = open_module ();
+ for (i = 0; i < argc; i++)
+ {
+ err += do_module (db, argv[i], MISC, "Logging", rlog_proc,
+ (char *) NULL, 0, 0, 0, 0, (char *) NULL);
+ }
+ close_module (db);
+ }
+ else
+ {
+ err = rlog_proc (argc + 1, argv - 1, (char *) NULL,
+ (char *) NULL, (char *) NULL, 0, 0, (char *) NULL,
+ (char *) NULL);
+ }
while (log_data.revlist)
{
@@ -403,6 +452,99 @@ cvslog (argc, argv)
return (err);
}
+
+static int
+rlog_proc (argc, argv, xwhere, mwhere, mfile, shorten, local, mname, msg)
+ int argc;
+ char **argv;
+ char *xwhere;
+ char *mwhere;
+ char *mfile;
+ int shorten;
+ int local;
+ char *mname;
+ char *msg;
+{
+ /* Begin section which is identical to patch_proc--should this
+ be abstracted out somehow? */
+ char *myargv[2];
+ int err = 0;
+ int which;
+ char *repository;
+ char *where;
+
+ if (is_rlog)
+ {
+ repository = xmalloc (strlen (current_parsed_root->directory) + strlen (argv[0])
+ + (mfile == NULL ? 0 : strlen (mfile) + 1) + 2);
+ (void) sprintf (repository, "%s/%s", current_parsed_root->directory, argv[0]);
+ where = xmalloc (strlen (argv[0]) + (mfile == NULL ? 0 : strlen (mfile) + 1)
+ + 1);
+ (void) strcpy (where, argv[0]);
+
+ /* if mfile isn't null, we need to set up to do only part of the module */
+ if (mfile != NULL)
+ {
+ char *cp;
+ char *path;
+
+ /* if the portion of the module is a path, put the dir part on repos */
+ if ((cp = strrchr (mfile, '/')) != NULL)
+ {
+ *cp = '\0';
+ (void) strcat (repository, "/");
+ (void) strcat (repository, mfile);
+ (void) strcat (where, "/");
+ (void) strcat (where, mfile);
+ mfile = cp + 1;
+ }
+
+ /* take care of the rest */
+ path = xmalloc (strlen (repository) + strlen (mfile) + 5);
+ (void) sprintf (path, "%s/%s", repository, mfile);
+ if (isdir (path))
+ {
+ /* directory means repository gets the dir tacked on */
+ (void) strcpy (repository, path);
+ (void) strcat (where, "/");
+ (void) strcat (where, mfile);
+ }
+ else
+ {
+ myargv[0] = argv[0];
+ myargv[1] = mfile;
+ argc = 2;
+ argv = myargv;
+ }
+ free (path);
+ }
+
+ /* cd to the starting repository */
+ if ( CVS_CHDIR (repository) < 0)
+ {
+ error (0, errno, "cannot chdir to %s", repository);
+ free (repository);
+ return (1);
+ }
+ free (repository);
+ /* End section which is identical to patch_proc. */
+
+ which = W_REPOS | W_ATTIC;
+ }
+ else
+ {
+ where = NULL;
+ which = W_LOCAL | W_REPOS | W_ATTIC;
+ }
+
+ err = start_recursion (log_fileproc, (FILESDONEPROC) NULL, log_dirproc,
+ (DIRLEAVEPROC) NULL, (void *) &log_data,
+ argc - 1, argv + 1, local, which, 0, 1,
+ where, 1);
+ return err;
+}
+
+
/*
* Parse a revision list specification.
*/
@@ -442,10 +584,16 @@ log_parse_revlist (argstring)
r->branchhead = 0;
r->last = strchr (copy, ':');
if (r->last != NULL)
+ {
*r->last++ = '\0';
+ r->inclusive = (*r->last != ':');
+ if (!r->inclusive)
+ r->last++;
+ }
else
{
r->last = r->first;
+ r->inclusive = 1;
if (r->first[0] != '\0' && r->first[strlen (r->first) - 1] == '.')
{
r->branchhead = 1;
@@ -689,15 +837,15 @@ log_fileproc (callerdat, finfo)
cvs_output ("RCS file: ", 0);
cvs_output (rcsfile->path, 0);
- cvs_output ("\nWorking file: ", 0);
- if (finfo->update_dir[0] == '\0')
- cvs_output (finfo->file, 0);
- else
+ if (!is_rlog)
{
- cvs_output (finfo->update_dir, 0);
- cvs_output ("/", 0);
+ cvs_output ("\nWorking file: ", 0);
+ if (finfo->update_dir[0] != '\0')
+ {
+ cvs_output (finfo->update_dir, 0);
+ cvs_output ("/", 0);
+ }
cvs_output (finfo->file, 0);
-
}
cvs_output ("\nhead:", 0);
@@ -860,6 +1008,7 @@ log_expand_revlist (rcs, revlist, default_branch)
struct revlist *nr;
nr = (struct revlist *) xmalloc (sizeof *nr);
+ nr->inclusive = r->inclusive;
if (r->first == NULL && r->last == NULL)
{
@@ -1023,6 +1172,7 @@ log_expand_revlist (rcs, revlist, default_branch)
}
nr->last = xstrdup (nr->first);
nr->fields = numdots (nr->first) + 1;
+ nr->inclusive = 1;
nr->next = NULL;
*pr = nr;
@@ -1137,9 +1287,12 @@ log_version_requested (log_data, revlist, rcs, vnode)
vfields = numdots (v) + 1;
for (r = revlist; r != NULL; r = r->next)
{
- if (vfields == r->fields + (r->fields & 1)
- && version_compare (v, r->first, r->fields) >= 0
- && version_compare (v, r->last, r->fields) <= 0)
+ if (vfields == r->fields + (r->fields & 1) &&
+ (r->inclusive ?
+ version_compare (v, r->first, r->fields) >= 0
+ && version_compare (v, r->last, r->fields) <= 0 :
+ version_compare (v, r->first, r->fields) > 0
+ && version_compare (v, r->last, r->fields) < 0))
{
return 1;
}
diff --git a/contrib/cvs/src/login.c b/contrib/cvs/src/login.c
index 1a774e08b547..928973797fbf 100644
--- a/contrib/cvs/src/login.c
+++ b/contrib/cvs/src/login.c
@@ -85,26 +85,183 @@ construct_cvspass_filename ()
return passfile;
}
-static const char *const login_usage[] =
+
+
+/*
+ * static char *
+ * password_entry_parseline (
+ * const char *cvsroot_canonical,
+ * const unsigned char warn,
+ * const int linenumber,
+ * char *linebuf
+ * );
+ *
+ * Internal function used by password_entry_operation. Parse a single line
+ * from a ~/.cvsroot password file and return a pointer to the password if the
+ * line refers to the same cvsroot as cvsroot_canonical
+ *
+ * INPUTS
+ * cvsroot_canonical the root we are looking for
+ * warn Boolean: print warnings for invalid lines?
+ * linenumber the line number for error messages
+ * linebuf the current line
+ *
+ * RETURNS
+ * NULL if the line doesn't match
+ * char *password as a pointer into linebuf
+ *
+ * NOTES
+ * This function temporarily alters linebuf, so it isn't thread safe when
+ * called on the same linebuf
+ */
+static char *
+password_entry_parseline (cvsroot_canonical, warn, linenumber, linebuf)
+ const char *cvsroot_canonical;
+ const unsigned char warn;
+ const int linenumber;
+ char *linebuf;
{
- "Usage: %s %s\n",
- "(Specify the --help global option for a list of other help options)\n",
- NULL
-};
+ char *password = NULL;
+ char *p;
-/* Prompt for a password, and store it in the file "CVS/.cvspass".
+ /* look for '^/' */
+ if (*linebuf == '/')
+ {
+ /* Yes: slurp '^/\d+\D' and parse the rest of the line according to version number */
+ char *q;
+ unsigned long int entry_version;
+
+ if (isspace(*(linebuf + 1)))
+ /* special case since strtoul ignores leading white space */
+ entry_version = 0;
+ else
+ entry_version = strtoul (linebuf + 1, &q, 10);
+
+ if (q == linebuf + 1)
+ /* no valid digits found by strtoul */
+ entry_version = 0;
+ else
+ /* assume a delimiting seperator */
+ q++;
+
+ switch (entry_version)
+ {
+ case 1:
+ /* this means the same normalize_cvsroot we are using was
+ * used to create this entry. strcmp is good enough for
+ * us.
+ */
+ p = strchr (q, ' ');
+ if (p == NULL)
+ {
+ if (warn && !really_quiet)
+ error (0, 0, "warning: skipping invalid entry in password file at line %d",
+ linenumber);
+ }
+ else
+ {
+ *p = '\0';
+ if (strcmp (cvsroot_canonical, q) == 0)
+ password = p + 1;
+ *p = ' ';
+ }
+ break;
+ case ULONG_MAX:
+ if (warn && !really_quiet)
+ {
+ error (0, errno, "warning: unable to convert version number in password file at line %d",
+ linenumber);
+ error (0, 0, "skipping entry");
+ }
+ break;
+ case 0:
+ if (warn && !really_quiet)
+ error (0, 0, "warning: skipping entry with invalid version string in password file at line %d",
+ linenumber);
+ break;
+ default:
+ if (warn && !really_quiet)
+ error (0, 0, "warning: skipping entry with unknown version (%lu) in password file at line %d",
+ entry_version, linenumber);
+ break;
+ }
+ }
+ else
+ {
+ /* No: assume:
+ *
+ * ^cvsroot Aencoded_password$
+ *
+ * as header comment specifies and parse accordingly
+ */
+ cvsroot_t *tmp_root;
+ char *tmp_root_canonical;
+
+ p = strchr (linebuf, ' ');
+ if (p == NULL)
+ {
+ if (warn && !really_quiet)
+ error (0, 0, "warning: skipping invalid entry in password file at line %d", linenumber);
+ return NULL;;
+ }
+
+ *p = '\0';
+ if ((tmp_root = parse_cvsroot (linebuf)) == NULL)
+ {
+ if (warn && !really_quiet)
+ error (0, 0, "warning: skipping invalid entry in password file at line %d", linenumber);
+ *p = ' ';
+ return NULL;
+ }
+ *p = ' ';
+ tmp_root_canonical = normalize_cvsroot (tmp_root);
+ if (strcmp (cvsroot_canonical, tmp_root_canonical) == 0)
+ password = p + 1;
+
+ free (tmp_root_canonical);
+ free_cvsroot_t (tmp_root);
+ }
+
+ return password;
+}
+
+
+
+/*
+ * static char *
+ * password_entry_operation (
+ * password_entry_operation_t operation,
+ * cvsroot_t *root,
+ * char *newpassword
+ * );
+ *
+ * Search the password file and depending on the value of operation:
+ *
+ * Mode Action
+ * password_entry_lookup Return the password
+ * password_entry_delete Delete the entry from the file, if it exists
+ * password_entry_add Replace the line with the new one, else append it
*
* Because the user might be accessing multiple repositories, with
* different passwords for each one, the format of ~/.cvspass is:
*
- * user@host:/path Acleartext_password
- * user@host:/path Acleartext_password
+ * [user@]host:[port]/path Aencoded_password
+ * [user@]host:[port]/path Aencoded_password
* ...
*
- * Of course, the "user@" might be left off -- it's just based on the
- * value of CVSroot.
+ * New entries are always of the form:
+ *
+ * /1 user@host:port/path Aencoded_password
*
- * The "A" before "cleartext_password" is a literal capital A. It's a
+ * but the old format is supported for backwards compatibility.
+ * The entry version string wasn't strictly necessary, but it avoids the
+ * overhead of parsing some entries since we know it is already in canonical
+ * form and allows room for expansion later, say, if we want to allow spaces
+ * and/or other characters to be escaped in the string. Also, the new entries
+ * would have been ignored by old versions of CVS anyhow since those versions
+ * didn't know how to parse a port number.
+ *
+ * The "A" before "encoded_password" is a literal capital A. It's a
* version number indicating which form of scrambling we're doing on
* the password -- someday we might provide something more secure than
* the trivial encoding we do now, and when that day comes, it would
@@ -114,201 +271,318 @@ static const char *const login_usage[] =
* it from being read by others. Unlike .netrc, we will not be
* fascist about it, at most issuing a warning, and never refusing to
* work.
+ *
+ * INPUTS
+ * operation operation to perform
+ * root cvsroot_t to look up
+ * newpassword prescrambled new password, for password_entry_add_mode
+ *
+ * RETURNS
+ * -1 if password_entry_lookup_mode not specified
+ * NULL on failed lookup
+ * pointer to a copy of the password string otherwise, which the caller is
+ * responsible for disposing of
*/
-int
-login (argc, argv)
- int argc;
- char **argv;
+
+typedef enum password_entry_operation_e {
+ password_entry_lookup,
+ password_entry_delete,
+ password_entry_add
+} password_entry_operation_t;
+
+static char *
+password_entry_operation (operation, root, newpassword)
+ password_entry_operation_t operation;
+ cvsroot_t *root;
+ char *newpassword;
{
char *passfile;
FILE *fp;
- char *typed_password, *found_password;
- char *linebuf = (char *) NULL;
- size_t linebuf_len;
- int root_len, already_entered = 0;
+ char *cvsroot_canonical = NULL;
+ char *password = NULL;
int line_length;
+ long line;
+ char *linebuf = NULL;
+ size_t linebuf_len;
+ char *p;
+ int save_errno = 0;
- if (argc < 0)
- usage (login_usage);
+ if (root->method != pserver_method)
+ {
+ error (0, 0, "internal error: can only call password_entry_operation with pserver method");
+ error (1, 0, "CVSROOT: %s", root->original);
+ }
+
+ /* 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.
+ */
- if (CVSroot_method != pserver_method)
+ passfile = construct_cvspass_filename ();
+ fp = CVS_FOPEN (passfile, "r");
+ if (fp == NULL)
{
- error (0, 0, "can only use pserver method with `login' command");
- error (1, 0, "CVSROOT: %s", CVSroot_original);
+ error (0, errno, "failed to open %s for reading", passfile);
+ goto error_exit;
}
- if (! CVSroot_username)
+ 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)
+ {
+ line++;
+ password = password_entry_parseline(cvsroot_canonical, 1, line, linebuf);
+ if (password != NULL)
+ /* this is it! break out and deal with linebuf */
+ break;
+ }
+ if (line_length < 0 && !feof (fp))
{
- error (0, 0, "CVSROOT \"%s\" is not fully-qualified.",
- CVSroot_original);
- error (1, 0, "Please make sure to specify \"user@host\"!");
+ error (0, errno, "cannot read %s", passfile);
+ goto error_exit;
}
+ if (fclose (fp) < 0)
+ /* not fatal, unless it cascades */
+ error (0, errno, "cannot close %s", passfile);
+ fp = NULL;
- printf ("(Logging in to %s@%s)\n", CVSroot_username, CVSroot_hostname);
- fflush (stdout);
+ /* Utter, total, raving paranoia, I know. */
+ chmod (passfile, 0600);
- passfile = construct_cvspass_filename ();
- typed_password = GETPASS ("CVS password: ");
- typed_password = scramble (typed_password);
+ /* a copy to return or keep around so we can reuse linebuf */
+ if (password != NULL)
+ {
+ /* chomp the EOL */
+ p = strchr (password, '\n');
+ if (p != NULL)
+ *p = '\0';
+ password = xstrdup (password);
+ }
- /* Force get_cvs_password() to use this one (when the client
- * confirms the new password with the server), instead of
- * consulting the file. We make a new copy because cvs_password
- * will get zeroed by connect_to_server(). */
+ /* might as well return now */
+ if (operation == password_entry_lookup)
+ goto out;
- cvs_password = xstrdup (typed_password);
+ /* same here */
+ if (operation == password_entry_delete && password == NULL)
+ {
+ error (0, 0, "Entry not found.");
+ goto out;
+ }
- connect_to_pserver (NULL, NULL, 1, 0);
+ /* okay, file errors can simply be fatal from now on since we don't do
+ * anything else if we're in lookup mode
+ */
- /* IF we have a password for this "[user@]host:/path" already
- * THEN
- * IF it's the same as the password we read from the prompt
- * THEN
- * do nothing
- * ELSE
- * replace the old password with the new one
- * ELSE
- * append new entry to the end of the file.
+ /* copy the file with the entry deleted unless we're in add
+ * mode and the line we found contains the same password we're supposed to
+ * add
*/
+ if (!noexec && password != NULL && (operation == password_entry_delete
+ || (operation == password_entry_add && strcmp (password, newpassword))))
+ {
+ long found_at = line;
+ char *tmp_name;
+ FILE *tmp_fp;
- root_len = strlen (CVSroot_original);
+ /* open the original file again */
+ fp = CVS_FOPEN (passfile, "r");
+ if (fp == NULL)
+ error (1, errno, "failed to open %s for reading", passfile);
- /* Yes, the method below reads the user's password file twice. It's
- inefficient, but we're not talking about a gig of data here. */
+ /* create and open a temp file */
+ if ((tmp_fp = cvs_temp_file (&tmp_name)) == NULL)
+ error (1, errno, "unable to open temp file %s", tmp_name);
- fp = CVS_FOPEN (passfile, "r");
- /* FIXME: should be printing a message if fp == NULL and not
- existence_error (errno). */
- if (fp != NULL)
- {
- /* Check each line to see if we have this entry already. */
+ line = 0;
while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
- {
- if (strncmp (CVSroot_original, linebuf, root_len) == 0)
- {
- already_entered = 1;
- break;
- }
- }
+ {
+ line++;
+ if (line < found_at
+ || (line != found_at
+ && !password_entry_parseline(cvsroot_canonical, 0, line, linebuf)))
+ {
+ if (fprintf (tmp_fp, "%s", linebuf) == EOF)
+ {
+ /* try and clean up anyhow */
+ error (0, errno, "fatal error: cannot write %s", tmp_name);
+ if (fclose (tmp_fp) == EOF)
+ error (0, errno, "cannot close %s", tmp_name);
+ /* call CVS_UNLINK instead of unlink_file since the file
+ * got created in noexec mode
+ */
+ if (CVS_UNLINK (tmp_name) < 0)
+ error (0, errno, "cannot remove %s", tmp_name);
+ /* but quit so we don't remove all the entries from a
+ * user's password file accidentally
+ */
+ error (1, 0, "exiting");
+ }
+ }
+ }
+ if (line_length < 0 && !feof (fp))
+ {
+ error (0, errno, "cannot read %s", passfile);
+ goto error_exit;
+ }
if (fclose (fp) < 0)
+ /* not fatal, unless it cascades */
error (0, errno, "cannot close %s", passfile);
- }
- else if (!existence_error (errno))
- error (0, errno, "cannot open %s", passfile);
-
- if (already_entered)
- {
- /* This user/host has a password in the file already. */
-
- strtok (linebuf, " ");
- found_password = strtok (NULL, "\n");
- if (strcmp (found_password, typed_password))
- {
- /* typed_password and found_password don't match, so we'll
- * have to update passfile. We replace the old password
- * with the new one by writing a tmp file whose contents are
- * exactly the same as passfile except that this one entry
- * gets typed_password instead of found_password. Then we
- * rename the tmp file on top of passfile.
+ if (fclose (tmp_fp) < 0)
+ /* not fatal, unless it cascades */
+ /* FIXME - does copy_file return correct results if the file wasn't
+ * closed? should this be fatal?
*/
- char *tmp_name;
- FILE *tmp_fp;
-
- tmp_name = cvs_temp_name ();
- if ((tmp_fp = CVS_FOPEN (tmp_name, "w")) == NULL)
- {
- error (1, errno, "unable to open temp file %s", tmp_name);
- return 1;
- }
- chmod (tmp_name, 0600);
-
- fp = CVS_FOPEN (passfile, "r");
- if (fp == NULL)
- {
- error (1, errno, "unable to open %s", passfile);
- if (linebuf)
- free (linebuf);
- return 1;
- }
- /* I'm not paranoid, they really ARE out to get me: */
- chmod (passfile, 0600);
-
- while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
- {
- if (strncmp (CVSroot_original, linebuf, root_len))
- {
- if (fprintf (tmp_fp, "%s", linebuf) == EOF)
- error (0, errno, "cannot write %s", tmp_name);
- }
- else
- {
- if (fprintf (tmp_fp, "%s %s\n", CVSroot_original,
- typed_password) == EOF)
- error (0, errno, "cannot write %s", tmp_name);
- }
- }
- if (line_length < 0 && !feof (fp))
- error (0, errno, "cannot read %s", passfile);
- if (linebuf)
- free (linebuf);
- if (fclose (tmp_fp) < 0)
- error (0, errno, "cannot close %s", tmp_name);
- if (fclose (fp) < 0)
- error (0, errno, "cannot close %s", passfile);
-
- /* FIXME: rename_file would make more sense (e.g. almost
- always faster). */
- copy_file (tmp_name, passfile);
- if (unlink_file (tmp_name) < 0)
- error (0, errno, "cannot remove %s", tmp_name);
- chmod (passfile, 0600);
-
- free (tmp_name);
- }
+ error (0, errno, "cannot close %s", tmp_name);
+
+ /* FIXME: rename_file would make more sense (e.g. almost
+ * always faster).
+ *
+ * I don't think so, unless we change the way rename_file works to
+ * attempt a cp/rm sequence when rename fails since rename doesn't
+ * work across file systems and it isn't uncommon to have /tmp
+ * on its own partition.
+ *
+ * For that matter, it's probably not uncommon to have a home
+ * directory on an NFS mount.
+ */
+ copy_file (tmp_name, passfile);
+ if (CVS_UNLINK (tmp_name) < 0)
+ error (0, errno, "cannot remove %s", tmp_name);
+ free (tmp_name);
}
- else
+
+ /* in add mode, if we didn't find an entry or found an entry with a
+ * different password, append the new line
+ */
+ if (!noexec && operation == password_entry_add
+ && (password == NULL || strcmp (password, newpassword)))
{
- if (linebuf)
- free (linebuf);
if ((fp = CVS_FOPEN (passfile, "a")) == NULL)
- {
- error (1, errno, "could not open %s", passfile);
- free (passfile);
- return 1;
- }
-
- if (fprintf (fp, "%s %s\n", CVSroot_original, typed_password) == EOF)
- error (0, errno, "cannot write %s", passfile);
+ error (1, errno, "could not open %s for writing", passfile);
+
+ if (fprintf (fp, "/1 %s %s\n", cvsroot_canonical, newpassword) == EOF)
+ error (1, errno, "cannot write %s", passfile);
if (fclose (fp) < 0)
error (0, errno, "cannot close %s", passfile);
}
/* Utter, total, raving paranoia, I know. */
chmod (passfile, 0600);
+
+ if (password)
+ {
+ free (password);
+ password = NULL;
+ }
+ if (linebuf)
+ free (linebuf);
+
+out:
+ free (cvsroot_canonical);
+ free (passfile);
+ return password;
+
+error_exit:
+ /* just exit when we're not in lookup mode */
+ if (operation != password_entry_lookup)
+ error (1, 0, "fatal error: exiting");
+ /* clean up and exit in lookup mode so we can try a login with a NULL
+ * password anyhow in case that's what we would have found
+ */
+ save_errno = errno;
+ if (fp != NULL)
+ {
+ /* Utter, total, raving paranoia, I know. */
+ chmod (passfile, 0600);
+ if(fclose (fp) < 0)
+ error (0, errno, "cannot close %s", passfile);
+ }
+ if (linebuf)
+ free (linebuf);
+ if (cvsroot_canonical)
+ free (cvsroot_canonical);
+ free (passfile);
+ errno = save_errno;
+ return NULL;
+}
+
+
+
+/* Prompt for a password, and store it in the file "CVS/.cvspass".
+ */
+
+static const char *const login_usage[] =
+{
+ "Usage: %s %s\n",
+ "(Specify the --help global option for a list of other help options)\n",
+ NULL
+};
+
+int
+login (argc, argv)
+ int argc;
+ char **argv;
+{
+ char *typed_password;
+ char *cvsroot_canonical;
+
+ if (argc < 0)
+ usage (login_usage);
+
+ if (current_parsed_root->method != pserver_method)
+ {
+ error (0, 0, "can only use `login' command with the 'pserver' method");
+ error (1, 0, "CVSROOT: %s", current_parsed_root->original);
+ }
+
+ cvsroot_canonical = normalize_cvsroot(current_parsed_root);
+ printf ("Logging in to %s\n", cvsroot_canonical);
+ fflush (stdout);
+
+ if (current_parsed_root->password)
+ {
+ typed_password = scramble (current_parsed_root->password);
+ }
+ else
+ {
+ char *tmp;
+ tmp = GETPASS ("CVS password: ");
+ typed_password = scramble (tmp);
+ memset (tmp, 0, strlen (tmp));
+ }
+
+ /* Force get_cvs_password() to use this one (when the client
+ * confirms the new password with the server), instead of
+ * consulting the file. We make a new copy because cvs_password
+ * will get zeroed by connect_to_server(). */
+ cvs_password = xstrdup (typed_password);
+
+ connect_to_pserver (NULL, NULL, 1, 0);
+
+ password_entry_operation (password_entry_add, current_parsed_root, typed_password);
+
memset (typed_password, 0, strlen (typed_password));
free (typed_password);
- free (passfile);
free (cvs_password);
+ free (cvsroot_canonical);
cvs_password = NULL;
+
return 0;
}
/* Returns the _scrambled_ password. The server must descramble
before hashing and comparing. If password file not found, or
- password not found in the file, just return NULL. */
+ password not found in the file, just return NULL. */
char *
get_cvs_password ()
{
- int found_it = 0;
- int root_len;
- char *password = NULL;
- char *linebuf = NULL;
- size_t linebuf_len;
- FILE *fp;
- char *passfile;
- int line_length;
-
+ if (current_parsed_root->password)
+ return (scramble(current_parsed_root->password));
+
/* If someone (i.e., login()) is calling connect_to_pserver() out of
context, then assume they have supplied the correct, scrambled
password. */
@@ -318,76 +592,24 @@ get_cvs_password ()
if (getenv ("CVS_PASSWORD") != NULL)
{
/* In previous versions of CVS one could specify a password in
- CVS_PASSWORD. This is a bad idea, because in BSD variants
- of unix anyone can see the environment variable with 'ps'.
- But for users who were using that feature we want to at
- least let them know what is going on. After printing this
- warning, we should fall through to the regular error where
- we tell them to run "cvs login" (unless they already ran
- it, of course). */
- error (0, 0, "CVS_PASSWORD is no longer supported; ignored");
+ * CVS_PASSWORD. This is a bad idea, because in BSD variants
+ * of unix anyone can see the environment variable with 'ps'.
+ * But for users who were using that feature we want to at
+ * least let them know what is going on. After printing this
+ * warning, we should fall through to the regular error where
+ * we tell them to run "cvs login" (unless they already ran
+ * it, of course).
+ */
+ error (0, 0, "CVS_PASSWORD is no longer supported; ignored");
}
- /* Else get it from the file. First make sure that the CVSROOT
- variable has the appropriate fields filled in. */
-
- if (CVSroot_method != pserver_method)
+ if (current_parsed_root->method != pserver_method)
{
- error (0, 0, "can only call GET_CVS_PASSWORD with pserver method");
- error (1, 0, "CVSROOT: %s", CVSroot_original);
+ error (0, 0, "can only call get_cvs_password with pserver method");
+ error (1, 0, "CVSROOT: %s", current_parsed_root->original);
}
- if (! CVSroot_username)
- {
- error (0, 0, "CVSROOT \"%s\" is not fully-qualified.",
- CVSroot_original);
- error (1, 0, "Please make sure to specify \"user@host\"!");
- }
-
- passfile = construct_cvspass_filename ();
- fp = CVS_FOPEN (passfile, "r");
- if (fp == NULL)
- {
- free (passfile);
- return NULL;
- }
-
- root_len = strlen (CVSroot_original);
-
- /* Check each line to see if we have this entry already. */
- while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
- {
- if (strncmp (CVSroot_original, linebuf, root_len) == 0)
- {
- /* This is it! So break out and deal with linebuf. */
- found_it = 1;
- break;
- }
- }
- if (line_length < 0 && !feof (fp))
- error (0, errno, "cannot read %s", passfile);
- if (fclose (fp) < 0)
- error (0, errno, "cannot close %s", passfile);
-
- if (found_it)
- {
- /* linebuf now contains the line with the password. */
- char *tmp;
-
- strtok (linebuf, " ");
- tmp = strtok (NULL, "\n");
- if (tmp == NULL)
- error (1, 0, "bad entry in %s for %s", passfile, CVSroot_original);
-
- /* Give it permanent storage. */
- password = xstrdup (tmp);
- memset (tmp, 0, strlen (password));
- }
-
- if (linebuf)
- free (linebuf);
- free (passfile);
- return password;
+ return password_entry_operation (password_entry_lookup, current_parsed_root, NULL);
}
static const char *const logout_usage[] =
@@ -403,29 +625,15 @@ logout (argc, argv)
int argc;
char **argv;
{
- char *passfile;
- FILE *fp;
- char *tmp_name = NULL;
- FILE *tmp_fp;
- char *linebuf = (char *) NULL;
- size_t linebuf_len;
- int root_len, found = 0;
- int line_length;
+ char *cvsroot_canonical;
if (argc < 0)
usage (logout_usage);
- if (CVSroot_method != pserver_method)
+ if (current_parsed_root->method != pserver_method)
{
error (0, 0, "can only use pserver method with `logout' command");
- error (1, 0, "CVSROOT: %s", CVSroot_original);
- }
-
- if (! CVSroot_username)
- {
- error (0, 0, "CVSROOT \"%s\" is not fully-qualified.",
- CVSroot_original);
- error (1, 0, "Please make sure to specify \"user@host\"!");
+ error (1, 0, "CVSROOT: %s", current_parsed_root->original);
}
/* Hmm. Do we want a variant of this command which deletes _all_
@@ -436,73 +644,15 @@ logout (argc, argv)
of security, in that it wouldn't delete entries from any
.cvspass files but the current one. */
- printf ("(Logging out of %s@%s)\n", CVSroot_username, CVSroot_hostname);
- fflush (stdout);
-
- /* IF we have a password for this "[user@]host:/path" already
- * THEN
- * drop the entry
- * ELSE
- * do nothing
- */
-
- passfile = construct_cvspass_filename ();
- /* FIXME: This should not be in /tmp; that is almost surely a security
- hole. Probably should just keep it in memory. */
- tmp_name = cvs_temp_name ();
- if ((tmp_fp = CVS_FOPEN (tmp_name, "w")) == NULL)
+ if (!quiet)
{
- error (1, errno, "unable to open temp file %s", tmp_name);
- return 1;
- }
- chmod (tmp_name, 0600);
-
- root_len = strlen (CVSroot_original);
-
- fp = CVS_FOPEN (passfile, "r");
- if (fp == NULL)
- error (1, errno, "Error opening %s", passfile);
-
- /* Check each line to see if we have this entry. */
- /* Copy only those lines that do not match this entry */
- while ((line_length = getline (&linebuf, &linebuf_len, fp)) >= 0)
- {
- if (strncmp (CVSroot_original, linebuf, root_len))
- {
- if (fprintf (tmp_fp, "%s", linebuf) == EOF)
- error (0, errno, "cannot write %s", tmp_name);
- }
- else
- found = 1;
- }
- if (line_length < 0 && !feof (fp))
- error (0, errno, "cannot read %s", passfile);
-
- if (linebuf)
- free (linebuf);
- if (fclose (fp) < 0)
- error (0, errno, "cannot close %s", passfile);
- if (fclose (tmp_fp) < 0)
- error (0, errno, "cannot close %s", tmp_name);
-
- if (! found)
- {
- printf ("Entry not found for %s\n", CVSroot_original);
- if (unlink_file (tmp_name) < 0)
- error (0, errno, "cannot remove %s", tmp_name);
- }
- else
- {
- /* FIXME: rename_file would make more sense (e.g. almost
- always faster). */
- copy_file (tmp_name, passfile);
- if (unlink_file (tmp_name) < 0)
- error (0, errno, "cannot remove %s", tmp_name);
- chmod (passfile, 0600);
+ cvsroot_canonical = normalize_cvsroot(current_parsed_root);
+ printf ("Logging out of %s\n", cvsroot_canonical);
+ fflush (stdout);
+ free (cvsroot_canonical);
}
- if (tmp_name)
- free (tmp_name);
+ password_entry_operation (password_entry_delete, current_parsed_root, NULL);
return 0;
}
diff --git a/contrib/cvs/src/logmsg.c b/contrib/cvs/src/logmsg.c
index cb08cdffda55..d2ef806d216e 100644
--- a/contrib/cvs/src/logmsg.c
+++ b/contrib/cvs/src/logmsg.c
@@ -190,8 +190,10 @@ do_editor (dir, messagep, repository, changes)
if (strcmp (Editor, "") == 0 && !editinfo_editor)
error(1, 0, "no editor defined, must use -e or -m");
-
/* Create a temporary file */
+ /* FIXME - It's possible we should be relying on cvs_temp_file to open
+ * the file here - we get race conditions otherwise.
+ */
fname = cvs_temp_name ();
again:
if ((fp = CVS_FOPEN (fname, "w+")) == NULL)
@@ -205,8 +207,6 @@ do_editor (dir, messagep, repository, changes)
(*messagep)[strlen (*messagep) - 1] != '\n')
(void) fprintf (fp, "\n");
}
- else
- (void) fprintf (fp, "\n");
if (repository != NULL)
/* tack templates on if necessary */
@@ -272,7 +272,7 @@ do_editor (dir, messagep, repository, changes)
free (editinfo_editor);
editinfo_editor = (char *) NULL;
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
; /* nothing, leave editinfo_editor NULL */
else
#endif
@@ -396,7 +396,7 @@ do_verify (message, repository)
int retcode = 0;
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
/* The verification will happen on the server. */
return;
#endif
@@ -414,13 +414,10 @@ do_verify (message, repository)
return;
}
- /* Get a temp filename, open a temporary file, write the message to the
+ /* open a temporary file, write the message to the
temp file, and close the file. */
- fname = cvs_temp_name ();
-
- fp = fopen (fname, "w");
- if (fp == NULL)
+ if ((fp = cvs_temp_file (&fname)) == NULL)
error (1, errno, "cannot create temporary file %s", fname);
else
{
@@ -792,16 +789,16 @@ logfile_write (repository, filter, message, logfp, changes)
srepos = Short_Repository (repository);
- prog = xmalloc ((fmt_percent - filter) + strlen (srepos)
- + strlen (str_list) + strlen (fmt_continue)
+ prog = cp = xmalloc ((fmt_percent - filter) + 2 * strlen (srepos)
+ + 2 * strlen (str_list) + strlen (fmt_continue)
+ 10);
- (void) strncpy (prog, filter, fmt_percent - filter);
- prog[fmt_percent - filter] = '\0';
- (void) strcat (prog, "'");
- (void) strcat (prog, srepos);
- (void) strcat (prog, str_list);
- (void) strcat (prog, "'");
- (void) strcat (prog, fmt_continue);
+ (void) memcpy (cp, filter, fmt_percent - filter);
+ cp += fmt_percent - filter;
+ *cp++ = '"';
+ cp = shell_escape (cp, srepos);
+ cp = shell_escape (cp, str_list);
+ *cp++ = '"';
+ (void) strcpy (cp, fmt_continue);
/* To be nice, free up some memory. */
diff --git a/contrib/cvs/src/main.c b/contrib/cvs/src/main.c
index 86913e138f78..3a21916969c3 100644
--- a/contrib/cvs/src/main.c
+++ b/contrib/cvs/src/main.c
@@ -64,8 +64,12 @@ char *Editor = EDITOR_DFLT;
List *root_directories = NULL;
/* We step through the above values. This variable is set to reflect
- the currently active value. */
-char *current_root = NULL;
+ * the currently active value.
+ *
+ * Now static. FIXME - this variable should be removable (well, localizable)
+ * with a little more work.
+ */
+static char *current_root = NULL;
static const struct cmd
@@ -96,47 +100,50 @@ static const struct cmd
char *nick2;
int (*func) (); /* Function takes (argc, argv) arguments. */
+ unsigned long attr; /* Attributes. */
} cmds[] =
{
- { "add", "ad", "new", add },
- { "admin", "adm", "rcs", admin },
- { "annotate", "ann", NULL, annotate },
- { "checkout", "co", "get", checkout },
- { "commit", "ci", "com", commit },
- { "diff", "di", "dif", diff },
- { "edit", NULL, NULL, edit },
- { "editors", NULL, NULL, editors },
- { "export", "exp", "ex", checkout },
- { "history", "hi", "his", history },
- { "import", "im", "imp", import },
- { "init", NULL, NULL, init },
+ { "add", "ad", "new", add, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+ { "admin", "adm", "rcs", admin, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+ { "annotate", "ann", NULL, annotate, CVS_CMD_USES_WORK_DIR },
+ { "checkout", "co", "get", checkout, 0 },
+ { "commit", "ci", "com", commit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+ { "diff", "di", "dif", diff, CVS_CMD_USES_WORK_DIR },
+ { "edit", NULL, NULL, edit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+ { "editors", NULL, NULL, editors, CVS_CMD_USES_WORK_DIR },
+ { "export", "exp", "ex", checkout, CVS_CMD_USES_WORK_DIR },
+ { "history", "hi", "his", history, CVS_CMD_USES_WORK_DIR },
+ { "import", "im", "imp", import, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR | CVS_CMD_IGNORE_ADMROOT},
+ { "init", NULL, NULL, init, CVS_CMD_MODIFIES_REPOSITORY },
#if defined (HAVE_KERBEROS) && defined (SERVER_SUPPORT)
- { "kserver", NULL, NULL, server }, /* placeholder */
+ { "kserver", NULL, NULL, server, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, /* placeholder */
#endif
- { "log", "lo", "rlog", cvslog },
+ { "log", "lo", NULL, cvslog, CVS_CMD_USES_WORK_DIR },
#ifdef AUTH_CLIENT_SUPPORT
- { "login", "logon", "lgn", login },
- { "logout", NULL, NULL, logout },
+ { "login", "logon", "lgn", login, 0 },
+ { "logout", NULL, NULL, logout, 0 },
#endif /* AUTH_CLIENT_SUPPORT */
#if (defined(AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)) && defined(SERVER_SUPPORT)
- { "pserver", NULL, NULL, server }, /* placeholder */
+ { "pserver", NULL, NULL, server, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR }, /* placeholder */
#endif
- { "rdiff", "patch", "pa", patch },
- { "release", "re", "rel", release },
- { "remove", "rm", "delete", cvsremove },
- { "rtag", "rt", "rfreeze", rtag },
+ { "rannotate","rann", "ra", annotate, 0 },
+ { "rdiff", "patch", "pa", patch, 0 },
+ { "release", "re", "rel", release, 0 },
+ { "remove", "rm", "delete", cvsremove, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+ { "rlog", "rl", NULL, cvslog, 0 },
+ { "rtag", "rt", "rfreeze", cvstag, CVS_CMD_MODIFIES_REPOSITORY },
#ifdef SERVER_SUPPORT
- { "server", NULL, NULL, server },
+ { "server", NULL, NULL, server, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
#endif
- { "status", "st", "stat", cvsstatus },
- { "tag", "ta", "freeze", cvstag },
- { "unedit", NULL, NULL, unedit },
- { "update", "up", "upd", update },
- { "version", "ve", "ver", version },
- { "watch", NULL, NULL, watch },
- { "watchers", NULL, NULL, watchers },
- { NULL, NULL, NULL, NULL },
+ { "status", "st", "stat", cvsstatus, CVS_CMD_USES_WORK_DIR },
+ { "tag", "ta", "freeze", cvstag, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+ { "unedit", NULL, NULL, unedit, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+ { "update", "up", "upd", update, CVS_CMD_USES_WORK_DIR },
+ { "version", "ve", "ver", version, 0 },
+ { "watch", NULL, NULL, watch, CVS_CMD_MODIFIES_REPOSITORY | CVS_CMD_USES_WORK_DIR },
+ { "watchers", NULL, NULL, watchers, CVS_CMD_USES_WORK_DIR },
+ { NULL, NULL, NULL, NULL, 0 },
};
static const char *const usg[] =
@@ -211,9 +218,11 @@ static const char *const cmd_usage[] =
#if (defined(AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)) && defined(SERVER_SUPPORT)
" pserver Password server mode\n",
#endif
+ " rannotate Show last revision where each line of module was modified\n",
" rdiff Create 'patch' format diffs between releases\n",
" release Indicate that a Module is no longer in use\n",
" remove Remove an entry from the repository\n",
+ " rlog Print out history information for a module\n",
" rtag Add a symbolic tag to a module\n",
#ifdef SERVER_SUPPORT
" server Server mode\n",
@@ -222,6 +231,7 @@ static const char *const cmd_usage[] =
" tag Add a symbolic tag to checked out version of files\n",
" unedit Undo an edit command\n",
" update Bring work tree in sync with repository\n",
+ " version Show current CVS version(s)\n",
" watch Set watches\n",
" watchers See who is watching a file\n",
"(Specify the --help option for a list of other help options)\n",
@@ -315,51 +325,14 @@ unsigned long int
lookup_command_attribute (cmd_name)
char *cmd_name;
{
- unsigned long int ret = 0;
-
- if (strcmp (cmd_name, "import") != 0)
- {
- ret |= CVS_CMD_IGNORE_ADMROOT;
- }
-
-
- /* The following commands do not use a checked-out working
- directory. We conservatively assume that everything else does.
- Feel free to add to this list if you are _certain_ something
- something doesn't use the WD. */
- if ((strcmp (cmd_name, "checkout") != 0) &&
- (strcmp (cmd_name, "init") != 0) &&
- (strcmp (cmd_name, "login") != 0) &&
- (strcmp (cmd_name, "logout") != 0) &&
- (strcmp (cmd_name, "rdiff") != 0) &&
- (strcmp (cmd_name, "release") != 0) &&
- (strcmp (cmd_name, "rtag") != 0))
- {
- ret |= CVS_CMD_USES_WORK_DIR;
- }
-
+ const struct cmd *cm;
- /* The following commands do not modify the repository; we
- conservatively assume that everything else does. Feel free to
- add to this list if you are _certain_ something is safe. */
- if ((strcmp (cmd_name, "annotate") != 0) &&
- (strcmp (cmd_name, "checkout") != 0) &&
- (strcmp (cmd_name, "diff") != 0) &&
- (strcmp (cmd_name, "rdiff") != 0) &&
- (strcmp (cmd_name, "update") != 0) &&
- (strcmp (cmd_name, "editors") != 0) &&
- (strcmp (cmd_name, "export") != 0) &&
- (strcmp (cmd_name, "history") != 0) &&
- (strcmp (cmd_name, "log") != 0) &&
- (strcmp (cmd_name, "noop") != 0) &&
- (strcmp (cmd_name, "watchers") != 0) &&
- (strcmp (cmd_name, "release") != 0) &&
- (strcmp (cmd_name, "status") != 0))
+ for (cm = cmds; cm->fullname; cm++)
{
- ret |= CVS_CMD_MODIFIES_REPOSITORY;
+ if (strcmp (cmd_name, cm->fullname) == 0)
+ break;
}
-
- return ret;
+ return cm->attr;
}
@@ -570,7 +543,7 @@ main (argc, argv)
version (0, (char **) NULL);
(void) fputs ("\n", stdout);
(void) fputs ("\
-Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
+Copyright (c) 1989-2001 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);
@@ -601,6 +574,8 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
if (CVSroot_cmdline != NULL)
free (CVSroot_cmdline);
CVSroot_cmdline = xstrdup (optarg);
+ if (free_CVSroot)
+ free (CVSroot);
CVSroot = xstrdup (optarg);
free_CVSroot = 1;
cvs_update_env = 1; /* need to update environment */
@@ -676,15 +651,6 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
else
command_name = cm->fullname; /* Global pointer for later use */
- /* This should probably remain a warning, rather than an error,
- for quite a while. For one thing the version of VC distributed
- with GNU emacs 19.34 invokes 'cvs rlog' instead of 'cvs log'. */
- if (strcmp (argv[0], "rlog") == 0)
- {
- error (0, 0, "warning: the rlog command is deprecated");
- error (0, 0, "use the synonymous log command instead");
- }
-
if (help)
{
argc = -1; /* some functions only check for this */
@@ -833,8 +799,7 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
specify a different repository than the one we are
importing to. */
- if ((lookup_command_attribute (command_name)
- & CVS_CMD_IGNORE_ADMROOT)
+ if (!(cm->attr & CVS_CMD_IGNORE_ADMROOT)
/* -d overrides CVS/Root, so don't give an error if the
latter points to a nonexistent repository. */
@@ -926,25 +891,29 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
variable. Parse it to see if we're supposed to do
remote accesses or use a special access method. */
- if (parse_cvsroot (current_root))
+ if (current_parsed_root != NULL)
+ free_cvsroot_t (current_parsed_root);
+ if ((current_parsed_root = parse_cvsroot (current_root)) == NULL)
error (1, 0, "Bad CVSROOT.");
if (trace)
- error (0, 0, "notice: main loop with CVSROOT=%s",
- current_root);
+ fprintf (stderr, "%s-> main loop with CVSROOT=%s\n",
+ CLIENT_SERVER_STR, current_root);
/*
* Check to see if the repository exists.
*/
- if (!client_active)
+#ifdef CLIENT_SUPPORT
+ if (!current_parsed_root->isremote)
+#endif /* CLIENT_SUPPORT */
{
char *path;
int save_errno;
- path = xmalloc (strlen (CVSroot_directory)
+ path = xmalloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
- + 20);
- (void) sprintf (path, "%s/%s", CVSroot_directory, CVSROOTADM);
+ + 2);
+ (void) sprintf (path, "%s/%s", current_parsed_root->directory, CVSROOTADM);
if (!isaccessible (path, R_OK | X_OK))
{
save_errno = errno;
@@ -989,7 +958,7 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
&& !server_active
#endif
#ifdef CLIENT_SUPPORT
- && !client_active
+ && !current_parsed_root->isremote
#endif
)
{
@@ -997,11 +966,15 @@ Copyright (c) 1989-2000 Brian Berliner, david d `zoo' zuhn, \n\
already printed an error. We keep going. Why? Because
if we didn't, then there would be no way to check in a new
CVSROOT/config file to fix the broken one! */
- parse_config (CVSroot_directory);
+ parse_config (current_parsed_root->directory);
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ /* Need to check for current_parsed_root != NULL here since
+ * we could still be in server mode before the server function
+ * gets called below and sets the root
+ */
+ if (current_parsed_root != NULL && current_parsed_root->isremote)
{
/* Create a new list for directory names that we've
sent to the server. */
@@ -1119,31 +1092,55 @@ date_from_time_t (unixtime)
void
date_to_internet (dest, source)
char *dest;
- char *source;
+ const char *source;
{
- int year, month, day, hour, minute, second;
+ struct tm date;
- /* Just to reiterate, these strings are from RFC822 and do not vary
- according to locale. */
- static const char *const month_names[] =
- {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+ date_to_tm (&date, source);
+ tm_to_internet (dest, &date);
+}
+void
+date_to_tm (dest, source)
+ struct tm *dest;
+ const char *source;
+{
if (sscanf (source, SDATEFORM,
- &year, &month, &day, &hour, &minute, &second)
- != 6)
+ &dest->tm_year, &dest->tm_mon, &dest->tm_mday,
+ &dest->tm_hour, &dest->tm_min, &dest->tm_sec)
+ != 6)
/* Is there a better way to handle errors here? I made this
non-fatal in case we are called from the code which can't
deal with fatal errors. */
error (0, 0, "internal error: bad date %s", source);
- /* Always send a four digit year. */
- if (year < 100)
- year += 1900;
+ if (dest->tm_year > 100)
+ dest->tm_year -= 1900;
+
+ dest->tm_mon -= 1;
+}
+
+/* Convert a date to RFC822/1123 format. This is used in contexts like
+ dates to send in the protocol; it should not vary based on locale or
+ other such conventions for users. We should have another routine which
+ does that kind of thing.
- sprintf (dest, "%d %s %d %02d:%02d:%02d -0000", day,
- month < 1 || month > 12 ? "???" : month_names[month - 1],
- year, hour, minute, second);
+ The SOURCE date is a pointer to a struct tm. DEST should point to
+ storage managed by the caller, at least MAXDATELEN characters. */
+void
+tm_to_internet (dest, source)
+ char *dest;
+ const struct tm *source;
+{
+ /* Just to reiterate, these strings are from RFC822 and do not vary
+ according to locale. */
+ static const char *const month_names[] =
+ {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
+
+ sprintf (dest, "%d %s %d %02d:%02d:%02d -0000", source->tm_mday,
+ source->tm_mon < 0 || source->tm_mon > 11 ? "???" : month_names[source->tm_mon],
+ source->tm_year + 1900, source->tm_hour, source->tm_min, source->tm_sec);
}
void
diff --git a/contrib/cvs/src/mkmodules.c b/contrib/cvs/src/mkmodules.c
index 4e4b5d09e30b..d1f7ac7517af 100644
--- a/contrib/cvs/src/mkmodules.c
+++ b/contrib/cvs/src/mkmodules.c
@@ -848,7 +848,7 @@ init (argc, argv)
usage (init_usage);
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
start_server ();
@@ -862,12 +862,10 @@ init (argc, argv)
old cvsinit.sh script did. Few utilities do that, and a
non-existent parent directory is as likely to be a typo as something
which needs to be created. */
- mkdir_if_needed (CVSroot_directory);
+ mkdir_if_needed (current_parsed_root->directory);
- adm = xmalloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM) + 10);
- strcpy (adm, CVSroot_directory);
- strcat (adm, "/");
- strcat (adm, CVSROOTADM);
+ adm = xmalloc (strlen (current_parsed_root->directory) + sizeof (CVSROOTADM) + 2);
+ sprintf (adm, "%s/%s", current_parsed_root->directory, CVSROOTADM);
mkdir_if_needed (adm);
/* This is needed because we pass "fileptr->filename" not "info"
diff --git a/contrib/cvs/src/modules.c b/contrib/cvs/src/modules.c
index 0381ec944595..d349530a5f62 100644
--- a/contrib/cvs/src/modules.c
+++ b/contrib/cvs/src/modules.c
@@ -65,14 +65,15 @@ open_module ()
char *mfile;
DBM *retval;
- if (CVSroot_original == NULL)
+ if (current_parsed_root == NULL)
{
error (0, 0, "must set the CVSROOT environment variable");
error (1, 0, "or specify the '-d' global option");
}
- mfile = xmalloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM)
- + sizeof (CVSROOTADM_MODULES) + 20);
- (void) sprintf (mfile, "%s/%s/%s", CVSroot_directory,
+ mfile = xmalloc (strlen (current_parsed_root->directory)
+ + sizeof (CVSROOTADM)
+ + sizeof (CVSROOTADM_MODULES) + 3);
+ (void) sprintf (mfile, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSROOTADM_MODULES);
retval = dbm_open (mfile, O_RDONLY, 0666);
free (mfile);
@@ -96,8 +97,8 @@ close_module (db)
* It runs the post checkout or post tag proc from the modules file
*/
int
-do_module (db, mname, m_type, msg, callback_proc, where,
- shorten, local_specified, run_module_prog, extra_arg)
+do_module (db, mname, m_type, msg, callback_proc, where, shorten,
+ local_specified, run_module_prog, build_dirs, extra_arg)
DBM *db;
char *mname;
enum mtype m_type;
@@ -107,6 +108,7 @@ do_module (db, mname, m_type, msg, callback_proc, where,
int shorten;
int local_specified;
int run_module_prog;
+ int build_dirs;
char *extra_arg;
{
char *checkin_prog = NULL;
@@ -211,19 +213,21 @@ do_module (db, mname, m_type, msg, callback_proc, where,
int is_found = 0;
/* check to see if mname is a directory or file */
- file = xmalloc (strlen (CVSroot_directory) + strlen (mname) + 10);
- (void) sprintf (file, "%s/%s", CVSroot_directory, mname);
- attic_file = xmalloc (strlen (CVSroot_directory) + strlen (mname)
- + sizeof (CVSATTIC) + sizeof (RCSEXT) + 15);
+ file = xmalloc (strlen (current_parsed_root->directory)
+ + strlen (mname) + sizeof(RCSEXT) + 2);
+ (void) sprintf (file, "%s/%s", current_parsed_root->directory, mname);
+ attic_file = xmalloc (strlen (current_parsed_root->directory)
+ + strlen (mname)
+ + sizeof (CVSATTIC) + sizeof (RCSEXT) + 3);
if ((acp = strrchr (mname, '/')) != NULL)
{
*acp = '\0';
- (void) sprintf (attic_file, "%s/%s/%s/%s%s", CVSroot_directory,
+ (void) sprintf (attic_file, "%s/%s/%s/%s%s", current_parsed_root->directory,
mname, CVSATTIC, acp + 1, RCSEXT);
*acp = '/';
}
else
- (void) sprintf (attic_file, "%s/%s/%s%s", CVSroot_directory,
+ (void) sprintf (attic_file, "%s/%s/%s%s", current_parsed_root->directory,
CVSATTIC, mname, RCSEXT);
if (isdir (file))
@@ -400,7 +404,7 @@ do_module (db, mname, m_type, msg, callback_proc, where,
*/
/* Put the value on a line with XXX prepended for getopt to eat */
- line = xmalloc (strlen (value) + 10);
+ line = xmalloc (strlen (value) + 5);
strcpy(line, "XXX ");
strcpy(line + 4, value);
@@ -502,7 +506,7 @@ do_module (db, mname, m_type, msg, callback_proc, where,
else
err += do_module (db, modargv[i], m_type, msg, callback_proc,
where, shorten, local_specified,
- run_module_prog, extra_arg);
+ run_module_prog, build_dirs, extra_arg);
}
goto do_module_return;
}
@@ -530,9 +534,7 @@ module `%s' is a request for a file in a module which is not a directory",
*/
char *dir;
- /* XXX - XXX - MAJOR HACK - DO NOT SHIP - this needs to
- be !pipeout, but we don't know that here yet */
- if (!run_module_prog)
+ if (!build_dirs)
goto do_special;
dir = where ? where : (mwhere ? mwhere : mname);
@@ -643,7 +645,7 @@ module `%s' is a request for a file in a module which is not a directory",
else
err += do_module (db, spec_opt, m_type, msg, callback_proc,
(char *) NULL, 0, local_specified,
- run_module_prog, extra_arg);
+ run_module_prog, build_dirs, extra_arg);
spec_opt = next_opt;
}
diff --git a/contrib/cvs/src/parseinfo.c b/contrib/cvs/src/parseinfo.c
index 0bf6d3c1d089..7efd63835b8c 100644
--- a/contrib/cvs/src/parseinfo.c
+++ b/contrib/cvs/src/parseinfo.c
@@ -37,7 +37,7 @@ Parse_Info (infofile, repository, callproc, all)
char *cp, *exp, *value, *srepos, bad;
const char *regex_err;
- if (CVSroot_original == NULL)
+ if (current_parsed_root == NULL)
{
/* XXX - should be error maybe? */
error (0, 0, "CVSROOT variable not set");
@@ -45,11 +45,11 @@ Parse_Info (infofile, repository, callproc, all)
}
/* find the info file and open it */
- infopath = xmalloc (strlen (CVSroot_directory)
+ infopath = xmalloc (strlen (current_parsed_root->directory)
+ strlen (infofile)
+ sizeof (CVSROOTADM)
- + 10);
- (void) sprintf (infopath, "%s/%s/%s", CVSroot_directory,
+ + 3);
+ (void) sprintf (infopath, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, infofile);
fp_info = CVS_FOPEN (infopath, "r");
if (fp_info == NULL)
@@ -204,7 +204,7 @@ Parse_Info (infofile, repository, callproc, all)
KEYWORD=VALUE. There is currently no way to have a multi-line
VALUE (would be nice if there was, probably).
- CVSROOT is the $CVSROOT directory (CVSroot_directory might not be
+ CVSROOT is the $CVSROOT directory (current_parsed_root->directory might not be
set yet).
Returns 0 for success, negative value for failure. Call
diff --git a/contrib/cvs/src/patch.c b/contrib/cvs/src/patch.c
index 9aa26f3342e6..5a208776abc4 100644
--- a/contrib/cvs/src/patch.c
+++ b/contrib/cvs/src/patch.c
@@ -12,6 +12,7 @@
* release as either a date or a revision number.
*/
+#include <assert.h>
#include "cvs.h"
#include "getline.h"
@@ -189,7 +190,7 @@ patch (argc, argv)
options = xstrdup ("");
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
/* We're the client side. Fire up the remote server. */
start_server ();
@@ -252,7 +253,7 @@ patch (argc, argv)
db = open_module ();
for (i = 0; i < argc; i++)
err += do_module (db, argv[i], PATCH, "Patching", patch_proc,
- (char *) NULL, 0, 0, 0, (char *) NULL);
+ (char *) NULL, 0, 0, 0, 0, (char *) NULL);
close_module (db);
free (options);
patch_cleanup ();
@@ -282,11 +283,11 @@ patch_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified,
char *repository;
char *where;
- repository = xmalloc (strlen (CVSroot_directory) + strlen (argv[0])
- + (mfile == NULL ? 0 : strlen (mfile)) + 30);
- (void) sprintf (repository, "%s/%s", CVSroot_directory, argv[0]);
- where = xmalloc (strlen (argv[0]) + (mfile == NULL ? 0 : strlen (mfile))
- + 10);
+ repository = xmalloc (strlen (current_parsed_root->directory) + strlen (argv[0])
+ + (mfile == NULL ? 0 : strlen (mfile) + 1) + 2);
+ (void) sprintf (repository, "%s/%s", current_parsed_root->directory, argv[0]);
+ where = xmalloc (strlen (argv[0]) + (mfile == NULL ? 0 : strlen (mfile) + 1)
+ + 1);
(void) strcpy (where, argv[0]);
/* if mfile isn't null, we need to set up to do only part of the module */
@@ -307,7 +308,7 @@ patch_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified,
}
/* take care of the rest */
- path = xmalloc (strlen (repository) + strlen (mfile) + 5);
+ path = xmalloc (strlen (repository) + strlen (mfile) + 2);
(void) sprintf (path, "%s/%s", repository, mfile);
if (isdir (path))
{
@@ -502,10 +503,15 @@ patch_fileproc (callerdat, finfo)
}
/* Create 3 empty files. I'm not really sure there is any advantage
- to doing so now rather than just waiting until later. */
- tmpfile1 = cvs_temp_name ();
- fp1 = CVS_FOPEN (tmpfile1, "w+");
- if (fp1 == NULL)
+ * to doing so now rather than just waiting until later.
+ *
+ * There is - cvs_temp_file opens the file so that it can guarantee that
+ * we have exclusive write access to the file. Unfortunately we spoil that
+ * by closing it and reopening it again. Of course any better solution
+ * requires that the RCS functions accept open file pointers rather than
+ * simple file names.
+ */
+ if ((fp1 = cvs_temp_file (&tmpfile1)) == NULL)
{
error (0, errno, "cannot create temporary file %s", tmpfile1);
ret = 1;
@@ -514,9 +520,7 @@ patch_fileproc (callerdat, finfo)
else
if (fclose (fp1) < 0)
error (0, errno, "warning: cannot close %s", tmpfile1);
- tmpfile2 = cvs_temp_name ();
- fp2 = CVS_FOPEN (tmpfile2, "w+");
- if (fp2 == NULL)
+ if ((fp2 = cvs_temp_file (&tmpfile2)) == NULL)
{
error (0, errno, "cannot create temporary file %s", tmpfile2);
ret = 1;
@@ -525,9 +529,7 @@ patch_fileproc (callerdat, finfo)
else
if (fclose (fp2) < 0)
error (0, errno, "warning: cannot close %s", tmpfile2);
- tmpfile3 = cvs_temp_name ();
- fp3 = CVS_FOPEN (tmpfile3, "w+");
- if (fp3 == NULL)
+ if ((fp3 = cvs_temp_file (&tmpfile3)) == NULL)
{
error (0, errno, "cannot create temporary file %s", tmpfile3);
ret = 1;
@@ -580,7 +582,7 @@ patch_fileproc (callerdat, finfo)
(void) utime (tmpfile2, &t);
}
- switch (diff_exec (tmpfile1, tmpfile2, unidiff ? "-u" : "-c", tmpfile3))
+ switch (diff_exec (tmpfile1, tmpfile2, NULL, NULL, unidiff ? "-u" : "-c", tmpfile3))
{
case -1: /* fork/wait failure */
error (1, errno, "fork for diff failed on %s", rcs);
@@ -643,13 +645,14 @@ failed to read diff file header %s for %s: end of file", tmpfile3, rcs);
goto out;
}
}
- if (CVSroot_directory != NULL)
+ assert (current_parsed_root != NULL);
+ assert (current_parsed_root->directory != NULL);
{
- strippath = xmalloc (strlen (CVSroot_directory) + 10);
- (void) sprintf (strippath, "%s/", CVSroot_directory);
+ strippath = xmalloc (strlen (current_parsed_root->directory) + 2);
+ (void) sprintf (strippath, "%s/", current_parsed_root->directory);
}
- else
- strippath = xstrdup (REPOS_STRIP);
+ /*else
+ strippath = xstrdup (REPOS_STRIP); */
if (strncmp (rcs, strippath, strlen (strippath)) == 0)
rcs += strlen (strippath);
free (strippath);
diff --git a/contrib/cvs/src/rcs.c b/contrib/cvs/src/rcs.c
index b28572cb50d5..385eaf268dbf 100644
--- a/contrib/cvs/src/rcs.c
+++ b/contrib/cvs/src/rcs.c
@@ -92,11 +92,6 @@ static void expand_keywords PROTO((RCSNode *, RCSVers *, const char *,
size_t, char **, size_t *));
static void cmp_file_buffer PROTO((void *, const char *, size_t));
-enum rcs_delta_op {RCS_ANNOTATE, RCS_FETCH};
-static void RCS_deltas PROTO ((RCSNode *, FILE *, struct rcsbuffer *, char *,
- enum rcs_delta_op, char **, size_t *,
- char **, size_t *));
-
/* Routines for reading, parsing and writing RCS files. */
static RCSVers *getdelta PROTO ((struct rcsbuffer *, char *, char **,
char **));
@@ -2126,7 +2121,7 @@ RCS_getversion (rcs, tag, date, force_tag_match, simple_tag)
* -- If tag is a branch tag, returns the branch number, not
* the revision of the head of the branch.
* If tag or revision is not valid or does not exist in file,
- * exit with error.
+ * return NULL.
*/
char *
RCS_tag2rev (rcs, tag)
@@ -2205,9 +2200,8 @@ RCS_tag2rev (rcs, tag)
if (rev)
return rev;
- error (1, 0, "tag `%s' does not exist", tag);
- /* NOT REACHED -- error (1 ... ) does not return here */
- return 0;
+ /* Trust the caller to print warnings. */
+ return NULL;
}
/*
@@ -4147,7 +4141,7 @@ RCS_checkout (rcs, workfile, rev, nametag, options, sout, pfn, callerdat)
whether it should be considered an error for `dest' to exist
at this point. If so, the unlink call should be removed and
`symlink' should signal the error. -twp) */
- if (unlink (dest) < 0 && !existence_error (errno))
+ if (CVS_UNLINK (dest) < 0 && !existence_error (errno))
error (1, errno, "cannot remove %s", dest);
if (symlink (info->data, dest) < 0)
error (1, errno, "cannot create symbolic link from %s to %s",
@@ -4317,7 +4311,7 @@ RCS_checkout (rcs, workfile, rev, nametag, options, sout, pfn, callerdat)
/* Unlink `dest', just in case. It's okay if this provokes a
ENOENT error. */
- if (unlink (dest) < 0 && existence_error (errno))
+ if (CVS_UNLINK (dest) < 0 && existence_error (errno))
error (1, errno, "cannot remove %s", dest);
if (mknod (dest, special_file, devnum) < 0)
error (1, errno, "could not create special file %s",
@@ -5260,7 +5254,7 @@ workfile);
memset (commitpt->text, 0, sizeof (Deltatext));
bufsize = 0;
- switch (diff_exec (workfile, tmpfile, diffopts, changefile))
+ switch (diff_exec (workfile, tmpfile, NULL, NULL, diffopts, changefile))
{
case 0:
case 1:
@@ -5308,7 +5302,7 @@ workfile);
/* This file is not being inserted at the head, but on a side
branch somewhere. Make a diff from the previous revision
to the working file. */
- switch (diff_exec (tmpfile, workfile, diffopts, changefile))
+ switch (diff_exec (tmpfile, workfile, NULL, NULL, diffopts, changefile))
{
case 0:
case 1:
@@ -5688,7 +5682,7 @@ RCS_setbranch (rcs, rev)
int
RCS_lock (rcs, rev, lock_quiet)
RCSNode *rcs;
- const char *rev;
+ char *rev;
int lock_quiet;
{
List *locks;
@@ -5707,32 +5701,16 @@ RCS_lock (rcs, rev, lock_quiet)
/* A revision number of NULL means lock the head or default branch. */
if (rev == NULL)
xrev = RCS_head (rcs);
-
- /* If rev is a branch number, lock the latest revision on that
- branch. I think that if the branch doesn't exist, it's
- okay to return 0 -- that just means that the branch is new,
- so we don't need to lock it anyway. -twp */
- else if (RCS_nodeisbranch (rcs, rev))
- {
- xrev = RCS_getbranch (rcs, (char *) rev, 1);
- if (xrev == NULL)
- {
- if (!lock_quiet)
- error (0, 0, "%s: branch %s absent", rcs->path, rev);
- return 1;
- }
- }
-
- if (xrev == NULL)
- xrev = xstrdup (rev);
+ else
+ xrev = RCS_gettag (rcs, rev, 1, (int *) NULL);
/* Make sure that the desired revision exists. Technically,
we can update the locks list without even checking this,
but RCS 5.7 did this. And it can't hurt. */
- if (findnode (rcs->versions, xrev) == NULL)
+ if (xrev == NULL || findnode (rcs->versions, xrev) == NULL)
{
if (!lock_quiet)
- error (0, 0, "%s: revision %s absent", rcs->path, xrev);
+ error (0, 0, "%s: revision %s absent", rcs->path, rev);
free (xrev);
return 1;
}
@@ -5798,7 +5776,7 @@ RCS_lock (rcs, rev, lock_quiet)
int
RCS_unlock (rcs, rev, unlock_quiet)
RCSNode *rcs;
- const char *rev;
+ char *rev;
int unlock_quiet;
{
Node *lock;
@@ -5848,20 +5826,15 @@ RCS_unlock (rcs, rev, unlock_quiet)
return 0; /* no lock found, ergo nothing to do */
xrev = xstrdup (lock->key);
}
- else if (RCS_nodeisbranch (rcs, rev))
+ else
{
- /* If rev is a branch number, unlock the latest revision on that
- branch. */
- xrev = RCS_getbranch (rcs, (char *) rev, 1);
+ xrev = RCS_gettag (rcs, rev, 1, (int *) NULL);
if (xrev == NULL)
{
- error (0, 0, "%s: branch %s absent", rcs->path, rev);
+ error (0, 0, "%s: revision %s absent", rcs->path, rev);
return 1;
}
}
- else
- /* REV is an exact revision number. */
- xrev = xstrdup (rev);
lock = findnode (RCS_getlocks (rcs), xrev);
if (lock == NULL)
@@ -6383,7 +6356,7 @@ RCS_delete_revs (rcs, tag1, tag2, inclusive)
goto delrev_done;
outfile = cvs_temp_name();
- status = diff_exec (beforefile, afterfile, "-an", outfile);
+ status = diff_exec (beforefile, afterfile, NULL, NULL, "-an", outfile);
if (status == 2)
{
@@ -7022,7 +6995,7 @@ rcs_change_text (name, textbuf, textlen, diffbuf, difflen, retbuf, retlen)
On error, give a fatal error. */
-static void
+void
RCS_deltas (rcs, fp, rcsbuf, version, op, text, len, log, loglen)
RCSNode *rcs;
FILE *fp;
@@ -8381,138 +8354,6 @@ RCS_abandon (rcs)
rcs->flags |= PARTIAL;
}
-
-/* Annotate command. In rcs.c for historical reasons (from back when
- what is now RCS_deltas was part of annotate_fileproc). */
-
-/* Options from the command line. */
-
-static int force_tag_match = 1;
-static char *tag = NULL;
-static char *date = NULL;
-
-static int annotate_fileproc PROTO ((void *callerdat, struct file_info *));
-
-static int
-annotate_fileproc (callerdat, finfo)
- void *callerdat;
- struct file_info *finfo;
-{
- FILE *fp = NULL;
- struct rcsbuffer *rcsbufp = NULL;
- struct rcsbuffer rcsbuf;
- char *version;
-
- if (finfo->rcs == NULL)
- return (1);
-
- if (finfo->rcs->flags & PARTIAL)
- {
- RCS_reparsercsfile (finfo->rcs, &fp, &rcsbuf);
- rcsbufp = &rcsbuf;
- }
-
- version = RCS_getversion (finfo->rcs, tag, date, force_tag_match,
- (int *) NULL);
- if (version == NULL)
- return 0;
-
- /* Distinguish output for various files if we are processing
- several files. */
- cvs_outerr ("Annotations for ", 0);
- cvs_outerr (finfo->fullname, 0);
- cvs_outerr ("\n***************\n", 0);
-
- RCS_deltas (finfo->rcs, fp, rcsbufp, version, RCS_ANNOTATE, NULL,
- NULL, NULL, NULL);
- free (version);
- return 0;
-}
-
-static const char *const annotate_usage[] =
-{
- "Usage: %s %s [-lRf] [-r rev|-D date] [files...]\n",
- "\t-l\tLocal directory only, no recursion.\n",
- "\t-R\tProcess directories recursively.\n",
- "\t-f\tUse head revision if tag/date not found.\n",
- "\t-r rev\tAnnotate file as of specified revision/tag.\n",
- "\t-D date\tAnnotate file as of specified date.\n",
- "(Specify the --help global option for a list of other help options)\n",
- NULL
-};
-
-/* Command to show the revision, date, and author where each line of a
- file was modified. */
-
-int
-annotate (argc, argv)
- int argc;
- char **argv;
-{
- int local = 0;
- int c;
-
- if (argc == -1)
- usage (annotate_usage);
-
- optind = 0;
- while ((c = getopt (argc, argv, "+lr:D:fR")) != -1)
- {
- switch (c)
- {
- case 'l':
- local = 1;
- break;
- case 'R':
- local = 0;
- break;
- case 'r':
- tag = optarg;
- break;
- case 'D':
- date = Make_Date (optarg);
- break;
- case 'f':
- force_tag_match = 0;
- break;
- case '?':
- default:
- usage (annotate_usage);
- break;
- }
- }
- argc -= optind;
- argv += optind;
-
-#ifdef CLIENT_SUPPORT
- if (client_active)
- {
- start_server ();
- ign_setup ();
-
- if (local)
- send_arg ("-l");
- if (!force_tag_match)
- send_arg ("-f");
- option_with_arg ("-r", tag);
- if (date)
- client_senddate (date);
- send_files (argc, argv, local, 0, SEND_NO_CONTENTS);
- send_file_names (argc, argv, SEND_EXPAND_WILD);
- send_to_server ("annotate\012", 0);
- return get_responses_and_close ();
- }
-#endif /* CLIENT_SUPPORT */
-
- if (tag != NULL)
- tag_check_valid (tag, argc, argv, local, 0, "");
-
- return start_recursion (annotate_fileproc, (FILESDONEPROC) NULL,
- (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
- argc, argv, local, W_LOCAL, 0, 1, (char *)NULL,
- 1);
-}
-
/*
* For a given file with full pathname PATH and revision number REV,
* produce a file label suitable for passing to diff. The default
@@ -8522,6 +8363,11 @@ annotate (argc, argv)
*
* The date and time used are the revision's last checkin date and time.
* If REV is NULL, use the working copy's mtime instead.
+ *
+ * /dev/null is not statted but assumed to have been created on the Epoch.
+ * At least using the POSIX.2 definition of patch, this should cause creation
+ * of files on platforms such as Windoze where the null IO device isn't named
+ * /dev/null to be parsed by patch properly.
*/
char *
make_file_label (path, rev, rcs)
@@ -8529,37 +8375,45 @@ make_file_label (path, rev, rcs)
char *rev;
RCSNode *rcs;
{
- char datebuf[MAXDATELEN];
+ char datebuf[MAXDATELEN + 1];
char *label;
- char *file;
- file = last_component (path);
label = (char *) xmalloc (strlen (path)
- + (rev == NULL ? 0 : strlen (rev))
- + 50);
+ + (rev == NULL ? 0 : strlen (rev) + 1)
+ + MAXDATELEN
+ + 2);
if (rev)
{
- char *date;
+ char date[MAXDATELEN + 1];
+ /* revs cannot be attached to /dev/null ... duh. */
+ assert (strcmp(DEVNULL, path));
RCS_getrevtime (rcs, rev, datebuf, 0);
- date = printable_date (datebuf);
+ (void) date_to_internet (date, datebuf);
(void) sprintf (label, "-L%s\t%s\t%s", path, date, rev);
- free (date);
}
else
{
struct stat sb;
- struct tm *wm;
+ struct tm *wm = NULL;
- if (CVS_STAT (file, &sb) < 0)
- error (0, 1, "could not get info for `%s'", path);
+ if (strcmp(DEVNULL, path))
+ {
+ char *file = last_component (path);
+ if (CVS_STAT (file, &sb) < 0)
+ error (0, 1, "could not get info for `%s'", path);
+ else
+ wm = gmtime (&sb.st_mtime);
+ }
else
{
- wm = gmtime (&sb.st_mtime);
- (void) sprintf (datebuf, "%04d/%02d/%02d %02d:%02d:%02d",
- wm->tm_year + 1900, wm->tm_mon + 1,
- wm->tm_mday, wm->tm_hour,
- wm->tm_min, wm->tm_sec);
+ time_t t = 0;
+ wm = gmtime(&t);
+ }
+
+ if (wm)
+ {
+ (void) tm_to_internet (datebuf, wm);
(void) sprintf (label, "-L%s\t%s", path, datebuf);
}
}
diff --git a/contrib/cvs/src/rcs.h b/contrib/cvs/src/rcs.h
index 3466398f204c..55eed95f7257 100644
--- a/contrib/cvs/src/rcs.h
+++ b/contrib/cvs/src/rcs.h
@@ -179,6 +179,9 @@ typedef void (*RCSCHECKOUTPROC) PROTO ((void *, const char *, size_t));
struct rcsbuffer;
#endif
+/* What RCS_deltas is supposed to do. */
+enum rcs_delta_op {RCS_ANNOTATE, RCS_FETCH};
+
/*
* exported interfaces
*/
@@ -223,8 +226,8 @@ int RCS_cmp_file PROTO ((RCSNode *, char *, char *, const char *));
int RCS_settag PROTO ((RCSNode *, const char *, const char *));
int RCS_deltag PROTO ((RCSNode *, const char *));
int RCS_setbranch PROTO((RCSNode *, const char *));
-int RCS_lock PROTO ((RCSNode *, const char *, int));
-int RCS_unlock PROTO ((RCSNode *, const char *, int));
+int RCS_lock PROTO ((RCSNode *, char *, int));
+int RCS_unlock PROTO ((RCSNode *, char *, int));
int RCS_delete_revs PROTO ((RCSNode *, char *, char *, int));
void RCS_addaccess PROTO ((RCSNode *, char *));
void RCS_delaccess PROTO ((RCSNode *, char *));
@@ -234,6 +237,9 @@ void RCS_rewrite PROTO ((RCSNode *, Deltatext *, char *));
void RCS_abandon PROTO ((RCSNode *));
int rcs_change_text PROTO ((const char *, char *, size_t, const char *,
size_t, char **, size_t *));
+void RCS_deltas PROTO ((RCSNode *, FILE *, struct rcsbuffer *, char *,
+ enum rcs_delta_op, char **, size_t *,
+ char **, size_t *));
char *make_file_label PROTO ((char *, char *, RCSNode *));
extern int preserve_perms;
diff --git a/contrib/cvs/src/rcscmds.c b/contrib/cvs/src/rcscmds.c
index ab94e407bd78..43be16839df2 100644
--- a/contrib/cvs/src/rcscmds.c
+++ b/contrib/cvs/src/rcscmds.c
@@ -530,9 +530,11 @@ RCS file: ", 0);
message on stderr. */
int
-diff_exec (file1, file2, options, out)
+diff_exec (file1, file2, label1, label2, options, out)
char *file1;
char *file2;
+ char *label1;
+ char *label2;
char *options;
char *out;
{
@@ -575,6 +577,10 @@ diff_exec (file1, file2, options, out)
/* The first word in this string is used only for error reporting. */
sprintf (args, "diff %s", options);
call_diff_setup (args);
+ if (label1)
+ call_diff_arg (label1);
+ if (label2)
+ call_diff_arg (label2);
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 1cb2fbbf35d9..2235193d1cb3 100644
--- a/contrib/cvs/src/recurse.c
+++ b/contrib/cvs/src/recurse.c
@@ -157,10 +157,10 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat,
#ifdef CLIENT_SUPPORT
if (!just_subdirs
&& CVSroot_cmdline == NULL
- && client_active)
+ && current_parsed_root->isremote)
{
char *root = Name_Root (NULL, update_dir);
- if (root && strcmp (root, current_root) != 0)
+ if (root && strcmp (root, current_parsed_root->original) != 0)
/* We're skipping this directory because it is for
a different root. Therefore, we just want to
do the subdirectories only. Processing files would
@@ -204,7 +204,7 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat,
program_name);
}
#ifdef CLIENT_SUPPORT
- else if (client_active && server_started)
+ else if (current_parsed_root->isremote && server_started)
{
/* In the the case "cvs update foo bar baz", a call to
send_file_names in update.c will have sent the
@@ -290,7 +290,7 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat,
{
if ((which & W_LOCAL) && isdir (CVSADM)
#ifdef CLIENT_SUPPORT
- && !client_active
+ && !current_parsed_root->isremote
#endif
)
{
@@ -363,8 +363,8 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat,
/* FIXME (njc): in the multiroot case, we don't want to send
argument commands for those top-level directories which do
not contain any subdirectories which have files checked out
- from current_root. If we do, and two repositories have a
- module with the same name, nasty things could happen.
+ from current_parsed_root->original. If we do, and two repositories
+ have a module with the same name, nasty things could happen.
This is hard. Perhaps we should send the Argument commands
later in this procedure, after we've had a chance to notice
@@ -440,7 +440,7 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat,
"Directory xxx" command, which forces the server to descend
and serve the files there. client.c (send_file_names) has
also been modified to send only those arguments which are
- appropriate to current_root.
+ appropriate to current_parsed_root->original.
*/
@@ -599,8 +599,9 @@ do_recursion (frame)
}
- process_this_directory = (strcmp (current_root, this_root) == 0);
-
+ process_this_directory =
+ (strcmp (current_parsed_root->original, this_root) == 0);
+
free (this_root);
}
}
@@ -710,7 +711,7 @@ do_recursion (frame)
place (server_notify). For local, we can't do them here--we don't
have writelocks in place, and there is no way to get writelocks
here. */
- if (client_active)
+ if (current_parsed_root->isremote)
notify_check (repository, update_dir);
#endif /* CLIENT_SUPPORT */
@@ -1024,7 +1025,8 @@ but CVS uses %s for its own purposes; skipping %s directory",
}
- process_this_directory = (strcmp (current_root, this_root) == 0);
+ process_this_directory = (strcmp (current_parsed_root->original, this_root) == 0);
+
free (this_root);
}
}
diff --git a/contrib/cvs/src/release.c b/contrib/cvs/src/release.c
index 06d582f4e5b1..f87583d8e926 100644
--- a/contrib/cvs/src/release.c
+++ b/contrib/cvs/src/release.c
@@ -118,14 +118,14 @@ release (argc, argv)
*/
/* Construct the update command. */
update_cmd = xmalloc (strlen (program_path)
- + strlen (CVSroot_original)
+ + strlen (current_parsed_root->original)
+ 20);
sprintf (update_cmd, "%s -n -q -d %s update",
- program_path, CVSroot_original);
+ program_path, current_parsed_root->original);
#ifdef CLIENT_SUPPORT
/* Start the server; we'll close it after looping. */
- if (client_active)
+ if (current_parsed_root->isremote)
{
start_server ();
ign_setup ();
@@ -226,7 +226,7 @@ release (argc, argv)
if (1
#ifdef CLIENT_SUPPORT
- && !(client_active
+ && !(current_parsed_root->isremote
&& (!supported_request ("noop")
|| !supported_request ("Notify")))
#endif
@@ -242,7 +242,7 @@ release (argc, argv)
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
send_to_server ("Argument ", 0);
send_to_server (thisarg, 0);
@@ -271,7 +271,7 @@ release (argc, argv)
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
err += get_server_responses ();
#endif /* CLIENT_SUPPORT */
}
@@ -281,7 +281,7 @@ release (argc, argv)
free_cwd (&cwd);
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
/* Unfortunately, client.c doesn't offer a way to close
the connection without waiting for responses. The extra
diff --git a/contrib/cvs/src/remove.c b/contrib/cvs/src/remove.c
index f0055d9c4244..63b61d3aff8b 100644
--- a/contrib/cvs/src/remove.c
+++ b/contrib/cvs/src/remove.c
@@ -77,7 +77,7 @@ cvsremove (argc, argv)
wrap_setup ();
#ifdef CLIENT_SUPPORT
- if (client_active) {
+ if (current_parsed_root->isremote) {
/* Call expand_wild so that the local removal of files will
work. It's ok to do it always because we have to send the
file names expanded anyway. */
@@ -115,7 +115,7 @@ cvsremove (argc, argv)
argc, argv,
local, W_LOCAL, 0, 1, (char *) NULL, 1);
- if (removed_files)
+ if (removed_files && !really_quiet)
error (0, 0, "use '%s commit' to remove %s permanently", program_name,
(removed_files == 1) ? "this file" : "these files");
diff --git a/contrib/cvs/src/repos.c b/contrib/cvs/src/repos.c
index bc2b4be33f59..8cdcb45424e5 100644
--- a/contrib/cvs/src/repos.c
+++ b/contrib/cvs/src/repos.c
@@ -110,7 +110,7 @@ Name_Repository (dir, update_dir)
{
char *newrepos;
- if (CVSroot_original == NULL)
+ if (current_parsed_root == NULL)
{
error (0, 0, "in directory %s:", xupdate_dir);
error (0, 0, "must set the CVSROOT environment variable\n");
@@ -123,8 +123,8 @@ Name_Repository (dir, update_dir)
error (0, 0, "`..'-relative repositories are not supported.");
error (1, 0, "illegal source repository");
}
- newrepos = xmalloc (strlen (CVSroot_directory) + strlen (repos) + 10);
- (void) sprintf (newrepos, "%s/%s", CVSroot_directory, repos);
+ newrepos = xmalloc (strlen (current_parsed_root->directory) + strlen (repos) + 2);
+ (void) sprintf (newrepos, "%s/%s", current_parsed_root->directory, repos);
free (repos);
repos = newrepos;
}
@@ -147,10 +147,10 @@ Short_Repository (repository)
/* If repository matches CVSroot at the beginning, strip off CVSroot */
/* And skip leading '/' in rep, in case CVSroot ended with '/'. */
- if (strncmp (CVSroot_directory, repository,
- strlen (CVSroot_directory)) == 0)
+ if (strncmp (current_parsed_root->directory, repository,
+ strlen (current_parsed_root->directory)) == 0)
{
- char *rep = repository + strlen (CVSroot_directory);
+ char *rep = repository + strlen (current_parsed_root->directory);
return (*rep == '/') ? rep+1 : rep;
}
else
diff --git a/contrib/cvs/src/root.c b/contrib/cvs/src/root.c
index 81859c8bab22..2d1261d2e83f 100644
--- a/contrib/cvs/src/root.c
+++ b/contrib/cvs/src/root.c
@@ -12,11 +12,11 @@
#include "cvs.h"
#include "getline.h"
-/* Printable names for things in the CVSroot_method enum variable.
+/* Printable names for things in the current_parsed_root->method enum variable.
Watch out if the enum is changed in cvs.h! */
char *method_names[] = {
- "local", "server (rsh)", "pserver", "kserver", "gserver", "ext", "fork"
+ "undefined", "local", "server (rsh)", "pserver", "kserver", "gserver", "ext", "fork"
};
#ifndef DEBUG
@@ -265,12 +265,16 @@ error 0 Server configuration missing --allow-root in inetd.conf\n");
return 0;
}
+
+
/* 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:
@@ -280,50 +284,102 @@ char *CVSroot_cmdline;
* Some methods may omit fields; local, for example, doesn't need user
* and host.
*
- * Returns zero on success, non-zero on failure. */
+ * Returns pointer to new cvsroot_t on success, NULL on failure. */
-char *CVSroot_original = NULL; /* the CVSroot that was passed in */
-int client_active; /* nonzero if we are doing remote access */
-CVSmethod CVSroot_method; /* one of the enum values defined in cvs.h */
-char *CVSroot_username; /* the username or NULL if method == local */
-char *CVSroot_hostname; /* the hostname or NULL if method == local */
-char *CVSroot_directory; /* the directory name */
+cvsroot_t *current_parsed_root = NULL;
-int
-parse_cvsroot (CVSroot)
- char *CVSroot;
+
+
+/* allocate and initialize a cvsroot_t
+ *
+ * We must initialize the strings to NULL so we know later what we should
+ * free
+ *
+ * Some of the other zeroes remain meaningful as, "never set, use default",
+ * or the like
+ */
+static cvsroot_t *
+new_cvsroot_t ()
{
- static int cvsroot_parsed = 0;
- char *cvsroot_copy, *cvsroot_save, *p;
- int check_hostname;
+ cvsroot_t *newroot;
+
+ /* gotta store it somewhere */
+ newroot = xmalloc(sizeof(cvsroot_t));
+
+ newroot->original = NULL;
+ newroot->method = null_method;
+ newroot->username = NULL;
+ newroot->password = NULL;
+ newroot->hostname = NULL;
+ newroot->port = 0;
+ newroot->directory = NULL;
+#ifdef CLIENT_SUPPORT
+ newroot->isremote = 0;
+#endif /* CLIENT_SUPPORT */
- /* Don't go through the trouble twice. */
- if (cvsroot_parsed)
+ return newroot;
+}
+
+
+
+/* Dispose of a cvsroot_t and its component parts */
+void
+free_cvsroot_t (root)
+ cvsroot_t *root;
+{
+ if (root->original != NULL)
+ free (root->original);
+ if (root->username != NULL)
+ free (root->username);
+ if (root->password != NULL)
{
- error (0, 0, "WARNING (parse_cvsroot): someone called me twice!\n");
- return 0;
+ /* I like to be paranoid */
+ memset (root->password, 0, strlen (root->password));
+ free (root->password);
}
+ if (root->hostname != NULL)
+ free (root->hostname);
+ if (root->directory != NULL)
+ free (root->directory);
+ free (root);
+}
+
- if (CVSroot_original != NULL)
- free (CVSroot_original);
- if (CVSroot_directory != NULL)
- free (CVSroot_directory);
- if (CVSroot_username != NULL)
- free (CVSroot_username);
- if (CVSroot_hostname != NULL)
- free (CVSroot_hostname);
- CVSroot_original = xstrdup (CVSroot);
- cvsroot_save = cvsroot_copy = xstrdup (CVSroot);
+/*
+ * parse a CVSROOT string to allocate and return a new cvsroot_t structure
+ */
+cvsroot_t *
+parse_cvsroot (root_in)
+ char *root_in;
+{
+ cvsroot_t *newroot; /* the new root to be returned */
+ char *cvsroot_save; /* what we allocated so we can dispose
+ * it when finished */
+ char *firstslash; /* save where the path spec starts
+ * while we parse
+ * [[user][:password]@]host[:[port]]
+ */
+ char *cvsroot_copy, *p, *q; /* temporary pointers for parsing */
+ int check_hostname, no_port, no_password;
+
+ /* allocate some space */
+ newroot = new_cvsroot_t();
+
+ /* save the original string */
+ newroot->original = xstrdup (root_in);
+
+ /* and another copy we can munge while parsing */
+ cvsroot_save = cvsroot_copy = xstrdup (root_in);
if (*cvsroot_copy == ':')
{
char *method = ++cvsroot_copy;
/* Access method specified, as in
- * "cvs -d :pserver:user@host:/path",
+ * "cvs -d :(gserver|kserver|pserver):[[user][:password]@]host[:[port]]/path",
+ * "cvs -d [:(ext|server):][[user]@]host[:]/path",
* "cvs -d :local:e:\path",
- * "cvs -d :kserver:user@host:/path", or
* "cvs -d :fork:/path".
* We need to get past that part of CVSroot before parsing the
* rest of it.
@@ -331,9 +387,9 @@ parse_cvsroot (CVSroot)
if (! (p = strchr (method, ':')))
{
- error (0, 0, "bad CVSroot: %s", CVSroot);
+ error (0, 0, "bad CVSroot: %s", root_in);
free (cvsroot_save);
- return 1;
+ goto error_exit;
}
*p = '\0';
cvsroot_copy = ++p;
@@ -341,24 +397,24 @@ parse_cvsroot (CVSroot)
/* Now we have an access method -- see if it's valid. */
if (strcmp (method, "local") == 0)
- CVSroot_method = local_method;
+ newroot->method = local_method;
else if (strcmp (method, "pserver") == 0)
- CVSroot_method = pserver_method;
+ newroot->method = pserver_method;
else if (strcmp (method, "kserver") == 0)
- CVSroot_method = kserver_method;
+ newroot->method = kserver_method;
else if (strcmp (method, "gserver") == 0)
- CVSroot_method = gserver_method;
+ newroot->method = gserver_method;
else if (strcmp (method, "server") == 0)
- CVSroot_method = server_method;
+ newroot->method = server_method;
else if (strcmp (method, "ext") == 0)
- CVSroot_method = ext_method;
+ newroot->method = ext_method;
else if (strcmp (method, "fork") == 0)
- CVSroot_method = fork_method;
+ newroot->method = fork_method;
else
{
- error (0, 0, "unknown method in CVSroot: %s", CVSroot);
+ error (0, 0, "unknown method in CVSroot: %s", root_in);
free (cvsroot_save);
- return 1;
+ goto error_exit;
}
}
else
@@ -367,171 +423,328 @@ parse_cvsroot (CVSroot)
SERVER_METHOD/EXT_METHOD if the string contains a colon or
LOCAL_METHOD otherwise. */
- CVSroot_method = ((strchr (cvsroot_copy, ':'))
-#ifdef RSH_NOT_TRANSPARENT
+ newroot->method = ((*cvsroot_copy != '/' && strchr (cvsroot_copy, '/'))
+/*#ifdef RSH_NOT_TRANSPARENT
? server_method
-#else
+#else*/
? ext_method
-#endif
+/*#endif*/
: local_method);
}
- client_active = (CVSroot_method != local_method);
-
- /* Check for username/hostname if we're not LOCAL_METHOD. */
+#ifdef CLIENT_SUPPORT
+ newroot->isremote = (newroot->method != local_method);
+#endif /* CLIENT_SUPPORT */
- CVSroot_username = NULL;
- CVSroot_hostname = NULL;
- if ((CVSroot_method != local_method)
- && (CVSroot_method != fork_method))
+ if ((newroot->method != local_method)
+ && (newroot->method != fork_method))
{
- /* Check to see if there is a username in the string. */
+ /* split the string into [[user][:password]@]host[:[port]] & /path
+ *
+ * this will allow some characters such as '@' & ':' to remain unquoted
+ * in the path portion of the spec
+ */
+ if ((p = strchr (cvsroot_copy, '/')) == NULL)
+ {
+ error (0, 0, "CVSROOT (\"%s\")", root_in);
+ error (0, 0, "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 */
+ *p = '\0';
+ /* Check to see if there is a username[:password] in the string. */
if ((p = strchr (cvsroot_copy, '@')) != NULL)
{
*p = '\0';
- CVSroot_username = xstrdup (cvsroot_copy);
+ /* check for a password */
+ if ((q = strchr (cvsroot_copy, ':')) != NULL)
+ {
+ *q = '\0';
+ 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)
+ */
+ }
+
+ /* copy the username */
+ if (*cvsroot_copy != '\0')
+ /* a blank username is impossible, so leave it NULL in that
+ * case so we know to use the default username
+ */
+ newroot->username = xstrdup (cvsroot_copy);
+
cvsroot_copy = ++p;
- if (*CVSroot_username == '\0')
- CVSroot_username = NULL;
}
+ /* now deal with host[:[port]] */
+
+ /* the port */
if ((p = strchr (cvsroot_copy, ':')) != NULL)
{
- *p = '\0';
- CVSroot_hostname = xstrdup (cvsroot_copy);
- cvsroot_copy = ++p;
-
- if (*CVSroot_hostname == '\0')
- CVSroot_hostname = NULL;
+ *p++ = '\0';
+ if (strlen(p))
+ {
+ q = p;
+ if (*q == '-') q++;
+ while (*q)
+ {
+ if (!isdigit(*q++))
+ {
+ error(0, 0, "CVSROOT (\"%s\")", root_in);
+ error(0, 0, "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;
+ }
+ }
+ if ((newroot->port = atoi (p)) <= 0)
+ {
+ error (0, 0, "CVSROOT (\"%s\")", root_in);
+ error(0, 0, "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;
+ }
+ }
}
+
+ /* copy host */
+ if (*cvsroot_copy != '\0')
+ /* blank hostnames are invalid, but for now leave the field NULL
+ * and catch the error during the sanity checks later
+ */
+ newroot->hostname = xstrdup (cvsroot_copy);
+
+ /* restore the '/' */
+ cvsroot_copy = firstslash;
+ *cvsroot_copy = '/';
}
- CVSroot_directory = xstrdup(cvsroot_copy);
+ /* parse the path for all methods */
+ newroot->directory = xstrdup(cvsroot_copy);
free (cvsroot_save);
+ /*
+ * Do various sanity checks.
+ */
+
#if ! defined (CLIENT_SUPPORT) && ! defined (DEBUG)
- if (CVSroot_method != local_method)
+ if (newroot->method != local_method)
{
- error (0, 0, "Your CVSROOT is set for a remote access method");
- error (0, 0, "but your CVS executable doesn't support it");
- error (0, 0, "(%s)", CVSroot);
- return 1;
+ error (0, 0, "CVSROOT \"%s\"", root_in);
+ error (0, 0, "is set for a remote access method but your");
+ error (0, 0, "CVS executable doesn't support it");
+ goto error_exit;
}
#endif
-
- /* Do various sanity checks. */
- if (CVSroot_username && ! CVSroot_hostname)
+#if ! defined (SERVER_SUPPORT) && ! defined (DEBUG)
+ if (newroot->method == fork_method)
+ {
+ error (0, 0, "CVSROOT \"%s\"", root_in);
+ error (0, 0, "is set to use the :fork: access method but your");
+ error (0, 0, "CVS executable doesn't support it");
+ goto error_exit;
+ }
+#endif
+
+ if (newroot->username && ! newroot->hostname)
{
- error (0, 0, "missing hostname in CVSROOT: %s", CVSroot);
- return 1;
+ error (0, 0, "missing hostname in CVSROOT: \"%s\"", root_in);
+ goto error_exit;
}
check_hostname = 0;
- switch (CVSroot_method)
+ no_password = 0;
+ no_port = 0;
+ switch (newroot->method)
{
case local_method:
- if (CVSroot_username || CVSroot_hostname)
+ if (newroot->username || newroot->hostname)
{
error (0, 0, "can't specify hostname and username in CVSROOT");
+ error (0, 0, "(\"%s\")", root_in);
error (0, 0, "when using local access method");
- error (0, 0, "(%s)", CVSroot);
- return 1;
+ goto error_exit;
}
/* cvs.texinfo has always told people that CVSROOT must be an
absolute pathname. Furthermore, attempts to use a relative
pathname produced various errors (I couldn't get it to work),
so there would seem to be little risk in making this a fatal
error. */
- if (!isabsolute (CVSroot_directory))
- error (1, 0, "CVSROOT %s must be an absolute pathname",
- CVSroot_directory);
+ if (!isabsolute (newroot->directory))
+ {
+ error (0, 0, "CVSROOT \"%s\" must be an absolute pathname",
+ newroot->directory);
+ goto error_exit;
+ }
+ no_port = 1;
+ no_password = 1;
break;
case fork_method:
/* We want :fork: to behave the same as other remote access
methods. Therefore, don't check to see that the repository
name is absolute -- let the server do it. */
- if (CVSroot_username || CVSroot_hostname)
+ if (newroot->username || newroot->hostname)
{
error (0, 0, "can't specify hostname and username in CVSROOT");
+ error (0, 0, "(\"%s\")", root_in);
error (0, 0, "when using fork access method");
- error (0, 0, "(%s)", CVSroot);
- return 1;
+ goto error_exit;
+ }
+ if (!isabsolute (newroot->directory))
+ {
+ error (0, 0, "CVSROOT \"%s\" must be an absolute pathname",
+ newroot->directory);
+ goto error_exit;
}
+ no_port = 1;
+ no_password = 1;
break;
case kserver_method:
#ifndef HAVE_KERBEROS
- error (0, 0, "Your CVSROOT is set for a kerberos access method");
- error (0, 0, "but your CVS executable doesn't support it");
- error (0, 0, "(%s)", CVSroot);
- return 1;
+ error (0, 0, "CVSROOT \"%s\"", root_in);
+ error (0, 0, "is set for a kerberos access method but your");
+ error (0, 0, "CVS executable doesn't support it");
+ goto error_exit;
#else
check_hostname = 1;
break;
#endif
case gserver_method:
#ifndef HAVE_GSSAPI
- error (0, 0, "Your CVSROOT is set for a GSSAPI access method");
- error (0, 0, "but your CVS executable doesn't support it");
- error (0, 0, "(%s)", CVSroot);
- return 1;
+ error (0, 0, "CVSROOT \"%s\"", root_in);
+ error (0, 0, "is set for a GSSAPI access method but your");
+ error (0, 0, "CVS executable doesn't support it");
+ goto error_exit;
#else
check_hostname = 1;
break;
#endif
case server_method:
case ext_method:
+ no_port = 1;
+ no_password = 1;
+ check_hostname = 1;
+ break;
case pserver_method:
check_hostname = 1;
break;
}
- if (check_hostname)
+ if (no_password && newroot->password)
+ {
+ error (0, 0, "CVSROOT password specification is only valid for");
+ error (0, 0, "pserver connection method.");
+ goto error_exit;
+ }
+
+ if (check_hostname && !newroot->hostname)
{
- if (! CVSroot_hostname)
+ error (0, 0, "didn't specify hostname in CVSROOT: %s", root_in);
+ goto error_exit;
+ }
+
+ if (no_port && newroot->port)
{
- error (0, 0, "didn't specify hostname in CVSROOT: %s", CVSroot);
- return 1;
+ error (0, 0, "CVSROOT port specification is only valid for gserver, kserver,");
+ error (0, 0, "and pserver connection methods.");
+ goto error_exit;
}
- }
- if (*CVSroot_directory == '\0')
+ if (*newroot->directory == '\0')
{
- error (0, 0, "missing directory in CVSROOT: %s", CVSroot);
- return 1;
+ error (0, 0, "missing directory in CVSROOT: %s", root_in);
+ goto error_exit;
}
/* Hooray! We finally parsed it! */
- return 0;
+ return newroot;
+
+error_exit:
+ free_cvsroot_t (newroot);
+ return NULL;
}
-/* Set up the global CVSroot* variables as if we're using the local
- repository DIR. */
-void
-set_local_cvsroot (dir)
+#ifdef AUTH_CLIENT_SUPPORT
+/* Use root->username, root->hostname, root->port, and root->directory
+ * to create a normalized CVSROOT fit for the .cvspass file
+ *
+ * username defaults to the result of getcaller()
+ * port defaults to the result of get_cvs_port_number()
+ *
+ * FIXME - we could cache the canonicalized version of a root inside the
+ * cvsroot_t, but we'd have to un'const the input here and stop expecting the
+ * caller to be responsible for our return value
+ */
+char *
+normalize_cvsroot (root)
+ const cvsroot_t *root;
+{
+ char *cvsroot_canonical;
+ char *p, *hostname, *username;
+ char port_s[64];
+
+ /* get the appropriate port string */
+ sprintf (port_s, "%d", get_cvs_port_number (root));
+
+ /* use a lower case hostname since we know hostnames are case insensitive */
+ /* Some logic says we should be tacking our domain name on too if it isn't
+ * there already, but for now this works. Reverse->Forward lookups are
+ * almost certainly too much since that would make CVS immune to some of
+ * the DNS trickery that makes life easier for sysadmins when they want to
+ * move a repository or the like
+ */
+ p = hostname = xstrdup(root->hostname);
+ while (*p)
+ {
+ *p = tolower(*p);
+ p++;
+ }
+
+ /* get the username string */
+ username = root->username ? root->username : getcaller();
+ cvsroot_canonical = xmalloc ( strlen(username)
+ + strlen(hostname) + strlen(port_s)
+ + strlen(root->directory) + 12);
+ sprintf (cvsroot_canonical, ":pserver:%s@%s:%s%s",
+ username, hostname, port_s, root->directory);
+
+ free (hostname);
+ return cvsroot_canonical;
+}
+#endif /* AUTH_CLIENT_SUPPORT */
+
+
+
+/* allocate and return a cvsroot_t structure set up as if we're using the local
+ * repository DIR. */
+cvsroot_t *
+local_cvsroot (dir)
char *dir;
{
- if (CVSroot_original != NULL)
- free (CVSroot_original);
- CVSroot_original = xstrdup(dir);
- CVSroot_method = local_method;
- if (CVSroot_directory != NULL)
- free (CVSroot_directory);
- CVSroot_directory = xstrdup(dir);
- if (CVSroot_username != NULL)
- free (CVSroot_username);
- CVSroot_username = NULL;
- if (CVSroot_hostname != NULL)
- free (CVSroot_hostname);
- CVSroot_hostname = NULL;
- client_active = 0;
+ cvsroot_t *newroot = new_cvsroot_t();
+
+ newroot->original = xstrdup(dir);
+ newroot->method = local_method;
+ newroot->directory = xstrdup(dir);
+
+ return newroot;
}
+
#ifdef DEBUG
/* This is for testing the parsing function. Use
@@ -541,7 +754,6 @@ set_local_cvsroot (dir)
#include <stdio.h>
-char *CVSroot;
char *program_name = "testing";
char *command_name = "parse_cvsroot"; /* XXX is this used??? */
@@ -555,13 +767,6 @@ error_exit PROTO ((void))
exit (1);
}
-char *
-xstrdup (str)
- const char *str;
-{
- return strdup (str);
-}
-
int
isabsolute (dir)
const char *dir;
@@ -582,18 +787,18 @@ main (argc, argv)
exit (2);
}
- if (parse_cvsroot (argv[1]))
+ if ((current_parsed_root = parse_cvsroot (argv[1])) == NULL)
{
fprintf (stderr, "%s: Parsing failed.\n", program_name);
exit (1);
}
printf ("CVSroot: %s\n", argv[1]);
- printf ("CVSroot_method: %s\n", method_names[CVSroot_method]);
- printf ("CVSroot_username: %s\n",
- CVSroot_username ? CVSroot_username : "NULL");
- printf ("CVSroot_hostname: %s\n",
- CVSroot_hostname ? CVSroot_hostname : "NULL");
- printf ("CVSroot_directory: %s\n", CVSroot_directory);
+ printf ("current_parsed_root->method: %s\n", method_names[current_parsed_root->method]);
+ printf ("current_parsed_root->username: %s\n",
+ current_parsed_root->username ? current_parsed_root->username : "NULL");
+ printf ("current_parsed_root->hostname: %s\n",
+ current_parsed_root->hostname ? current_parsed_root->hostname : "NULL");
+ printf ("current_parsed_root->directory: %s\n", current_parsed_root->directory);
exit (0);
/* NOTREACHED */
diff --git a/contrib/cvs/src/run.c b/contrib/cvs/src/run.c
index d382cef60819..2d020eb582fb 100644
--- a/contrib/cvs/src/run.c
+++ b/contrib/cvs/src/run.c
@@ -324,9 +324,19 @@ run_exec (stin, stout, sterr, flags)
out:
if (sterr)
(void) close (sherr);
+ else
+ /* ensure things are received by the parent in the correct order
+ * relative to the protocol pipe
+ */
+ cvs_flusherr();
out2:
if (stout)
(void) close (shout);
+ else
+ /* ensure things are received by the parent in the correct order
+ * relative to the protocol pipe
+ */
+ cvs_flushout();
out1:
if (stin)
(void) close (shin);
@@ -444,7 +454,7 @@ void
close_on_exec (fd)
int fd;
{
-#if defined (FD_CLOEXEC) && defined (F_SETFD)
+#ifdef F_SETFD
if (fcntl (fd, F_SETFD, 1))
error (1, errno, "can't set close-on-exec flag on %d", fd);
#endif
diff --git a/contrib/cvs/src/sanity.sh b/contrib/cvs/src/sanity.sh
index 84e67ccd6630..727e33a5fa32 100755
--- a/contrib/cvs/src/sanity.sh
+++ b/contrib/cvs/src/sanity.sh
@@ -18,10 +18,18 @@
#
# Original Author: K. Richard Pixley
-# usage: sanity.sh [-r] @var{cvs-to-test} @var{tests-to-run}
-# -r means to test remote instead of local cvs.
-# @var{tests-to-run} are the names of the tests to run; if omitted run all
-# tests.
+# usage:
+exit_usage ()
+{
+ echo "Usage: `basename $0` [-kr] [-f FROM-TEST] CVS-TO-TEST [TESTS-TO-RUN...]" 1>&2
+ exit 2
+}
+# -r test remote instead of local cvs.
+# -k try to keep directories created by individual tests around
+# -f FROM-TEST run TESTS-TO-RUN, skipping all tests in the list before
+# FROM-TEST
+#
+# TESTS-TO-RUN are the names of the tests to run; if omitted default to all tests.
# See TODO list at end of file.
@@ -37,55 +45,46 @@ unset CVSREAD
LC_ALL=C
export LC_ALL
-# The default value of /tmp/cvs-sanity for TESTDIR is dubious,
-# because it loses if two people/scripts try to run the tests
-# at the same time. Some possible solutions:
-# 1. Use /tmp/cvs-test$$. One disadvantage is that the old
-# cvs-test* directories would pile up, because they wouldn't
-# necessarily get removed.
-# 2. Have everyone/everything running the testsuite set
-# TESTDIR to some appropriate directory.
-# 3. Have the default value of TESTDIR be some variation of
-# `pwd`/cvs-sanity. The biggest problem here is that we have
-# been fairly careful to test that CVS prints in messages the
-# actual pathnames that we pass to it, rather than a different
-# pathname for the same directory, as may come out of `pwd`.
-# So this would be lost if everything was `pwd`-based. I suppose
-# 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`
-: ${TESTDIR=$tmp/cvs-sanity}
-# "debugger"
-#set -x
-
-echo 'This test should produce no other output than this line, and a final "OK".'
-
-if test x"$1" = x"-r"; then
- shift
- remote=yes
-else
- remote=no
-fi
-# The --keep option will eventually cause all the tests to leave around the
-# contents of the /tmp directory; right now only some implement it. Not
-# useful if you are running more than one test.
-# FIXME: need some real option parsing so this doesn't depend on the order
-# in which they are specified.
-if test x"$1" = x"--keep"; then
- shift
- keep=yes
-else
- keep=no
-fi
+#
+# read our options
+#
+unset fromtest
+keep=false
+remote=false
+while getopts f:kr option ; do
+ case "$option" in
+ f)
+ fromtest="$OPTARG"
+ ;;
+ k)
+ # The -k (keep) option will eventually cause all the tests to leave around the
+ # contents of the /tmp directory; right now only some implement it. Not
+ # originally intended to be useful with more than one test, but this should work
+ # if each test uses a uniquely named dir (use the name of the test).
+ keep=:
+ ;;
+ r)
+ remote=:
+ ;;
+ \?)
+ exit_usage
+ ;;
+ esac
+done
+
+# boot the arguments we used above
+while test $OPTIND -gt 1 ; do
+ shift
+ OPTIND=`expr $OPTIND - 1`
+done
# Use full path for CVS executable, so that CVS_SERVER gets set properly
# for remote.
case $1 in
"")
- echo "Usage: `basename $0` [-r] [--keep] CVS-TO-TEST [TESTS-TO-RUN...]" 1>&2
- exit 1
+ exit_usage
;;
/*)
testcvs=$1
@@ -94,9 +93,19 @@ case $1 in
testcvs=`pwd`/$1
;;
esac
-
shift
+
+
+###
+### GUTS
+###
+
+# "debugger"
+#set -x
+
+echo 'This test should produce no other output than this line, and a final "OK".'
+
# Regexp to match what CVS will call itself in output that it prints.
# FIXME: we don't properly quote this--if the name contains . we'll
# just spuriously match a few things; if the name contains other regexp
@@ -108,17 +117,22 @@ PROG=`basename ${testcvs}`
# not allowed in usernames. Other than that I'm not sure.
username="[-a-zA-Z0-9][-a-zA-Z0-9]*"
author="[-a-zA-Z0-9][-a-zA-Z0-9]*"
+hostname="[-_.a-zA-Z0-9]*"
# Regexp to match the name of a temporary file (from cvs_temp_name).
# This appears in certain diff output.
tempname="[-a-zA-Z0-9/.%_]*"
+# Regexp to match a date in RFC822 format (as amended by RFC1123).
+RFCDATE="[a-zA-Z0-9 ][a-zA-Z0-9 ]* [0-9:][0-9:]* -0000"
+RFCDATE_EPOCH="1 Jan 1970 00:00:00 -0000"
+
# On cygwin32, we may not have /bin/sh.
-if [ -r /bin/sh ]; then
+if test -r /bin/sh; then
TESTSHELL="/bin/sh"
else
TESTSHELL=`type -p sh 2>/dev/null`
- if [ ! -r "$TESTSHELL" ]; then
+ if test ! -r "$TESTSHELL"; then
TESTSHELL="/bin/sh"
fi
fi
@@ -141,13 +155,48 @@ if test -f check.log; then
mv check.log check.plog
fi
+# The default value of /tmp/cvs-sanity for TESTDIR is dubious,
+# because it loses if two people/scripts try to run the tests
+# at the same time. Some possible solutions:
+# 1. Use /tmp/cvs-test$$. One disadvantage is that the old
+# cvs-test* directories would pile up, because they wouldn't
+# necessarily get removed.
+# 2. Have everyone/everything running the testsuite set
+# TESTDIR to some appropriate directory.
+# 3. Have the default value of TESTDIR be some variation of
+# `pwd`/cvs-sanity. The biggest problem here is that we have
+# been fairly careful to test that CVS prints in messages the
+# actual pathnames that we pass to it, rather than a different
+# pathname for the same directory, as may come out of `pwd`.
+# So this would be lost if everything was `pwd`-based. I suppose
+# 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`
+
+# Now:
+# 1) Set TESTDIR if it's not set already
+# 2) Remove any old test remnants
+# 3) Create $TESTDIR
+# 4) Normalize TESTDIR with `cd && (/bin/pwd || pwd)`
+# (This will match CVS output later)
+: ${TESTDIR=$tmp/cvs-sanity}
# clean any old remnants (we need the chmod because some tests make
# directories read-only)
if test -d ${TESTDIR}; then
chmod -R a+wx ${TESTDIR}
rm -rf ${TESTDIR}
fi
-mkdir ${TESTDIR}
+# These exits are important. The first time I tried this, if the `mkdir && cd`
+# failed then the build directory would get blown away. Some people probably
+# wouldn't appreciate that.
+mkdir ${TESTDIR} || exit 1
+cd ${TESTDIR} || exit 1
+TESTDIR=`(/bin/pwd || pwd) 2>/dev/null`
+# Ensure $TESTDIR is absolute
+if test -z "${TESTDIR}" || echo "${TESTDIR}" |grep '^[^/]'; then
+ echo "Unable to resolve TESTDIR to an absolute directory." >&2
+ exit 1
+fi
cd ${TESTDIR}
# Make sure various tools work the way we expect, or try to find
@@ -159,17 +208,19 @@ cd ${TESTDIR}
find_tool ()
{
- GLOCS="`echo $PATH | sed 's/:/ /g'` /usr/local/bin /usr/contrib/bin /usr/gnu/bin /local/bin /local/gnu/bin /gun/bin"
+ GLOCS="`echo $PATH | sed 's/:/ /g'` /usr/local/bin /usr/contrib/bin /usr/gnu/bin /local/bin /local/gnu/bin /gnu/bin"
TOOL=""
for path in $GLOCS ; do
if test -x $path/g$1 ; then
- if test "X`$path/g$1 --version`" != "X--version" ; then
+ RES="`$path/g$1 --version </dev/null 2>/dev/null`"
+ if test "X$RES" != "X--version" && test "X$RES" != "X" ; then
TOOL=$path/g$1
break
fi
fi
if test -x $path/$1 ; then
- if test "X`$path/$1 --version`" != "X--version" ; then
+ RES="`$path/$1 --version </dev/null 2>/dev/null`"
+ if test "X$RES" != "X--version" && test "X$RES" != "X" ; then
TOOL=$path/$1
break
fi
@@ -178,30 +229,41 @@ find_tool ()
if test -z "$TOOL"; then
:
else
- echo "Notice: The default version of $1 is defective, using" >&2
- echo "$TOOL instead." >&2
+ echo "Notice: The default version of \`$1' is defective, using" >&2
+ echo "\`$TOOL' instead." >&2
fi
echo "$TOOL"
}
# You can't run CVS as root; print a nice error message here instead
# of somewhere later, after making a mess.
-case "`$ID -u`" in
- "0")
- echo "Test suite does not work correctly when run as root" >&2
- exit 1
- ;;
-
- "")
- ID=`find_tool id`
- if test -z "$ID" ; then
- echo 'Running these tests requires an "id" program that understands the' >&2
- echo '-u and -n flags. Make sure that such an id (GNU, or many but not' >&2
- echo 'all vendor-supplied versions) is in your path.' >&2
+#
+# FIXME - find_tool() finds the 'gid' from GNU id-utils if I pull 'id' out of
+# my path.
+for pass in false :; do
+ case "`$ID -u 2>/dev/null`" in
+ "0")
+ echo "Test suite does not work correctly when run as root" >&2
exit 1
- fi
- ;;
-esac
+ ;;
+
+ "")
+ if $pass; then :; else
+ ID=`find_tool id`
+ fi
+ if $pass || test -z "$ID" ; then
+ echo "Running these tests requires an \`id' program that understands the" >&2
+ echo "-u and -n flags. Make sure that such an id (GNU, or many but not" >&2
+ echo "all vendor-supplied versions) is in your path." >&2
+ exit 1
+ fi
+ ;;
+
+ *)
+ break
+ ;;
+ esac
+done
username=`$ID -un`
if $EXPR "${username}" : "${username}" >/dev/null; then
: good, it works
@@ -269,7 +331,6 @@ if $EXPR "`cat ${TESTDIR}/bar`x" : "`cat ${TESTDIR}/bar`y" >/dev/null; then
else
: good, it works
fi
-rm -f ${TESTDIR}/foo ${TESTDIR}/bar
# That we should have to do this is total bogosity, but GNU expr
# version 1.9.4-1.12 uses the emacs definition of "$" instead of the unix
@@ -299,6 +360,21 @@ else
\)*'
fi
+# Now that we have DOTSTAR, make sure it works with big matches
+if $EXPR "`cat ${TESTDIR}/bar`" : "${DOTSTAR}xyzABC${DOTSTAR}$" >/dev/null; then
+ : good, it works
+else
+ EXPR=`find_tool expr`
+ if test -z "$EXPR" ; then
+ echo 'Warning: you are using a version of expr which does not correctly'
+ echo 'match large patterns. Some tests may spuriously fail.'
+ echo 'You may wish to make sure GNU expr is in your path.'
+ EXPR=expr
+ fi
+fi
+
+rm -f ${TESTDIR}/foo ${TESTDIR}/bar
+
# Work around yet another GNU expr (version 1.10) bug/incompatibility.
# "+" is a special character, yet for unix expr (e.g. SunOS 4.1.3)
# it is not. I doubt that POSIX allows us to use \+ and assume it means
@@ -350,67 +426,45 @@ fail ()
# of the implementation common to the two).
dotest_internal ()
{
+ if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : "$3${ENDANCHOR}" >/dev/null; then
+ # Why, I hear you ask, do we write this to the logfile
+ # even when the test passes? The reason is that the test
+ # may give us the regexp which we were supposed to match,
+ # but sometimes it may be useful to look at the exact
+ # text which was output. For example, suppose one wants
+ # to grep for a particular warning, and make _sure_ that
+ # CVS never hits it (even in cases where the tests might
+ # match it with .*). Or suppose one wants to see the exact
+ # date format output in a certain case (where the test will
+ # surely use a somewhat non-specific pattern).
+ cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+ pass "$1"
# expr can't distinguish between "zero characters matched" and "no match",
# so special-case it.
- if test -z "$3"; then
- if test -s ${TESTDIR}/dotest.tmp; then
- if test x"$4" != x; then
- # We want to match either the empty string or $4.
- dotest_internal "$1" "$2" "$4"
- else
- echo "** expected: " >>${LOGFILE}
- echo "$3" >>${LOGFILE}
- echo "$3" > ${TESTDIR}/dotest.exp
- rm -f ${TESTDIR}/dotest.ex2
- echo "** got: " >>${LOGFILE}
- cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
- fail "$1"
- fi
- else
- pass "$1"
- fi
- else
- if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : \
- "$3"${ENDANCHOR} >/dev/null; then
- # See below about writing this to the logfile.
+ elif test -z "$3" && test ! -s ${TESTDIR}/dotest.tmp; then
+ pass "$1"
+ elif test x"$4" != x; then
+ if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : "$4${ENDANCHOR}" >/dev/null; then
cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
pass "$1"
else
- if test x"$4" != x; then
- if $EXPR "`cat ${TESTDIR}/dotest.tmp`" : \
- "$4"${ENDANCHOR} >/dev/null; then
- # Why, I hear you ask, do we write this to the logfile
- # even when the test passes? The reason is that the test
- # may give us the regexp which we were supposed to match,
- # but sometimes it may be useful to look at the exact
- # text which was output. For example, suppose one wants
- # to grep for a particular warning, and make _sure_ that
- # CVS never hits it (even in cases where the tests might
- # match it with .*). Or suppose one wants to see the exact
- # date format output in a certain case (where the test will
- # surely use a somewhat non-specific pattern).
- cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
- pass "$1"
- else
- echo "** expected: " >>${LOGFILE}
- echo "$3" >>${LOGFILE}
- echo "$3" > ${TESTDIR}/dotest.ex1
- echo "** or: " >>${LOGFILE}
- echo "$4" >>${LOGFILE}
- echo "$4" > ${TESTDIR}/dotest.ex2
- echo "** got: " >>${LOGFILE}
- cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
- fail "$1"
- fi
- else
- echo "** expected: " >>${LOGFILE}
- echo "$3" >>${LOGFILE}
- echo "$3" > ${TESTDIR}/dotest.exp
- echo "** got: " >>${LOGFILE}
- cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
- fail "$1"
- fi
+ echo "** expected: " >>${LOGFILE}
+ echo "$3" >>${LOGFILE}
+ echo "$3" > ${TESTDIR}/dotest.ex1
+ echo "** or: " >>${LOGFILE}
+ echo "$4" >>${LOGFILE}
+ echo "$4" > ${TESTDIR}/dotest.ex2
+ echo "** got: " >>${LOGFILE}
+ cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+ fail "$1"
fi
+ else
+ echo "** expected: " >>${LOGFILE}
+ echo "$3" >>${LOGFILE}
+ echo "$3" > ${TESTDIR}/dotest.exp
+ echo "** got: " >>${LOGFILE}
+ cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
+ fail "$1"
fi
}
@@ -432,6 +486,9 @@ dotest_line_by_line ()
if $EXPR "`sed -n ${line}p ${TESTDIR}/dotest.tmp`" : \
"`sed -n ${line}p ${TESTDIR}/dotest.exp`" >/dev/null; then
:
+ elif test -z "`sed -n ${line}p ${TESTDIR}/dotest.tmp`" &&
+ test -z "`sed -n ${line}p ${TESTDIR}/dotest.exp`"; then
+ :
else
echo "Line $line:" >> ${LOGFILE}
echo "**** expected: " >>${LOGFILE}
@@ -512,10 +569,9 @@ dotest_internal_debug ()
dotest ()
{
rm -f ${TESTDIR}/dotest.ex? 2>&1
- if eval "$2" >${TESTDIR}/dotest.tmp 2>&1; then
- : so far so good
- else
- status=$?
+ eval "$2" >${TESTDIR}/dotest.tmp 2>&1
+ status=$?
+ if test "$status" != 0; then
cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
echo "exit status was $status" >>${LOGFILE}
fail "$1"
@@ -527,10 +583,9 @@ dotest ()
dotest_lit ()
{
rm -f ${TESTDIR}/dotest.ex? 2>&1
- if eval "$2" >${TESTDIR}/dotest.tmp 2>&1; then
- : so far so good
- else
- status=$?
+ eval "$2" >${TESTDIR}/dotest.tmp 2>&1
+ status=$?
+ if test "$status" != 0; then
cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
echo "exit status was $status" >>${LOGFILE}
fail "$1"
@@ -551,15 +606,13 @@ dotest_lit ()
dotest_fail ()
{
rm -f ${TESTDIR}/dotest.ex? 2>&1
- if eval "$2" >${TESTDIR}/dotest.tmp 2>&1; then
- status=$?
+ eval "$2" >${TESTDIR}/dotest.tmp 2>&1
+ status=$?
+ if test "$status" = 0; then
cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
echo "exit status was $status" >>${LOGFILE}
fail "$1"
- else
- : so far so good
- fi 2>${TESTDIR}/dotest.tmp1
- cat ${TESTDIR}/dotest.tmp1 >>${TESTDIR}/dotest.tmp
+ fi
dotest_internal "$@"
}
@@ -568,9 +621,7 @@ dotest_status ()
{
eval "$3" >${TESTDIR}/dotest.tmp 2>&1
status=$?
- if test "$status" = "$2"; then
- : so far so good
- else
+ if test "$status" != "$2"; then
cat ${TESTDIR}/dotest.tmp >>${LOGFILE}
echo "exit status was $status; expected $2" >>${LOGFILE}
fail "$1"
@@ -582,10 +633,9 @@ dotest_status ()
dotest_sort ()
{
rm -f ${TESTDIR}/dotest.ex? 2>&1
- if eval "$2" >${TESTDIR}/dotest.tmp1 2>&1; then
- : so far so good
- else
- status=$?
+ eval "$2" >${TESTDIR}/dotest.tmp1 2>&1
+ status=$?
+ if test "$status" != 0; then
cat ${TESTDIR}/dotest.tmp1 >>${LOGFILE}
echo "exit status was $status" >>${LOGFILE}
fail "$1"
@@ -594,21 +644,6 @@ dotest_sort ()
dotest_internal "$@"
}
-# This will show up in cvs history output where it prints the working
-# directory. It should *not* appear in any cvs output referring to the
-# repository; cvs should use the name of the repository as specified.
-#
-# Note that using pwd here rather than /bin/pwd will make it even less
-# likely that we test whether CVS is distinguishing between TMPPWD
-# and TESTDIR. However, there is no guarantee that will test it anyway.
-# If we really care, we should do something along the lines of:
-# cd /tmp/cvs-sanity # In reality, overridable with environment variable?
-# mkdir realdir
-# ln -s realdir testdir
-# TESTDIR=/tmp/cvs-sanity/testdir
-# TMPPWD=/tmp/cvs-sanity/realdir
-TMPPWD=`pwd`
-
# Avoid picking up any stray .cvsrc, etc., from the user running the tests
mkdir home
HOME=${TESTDIR}/home; export HOME
@@ -627,14 +662,15 @@ RCSINIT=; export RCSINIT
if test x"$*" = x; then
# Basic/miscellaneous functionality
- tests="basica basicb basicc basic1 deep basic2"
+ tests="version basica basicb basicc basic1 deep basic2"
tests="${tests} files spacefiles commit-readonly"
# Branching, tagging, removing, adding, multiple directories
- tests="${tests} rdiff diff death death2 rmadd rmadd2 dirs dirs2"
- tests="${tests} branches branches2 tagc tagf"
+ 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} join join2 join3 join-readonly-conflict join-admin"
+ tests="${tests} join join2 join3 join-readonly-conflict"
+ tests="${tests} join-admin join-admin-2"
tests="${tests} new newb conflicts conflicts2 conflicts3"
tests="${tests} clean"
# Checking out various places (modules, checkout -d, &c)
@@ -642,11 +678,11 @@ if test x"$*" = x; then
tests="${tests} mkmodules-temp-file-removal"
tests="${tests} cvsadm emptydir abspath toplevel toplevel2"
# Log messages, error messages.
- tests="${tests} mflag editor errmsg1 errmsg2"
+ tests="${tests} mflag editor errmsg1 errmsg2 adderrmsg"
# Watches, binary files, history browsing, &c.
tests="${tests} devcom devcom2 devcom3 watch4 watch5"
tests="${tests} unedit-without-baserev"
- tests="${tests} ignore binfiles binfiles2 binfiles3"
+ tests="${tests} ignore ignore-on-branch binfiles binfiles2 binfiles3"
tests="${tests} mcopy binwrap binwrap2"
tests="${tests} binwrap3 mwrap info taginfo config"
tests="${tests} serverpatch log log2 logopt ann ann-id"
@@ -670,21 +706,20 @@ 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"
else
tests="$*"
fi
# a simple function to compare directory contents
#
-# Returns: {nothing}
-# Side Effects: ISDIFF := true|false
+# Returns: 0 for same, 1 for different
#
directory_cmp ()
{
OLDPWD=`pwd`
DIR_1=$1
DIR_2=$2
- ISDIFF=false
cd $DIR_1
find . -print | fgrep -v /CVS | sort > /tmp/dc$$d1
@@ -698,8 +733,7 @@ directory_cmp ()
then
:
else
- ISDIFF=true
- return
+ return 1
fi
cd $OLDPWD
while read a
@@ -707,17 +741,821 @@ directory_cmp ()
if test -f $DIR_1/"$a" ; then
cmp -s $DIR_1/"$a" $DIR_2/"$a"
if test $? -ne 0 ; then
- ISDIFF=true
+ return 1
fi
fi
done < /tmp/dc$$d1
rm -f /tmp/dc$$*
+ return 0
+}
+
+
+
+#
+# The following 4 functions are used by the diffmerge1 test case. They set up,
+# respectively, the four versions of the files necessary:
+#
+# 1. Ancestor revisions.
+# 2. "Your" changes.
+# 3. "My" changes.
+# 4. Expected merge result.
+#
+
+# Create ancestor revisions for diffmerge1
+diffmerge_create_older_files() {
+ # This test case was supplied by Noah Friedman:
+ cat >testcase01 <<EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+ /* Instantiates a Button with origin (0, 0) and zero width and height.
+ * You must call an initializer method to properly initialize the Button.
+ */
+ public Button ()
+ {
+ super ();
+
+ _titleColor = Color.black;
+ _disabledTitleColor = Color.gray;
+ _titleFont = Font.defaultFont ();
+ }
+
+ /* Convenience constructor for instantiating a Button with
+ * bounds x, y, width, and height. Equivalent to
+ * foo = new Button ();
+ * foo.init (x, y, width, height);
+ */
+ public Button (int x, int y, int width, int height)
+ {
+ this ();
+ init (x, y, width, height);
+ }
+}
+EOF
+
+ # This test case was supplied by Jacob Burckhardt:
+ cat >testcase02 <<EOF
+a
+a
+a
+a
+a
+EOF
+
+ # This test case was supplied by Karl Tomlinson who also wrote the
+ # patch which lets CVS correctly handle this and several other cases:
+ cat >testcase03 <<EOF
+x
+s
+a
+b
+s
+y
+EOF
+
+ # This test case was supplied by Karl Tomlinson:
+ cat >testcase04 <<EOF
+s
+x
+m
+m
+x
+s
+v
+s
+x
+m
+m
+x
+s
+EOF
+
+ # This test case was supplied by Karl Tomlinson:
+ cat >testcase05 <<EOF
+s
+x
+m
+m
+x
+x
+x
+x
+x
+x
+x
+x
+x
+x
+s
+s
+s
+s
+s
+s
+s
+s
+s
+s
+v
+EOF
+
+ # This test case was supplied by Jacob Burckhardt:
+ cat >testcase06 <<EOF
+g
+
+
+
+
+
+
+
+
+
+
+
+i
+EOF
+
+ # This test is supposed to verify that the horizon lines are the same
+ # for both 2-way diffs, but unfortunately, it does not fail with the
+ # old version of cvs. However, Karl Tomlinson still thought it would
+ # be good to test it anyway:
+ cat >testcase07 <<EOF
+h
+f
+
+
+
+
+
+
+
+
+
+g
+r
+
+
+
+i
+
+
+
+
+
+
+
+
+
+
+i
+EOF
+
+ # This test case was supplied by Jacob Burckhardt:
+ cat >testcase08 <<EOF
+Both changes move this line to the end of the file.
+
+no
+changes
+here
+
+First change will delete this line.
+
+First change will also delete this line.
+
+ no
+ changes
+ here
+
+Second change will change it here.
+
+ no
+ changes
+ here
+EOF
+
+ # This test case was supplied by Jacob Burckhardt. Note that I do not
+ # think cvs has ever failed with this case, but I include it anyway,
+ # since I think it is a hard case. It is hard because Peter Miller's
+ # fmerge utility fails on it:
+ cat >testcase09 <<EOF
+m
+a
+{
+}
+b
+{
+}
+EOF
+
+ # This test case was supplied by Martin Dorey and simplified by Jacob
+ # Burckhardt:
+ cat >testcase10 <<EOF
+
+ petRpY ( MtatRk );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );
+ OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
+
+ Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+ fV ( Y < 16 )
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ Y * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+ elke
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+
+}
+
+
+/****************************************************************************
+* *
+* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
+* *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
+
+ petRpY ( MtatRk );
+
+}
+ HfkQipfte ( waYdle, /* waYdle */
+ waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
+ (coYkt RfYt8*) nRVVep, /* nRVVep */
+ 0, /* MRrepVlRoRk KfxoYfkL */
+ beYgtz /* nEtek to Apfte */
+ );
+
+ petRpY ( Zy );
+}
+EOF
+}
+
+# Create "your" revisions for diffmerge1
+diffmerge_create_your_files() {
+ # remove the Button() method
+ cat >testcase01 <<\EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+ /* Instantiates a Button with origin (0, 0) and zero width and height.
+ * You must call an initializer method to properly initialize the Button.
+ */
+ public Button ()
+ {
+ super ();
+
+ _titleColor = Color.black;
+ _disabledTitleColor = Color.gray;
+ _titleFont = Font.defaultFont ();
+ }
+}
+EOF
+
+ cat >testcase02 <<\EOF
+y
+a
+a
+a
+a
+EOF
+
+ cat >testcase03 <<\EOF
+x
+s
+a
+b
+s
+b
+s
+y
+EOF
+
+ cat >testcase04 <<\EOF
+s
+m
+s
+v
+s
+m
+s
+EOF
+
+ cat >testcase05 <<\EOF
+v
+s
+m
+s
+s
+s
+s
+s
+s
+s
+s
+s
+s
+v
+EOF
+
+ # Test case 6 and test case 7 both use the same input files, but they
+ # order the input files differently. In one case, a certain file is
+ # used as the older file, but in the other test case, that same file
+ # is used as the file which has changes. I could have put echo
+ # commands here, but since the echo lines would be the same as those
+ # in the previous function, I decided to save space and avoid repeating
+ # several lines of code. Instead, I merely swap the files:
+ mv testcase07 tmp
+ mv testcase06 testcase07
+ mv tmp testcase06
+
+ # Make the date newer so that cvs thinks that the files are changed:
+ touch testcase06 testcase07
+
+ cat >testcase08 <<\EOF
+no
+changes
+here
+
+First change has now added this in.
+
+ no
+ changes
+ here
+
+Second change will change it here.
+
+ no
+ changes
+ here
+
+Both changes move this line to the end of the file.
+EOF
+
+ cat >testcase09 <<\EOF
+
+m
+a
+{
+}
+b
+{
+}
+c
+{
+}
+EOF
+
+ cat >testcase10 <<\EOF
+
+ fV ( BzQkV_URYYfYg ) (*jfle_Uecopdk)[0].jfle_Uecopd_KRLIep = ZpfgfYal_jUK;
+
+ petRpY ( MtatRk );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ fV ( jfle_Uecopd_KRLIep < 16 )
+ {
+ MtatRk = Uead_Ktz_qjT_jfle_Uecopd ( jfle_Uecopd_KRLIep, (uofd*)nRVVep );
+ }
+ elke
+ {
+ MtatRk = ZreY_GttpfIRte_MtpeaL ( qjT_jfle_Uecopdk, qjT_jfle_Uecopd_BoRYt, HGTG_TvFD, KXbb, KXbb, &acI );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );
+ OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
+
+ Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ fV ( Y < 16 )
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ Y * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+ elke
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+
+ petRpY ( MtatRk );
+
+}
+
+
+/****************************************************************************
+* *
+* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
+* *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
+
+ petRpY ( MtatRk );
+
+}
+ HfkQipfte ( waYdle, /* waYdle */
+ waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
+ (coYkt RfYt8*) nRVVep, /* nRVVep */
+ 0, /* MRrepVlRoRk KfxoYfkL */
+ beYgtz /* nEtek to Apfte */
+ );
+
+ petRpY ( Zy );
+}
+
+EOF
+}
+
+# Create "my" revisions for diffmerge1
+diffmerge_create_my_files() {
+ # My working copy still has the Button() method, but I
+ # comment out some code at the top of the class.
+ cat >testcase01 <<\EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+ /* Instantiates a Button with origin (0, 0) and zero width and height.
+ * You must call an initializer method to properly initialize the Button.
+ */
+ public Button ()
+ {
+ super ();
+
+ // _titleColor = Color.black;
+ // _disabledTitleColor = Color.gray;
+ // _titleFont = Font.defaultFont ();
+ }
+
+ /* Convenience constructor for instantiating a Button with
+ * bounds x, y, width, and height. Equivalent to
+ * foo = new Button ();
+ * foo.init (x, y, width, height);
+ */
+ public Button (int x, int y, int width, int height)
+ {
+ this ();
+ init (x, y, width, height);
+ }
+}
+EOF
+
+ cat >testcase02 <<\EOF
+a
+a
+a
+a
+m
+EOF
+
+ cat >testcase03 <<\EOF
+x
+s
+c
+s
+b
+s
+y
+EOF
+
+ cat >testcase04 <<\EOF
+v
+s
+x
+m
+m
+x
+s
+v
+s
+x
+m
+m
+x
+s
+v
+EOF
+
+ # Note that in test case 5, there are no changes in the "mine"
+ # section, which explains why there is no command here which writes to
+ # file testcase05.
+
+ # no changes for testcase06
+
+ # The two branches make the same changes:
+ cp ../yours/testcase07 .
+
+ cat >testcase08 <<\EOF
+no
+changes
+here
+
+First change will delete this line.
+
+First change will also delete this line.
+
+ no
+ changes
+ here
+
+Second change has now changed it here.
+
+ no
+ changes
+ here
+
+Both changes move this line to the end of the file.
+EOF
+
+ cat >testcase09 <<\EOF
+m
+a
+{
+}
+b
+{
+}
+c
+{
+}
+EOF
+
+ cat >testcase10 <<\EOF
+
+ petRpY ( MtatRk );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );
+ OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
+
+ Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+ fV ( Y < 16 )
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ Y * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+ elke
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+
+}
+
+
+/****************************************************************************
+* *
+* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
+* *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
+
+ petRpY ( MtatRk );
+
+}
+ HfkQipfte ( waYdle, /* waYdle */
+ waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
+ (coYkt RfYt8*) nRVVep, /* nRVVep */
+ beYgtz /* nEtek to Apfte */
+ );
+
+ petRpY ( Zy );
+}
+
+EOF
+}
+
+# Create expected results of merge for diffmerge1
+diffmerge_create_expected_files() {
+ cat >testcase01 <<\EOF
+// Button.java
+
+package random.application;
+
+import random.util.*;
+
+public class Button
+{
+ /* Instantiates a Button with origin (0, 0) and zero width and height.
+ * You must call an initializer method to properly initialize the Button.
+ */
+ public Button ()
+ {
+ super ();
+
+ // _titleColor = Color.black;
+ // _disabledTitleColor = Color.gray;
+ // _titleFont = Font.defaultFont ();
+ }
+}
+EOF
+
+ cat >testcase02 <<\EOF
+y
+a
+a
+a
+m
+EOF
+
+ cat >testcase03 <<\EOF
+x
+s
+c
+s
+b
+s
+b
+s
+y
+EOF
+
+ cat >testcase04 <<\EOF
+v
+s
+m
+s
+v
+s
+m
+s
+v
+EOF
+
+ # Since there are no changes in the "mine" section, just take exactly
+ # the version in the "yours" section:
+ cp ../yours/testcase05 .
+
+ cp ../yours/testcase06 .
+
+ # Since the two branches make the same changes, the result should be
+ # the same as both branches. Here, I happen to pick yours to copy from,
+ # but I could have also picked mine, since the source of the copy is
+ # the same in either case. However, the mine has already been
+ # altered by the update command, so don't use it. Instead, use the
+ # yours section which has not had an update on it and so is unchanged:
+ cp ../yours/testcase07 .
+
+ cat >testcase08 <<\EOF
+no
+changes
+here
+
+First change has now added this in.
+
+ no
+ changes
+ here
+
+Second change has now changed it here.
+
+ no
+ changes
+ here
+
+Both changes move this line to the end of the file.
+EOF
+
+ cat >testcase09 <<\EOF
+
+m
+a
+{
+}
+b
+{
+}
+c
+{
+}
+EOF
+
+ cat >testcase10 <<\EOF
+
+ fV ( BzQkV_URYYfYg ) (*jfle_Uecopdk)[0].jfle_Uecopd_KRLIep = ZpfgfYal_jUK;
+
+ petRpY ( MtatRk );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ fV ( jfle_Uecopd_KRLIep < 16 )
+ {
+ MtatRk = Uead_Ktz_qjT_jfle_Uecopd ( jfle_Uecopd_KRLIep, (uofd*)nRVVep );
+ }
+ elke
+ {
+ MtatRk = ZreY_GttpfIRte_MtpeaL ( qjT_jfle_Uecopdk, qjT_jfle_Uecopd_BoRYt, HGTG_TvFD, KXbb, KXbb, &acI );
+ fV ( MtatRk != Zy ) UDTXUK_DUUZU ( BGKT_ZFDK_qjT_HGTG );
+
+ MtatRk = MQfr_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_KRLIep * jfle_Uecopd_MfJe_fY_nEtek );
+ OjZy MtatRk = Uead_GttpfIRte_MtpeaL ( &acI, jfle_Uecopd_MfJe_fY_nEtek, nRVVep );
+
+ Bloke_GttpfIRte_MtpeaL ( &acI );
+MTGTXM Uead_Ktz_qjT_jfle_Uecopd ( fYt Y, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ fV ( Y < 16 )
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ Y * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+ elke
+ {
+ petRpY ( Uead_Mectopk ( noot_Uecopd.qVtqfppHatabcY0 * noot_Uecopd.MectopkFepBlRktep +
+ ( Y - 16 ) * jfle_Uecopd_MfJe_fY_Mectopk,
+ jfle_Uecopd_MfJe_fY_Mectopk,
+ nRVVep ) );
+ }
+
+ petRpY ( MtatRk );
+
+}
+
+
+/****************************************************************************
+* *
+* Uead Mectopk ( Uelatfue to tze cRppeYt raptftfoY ) *
+* *
+****************************************************************************/
+
+MTGTXM Uead_Mectopk ( RfYt64 Mtapt_Mectop, RfYt64 KRL_Mectopk, uofd *nRVVep )
+{
+MTGTXM MtatRk = Zy;
+
+ MtatRk = Uead_HfkQ ( FaptftfoY_TaIle.Uelatfue_Mectop + Mtapt_Mectop, KRL_Mectopk, nRVVep );
+
+ petRpY ( MtatRk );
+
+}
+ HfkQipfte ( waYdle, /* waYdle */
+ waYdleFok, /* ZVVket VpoL ktapt oV dfkQ */
+ (coYkt RfYt8*) nRVVep, /* nRVVep */
+ beYgtz /* nEtek to Apfte */
+ );
+
+ petRpY ( Zy );
+}
+
+EOF
}
# Set up CVSROOT (the crerepos tests will test operating without CVSROOT set).
CVSROOT_DIRNAME=${TESTDIR}/cvsroot
-CVSROOT=${CVSROOT_DIRNAME} ; export CVSROOT
-if test "x$remote" = xyes; then
+if $remote; then
# Currently we test :fork: and :ext: (see crerepos test).
# Testing :pserver: would be hard (inetd issues).
# Also :ext: and :fork support CVS_SERVER in a convenient way.
@@ -726,6 +1564,8 @@ if test "x$remote" = xyes; then
# difference in modes-15 (see comments there).
CVSROOT=:fork:${CVSROOT_DIRNAME} ; export CVSROOT
CVS_SERVER=${testcvs}; export CVS_SERVER
+else
+ CVSROOT=${CVSROOT_DIRNAME} ; export CVSROOT
fi
dotest 1 "${testcvs} init" ''
@@ -733,7 +1573,40 @@ dotest 1a "${testcvs} init" ''
### The big loop
for what in $tests; do
+ if test -n "$fromtest" ; then
+ if test $fromtest = $what ; then
+ unset fromtest
+ else
+ continue
+ fi
+ fi
case $what in
+
+ version)
+ # We've had cases where the version command started dumping core,
+ # so we might as well test it
+ dotest version-1 "${testcvs} --version" \
+'
+Concurrent Versions System (CVS) [0-9.]*.*
+
+Copyright (c) [-0-9]* Brian Berliner, david d .zoo. zuhn,
+ Jeff Polk, and other authors
+
+CVS may be copied only under the terms of the GNU General Public License,
+a copy of which can be found with the CVS distribution kit.
+
+Specify the --help option for further information about CVS'
+
+ if $remote; then
+ dotest version-2r "${testcvs} version" \
+'Client: Concurrent Versions System (CVS) [0-9.]* (client/server)
+Server: Concurrent Versions System (CVS) [0-9.]* (client/server)'
+ else
+ dotest version-2 "${testcvs} version" \
+'Concurrent Versions System (CVS) [0-9.]*.*'
+ fi
+ ;;
+
basica)
# Similar in spirit to some of the basic1, and basic2
# tests, but hopefully a lot faster. Also tests operating on
@@ -748,7 +1621,7 @@ for what in $tests; do
dotest basica-0a "${testcvs} -q co -l ." ''
mkdir first-dir
dotest basica-0b "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd ..
rm -r 1
@@ -765,17 +1638,17 @@ for what in $tests; do
# Remote CVS gives the "cannot open CVS/Entries" error, which is
# clearly a bug, but not a simple one to fix.
dotest basica-1a10 "${testcvs} -n add sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository" \
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository" \
"${PROG} add: cannot open CVS/Entries for reading: No such file or directory
-Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
dotest_fail basica-1a11 \
"test -d ${CVSROOT_DIRNAME}/first-dir/sdir" ''
dotest basica-2 "${testcvs} add sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
cd sdir
mkdir ssdir
dotest basica-3 "${testcvs} add ssdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir/ssdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir added to the repository"
cd ssdir
echo ssfile >ssfile
@@ -797,16 +1670,16 @@ ${PROG}"' \[[a-z]* aborted\]: correct above errors first!' \
${PROG} "'\[[a-z]* aborted\]: correct the above errors first!'
cd ../..
dotest basica-5 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
done
Checking in sdir/ssdir/ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
initial revision: 1\.1
done"
dotest_fail basica-5a \
"${testcvs} -q tag BASE sdir/ssdir/ssfile" \
"${PROG} [a-z]*: Attempt to add reserved tag name BASE
-${PROG} \[[a-z]* aborted\]: failed to set tag BASE to revision 1\.1 in ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v"
+${PROG} \[[a-z]* aborted\]: failed to set tag BASE to revision 1\.1 in ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v"
dotest basica-5b "${testcvs} -q tag NOT_RESERVED" \
'T sdir/ssdir/ssfile'
@@ -815,11 +1688,11 @@ ${PROG} \[[a-z]* aborted\]: failed to set tag BASE to revision 1\.1 in ${TESTDIR
dotest_status basica-6.2 1 "${testcvs} -q diff -c" \
"Index: sdir/ssdir/ssfile
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
retrieving revision 1\.1
diff -c -r1\.1 ssfile
-\*\*\* sdir/ssdir/ssfile [0-9/]* [0-9:]* 1\.1
---- sdir/ssdir/ssfile [0-9/]* [0-9:]*
+\*\*\* sdir/ssdir/ssfile ${RFCDATE} 1\.1
+--- sdir/ssdir/ssfile ${RFCDATE}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
--- 1,2 ----
@@ -828,11 +1701,11 @@ ${PLUS} ssfile line 2"
dotest_status basica-6.3 1 "${testcvs} -q diff -c -rBASE" \
"Index: sdir/ssdir/ssfile
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
retrieving revision 1\.1
diff -c -r1\.1 ssfile
-\*\*\* sdir/ssdir/ssfile [0-9/]* [0-9:]* 1\.1
---- sdir/ssdir/ssfile [0-9/]* [0-9:]*
+\*\*\* sdir/ssdir/ssfile ${RFCDATE} 1\.1
+--- sdir/ssdir/ssfile ${RFCDATE}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
--- 1,2 ----
@@ -840,7 +1713,7 @@ diff -c -r1\.1 ssfile
${PLUS} ssfile line 2"
dotest basica-7 "${testcvs} -q ci -m modify-it" \
"Checking in sdir/ssdir/ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
new revision: 1\.2; previous revision: 1\.1
done"
dotest_fail basica-nonexist "${testcvs} -q ci nonexist" \
@@ -853,31 +1726,31 @@ done"
dotest basica-8a0 "${testcvs} -q ci -m not-modified ssfile" ''
dotest basica-8a "${testcvs} -q ci -f -m force-it" \
"Checking in ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
new revision: 1\.3; previous revision: 1\.2
done"
dotest basica-8a1 "${testcvs} -q ci -m bump-it -r 2.0" \
"Checking in ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
new revision: 2\.0; previous revision: 1\.3
done"
# -f should not be necessary, but it should be harmless.
# Also test the "-r 3" (rather than "-r 3.0") usage.
dotest basica-8a2 "${testcvs} -q ci -m bump-it -f -r 3" \
"Checking in ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
new revision: 3\.1; previous revision: 2\.0
done"
# Test using -r to create a branch
dotest_fail basica-8a3 "${testcvs} -q ci -m bogus -r 3.0.0" \
"Checking in ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v: can't find branch point 3\.0
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: can't find branch point 3\.0
${PROG} [a-z]*: could not check in ssfile"
dotest basica-8a4 "${testcvs} -q ci -m valid -r 3.1.2" \
"Checking in ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
new revision: 3\.1\.2\.1; previous revision: 3\.1
done"
# now get rid of the sticky tag and go back to the trunk
@@ -887,7 +1760,7 @@ done"
dotest basica-8b "${testcvs} -q diff -r1.2 -r1.3" \
"Index: sdir/ssdir/ssfile
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
retrieving revision 1\.2
retrieving revision 1\.3
diff -r1\.2 -r1\.3"
@@ -895,7 +1768,7 @@ diff -r1\.2 -r1\.3"
dotest_fail basica-8b1 "${testcvs} -q diff -r1.2 -r1.3 -C 3isacrowd" \
"Index: sdir/ssdir/ssfile
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
retrieving revision 1\.2
retrieving revision 1\.3
diff -C3isacrowd -r1\.2 -r1\.3
@@ -916,6 +1789,27 @@ ${PROG} [a-z]*: invalid context length argument"
1\.1 .'"${username}"' *[0-9a-zA-Z-]*.: ssfile
1\.2 .'"${username}"' *[0-9a-zA-Z-]*.: ssfile line 2'
+ # Test resurrecting with strange revision numbers
+ cd sdir/ssdir
+ dotest basica-r1 "${testcvs} rm -f ssfile" \
+"${PROG} [a-z]*: scheduling .ssfile. for removal
+${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
+ dotest basica-r2 "${testcvs} -q ci -m remove" \
+"Removing ssfile;
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+new revision: delete; previous revision: 3\.1
+done"
+ dotest basica-r3 "${testcvs} -q up -p -r 3.1 ssfile >ssfile" ""
+ dotest basica-r4 "${testcvs} add ssfile" \
+"${PROG} [a-z]*: re-adding file ssfile (in place of dead revision 3\.2)
+${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
+ dotest basica-r5 "${testcvs} -q ci -m resurrect" \
+"Checking in ssfile;
+${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v <-- ssfile
+new revision: 3\.3; previous revision: 3\.2
+done"
+ cd ../..
+
# As long as we have a file with a few revisions, test
# a few "cvs admin -o" invocations.
cd sdir/ssdir
@@ -923,40 +1817,42 @@ ${PROG} [a-z]*: invalid context length argument"
"${PROG} [a-z]*: while processing more than one file:
${PROG} \[[a-z]* aborted\]: attempt to specify a numeric revision"
dotest basica-o2 "${testcvs} admin -o 1.2::1.2 ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
done"
dotest basica-o2a "${testcvs} admin -o 1.1::NOT_RESERVED ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
done"
dotest_fail basica-o2b "${testcvs} admin -o 1.1::NOT_EXIST ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v: Revision NOT_EXIST doesn't exist.
-${PROG} [a-z]*: cannot modify RCS file for .ssfile."
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v: Revision NOT_EXIST doesn't exist.
+${PROG} [a-z]*: RCS file for .ssfile. not modified\."
dotest basica-o3 "${testcvs} admin -o 1.2::1.3 ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
done"
dotest basica-o4 "${testcvs} admin -o 3.1:: ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
+deleting revision 3\.3
+deleting revision 3\.2
done"
dotest basica-o5 "${testcvs} admin -o ::1.1 ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
done"
dotest basica-o5a "${testcvs} -n admin -o 1.2::3.1 ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
deleting revision 2\.0
deleting revision 1\.3
done"
dotest basica-o6 "${testcvs} admin -o 1.2::3.1 ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
deleting revision 2\.0
deleting revision 1\.3
done"
dotest basica-o6a "${testcvs} admin -o 3.1.2: ssfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
deleting revision 3\.1\.2\.1
done"
dotest basica-o7 "${testcvs} log -N ssfile" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
Working file: ssfile
head: 3\.1
branch:
@@ -996,10 +1892,10 @@ add-it
"${PROG} [a-z]*: scheduling file .topfile. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest basicb-0c "${testcvs} -q ci -m add-it topfile" \
-"RCS file: ${TESTDIR}/cvsroot/topfile,v
+"RCS file: ${CVSROOT_DIRNAME}/topfile,v
done
Checking in topfile;
-${TESTDIR}/cvsroot/topfile,v <-- topfile
+${CVSROOT_DIRNAME}/topfile,v <-- topfile
initial revision: 1\.1
done"
cd ..
@@ -1015,7 +1911,7 @@ done"
dotest basicb-0d0 "${testcvs} -q co -l ." ""
mkdir first-dir
dotest basicb-0e "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd ..
rm -r 2
@@ -1032,10 +1928,10 @@ done"
# (we're using relative paths).
: dotest basicb-1b "cat CVS/Repository" \
-"${TESTDIR}/cvsroot/\." \
+"${CVSROOT_DIRNAME}/\." \
"\."
dotest basicb-1c "cat first-dir/CVS/Repository" \
-"${TESTDIR}/cvsroot/first-dir" \
+"${CVSROOT_DIRNAME}/first-dir" \
"first-dir"
cd first-dir
@@ -1044,8 +1940,8 @@ done"
# special only when it is directly in $CVSROOT/CVSROOT.
mkdir Emptydir sdir2
dotest basicb-2 "${testcvs} add Emptydir sdir2" \
-"Directory ${TESTDIR}/cvsroot/first-dir/Emptydir added to the repository
-Directory ${TESTDIR}/cvsroot/first-dir/sdir2 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/Emptydir added to the repository
+Directory ${CVSROOT_DIRNAME}/first-dir/sdir2 added to the repository"
cd Emptydir
echo sfile1 starts >sfile1
dotest basicb-2a10 "${testcvs} -n add sfile1" \
@@ -1081,22 +1977,22 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
${PROG} [a-z]*: but CVS uses CVS for its own purposes; skipping CVS directory"
cd ..
dotest basicb-5 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Emptydir/sfile1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Emptydir/sfile1,v
done
Checking in Emptydir/sfile1;
-${TESTDIR}/cvsroot/first-dir/Emptydir/sfile1,v <-- sfile1
+${CVSROOT_DIRNAME}/first-dir/Emptydir/sfile1,v <-- sfile1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v
done
Checking in sdir2/sfile2;
-${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v <-- sfile2
+${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v <-- sfile2
initial revision: 1\.1
done"
echo sfile1 develops >Emptydir/sfile1
dotest basicb-6 "${testcvs} -q ci -m modify" \
"Checking in Emptydir/sfile1;
-${TESTDIR}/cvsroot/first-dir/Emptydir/sfile1,v <-- sfile1
+${CVSROOT_DIRNAME}/first-dir/Emptydir/sfile1,v <-- sfile1
new revision: 1\.2; previous revision: 1\.1
done"
dotest basicb-7 "${testcvs} -q tag release-1" 'T Emptydir/sfile1
@@ -1104,7 +2000,7 @@ T sdir2/sfile2'
echo not in time for release-1 >sdir2/sfile2
dotest basicb-8 "${testcvs} -q ci -m modify-2" \
"Checking in sdir2/sfile2;
-${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v <-- sfile2
+${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v <-- sfile2
new revision: 1\.2; previous revision: 1\.1
done"
# See if CVS can correctly notice when an invalid numeric
@@ -1146,19 +2042,19 @@ U newdir/first-dir/sdir2/sfile2'
# is defined (we're using relative paths).
: dotest basicb-9b "cat CVS/Repository" \
-"${TESTDIR}/cvsroot/\." \
+"${CVSROOT_DIRNAME}/\." \
"\."
dotest basicb-9c "cat newdir/CVS/Repository" \
-"${TESTDIR}/cvsroot/\." \
+"${CVSROOT_DIRNAME}/\." \
"\."
dotest basicb-9d "cat newdir/first-dir/CVS/Repository" \
-"${TESTDIR}/cvsroot/first-dir" \
+"${CVSROOT_DIRNAME}/first-dir" \
"first-dir"
dotest basicb-9e "cat newdir/first-dir/Emptydir/CVS/Repository" \
-"${TESTDIR}/cvsroot/first-dir/Emptydir" \
+"${CVSROOT_DIRNAME}/first-dir/Emptydir" \
"first-dir/Emptydir"
dotest basicb-9f "cat newdir/first-dir/sdir2/CVS/Repository" \
-"${TESTDIR}/cvsroot/first-dir/sdir2" \
+"${CVSROOT_DIRNAME}/first-dir/sdir2" \
"first-dir/sdir2"
dotest basicb-10 "cat newdir/first-dir/Emptydir/sfile1 newdir/first-dir/sdir2/sfile2" \
@@ -1188,24 +2084,24 @@ U sub1/sub2/sdir2/sfile2"
dotest basicb-14 "${testcvs} -q co -l ." 'U topfile'
mkdir second-dir
dotest basicb-15 "${testcvs} add second-dir" \
-"Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
cd second-dir
touch aa
dotest basicb-16 "${testcvs} add aa" \
"${PROG} [a-z]*: scheduling file .aa. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest basicb-17 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/second-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/second-dir/aa,v
done
Checking in aa;
-${TESTDIR}/cvsroot/second-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/second-dir/aa,v <-- aa
initial revision: 1\.1
done"
cd ..
# Try to remove all revisions in a file.
dotest_fail basicb-o1 "${testcvs} admin -o1.1 topfile" \
-"RCS file: ${TESTDIR}/cvsroot/topfile,v
+"RCS file: ${CVSROOT_DIRNAME}/topfile,v
deleting revision 1\.1
${PROG} \[[a-z]* aborted\]: attempt to delete all revisions"
dotest basicb-o2 "${testcvs} -q update -d first-dir" \
@@ -1213,7 +2109,7 @@ ${PROG} \[[a-z]* aborted\]: attempt to delete all revisions"
U first-dir/sdir2/sfile2"
dotest_fail basicb-o3 \
"${testcvs} admin -o1.1:1.2 first-dir/sdir2/sfile2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir2/sfile2,v
deleting revision 1\.2
deleting revision 1\.1
${PROG} \[[a-z]* aborted\]: attempt to delete all revisions"
@@ -1234,7 +2130,7 @@ ${PROG} \[admin aborted\]: specify ${PROG} -H admin for usage information"
cd ..
rmdir 1
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -1253,8 +2149,8 @@ ${PROG} \[[a-z]* aborted\]: there is no version here; run .${PROG} checkout. fir
dotest basicc-2 "${testcvs} -q co -l ." ''
mkdir first-dir second-dir
dotest basicc-3 "${testcvs} add first-dir second-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository
-Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
# Old versions of CVS often didn't create this top-level CVS
# directory in the first place. I think that maybe the only
# way to get it to work currently is to let CVS create it,
@@ -1311,7 +2207,7 @@ ${PROG} [a-z]*: Updating second-dir"
basic1)
# first dive - add a files, first singly, then in a group.
mkdir ${CVSROOT_DIRNAME}/first-dir
- mkdir 1; cd 1
+ mkdir basic1; cd basic1
# check out an empty directory
dotest basic1-1 "${testcvs} -q co first-dir" ''
@@ -1444,28 +2340,28 @@ A first-dir/file5"
cd first-dir
dotest basic1-14-add-ci \
"${testcvs} commit -m test file2 file3 file4 file5" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file3,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file5,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file5,v
done
Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
initial revision: 1\.1
done"
dotest basic1-15-add-ci \
@@ -1476,7 +2372,7 @@ done"
File: file2 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file2,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file2,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1485,7 +2381,7 @@ File: file2 Status: Up-to-date
File: file3 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file3,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file3,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1494,7 +2390,7 @@ File: file3 Status: Up-to-date
File: file4 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file4,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file4,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1503,7 +2399,7 @@ File: file4 Status: Up-to-date
File: file5 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file5,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file5,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -1561,7 +2457,7 @@ R file5"
File: no file file2 Status: Locally Removed
Working revision: -1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file2,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file2,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1570,7 +2466,7 @@ File: no file file2 Status: Locally Removed
File: no file file3 Status: Locally Removed
Working revision: -1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file3,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file3,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1579,7 +2475,7 @@ File: no file file3 Status: Locally Removed
File: no file file4 Status: Locally Removed
Working revision: -1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file4,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file4,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -1588,7 +2484,7 @@ File: no file file4 Status: Locally Removed
File: no file file5 Status: Locally Removed
Working revision: -1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file5,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file5,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -1628,19 +2524,19 @@ R first-dir/file5"
cd first-dir
dotest basic1-14-rm-ci "${testcvs} -q commit -m test" \
"Removing file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: delete; previous revision: 1\.1
done
Removing file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
new revision: delete; previous revision: 1\.1
done
Removing file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: delete; previous revision: 1\.1
done
Removing file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
new revision: delete; previous revision: 1\.1
done"
dotest basic1-15-rm-ci \
@@ -1674,12 +2570,12 @@ done"
cd ..
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
- rm -r 1
+ rm -r basic1
rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
@@ -1691,7 +2587,7 @@ done"
for i in dir1 dir2 dir3 dir4 dir5 dir6 dir7 dir8; do
mkdir $i
dotest deep-2-$i "${testcvs} add $i" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir1[/dir0-9]* added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1[/dir0-9]* added to the repository"
cd $i
echo file1 >file1
dotest deep-3-$i "${testcvs} add file1" \
@@ -1700,52 +2596,52 @@ done"
done
cd ../../../../../../../../..
dotest_lit deep-4 "${testcvs} -q ci -m add-them first-dir" <<HERE
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file1,v
done
Checking in first-dir/dir1/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file1,v
done
Checking in first-dir/dir1/dir2/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/file1,v
done
Checking in first-dir/dir1/dir2/dir3/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/file1,v
done
Checking in first-dir/dir1/dir2/dir3/dir4/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v
done
Checking in first-dir/dir1/dir2/dir3/dir4/dir5/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v
done
Checking in first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v
done
Checking in first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v
done
Checking in first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1
initial revision: 1.1
done
HERE
@@ -1756,7 +2652,7 @@ HERE
"${PROG} [a-z]*: scheduling .file1. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest deep-4a1 "${testcvs} -q ci -m rm-it" "Removing file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
cd ../../..
@@ -1789,7 +2685,7 @@ ${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest deep-rm2 "${testcvs} -q update -d -P" 'R dir7/file1'
dotest deep-rm3 "test -d dir7" ''
dotest deep-rm4 "${testcvs} -q ci -m rm-it" "Removing dir7/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/dir7/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
dotest deep-rm5 "${testcvs} -q update -d -P" ''
@@ -1805,11 +2701,11 @@ ${PROG} [a-z]*: scheduling .dir5/dir6/file1. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove these files permanently"
dotest deep-rm8 "${testcvs} -q ci -m rm-it" \
"Removing dir5/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done
Removing dir5/dir6/file1;
-${TESTDIR}/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
dotest deep-rm9 "${testcvs} -q update -d -P" ''
@@ -1844,11 +2740,8 @@ done"
for i in first-dir dir1 dir2 ; do
if test ! -d $i ; then
mkdir $i
- if ${CVS} add $i >> ${LOGFILE}; then
- pass 29-$i
- else
- fail 29-$i
- fi
+ dotest basic2-2-$i "${testcvs} add $i" \
+"Directory ${CVSROOT_DIRNAME}/.*/$i added to the repository"
fi
cd $i
@@ -1857,31 +2750,93 @@ done"
echo $j > $j
done
- if ${CVS} add file6 file7 2>> ${LOGFILE}; then
- pass 30-$i-$j
- else
- fail 30-$i-$j
- fi
+ dotest basic2-3-$i "${testcvs} add file6 file7" \
+"${PROG} [a-z]*: scheduling file .file6. for addition
+${PROG} [a-z]*: scheduling file .file7. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
+
done
cd ../../..
- if ${CVS} update first-dir ; then
- pass 31
- else
- fail 31
- fi
+ dotest basic2-4 "${testcvs} update first-dir" \
+"${PROG} [a-z]*: Updating first-dir
+A first-dir/file6
+A first-dir/file7
+${PROG} [a-z]*: Updating first-dir/dir1
+A first-dir/dir1/file6
+A first-dir/dir1/file7
+${PROG} [a-z]*: Updating first-dir/dir1/dir2
+A first-dir/dir1/dir2/file6
+A first-dir/dir1/dir2/file7"
# fixme: doesn't work right for added files.
- if ${CVS} log first-dir >> ${LOGFILE}; then
- pass 32
- else
- fail 32
- fi
+ dotest basic2-5 "${testcvs} log first-dir" \
+"${PROG} [a-z]*: Logging first-dir
+${PROG} [a-z]*: file6 has been added, but not committed
+${PROG} [a-z]*: file7 has been added, but not committed
+${PROG} [a-z]*: Logging first-dir/dir1
+${PROG} [a-z]*: file6 has been added, but not committed
+${PROG} [a-z]*: file7 has been added, but not committed
+${PROG} [a-z]*: Logging first-dir/dir1/dir2
+${PROG} [a-z]*: file6 has been added, but not committed
+${PROG} [a-z]*: file7 has been added, but not committed"
+
+ dotest basic2-6 "${testcvs} status first-dir" \
+"${PROG} [a-z]*: Examining first-dir
+===================================================================
+File: file6 Status: Locally Added
- if ${CVS} status first-dir >> ${LOGFILE}; then
- pass 33
- else
- fail 33
- fi
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file7 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+${PROG} [a-z]*: Examining first-dir/dir1
+===================================================================
+File: file6 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file7 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+${PROG} [a-z]*: Examining first-dir/dir1/dir2
+===================================================================
+File: file6 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file7 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)"
# XXX why is this commented out???
# if ${CVS} diff -u first-dir >> ${LOGFILE} || test $? = 1 ; then
@@ -1890,17 +2845,54 @@ done"
# fail 34
# fi
- if ${CVS} ci -m "second dive" first-dir >> ${LOGFILE} 2>&1; then
- pass 35
- else
- fail 35
- fi
+ dotest basic2-8 "${testcvs} -q ci -m 'second dive' first-dir" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v
+done
+Checking in first-dir/file6;
+${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
+done
+Checking in first-dir/file7;
+${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v
+done
+Checking in first-dir/dir1/file6;
+${CVSROOT_DIRNAME}/first-dir/dir1/file6,v <-- file6
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
+done
+Checking in first-dir/dir1/file7;
+${CVSROOT_DIRNAME}/first-dir/dir1/file7,v <-- file7
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v
+done
+Checking in first-dir/dir1/dir2/file6;
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v <-- file6
+initial revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
+done
+Checking in first-dir/dir1/dir2/file7;
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v <-- file7
+initial revision: 1\.1
+done"
- if ${CVS} tag second-dive first-dir ; then
- pass 36
- else
- fail 36
- fi
+ dotest basic2-9 "${testcvs} tag second-dive first-dir" \
+"${PROG} [a-z]*: Tagging first-dir
+T first-dir/file6
+T first-dir/file7
+${PROG} [a-z]*: Tagging first-dir/dir1
+T first-dir/dir1/file6
+T first-dir/dir1/file7
+${PROG} [a-z]*: Tagging first-dir/dir1/dir2
+T first-dir/dir1/dir2/file6
+T first-dir/dir1/dir2/file7"
# third dive - in bunch o' directories, add bunch o' files,
# delete some, change some.
@@ -1914,40 +2906,228 @@ done"
# delete a file
rm file7
- if ${CVS} rm file7 2>> ${LOGFILE}; then
- pass 37-$i
- else
- fail 37-$i
- fi
+ dotest basic2-10-$i "${testcvs} rm file7" \
+"${PROG} [a-z]*: scheduling .file7. for removal
+${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
# and add a new file
echo file14 >file14
- if ${CVS} add file14 2>> ${LOGFILE}; then
- pass 38-$i
- else
- fail 38-$i
- fi
+ dotest basic2-11-$i "${testcvs} add file14" \
+"${PROG} [a-z]*: scheduling file .file14. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
done
+
cd ../../..
- if ${CVS} update first-dir ; then
- pass 39
- else
- fail 39
- fi
+ dotest basic2-12 "${testcvs} update first-dir" \
+"${PROG} [a-z]*: Updating first-dir
+A first-dir/file14
+M first-dir/file6
+R first-dir/file7
+${PROG} [a-z]*: Updating first-dir/dir1
+A first-dir/dir1/file14
+M first-dir/dir1/file6
+R first-dir/dir1/file7
+${PROG} [a-z]*: Updating first-dir/dir1/dir2
+A first-dir/dir1/dir2/file14
+M first-dir/dir1/dir2/file6
+R first-dir/dir1/dir2/file7"
# FIXME: doesn't work right for added files
- if ${CVS} log first-dir >> ${LOGFILE}; then
- pass 40
- else
- fail 40
- fi
+ dotest basic2-13 "${testcvs} log first-dir" \
+"${PROG} [a-z]*: Logging first-dir
+${PROG} [a-z]*: file14 has been added, but not committed
- if ${CVS} status first-dir >> ${LOGFILE}; then
- pass 41
- else
- fail 41
- fi
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v
+Working file: first-dir/file6
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
+Working file: first-dir/file7
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+=============================================================================
+${PROG} [a-z]*: Logging first-dir/dir1
+${PROG} [a-z]*: file14 has been added, but not committed
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v
+Working file: first-dir/dir1/file6
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
+Working file: first-dir/dir1/file7
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+=============================================================================
+${PROG} [a-z]*: Logging first-dir/dir1/dir2
+${PROG} [a-z]*: file14 has been added, but not committed
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v
+Working file: first-dir/dir1/dir2/file6
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+=============================================================================
+
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
+Working file: first-dir/dir1/dir2/file7
+head: 1\.1
+branch:
+locks: strict
+access list:
+symbolic names:
+ second-dive: 1\.1
+keyword substitution: kv
+total revisions: 1; selected revisions: 1
+description:
+----------------------------
+revision 1\.1
+date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
+second dive
+============================================================================="
+
+ dotest basic2-14 "${testcvs} status first-dir" \
+"${PROG} [a-z]*: Examining first-dir
+===================================================================
+File: file14 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file6 Status: Locally Modified
+
+ Working revision: 1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file6,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: no file file7 Status: Locally Removed
+
+ Working revision: -1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file7,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+${PROG} [a-z]*: Examining first-dir/dir1
+===================================================================
+File: file14 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file6 Status: Locally Modified
+
+ Working revision: 1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/file6,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: no file file7 Status: Locally Removed
+
+ Working revision: -1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/file7,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+${PROG} [a-z]*: Examining first-dir/dir1/dir2
+===================================================================
+File: file14 Status: Locally Added
+
+ Working revision: New file!
+ Repository revision: No revision control file
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: file6 Status: Locally Modified
+
+ Working revision: 1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)
+
+===================================================================
+File: no file file7 Status: Locally Removed
+
+ Working revision: -1\.1.*
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v
+ Sticky Tag: (none)
+ Sticky Date: (none)
+ Sticky Options: (none)"
# XXX why is this commented out?
# if ${CVS} diff -u first-dir >> ${LOGFILE} || test $? = 1 ; then
@@ -1956,113 +3136,213 @@ done"
# fail 42
# fi
- if ${CVS} ci -m "third dive" first-dir >>${LOGFILE} 2>&1; then
- pass 43
- else
- fail 43
- fi
- dotest 43.5 "${testcvs} -q update first-dir" ''
-
- if ${CVS} tag third-dive first-dir ; then
- pass 44
- else
- fail 44
- fi
+ dotest basic2-16 "${testcvs} ci -m 'third dive' first-dir" \
+"${PROG} [a-z]*: Examining first-dir
+${PROG} [a-z]*: Examining first-dir/dir1
+${PROG} [a-z]*: Examining first-dir/dir1/dir2
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file14,v
+done
+Checking in first-dir/file14;
+${CVSROOT_DIRNAME}/first-dir/file14,v <-- file14
+initial revision: 1\.1
+done
+Checking in first-dir/file6;
+${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6
+new revision: 1\.2; previous revision: 1\.1
+done
+Removing first-dir/file7;
+${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7
+new revision: delete; previous revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/file14,v
+done
+Checking in first-dir/dir1/file14;
+${CVSROOT_DIRNAME}/first-dir/dir1/file14,v <-- file14
+initial revision: 1\.1
+done
+Checking in first-dir/dir1/file6;
+${CVSROOT_DIRNAME}/first-dir/dir1/file6,v <-- file6
+new revision: 1\.2; previous revision: 1\.1
+done
+Removing first-dir/dir1/file7;
+${CVSROOT_DIRNAME}/first-dir/dir1/file7,v <-- file7
+new revision: delete; previous revision: 1\.1
+done
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file14,v
+done
+Checking in first-dir/dir1/dir2/file14;
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file14,v <-- file14
+initial revision: 1\.1
+done
+Checking in first-dir/dir1/dir2/file6;
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file6,v <-- file6
+new revision: 1\.2; previous revision: 1\.1
+done
+Removing first-dir/dir1/dir2/file7;
+${CVSROOT_DIRNAME}/first-dir/dir1/dir2/file7,v <-- file7
+new revision: delete; previous revision: 1\.1
+done"
+ dotest basic2-17 "${testcvs} -q update first-dir" ''
- if echo "yes" | ${CVS} release -d first-dir ; then
- pass 45
- else
- fail 45
- fi
+ dotest basic2-18 "${testcvs} tag third-dive first-dir" \
+"${PROG} [a-z]*: Tagging first-dir
+T first-dir/file14
+T first-dir/file6
+${PROG} [a-z]*: Tagging first-dir/dir1
+T first-dir/dir1/file14
+T first-dir/dir1/file6
+${PROG} [a-z]*: Tagging first-dir/dir1/dir2
+T first-dir/dir1/dir2/file14
+T first-dir/dir1/dir2/file6"
+
+ dotest basic2-19 "echo yes | ${testcvs} release -d first-dir" \
+"You have \[0\] altered files in this repository\.
+Are you sure you want to release (and delete) directory .first-dir.: "
# end of third dive
- if test -d first-dir ; then
- fail 45.5
- else
- pass 45.5
- fi
+ dotest_fail basic2-20 "test -d first-dir" ""
# now try some rtags
# rtag HEADS
- if ${CVS} rtag rtagged-by-head first-dir ; then
- pass 46
- else
- fail 46
- fi
+ dotest basic2-21 "${testcvs} rtag rtagged-by-head first-dir" \
+"${PROG} [a-z]*: Tagging first-dir
+${PROG} [a-z]*: Tagging first-dir/dir1
+${PROG} [a-z]*: Tagging first-dir/dir1/dir2"
# tag by tag
- if ${CVS} rtag -r rtagged-by-head rtagged-by-tag first-dir ; then
- pass 47
- else
- fail 47
- fi
+ dotest basic2-22 "${testcvs} rtag -r rtagged-by-head rtagged-by-tag first-dir" \
+"${PROG} [a-z]*: Tagging first-dir
+${PROG} [a-z]*: Tagging first-dir/dir1
+${PROG} [a-z]*: Tagging first-dir/dir1/dir2"
# tag by revision
- if ${CVS} rtag -r1.1 rtagged-by-revision first-dir ; then
- pass 48
- else
- fail 48
- fi
+ dotest basic2-23 "${testcvs} rtag -r1.1 rtagged-by-revision first-dir" \
+"${PROG} [a-z]*: Tagging first-dir
+${PROG} [a-z]*: Tagging first-dir/dir1
+${PROG} [a-z]*: Tagging first-dir/dir1/dir2"
# rdiff by revision
- if ${CVS} rdiff -r1.1 -rrtagged-by-head first-dir >> ${LOGFILE} || test $? = 1 ; then
- pass 49
- else
- fail 49
- fi
-
+ dotest basic2-24 "${testcvs} rdiff -r1.1 -rrtagged-by-head first-dir" \
+"${PROG} [a-z]*: Diffing first-dir
+Index: first-dir/file6
+diff -c first-dir/file6:1\.1 first-dir/file6:1\.2
+\*\*\* first-dir/file6:1\.1 .*
+--- first-dir/file6 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+ file6
+${PLUS} file6
+Index: first-dir/file7
+diff -c first-dir/file7:1\.1 first-dir/file7:removed
+\*\*\* first-dir/file7:1.1 .*
+--- first-dir/file7 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file7
+--- 0 ----
+${PROG} [a-z]*: Diffing first-dir/dir1
+Index: first-dir/dir1/file6
+diff -c first-dir/dir1/file6:1\.1 first-dir/dir1/file6:1\.2
+\*\*\* first-dir/dir1/file6:1\.1 .*
+--- first-dir/dir1/file6 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+ file6
+${PLUS} file6
+Index: first-dir/dir1/file7
+diff -c first-dir/dir1/file7:1\.1 first-dir/dir1/file7:removed
+\*\*\* first-dir/dir1/file7:1\.1 .*
+--- first-dir/dir1/file7 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file7
+--- 0 ----
+${PROG} [a-z]*: Diffing first-dir/dir1/dir2
+Index: first-dir/dir1/dir2/file6
+diff -c first-dir/dir1/dir2/file6:1\.1 first-dir/dir1/dir2/file6:1\.2
+\*\*\* first-dir/dir1/dir2/file6:1\.1 .*
+--- first-dir/dir1/dir2/file6 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+--- 1,2 ----
+ file6
+${PLUS} file6
+Index: first-dir/dir1/dir2/file7
+diff -c first-dir/dir1/dir2/file7:1\.1 first-dir/dir1/dir2/file7:removed
+\*\*\* first-dir/dir1/dir2/file7:1\.1 .*
+--- first-dir/dir1/dir2/file7 .*
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+\*\*\* 1 \*\*\*\*
+- file7
+--- 0 ----"
# now export by rtagged-by-head and rtagged-by-tag and compare.
- if ${CVS} export -r rtagged-by-head first-dir ; then
- pass 50
- else
- fail 50
- fi
+ 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"
mv first-dir 1dir
- if ${CVS} export -r rtagged-by-tag first-dir ; then
- pass 51
- else
- fail 51
- fi
-
- directory_cmp 1dir first-dir
-
- if $ISDIFF ; then
- fail 52
- else
- pass 52
- fi
+ dotest basic2-26 "${testcvs} export -r rtagged-by-tag 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-27 "directory_cmp 1dir first-dir"
rm -r 1dir first-dir
# checkout by revision vs export by rtagged-by-revision and compare.
- if ${CVS} export -rrtagged-by-revision -d export-dir first-dir ; then
- pass 53
- else
- fail 53
- fi
-
- if ${CVS} co -r1.1 first-dir ; then
- pass 54
- else
- fail 54
- fi
+ dotest basic2-28 "${testcvs} export -rrtagged-by-revision -d export-dir first-dir" \
+"${PROG} [a-z]*: Updating export-dir
+U export-dir/file14
+U export-dir/file6
+U export-dir/file7
+${PROG} [a-z]*: Updating export-dir/dir1
+U export-dir/dir1/file14
+U export-dir/dir1/file6
+U export-dir/dir1/file7
+${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 basic2-29 "${testcvs} co -r1.1 first-dir" \
+"${PROG} [a-z]*: Updating first-dir
+U first-dir/file14
+U first-dir/file6
+U first-dir/file7
+${PROG} [a-z]*: Updating first-dir/dir1
+U first-dir/dir1/file14
+U first-dir/dir1/file6
+U first-dir/dir1/file7
+${PROG} [a-z]*: Updating first-dir/dir1/dir2
+U first-dir/dir1/dir2/file14
+U first-dir/dir1/dir2/file6
+U first-dir/dir1/dir2/file7"
# directory copies are done in an oblique way in order to avoid a bug in sun's tmp filesystem.
mkdir first-dir.cpy ; (cd first-dir ; tar cf - . | (cd ../first-dir.cpy ; tar xf -))
- directory_cmp first-dir export-dir
-
- if $ISDIFF ; then
- fail 55
- else
- pass 55
- fi
+ dotest basic2-30 "directory_cmp first-dir export-dir"
# interrupt, while we've got a clean 1.1 here, let's import it
# into a couple of other modules.
cd export-dir
- dotest_sort 56 "${testcvs} import -m first-import second-dir first-immigration immigration1 immigration1_0" \
+ dotest_sort basic2-31 "${testcvs} import -m first-import second-dir first-immigration immigration1 immigration1_0" \
"
N second-dir/dir1/dir2/file14
@@ -2075,23 +3355,25 @@ N second-dir/file14
N second-dir/file6
N second-dir/file7
No conflicts created by this import
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1/dir2"
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/dir1
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/dir1/dir2"
cd ..
- if ${CVS} export -r HEAD second-dir ; then
- pass 57
- else
- fail 57
- fi
-
- directory_cmp first-dir second-dir
-
- if $ISDIFF ; then
- fail 58
- else
- pass 58
- fi
+ dotest basic2-32 "${testcvs} export -r HEAD second-dir" \
+"${PROG} [a-z]*: Updating second-dir
+U second-dir/file14
+U second-dir/file6
+U second-dir/file7
+${PROG} [a-z]*: Updating second-dir/dir1
+U second-dir/dir1/file14
+U second-dir/dir1/file6
+U second-dir/dir1/file7
+${PROG} [a-z]*: Updating second-dir/dir1/dir2
+U second-dir/dir1/dir2/file14
+U second-dir/dir1/dir2/file6
+U second-dir/dir1/dir2/file7"
+
+ dotest basic2-33 "directory_cmp first-dir second-dir"
rm -r second-dir
@@ -2101,49 +3383,39 @@ ${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1/dir2"
# update the top, cancelling sticky tags, retag, update other copy, compare.
cd first-dir
- if ${CVS} update -A -l *file* 2>> ${LOGFILE}; then
- pass 59
- else
- fail 59
- fi
+ dotest basic2-34 "${testcvs} update -A -l *file*" \
+"[UP] file6
+${PROG} [a-z]*: file7 is no longer in the repository"
# If we don't delete the tag first, cvs won't retag it.
# This would appear to be a feature.
- if ${CVS} tag -l -d rtagged-by-revision ; then
- pass 60a
- else
- fail 60a
- fi
- if ${CVS} tag -l rtagged-by-revision ; then
- pass 60b
- else
- fail 60b
- fi
+ dotest basic2-35 "${testcvs} tag -l -d rtagged-by-revision" \
+"${PROG} [a-z]*: Untagging \.
+D file14
+D file6"
+ dotest basic2-36 "${testcvs} tag -l rtagged-by-revision" \
+"${PROG} [a-z]*: Tagging \.
+T file14
+T file6"
cd ..
mv first-dir 1dir
mv first-dir.cpy first-dir
cd first-dir
- dotest 61 "${testcvs} -q diff -u" ''
+ dotest basic2-37 "${testcvs} -q diff -u" ''
- if ${CVS} update ; then
- pass 62
- else
- fail 62
- fi
+ dotest basic2-38 "${testcvs} update" \
+"${PROG} [a-z]*: Updating .
+${PROG} [a-z]*: Updating dir1
+${PROG} [a-z]*: Updating dir1/dir2"
cd ..
#### FIXME: is this expected to work??? Need to investigate
#### and fix or remove the test.
-# directory_cmp 1dir first-dir
-#
-# if $ISDIFF ; then
-# fail 63
-# else
-# pass 63
-# fi
+# dotest basic2-39 "directory_cmp 1dir first-dir"
+
rm -r 1dir first-dir
# Test the cvs history command.
@@ -2158,29 +3430,29 @@ ${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/dir1/dir2"
# which don't exist in the remote output? would seem to be
# a CVS bug.
dotest basic2-64 "${testcvs} his -x TOFWUCGMAR -a" \
-"O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= ${TMPPWD}/\*
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1 == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1 == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1/dir2 == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1/dir2 == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir == ${TMPPWD}
-M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TMPPWD}
-R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1 == ${TMPPWD}
-M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1 == ${TMPPWD}
-R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1 == ${TMPPWD}
-A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1/dir2 == ${TMPPWD}
-M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1/dir2 == ${TMPPWD}
-R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1/dir2 == ${TMPPWD}
-F [0-9-]* [0-9:]* ${PLUS}0000 ${username} =first-dir= ${TMPPWD}/\*
+"O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= ${TESTDIR}/\*
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1 == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1 == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir/dir1/dir2 == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir/dir1/dir2 == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir == ${TESTDIR}
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TESTDIR}
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1 == ${TESTDIR}
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1 == ${TESTDIR}
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1 == ${TESTDIR}
+A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file14 first-dir/dir1/dir2 == ${TESTDIR}
+M [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir/dir1/dir2 == ${TESTDIR}
+R [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir/dir1/dir2 == ${TESTDIR}
+F [0-9-]* [0-9:]* ${PLUS}0000 ${username} =first-dir= ${TESTDIR}/\*
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-head:A\]
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\]
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\]
-O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= ${TMPPWD}/\*
-U [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TMPPWD}/first-dir
-U [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == ${TMPPWD}/first-dir" \
+O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= ${TESTDIR}/\*
+U [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6 first-dir == ${TESTDIR}/first-dir
+W [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == ${TESTDIR}/first-dir" \
"O [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir =first-dir= <remote>/\*
A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6 first-dir == <remote>
A [0-9-]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7 first-dir == <remote>
@@ -2201,7 +3473,8 @@ F [0-9-]* [0-9:]* ${PLUS}0000 ${username} =first-dir= <remot
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-head:A\]
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\]
T [0-9-]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\]
-O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= <remote>/\*"
+O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-dir= <remote>/\*
+W [0-9-]* [0-9:]* ${PLUS}0000 ${username} file7 first-dir == <remote>" \
rm -rf ${CVSROOT_DIRNAME}/first-dir
rm -rf ${CVSROOT_DIRNAME}/second-dir
@@ -2219,24 +3492,24 @@ O [0-9-]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-di
dotest files-1 "${testcvs} -q co -l ." ""
mkdir first-dir
dotest files-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch tfile
dotest files-3 "${testcvs} add tfile" \
"${PROG} [a-z]*: scheduling file .tfile. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest files-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/tfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/tfile,v
done
Checking in tfile;
-${TESTDIR}/cvsroot/first-dir/tfile,v <-- tfile
+${CVSROOT_DIRNAME}/first-dir/tfile,v <-- tfile
initial revision: 1\.1
done"
dotest files-5 "${testcvs} -q tag -b C" "T tfile"
dotest files-6 "${testcvs} -q update -r C" ""
mkdir dir
dotest files-7 "${testcvs} add dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir added to the repository
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository
--> Using per-directory sticky tag .C'"
cd dir
touch .file
@@ -2245,12 +3518,12 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
mkdir sdir
dotest files-7 "${testcvs} add sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir/sdir added to the repository
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir added to the repository
--> Using per-directory sticky tag .C'"
cd sdir
mkdir ssdir
dotest files-8 "${testcvs} add ssdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir added to the repository
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir added to the repository
--> Using per-directory sticky tag .C'"
cd ssdir
touch .file
@@ -2259,29 +3532,29 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cd ../..
dotest files-10 "${testcvs} -q ci -m test" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v
done
Checking in \.file;
-${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v
done
Checking in sdir/ssdir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest files-11 \
"${testcvs} commit -m test -f ./.file ./sdir/ssdir/.file" \
"Checking in \.file;
-${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
done
Checking in \./sdir/ssdir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
done"
- if test "$remote" = yes; then
+ if $remote; then
# This is a bug, looks like that toplevel_repos cruft in
# client.c is coming back to haunt us.
# May want to think about the whole issue, toplevel_repos
@@ -2298,32 +3571,32 @@ ${PROG} \[server aborted\]: correct above errors first!"
dotest files-12-workaround \
"${testcvs} commit -f -m test sdir/ssdir/.file .file" \
"Checking in sdir/ssdir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2
done
Checking in \.file;
-${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2
done"
else
dotest files-12 \
"${testcvs} commit -f -m test ./sdir/ssdir/.file ./.file" \
"Checking in \./sdir/ssdir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2
done
Checking in \.file;
-${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.3; previous revision: 1\.1\.2\.2
done"
fi
dotest files-13 \
"${testcvs} commit -fmtest ./sdir/../sdir/ssdir/..///ssdir/.file" \
"Checking in \./sdir/\.\./sdir/ssdir/\.\.///ssdir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/sdir/ssdir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.4; previous revision: 1\.1\.2\.3
done"
- if test "$remote" = yes; then
+ if $remote; then
dotest_fail files-14 \
"${testcvs} commit -fmtest ../../first-dir/dir/.file" \
"protocol error: .\.\./\.\./first-dir/dir' has too many \.\."
@@ -2331,7 +3604,7 @@ done"
dotest files-14 \
"${testcvs} commit -fmtest ../../first-dir/dir/.file" \
"Checking in \.\./\.\./first-dir/dir/\.file;
-${TESTDIR}/cvsroot/first-dir/dir/Attic/\.file,v <-- \.file
+${CVSROOT_DIRNAME}/first-dir/dir/Attic/\.file,v <-- \.file
new revision: 1\.1\.2\.4; previous revision: 1\.1\.2\.3
done"
fi
@@ -2350,7 +3623,7 @@ done"
# I wrote this test to worry about problems in do_module;
# but then I found that the CVS server has its own problems
# with filenames starting with "-". Work around it for now.
- if test "$remote" = yes; then
+ if $remote; then
dashb=dashb
dashc=dashc
else
@@ -2366,34 +3639,34 @@ done"
${PROG} [a-z]*: scheduling file .top. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest spacefiles-3 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/${dashc},v
+"RCS file: ${CVSROOT_DIRNAME}/${dashc},v
done
Checking in ${dashc};
-${TESTDIR}/cvsroot/${dashc},v <-- ${dashc}
+${CVSROOT_DIRNAME}/${dashc},v <-- ${dashc}
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/top,v
+RCS file: ${CVSROOT_DIRNAME}/top,v
done
Checking in top;
-${TESTDIR}/cvsroot/top,v <-- top
+${CVSROOT_DIRNAME}/top,v <-- top
initial revision: 1\.1
done"
mkdir 'first dir'
dotest spacefiles-4 "${testcvs} add 'first dir'" \
-"Directory ${TESTDIR}/cvsroot/first dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first dir added to the repository"
mkdir ./${dashb}
dotest spacefiles-5 "${testcvs} add -- ${dashb}" \
-"Directory ${TESTDIR}/cvsroot/${dashb} added to the repository"
+"Directory ${CVSROOT_DIRNAME}/${dashb} added to the repository"
cd 'first dir'
touch 'a file'
dotest spacefiles-6 "${testcvs} add 'a file'" \
"${PROG} [a-z]*: scheduling file .a file. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest spacefiles-7 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first dir/a file,v
+"RCS file: ${CVSROOT_DIRNAME}/first dir/a file,v
done
Checking in a file;
-${TESTDIR}/cvsroot/first dir/a file,v <-- a file
+${CVSROOT_DIRNAME}/first dir/a file,v <-- a file
initial revision: 1\.1
done"
dotest spacefiles-8 "${testcvs} -q tag new-tag" "T a file"
@@ -2443,10 +3716,10 @@ done"
"${PROG} [a-z]*: scheduling file .$file. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest commit-readonly-4 "$testcvs -Q ci -m . $file" \
-"RCS file: ${TESTDIR}/cvsroot/$module/$file,v
+"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v
done
Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
initial revision: 1\.1
done"
@@ -2456,7 +3729,7 @@ done"
dotest commit-readonly-5 "$testcvs -Q ci -m . $file" \
"Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
new revision: 1\.2; previous revision: 1\.1
done"
@@ -2494,7 +3767,7 @@ U trdiff/foo"
dotest rdiff-3 \
"${testcvs} ci -m added-something foo" \
"Checking in foo;
-${TESTDIR}/cvsroot/trdiff/foo,v <-- foo
+${CVSROOT_DIRNAME}/trdiff/foo,v <-- foo
new revision: 1\.2; previous revision: 1\.1
done"
echo '#ident "@(#)trdiff:$''Name$:$''Id$"' > new
@@ -2505,10 +3778,10 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest rdiff-5 \
"${testcvs} commit -m added-new-file new" \
-"RCS file: ${TESTDIR}/cvsroot/trdiff/new,v
+"RCS file: ${CVSROOT_DIRNAME}/trdiff/new,v
done
Checking in new;
-${TESTDIR}/cvsroot/trdiff/new,v <-- new
+${CVSROOT_DIRNAME}/trdiff/new,v <-- new
initial revision: 1\.1
done"
dotest rdiff-6 \
@@ -2523,7 +3796,7 @@ T new"
File: foo Status: Up-to-date
Working revision: 1\.2.*
- Repository revision: 1\.2 ${TESTDIR}/cvsroot/trdiff/foo,v
+ Repository revision: 1\.2 ${CVSROOT_DIRNAME}/trdiff/foo,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -ko
@@ -2561,11 +3834,10 @@ diff -c /dev/null trdiff/new:1\.1
'"${PLUS}"' #ident "@(#)trdiff:\$''Name: local-v0 \$:\$''Id: new,v 1\.1 [0-9/]* [0-9:]* '"${username}"' Exp \$"
'"${PLUS}"' new file'
-# FIXME: will this work here?
-# if test "$keep" = yes; then
-# echo Keeping ${TESTDIR} and exiting due to --keep
-# exit 0
-# fi
+ if $keep; then
+ echo Keeping ${TESTDIR} and exiting due to --keep
+ exit 0
+ fi
cd ..
rm -r testimport
@@ -2583,7 +3855,7 @@ diff -c /dev/null trdiff/new:1\.1
dotest diff-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest diff-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
# diff is anomalous. Most CVS commands print the "nothing
@@ -2596,16 +3868,16 @@ diff -c /dev/null trdiff/new:1\.1
"${PROG} [a-z]*: scheduling file .abc. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest diff-5 "${testcvs} -q ci -mtest" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/abc,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
done
Checking in abc;
-${TESTDIR}/cvsroot/first-dir/abc,v <-- abc
+${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
initial revision: 1\.1
done"
echo "extern int gethostname ();" >abc
dotest diff-6 "${testcvs} -q ci -mtest" \
"Checking in abc;
-${TESTDIR}/cvsroot/first-dir/abc,v <-- abc
+${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
new revision: 1\.2; previous revision: 1\.1
done"
echo "#include <winsock.h>" >abc
@@ -2613,7 +3885,7 @@ done"
dotest_fail diff-7 "${testcvs} -q diff --ifdef=HAVE_WINSOCK_H" \
"Index: abc
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/abc,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
retrieving revision 1\.2
diff --ifdef=HAVE_WINSOCK_H -r1\.2 abc
#ifndef HAVE_WINSOCK_H
@@ -2622,7 +3894,7 @@ extern int gethostname ();
#include <winsock\.h>
#endif /\* HAVE_WINSOCK_H \*/"
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -2653,17 +3925,17 @@ extern int gethostname ();
# doesn't get confused by it.
mkdir subdir
dotest 65a0 "${testcvs} add subdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
cd subdir
echo file in subdir >sfile
dotest 65a1 "${testcvs} add sfile" \
"${PROG}"' [a-z]*: scheduling file `sfile'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest 65a2 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/sfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v
done
Checking in sfile;
-${TESTDIR}/cvsroot/first-dir/subdir/sfile,v <-- sfile
+${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v <-- sfile
initial revision: 1\.1
done"
rm sfile
@@ -2672,7 +3944,7 @@ done"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove this file permanently'
dotest 65a4 "${testcvs} -q ci -m remove-it" \
"Removing sfile;
-${TESTDIR}/cvsroot/first-dir/subdir/sfile,v <-- sfile
+${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v <-- sfile
new revision: delete; previous revision: 1\.1
done"
cd ..
@@ -2746,10 +4018,10 @@ done"
"${PROG}"' [a-z]*: scheduling file `file4'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest death-file4-ciadd "${testcvs} -q ci -m add file4" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
initial revision: 1\.1
done"
rm file4
@@ -2758,7 +4030,7 @@ done"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove this file permanently'
dotest death-file4-cirm "${testcvs} -q ci -m remove file4" \
"Removing file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: delete; previous revision: 1\.1
done"
@@ -2890,7 +4162,7 @@ diff -c first-dir/file3:1\.1\.2\.1 first-dir/file3:removed
# join
dotest 86 "${testcvs} -q update -j branch1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.3
retrieving revision 1\.3\.2\.1
Merging differences between 1\.3 and 1\.3\.2\.1 into file1
@@ -2922,15 +4194,15 @@ U file3"
# commit
dotest 89 "${testcvs} -q ci -m test" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done
Removing file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: delete; previous revision: 1\.1
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
new revision: 1\.2; previous revision: 1\.1
done"
cd ..
@@ -3026,16 +4298,16 @@ U first-dir/file3'
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently'
dotest death2-3 "${testcvs} -q commit -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
initial revision: 1\.1
done"
@@ -3068,8 +4340,8 @@ ${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
===================================================================
RCS file: file1
diff -N file1
-\*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
---- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* file1 ${RFCDATE} [0-9.]*
+--- /dev/null ${RFCDATE_EPOCH}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
- first revision
@@ -3077,7 +4349,7 @@ diff -N file1
dotest death2-8 "${testcvs} -q ci -m removed" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.1\.2
done"
@@ -3092,8 +4364,8 @@ done"
===================================================================
RCS file: file1
diff -N file1
-\*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
---- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* file1 ${RFCDATE} [0-9.]*
+--- /dev/null ${RFCDATE_EPOCH}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
- first revision
@@ -3107,8 +4379,8 @@ diff -N file1
===================================================================
RCS file: file1
diff -N file1
-\*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
---- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* file1 [-a-zA-Z0-9: ]* [0-9.]*
+--- /dev/null ${RFCDATE_EPOCH}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
- first revision
@@ -3121,8 +4393,8 @@ diff -N file1
dotest death2-rdiff-2 "${testcvs} -q rdiff -rtag -rbranch first-dir" \
"Index: first-dir/file1
diff -c first-dir/file1:1\.1 first-dir/file1:removed
-\*\*\* first-dir/file1:1\.1[ ][ ]*[a-zA-Z0-9: ]*
---- first-dir/file1[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* first-dir/file1:1\.1 [a-zA-Z0-9: ]*
+--- first-dir/file1 [a-zA-Z0-9: ]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
- first revision
@@ -3143,8 +4415,8 @@ diff -c first-dir/file1:1\.1 first-dir/file1:removed
===================================================================
RCS file: file1
diff -N file1
-\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
---- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* /dev/null ${RFCDATE_EPOCH}
+--- file1 ${RFCDATE}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 0 \*\*\*\*
--- 1 ----
@@ -3152,7 +4424,7 @@ ${PLUS} second revision"
dotest death2-10 "${testcvs} -q commit -m add" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
done"
@@ -3162,7 +4434,7 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest death2-10b "${testcvs} -q ci -m removed" \
"Removing file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: delete; previous revision: 1\.1\.2
done"
@@ -3177,10 +4449,10 @@ U file4"
"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest death2-13 "${testcvs} -q commit -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -3188,7 +4460,7 @@ done"
echo "new file4 revision" > file4
dotest death2-13a "${testcvs} -q commit -m mod" \
"Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2; previous revision: 1\.1
done"
@@ -3199,7 +4471,7 @@ done"
dotest death2-14 "${testcvs} -q update -r branch" \
"[UP] file1
${PROG} [a-z]*: file2 is no longer in the repository
-${PROG} [a-z]*: warning: file4 is not (any longer) pertinent"
+${PROG} [a-z]*: file4 is no longer in the repository"
# Add a file on the branch with the same name.
echo "branch revision" > file2
@@ -3208,7 +4480,7 @@ ${PROG} [a-z]*: warning: file4 is not (any longer) pertinent"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest death2-16 "${testcvs} -q commit -m add" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -3218,10 +4490,10 @@ done"
"${PROG}"' [a-z]*: scheduling file `file3'\'' for addition on branch `branch'\''
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest death2-18 "${testcvs} -q commit -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file3,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/Attic/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -3234,8 +4506,8 @@ done"
===================================================================
RCS file: file3
diff -N file3
-\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
---- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* /dev/null ${RFCDATE_EPOCH}
+--- file3 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 0 \*\*\*\*
--- 1 ----
@@ -3244,12 +4516,12 @@ ${PLUS} first revision"
dotest_fail death2-diff-11 "${testcvs} -q diff -rtag -c ." \
"Index: file1
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.2
diff -c -r1\.1 -r1\.1\.2\.2
-\*\*\* file1[ ][ ]*[a-zA-Z0-9:./ ]*
---- file1[ ][ ]*[a-zA-Z0-9:./ ]*
+\*\*\* file1 ${RFCDATE} [0-9.]*
+--- file1 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
! first revision
@@ -3262,12 +4534,12 @@ ${PROG} [a-z]*: file4 no longer exists, no comparison available"
dotest_fail death2-diff-12 "${testcvs} -q diff -rtag -c -N ." \
"Index: file1
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.2
diff -c -r1\.1 -r1\.1\.2\.2
-\*\*\* file1[ ][ ]*[a-zA-Z0-9:./ ]*
---- file1[ ][ ]*[a-zA-Z0-9:./ ]*
+\*\*\* file1 ${RFCDATE} [0-9.]*
+--- file1 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
! first revision
@@ -3277,8 +4549,8 @@ Index: file2
===================================================================
RCS file: file2
diff -N file2
-\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
---- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* /dev/null ${RFCDATE_EPOCH}
+--- file2 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 0 \*\*\*\*
--- 1 ----
@@ -3287,8 +4559,8 @@ Index: file3
===================================================================
RCS file: file3
diff -N file3
-\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
---- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* /dev/null ${RFCDATE_EPOCH}
+--- file3 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 0 \*\*\*\*
--- 1 ----
@@ -3297,8 +4569,8 @@ Index: file4
===================================================================
RCS file: file4
diff -N file4
-\*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
---- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* file4 ${RFCDATE} [0-9.]*
+--- /dev/null ${RFCDATE_EPOCH}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
- file4 first revision
@@ -3322,16 +4594,78 @@ U file4"
===================================================================
RCS file: file1
diff -N file1
-\*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
---- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
+\*\*\* /dev/null ${RFCDATE_EPOCH}
+--- file1 ${RFCDATE} [0-9.]*
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 0 \*\*\*\*
--- 1 ----
${PLUS} first revision"
+ # now back to the trunk
+ dotest death2-21 "${testcvs} -q update -A" \
+"U file2
+[UP] file4"
+
+ # test merging with a dead file
+ dotest death2-22 "${testcvs} -q co first-dir" \
+"U first-dir/file1
+U first-dir/file2
+U first-dir/file4"
+
+ cd first-dir
+ dotest death2-23 "${testcvs} rm -f file4" \
+"${PROG} [a-z]*: scheduling .file4. for removal
+${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
+ dotest death2-24 "${testcvs} -q ci -m removed file4" \
+"Removing file4;
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
+new revision: delete; previous revision: 1\.2
+done"
+ cd ..
+ echo "new stuff" >file4
+ dotest_fail death2-25 "${testcvs} up file4" \
+"${PROG} [a-z]*: conflict: file4 is modified but no longer in the repository
+C file4"
+
cd .. ; rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir
;;
+ rm-update-message)
+ # FIXME
+ # local CVS prints a warning message when update notices a missing
+ # file and client/server CVS doesn't. These should be identical.
+ mkdir rm-update-message; cd rm-update-message
+ mkdir $CVSROOT_DIRNAME/rm-update-message
+ dotest rm-update-message-setup-1 "$testcvs -q co rm-update-message" ''
+ cd rm-update-message
+ file=x
+ echo >$file
+ dotest rm-update-message-setup-2 "$testcvs -q add $file" \
+"$PROG [a-z]*: use .cvs commit. to add this file permanently"
+ dotest rm-update-message-setup-3 "$testcvs -q ci -mcreate $file" \
+"RCS file: $CVSROOT_DIRNAME/rm-update-message/$file,v
+done
+Checking in $file;
+$CVSROOT_DIRNAME/rm-update-message/$file,v <-- $file
+initial revision: 1\.1
+done"
+
+ rm $file
+ if $remote; then
+ dotest rm-update-message-1 "$testcvs up $file" "U $file"
+ else
+ dotest rm-update-message-1 "$testcvs up $file" \
+"$PROG [a-z]*: warning: $file was lost
+U $file"
+ fi
+
+ cd ../..
+ if $keep; then :; else
+ rm -rf rm-update-message
+ rm -rf $CVSROOT_DIRNAME/rm-update-message
+ fi
+ ;;
+
rmadd)
# More tests of adding and removing files.
# In particular ci -r.
@@ -3345,7 +4679,7 @@ ${PLUS} first revision"
dotest rmadd-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest rmadd-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo first file1 >file1
dotest rmadd-3 "${testcvs} add file1" \
@@ -3365,13 +4699,13 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!"
# bizarre behavior, but it would seem to be intentional
# (see commit.c). It probably could go away....
dotest rmadd-7 "${testcvs} -q ci -r 7.... -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 7\.1
done"
- if test "$remote" = yes; then
+ if $remote; then
# I guess remote doesn't set a sticky tag in this case.
# Kind of odd, in the sense that rmadd-24a does set one
# both local and remote.
@@ -3395,10 +4729,10 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
# As in the previous example, CVS is confused....
dotest rmadd-11 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 7\.1
done"
@@ -3413,10 +4747,10 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
${PROG} \[[a-z]* aborted\]: correct above errors first!"
# Whatever, let's not let file2 distract us....
dotest rmadd-15 "${testcvs} -q ci -r mybranch -m add file3" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file3,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/Attic/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/Attic/file3,v <-- file3
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -3445,10 +4779,10 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
# a non-branch tag.
dotest rmadd-21 \
"${testcvs} -q ci -r mynonbranch -m add file4" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file4,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/Attic/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/Attic/file4,v <-- file4
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -3458,42 +4792,42 @@ done"
dotest rmadd-22 "${testcvs} add file5" \
"${PROG} [a-z]*: scheduling file .file5. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
- if test "$remote" = yes; then
+ if $remote; then
# Interesting bug (or missing feature) here. findmaxrev
# gets the major revision from the Entries. Well, remote
# doesn't send the entries for files which are not involved.
- dotest rmadd-23 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file5,v
+ dotest rmadd-23r "${testcvs} -q ci -m add" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file5,v
done
Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
initial revision: 1\.1
done"
- dotest rmadd-23-workaround \
+ dotest rmadd-23-workaroundr \
"${testcvs} -q ci -r 7 -m bump-it file5" \
"Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
new revision: 7\.1; previous revision: 1\.1
done"
else
dotest rmadd-23 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file5,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file5,v
done
Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
initial revision: 7\.1
done"
fi
echo change it >file5
dotest_fail rmadd-24 "${testcvs} -q ci -r 4.8 -m change file5" \
"Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file5,v: revision 4\.8 too low; must be higher than 7\.1
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file5,v: revision 4\.8 too low; must be higher than 7\.1
${PROG} [a-z]*: could not check in file5
7\.1 unlocked"
dotest rmadd-24a "${testcvs} -q ci -r 8.4 -m change file5" \
"Checking in file5;
-${TESTDIR}/cvsroot/first-dir/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/file5,v <-- file5
new revision: 8\.4; previous revision: 7\.1
done"
# I'm not really sure that a sticky tag make sense here.
@@ -3503,7 +4837,7 @@ done"
File: file5 Status: Up-to-date
Working revision: 8\.4.*
- Repository revision: 8\.4 ${TESTDIR}/cvsroot/first-dir/file5,v
+ Repository revision: 8\.4 ${CVSROOT_DIRNAME}/first-dir/file5,v
Sticky Tag: 8\.4
Sticky Date: (none)
Sticky Options: (none)"
@@ -3520,17 +4854,17 @@ File: file5 Status: Up-to-date
dotest rmadd2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest rmadd2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo 'initial contents' >file1
dotest rmadd2-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest rmadd2-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest rmadd2-4a "${testcvs} -Q tag tagone" ""
@@ -3539,29 +4873,29 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest rmadd2-6 "${testcvs} -q ci -m remove" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
dotest rmadd2-7 "${testcvs} -q update -j 1.2 -j 1.1 file1" "U file1"
dotest rmadd2-8 "${testcvs} -q ci -m readd" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
echo 'new contents' >file1
dotest rmadd2-9 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done"
dotest rmadd2-10 "${testcvs} -q update -j 1.4 -j 1.3 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.4
retrieving revision 1\.3
Merging differences between 1\.4 and 1\.3 into file1"
dotest rmadd2-11 "${testcvs} -q ci -m undo" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.5; previous revision: 1\.4
done"
dotest rmadd2-12 "cat file1" "initial contents"
@@ -3571,13 +4905,19 @@ done"
# the head.
dotest rmadd2-14 "${testcvs} -q update -j 1.3 -j 1.2 file1" \
"${PROG} [a-z]*: scheduling file1 for removal"
+
+ # Check that -p can get arbitrary revisions of a removed file
+ dotest rmadd2-14a "${testcvs} -q update -p" "initial contents"
+ dotest rmadd2-14b "${testcvs} -q update -p -r 1.5" "initial contents"
+ dotest rmadd2-14c "${testcvs} -q update -p -r 1.3" "initial contents"
+
dotest rmadd2-15 "${testcvs} -q ci -m re-remove" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.5
done"
dotest rmadd2-16 "${testcvs} log -h file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
Working file: file1
head: 1\.6
branch:
@@ -3593,7 +4933,7 @@ total revisions: 6
File: no file file1 Status: Up-to-date
Working revision: No entry for file1
- Repository revision: 1\.6 ${TESTDIR}/cvsroot/first-dir/Attic/file1,v
+ Repository revision: 1\.6 ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
Existing Tags:
tagone (revision: 1.1)"
@@ -3601,7 +4941,7 @@ File: no file file1 Status: Up-to-date
cd ../..
rm -r 1
- rm -rf ${TESTDIR}/cvsroot/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
dirs)
@@ -3625,7 +4965,7 @@ File: no file file1 Status: Up-to-date
N dir1/file1
N dir1/sdir/sfile
No conflicts created by this import
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/dir1/sdir"
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/dir1/sdir"
cd ..
mkdir 1; cd 1
@@ -3642,12 +4982,12 @@ ${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/dir1/sdir"
dotest dirs-3 "${testcvs} update" \
"${PROG} [a-z]*: Updating dir1
${PROG} [a-z]*: Updating dir1/sdir
-${PROG} [a-z]*: cannot open directory ${TESTDIR}/cvsroot/dir1/sdir: No such file or directory
+${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory
${PROG} [a-z]*: skipping directory dir1/sdir"
dotest dirs-3a "${testcvs} update -d" \
"${PROG} [a-z]*: Updating dir1
${PROG} [a-z]*: Updating dir1/sdir
-${PROG} [a-z]*: cannot open directory ${TESTDIR}/cvsroot/dir1/sdir: No such file or directory
+${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory
${PROG} [a-z]*: skipping directory dir1/sdir"
# If we say "yes", then CVS gives errors about not being able to
@@ -3655,7 +4995,7 @@ ${PROG} [a-z]*: skipping directory dir1/sdir"
# The fact that it says "skipping directory " rather than
# "skipping directory dir1/sdir" is some kind of bug.
echo no | dotest dirs-4 "${testcvs} release -d dir1/sdir" \
-"${PROG} [a-z]*: cannot open directory ${TESTDIR}/cvsroot/dir1/sdir: No such file or directory
+"${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/dir1/sdir: No such file or directory
${PROG} [a-z]*: skipping directory
You have \[0\] altered files in this repository\.
Are you sure you want to release (and delete) directory .dir1/sdir': .. .release' aborted by user choice."
@@ -3688,47 +5028,40 @@ D/sdir////"
dotest dirs2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest dirs2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
mkdir sdir
dotest dirs2-3 "${testcvs} add sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
touch sdir/file1
dotest dirs2-4 "${testcvs} add sdir/file1" \
"${PROG} [a-z]*: scheduling file .sdir/file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest dirs2-5 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/file1,v
done
Checking in sdir/file1;
-${TESTDIR}/cvsroot/first-dir/sdir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/sdir/file1,v <-- file1
initial revision: 1\.1
done"
rm -r sdir/CVS
- if test "$remote" = yes; then
+ if $remote; then
# This is just like conflicts3-23
dotest_fail dirs2-6 "${testcvs} update -d" \
"${QUESTION} sdir
${PROG} server: Updating \.
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory
${PROG} server: Updating sdir
${PROG} update: move away sdir/file1; it is in the way
C sdir/file1"
rm sdir/file1
+ rm -r sdir/CVS
# This is where things are not just like conflicts3-23
- # As with conflicts3-23, all these CVS/Entries* warnings
- # are somewhat doubtful, and we probably should think some
- # about whether they should be changed/fixed.
dotest dirs2-7 "${testcvs} update -d" \
"${QUESTION} sdir
${PROG} server: Updating \.
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory
${PROG} server: Updating sdir
-U sdir/file1
-${PROG} update: cannot open CVS/Entries.Log: No such file or directory"
+U sdir/file1"
else
dotest dirs2-6 "${testcvs} update -d" \
"${PROG} update: Updating \.
@@ -3746,7 +5079,7 @@ ${QUESTION} sdir"
cd first-dir
dotest dirs2-9 "${testcvs} -q tag -b br" "T sdir/file1"
rm -r sdir/CVS
- if test "$remote" = yes; then
+ if $remote; then
# Cute little quirk of val-tags; if we don't recurse into
# the directories where the tag is defined, val-tags won't
# get updated.
@@ -3759,14 +5092,9 @@ ${PROG} \[server aborted\]: no such tag br"
dotest_fail dirs2-10-again "${testcvs} update -d -r br" \
"${QUESTION} sdir
${PROG} server: Updating \.
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory
-${PROG} update: cannot open CVS/Tag: No such file or directory
-${PROG} update: cannot open CVS/Tag: No such file or directory
${PROG} server: Updating sdir
${PROG} update: move away sdir/file1; it is in the way
-C sdir/file1
-${PROG} update: cannot open CVS/Tag: No such file or directory"
+C sdir/file1"
else
dotest_fail dirs2-10 "${testcvs} update -d -r br" \
"${PROG} update: in directory sdir:
@@ -3790,20 +5118,15 @@ ${PROG} \[update aborted\]: there is no version here; do '${PROG} checkout' firs
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest dirs2-13 "${testcvs} -q ci -m remove" \
"Removing sdir/file1;
-${TESTDIR}/cvsroot/first-dir/sdir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/sdir/file1,v <-- file1
new revision: delete; previous revision: 1\.1\.2
done"
cd ../../2/first-dir
- if test "$remote" = yes; then
+ if $remote; then
dotest dirs2-14 "${testcvs} update -d -r br" \
-"${QUESTION} sdir
+"${QUESTION} sdir/file1
${PROG} server: Updating \.
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory
-${PROG} update: cannot open CVS/Tag: No such file or directory
-${PROG} update: cannot open CVS/Tag: No such file or directory
-${PROG} server: Updating sdir
-${PROG} update: cannot open CVS/Tag: No such file or directory"
+${PROG} server: Updating sdir"
else
dotest dirs2-14 "${testcvs} update -d -r br" \
"${PROG} update: Updating \.
@@ -3812,7 +5135,7 @@ ${QUESTION} sdir"
cd ../..
rm -r 1 2 3
- rm -rf ${TESTDIR}/cvsroot/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
branches)
@@ -3832,35 +5155,35 @@ ${QUESTION} sdir"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently'
dotest branches-2a "${testcvs} -n -q ci -m dont-commit" ""
dotest_lit branches-3 "${testcvs} -q ci -m add-it" <<HERE
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file3,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
initial revision: 1.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
initial revision: 1.1
done
HERE
echo 4:trunk-2 >file4
dotest branches-3.2 "${testcvs} -q ci -m trunk-before-branch" \
"Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2; previous revision: 1\.1
done"
# The "cvs log file4" in test branches-14.3 will test that we
@@ -3886,15 +5209,15 @@ M file1"
echo 4:br1 >file4
dotest branches-6 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2\.2\.1; previous revision: 1\.2
done"
dotest branches-7 "${testcvs} -q tag -b brbr" 'T file1
@@ -3906,11 +5229,11 @@ T file4'
echo 4:brbr >file4
dotest branches-9 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1\.2\.1; previous revision: 1\.1\.2\.1
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2\.2\.1\.2\.1; previous revision: 1\.2\.2\.1
done"
dotest branches-10 "cat file1 file2 file3 file4" '1:brbr
@@ -3927,7 +5250,7 @@ done"
echo 4:br1-2 >file4
dotest branches-12.2 "${testcvs} -q ci -m change-on-br1" \
"Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1
done"
dotest branches-13 "${testcvs} -q update -A" '[UP] file1
@@ -3941,12 +5264,12 @@ done"
dotest branches-14.2 \
"${testcvs} -q ci -m trunk-change-after-branch" \
"Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.3; previous revision: 1\.2
done"
dotest branches-14.3 "${testcvs} log file4" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
Working file: file4
head: 1\.3
branch:
@@ -3989,12 +5312,12 @@ modify
"${testcvs} diff -c -r 1.1 -r 1.3 file4" \
"Index: file4
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
retrieving revision 1\.1
retrieving revision 1\.3
diff -c -r1\.1 -r1\.3
-\*\*\* file4 [0-9/]* [0-9:]* 1\.1
---- file4 [0-9/]* [0-9:]* 1\.3
+\*\*\* file4 ${RFCDATE} 1\.1
+--- file4 ${RFCDATE} 1\.3
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
! 4:trunk-1
@@ -4004,12 +5327,12 @@ diff -c -r1\.1 -r1\.3
"${testcvs} diff -c -r 1.1 -r 1.2.2.1 file4" \
"Index: file4
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
retrieving revision 1\.1
retrieving revision 1\.2\.2\.1
diff -c -r1\.1 -r1\.2\.2\.1
-\*\*\* file4 [0-9/]* [0-9:]* 1\.1
---- file4 [0-9/]* [0-9:]* 1\.2\.2\.1
+\*\*\* file4 ${RFCDATE} 1\.1
+--- file4 ${RFCDATE} 1\.2\.2\.1
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1 \*\*\*\*
! 4:trunk-1
@@ -4017,7 +5340,7 @@ diff -c -r1\.1 -r1\.2\.2\.1
! 4:br1"
dotest branches-15 \
"${testcvs} update -j 1.1.2.1 -j 1.1.2.1.2.1 file1" \
- "RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+ "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1\.2\.1
retrieving revision 1\.1\.2\.1\.2\.1
Merging differences between 1\.1\.2\.1 and 1\.1\.2\.1\.2\.1 into file1
@@ -4029,17 +5352,17 @@ rcsmerge: warning: conflicts during merge"
[>]>>>>>> 1\.1\.2\.1\.2\.1'
dotest branches-o1 "${testcvs} -q admin -o ::brbr" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file3,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done"
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -4066,10 +5389,10 @@ done"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest branches2-3 "${testcvs} commit -m add file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
@@ -4092,23 +5415,23 @@ done"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
mkdir dir1
dotest branches2-9 "${testcvs} add dir1" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir1 added to the repository
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository
--> Using per-directory sticky tag "'`'"b1'"
echo "file3 first revision" > dir1/file3
dotest branches2-10 "${testcvs} add dir1/file3" \
"${PROG}"' [a-z]*: scheduling file `dir1/file3'\'' for addition on branch `b1'\''
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest branches2-11 "${testcvs} -q ci -madd ." \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/Attic/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/Attic/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
done
Checking in dir1/file3;
-${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v <-- file3
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -4128,7 +5451,7 @@ U dir1/file3"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: b2 (branch: 1\.1\.4)
Sticky Date: (none)
Sticky Options: (none)
@@ -4137,7 +5460,7 @@ File: file1 Status: Up-to-date
File: file3 Status: Up-to-date
Working revision: 1\.1\.2\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v
+ Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
Sticky Tag: b1 (branch: 1\.1\.2)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4159,7 +5482,7 @@ U dir1/file3"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: b2 (branch: 1\.1\.4)
Sticky Date: (none)
Sticky Options: (none)
@@ -4185,7 +5508,7 @@ U dir1/file3"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -4194,7 +5517,7 @@ File: file1 Status: Up-to-date
File: file3 Status: Up-to-date
Working revision: 1\.1\.2\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v
+ Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
Sticky Tag: b1 (branch: 1\.1\.2)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4208,7 +5531,7 @@ U dir1/file3"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -4217,7 +5540,7 @@ File: file1 Status: Up-to-date
File: file3 Status: Locally Added
Working revision: New file!
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/dir1/Attic/file3,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir1/Attic/file3,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4243,17 +5566,17 @@ U first-dir/dir1/file3'
cd first-dir
mkdir dir2
dotest branches2-25 "${testcvs} add dir2" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir2 added to the repository
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository
--> Using per-directory sticky tag "'`'"b1'"
echo "file4 first revision" > dir2/file4
dotest branches2-26 "${testcvs} add dir2/file4" \
"${PROG}"' [a-z]*: scheduling file `dir2/file4'\'' for addition on branch `b1'\''
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest branches2-27 "${testcvs} -q commit -madd" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/dir2/Attic/file4,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v
done
Checking in dir2/file4;
-${TESTDIR}/cvsroot/first-dir/dir2/Attic/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v <-- file4
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -4267,7 +5590,7 @@ U dir2/file4"
File: file4 Status: Up-to-date
Working revision: 1\.1\.2\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/dir2/Attic/file4,v
+ Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/dir2/Attic/file4,v
Sticky Tag: b1 (branch: 1\.1\.2)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4288,10 +5611,10 @@ File: file4 Status: Up-to-date
"${PROG}"' [a-z]*: scheduling file `file5'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest branches2-35 "${testcvs} -q commit -madd" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/dir2/file5,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/dir2/file5,v
done
Checking in file5;
-${TESTDIR}/cvsroot/first-dir/dir2/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/dir2/file5,v <-- file5
initial revision: 1\.1
done"
@@ -4303,7 +5626,7 @@ done"
File: file5 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/dir2/file5,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/dir2/file5,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4320,17 +5643,17 @@ File: file5 Status: Up-to-date
dotest tagc-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest tagc-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1
dotest tagc-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest tagc-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest tagc-5 "${testcvs} -q tag -c tag1" "T file1"
@@ -4350,16 +5673,11 @@ ${PROG} \[[a-z]* aborted\]: correct the above errors first!"
cd ../1/first-dir
dotest tagc-9 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
cd ../../2/first-dir
- # That this is an error is a bug. Although the bug has existed
- # since tag -c was created, I don't think there would be a
- # compatibility problem with just fixing it.
- dotest_fail tagc-10 "${testcvs} -q tag -c tag4" \
-"${PROG} [a-z]*: file1 is locally modified
-${PROG} \[[a-z]* aborted\]: correct the above errors first!"
+ dotest tagc-10 "${testcvs} -q tag -c tag4" "T file1"
cd ../..
rm -r 1 2
@@ -4375,7 +5693,7 @@ ${PROG} \[[a-z]* aborted\]: correct the above errors first!"
dotest tagf-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest tagf-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1 file2
dotest tagf-3 "${testcvs} add file1 file2" \
@@ -4383,16 +5701,16 @@ ${PROG} \[[a-z]* aborted\]: correct the above errors first!"
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest tagf-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -4404,11 +5722,11 @@ T file2"
echo brmod >> file2
dotest tagf-7 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
# Here we make it a non-branch tag. Some think this should
@@ -4424,7 +5742,7 @@ T file2"
File: file1 Status: Locally Modified
Working revision: 1\.1\.2\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: br (revision: 1\.1\.2\.1)
Sticky Date: (none)
Sticky Options: (none)
@@ -4441,13 +5759,13 @@ D file2"
dotest tagf-11 "${testcvs} -q tag -r 1.1 -b br file1" "T file1"
# Fix it with admin -n (cf admin-18, admin-26-4).
dotest tagf-12 "${testcvs} -q admin -nbr:1.1.2 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# Another variation on the file2 test would be to use two working
# directories so that the update -r br would need to
# a merge to get from 1.1.2.1 to the head of the 1.1.2 branch.
dotest tagf-13 "${testcvs} -q update -r br" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1\.2\.1
retrieving revision 1\.1
Merging differences between 1\.1\.2\.1 and 1\.1 into file1
@@ -4467,11 +5785,11 @@ moremod
echo resolve >file1
dotest tagf-15 "${testcvs} -q ci -m recovered" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.4\.1; previous revision: 1\.1
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
done"
cd ../..
@@ -4495,17 +5813,17 @@ done"
"${PROG} [a-z]*: scheduling file .foo\.c. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest rcsdiff-3 "${testcvs} commit -m rev1 foo.c" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
done
Checking in foo\.c;
-${TESTDIR}/cvsroot/first-dir/foo.c,v <-- foo\.c
+${CVSROOT_DIRNAME}/first-dir/foo.c,v <-- foo\.c
initial revision: 1\.1
done"
dotest rcsdiff-4 "${testcvs} tag first foo.c" "T foo\.c"
dotest rcsdiff-5 "${testcvs} update -p -r first foo.c" \
"===================================================================
Checking out foo\.c
-RCS: ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+RCS: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
VERS: 1\.1
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
I am the first foo, and my name is \$""Name: first \$\."
@@ -4513,14 +5831,14 @@ I am the first foo, and my name is \$""Name: first \$\."
echo "I am the second foo, and my name is $""Name$." > foo.c
dotest rcsdiff-6 "${testcvs} commit -m rev2 foo.c" \
"Checking in foo\.c;
-${TESTDIR}/cvsroot/first-dir/foo\.c,v <-- foo\.c
+${CVSROOT_DIRNAME}/first-dir/foo\.c,v <-- foo\.c
new revision: 1\.2; previous revision: 1\.1
done"
dotest rcsdiff-7 "${testcvs} tag second foo.c" "T foo\.c"
dotest rcsdiff-8 "${testcvs} update -p -r second foo.c" \
"===================================================================
Checking out foo\.c
-RCS: ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+RCS: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
VERS: 1\.2
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
I am the second foo, and my name is \$""Name: second \$\."
@@ -4529,7 +5847,7 @@ I am the second foo, and my name is \$""Name: second \$\."
"${PROG} [a-z]*: Diffing \.
Index: foo\.c
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
retrieving revision 1\.1
retrieving revision 1\.2
diff -r1\.1 -r1\.2
@@ -4543,7 +5861,7 @@ diff -r1\.1 -r1\.2
"${PROG} [a-z]*: Diffing \.
Index: foo\.c
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
retrieving revision 1\.1
diff -r1\.1 foo\.c
1c1
@@ -4570,10 +5888,10 @@ EOF
dotest rcslib-diffrgx-1 "${testcvs} -q add -m '' rgx.c" \
"${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest rcslib-diffrgx-2 "${testcvs} -q ci -m '' rgx.c" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/rgx\.c,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/rgx\.c,v
done
Checking in rgx\.c;
-${TESTDIR}/cvsroot/first-dir/rgx\.c,v <-- rgx\.c
+${CVSROOT_DIRNAME}/first-dir/rgx\.c,v <-- rgx\.c
initial revision: 1\.1
done"
cat >rgx.c <<EOF
@@ -4589,11 +5907,11 @@ EOF
dotest_fail rcslib-diffrgx-3 "${testcvs} diff -c -F'.*(' rgx.c" \
"Index: rgx\.c
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/rgx\.c,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/rgx\.c,v
retrieving revision 1\.1
diff -c -F\.\*( -r1\.1 rgx\.c
-\*\*\* rgx\.c [0-9/]* [0-9:]* 1\.1
---- rgx\.c [0-9/]* [0-9:]*
+\*\*\* rgx\.c ${RFCDATE} 1\.1
+--- rgx\.c ${RFCDATE}
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* test_regex (whiz, bang)
\*\*\* 3,7 \*\*\*\*
foo;
@@ -4622,7 +5940,7 @@ diff -c -F\.\*( -r1\.1 rgx\.c
dotest rcslib-merge-1 "${testcvs} -q co -l ." ""
mkdir first-dir
dotest rcslib-merge-2 "${testcvs} -q add first-dir" \
-"Directory ${TESTDIR}/cvsroot.*/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}.*/first-dir added to the repository"
cd ..; rm -r 1
dotest rcslib-merge-3 "${testcvs} -q co first-dir" ""
@@ -4634,16 +5952,16 @@ diff -c -F\.\*( -r1\.1 rgx\.c
dotest rcslib-merge-4 "${testcvs} -q add file1" \
"${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest rcslib-merge-5 "${testcvs} -q commit -m '' file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
sed -e 's/2/two/' file1 > f; mv f file1
dotest rcslib-merge-6 "${testcvs} -q commit -m '' file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
dotest rcslib-merge-7 "${testcvs} -q tag -b -r 1.1 patch1" "T file1"
@@ -4653,7 +5971,7 @@ done"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: patch1 (branch: 1\.1\.2)
Sticky Date: (none)
Sticky Options: (none)"
@@ -4664,12 +5982,12 @@ File: file1 Status: Up-to-date
sed -e 's/3/three/' file1 > f; mv f file1
dotest rcslib-merge-11 "${testcvs} -q commit -m '' file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest rcslib-merge-12 "${testcvs} -q update -kv -j1.2" \
"U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into file1
@@ -4691,7 +6009,7 @@ two
echo "This is a change" >> file2
dotest rcslib-symlink-3 "${testcvs} ci -m because file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file2
new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
done"
dotest rcslib-symlink-4 "ls -l $CVSROOT_DIRNAME/first-dir/file2,v" \
@@ -4722,7 +6040,7 @@ U first-dir/file2"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest rcslib-symlink-9 "${testcvs} -q ci -m rm-it" \
"Removing file2;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file2
new revision: delete; previous revision: 1\.2
done"
# OK, why this message happens twice is relatively clear
@@ -4737,7 +6055,7 @@ ${PROG} [a-z]*: could not read RCS file for first-dir/file2"
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -4757,10 +6075,10 @@ ${PROG} [a-z]*: could not read RCS file for first-dir/file2"
"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest_lit multibranch-3 "${testcvs} -q ci -m add-it" <<HERE
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1.1
done
HERE
@@ -4774,14 +6092,14 @@ T file1"
echo on-br1 >file1
dotest multibranch-7 "${testcvs} -q ci -m modify-on-br1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest multibranch-8 "${testcvs} -q update -r br2" '[UP] file1'
echo br2 adds a line >>file1
dotest multibranch-9 "${testcvs} -q ci -m modify-on-br2" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.4\.1; previous revision: 1\.1
done"
dotest multibranch-10 "${testcvs} -q update -r br1" '[UP] file1'
@@ -4792,7 +6110,7 @@ br2 adds a line'
dotest multibranch-14 "${testcvs} log file1" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -4820,7 +6138,7 @@ modify-on-br1
============================================================================="
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -4901,18 +6219,18 @@ U first-dir/imported-f4"
dotest import-100 "${testcvs} ci -m local-changes" \
"${PROG} [a-z]*: Examining .
Removing imported-f1;
-${TESTDIR}/cvsroot/first-dir/imported-f1,v <-- imported-f1
+${CVSROOT_DIRNAME}/first-dir/imported-f1,v <-- imported-f1
new revision: delete; previous revision: 1\.1\.1\.1
done
Checking in imported-f2;
-${TESTDIR}/cvsroot/first-dir/imported-f2,v <-- imported-f2
+${CVSROOT_DIRNAME}/first-dir/imported-f2,v <-- imported-f2
new revision: 1\.2; previous revision: 1\.1
done"
# log
dotest import-101 "${testcvs} log imported-f1" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/imported-f1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/imported-f1,v
Working file: imported-f1
head: 1\.2
branch:
@@ -4955,13 +6273,13 @@ first-import
dotest import-104 \
"${testcvs} ci -m vendor-removed imported-f4" \
"Removing imported-f4;
-${TESTDIR}/cvsroot/first-dir/imported-f4,v <-- imported-f4
+${CVSROOT_DIRNAME}/first-dir/imported-f4,v <-- imported-f4
new revision: delete; previous revision: 1\.1\.1\.1
done"
# update to main line
dotest import-105 "${testcvs} -q update -A" \
-"${PROG} [a-z]*: warning: imported-f1 is not (any longer) pertinent
+"${PROG} [a-z]*: imported-f1 is no longer in the repository
[UP] imported-f2"
# second import - file4 deliberately unchanged
@@ -5015,7 +6333,7 @@ Use the following command to help the merge:"
# update to main line
dotest import-112 "${testcvs} -q update -A" \
-"${PROG} [a-z]*: warning: imported-f1 is not (any longer) pertinent
+"${PROG} [a-z]*: imported-f1 is no longer in the repository
[UP] imported-f2"
cd ..
@@ -5023,7 +6341,7 @@ Use the following command to help the merge:"
dotest import-113 \
"${testcvs} -q co -jjunk-1_0 -jjunk-2_0 first-dir" \
"${PROG} [a-z]*: file first-dir/imported-f1 does not exist, but is present in revision junk-2_0
-RCS file: ${TESTDIR}/cvsroot/first-dir/imported-f2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/imported-f2,v
retrieving revision 1\.1\.1\.1
retrieving revision 1\.1\.1\.2
Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into imported-f2
@@ -5119,7 +6437,7 @@ No conflicts created by this import"
U first-dir/file2"
cd first-dir
dotest importb-5 "${testcvs} -q log file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch: 1\.1\.1
@@ -5182,13 +6500,13 @@ N first-dir/adir/sub2/file2
N first-dir/bdir/subdir/file1
N first-dir/cdir/cfile
No conflicts created by this import
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir/sub1
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir/sub1/ssdir
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/adir/sub2
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/bdir
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/bdir/subdir
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/first-dir/cdir"
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub1/ssdir
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/adir/sub2
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/bdir
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/bdir/subdir
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/first-dir/cdir"
cd ..
mkdir 2; cd 2
dotest importc-2 "${testcvs} -q co first-dir" \
@@ -5211,7 +6529,14 @@ ${PROG} [a-z]*: Updating bdir/subdir"
"${testcvs} -q rtag -b -r release wip_test first-dir" ""
dotest importc-6 "${testcvs} -q update -r wip_test" "M cdir/cfile"
- if test "$remote" = no; then
+ if $remote; then
+ # Remote doesn't have the bug in the first place.
+ dotest importc-7r "${testcvs} -q ci -m modify -r wip_test" \
+"Checking in cdir/cfile;
+${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v <-- cfile
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done"
+ else
# This checkin should just succeed. That it doesn't is a
# bug (CVS 1.9.16 through the present seem to have it; CVS
# 1.9 did not).
@@ -5221,14 +6546,7 @@ ${PROG} \[[a-z]* aborted\]: there is no version here; do .${PROG} checkout. firs
# The workaround is to leave off the "-r wip_test".
dotest importc-7a "${testcvs} -q ci -m modify" \
"Checking in cdir/cfile;
-${TESTDIR}/cvsroot/first-dir/cdir/cfile,v <-- cfile
-new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
-done"
- else
- # Remote doesn't have the bug in the first place.
- dotest importc-7r "${testcvs} -q ci -m modify -r wip_test" \
-"Checking in cdir/cfile;
-${TESTDIR}/cvsroot/first-dir/cdir/cfile,v <-- cfile
+${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v <-- cfile
new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
done"
fi
@@ -5236,7 +6554,7 @@ done"
# TODO: should also be testing "import -d" when we update
# an existing file.
dotest importc-8 "${testcvs} -q log cdir/cfile" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/cdir/cfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/cdir/cfile,v
Working file: cdir/cfile
head: 1\.1
branch: 1\.1\.1
@@ -5266,7 +6584,7 @@ modify
============================================================================="
dotest importc-9 "${testcvs} -q log bdir/subdir/file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/bdir/subdir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/bdir/subdir/file1,v
Working file: bdir/subdir/file1
head: 1\.1
branch: 1\.1\.1
@@ -5328,13 +6646,12 @@ import-it
dotest import-after-initial-2 "$testcvs -Q co $module" ''
cd $module
echo original > $file
- dotest import-after-initial-3 "${testcvs} -Q add $file" \
-"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
+ dotest import-after-initial-3 "${testcvs} -Q add $file" ""
dotest import-after-initial-4 "${testcvs} -Q ci -m. $file" \
-"RCS file: ${TESTDIR}/cvsroot/$module/$file,v
+"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v
done
Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
initial revision: 1\.1
done"
@@ -5453,28 +6770,28 @@ done"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently'
dotest join-3 "${testcvs} -q commit -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file3,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file4,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file6,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file6,v
done
Checking in file6;
-${TESTDIR}/cvsroot/first-dir/file6,v <-- file6
+${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file8,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file8,v
done
Checking in file8;
-${TESTDIR}/cvsroot/first-dir/file8,v <-- file8
+${CVSROOT_DIRNAME}/first-dir/file8,v <-- file8
initial revision: 1\.1
done"
@@ -5499,28 +6816,28 @@ T file8'
'"${PROG}"' [a-z]*: scheduling `file8'\'' for removal
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove these files permanently'
dotest join-7 "${testcvs} -q ci -mx ." \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.2; previous revision: 1\.1
done
Removing file6;
-${TESTDIR}/cvsroot/first-dir/file6,v <-- file6
+${CVSROOT_DIRNAME}/first-dir/file6,v <-- file6
new revision: delete; previous revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file7,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
done
Checking in file7;
-${TESTDIR}/cvsroot/first-dir/file7,v <-- file7
+${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7
initial revision: 1\.1
done
Removing file8;
-${TESTDIR}/cvsroot/first-dir/file8,v <-- file8
+${CVSROOT_DIRNAME}/first-dir/file8,v <-- file8
new revision: delete; previous revision: 1\.1
done"
@@ -5547,21 +6864,21 @@ U first-dir/file8'
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest join-10 "${testcvs} -q ci -mx ." \
"Checking in file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file5,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file5,v
done
Checking in file5;
-${TESTDIR}/cvsroot/first-dir/Attic/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/Attic/file5,v <-- file5
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file6;
-${TESTDIR}/cvsroot/first-dir/Attic/file6,v <-- file6
+${CVSROOT_DIRNAME}/first-dir/Attic/file6,v <-- file6
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -5588,30 +6905,30 @@ T file8'
'"${PROG}"' [a-z]*: scheduling `file6'\'' for removal
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to remove these files permanently'
dotest join-14 "${testcvs} -q ci -mx ." \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/Attic/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/Attic/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Removing file3;
-${TESTDIR}/cvsroot/first-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/first-dir/file3,v <-- file3
new revision: delete; previous revision: 1\.1\.2\.1
done
Removing file4;
-${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
+${CVSROOT_DIRNAME}/first-dir/file4,v <-- file4
new revision: delete; previous revision: 1\.1\.2\.1
done
Removing file5;
-${TESTDIR}/cvsroot/first-dir/Attic/file5,v <-- file5
+${CVSROOT_DIRNAME}/first-dir/Attic/file5,v <-- file5
new revision: delete; previous revision: 1\.1\.2\.1
done
Removing file6;
-${TESTDIR}/cvsroot/first-dir/Attic/file6,v <-- file6
+${CVSROOT_DIRNAME}/first-dir/Attic/file6,v <-- file6
new revision: delete; previous revision: 1\.1\.2\.1
done"
@@ -5674,7 +6991,7 @@ M file4'
dotest join-20 "${testcvs} -q co -jbranch first-dir" \
"U first-dir/file1
U first-dir/file2
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file2
@@ -5708,7 +7025,7 @@ U first-dir/file7'
echo 'third revision of file4' > file4
dotest join-23 "${testcvs} -q update -jbranch ." \
"U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file2
@@ -5746,7 +7063,7 @@ T file7"
# the trunk (e.g. join-23).
dotest join-28 "${testcvs} -q update -j branch" \
"U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
retrieving revision 1.1
retrieving revision 1.1.2.1
Merging differences between 1.1 and 1.1.2.1 into file2
@@ -5760,6 +7077,41 @@ M file2
R file3
A file8"
+ # Checkout the mainline again to try updating and merging between two
+ # branches in the same step
+ # this seems a likely scenario - the user finishes up on branch and
+ # updates to br2 and merges in the same step - and there was a bug
+ # once that if the file was removed in the update then it wouldn't be
+ # readded in the merge
+ cd ..
+ rm -r first-dir
+ dotest join-twobranch-1 "${testcvs} -q co -rbranch first-dir" \
+'U first-dir/file1
+U first-dir/file2
+U first-dir/file8'
+ cd first-dir
+ dotest join-twobranch-2 "${testcvs} -q update -rbr2 -jbranch" \
+"cvs [a-z]*: file1 is no longer in the repository
+U file1
+U file2
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+retrieving revision 1\.1
+retrieving revision 1\.1\.2\.1
+Merging differences between 1\.1 and 1\.1\.2\.1 into file2
+U file3
+${PROG} [a-z]*: scheduling file3 for removal
+U file4
+${PROG} [a-z]*: file file4 has been modified, but has been removed in revision branch
+U file7
+${PROG} [a-z]*: file8 is no longer in the repository
+U file8"
+ # Verify that the right changes have been scheduled.
+ dotest join-twobranch-3 "${testcvs} -q update" \
+"A file1
+M file2
+R file3
+A file8"
+
# Checkout the mainline again to try merging from the trunk
# to a branch.
cd ..
@@ -5782,7 +7134,7 @@ T file7'
echo 'second revision of file7' > file7
dotest join-32 "${testcvs} -q ci -mx ." \
"Checking in file7;
-${TESTDIR}/cvsroot/first-dir/file7,v <-- file7
+${CVSROOT_DIRNAME}/first-dir/file7,v <-- file7
new revision: 1\.2; previous revision: 1\.1
done"
@@ -5808,7 +7160,7 @@ U file7"
# happens to do the right thing; see above join-20.
dotest join-36 "${testcvs} -q up -j T3 -j T4" \
"A file7
-RCS file: ${TESTDIR}/cvsroot/first-dir/file7,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file7,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into file7"
@@ -5832,17 +7184,17 @@ Merging differences between 1\.1 and 1\.2 into file7"
dotest join2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest join2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo 'initial contents of file1' >file1
dotest join2-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest join2-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest join2-5 "${testcvs} -q tag -b br1" "T file1"
@@ -5853,14 +7205,14 @@ done"
"${PROG} [a-z]*: scheduling file .bradd. for addition on branch .br1.
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest join2-7 "${testcvs} -q ci -m modify" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/bradd,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v
done
Checking in bradd;
-${TESTDIR}/cvsroot/first-dir/Attic/bradd,v <-- bradd
+${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v <-- bradd
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -5872,14 +7224,14 @@ done"
File: file1 Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest join2-10 "cat CVS/Tag" "Tbr1"
dotest join2-11 "${testcvs} -q update -j br1 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
@@ -5891,7 +7243,7 @@ modify on branch"
File: file1 Status: Locally Modified
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/file1,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/file1,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -5899,7 +7251,7 @@ File: file1 Status: Locally Modified
# And the checkin should go to the trunk
dotest join2-15 "${testcvs} -q ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
@@ -5916,7 +7268,7 @@ done"
# CVS, would be a lot of work and I'm not sure this case justifies
# it.
dotest join2-17-circumvent "${testcvs} -q update -A" \
-"${PROG} [a-z]*: warning: bradd is not (any longer) pertinent
+"${PROG} [a-z]*: bradd is no longer in the repository
[UP] file1"
: dotest join2-17 "${testcvs} -q update -A bradd" \
"${PROG} [a-z]*: warning: bradd is not (any longer) pertinent"
@@ -5926,13 +7278,13 @@ done"
File: bradd Status: Locally Added
Working revision: New file!
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/Attic/bradd,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/Attic/bradd,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest join2-20 "${testcvs} -q ci -m modify bradd" \
"Checking in bradd;
-${TESTDIR}/cvsroot/first-dir/bradd,v <-- bradd
+${CVSROOT_DIRNAME}/first-dir/bradd,v <-- bradd
new revision: 1\.2; previous revision: 1\.1
done"
@@ -5949,17 +7301,17 @@ done"
dotest join3-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest join3-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo 'initial contents of file1' >file1
dotest join3-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest join3-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest join3-5 "${testcvs} -q tag -b br1" "T file1"
@@ -5967,7 +7319,7 @@ done"
echo 'br1:line1' >>file1
dotest join3-7 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
@@ -5982,13 +7334,13 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
echo 'trunk:line1' >>file1
dotest join3-9 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
dotest join3-10 "${testcvs} -q tag -b br2" "T file1
@@ -5998,7 +7350,7 @@ T file2"
dotest join3-11 "${testcvs} -q update -r br1" "[UP] file1
${PROG} [a-z]*: file2 is no longer in the repository"
dotest join3-12 "${testcvs} -q update -j br2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into file1
@@ -6020,7 +7372,7 @@ U file1" "U file1"
echo 'br2:line1' >>file1
dotest join3-15 "${testcvs} -q ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2\.2\.1; previous revision: 1\.2
done"
@@ -6031,7 +7383,7 @@ done"
# and so it merges both the 1.1->1.2 and 1.2->1.2.2.1 changes.
# This seems like a reasonably plausible behavior.
dotest join3-17 "${testcvs} -q update -j br2 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.2\.2\.1
Merging differences between 1\.1 and 1\.2\.2\.1 into file1
@@ -6051,6 +7403,9 @@ br2:line1
;;
join-readonly-conflict)
+ # Previously, only tests 1 & 11 were being tested. I added the
+ # intermediate dotest's to try and diagnose a different failure
+ #
# Demonstrate that cvs-1.9.29 can fail on 2nd and subsequent
# conflict-evoking join attempts.
# Even with that version of CVS, This test failed only in
@@ -6058,50 +7413,77 @@ br2:line1
# operation only for files that were read-only (either due to
# use of cvs' global -r option, setting the CVSREAD envvar,
# or use of watch lists).
- mkdir 1; cd 1
+ mkdir join-readonly-conflict; cd join-readonly-conflict
dotest join-readonly-conflict-1 "$testcvs -q co -l ." ''
- module=x
+ module=join-readonly-conflict
mkdir $module
$testcvs -q add $module >>$LOGFILE 2>&1
cd $module
file=m
echo trunk > $file
- $testcvs -q add $file >>$LOGFILE 2>&1
- $testcvs -q ci -m . $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-2 "$testcvs -Q add $file" ''
- $testcvs tag -b B $file >>$LOGFILE 2>&1
- $testcvs -q update -rB $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-3 "$testcvs -q ci -m . $file" \
+"RCS file: $CVSROOT_DIRNAME/$module/$file,v
+done
+Checking in $file;
+$CVSROOT_DIRNAME/$module/$file,v <-- $file
+initial revision: 1\.1
+done"
+
+ dotest join-readonly-conflict-4 "$testcvs tag -b B $file" "T $file"
+ dotest join-readonly-conflict-5 "$testcvs -q update -rB $file" ''
echo branch B > $file
- $testcvs ci -m . $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-6 "$testcvs -q ci -m . $file" \
+"Checking in $file;
+$CVSROOT_DIRNAME/$module/$file,v <-- $file
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+done"
rm $file
- $testcvs update -A $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-7 "$testcvs -Q update -A $file" ''
# Make sure $file is read-only. This can happen more realistically
# via patch -- which could be used to apply a delta, yet would
# preserve a file's read-only permissions.
echo conflict > $file; chmod u-w $file
- $testcvs update -r B $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-8 "$testcvs update -r B $file" \
+"RCS file: $CVSROOT_DIRNAME/$module/$file,v
+retrieving revision 1\.1
+retrieving revision 1\.1\.2\.1
+Merging differences between 1\.1 and 1\.1\.2\.1 into $file
+rcsmerge: warning: conflicts during merge
+$PROG [a-z]*: conflicts found in $file
+C $file"
+ # restore to the trunk
rm -f $file
- $testcvs update -A $file >>$LOGFILE 2>&1
+ dotest join-readonly-conflict-9 "$testcvs -Q update -A $file" ''
+
# This one would fail because cvs couldn't open the existing
# (and read-only) .# file for writing.
echo conflict > $file
- test -w ".#$file.1.1" && fail "$file is writable"
- dotest join-readonly-conflict-2 "$testcvs update -r B $file" \
-"RCS file: ${TESTDIR}/cvsroot/$module/$file,v
+ # verify that the backup file is writable
+ if test -w ".#$file.1.1"; then
+ fail "join-readonly-conflict-10 : .#$file.1.1 is writable"
+ else
+ pass "join-readonly-conflict-10"
+ fi
+ dotest join-readonly-conflict-11 "$testcvs update -r B $file" \
+"RCS file: $CVSROOT_DIRNAME/$module/$file,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into $file
rcsmerge: warning: conflicts during merge
-${PROG} [a-z]*: conflicts found in $file
+$PROG [a-z]*: conflicts found in $file
C m"
cd ../..
- rm -rf 1
- rm -rf ${CVSROOT_DIRNAME}/$module
+ if $keep; then :; else
+ rm -rf join-readonly-conflict
+ rm -rf $CVSROOT_DIRNAME/$module
+ fi
;;
join-admin)
@@ -6137,7 +7519,7 @@ C m"
File: b Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/x/b,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/x/b,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -6147,6 +7529,87 @@ File: b Status: Up-to-date
rm -rf ${CVSROOT_DIRNAME}/$module
;;
+ join-admin-2)
+ # Show that when a merge (via update -kk -jtag1 -jtag2) first
+ # removes a file, then modifies another containing an $Id...$ line,
+ # the resulting file contains the unexpanded `$Id.$' string, as
+ # -kk requires.
+ mkdir 1; cd 1
+ dotest join-admin-2-1 "$testcvs -q co -l ." ''
+ module=x
+ mkdir $module
+ dotest join-admin-2-2 "$testcvs -q add $module" \
+"Directory ${CVSROOT_DIRNAME}/x added to the repository"
+ cd $module
+
+ # Create a file so applying the first tag works.
+ echo '$''Id$' > e0
+ cp e0 e
+ dotest join-admin-2-3 "$testcvs -Q add e" ''
+ dotest join-admin-2-4 "$testcvs -Q ci -m. e" \
+"RCS file: ${CVSROOT_DIRNAME}/x/e,v
+done
+Checking in e;
+${CVSROOT_DIRNAME}/x/e,v <-- e
+initial revision: 1\.1
+done"
+
+ dotest join-admin-2-5 "$testcvs -Q tag -b T" '' "${QUESTION} e0"
+ dotest join-admin-2-6 "$testcvs -Q update -r T" '' "${QUESTION} e0"
+ cp e0 e
+ dotest join-admin-2-7 "$testcvs -Q ci -m. e" \
+"Checking in e;
+${CVSROOT_DIRNAME}/x/e,v <-- e
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+done"
+
+ dotest join-admin-2-8 "$testcvs -Q update -A" '' "${QUESTION} e0"
+ dotest join-admin-2-9 "$testcvs -Q tag -b M1" '' "${QUESTION} e0"
+
+ echo '$''Id$' > b
+ dotest join-admin-2-10 "$testcvs -Q add b" ''
+ cp e0 e
+ dotest join-admin-2-11 "$testcvs -Q ci -m. b e" \
+"RCS file: ${CVSROOT_DIRNAME}/x/b,v
+done
+Checking in b;
+${CVSROOT_DIRNAME}/x/b,v <-- b
+initial revision: 1\.1
+done
+Checking in e;
+${CVSROOT_DIRNAME}/x/e,v <-- e
+new revision: 1\.2; previous revision: 1\.1
+done"
+
+ dotest join-admin-2-12 "$testcvs -Q tag -b M2" '' "${QUESTION} e0"
+
+ dotest join-admin-2-13 "$testcvs -Q update -r T" '' "${QUESTION} e0"
+ dotest join-admin-2-14 "$testcvs update -kk -jM1 -jM2" \
+"${PROG} [a-z]*: Updating .
+U b
+U e
+RCS file: ${CVSROOT_DIRNAME}/x/e,v
+retrieving revision 1\.1
+retrieving revision 1\.2
+Merging differences between 1\.1 and 1\.2 into e
+${QUESTION} e0" \
+"${QUESTION} e0
+${PROG} [a-z]*: Updating .
+U b
+U e
+RCS file: ${CVSROOT_DIRNAME}/x/e,v
+retrieving revision 1\.1
+retrieving revision 1\.2
+Merging differences between 1\.1 and 1\.2 into e"
+
+ # Verify that the $Id.$ string is not expanded.
+ dotest join-admin-2-15 "cat e" '$''Id$'
+
+ cd ../..
+ rm -rf 1
+ rm -rf ${CVSROOT_DIRNAME}/$module
+ ;;
+
new) # look for stray "no longer pertinent" messages.
mkdir ${CVSROOT_DIRNAME}/first-dir
@@ -6218,10 +7681,10 @@ File: b Status: Up-to-date
"${PROG} [a-z]*: scheduling file .a. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest newb-123c "${testcvs} -q ci -m added" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
done
Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
initial revision: 1\.1
done"
@@ -6249,7 +7712,7 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest newb-123h "${testcvs} -q ci -m removed" \
"Removing a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
new revision: delete; previous revision: 1\.1\.2
done"
@@ -6263,29 +7726,20 @@ done"
# Update the other copy, and make sure that a is removed.
cd ../1/first-dir
- # "Needs Patch" is a rather strange output here. Something like
+ # "Entry Invalid" is a rather strange output here. Something like
# "Removed in Repository" would make more sense.
- # The "Need Checkout" output is what CVS does if configured
- # --disable-server.
dotest newb-123j0 "${testcvs} status a" \
-"===================================================================
-File: a Status: Needs Patch
-
- Working revision: 1\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/a,v
- Sticky Tag: branch (branch: 1\.1\.2)
- Sticky Date: (none)
- Sticky Options: (none)" \
-"===================================================================
-File: a Status: Needs Checkout
+"${PROG} [a-z]*: a is no longer in the repository
+===================================================================
+File: a Status: Entry Invalid
Working revision: 1\.1.*
- Repository revision: 1\.1\.2\.1 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.1\.2\.1 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: branch (branch: 1\.1\.2)
Sticky Date: (none)
Sticky Options: (none)"
dotest newb-123j "${testcvs} -q update" \
-"${PROG} [a-z]*: warning: a is not (any longer) pertinent"
+"${PROG} [a-z]*: a is no longer in the repository"
if test -f a; then
fail newb-123k
@@ -6313,10 +7767,10 @@ File: a Status: Needs Checkout
"${PROG} [a-z]*: scheduling file .a. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest conflicts-126 "${testcvs} -q ci -m added" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
done
Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
initial revision: 1\.1
done"
@@ -6324,13 +7778,11 @@ done"
mkdir 2
cd 2
- # The need for TMPPWD here is a (minor) CVS bug; the
- # output should use the name of the repository as specified.
dotest conflicts-126.5 "${testcvs} co -p first-dir" \
"${PROG} [a-z]*: Updating first-dir
===================================================================
Checking out first-dir/a
-RCS: ${TMPPWD}/cvsroot/first-dir/a,v
+RCS: ${CVSROOT_DIRNAME}/first-dir/a,v
VERS: 1\.1
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
if ${CVS} co first-dir ; then
@@ -6349,10 +7801,10 @@ VERS: 1\.1
echo add a line >>a
mkdir dir1
dotest conflicts-127b "${testcvs} add dir1" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir1 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
dotest conflicts-128 "${testcvs} -q ci -m changed" \
"Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
new revision: 1\.2; previous revision: 1\.1
done"
cd ../..
@@ -6361,13 +7813,11 @@ done"
# contents.
mkdir 3
cd 3
- # The need for TMPPWD here is a (minor) CVS bug; the
- # output should use the name of the repository as specified.
dotest conflicts-128.5 "${testcvs} co -p -l first-dir" \
"${PROG} [a-z]*: Updating first-dir
===================================================================
Checking out first-dir/a
-RCS: ${TMPPWD}/cvsroot/first-dir/a,v
+RCS: ${CVSROOT_DIRNAME}/first-dir/a,v
VERS: 1\.2
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
add a line"
@@ -6388,12 +7838,12 @@ add a line"
File: a Status: Needs Merge
Working revision: 1\.1.*
- Repository revision: 1\.2 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest conflicts-129a "${testcvs} -nq update a" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into a
@@ -6401,7 +7851,7 @@ rcsmerge: warning: conflicts during merge
${PROG} [a-z]*: conflicts found in a
C a"
dotest conflicts-130 "${testcvs} -q update" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into a
@@ -6412,7 +7862,7 @@ ${QUESTION} dir1
${QUESTION} sdir" \
"${QUESTION} dir1
${QUESTION} sdir
-RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into a
@@ -6426,7 +7876,7 @@ C a"
File: a Status: File had conflicts on merge
Working revision: 1\.2.*
- Repository revision: 1\.2 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -6456,14 +7906,14 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!"
File: a Status: File had conflicts on merge
Working revision: 1\.2.*
- Repository revision: 1\.2 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest conflicts-132 "${testcvs} -q ci -m try" \
"${PROG} [a-z]*: warning: file .a. seems to still contain conflict indicators
Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
new revision: 1\.3; previous revision: 1\.2
done"
@@ -6475,13 +7925,13 @@ done"
File: a Status: Locally Modified
Working revision: 1\.3.*
- Repository revision: 1\.3 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.3 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest conflicts-133 "${testcvs} -q ci -m resolved" \
"Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
new revision: 1\.4; previous revision: 1\.3
done"
dotest conflicts-status-7 "${testcvs} status a" \
@@ -6489,7 +7939,7 @@ done"
File: a Status: Up-to-date
Working revision: 1\.4.*
- Repository revision: 1\.4 ${TESTDIR}/cvsroot/first-dir/a,v
+ Repository revision: 1\.4 ${CVSROOT_DIRNAME}/first-dir/a,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
@@ -6584,16 +8034,16 @@ File: a Status: Up-to-date
${PROG} [a-z]*: scheduling file .abc. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest conflicts2-142a3 "${testcvs} -q ci -m added" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a,v
done
Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/abc,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
done
Checking in abc;
-${TESTDIR}/cvsroot/first-dir/abc,v <-- abc
+${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
initial revision: 1\.1
done"
@@ -6615,7 +8065,7 @@ U first-dir/abc'
echo modify a >>a
dotest conflicts2-142b2 "${testcvs} -q ci -m modify-a" \
"Checking in a;
-${TESTDIR}/cvsroot/first-dir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/a,v <-- a
new revision: 1\.2; previous revision: 1\.1
done"
cd ../../2/first-dir
@@ -6638,7 +8088,13 @@ ${PROG} [a-z]*: a, version 1\.1, resurrected"
"${PROG} [a-z]*: scheduling .first-dir/a. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
- if test "$remote" = no; then
+ if $remote; then
+ # Haven't investigated this one.
+ dotest_fail conflicts2-142b8 "${testcvs} add first-dir/a" \
+"${PROG} add: in directory \.:
+${PROG} \[add aborted\]: there is no version here; do '${PROG} checkout' first"
+ cd first-dir
+ else
# The "nothing known" is a bug. Correct behavior is for a to get
# created, as above. Cause is pretty obvious - add.c
# calls update() without dealing with the fact we are chdir'd.
@@ -6656,12 +8112,6 @@ ${PROG} [a-z]*: first-dir/a, version 1\.2, resurrected"
dotest conflicts2-142b9 "${testcvs} rm -f a" \
"${PROG} [a-z]*: scheduling .a. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
- else
- # Haven't investigated this one.
- dotest_fail conflicts2-142b8 "${testcvs} add first-dir/a" \
-"${PROG} add: in directory \.:
-${PROG} \[add aborted\]: there is no version here; do '${PROG} checkout' first"
- cd first-dir
fi
# As before, 1.2 instead of 1.1 is a bug.
@@ -6682,7 +8132,7 @@ ${PROG} [a-z]*: a, version 1\.2, resurrected"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest conflicts2-142c1 "${testcvs} -q ci -m remove-abc" \
"Removing abc;
-${TESTDIR}/cvsroot/first-dir/abc,v <-- abc
+${CVSROOT_DIRNAME}/first-dir/abc,v <-- abc
new revision: delete; previous revision: 1\.1
done"
cd ../../2/first-dir
@@ -6704,16 +8154,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
${PROG} [a-z]*: scheduling file .same\.c. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest conflicts2-142d1 "${testcvs} -q ci -m added" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa\.c,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa\.c,v
done
Checking in aa\.c;
-${TESTDIR}/cvsroot/first-dir/aa\.c,v <-- aa\.c
+${CVSROOT_DIRNAME}/first-dir/aa\.c,v <-- aa\.c
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/same\.c,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/same\.c,v
done
Checking in same\.c;
-${TESTDIR}/cvsroot/first-dir/same\.c,v <-- same\.c
+${CVSROOT_DIRNAME}/first-dir/same\.c,v <-- same\.c
initial revision: 1\.1
done"
cd ../../2/first-dir
@@ -6726,7 +8176,7 @@ done"
# cvs add just to get them in that habit (also, trying to implement
# the local CVS behavior for remote without the cvs add seems
# pretty difficult).
- if test "$remote" = yes; then
+ if $remote; then
dotest_fail conflicts2-142d2 "${testcvs} -q update" \
"${QUESTION} aa\.c
${QUESTION} same\.c
@@ -6746,7 +8196,7 @@ U same\.c"
File: aa\.c Status: Unresolved Conflict
Working revision: No entry for aa\.c
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/aa\.c,v"
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/aa\.c,v"
# Could also be testing the case in which the cvs add happened
# before the commit by the other user.
@@ -6789,7 +8239,7 @@ File: aa\.c Status: Unresolved Conflict
dotest conflicts3-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest conflicts3-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd ..
mkdir 2; cd 2
dotest conflicts3-3 "${testcvs} -q co -l first-dir" ''
@@ -6800,16 +8250,16 @@ File: aa\.c Status: Unresolved Conflict
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest conflicts3-5 "${testcvs} -q ci -m add-them" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
cd ../../2/first-dir
@@ -6831,35 +8281,35 @@ ${PROG} [a-z]*: scheduling .file2. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove these files permanently"
dotest conflicts3-11 "${testcvs} -q ci -m remove-them" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done
Removing file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: delete; previous revision: 1\.1
done"
cd ../../1/first-dir
dotest conflicts3-12 "${testcvs} -n -q update" \
-"${PROG} [a-z]*: warning: file1 is not (any longer) pertinent
-${PROG} [a-z]*: warning: file2 is not (any longer) pertinent"
+"${PROG} [a-z]*: file1 is no longer in the repository
+${PROG} [a-z]*: file2 is no longer in the repository"
dotest conflicts3-13 "${testcvs} -q update" \
-"${PROG} [a-z]*: warning: file1 is not (any longer) pertinent
-${PROG} [a-z]*: warning: file2 is not (any longer) pertinent"
+"${PROG} [a-z]*: file1 is no longer in the repository
+${PROG} [a-z]*: file2 is no longer in the repository"
# OK, now add a directory to both working directories
# and see that CVS doesn't lose its mind.
mkdir sdir
dotest conflicts3-14 "${testcvs} add sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
touch sdir/sfile
dotest conflicts3-14a "${testcvs} add sdir/sfile" \
"${PROG} [a-z]*: scheduling file .sdir/sfile. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest conflicts3-14b "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir/sfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v
done
Checking in sdir/sfile;
-${TESTDIR}/cvsroot/first-dir/sdir/sfile,v <-- sfile
+${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v <-- sfile
initial revision: 1\.1
done"
@@ -6876,7 +8326,7 @@ done"
# that sdir is even a directory (stat'ing everything would be
# too slow). The remote behavior makes more sense to me (but
# would this affect other cases?).
- if test "$remote" = yes; then
+ if $remote; then
dotest conflicts3-15 "${testcvs} -q update" \
"${QUESTION} sdir"
else
@@ -6923,16 +8373,9 @@ ${PROG} [a-z]*: ignoring first-dir/sdir (CVS/Entries missing)"
dotest conflicts3-21 "${testcvs} -q update -d sdir" "U sdir/sfile"
rm -r sdir/CVS
dotest conflicts3-22 "${testcvs} -q update" "${QUESTION} sdir"
- if test "x$remote" = xyes; then
- # It isn't particularly swift that CVS prints this
- # "cannot open CVS/Entries" where it has already printed
- # "? sdir". At least I don't think so. But do note: (1)
- # non-fatal error, and (2) tells us which directory has
- # the problem.
+ if $remote; then
dotest_fail conflicts3-23 "${testcvs} -q update -PdA" \
"${QUESTION} sdir
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory
${PROG} update: move away sdir/sfile; it is in the way
C sdir/sfile"
else
@@ -6954,22 +8397,13 @@ C sdir/sfile"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest conflicts3-26 "${testcvs} ci -m remove sdir/sfile" \
"Removing sdir/sfile;
-${TESTDIR}/cvsroot/first-dir/sdir/sfile,v <-- sfile
+${CVSROOT_DIRNAME}/first-dir/sdir/sfile,v <-- sfile
new revision: delete; previous revision: 1\.1
done"
rm -r sdir/CVS
dotest conflicts3-27 "${testcvs} -q update" "${QUESTION} sdir"
- if test "x$remote" = xyes; then
- # Regarding "cannot open CVS/Entries", see comments at
- # conflicts3-23.
- dotest conflicts3-28 "${testcvs} -q update -PdA" \
-"${QUESTION} sdir
-${PROG} update: in directory sdir:
-${PROG} update: cannot open CVS/Entries for reading: No such file or directory"
- else
- dotest conflicts3-28 "${testcvs} -q update -PdA" \
+ dotest conflicts3-28 "${testcvs} -q update -PdA" \
"${QUESTION} sdir"
- fi
cd ../..
@@ -6983,17 +8417,17 @@ ${PROG} update: cannot open CVS/Entries for reading: No such file or directory"
dotest clean-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest clean-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo "The usual boring test text." > cleanme.txt
dotest clean-3 "${testcvs} add cleanme.txt" \
"${PROG} [a-z]*: scheduling file .cleanme\.txt. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest clean-4 "${testcvs} -q ci -m clean-3" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/cleanme\.txt,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/cleanme\.txt,v
done
Checking in cleanme\.txt;
-${TESTDIR}/cvsroot/first-dir/cleanme\.txt,v <-- cleanme\.txt
+${CVSROOT_DIRNAME}/first-dir/cleanme\.txt,v <-- cleanme\.txt
initial revision: 1\.1
done"
# Okay, preparation is done, now test.
@@ -7027,10 +8461,38 @@ U cleanme\.txt"
"The usual boring test text\.
bluegill"
+ # Now try with conflicts
+ cd ..
+ dotest clean-15 "${testcvs} -q co -d second-dir first-dir" \
+'U second-dir/cleanme\.txt'
+ cd second-dir
+ echo "conflict test" >> cleanme.txt
+ dotest clean-16 "${testcvs} -q ci -m." \
+"Checking in cleanme\.txt;
+${CVSROOT_DIRNAME}/first-dir/cleanme\.txt,v <-- cleanme\.txt
+new revision: 1\.2; previous revision: 1\.1
+done"
+ cd ../first-dir
+ echo "fish" >> cleanme.txt
+ dotest clean-17 "${testcvs} -nq update" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/cleanme\.txt,v
+retrieving revision 1\.1
+retrieving revision 1\.2
+Merging differences between 1\.1 and 1\.2 into cleanme\.txt
+rcsmerge: warning: conflicts during merge
+${PROG} [a-z]*: conflicts found in cleanme\.txt
+C cleanme\.txt"
+ dotest clean-18 "${testcvs} -q update -C" \
+"(Locally modified cleanme\.txt moved to \.#cleanme\.txt\.1\.1)
+U cleanme\.txt"
+ dotest clean-19 "cat .#cleanme.txt.1.1" \
+"The usual boring test text\.
+fish"
+
# Done. Clean up.
cd ../..
rm -rf 1
- rm -rf ${TESTDIR}/cvsroot/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
modules)
@@ -7069,7 +8531,7 @@ U CVSROOT/verifymsg'
echo "# made a change" >>CVSROOT/modules
dotest modules-1d "${testcvs} -q ci -m add-modules" \
"Checking in CVSROOT/modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7093,7 +8555,7 @@ U CVSROOT/verifymsg'
echo "# made a change" >>CVSROOT/modules
dotest modules-2d "${testcvs} -q ci -m add-modules" \
"Checking in CVSROOT/modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7120,7 +8582,7 @@ U CVSROOT/verifymsg'
echo "# made a change" >>CVSROOT/modules
dotest modules-3g "${testcvs} -q ci -m add-modules" \
"Checking in CVSROOT/modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7142,12 +8604,12 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
cd first-dir
mkdir subdir
dotest modules-143a "${testcvs} add subdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
cd subdir
mkdir ssdir
dotest modules-143b "${testcvs} add ssdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir/ssdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository"
touch a b
@@ -7159,16 +8621,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest modules-145 "${testcvs} ci -m added" \
"${PROG} [a-z]*: Examining .
${PROG} [a-z]*: Examining ssdir
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/a,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/a,v
done
Checking in a;
-${TESTDIR}/cvsroot/first-dir/subdir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/b,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/b,v
done
Checking in b;
-${TESTDIR}/cvsroot/first-dir/subdir/b,v <-- b
+${CVSROOT_DIRNAME}/first-dir/subdir/b,v <-- b
initial revision: 1\.1
done"
@@ -7208,7 +8670,7 @@ bogusalias first-dir/subdir/a -a
EOF
dotest modules-148 "${testcvs} ci -m 'add modules' CVSROOT/modules" \
"Checking in CVSROOT/modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7337,16 +8799,16 @@ U first-dir/subdir/b"
'"${PROG}"' [a-z]*: scheduling file `file2'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add these files permanently'
dotest modules-155c3 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -7363,7 +8825,7 @@ U first-dir/file2"
"${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest modules-155c7 "${testcvs} -q ci -m remove-it" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
cd ..
@@ -7385,19 +8847,19 @@ U first-dir/file2"
mkdir first-dir second-dir third-dir
dotest modules2-setup-2 \
"${testcvs} add first-dir second-dir third-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository
-Directory ${TESTDIR}/cvsroot/second-dir added to the repository
-Directory ${TESTDIR}/cvsroot/third-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/third-dir added to the repository"
cd third-dir
touch file3
dotest modules2-setup-3 "${testcvs} add file3" \
"${PROG} [a-z]*: scheduling file .file3. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest modules2-setup-4 "${testcvs} -q ci -m add file3" \
-"RCS file: ${TESTDIR}/cvsroot/third-dir/file3,v
+"RCS file: ${CVSROOT_DIRNAME}/third-dir/file3,v
done
Checking in file3;
-${TESTDIR}/cvsroot/third-dir/file3,v <-- file3
+${CVSROOT_DIRNAME}/third-dir/file3,v <-- file3
initial revision: 1\.1
done"
cd ../..
@@ -7409,15 +8871,19 @@ done"
dotest modules2-1 "${testcvs} -q co CVSROOT/modules" \
'U CVSROOT/modules'
cd CVSROOT
- echo 'ampermodule &first-dir &second-dir' > modules
- echo 'combmodule third-dir file3 &first-dir' >> modules
- echo 'ampdirmod -d newdir &first-dir &second-dir' >> modules
- echo 'badmod -d newdir' >> modules
+ cat >> modules << EOF
+ampermodule &first-dir &second-dir
+combmodule third-dir file3 &first-dir
+ampdirmod -d newdir &first-dir &second-dir
+badmod -d newdir
+messymod first-dir &messymodchild
+messymodchild -d sdir/child second-dir
+EOF
# Depending on whether the user also ran the modules test
# we will be checking in revision 1.2 or 1.3.
dotest modules2-2 "${testcvs} -q ci -m add-modules" \
"Checking in modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7445,6 +8911,26 @@ EOF
cd ..
+ # There used to be a nasty-hack that made CVS skip creation of the
+ # module dir (in this case ampermodule) when -n was specified
+ dotest modules2-ampermod-1 "${testcvs} -q co -n ampermodule" ''
+ dotest modules2-ampermod-2 "test -d ampermodule/first-dir" ''
+ dotest modules2-ampermod-3 "test -d ampermodule/second-dir" ''
+
+ # Test release of a module
+ if echo yes |${testcvs} release -d ampermodule >>${LOGFILE}; then
+ pass modules2-ampermod-release-1
+ else
+ fail modules2-ampermod-release-1
+ fi
+ dotest_fail modules2-ampermod-release-2 "test -d ampermodule" ''
+
+ # and the '-n' test again, but in conjunction with '-d'
+ dotest modules2-ampermod-4 "${testcvs} -q co -n -d newname ampermodule" ''
+ dotest modules2-ampermod-5 "test -d newname/first-dir" ''
+ dotest modules2-ampermod-6 "test -d newname/second-dir" ''
+ rm -rf newname
+
# Now we create another directory named first-dir and make
# sure that CVS doesn't get them mixed up.
mkdir first-dir
@@ -7468,12 +8954,12 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
A first-dir/amper1
${PROG} [a-z]*: Updating second-dir"
- if test "$remote" = no; then
+ if $remote; then
dotest modules2-13 "${testcvs} -q ci -m add-it ampermodule" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/amper1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/amper1,v
done
Checking in ampermodule/first-dir/amper1;
-${TESTDIR}/cvsroot/first-dir/amper1,v <-- amper1
+${CVSROOT_DIRNAME}/first-dir/amper1,v <-- amper1
initial revision: 1\.1
done"
else
@@ -7481,10 +8967,10 @@ done"
# Work around this bug.
cd ampermodule
dotest modules2-13 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/amper1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/amper1,v
done
Checking in first-dir/amper1;
-${TESTDIR}/cvsroot/first-dir/amper1,v <-- amper1
+${CVSROOT_DIRNAME}/first-dir/amper1,v <-- amper1
initial revision: 1\.1
done"
cd ..
@@ -7529,13 +9015,61 @@ U first-dir/amper1"
U first-dir/amper1
${PROG} [a-z]*: Updating second-dir"
dotest modules2-21 "test -f newdir/first-dir/amper1" ""
- dotest_fail modules2-22 "${testcvs} co badmod" \
+ dotest modules2-22 "test -d newdir/second-dir" ""
+ dotest_fail modules2-23 "${testcvs} co badmod" \
"${PROG} [a-z]*: modules file missing directory for module badmod" \
"${PROG} [a-z]*: modules file missing directory for module badmod
${PROG} \[[a-z]* aborted\]: cannot expand modules"
cd ..
rm -r 1
+ # Confirm that a rename with added depth nested in an ampersand
+ # module works.
+ mkdir 1; cd 1
+ dotest modules2-nestedrename-1 "${testcvs} -q co messymod" \
+"U messymod/amper1"
+ dotest modules2-nestedrename-2 "test -d messymod/sdir" ''
+ dotest modules2-nestedrename-3 "test -d messymod/sdir/CVS" ''
+ dotest modules2-nestedrename-4 "test -d messymod/sdir/child" ''
+ dotest modules2-nestedrename-5 "test -d messymod/sdir/child/CVS" ''
+ cd ..; rm -r 1
+
+ # FIXME: client/server has a bug. It should be working like a local
+ # repository in this case, but fails to check out the second module
+ # in the list when a branch is specified.
+ mkdir 1; cd 1
+ dotest modules2-ampertag-setup-1 \
+"${testcvs} -Q rtag tag first-dir second-dir third-dir" \
+''
+ dotest modules2-ampertag-1 "${testcvs} -q co -rtag ampermodule" \
+"U first-dir/amper1"
+ if $remote; then
+ dotest_fail modules2-ampertag-2 "test -d ampermodule/second-dir" ''
+ dotest_fail modules2-ampertag-3 "test -d ampermodule/second-dir/CVS" ''
+ else
+ dotest modules2-ampertag-2 "test -d ampermodule/second-dir" ''
+ dotest modules2-ampertag-3 "test -d ampermodule/second-dir/CVS" ''
+ fi
+ cd ..; rm -r 1
+
+ # Test for tag files when an ampermod is renamed with more path
+ # elements than it started with.
+ #
+ # FIXME: This is currently broken in the remote case, possibly only
+ # because the messymodchild isn't being checked out at all.
+ mkdir 1; cd 1
+# dotest modules2-tagfiles-setup-1 \
+#"${testcvs} -Q rtag -b branch first-dir second-dir" \
+#''
+ dotest modules2-tagfiles-1 "${testcvs} -q co -rtag messymod" \
+"U messymod/amper1"
+ if $remote; then
+ dotest_fail modules2-tagfiles-2r "test -d messymod/sdir" ''
+ else
+ dotest modules2-tagfiles-2 "cat messymod/sdir/CVS/Tag" 'Ttag'
+ fi
+ cd ..; rm -r 1
+
# Test that CVS gives an error if one combines -a with
# other options.
# Probably would be better to break this out into a separate
@@ -7548,7 +9082,7 @@ ${PROG} \[[a-z]* aborted\]: cannot expand modules"
echo 'aliasopt -a -d onedir first-dir' >modules
dotest modules2-a0 "${testcvs} -q ci -m add-modules" \
"Checking in modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7557,11 +9091,9 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
"${PROG} [a-z]*: -a cannot be specified in the modules file along with other options" \
"${PROG} [a-z]*: -a cannot be specified in the modules file along with other options
${PROG} \[[a-z]* aborted\]: cannot expand modules"
+ cd ..; rm -r 1
# Clean up.
- rm -r CVSROOT
- cd ..
- rm -r 1
rm -rf ${CVSROOT_DIRNAME}/first-dir
rm -rf ${CVSROOT_DIRNAME}/second-dir
rm -rf ${CVSROOT_DIRNAME}/third-dir
@@ -7577,7 +9109,7 @@ ${PROG} \[[a-z]* aborted\]: cannot expand modules"
dotest modules3-0 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest modules3-1 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo file1 >file1
@@ -7585,10 +9117,10 @@ ${PROG} \[[a-z]* aborted\]: cannot expand modules"
"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest modules3-3 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ..
@@ -7607,7 +9139,7 @@ another/path/test -d another/path/test first-dir
EOF
dotest modules3-5 "${testcvs} -q ci -m add-modules" \
"Checking in modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7627,8 +9159,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
# considering this is a documented technique and everything.
dotest modules3-7a \
"${testcvs} import -m add-dirs second-dir tag1 tag2" \
-"${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/suba
-${PROG} [a-z]*: Importing ${TESTDIR}/cvsroot/second-dir/suba/subb
+"${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/suba
+${PROG} [a-z]*: Importing ${CVSROOT_DIRNAME}/second-dir/suba/subb
No conflicts created by this import" "
No conflicts created by this import"
@@ -7640,15 +9172,15 @@ ${PROG} [a-z]*: Updating second-dir/suba
${PROG} [a-z]*: Updating second-dir/suba/subb" \
"${PROG} server: Updating second-dir"
- if test "x$remote" = xyes; then
+ if $remote; then
cd second-dir
mkdir suba
dotest modules3-7-workaround1 "${testcvs} add suba" \
-"Directory ${TESTDIR}/cvsroot/second-dir/suba added to the repository"
+"Directory ${CVSROOT_DIRNAME}/second-dir/suba added to the repository"
cd suba
mkdir subb
dotest modules3-7-workaround2 "${testcvs} add subb" \
-"Directory ${TESTDIR}/cvsroot/second-dir/suba/subb added to the repository"
+"Directory ${CVSROOT_DIRNAME}/second-dir/suba/subb added to the repository"
cd ../..
fi
@@ -7658,10 +9190,10 @@ ${PROG} [a-z]*: Updating second-dir/suba/subb" \
"${PROG} [a-z]*: scheduling file .fileb. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest modules3-7d "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/second-dir/suba/subb/fileb,v
+"RCS file: ${CVSROOT_DIRNAME}/second-dir/suba/subb/fileb,v
done
Checking in fileb;
-${TESTDIR}/cvsroot/second-dir/suba/subb/fileb,v <-- fileb
+${CVSROOT_DIRNAME}/second-dir/suba/subb/fileb,v <-- fileb
initial revision: 1\.1
done"
cd ../../..
@@ -7686,7 +9218,7 @@ done"
# While we are doing things like twisted uses of '/' (e.g.
# modules3-12), try this one.
- if test "x$remote" = xyes; then
+ if $remote; then
dotest_fail modules3-11b \
"${testcvs} -q update ${TESTDIR}/1/src/sub1/sub2/sub3/dir/file1" \
"absolute pathname .${TESTDIR}/1/src/sub1/sub2/sub3/dir. illegal for server"
@@ -7708,24 +9240,24 @@ done"
# instead of a real error).
# I'm tempted to just make it a fatal error to have '/' in a
# module name. But see comments at modules3-16.
- if test "x$remote" = xno; then
- mkdir 1; cd 1
- dotest modules3-12 "${testcvs} -q co path/in/modules" \
+ if $remote; then :; else
+ mkdir 1; cd 1
+ dotest modules3-12 "${testcvs} -q co path/in/modules" \
"U first-dir/file1"
- dotest modules3-13 "test -f path/in/modules/first-dir/file1" ''
- cd ..; rm -r 1
+ dotest modules3-13 "test -f path/in/modules/first-dir/file1" ''
+ cd ..; rm -r 1
+ fi # end of tests skipped for remote
- # Now here is where it gets seriously bogus.
+ # Now here is where it used to get seriously bogus.
mkdir 1; cd 1
dotest modules3-14 \
"${testcvs} -q rtag tag1 path/in/modules" ''
- # CVS creates this even though rtag should *never* affect
+ # CVS used to create this even though rtag should *never* affect
# the directory current when it is called!
- dotest modules3-15 "test -d path/in/modules" ''
- # Just for trivia's sake, rdiff is not similarly vulnerable
- # because it passes 0 for run_module_prog to do_module.
+ dotest_fail modules3-15 "test -d path/in/modules" ''
+ # Just for trivia's sake, rdiff was not similarly vulnerable
+ # because it passed 0 for run_module_prog to do_module.
cd ..; rm -r 1
- fi # end of tests skipped for remote
# Some people seem to want this to work. I still suspect there
# are dark corners in slashes in module names. This probably wants
@@ -7750,12 +9282,12 @@ done"
dotest modules4-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest modules4-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
mkdir subdir
dotest modules4-3 "${testcvs} add subdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
echo file1 > file1
dotest modules4-4 "${testcvs} add file1" \
@@ -7768,16 +9300,16 @@ done"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest modules4-6 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/file2,v
done
Checking in subdir/file2;
-${TESTDIR}/cvsroot/first-dir/subdir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/subdir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -7793,7 +9325,7 @@ somewhat -a first-dir !first-dir/subdir
EOF
dotest modules4-8 "${testcvs} -q ci -m add-modules" \
"Checking in modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7811,7 +9343,11 @@ U first-dir/subdir/file2"
dotest_fail modules4-11 "test -d first-dir/subdir" ''
rm -r first-dir
- if test "$remote" = no; then
+ if $remote; then
+ # But remote seems to do it the other way.
+ dotest modules4-11a "${testcvs} -q co somewhat" "U first-dir/file1"
+ dotest_fail modules4-11b "test -d first-dir/subdir" ''
+ else
# This is strange behavior, in that the order of the
# "!first-dir/subdir" and "first-dir" matter, and it isn't
# clear that they should. I suspect it is long-standing
@@ -7819,10 +9355,6 @@ U first-dir/subdir/file2"
dotest modules4-11a "${testcvs} -q co somewhat" \
"U first-dir/file1
U first-dir/subdir/file2"
- else
- # But remote seems to do it the other way.
- dotest modules4-11a "${testcvs} -q co somewhat" "U first-dir/file1"
- dotest_fail modules4-11b "test -d first-dir/subdir" ''
fi
rm -r first-dir
@@ -7835,7 +9367,7 @@ ${PROG} [a-z]*: Ignoring first-dir/subdir"
cd 1/first-dir/subdir
dotest modules4-13 "${testcvs} log file2" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/file2,v
Working file: file2
head: 1\.1
branch:
@@ -7867,11 +9399,11 @@ add-it
cd first-dir
mkdir subdir
dotest modules5-2 "${testcvs} add subdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
cd subdir
mkdir ssdir
dotest modules5-3 "${testcvs} add ssdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir/ssdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir/ssdir added to the repository"
touch a b
dotest modules5-4 "${testcvs} add a b" \
"${PROG} [a-z]*: scheduling file .a. for addition
@@ -7881,16 +9413,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest modules5-5 "${testcvs} ci -m added" \
"${PROG} [a-z]*: Examining .
${PROG} [a-z]*: Examining ssdir
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/a,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/a,v
done
Checking in a;
-${TESTDIR}/cvsroot/first-dir/subdir/a,v <-- a
+${CVSROOT_DIRNAME}/first-dir/subdir/a,v <-- a
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/b,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/b,v
done
Checking in b;
-${TESTDIR}/cvsroot/first-dir/subdir/b,v <-- b
+${CVSROOT_DIRNAME}/first-dir/subdir/b,v <-- b
initial revision: 1\.1
done"
@@ -7927,7 +9459,7 @@ EOF
dotest modules5-7 "${testcvs} ci -m 'add modules' CVSROOT/modules" \
"" \
"Checking in CVSROOT/modules;
-${TESTDIR}/cvsroot/CVSROOT/modules,v <-- modules
+${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -7935,7 +9467,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
cd ..
rm -rf first-dir
# Test that real modules check out to realmodule/a, not subdir/a.
- if test "$remote" = "yes"; then
+ if $remote; then
dotest modules5-8 "${testcvs} co realmodule" \
"U realmodule/a
${PROG} [a-z]*: Executing ..${CVSROOT_DIRNAME}/checkout\.sh. .realmodule..
@@ -7950,7 +9482,7 @@ args: realmodule"
fi
dotest modules5-9 "test -d realmodule && test -f realmodule/a" ""
dotest_fail modules5-10 "test -f realmodule/b" ""
- if test "$remote" = "yes"; then
+ if $remote; then
dotest modules5-11 "${testcvs} -q co realmodule" \
"checkout script invoked in .*
args: realmodule"
@@ -7990,8 +9522,10 @@ args: ${CVSROOT_DIRNAME}/first-dir/subdir"
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]*
args: realmodule MYTAG"
- if test "$remote" = "yes"; then
+ if $remote; then
dotest modules5-16 "${testcvs} -q export -r MYTAG realmodule" \
"U realmodule/a
export script invoked in .*
@@ -8010,7 +9544,7 @@ args: realmodule"
# FIXCVS: The client gets confused in these cases and tries to
# store the scripts in the wrong places.
- if test "$remote" != "yes"; then
+ if $remote; then :; else
# Now test the ability to check out a single file from a directory
dotest modules5-18 "${testcvs} co dirmodule/a" \
"U dirmodule/a
@@ -8149,7 +9683,7 @@ $PROG [a-z]*: Rebuilding administrative file database"
echo "TopLevelAdmin=yes" >config
dotest cvsadm-setup-2 "${testcvs} -q ci -m yes-top-level" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -8222,12 +9756,12 @@ ${PROG} [a-z]*: Examining CVSROOT"
mkdir mod2-2
mkdir mod2-2/sub2-2
dotest cvsadm-2a "${testcvs} add mod1 mod1-2 mod2 mod2/sub2 mod2-2 mod2-2/sub2-2" \
-"Directory ${TESTDIR}/cvsroot/mod1 added to the repository
-Directory ${TESTDIR}/cvsroot/mod1-2 added to the repository
-Directory ${TESTDIR}/cvsroot/mod2 added to the repository
-Directory ${TESTDIR}/cvsroot/mod2/sub2 added to the repository
-Directory ${TESTDIR}/cvsroot/mod2-2 added to the repository
-Directory ${TESTDIR}/cvsroot/mod2-2/sub2-2 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/mod1 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod1-2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2/sub2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2-2 added to the repository
+Directory ${CVSROOT_DIRNAME}/mod2-2/sub2-2 added to the repository"
# Populate the directories for the halibut
echo "file1" > mod1/file1
@@ -8327,7 +9861,7 @@ U dir2d1/sub2d1/file1"
dotest cvsadm-7b "cat CVS/Repository" \
"${AREP}\."
dotest cvsadm-7d "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-7f "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir2d1
@@ -8338,7 +9872,7 @@ U dir2d2/sub2d2/file2"
dotest cvsadm-8b "cat CVS/Repository" \
"${AREP}\."
dotest cvsadm-8d "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-8f "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir2d2
@@ -8428,7 +9962,7 @@ U dir2d1/sub2d1/file1"
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-13f "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}."
dotest cvsadm-13h "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS 1mod dir2d1
@@ -8446,7 +9980,7 @@ U dir2d2/sub2d2/file2"
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-14f "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-14h "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS 1mod dir2d2
@@ -8516,7 +10050,7 @@ U dir2d1/sub2d1/file1"
"${AREP}mod2/sub2"
# the usual for 2d1mod
dotest cvsadm-18f "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}."
dotest cvsadm-18h "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS 2mod dir2d1
@@ -8534,7 +10068,7 @@ U dir2d2/sub2d2/file2"
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-19f "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-19h "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS 2mod dir2d2
@@ -8587,7 +10121,7 @@ U dir2d1/sub2d1/file1"
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-22f "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-22h "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir1d1 dir2d1
@@ -8605,7 +10139,7 @@ U dir2d2/sub2d2/file2"
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-23f "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-23h "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir1d1 dir2d2
@@ -8642,7 +10176,7 @@ U dir2d1/sub2d1/file1"
"${AREP}mod2/sub2"
# the usual for 2d1mod
dotest cvsadm-25f "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-25h "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir1d2 dir2d1
@@ -8660,7 +10194,7 @@ U dir2d2/sub2d2/file2"
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-26f "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-26h "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir1d2 dir2d2
@@ -8678,12 +10212,12 @@ U dir2d1-2/sub2d1-2/file1-2"
"${AREP}\."
# the usual for 2d1mod
dotest cvsadm-27d "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-27f "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-27h "cat dir2d1-2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-27j "cat dir2d1-2/sub2d1-2/CVS/Repository" \
"${AREP}mod1-2"
rm -rf CVS dir2d1 dir2d1-2
@@ -8698,12 +10232,12 @@ U dir2d2/sub2d2/file2"
"${AREP}\."
# the usual for 2d1mod
dotest cvsadm-28d "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-28f "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-28h "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-28j "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir2d1 dir2d2
@@ -8721,12 +10255,12 @@ U dir2d2-2/sub2d2-2/file2-2"
"${AREP}\."
# the usual for 2d2mod
dotest cvsadm-29d "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-29f "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-29h "cat dir2d2-2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2-2"
dotest cvsadm-29j "cat dir2d2-2/sub2d2-2/CVS/Repository" \
"${AREP}mod2-2/sub2-2"
rm -rf CVS dir2d2 dir2d2-2
@@ -8885,7 +10419,7 @@ U dir/dir2d1/sub2d1/file1"
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-1d13h "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d13j "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
@@ -8905,7 +10439,7 @@ U dir/dir2d2/sub2d2/file2"
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-1d14h "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d14j "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -8922,7 +10456,7 @@ U dir/2mod-2/file2-2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d15d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 2mod
dotest cvsadm-1d15f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
@@ -8940,7 +10474,7 @@ U dir/dir1d1/file1"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d16d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 2mod
dotest cvsadm-1d16f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
@@ -8958,7 +10492,7 @@ U dir/dir1d2/file2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d17d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 2mod
dotest cvsadm-1d17f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
@@ -8976,13 +10510,13 @@ U dir/dir2d1/sub2d1/file1"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d18d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 2mod
dotest cvsadm-1d18f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d1mod
dotest cvsadm-1d18h "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d18j "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
@@ -8996,13 +10530,13 @@ U dir/dir2d2/sub2d2/file2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d19d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 2mod
dotest cvsadm-1d19f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-1d19h "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d19j "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -9061,7 +10595,7 @@ U dir/dir2d1/sub2d1/file1"
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-1d22h "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d22j "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
@@ -9081,7 +10615,7 @@ U dir/dir2d2/sub2d2/file2"
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-1d23h "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d23j "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -9098,7 +10632,7 @@ U dir/dir1d2-2/file2-2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d24d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 1d2mod
dotest cvsadm-1d24f "cat dir/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
@@ -9116,13 +10650,13 @@ U dir/dir2d1/sub2d1/file1"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d25d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 1d2mod
dotest cvsadm-1d25f "cat dir/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d1mod
dotest cvsadm-1d25h "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d25j "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
rm -rf CVS dir
@@ -9136,13 +10670,13 @@ U dir/dir2d2/sub2d2/file2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d26d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}mod2"
# the usual for 1d2mod
dotest cvsadm-1d26f "cat dir/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-1d26h "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d26j "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -9159,15 +10693,15 @@ U dir/dir2d1-2/sub2d1-2/file1-2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d27d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}CVSROOT/Emptydir"
# the usual for 2d1mod
dotest cvsadm-1d27f "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d27h "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
# the usual for 2d1mod
dotest cvsadm-1d27j "cat dir/dir2d1-2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d27l "cat dir/dir2d1-2/sub2d1-2/CVS/Repository" \
"${AREP}mod1-2"
rm -rf CVS dir
@@ -9181,15 +10715,15 @@ U dir/dir2d2/sub2d2/file2"
"${AREP}\."
# the usual for the dir level
dotest cvsadm-1d28d "cat dir/CVS/Repository" \
-"${AREP}\."
+"${AREP}CVSROOT/Emptydir"
# the usual for 2d1mod
dotest cvsadm-1d28f "cat dir/dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}\."
dotest cvsadm-1d28h "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
# the usual for 2d2mod
dotest cvsadm-1d28j "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d28l "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
rm -rf CVS dir
@@ -9209,12 +10743,12 @@ U dir/dir2d2-2/sub2d2-2/file2-2"
"${AREP}\."
# the usual for 2d2mod
dotest cvsadm-1d29f "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2"
dotest cvsadm-1d29h "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
# the usual for 2d2mod
dotest cvsadm-1d29j "cat dir/dir2d2-2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
+"${AREP}mod2-2"
dotest cvsadm-1d29l "cat dir/dir2d2-2/sub2d2-2/CVS/Repository" \
"${AREP}mod2-2/sub2-2"
rm -rf CVS dir
@@ -9228,283 +10762,283 @@ U dir/dir2d2-2/sub2d2-2/file2-2"
"${PROG} [a-z]*: cannot chdir to dir: No such file or directory
${PROG} [a-z]*: ignoring module 1mod"
- if test "$remote" = no; then
- # Remote can't handle this, even with the "mkdir dir".
- # This was also true of CVS 1.9.
+ if $remote; then :; else
+ # Remote can't handle this, even with the "mkdir dir".
+ # This was also true of CVS 1.9.
- mkdir dir
- dotest cvsadm-2d3 "${testcvs} co -d dir/dir2 1mod" \
+ mkdir dir
+ 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" \
+ dotest cvsadm-2d3b "cat CVS/Repository" \
"${AREP}\."
- dotest_fail cvsadm-2d3d "test -f dir/CVS/Repository" ""
- dotest cvsadm-2d3f "cat dir/dir2/CVS/Repository" \
+ dotest_fail cvsadm-2d3d "test -f dir/CVS/Repository" ""
+ dotest cvsadm-2d3f "cat dir/dir2/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-2d4 "${testcvs} co -d dir/dir2 2mod" \
+ 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" \
+ dotest cvsadm-2d4b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-2d4f "cat dir/dir2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-2d5 "${testcvs} co -d dir/dir2 1d1mod" \
+ 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" \
+ dotest cvsadm-2d5b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-2d5f "cat dir/dir2/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-2d6 "${testcvs} co -d dir/dir2 1d2mod" \
+ 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" \
+ dotest cvsadm-2d6b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-2d6f "cat dir/dir2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-2d7 "${testcvs} co -d dir/dir2 2d1mod" \
+ 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" \
+ dotest cvsadm-2d7b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-2d7f "cat dir/dir2/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-2d8 "${testcvs} co -d dir/dir2 2d2mod" \
+ 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" \
+ dotest cvsadm-2d8b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-2d8f "cat dir/dir2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- ##################################################
- ## And now, a few of those tests revisited to
- ## test the behavior of the -N flag.
- ##################################################
+ ##################################################
+ ## And now, a few of those tests revisited to
+ ## test the behavior of the -N flag.
+ ##################################################
- dotest cvsadm-N3 "${testcvs} co -N 1mod" \
+ dotest cvsadm-N3 "${testcvs} co -N 1mod" \
"${PROG} [a-z]*: Updating 1mod
U 1mod/file1"
- dotest cvsadm-N3b "cat CVS/Repository" \
+ dotest cvsadm-N3b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N3d "cat 1mod/CVS/Repository" \
+ dotest cvsadm-N3d "cat 1mod/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS 1mod
+ rm -rf CVS 1mod
- dotest cvsadm-N4 "${testcvs} co -N 2mod" \
+ dotest cvsadm-N4 "${testcvs} co -N 2mod" \
"${PROG} [a-z]*: Updating 2mod
U 2mod/file2"
- dotest cvsadm-N4b "cat CVS/Repository" \
+ dotest cvsadm-N4b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N4d "cat 2mod/CVS/Repository" \
+ dotest cvsadm-N4d "cat 2mod/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS 2mod
+ rm -rf CVS 2mod
- dotest cvsadm-N5 "${testcvs} co -N 1d1mod" \
+ dotest cvsadm-N5 "${testcvs} co -N 1d1mod" \
"${PROG} [a-z]*: Updating dir1d1
U dir1d1/file1"
- dotest cvsadm-N5b "cat CVS/Repository" \
+ dotest cvsadm-N5b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N5d "cat dir1d1/CVS/Repository" \
+ dotest cvsadm-N5d "cat dir1d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir1d1
+ rm -rf CVS dir1d1
- dotest cvsadm-N6 "${testcvs} co -N 1d2mod" \
+ dotest cvsadm-N6 "${testcvs} co -N 1d2mod" \
"${PROG} [a-z]*: Updating dir1d2
U dir1d2/file2"
- dotest cvsadm-N6b "cat CVS/Repository" \
+ dotest cvsadm-N6b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N6d "cat dir1d2/CVS/Repository" \
+ dotest cvsadm-N6d "cat dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir1d2
+ rm -rf CVS dir1d2
- dotest cvsadm-N7 "${testcvs} co -N 2d1mod" \
+ dotest cvsadm-N7 "${testcvs} co -N 2d1mod" \
"${PROG} [a-z]*: Updating dir2d1/sub2d1
U dir2d1/sub2d1/file1"
- dotest cvsadm-N7b "cat CVS/Repository" \
+ dotest cvsadm-N7b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N7d "cat dir2d1/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N7f "cat dir2d1/sub2d1/CVS/Repository" \
+ dotest cvsadm-N7d "cat dir2d1/CVS/Repository" \
+"${AREP}\."
+ dotest cvsadm-N7f "cat dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir2d1
+ rm -rf CVS dir2d1
- dotest cvsadm-N8 "${testcvs} co -N 2d2mod" \
+ dotest cvsadm-N8 "${testcvs} co -N 2d2mod" \
"${PROG} [a-z]*: Updating dir2d2/sub2d2
U dir2d2/sub2d2/file2"
- dotest cvsadm-N8b "cat CVS/Repository" \
+ dotest cvsadm-N8b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N8d "cat dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N8f "cat dir2d2/sub2d2/CVS/Repository" \
+ dotest cvsadm-N8d "cat dir2d2/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N8f "cat dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir2d2
+ rm -rf CVS dir2d2
- ## the ones in one-deep directories
+ ## the ones in one-deep directories
- dotest cvsadm-N1d3 "${testcvs} co -N -d dir 1mod" \
+ 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" \
+ dotest cvsadm-N1d3b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d3d "cat dir/CVS/Repository" \
+ dotest cvsadm-N1d3d "cat dir/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d3f "cat dir/1mod/CVS/Repository" \
+ dotest cvsadm-N1d3f "cat dir/1mod/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- dotest cvsadm-N1d4 "${testcvs} co -N -d dir 2mod" \
+ 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" \
+ dotest cvsadm-N1d4b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d4f "cat dir/2mod/CVS/Repository" \
+ dotest cvsadm-N1d4d "cat dir/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N1d4f "cat dir/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- dotest cvsadm-N1d5 "${testcvs} co -N -d dir 1d1mod" \
+ 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" \
+ dotest cvsadm-N1d5b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d5d "cat dir/CVS/Repository" \
+ dotest cvsadm-N1d5d "cat dir/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d5d "cat dir/dir1d1/CVS/Repository" \
+ dotest cvsadm-N1d5d "cat dir/dir1d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- dotest cvsadm-N1d6 "${testcvs} co -N -d dir 1d2mod" \
+ 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" \
+ dotest cvsadm-N1d6b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d6f "cat dir/dir1d2/CVS/Repository" \
+ dotest cvsadm-N1d6d "cat dir/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N1d6f "cat dir/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- dotest cvsadm-N1d7 "${testcvs} co -N -d dir 2d1mod" \
+ 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" \
+ dotest cvsadm-N1d7b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d7f "cat dir/dir2d1/CVS/Repository" \
+ dotest cvsadm-N1d7d "cat dir/CVS/Repository" \
"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N1d7h "cat dir/dir2d1/sub2d1/CVS/Repository" \
+ dotest cvsadm-N1d7f "cat dir/dir2d1/CVS/Repository" \
+"${AREP}\."
+ dotest cvsadm-N1d7h "cat dir/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- dotest cvsadm-N1d8 "${testcvs} co -N -d dir 2d2mod" \
+ 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" \
+ dotest cvsadm-N1d8b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d8d "cat dir/CVS/Repository" \
+ dotest cvsadm-N1d8d "cat dir/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N1d8d "cat dir/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N1d8d "cat dir/dir2d2/sub2d2/CVS/Repository" \
+ dotest cvsadm-N1d8d "cat dir/dir2d2/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N1d8d "cat dir/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- ## the ones in two-deep directories
+ ## the ones in two-deep directories
- mkdir dir
- dotest cvsadm-N2d3 "${testcvs} co -N -d dir/dir2 1mod" \
+ mkdir dir
+ 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" \
+ dotest cvsadm-N2d3b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-N2d3f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d3h "cat dir/dir2/1mod/CVS/Repository" \
+ dotest cvsadm-N2d3h "cat dir/dir2/1mod/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-N2d4 "${testcvs} co -N -d dir/dir2 2mod" \
+ 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" \
+ dotest cvsadm-N2d4b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d4h "cat dir/dir2/2mod/CVS/Repository" \
+ dotest cvsadm-N2d4f "cat dir/dir2/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N2d4h "cat dir/dir2/2mod/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-N2d5 "${testcvs} co -N -d dir/dir2 1d1mod" \
+ 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" \
+ dotest cvsadm-N2d5b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-N2d5f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d5h "cat dir/dir2/dir1d1/CVS/Repository" \
+ dotest cvsadm-N2d5h "cat dir/dir2/dir1d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-N2d6 "${testcvs} co -N -d dir/dir2 1d2mod" \
+ 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" \
+ dotest cvsadm-N2d6b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d6h "cat dir/dir2/dir1d2/CVS/Repository" \
+ dotest cvsadm-N2d6f "cat dir/dir2/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N2d6h "cat dir/dir2/dir1d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-N2d7 "${testcvs} co -N -d dir/dir2 2d1mod" \
+ 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" \
+ dotest cvsadm-N2d7b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d7f "cat dir/dir2/dir2d1/CVS/Repository" \
+ dotest cvsadm-N2d7f "cat dir/dir2/CVS/Repository" \
"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N2d7h "cat dir/dir2/dir2d1/sub2d1/CVS/Repository" \
+ dotest cvsadm-N2d7g "cat dir/dir2/dir2d1/CVS/Repository" \
+"${AREP}\."
+ dotest cvsadm-N2d7h "cat dir/dir2/dir2d1/sub2d1/CVS/Repository" \
"${AREP}mod1"
- rm -rf CVS dir
+ rm -rf CVS dir
- mkdir dir
- dotest cvsadm-N2d8 "${testcvs} co -N -d dir/dir2 2d2mod" \
+ 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" \
+ dotest cvsadm-N2d8b "cat CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" \
+ dotest cvsadm-N2d8f "cat dir/dir2/CVS/Repository" \
"${AREP}\."
- dotest cvsadm-N2d8h "cat dir/dir2/dir2d2/CVS/Repository" \
-"${AREP}CVSROOT/Emptydir"
- dotest cvsadm-N2d8j "cat dir/dir2/dir2d2/sub2d2/CVS/Repository" \
+ dotest cvsadm-N2d8h "cat dir/dir2/dir2d2/CVS/Repository" \
+"${AREP}mod2"
+ dotest cvsadm-N2d8j "cat dir/dir2/dir2d2/sub2d2/CVS/Repository" \
"${AREP}mod2/sub2"
- rm -rf CVS dir
+ rm -rf CVS dir
fi # end of tests to be skipped for remote
@@ -9518,7 +11052,7 @@ U dir/dir2/dir2d2/sub2d2/file2"
echo "# empty file" >config
dotest cvsadm-cleanup-2 "${testcvs} -q ci -m cvsadm-cleanup" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -9547,9 +11081,10 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest emptydir-1 "${testcvs} co CVSROOT/modules" \
"U CVSROOT/modules"
echo "# Module defs for emptydir tests" > CVSROOT/modules
- echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT/modules
+ echo "2d1mod -d dir2d1/sub/sub2d1 mod1" >> CVSROOT/modules
echo "2d1moda -d dir2d1/suba moda/modasub" >> CVSROOT/modules
- echo "comb -a 2d1mod 2d1moda" >> CVSROOT/modules
+ echo "2d1modb -d dir2d1/suba mod1" >> CVSROOT/modules
+ echo "comb -a 2d1modb 2d1moda" >> CVSROOT/modules
dotest emptydir-2 "${testcvs} ci -m add-modules" \
"${PROG} [a-z]*: Examining CVSROOT
@@ -9570,7 +11105,7 @@ ${PROG} [a-z]*: Updating moda"
echo "file1" > mod1/file1
mkdir moda/modasub
dotest emptydir-3b "${testcvs} add moda/modasub" \
-"Directory ${TESTDIR}/cvsroot/moda/modasub added to the repository"
+"Directory ${CVSROOT_DIRNAME}/moda/modasub added to the repository"
echo "filea" > moda/modasub/filea
dotest emptydir-4 "${testcvs} add mod1/file1 moda/modasub/filea" \
"${PROG} [a-z]*: scheduling file .mod1/file1. for addition
@@ -9593,8 +11128,8 @@ done"
# End Populate.
dotest emptydir-6 "${testcvs} co 2d1mod" \
-"${PROG} [a-z]*: Updating dir2d1/sub2d1
-U dir2d1/sub2d1/file1"
+"${PROG} [a-z]*: Updating dir2d1/sub/sub2d1
+U dir2d1/sub/sub2d1/file1"
cd dir2d1
touch emptyfile
# It doesn't make any sense to add a file (or do much of anything
@@ -9602,10 +11137,10 @@ U dir2d1/sub2d1/file1"
# the working directory doesn't correspond to anything in
# the repository.
dotest_fail emptydir-7 "${testcvs} add emptyfile" \
-"${PROG} \[[a-z]* aborted\]: cannot add to ${TESTDIR}/cvsroot/CVSROOT/Emptydir"
+"${PROG} \[[a-z]* aborted\]: cannot add to ${CVSROOT_DIRNAME}/CVSROOT/Emptydir"
mkdir emptydir
dotest_fail emptydir-8 "${testcvs} add emptydir" \
-"${PROG} \[[a-z]* aborted\]: cannot add to ${TESTDIR}/cvsroot/CVSROOT/Emptydir"
+"${PROG} \[[a-z]* aborted\]: cannot add to ${CVSROOT_DIRNAME}/CVSROOT/Emptydir"
cd ..
rm -rf CVS dir2d1
@@ -9626,15 +11161,16 @@ U dir2d1/sub2d1/file1"
mkdir 2; cd 2
dotest emptydir-12 "${testcvs} -q co 2d1moda" \
"U dir2d1/suba/filea"
- # OK, this is the crux of the matter. Some people think
- # it would be more logical if this showed "moda". But why
- # "moda" (from module 2d1moda) and not "." (from module 2d1mod)?
- dotest emptydir-13 "cat dir2d1/CVS/Repository" "CVSROOT/Emptydir"
- dotest emptydir-14 "${testcvs} co comb" \
-"${PROG} [a-z]*: Updating dir2d1/sub2d1
-U dir2d1/sub2d1/file1
+ # OK, this is the crux of the matter. This used to show "Emptydir",
+ # but everyone seemed to think it should show "moda". This
+ # usually works better, but not always as shown by the following
+ # test.
+ dotest emptydir-13 "cat dir2d1/CVS/Repository" "moda"
+ dotest_fail emptydir-14 "${testcvs} co comb" \
+"${PROG} [a-z]*: existing repository ${CVSROOT_DIRNAME}/moda/modasub does not match ${TESTDIR}/cvsroot/mod1
+${PROG} [a-z]*: ignoring module 2d1modb
${PROG} [a-z]*: Updating dir2d1/suba"
- dotest emptydir-15 "cat dir2d1/CVS/Repository" "CVSROOT/Emptydir"
+ dotest emptydir-15 "cat dir2d1/CVS/Repository" "moda"
cd ..
rm -r 1 2
@@ -9692,14 +11228,14 @@ done"
# Done.
# Try checking out the module in a local directory
- if test "$remote" = yes; then
+ if $remote; then
dotest_fail abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \
"${PROG} \[server aborted\]: absolute pathname .${TESTDIR}/1. illegal for server"
dotest abspath-2a-try2 "${testcvs} co -d 1 mod1" \
"${PROG} [a-z]*: Updating 1
U 1/file1"
else
- dotest abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \
+ dotest abspath-2a "${testcvs} co -d ${TESTDIR}/1 mod1" \
"${PROG} [a-z]*: Updating ${TESTDIR}/1
U ${TESTDIR}/1/file1"
fi # remote workaround
@@ -9731,8 +11267,8 @@ U ${TESTDIR}/1/file1"
# "touch 1/2/3" requires directories 1 and 1/2 to already
# exist, we expect ${TESTDIR}/1 to already exist. I believe
# this is the behavior of CVS 1.9 and earlier.
- if test "$remote" = no; then
- dotest_fail abspath-3.1 "${testcvs} co -d ${TESTDIR}/1/2 mod1" \
+ if $remote; then :; else
+ dotest_fail abspath-3.1 "${testcvs} co -d ${TESTDIR}/1/2 mod1" \
"${PROG} [a-z]*: cannot chdir to 1: No such file or directory
${PROG} [a-z]*: ignoring module mod1"
fi
@@ -9741,7 +11277,7 @@ ${PROG} [a-z]*: ignoring module mod1"
${PROG} [a-z]*: ignoring module mod1"
mkdir 1
- if test "$remote" = yes; then
+ if $remote; then
# The server wants the directory to exist, but that is
# a bug, it should only need to exist on the client side.
# See also cvsadm-2d3.
@@ -9774,8 +11310,8 @@ U ${TESTDIR}/1/2/file1"
# Now try someplace where we don't have permission.
mkdir ${TESTDIR}/barf
chmod -w ${TESTDIR}/barf
- if test "$remote" = yes; then
- dotest_fail abspath-4 "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
+ if $remote; then
+ dotest_fail abspath-4r "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
"${PROG} \[server aborted\]: absolute pathname .${TESTDIR}/barf/sub. illegal for server"
else
dotest_fail abspath-4 "${testcvs} co -d ${TESTDIR}/barf/sub mod1" \
@@ -9787,8 +11323,8 @@ U ${TESTDIR}/1/2/file1"
# Try checking out two modules into the same directory.
- if test "$remote" = yes; then
- dotest abspath-5a "${testcvs} co -d 1 mod1 mod2" \
+ if $remote; then
+ dotest abspath-5ar "${testcvs} co -d 1 mod1 mod2" \
"${PROG} [a-z]*: Updating 1/mod1
U 1/mod1/file1
${PROG} [a-z]*: Updating 1/mod2
@@ -9811,8 +11347,8 @@ U ${TESTDIR}/1/mod2/file2"
# Try checking out the top-level module.
- if test "$remote" = yes; then
- dotest abspath-6a "${testcvs} co -d 1 ." \
+ if $remote; then
+ dotest abspath-6ar "${testcvs} co -d 1 ." \
"${PROG} [a-z]*: Updating 1
${PROG} [a-z]*: Updating 1/CVSROOT
${DOTSTAR}
@@ -9845,25 +11381,25 @@ U ${TESTDIR}/1/mod2/file2"
# doesn't mess with the current working directory.
mkdir 1
cd 1
- if test "$remote" = yes; then
- dotest_fail abspath-7a "${testcvs} -q co -d ../2 mod2" \
+ if $remote; then
+ dotest_fail abspath-7ar "${testcvs} -q co -d ../2 mod2" \
"${PROG} server: protocol error: .\.\./2. contains more leading \.\.
${PROG} \[server aborted\]: than the 0 which Max-dotdot specified"
cd ..
- dotest abspath-7a-try2 "${testcvs} -q co -d 2 mod2" \
+ dotest abspath-7a-try2r "${testcvs} -q co -d 2 mod2" \
"U 2/file2"
cd 1
else
- dotest abspath-7a "${testcvs} -q co -d ${TESTDIR}/2 mod2" \
+ dotest abspath-7a "${testcvs} -q co -d ${TESTDIR}/2 mod2" \
"U ${TESTDIR}/2/file2"
fi # remote workaround
dotest abspath-7b "ls" ""
dotest abspath-7c "${testcvs} -q co mod1" \
"U mod1/file1"
cd mod1
- if test "$remote" = yes; then
+ if $remote; then
cd ../..
- dotest abspath-7d "${testcvs} -q co -d 3 mod2" \
+ dotest abspath-7dr "${testcvs} -q co -d 3 mod2" \
"U 3/file2"
cd 1/mod1
else
@@ -9902,7 +11438,7 @@ ${PROG} \[server aborted\]: than the 0 which Max-dotdot specified"
echo "TopLevelAdmin=yes" >config
dotest toplevel-1b "${testcvs} -q ci -m yes-top-level" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -9913,8 +11449,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest toplevel-1 "${testcvs} -q co -l ." ''
mkdir top-dir second-dir
dotest toplevel-2 "${testcvs} add top-dir second-dir" \
-"Directory ${TESTDIR}/cvsroot/top-dir added to the repository
-Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/top-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
cd top-dir
touch file1
@@ -9922,10 +11458,10 @@ Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest toplevel-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/top-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/top-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/top-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/top-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ..
@@ -9936,10 +11472,10 @@ done"
"${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest toplevel-4s "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/second-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/second-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/second-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/second-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -9998,6 +11534,7 @@ U top-dir/file1"
"${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied
${PROG} [a-z]*: Updating top-dir" \
"${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied
+${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied
${PROG} [a-z]*: in directory \.:
${PROG} [a-z]*: cannot open CVS/Entries for reading: No such file or directory
${PROG} [a-z]*: Updating top-dir"
@@ -10010,7 +11547,7 @@ ${PROG} [a-z]*: Updating top-dir"
echo "# empty file" >config
dotest toplevel-cleanup-2 "${testcvs} -q ci -m toplevel-cleanup" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -10031,7 +11568,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
echo "TopLevelAdmin=no" >config
dotest toplevel2-1b "${testcvs} -q ci -m no-top-level" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -10043,8 +11580,8 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest toplevel2-1 "${testcvs} -q co -l ." ''
mkdir top-dir second-dir
dotest toplevel2-2 "${testcvs} add top-dir second-dir" \
-"Directory ${TESTDIR}/cvsroot/top-dir added to the repository
-Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/top-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
cd top-dir
touch file1
@@ -10052,10 +11589,10 @@ Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest toplevel2-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/top-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/top-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/top-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/top-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ..
@@ -10066,10 +11603,10 @@ done"
"${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest toplevel2-4s "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/second-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/second-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/second-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/second-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -10106,7 +11643,7 @@ U top-dir/file1"
echo "# empty file" >config
dotest toplevel2-cleanup-2 "${testcvs} -q ci -m toplevel2-cleanup" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -10190,7 +11727,7 @@ EOF
dotest editor-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest editor-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1 file2
dotest editor-3 "${testcvs} add file1 file2" \
@@ -10198,16 +11735,16 @@ EOF
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest editor-4 "${testcvs} -e ${TESTDIR}/editme -q ci" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
dotest editor-5 "${testcvs} -q tag -b br" "T file1
@@ -10216,7 +11753,7 @@ T file2"
echo modify >>file1
dotest editor-7 "${testcvs} -e ${TESTDIR}/editme -q ci" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
# OK, now we want to make sure "ci -r" puts in the branch
@@ -10228,12 +11765,12 @@ done"
echo add a line >>file2
dotest editor-9 "${testcvs} -q -e ${TESTDIR}/editme ci -rbr file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest editor-log-file1 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -10246,7 +11783,6 @@ description:
revision 1\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
branches: 1\.1\.2;
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10258,7 +11794,6 @@ xCVS: ----------------------------------------------------------------------
----------------------------
revision 1\.1\.2\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10273,7 +11808,7 @@ xCVS: ----------------------------------------------------------------------
# The only difference between the two expect strings is the
# presence or absence of "Committing in ." for 1.1.2.1.
dotest editor-log-file2 "${testcvs} log -N file2" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
Working file: file2
head: 1\.1
branch:
@@ -10286,7 +11821,6 @@ description:
revision 1\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
branches: 1\.1\.2;
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10298,7 +11832,6 @@ xCVS: ----------------------------------------------------------------------
----------------------------
revision 1\.1\.2\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10307,7 +11840,7 @@ xCVS: Tag: br
xCVS: file2
xCVS: ----------------------------------------------------------------------
=============================================================================" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
Working file: file2
head: 1\.1
branch:
@@ -10320,7 +11853,6 @@ description:
revision 1\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
branches: 1\.1\.2;
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10332,7 +11864,6 @@ xCVS: ----------------------------------------------------------------------
----------------------------
revision 1\.1\.2\.1
date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0
-x
xCVS: ----------------------------------------------------------------------
xCVS: Enter Log. Lines beginning with .CVS:. are removed automatically
xCVS:
@@ -10393,20 +11924,11 @@ xCVS: ----------------------------------------------------------------------
fi
cd ../../2/1dir
- # FIXME: should be using dotest.
- ${testcvs} -q update 2>../tst167.err
- cat ../tst167.err >>${LOGFILE}
- cat <<EOF >../tst167.ans
-${PROG} server: warning: foo is not (any longer) pertinent
-${PROG} update: unable to remove ./foo: Permission denied
-EOF
- if cmp ../tst167.ans ../tst167.err >/dev/null ||
- ( echo "${PROG} [update aborted]: cannot rename file foo to CVS/,,foo: Permission denied" | cmp - ../tst167.err >/dev/null )
- then
- pass 168
- else
- fail 168
- fi
+ dotest 168 "${testcvs} -q update" \
+"${PROG} [a-z]*: foo is no longer in the repository
+${PROG} update: unable to remove foo: Permission denied" \
+"${PROG} [a-z]*: foo is no longer in the repository
+${PROG} update: unable to remove \./foo: Permission denied"
cd ..
chmod u+w 1dir
@@ -10428,7 +11950,7 @@ EOF
dotest errmsg2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest errmsg2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
dotest_fail errmsg2-3 "${testcvs} add CVS" \
"${PROG} [a-z]*: cannot add special file .CVS.; skipping"
@@ -10453,16 +11975,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
# Make sure that none of the error messages left droppings
# which interfere with normal operation.
dotest errmsg2-7 "${testcvs} -q ci -m add-file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
mkdir sdir
cd ..
dotest errmsg2-8 "${testcvs} add first-dir/sdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir added to the repository"
# while we're here... check commit with no CVS directory
dotest_fail errmsg2-8a "${testcvs} -q ci first-dir nonexistant" \
"${PROG} [a-z]*: nothing known about .nonexistant'
@@ -10478,13 +12000,13 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!"
mkdir sdir10
dotest errmsg2-10 "${testcvs} add file10 sdir10" \
"${PROG} [a-z]*: scheduling file .file10. for addition
-Directory ${TESTDIR}/cvsroot/first-dir/sdir10 added to the repository
+Directory ${CVSROOT_DIRNAME}/first-dir/sdir10 added to the repository
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest errmsg2-11 "${testcvs} -q ci -m add-file10" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file10,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file10,v
done
Checking in file10;
-${TESTDIR}/cvsroot/first-dir/file10,v <-- file10
+${CVSROOT_DIRNAME}/first-dir/file10,v <-- file10
initial revision: 1\.1
done"
# Try to see that there are no droppings left by
@@ -10496,7 +12018,7 @@ done"
cd ..
mkdir first-dir/sdir10/ssdir
dotest errmsg2-13 "${testcvs} add first-dir/sdir10/ssdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/sdir10/ssdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir added to the repository"
touch first-dir/sdir10/ssdir/ssfile
dotest errmsg2-14 \
@@ -10527,26 +12049,23 @@ ${PROG} \[add aborted\]: no repository"
# or directory which already is there.
dotest errmsg2-17 "${testcvs} -q ci -m checkin" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file15,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file15,v
done
Checking in first-dir/file15;
-${TESTDIR}/cvsroot/first-dir/file15,v <-- file15
+${CVSROOT_DIRNAME}/first-dir/file15,v <-- file15
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/sdir10/ssdir/ssfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir/ssfile,v
done
Checking in first-dir/sdir10/ssdir/ssfile;
-${TESTDIR}/cvsroot/first-dir/sdir10/ssdir/ssfile,v <-- ssfile
+${CVSROOT_DIRNAME}/first-dir/sdir10/ssdir/ssfile,v <-- ssfile
initial revision: 1\.1
done"
dotest errmsg2-18 "${testcvs} -Q tag test" ''
- dotest_fail errmsg2-19 "${testcvs} annotate -rtest -Dyesterday" \
-"${PROG} \[[a-z]* aborted\]: rcsbuf_open: internal error"
-
# trying to import the repository
- if test "$remote" = "no"; then
+ if $remote; then :; else
cd ${CVSROOT_DIRNAME}
dotest_fail errmsg2-20 "${testcvs} import -mtest . A B" \
"${PROG} \[[a-z]* aborted\]: attempt to import the repository"
@@ -10556,7 +12075,57 @@ done"
cd ..
rm -r 1
- rm -rf ${TESTDIR}/cvsroot/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+ ;;
+
+ adderrmsg)
+ # Test some of the error messages the 'add' command can return and
+ # their reactions to '-q'.
+
+ # First the usual setup; create a directory first-dir.
+ mkdir 1; cd 1
+ dotest adderrmsg-init1 "${testcvs} -q co -l ." ''
+ mkdir adderrmsg-dir
+ dotest adderrmsg-init2 "${testcvs} add adderrmsg-dir" \
+"Directory ${CVSROOT_DIRNAME}/adderrmsg-dir added to the repository"
+ cd adderrmsg-dir
+
+ # try to add the admin dir
+ dotest_fail adderrmsg-1 "${testcvs} add CVS" \
+"${PROG} [a-z]*: cannot add special file .CVS.; skipping"
+ # might not want to see this message when you 'cvs add *'
+ dotest_fail adderrmsg-2 "${testcvs} -q add CVS" ""
+
+ # to test some other messages
+ touch file1
+ dotest adderrmsg-3 "${testcvs} add file1" \
+"${PROG} [a-z]*: scheduling file .file1. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
+
+ # add it twice
+ dotest_fail adderrmsg-4 "${testcvs} add file1" \
+"${PROG} [a-z]*: file1 has already been entered"
+ dotest_fail adderrmsg-5 "${testcvs} -q add file1" ""
+
+ dotest adderrmsg-6 "${testcvs} -q ci -madd" \
+"RCS file: ${CVSROOT_DIRNAME}/adderrmsg-dir/file1,v
+done
+Checking in file1;
+${CVSROOT_DIRNAME}/adderrmsg-dir/file1,v <-- file1
+initial revision: 1\.1
+done"
+
+ # file in Entries & repository
+ dotest_fail adderrmsg-7 "${testcvs} add file1" \
+"${PROG} [a-z]*: file1 already exists, with version number 1\.1"
+ dotest_fail adderrmsg-8 "${testcvs} -q add file1" ""
+
+ # clean up
+ cd ../..
+ if $keep; then :; else
+ rm -r 1
+ rm -rf ${CVSROOT_DIRNAME}/adderrmsg-dir
+ fi
;;
devcom)
@@ -10769,7 +12338,7 @@ U first-dir/abc'
dotest_fail devcom-some3 "test -w first-dir/abc" ''
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -10922,7 +12491,7 @@ G@#..!@#=&"
# Now test disconnected "cvs edit" and the format of the
# CVS/Notify file.
- if test "$remote" = yes; then
+ if $remote; then
CVS_SERVER_SAVED=${CVS_SERVER}
CVS_SERVER=${TESTDIR}/cvs-none; export CVS_SERVER
@@ -10931,18 +12500,18 @@ G@#..!@#=&"
# (if the process doing the exec exits before the parent
# gets around to sending data to it) or "broken pipe" (if it
# is the other way around).
- dotest_fail devcom3-9a "${testcvs} edit w1" \
+ dotest_fail devcom3-9ar "${testcvs} edit w1" \
"${PROG} \[edit aborted\]: cannot exec ${TESTDIR}/cvs-none: ${DOTSTAR}"
- dotest devcom3-9b "test -w w1" ""
- dotest devcom3-9c "cat CVS/Notify" \
+ dotest devcom3-9br "test -w w1" ""
+ dotest devcom3-9cr "cat CVS/Notify" \
"Ew1 [SMTWF][uoehra][neduit] [JFAMSOND][aepuco][nbrylgptvc] [0-9 ][0-9] [0-9:]* [0-9][0-9][0-9][0-9] GMT [-a-zA-Z_.0-9]* ${TESTDIR}/1/first-dir EUC"
CVS_SERVER=${CVS_SERVER_SAVED}; export CVS_SERVER
- dotest devcom3-9d "${testcvs} -q update" ""
- dotest_fail devcom3-9e "test -f CVS/Notify" ""
- dotest devcom3-9f "${testcvs} watchers w1" \
+ dotest devcom3-9dr "${testcvs} -q update" ""
+ dotest_fail devcom3-9er "test -f CVS/Notify" ""
+ dotest devcom3-9fr "${testcvs} watchers w1" \
"w1 ${username} tedit tunedit tcommit"
- dotest devcom3-9g "${testcvs} unedit w1" ""
- dotest devcom3-9h "${testcvs} watchers w1" ""
+ dotest devcom3-9gr "${testcvs} unedit w1" ""
+ dotest devcom3-9hr "${testcvs} watchers w1" ""
fi
cd ../..
@@ -10969,7 +12538,7 @@ G@#..!@#=&"
dotest watch4-0a "${testcvs} -q co -l ." ''
mkdir first-dir
dotest watch4-0b "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
dotest watch4-1 "${testcvs} watch on" ''
@@ -10979,26 +12548,26 @@ G@#..!@#=&"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest watch4-3 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
# Now test the analogous behavior for directories.
mkdir subdir
dotest watch4-4 "${testcvs} add subdir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/subdir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/subdir added to the repository"
cd subdir
touch sfile
dotest watch4-5 "${testcvs} add sfile" \
"${PROG} [a-z]*: scheduling file .sfile. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest watch4-6 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/subdir/sfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v
done
Checking in sfile;
-${TESTDIR}/cvsroot/first-dir/subdir/sfile,v <-- sfile
+${CVSROOT_DIRNAME}/first-dir/subdir/sfile,v <-- sfile
initial revision: 1\.1
done"
cd ../../..
@@ -11017,13 +12586,13 @@ U first-dir/subdir/sfile"
echo 'edited in 1' >file1
dotest watch4-12 "${testcvs} -q ci -m edit-in-1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
cd ../..
cd 2/first-dir
dotest watch4-13 "${testcvs} -q update" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.2
Merging differences between 1\.1 and 1\.2 into file1
@@ -11075,7 +12644,7 @@ C file1"
dotest watch5-0a "${testcvs} -q co -l ." ''
mkdir first-dir
dotest watch5-0b "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
dotest watch5-1 "${testcvs} watch on" ''
@@ -11085,10 +12654,10 @@ C file1"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest watch5-3 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest watch5-4 "${testcvs} edit file1" ''
@@ -11145,8 +12714,8 @@ ${PROG} unedit: run update to complete the unedit"
dotest unedit-without-baserev-5 "cat CVS/Entries" \
"/$file/1\.1\.1\.1/${DOTSTAR}"
- if test "$remote" = yes; then
- dotest unedit-without-baserev-6 "${testcvs} -q update" "U m"
+ if $remote; then
+ dotest unedit-without-baserev-6r "${testcvs} -q update" "U m"
else
dotest unedit-without-baserev-6 "${testcvs} -q update" \
"${PROG} update: warning: m was lost
@@ -11172,13 +12741,13 @@ U m"
echo 'edited in 1' >m
dotest unedit-without-baserev-12 "${testcvs} -q ci -m edit-in-1" \
"Checking in m;
-${TESTDIR}/cvsroot/x/m,v <-- m
+${CVSROOT_DIRNAME}/x/m,v <-- m
new revision: 1\.2; previous revision: 1\.1
done"
cd ../..
cd 2/x
dotest unedit-without-baserev-13 "${testcvs} -q update" \
-"RCS file: ${TESTDIR}/cvsroot/x/m,v
+"RCS file: ${CVSROOT_DIRNAME}/x/m,v
retrieving revision 1\.1\.1\.1
retrieving revision 1\.2
Merging differences between 1\.1\.1\.1 and 1\.2 into m
@@ -11189,8 +12758,8 @@ C m"
echo yes | dotest unedit-without-baserev-14 "${testcvs} unedit m" \
"m has been modified; revert changes${QUESTION} ${PROG} unedit: m not mentioned in CVS/Baserev
${PROG} unedit: run update to complete the unedit"
- if test "$remote" = yes; then
- dotest unedit-without-baserev-15 "${testcvs} -q update" "U m"
+ if $remote; then
+ dotest unedit-without-baserev-15r "${testcvs} -q update" "U m"
else
dotest unedit-without-baserev-15 "${testcvs} -q update" \
"${PROG} update: warning: m was lost
@@ -11213,32 +12782,32 @@ U m"
ignore)
# On Windows, we can't check out CVSROOT, because the case
# insensitivity means that this conflicts with cvsroot.
- mkdir wnt
- cd wnt
+ mkdir ignore
+ cd ignore
- dotest 187a1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}"
+ dotest ignore-1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}"
cd CVSROOT
echo rootig.c >cvsignore
- dotest 187a2 "${testcvs} add cvsignore" "${PROG}"' [a-z]*: scheduling file `cvsignore'"'"' for addition
+ dotest ignore-2 "${testcvs} add cvsignore" "${PROG}"' [a-z]*: scheduling file `cvsignore'"'"' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
# As of Jan 96, local CVS prints "Examining ." and remote doesn't.
# Accept either.
- dotest 187a3 " ${testcvs} ci -m added" \
+ dotest ignore-3 " ${testcvs} ci -m added" \
"${PROG} [a-z]*: Examining \.
-RCS file: ${TESTDIR}/cvsroot/CVSROOT/cvsignore,v
+RCS file: ${CVSROOT_DIRNAME}/CVSROOT/cvsignore,v
done
Checking in cvsignore;
-${TESTDIR}/cvsroot/CVSROOT/cvsignore,v <-- cvsignore
+${CVSROOT_DIRNAME}/CVSROOT/cvsignore,v <-- cvsignore
initial revision: 1\.1
done
${PROG} [a-z]*: Rebuilding administrative file database"
cd ..
if echo "yes" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then
- pass 187a4
+ pass ignore-4
else
- fail 187a4
+ fail ignore-4
fi
# CVS looks at the home dir from getpwuid, not HOME (is that correct
@@ -11250,46 +12819,46 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
touch foobar.c bar.c rootig.c defig.o envig.c optig.c
# We use sort because we can't predict the order in which
# the files will be listed.
- dotest_sort 188a "${testcvs} import -m m -I optig.c first-dir tag1 tag2" \
+ dotest_sort ignore-5 "${testcvs} import -m m -I optig.c ignore/first-dir tag1 tag2" \
'
-I first-dir/defig.o
-I first-dir/envig.c
-I first-dir/optig.c
-I first-dir/rootig.c
-N first-dir/bar.c
-N first-dir/foobar.c
+I ignore/first-dir/defig.o
+I ignore/first-dir/envig.c
+I ignore/first-dir/optig.c
+I ignore/first-dir/rootig.c
+N ignore/first-dir/bar.c
+N ignore/first-dir/foobar.c
No conflicts created by this import'
- dotest_sort 188b "${testcvs} import -m m -I ! second-dir tag3 tag4" \
+ dotest_sort ignore-6 "${testcvs} import -m m -I ! ignore/second-dir tag3 tag4" \
'
-N second-dir/bar.c
-N second-dir/defig.o
-N second-dir/envig.c
-N second-dir/foobar.c
-N second-dir/optig.c
-N second-dir/rootig.c
+N ignore/second-dir/bar.c
+N ignore/second-dir/defig.o
+N ignore/second-dir/envig.c
+N ignore/second-dir/foobar.c
+N ignore/second-dir/optig.c
+N ignore/second-dir/rootig.c
No conflicts created by this import'
cd ..
rm -r dir-to-import
mkdir 1
cd 1
- dotest 189a "${testcvs} -q co second-dir" \
+ dotest ignore-7 "${testcvs} -q co -dsecond-dir ignore/second-dir" \
'U second-dir/bar.c
U second-dir/defig.o
U second-dir/envig.c
U second-dir/foobar.c
U second-dir/optig.c
U second-dir/rootig.c'
- dotest 189b "${testcvs} -q co first-dir" 'U first-dir/bar.c
+ dotest ignore-8 "${testcvs} -q co -dfirst-dir ignore/first-dir" 'U first-dir/bar.c
U first-dir/foobar.c'
cd first-dir
touch rootig.c defig.o envig.c optig.c notig.c
- dotest 189c "${testcvs} -q update -I optig.c" "${QUESTION} notig.c"
+ dotest ignore-9 "${testcvs} -q update -I optig.c" "${QUESTION} notig.c"
# The fact that CVS requires us to specify -I CVS here strikes me
# as a bug.
- dotest_sort 189d "${testcvs} -q update -I ! -I CVS" \
+ dotest_sort ignore-10 "${testcvs} -q update -I ! -I CVS" \
"${QUESTION} defig.o
${QUESTION} envig.c
${QUESTION} notig.c
@@ -11300,8 +12869,8 @@ ${QUESTION} rootig.c"
# where appropriate. Only test this for remote, because local
# CVS only prints it on update.
rm optig.c
- if test "x$remote" = xyes; then
- dotest 189e "${testcvs} -q diff" "${QUESTION} notig.c"
+ if $remote; then
+ dotest ignore-11r "${testcvs} -q diff" "${QUESTION} notig.c"
# Force the server to be contacted. Ugh. Having CVS
# contact the server for the sole purpose of checking
@@ -11312,7 +12881,7 @@ ${QUESTION} rootig.c"
# contents.
touch bar.c
- dotest 189f "${testcvs} -q ci -m commit-it" "${QUESTION} notig.c"
+ dotest ignore-11r "${testcvs} -q ci -m commit-it" "${QUESTION} notig.c"
fi
# now test .cvsignore files
@@ -11320,11 +12889,11 @@ ${QUESTION} rootig.c"
echo notig.c >first-dir/.cvsignore
echo foobar.c >second-dir/.cvsignore
touch first-dir/notig.c second-dir/notig.c second-dir/foobar.c
- dotest_sort 190 "${testcvs} -qn update" \
+ dotest_sort ignore-12 "${testcvs} -qn update" \
"${QUESTION} first-dir/.cvsignore
${QUESTION} second-dir/.cvsignore
${QUESTION} second-dir/notig.c"
- dotest_sort 191 "${testcvs} -qn update -I! -I CVS" \
+ dotest_sort ignore-13 "${testcvs} -qn update -I! -I CVS" \
"${QUESTION} first-dir/.cvsignore
${QUESTION} first-dir/defig.o
${QUESTION} first-dir/envig.c
@@ -11332,22 +12901,93 @@ ${QUESTION} first-dir/rootig.c
${QUESTION} second-dir/.cvsignore
${QUESTION} second-dir/notig.c"
- echo yes | dotest ignore-192 "${testcvs} release -d first-dir" \
+ echo yes | dotest ignore-14 "${testcvs} release -d first-dir" \
"${QUESTION} \.cvsignore
You have \[0\] altered files in this repository.
Are you sure you want to release (and delete) directory .first-dir': "
echo add a line >>second-dir/foobar.c
rm second-dir/notig.c second-dir/.cvsignore
- echo yes | dotest ignore-194 "${testcvs} release -d second-dir" \
+ echo yes | dotest ignore-15 "${testcvs} release -d second-dir" \
"M foobar.c
You have \[1\] altered files in this repository.
Are you sure you want to release (and delete) directory .second-dir': "
+
+ cd ../..
+ if $keep; then :; else
+ rm -r ignore
+ rm -rf ${CVSROOT_DIRNAME}/ignore
+ fi
+ ;;
+
+ ignore-on-branch)
+ # Test that CVS _doesn't_ ignore files on branches because they were
+ # added to the trunk.
+ mkdir ignore-on-branch; cd ignore-on-branch
+ mkdir $CVSROOT_DIRNAME/ignore-on-branch
+
+ # create file1 & file2 on trunk
+ dotest ignore-on-branch-setup-1 "$testcvs -q co -dsetup ignore-on-branch" ''
+ cd setup
+ echo file1 >file1
+ dotest ignore-on-branch-setup-2 "$testcvs -q add file1" \
+"$PROG [a-z]*: use .cvs commit. to add this file permanently"
+ dotest ignore-on-branch-setup-3 "$testcvs -q ci -mfile1 file1" \
+"RCS file: $CVSROOT_DIRNAME/ignore-on-branch/file1,v
+done
+Checking in file1;
+$CVSROOT_DIRNAME/ignore-on-branch/file1,v <-- file1
+initial revision: 1\.1
+done"
+ dotest ignore-on-branch-setup-4 "$testcvs -q tag -b branch" 'T file1'
+ echo file2 >file2
+ dotest ignore-on-branch-setup-5 "$testcvs -q add file2" \
+"$PROG [a-z]*: use .cvs commit. to add this file permanently"
+ dotest ignore-on-branch-setup-6 "$testcvs -q ci -mtrunk file2" \
+"RCS file: $CVSROOT_DIRNAME/ignore-on-branch/file2,v
+done
+Checking in file2;
+$CVSROOT_DIRNAME/ignore-on-branch/file2,v <-- file2
+initial revision: 1\.1
+done"
+
cd ..
- rm -r 1
- cd ..
- rm -r wnt
- rm -rf ${CVSROOT_DIRNAME}/first-dir ${CVSROOT_DIRNAME}/second-dir
+
+ # Check out branch.
+ #
+ # - This was the original failure case - file2 would not be flagged
+ # with a '?'
+ dotest ignore-on-branch-1 "$testcvs -q co -rbranch ignore-on-branch" \
+'U ignore-on-branch/file1'
+ cd ignore-on-branch
+ echo file2 on branch >file2
+ dotest ignore-on-branch-2 "$testcvs -nq update" '? file2'
+
+ # Now set up for a join. One of the original fixes for this would
+ # print out a 'U' and a '?' during a join which added a file.
+ if $remote; then
+ dotest ignore-on-branch-3 "$testcvs -q tag -b branch2" \
+'? file2
+T file1'
+ else
+ dotest ignore-on-branch-3 "$testcvs -q tag -b branch2" 'T file1'
+ fi
+ dotest ignore-on-branch-4 "$testcvs -q add file2" \
+"$PROG [a-z]*: use .cvs commit. to add this file permanently"
+ dotest ignore-on-branch-5 "$testcvs -q ci -mbranch file2" \
+"Checking in file2;
+$CVSROOT_DIRNAME/ignore-on-branch/file2,v <-- file2
+new revision: 1\.1\.2\.1; previous revision: 1\.1
+done"
+ dotest ignore-on-branch-6 "$testcvs -q up -rbranch2" \
+"$PROG [a-z]*: file2 is no longer in the repository"
+ dotest ignore-on-branch-7 "$testcvs -q up -jbranch" 'U file2'
+
+ cd ../..
+ if $keep; then :; else
+ rm -r ignore-on-branch
+ rm -rf $CVSROOT_DIRNAME/ignore-on-branch
+ fi
;;
binfiles)
@@ -11371,10 +13011,10 @@ Are you sure you want to release (and delete) directory .second-dir': "
"${PROG}"' [a-z]*: scheduling file `binfile'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest binfiles-3 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/binfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
done
Checking in binfile;
-${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
+${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile
initial revision: 1\.1
done"
cd ../..
@@ -11390,7 +13030,7 @@ done"
File: binfile Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -11408,7 +13048,7 @@ File: binfile Status: Up-to-date
File: binfile Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -11419,7 +13059,7 @@ File: binfile Status: Up-to-date
cp ../../1/binfile2.dat binfile
dotest binfiles-6 "${testcvs} -q ci -m modify-it" \
"Checking in binfile;
-${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
+${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile
new revision: 1\.2; previous revision: 1\.1
done"
cd ../../1/first-dir
@@ -11430,7 +13070,7 @@ done"
cp ../binfile.dat binfile
dotest binfiles-con0 "${testcvs} -q ci -m modify-it" \
"Checking in binfile;
-${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
+${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile
new revision: 1\.3; previous revision: 1\.2
done"
cd ../../2/first-dir
@@ -11447,7 +13087,7 @@ C binfile"
cp ../../1/binfile2.dat binfile
dotest binfiles-con4 "${testcvs} -q ci -m resolve-it" \
"Checking in binfile;
-${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
+${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile
new revision: 1\.4; previous revision: 1\.3
done"
cd ../../1/first-dir
@@ -11471,7 +13111,7 @@ done"
File: binfile Status: Up-to-date
Working revision: 1\.4.*
- Repository revision: 1\.4 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.4 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: HEAD (revision: 1\.4)
Sticky Date: (none)
Sticky Options: -kb"
@@ -11482,7 +13122,7 @@ File: binfile Status: Up-to-date
echo 'this file is $''RCSfile$' >binfile
dotest binfiles-14a "${testcvs} -q ci -m modify-it" \
"Checking in binfile;
-${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
+${CVSROOT_DIRNAME}/first-dir/binfile,v <-- binfile
new revision: 1\.5; previous revision: 1\.4
done"
dotest binfiles-14b "cat binfile" 'this file is $''RCSfile$'
@@ -11492,12 +13132,12 @@ done"
File: binfile Status: Up-to-date
Working revision: 1\.5.*
- Repository revision: 1\.5 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.5 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
dotest binfiles-14d "${testcvs} admin -kv binfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/binfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
done"
# cvs admin doesn't change the checked-out file or its sticky
# kopts. There probably should be a way which does (but
@@ -11509,7 +13149,7 @@ done"
File: binfile Status: Up-to-date
Working revision: 1\.5.*
- Repository revision: 1\.5 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.5 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -11520,7 +13160,7 @@ File: binfile Status: Up-to-date
File: binfile Status: Up-to-date
Working revision: 1\.5.*
- Repository revision: 1\.5 ${TESTDIR}/cvsroot/first-dir/binfile,v
+ Repository revision: 1\.5 ${CVSROOT_DIRNAME}/first-dir/binfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kv"
@@ -11530,10 +13170,10 @@ File: binfile Status: Up-to-date
dotest binfiles-sticky1 "${testcvs} -q add nibfile" \
"${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest binfiles-sticky2 "${testcvs} -q ci -m add-it nibfile" \
- "RCS file: ${TESTDIR}/cvsroot/first-dir/nibfile,v
+ "RCS file: ${CVSROOT_DIRNAME}/first-dir/nibfile,v
done
Checking in nibfile;
-${TESTDIR}/cvsroot/first-dir/nibfile,v <-- nibfile
+${CVSROOT_DIRNAME}/first-dir/nibfile,v <-- nibfile
initial revision: 1\.1
done"
dotest binfiles-sticky3 "${testcvs} -q update -kb nibfile" \
@@ -11543,7 +13183,7 @@ done"
File: nibfile Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/nibfile,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/nibfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -11556,12 +13196,12 @@ File: nibfile Status: Up-to-date
File: nibfile Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/nibfile,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/nibfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)"
dotest binfiles-15 "${testcvs} -q admin -kb nibfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/nibfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/nibfile,v
done"
dotest binfiles-16 "${testcvs} -q update nibfile" "[UP] nibfile"
dotest binfiles-17 "${testcvs} -q status nibfile" \
@@ -11569,23 +13209,23 @@ done"
File: nibfile Status: Up-to-date
Working revision: 1\.1.*
- Repository revision: 1\.1 ${TESTDIR}/cvsroot/first-dir/nibfile,v
+ Repository revision: 1\.1 ${CVSROOT_DIRNAME}/first-dir/nibfile,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
dotest binfiles-o1 "${testcvs} admin -o1.3:: binfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/binfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
deleting revision 1\.5
deleting revision 1\.4
done"
dotest binfiles-o2 "${testcvs} admin -o::1.3 binfile" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/binfile,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
deleting revision 1\.2
deleting revision 1\.1
done"
dotest binfiles-o3 "${testcvs} -q log -h -N binfile" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/binfile,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile,v
Working file: binfile
head: 1\.3
branch:
@@ -11652,22 +13292,22 @@ ${PROG} [a-z]*: scheduling file .brmod-trmod. for addition
${PROG} [a-z]*: scheduling file .brmod-wdmod. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest binfiles2-1b "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/brmod,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod,v
done
Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
initial revision: 1\.1
done"
dotest binfiles2-2 "${testcvs} -q tag -b br" 'T brmod
@@ -11682,26 +13322,26 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cp ../binfile2 brmod-trmod
cp ../binfile2 brmod-wdmod
dotest binfiles2-5 "${testcvs} -q ci -m br-changes" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/binfile\.dat,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/binfile\.dat,v
done
Checking in binfile\.dat;
-${TESTDIR}/cvsroot/first-dir/Attic/binfile\.dat,v <-- binfile\.dat
+${CVSROOT_DIRNAME}/first-dir/Attic/binfile\.dat,v <-- binfile\.dat
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest binfiles2-6 "${testcvs} -q update -A" \
-"${PROG} [a-z]*: warning: binfile\.dat is not (any longer) pertinent
+"${PROG} [a-z]*: binfile\.dat is no longer in the repository
[UP] brmod
[UP] brmod-trmod
[UP] brmod-wdmod"
@@ -11710,7 +13350,7 @@ done"
cp ../binfile3 brmod-trmod
dotest binfiles2-7a "${testcvs} -q ci -m tr-modify" \
"Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.2; previous revision: 1\.1
done"
cp ../binfile3 brmod-wdmod
@@ -11738,38 +13378,38 @@ C brmod-wdmod"
# Test that everything was properly scheduled.
dotest binfiles2-10 "${testcvs} -q ci -m checkin" \
"Checking in binfile\.dat;
-${TESTDIR}/cvsroot/first-dir/binfile\.dat,v <-- binfile\.dat
+${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v <-- binfile\.dat
new revision: 1\.2; previous revision: 1\.1
done
Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
new revision: 1\.2; previous revision: 1\.1
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.3; previous revision: 1\.2
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
new revision: 1\.2; previous revision: 1\.1
done"
dotest_fail binfiles2-o1 "${testcvs} -q admin -o :1.2 brmod-trmod" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
deleting revision 1\.2
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v: can't remove branch point 1\.1
-${PROG} [a-z]*: cannot modify RCS file for .brmod-trmod."
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v: can't remove branch point 1\.1
+${PROG} [a-z]*: RCS file for .brmod-trmod. not modified\."
dotest binfiles2-o2 "${testcvs} -q admin -o 1.1.2.1: brmod-trmod" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
deleting revision 1\.1\.2\.1
done"
dotest binfiles2-o3 "${testcvs} -q admin -o :1.2 brmod-trmod" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
deleting revision 1\.2
deleting revision 1\.1
done"
dotest binfiles2-o4 "${testcvs} -q log -N brmod-trmod" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
Working file: brmod-trmod
head: 1\.3
branch:
@@ -11804,10 +13444,10 @@ checkin
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest binfiles3-3 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
rm file1
@@ -11816,7 +13456,7 @@ done"
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest binfiles3-5 "${testcvs} -q ci -m remove-it" \
"Removing file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: delete; previous revision: 1\.1
done"
cp ../binfile.dat file1
@@ -11835,11 +13475,11 @@ D"
dotest binfiles3-7 "${testcvs} -q ci -m readd-it" \
"${PROG} [a-z]*: changing keyword expansion mode to -kb
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
dotest binfiles3-8 "${testcvs} -q log -h -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.3
branch:
@@ -11859,17 +13499,17 @@ total revisions: 3
cp ../binfile4.dat file1
dotest binfiles3-9 "${testcvs} -q ci -m change" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done"
cp ../binfile5.dat file1
dotest binfiles3-10 "${testcvs} -q ci -m change" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.5; previous revision: 1\.4
done"
dotest binfiles3-11 "${testcvs} admin -o 1.3::1.5 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
deleting revision 1\.4
done"
dotest binfiles3-12 "${testcvs} -q update -r 1.3 file1" "U file1"
@@ -11899,98 +13539,98 @@ done"
# For the moment, remote CVS can't pass wrappers from CVSWRAPPERS
# (see wrap_send). So skip these tests for remote.
- if test "x$remote" = xno; then
+ if $remote; then :; else
- mkdir ${CVSROOT_DIRNAME}/first-dir
- mkdir 1; cd 1
- dotest mcopy-1 "${testcvs} -q co first-dir" ''
- cd first-dir
+ mkdir ${CVSROOT_DIRNAME}/first-dir
+ mkdir 1; cd 1
+ dotest mcopy-1 "${testcvs} -q co first-dir" ''
+ cd first-dir
- # FIXCVS: unless a branch has at least one file on it,
- # tag_check_valid won't know it exists. So if brmod didn't
- # exist, we would have to invent it.
- echo 'brmod initial contents' >brmod
- echo 'brmod-trmod initial contents' >brmod-trmod
- echo 'brmod-wdmod initial contents' >brmod-wdmod
- echo "* -m 'COPY'" >.cvswrappers
- dotest mcopy-1a \
+ # FIXCVS: unless a branch has at least one file on it,
+ # tag_check_valid won't know it exists. So if brmod didn't
+ # exist, we would have to invent it.
+ echo 'brmod initial contents' >brmod
+ echo 'brmod-trmod initial contents' >brmod-trmod
+ echo 'brmod-wdmod initial contents' >brmod-wdmod
+ echo "* -m 'COPY'" >.cvswrappers
+ dotest mcopy-1a \
"${testcvs} add .cvswrappers brmod brmod-trmod brmod-wdmod" \
"${PROG} [a-z]*: scheduling file .\.cvswrappers. for addition
${PROG} [a-z]*: scheduling file .brmod. for addition
${PROG} [a-z]*: scheduling file .brmod-trmod. for addition
${PROG} [a-z]*: scheduling file .brmod-wdmod. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
- dotest mcopy-1b "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/\.cvswrappers,v
+ dotest mcopy-1b "${testcvs} -q ci -m add" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/\.cvswrappers,v
done
Checking in \.cvswrappers;
-${TESTDIR}/cvsroot/first-dir/\.cvswrappers,v <-- \.cvswrappers
+${CVSROOT_DIRNAME}/first-dir/\.cvswrappers,v <-- \.cvswrappers
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod,v
done
Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
initial revision: 1\.1
done"
- # NOTE: .cvswrappers files are broken (see comment in
- # src/wrapper.c). So doing everything via the environment
- # variable is a workaround. Better would be to test them
- # both.
- CVSWRAPPERS="* -m 'COPY'"
- export CVSWRAPPERS
- dotest mcopy-2 "${testcvs} -q tag -b br" 'T \.cvswrappers
+ # NOTE: .cvswrappers files are broken (see comment in
+ # src/wrapper.c). So doing everything via the environment
+ # variable is a workaround. Better would be to test them
+ # both.
+ CVSWRAPPERS="* -m 'COPY'"
+ export CVSWRAPPERS
+ dotest mcopy-2 "${testcvs} -q tag -b br" 'T \.cvswrappers
T brmod
T brmod-trmod
T brmod-wdmod'
- dotest mcopy-3 "${testcvs} -q update -r br" ''
- echo 'modify brmod on br' >brmod
- echo 'modify brmod-trmod on br' >brmod-trmod
- echo 'modify brmod-wdmod on br' >brmod-wdmod
- dotest mcopy-5 "${testcvs} -q ci -m br-changes" \
+ dotest mcopy-3 "${testcvs} -q update -r br" ''
+ echo 'modify brmod on br' >brmod
+ echo 'modify brmod-trmod on br' >brmod-trmod
+ echo 'modify brmod-wdmod on br' >brmod-wdmod
+ dotest mcopy-5 "${testcvs} -q ci -m br-changes" \
"Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
- dotest mcopy-6 "${testcvs} -q update -A" \
+ dotest mcopy-6 "${testcvs} -q update -A" \
"[UP] brmod
[UP] brmod-trmod
[UP] brmod-wdmod"
- dotest mcopy-7 "cat brmod brmod-trmod brmod-wdmod" \
+ dotest mcopy-7 "cat brmod brmod-trmod brmod-wdmod" \
"brmod initial contents
brmod-trmod initial contents
brmod-wdmod initial contents"
- echo 'modify brmod-trmod again on trunk' >brmod-trmod
- dotest mcopy-7a "${testcvs} -q ci -m tr-modify" \
+ echo 'modify brmod-trmod again on trunk' >brmod-trmod
+ dotest mcopy-7a "${testcvs} -q ci -m tr-modify" \
"Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.2; previous revision: 1\.1
done"
- echo 'modify brmod-wdmod in working dir' >brmod-wdmod
+ echo 'modify brmod-wdmod in working dir' >brmod-wdmod
- dotest mcopy-8 "${testcvs} -q update -j br" \
+ dotest mcopy-8 "${testcvs} -q update -j br" \
"U brmod
${PROG} [a-z]*: nonmergeable file needs merge
${PROG} [a-z]*: revision 1.1.2.1 from repository is now in brmod-trmod
@@ -12002,34 +13642,34 @@ ${PROG} [a-z]*: revision 1.1.2.1 from repository is now in brmod-wdmod
${PROG} [a-z]*: file from working directory is now in .#brmod-wdmod.1.1
C brmod-wdmod"
- dotest mcopy-9 "cat brmod brmod-trmod brmod-wdmod" \
+ dotest mcopy-9 "cat brmod brmod-trmod brmod-wdmod" \
"modify brmod on br
modify brmod-trmod on br
modify brmod-wdmod on br"
- dotest mcopy-9a "cat .#brmod-trmod.1.2 .#brmod-wdmod.1.1" \
+ dotest mcopy-9a "cat .#brmod-trmod.1.2 .#brmod-wdmod.1.1" \
"modify brmod-trmod again on trunk
modify brmod-wdmod in working dir"
- # Test that everything was properly scheduled.
- dotest mcopy-10 "${testcvs} -q ci -m checkin" \
+ # Test that everything was properly scheduled.
+ dotest mcopy-10 "${testcvs} -q ci -m checkin" \
"Checking in brmod;
-${TESTDIR}/cvsroot/first-dir/brmod,v <-- brmod
+${CVSROOT_DIRNAME}/first-dir/brmod,v <-- brmod
new revision: 1\.2; previous revision: 1\.1
done
Checking in brmod-trmod;
-${TESTDIR}/cvsroot/first-dir/brmod-trmod,v <-- brmod-trmod
+${CVSROOT_DIRNAME}/first-dir/brmod-trmod,v <-- brmod-trmod
new revision: 1\.3; previous revision: 1\.2
done
Checking in brmod-wdmod;
-${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
+${CVSROOT_DIRNAME}/first-dir/brmod-wdmod,v <-- brmod-wdmod
new revision: 1\.2; previous revision: 1\.1
done"
- cd ..
- cd ..
+ cd ..
+ cd ..
- rm -rf ${CVSROOT_DIRNAME}/first-dir
- rm -r 1
- unset CVSWRAPPERS
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+ rm -r 1
+ unset CVSWRAPPERS
fi # end of tests to be skipped for remote
@@ -12063,7 +13703,7 @@ U first-dir/foo.exe'
File: foo\.c Status: Up-to-date
Working revision: 1\.1\.1\.1.*
- Repository revision: 1\.1\.1\.1 ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+ Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -12072,7 +13712,7 @@ File: foo\.c Status: Up-to-date
File: foo\.exe Status: Up-to-date
Working revision: 1\.1\.1\.1.*
- Repository revision: 1\.1\.1\.1 ${TESTDIR}/cvsroot/first-dir/foo\.exe,v
+ Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.exe,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -12108,7 +13748,7 @@ U first-dir/foo.exe'
File: foo\.c Status: Up-to-date
Working revision: 1\.1\.1\.1.*
- Repository revision: 1\.1\.1\.1 ${TESTDIR}/cvsroot/first-dir/foo\.c,v
+ Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -ko
@@ -12117,7 +13757,7 @@ File: foo\.c Status: Up-to-date
File: foo\.exe Status: Up-to-date
Working revision: 1\.1\.1\.1.*
- Repository revision: 1\.1\.1\.1 ${TESTDIR}/cvsroot/first-dir/foo\.exe,v
+ Repository revision: 1\.1\.1\.1 ${CVSROOT_DIRNAME}/first-dir/foo\.exe,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: -kb"
@@ -12231,7 +13871,7 @@ File: foo\.exe Status: Up-to-date
echo "foo*.sb -k 'b'" > cvswrappers
dotest binwrap3-2 "${testcvs} -q ci -m cvswrappers-mod" \
"Checking in cvswrappers;
-${TESTDIR}/cvsroot/CVSROOT/cvswrappers,v <-- cvswrappers
+${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12265,16 +13905,16 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
${PROG} [a-z]*: scheduling file .file1\.txt. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest binwrap3-2d "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/binwrap3/sub2/file1\.newbin,v
+"RCS file: ${CVSROOT_DIRNAME}/binwrap3/sub2/file1\.newbin,v
done
Checking in file1\.newbin;
-${TESTDIR}/cvsroot/binwrap3/sub2/file1\.newbin,v <-- file1\.newbin
+${CVSROOT_DIRNAME}/binwrap3/sub2/file1\.newbin,v <-- file1\.newbin
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/binwrap3/sub2/file1\.txt,v
+RCS file: ${CVSROOT_DIRNAME}/binwrap3/sub2/file1\.txt,v
done
Checking in file1\.txt;
-${TESTDIR}/cvsroot/binwrap3/sub2/file1\.txt,v <-- file1\.txt
+${CVSROOT_DIRNAME}/binwrap3/sub2/file1\.txt,v <-- file1\.txt
initial revision: 1\.1
done"
cd ..
@@ -12390,7 +14030,7 @@ done"
echo "* -m 'COPY'" >>cvswrappers
dotest mwrap-c2 "${testcvs} -q ci -m wrapper-mod" \
"Checking in cvswrappers;
-${TESTDIR}/cvsroot/CVSROOT/cvswrappers,v <-- cvswrappers
+${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12399,17 +14039,17 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest mwrap-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest mwrap-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch aa
dotest mwrap-3 "${testcvs} add aa" \
"${PROG} [a-z]*: scheduling file .aa. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest mwrap-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v
done
Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
initial revision: 1\.1
done"
cd ../..
@@ -12419,20 +14059,13 @@ done"
echo "changed in m2" >aa
dotest mwrap-6 "${testcvs} -q ci -m m2-mod" \
"Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
new revision: 1\.2; previous revision: 1\.1
done"
cd ../..
cd m1/first-dir
echo "changed in m1" >aa
- if test "$remote" = no; then
- dotest mwrap-7 "${testcvs} -nq update" \
-"U aa
-${PROG} [a-z]*: nonmergeable file needs merge
-${PROG} [a-z]*: revision 1\.2 from repository is now in aa
-${PROG} [a-z]*: file from working directory is now in \.#aa\.1\.1
-C aa"
- else
+ if $remote; then
# The tagged text code swallows up "U aa" but isn't yet up to
# trying to figure out how it interacts with the "C aa" and
# other stuff. The whole deal of having both is pretty iffy.
@@ -12442,6 +14075,13 @@ ${PROG} [a-z]*: revision 1\.2 from repository is now in aa
${PROG} [a-z]*: file from working directory is now in \.#aa\.1\.1
C aa
U aa"
+ else
+ dotest mwrap-7 "${testcvs} -nq update" \
+"U aa
+${PROG} [a-z]*: nonmergeable file needs merge
+${PROG} [a-z]*: revision 1\.2 from repository is now in aa
+${PROG} [a-z]*: file from working directory is now in \.#aa\.1\.1
+C aa"
fi
dotest mwrap-8 "${testcvs} -q update" \
"U aa
@@ -12456,7 +14096,7 @@ C aa"
echo '# comment out' >cvswrappers
dotest mwrap-ce "${testcvs} -q ci -m wrapper-mod" \
"Checking in cvswrappers;
-${TESTDIR}/cvsroot/CVSROOT/cvswrappers,v <-- cvswrappers
+${CVSROOT_DIRNAME}/CVSROOT/cvswrappers,v <-- cvswrappers
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12505,7 +14145,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest info-3 "${testcvs} -q ci -m new-loginfo" \
"Checking in loginfo;
-${TESTDIR}/cvsroot/CVSROOT/loginfo,v <-- loginfo
+${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12520,28 +14160,28 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
echo "cvs -s OTHER=not-this -s MYENV=env-" >>$HOME/.cvsrc
dotest info-6a "${testcvs} -q -s OTHER=value ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
${PROG} [a-z]*: loginfo:1: no such user variable \${=ZEE}"
echo line0 >>file1
dotest info-6b "${testcvs} -q -sOTHER=foo ci -m mod-it" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done
${PROG} [a-z]*: loginfo:1: no such user variable \${=ZEE}"
echo line1 >>file1
dotest info-7 "${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
cd ..
- dotest info-9 "cat $TESTDIR/testlog" "xenv-valueyz=${username}=${TESTDIR}/cvsroot="
+ dotest info-9 "cat $TESTDIR/testlog" "xenv-valueyz=${username}=${CVSROOT_DIRNAME}="
dotest info-10 "cat $TESTDIR/testlog2" 'first-dir file1,NONE,1.1
first-dir 1.1
first-dir file1
@@ -12562,7 +14202,7 @@ first-dir file1ux'
echo '# do nothing' >loginfo
dotest info-11 "${testcvs} -q -s ZEE=garbage ci -m nuke-loginfo" \
"Checking in loginfo;
-${TESTDIR}/cvsroot/CVSROOT/loginfo,v <-- loginfo
+${CVSROOT_DIRNAME}/CVSROOT/loginfo,v <-- loginfo
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12582,7 +14222,7 @@ EOF
echo "^first-dir ${TESTDIR}/vscript" >>verifymsg
dotest info-v1 "${testcvs} -q ci -m add-verification" \
"Checking in verifymsg;
-${TESTDIR}/cvsroot/CVSROOT/verifymsg,v <-- verifymsg
+${CVSROOT_DIRNAME}/CVSROOT/verifymsg,v <-- verifymsg
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12599,7 +14239,7 @@ and many more lines after it
EOF
dotest info-v3 "${testcvs} -q ci -F ${TESTDIR}/comment.tmp" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done"
cd ..
@@ -12618,7 +14258,7 @@ ${PROG} \[[a-z]* aborted\]: Message verification failed"
echo '# do nothing' >verifymsg
dotest info-cleanup-verifymsg "${testcvs} -q ci -m nuke-verifymsg" \
"Checking in verifymsg;
-${TESTDIR}/cvsroot/CVSROOT/verifymsg,v <-- verifymsg
+${CVSROOT_DIRNAME}/CVSROOT/verifymsg,v <-- verifymsg
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12666,7 +14306,7 @@ EOF
echo "ALL ${TESTDIR}/1/loggit" >taginfo
dotest taginfo-2 "${testcvs} -q ci -m check-in-taginfo" \
"Checking in taginfo;
-${TESTDIR}/cvsroot/CVSROOT/taginfo,v <-- taginfo
+${CVSROOT_DIRNAME}/CVSROOT/taginfo,v <-- taginfo
new revision: 1\.2; previous revision: 1\.1
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12685,10 +14325,10 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest taginfo-5 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest taginfo-6 "${testcvs} -q tag tag1" "T file1"
@@ -12697,7 +14337,7 @@ done"
echo add text on branch >>file1
dotest taginfo-9 "${testcvs} -q ci -m modify-on-br" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest taginfo-10 "${testcvs} -q tag -F -c brtag" "T file1"
@@ -12738,21 +14378,21 @@ ${PROG} \[[a-z]* aborted\]: correct the above errors first!"
# I suppose passing "1.1.branch" or "branch" for "br"
# would be an improvement.
dotest taginfo-examine "cat ${TESTDIR}/1/taglog" \
-"tag1 add ${TESTDIR}/cvsroot/first-dir file1 1.1
-br add ${TESTDIR}/cvsroot/first-dir file1 1.1
-brtag mov ${TESTDIR}/cvsroot/first-dir file1 1.1.2.1
-tag1 del ${TESTDIR}/cvsroot/first-dir file1 1.1
-tag1 del ${TESTDIR}/cvsroot/first-dir
-tag1 add ${TESTDIR}/cvsroot/first-dir file1 1.1
-tag1 del ${TESTDIR}/cvsroot/first-dir file1 1.1
-tag1 del ${TESTDIR}/cvsroot/first-dir"
+"tag1 add ${CVSROOT_DIRNAME}/first-dir file1 1.1
+br add ${CVSROOT_DIRNAME}/first-dir file1 1.1
+brtag mov ${CVSROOT_DIRNAME}/first-dir file1 1.1.2.1
+tag1 del ${CVSROOT_DIRNAME}/first-dir file1 1.1
+tag1 del ${CVSROOT_DIRNAME}/first-dir
+tag1 add ${CVSROOT_DIRNAME}/first-dir file1 1.1
+tag1 del ${CVSROOT_DIRNAME}/first-dir file1 1.1
+tag1 del ${CVSROOT_DIRNAME}/first-dir"
cd ..
cd CVSROOT
echo '# Keep life simple' > taginfo
dotest taginfo-cleanup-1 "${testcvs} -q ci -m check-in-taginfo" \
"Checking in taginfo;
-${TESTDIR}/cvsroot/CVSROOT/taginfo,v <-- taginfo
+${CVSROOT_DIRNAME}/CVSROOT/taginfo,v <-- taginfo
new revision: 1\.3; previous revision: 1\.2
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12778,23 +14418,23 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
# might need to modify CVSROOT/config
dotest config-3 "${testcvs} -q ci -m change-to-bogus-line" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
echo 'BogusOption=yes' >config
dotest config-4 "${testcvs} -q ci -m change-to-bogus-opt" \
-"${PROG} [a-z]*: syntax error in ${TESTDIR}/cvsroot/CVSROOT/config: line 'bogus line' is missing '='
+"${PROG} [a-z]*: syntax error in ${CVSROOT_DIRNAME}/CVSROOT/config: line 'bogus line' is missing '='
Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
echo '# No config is a good config' > config
dotest config-5 "${testcvs} -q ci -m change-to-comment" \
-"${PROG} [a-z]*: ${TESTDIR}/cvsroot/CVSROOT/config: unrecognized keyword 'BogusOption'
+"${PROG} [a-z]*: ${CVSROOT_DIRNAME}/CVSROOT/config: unrecognized keyword 'BogusOption'
Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -12826,10 +14466,10 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest serverpatch-3 "${testcvs} -q commit -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
@@ -12852,7 +14492,7 @@ done"
echo '2' >> file1
dotest serverpatch-7 "${testcvs} -q ci -mx file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
@@ -12903,10 +14543,10 @@ U file1'
echo ' ' >>${TESTDIR}/comment.tmp
echo ' ' >>${TESTDIR}/comment.tmp
dotest log-3 "${testcvs} -q commit -F ${TESTDIR}/comment.tmp" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
rm -f ${TESTDIR}/comment.tmp
@@ -12914,7 +14554,7 @@ done"
echo 'second revision' > file1
dotest log-4 "${testcvs} -q ci -m2 file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
@@ -12923,7 +14563,7 @@ done"
echo 'third revision' > file1
dotest log-6 "${testcvs} -q ci -m3 file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
@@ -12932,7 +14572,7 @@ done"
echo 'first branch revision' > file1
dotest log-8 "${testcvs} -q ci -m1b file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2\.2\.1; previous revision: 1\.2
done"
@@ -12941,19 +14581,25 @@ done"
echo 'second branch revision' > file1
dotest log-10 "${testcvs} -q ci -m2b file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2\.2\.2; previous revision: 1\.2\.2\.1
done"
# Set up a bunch of shell variables to make the later tests
# easier to describe.=
log_header="
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.3
branch:
locks: strict
access list:"
+ rlog_header="
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+head: 1\.3
+branch:
+locks: strict
+access list:"
log_tags='symbolic names:
tag: 1\.2\.2\.1
branch: 1\.2\.0\.2'
@@ -13077,6 +14723,13 @@ total revisions: 5; selected revisions: 1
description:
${log_rev3}
${log_trailer}"
+ dotest log-14f "${testcvs} log -r:: file1" \
+"${log_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 0
+description:
+${log_trailer}"
dotest log-15 "${testcvs} log -r1.2 file1" \
"${log_header}
@@ -13151,6 +14804,15 @@ ${log_rev3}
${log_rev2}
${log_trailer}"
+ dotest log-20a "${testcvs} log -r1.2:: file1" \
+"${log_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
dotest log-21 "${testcvs} log -r:1.2 file1" \
"${log_header}
${log_tags}
@@ -13161,6 +14823,15 @@ ${log_rev2}
${log_rev1}
${log_trailer}"
+ dotest log-21a "${testcvs} log -r::1.2 file1" \
+"${log_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev1}
+${log_trailer}"
+
dotest log-22 "${testcvs} log -r1.1:1.2 file1" \
"${log_header}
${log_tags}
@@ -13171,14 +14842,253 @@ ${log_rev2}
${log_rev1}
${log_trailer}"
+ dotest log-22a "${testcvs} log -r1.1::1.2 file1" \
+"${log_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 0
+description:
+${log_trailer}"
+
+ dotest log-22b "${testcvs} log -r1.1::1.3 file1" \
+"${log_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+ # Now the same tests but with rlog
+
+ dotest log-r11 "${testcvs} rlog first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 5
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+ dotest log-r12 "${testcvs} rlog -N first-dir/file1" \
+"${rlog_header}
+${log_header2}
+total revisions: 5; selected revisions: 5
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+ dotest log-r13 "${testcvs} rlog -b first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 3
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+ dotest log-r14 "${testcvs} rlog -r first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+ dotest log-r14a "${testcvs} rlog -rHEAD first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+ dotest_fail log-r14b "${testcvs} rlog -r HEAD first-dir/file1" \
+"${PROG} [a-z]*: cannot find module .HEAD. - ignored
+${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+ dotest log-r14c "${testcvs} rlog -r: first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+ dotest log-r14d "${testcvs} rlog -r, first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+ dotest log-r14e "${testcvs} rlog -r. first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+ dotest log-r14f "${testcvs} rlog -r:: first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 0
+description:
+${log_trailer}"
+
+ dotest log-r15 "${testcvs} rlog -r1.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+ dotest log-r16 "${testcvs} rlog -r1.2.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+ dotest log-r17 "${testcvs} rlog -rbranch first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev2b}
+${log_rev1b}
+${log_trailer}"
+
+ dotest log-r18 "${testcvs} rlog -r1.2.2. first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev2b}
+${log_trailer}"
+
+ dotest log-r18a "${testcvs} rlog -r1.2.2.2 -r1.3:1.3 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev3}
+${log_rev2b}
+${log_trailer}"
+
+ dotest log-r19 "${testcvs} rlog -rbranch. first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev2b}
+${log_trailer}"
+
+ dotest log-r20 "${testcvs} rlog -r1.2: first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev3}
+${log_rev2}
+${log_trailer}"
+
+ dotest log-r20a "${testcvs} rlog -r1.2:: first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev3}
+${log_trailer}"
+
+ dotest log-r21 "${testcvs} rlog -r:1.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+ dotest log-r21a "${testcvs} rlog -r::1.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev1}
+${log_trailer}"
+
+ dotest log-r22 "${testcvs} rlog -r1.1:1.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 2
+description:
+${log_rev2}
+${log_rev1}
+${log_trailer}"
+
+ dotest log-r22a "${testcvs} rlog -r1.1::1.2 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 0
+description:
+${log_trailer}"
+
+ dotest log-r22b "${testcvs} rlog -r1.1::1.3 first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 5; selected revisions: 1
+description:
+${log_rev2}
+${log_trailer}"
+
+ # Now test outdating revisions
+
dotest log-o0 "${testcvs} admin -o 1.2.2.2:: file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest log-o1 "${testcvs} admin -o ::1.2.2.1 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest log-o2 "${testcvs} admin -o 1.2.2.1:: file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
deleting revision 1\.2\.2\.2
done"
dotest log-o3 "${testcvs} log file1" \
@@ -13192,6 +15102,17 @@ ${log_rev2}
${log_rev1}
${log_rev1b}
${log_trailer}"
+ dotest log-ro3 "${testcvs} rlog first-dir/file1" \
+"${rlog_header}
+${log_tags}
+${log_header2}
+total revisions: 4; selected revisions: 4
+description:
+${log_rev3}
+${log_rev2}
+${log_rev1}
+${log_rev1b}
+${log_trailer}"
dotest log-o4 "${testcvs} -q update -p -r 1.2.2.1 file1" \
"first branch revision"
cd ..
@@ -13211,18 +15132,18 @@ ${log_trailer}"
"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition
'"${PROG}"' [a-z]*: use .'"${PROG}"' commit. to add this file permanently'
dotest log2-3 "${testcvs} -q commit -m 1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
# Setting the file description with add -m doesn't yet work
# client/server, so skip log2-4 for remote.
- if test "x$remote" = xno; then
+ if $remote; then :; else
- dotest log2-4 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+ dotest log2-4 "${testcvs} log -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -13241,10 +15162,10 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
fi # end of tests skipped for remote
dotest log2-5 "${testcvs} admin -t-change-description file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest log2-6 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -13263,12 +15184,12 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
echo 'longer description' >${TESTDIR}/descrip
echo 'with two lines' >>${TESTDIR}/descrip
dotest log2-7 "${testcvs} admin -t${TESTDIR}/descrip file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest_fail log2-7a "${testcvs} admin -t${TESTDIR}/nonexist file1" \
"${PROG} \[[a-z]* aborted\]: can't stat ${TESTDIR}/nonexist: No such file or directory"
dotest log2-8 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -13292,7 +15213,7 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
dotest log2-9 "echo change from stdin | ${testcvs} admin -t -q file1" ""
dotest log2-10 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -13321,17 +15242,17 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;
dotest logopt-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest logopt-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo hi >file1
dotest logopt-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest logopt-4 "${testcvs} -q ci -m add file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ..
@@ -13339,19 +15260,19 @@ done"
dotest logopt-5 "${testcvs} log -R -d 2038-01-01" \
"${PROG} [a-z]*: Logging \.
${PROG} [a-z]*: Logging first-dir
-${TESTDIR}/cvsroot/first-dir/file1,v"
+${CVSROOT_DIRNAME}/first-dir/file1,v"
dotest logopt-6 "${testcvs} log -d 2038-01-01 -R" \
"${PROG} [a-z]*: Logging \.
${PROG} [a-z]*: Logging first-dir
-${TESTDIR}/cvsroot/first-dir/file1,v"
+${CVSROOT_DIRNAME}/first-dir/file1,v"
dotest logopt-6a "${testcvs} log -Rd 2038-01-01" \
"${PROG} [a-z]*: Logging \.
${PROG} [a-z]*: Logging first-dir
-${TESTDIR}/cvsroot/first-dir/file1,v"
+${CVSROOT_DIRNAME}/first-dir/file1,v"
dotest logopt-7 "${testcvs} log -s Exp -R" \
"${PROG} [a-z]*: Logging \.
${PROG} [a-z]*: Logging first-dir
-${TESTDIR}/cvsroot/first-dir/file1,v"
+${CVSROOT_DIRNAME}/first-dir/file1,v"
cd ..
rm -r 1
@@ -13367,7 +15288,7 @@ ${TESTDIR}/cvsroot/first-dir/file1,v"
dotest ann-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest ann-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
cat >file1 <<EOF
this
@@ -13380,10 +15301,10 @@ EOF
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest ann-4 "${testcvs} -q ci -m add file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
cat >file1 <<EOF
@@ -13399,7 +15320,7 @@ line
EOF
dotest ann-5 "${testcvs} -q ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
dotest ann-6 "${testcvs} -q tag -b br" "T file1"
@@ -13416,7 +15337,7 @@ line
EOF
dotest ann-7 "${testcvs} -q ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
dotest ann-8 "${testcvs} -q update -r br" "[UP] file1"
@@ -13435,7 +15356,7 @@ branched content
EOF
dotest ann-9 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2\.2\.1; previous revision: 1\.2
done"
# Note that this annotates the trunk despite the presence
@@ -13487,8 +15408,54 @@ done"
dotest_fail ann-14 "${testcvs} ann -r bill-clintons-chastity file1" \
"${PROG} \[[a-z]* aborted\]: no such tag bill-clintons-chastity"
+ # Now get rid of the working directory and test rannotate
+
cd ../..
rm -r 1
+ dotest ann-r10 "${testcvs} rann first-dir" \
+"Annotations for first-dir/file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1 (${username} *[0-9a-zA-Z-]*): this
+1\.1 (${username} *[0-9a-zA-Z-]*): is
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.3 (${username} *[0-9a-zA-Z-]*): trunk file
+1\.2 (${username} *[0-9a-zA-Z-]*):
+1\.2 (${username} *[0-9a-zA-Z-]*): with
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.2 (${username} *[0-9a-zA-Z-]*): blank
+1\.2 (${username} *[0-9a-zA-Z-]*): line"
+ dotest ann-r11 "${testcvs} rann -r br first-dir" \
+"Annotations for first-dir/file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1 (${username} *[0-9a-zA-Z-]*): this
+1\.1 (${username} *[0-9a-zA-Z-]*): is
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.1 (${username} *[0-9a-zA-Z-]*): file
+1\.2 (${username} *[0-9a-zA-Z-]*):
+1\.2 (${username} *[0-9a-zA-Z-]*): with
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.2 (${username} *[0-9a-zA-Z-]*): blank
+1\.2 (${username} *[0-9a-zA-Z-]*): line
+1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content"
+ dotest ann-r12 "${testcvs} rann -r 1.2.0.2 first-dir/file1" ""
+ dotest ann-r13 "${testcvs} rann -r 1.2.2 first-dir/file1" \
+"Annotations for first-dir/file1
+\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
+1\.1 (${username} *[0-9a-zA-Z-]*): this
+1\.1 (${username} *[0-9a-zA-Z-]*): is
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.1 (${username} *[0-9a-zA-Z-]*): file
+1\.2 (${username} *[0-9a-zA-Z-]*):
+1\.2 (${username} *[0-9a-zA-Z-]*): with
+1\.2 (${username} *[0-9a-zA-Z-]*): a
+1\.2 (${username} *[0-9a-zA-Z-]*): blank
+1\.2 (${username} *[0-9a-zA-Z-]*): line
+1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some
+1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content"
+ dotest_fail ann-r14 "${testcvs} rann -r bill-clintons-chastity first-dir/file1" \
+"${PROG} \[[a-z]* aborted\]: no such tag bill-clintons-chastity"
+
rm -rf ${CVSROOT_DIRNAME}/first-dir
;;
@@ -13502,7 +15469,7 @@ done"
module=x
mkdir $module
dotest ann-id-2 "${testcvs} add $module" \
-"Directory ${TESTDIR}/cvsroot/$module added to the repository"
+"Directory ${CVSROOT_DIRNAME}/$module added to the repository"
cd $module
file=m
@@ -13512,17 +15479,17 @@ done"
"${PROG} [a-z]*: scheduling file .$file. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest ann-id-4 "$testcvs -Q ci -m . $file" \
-"RCS file: ${TESTDIR}/cvsroot/$module/$file,v
+"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v
done
Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
initial revision: 1\.1
done"
echo line2 >> $file
dotest ann-id-5 "$testcvs -Q ci -m . $file" \
"Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
new revision: 1\.2; previous revision: 1\.1
done"
@@ -13546,7 +15513,36 @@ done"
# Because this test is all about -d options and such, it
# at least to some extent needs to be different for remote vs.
# local.
- if test "x$remote" = "xno"; then
+ if $remote; then
+
+ # For remote, just create the repository. We don't yet do
+ # the various other tests above for remote but that should be
+ # changed.
+ mkdir crerepos
+ mkdir crerepos/CVSROOT
+
+ # Use :ext: rather than :fork:. Most of the tests use :fork:,
+ # so we want to make sure that we test :ext: _somewhere_.
+
+ # Maybe a bit dubious in the sense that people need to
+ # have rsh working to run the tests, but at least it
+ # isn't inetd :-). Might want to think harder about this -
+ # maybe try :ext:, and if it fails, print a (single, nice)
+ # message and fall back to :fork:. Maybe testing :ext:
+ # with our own CVS_RSH rather than worrying about a system one
+ # would do the trick.
+
+ # Note that we set CVS_SERVER at the beginning.
+ CREREPOS_ROOT=:ext:`hostname`:${TESTDIR}/crerepos
+
+ # If we're going to do remote testing, make sure 'rsh' works first.
+ host="`hostname`"
+ if test "x`${CVS_RSH-rsh} $host -n 'echo hi'`" != "xhi"; then
+ echo "ERROR: cannot test remote CVS, because \`${CVS_RSH-rsh} $host' fails." >&2
+ exit 1
+ fi
+
+ else
# First, if the repository doesn't exist at all...
dotest_fail crerepos-1 \
@@ -13587,65 +15583,47 @@ ${testcvs} -d ${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then
CREREPOS_ROOT=${TESTDIR}/crerepos
- else
- # For remote, just create the repository. We don't yet do
- # the various other tests above for remote but that should be
- # changed.
- mkdir crerepos
- mkdir crerepos/CVSROOT
-
- # Use :ext: rather than :fork:. Most of the tests use :fork:,
- # so we want to make sure that we test :ext: _somewhere_.
-
- # Maybe a bit dubious in the sense that people need to
- # have rsh working to run the tests, but at least it
- # isn't inetd :-). Might want to think harder about this -
- # maybe try :ext:, and if it fails, print a (single, nice)
- # message and fall back to :fork:. Maybe testing :ext:
- # with our own CVS_RSH rather than worrying about a system one
- # would do the trick.
-
- # Note that we set CVS_SERVER at the beginning.
- CREREPOS_ROOT=:ext:`hostname`:${TESTDIR}/crerepos
-
- # If we're going to do remote testing, make sure 'rsh' works first.
- host="`hostname`"
- if test "x`${CVS_RSH-rsh} $host -n 'echo hi'`" != "xhi"; then
- echo "ERROR: cannot test remote CVS, because \`rsh $host' fails." >&2
- exit 1
- fi
fi
- if test "x$remote" = "xno"; then
+ if $remote; then
# Test that CVS rejects a relative path in CVSROOT.
mkdir 1; cd 1
- dotest_fail crerepos-6a "${testcvs} -q -d ../crerepos get ." \
-"${PROG} \[[a-z]* aborted\]: CVSROOT ../crerepos must be an absolute pathname"
+ # Note that having the client reject the pathname (as :fork:
+ # does), does _not_ test for the bugs we are trying to catch
+ # here. The point is that malicious clients might send all
+ # manner of things and the server better protect itself.
+ dotest_fail crerepos-6a-r \
+"${testcvs} -q -d :ext:`hostname`:../crerepos get ." \
+"${PROG} [a-z]*: CVSROOT (\":ext:${hostname}:\.\./crerepos\")
+${PROG} [a-z]*: may only specify a positive, non-zero, integer port (not \"\.\.\")\.
+${PROG} [a-z]*: perhaps you entered a relative pathname${QUESTION}
+${PROG} \[[a-z]* aborted\]: Bad CVSROOT\."
cd ..
rm -r 1
mkdir 1; cd 1
- dotest_fail crerepos-6b "${testcvs} -d crerepos init" \
-"${PROG} \[[a-z]* aborted\]: CVSROOT crerepos must be an absolute pathname"
+ dotest_fail crerepos-6b-r \
+"${testcvs} -d :ext:`hostname`:crerepos init" \
+"${PROG} [a-z]*: CVSROOT (\":ext:${hostname}:crerepos\")
+${PROG} [a-z]*: requires a path spec
+${PROG} [a-z]*: :(gserver|kserver|pserver):\[\[user\]\[:password\]@\]host\[:\[port\]\]/path
+${PROG} [a-z]*: \[:(ext|server):\]\[\[user\]@\]host\[:\]/path
+${PROG} \[[a-z]* aborted\]: Bad CVSROOT\."
cd ..
rm -r 1
- else # remote
+ else # local
# Test that CVS rejects a relative path in CVSROOT.
mkdir 1; cd 1
- # Note that having the client reject the pathname (as :fork:
- # does), does _not_ test for the bugs we are trying to catch
- # here. The point is that malicious clients might send all
- # manner of things and the server better protect itself.
- dotest_fail crerepos-6a \
-"${testcvs} -q -d :ext:`hostname`:../crerepos get ." \
-"Root ../crerepos must be an absolute pathname"
+ # piping the output of this test to /dev/null since we have no way of knowing
+ # what error messages different rsh implementations will output.
+ dotest_fail crerepos-6a "${testcvs} -q -d ../crerepos get . >/dev/null 2>&1" ""
cd ..
rm -r 1
mkdir 1; cd 1
- dotest_fail crerepos-6b \
-"${testcvs} -d :ext:`hostname`:crerepos init" \
-"Root crerepos must be an absolute pathname"
+ dotest_fail crerepos-6b "${testcvs} -d crerepos init" \
+"${PROG} [a-z]*: CVSROOT \"crerepos\" must be an absolute pathname
+${PROG} \[[a-z]* aborted\]: Bad CVSROOT\."
cd ..
rm -r 1
fi # end of tests to be skipped for remote
@@ -13662,17 +15640,17 @@ ${testcvs} -d ${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then
dotest crerepos-8 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest crerepos-9 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1
dotest crerepos-10 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest crerepos-11 "${testcvs} -q ci -m add-it" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ../..
@@ -13711,7 +15689,7 @@ ${PROG} [a-z]*: Updating crerepos-dir"
cd ..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -13820,7 +15798,7 @@ EOF
dotest rcs-1 "${testcvs} -q co first-dir" 'U first-dir/file1'
cd first-dir
dotest rcs-2 "${testcvs} -q log" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.3
branch:
@@ -13854,7 +15832,7 @@ add file1
# ISO8601 format. There are many, many, other variations
# specified by ISO8601 which we should be testing too.
dotest rcs-3 "${testcvs} -q log -d '1996-12-11<'" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.3
branch:
@@ -13874,7 +15852,7 @@ delete second line; modify twelfth line
# RFC822 format (as amended by RFC1123).
dotest rcs-4 "${testcvs} -q log -d '<3 Apr 2000 00:00'" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.3
branch:
@@ -13966,13 +15944,13 @@ EOF
echo "next branch revision" > file2
dotest rcs-6b "${testcvs} -q ci -m mod file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.2\.6\.2; previous revision: 1\.2\.6\.1
done"
# Now get rid of the default branch, it will get in the way.
dotest rcs-7 "${testcvs} admin -b file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# But we do want to make sure that "cvs admin" leaves the newphrases
# in the file.
@@ -14118,7 +16096,7 @@ next branch revision
# OK, now make sure cvs log doesn't have any trouble with the
# newphrases and such.
dotest rcs-14 "${testcvs} -q log file2" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
Working file: file2
head: 1\.5
branch:
@@ -14304,14 +16282,14 @@ EOF
# question one way or the other (it has a grammar but almost
# nothing about lexical analysis).
dotest_fail rcs3-1 "${testcvs} -q co first-dir" \
-"${PROG} \[[a-z]* aborted\]: EOF while looking for value in RCS file ${TESTDIR}/cvsroot/first-dir/file1,v"
+"${PROG} \[[a-z]* aborted\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file1,v
head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
; author jeremiah ;state ; branches; next;desc @@1.1log@@text@head@
EOF
# Whitespace issues, likewise.
dotest_fail rcs3-2 "${testcvs} -q co first-dir" \
-"${PROG} \[[a-z]* aborted\]: unexpected '.x6c' reading revision number in RCS file ${TESTDIR}/cvsroot/first-dir/file1,v"
+"${PROG} \[[a-z]* aborted\]: unexpected '.x6c' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file1,v
head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
; author jeremiah ;state ; branches; next;desc @@1.1 log@@text@head@
@@ -14319,7 +16297,7 @@ EOF
# Charming array of different messages for similar
# whitespace issues (depending on where the whitespace is).
dotest_fail rcs3-3 "${testcvs} -q co first-dir" \
-"${PROG} \[[a-z]* aborted\]: EOF while looking for value in RCS file ${TESTDIR}/cvsroot/first-dir/file1,v"
+"${PROG} \[[a-z]* aborted\]: EOF while looking for value in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file1,v
head 1.1; access; symbols; locks; expand o; 1.1 date 2007.03.20.04.03.02
; author jeremiah ;state ; branches; next;desc @@1.1 log @@text @head@
@@ -14338,13 +16316,13 @@ EOF
# See remote code above for rationale for cd.
cd first-dir
dotest rcs3-6 "${testcvs} log -R file1" \
-"${TESTDIR}/cvsroot/first-dir/file1,v"
+"${CVSROOT_DIRNAME}/first-dir/file1,v"
# OK, now put an extraneous '\0' at the end.
${AWK} </dev/null 'BEGIN { printf "@%c", 10 }' | ${TR} '@' '\000' \
>>${CVSROOT_DIRNAME}/first-dir/file1,v
dotest_fail rcs3-7 "${testcvs} log -s nostate file1" \
-"${PROG} \[[a-z]* aborted\]: unexpected '.x0' reading revision number in RCS file ${TESTDIR}/cvsroot/first-dir/file1,v"
+"${PROG} \[[a-z]* aborted\]: unexpected '.x0' reading revision number in RCS file ${CVSROOT_DIRNAME}/first-dir/file1,v"
cd ../..
rm -r 1
@@ -14373,7 +16351,7 @@ EOF
echo "LockDir=${TESTDIR}/locks" >config
dotest lockfiles-4 "${testcvs} -q ci -m config-it" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -14410,7 +16388,7 @@ ${PROG} \[[a-z]* aborted\]: cannot stat ${TESTDIR}/locks: No such file or direct
echo "# nobody here but us comments" >config
dotest lockfiles-cleanup-1 "${testcvs} -q ci -m config-it" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -14450,25 +16428,25 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
dotest backuprecover-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest backuprecover-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
mkdir dir
dotest backuprecover-3 "${testcvs} add dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir added to the repository"
touch file1 dir/file2
dotest backuprecover-4 "${testcvs} -q add file1 dir/file2" \
"${PROG} [a-z]*: use '${PROG} commit' to add these files permanently"
dotest backuprecover-5 "${testcvs} -q ci -mtest" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
initial revision: 1\.1
done"
echo "Line one" >>file1
@@ -14485,11 +16463,11 @@ done"
echo " God only knows" >>dir/file2
dotest backuprecover-6 "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.2; previous revision: 1\.1
done"
@@ -14499,8 +16477,8 @@ done"
mkdir 2; cd 2
dotest backuprecover-7 "${testcvs} -Q co first-dir" ''
cd first-dir
- sed -e"s/looks like/just looks like/" file1 >tmp; mv tmp file1
- sed -e"s/don't use/don't just use/" dir/file2 >tmp; mv tmp dir/file2
+ sed -e "s/looks like/just looks like/" file1 >tmp; mv tmp file1
+ sed -e "s/don't use/don't just use/" dir/file2 >tmp; mv tmp dir/file2
# developer 1 is on a roll
cd ../../1/first-dir
@@ -14512,16 +16490,16 @@ done"
echo " a word that fits here would be something like dials" >>dir/file2
dotest backuprecover-8 "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.3; previous revision: 1\.2
done"
# Save a backup copy
- cp -r ${TESTDIR}/cvsroot/first-dir ${TESTDIR}/cvsroot/backup
+ cp -r ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/cvsroot/backup
# Simulate developer 3
cd ../..
@@ -14536,11 +16514,11 @@ done"
echo " I think you should quit and get a job in the foundry" >>dir/file2
dotest backuprecover-9b "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.4; previous revision: 1\.3
done"
@@ -14549,7 +16527,7 @@ done"
mkdir 4; cd 4
dotest backuprecover-10 "${testcvs} -Q co first-dir" ''
cd first-dir
- sed -e"s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2
+ sed -e "s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2
# And back to developer 1
cd ../../1/first-dir
@@ -14566,21 +16544,21 @@ done"
echo " once you find what's in store!" >>dir/file2
dotest backuprecover-12 "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.5; previous revision: 1\.4
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.5; previous revision: 1\.4
done"
# developer 3'll do a bit of work that never gets checked in
cd ../../3/first-dir
dotest backuprecover-13 "${testcvs} -Q update" ''
- sed -e"s/very/some extremely/" file1 >tmp; mv tmp file1
+ sed -e "s/very/some extremely/" file1 >tmp; mv tmp file1
dotest backuprecover-14 "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.6; previous revision: 1\.5
done"
echo >>file1
@@ -14591,8 +16569,8 @@ done"
echo " You've got an ill, and I have the cure!" >>dir/file2
# Slag the original and restore it a few revisions back
- rm -rf ${TESTDIR}/cvsroot/first-dir
- mv ${TESTDIR}/cvsroot/backup ${TESTDIR}/cvsroot/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir
+ mv ${CVSROOT_DIRNAME}/backup ${TESTDIR}/cvsroot/first-dir
# Have developer 1 try an update and lose some data
#
@@ -14610,7 +16588,7 @@ U dir/file2"
cd ../../3/first-dir
dotest_fail backuprecover-16 "${testcvs} update" \
"${PROG} [a-z]*: Updating \.
-${PROG} \[[a-z]* aborted\]: could not find desired version 1\.6 in ${TESTDIR}/cvsroot/first-dir/file1,v"
+${PROG} \[[a-z]* aborted\]: could not find desired version 1\.6 in ${CVSROOT_DIRNAME}/first-dir/file1,v"
# create our workspace fixin' script
cd ../..
@@ -14645,11 +16623,11 @@ done" >fixit
cd first-dir
dotest backuprecover-19 "${testcvs} -q ci -mrecover/merge" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.4; previous revision: 1\.3
done"
@@ -14657,7 +16635,7 @@ done"
cd ../../4/first-dir
dotest backuprecover-20 "${testcvs} update" \
"${PROG} [a-z]*: Updating \.
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.3
retrieving revision 1\.4
Merging differences between 1\.3 and 1\.4 into file1
@@ -14665,7 +16643,7 @@ rcsmerge: warning: conflicts during merge
${PROG} [a-z]*: conflicts found in file1
C file1
${PROG} [a-z]*: Updating dir
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v
retrieving revision 1\.3
retrieving revision 1\.4
Merging differences between 1\.3 and 1\.4 into file2
@@ -14681,28 +16659,28 @@ C dir/file2"
s/quit and/be fired so he can/" dir/file2 >tmp; mv tmp dir/file2
dotest backuprecover-21 "${testcvs} -q ci -mrecover/merge" \
"Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.5; previous revision: 1\.4
done"
# go back and commit developer 2's stuff to prove it can still be done
cd ../../2/first-dir
dotest backuprecover-22 "${testcvs} -Q update" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.2
retrieving revision 1\.4
Merging differences between 1\.2 and 1\.4 into file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/dir/file2,v
retrieving revision 1\.2
retrieving revision 1\.5
Merging differences between 1\.2 and 1\.5 into file2"
dotest backuprecover-23 "${testcvs} -q ci -mtest" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.5; previous revision: 1\.4
done
Checking in dir/file2;
-${TESTDIR}/cvsroot/first-dir/dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/dir/file2,v <-- file2
new revision: 1\.6; previous revision: 1\.5
done"
@@ -14829,10 +16807,10 @@ O 1997-06-06 08:12 ${PLUS}0000 kingdon ccvs =ccvs= <remote>/\*"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest big-3 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
cd ..
@@ -14843,7 +16821,7 @@ done"
echo "add a line to the end" >>file1
dotest big-5 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
cd ../2/first-dir
@@ -14852,7 +16830,7 @@ done"
dotest big-6 "${testcvs} -q update" "[UP] file1"
cd ../..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -14879,20 +16857,20 @@ done"
dotest modes-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest modes-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch aa
dotest modes-3 "${testcvs} add aa" \
"${PROG} [a-z]*: scheduling file .aa. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest modes-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v
done
Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
initial revision: 1\.1
done"
- dotest modes-5 "ls -l ${TESTDIR}/cvsroot/first-dir/aa,v" \
+ dotest modes-5 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
"-r--r--r-- .*"
# Test for whether we can set the execute bit.
@@ -14900,24 +16878,24 @@ done"
echo change it >>aa
dotest modes-6 "${testcvs} -q ci -m set-execute-bit" \
"Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
new revision: 1\.2; previous revision: 1\.1
done"
# If CVS let us update the execute bit, it would be set here.
# But it doesn't, and as far as I know that is longstanding
# CVS behavior.
- dotest modes-7 "ls -l ${TESTDIR}/cvsroot/first-dir/aa,v" \
+ dotest modes-7 "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
"-r--r--r-- .*"
# OK, now manually change the modes and see what happens.
- chmod g=r,o= ${TESTDIR}/cvsroot/first-dir/aa,v
+ chmod g=r,o= ${CVSROOT_DIRNAME}/first-dir/aa,v
echo second line >>aa
dotest modes-7a "${testcvs} -q ci -m set-execute-bit" \
"Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
new revision: 1\.3; previous revision: 1\.2
done"
- dotest modes-7b "ls -l ${TESTDIR}/cvsroot/first-dir/aa,v" \
+ dotest modes-7b "ls -l ${CVSROOT_DIRNAME}/first-dir/aa,v" \
"-r--r----- .*"
CVSUMASK=007
@@ -14929,20 +16907,20 @@ done"
"${PROG} [a-z]*: scheduling file .ab. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest modes-9 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/ab,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/ab,v
done
Checking in ab;
-${TESTDIR}/cvsroot/first-dir/ab,v <-- ab
+${CVSROOT_DIRNAME}/first-dir/ab,v <-- ab
initial revision: 1\.1
done"
- if test "x$remote" = xyes; then
+ if $remote; then
# The problem here is that the CVSUMASK environment variable
# needs to be set on the server (e.g. .bashrc). This is, of
# course, bogus, but that is the way it is currently.
- dotest modes-10 "ls -l ${TESTDIR}/cvsroot/first-dir/ab,v" \
+ dotest modes-10r "ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v" \
"-r-xr-x---.*" "-r-xr-xr-x.*"
else
- dotest modes-10 "ls -l ${TESTDIR}/cvsroot/first-dir/ab,v" \
+ dotest modes-10 "ls -l ${CVSROOT_DIRNAME}/first-dir/ab,v" \
"-r-xr-x---.*"
fi
@@ -14959,25 +16937,25 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
# when we are just now adding the file; as far as I know
# that is longstanding CVS behavior, for what it's worth.
dotest modes-14 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/Attic/ac,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v
done
Checking in ac;
-${TESTDIR}/cvsroot/first-dir/Attic/ac,v <-- ac
+${CVSROOT_DIRNAME}/first-dir/Attic/ac,v <-- ac
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
- if test "x$remote" = xyes; then
+ if $remote; then
# The problem here is that the CVSUMASK environment variable
# needs to be set on the server (e.g. .bashrc). This is, of
# course, bogus, but that is the way it is currently. The
# first match is for the :ext: method (where the CVSUMASK
# won't be set), while the second is for the :fork: method
# (where it will be).
- dotest modes-15 \
-"ls -l ${TESTDIR}/cvsroot/first-dir/Attic/ac,v" \
+ dotest modes-15r \
+"ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v" \
"-r--r--r--.*" "-r--r-----.*"
else
dotest modes-15 \
-"ls -l ${TESTDIR}/cvsroot/first-dir/Attic/ac,v" \
+"ls -l ${CVSROOT_DIRNAME}/first-dir/Attic/ac,v" \
"-r--r-----.*"
fi
@@ -14997,23 +16975,23 @@ done"
dotest modes2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest modes2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch aa
dotest modes2-3 "${testcvs} add aa" \
"${PROG} [a-z]*: scheduling file .aa. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest modes2-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v
done
Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
initial revision: 1\.1
done"
echo "more money" >> aa
dotest modes2-5 "${testcvs} -q ci -m add" \
"Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
new revision: 1\.2; previous revision: 1\.1
done"
@@ -15044,31 +17022,31 @@ done"
dotest modes3-1 "${testcvs} -q co -l ." ''
mkdir first-dir second-dir
dotest modes3-2 "${testcvs} add first-dir second-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository
-Directory ${TESTDIR}/cvsroot/second-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository
+Directory ${CVSROOT_DIRNAME}/second-dir added to the repository"
touch first-dir/aa second-dir/ab
dotest modes3-3 "${testcvs} add first-dir/aa second-dir/ab" \
"${PROG} [a-z]*: scheduling file .first-dir/aa. for addition
${PROG} [a-z]*: scheduling file .second-dir/ab. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest modes3-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v
done
Checking in first-dir/aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/second-dir/ab,v
+RCS file: ${CVSROOT_DIRNAME}/second-dir/ab,v
done
Checking in second-dir/ab;
-${TESTDIR}/cvsroot/second-dir/ab,v <-- ab
+${CVSROOT_DIRNAME}/second-dir/ab,v <-- ab
initial revision: 1\.1
done"
- chmod a= ${TESTDIR}/cvsroot/first-dir
+ chmod a= ${CVSROOT_DIRNAME}/first-dir
dotest modes3-5 "${testcvs} update" \
"${PROG} [a-z]*: Updating \.
${PROG} [a-z]*: Updating first-dir
-${PROG} [a-z]*: cannot open directory ${TESTDIR}/cvsroot/first-dir: Permission denied
+${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied
${PROG} [a-z]*: skipping directory first-dir
${PROG} [a-z]*: Updating second-dir"
@@ -15082,14 +17060,14 @@ ${PROG} [a-z]*: Updating second-dir"
${PROG} [a-z]*: Updating CVSROOT
U ${DOTSTAR}
${PROG} [a-z]*: Updating first-dir
-${PROG} [a-z]*: cannot open directory ${TESTDIR}/cvsroot/first-dir: Permission denied
+${PROG} [a-z]*: cannot open directory ${CVSROOT_DIRNAME}/first-dir: Permission denied
${PROG} [a-z]*: skipping directory first-dir
${PROG} [a-z]*: Updating second-dir"
cd ..
rm -r 1
- chmod u+rwx ${TESTDIR}/cvsroot/first-dir
- rm -rf ${TESTDIR}/cvsroot/first-dir ${TESTDIR}/cvsroot/second-dir
+ chmod u+rwx ${CVSROOT_DIRNAME}/first-dir
+ rm -rf ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/cvsroot/second-dir
;;
stamps)
@@ -15098,7 +17076,7 @@ ${PROG} [a-z]*: Updating second-dir"
dotest stamps-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest stamps-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch aa
echo '$''Id$' >kw
@@ -15121,16 +17099,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
"cmp ${TESTDIR}/1/stamp.kw.touch ${TESTDIR}/1/stamp.kw.add" ''
sleep 60
dotest stamps-5 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aa,v
done
Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/kw,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/kw,v
done
Checking in kw;
-${TESTDIR}/cvsroot/first-dir/kw,v <-- kw
+${CVSROOT_DIRNAME}/first-dir/kw,v <-- kw
initial revision: 1\.1
done"
ls -l aa >${TESTDIR}/1/stamp.aa.ci
@@ -15177,11 +17155,11 @@ U first-dir/kw"
echo add a line >>kw
dotest stamps-9 "${testcvs} -q ci -m change-them" \
"Checking in aa;
-${TESTDIR}/cvsroot/first-dir/aa,v <-- aa
+${CVSROOT_DIRNAME}/first-dir/aa,v <-- aa
new revision: 1\.2; previous revision: 1\.1
done
Checking in kw;
-${TESTDIR}/cvsroot/first-dir/kw,v <-- kw
+${CVSROOT_DIRNAME}/first-dir/kw,v <-- kw
new revision: 1\.2; previous revision: 1\.1
done"
ls -l aa >${TESTDIR}/1/stamp.aa.ci2
@@ -15223,7 +17201,7 @@ done"
cd ../..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -15242,7 +17220,7 @@ done"
dotest perms-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest perms-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch foo
@@ -15254,7 +17232,7 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
"RCS file: ${CVSROOT_DIRNAME}/first-dir/foo,v
done
Checking in foo;
-${TESTDIR}/cvsroot/first-dir/foo,v <-- foo
+${CVSROOT_DIRNAME}/first-dir/foo,v <-- foo
initial revision: 1\.1
done"
@@ -15263,7 +17241,7 @@ done"
mkdir 2; cd 2
dotest perms-5 "${testcvs} -q co first-dir" "U first-dir/foo"
cd first-dir
- if test "$remote" = no; then
+ if $remote; then :; else
# PreservePermissions not yet implemented for remote.
dotest perms-6 "ls -l foo" "-r---wx--x .* foo"
fi
@@ -15287,24 +17265,24 @@ done"
dotest symlinks-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest symlinks-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
dotest symlinks-2.1 "ln -s ${TESTDIR}/fumble slink" ""
dotest symlinks-3 "${testcvs} add slink" \
"${PROG} [a-z]*: scheduling file .slink. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
- if test "$remote" = yes; then
+ if $remote; then
# Remote doesn't implement PreservePermissions, and in its
# absence the correct behavior is to follow the symlink.
- dotest_fail symlinks-4 "${testcvs} -q ci -m ''" \
+ dotest_fail symlinks-4r "${testcvs} -q ci -m ''" \
"${PROG} \[commit aborted\]: reading slink: No such file or directory"
else
dotest symlinks-4 "${testcvs} -q ci -m ''" \
"RCS file: ${CVSROOT_DIRNAME}/first-dir/slink,v
done
Checking in slink;
-${TESTDIR}/cvsroot/first-dir/slink,v <-- slink
+${CVSROOT_DIRNAME}/first-dir/slink,v <-- slink
initial revision: 1\.1
done"
@@ -15334,7 +17312,7 @@ done"
dotest symlinks2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest symlinks2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo nonsymlink > slink
dotest symlinks2-3 "${testcvs} add slink" \
@@ -15344,7 +17322,7 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
"RCS file: ${CVSROOT_DIRNAME}/first-dir/slink,v
done
Checking in slink;
-${TESTDIR}/cvsroot/first-dir/slink,v <-- slink
+${CVSROOT_DIRNAME}/first-dir/slink,v <-- slink
initial revision: 1\.1
done"
rm slink
@@ -15353,7 +17331,7 @@ done"
dotest symlinks2-5 "ln -s cvslog.file2 slink" ""
dotest symlinks2-6 "${testcvs} -q ci -m linkify" \
"Checking in slink;
-${TESTDIR}/cvsroot/first-dir/slink,v <-- slink
+${CVSROOT_DIRNAME}/first-dir/slink,v <-- slink
new revision: 1\.2; previous revision: 1\.1
done"
dotest symlinks2-7 "${testcvs} -q update -r 1.1 slink" "[UP] slink"
@@ -15375,7 +17353,7 @@ done"
dotest hardlinks-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest hardlinks-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
# Make up some ugly filenames, to test that they get
@@ -15411,32 +17389,32 @@ ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaaa,v
done
Checking in aaaa;
-${TESTDIR}/cvsroot/first-dir/aaaa,v <-- aaaa
+${CVSROOT_DIRNAME}/first-dir/aaaa,v <-- aaaa
initial revision: 1\.1
done
RCS file: ${CVSROOT_DIRNAME}/first-dir/b\.b\.b\.b,v
done
Checking in b\.b\.b\.b;
-${TESTDIR}/cvsroot/first-dir/b\.b\.b\.b,v <-- b\.b\.b\.b
+${CVSROOT_DIRNAME}/first-dir/b\.b\.b\.b,v <-- b\.b\.b\.b
initial revision: 1\.1
done
RCS file: ${CVSROOT_DIRNAME}/first-dir/dd dd dd,v
done
Checking in dd dd dd;
-${TESTDIR}/cvsroot/first-dir/dd dd dd,v <-- dd dd dd
+${CVSROOT_DIRNAME}/first-dir/dd dd dd,v <-- dd dd dd
initial revision: 1\.1
done"
# Test checking out hardlinked files.
cd ../..
mkdir 2; cd 2
- if test "$remote" = yes; then
+ if $remote; then
# Remote does not implement PreservePermissions.
- dotest hardlinks-5 "${testcvs} -q co first-dir" \
+ dotest hardlinks-5r "${testcvs} -q co first-dir" \
"U first-dir/aaaa
U first-dir/b\.b\.b\.b
U first-dir/dd dd dd"
cd first-dir
- dotest hardlinks-6 "ls -l [abd]*" \
+ dotest hardlinks-6r "ls -l [abd]*" \
"-[rwx\-]* *1 .* aaaa
-[rwx\-]* *1 .* b\.b\.b\.b
-[rwx\-]* *1 .* dd dd dd"
@@ -15476,7 +17454,7 @@ U first-dir/dd dd dd"
dotest sticky-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest sticky-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1
@@ -15484,17 +17462,17 @@ U first-dir/dd dd dd"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest sticky-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest sticky-5 "${testcvs} -q tag tag1" "T file1"
echo add a line >>file1
dotest sticky-6 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
dotest sticky-7 "${testcvs} -q update -r tag1" "[UP] file1"
@@ -15511,10 +17489,10 @@ ${QUESTION} file2" "${QUESTION} file2
"${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest sticky-14 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
@@ -15580,7 +17558,7 @@ U file1" "U file1"
dotest keyword-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest keyword-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo '$''Author$' > file1
@@ -15605,22 +17583,22 @@ U file1" "U file1"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest keyword-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest keyword-5 "cat file1" \
'\$'"Author: ${username} "'\$'"
"'\$'"Date: [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] "'\$'"
-"'\$'"Header: ${TESTDIR}/cvsroot/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
+"'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
"'\$'"Id: file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
"'\$'"Locker: "'\$'"
"'\$'"Name: "'\$'"
"'\$'"RCSfile: file1,v "'\$'"
"'\$'"Revision: 1\.1 "'\$'"
-"'\$'"Source: ${TESTDIR}/cvsroot/first-dir/file1,v "'\$'"
+"'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
"'\$'"State: Exp "'\$'"
"'\$'"Nonkey"'\$'"
"'\$'"Date
@@ -15634,7 +17612,7 @@ xx"
# vs. -kkv. CVS does not normally lock RCS files, but some
# people use cvs admin to enforce reserved checkouts.
dotest keyword-6 "${testcvs} admin -l file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
1\.1 locked
done"
@@ -15642,13 +17620,13 @@ done"
dotest keyword-8 "cat file1" \
'\$'"Author: ${username} "'\$'"
"'\$'"Date: [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] "'\$'"
-"'\$'"Header: ${TESTDIR}/cvsroot/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
+"'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
"'\$'"Id: file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp "'\$'"
"'\$'"Locker: "'\$'"
"'\$'"Name: "'\$'"
"'\$'"RCSfile: file1,v "'\$'"
"'\$'"Revision: 1\.1 "'\$'"
-"'\$'"Source: ${TESTDIR}/cvsroot/first-dir/file1,v "'\$'"
+"'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
"'\$'"State: Exp "'\$'"
"'\$'"Nonkey"'\$'"
"'\$'"Date
@@ -15662,13 +17640,13 @@ xx"
dotest keyword-10 "cat file1" \
'\$'"Author: ${username} "'\$'"
"'\$'"Date: [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] "'\$'"
-"'\$'"Header: ${TESTDIR}/cvsroot/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp ${username} "'\$'"
+"'\$'"Header: ${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp ${username} "'\$'"
"'\$'"Id: file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp ${username} "'\$'"
"'\$'"Locker: ${username} "'\$'"
"'\$'"Name: "'\$'"
"'\$'"RCSfile: file1,v "'\$'"
"'\$'"Revision: 1\.1 "'\$'"
-"'\$'"Source: ${TESTDIR}/cvsroot/first-dir/file1,v "'\$'"
+"'\$'"Source: ${CVSROOT_DIRNAME}/first-dir/file1,v "'\$'"
"'\$'"State: Exp "'\$'"
"'\$'"Nonkey"'\$'"
"'\$'"Date
@@ -15702,13 +17680,13 @@ xx"
dotest keyword-14 "cat file1" \
"${username}
[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]
-${TESTDIR}/cvsroot/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp
+${CVSROOT_DIRNAME}/first-dir/file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp
file1,v 1\.1 [0-9/]* [0-9:]* ${username} Exp
file1,v
1\.1
-${TESTDIR}/cvsroot/first-dir/file1,v
+${CVSROOT_DIRNAME}/first-dir/file1,v
Exp
"'\$'"Nonkey"'\$'"
"'\$'"Date
@@ -15742,24 +17720,24 @@ xx "'\$'"Log"'\$'
echo '$''Name$' > file1
dotest keyword-18 "${testcvs} ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
dotest keyword-19 "${testcvs} -q tag tag1" "T file1"
echo "change" >> file1
dotest keyword-20 "${testcvs} -q ci -m mod2 file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
dotest keyword-21 "${testcvs} -q update -r tag1" "[UP] file1"
dotest keyword-22 "cat file1" '\$'"Name: tag1 "'\$'
- if test "$remote" = yes; then
+ if $remote; then
# Like serverpatch-8. Not sure there is anything much we
# can or should do about this.
- dotest keyword-23 "${testcvs} update -A file1" "P file1
+ dotest keyword-23r "${testcvs} update -A file1" "P file1
${PROG} update: checksum failure after patch to \./file1; will refetch
${PROG} client: refetching unpatchable files
U file1"
@@ -15780,7 +17758,7 @@ change"
dotest keywordlog-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest keywordlog-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo initial >file1
dotest keywordlog-3 "${testcvs} add file1" \
@@ -15789,10 +17767,10 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
# See "rmadd" for a list of other tests of cvs ci -r.
dotest keywordlog-4 "${testcvs} -q ci -r 1.3 -m add file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.3
done"
@@ -15815,7 +17793,7 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!"
dotest keywordlog-5 "${testcvs} ci -F ${TESTDIR}/comment.tmp file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4; previous revision: 1\.3
done"
rm -f ${TESTDIR}/comment.tmp
@@ -15842,7 +17820,7 @@ xx"
echo "change" >> file1
dotest keywordlog-10 "${testcvs} ci -m modify file1" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.5; previous revision: 1\.4
done"
dotest keywordlog-11 "cat file1" \
@@ -15876,7 +17854,7 @@ change"
echo br-change >>file1
dotest keywordlog-15 "${testcvs} -q ci -m br-modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.4\.2\.1; previous revision: 1\.4
done"
dotest keywordlog-16 "cat file1" \
@@ -15973,7 +17951,7 @@ xx"
dotest keywordlog-24 \
"${testcvs} admin -oHEAD 1/first-dir/file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
deleting revision 1\.5
done"
@@ -15986,7 +17964,7 @@ xx First log line
xx Second log line
xx"
- if test $keep = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -16009,7 +17987,7 @@ xx"
dotest keyword2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest keyword2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo '$''Revision$' >> file1
@@ -16039,16 +18017,16 @@ ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest keyword2-6 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/binfile\.dat,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v
done
Checking in binfile\.dat;
-${TESTDIR}/cvsroot/first-dir/binfile\.dat,v <-- binfile\.dat
+${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v <-- binfile\.dat
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
@@ -16059,7 +18037,7 @@ T file1"
sed -e 's/our/the best of and the worst of/' file1 >f; mv f file1
dotest keyword2-8 "${testcvs} -q ci -m change" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
@@ -16068,14 +18046,14 @@ done"
echo "what else do we have?" >>file1
dotest keyword2-10 "${testcvs} -q ci -m change" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
# Okay, first a conflict in file1 - should be okay with binfile.dat
dotest keyword2-11 "${testcvs} -q update -A -j branch" \
"U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file1
@@ -16084,7 +18062,7 @@ rcsmerge: warning: conflicts during merge"
dotest_fail keyword2-12 "${testcvs} diff file1" \
"Index: file1
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.2
diff -r1\.2 file1
0a1
@@ -16098,11 +18076,11 @@ diff -r1\.2 file1
# Here's the problem... shouldn't -kk a binary file...
rm file1
- if test "$remote" = yes; then
- dotest keyword2-13 "${testcvs} -q update -A -kk -j branch" \
+ if $remote; then
+ dotest keyword2-13r "${testcvs} -q update -A -kk -j branch" \
"U binfile.dat
U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
@@ -16111,7 +18089,7 @@ Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
"U binfile.dat
${PROG} [a-z]*: warning: file1 was lost
U file1
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.1
retrieving revision 1\.1\.2\.1
Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
@@ -16121,7 +18099,7 @@ Merging differences between 1\.1 and 1\.1\.2\.1 into file1"
# have been checked in if it had changed on the branch...
dotest keyword2-14 "${testcvs} -q ci -m change" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
@@ -16141,12 +18119,12 @@ T file1"
</dev/null | ${TR} '@' '\000' >>binfile.dat
dotest keyword2-19 "${testcvs} -q ci -m badbadbad" \
"Checking in binfile\.dat;
-${TESTDIR}/cvsroot/first-dir/binfile\.dat,v <-- binfile\.dat
+${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v <-- binfile\.dat
new revision: 1\.1\.4\.1; previous revision: 1\.1
done"
dotest keyword2-20 "${testcvs} -q update -A -kk -j branch2" \
"U binfile\.dat
-RCS file: ${TESTDIR}/cvsroot/first-dir/binfile\.dat,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/binfile\.dat,v
retrieving revision 1\.1
retrieving revision 1\.1\.4\.1
Merging differences between 1\.1 and 1\.1\.4\.1 into binfile\.dat
@@ -16190,7 +18168,7 @@ U first-dir/file2"
echo 'add a line on trunk' >> file1
dotest head-3 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
dotest head-4 "${testcvs} -q tag trunktag" "T file1
@@ -16198,7 +18176,7 @@ T file2"
echo 'add a line on trunk after trunktag' >> file1
dotest head-5 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3; previous revision: 1\.2
done"
dotest head-6 "${testcvs} -q tag -b br1" "T file1
@@ -16207,7 +18185,7 @@ T file2"
echo 'modify on branch' >>file1
dotest head-8 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3\.2\.1; previous revision: 1\.3
done"
dotest head-9 "${testcvs} -q tag brtag" "T file1
@@ -16215,7 +18193,7 @@ T file2"
echo 'modify on branch after brtag' >>file1
dotest head-10 "${testcvs} -q ci -m modify" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1
done"
# With no sticky tags, HEAD is the head of the trunk.
@@ -16229,12 +18207,12 @@ add a line on trunk after trunktag"
dotest_fail head-trunk-diff "${testcvs} -q diff -c -r HEAD -r br1" \
"Index: file1
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.3
retrieving revision 1\.3\.2\.2
diff -c -r1\.3 -r1\.3\.2\.2
-\*\*\* file1 [0-9/]* [0-9:]* 1\.3
---- file1 [0-9/]* [0-9:]* 1\.3\.2\.2
+\*\*\* file1 ${RFCDATE} 1\.3
+--- file1 ${RFCDATE} 1\.3\.2\.2
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1,3 \*\*\*\*
--- 1,5 ----
@@ -16282,12 +18260,12 @@ add a line on trunk after trunktag"
"${testcvs} -q diff -c -r HEAD -r br1" \
"Index: file1
===================================================================
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
retrieving revision 1\.3
retrieving revision 1\.3\.2\.2
diff -c -r1\.3 -r1\.3\.2\.2
-\*\*\* file1 [0-9/]* [0-9:]* 1\.3
---- file1 [0-9/]* [0-9:]* 1\.3\.2\.2
+\*\*\* file1 ${RFCDATE} 1\.3
+--- file1 ${RFCDATE} 1\.3\.2\.2
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
\*\*\* 1,3 \*\*\*\*
--- 1,5 ----
@@ -16306,10 +18284,10 @@ ${PLUS} modify on branch after brtag"
# a revision (file1) and the case where it does not (file2)
dotest_fail head-o0a "${testcvs} admin -o ::br1" \
"${PROG} [a-z]*: Administrating \.
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
${PROG} [a-z]*: cannot remove revision 1\.3\.2\.1 because it has tags
-${PROG} [a-z]*: cannot modify RCS file for .file1.
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+${PROG} [a-z]*: RCS file for .file1. not modified\.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
dotest head-o0b "${testcvs} tag -d brtag" \
"${PROG} [a-z]*: Untagging \.
@@ -16317,10 +18295,10 @@ D file1
D file2"
dotest head-o1 "${testcvs} admin -o ::br1" \
"${PROG} [a-z]*: Administrating \.
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
deleting revision 1\.3\.2\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
cd ../..
rm -r 1
@@ -16348,7 +18326,7 @@ done"
dotest tagdate-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest tagdate-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo trunk-1 >file1
@@ -16356,10 +18334,10 @@ done"
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest tagdate-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest tagdate-5 "${testcvs} -q tag -b br1" "T file1"
@@ -16367,7 +18345,7 @@ done"
echo trunk-2 >file1
dotest tagdate-7 "${testcvs} -q ci -m modify-on-trunk" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.2; previous revision: 1\.1
done"
# We are testing -r -D where br1 is a (magic) branch without
@@ -16378,7 +18356,7 @@ done"
echo br2-1 >file1
dotest tagdate-10 "${testcvs} -q ci -m modify-on-br2" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.4\.1; previous revision: 1\.1
done"
@@ -16406,7 +18384,7 @@ done"
echo br2-2 >file1
dotest tagdate-13 "${testcvs} -q ci -m modify-2-on-br2" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.4\.2; previous revision: 1\.1\.4\.1
done"
cd ../..
@@ -16427,7 +18405,7 @@ done"
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
1\.1\.4\.2 (${username} *[0-9a-zA-Z-]*): br2-2"
- if test $keep = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -16446,7 +18424,7 @@ done"
dotest multibranch2-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest multibranch2-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
echo trunk-1 >file1
@@ -16456,16 +18434,16 @@ done"
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest multibranch2-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
dotest multibranch2-5 "${testcvs} -q tag -b A" "T file1
@@ -16478,11 +18456,11 @@ T file2"
echo branch-B >file2
dotest multibranch2-8 "${testcvs} -q ci -m modify-on-B" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.4\.1; previous revision: 1\.1
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.4\.1; previous revision: 1\.1
done"
@@ -16492,13 +18470,13 @@ done"
# When using cvs-1.9.20, this commit gets a failed assertion in rcs.c.
dotest multibranch2-10 "${testcvs} -q ci -m modify-on-A" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest multibranch2-11 "${testcvs} -q log file1" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16528,7 +18506,7 @@ modify-on-A
# This one is more concise.
dotest multibranch2-12 "${testcvs} -q log -r1.1 file1" \
"
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16555,13 +18533,13 @@ add
[UP] file2"
dotest multibranch2-14 "${testcvs} -q update -r A -j B file2" \
"[UP] file2
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
retrieving revision 1.1
retrieving revision 1.1.4.1
Merging differences between 1.1 and 1.1.4.1 into file2"
dotest multibranch2-15 "${testcvs} -q ci -m commit-on-A file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
cd ../..
@@ -16594,10 +18572,10 @@ done"
"${PROG} [a-z]*: scheduling file .$file. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest tag8k-4 "$testcvs -Q ci -m . $file" \
-"RCS file: ${TESTDIR}/cvsroot/$module/$file,v
+"RCS file: ${CVSROOT_DIRNAME}/$module/$file,v
done
Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
initial revision: 1\.1
done"
@@ -16605,7 +18583,7 @@ done"
echo a > $file
dotest tag8k-5 "$testcvs -Q ci -m . $file" \
"Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
new revision: 1\.2; previous revision: 1\.1
done"
@@ -16629,7 +18607,7 @@ done"
dotest tag8k-16 "$testcvs -Q tag $t-a $file" ''
# Extract the author value.
- name=`sed -n 's/.*; author \([^;]*\);.*/\1/p' ${TESTDIR}/cvsroot/$module/$file,v|head -1`
+ name=`sed -n 's/.*; author \([^;]*\);.*/\1/p' ${CVSROOT_DIRNAME}/$module/$file,v|head -1`
# Form a suffix string of length (16 - length($name)).
# CAREFUL: this will lose if $name is longer than 16.
@@ -16645,7 +18623,7 @@ done"
echo a >> $file
dotest tag8k-18 "$testcvs -Q ci -m . $file" \
"Checking in $file;
-${TESTDIR}/cvsroot/$module/$file,v <-- $file
+${CVSROOT_DIRNAME}/$module/$file,v <-- $file
new revision: 1\.3; previous revision: 1\.2
done"
cd ../..
@@ -16682,7 +18660,7 @@ done"
dotest admin-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest admin-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
dotest_fail admin-3 "${testcvs} -q admin -i file1" \
@@ -16700,16 +18678,16 @@ ${PROG} \[admin aborted\]: specify ${PROG} -H admin for usage information"
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest admin-6 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
dotest admin-7 "${testcvs} -q tag -b br" "T file1
@@ -16718,7 +18696,7 @@ T file2"
echo 'add a line on the branch' >> file1
dotest admin-9 "${testcvs} -q ci -m modify-on-branch" \
"Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
new revision: 1\.1\.2\.1; previous revision: 1\.1
done"
dotest admin-10 "${testcvs} -q update -A" "U file1"
@@ -16735,12 +18713,12 @@ ${PROG} \[[a-z]* aborted\]: attempt to specify a numeric revision"
# try a bad symbolic revision
dotest_fail admin-10c "${testcvs} -q admin -bBOGUS" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file1,v: Symbolic name BOGUS is undefined.
-${PROG} [a-z]*: cannot modify RCS file for .file1.
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file2,v: Symbolic name BOGUS is undefined.
-${PROG} [a-z]*: cannot modify RCS file for .file2."
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file1,v: Symbolic name BOGUS is undefined.
+${PROG} [a-z]*: RCS file for .file1. not modified\.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name BOGUS is undefined.
+${PROG} [a-z]*: RCS file for .file2. not modified\."
# Note that -s option applies to the new default branch, not
# the old one.
@@ -16749,10 +18727,10 @@ ${PROG} [a-z]*: cannot modify RCS file for .file2."
# to change that once CVS parses options.
dotest admin-11 "${testcvs} -q admin -afoo,bar -abaz \
-b1.1.2 -cxx -U -sfoo file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest admin-11a "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch: 1\.1\.2
@@ -16775,10 +18753,10 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: foo; lines: ${PLUS}1 -0
modify-on-branch
============================================================================="
dotest admin-12 "${testcvs} -q admin -bbr file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest admin-12a "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch: 1\.1\.2
@@ -16859,10 +18837,10 @@ add a line on the branch
@"
dotest admin-14 "${testcvs} -q admin -aauth3 -aauth2,foo \
-soneone:1.1 -m1.1:changed-log-message -ntagone: file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
dotest admin-15 "${testcvs} -q log file2" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
Working file: file2
head: 1\.1
branch:
@@ -16885,10 +18863,10 @@ changed-log-message
dotest admin-16 "${testcvs} -q admin \
-A${CVSROOT_DIRNAME}/first-dir/file2,v -b -L -Nbr:1.1 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest admin-17 "${testcvs} -q log file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16916,14 +18894,14 @@ modify-on-branch
============================================================================="
dotest_fail admin-18 "${testcvs} -q admin -nbr:1.1.2 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file1,v: symbolic name br already bound to 1\.1
-${PROG} [a-z]*: cannot modify RCS file for .file1."
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file1,v: symbolic name br already bound to 1\.1
+${PROG} [a-z]*: RCS file for .file1. not modified\."
dotest admin-19 "${testcvs} -q admin -ebaz -ebar,auth3 -nbr file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest admin-20 "${testcvs} -q log file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16952,19 +18930,18 @@ modify-on-branch
# relative pathnames in admin -A?
dotest_fail admin-19a-nonexist \
"${testcvs} -q admin -A${TESTDIR}/foo/bar file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
${PROG} [a-z]*: Couldn't open rcs file .${TESTDIR}/foo/bar.: No such file or directory
${PROG} \[[a-z]* aborted\]: cannot continue"
# In the remote case, we are cd'd off into the temp directory
# and so these tests give "No such file or directory" errors.
- if test "x$remote" = xno; then
-
- dotest admin-19a-admin "${testcvs} -q admin -A../../cvsroot/first-dir/file2,v file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+ if $remote; then :; else
+ dotest admin-19a-admin "${testcvs} -q admin -A../../cvsroot/first-dir/file2,v file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
- dotest admin-19a-log "${testcvs} -q log -h -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+ dotest admin-19a-log "${testcvs} -q log -h -N file1" "
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16980,10 +18957,10 @@ total revisions: 2
# Now test that plain -e works right.
dotest admin-19a-2 "${testcvs} -q admin -e file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
dotest admin-19a-3 "${testcvs} -q log -h -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -16995,18 +18972,18 @@ total revisions: 2
# Put the access list back, to avoid special cases later.
dotest admin-19a-4 "${testcvs} -q admin -afoo,auth2 file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done"
# Add another revision to file2, so we can delete one.
echo 'add a line' >> file2
dotest admin-21 "${testcvs} -q ci -m modify file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.2; previous revision: 1\.1
done"
dotest admin-22 "${testcvs} -q admin -o1.1 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
deleting revision 1\.1
done"
# Test admin -o. More variants that we could be testing:
@@ -17020,48 +18997,48 @@ done"
"${PROG} [a-z]*: scheduling file .aaa. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest admin-22-o2 "${testcvs} -q ci -m first aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
done
Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
initial revision: 1\.1
done"
echo second rev >> aaa
dotest admin-22-o3 "${testcvs} -q ci -m second aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.2; previous revision: 1\.1
done"
echo third rev >> aaa
dotest admin-22-o4 "${testcvs} -q ci -m third aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.3; previous revision: 1\.2
done"
echo fourth rev >> aaa
dotest admin-22-o5 "${testcvs} -q ci -m fourth aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.4; previous revision: 1\.3
done"
echo fifth rev >>aaa
dotest admin-22-o6 "${testcvs} -q ci -m fifth aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.5; previous revision: 1\.4
done"
echo sixth rev >> aaa
dotest admin-22-o7 "${testcvs} -q ci -m sixth aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.6; previous revision: 1\.5
done"
dotest admin-22-o8 "${testcvs} admin -l1.6 aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
1\.6 locked
done"
dotest admin-22-o9 "${testcvs} log -r1.6 aaa" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
Working file: aaa
head: 1\.6
branch:
@@ -17078,20 +19055,20 @@ date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0
sixth
============================================================================="
dotest_fail admin-22-o10 "${testcvs} admin -o1.5: aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/aaa,v: can't remove locked revision 1\.6
-${PROG} [a-z]*: cannot modify RCS file for .aaa."
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove locked revision 1\.6
+${PROG} [a-z]*: RCS file for .aaa. not modified\."
dotest admin-22-o11 "${testcvs} admin -u aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
1\.6 unlocked
done"
dotest admin-22-o12 "${testcvs} admin -o1.5: aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
deleting revision 1\.6
deleting revision 1\.5
done"
dotest admin-22-o13 "${testcvs} log aaa" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
Working file: aaa
head: 1\.4
branch:
@@ -17124,18 +19101,18 @@ first
echo new branch rev >> aaa
dotest admin-22-o16 "${testcvs} ci -m new-branch aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.3\.2\.1; previous revision: 1\.3
done"
dotest_fail admin-22-o17 "${testcvs} admin -o1.2:1.4 aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
deleting revision 1\.4
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/aaa,v: can't remove branch point 1\.3
-${PROG} [a-z]*: cannot modify RCS file for .aaa."
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/aaa,v: can't remove branch point 1\.3
+${PROG} [a-z]*: RCS file for .aaa. not modified\."
dotest admin-22-o18 "${testcvs} update -p -r1.4 aaa" \
"===================================================================
Checking out aaa
-RCS: ${TESTDIR}/cvsroot/first-dir/aaa,v
+RCS: ${CVSROOT_DIRNAME}/first-dir/aaa,v
VERS: 1\.4
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
first rev
@@ -17145,29 +19122,29 @@ fourth rev"
echo second branch rev >> aaa
dotest admin-22-o19 "${testcvs} ci -m branch-two aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1
done"
echo third branch rev >> aaa
dotest admin-22-o20 "${testcvs} ci -m branch-three aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.3\.2\.3; previous revision: 1\.3\.2\.2
done"
echo fourth branch rev >> aaa
dotest admin-22-o21 "${testcvs} ci -m branch-four aaa" \
"Checking in aaa;
-${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
+${CVSROOT_DIRNAME}/first-dir/aaa,v <-- aaa
new revision: 1\.3\.2\.4; previous revision: 1\.3\.2\.3
done"
dotest admin-22-o22 "${testcvs} admin -o:1.3.2.3 aaa" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
deleting revision 1\.3\.2\.1
deleting revision 1\.3\.2\.2
deleting revision 1\.3\.2\.3
done"
dotest admin-22-o23 "${testcvs} log aaa" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/aaa,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/aaa,v
Working file: aaa
head: 1\.4
branch:
@@ -17215,7 +19192,7 @@ fourth branch rev"
# wonder whether the "cvs admin -o" should give a warning in
# this case.
dotest admin-23 "${testcvs} -q log file2" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
Working file: file2
head: 1\.2
branch:
@@ -17287,27 +19264,27 @@ add a line on the branch
# tagtwo should be a revision
#
dotest admin-26-1 "${testcvs} admin -ntagtwo:tagone file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# br1 should be a branch
#
dotest admin-26-2 "${testcvs} admin -nbr1:br file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# Attach some tags using RCS versions
#
dotest admin-26-3 "${testcvs} admin -ntagthree:1.1 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
dotest admin-26-4 "${testcvs} admin -nbr2:1.1.2 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
dotest admin-26-5 "${testcvs} admin -nbr4:1.1.0.2 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# Check results so far
@@ -17317,7 +19294,7 @@ done"
File: file2 Status: Up-to-date
Working revision: 1\.2.*
- Repository revision: 1\.2 ${TESTDIR}/cvsroot/first-dir/file2,v
+ Repository revision: 1\.2 ${CVSROOT_DIRNAME}/first-dir/file2,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
@@ -17337,68 +19314,74 @@ File: file2 Status: Up-to-date
echo "nuthr_line" >> file2
dotest admin-27-1 "${testcvs} commit -m nuthr_line file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.3; previous revision: 1\.2
done"
echo "yet_another" >> file2
dotest admin-27-2 "${testcvs} commit -m yet_another file2" \
"Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
new revision: 1\.4; previous revision: 1\.3
done"
# Fail trying to reattach existing tag with -n
#
dotest admin-27-3 "${testcvs} admin -ntagfour:1.1 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
dotest_fail admin-27-4 "${testcvs} admin -ntagfour:1.3 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
-${PROG} [a-z]*: ${TESTDIR}/cvsroot/first-dir/file2,v: symbolic name tagfour already bound to 1\.1
-${PROG} [a-z]*: cannot modify RCS file for .file2."
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: symbolic name tagfour already bound to 1\.1
+${PROG} [a-z]*: RCS file for .file2. not modified\."
# Succeed at reattaching existing tag, using -N
#
dotest admin-27-5 "${testcvs} admin -Ntagfour:1.3 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done"
# Fail on some bogus operations
# Try to attach to nonexistant tag
#
- dotest_fail admin-28-1 "${testcvs} admin -ntagsix:tagfive file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
-${PROG} \[[a-z]* aborted\]: tag .tagfive. does not exist"
+ dotest_fail admin-28-1 "${testcvs} admin -ntagsix:tagfive file2" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision tagfive is undefined\.
+${PROG} [a-z]*: RCS file for .file2. not modified\."
# Try a some nonexisting numeric target tags
#
dotest_fail admin-28-2 "${testcvs} admin -ntagseven:2.1 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
${PROG} \[[a-z]* aborted\]: revision .2\.1. does not exist"
dotest_fail admin-28-3 "${testcvs} admin -ntageight:2.1.2 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
${PROG} \[[a-z]* aborted\]: revision .2\.1\.2. does not exist"
# Try some invalid targets
#
dotest_fail admin-28-4 "${testcvs} admin -ntagnine:1.a.2 file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
${PROG} \[[a-z]* aborted\]: tag .1\.a\.2. must start with a letter"
- dotest_fail admin-28-5 "${testcvs} admin -ntagten:BO+GUS file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
-${PROG} \[[a-z]* aborted\]: tag .BO${PLUS}GUS. does not exist"
-
+ # Confirm that a missing tag is not a fatal error.
+ dotest admin-28-5.1 "${testcvs} -Q tag BO+GUS file1" ''
+ dotest_fail admin-28-5.2 "${testcvs} admin -ntagten:BO+GUS file2 file1" \
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
+${PROG} [a-z]*: ${CVSROOT_DIRNAME}/first-dir/file2,v: Symbolic name or revision BO${PLUS}GUS is undefined\.
+${PROG} [a-z]*: RCS file for .file2. not modified\.
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
+done"
+
dotest_fail admin-28-6 "${testcvs} admin -nq.werty:tagfour file2" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
${PROG} \[[a-z]* aborted\]: tag .q\.werty. must not contain the characters ..*"
# Verify the archive
#
- dotest admin-29 "cat ${TESTDIR}/cvsroot/first-dir/file2,v" \
+ dotest admin-29 "cat ${CVSROOT_DIRNAME}/first-dir/file2,v" \
"head 1\.4;
access
auth3
@@ -17487,26 +19470,26 @@ text
dotest reserved-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest reserved-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1
dotest reserved-3 "${testcvs} add file1" \
"${PROG} [a-z]*: scheduling file .file1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest reserved-4 "${testcvs} -q ci -m add" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done"
dotest reserved-5 "${testcvs} -q admin -l file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
1\.1 locked
done"
dotest reserved-6 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -17525,12 +19508,12 @@ add
# Note that this just tests the owner of the lock giving
# it up. It doesn't test breaking a lock.
dotest reserved-7 "${testcvs} -q admin -u file1" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
1\.1 unlocked
done"
dotest reserved-8 "${testcvs} log -N file1" "
-RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
Working file: file1
head: 1\.1
branch:
@@ -17562,7 +19545,7 @@ if test -z "\$line"; then
else
user=\`echo \$line | sed -e 's/locks \\(${author}\\):[0-9.]*;.*/\\1/'\`
version=\`echo \$line | sed -e 's/locks ${author}:\\([0-9.]*\\);.*/\\1/'\`
- echo "\$user has file a-lock locked for version \$version"
+ echo "\$user has file a-lock locked for version \$version" >&2
exit 1
fi
EOF
@@ -17573,10 +19556,10 @@ EOF
"${PROG} [a-z]*: scheduling file .a-lock. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
dotest reserved-10 "${testcvs} -q ci -m new a-lock" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a-lock,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v
done
Checking in a-lock;
-${TESTDIR}/cvsroot/first-dir/a-lock,v <-- a-lock
+${CVSROOT_DIRNAME}/first-dir/a-lock,v <-- a-lock
initial revision: 1\.1
done"
# FIXME: the contents of CVSROOT fluctuate a lot
@@ -17593,7 +19576,7 @@ done"
echo "DEFAULT ${TESTDIR}/lockme" >>commitinfo
dotest reserved-12 "${testcvs} -q ci -m rcslock commitinfo" \
"Checking in commitinfo;
-${TESTDIR}/cvsroot/CVSROOT/commitinfo,v <-- commitinfo
+${CVSROOT_DIRNAME}/CVSROOT/commitinfo,v <-- commitinfo
new revision: 1\.2; previous revision: 1\.1
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -17601,10 +19584,10 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
# Simulate (approximately) what a-lock would look like
# if someone else had locked revision 1.1.
- sed -e 's/locks; strict;/locks fred:1.1; strict;/' ${TESTDIR}/cvsroot/first-dir/a-lock,v > a-lock,v
- chmod 644 ${TESTDIR}/cvsroot/first-dir/a-lock,v
- dotest reserved-13 "mv a-lock,v ${TESTDIR}/cvsroot/first-dir/a-lock,v"
- chmod 444 ${TESTDIR}/cvsroot/first-dir/a-lock,v
+ sed -e 's/locks; strict;/locks fred:1.1; strict;/' ${CVSROOT_DIRNAME}/first-dir/a-lock,v > a-lock,v
+ chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
+ dotest reserved-13 "mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v"
+ chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
echo more stuff >> a-lock
dotest_fail reserved-13b "${testcvs} ci -m '' a-lock" \
"fred has file a-lock locked for version 1\.1
@@ -17613,31 +19596,31 @@ ${PROG} \[[a-z]* aborted\]: correct above errors first!"
# OK, now test "cvs admin -l" in the case where someone
# else has the file locked.
dotest_fail reserved-13c "${testcvs} admin -l a-lock" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a-lock,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v
${PROG} \[[a-z]* aborted\]: Revision 1\.1 is already locked by fred"
dotest reserved-14 "${testcvs} admin -u1.1 a-lock" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/a-lock,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/a-lock,v
1\.1 unlocked
done"
dotest reserved-15 "${testcvs} -q ci -m success a-lock" \
"Checking in a-lock;
-${TESTDIR}/cvsroot/first-dir/a-lock,v <-- a-lock
+${CVSROOT_DIRNAME}/first-dir/a-lock,v <-- a-lock
new revision: 1\.2; previous revision: 1\.1
done"
# Now test for a bug involving branches and locks
- sed -e 's/locks; strict;/locks fred:1.2; strict;/' ${TESTDIR}/cvsroot/first-dir/a-lock,v > a-lock,v
- chmod 644 ${TESTDIR}/cvsroot/first-dir/a-lock,v
+ sed -e 's/locks; strict;/locks fred:1.2; strict;/' ${CVSROOT_DIRNAME}/first-dir/a-lock,v > a-lock,v
+ chmod 644 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
dotest reserved-16 \
-"mv a-lock,v ${TESTDIR}/cvsroot/first-dir/a-lock,v" ""
- chmod 444 ${TESTDIR}/cvsroot/first-dir/a-lock,v
+"mv a-lock,v ${CVSROOT_DIRNAME}/first-dir/a-lock,v" ""
+ chmod 444 ${CVSROOT_DIRNAME}/first-dir/a-lock,v
dotest reserved-17 "${testcvs} -q tag -b br a-lock" "T a-lock"
dotest reserved-18 "${testcvs} -q update -r br a-lock" ""
echo edit it >>a-lock
dotest reserved-19 "${testcvs} -q ci -m modify a-lock" \
"Checking in a-lock;
-${TESTDIR}/cvsroot/first-dir/a-lock,v <-- a-lock
+${CVSROOT_DIRNAME}/first-dir/a-lock,v <-- a-lock
new revision: 1\.2\.2\.1; previous revision: 1\.2
done"
@@ -17646,7 +19629,7 @@ done"
echo '# vanilla commitinfo' >commitinfo
dotest reserved-cleanup-1 "${testcvs} -q ci -m back commitinfo" \
"Checking in commitinfo;
-${TESTDIR}/cvsroot/CVSROOT/commitinfo,v <-- commitinfo
+${CVSROOT_DIRNAME}/CVSROOT/commitinfo,v <-- commitinfo
new revision: 1\.3; previous revision: 1\.2
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -17691,149 +19674,152 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
mkdir diffmerge1
cd diffmerge1
- # The text of the file is inlined here because `echo' loses
- # newlines, and I don't know how portable the -e flag is.
- #
- # This is the file we both start out with:
- echo "// Button.java
-
-package random.application;
-
-import random.util.star;
-
-public class Button
-{
- /star Instantiates a Button with origin (0, 0) and zero width and height.
- star You must call an initializer method to properly initialize the Button.
- star/
- public Button ()
- {
- super ();
-
- _titleColor = Color.black;
- _disabledTitleColor = Color.gray;
- _titleFont = Font.defaultFont ();
- }
-
- /star Convenience constructor for instantiating a Button with
- star bounds x, y, width, and height. Equivalent to
- star foo = new Button ();
- star foo.init (x, y, width, height);
- star/
- public Button (int x, int y, int width, int height)
- {
- this ();
- init (x, y, width, height);
- }
-}" > the_file
+ # These are the files we both start out with:
+ mkdir import
+ cd import
+ diffmerge_create_older_files
dotest diffmerge1_import \
"${testcvs} import -m import diffmerge1 tag1 tag2" \
"${DOTSTAR}No conflicts created by this import"
cd ..
- rm -rf diffmerge1
- # Check out two working copies, one for "you" and one for "me"
- ${testcvs} checkout diffmerge1 >/dev/null 2>&1
- mv diffmerge1 diffmerge1_yours
+ # Check out two working copies, one for "you" and one for
+ # "me". If no branch is used and cvs detects that only one
+ # of the two people made changes, then cvs does not run the
+ # merge algorithm. But if a branch is used, then cvs does run
+ # the merge algorithm (even in this case of only one of the two
+ # people having made changes). CVS used to have a bug in this
+ # case. Therefore, it is important to test this case by
+ # using a branch:
+ ${testcvs} rtag -b tag diffmerge1 >/dev/null 2>&1
+ ${testcvs} checkout -r tag diffmerge1 >/dev/null 2>&1
+ mv diffmerge1 yours
${testcvs} checkout diffmerge1 >/dev/null 2>&1
- mv diffmerge1 diffmerge1_mine
-
- # In your working copy, you'll remove the Button() method, and
- # then check in your change before I check in mine:
- cd diffmerge1_yours
- echo "// Button.java
-
-package random.application;
-
-import random.util.star;
-
-public class Button
-{
- /star Instantiates a Button with origin (0, 0) and zero width and height.
- star You must call an initializer method to properly initialize the Button.
- star/
- public Button ()
- {
- super ();
-
- _titleColor = Color.black;
- _disabledTitleColor = Color.gray;
- _titleFont = Font.defaultFont ();
- }
-}" > the_file
- dotest diffmerge1_yours \
- "${testcvs} ci -m yours" \
- "${DOTSTAR}hecking in ${DOTSTAR}"
+ mv diffmerge1 mine
+
+ # In your working copy, you'll make changes, and
+ # then check in your changes before I check in mine:
+ cd yours
+ diffmerge_create_your_files
+ dotest diffmerge1_yours "${testcvs} -q ci -m yours" \
+"Checking in testcase01;
+${CVSROOT_DIRNAME}/diffmerge1/testcase01,v <-- testcase01
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase02;
+${CVSROOT_DIRNAME}/diffmerge1/testcase02,v <-- testcase02
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase03;
+${CVSROOT_DIRNAME}/diffmerge1/testcase03,v <-- testcase03
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase04;
+${CVSROOT_DIRNAME}/diffmerge1/testcase04,v <-- testcase04
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase05;
+${CVSROOT_DIRNAME}/diffmerge1/testcase05,v <-- testcase05
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase06;
+${CVSROOT_DIRNAME}/diffmerge1/testcase06,v <-- testcase06
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase07;
+${CVSROOT_DIRNAME}/diffmerge1/testcase07,v <-- testcase07
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase08;
+${CVSROOT_DIRNAME}/diffmerge1/testcase08,v <-- testcase08
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase09;
+${CVSROOT_DIRNAME}/diffmerge1/testcase09,v <-- testcase09
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done
+Checking in testcase10;
+${CVSROOT_DIRNAME}/diffmerge1/testcase10,v <-- testcase10
+new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1
+done"
- # My working copy still has the Button() method, but I
- # comment out some code at the top of the class. Then I
+ # Change my copy. Then I
# update, after both my modifications and your checkin:
- cd ../diffmerge1_mine
- echo "// Button.java
-
-package random.application;
-
-import random.util.star;
-
-public class Button
-{
- /star Instantiates a Button with origin (0, 0) and zero width and height.
- star You must call an initializer method to properly initialize the Button.
- star/
- public Button ()
- {
- super ();
-
- // _titleColor = Color.black;
- // _disabledTitleColor = Color.gray;
- // _titleFont = Font.defaultFont ();
- }
-
- /star Convenience constructor for instantiating a Button with
- star bounds x, y, width, and height. Equivalent to
- star foo = new Button ();
- star foo.init (x, y, width, height);
- star/
- public Button (int x, int y, int width, int height)
- {
- this ();
- init (x, y, width, height);
- }
-}" > the_file
- dotest diffmerge1_mine \
- "${testcvs} update" \
- "${DOTSTAR}erging${DOTSTAR}"
+ cd ../mine
+ diffmerge_create_my_files
+ dotest diffmerge1_mine "${testcvs} -q update -j tag" \
+"M testcase01
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase01,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase01
+M testcase02
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase02,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase02
+M testcase03
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase03,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase03
+M testcase04
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase04,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase04
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase05,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase05
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase06,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase06
+M testcase07
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase07,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase07
+M testcase08
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase08,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase08
+M testcase09
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase09,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase09
+M testcase10
+RCS file: ${CVSROOT_DIRNAME}/diffmerge1/testcase10,v
+retrieving revision 1\.1\.1\.1
+retrieving revision 1\.1\.1\.1\.2\.1
+Merging differences between 1\.1\.1\.1 and 1\.1\.1\.1\.2\.1 into testcase10"
# So if your changes didn't make it into my working copy, or
- # in any case if the file does not look like the final text as
- # quoted below, then the test flunks:
- echo "// Button.java
-
-package random.application;
-
-import random.util.star;
-
-public class Button
-{
- /star Instantiates a Button with origin (0, 0) and zero width and height.
- star You must call an initializer method to properly initialize the Button.
- star/
- public Button ()
- {
- super ();
+ # in any case if the files do not look like the final text
+ # in the files in directory comp_me, then the test flunks:
+ cd ..
+ mkdir comp_me
+ cd comp_me
+ diffmerge_create_expected_files
+ cd ..
+ rm mine/.#*
- // _titleColor = Color.black;
- // _disabledTitleColor = Color.gray;
- // _titleFont = Font.defaultFont ();
- }
-}" > comp_me
- dotest diffmerge1_cmp "cmp the_file comp_me" ''
+ # If you have GNU's version of diff, you may try
+ # uncommenting the following line which will give more
+ # fine-grained information about how cvs differed from the
+ # correct result:
+ #dotest diffmerge1_cmp "diff -u --recursive --exclude=CVS comp_me mine" ''
+ dotest diffmerge1_cmp "directory_cmp comp_me mine"
# Clean up after ourselves:
cd ..
- rm -rf diffmerge1_yours diffmerge1_mine ${CVSROOT_DIRNAME}/diffmerge1
-
+ if $keep; then :; else
+ rm -rf diffmerge1 ${CVSROOT_DIRNAME}/diffmerge1
+ fi
;;
diffmerge2)
@@ -18537,18 +20523,18 @@ d472 12
dotest release-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest release-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
mkdir dir1
dotest release-3 "${testcvs} add dir1" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir1 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
mkdir dir2
dotest release-4 "${testcvs} add dir2" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir2 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2 added to the repository"
cd dir2
mkdir dir3
dotest release-5 "${testcvs} add dir3" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir2/dir3 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository"
cd ../..
dotest release-6 "${testcvs} release -d first-dir/dir2/dir3 first-dir/dir1" \
@@ -18569,11 +20555,11 @@ ${PROG} [a-z]*: Updating first-dir/dir2"
cd first-dir
mkdir dir1
dotest release-10 "${testcvs} add dir1" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir1 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir1 added to the repository"
cd dir2
mkdir dir3
dotest release-11 "${testcvs} add dir3" \
-"Directory ${TESTDIR}/cvsroot/first-dir/dir2/dir3 added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir/dir2/dir3 added to the repository"
cd ../..
dotest release-12 "${testcvs} release first-dir/dir2/dir3 first-dir/dir1" \
@@ -18613,7 +20599,7 @@ ${PROG} [a-z]*: Updating first-dir"
CVSROOT2_DIRNAME=${TESTDIR}/root2
CVSROOT1=${CVSROOT1_DIRNAME} ; export CVSROOT1
CVSROOT2=${CVSROOT2_DIRNAME} ; export CVSROOT2
- if test "x$remote" = xyes; then
+ if $remote; then
CVSROOT1=:fork:${CVSROOT1_DIRNAME} ; export CVSROOT1
CVSROOT2=:fork:${CVSROOT2_DIRNAME} ; export CVSROOT2
fi
@@ -18808,7 +20794,11 @@ ${PROG} [a-z]*: cannot open directory ${TESTDIR}/root2/mod1-2: No such file or d
${PROG} [a-z]*: skipping directory mod2-2/mod1-2"
else
# non-RELATIVE_REPOS.
- if test "$remote" = no; then
+ 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
@@ -18823,14 +20813,13 @@ ${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"
- else
- # Hmm, this one is specific to non-RELATIVE_REPOS too I think.
- dotest_fail multiroot-update-1a "${testcvs1} update" \
-"protocol error: directory '${TESTDIR}/root2/mod2-2' not within root '${TESTDIR}/root1'"
- fi # non-remote
+ fi # remote
# Same deal but with -d ${CVSROOT2}.
- if test "$remote" = no; then
+ 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
@@ -18839,10 +20828,7 @@ ${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"
- else
- dotest_fail multiroot-update-1b "${testcvs2} update" \
-"protocol error: directory '${TESTDIR}/root1' not within root '${TESTDIR}/root2'"
- fi # non-remote
+ fi # remote
fi # non-RELATIVE_REPOS
# modify all files and do a diff
@@ -19005,31 +20991,31 @@ ${PROG} [a-z]*: Tagging mod2-2"
echo anotherfile1-2 > mod2-2/mod1-2/anotherfile1-2
echo anotherfile2-2 > mod1-2/mod2-2/anotherfile2-2
- if test "x$remote" = xno; then
- dotest multiroot-add-1 "${testcvs} add mod1-1/anotherfile1-1 mod2-1/anotherfile2-1 mod2-2/mod1-2/anotherfile1-2 mod1-2/mod2-2/anotherfile2-2" \
-"${PROG} [a-z]*: scheduling file .mod1-1/anotherfile1-1. for addition
-${PROG} [a-z]*: scheduling file .mod2-1/anotherfile2-1. for addition
-${PROG} [a-z]*: scheduling file .mod2-2/mod1-2/anotherfile1-2. for addition
-${PROG} [a-z]*: scheduling file .mod1-2/mod2-2/anotherfile2-2. for addition
-${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
- else
+ if $remote; then
cd mod1-1
- dotest multiroot-add-1a "${testcvs} add anotherfile1-1" \
+ dotest multiroot-add-1ar "${testcvs} add anotherfile1-1" \
"${PROG} [a-z]*: scheduling file .anotherfile1-1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cd ../mod2-1
- dotest multiroot-add-1b "${testcvs} add anotherfile2-1" \
+ dotest multiroot-add-1br "${testcvs} add anotherfile2-1" \
"${PROG} [a-z]*: scheduling file .anotherfile2-1. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cd ../mod2-2/mod1-2
- dotest multiroot-add-1c "${testcvs} add anotherfile1-2" \
+ dotest multiroot-add-1cr "${testcvs} add anotherfile1-2" \
"${PROG} [a-z]*: scheduling file .anotherfile1-2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cd ../../mod1-2/mod2-2
- dotest multiroot-add-1d "${testcvs} add anotherfile2-2" \
+ dotest multiroot-add-1dr "${testcvs} add anotherfile2-2" \
"${PROG} [a-z]*: scheduling file .anotherfile2-2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
cd ../..
+ else
+ dotest multiroot-add-1 "${testcvs} add mod1-1/anotherfile1-1 mod2-1/anotherfile2-1 mod2-2/mod1-2/anotherfile1-2 mod1-2/mod2-2/anotherfile2-2" \
+"${PROG} [a-z]*: scheduling file .mod1-1/anotherfile1-1. for addition
+${PROG} [a-z]*: scheduling file .mod2-1/anotherfile2-1. for addition
+${PROG} [a-z]*: scheduling file .mod2-2/mod1-2/anotherfile1-2. for addition
+${PROG} [a-z]*: scheduling file .mod1-2/mod2-2/anotherfile2-2. for addition
+${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
fi
dotest multiroot-status-1 "${testcvs} status -v" \
@@ -19786,7 +21772,7 @@ anyone
# refer to parts of our checked-out tree (e.g. "cvs update
# mod1-1 mod2-2")
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -19806,7 +21792,7 @@ anyone
CVSROOT2_DIRNAME=${TESTDIR}/root2
CVSROOT1=${CVSROOT1_DIRNAME} ; export CVSROOT1
CVSROOT2=${CVSROOT2_DIRNAME} ; export CVSROOT2
- if test "x$remote" = xyes; then
+ if $remote; then
CVSROOT1=:fork:${CVSROOT1_DIRNAME} ; export CVSROOT1
CVSROOT2=:fork:${CVSROOT2_DIRNAME} ; export CVSROOT2
fi
@@ -19869,12 +21855,12 @@ ${PROG} server: Updating dir1/sdir/ssdir"
# also prints some trace messages, and (2) the server trace
# messages are subject to out-of-order bugs (this one is hard
# to work around).
- if test "$remote" = no; then
+ if $remote; then :; else
dotest multiroot2-9 "${testcvs} -t update" \
-"${PROG} update: notice: main loop with CVSROOT=${TESTDIR}/root1
+" -> main loop with CVSROOT=${TESTDIR}/root1
${PROG} update: Updating \.
${PROG} update: Updating dir1
-${PROG} update: notice: main loop with CVSROOT=${TESTDIR}/root2
+ -> main loop with CVSROOT=${TESTDIR}/root2
${PROG} update: Updating dir1/sdir
${PROG} update: Updating dir1/sdir/ssdir"
fi
@@ -19906,8 +21892,8 @@ RCS file: ${TESTDIR}/root1/dir1/file1,v
retrieving revision 1\.1\.1\.1
retrieving revision 1\.2
diff -u -r1\.1\.1\.1 -r1\.2
---- dir1/file1 [0-9/]* [0-9:]* 1\.1\.1\.1
-${PLUS}${PLUS}${PLUS} dir1/file1 [0-9/]* [0-9:]* 1\.2
+--- dir1/file1 ${RFCDATE} 1\.1\.1\.1
+${PLUS}${PLUS}${PLUS} dir1/file1 ${RFCDATE} 1\.2
@@ -1 ${PLUS}1,2 @@
file1
${PLUS}change it
@@ -19917,13 +21903,13 @@ RCS file: ${TESTDIR}/root2/sdir/sfile,v
retrieving revision 1\.1\.1\.1
retrieving revision 1\.2
diff -u -r1\.1\.1\.1 -r1\.2
---- dir1/sdir/sfile [0-9/]* [0-9:]* 1\.1\.1\.1
-${PLUS}${PLUS}${PLUS} dir1/sdir/sfile [0-9/]* [0-9:]* 1\.2
+--- dir1/sdir/sfile ${RFCDATE} 1\.1\.1\.1
+${PLUS}${PLUS}${PLUS} dir1/sdir/sfile ${RFCDATE} 1\.2
@@ -1 ${PLUS}1,2 @@
sfile
${PLUS}change him too"
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -19941,7 +21927,7 @@ ${PLUS}change him too"
# Not drastically different from multiroot but it covers somewhat
# different stuff.
- if test "x$remote" = xyes; then
+ if $remote; then
CVSROOT1=:fork:${TESTDIR}/root1 ; export CVSROOT1
CVSROOT2=:fork:${TESTDIR}/root2 ; export CVSROOT2
else
@@ -19964,7 +21950,7 @@ ${PLUS}change him too"
# I suppose because of the "rm -r".
# For local this fixes it up.
dotest multiroot3-6 "${testcvs} -d ${CVSROOT1} -q co dir1" ""
- if test "$remote" = yes; then
+ if $remote; then
# For remote that doesn't do it. Use the quick and dirty fix.
echo "D/dir1////" >CVS/Entries
echo "D/dir2////" >>CVS/Entries
@@ -19974,7 +21960,7 @@ ${PLUS}change him too"
"Directory ${TESTDIR}/root2/dir2 added to the repository"
touch dir1/file1 dir2/file2
- if test "$remote" = yes; then
+ if $remote; then
# Trying to add them both in one command doesn't work,
# because add.c doesn't do multiroot (it doesn't use recurse.c).
# Furthermore, it can't deal with the parent directory
@@ -20019,7 +22005,7 @@ ${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 test "$remote" = yes; then
+ if $remote; then
# This is good behavior - we are asking CVS to do something
# which doesn't make sense.
dotest_fail multiroot3-10 \
@@ -20067,7 +22053,7 @@ ${PROG} \[[a-z]* aborted\]: illegal source repository"
cd ../..
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -20082,7 +22068,7 @@ ${PROG} \[[a-z]* aborted\]: illegal source repository"
# More multiroot tests, in particular we have two roots with
# similarly-named directories and we try to see that CVS can
# keep them separate.
- if test "x$remote" = xyes; then
+ if $remote; then
CVSROOT1=:fork:${TESTDIR}/root1 ; export CVSROOT1
CVSROOT2=:fork:${TESTDIR}/root2 ; export CVSROOT2
else
@@ -20163,7 +22149,7 @@ done"
dotest rmroot-setup-1 "${testcvs} -q co -l ." ''
mkdir first-dir
dotest rmroot-setup-2 "${testcvs} add first-dir" \
-"Directory ${TESTDIR}/cvsroot/first-dir added to the repository"
+"Directory ${CVSROOT_DIRNAME}/first-dir added to the repository"
cd first-dir
touch file1 file2
dotest rmroot-setup-3 "${testcvs} add file1 file2" \
@@ -20171,16 +22157,16 @@ done"
${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
dotest rmroot-setup-4 "${testcvs} -q commit -minit" \
-"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
+"RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
done
Checking in file1;
-${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
+${CVSROOT_DIRNAME}/first-dir/file1,v <-- file1
initial revision: 1\.1
done
-RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
-${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
+${CVSROOT_DIRNAME}/first-dir/file2,v <-- file2
initial revision: 1\.1
done"
rm CVS/Root
@@ -20195,7 +22181,7 @@ done"
# Similar to crerepos but that test is probably getting big
# enough.
- if test "x$remote" = xyes; then
+ if $remote; then
CVSROOT1=:fork:${TESTDIR}/root1 ; export CVSROOT1
CVSROOT_MOVED=:fork:${TESTDIR}/root-moved ; export CVSROOT1
else
@@ -20226,19 +22212,26 @@ No conflicts created by this import"
# There were some duplicated warnings and such; only test
# for the part of the error message which makes sense.
# Bug: "skipping directory " without filename.
- if test "$remote" = no; then
+ if $remote; then
+ dotest_fail reposmv-2r "${testcvs} update" \
+"Cannot access ${TESTDIR}/root1/CVSROOT
+No such file or directory"
+ else
dotest reposmv-2 "${testcvs} update" "${DOTSTAR}
${PROG} update: ignoring CVS/Root because it specifies a non-existent repository ${TESTDIR}/root1
-${PROG} update: cannot open directory ${TESTDIR}/cvsroot/dir1: No such file or directory
+${PROG} update: cannot open directory ${CVSROOT_DIRNAME}/dir1: No such file or directory
${PROG} update: skipping directory "
- else
- dotest_fail reposmv-2 "${testcvs} update" \
-"Cannot access ${TESTDIR}/root1/CVSROOT
-No such file or directory"
fi
# CVS/Root overrides $CVSROOT
- if test "$remote" = no; then
+ if $remote; then
+ CVSROOT_SAVED=${CVSROOT}
+ CVSROOT=:fork:${TESTDIR}/root-moved; export CVSROOT
+ dotest_fail reposmv-3r "${testcvs} update" \
+"Cannot access ${TESTDIR}/root1/CVSROOT
+No such file or directory"
+ CVSROOT=${CVSROOT_SAVED}; export CVSROOT
+ else
CVSROOT_SAVED=${CVSROOT}
CVSROOT=${TESTDIR}/root-moved; export CVSROOT
dotest reposmv-3 "${testcvs} update" \
@@ -20247,16 +22240,16 @@ ${PROG} update: ignoring CVS/Root because it specifies a non-existent repository
${PROG} update: Updating \.
${DOTSTAR}"
CVSROOT=${CVSROOT_SAVED}; export CVSROOT
- else
+ fi
+
+ if $remote; then
CVSROOT_SAVED=${CVSROOT}
- CVSROOT=:fork:${TESTDIR}/root-moved; export CVSROOT
- dotest_fail reposmv-3 "${testcvs} update" \
+ CVSROOT=:fork:${TESTDIR}/root-none; export CVSROOT
+ dotest_fail reposmv-4 "${testcvs} update" \
"Cannot access ${TESTDIR}/root1/CVSROOT
No such file or directory"
CVSROOT=${CVSROOT_SAVED}; export CVSROOT
- fi
-
- if test "$remote" = no; then
+ else
# CVS/Root doesn't seem to quite completely override $CVSROOT
# Bug? Not necessarily a big deal if it only affects error
# messages.
@@ -20267,13 +22260,6 @@ No such file or directory"
${PROG} update: ignoring CVS/Root because it specifies a non-existent repository ${TESTDIR}/root1
${PROG} \[update aborted\]: ${TESTDIR}/root-none/CVSROOT: No such file or directory"
CVSROOT=${CVSROOT_SAVED}; export CVSROOT
- else
- CVSROOT_SAVED=${CVSROOT}
- CVSROOT=:fork:${TESTDIR}/root-none; export CVSROOT
- dotest_fail reposmv-4 "${testcvs} update" \
-"Cannot access ${TESTDIR}/root1/CVSROOT
-No such file or directory"
- CVSROOT=${CVSROOT_SAVED}; export CVSROOT
fi
# -d overrides CVS/Root
@@ -20297,7 +22283,7 @@ No such file or directory"
pserver)
# Test basic pserver functionality.
- if test "$remote" = yes; then
+ if $remote; then
# First set SystemAuth=no. Not really necessary, I don't
# think, but somehow it seems like the clean thing for
# the testsuite.
@@ -20307,7 +22293,7 @@ No such file or directory"
echo "SystemAuth=no" >config
dotest pserver-2 "${testcvs} -q ci -m config-it" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -20437,7 +22423,7 @@ EOF
echo "# comments only" >config
dotest pserver-cleanup-1 "${testcvs} -q ci -m config-it" \
"Checking in config;
-${TESTDIR}/cvsroot/CVSROOT/config,v <-- config
+${CVSROOT_DIRNAME}/CVSROOT/config,v <-- config
new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
done
${PROG} [a-z]*: Rebuilding administrative file database"
@@ -20449,7 +22435,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database"
server)
# Some tests of the server (independent of the client).
- if test "$remote" = yes; then
+ if $remote; then
dotest server-1 "${testcvs} server" \
"E Protocol error: Root request missing
error " <<EOF
@@ -20618,7 +22604,7 @@ ${TESTDIR}/crerepos/dir1
editors
EOF
- if test "$keep" = yes; then
+ if $keep; then
echo Keeping ${TESTDIR} and exiting due to --keep
exit 0
fi
@@ -20631,29 +22617,29 @@ EOF
server2)
# More server tests, in particular testing that various
# possible security holes are plugged.
- if test "$remote" = yes; then
+ if $remote; then
dotest server2-1 "${testcvs} server" \
-"E protocol error: directory '${TESTDIR}/cvsroot/\.\./dir1' not within root '${TESTDIR}/cvsroot'
+"E protocol error: directory '${CVSROOT_DIRNAME}/\.\./dir1' not within root '${TESTDIR}/cvsroot'
error " <<EOF
-Root ${TESTDIR}/cvsroot
+Root ${CVSROOT_DIRNAME}
Directory .
-${TESTDIR}/cvsroot/../dir1
+${CVSROOT_DIRNAME}/../dir1
noop
EOF
dotest server2-2 "${testcvs} server" \
-"E protocol error: directory '${TESTDIR}/cvsrootdir1' not within root '${TESTDIR}/cvsroot'
+"E protocol error: directory '${CVSROOT_DIRNAME}dir1' not within root '${TESTDIR}/cvsroot'
error " <<EOF
-Root ${TESTDIR}/cvsroot
+Root ${CVSROOT_DIRNAME}
Directory .
-${TESTDIR}/cvsrootdir1
+${CVSROOT_DIRNAME}dir1
noop
EOF
dotest 2-3 "${testcvs} server" \
-"E protocol error: directory '${TESTDIR}' not within root '${TESTDIR}/cvsroot'
+"E protocol error: directory '${TESTDIR}' not within root '${CVSROOT_DIRNAME}'
error " <<EOF
-Root ${TESTDIR}/cvsroot
+Root ${CVSROOT_DIRNAME}
Directory .
${TESTDIR}
noop
@@ -20666,9 +22652,9 @@ EOF
dotest server2-4 "${testcvs} server" \
"E protocol error: directory 'foo/bar' not within current directory
error " <<EOF
-Root ${TESTDIR}/cvsroot
+Root ${CVSROOT_DIRNAME}
Directory .
-${TESTDIR}/cvsroot
+${CVSROOT_DIRNAME}
Unchanged foo/bar
noop
EOF
@@ -20677,7 +22663,7 @@ EOF
client)
# Some tests of the client (independent of the server).
- if test "$remote" = yes; then
+ if $remote; then
cat >${TESTDIR}/serveme <<EOF
#!${TESTSHELL}
# This is admittedly a bit cheezy, in the sense that we make lots
@@ -20689,7 +22675,7 @@ echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modifie
echo "ok"
echo "M special message"
echo "Created first-dir/"
-echo "${TESTDIR}/cvsroot/first-dir/file1"
+echo "${CVSROOT_DIRNAME}/first-dir/file1"
echo "/file1/1.1///"
echo "u=rw,g=rw,o=rw"
echo "4"
@@ -20710,10 +22696,10 @@ echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modifie
echo "ok"
echo "M merge-it"
echo "Copy-file ./"
-echo "${TESTDIR}/cvsroot/first-dir/file1"
+echo "${CVSROOT_DIRNAME}/first-dir/file1"
echo "${TESTDIR}/bogus/.#file1.1.1"
echo "Merged ./"
-echo "${TESTDIR}/cvsroot/first-dir/file1"
+echo "${CVSROOT_DIRNAME}/first-dir/file1"
echo "/file1/1.2///"
echo "u=rw,g=rw,o=rw"
echo "4"
@@ -20733,10 +22719,10 @@ echo "Valid-requests Root Valid-responses valid-requests Directory Entry Modifie
echo "ok"
echo "M merge-it"
echo "Copy-file ./"
-echo "${TESTDIR}/cvsroot/first-dir/file1"
+echo "${CVSROOT_DIRNAME}/first-dir/file1"
echo ".#file1.1.1"
echo "Merged ./"
-echo "${TESTDIR}/cvsroot/first-dir/file1"
+echo "${CVSROOT_DIRNAME}/first-dir/file1"
echo "/file1/1.2///"
echo "u=rw,g=rw,o=rw"
echo "4"
@@ -20763,13 +22749,13 @@ EOF
# know exactly how that will translate to GMT.
dotest client-8 "${testcvs} update -D 99-10-04" "OK, whatever"
dotest client-9 "cat ${TESTDIR}/client.tmp" \
-"Root ${TESTDIR}/cvsroot
+"Root ${CVSROOT_DIRNAME}
Valid-responses [-a-zA-Z ]*
valid-requests
Argument -D
Argument [34] Oct 1999 [0-9][0-9]:00:00 -0000
Directory \.
-${TESTDIR}/cvsroot/first-dir
+${CVSROOT_DIRNAME}/first-dir
Entry /file1/1\.2///
Modified file1
u=rw,g=,o=
@@ -20785,16 +22771,51 @@ update"
fi # skip the whole thing for local
;;
+ fork)
+ # Test that the server defaults to the correct executable in :fork:
+ # mode. See the note in the TODO at the end of this file about this.
+ #
+ # This test and client should be left after all other references to
+ # CVS_SERVER are removed from this script.
+ #
+ # The client series of tests already tests that CVS_SERVER is
+ # working, but that test might be better here.
+ if $remote; then
+ mkdir fork; cd fork
+ unset CVS_SERVER
+ # So looking through $PATH for cvs won't work...
+ echo "echo junk" >cvs
+ chmod a+x cvs
+ save_PATH=$PATH; PATH=.:$PATH
+ dotest fork-1 "$testcvs -d:fork:$CVSROOT_DIRNAME version" \
+'Client: \(.*\)
+Server: \1'
+ CVS_SERVER=${testcvs}; export CVS_SERVER
+ PATH=$save_PATH; unset save_PATH
+ cd ..
+ if $keep; then :; else
+ rm -rf fork
+ fi
+ fi
+ ;;
+
*)
echo $what is not the name of a test -- ignored
;;
esac
done
+# Sanity check sanity.sh. :)
+#
+# Test our exit directory so that tests that exit in an incorrect directory are
+# noticed during single test runs.
+if test "x$TESTDIR" != "x`pwd`"; then
+ fail "cleanup: PWD != TESTDIR (\``pwd`' != \`$TESTDIR')"
+fi
+
echo "OK, all tests completed."
# TODO:
-# * use "test" not "[" and see if all test's support `-z'
# * Test `cvs update -d foo' (where foo does not exist).
# * Test `cvs update foo bar' (where foo and bar are both from the
# same directory in the repository). Suppose one is a branch--make
@@ -20829,10 +22850,24 @@ echo "OK, all tests completed."
# this needs to be documented in cvs.texinfo, but is not)
# - Test that unrecognized files in CVS directories (e.g. CVS/Foobar)
# are ignored (per cvs.texinfo).
+# - Test 'cvs history' with symlinks in the path to the working directory.
+# - Remove most of the CVS_SERVER stuff after a reasonable amount of time.
+# The "fork" & "client" series of tests should be left. 4/2/00, CVS
+# 1.11.0.1 was altered so that it would default to program_name (set from
+# argv[0]) rather than "cvs", but I'd like this script to work on legacy
+# versions of CVS for awhile.
+# - Testsuite doesn't work with usernames over eight characters in length.
+# Fix it.
# End of TODO list.
+# Exit if keep set
+if $keep; then
+ echo "Keeping ${TESTDIR} and exiting due to -k (keep) option."
+ exit 0
+fi
+
# Remove the test directory, but first change out of it.
-cd /tmp
+cd `dirname ${TESTDIR}`
rm -rf ${TESTDIR}
# end of sanity.sh
diff --git a/contrib/cvs/src/server.c b/contrib/cvs/src/server.c
index e1af5e46b8df..bb38f4d41d06 100644
--- a/contrib/cvs/src/server.c
+++ b/contrib/cvs/src/server.c
@@ -16,50 +16,19 @@
#include "getline.h"
#include "buffer.h"
-#ifdef SERVER_SUPPORT
-
-#ifdef HAVE_WINSOCK_H
-#include <winsock.h>
-#endif
-
-#if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_KERBEROS) || defined (HAVE_GSSAPI)
-#include <sys/socket.h>
-#endif
-
-#ifdef HAVE_KERBEROS
-# include <netinet/in.h>
-# include <krb.h>
-# ifndef HAVE_KRB_GET_ERR_TEXT
-# define krb_get_err_text(status) krb_err_txt[status]
-# endif
-
-/* Information we need if we are going to use Kerberos encryption. */
-static C_Block kblock;
-static Key_schedule sched;
-
-#endif
-
-#ifdef HAVE_GSSAPI
-
-#include <netdb.h>
-
-#ifdef HAVE_GSSAPI_H
-#include <gssapi.h>
-#endif
-#ifdef HAVE_GSSAPI_GSSAPI_H
-#include <gssapi/gssapi.h>
-#endif
-#ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H
-#include <gssapi/gssapi_generic.h>
-#endif
-
-#ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
-#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
-#endif
-
+#if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT)
+# ifdef HAVE_GSSAPI
+/* This stuff isn't included solely with SERVER_SUPPORT since some of these
+ * functions (encryption & the like) get compiled with or without server
+ * support.
+ *
+ * FIXME - They should be in a different file.
+ */
+# include <netdb.h>
+# include "xgssapi.h"
/* We use Kerberos 5 routines to map the GSSAPI credential to a user
name. */
-#include <krb5.h>
+# include <krb5.h>
/* We need this to wrap data. */
static gss_ctx_id_t gcontext;
@@ -69,37 +38,46 @@ static void gserver_authenticate_connection PROTO((void));
/* Whether we are already wrapping GSSAPI communication. */
static int cvs_gssapi_wrapping;
-# ifdef ENCRYPTION
+# ifdef ENCRYPTION
/* Whether to encrypt GSSAPI communication. We use a global variable
like this because we use the same buffer type (gssapi_wrap) to
handle both authentication and encryption, and we don't want
multiple instances of that buffer in the communication stream. */
int cvs_gssapi_encrypt;
-# endif
+# endif
+# endif /* HAVE_GSSAPI */
+#endif /* defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT) */
+#ifdef SERVER_SUPPORT
+
+#ifdef HAVE_WINSOCK_H
+#include <winsock.h>
#endif
-/* for select */
-#include <sys/types.h>
-#ifdef HAVE_SYS_BSDTYPES_H
-#include <sys/bsdtypes.h>
+#if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_KERBEROS) || defined (HAVE_GSSAPI)
+#include <sys/socket.h>
#endif
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
+#ifdef HAVE_SYSLOG_H
+#include <syslog.h>
#endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
+#ifdef HAVE_KERBEROS
+# include <netinet/in.h>
+# include <krb.h>
+# ifndef HAVE_KRB_GET_ERR_TEXT
+# define krb_get_err_text(status) krb_err_txt[status]
+# endif
+
+/* Information we need if we are going to use Kerberos encryption. */
+static C_Block kblock;
+static Key_schedule sched;
+
#endif
+/* for select */
+#include "xselect.h"
+
#ifndef O_NONBLOCK
#define O_NONBLOCK O_NDELAY
#endif
@@ -112,18 +90,16 @@ int cvs_gssapi_encrypt;
#define blocking_error(err) ((err) == EAGAIN)
#endif
-#ifdef AUTH_SERVER_SUPPORT
-#ifdef HAVE_GETSPNAM
-#include <shadow.h>
-#endif
-#endif /* AUTH_SERVER_SUPPORT */
-
/* For initgroups(). */
#if HAVE_INITGROUPS
#include <grp.h>
#endif /* HAVE_INITGROUPS */
-
-#ifdef AUTH_SERVER_SUPPORT
+
+# ifdef AUTH_SERVER_SUPPORT
+
+# ifdef HAVE_GETSPNAM
+# include <shadow.h>
+# endif
/* The cvs username sent by the client, which might or might not be
the same as the system username the server eventually switches to
@@ -139,7 +115,7 @@ static char *Pserver_Repos = NULL;
CVSROOT/config. */
int system_auth = 1;
-#endif /* AUTH_SERVER_SUPPORT */
+# endif /* AUTH_SERVER_SUPPORT */
/* While processing requests, this buffer accumulates data to be sent to
@@ -420,10 +396,10 @@ create_adm_p (base_dir, dir)
differently. */
char *empty;
- empty = malloc (strlen (CVSroot_directory)
+ empty = malloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
+ sizeof (CVSNULLREPOS)
- + 10);
+ + 3);
if (! empty)
{
retval = ENOMEM;
@@ -431,7 +407,7 @@ create_adm_p (base_dir, dir)
}
/* Create the directory name. */
- (void) sprintf (empty, "%s/%s/%s", CVSroot_directory,
+ (void) sprintf (empty, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSNULLREPOS);
/* Create the directory if it doesn't exist. */
@@ -597,10 +573,16 @@ print_error (status)
int status;
{
char *msg;
+ char tmpstr[80];
+
buf_output0 (buf_to_net, "error ");
msg = strerror (status);
- if (msg)
- buf_output0 (buf_to_net, msg);
+ if (msg == NULL)
+ {
+ sprintf (tmpstr, "unknown error %d", status);
+ msg = tmpstr;
+ }
+ buf_output0 (buf_to_net, msg);
buf_append_char (buf_to_net, '\n');
buf_flush (buf_to_net, 0);
@@ -767,7 +749,7 @@ serve_root (arg)
new connection. Doing this would cause interoperability
headaches, so it should be a different request, if there is
any reason why such a feature is needed. */
- if (CVSroot_directory != NULL)
+ if (current_parsed_root != NULL)
{
if (alloc_pending (80 + strlen (arg)))
sprintf (pending_error_text,
@@ -790,21 +772,24 @@ E Protocol error: Root says \"%s\" but pserver says \"%s\"",
}
}
#endif
- set_local_cvsroot (arg);
+
+ if (current_parsed_root != NULL)
+ free_cvsroot_t (current_parsed_root);
+ current_parsed_root = local_cvsroot (arg);
/* For pserver, this will already have happened, and the call will do
nothing. But for rsh, we need to do it now. */
- parse_config (CVSroot_directory);
+ parse_config (current_parsed_root->directory);
- path = malloc (strlen (CVSroot_directory)
+ path = malloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
- + 10);
+ + 2);
if (path == NULL)
{
pending_error = ENOMEM;
return;
}
- (void) sprintf (path, "%s/%s", CVSroot_directory, CVSROOTADM);
+ (void) sprintf (path, "%s/%s", current_parsed_root->directory, CVSROOTADM);
if (!isaccessible (path, R_OK | X_OK))
{
int save_errno = errno;
@@ -815,13 +800,13 @@ E Protocol error: Root says \"%s\" but pserver says \"%s\"",
free (path);
#ifdef HAVE_PUTENV
- env = malloc (strlen (CVSROOT_ENV) + strlen (CVSroot_directory) + 1 + 1);
+ env = malloc (strlen (CVSROOT_ENV) + strlen (current_parsed_root->directory) + 2);
if (env == NULL)
{
pending_error = ENOMEM;
return;
}
- (void) sprintf (env, "%s=%s", CVSROOT_ENV, CVSroot_directory);
+ (void) sprintf (env, "%s=%s", CVSROOT_ENV, current_parsed_root->directory);
(void) putenv (env);
/* do not free env, as putenv has control of it */
#endif
@@ -864,14 +849,14 @@ server_pathname_check (path)
static int outside_root PROTO ((char *));
/* Is file or directory REPOS an absolute pathname within the
- CVSroot_directory? If yes, return 0. If no, set pending_error
+ current_parsed_root->directory? If yes, return 0. If no, set pending_error
and return 1. */
static int
outside_root (repos)
char *repos;
{
size_t repos_len = strlen (repos);
- size_t root_len = strlen (CVSroot_directory);
+ size_t root_len = strlen (current_parsed_root->directory);
/* I think isabsolute (repos) should always be true, and that
any RELATIVE_REPOS stuff should only be in CVS/Repository
@@ -886,15 +871,15 @@ E protocol error: %s is not absolute", repos);
}
if (repos_len < root_len
- || strncmp (CVSroot_directory, repos, root_len) != 0)
+ || strncmp (current_parsed_root->directory, repos, root_len) != 0)
{
not_within:
- if (alloc_pending (strlen (CVSroot_directory)
+ if (alloc_pending (strlen (current_parsed_root->directory)
+ strlen (repos)
+ 80))
sprintf (pending_error_text, "\
E protocol error: directory '%s' not within root '%s'",
- repos, CVSroot_directory);
+ repos, current_parsed_root->directory);
return 1;
}
if (repos_len > root_len)
@@ -1097,8 +1082,9 @@ dirswitch (dir, repos)
(e.g., an entry like ``world -a .'') by putting /. at the end
of the Repository file, so we do the same. */
if (strcmp (dir, ".") == 0
- && CVSroot_directory != NULL
- && strcmp (CVSroot_directory, repos) == 0)
+ && current_parsed_root != NULL
+ && current_parsed_root->directory != NULL
+ && strcmp (current_parsed_root->directory, repos) == 0)
{
if (fprintf (f, "/.") < 0)
{
@@ -2428,6 +2414,9 @@ error ENOMEM Virtual memory exhausted.\n";
/* If this gives an error, not much we could do. syslog() it? */
write (STDOUT_FILENO, msg, sizeof (msg) - 1);
+#ifdef HAVE_SYSLOG_H
+ syslog (LOG_DAEMON | LOG_ERR, "virtual memory exhausted");
+#endif
error_exit ();
}
@@ -2485,13 +2474,13 @@ check_command_legal_p (cmd_name)
int found_it = 0;
/* else */
- flen = strlen (CVSroot_directory)
+ flen = strlen (current_parsed_root->directory)
+ strlen (CVSROOTADM)
+ strlen (CVSROOTADM_READERS)
+ 3;
fname = xmalloc (flen);
- (void) sprintf (fname, "%s/%s/%s", CVSroot_directory,
+ (void) sprintf (fname, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSROOTADM_READERS);
fp = fopen (fname, "r");
@@ -2537,13 +2526,13 @@ check_command_legal_p (cmd_name)
/* Now check the writers file. */
- flen = strlen (CVSroot_directory)
+ flen = strlen (current_parsed_root->directory)
+ strlen (CVSROOTADM)
+ strlen (CVSROOTADM_WRITERS)
+ 3;
fname = xmalloc (flen);
- (void) sprintf (fname, "%s/%s/%s", CVSroot_directory,
+ (void) sprintf (fname, "%s/%s/%s", current_parsed_root->directory,
CVSROOTADM, CVSROOTADM_WRITERS);
fp = fopen (fname, "r");
@@ -2785,7 +2774,9 @@ error \n");
close (stderr_pipe[0]);
close (stderr_pipe[1]);
close (protocol_pipe[0]);
+ close_on_exec (protocol_pipe[1]);
#ifdef SERVER_FLOWCONTROL
+ close_on_exec (flowcontrol_pipe[0]);
close (flowcontrol_pipe[1]);
#endif /* SERVER_FLOWCONTROL */
@@ -2802,11 +2793,11 @@ error \n");
exitstatus = (*command) (argument_count, argument_vector);
/* Output any partial lines. If the client doesn't support
- "MT", we just throw out the partial line, like old versions
- of CVS did, since the protocol can't support this. */
- if (supported_response ("MT") && ! buf_empty_p (saved_output))
+ "MT", we go ahead and just tack on a newline since the
+ protocol doesn't support anything better. */
+ if (! buf_empty_p (saved_output))
{
- buf_output0 (protocol, "MT text ");
+ buf_output0 (protocol, supported_response ("MT") ? "MT text " : "M ");
buf_append_buffer (protocol, saved_output);
buf_output (protocol, "\n", 1);
buf_send_counted (protocol);
@@ -2829,7 +2820,7 @@ error \n");
struct buffer *protocol_inbuf;
/* Number of file descriptors to check in select (). */
int num_to_check;
- int count_needed = 0;
+ int count_needed = 1;
#ifdef SERVER_FLOWCONTROL
int have_flowcontrolled = 0;
#endif /* SERVER_FLOWCONTROL */
@@ -2917,13 +2908,16 @@ error \n");
while (stdout_pipe[0] >= 0
|| stderr_pipe[0] >= 0
- || protocol_pipe[0] >= 0)
+ || protocol_pipe[0] >= 0
+ || count_needed <= 0)
{
fd_set readfds;
fd_set writefds;
int numfds;
#ifdef SERVER_FLOWCONTROL
int bufmemsize;
+ struct timeval *timeout_ptr;
+ struct timeval timeout;
/*
* See if we are swamping the remote client and filling our VM.
@@ -2944,8 +2938,24 @@ error \n");
FD_ZERO (&readfds);
FD_ZERO (&writefds);
+
+ if (count_needed <= 0)
+ {
+ /* there is data pending which was read from the protocol pipe
+ * so don't block if we don't find any data
+ */
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 0;
+ timeout_ptr = &timeout;
+ }
+ else
+ {
+ /* block indefinately */
+ timeout_ptr = NULL;
+ }
+
if (! buf_empty_p (buf_to_net))
- FD_SET (STDOUT_FILENO, &writefds);
+ FD_SET (STDOUT_FILENO, &writefds);
if (stdout_pipe[0] >= 0)
{
@@ -2961,28 +2971,34 @@ error \n");
}
/* This process of selecting on the three pipes means that
- we might not get output in the same order in which it
- was written, thus producing the well-known
- "out-of-order" bug. If the child process uses
- cvs_output and cvs_outerr, it will send everything on
- the protocol_pipe and avoid this problem, so the
- solution is to use cvs_output and cvs_outerr in the
- child process. */
+ we might not get output in the same order in which it
+ was written, thus producing the well-known
+ "out-of-order" bug. If the child process uses
+ cvs_output and cvs_outerr, it will send everything on
+ the protocol_pipe and avoid this problem, so the
+ solution is to use cvs_output and cvs_outerr in the
+ child process. */
do {
/* This used to select on exceptions too, but as far
as I know there was never any reason to do that and
SCO doesn't let you select on exceptions on pipes. */
numfds = select (num_to_check, &readfds, &writefds,
- (fd_set *)0, (struct timeval *)NULL);
+ (fd_set *)0, timeout_ptr);
if (numfds < 0
- && errno != EINTR)
+ && errno != EINTR)
{
buf_output0 (buf_to_net, "E select failed\n");
print_error (errno);
goto error_exit;
}
} while (numfds < 0);
-
+
+ if (numfds == 0)
+ {
+ FD_ZERO (&readfds);
+ FD_ZERO (&writefds);
+ }
+
if (FD_ISSET (STDOUT_FILENO, &writefds))
{
/* What should we do with errors? syslog() them? */
@@ -2994,7 +3010,6 @@ error \n");
{
int status;
int count_read;
- int special;
status = buf_input_data (protocol_inbuf, &count_read);
@@ -3017,29 +3032,49 @@ error \n");
* have.
*/
count_needed -= count_read;
- while (count_needed <= 0)
- {
- count_needed = buf_copy_counted (buf_to_net,
+ }
+ /* this is still part of the protocol pipe procedure, but it is
+ * outside the above conditional so that unprocessed data can be
+ * left in the buffer and stderr/stdout can be read when a flush
+ * signal is received and control can return here without passing
+ * through the select code and maybe blocking
+ */
+ while (count_needed <= 0)
+ {
+ int special = 0;
+
+ count_needed = buf_copy_counted (buf_to_net,
protocol_inbuf,
&special);
- /* What should we do with errors? syslog() them? */
- buf_send_output (buf_to_net);
+ /* What should we do with errors? syslog() them? */
+ buf_send_output (buf_to_net);
- /* If SPECIAL got set to -1, it means that the child
- wants us to flush the pipe. We don't want to block
- on the network, but we flush what we can. If the
- client supports the 'F' command, we send it. */
- if (special == -1)
+ /* If SPECIAL got set to <0, it means that the child
+ * wants us to flush the pipe & maybe stderr or stdout.
+ *
+ * After that we break to read stderr & stdout again before
+ * going back to the protocol pipe
+ *
+ * Upon breaking, count_needed = 0, so the next pass will only
+ * perform a non-blocking select before returning here to finish
+ * processing data we already read from the protocol buffer
+ */
+ if (special == -1)
+ {
+ cvs_flushout();
+ break;
+ }
+ if (special == -2)
+ {
+ /* If the client supports the 'F' command, we send it. */
+ if (supported_response ("F"))
{
- if (supported_response ("F"))
- {
- buf_append_char (buf_to_net, 'F');
- buf_append_char (buf_to_net, '\n');
- }
-
- cvs_flusherr ();
+ buf_append_char (buf_to_net, 'F');
+ buf_append_char (buf_to_net, '\n');
}
+ cvs_flusherr ();
+ break;
}
}
@@ -3426,6 +3461,11 @@ server_scratch (fname)
* two different cases. Using the last one which happens is almost
* surely correct; I haven't tracked down why they both happen (or
* even verified that they are for the same file).
+ *
+ * Don't know if this is what whoever wrote the above comment was
+ * talking about, but this can happen in the case where a join
+ * removes a file - the call to Register puts the '-vers' into the
+ * Entries file after the file is removed
*/
if (entries_line != NULL)
{
@@ -3585,6 +3625,15 @@ serve_log (arg)
}
static void
+serve_rlog (arg)
+ char *arg;
+{
+ /* Tell cvslog() to behave like rlog not log. */
+ command_name = "rlog";
+ do_cvs_command ("rlog", cvslog);
+}
+
+static void
serve_add (arg)
char *arg;
{
@@ -3623,7 +3672,9 @@ static void
serve_rtag (arg)
char *arg;
{
- do_cvs_command ("rtag", rtag);
+ /* Tell cvstag() to behave like rtag not tag. */
+ command_name = "rtag";
+ do_cvs_command ("rtag", cvstag);
}
static void
@@ -3747,7 +3798,10 @@ serve_init (arg)
/* Fall through to do_cvs_command which will return the
actual error. */
}
- set_local_cvsroot (arg);
+
+ if (current_parsed_root != NULL)
+ free_cvsroot_t (current_parsed_root);
+ current_parsed_root = local_cvsroot (arg);
do_cvs_command ("init", init);
}
@@ -3760,6 +3814,17 @@ serve_annotate (arg)
{
do_cvs_command ("annotate", annotate);
}
+
+static void serve_rannotate PROTO ((char *));
+
+static void
+serve_rannotate (arg)
+ char *arg;
+{
+ /* Tell annotate() to behave like rannotate not annotate. */
+ command_name = "rannotate";
+ do_cvs_command ("rannotate", annotate);
+}
static void
serve_co (arg)
@@ -4157,6 +4222,23 @@ CVS server internal error: unhandled case in server_updated");
output_dir (finfo->update_dir, finfo->repository);
buf_output0 (protocol, finfo->file);
buf_output (protocol, "\n", 1);
+ /* keep the vers structure up to date in case we do a join
+ * - if there isn't a file, it can't very well have a version number, can it?
+ *
+ * we do it here on the assumption that since we just told the client
+ * to remove the file/entry, it will, and we want to remember that.
+ * If it fails, that's the client's problem, not ours
+ */
+ if (vers && vers->vn_user != NULL)
+ {
+ free (vers->vn_user);
+ vers->vn_user = NULL;
+ }
+ if (vers && vers->ts_user != NULL)
+ {
+ free (vers->ts_user);
+ vers->ts_user = NULL;
+ }
}
else if (scratched_file == NULL && entries_line == NULL)
{
@@ -4490,7 +4572,7 @@ serve_expand_modules (arg)
for (i = 1; i < argument_count; i++)
err += do_module (db, argument_vector[i],
CHECKOUT, "Updating", expand_proc,
- NULL, 0, 0, 0,
+ NULL, 0, 0, 0, 0,
(char *) NULL);
close_module (db);
server_expanding = 0;
@@ -4691,6 +4773,7 @@ struct request requests[] =
REQ_LINE("update", serve_update, RQ_ESSENTIAL),
REQ_LINE("diff", serve_diff, 0),
REQ_LINE("log", serve_log, 0),
+ REQ_LINE("rlog", serve_rlog, 0),
REQ_LINE("add", serve_add, 0),
REQ_LINE("remove", serve_remove, 0),
REQ_LINE("update-patches", serve_ignore, 0),
@@ -4712,6 +4795,7 @@ struct request requests[] =
REQ_LINE("editors", serve_editors, 0),
REQ_LINE("init", serve_init, RQ_ROOTLESS),
REQ_LINE("annotate", serve_annotate, 0),
+ REQ_LINE("rannotate", serve_rannotate, 0),
REQ_LINE("noop", serve_noop, RQ_ROOTLESS),
REQ_LINE("version", serve_version, RQ_ROOTLESS),
REQ_LINE(NULL, NULL, 0)
@@ -4745,7 +4829,7 @@ serve_valid_requests (arg)
buf_flush (buf_to_net, 1);
}
-#ifdef sun
+#ifdef SUNOS_KLUDGE
/*
* Delete temporary files. SIG is the signal making this happen, or
* 0 if not called as a result of a signal.
@@ -4759,7 +4843,7 @@ static void wait_sig (sig)
if (r == command_pid)
command_pid_is_dead++;
}
-#endif
+#endif /* SUNOS_KLUDGE */
void
server_cleanup (sig)
@@ -4803,7 +4887,7 @@ server_cleanup (sig)
/* What a bogus kludge. This disgusting code makes all kinds of
assumptions about SunOS, and is only for a bug in that system.
So only enable it on Suns. */
-#ifdef sun
+#ifdef SUNOS_KLUDGE
if (command_pid > 0)
{
/* To avoid crashes on SunOS due to bugs in SunOS tmpfs
@@ -4876,7 +4960,7 @@ server_cleanup (sig)
}
}
}
-#endif
+#endif /* SUNOS_KLUDGE */
CVS_CHDIR (Tmpdir);
/* Temporarily clear noexec, so that we clean up our temp directory
@@ -5014,19 +5098,25 @@ error ENOMEM Virtual memory exhausted.\n");
pending_error = status;
}
#ifndef CHMOD_BROKEN
- else
+ else if (chmod (server_temp_dir, S_IRWXU) < 0)
{
- if (chmod (server_temp_dir, S_IRWXU) < 0)
- {
- int save_errno = errno;
- if (alloc_pending (80 + strlen (server_temp_dir)))
- sprintf (pending_error_text,
+ int save_errno = errno;
+ if (alloc_pending (80 + strlen (server_temp_dir)))
+ sprintf (pending_error_text,
"E cannot change permissions on temporary directory %s",
- server_temp_dir);
- pending_error = save_errno;
- }
+ server_temp_dir);
+ pending_error = save_errno;
}
#endif
+ else if (CVS_CHDIR (server_temp_dir) < 0)
+ {
+ int save_errno = errno;
+ if (alloc_pending (80 + strlen (server_temp_dir)))
+ sprintf (pending_error_text,
+"E cannot change to temporary directory %s",
+ server_temp_dir);
+ pending_error = save_errno;
+ }
}
}
@@ -5122,7 +5212,7 @@ error ENOMEM Virtual memory exhausted.\n");
continue;
if (!(rq->flags & RQ_ROOTLESS)
- && CVSroot_directory == NULL)
+ && current_parsed_root == NULL)
{
/* For commands which change the way in which data
is sent and received, for example Gzip-stream,
@@ -5256,10 +5346,10 @@ error 0 %s: no such user\n", username);
#endif
#if HAVE_PUTENV
- /* Set LOGNAME and USER in the environment, in case they are
- already set to something else. */
+ /* Set LOGNAME, USER and CVS_USER in the environment, in case they
+ are already set to something else. */
{
- char *env;
+ char *env, *cvs_user;
env = xmalloc (sizeof "LOGNAME=" + strlen (username));
(void) sprintf (env, "LOGNAME=%s", username);
@@ -5268,6 +5358,11 @@ error 0 %s: no such user\n", username);
env = xmalloc (sizeof "USER=" + strlen (username));
(void) sprintf (env, "USER=%s", username);
(void) putenv (env);
+
+ cvs_user = NULL != CVS_Username ? CVS_Username : "";
+ env = xmalloc (sizeof "CVS_USER=" + strlen (cvs_user));
+ (void) sprintf (env, "CVS_USER=%s", cvs_user);
+ (void) putenv (env);
}
#endif /* HAVE_PUTENV */
}
@@ -5302,7 +5397,7 @@ check_repository_password (username, password, repository, host_user_ptr)
int found_it = 0;
int namelen;
- /* We don't use CVSroot_directory because it hasn't been set yet
+ /* 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.
*/
@@ -5632,8 +5727,13 @@ pserver_authenticate_connection ()
{
int on = 1;
- (void) setsockopt (STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE,
- (char *) &on, sizeof on);
+ if (setsockopt (STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE,
+ (char *) &on, sizeof on) < 0)
+ {
+#ifdef HAVE_SYSLOG_H
+ syslog (LOG_DAEMON | LOG_ERR, "error setting KEEPALIVE: %m");
+#endif
+ }
}
#endif
@@ -5689,13 +5789,13 @@ pserver_authenticate_connection ()
error (1, 0, "bad auth protocol end: %s", tmp);
}
if (!root_allow_ok (repository))
- /* Just give a generic I HATE YOU. This is because CVS 1.9.10
- and older clients do not support "error". Once more recent
- clients are more widespread, probably want to fix this (it is
- a real pain to track down why it isn't letting you in if it
- won't say why, and I am not convinced that the potential
- information disclosure to an attacker outweighs this). */
+ {
+ printf ("error 0 %s: no such repository\n", repository);
+#ifdef HAVE_SYSLOG_H
+ syslog (LOG_DAEMON | LOG_NOTICE, "login refused for %s", repository);
+#endif
goto i_hate_you;
+ }
/* OK, now parse the config file, so we can use it to control how
to check passwords. If there was an error parsing the config
@@ -5711,6 +5811,13 @@ pserver_authenticate_connection ()
free (descrambled_password);
if (host_user == NULL)
{
+#ifdef HAVE_SYSLOG_H
+ syslog (LOG_DAEMON | LOG_NOTICE, "login failure (for %s)", repository);
+#ifdef LOG_AUTHPRIV
+ syslog (LOG_AUTHPRIV | LOG_NOTICE, "login failure by %s / %s (for %s)",
+ username, descrambled_password, repository);
+#endif
+#endif
i_hate_you:
printf ("I HATE YOU\n");
fflush (stdout);
@@ -5792,8 +5899,13 @@ error %s getpeername or getsockname failed\n", strerror (errno));
{
int on = 1;
- (void) setsockopt (STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE,
- (char *) &on, sizeof on);
+ if (setsockopt (STDIN_FILENO, SOL_SOCKET, SO_KEEPALIVE,
+ (char *) &on, sizeof on) < 0)
+ {
+#ifdef HAVE_SYSLOG_H
+ syslog (LOG_DAEMON | LOG_ERR, "error setting KEEPALIVE: %m");
+#endif
+ }
}
#endif
@@ -6389,13 +6501,20 @@ cvs_flusherr ()
#ifdef SERVER_SUPPORT
if (error_use_protocol)
{
+ /* skip the actual stderr flush in this case since the parent process
+ * on the server should only be writing to stdout anyhow
+ */
/* Flush what we can to the network, but don't block. */
buf_flush (buf_to_net, 0);
}
else if (server_active)
{
+ /* make sure stderr is flushed before we send the flush count on the
+ * protocol pipe
+ */
+ fflush (stderr);
/* Send a special count to tell the parent to flush. */
- buf_send_special_count (protocol, -1);
+ buf_send_special_count (protocol, -2);
}
else
#endif
@@ -6421,7 +6540,13 @@ cvs_flushout ()
cvs_flushout replaces, setting stdout to line buffering in
main.c, didn't get called in the server child process. But
in the future it is quite plausible that we'll want to make
- this case work analogously to cvs_flusherr. */
+ this case work analogously to cvs_flusherr.
+
+ FIXME - DRP - I tried to implement this and triggered the following
+ error: "Protocol error: uncounted data discarded". I don't need
+ this feature right now, so I'm not going to bother with it yet.
+ */
+ buf_send_special_count (protocol, -1);
}
else
#endif
diff --git a/contrib/cvs/src/stamp-h2.in b/contrib/cvs/src/stamp-h2.in
new file mode 100644
index 000000000000..9788f70238c9
--- /dev/null
+++ b/contrib/cvs/src/stamp-h2.in
@@ -0,0 +1 @@
+timestamp
diff --git a/contrib/cvs/src/status.c b/contrib/cvs/src/status.c
index 4e5ddcbd6581..7b64d30b4d8c 100644
--- a/contrib/cvs/src/status.c
+++ b/contrib/cvs/src/status.c
@@ -67,7 +67,7 @@ cvsstatus (argc, argv)
wrap_setup ();
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
start_server ();
@@ -135,11 +135,9 @@ status_fileproc (callerdat, finfo)
case T_CHECKOUT:
sstat = "Needs Checkout";
break;
-#ifdef SERVER_SUPPORT
case T_PATCH:
sstat = "Needs Patch";
break;
-#endif
case T_CONFLICT:
/* I _think_ that "unresolved" is correct; that if it has
been resolved then the status will change. But I'm not
diff --git a/contrib/cvs/src/subr.c b/contrib/cvs/src/subr.c
index c9f374703d0e..8211a77788ed 100644
--- a/contrib/cvs/src/subr.c
+++ b/contrib/cvs/src/subr.c
@@ -11,6 +11,15 @@
#include "cvs.h"
#include "getline.h"
+#ifdef HAVE_NANOSLEEP
+# include "xtime.h"
+#else /* HAVE_NANOSLEEP */
+# if !defined HAVE_USLEEP && defined HAVE_SELECT
+ /* use select as a workaround */
+# include "xselect.h"
+# endif /* !defined HAVE_USLEEP && defined HAVE_SELECT */
+#endif /* !HAVE_NANOSLEEP */
+
extern char *getlogin ();
/*
@@ -111,6 +120,19 @@ expand_string (strptr, n, newsize)
}
}
+/* *STR is a pointer to a malloc'd string. *LENP is its allocated
+ length. Add SRC to the end of it, reallocating if necessary. */
+void
+allocate_and_strcat (str, lenp, src)
+ char **str;
+ size_t *lenp;
+ const char *src;
+{
+
+ expand_string (str, lenp, strlen (*str) + strlen (src) + 1);
+ strcat (*str, src);
+}
+
/*
* Duplicate a string, calling xmalloc to allocate some dynamic space
*/
@@ -776,3 +798,96 @@ backup_file (filename, suffix)
return backup_name;
}
+/*
+ * Copy a string into a buffer escaping any shell metacharacters. The
+ * buffer should be at least twice as long as the string.
+ *
+ * Returns a pointer to the terminating NUL byte in buffer.
+ */
+
+char *
+shell_escape(buf, str)
+ char *buf;
+ const char *str;
+{
+ static const char meta[] = "$`\\\"";
+ const char *p;
+
+ for (;;)
+ {
+ p = strpbrk(str, meta);
+ if (!p) p = str + strlen(str);
+ if (p > str)
+ {
+ memcpy(buf, str, p - str);
+ buf += p - str;
+ }
+ if (!*p) break;
+ *buf++ = '\\';
+ *buf++ = *p++;
+ str = p;
+ }
+ *buf = '\0';
+ return buf;
+}
+
+/*
+ * We can only travel forwards in time, not backwards. :)
+ */
+void
+sleep_past (desttime)
+ time_t desttime;
+{
+ time_t t;
+ long s;
+ long us;
+
+ while (time (&t) <= desttime)
+ {
+#ifdef HAVE_GETTIMEOFDAY
+ struct timeval tv;
+ gettimeofday (&tv, NULL);
+ if (tv.tv_sec > desttime)
+ break;
+ s = desttime - tv.tv_sec;
+ if (tv.tv_usec > 0)
+ us = 1000000 - tv.tv_usec;
+ else
+ {
+ s++;
+ us = 0;
+ }
+#else
+ /* default to 20 ms increments */
+ s = desttime - t;
+ us = 20000;
+#endif
+
+#if defined(HAVE_NANOSLEEP)
+ {
+ struct timespec ts;
+ ts.tv_sec = s;
+ ts.tv_nsec = us * 1000;
+ (void)nanosleep (&ts, NULL);
+ }
+#elif defined(HAVE_USLEEP)
+ if (s > 0)
+ (void)sleep (s);
+ else
+ (void)usleep (us);
+#elif defined(HAVE_SELECT)
+ {
+ /* use select instead of sleep since it is a fairly portable way of
+ * sleeping for ms.
+ */
+ struct timeval tv;
+ tv.tv_sec = s;
+ tv.tv_usec = us;
+ (void)select (0, (fd_set *)NULL, (fd_set *)NULL, (fd_set *)NULL, &tv);
+ }
+#else
+ if (us > 0) s++;
+ (void)sleep(s);
+#endif
+ }
+}
diff --git a/contrib/cvs/src/tag.c b/contrib/cvs/src/tag.c
index a9d8534160a3..a2883c8e1b47 100644
--- a/contrib/cvs/src/tag.c
+++ b/contrib/cvs/src/tag.c
@@ -5,15 +5,19 @@
* 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.
*
- * Tag
+ * Tag and Rtag
*
* Add or delete a symbolic name to an RCS file, or a collection of RCS files.
- * Uses the checked out revision in the current directory.
+ * Tag uses the checked out revision in the current directory, rtag uses
+ * the modules database, if necessary.
*/
#include "cvs.h"
#include "savecwd.h"
+static int rtag_proc PROTO((int argc, char **argv, char *xwhere,
+ char *mwhere, char *mfile, int shorten,
+ int local_specified, char *mname, char *msg));
static int check_fileproc PROTO ((void *callerdat, struct file_info *finfo));
static int check_filesdoneproc PROTO ((void *callerdat, int err,
char *repos, char *update_dir,
@@ -26,20 +30,22 @@ static int pretag_list_proc PROTO((Node *p, void *closure));
static Dtype tag_dirproc PROTO ((void *callerdat, char *dir,
char *repos, char *update_dir,
List *entries));
+static int rtag_fileproc PROTO ((void *callerdat, struct file_info *finfo));
+static int rtag_delete PROTO((RCSNode *rcsfile));
static int tag_fileproc PROTO ((void *callerdat, struct file_info *finfo));
-static int tag_filesdoneproc PROTO ((void *callerdat, int err,
- char *repos, char *update_dir,
- List *entries));
-static char *numtag;
+static char *numtag; /* specific revision to tag */
+static int numtag_validated = 0;
static char *date = NULL;
-static char *symtag;
+static char *symtag; /* tag to add or delete */
static int delete_flag; /* adding a tag by default */
static int branch_mode; /* make an automagic "branch" tag */
static int local; /* recursive by default */
-static int force_tag_match = 1; /* force tag to match by default */
+static int force_tag_match = 1; /* force tag to match by default */
static int force_tag_move; /* don't force tag to move by default */
static int check_uptodate; /* no uptodate-check by default */
+static int attic_too; /* remove tag from Attic files */
+static int is_rtag;
struct tag_info
{
@@ -57,18 +63,37 @@ struct master_lists
static List *mtlist;
static List *tlist;
-static const char *const tag_usage[] =
+static const char rtag_opts[] = "+abdFflnQqRr:D:";
+static const char *const rtag_usage[] =
{
- "Usage: %s %s [-lRF] [-b] [-d] [-c] [-r rev|-D date] tag [files...]\n",
+ "Usage: %s %s [-abdFflnR] [-r rev|-D date] tag modules...\n",
+ "\t-a\tClear tag from removed files that would not otherwise be tagged.\n",
+ "\t-b\tMake the tag a \"branch\" tag, allowing concurrent development.\n",
+ "\t-d\tDelete the given tag.\n",
+ "\t-F\tMove tag if it already exists.\n",
+ "\t-f\tForce a head revision match if tag/date not found.\n",
"\t-l\tLocal directory only, not recursive.\n",
+ "\t-n\tNo execution of 'tag program'.\n",
"\t-R\tProcess directories recursively.\n",
- "\t-d\tDelete the given tag.\n",
"\t-r rev\tExisting revision/tag.\n",
"\t-D\tExisting date.\n",
- "\t-f\tForce a head revision if specified tag not found.\n",
+ "(Specify the --help global option for a list of other help options)\n",
+ NULL
+};
+
+static const char tag_opts[] = "+bcdFflQqRr:D:";
+static const char *const tag_usage[] =
+{
+ "Usage: %s %s [-bcdFflR] [-r rev|-D date] tag [files...]\n",
"\t-b\tMake the tag a \"branch\" tag, allowing concurrent development.\n",
- "\t-F\tMove tag if it already exists.\n",
"\t-c\tCheck that working files are unmodified.\n",
+ "\t-d\tDelete the given tag.\n",
+ "\t-F\tMove tag if it already exists.\n",
+ "\t-f\tForce a head revision match if tag/date not found.\n",
+ "\t-l\tLocal directory only, not recursive.\n",
+ "\t-R\tProcess directories recursively.\n",
+ "\t-r rev\tExisting revision/tag.\n",
+ "\t-D\tExisting date.\n",
"(Specify the --help global option for a list of other help options)\n",
NULL
};
@@ -80,15 +105,42 @@ cvstag (argc, argv)
{
int c;
int err = 0;
+ int run_module_prog = 1;
+ is_rtag = (strcmp (command_name, "rtag") == 0);
+
if (argc == -1)
- usage (tag_usage);
+ usage (is_rtag ? rtag_usage : tag_usage);
optind = 0;
- while ((c = getopt (argc, argv, "+FQqlRcdr:D:bf")) != -1)
+ while ((c = getopt (argc, argv, is_rtag ? rtag_opts : tag_opts)) != -1)
{
switch (c)
{
+ case 'a':
+ attic_too = 1;
+ break;
+ case 'b':
+ branch_mode = 1;
+ break;
+ case 'c':
+ check_uptodate = 1;
+ break;
+ case 'd':
+ delete_flag = 1;
+ break;
+ case 'F':
+ force_tag_move = 1;
+ break;
+ case 'f':
+ force_tag_match = 0;
+ break;
+ case 'l':
+ local = 1;
+ break;
+ case 'n':
+ run_module_prog = 0;
+ break;
case 'Q':
case 'q':
#ifdef SERVER_SUPPORT
@@ -100,18 +152,9 @@ cvstag (argc, argv)
"-q or -Q must be specified before \"%s\"",
command_name);
break;
- case 'l':
- local = 1;
- break;
case 'R':
local = 0;
break;
- case 'd':
- delete_flag = 1;
- break;
- case 'c':
- check_uptodate = 1;
- break;
case 'r':
numtag = optarg;
break;
@@ -120,26 +163,17 @@ cvstag (argc, argv)
free (date);
date = Make_Date (optarg);
break;
- case 'f':
- force_tag_match = 0;
- break;
- case 'b':
- branch_mode = 1;
- break;
- case 'F':
- force_tag_move = 1;
- break;
case '?':
default:
- usage (tag_usage);
+ usage (is_rtag ? rtag_usage : tag_usage);
break;
}
}
argc -= optind;
argv += optind;
- if (argc == 0)
- usage (tag_usage);
+ if (argc < (is_rtag ? 2 : 1))
+ usage (is_rtag ? rtag_usage : tag_usage);
symtag = argv[0];
argc--;
argv++;
@@ -151,25 +185,29 @@ cvstag (argc, argv)
RCS_check_tag (symtag);
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
/* We're the client side. Fire up the remote server. */
start_server ();
ign_setup ();
- if (!force_tag_match)
- send_arg ("-f");
- if (local)
- send_arg("-l");
- if (delete_flag)
- send_arg("-d");
- if (check_uptodate)
- send_arg("-c");
+ if (attic_too)
+ send_arg("-a");
if (branch_mode)
send_arg("-b");
+ if (check_uptodate)
+ send_arg("-c");
+ if (delete_flag)
+ send_arg("-d");
if (force_tag_move)
send_arg("-F");
+ if (!force_tag_match)
+ send_arg ("-f");
+ if (local)
+ send_arg("-l");
+ if (!run_module_prog)
+ send_arg("-n");
if (numtag)
option_with_arg ("-r", numtag);
@@ -178,20 +216,155 @@ cvstag (argc, argv)
send_arg (symtag);
- send_files (argc, argv, local, 0,
+ if (is_rtag)
+ {
+ int i;
+ for (i = 0; i < argc; ++i)
+ send_arg (argv[i]);
+ send_to_server ("rtag\012", 0);
+ }
+ else
+ {
+
+ send_files (argc, argv, local, 0,
/* I think the -c case is like "cvs status", in
which we really better be correct rather than
being fast; it is just too confusing otherwise. */
- check_uptodate ? 0 : SEND_NO_CONTENTS);
- send_file_names (argc, argv, SEND_EXPAND_WILD);
- send_to_server ("tag\012", 0);
+ check_uptodate ? 0 : SEND_NO_CONTENTS);
+ send_file_names (argc, argv, SEND_EXPAND_WILD);
+ send_to_server ("tag\012", 0);
+ }
+
return get_responses_and_close ();
}
#endif
- if (numtag != NULL)
- tag_check_valid (numtag, argc, argv, local, 0, "");
+ if (is_rtag)
+ {
+ DBM *db;
+ int i;
+ db = open_module ();
+ for (i = 0; i < argc; i++)
+ {
+ /* XXX last arg should be repository, but doesn't make sense here */
+ history_write ('T', (delete_flag ? "D" : (numtag ? numtag :
+ (date ? date : "A"))), symtag, argv[i], "");
+ err += do_module (db, argv[i], TAG,
+ delete_flag ? "Untagging" : "Tagging",
+ rtag_proc, (char *) NULL, 0, 0, run_module_prog,
+ 0, symtag);
+ }
+ close_module (db);
+ }
+ else
+ {
+ err = rtag_proc (argc + 1, argv - 1, NULL, NULL, NULL, 0, 0, NULL,
+ NULL);
+ }
+
+ return (err);
+}
+
+/*
+ * callback proc for doing the real work of tagging
+ */
+/* ARGSUSED */
+static int
+rtag_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified,
+ mname, msg)
+ int argc;
+ char **argv;
+ char *xwhere;
+ char *mwhere;
+ char *mfile;
+ int shorten;
+ int local_specified;
+ char *mname;
+ char *msg;
+{
+ /* Begin section which is identical to patch_proc--should this
+ be abstracted out somehow? */
+ char *myargv[2];
+ int err = 0;
+ int which;
+ char *repository;
+ char *where;
+
+ if (is_rtag)
+ {
+ repository = xmalloc (strlen (current_parsed_root->directory) + strlen (argv[0])
+ + (mfile == NULL ? 0 : strlen (mfile) + 1) + 2);
+ (void) sprintf (repository, "%s/%s", current_parsed_root->directory, argv[0]);
+ where = xmalloc (strlen (argv[0]) + (mfile == NULL ? 0 : strlen (mfile) + 1)
+ + 1);
+ (void) strcpy (where, argv[0]);
+
+ /* if mfile isn't null, we need to set up to do only part of the module */
+ if (mfile != NULL)
+ {
+ char *cp;
+ char *path;
+
+ /* if the portion of the module is a path, put the dir part on repos */
+ if ((cp = strrchr (mfile, '/')) != NULL)
+ {
+ *cp = '\0';
+ (void) strcat (repository, "/");
+ (void) strcat (repository, mfile);
+ (void) strcat (where, "/");
+ (void) strcat (where, mfile);
+ mfile = cp + 1;
+ }
+
+ /* take care of the rest */
+ path = xmalloc (strlen (repository) + strlen (mfile) + 5);
+ (void) sprintf (path, "%s/%s", repository, mfile);
+ if (isdir (path))
+ {
+ /* directory means repository gets the dir tacked on */
+ (void) strcpy (repository, path);
+ (void) strcat (where, "/");
+ (void) strcat (where, mfile);
+ }
+ else
+ {
+ myargv[0] = argv[0];
+ myargv[1] = mfile;
+ argc = 2;
+ argv = myargv;
+ }
+ free (path);
+ }
+
+ /* cd to the starting repository */
+ if ( CVS_CHDIR (repository) < 0)
+ {
+ error (0, errno, "cannot chdir to %s", repository);
+ free (repository);
+ return (1);
+ }
+ free (repository);
+ /* End section which is identical to patch_proc. */
+
+ if (delete_flag || attic_too || (force_tag_match && numtag))
+ which = W_REPOS | W_ATTIC;
+ else
+ which = W_REPOS;
+ repository = NULL;
+ }
+ else
+ {
+ where = NULL;
+ which = W_LOCAL;
+ repository = "";
+ }
+
+ if (numtag != NULL && !numtag_validated)
+ {
+ tag_check_valid (numtag, argc - 1, argv + 1, local, 0, repository);
+ numtag_validated = 1;
+ }
/* check to make sure they are authorized to tag all the
specified files in the repository */
@@ -199,19 +372,32 @@ cvstag (argc, argv)
mtlist = getlist();
err = start_recursion (check_fileproc, check_filesdoneproc,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
- argc, argv, local, W_LOCAL, 0, 1,
- (char *) NULL, 1);
+ argc - 1, argv + 1, local, which, 0, 1,
+ where, 1);
if (err)
{
error (1, 0, "correct the above errors first!");
}
+ /* 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, which, 0);
+
/* start the recursion processor */
- err = start_recursion (tag_fileproc, tag_filesdoneproc, tag_dirproc,
- (DIRLEAVEPROC) NULL, NULL, argc, argv, local,
- W_LOCAL, 0, 0, (char *) NULL, 1);
- dellist(&mtlist);
+ err = start_recursion (is_rtag ? rtag_fileproc : tag_fileproc,
+ (FILESDONEPROC) NULL, tag_dirproc,
+ (DIRLEAVEPROC) NULL, NULL, argc - 1, argv + 1,
+ local, which, 0, 0, where, 1);
+ Lock_Cleanup ();
+ dellist (&mtlist);
+ if (where != NULL)
+ free (where);
return (err);
}
@@ -231,7 +417,8 @@ check_fileproc (callerdat, finfo)
{
Ctype status = Classify_File (finfo, (char *) NULL, (char *) NULL,
(char *) NULL, 1, 0, &vers, 0);
- if ((status != T_UPTODATE) && (status != T_CHECKOUT))
+ if ((status != T_UPTODATE) && (status != T_CHECKOUT) &&
+ (status != T_PATCH))
{
error (0, 0, "%s is locally modified", finfo->fullname);
freevers_ts (&vers);
@@ -282,7 +469,7 @@ check_fileproc (callerdat, finfo)
version we are going to tag. There probably are some subtle races
(e.g. numtag is "foo" which gets moved between here and
tag_fileproc). */
- if (numtag == NULL && date == NULL)
+ if (!is_rtag && numtag == NULL && date == NULL)
p->data = xstrdup (vers->vn_user);
else
p->data = RCS_getversion (vers->srcfile, numtag, date,
@@ -327,7 +514,7 @@ check_fileproc (callerdat, finfo)
p->data = NULL;
}
}
- freevers_ts(&vers);
+ freevers_ts (&vers);
(void) addnode (tlist, p);
return (0);
}
@@ -437,6 +624,192 @@ pretag_list_proc(p, closure)
/*
+ * Called to rtag a particular file, as appropriate with the options that were
+ * set above.
+ */
+/* ARGSUSED */
+static int
+rtag_fileproc (callerdat, finfo)
+ void *callerdat;
+ struct file_info *finfo;
+{
+ RCSNode *rcsfile;
+ char *version, *rev;
+ int retcode = 0;
+
+ /* find the parsed RCS data */
+ if ((rcsfile = finfo->rcs) == NULL)
+ return (1);
+
+ /*
+ * For tagging an RCS file which is a symbolic link, you'd best be
+ * running with RCS 5.6, since it knows how to handle symbolic links
+ * correctly without breaking your link!
+ */
+
+ if (delete_flag)
+ return (rtag_delete (rcsfile));
+
+ /*
+ * If we get here, we are adding a tag. But, if -a was specified, we
+ * need to check to see if a -r or -D option was specified. If neither
+ * was specified and the file is in the Attic, remove the tag.
+ */
+ if (attic_too && (!numtag && !date))
+ {
+ if ((rcsfile->flags & VALID) && (rcsfile->flags & INATTIC))
+ return (rtag_delete (rcsfile));
+ }
+
+ version = RCS_getversion (rcsfile, numtag, date, force_tag_match,
+ (int *) NULL);
+ if (version == NULL)
+ {
+ /* If -a specified, clean up any old tags */
+ if (attic_too)
+ (void) rtag_delete (rcsfile);
+
+ if (!quiet && !force_tag_match)
+ {
+ error (0, 0, "cannot find tag `%s' in `%s'",
+ numtag ? numtag : "head", rcsfile->path);
+ return (1);
+ }
+ return (0);
+ }
+ if (numtag
+ && isdigit ((unsigned char) *numtag)
+ && strcmp (numtag, version) != 0)
+ {
+
+ /*
+ * We didn't find a match for the numeric tag that was specified, but
+ * that's OK. just pass the numeric tag on to rcs, to be tagged as
+ * specified. Could get here if one tried to tag "1.1.1" and there
+ * was a 1.1.1 branch with some head revision. In this case, we want
+ * the tag to reference "1.1.1" and not the revision at the head of
+ * the branch. Use a symbolic tag for that.
+ */
+ rev = branch_mode ? RCS_magicrev (rcsfile, version) : numtag;
+ retcode = RCS_settag(rcsfile, symtag, numtag);
+ if (retcode == 0)
+ RCS_rewrite (rcsfile, NULL, NULL);
+ }
+ else
+ {
+ char *oversion;
+
+ /*
+ * As an enhancement for the case where a tag is being re-applied to
+ * a large body of a module, make one extra call to RCS_getversion to
+ * see if the tag is already set in the RCS file. If so, check to
+ * see if it needs to be moved. If not, do nothing. This will
+ * likely save a lot of time when simply moving the tag to the
+ * "current" head revisions of a module -- which I have found to be a
+ * typical tagging operation.
+ */
+ rev = branch_mode ? RCS_magicrev (rcsfile, version) : version;
+ oversion = RCS_getversion (rcsfile, symtag, (char *) NULL, 1,
+ (int *) NULL);
+ if (oversion != NULL)
+ {
+ int isbranch = RCS_nodeisbranch (finfo->rcs, symtag);
+
+ /*
+ * if versions the same and neither old or new are branches don't
+ * have to do anything
+ */
+ if (strcmp (version, oversion) == 0 && !branch_mode && !isbranch)
+ {
+ free (oversion);
+ free (version);
+ return (0);
+ }
+
+ if (!force_tag_move)
+ {
+ /* we're NOT going to move the tag */
+ (void) printf ("W %s", finfo->fullname);
+
+ (void) printf (" : %s already exists on %s %s",
+ symtag, isbranch ? "branch" : "version",
+ oversion);
+ (void) printf (" : NOT MOVING tag to %s %s\n",
+ branch_mode ? "branch" : "version", rev);
+ free (oversion);
+ free (version);
+ return (0);
+ }
+ free (oversion);
+ }
+ retcode = RCS_settag(rcsfile, symtag, rev);
+ if (retcode == 0)
+ RCS_rewrite (rcsfile, NULL, NULL);
+ }
+
+ if (retcode != 0)
+ {
+ error (1, retcode == -1 ? errno : 0,
+ "failed to set tag `%s' to revision `%s' in `%s'",
+ symtag, rev, rcsfile->path);
+ if (branch_mode)
+ free (rev);
+ free (version);
+ return (1);
+ }
+ if (branch_mode)
+ free (rev);
+ free (version);
+ return (0);
+}
+
+/*
+ * If -d is specified, "force_tag_match" is set, so that this call to
+ * RCS_getversion() will return a NULL version string if the symbolic
+ * tag does not exist in the RCS file.
+ *
+ * If the -r flag was used, numtag is set, and we only delete the
+ * symtag from files that have numtag.
+ *
+ * This is done here because it's MUCH faster than just blindly calling
+ * "rcs" to remove the tag... trust me.
+ */
+static int
+rtag_delete (rcsfile)
+ RCSNode *rcsfile;
+{
+ char *version;
+ int retcode;
+
+ if (numtag)
+ {
+ version = RCS_getversion (rcsfile, numtag, (char *) NULL, 1,
+ (int *) NULL);
+ if (version == NULL)
+ return (0);
+ free (version);
+ }
+
+ version = RCS_getversion (rcsfile, symtag, (char *) NULL, 1,
+ (int *) NULL);
+ if (version == NULL)
+ return (0);
+ free (version);
+
+ if ((retcode = RCS_deltag(rcsfile, symtag)) != 0)
+ {
+ if (!quiet)
+ error (0, retcode == -1 ? errno : 0,
+ "failed to remove tag `%s' from `%s'", symtag,
+ rcsfile->path);
+ return (1);
+ }
+ RCS_rewrite (rcsfile, NULL, NULL);
+ return (0);
+}
+
+
+/*
* Called to tag a particular file (the currently checked out version is
* tagged with the specified tag - or the specified tag is deleted).
*/
@@ -452,17 +825,6 @@ tag_fileproc (callerdat, finfo)
Vers_TS *vers;
int retcode = 0;
- /* Lock the directory if it is not already locked. We can't rely
- on tag_dirproc because it won't handle the case where the user
- specifies a list of files on the command line. */
- /* We do not need to acquire a full write lock for the tag operation:
- the revisions are obtained from the working directory, so we do not
- require consistency across the entire repository. However, we do
- need to prevent simultaneous tag operations from interfering with
- each other. Therefore, we write lock each directory as we enter
- it, and unlock it as we leave it. */
- lock_dir_for_write (finfo->repository);
-
vers = Version_TS (finfo, NULL, NULL, NULL, 0, 0);
if ((numtag != NULL) || (date != NULL))
@@ -644,21 +1006,6 @@ tag_fileproc (callerdat, finfo)
return (0);
}
-/* Clear any lock we may hold on the current directory. */
-
-static int
-tag_filesdoneproc (callerdat, err, repos, update_dir, entries)
- void *callerdat;
- int err;
- char *repos;
- char *update_dir;
- List *entries;
-{
- Lock_Cleanup ();
-
- return (err);
-}
-
/*
* Print a warm fuzzy message
*/
@@ -671,6 +1018,15 @@ tag_dirproc (callerdat, dir, repos, update_dir, entries)
char *update_dir;
List *entries;
{
+
+ if (ignore_directory (update_dir))
+ {
+ /* print the warm fuzzy message */
+ if (!quiet)
+ error (0, 0, "Ignoring %s", update_dir);
+ return R_SKIP_ALL;
+ }
+
if (!quiet)
error (0, 0, "%s %s", delete_flag ? "Untagging" : "Tagging", update_dir);
return (R_PROCESS);
@@ -758,6 +1114,7 @@ tag_check_valid (name, argc, argv, local, aflag, repository)
DBM *db;
char *valtags_filename;
int err;
+ int nowrite = 0;
datum mytag;
struct val_args the_val_args;
struct saved_cwd cwd;
@@ -789,24 +1146,28 @@ Numeric tag %s contains characters other than digits and '.'", name);
mytag.dptr = name;
mytag.dsize = strlen (name);
- valtags_filename = xmalloc (strlen (CVSroot_directory)
+ valtags_filename = xmalloc (strlen (current_parsed_root->directory)
+ sizeof CVSROOTADM
- + sizeof CVSROOTADM_VALTAGS + 20);
- strcpy (valtags_filename, CVSroot_directory);
- strcat (valtags_filename, "/");
- strcat (valtags_filename, CVSROOTADM);
- strcat (valtags_filename, "/");
- strcat (valtags_filename, CVSROOTADM_VALTAGS);
+ + sizeof CVSROOTADM_VALTAGS + 3);
+ sprintf (valtags_filename, "%s/%s/%s", current_parsed_root->directory,
+ CVSROOTADM, CVSROOTADM_VALTAGS);
db = dbm_open (valtags_filename, O_RDWR, 0666);
if (db == NULL)
{
if (!existence_error (errno))
- error (1, errno, "cannot read %s", valtags_filename);
-
+ {
+ error (0, errno, "warning: cannot open %s read/write",
+ valtags_filename);
+ db = dbm_open (valtags_filename, O_RDONLY, 0666);
+ if (db != NULL)
+ nowrite = 1;
+ else if (!existence_error (errno))
+ error (1, errno, "cannot read %s", valtags_filename);
+ }
/* If the file merely fails to exist, we just keep going and create
it later if need be. */
}
- else
+ if (db != NULL)
{
datum val;
@@ -868,7 +1229,7 @@ Numeric tag %s contains characters other than digits and '.'", name);
/* The tags is valid but not mentioned in val-tags. Add it. */
datum value;
- if (noexec)
+ if (noexec || nowrite)
{
if (db != NULL)
dbm_close (db);
@@ -885,7 +1246,7 @@ Numeric tag %s contains characters other than digits and '.'", name);
if (db == NULL)
{
- error (0, errno, "cannot create %s", valtags_filename);
+ error (0, errno, "warning: cannot create %s", valtags_filename);
free (valtags_filename);
return;
}
diff --git a/contrib/cvs/src/update.c b/contrib/cvs/src/update.c
index 81d4feaa0518..f4b919f7a726 100644
--- a/contrib/cvs/src/update.c
+++ b/contrib/cvs/src/update.c
@@ -58,7 +58,7 @@ static int patch_file PROTO ((struct file_info *finfo,
static void patch_file_write PROTO ((void *, const char *, size_t));
#endif
static int merge_file PROTO ((struct file_info *finfo, Vers_TS *vers));
-static int scratch_file PROTO((struct file_info *finfo));
+static int scratch_file PROTO((struct file_info *finfo, Vers_TS *vers));
static Dtype update_dirent_proc PROTO ((void *callerdat, char *dir,
char *repository, char *update_dir,
List *entries));
@@ -99,6 +99,7 @@ static int force_tag_match = 1;
static int update_build_dirs = 0;
static int update_prune_dirs = 0;
static int pipeout = 0;
+static int dotemplate = 0;
#ifdef SERVER_SUPPORT
static int patches = 0;
static int rcs_diff_patches = 0;
@@ -107,7 +108,7 @@ static List *ignlist = (List *) NULL;
static time_t last_register_time;
static const char *const update_usage[] =
{
- "Usage: %s %s [-APdflRp] [-k kopt] [-r rev|-D date] [-j rev]\n",
+ "Usage: %s %s [-APCdflRp] [-k kopt] [-r rev] [-D date] [-j rev]\n",
" [-I ign] [-W spec] [files...]\n",
"\t-A\tReset any sticky tags/date/kopts.\n",
"\t-P\tPrune empty directories.\n",
@@ -117,7 +118,7 @@ static const char *const update_usage[] =
"\t-l\tLocal directory only, no recursion.\n",
"\t-R\tProcess directories recursively.\n",
"\t-p\tSend updates to standard output (avoids stickiness).\n",
- "\t-k kopt\tUse RCS kopt -k option on checkout.\n",
+ "\t-k kopt\tUse RCS kopt -k option on checkout. (is sticky)\n",
"\t-r rev\tUpdate using specified revision/tag (is sticky).\n",
"\t-D date\tSet date to update from (is sticky).\n",
"\t-j rev\tMerge in changes made between current revision and rev.\n",
@@ -233,7 +234,7 @@ update (argc, argv)
argv += optind;
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
int pass;
@@ -409,7 +410,7 @@ update (argc, argv)
/* call the command line interface */
err = do_update (argc, argv, options, tag, date, force_tag_match,
local, update_build_dirs, aflag, update_prune_dirs,
- pipeout, which, join_rev1, join_rev2, (char *) NULL);
+ pipeout, which, join_rev1, join_rev2, (char *) NULL, 1);
/* free the space Make_Date allocated if necessary */
if (date != NULL)
@@ -423,7 +424,8 @@ update (argc, argv)
*/
int
do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag,
- xprune, xpipeout, which, xjoin_rev1, xjoin_rev2, preload_update_dir)
+ xprune, xpipeout, which, xjoin_rev1, xjoin_rev2, preload_update_dir,
+ xdotemplate)
int argc;
char **argv;
char *xoptions;
@@ -439,6 +441,7 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag,
char *xjoin_rev1;
char *xjoin_rev2;
char *preload_update_dir;
+ int xdotemplate;
{
int err = 0;
char *cp;
@@ -452,6 +455,7 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag,
aflag = xaflag;
update_prune_dirs = xprune;
pipeout = xpipeout;
+ dotemplate = xdotemplate;
/* setup the join support */
join_rev1 = xjoin_rev1;
@@ -503,11 +507,15 @@ do_update (argc, argv, xoptions, xtag, xdate, xforce, local, xbuild, xaflag,
argc, argv, local, which, aflag, 1,
preload_update_dir, 1);
+#ifdef SERVER_SUPPORT
+ if (server_active)
+ return err;
+#endif
+
/* see if we need to sleep before returning to avoid time-stamp races */
if (last_register_time)
{
- while (time ((time_t *) NULL) == last_register_time)
- sleep (1);
+ sleep_past (last_register_time);
}
return (err);
@@ -575,9 +583,6 @@ update_fileproc (callerdat, finfo)
int retval;
Ctype status;
Vers_TS *vers;
- int resurrecting;
-
- resurrecting = 0;
status = Classify_File (finfo, tag, date, options, force_tag_match,
aflag, &vers, pipeout);
@@ -623,9 +628,7 @@ update_fileproc (callerdat, finfo)
case T_MODIFIED: /* locally modified */
case T_REMOVED: /* removed but not committed */
case T_CHECKOUT: /* needs checkout */
-#ifdef SERVER_SUPPORT
case T_PATCH: /* needs patch */
-#endif
retval = checkout_file (finfo, vers, 0, 0, 0);
break;
@@ -650,8 +653,12 @@ update_fileproc (callerdat, finfo)
write_letter (finfo, 'C');
break;
case T_NEEDS_MERGE: /* needs merging */
- retval = merge_file (finfo, vers);
- break;
+ if (! toss_local_changes)
+ {
+ retval = merge_file (finfo, vers);
+ break;
+ }
+ /* else FALL THROUGH */
case T_MODIFIED: /* locally modified */
retval = 0;
if (toss_local_changes)
@@ -731,8 +738,8 @@ update_fileproc (callerdat, finfo)
}
}
break;
-#ifdef SERVER_SUPPORT
case T_PATCH: /* needs patch */
+#ifdef SERVER_SUPPORT
if (patches)
{
int docheckout;
@@ -754,11 +761,11 @@ update_fileproc (callerdat, finfo)
break;
}
}
+#endif
/* If we're not running as a server, just check the
file out. It's simpler and faster than producing
and applying patches. */
/* Fall through. */
-#endif
case T_CHECKOUT: /* needs checkout */
retval = checkout_file (finfo, vers, 0, 0, 1);
break;
@@ -771,18 +778,7 @@ update_fileproc (callerdat, finfo)
retval = 0;
break;
case T_REMOVE_ENTRY: /* needs to be un-registered */
- retval = scratch_file (finfo);
-#ifdef SERVER_SUPPORT
- if (server_active && retval == 0)
- {
- if (vers->ts_user == NULL)
- server_scratch_entry_only ();
- server_updated (finfo, vers,
- SERVER_UPDATED, (mode_t) -1,
- (unsigned char *) NULL,
- (struct buffer *) NULL);
- }
-#endif
+ retval = scratch_file (finfo, vers);
break;
default: /* can't ever happen :-) */
error (0, 0,
@@ -797,7 +793,7 @@ update_fileproc (callerdat, finfo)
join_file (finfo, vers);
/* if this directory has an ignore list, add this file to it */
- if (ignlist)
+ if (ignlist && (status != T_UNKNOWN || vers->ts_user == NULL))
{
Node *p;
@@ -877,7 +873,7 @@ update_filesdone_proc (callerdat, err, repository, update_dir, entries)
{
/* If there is no CVS/Root file, add one */
if (!isfile (CVSADM_ROOT))
- Create_Root ((char *) NULL, CVSroot_original);
+ Create_Root ((char *) NULL, current_parsed_root->original);
}
return (err);
@@ -970,7 +966,7 @@ update_dirent_proc (callerdat, dir, repository, update_dir, entries)
via WriteTag. */
0,
0,
- 1);
+ dotemplate);
rewrite_tag = 1;
nonbranch = 0;
Subdir_Register (entries, (char *) NULL, dir);
@@ -1173,7 +1169,7 @@ isemptydir (dir, might_not_exist)
return (0);
}
errno = 0;
- while ((dp = readdir (dirp)) != NULL)
+ while ((dp = CVS_READDIR (dirp)) != NULL)
{
if (strcmp (dp->d_name, ".") != 0
&& strcmp (dp->d_name, "..") != 0)
@@ -1182,7 +1178,7 @@ isemptydir (dir, might_not_exist)
{
/* An entry other than the CVS directory. The directory
is certainly not empty. */
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
return (0);
}
else
@@ -1213,7 +1209,7 @@ isemptydir (dir, might_not_exist)
{
/* There are files that have been removed, but not
committed! Do not consider the directory empty. */
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
return (0);
}
}
@@ -1223,10 +1219,10 @@ isemptydir (dir, might_not_exist)
if (errno != 0)
{
error (0, errno, "cannot read directory %s", dir);
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
return (0);
}
- (void) closedir (dirp);
+ (void) CVS_CLOSEDIR (dirp);
return (1);
}
@@ -1234,13 +1230,46 @@ isemptydir (dir, might_not_exist)
* scratch the Entries file entry associated with a file
*/
static int
-scratch_file (finfo)
+scratch_file (finfo, vers)
struct file_info *finfo;
+ Vers_TS *vers;
{
history_write ('W', finfo->update_dir, "", finfo->file, finfo->repository);
Scratch_Entry (finfo->entries, finfo->file);
+#ifdef SERVER_SUPPORT
+ if (server_active)
+ {
+ if (vers->ts_user == NULL)
+ server_scratch_entry_only ();
+ server_updated (finfo, vers,
+ SERVER_UPDATED, (mode_t) -1,
+ (unsigned char *) NULL,
+ (struct buffer *) NULL);
+ }
+#endif
if (unlink_file (finfo->file) < 0 && ! existence_error (errno))
error (0, errno, "unable to remove %s", finfo->fullname);
+ else
+#ifdef SERVER_SUPPORT
+ /* skip this step when the server is running since
+ * server_updated should have handled it */
+ if (!server_active)
+#endif
+ {
+ /* keep the vers structure up to date in case we do a join
+ * - if there isn't a file, it can't very well have a version number, can it?
+ */
+ if (vers->vn_user != NULL)
+ {
+ free (vers->vn_user);
+ vers->vn_user = NULL;
+ }
+ if (vers->ts_user != NULL)
+ {
+ free (vers->ts_user);
+ vers->ts_user = NULL;
+ }
+ }
return (0);
}
@@ -1740,7 +1769,7 @@ patch_file (finfo, vers_ts, docheckout, file_info, checksum)
diff_options = "-n";
}
- retcode = diff_exec (file1, file2, diff_options, finfo->file);
+ retcode = diff_exec (file1, file2, NULL, NULL, diff_options, finfo->file);
/* A retcode of 0 means no differences. 1 means some differences. */
if (retcode != 0
@@ -2106,6 +2135,17 @@ join_file (finfo, vers)
char *jdate1;
char *jdate2;
+ if (trace)
+ fprintf (stderr, "%s-> join_file(%s, %s%s%s%s, %s, %s)\n",
+ CLIENT_SERVER_STR,
+ finfo->file,
+ vers->tag ? vers->tag : "",
+ vers->tag ? " (" : "",
+ vers->vn_rcs ? vers->vn_rcs : "",
+ vers->tag ? ")" : "",
+ join_rev1 ? join_rev1 : "",
+ join_rev2 ? join_rev2 : "");
+
jrev1 = join_rev1;
jrev2 = join_rev2;
jdate1 = date_rev1;
@@ -2274,7 +2314,14 @@ join_file (finfo, vers)
for removal. FIXME: If we are doing a checkout, this has
the effect of first checking out the file, and then
removing it. It would be better to just register the
- removal. */
+ removal.
+
+ The same goes for a removal then an add. e.g.
+ cvs up -rbr -jbr2 could remove and readd the same file
+ */
+ /* save the rev since server_updated might invalidate it */
+ mrev = xmalloc (strlen (vers->vn_user) + 2);
+ sprintf (mrev, "-%s", vers->vn_user);
#ifdef SERVER_SUPPORT
if (server_active)
{
@@ -2283,8 +2330,6 @@ join_file (finfo, vers)
(unsigned char *) NULL, (struct buffer *) NULL);
}
#endif
- mrev = xmalloc (strlen (vers->vn_user) + 2);
- sprintf (mrev, "-%s", vers->vn_user);
Register (finfo->entries, finfo->file, mrev, vers->ts_rcs,
vers->options, vers->tag, vers->date, vers->ts_conflict);
free (mrev);
@@ -2327,6 +2372,7 @@ join_file (finfo, vers)
addition. */
if (vers->vn_user == NULL)
{
+ char *saved_options = options;
Vers_TS *xvers;
xvers = Version_TS (finfo, vers->options, jrev2, jdate2, 1, 0);
@@ -2341,6 +2387,7 @@ join_file (finfo, vers)
/* FIXME: If checkout_file fails, we should arrange to
return a non-zero exit status. */
status = checkout_file (finfo, xvers, 1, 0, 1);
+ options = saved_options;
freevers_ts (&xvers);
diff --git a/contrib/cvs/src/update.h b/contrib/cvs/src/update.h
index ba713104a9cb..9a1fc003db91 100644
--- a/contrib/cvs/src/update.h
+++ b/contrib/cvs/src/update.h
@@ -13,6 +13,7 @@
int do_update PROTO((int argc, char *argv[], char *xoptions, char *xtag,
char *xdate, int xforce, int local, int xbuild,
int xaflag, int xprune, int xpipeout, int which,
- char *xjoin_rev1, char *xjoin_rev2, char *preload_update_dir));
+ char *xjoin_rev1, char *xjoin_rev2, char *preload_update_dir,
+ int xdotemplate));
int joining PROTO((void));
extern int isemptydir PROTO ((char *dir, int might_not_exist));
diff --git a/contrib/cvs/src/vers_ts.c b/contrib/cvs/src/vers_ts.c
index 8d552845a034..5524babfb4a1 100644
--- a/contrib/cvs/src/vers_ts.c
+++ b/contrib/cvs/src/vers_ts.c
@@ -322,6 +322,8 @@ time_stamp_server (file, vers_ts, entdata)
cp = ctime (&sb.st_mtime);
cp[24] = 0;
+ /* Fix non-standard format. */
+ if (cp[8] == '0') cp[8] = ' ';
(void) strcpy (vers_ts->ts_user, cp);
}
}
@@ -365,6 +367,8 @@ time_stamp (file)
cp = ctime(&sb.st_mtime);
cp[24] = 0;
+ /* Fix non-standard format. */
+ if (cp[8] == '0') cp[8] = ' ';
(void) strcpy (ts, cp);
}
diff --git a/contrib/cvs/src/version.c b/contrib/cvs/src/version.c
index c8273fb55c55..507061575198 100644
--- a/contrib/cvs/src/version.c
+++ b/contrib/cvs/src/version.c
@@ -12,7 +12,7 @@
#include "cvs.h"
-char *version_string = "Concurrent Versions System (CVS) 1.11";
+char *version_string = "Concurrent Versions System (CVS) 1.11.1p1";
#ifdef CLIENT_SUPPORT
#ifdef SERVER_SUPPORT
@@ -28,12 +28,23 @@ char *config_string = "\n";
#endif
#endif
+
+
static const char *const version_usage[] =
{
"Usage: %s %s\n",
NULL
};
+
+
+/*
+ * Output a version string for the client and server.
+ *
+ * This function will output the simple version number (for the '--version'
+ * option) or the version numbers of the client and server (using the 'version'
+ * command).
+ */
int
version (argc, argv)
int argc;
@@ -45,7 +56,7 @@ version (argc, argv)
usage (version_usage);
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root && current_parsed_root->isremote)
(void) fputs ("Client: ", stdout);
#endif
@@ -56,7 +67,7 @@ version (argc, argv)
(void) fputs (config_string, stdout);
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root && current_parsed_root->isremote)
{
(void) fputs ("Server: ", stdout);
start_server ();
diff --git a/contrib/cvs/src/version.c.in b/contrib/cvs/src/version.c.in
new file mode 100644
index 000000000000..aa2f97f3e8a7
--- /dev/null
+++ b/contrib/cvs/src/version.c.in
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 1994 david d `zoo' zuhn
+ * Copyright (c) 1994 Free Software Foundation, Inc.
+ * 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 this CVS source distribution.
+ *
+ * version.c - the CVS version number
+ */
+
+#include "cvs.h"
+
+char *version_string = "Concurrent Versions System (CVS) @VERSION@";
+
+#ifdef CLIENT_SUPPORT
+#ifdef SERVER_SUPPORT
+char *config_string = " (client/server)\n";
+#else
+char *config_string = " (client)\n";
+#endif
+#else
+#ifdef SERVER_SUPPORT
+char *config_string = " (server)\n";
+#else
+char *config_string = "\n";
+#endif
+#endif
+
+
+
+static const char *const version_usage[] =
+{
+ "Usage: %s %s\n",
+ NULL
+};
+
+
+
+/*
+ * Output a version string for the client and server.
+ *
+ * This function will output the simple version number (for the '--version'
+ * option) or the version numbers of the client and server (using the 'version'
+ * command).
+ */
+int
+version (argc, argv)
+ int argc;
+ char **argv;
+{
+ int err = 0;
+
+ if (argc == -1)
+ usage (version_usage);
+
+#ifdef CLIENT_SUPPORT
+ if (current_parsed_root && current_parsed_root->isremote)
+ (void) fputs ("Client: ", stdout);
+#endif
+
+ /* 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 (config_string, stdout);
+
+#ifdef CLIENT_SUPPORT
+ if (current_parsed_root && current_parsed_root->isremote)
+ {
+ (void) fputs ("Server: ", stdout);
+ start_server ();
+ if (supported_request ("version"))
+ send_to_server ("version\012", 0);
+ else
+ {
+ send_to_server ("noop\012", 0);
+ fputs ("(unknown)\n", stdout);
+ }
+ err = get_responses_and_close ();
+ }
+#endif
+ return err;
+}
+
diff --git a/contrib/cvs/src/watch.c b/contrib/cvs/src/watch.c
index 1a0ecfe61f4b..d86968b0cff4 100644
--- a/contrib/cvs/src/watch.c
+++ b/contrib/cvs/src/watch.c
@@ -308,7 +308,7 @@ watch_addremove (argc, argv)
}
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
start_server ();
ign_setup ();
@@ -348,7 +348,7 @@ watch_addremove (argc, argv)
the_args.setting_default = (argc <= 0);
- lock_tree_for_write (argc, argv, local, 0);
+ lock_tree_for_write (argc, argv, local, W_LOCAL, 0);
err = start_recursion (addremove_fileproc, addremove_filesdoneproc,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
@@ -509,7 +509,7 @@ watchers (argc, argv)
argv += optind;
#ifdef CLIENT_SUPPORT
- if (client_active)
+ if (current_parsed_root->isremote)
{
start_server ();
ign_setup ();
diff --git a/contrib/cvs/src/wrapper.c b/contrib/cvs/src/wrapper.c
index 2d53c7a981dd..039590ad269f 100644
--- a/contrib/cvs/src/wrapper.c
+++ b/contrib/cvs/src/wrapper.c
@@ -96,17 +96,17 @@ void wrap_setup()
wrap_setup_already_done = 1;
#ifdef CLIENT_SUPPORT
- if (!client_active)
+ if (!current_parsed_root->isremote)
#endif
{
char *file;
- file = xmalloc (strlen (CVSroot_directory)
+ file = xmalloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
+ sizeof (CVSROOTADM_WRAPPER)
- + 10);
+ + 3);
/* Then add entries found in repository, if it exists. */
- (void) sprintf (file, "%s/%s/%s", CVSroot_directory, CVSROOTADM,
+ (void) sprintf (file, "%s/%s/%s", current_parsed_root->directory, CVSROOTADM,
CVSROOTADM_WRAPPER);
if (isfile (file))
{
diff --git a/contrib/cvs/stamp-h1.in b/contrib/cvs/stamp-h1.in
new file mode 100644
index 000000000000..9788f70238c9
--- /dev/null
+++ b/contrib/cvs/stamp-h1.in
@@ -0,0 +1 @@
+timestamp
diff --git a/contrib/cvs/tools/ChangeLog b/contrib/cvs/tools/ChangeLog
index 99c3af733fd0..d83619cc76f3 100644
--- a/contrib/cvs/tools/ChangeLog
+++ b/contrib/cvs/tools/ChangeLog
@@ -1,3 +1,20 @@
+2001-04-25 Derek Price <dprice@collab.net>
+
+ * Makefile.in: Regenerated using AM 1.4e as of today at 18:10 -0400.
+
+2001-03-14 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated
+
+2000-12-22 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.in: Regenerated
+
+2000-12-21 Derek Price <derek.price@openavenue.com>
+
+ * Makefile.am: New file needed by Automake
+ * Makefile.in: Regenerated
+
1998-09-09 Jim Kingdon <kingdon@harvey.cyclic.com>
* README: Update now that pcl-cvs is no longer here.
diff --git a/contrib/cvs/tools/Makefile.am b/contrib/cvs/tools/Makefile.am
new file mode 100644
index 000000000000..cf0a073e23ea
--- /dev/null
+++ b/contrib/cvs/tools/Makefile.am
@@ -0,0 +1,21 @@
+## Process this file with automake to produce Makefile.in
+# Makefile for GNU CVS auxiliary tools.
+# Do not use this makefile directly, but only from `../Makefile'.
+# Copyright (C) 1986, 1988-1990, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+EXTRA_DIST = \
+ README .cvsignore
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
diff --git a/contrib/cvs/tools/Makefile.in b/contrib/cvs/tools/Makefile.in
index 752224dc3bad..2e333f7d0c46 100644
--- a/contrib/cvs/tools/Makefile.in
+++ b/contrib/cvs/tools/Makefile.in
@@ -1,6 +1,21 @@
+# Makefile.in generated automatically by automake 1.4e from Makefile.am.
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
# Makefile for GNU CVS auxiliary tools.
# Do not use this makefile directly, but only from `../Makefile'.
-# Copyright (C) 1986, 1988-1990 Free Software Foundation, Inc.
+# Copyright (C) 1986, 1988-1990, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -12,61 +27,202 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-SHELL = /bin/sh
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
+SHELL = @SHELL@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
-# Where to put the manual pages.
-mandir = $(prefix)/man
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
-# Use cp if you don't have install.
INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+AMTAR = @AMTAR@
+AWK = @AWK@
+CC = @CC@
+CSH = @CSH@
+DEPDIR = @DEPDIR@
+ETAGS = @ETAGS@
+ETAGS_INCLUDE_OPTION = @ETAGS_INCLUDE_OPTION@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTALL_STRIP_PROGRAM_ENV = @INSTALL_STRIP_PROGRAM_ENV@
+KRB4 = @KRB4@
+LN_S = @LN_S@
+MAKEINFO = @MAKEINFO@
+PACKAGE = @PACKAGE@
+PERL = @PERL@
+PR = @PR@
+PS2PDF = @PS2PDF@
+RANLIB = @RANLIB@
+ROFF = @ROFF@
+STRIP = @STRIP@
+TEXI2DVI = @TEXI2DVI@
+VERSION = @VERSION@
+YACC = @YACC@
+_am_include = @_am_include@
+_am_quote = @_am_quote@
+includeopt = @includeopt@
+install_sh = @install_sh@
+
+EXTRA_DIST = \
+ README .cvsignore
+
+EXEEXT =
+OBJEXT = o
+subdir = tools
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/src/options.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
+DIST_COMMON = README ChangeLog Makefile.am Makefile.in
+all: all-am
+
+.SUFFIXES:
+
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu tools/Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && \
+ CONFIG_HEADERS= CONFIG_LINKS= \
+ CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status
+tags: TAGS
+TAGS:
-DISTFILES = ChangeLog README .cvsignore Makefile.in
-all: Makefile
-.PHONY: all
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-install: all
- @echo "pcl-cvs not installed"
-.PHONY: install
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ d=$(srcdir); \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile
installdirs:
-.PHONY: installdirs
-tags:
-.PHONY: tags
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
-TAGS:
-.PHONY: TAGS
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-ls:
- @echo $(DISTFILES)
-.PHONY: ls
+installcheck: installcheck-am
-clean:
- rm -f *.o core
-.PHONY: clean
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
-distclean: clean
- rm -f Makefile
-.PHONY: distclean
+mostlyclean-generic:
-realclean: distclean
-.PHONY: realclean
+clean-generic:
-dist-dir:
- mkdir ${DISTDIR}
- for i in ${DISTFILES}; do \
- ln $(srcdir)/$${i} ${DISTDIR}; \
- done
-.PHONY: dist-dir
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-subdir = tools
-Makefile: ../config.status Makefile.in
- cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -rm -f Makefile.in
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-generic
+
+dvi:
+
+dvi-am:
+
+info:
+
+info-am:
+
+install-data-am:
+
+install-exec-am:
+
+install-info:
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am info info-am install \
+ install-am install-data install-data-am install-exec \
+ install-exec-am install-info install-man install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ uninstall uninstall-am
+
+
+# for backwards compatibility with the old makefiles
+realclean: maintainer-clean
+.PHONY: realclean
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT: