home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-08-02 | 152.4 KB | 4,887 lines |
- Index: diff/ChangeLog
- ===================================================================
- RCS file: e:/cvsroot/ccvs/diff/ChangeLog,v
- retrieving revision 1.4
- retrieving revision 1.2.2.4
- diff -c -r1.4 -r1.2.2.4
- *** diff/ChangeLog 1998/07/13 15:24:46 1.4
- --- diff/ChangeLog 1998/07/16 00:03:40 1.2.2.4
- ***************
- *** 8,13 ****
- --- 8,18 ----
- than printf_output callback.
- * diff3.c (read_diff): Don't set my_callbacks.printf_output.
-
- + 1998-06-22 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + * diff3.c (diff3_run): disconnect stdin from infile after
- + output_diff3_merge.
- +
- Thu Jun 18 12:43:53 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * diffrun.h: New file.
- ***************
- *** 46,51 ****
- --- 51,61 ----
- * side.c: Likewise.
- * Makefile.in (SOURCES): Add diffrun.h.
- ($(OBJECTS)): Depend upon diffrun.h.
- +
- + Fri May 29 13:30:00 1998 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + * diff.c (compare_files) [__EMX__]: Cope with "nul" file under
- + OS/2 EMX using the hack from emx port of gnu diffutils.
-
- Fri Jan 16 14:58:19 1998 Larry Jones <larry.jones@sdrc.com>
-
- Index: diff/diff.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/diff/diff.c,v
- retrieving revision 1.3
- retrieving revision 1.2.2.2
- diff -c -r1.3 -r1.2.2.2
- *** diff/diff.c 1998/06/23 15:31:06 1.3
- --- diff/diff.c 1998/06/23 21:04:36 1.2.2.2
- ***************
- *** 1011,1016 ****
- --- 1011,1032 ----
- else
- stat_result = stat (inf[i].name, &inf[i].stat);
-
- + /* EMX bug - we can't stat("nul",&sb),
- + * (but can fd = open("nul",...), fstat(fd,&sb)
- + * - but that doesn't really help us pass death2-diff-2 in sanity.sh
- + * The kludge below is from the emx port of GNU diffutils
- + */
- + #ifdef __EMX__
- + /* HACK: Treat 'nul' as a nonexistent file. */
- + if (stat_result != 0 && errno == EINVAL
- + && stricmp (inf[i].name, "nul") == 0)
- + {
- + stat_result = 0;
- + inf[i].desc = -1;
- + }
- + #endif /*__EMX__*/
- +
- +
- if (stat_result != 0)
- {
- perror_with_name (inf[i].name);
- Index: diff/diff3.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/diff/diff3.c,v
- retrieving revision 1.4
- retrieving revision 1.2.2.3
- diff -c -r1.4 -r1.2.2.3
- *** diff/diff3.c 1998/07/13 15:24:47 1.4
- --- diff/diff3.c 1998/07/16 00:03:40 1.2.2.3
- ***************
- *** 459,464 ****
- --- 459,475 ----
- tag_strings[0], tag_strings[1], tag_strings[2]);
- else if (merge)
- {
- + /* On Windows-NT 4.0 Service Pack 3, Novell Intranetware Client 4.11a,
- + Microsoft Visual C++ 4.2,
- + not disconnecting stdin from the disk file causes failure to
- + open( , O_CREAT | O_TRUNC ...) windows-NT/filesubr.c(copy_file)
- + in sanity.sh test conflicts-130.
- + (there is no problem with tests on local NTFS disk)
- +
- + work around by using dup */
- +
- + int stdin_save = dup(0);
- +
- if (! freopen (file[rev_mapping[FILE0]], "r", stdin))
- diff3_perror_with_exit (file[rev_mapping[FILE0]]);
- conflicts_found
- ***************
- *** 466,471 ****
- --- 477,489 ----
- tag_strings[0], tag_strings[1], tag_strings[2]);
- if (ferror (stdin))
- diff3_fatal ("read error");
- +
- + /* close file[rev_mapping[FILE0]], re-connect stdin to where it was
- + before freopen. */
- + dup2( stdin_save, 0 );
- +
- + /* give handle back to os */
- + close( stdin_save );
- }
- else
- {
- Index: lib/ChangeLog
- ===================================================================
- RCS file: e:/cvsroot/ccvs/lib/ChangeLog,v
- retrieving revision 1.5
- retrieving revision 1.5.2.3
- diff -c -r1.5 -r1.5.2.3
- *** lib/ChangeLog 1998/05/31 01:12:22 1.5
- --- lib/ChangeLog 1998/07/16 00:05:08 1.5.2.3
- ***************
- *** 1,6 ****
- --- 1,24 ----
- + 1998-05-31 Andreas Huber <ahuber@ping.at>
- +
- + * system.h: Added the CVS_CHMOD macro to allow for platform-
- + specific behaviour.
- +
- + 1998-05-27 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + * getdate.y (get_date): Use (Start == -1) rather than (Start < 0)
- + so that Convert failures are detected when time_t is unsigned
- + (as it is on EMX gcc port).
- +
- Tue Mar 24 16:08:00 1998 Ian Lance Taylor <ian@cygnus.com>
-
- * Makefile.in (CFLAGS): Set to @CFLAGS@, not -g.
- +
- + 1998-05-19 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + Murray Bishop applies the Andreas Huber <ahuber.ping.at>
- + patches for cvs-1.9.27
- +
- + * system.h (CVS_CHMOD): Define as chmod if undefined.
-
- 1998-02-20 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- Index: lib/getdate.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/lib/getdate.c,v
- retrieving revision 1.1
- retrieving revision 1.1.2.1
- diff -c -r1.1 -r1.1.2.1
- *** lib/getdate.c 1998/05/31 00:45:18 1.1
- --- lib/getdate.c 1998/06/23 21:04:58 1.1.2.1
- ***************
- *** 991,997 ****
- if (yyHaveDate || yyHaveTime || yyHaveDay) {
- Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds,
- yyMeridian, yyDSTmode);
- ! if (Start < 0)
- return -1;
- }
- else {
- --- 991,997 ----
- if (yyHaveDate || yyHaveTime || yyHaveDay) {
- Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds,
- yyMeridian, yyDSTmode);
- ! if (Start == -1)
- return -1;
- }
- else {
- Index: lib/getdate.y
- ===================================================================
- RCS file: e:/cvsroot/ccvs/lib/getdate.y,v
- retrieving revision 1.1
- retrieving revision 1.1.2.1
- diff -c -r1.1 -r1.1.2.1
- *** lib/getdate.y 1998/05/31 00:45:18 1.1
- --- lib/getdate.y 1998/06/23 21:05:00 1.1.2.1
- ***************
- *** 977,983 ****
- if (yyHaveDate || yyHaveTime || yyHaveDay) {
- Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds,
- yyMeridian, yyDSTmode);
- ! if (Start < 0)
- return -1;
- }
- else {
- --- 977,983 ----
- if (yyHaveDate || yyHaveTime || yyHaveDay) {
- Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds,
- yyMeridian, yyDSTmode);
- ! if (Start == -1)
- return -1;
- }
- else {
- Index: lib/system.h
- ===================================================================
- RCS file: e:/cvsroot/ccvs/lib/system.h,v
- retrieving revision 1.4
- retrieving revision 1.4.2.1
- diff -c -r1.4 -r1.4.2.1
- *** lib/system.h 1998/05/31 01:07:33 1.4
- --- lib/system.h 1998/05/31 02:10:12 1.4.2.1
- ***************
- *** 469,474 ****
- --- 469,478 ----
- #define CVS_FNMATCH fnmatch
- #endif
-
- + #ifndef CVS_CHMOD
- + #define CVS_CHMOD chmod
- + #endif
- +
- #if defined (__CYGWIN32__) || defined (WIN32)
-
- /* Under Windows NT, filenames are case-insensitive, and both / and \
- Index: src/ChangeLog
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/ChangeLog,v
- retrieving revision 1.13
- retrieving revision 1.5.2.17
- diff -c -r1.13 -r1.5.2.17
- *** src/ChangeLog 1998/07/29 07:12:15 1.13
- --- src/ChangeLog 1998/08/01 16:21:05 1.5.2.17
- ***************
- *** 1,3 ****
- --- 1,21 ----
- + 1998-08-01 Andreas Huber <ahuber@ping.at>
- +
- + * server.c: Moved the definition of 'kopt' above receive_file.
- + (receive_file) Check kopt in case Entries is not yet available
- + (e.g. import) to see if the file needs to be opened in binary
- + mode. Corrected a minor style fauxpas.
- +
- + 1998-07-31 Andreas Huber <ahuber@ping.at>
- +
- + * sanity.sh:
- + Don't convert slashes to sloshes for CVS_SERVER. Instead,
- + require that rshd uses a unixy shell to run commands.
- +
- + * sanity.sh:
- + Early detection of OS_COMPILER_EMU so we can add additional flags
- + to the rsh detection if required by the OS (OS/2 needs a -b).
- + CVS_SERVER needs slashes converted to sloshes on some OS's.
- +
- Tue Jul 28 19:33:08 1998 Noel Cragg <noel@swish.red-bean.com>
-
- * version.c: Change version number to 1.9.29.
- ***************
- *** 5,10 ****
- --- 23,38 ----
- * rcs.c (RCS_checkin): add code to follow symbolic links in the
- repository.
-
- + 1998-07-27 Andreas Huber <ahuber@ping.at>
- +
- + * server.c (dirswitch): Check for an absolute path before trying to
- + create the directory. This is necessary for platforms, where
- + a path may contain a drive specification. It avoids a bogus
- + message for an error that is caught later in server_pathname_check().
- +
- + * client.c (send_a_repository): Use isabsolute() to check update_dir
- + for an absolute path.
- +
- Sun Jul 26 05:14:41 1998 Noel Cragg <noel@swish.red-bean.com>
-
- * This set of changes reverts the code to pre-1.9.2 behavior and
- ***************
- *** 72,77 ****
- --- 100,127 ----
- * build_src.com (rcscmds.c): Also look for include files in
- [-.diff], just like Ian's 1998-06-18 change to Makefile.in
-
- + 1998-07-16 Andreas Huber <ahuber@ping.at>
- +
- + * sanity.sh:
- + Applied Murray Bishop's <mbishop@acnielsen.com.au> patches.
- + (unedit_without_baserev-4, unedit_without_baserev-14)
- + Replaced "revert changes?" by "revert changes." to make the EMX port
- + of GNU expr from sh-utils 1.12 happy.
- + (unedit_without_baserev-5) Disabled the SunOS4.1.4 test
- + for CVS/Entries corruption.
- +
- + * update.c (do_update), client.c (get_reponses_and_close),
- + commit.c (commit):
- + Fixed a bug with code that was supposed to avoid time-stamp
- + races but didn't under specific circumstances.
- +
- + * cvs.h: Applied Murray Bishop's <mbishop@acnielsen.com.au> patches.
- +
- + 1998-07-15 Andreas Huber <ahuber@ping.at>
- +
- + * update.c, sanity.sh, commit.c, cvs.h, client.c:
- + Applied Murray Bishop's <mbishop@acnielsen.com.au> patches.
- +
- 1998-07-14 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * tag.c (pretag_proc), rtag.c (pretag_proc): Don't pass RUN_REALLY
- ***************
- *** 83,88 ****
- --- 133,177 ----
- happen.
- * sanity.sh (taginfo): New tests taginfo-11 to taginfo-13, for this.
-
- + 1998-07-13 Andreas Huber <ahuber@ping.at>
- +
- + * server.c (receive_file):
- + Shut up a warning about variables that might be used
- + uninitialized.
- +
- + 1998-07-13 Andreas Huber <ahuber@ping.at>
- +
- + * sanity.sh: Changed /tmp to ${TMPDIR}.
- + Changed argument parsing to accept drive specifications for
- + the CVS executable.
- + EDHACK_EDITOR is no longer necessary.
- + Added :local: to repository specifications.
- + (editor) Changed to sleep two seconds instead of one to avoid
- + time-stamp races on platforms where the time-stamp resolution
- + is two seconds.
- +
- + * server.c (receive_file):
- + The server writes the files it receives from
- + the client to the temporary directory using the default binary
- + translation mode. While this works on *nix platforms, it certainly
- + doesn't on OS/2. 'Entries' is now searched for a -kb to determine
- + the proper translation mode before creating the file.
- + (server_updated) The server writes the files it is about to send to
- + the client to the temporary directory using the proper translation
- + mode (in RCS_checkout), but reads the file in binary mode. The file
- + is now read in the same mode it was written. finfo->rcs->expand is
- + examined to determine the proper translation mode.
- +
- + * logmsg.c (logfile_write):
- + Changed the quoting character back to `'∩. Quoting
- + is now handled correctly by os2_popen().
- +
- + * client.c (get_responses_and_close), commit.c (commit),
- + update.c (do_update):
- + Changed to sleep two seconds instead of one to avoid time-stamp
- + races. This is required for platforms where the time-stamp
- + resolution is two seconds (e.g. OS/2).
- +
- 1998-07-12 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * sanity.sh (ann-id): Write the test so that it tests for the
- ***************
- *** 120,125 ****
- --- 209,232 ----
- you version 1.1 of the working file and put 1.2 in CVS/Entries.
- * sanity.sh (unedit-without-baserev): New tests test for this.
-
- + 1998-07-07 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + * sanity.sh: Make local mode mostly runnable on various platforms :
- + - Windows-NT with cygwin32 b19.1
- + - Windows-95 with MKS Toolkit
- + - OS/2 with EMX
- + (and test local mode on Linux too)
- + * cvs.h [FILESYSTEM_TICK]: Define as 1 (second) unless defined.
- +
- + 1998-07-06 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + * client.c(get_responses_and_close): Wait FILESYSTEM_TICK
- + instead of 1 second to avoid time-stamp races.
- + * commit.c(commit): Wait FILESYSTEM_TICK
- + instead of 1 second to avoid time-stamp races.
- + * update.c(do_update): Wait FILESYSTEM_TICK
- + instead of 1 second to avoid time-stamp races.
- +
- 1998-07-02 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * sanity.sh (unedit-without-baserev): Move the test itself to be
- ***************
- *** 187,192 ****
- --- 294,323 ----
-
- * sanity.sh (modes2): Touch the file before chmod'ing it.
-
- + 1998-06-23 Andreas Huber <ahuber@ping.at>
- +
- + * server.c (mkdir_p): Search for the first occurrence of '/' instead
- + of just skipping the first character. This is required for platforms,
- + where absolute path names do not necessarily start with a '/'.
- +
- + * server.c (serve_root): Added a :local: prefix for platforms, where a
- + path may contain ':'.
- +
- + * server.c (receive_file): Look up the file in Entries first to see if
- + it has a '-kb' option attached to it. Then create the file accordingly.
- +
- + * server.c (server_updated): Look at finfo->rcs->expand first, to see
- + if it includes a '-kb'. If it does, open the file in binary mode. We
- + also need to use buf_read_file_to_eof() and buf_chain_length() now.
- +
- + * logmsg.c (logfile_write): Changed the quoting character from
- + `'∩ to `"∩.
- +
- + * expand_path.c (expand_variable): Replaced CVSroot_original by
- + CVSroot_directory, since former may include the access method.
- + This is for platforms, where paths may contain ':' and a :local:
- + prefix is required.
- +
- 1998-06-21 Ian Lance Taylor <ian@cygnus.com>
-
- * update.c (merge_files): Revert changes of 1998-06-19. Instead,
- ***************
- *** 229,234 ****
- --- 360,374 ----
- directory.
- (zlib.o): Depend upon zlib.h.
-
- + 1998-06-16 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + * sanity.sh: Modify to run test for windows-NT using cygwin32
- + with compiler MS Visual C++ 4.2.
- +
- + 1998-06-12 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + * sanity.sh: Modify as was run for OS/2 EMX testing.
- +
- 1998-06-09 Mike Sutton@SAIC
-
- Make it compile with Sun's bundled K&R C compiler:
- ***************
- *** 276,287 ****
- --- 416,456 ----
-
- * sanity.sh (tag8k): Add a test for the 1998-05-02 rcs.c bug fix.
-
- + 1998-05-31 Andreas Huber <ahuber@ping.at>
- +
- + * client.c, commit.c, filesubr.c, import.c, rcs.c, update.c:
- + Replaced all occurrences of chmod() by CVS_CHMOD().
- +
- + * client.c (start_rsh_server) [START_RSH_WITH_POPEN_RW]:
- + Slightly reordered the arguments to rsh to match the ordering in the
- + !START_RSH_WITH_POPEN_RW case.
- +
- + * client.c (start_rsh_server) [!START_RSH_WITH_POPEN_RW,
- + RSH_NEEDS_BINARY]: Added missing '-b' to the rsh argument list.
- +
- + * filesubr.c: Replaced one occurrence of rename() by CVS_RENAME().
- +
- + * rcs.c, rcs.h: Added two new functions: RCS_get_cached() and
- + RCS_cache_close(). On some platforms, it is not possible to rename()
- + or chmod() open files. The new functions are used to check if a
- + particular file is currently kept open in the RCS cache and to close
- + it, if necessary.
- +
- + * server.c (server) [RSHD_NOT_TRANSPARENT]: On some platforms with a
- + non-tranparent rshd, the standard handles need to be switched to
- + binary mode.
- +
- 1998-05-26 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * rcs.c (annotate): Call tag_check_valid like the other functions
- which have a -r option.
- * sanity.sh (ann): New test ann-14 tests for this.
-
- + 1998-05-25 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + * commit.c (commit): Open the -F logfile in text rather than
- + binary mode to pass log-11 and keywordlog-7 under OS/2 EMX.
- +
- 1998-05-24 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * sanity.sh (importc): New tests importc-5 through importc-8 test
- ***************
- *** 318,323 ****
- --- 487,519 ----
- * wrapper.c (wrap_add): Disable -t/-f wrappers at least until the
- serious bug can be fixed.
-
- + 1998-05-19 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + * sanity.sh: Modify to run for OS/2 EMX testing.
- + * commit.c (commit): Open the -F logfile in text rather than
- + binary mode to pass log-11 and keywordlog-7 under OS/2 EMX.
- + * parseinfo.c (parse_config): have fp_info closed before
- + returning, even if goto error_return happened. Pass config-5.
- +
- + 1998-05-19 Murray Bishop <mbishop@acnielsen.com.au>
- +
- + Murray Bishop applies the Andreas Huber <ahuber.ping.at>
- + patches for cvs-1.9.27
- +
- + * client.c (change_mode) [!CHMOD_BROKEN]: Call CVS_CHMOD
- + instead of chmod.
- + * client.c (start_rsh_server): Move -b flag after hostname.
- + * commit.c (fix_rcs_modes): Use CVS_CHMOD in place of chmod.
- + * filesubr.c (xchmod): Use CVS_CHMOD in place of chmod.
- + * filesubr.c (rename_file): Use CVS_RENAME in place of rename.
- + * import.c (add_rcs_file): Use CVS_CHMOD in place of chmod.
- + * rcs.c (RCS_checkout): Use CVS_CHMOD in place of chmod.
- + * rcs.c (RCS_get_cached): Add function.
- + * rcs.c (RCS_cache_close): Add function.
- + * rcs.h: add prototypes for RCS_get_cached and RCS_cache_close.
- + * server.c (server): Set stdin, stdout, stderr into binary mode.
- + * update.c (patch_file): Use CVS_CHMOD in place of chmod.
- +
- 1998-05-15 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * checkout.c (checkout): Call server_pathname_check on the
- Index: src/client.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/client.c,v
- retrieving revision 1.7
- retrieving revision 1.5.2.6
- diff -c -r1.7 -r1.5.2.6
- *** src/client.c 1998/07/27 10:17:13 1.7
- --- src/client.c 1998/07/27 15:26:00 1.5.2.6
- ***************
- *** 301,307 ****
- mode &= ~oumask;
- }
-
- ! if (chmod (filename, mode) < 0)
- return errno;
- return 0;
- #endif /* ! CHMOD_BROKEN */
- --- 301,307 ----
- mode &= ~oumask;
- }
-
- ! if (CVS_CHMOD (filename, mode) < 0)
- return errno;
- return 0;
- #endif /* ! CHMOD_BROKEN */
- ***************
- *** 2746,2752 ****
- * sure it matters what toplevel_repos we get, but it does
- * matter that we don't hit the "internal error" code below).
- */
- ! if (update_dir[0] == '/')
- toplevel_repos = Name_Repository (update_dir, update_dir);
- else
- {
- --- 2746,2752 ----
- * sure it matters what toplevel_repos we get, but it does
- * matter that we don't hit the "internal error" code below).
- */
- ! if (isabsolute (update_dir))
- toplevel_repos = Name_Repository (update_dir, update_dir);
- else
- {
- ***************
- *** 3405,3412 ****
- time_t now;
-
- (void) time (&now);
- ! if (now == last_register_time)
- ! sleep (1); /* to avoid time-stamp races */
- }
-
- return errs;
- --- 3405,3415 ----
- time_t now;
-
- (void) time (&now);
- ! if (now < last_register_time + FILESYSTEM_TICK)
- ! {
- ! /* to avoid time-stamp races */
- ! sleep (last_register_time + FILESYSTEM_TICK - now);
- ! }
- }
-
- return errs;
- ***************
- *** 4439,4444 ****
- --- 4442,4448 ----
-
- /* The command line starts out with rsh. */
- rsh_argv[i++] = cvs_rsh;
- + rsh_argv[i++] = CVSroot_hostname;
-
- #ifdef RSH_NEEDS_BINARY_FLAG
- /* "-b" for binary, under OS/2. */
- ***************
- *** 4452,4458 ****
- rsh_argv[i++] = CVSroot_username;
- }
-
- - rsh_argv[i++] = CVSroot_hostname;
- rsh_argv[i++] = cvs_server;
- rsh_argv[i++] = "server";
-
- --- 4456,4461 ----
- ***************
- *** 4514,4519 ****
- --- 4517,4527 ----
-
- *p++ = cvs_rsh;
- *p++ = CVSroot_hostname;
- +
- + #ifdef RSH_NEEDS_BINARY_FLAG
- + /* "-b" for binary, under OS/2. */
- + *p++ = "-b";
- + #endif /* RSH_NEEDS_BINARY_FLAG */
-
- /* If the login names differ between client and server
- * pass it on to rsh.
- Index: src/commit.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/commit.c,v
- retrieving revision 1.5
- retrieving revision 1.4.2.5
- diff -c -r1.5 -r1.4.2.5
- *** src/commit.c 1998/05/31 01:18:38 1.5
- --- src/commit.c 1998/07/16 00:33:54 1.4.2.5
- ***************
- *** 423,430 ****
- if (saved_message)
- error (1, 0, "cannot specify both a message and a log file");
-
- ! /* FIXME: Why is this binary? Needs more investigation. */
- ! if ((logfd = CVS_OPEN (logfile, O_RDONLY | OPEN_BINARY)) < 0)
- error (1, errno, "cannot open log file %s", logfile);
-
- if (fstat(logfd, &statbuf) < 0)
- --- 423,434 ----
- if (saved_message)
- error (1, 0, "cannot specify both a message and a log file");
-
- ! /* What we have here is the name of file whose contents are
- ! * the log message. I guess it's better to open text mode for
- ! * those OS where it makes a difference.
- ! * (sanity.sh probably works better on EMX OS/2 with text mode)
- ! */
- ! if ((logfd = CVS_OPEN (logfile, O_RDONLY)) < 0)
- error (1, errno, "cannot open log file %s", logfile);
-
- if (fstat(logfd, &statbuf) < 0)
- ***************
- *** 673,681 ****
- time_t now;
-
- (void) time (&now);
- ! if (now == last_register_time)
- {
- ! sleep (1); /* to avoid time-stamp races */
- }
- }
-
- --- 677,686 ----
- time_t now;
-
- (void) time (&now);
- ! if (now < last_register_time + FILESYSTEM_TICK)
- {
- ! /* to avoid time-stamp races */
- ! sleep (last_register_time + FILESYSTEM_TICK - now);
- }
- }
-
- ***************
- *** 2326,2332 ****
- if (sb.st_mode & S_IXUSR)
- rcs_mode |= S_IXUSR | S_IXGRP | S_IXOTH;
- rcs_mode &= ~cvsumask;
- ! if (chmod (rcs, rcs_mode) < 0)
- error (0, errno, "warning: cannot change mode of %s", rcs);
- }
-
- --- 2331,2337 ----
- if (sb.st_mode & S_IXUSR)
- rcs_mode |= S_IXUSR | S_IXGRP | S_IXOTH;
- rcs_mode &= ~cvsumask;
- ! if (CVS_CHMOD (rcs, rcs_mode) < 0)
- error (0, errno, "warning: cannot change mode of %s", rcs);
- }
-
- Index: src/cvs.h
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/cvs.h,v
- retrieving revision 1.7
- retrieving revision 1.5.2.3
- diff -c -r1.7 -r1.5.2.3
- *** src/cvs.h 1998/07/27 10:17:14 1.7
- --- src/cvs.h 1998/07/27 15:26:00 1.5.2.3
- ***************
- *** 866,868 ****
- --- 866,885 ----
- #if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT)
- #include "server.h"
- #endif
- +
- +
- + /*
- + * In various places, CVS waits a tick of the filesystem clock to make
- + * sure that files have different timestamps. This was coded as sleep (1).
- + * For some filesystems (eg FAT, FAT32) 2 seconds are needed.
- + * I've defined FILESYSTEM_TICK in windows-NT/options.h,
- + * and in src/cvs.h a default of 1 second is defined.
- + *
- + * I'm pretty sure that CVS doesn't do enough waiting, but it's too
- + * hard for me to figure out where to add more.
- + * See sanity.sh [FILESYSTEM_TICK] for more information.
- + */
- + #ifndef FILESYSTEM_TICK
- + #define FILESYSTEM_TICK 1
- + #endif
- +
- Index: src/expand_path.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/expand_path.c,v
- retrieving revision 1.1
- retrieving revision 1.1.2.1
- diff -c -r1.1 -r1.1.2.1
- *** src/expand_path.c 1998/05/31 00:45:30 1.1
- --- src/expand_path.c 1998/06/23 10:43:18 1.1.2.1
- ***************
- *** 269,275 ****
- int line;
- {
- if (strcmp (name, CVSROOT_ENV) == 0)
- ! return CVSroot_original;
- else if (strcmp (name, "RCSBIN") == 0)
- {
- error (0, 0, "RCSBIN internal variable is no longer supported");
- --- 269,275 ----
- int line;
- {
- if (strcmp (name, CVSROOT_ENV) == 0)
- ! return CVSroot_directory;
- else if (strcmp (name, "RCSBIN") == 0)
- {
- error (0, 0, "RCSBIN internal variable is no longer supported");
- Index: src/filesubr.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/filesubr.c,v
- retrieving revision 1.4
- retrieving revision 1.3.2.2
- diff -c -r1.4 -r1.3.2.2
- *** src/filesubr.c 1998/05/31 01:18:40 1.4
- --- src/filesubr.c 1998/06/23 10:28:24 1.3.2.2
- ***************
- *** 388,394 ****
- if (noexec)
- return;
-
- ! if (chmod (fname, mode) < 0)
- error (0, errno, "cannot change mode of file %s", fname);
- }
-
- --- 388,394 ----
- if (noexec)
- return;
-
- ! if (CVS_CHMOD (fname, mode) < 0)
- error (0, errno, "cannot change mode of file %s", fname);
- }
-
- ***************
- *** 410,416 ****
- if (noexec)
- return;
-
- ! if (rename (from, to) < 0)
- error (1, errno, "cannot rename file %s to %s", from, to);
- }
-
- --- 410,416 ----
- if (noexec)
- return;
-
- ! if (CVS_RENAME (from, to) < 0)
- error (1, errno, "cannot rename file %s to %s", from, to);
- }
-
- Index: src/import.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/import.c,v
- retrieving revision 1.5
- retrieving revision 1.5.2.1
- diff -c -r1.5 -r1.5.2.1
- *** src/import.c 1998/05/31 01:12:48 1.5
- --- src/import.c 1998/05/31 02:10:18 1.5.2.1
- ***************
- *** 1315,1321 ****
- (sb.st_mode & S_IRWXU) >> 6) &
- ~cvsumask &
- ~(S_IWRITE | S_IWGRP | S_IWOTH);
- ! if (chmod (rcs, mode) < 0)
- {
- ierrno = errno;
- if (add_logfp != NULL)
- --- 1315,1321 ----
- (sb.st_mode & S_IRWXU) >> 6) &
- ~cvsumask &
- ~(S_IWRITE | S_IWGRP | S_IWOTH);
- ! if (CVS_CHMOD (rcs, mode) < 0)
- {
- ierrno = errno;
- if (add_logfp != NULL)
- Index: src/parseinfo.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/parseinfo.c,v
- retrieving revision 1.3
- retrieving revision 1.2.2.2
- diff -c -r1.3 -r1.2.2.2
- *** src/parseinfo.c 1998/07/27 10:17:14 1.3
- --- src/parseinfo.c 1998/07/27 15:26:01 1.2.2.2
- ***************
- *** 205,211 ****
- char *cvsroot;
- {
- char *infopath;
- ! FILE *fp_info;
- char *line = NULL;
- size_t line_allocated = 0;
- size_t len;
- --- 205,211 ----
- char *cvsroot;
- {
- char *infopath;
- ! FILE *fp_info = NULL; /* look like fopen failed */
- char *line = NULL;
- size_t line_allocated = 0;
- size_t len;
- ***************
- *** 392,397 ****
- --- 392,401 ----
- return 0;
-
- error_return:
- + if (fp_info != NULL)
- + {
- + fclose( fp_info );
- + }
- if (infopath != NULL)
- free (infopath);
- if (line != NULL)
- Index: src/rcs.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/rcs.c,v
- retrieving revision 1.11
- retrieving revision 1.5.2.7
- diff -c -r1.11 -r1.5.2.7
- *** src/rcs.c 1998/07/29 07:12:16 1.11
- --- src/rcs.c 1998/07/29 11:54:34 1.5.2.7
- ***************
- *** 4630,4636 ****
- workfile);
- }
-
- ! ret = chmod (workfile,
- change_rcs_mode
- ? rcs_mode
- : sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH));
- --- 4630,4636 ----
- workfile);
- }
-
- ! ret = CVS_CHMOD (workfile,
- change_rcs_mode
- ? rcs_mode
- : sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH));
- ***************
- *** 4641,4647 ****
- return 1;
- }
-
- ! ret = chmod (workfile,
- sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH));
- #endif
- if (ret < 0)
- --- 4641,4647 ----
- return 1;
- }
-
- ! ret = CVS_CHMOD (workfile,
- sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH));
- #endif
- if (ret < 0)
- ***************
- *** 8656,8658 ****
- --- 8656,8670 ----
- return label;
- }
-
- + FILE* RCS_get_cached (name)
- + const char* name;
- + {
- + return cached_rcs != NULL &&
- + strcmp (cached_rcs->path, name) == 0 ?
- + cached_rcsbuf.fp : NULL;
- + }
- +
- + void RCS_cache_close ()
- + {
- + rcsbuf_cache_close ();
- + }
- Index: src/rcs.h
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/rcs.h,v
- retrieving revision 1.3
- retrieving revision 1.3.2.1
- diff -c -r1.3 -r1.3.2.1
- *** src/rcs.h 1998/05/31 01:12:54 1.3
- --- src/rcs.h 1998/05/31 02:10:22 1.3.2.1
- ***************
- *** 236,238 ****
- --- 236,241 ----
- extern int add_rcs_file PROTO ((char *, char *, char *, char *, char *,
- char *, char *, int, char **,
- char *, size_t, FILE *));
- +
- + FILE* RCS_get_cached PROTO ((const char *));
- + void RCS_cache_close PROTO ((void));
- Index: src/sanity.sh
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/sanity.sh,v
- retrieving revision 1.12
- retrieving revision 1.5.2.13
- diff -c -r1.12 -r1.5.2.13
- *** src/sanity.sh 1998/07/27 10:17:16 1.12
- --- src/sanity.sh 1998/07/31 15:09:31 1.5.2.13
- ***************
- *** 43,52 ****
- # required to make this script work properly.
- unset CVSREAD
-
- ! # 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
- --- 43,52 ----
- # required to make this script work properly.
- unset CVSREAD
-
- ! # The default value of ${TMPDIR}/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 ${TMPDIR}/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
- ***************
- *** 59,77 ****
- # 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.
- ! TESTDIR=${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
- # 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
- --- 59,93 ----
- # 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.
- ! TESTDIR=${TESTDIR:-${TMPDIR}/cvs-sanity}
-
- # "debugger"
- #set -x
-
- echo 'This test should produce no other output than this line, and a final "OK".'
-
- + # FIXME: The detection of OS_COMPILER_EMU only tests for OS.
- + # Is there some way to tell what compiled cvs? If so, then things
- + # like cygwin32 compiled cvs might be handled.
- +
- + OS_COMPILER_EMU=""
- + if test x"${OS2_SHELL}" != x; then
- + OS_COMPILER_EMU="os2_gcc_emx"
- + RSH_FLAGS="-b"
- + fi
- + if test x"${OS}" = x"Windows_NT"; then
- + OS_COMPILER_EMU="win32_msvc_cygwin32"
- + fi
- + if test "x`uname`" = "xWindows_95"; then
- + OS_COMPILER_EMU="win95_msvc_mks"
- + fi
- +
- if test x"$1" = x"-r"; then
- shift
- remote=yes
- # If we're going to do remote testing, make sure 'rsh' works first.
- host="`hostname`"
- ! if test "x`${CVS_RSH-rsh} $host $RSH_FLAGS -n 'echo hi'`" != "xhi"; then
- echo "ERROR: cannot test remote CVS, because \`rsh $host' fails." >&2
- exit 1
- fi
- ***************
- *** 80,86 ****
- 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.
- --- 96,102 ----
- fi
-
- # The --keep option will eventually cause all the tests to leave around the
- ! # contents of the ${TMPDIR} 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.
- ***************
- *** 94,100 ****
- # Use full path for CVS executable, so that CVS_SERVER gets set properly
- # for remote.
- case $1 in
- ! /*)
- testcvs=$1
- ;;
- *)
- --- 110,116 ----
- # Use full path for CVS executable, so that CVS_SERVER gets set properly
- # for remote.
- case $1 in
- ! /*|[a-zA-Z]:/*)
- testcvs=$1
- ;;
- *)
- ***************
- *** 129,134 ****
- --- 145,324 ----
- fi
- fi
-
- +
- +
- +
- + # Here are a bunch of things that let sanity.sh run better on EMX
- + # and on windows-NT.
- +
- + case $OS_COMPILER_EMU in
- + os2_gcc_emx)
- + echo "Bending sanity.sh for ${OS_COMPILER_EMU}"
- +
- + # Regexp to match the name of a temporary file (from cvs_temp_name).
- + # redefine to allow colon
- + tempname="[-a-zA-Z0-9/.%_:]*"
- +
- + # when asked `type -p sh`, pd korn shell for OS/2 5.27 says
- + # "sh is a tracked alias for d:\gnu\bin/sh.exe"
- + TESTSHELL=sh
- +
- + # On OS/2 and Windows-NT, we can't make directories readonly with
- + # chmod -w
- + # When the line below is uncommented, test needing that are not run
- + CANT_PROTECT_DIRS=1
- +
- + # On OS/2 and Windows-NT, sometimes we can't run shell scripts by
- + # naming them.
- + # When the line below is uncommented, hack around such problems
- + # Andreas Huber says when he is finished his port of 1.9.28.1
- + # scripts will run ok.
- + CANT_RUN_SCRIPTS=1
- +
- + # On OS/2 with EMX, invoke edhack.exe instead of a shell script editme
- + # You'll need edhack.exe on your path for this one
- + # You can find a copy below in this file (look for edhack.c)
- + #EDHACK_EDITOR=1
- +
- + # On OS/2 and Win-NT do tests for PreservePermissions only if asked
- + # (that way, default sanity.sh run is easy)
- + WONT_PRESERVE_PERMISSIONS=1
- +
- + # OS/2 (EMX) ls - GNU file utilities 3.13 shows things like drwxa--
- + # rather than -r--r--r--. this breaks most of modes) test, so don't
- + # do it unless asked.
- + BROKEN_LS_L=1
- +
- + # DEVNULL is used for expr comparison (like macro in src/cvs.h
- + # (/dev/null) and also in windows-NT/config.h (nul) for
- + # OS/2 emx gcc and Windows-NT MSVC++ want nul
- + DEVNULL=nul
- + DEVNULL_TIME="[a-zA-Z0-9: ]*"
- +
- + # OS/2 EMX and cygwin32 have cat and echo emit lines with crlf at end
- + # This is no good for For making RCS files, so the kludge crlf2lf.exe
- + # can be used instead (you'll need it on your path)
- + # You can find a copy below in this file (look for crlf2lf.c)
- + CRLF_ENDLINES=1
- +
- +
- + SLASH="/"
- + ;;
- + win32_msvc_cygwin32)
- + echo "Bending sanity.sh for ${OS_COMPILER_EMU}"
- + tempname="[-a-zA-Z0-9/\\.%_:]*"
- +
- + # reserved-13b works like this
- + TESTSHELL=sh
- +
- + CANT_PROTECT_DIRS=1
- + CANT_RUN_SCRIPTS=1
- + EDHACK_EDITOR=1
- + WONT_PRESERVE_PERMISSIONS=1
- +
- + # FIXME: cygwyn32 is a lot less broken than emx, and may possibly
- + # be made to work.
- + # For instance, emx fails at modes-5, but nt fails at modes-7b
- + # when the BROKEN_LS_L isn't defined.
- + # On the other hand, maybe cygwin32 not passing modes) is a real bug.
- + BROKEN_LS_L=1
- + DEVNULL=nul
- + CRLF_ENDLINES=1
- +
- + # Some RCS outputs have \ rather than / on windows-NT when
- + # compiled by MS Visual C++
- + SLASH="[/\\]"
- +
- + # death2-diff tests give ? as filetime of nul
- + DEVNULL_TIME="?"
- + ;;
- + win95_msvc_mks)
- + echo "Bending sanity.sh for ${OS_COMPILER_EMU}"
- + tempname="[-a-zA-Z0-9/\\.%_:]*"
- +
- + # MKS ksh seems to run DOS type rather than *nix type, so
- + # shell detection just doesn't work.
- + TESTSHELL=sh
- +
- + CANT_PROTECT_DIRS=1
- + CANT_RUN_SCRIPTS=1
- + EDHACK_EDITOR=1
- + WONT_PRESERVE_PERMISSIONS=1
- +
- + # FIXME: cygwyn32 is a lot less broken than emx, and may possibly
- + # be made to work.
- + # For instance, emx fails at modes-5, but nt fails at modes-7b
- + # when the BROKEN_LS_L isn't defined.
- + # On the other hand, maybe cygwin32 not passing modes) is a real bug.
- + BROKEN_LS_L=1
- + DEVNULL=nul
- + CRLF_ENDLINES=1
- +
- + # Some RCS outputs have \ rather than / on windows-NT when
- + # compiled by MS Visual C++
- + SLASH="[/\\]"
- +
- + # death2-diff tests give ? as filetime of nul
- + DEVNULL_TIME="?"
- + DEVNULL_TIME="[a-zA-Z0-9: ]*"
- + ;;
- + *)
- + DEVNULL=/dev/null
- + SLASH="/"
- + DEVNULL_TIME="[a-zA-Z0-9: ]*"
- + FILESYSTEM_TICK=0
- + ;;
- + esac
- +
- +
- + # here is a hack that converts files with cr lf end lines to lf endlines
- + lf_endlines ()
- + {
- + if test x"${CRLF_ENDLINES}" = x; then
- + return 0
- + fi
- + crlf2lf <$1 ${TMPDIR}/lf$$
- + cp ${TMPDIR}/lf$$ $1
- + rm -f ${TMPDIR}/lf$$
- + return 0
- + }
- + # /* crlf2lf.c */
- + # #include <stdio.h>
- + #
- + # int Usage( const char * pszPgmname )
- + # {
- + # fprintf( stdout, "Usage: %s OUTFILE\n", pszPgmname );
- + # fprintf( stdout,
- + # "\n"
- + # "Copy stdin to OUTFILE replacing crlf by lf.\n");
- + # return 1;
- + # }
- + #
- + # int main(int argc, const char * argv[])
- + # {
- + # FILE * pOutFile;
- + # int i;
- + #
- + # if (argc != 2)
- + # {
- + # return Usage(argv[0]);
- + # }
- + # pOutFile = fopen( argv[1], "wb");
- + # if (0 == pOutFile)
- + # {
- + # printf("Can't open %s for writing\n", argv[1]);
- + # return Usage(argv[0]);
- + # }
- + #
- + # while (EOF != (i= getc(stdin)))
- + # putc(i, pOutFile);
- + # return 0;
- + #
- + # fflush( pOutFile );
- + # }
- +
- +
- +
- # FIXME: try things (what things? checkins?) without -m.
- #
- # Some of these tests are written to expect -Q. But testing with
- ***************
- *** 528,539 ****
- # 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
- --- 718,823 ----
- # 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 ${TMPDIR}/cvs-sanity # In reality, overridable with environment variable?
- # mkdir realdir
- # ln -s realdir testdir
- ! # TESTDIR=${TMPDIR}/cvs-sanity/testdir
- ! # TMPPWD=${TMPDIR}/cvs-sanity/realdir
- !
- ! # allow overide of TMPPWD from outside sanity.sh
- !
- ! if test x"${TMPPWD}" = x; then
- ! if test x"${SLASH}" = x"/"; then
- ! TMPPWD=`pwd`
- ! else
- ! if test x"${TESTDIR}" = x"/tmp/cvs-sanity"; then
- !
- ! # but here's a hack that makes basic2-64 happier with winnt, MS Visual C++ 4.0
- ! # and cygwin32 beta19 bash by accepting optional drive letter and slosh
- ! # instead of slash
- ! TMPPWD=[A-Za-z:]*${SLASH}tmp${SLASH}cvs-sanity
- !
- ! else
- ! echo '${SLASH} != / and ${TESTDIR} != /tmp/cvs-sanity. TMPPWD will be wrongly set'
- ! fi
- ! fi
- ! fi
- !
- !
- ! # In various places, CVS waits a tick of the filesystem clock to make
- ! # sure that files have different timestamps. This was coded as sleep (1).
- ! # For some filesystems (eg FAT, FAT32) 2 seconds are needed.
- ! # In my local cvs, I've defined FILESYSTEM_TICK in windows-NT/options.h,
- ! # and in src/cvs.h a default of 1 second is defined.
- ! #
- ! # I found some timing problems using sanity.sh Windows-95 on Pentium 90
- ! # with MKS Toolkit and FAT. These are worse on Pentium-II 333.
- ! # On the other hand, I didn't see these problems withPentium 133 NT and
- ! # cygwin32 on a netware 4.10 server for which the script below reports
- ! # 2 seconds per filesystem tick.
- ! # Nor did I see these problems with OS/2 HPFS using EMX port.
- ! #
- ! # Perhaps part of the problem is not
- ! #
- ! # I suspect that CVS doesn't sleep in enough places for this to work
- ! # properly.
- ! #
- ! # multibranch2 often fails, as does the second ci here :
- ! # cvs add file1
- ! # cvs ci
- ! # echo foo >file1
- ! # cvs ci
- ! #
- ! # Windows_95 on Pentium 90 using FAT I found that I had about 18 mostly
- ! # consistent failures where sanity.sh expected a file just modified
- ! # in the sandbox to be checked in and cvs didn't do that.
- ! # When I ran on Pentium-II 333 (FAT32) I got about 30.
- ! # Eventually, I tried putting sleep before the echo command modifying
- ! # the file - problem gone.
- ! # I'm told FAT doesn't keep the low order bit of time in seconds.
- ! #
- ! # The code below works out the number of seconds (>=0) to wait between
- ! # creating files to be sure that they have different timestamps.
- ! # I've put sleeps where they seem to be needed (before
- ! # echo cat or cp before ci modified,
- ! # before update -r,
- ! # before tag -b branch)
- ! #
- ! # Having different timestamps on fileX and in CVS/Entries for fileX is
- ! # how cvs decides file is modified since checkout. Detection would be
- ! # more robust if bytesize was also compared.
- ! # Would changing the Entries file be a bad thing?
- ! #
- ! # Murray Bishop, 1 July 98
- !
- ! if test "x${FILESYSTEM_TICK}" = "x"; then
- ! seconds=0
- ! while test "x${FILESYSTEM_TICK}" = "x"; do
- ! echo tock >tick1
- ! sleep ${seconds}
- ! echo tock >tick2
- ! sleep ${seconds}
- ! echo tock >tick3
- ! sleep ${seconds}
- ! echo tock >tick4
- ! sleep ${seconds}
- ! echo tock >tick5
- ! if test tick1 -ot tick2 \
- ! -a tick2 -ot tick3 \
- ! -a tick3 -ot tick4 \
- ! -a tick4 -ot tick5; then
- ! FILESYSTEM_TICK=${seconds}
- ! fi
- ! seconds=`expr ${seconds} + 1`
- ! done
- ! rm tick1 tick2 tick3 tick4 tick5
- ! fi
- ! if test "x${FILESYSTEM_TICK}" != "x0"; then
- ! : When we depart from distribution behavior - say so.
- ! echo "Waiting ${FILESYSTEM_TICK} seconds between creating files gives different modified times."
- ! fi
- !
- !
-
- # Avoid picking up any stray .cvsrc, etc., from the user running the tests
- mkdir home
- ***************
- *** 571,579 ****
- tests="${tests} binwrap3 mwrap info taginfo config"
- tests="${tests} serverpatch log log2 ann ann-id crerepos rcs rcs2"
- tests="${tests} history"
- ! tests="${tests} big modes modes2 stamps"
- ! # PreservePermissions stuff: permissions, symlinks et al.
- ! tests="${tests} perms symlinks hardlinks"
- # More tag and branch tests, keywords.
- tests="${tests} sticky keyword keywordlog"
- tests="${tests} head tagdate multibranch2 tag8k"
- --- 855,873 ----
- tests="${tests} binwrap3 mwrap info taginfo config"
- tests="${tests} serverpatch log log2 ann ann-id crerepos rcs rcs2"
- tests="${tests} history"
- ! tests="${tests} big"
- ! if test x"${BROKEN_LS_L}" = x; then
- ! tests="${tests} modes modes2"
- ! else
- ! echo "Won't run modes modes2 tests - BROKEN_LS_L"
- ! fi
- ! tests="${tests} stamps"
- ! if test x"${WONT_PRESERVE_PERMISSIONS}" = x; then
- ! # PreservePermissions stuff: permissions, symlinks et al.
- ! tests="${tests} perms symlinks hardlinks"
- ! else
- ! echo "Won't run perms symlinks hardlinks tests - WONT_PRESERVE_PERMISSIONS"
- ! fi
- # More tag and branch tests, keywords.
- tests="${tests} sticky keyword keywordlog"
- tests="${tests} head tagdate multibranch2 tag8k"
- ***************
- *** 598,611 ****
- ISDIFF=false
-
- cd $DIR_1
- ! find . -print | fgrep -v /CVS | sort > /tmp/dc$$d1
-
- # go back where we were to avoid symlink hell...
- cd $OLDPWD
- cd $DIR_2
- ! find . -print | fgrep -v /CVS | sort > /tmp/dc$$d2
-
- ! if diff /tmp/dc$$d1 /tmp/dc$$d2 >/dev/null 2>&1
- then
- :
- else
- --- 892,906 ----
- ISDIFF=false
-
- cd $DIR_1
- ! # EMX gnu find 4.1 emits CVS rather than ./CVS
- ! find . -print | fgrep -v CVS | sort > ${TMPDIR}/dc$$d1
-
- # go back where we were to avoid symlink hell...
- cd $OLDPWD
- cd $DIR_2
- ! find . -print | fgrep -v CVS | sort > ${TMPDIR}/dc$$d2
-
- ! if diff ${TMPDIR}/dc$$d1 ${TMPDIR}/dc$$d2 >/dev/null 2>&1
- then
- :
- else
- ***************
- *** 621,633 ****
- ISDIFF=true
- fi
- fi
- ! done < /tmp/dc$$d1
- ! rm -f /tmp/dc$$*
- }
-
- # 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
- # Use rsh so we can test it without having to muck with inetd
- # or anything like that. Also needed to get CVS_SERVER to
- --- 916,928 ----
- ISDIFF=true
- fi
- fi
- ! done < ${TMPDIR}/dc$$d1
- ! rm -f ${TMPDIR}/dc$$*
- }
-
- # Set up CVSROOT (the crerepos tests will test operating without CVSROOT set).
- CVSROOT_DIRNAME=${TESTDIR}/cvsroot
- ! CVSROOT=:local:${CVSROOT_DIRNAME} ; export CVSROOT
- if test "x$remote" = xyes; then
- # Use rsh so we can test it without having to muck with inetd
- # or anything like that. Also needed to get CVS_SERVER to
- ***************
- *** 787,796 ****
- # The .* here will normally be "No such file or directory",
- # but if memory serves some systems (AIX?) have a different message.
- : dotest_fail basica-9 \
- ! "${testcvs} -q -d ${TESTDIR}/nonexist update" \
- "${PROG}: cannot access cvs root ${TESTDIR}/nonexist: .*"
- dotest_fail basica-9 \
- ! "${testcvs} -q -d ${TESTDIR}/nonexist update" \
- "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/nonexist/CVSROOT: .*"
-
- dotest basica-10 "${testcvs} annotate" \
- --- 1082,1091 ----
- # The .* here will normally be "No such file or directory",
- # but if memory serves some systems (AIX?) have a different message.
- : dotest_fail basica-9 \
- ! "${testcvs} -q -d :local:${TESTDIR}/nonexist update" \
- "${PROG}: cannot access cvs root ${TESTDIR}/nonexist: .*"
- dotest_fail basica-9 \
- ! "${testcvs} -q -d :local:${TESTDIR}/nonexist update" \
- "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/nonexist/CVSROOT: .*"
-
- dotest basica-10 "${testcvs} annotate" \
- ***************
- *** 972,977 ****
- --- 1267,1273 ----
- ${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v <-- sfile2
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- echo sfile1 develops >Emptydir/sfile1
- dotest basicb-6 "${testcvs} -q ci -m modify" \
- "Checking in Emptydir/sfile1;
- ***************
- *** 1755,1760 ****
- --- 2051,2057 ----
- cd $i
-
- # modify a file
- + sleep ${FILESYSTEM_TICK}
- echo file6 >>file6
-
- # delete a file
- ***************
- *** 1895,1901 ****
- fi
-
- # 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
-
- --- 2192,2209 ----
- fi
-
- # directory copies are done in an oblique way in order to avoid a bug in sun's tmp filesystem.
- ! if test "x${OS_COMPILER_EMU}" = "xwin95_msvc_mks"; then
- ! # MKS Toolkit on win95 sometimes chokes on the usual way
- ! mkdir first-dir.cpy
- ! cd first-dir
- ! tar cf ${TESTDIR}/ball.tar .
- ! cd ../first-dir.cpy
- ! tar xf ${TESTDIR}/ball.tar
- ! rm ${TESTDIR}/ball.tar
- ! cd ..
- ! else
- ! mkdir first-dir.cpy ; (cd first-dir ; tar cf - . | (cd ../first-dir.cpy ; tar xf -))
- ! fi
-
- directory_cmp first-dir export-dir
-
- ***************
- *** 1943,1949 ****
-
- rm -r export-dir first-dir
- mkdir first-dir
- ! (cd first-dir.cpy ; tar cf - . | (cd ../first-dir ; tar xf -))
-
- # update the top, cancelling sticky tags, retag, update other copy, compare.
- cd first-dir
- --- 2251,2267 ----
-
- rm -r export-dir first-dir
- mkdir first-dir
- ! if test "x${OS_COMPILER_EMU}" = "xwin95_msvc_mks"; then
- ! # MKS Toolkit on win95 sometimes chokes on the usual way
- ! cd first-dir.cpy
- ! tar cf ${TESTDIR}/ball.tar .
- ! cd ../first-dir
- ! tar xf ${TESTDIR}/ball.tar
- ! rm ${TESTDIR}/ball.tar
- ! cd ..
- ! else
- ! (cd first-dir.cpy ; tar cf - . | (cd ../first-dir ; tar xf -))
- ! fi
-
- # update the top, cancelling sticky tags, retag, update other copy, compare.
- cd first-dir
- ***************
- *** 2022,2029 ****
- 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} 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>
- --- 2340,2347 ----
- 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}${SLASH}first-dir
- ! U [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7 first-dir == ${TMPPWD}${SLASH}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>
- ***************
- *** 2112,2117 ****
- --- 2430,2436 ----
- U trdiff/bar
- U trdiff/foo"
- cd trdiff
- + sleep ${FILESYSTEM_TICK}
- echo something >> foo
- dotest rdiff-3 \
- "${testcvs} ci -m added-something foo" \
- ***************
- *** 2174,2181 ****
- ! \$''Name: local-v0 \$
- ! something
- Index: trdiff/new
- ! diff -c /dev/null trdiff/new:1\.1
- ! \*\*\* /dev/null .*
- --- trdiff/new .*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- --- 2493,2500 ----
- ! \$''Name: local-v0 \$
- ! something
- Index: trdiff/new
- ! diff -c '"${DEVNULL}"' trdiff/new:1\.1
- ! \*\*\* '"${DEVNULL}"' .*
- --- trdiff/new .*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- ***************
- *** 2329,2334 ****
- --- 2648,2654 ----
- T file2'
-
- # branch1
- + sleep ${FILESYSTEM_TICK}
- if ${CVS} tag -b branch1 ; then
- pass 73
- else
- ***************
- *** 2336,2341 ****
- --- 2656,2662 ----
- fi
-
- # and move to the branch.
- + sleep ${FILESYSTEM_TICK}
- if ${CVS} update -r branch1 ; then
- pass 74
- else
- ***************
- *** 2362,2369 ****
- dotest death-76a0 \
- "${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir" \
- "Index: first-dir/file3
- ! diff -c /dev/null first-dir/file3:1\.1\.2\.1
- ! \*\*\* /dev/null .*
- --- first-dir/file3 .*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- --- 2683,2690 ----
- dotest death-76a0 \
- "${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir" \
- "Index: first-dir/file3
- ! diff -c ${DEVNULL} first-dir/file3:1\.1\.2\.1
- ! \*\*\* ${DEVNULL} .*
- --- first-dir/file3 .*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- ***************
- *** 2526,2531 ****
- --- 2847,2853 ----
- fi
-
- # typo; try to get to the branch and fail
- + sleep ${FILESYSTEM_TICK}
- dotest_fail 92.1a "${testcvs} update -r brnach1" \
- "${PROG}"' \[[a-z]* aborted\]: no such tag brnach1'
- # Make sure we are still on the trunk
- ***************
- *** 2541,2546 ****
- --- 2863,2869 ----
- fi
-
- # back to branch1
- + sleep ${FILESYSTEM_TICK}
- if ${CVS} update -r branch1 2>> ${LOGFILE}; then
- pass 93
- else
- ***************
- *** 2602,2607 ****
- --- 2925,2931 ----
- done"
-
- # Make a branch and a non-branch tag.
- + sleep ${FILESYSTEM_TICK}
- dotest death2-4 "${testcvs} -q tag -b branch" \
- 'T file1
- T file4'
- ***************
- *** 2610,2615 ****
- --- 2934,2940 ----
- T file4'
-
- # Switch over to the branch.
- + sleep ${FILESYSTEM_TICK}
- dotest death2-6 "${testcvs} -q update -r branch" ''
-
- # Delete the file on the branch.
- ***************
- *** 2631,2637 ****
- RCS file: file1
- diff -N file1
- \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- ! --- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 1 \*\*\*\*
- - first revision
- --- 2956,2962 ----
- RCS file: file1
- diff -N file1
- \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- ! --- ${DEVNULL}[ ][ ]*${DEVNULL_TIME}
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 1 \*\*\*\*
- - first revision
- ***************
- *** 2655,2661 ****
- RCS file: file1
- diff -N file1
- \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- ! --- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 1 \*\*\*\*
- - first revision
- --- 2980,2986 ----
- RCS file: file1
- diff -N file1
- \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- ! --- ${DEVNULL}[ ][ ]*${DEVNULL_TIME}
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 1 \*\*\*\*
- - first revision
- ***************
- *** 2670,2676 ****
- RCS file: file1
- diff -N file1
- \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- ! --- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 1 \*\*\*\*
- - first revision
- --- 2995,3001 ----
- RCS file: file1
- diff -N file1
- \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- ! --- ${DEVNULL}[ ][ ]*${DEVNULL_TIME}
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 1 \*\*\*\*
- - first revision
- ***************
- *** 2705,2711 ****
- ===================================================================
- RCS file: file1
- diff -N file1
- ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
- --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- --- 3030,3036 ----
- ===================================================================
- RCS file: file1
- diff -N file1
- ! \*\*\* ${DEVNULL}[ ][ ]*${DEVNULL_TIME}
- --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- ***************
- *** 2758,2763 ****
- --- 3083,3089 ----
- # The ``no longer in the repository'' message doesn't really
- # look right to me, but that's what CVS currently prints for
- # this case.
- + sleep ${FILESYSTEM_TICK}
- dotest death2-14 "${testcvs} -q update -r branch" \
- "[UP] file1
- ${PROG} [a-z]*: file2 is no longer in the repository
- ***************
- *** 2796,2802 ****
- ===================================================================
- RCS file: file3
- diff -N file3
- ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
- --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- --- 3122,3128 ----
- ===================================================================
- RCS file: file3
- diff -N file3
- ! \*\*\* ${DEVNULL}[ ][ ]*${DEVNULL_TIME}
- --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- ***************
- *** 2839,2845 ****
- ===================================================================
- RCS file: file2
- diff -N file2
- ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
- --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- --- 3165,3171 ----
- ===================================================================
- RCS file: file2
- diff -N file2
- ! \*\*\* ${DEVNULL}[ ][ ]*${DEVNULL_TIME}
- --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- ***************
- *** 2849,2855 ****
- ===================================================================
- RCS file: file3
- diff -N file3
- ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
- --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- --- 3175,3181 ----
- ===================================================================
- RCS file: file3
- diff -N file3
- ! \*\*\* ${DEVNULL}[ ][ ]*${DEVNULL_TIME}
- --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- ***************
- *** 2860,2872 ****
- RCS file: file4
- diff -N file4
- \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- ! --- /dev/null[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 1 \*\*\*\*
- - file4 first revision
- --- 0 ----"
-
- # Switch to the nonbranch tag.
- dotest death2-19 "${testcvs} -q update -r tag" \
- "[UP] file1
- ${PROG} [a-z]*: file2 is no longer in the repository
- --- 3186,3199 ----
- RCS file: file4
- diff -N file4
- \*\*\* ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- ! --- ${DEVNULL}[ ][ ]*${DEVNULL_TIME}
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 1 \*\*\*\*
- - file4 first revision
- --- 0 ----"
-
- # Switch to the nonbranch tag.
- + sleep ${FILESYSTEM_TICK}
- dotest death2-19 "${testcvs} -q update -r tag" \
- "[UP] file1
- ${PROG} [a-z]*: file2 is no longer in the repository
- ***************
- *** 2884,2890 ****
- ===================================================================
- RCS file: file1
- diff -N file1
- ! \*\*\* /dev/null[ ][ ]*[a-zA-Z0-9: ]*
- --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- --- 3211,3217 ----
- ===================================================================
- RCS file: file1
- diff -N file1
- ! \*\*\* ${DEVNULL}[ ][ ]*${DEVNULL_TIME}
- --- ${tempname}[ ][ ]*[a-zA-Z0-9: ]*
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- \*\*\* 0 \*\*\*\*
- ***************
- *** 2936,2941 ****
- --- 3263,3269 ----
- initial revision: 1.1
- done
- HERE
- + sleep ${FILESYSTEM_TICK}
- echo 4:trunk-2 >file4
- dotest branches-3.2 "${testcvs} -q ci -m trunk-before-branch" \
- "Checking in file4;
- ***************
- *** 2949,2961 ****
- --- 3277,3292 ----
- T file2
- T file3
- T file4"
- + sleep ${FILESYSTEM_TICK}
- dotest branches-4 "${testcvs} tag -b br1" "${PROG}"' [a-z]*: Tagging \.
- T file1
- T file2
- T file3
- T file4'
- + sleep ${FILESYSTEM_TICK}
- dotest branches-5 "${testcvs} update -r br1" \
- "${PROG}"' [a-z]*: Updating \.'
- + sleep ${FILESYSTEM_TICK}
- echo 1:br1 >file1
- echo 2:br1 >file2
- echo 4:br1 >file4
- ***************
- *** 2972,2982 ****
- --- 3303,3316 ----
- ${TESTDIR}/cvsroot/first-dir/file4,v <-- file4
- new revision: 1\.2\.2\.1; previous revision: 1\.2
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest branches-7 "${testcvs} -q tag -b brbr" 'T file1
- T file2
- T file3
- T file4'
- + sleep ${FILESYSTEM_TICK}
- dotest branches-8 "${testcvs} -q update -r brbr" ''
- + sleep ${FILESYSTEM_TICK}
- echo 1:brbr >file1
- echo 4:brbr >file4
- dotest branches-9 "${testcvs} -q ci -m modify" \
- ***************
- *** 2992,2997 ****
- --- 3326,3332 ----
- 2:br1
- 3:ancest
- 4:brbr'
- + sleep ${FILESYSTEM_TICK}
- dotest branches-11 "${testcvs} -q update -r br1" \
- '[UP] file1
- [UP] file4'
- ***************
- *** 2999,3004 ****
- --- 3334,3340 ----
- 2:br1
- 3:ancest
- 4:br1'
- + sleep ${FILESYSTEM_TICK}
- echo 4:br1-2 >file4
- dotest branches-12.2 "${testcvs} -q ci -m change-on-br1" \
- "Checking in file4;
- ***************
- *** 3012,3017 ****
- --- 3348,3354 ----
- 2:ancest
- 3:ancest
- 4:trunk-2'
- + sleep ${FILESYSTEM_TICK}
- echo 4:trunk-3 >file4
- dotest branches-14.2 \
- "${testcvs} -q ci -m trunk-change-after-branch" \
- ***************
- *** 3152,3158 ****
- --- 3489,3497 ----
- dotest branches2-4 "${testcvs} -q tag tag1" 'T file1'
-
- # Make two branches.
- + sleep ${FILESYSTEM_TICK}
- dotest branches2-5 "${testcvs} -q rtag -b -r tag1 b1 first-dir" ''
- + sleep ${FILESYSTEM_TICK}
- dotest branches2-6 "${testcvs} -q rtag -b -r tag1 b2 first-dir" ''
-
- # Create some files and a subdirectory on branch b1.
- ***************
- *** 3419,3424 ****
- --- 3758,3764 ----
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- I am the first foo, and my name is \$""Name: first \$\."
-
- + sleep ${FILESYSTEM_TICK}
- 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;
- ***************
- *** 3447,3452 ****
- --- 3787,3793 ----
- ---
- > I am the second foo, and my name is \$""Name: \$\."
-
- + sleep ${FILESYSTEM_TICK}
- echo "I am the once and future foo, and my name is $""Name$." > foo.c
- dotest_fail rcsdiff-10 "${testcvs} diff -r first" \
- "${PROG} [a-z]*: Diffing \.
- ***************
- *** 3485,3490 ****
- --- 3826,3832 ----
- ${TESTDIR}/cvsroot/first-dir/rgx\.c,v <-- rgx\.c
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- cat >rgx.c <<EOF
- test_regex (whiz, bang)
- {
- ***************
- *** 3549,3561 ****
- --- 3891,3906 ----
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- 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
- new revision: 1\.2; previous revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest rcslib-merge-7 "${testcvs} -q tag -b -r 1.1 patch1" "T file1"
- + sleep ${FILESYSTEM_TICK}
- dotest rcslib-merge-8 "${testcvs} -q update -r patch1" "[UP] file1"
- dotest rcslib-merge-9 "${testcvs} -q status" \
- "===================================================================
- ***************
- *** 3570,3575 ****
- --- 3915,3921 ----
- '$''Revision: 1\.1 $
- 2
- 3'
- + sleep ${FILESYSTEM_TICK}
- sed -e 's/3/three/' file1 > f; mv f file1
- dotest rcslib-merge-11 "${testcvs} -q commit -m '' file1" \
- "Checking in file1;
- ***************
- *** 3623,3650 ****
- --- 3969,4004 ----
- initial revision: 1.1
- done
- HERE
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch-4 "${testcvs} tag -b br1" \
- "${PROG} [a-z]*: Tagging \.
- T file1"
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch-5 "${testcvs} tag -b br2" \
- "${PROG} [a-z]*: Tagging \.
- T file1"
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch-6 "${testcvs} -q update -r br1" ''
- + sleep ${FILESYSTEM_TICK}
- echo on-br1 >file1
- dotest multibranch-7 "${testcvs} -q ci -m modify-on-br1" \
- "Checking in file1;
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- new revision: 1\.1\.2\.1; previous revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch-8 "${testcvs} -q update -r br2" '[UP] file1'
- + sleep ${FILESYSTEM_TICK}
- 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
- new revision: 1\.1\.4\.1; previous revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch-10 "${testcvs} -q update -r br1" '[UP] file1'
- dotest multibranch-11 "cat file1" 'on-br1'
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch-12 "${testcvs} -q update -r br2" '[UP] file1'
- dotest multibranch-13 "cat file1" '1:trunk-1
- br2 adds a line'
- ***************
- *** 3761,3766 ****
- --- 4115,4121 ----
- fi
-
- # change
- + sleep ${FILESYSTEM_TICK}
- echo local-change >> imported-f2
-
- # commit
- ***************
- *** 3778,3783 ****
- --- 4133,4139 ----
- fi
-
- # update into the vendor branch.
- + sleep ${FILESYSTEM_TICK}
- if ${CVS} update -rvendor-branch ; then
- pass 102
- else
- ***************
- *** 3809,3814 ****
- --- 4165,4171 ----
-
- # second import - file4 deliberately unchanged
- cd ../import-dir
- + sleep ${FILESYSTEM_TICK}
- for i in 1 2 3 ; do
- echo rev 2 of file $i >> imported-f"$i"
- done
- ***************
- *** 3851,3856 ****
- --- 4208,4214 ----
- done
-
- # check vendor branch for file4
- + sleep ${FILESYSTEM_TICK}
- if ${CVS} update -rvendor-branch ; then
- pass 110
- else
- ***************
- *** 4066,4072 ****
- # 1.9 did not).
- dotest_fail importc-7 "${testcvs} -q ci -m modify -r wip_test" \
- "${PROG} [a-z]*: in directory adir/sub1/ssdir:
- ! ${PROG} \[[a-z]* aborted\]: there is no version here; do .cvs checkout. first"
- # The workaround is to leave off the "-r wip_test".
- dotest importc-8 "${testcvs} -q ci -m modify" \
- "Checking in cdir/cfile;
- --- 4424,4430 ----
- # 1.9 did not).
- dotest_fail importc-7 "${testcvs} -q ci -m modify -r wip_test" \
- "${PROG} [a-z]*: in directory adir/sub1/ssdir:
- ! ${PROG} \[[a-z]* aborted\]: there is no version here; do .${PROG} checkout. first"
- # The workaround is to leave off the "-r wip_test".
- dotest importc-8 "${testcvs} -q ci -m modify" \
- "Checking in cdir/cfile;
- ***************
- *** 4203,4208 ****
- --- 4561,4567 ----
- done"
-
- # Make a branch.
- + sleep ${FILESYSTEM_TICK}
- dotest join-4 "${testcvs} -q tag -b branch ." \
- 'T file3
- T file4
- ***************
- *** 4211,4216 ****
- --- 4570,4576 ----
-
- # Add file2 and file7, modify file4, and remove file6 and file8.
- echo 'first revision of file2' > file2
- + sleep ${FILESYSTEM_TICK}
- echo 'second revision of file4' > file4
- echo 'first revision of file7' > file7
- rm file6 file8
- ***************
- *** 4262,4267 ****
- --- 4622,4628 ----
-
- # Modify the files on the branch, so that T1 is not an
- # ancestor of the main line, and add file5
- + sleep ${FILESYSTEM_TICK}
- echo 'first branch revision of file3' > file3
- echo 'first branch revision of file4' > file4
- echo 'first branch revision of file6' > file6
- ***************
- *** 4429,4434 ****
- --- 4790,4796 ----
- # single revision.
- # The file2 handling is a bug; see above join-20.
- cd first-dir
- + sleep ${FILESYSTEM_TICK}
- echo 'third revision of file4' > file4
- dotest join-23 "${testcvs} -q update -jbranch ." \
- "U file1
- ***************
- *** 4459,4469 ****
- --- 4821,4833 ----
- U first-dir/file4
- U first-dir/file7'
- cd first-dir
- + sleep ${FILESYSTEM_TICK}
- dotest join-26 "${testcvs} -q tag -b br2" \
- "T file2
- T file3
- T file4
- T file7"
- + sleep ${FILESYSTEM_TICK}
- dotest join-27 "${testcvs} -q update -r br2" ""
- # The handling of file8 here looks fishy to me. I don't see
- # why it should be different from the case where we merge to
- ***************
- *** 4512,4519 ****
- --- 4876,4886 ----
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest join2-5 "${testcvs} -q tag -b br1" "T file1"
- + sleep ${FILESYSTEM_TICK}
- dotest join2-6 "${testcvs} -q update -r br1" ""
- + sleep ${FILESYSTEM_TICK}
- echo 'modify on branch' >>file1
- touch bradd
- dotest join2-6a "${testcvs} add bradd" \
- ***************
- *** 4573,4578 ****
- --- 4940,4946 ----
- # OK, the above is all well and good and has worked for some
- # time. Now try the case where the file had been added on
- # the branch.
- + sleep ${FILESYSTEM_TICK}
- dotest join2-16 "${testcvs} -q update -r br1" "[UP] file1"
- # The workaround is to update the whole directory.
- # The non-circumvented version won't work. The reason is that
- ***************
- *** 4630,4636 ****
- --- 4998,5006 ----
- initial revision: 1\.1
- done"
- dotest join3-5 "${testcvs} -q tag -b br1" "T file1"
- + sleep ${FILESYSTEM_TICK}
- dotest join3-6 "${testcvs} -q update -r br1" ""
- + sleep ${FILESYSTEM_TICK}
- echo 'br1:line1' >>file1
- dotest join3-7 "${testcvs} -q ci -m modify" \
- "Checking in file1;
- ***************
- *** 4641,4651 ****
- --- 5011,5024 ----
- # Now back to the trunk for:
- # another revision and another branch for file1.
- # add file2, which will exist on trunk and br2 but not br1.
- + sleep ${FILESYSTEM_TICK}
- dotest join3-8 "${testcvs} -q update -A" "[UP] file1"
- + sleep ${FILESYSTEM_TICK}
- echo 'trunk:line1' > file2
- dotest join3-8a "${testcvs} add file2" \
- "${PROG} [a-z]*: scheduling file .file2. for addition
- ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
- + sleep ${FILESYSTEM_TICK}
- echo 'trunk:line1' >>file1
- dotest join3-9 "${testcvs} -q ci -m modify" \
- "Checking in file1;
- ***************
- *** 4658,4667 ****
- --- 5031,5042 ----
- ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest join3-10 "${testcvs} -q tag -b br2" "T file1
- T file2"
-
- # Before we actually have any revision on br2, let's try a join
- + sleep ${FILESYSTEM_TICK}
- 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" \
- ***************
- *** 4681,4689 ****
- --- 5056,5066 ----
- rm file1
-
- # OK, we'll try the same thing with a revision on br2.
- + sleep ${FILESYSTEM_TICK}
- dotest join3-14 "${testcvs} -q update -r br2 file1" \
- "${PROG} [a-z]*: warning: file1 was lost
- U file1" "U file1"
- + sleep ${FILESYSTEM_TICK}
- echo 'br2:line1' >>file1
- dotest join3-15 "${testcvs} -q ci -m modify file1" \
- "Checking in file1;
- ***************
- *** 4692,4697 ****
- --- 5069,5075 ----
- done"
-
- # OK, now we can join br2 to br1
- + sleep ${FILESYSTEM_TICK}
- dotest join3-16 "${testcvs} -q update -r br1 file1" "[UP] file1"
- # It may seem odd, to merge a higher branch into a lower
- # branch, but in fact CVS defines the ancestor as 1.1
- ***************
- *** 4761,4766 ****
- --- 5139,5145 ----
- pass 122
- fi
-
- + sleep ${FILESYSTEM_TICK}
- if ${CVS} update -rHEAD 2>&1 | grep longer ; then
- fail 123
- else
- ***************
- *** 4796,4801 ****
- --- 5175,5181 ----
- done"
-
- # Make a branch.
- + sleep ${FILESYSTEM_TICK}
- dotest newb-123d "${testcvs} -q tag -b branch" "T a"
-
- # Check out the branch.
- ***************
- *** 4900,4906 ****
- "${PROG} [a-z]*: Updating first-dir
- ===================================================================
- Checking out first-dir/a
- ! RCS: ${TMPPWD}/cvsroot/first-dir/a,v
- VERS: 1\.1
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
- if ${CVS} co first-dir ; then
- --- 5280,5286 ----
- "${PROG} [a-z]*: Updating first-dir
- ===================================================================
- Checking out first-dir/a
- ! RCS: ${TMPPWD}${SLASH}cvsroot${SLASH}first-dir${SLASH}a,v
- VERS: 1\.1
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
- if ${CVS} co first-dir ; then
- ***************
- *** 4916,4921 ****
- --- 5296,5302 ----
- fi
-
- cd ../../1/first-dir
- + sleep ${FILESYSTEM_TICK}
- echo add a line >>a
- mkdir dir1
- dotest conflicts-127b "${testcvs} add dir1" \
- ***************
- *** 4937,4943 ****
- "${PROG} [a-z]*: Updating first-dir
- ===================================================================
- Checking out first-dir/a
- ! RCS: ${TMPPWD}/cvsroot/first-dir/a,v
- VERS: 1\.2
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- add a line"
- --- 5318,5324 ----
- "${PROG} [a-z]*: Updating first-dir
- ===================================================================
- Checking out first-dir/a
- ! RCS: ${TMPPWD}${SLASH}cvsroot${SLASH}first-dir${SLASH}a,v
- VERS: 1\.2
- \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
- add a line"
- ***************
- *** 4947,4952 ****
- --- 5328,5334 ----
- # Now go over the to the other working directory and
- # start testing conflicts
- cd 2/first-dir
- + sleep ${FILESYSTEM_TICK}
- echo add a conflicting line >>a
- dotest_fail conflicts-129 "${testcvs} -q ci -m changed" \
- "${PROG}"' [a-z]*: Up-to-date check failed for `a'\''
- ***************
- *** 4996,5001 ****
- --- 5378,5384 ----
- "${PROG} [a-z]*: file .a. had a conflict and has not been modified
- ${PROG} \[[a-z]* aborted\]: correct above errors first!"
-
- + sleep ${FILESYSTEM_TICK}
- echo lame attempt at resolving it >>a
- # Try to check in the file with the conflict markers in it.
- dotest conflicts-status-2 "${testcvs} status a" \
- ***************
- *** 5016,5021 ****
- --- 5399,5405 ----
-
- # OK, the user saw the warning (good user), and now
- # resolves it for real.
- + sleep ${FILESYSTEM_TICK}
- echo resolve conflict >a
- dotest conflicts-status-3 "${testcvs} status a" \
- "===================================================================
- ***************
- *** 5483,5488 ****
- --- 5867,5873 ----
- U CVSROOT/rcsinfo
- U CVSROOT/taginfo
- U CVSROOT/verifymsg'
- + sleep ${FILESYSTEM_TICK}
- echo "# made a change" >>CVSROOT/modules
- dotest modules-1d "${testcvs} -q ci -m add-modules" \
- "Checking in CVSROOT/modules;
- ***************
- *** 5507,5512 ****
- --- 5892,5898 ----
- U CVSROOT/rcsinfo
- U CVSROOT/taginfo
- U CVSROOT/verifymsg'
- + sleep ${FILESYSTEM_TICK}
- echo "# made a change" >>CVSROOT/modules
- dotest modules-2d "${testcvs} -q ci -m add-modules" \
- "Checking in CVSROOT/modules;
- ***************
- *** 5534,5539 ****
- --- 5920,5926 ----
- U CVSROOT/rcsinfo
- U CVSROOT/taginfo
- U CVSROOT/verifymsg'
- + sleep ${FILESYSTEM_TICK}
- echo "# made a change" >>CVSROOT/modules
- dotest modules-3g "${testcvs} -q ci -m add-modules" \
- "Checking in CVSROOT/modules;
- ***************
- *** 5599,5604 ****
- --- 5986,5992 ----
- fail 147
- fi
-
- + sleep ${FILESYSTEM_TICK}
- echo realmodule first-dir/subdir a >CVSROOT/modules
- echo dirmodule first-dir/subdir >>CVSROOT/modules
- echo namedmodule -d nameddir first-dir/subdir >>CVSROOT/modules
- ***************
- *** 5725,5730 ****
- --- 6113,6119 ----
- else
- fail 150h2
- fi
- + sleep ${FILESYSTEM_TICK}
- echo add line >>nameddir/a
- dotest 150h3 "${testcvs} -q co namedmodule" 'M nameddir/a'
- rm nameddir/a
- ***************
- *** 5747,5752 ****
- --- 6136,6142 ----
- else
- pass 152
- fi
- + sleep ${FILESYSTEM_TICK}
- echo abc >>first-dir/subdir/a
- if (${testcvs} -q co aliasmodule | tee test153.tmp) \
- >>${LOGFILE}; then
- ***************
- *** 5877,5882 ****
- --- 6267,6273 ----
- dotest modules2-1 "${testcvs} -q co CVSROOT/modules" \
- 'U CVSROOT/modules'
- cd CVSROOT
- + sleep ${FILESYSTEM_TICK}
- echo 'ampermodule &first-dir &second-dir' > modules
- echo 'combmodule third-dir file3 &first-dir' >> modules
- # Depending on whether the user also ran the modules test
- ***************
- *** 6009,6014 ****
- --- 6400,6406 ----
- dotest modules2-a0.5 "${testcvs} -q co CVSROOT/modules" \
- 'U CVSROOT/modules'
- cd CVSROOT
- + sleep ${FILESYSTEM_TICK}
- echo 'aliasopt -a -d onedir first-dir' >modules
- dotest modules2-a0 "${testcvs} -q ci -m add-modules" \
- "Checking in modules;
- ***************
- *** 6060,6065 ****
- --- 6452,6458 ----
- dotest modules3-4 "${testcvs} -q update -d CVSROOT" \
- "U CVSROOT${DOTSTAR}"
- cd CVSROOT
- + sleep ${FILESYSTEM_TICK}
- cat >modules <<EOF
- mod1 -a first-dir/file1
- bigmod -a mod1 first-dir/file1
- ***************
- *** 6250,6255 ****
- --- 6643,6649 ----
- dotest modules4-7 "${testcvs} -q update -d CVSROOT" \
- "U CVSROOT${DOTSTAR}"
- cd CVSROOT
- + sleep ${FILESYSTEM_TICK}
- cat >modules <<EOF
- all -a first-dir
- some -a !first-dir/subdir first-dir
- ***************
- *** 7764,7769 ****
- --- 8158,8164 ----
- mkdir 1; cd 1
- dotest emptydir-1 "${testcvs} co CVSROOT/modules" \
- "U CVSROOT/modules"
- + sleep ${FILESYSTEM_TICK}
- echo "# Module defs for emptydir tests" > CVSROOT/modules
- echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT/modules
-
- ***************
- *** 7968,7973 ****
- --- 8363,8369 ----
- rm -rf ${TESTDIR}/1
-
-
- + if test x"${CANT_PROTECT_DIRS}" = x; then
- # Now try someplace where we don't have permission.
- mkdir ${TESTDIR}/barf
- chmod -w ${TESTDIR}/barf
- ***************
- *** 7981,7986 ****
- --- 8377,8385 ----
- chmod +w ${TESTDIR}/barf
- rmdir ${TESTDIR}/barf
- # Done. Nothing to clean up.
- + else
- + echo "didn't run abspath-4 - CANT_PROTECT_DIRS"
- + fi
-
-
- # Try checking out two modules into the same directory.
- ***************
- *** 8072,8078 ****
- rm -r 1 2 3
-
- #
- ! # FIXME: do other functions here (e.g. update /tmp/foo)
- #
-
- # Finished with all tests. Remove the module.
- --- 8471,8477 ----
- rm -r 1 2 3
-
- #
- ! # FIXME: do other functions here (e.g. update ${TMPDIR}/foo)
- #
-
- # Finished with all tests. Remove the module.
- ***************
- *** 8182,8187 ****
- --- 8581,8587 ----
- dotest toplevel-11 "${testcvs} -q update -d second-dir" \
- "U second-dir/file2"
-
- + if test x"${CANT_PROTECT_DIRS}" = x; then
- # Now remove the CVS directory (people may do this manually,
- # especially if they formed their habits with CVS
- # 1.9 and older, which didn't create it. Or perhaps the working
- ***************
- *** 8200,8205 ****
- --- 8600,8608 ----
- ${PROG} [a-z]*: Updating top-dir"
-
- chmod +w ../1
- + else
- + echo "didn't run toplevel-12 - CANT_PROTECT_DIRS"
- + fi
-
- dotest toplevel-cleanup-1 "${testcvs} -q co CVSROOT/config" \
- "U CVSROOT/config"
- ***************
- *** 8376,8388 ****
- # can see the "CVS:" lines.
- cat >${TESTDIR}/editme <<EOF
- #!${TESTSHELL}
- ! sleep 1
- ! sed <\$1 -e 's/^/x/' >${TESTDIR}/edit.new
- ! mv ${TESTDIR}/edit.new \$1
- exit 0
- EOF
- chmod +x ${TESTDIR}/editme
-
- mkdir 1; cd 1
- dotest editor-1 "${testcvs} -q co -l ." ''
- mkdir first-dir
- --- 8779,8850 ----
- # can see the "CVS:" lines.
- cat >${TESTDIR}/editme <<EOF
- #!${TESTSHELL}
- ! sleep 2
- ! sed <\$1 -e 's/^/x&/g' >${TESTDIR}/edit.new
- ! rm \$1
- ! sleep 2
- ! cp ${TESTDIR}/edit.new \$1
- ! rm ${TESTDIR}/edit.new
- exit 0
- EOF
- +
- + # /* edhack.c */
- + # #include <stdio.h>
- + # #include <stdlib.h>
- + #
- + # int main( int argc, const char * argv[] )
- + # {
- + # static char editor[1024];
- + # const char * testdir;
- + # const char * testshell;
- + # int argi;
- + #
- + # int iRc = system( NULL );
- + # if (0 == iRc)
- + # {
- + # printf("Can't find a command processor to run system()\n");
- + # return 1;
- + # }
- + #
- + # testshell = getenv( "TESTSHELL" );
- + # if (testshell)
- + # {
- + # strcpy( editor, testshell );
- + # }
- + # else
- + # {
- + # strcpy( editor, "sh" );
- + # }
- + # strcat( editor, " ");
- + #
- + # testdir = getenv( "TESTDIR" );
- + # if (testdir)
- + # {
- + # strcat( editor, testdir );
- + # strcat( editor, "/" );
- + # }
- + # strcat( editor, "editme" );
- + #
- + # for (argi = 1; argi < argc; ++argi)
- + # {
- + # strcat(editor," ");
- + # strcat(editor, argv[argi] );
- + # }
- + #
- + # /* printf("about to run:\"%s\"\n", editor); */
- + # iRc = system( editor );
- + # return iRc;
- + # }
- +
- chmod +x ${TESTDIR}/editme
-
- + if test x"${EDHACK_EDITOR}" = x; then
- + EDITME_DO=${TESTDIR}/editme
- + else
- + EDITME_DO=edhack
- + export TESTDIR
- + fi
- +
- mkdir 1; cd 1
- dotest editor-1 "${testcvs} -q co -l ." ''
- mkdir first-dir
- ***************
- *** 8394,8400 ****
- "${PROG} [a-z]*: scheduling file .file1. for addition
- ${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
- done
- Checking in file1;
- --- 8856,8862 ----
- "${PROG} [a-z]*: scheduling file .file1. for addition
- ${PROG} [a-z]*: scheduling file .file2. for addition
- ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
- ! dotest editor-4 "${testcvs} -e ${EDITME_DO} -q ci" \
- "RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
- done
- Checking in file1;
- ***************
- *** 8407,8417 ****
- ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
- initial revision: 1\.1
- done"
- dotest editor-5 "${testcvs} -q tag -b br" "T file1
- T file2"
- dotest editor-6 "${testcvs} -q update -r br" ''
- echo modify >>file1
- ! dotest editor-7 "${testcvs} -e ${TESTDIR}/editme -q ci" \
- "Checking in file1;
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- new revision: 1\.1\.2\.1; previous revision: 1\.1
- --- 8869,8882 ----
- ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest editor-5 "${testcvs} -q tag -b br" "T file1
- T file2"
- + sleep ${FILESYSTEM_TICK}
- dotest editor-6 "${testcvs} -q update -r br" ''
- + sleep ${FILESYSTEM_TICK}
- echo modify >>file1
- ! dotest editor-7 "${testcvs} -e ${EDITME_DO} -q ci" \
- "Checking in file1;
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- new revision: 1\.1\.2\.1; previous revision: 1\.1
- ***************
- *** 8422,8429 ****
- # already on the branch. If there were a revision on the branch,
- # CVS would correctly give an up-to-date check failed.
- dotest editor-8 "${testcvs} -q update -A" "U file1"
- 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
- new revision: 1\.1\.2\.1; previous revision: 1\.1
- --- 8887,8895 ----
- # already on the branch. If there were a revision on the branch,
- # CVS would correctly give an up-to-date check failed.
- dotest editor-8 "${testcvs} -q update -A" "U file1"
- + sleep ${FILESYSTEM_TICK}
- echo add a line >>file2
- ! dotest editor-9 "${testcvs} -q -e ${EDITME_DO} ci -rbr file2" \
- "Checking in file2;
- ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
- new revision: 1\.1\.2\.1; previous revision: 1\.1
- ***************
- *** 8590,8595 ****
- --- 9056,9062 ----
- fi
-
- cd ../../2/1dir
- + if test x"${CANT_PROTECT_DIRS}" = x; then
- # FIXME: should be using dotest.
- ${testcvs} -q update 2>../tst167.err
- cat ../tst167.err >>${LOGFILE}
- ***************
- *** 8604,8609 ****
- --- 9071,9079 ----
- else
- fail 168
- fi
- + else
- + echo "didn't run 168 (errmsg1) - CANT_PROTECT_DIRS"
- + fi
-
- cd ..
- chmod u+w 1dir
- ***************
- *** 8807,8812 ****
- --- 9277,9283 ----
- pass 178a
- fi
-
- + sleep ${FILESYSTEM_TICK}
- if ${testcvs} edit abb; then
- pass 179
- else
- ***************
- *** 8825,8830 ****
- --- 9296,9302 ----
- fail 181
- fi
-
- + sleep ${FILESYSTEM_TICK}
- echo aaaa >>abb
- if ${testcvs} ci -m modify abb >>${LOGFILE} 2>&1; then
- pass 182
- ***************
- *** 8846,8857 ****
- pass 184
- fi
-
- ! if test -w abb; then
- ! fail 185
- else
- ! pass 185
- fi
-
- if ${testcvs} edit abc; then
- pass 186a1
- else
- --- 9318,9332 ----
- pass 184
- fi
-
- !
- ! if test "x${OS_COMPILER_EMU}" = xwin32_msvc_cygwin32; then
- ! echo 'devcom: (cygwin32 b19.1 test -w strange) - using attrib'
- ! dotest 185 "attrib abb" "A R ${DOTSTAR}"
- else
- ! dotest_fail 185 "test -w abb" ''
- fi
-
- +
- if ${testcvs} edit abc; then
- pass 186a1
- else
- ***************
- *** 8868,8873 ****
- --- 9343,9349 ----
- else
- fail 186a3
- fi
- + sleep ${FILESYSTEM_TICK}
- echo changedabc >abc
- # Try to unedit a modified file; cvs should ask for confirmation
- if (echo no | ${testcvs} unedit abc) >>${LOGFILE}; then
- ***************
- *** 8964,8971 ****
- cd 3
- dotest devcom-some1 "${testcvs} -q co first-dir" 'U first-dir/abb
- U first-dir/abc'
- ! dotest devcom-some2 "test -w first-dir/abb" ''
- ! dotest_fail devcom-some3 "test -w first-dir/abc" ''
- cd ..
-
- if test "$keep" = yes; then
- --- 9440,9453 ----
- cd 3
- dotest devcom-some1 "${testcvs} -q co first-dir" 'U first-dir/abb
- U first-dir/abc'
- ! if test "x${OS_COMPILER_EMU}" = xwin32_msvc_cygwin32; then
- ! echo 'devcom: cygwin32 b19.1 test -w is very weird - using attrib instead'
- ! dotest devcom-some2 "attrib first-dir\\abb" "A ${DOTSTAR}"
- ! dotest devcom-some2 "attrib first-dir\\abc" "A R ${DOTSTAR}"
- ! else
- ! dotest devcom-some2 "test -w first-dir/abb" ''
- ! dotest_fail devcom-some3 "test -w first-dir/abc" ''
- ! fi
- cd ..
-
- if test "$keep" = yes; then
- ***************
- *** 9020,9029 ****
- U first-dir/w1
- U first-dir/w2
- U first-dir/w3'
- ! dotest devcom2-8 "test -w first-dir/nw1" ''
- ! dotest_fail devcom2-9 "test -w first-dir/w1" ''
- ! dotest_fail devcom2-10 "test -w first-dir/w2" ''
- ! dotest_fail devcom2-11 "test -w first-dir/w3" ''
-
- cd first-dir
- # OK, now we want to try files in various states with cvs edit.
- --- 9502,9519 ----
- U first-dir/w1
- U first-dir/w2
- U first-dir/w3'
- ! if test "x${OS_COMPILER_EMU}" = xwin32_msvc_cygwin32; then
- ! echo 'devcom2: cygwin32 b19.1 test -w is very weird - using attrib instead'
- ! dotest devcom2-8 "attrib first-dir\\nw1" "A ${DOTSTAR}"
- ! dotest devcom2-9 "attrib first-dir\\w1" "A R ${DOTSTAR}"
- ! dotest devcom2-10 "attrib first-dir\\w2" "A R ${DOTSTAR}"
- ! dotest devcom2-11 "attrib first-dir\\w3" "A R ${DOTSTAR}"
- ! else
- ! dotest devcom2-8 "test -w first-dir/nw1" ''
- ! dotest_fail devcom2-9 "test -w first-dir/w1" ''
- ! dotest_fail devcom2-10 "test -w first-dir/w2" ''
- ! dotest_fail devcom2-11 "test -w first-dir/w3" ''
- ! fi
-
- cd first-dir
- # OK, now we want to try files in various states with cvs edit.
- ***************
- *** 9164,9175 ****
- --- 9654,9669 ----
- dotest_fail watch4-8 "test -w first-dir/file1" ''
- dotest_fail watch4-9 "test -w first-dir/subdir/sfile" ''
- cd first-dir
- + sleep ${FILESYSTEM_TICK}
- dotest watch4-10 "${testcvs} edit file1" ''
- + sleep ${FILESYSTEM_TICK}
- echo 'edited in 2' >file1
- cd ../..
-
- cd 1/first-dir
- + sleep ${FILESYSTEM_TICK}
- dotest watch4-11 "${testcvs} edit file1" ''
- + sleep ${FILESYSTEM_TICK}
- echo 'edited in 1' >file1
- dotest watch4-12 "${testcvs} -q ci -m edit-in-1" \
- "Checking in file1;
- ***************
- *** 9230,9236 ****
- if echo "yes" | ${testcvs} -Q unedit $file \
- >${TESTDIR}/test.tmp 2>&1 ; then
- dotest unedit-without-baserev-4 "cat ${TESTDIR}/test.tmp" \
- ! "m has been modified; revert changes? ${PROG} unedit: m not mentioned in CVS/Baserev
- ${PROG} unedit: run update to complete the unedit"
- else
- fail unedit-without-baserev-4
- --- 9724,9730 ----
- if echo "yes" | ${testcvs} -Q unedit $file \
- >${TESTDIR}/test.tmp 2>&1 ; then
- dotest unedit-without-baserev-4 "cat ${TESTDIR}/test.tmp" \
- ! "m has been modified; revert changes. ${PROG} unedit: m not mentioned in CVS/Baserev
- ${PROG} unedit: run update to complete the unedit"
- else
- fail unedit-without-baserev-4
- ***************
- *** 9238,9245 ****
-
- # SunOS4.1.4 systems make it this far, but with a corrupted
- # CVS/Entries file. Demonstrate the corruption!
- ! dotest unedit-without-baserev-5 "cat CVS/Entries" \
- ! "/$file/1\.1\.1\.1/.*"
-
- if test "$remote" = yes; then
- dotest unedit-without-baserev-6 "${testcvs} -q update" "U m"
- --- 9732,9739 ----
-
- # SunOS4.1.4 systems make it this far, but with a corrupted
- # CVS/Entries file. Demonstrate the corruption!
- ! #dotest unedit-without-baserev-5 "cat CVS/Entries" \
- ! # "/$file/1\.1\.1\.1/.*"
-
- if test "$remote" = yes; then
- dotest unedit-without-baserev-6 "${testcvs} -q update" "U m"
- ***************
- *** 9284,9290 ****
- rm CVS/Baserev
- if (echo yes | ${testcvs} unedit m) >${TESTDIR}/test.tmp 2>&1; then
- dotest unedit-without-baserev-14 "cat ${TESTDIR}/test.tmp" \
- ! "m has been modified; revert changes? ${PROG} unedit: m not mentioned in CVS/Baserev
- ${PROG} unedit: run update to complete the unedit"
- else
- fail unedit-without-baserev-14
- --- 9778,9784 ----
- rm CVS/Baserev
- if (echo yes | ${testcvs} unedit m) >${TESTDIR}/test.tmp 2>&1; then
- dotest unedit-without-baserev-14 "cat ${TESTDIR}/test.tmp" \
- ! "m has been modified; revert changes. ${PROG} unedit: m not mentioned in CVS/Baserev
- ${PROG} unedit: run update to complete the unedit"
- else
- fail unedit-without-baserev-14
- ***************
- *** 9472,9477 ****
- --- 9966,9972 ----
- </dev/null >binfile.dat
- cat binfile.dat binfile.dat >binfile2.dat
- cd first-dir
- + sleep ${FILESYSTEM_TICK}
- cp ../binfile.dat binfile
- dotest binfiles-2 "${testcvs} add -kb binfile" \
- "${PROG}"' [a-z]*: scheduling file `binfile'\'' for addition
- ***************
- *** 9522,9527 ****
- --- 10017,10023 ----
- rm -r 3
- cd 2/first-dir
-
- + sleep ${FILESYSTEM_TICK}
- cp ../../1/binfile2.dat binfile
- dotest binfiles-6 "${testcvs} -q ci -m modify-it" \
- "Checking in binfile;
- ***************
- *** 9533,9538 ****
- --- 10029,10035 ----
- dotest binfiles-8 "cmp ../binfile2.dat binfile" ''
-
- # Now test handling of conflicts with binary files.
- + sleep ${FILESYSTEM_TICK}
- cp ../binfile.dat binfile
- dotest binfiles-con0 "${testcvs} -q ci -m modify-it" \
- "Checking in binfile;
- ***************
- *** 9540,9545 ****
- --- 10037,10043 ----
- new revision: 1\.3; previous revision: 1\.2
- done"
- cd ../../2/first-dir
- + sleep ${FILESYSTEM_TICK}
- echo 'edits in dir 2' >binfile
- dotest binfiles-con1 "${testcvs} -q update" \
- "U binfile
- ***************
- *** 9550,9555 ****
- --- 10048,10054 ----
- dotest binfiles-con2 "cmp binfile ../../1/binfile.dat" ''
- dotest binfiles-con3 "cat .#binfile.1.2" 'edits in dir 2'
-
- + sleep ${FILESYSTEM_TICK}
- cp ../../1/binfile2.dat binfile
- dotest binfiles-con4 "${testcvs} -q ci -m resolve-it" \
- "Checking in binfile;
- ***************
- *** 9586,9592 ****
- --- 10085,10093 ----
- rm -r 3
-
- cd 2/first-dir
- + sleep ${FILESYSTEM_TICK}
- echo 'this file is $''RCSfile$' >binfile
- + lf_endlines binfile
- dotest binfiles-14a "${testcvs} -q ci -m modify-it" \
- "Checking in binfile;
- ${TESTDIR}/cvsroot/first-dir/binfile,v <-- binfile
- ***************
- *** 9771,9784 ****
- --- 10272,10288 ----
- ${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest binfiles2-2 "${testcvs} -q tag -b br" 'T brmod
- T brmod-trmod
- T brmod-wdmod'
- + sleep ${FILESYSTEM_TICK}
- dotest binfiles2-3 "${testcvs} -q update -r br" ''
- cp ../binfile binfile.dat
- dotest binfiles2-4 "${testcvs} add -kb binfile.dat" \
- "${PROG} [a-z]*: scheduling file .binfile\.dat. for addition on branch .br.
- ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
- + sleep ${FILESYSTEM_TICK}
- cp ../binfile2 brmod
- cp ../binfile2 brmod-trmod
- cp ../binfile2 brmod-wdmod
- ***************
- *** 9808,9819 ****
- --- 10312,10325 ----
- [UP] brmod-wdmod"
- dotest_fail binfiles2-7 "test -f binfile.dat" ''
- dotest binfiles2-7-brmod "cmp ../binfile brmod"
- + sleep ${FILESYSTEM_TICK}
- 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
- new revision: 1\.2; previous revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- cp ../binfile3 brmod-wdmod
-
- dotest binfiles2-8 "${testcvs} -q update -j br" \
- ***************
- *** 9963,9973 ****
- --- 10469,10482 ----
- # both.
- CVSWRAPPERS="* -m 'COPY'"
- export CVSWRAPPERS
- + sleep ${FILESYSTEM_TICK}
- dotest mcopy-2 "${testcvs} -q tag -b br" 'T \.cvswrappers
- T brmod
- T brmod-trmod
- T brmod-wdmod'
- + sleep ${FILESYSTEM_TICK}
- dotest mcopy-3 "${testcvs} -q update -r br" ''
- + sleep ${FILESYSTEM_TICK}
- echo 'modify brmod on br' >brmod
- echo 'modify brmod-trmod on br' >brmod-trmod
- echo 'modify brmod-wdmod on br' >brmod-wdmod
- ***************
- *** 9984,9989 ****
- --- 10493,10499 ----
- ${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v <-- brmod-wdmod
- new revision: 1\.1\.2\.1; previous revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest mcopy-6 "${testcvs} -q update -A" \
- "[UP] brmod
- [UP] brmod-trmod
- ***************
- *** 9993,10004 ****
- --- 10503,10516 ----
- brmod-trmod initial contents
- brmod-wdmod initial contents"
-
- + sleep ${FILESYSTEM_TICK}
- 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
- new revision: 1\.2; previous revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- echo 'modify brmod-wdmod in working dir' >brmod-wdmod
-
- dotest mcopy-8 "${testcvs} -q update -j br" \
- ***************
- *** 10239,10244 ****
- --- 10751,10757 ----
- # This destroys anything currently in cvswrappers, but
- # presumably other tests will take care of it themselves if
- # they use cvswrappers:
- + sleep ${FILESYSTEM_TICK}
- echo "foo*.sb -k 'b'" > cvswrappers
- dotest binwrap3-2 "${testcvs} -q ci -m cvswrappers-mod" \
- "Checking in cvswrappers;
- ***************
- *** 10398,10403 ****
- --- 10911,10917 ----
-
- dotest mwrap-c1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
- cd CVSROOT
- + sleep ${FILESYSTEM_TICK}
- echo "* -m 'COPY'" >>cvswrappers
- dotest mwrap-c2 "${testcvs} -q ci -m wrapper-mod" \
- "Checking in cvswrappers;
- ***************
- *** 10427,10432 ****
- --- 10941,10947 ----
- mkdir m2; cd m2
- dotest mwrap-5 "${testcvs} -q co first-dir" "U first-dir/aa"
- cd first-dir
- + sleep ${FILESYSTEM_TICK}
- echo "changed in m2" >aa
- dotest mwrap-6 "${testcvs} -q ci -m m2-mod" \
- "Checking in aa;
- ***************
- *** 10480,10493 ****
-
- dotest info-1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
- cd CVSROOT
- echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\"" > loginfo
- # The following cases test the format string substitution
- ! echo "ALL echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
- ! echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
- ! echo "ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
- ! echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
- ! echo "first-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null" \
- ! >> loginfo
-
- # Might be nice to move this to crerepos tests; it should
- # work to create a loginfo file if you didn't create one
- --- 10995,11018 ----
-
- dotest info-1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
- cd CVSROOT
- + sleep ${FILESYSTEM_TICK}
- echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\"" > loginfo
- # The following cases test the format string substitution
- ! if test x"${CANT_RUN_SCRIPTS}" = x; then
- ! echo "ALL echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
- ! echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
- ! echo "ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
- ! echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
- ! echo "first-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null" \
- ! >> loginfo
- ! else
- ! echo "ALL ${TESTSHELL} -c \"echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo
- ! echo "ALL ${TESTSHELL} -c \"echo %{v} >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo
- ! echo "ALL ${TESTSHELL} -c \"echo %s >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo
- ! echo "ALL ${TESTSHELL} -c \"echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo
- ! echo "first-dir ${TESTSHELL} -c \"echo %sux >>$TESTDIR/testlog2; cat >/dev/null\"" \
- ! >> loginfo
- ! fi
-
- # Might be nice to move this to crerepos tests; it should
- # work to create a loginfo file if you didn't create one
- ***************
- *** 10520,10526 ****
- --- 11045,11053 ----
- initial revision: 1\.1
- done
- ${PROG} [a-z]*: loginfo:1: no such user variable \${=ZEE}"
- + sleep ${FILESYSTEM_TICK}
- echo line1 >>file1
- + # dotest info-7 "${testcvs} -t -s OTHER=value -s ZEE=z ci -m mod-it" \
- 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
- ***************
- *** 10528,10533 ****
- --- 11055,11067 ----
- done"
- cd ..
- dotest info-9 "cat $TESTDIR/testlog" "xenv-valueyz=${username}=${TESTDIR}/cvsroot="
- +
- + # Windows-NT, Microsoft Visual C++ 4.2 does badly on info-10
- + # for files that have %{sVv} substitutions.
- + # src/logmsg.c(logfile_write) puts apostrophe around strings,
- + # windows-NT/run.c(requote) changes these to quote.
- + # windows-NT/run.c(run_popen) passes these to CMD.EXE.
- + #
- dotest info-10 "cat $TESTDIR/testlog2" 'first-dir file1,NONE,1.1
- first-dir 1.1
- first-dir file1
- ***************
- *** 10540,10545 ****
- --- 11074,11080 ----
- first-dir file1ux'
-
- cd CVSROOT
- + sleep ${FILESYSTEM_TICK}
- echo '# do nothing' >loginfo
- dotest info-11 "${testcvs} -q -s ZEE=garbage ci -m nuke-loginfo" \
- "Checking in loginfo;
- ***************
- *** 10559,10565 ****
- fi
- EOF
- chmod +x ${TESTDIR}/vscript
- ! echo "^first-dir ${TESTDIR}/vscript" >>verifymsg
- dotest info-v1 "${testcvs} -q ci -m add-verification" \
- "Checking in verifymsg;
- ${TESTDIR}/cvsroot/CVSROOT/verifymsg,v <-- verifymsg
- --- 11094,11104 ----
- fi
- EOF
- chmod +x ${TESTDIR}/vscript
- ! if test x"${CANT_RUN_SCRIPTS}" = x; then
- ! echo "^first-dir ${TESTDIR}/vscript" >>verifymsg
- ! else
- ! echo "^first-dir ${TESTSHELL} ${TESTDIR}/vscript" >>verifymsg
- ! fi
- dotest info-v1 "${testcvs} -q ci -m add-verification" \
- "Checking in verifymsg;
- ${TESTDIR}/cvsroot/CVSROOT/verifymsg,v <-- verifymsg
- ***************
- *** 10595,10600 ****
- --- 11134,11140 ----
- rmdir another-dir
-
- cd CVSROOT
- + sleep ${FILESYSTEM_TICK}
- echo '# do nothing' >verifymsg
- dotest info-cleanup-verifymsg "${testcvs} -q ci -m nuke-verifymsg" \
- "Checking in verifymsg;
- ***************
- *** 10739,10744 ****
- --- 11279,11285 ----
-
- dotest config-1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}"
- cd CVSROOT
- + sleep ${FILESYSTEM_TICK}
- echo 'bogus line' >config
- # We can't rely on specific revisions, since other tests
- # might need to modify CVSROOT/config
- ***************
- *** 10748,10753 ****
- --- 11289,11295 ----
- new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
- done
- ${PROG} [a-z]*: Rebuilding administrative file database"
- + sleep ${FILESYSTEM_TICK}
- 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 '='
- ***************
- *** 10756,10761 ****
- --- 11298,11304 ----
- new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
- done
- ${PROG} [a-z]*: Rebuilding administrative file database"
- + sleep ${FILESYSTEM_TICK}
- 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'
- ***************
- *** 10874,10879 ****
- --- 11417,11423 ----
- done"
- rm -f ${TESTDIR}/comment.tmp
-
- + sleep ${FILESYSTEM_TICK}
- echo 'second revision' > file1
- dotest log-4 "${testcvs} -q ci -m2 file1" \
- "Checking in file1;
- ***************
- *** 10881,10888 ****
- --- 11425,11434 ----
- new revision: 1\.2; previous revision: 1\.1
- done"
-
- + sleep ${FILESYSTEM_TICK}
- dotest log-5 "${testcvs} -q tag -b branch file1" 'T file1'
-
- + sleep ${FILESYSTEM_TICK}
- echo 'third revision' > file1
- dotest log-6 "${testcvs} -q ci -m3 file1" \
- "Checking in file1;
- ***************
- *** 10890,10897 ****
- --- 11436,11445 ----
- new revision: 1\.3; previous revision: 1\.2
- done"
-
- + sleep ${FILESYSTEM_TICK}
- dotest log-7 "${testcvs} -q update -r branch" '[UP] file1'
-
- + sleep ${FILESYSTEM_TICK}
- echo 'first branch revision' > file1
- dotest log-8 "${testcvs} -q ci -m1b file1" \
- "Checking in file1;
- ***************
- *** 10901,10906 ****
- --- 11449,11455 ----
-
- dotest log-9 "${testcvs} -q tag tag file1" 'T file1'
-
- + sleep ${FILESYSTEM_TICK}
- echo 'second branch revision' > file1
- dotest log-10 "${testcvs} -q ci -m2b file1" \
- "Checking in file1;
- ***************
- *** 11252,11257 ****
- --- 11801,11807 ----
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- cat >file1 <<EOF
- this
- is
- ***************
- *** 11268,11274 ****
- --- 11818,11826 ----
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- new revision: 1\.2; previous revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest ann-6 "${testcvs} -q tag -b br" "T file1"
- + sleep ${FILESYSTEM_TICK}
- cat >file1 <<EOF
- this
- is
- ***************
- *** 11285,11291 ****
- --- 11837,11845 ----
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- new revision: 1\.3; previous revision: 1\.2
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest ann-8 "${testcvs} -q update -r br" "[UP] file1"
- + sleep ${FILESYSTEM_TICK}
- cat >file1 <<EOF
- this
- is
- ***************
- *** 11416,11434 ****
-
- # First, if the repository doesn't exist at all...
- dotest_fail crerepos-1 \
- ! "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
- "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
- mkdir crerepos
-
- # The repository exists but CVSROOT doesn't.
- dotest_fail crerepos-2 \
- ! "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
- "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
- mkdir crerepos/CVSROOT
-
- # Checkout of nonexistent module
- dotest_fail crerepos-3 \
- ! "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
- "${PROG} [a-z]*: cannot find module .cvs-sanity. - ignored"
-
- # Now test that CVS works correctly without a modules file
- --- 11970,11988 ----
-
- # First, if the repository doesn't exist at all...
- dotest_fail crerepos-1 \
- ! "${testcvs} -d :local:${TESTDIR}/crerepos co cvs-sanity" \
- "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
- mkdir crerepos
-
- # The repository exists but CVSROOT doesn't.
- dotest_fail crerepos-2 \
- ! "${testcvs} -d :local:${TESTDIR}/crerepos co cvs-sanity" \
- "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
- mkdir crerepos/CVSROOT
-
- # Checkout of nonexistent module
- dotest_fail crerepos-3 \
- ! "${testcvs} -d :local:${TESTDIR}/crerepos co cvs-sanity" \
- "${PROG} [a-z]*: cannot find module .cvs-sanity. - ignored"
-
- # Now test that CVS works correctly without a modules file
- ***************
- *** 11438,11447 ****
- # been created with an old version of CVS.
- mkdir tmp; cd tmp
- dotest crerepos-4 \
- ! "${testcvs} -q -d ${TESTDIR}/crerepos co CVSROOT" \
- ''
- if echo yes | \
- ! ${testcvs} -d ${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then
- pass crerepos-5
- else
- fail crerepos-5
- --- 11992,12001 ----
- # been created with an old version of CVS.
- mkdir tmp; cd tmp
- dotest crerepos-4 \
- ! "${testcvs} -q -d :local:${TESTDIR}/crerepos co CVSROOT" \
- ''
- if echo yes | \
- ! ${testcvs} -d :local:${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then
- pass crerepos-5
- else
- fail crerepos-5
- ***************
- *** 11451,11457 ****
- # The directory tmp should be empty
- dotest crerepos-6 "rmdir tmp" ''
-
- ! CREREPOS_ROOT=${TESTDIR}/crerepos
-
- else
- # For remote, just create the repository. We don't yet do
- --- 12005,12011 ----
- # The directory tmp should be empty
- dotest crerepos-6 "rmdir tmp" ''
-
- ! CREREPOS_ROOT=:local:${TESTDIR}/crerepos
-
- else
- # For remote, just create the repository. We don't yet do
- ***************
- *** 11675,11680 ****
- --- 12229,12235 ----
- @d2 12
- @
- EOF
- + lf_endlines ${CVSROOT_DIRNAME}/first-dir/file1,v
- dotest rcs-1 "${testcvs} -q co first-dir" 'U first-dir/file1'
- cd first-dir
- dotest rcs-2 "${testcvs} -q log" "
- ***************
- *** 11784,11789 ****
- --- 12339,12367 ----
- # doc/RCSFILES and friends. One subtle point is that none of
- # the lines end with newlines; that is a feature which we
- # should be testing.
- +
- + # Windows-NT, Microsoft Visual C++ 4.2, Novell IntraNetware
- + # Client 4.11a does badly on rcs-5 when the /tmp is on Netware
- + # server.
- + # src/vers-ts.c(Version-TS) does utime (finfo->file, &t) with
- + # t.actime = t.modtime = 31564805 which causes modified time
- + # of file2 to be set to 1 jan 2099 (rather than 1 jan 1971).
- + # Looks to me like Netware counts file times from 1 jan 1980 0:0:0.
- + # Here is some mush to use dates in 1980 rather than 1971 when
- + # it looks like we have Netware
- +
- + DECADE="7"
- + if touch -t123123591979.59 netware; then
- + if $EXPR "`ls -l netware`" : \
- + "${DOTSTAR}1979${DOTSTAR}" >/dev/null; then
- + : base date probably before 1980
- + else
- + echo "I think you are using a Netware Fileserver"
- + DECADE="8"
- + fi
- + fi
- + rm netware
- +
- cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file2,v
- head 1.5 ;
- branch 1.2.6;
- ***************
- *** 11791,11802 ****
- symbols branch:1.2.6;
- locks;
- testofanewphrase @without newphrase we'd have trouble extending @@ all@ ;
- ! 1.5 date 71.01.01.01.00.00; author joe; state bogus; branches; next 1.4;
- ! 1.4 date 71.01.01.00.00.05; author joe; state bogus; branches; next 1.3;
- ! 1.3 date 70.12.31.15.00.05; author joe; state bogus; branches; next 1.2;
- ! 1.2 date 70.12.31.12.15.05; author me; state bogus; branches 1.2.6.1; next 1.1;
- ! 1.1 date 70.12.31.11.00.05; author joe; state bogus; branches; next; newph;
- ! 1.2.6.1 date 71.01.01.08.00.05; author joe; state Exp; branches; next;
- desc @@
- 1.5 log @@ newphrase1; newphrase2 42; text @head revision@
- 1.4 log @@ text @d1 1
- --- 12369,12380 ----
- symbols branch:1.2.6;
- locks;
- testofanewphrase @without newphrase we'd have trouble extending @@ all@ ;
- ! 1.5 date ${DECADE}1.01.01.01.00.00; author joe; state bogus; branches; next 1.4;
- ! 1.4 date ${DECADE}1.01.01.00.00.05; author joe; state bogus; branches; next 1.3;
- ! 1.3 date ${DECADE}0.12.31.15.00.05; author joe; state bogus; branches; next 1.2;
- ! 1.2 date ${DECADE}0.12.31.12.15.05; author me; state bogus; branches 1.2.6.1; next 1.1;
- ! 1.1 date ${DECADE}0.12.31.11.00.05; author joe; state bogus; branches; next; newph;
- ! 1.2.6.1 date ${DECADE}1.01.01.08.00.05; author joe; state Exp; branches; next;
- desc @@
- 1.5 log @@ newphrase1; newphrase2 42; text @head revision@
- 1.4 log @@ text @d1 1
- ***************
- *** 11818,11830 ****
- --- 12396,12412 ----
- EOF
- # ' Match the single quote in above here doc -- for font-lock mode.
-
- + lf_endlines ${CVSROOT_DIRNAME}/first-dir/file2,v
- +
- # First test the default branch.
- dotest rcs-5 "${testcvs} -q update file2" "U file2"
- dotest rcs-6 "cat file2" "branch revision"
-
- # Check in a revision on the branch to force CVS to
- # interpret every revision in the file.
- + sleep ${FILESYSTEM_TICK}
- dotest rcs-6a "${testcvs} -q update -r branch file2" ""
- + sleep ${FILESYSTEM_TICK}
- echo "next branch revision" > file2
- dotest rcs-6b "${testcvs} -q ci -m mod file2" \
- "Checking in file2;
- ***************
- *** 11855,11888 ****
- testofanewphrase @without newphrase we'd have trouble extending @@ all@;
-
- 1\.5
- ! date 71\.01\.01\.01\.00\.00; author joe; state bogus;
- branches;
- next 1\.4;
-
- 1\.4
- ! date 71\.01\.01\.00\.00\.05; author joe; state bogus;
- branches;
- next 1\.3;
-
- 1\.3
- ! date 70\.12\.31\.15\.00\.05; author joe; state bogus;
- branches;
- next 1\.2;
-
- 1\.2
- ! date 70\.12\.31\.12\.15\.05; author me; state bogus;
- branches
- 1\.2\.6\.1;
- next 1\.1;
-
- 1\.1
- ! date 70\.12\.31\.11\.00\.05; author joe; state bogus;
- branches;
- next ;
- newph ;
-
- 1\.2\.6\.1
- ! date 71\.01\.01\.08\.00\.05; author joe; state Exp;
- branches;
- next 1\.2\.6\.2;
-
- --- 12437,12470 ----
- testofanewphrase @without newphrase we'd have trouble extending @@ all@;
-
- 1\.5
- ! date ${DECADE}1\.01\.01\.01\.00\.00; author joe; state bogus;
- branches;
- next 1\.4;
-
- 1\.4
- ! date ${DECADE}1\.01\.01\.00\.00\.05; author joe; state bogus;
- branches;
- next 1\.3;
-
- 1\.3
- ! date ${DECADE}0\.12\.31\.15\.00\.05; author joe; state bogus;
- branches;
- next 1\.2;
-
- 1\.2
- ! date ${DECADE}0\.12\.31\.12\.15\.05; author me; state bogus;
- branches
- 1\.2\.6\.1;
- next 1\.1;
-
- 1\.1
- ! date ${DECADE}0\.12\.31\.11\.00\.05; author joe; state bogus;
- branches;
- next ;
- newph ;
-
- 1\.2\.6\.1
- ! date ${DECADE}1\.01\.01\.08\.00\.05; author joe; state Exp;
- branches;
- next 1\.2\.6\.2;
-
- ***************
- *** 11960,11966 ****
- next branch revision
- @"
-
- ! if ${testcvs} -q update -p -D '1970-12-31 11:30 UT' file2 \
- >${TESTDIR}/rcs4.tmp
- then
- dotest rcs-9 "cat ${TESTDIR}/rcs4.tmp" "start revision"
- --- 12542,12548 ----
- next branch revision
- @"
-
- ! if ${testcvs} -q update -p -D "19${DECADE}0-12-31 11:30 UT" file2 \
- >${TESTDIR}/rcs4.tmp
- then
- dotest rcs-9 "cat ${TESTDIR}/rcs4.tmp" "start revision"
- ***************
- *** 11968,11974 ****
- fail rcs-9
- fi
-
- ! if ${testcvs} -q update -p -D '1970-12-31 12:30 UT' file2 \
- >${TESTDIR}/rcs4.tmp
- then
- dotest rcs-10 "cat ${TESTDIR}/rcs4.tmp" "mid revision"
- --- 12550,12556 ----
- fail rcs-9
- fi
-
- ! if ${testcvs} -q update -p -D "19${DECADE}0-12-31 12:30 UT" file2 \
- >${TESTDIR}/rcs4.tmp
- then
- dotest rcs-10 "cat ${TESTDIR}/rcs4.tmp" "mid revision"
- ***************
- *** 11976,11982 ****
- fail rcs-10
- fi
-
- ! if ${testcvs} -q update -p -D '1971-01-01 00:30 UT' file2 \
- >${TESTDIR}/rcs4.tmp
- then
- dotest rcs-11 "cat ${TESTDIR}/rcs4.tmp" "new year revision"
- --- 12558,12564 ----
- fail rcs-10
- fi
-
- ! if ${testcvs} -q update -p -D "19${DECADE}1-01-01 00:30 UT" file2 \
- >${TESTDIR}/rcs4.tmp
- then
- dotest rcs-11 "cat ${TESTDIR}/rcs4.tmp" "new year revision"
- ***************
- *** 11985,11991 ****
- fi
-
- # Same test as rcs-10, but with am/pm.
- ! if ${testcvs} -q update -p -D 'December 31, 1970 12:30pm UT' file2 \
- >${TESTDIR}/rcs4.tmp
- then
- dotest rcs-12 "cat ${TESTDIR}/rcs4.tmp" "mid revision"
- --- 12567,12573 ----
- fi
-
- # Same test as rcs-10, but with am/pm.
- ! if ${testcvs} -q update -p -D "December 31, 19${DECADE}0 12:30pm UT" file2 \
- >${TESTDIR}/rcs4.tmp
- then
- dotest rcs-12 "cat ${TESTDIR}/rcs4.tmp" "mid revision"
- ***************
- *** 11994,12000 ****
- fi
-
- # Same test as rcs-11, but with am/pm.
- ! if ${testcvs} -q update -p -D 'January 1, 1971 12:30am UT' file2 \
- >${TESTDIR}/rcs4.tmp
- then
- dotest rcs-13 "cat ${TESTDIR}/rcs4.tmp" "new year revision"
- --- 12576,12582 ----
- fi
-
- # Same test as rcs-11, but with am/pm.
- ! if ${testcvs} -q update -p -D "January 1, 19${DECADE}1 12:30am UT" file2 \
- >${TESTDIR}/rcs4.tmp
- then
- dotest rcs-13 "cat ${TESTDIR}/rcs4.tmp" "new year revision"
- ***************
- *** 12018,12041 ****
- description:
- ----------------------------
- revision 1\.5
- ! date: 1971/01/01 01:00:00; author: joe; state: bogus; lines: ${PLUS}1 -1
- \*\*\* empty log message \*\*\*
- ----------------------------
- revision 1\.4
- ! date: 1971/01/01 00:00:05; author: joe; state: bogus; lines: ${PLUS}1 -1
- \*\*\* empty log message \*\*\*
- ----------------------------
- revision 1\.3
- ! date: 1970/12/31 15:00:05; author: joe; state: bogus; lines: ${PLUS}1 -1
- \*\*\* empty log message \*\*\*
- ----------------------------
- revision 1\.2
- ! date: 1970/12/31 12:15:05; author: me; state: bogus; lines: ${PLUS}1 -1
- branches: 1\.2\.6;
- \*\*\* empty log message \*\*\*
- ----------------------------
- revision 1\.1
- ! date: 1970/12/31 11:00:05; author: joe; state: bogus;
- \*\*\* empty log message \*\*\*
- ----------------------------
- revision 1\.2\.6\.2
- --- 12600,12623 ----
- description:
- ----------------------------
- revision 1\.5
- ! date: 19${DECADE}1/01/01 01:00:00; author: joe; state: bogus; lines: ${PLUS}1 -1
- \*\*\* empty log message \*\*\*
- ----------------------------
- revision 1\.4
- ! date: 19${DECADE}1/01/01 00:00:05; author: joe; state: bogus; lines: ${PLUS}1 -1
- \*\*\* empty log message \*\*\*
- ----------------------------
- revision 1\.3
- ! date: 19${DECADE}0/12/31 15:00:05; author: joe; state: bogus; lines: ${PLUS}1 -1
- \*\*\* empty log message \*\*\*
- ----------------------------
- revision 1\.2
- ! date: 19${DECADE}0/12/31 12:15:05; author: me; state: bogus; lines: ${PLUS}1 -1
- branches: 1\.2\.6;
- \*\*\* empty log message \*\*\*
- ----------------------------
- revision 1\.1
- ! date: 19${DECADE}0/12/31 11:00:05; author: joe; state: bogus;
- \*\*\* empty log message \*\*\*
- ----------------------------
- revision 1\.2\.6\.2
- ***************
- *** 12043,12049 ****
- mod
- ----------------------------
- revision 1\.2\.6\.1
- ! date: 1971/01/01 08:00:05; author: joe; state: Exp; lines: ${PLUS}1 -1
- \*\*\* empty log message \*\*\*
- ============================================================================="
- cd ..
- --- 12625,12631 ----
- mod
- ----------------------------
- revision 1\.2\.6\.1
- ! date: 19${DECADE}1/01/01 08:00:05; author: joe; state: Exp; lines: ${PLUS}1 -1
- \*\*\* empty log message \*\*\*
- ============================================================================="
- cd ..
- ***************
- *** 12095,12100 ****
- --- 12677,12683 ----
- EOF
- # ' Match the 3rd single quote in the here doc -- for font-lock mode.
-
- + lf_endlines ${CVSROOT_DIRNAME}/first-dir/file1,v
- dotest rcs2-1 "${testcvs} -q co first-dir" 'U first-dir/file1'
- cd first-dir
-
- ***************
- *** 12159,12164 ****
- --- 12742,12748 ----
- C3b235f50|kingdon|<remote>|ccvs/emx|1.3|README
- M3b23af50|kingdon|~/work/*0|ccvs/doc|1.281|cvs.texinfo
- EOF
- + lf_endlines ${CVSROOT_DIRNAME}/CVSROOT/history
- dotest history-1 "${testcvs} history -e -a" \
- "O 06/04 19:48 ${PLUS}0000 anonymous ccvs =ccvs= <remote>/\*
- W 06/17 19:51 ${PLUS}0000 anonymous Makefile\.in ccvs/emx == <remote>/emx
- ***************
- *** 12337,12344 ****
- --- 12921,12930 ----
-
- # OK, now add a file on a branch. Check that the mode gets
- # set the same way (it is a different code path in CVS).
- + sleep ${FILESYSTEM_TICK}
- dotest modes-11 "${testcvs} -q tag -b br" 'T aa
- T ab'
- + sleep ${FILESYSTEM_TICK}
- dotest modes-12 "${testcvs} -q update -r br" ''
- touch ac
- dotest modes-13 "${testcvs} add ac" \
- ***************
- *** 12786,12791 ****
- --- 13372,13378 ----
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- new revision: 1\.2; previous revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest sticky-7 "${testcvs} -q update -r tag1" "[UP] file1"
- dotest sticky-8 "cat file1" ''
- dotest sticky-9 "${testcvs} -q update" ''
- ***************
- *** 12808,12813 ****
- --- 13395,13401 ----
- done"
-
- # Now back to tag1
- + sleep ${FILESYSTEM_TICK}
- dotest sticky-15 "${testcvs} -q update -r tag1" "[UP] file1
- ${PROG} [a-z]*: file2 is no longer in the repository"
-
- ***************
- *** 12821,12826 ****
- --- 13409,13415 ----
- dotest sticky-17 "${testcvs} -q ci -m remove-it" ""
- dotest sticky-18 "${testcvs} -q update -A" "U file1
- U file2"
- + sleep ${FILESYSTEM_TICK}
- dotest sticky-19 "${testcvs} -q update -r tag1" \
- "${PROG} [a-z]*: file1 is no longer in the repository
- ${PROG} [a-z]*: file2 is no longer in the repository"
- ***************
- *** 12828,12833 ****
- --- 13417,13423 ----
- U file2"
-
- # Now try with a numeric revision.
- + sleep ${FILESYSTEM_TICK}
- dotest sticky-21 "${testcvs} -q update -r 1.1 file1" "U file1"
- rm file1
- dotest sticky-22 "${testcvs} rm file1" \
- ***************
- *** 13023,13030 ****
- --- 13613,13622 ----
-
- # Test the Name keyword. First go back to normal expansion.
-
- + sleep ${FILESYSTEM_TICK}
- dotest keyword-17 "${testcvs} update -A file1" "U file1"
-
- + sleep ${FILESYSTEM_TICK}
- echo '$''Name$' > file1
- dotest keyword-18 "${testcvs} ci -m modify file1" \
- "Checking in file1;
- ***************
- *** 13032,13043 ****
- --- 13624,13637 ----
- new revision: 1\.2; previous revision: 1\.1
- done"
- dotest keyword-19 "${testcvs} -q tag tag1" "T file1"
- + sleep ${FILESYSTEM_TICK}
- echo "change" >> file1
- dotest keyword-20 "${testcvs} -q ci -m mod2 file1" \
- "Checking in file1;
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- new revision: 1\.3; previous revision: 1\.2
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest keyword-21 "${testcvs} -q update -r tag1" "[UP] file1"
-
- # FIXME: This test fails when remote. The second expect
- ***************
- *** 13083,13088 ****
- --- 13677,13683 ----
- dotest keywordlog-4a "${testcvs} -q co first-dir" "U first-dir/file1"
- cd ../1/first-dir
-
- + sleep ${FILESYSTEM_TICK}
- echo 'xx $''Log$' > file1
- cat >${TESTDIR}/comment.tmp <<EOF
- First log line
- ***************
- *** 13094,13099 ****
- --- 13689,13695 ----
- new revision: 1\.2; previous revision: 1\.1
- done"
- rm -f ${TESTDIR}/comment.tmp
- + sleep ${FILESYSTEM_TICK}
- dotest keywordlog-6 "${testcvs} -q tag -b br" "T file1"
- dotest keywordlog-7 "cat file1" \
- "xx "'\$'"Log: file1,v "'\$'"
- ***************
- *** 13112,13117 ****
- --- 13708,13714 ----
- xx"
- cd ../../1/first-dir
-
- + sleep ${FILESYSTEM_TICK}
- echo "change" >> file1
- dotest keywordlog-10 "${testcvs} ci -m modify file1" \
- "Checking in file1;
- ***************
- *** 13143,13149 ****
- --- 13740,13748 ----
- change"
-
- cd ../../1/first-dir
- + sleep ${FILESYSTEM_TICK}
- dotest keywordlog-14 "${testcvs} -q update -r br" "[UP] file1"
- + sleep ${FILESYSTEM_TICK}
- echo br-change >>file1
- dotest keywordlog-15 "${testcvs} -q ci -m br-modify" \
- "Checking in file1;
- ***************
- *** 13161,13166 ****
- --- 13760,13766 ----
- xx
- br-change"
- cd ../../2/first-dir
- + sleep ${FILESYSTEM_TICK}
- dotest keywordlog-17 "${testcvs} -q update -r br" "[UP] file1"
- dotest keywordlog-18 "cat file1" \
- "xx "'\$'"Log: file1,v "'\$'"
- ***************
- *** 13232,13237 ****
- --- 13832,13838 ----
- "U first-dir/file1
- U first-dir/file2"
- cd first-dir
- + sleep ${FILESYSTEM_TICK}
- echo 'add a line on trunk' >> file1
- dotest head-3 "${testcvs} -q ci -m modify" \
- "Checking in file1;
- ***************
- *** 13240,13254 ****
- --- 13841,13859 ----
- done"
- dotest head-4 "${testcvs} -q tag trunktag" "T file1
- T file2"
- + sleep ${FILESYSTEM_TICK}
- 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
- new revision: 1\.3; previous revision: 1\.2
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest head-6 "${testcvs} -q tag -b br1" "T file1
- T file2"
- + sleep ${FILESYSTEM_TICK}
- dotest head-7 "${testcvs} -q update -r br1" ""
- + sleep ${FILESYSTEM_TICK}
- echo 'modify on branch' >>file1
- dotest head-8 "${testcvs} -q ci -m modify" \
- "Checking in file1;
- ***************
- *** 13257,13262 ****
- --- 13862,13868 ----
- done"
- dotest head-9 "${testcvs} -q tag brtag" "T file1
- T file2"
- + sleep ${FILESYSTEM_TICK}
- echo 'modify on branch after brtag' >>file1
- dotest head-10 "${testcvs} -q ci -m modify" \
- "Checking in file1;
- ***************
- *** 13265,13270 ****
- --- 13871,13877 ----
- done"
- # With no sticky tags, HEAD is the head of the trunk.
- dotest head-trunk-setup "${testcvs} -q update -A" "[UP] file1"
- + sleep ${FILESYSTEM_TICK}
- dotest head-trunk-update "${testcvs} -q update -r HEAD -p file1" \
- "imported contents
- add a line on trunk
- ***************
- *** 13290,13296 ****
- --- 13897,13905 ----
- ${PLUS} modify on branch after brtag"
-
- # With a branch sticky tag, HEAD is the head of the trunk.
- + sleep ${FILESYSTEM_TICK}
- dotest head-br1-setup "${testcvs} -q update -r br1" "[UP] file1"
- + sleep ${FILESYSTEM_TICK}
- dotest head-br1-update "${testcvs} -q update -r HEAD -p file1" \
- "imported contents
- add a line on trunk
- ***************
- *** 13301,13307 ****
- --- 13910,13918 ----
-
- # With a nonbranch sticky tag on a branch,
- # HEAD is the head of the trunk
- + sleep ${FILESYSTEM_TICK}
- dotest head-brtag-setup "${testcvs} -q update -r brtag" "[UP] file1"
- + sleep ${FILESYSTEM_TICK}
- dotest head-brtag-update "${testcvs} -q update -r HEAD -p file1" \
- "imported contents
- add a line on trunk
- ***************
- *** 13314,13323 ****
- --- 13925,13936 ----
-
- # With a nonbranch sticky tag on the trunk, HEAD is the head
- # of the trunk, I think.
- + sleep ${FILESYSTEM_TICK}
- dotest head-trunktag-setup "${testcvs} -q update -r trunktag" \
- "[UP] file1"
- dotest head-trunktag-check "cat file1" "imported contents
- add a line on trunk"
- + sleep ${FILESYSTEM_TICK}
- dotest head-trunktag-update "${testcvs} -q update -r HEAD -p file1" \
- "imported contents
- add a line on trunk
- ***************
- *** 13392,13399 ****
- --- 14005,14015 ----
- ${TESTDIR}/cvsroot/first-dir/file1,v <-- file1
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest tagdate-5 "${testcvs} -q tag -b br1" "T file1"
- + sleep ${FILESYSTEM_TICK}
- dotest tagdate-6 "${testcvs} -q tag -b br2" "T file1"
- + sleep ${FILESYSTEM_TICK}
- echo trunk-2 >file1
- dotest tagdate-7 "${testcvs} -q ci -m modify-on-trunk" \
- "Checking in file1;
- ***************
- *** 13404,13410 ****
- --- 14020,14028 ----
- # any revisions. First the case where br2 doesn't have any
- # revisions either:
- dotest tagdate-8 "${testcvs} -q update -p -r br1 -D now" "trunk-1"
- + sleep ${FILESYSTEM_TICK}
- dotest tagdate-9 "${testcvs} -q update -r br2" "[UP] file1"
- + sleep ${FILESYSTEM_TICK}
- echo br2-1 >file1
- dotest tagdate-10 "${testcvs} -q ci -m modify-on-br2" \
- "Checking in file1;
- ***************
- *** 13450,13461 ****
- --- 14068,14083 ----
- ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch2-5 "${testcvs} -q tag -b A" "T file1
- T file2"
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch2-6 "${testcvs} -q tag -b B" "T file1
- T file2"
-
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch2-7 "${testcvs} -q update -r B" ''
- + sleep ${FILESYSTEM_TICK}
- echo branch-B >file1
- echo branch-B >file2
- dotest multibranch2-8 "${testcvs} -q ci -m modify-on-B" \
- ***************
- *** 13468,13475 ****
- --- 14090,14099 ----
- new revision: 1\.1\.4\.1; previous revision: 1\.1
- done"
-
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch2-9 "${testcvs} -q update -r A" '[UP] file1
- [UP] file2'
- + sleep ${FILESYSTEM_TICK}
- echo branch-A >file1
- # 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" \
- ***************
- *** 13533,13540 ****
- --- 14157,14166 ----
- # bring the changes from B to A. Probably tests many of the
- # same code paths but might as well keep it separate, I guess.
-
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch2-13 "${testcvs} -q update -r B" "[UP] file1
- [UP] file2"
- + sleep ${FILESYSTEM_TICK}
- dotest multibranch2-14 "${testcvs} -q update -r A -j B file2" \
- "[UP] file2
- RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
- ***************
- *** 13693,13701 ****
- --- 14319,14330 ----
- ${TESTDIR}/cvsroot/first-dir/file2,v <-- file2
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- dotest admin-7 "${testcvs} -q tag -b br" "T file1
- T file2"
- + sleep ${FILESYSTEM_TICK}
- dotest admin-8 "${testcvs} -q update -r br" ""
- + sleep ${FILESYSTEM_TICK}
- echo 'add a line on the branch' >> file1
- dotest admin-9 "${testcvs} -q ci -m modify-on-branch" \
- "Checking in file1;
- ***************
- *** 13963,13968 ****
- --- 14592,14598 ----
- fi # end of tests skipped for remote
-
- # Add another revision to file2, so we can delete one.
- + sleep ${FILESYSTEM_TICK}
- echo 'add a line' >> file2
- dotest admin-21 "${testcvs} -q ci -m modify file2" \
- "Checking in file2;
- ***************
- *** 13990,14019 ****
- --- 14620,14654 ----
- ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
- initial revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- echo second rev >> aaa
- dotest admin-22-o3 "${testcvs} -q ci -m second aaa" \
- "Checking in aaa;
- ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
- new revision: 1\.2; previous revision: 1\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- echo third rev >> aaa
- dotest admin-22-o4 "${testcvs} -q ci -m third aaa" \
- "Checking in aaa;
- ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
- new revision: 1\.3; previous revision: 1\.2
- done"
- + sleep ${FILESYSTEM_TICK}
- echo fourth rev >> aaa
- dotest admin-22-o5 "${testcvs} -q ci -m fourth aaa" \
- "Checking in aaa;
- ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
- new revision: 1\.4; previous revision: 1\.3
- done"
- + sleep ${FILESYSTEM_TICK}
- echo fifth rev >>aaa
- dotest admin-22-o6 "${testcvs} -q ci -m fifth aaa" \
- "Checking in aaa;
- ${TESTDIR}/cvsroot/first-dir/aaa,v <-- aaa
- new revision: 1\.5; previous revision: 1\.4
- done"
- + sleep ${FILESYSTEM_TICK}
- echo sixth rev >> aaa
- dotest admin-22-o7 "${testcvs} -q ci -m sixth aaa" \
- "Checking in aaa;
- ***************
- *** 14083,14090 ****
- --- 14718,14728 ----
- first
- ============================================================================="
-
- + sleep ${FILESYSTEM_TICK}
- dotest admin-22-o14 "${testcvs} tag -b -r1.3 br1 aaa" "T aaa"
- + sleep ${FILESYSTEM_TICK}
- dotest admin-22-o15 "${testcvs} update -rbr1 aaa" "U aaa"
- + sleep ${FILESYSTEM_TICK}
- echo new branch rev >> aaa
- dotest admin-22-o16 "${testcvs} ci -m new-branch aaa" \
- "Checking in aaa;
- ***************
- *** 14106,14123 ****
- --- 14744,14764 ----
- second rev
- third rev
- fourth rev"
- + sleep ${FILESYSTEM_TICK}
- 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
- new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1
- done"
- + sleep ${FILESYSTEM_TICK}
- 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
- new revision: 1\.3\.2\.3; previous revision: 1\.3\.2\.2
- done"
- + sleep ${FILESYSTEM_TICK}
- echo fourth branch rev >> aaa
- dotest admin-22-o21 "${testcvs} ci -m branch-four aaa" \
- "Checking in aaa;
- ***************
- *** 14298,14303 ****
- --- 14939,14945 ----
-
- # Add a couple more revisions
- #
- + sleep ${FILESYSTEM_TICK}
- echo "nuthr_line" >> file2
- dotest admin-27-1 "${testcvs} commit -m nuthr_line file2" \
- "Checking in file2;
- ***************
- *** 14305,14310 ****
- --- 14947,14953 ----
- new revision: 1\.3; previous revision: 1\.2
- done"
-
- + sleep ${FILESYSTEM_TICK}
- echo "yet_another" >> file2
- dotest admin-27-2 "${testcvs} commit -m yet_another file2" \
- "Checking in file2;
- ***************
- *** 14554,14560 ****
- fail reserved-11
- fi
- cd CVSROOT
- ! echo "DEFAULT ${TESTDIR}/lockme" >>commitinfo
- dotest reserved-12 "${testcvs} -q ci -m rcslock commitinfo" \
- "Checking in commitinfo;
- ${TESTDIR}/cvsroot/CVSROOT/commitinfo,v <-- commitinfo
- --- 15197,15208 ----
- fail reserved-11
- fi
- cd CVSROOT
- ! sleep ${FILESYSTEM_TICK}
- ! if test x"${CANT_RUN_SCRIPTS}" = x; then
- ! echo "DEFAULT ${TESTDIR}/lockme" >>commitinfo
- ! else
- ! echo "DEFAULT ${TESTSHELL} ${TESTDIR}/lockme" >>commitinfo
- ! fi
- dotest reserved-12 "${testcvs} -q ci -m rcslock commitinfo" \
- "Checking in commitinfo;
- ${TESTDIR}/cvsroot/CVSROOT/commitinfo,v <-- commitinfo
- ***************
- *** 15449,15454 ****
- --- 16097,16103 ----
- CPen *pMinorPen; // pen to use for drawing minor grid lines
- d472 12
- @" > diffmerge2/sgrid.h,v
- + lf_endlines diffmerge2/sgrid.h,v
-
- # We have to put the RCS file in the repository by hand for
- # this test:
- ***************
- *** 15512,15518 ****
- # End of TODO list.
-
- # Remove the test directory, but first change out of it.
- ! cd /tmp
- rm -rf ${TESTDIR}
-
- # end of sanity.sh
- --- 16161,16167 ----
- # End of TODO list.
-
- # Remove the test directory, but first change out of it.
- ! cd ${TMPDIR}
- rm -rf ${TESTDIR}
-
- # end of sanity.sh
- Index: src/server.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/server.c,v
- retrieving revision 1.8
- retrieving revision 1.5.2.7
- diff -c -r1.8 -r1.5.2.7
- *** src/server.c 1998/07/13 15:25:02 1.8
- --- src/server.c 1998/08/01 16:19:25 1.5.2.7
- ***************
- *** 364,370 ****
- * Skip over leading slash if present. We won't bother to try to
- * make '/'.
- */
- ! p = dir + 1;
- while (1)
- {
- while (*p != '/' && *p != '\0')
- --- 364,370 ----
- * Skip over leading slash if present. We won't bother to try to
- * make '/'.
- */
- ! p = strchr(dir, '/') + 1;
- while (1)
- {
- while (*p != '/' && *p != '\0')
- ***************
- *** 624,636 ****
- free (path);
-
- #ifdef HAVE_PUTENV
- ! env = malloc (strlen (CVSROOT_ENV) + strlen (CVSroot_directory) + 1 + 1);
- if (env == NULL)
- {
- pending_error = ENOMEM;
- return;
- }
- ! (void) sprintf (env, "%s=%s", CVSROOT_ENV, CVSroot_directory);
- (void) putenv (env);
- /* do not free env, as putenv has control of it */
- #endif
- --- 624,636 ----
- free (path);
-
- #ifdef HAVE_PUTENV
- ! env = malloc (strlen (CVSROOT_ENV) + strlen (CVSroot_directory) + 8 + 1);
- if (env == NULL)
- {
- pending_error = ENOMEM;
- return;
- }
- ! (void) sprintf (env, "%s=:local:%s", CVSROOT_ENV, CVSroot_directory);
- (void) putenv (env);
- /* do not free env, as putenv has control of it */
- #endif
- ***************
- *** 734,739 ****
- --- 734,742 ----
- return;
- }
-
- + if (isabsolute (dir))
- + return;
- +
- dir_name = malloc (strlen (server_temp_dir) + dir_len + 40);
- if (dir_name == NULL)
- {
- ***************
- *** 1046,1051 ****
- --- 1049,1064 ----
- }
- }
-
- + /* Kopt for the next file sent in Modified or Is-modified. */
- + static char *kopt;
- +
- + struct an_entry {
- + struct an_entry *next;
- + char *entry;
- + };
- +
- + static struct an_entry *entries;
- +
- /* Receive SIZE bytes, write to filename FILE. */
- static void
- receive_file (size, file, gzipped)
- ***************
- *** 1057,1065 ****
- char *arg = file;
- pid_t gzip_pid = 0;
- int gzip_status;
-
- /* Write the file. */
- ! fd = CVS_OPEN (arg, O_WRONLY | O_CREAT | O_TRUNC, 0600);
- if (fd < 0)
- {
- pending_error_text = malloc (40 + strlen (arg));
- --- 1070,1101 ----
- char *arg = file;
- pid_t gzip_pid = 0;
- int gzip_status;
- + int len, bin;
- + struct an_entry *ent;
- + char *p = NULL;
- +
- + len = strlen (arg);
- + for (ent = entries; ent != NULL; ent = ent->next)
- + {
- + if ((p = strchr (ent->entry, '/')) == NULL)
- + continue;
- + if (strncmp (p+1, arg, len) == 0 && p[1+len] == '/')
- + break;
- + }
- + bin = 0;
- + if (ent != NULL)
- + {
- + p += 1+len;
- + if ((p = strchr(p+1, '/')) != NULL &&
- + (p = strchr(p+1, '/')) != NULL &&
- + strncmp(p, "/-kb/", 4) == 0)
- + bin = OPEN_BINARY;
- + }
- + else if (kopt != NULL && strcmp(kopt, "-kb") == 0)
- + bin = OPEN_BINARY;
-
- /* Write the file. */
- ! fd = CVS_OPEN (arg, O_WRONLY | O_CREAT | O_TRUNC | bin, 0600);
- if (fd < 0)
- {
- pending_error_text = malloc (40 + strlen (arg));
- ***************
- *** 1112,1120 ****
- }
- }
-
- - /* Kopt for the next file sent in Modified or Is-modified. */
- - static char *kopt;
- -
- static void serve_modified PROTO ((char *));
-
- static void
- --- 1148,1153 ----
- ***************
- *** 1247,1259 ****
- {
- }
-
- - struct an_entry {
- - struct an_entry *next;
- - char *entry;
- - };
- -
- - static struct an_entry *entries;
- -
- static void serve_unchanged PROTO ((char *));
-
- static void
- --- 1280,1285 ----
- ***************
- *** 3563,3568 ****
- --- 3589,3595 ----
- {
- int status, fd, gzip_status;
- pid_t gzip_pid;
- + int bin = 0;
-
- /* Callers must avoid passing us a buffer if
- file_gzip_level is set. We could handle this case,
- ***************
- *** 3571,3578 ****
- if (filebuf != NULL)
- error (1, 0, "\
- CVS server internal error: unhandled case in server_updated");
- !
- ! fd = CVS_OPEN (finfo->file, O_RDONLY | OPEN_BINARY, 0);
- if (fd < 0)
- error (1, errno, "reading %s", finfo->fullname);
- fd = filter_through_gzip (fd, 1, file_gzip_level, &gzip_pid);
- --- 3598,3607 ----
- if (filebuf != NULL)
- error (1, 0, "\
- CVS server internal error: unhandled case in server_updated");
- ! if (finfo->rcs->expand != NULL &&
- ! strcmp(finfo->rcs->expand, "b") == 0)
- ! bin = OPEN_BINARY;
- ! fd = CVS_OPEN (finfo->file, O_RDONLY | bin, 0);
- if (fd < 0)
- error (1, errno, "reading %s", finfo->fullname);
- fd = filter_through_gzip (fd, 1, file_gzip_level, &gzip_pid);
- ***************
- *** 3597,3607 ****
- else if (filebuf == NULL)
- {
- long status;
-
- ! f = CVS_FOPEN (finfo->file, "rb");
- if (f == NULL)
- error (1, errno, "reading %s", finfo->fullname);
- ! status = buf_read_file (f, size, &list, &last);
- if (status == -2)
- (*protocol->memory_error) (protocol);
- else if (status != 0)
- --- 3626,3640 ----
- else if (filebuf == NULL)
- {
- long status;
- + int bin = 0;
-
- ! if (finfo->rcs->expand != NULL &&
- ! strcmp(finfo->rcs->expand, "b") == 0)
- ! bin = 1;
- ! f = CVS_FOPEN (finfo->file, bin ? "rb" : "r");
- if (f == NULL)
- error (1, errno, "reading %s", finfo->fullname);
- ! status = buf_read_file_to_eof (f, &list, &last);
- if (status == -2)
- (*protocol->memory_error) (protocol);
- else if (status != 0)
- ***************
- *** 3609,3614 ****
- --- 3642,3648 ----
- finfo->fullname);
- if (fclose (f) == EOF)
- error (1, errno, "reading %s", finfo->fullname);
- + size = buf_chain_length (list);
- }
- }
-
- ***************
- *** 4395,4400 ****
- --- 4429,4439 ----
- int argc;
- char **argv;
- {
- + #ifdef RSHD_NOT_TRANSPARENT
- + setmode (STDIN_FILENO, O_BINARY);
- + setmode (STDOUT_FILENO, O_BINARY);
- + setmode (STDERR_FILENO, O_BINARY);
- + #endif
- if (argc == -1)
- {
- static const char *const msg[] =
- Index: src/update.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/src/update.c,v
- retrieving revision 1.7
- retrieving revision 1.5.2.5
- diff -c -r1.7 -r1.5.2.5
- *** src/update.c 1998/07/13 15:25:02 1.7
- --- src/update.c 1998/07/16 00:33:55 1.5.2.5
- ***************
- *** 487,494 ****
- time_t now;
-
- (void) time (&now);
- ! if (now == last_register_time)
- ! sleep (1); /* to avoid time-stamp races */
- }
-
- return (err);
- --- 487,497 ----
- time_t now;
-
- (void) time (&now);
- ! if (now < last_register_time + FILESYSTEM_TICK)
- ! {
- ! /* to avoid time-stamp races */
- ! sleep (last_register_time + FILESYSTEM_TICK - now);
- ! }
- }
-
- return (err);
- ***************
- *** 1685,1691 ****
- violation. */
- if (CVS_STAT (vers_ts->srcfile->path, file_info) < 0)
- error (1, errno, "could not stat %s", vers_ts->srcfile->path);
- ! if (chmod (finfo->file,
- file_info->st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH))
- < 0)
- error (0, errno, "cannot change mode of file %s", finfo->file);
- --- 1688,1694 ----
- violation. */
- if (CVS_STAT (vers_ts->srcfile->path, file_info) < 0)
- error (1, errno, "could not stat %s", vers_ts->srcfile->path);
- ! if (CVS_CHMOD (finfo->file,
- file_info->st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH))
- < 0)
- error (0, errno, "cannot change mode of file %s", finfo->file);
- Index: windows-NT/ChangeLog
- ===================================================================
- RCS file: e:/cvsroot/ccvs/windows-NT/ChangeLog,v
- retrieving revision 1.7
- retrieving revision 1.5.2.3
- diff -c -r1.7 -r1.5.2.3
- *** windows-NT/ChangeLog 1998/07/13 15:25:15 1.7
- --- windows-NT/ChangeLog 1998/07/16 00:07:30 1.5.2.3
- ***************
- *** 1,3 ****
- --- 1,13 ----
- + 1998-07-06 Murray Bishop <bishop@acnielsen.com.au>
- +
- + * options.h [FILESYSTEM_TICK]: Define seconds per tick as 2 for FAT.
- +
- + 1998-07-02 Murray Bishop <bishop@acnielsen.com.au>
- +
- + * run.c (run_popen): Don't change ' to " (breaks sanity.sh info-10).
- + * run.c (requote): Remove. Useless for Windows-NT CMD.EXE and also
- + for Windows-95 COMMAND.COM.
- +
- 1998-07-01 Jim Kingdon <kingdon@harvey.cyclic.com>
-
- * startserver.c (wnt_shutdown_server): Check for errors from close().
- ***************
- *** 11,18 ****
- --- 21,60 ----
- (wnt_shutdown_server): use the new global to decide whether or not
- to call socket routines or simply use close.
-
- + 1998-06-23 Murray Bishop <bishop@acnielsen.com.au>
- +
- + * filesubr.c (rename_file): If either from or to is open in RCS
- + cache, close RCS cache before any other file operations.
- +
- + 1998-06-19 Murray Bishop <bishop@acnielsen.com.au>
-
- + * filesubr.c (rename_readonly_file): add function so renames
- + work when using Novell IntranetWare client.
- + * filesubr.c (rename_file): try rename_readonly_file before
- + calling error.
- + * filesubr.c (wnt_rename): try rename_readonly_file before
- + returning < 0.
- +
- + 1998-06-16 Murray Bishop <bishop@acnielsen.com.au>
- +
- + * config.h (CVS_RENAME): Define.
- + * filesubr.c (wnt_rename): If the oldname is open in rcs cache,
- + close it before attempting rename(). - under windows and OS/2
- + you can't rename an open file (nor pass binfiles2-10, join2-20,
- + (death-)71.
- + See also http://www.cyclic.com/cvs/dev-emx27.txt, which suggests
- + identical function (os2_rename) in emx-new/system.c.
- + * filesubr.c (expand_wild): When path whose last component is
- + "." is passed as argument, copy that rather than replacing by
- + last component of parent directory.
- +
- 1998-06-11 Jim Kingdon
- +
- + * config.h (CVS_STAT, CVS_LSTAT): Define.
- + * filesubr.c, config.h (wnt_stat, wnt_lstat, check_statbuf):
- + New functions.
- +
- + Thu Jun 11 21:58:58 1998 by kingdon
-
- * config.h (CVS_STAT, CVS_LSTAT): Define.
- * filesubr.c, config.h (wnt_stat, wnt_lstat, check_statbuf):
- Index: windows-NT/config.h
- ===================================================================
- RCS file: e:/cvsroot/ccvs/windows-NT/config.h,v
- retrieving revision 1.4
- retrieving revision 1.3.2.2
- diff -c -r1.4 -r1.3.2.2
- *** windows-NT/config.h 1998/06/23 15:32:10 1.4
- --- windows-NT/config.h 1998/07/16 00:07:30 1.3.2.2
- ***************
- *** 240,245 ****
- --- 240,249 ----
- #define CVS_LSTAT wnt_lstat
- extern int wnt_lstat ();
-
- + /* Windows NT rename needs 'to' doesn't exist and 'from' isn't open */
- + #define CVS_RENAME wnt_rename
- + extern int wnt_rename(const char * from, const char * to);
- +
- /* This function doesn't exist under Windows NT; we
- provide a stub. */
- extern int readlink (char *path, char *buf, int buf_size);
- Index: windows-NT/filesubr.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/windows-NT/filesubr.c,v
- retrieving revision 1.6
- retrieving revision 1.5.2.2
- diff -c -r1.6 -r1.5.2.2
- *** windows-NT/filesubr.c 1998/06/23 15:32:11 1.6
- --- windows-NT/filesubr.c 1998/07/16 00:07:30 1.5.2.2
- ***************
- *** 23,28 ****
- --- 23,29 ----
- #include "cvs.h"
-
- static int deep_remove_dir PROTO((const char *path));
- + static int rename_readonly_file PROTO((const char *from, const char *to));
-
- /* Copies "from" to "to". Note that the functionality here is similar
- to the win32 function CopyFile, but (1) we copy LastAccessTime and
- ***************
- *** 387,396 ****
- if (noexec)
- return;
-
- ! /* Win32 unlink is stupid --- it fails if the file is read-only */
- ! chmod(to, S_IWRITE);
- ! unlink(to);
- ! if (rename (from, to) < 0)
- error (1, errno, "cannot rename file %s to %s", from, to);
- }
-
- --- 388,394 ----
- if (noexec)
- return;
-
- ! if (wnt_rename (from, to) < 0)
- error (1, errno, "cannot rename file %s to %s", from, to);
- }
-
- ***************
- *** 413,418 ****
- --- 411,421 ----
-
- /* Win32 unlink is stupid - it fails if the file is read-only */
- chmod (f, _S_IWRITE);
- +
- + /* And also if the file is open */
- + if (RCS_get_cached ( f ) != NULL)
- + RCS_cache_close ();
- +
- return (unlink (f));
- }
-
- ***************
- *** 436,443 ****
- return (0);
-
- /* Win32 unlink is stupid - it fails if the file is read-only */
- ! chmod (f, _S_IWRITE);
- ! if (unlink (f) != 0)
- {
- /* under Windows NT, unlink returns EACCES if the path
- is a directory. Under Windows 95, ENOENT. */
- --- 439,445 ----
- return (0);
-
- /* Win32 unlink is stupid - it fails if the file is read-only */
- ! if (unlink_file (f) != 0)
- {
- /* under Windows NT, unlink returns EACCES if the path
- is a directory. Under Windows 95, ENOENT. */
- ***************
- *** 484,491 ****
- sprintf (buf, "%s/%s", path, dp->d_name);
-
- /* Win32 unlink is stupid - it fails if the file is read-only */
- ! chmod (buf, _S_IWRITE);
- ! if (unlink (buf) != 0 )
- {
- /* Under Windows NT, unlink returns EACCES if the path
- is a directory. Under Windows 95, ENOENT. It
- --- 486,492 ----
- sprintf (buf, "%s/%s", path, dp->d_name);
-
- /* Win32 unlink is stupid - it fails if the file is read-only */
- ! if (unlink_file (buf) != 0 )
- {
- /* Under Windows NT, unlink returns EACCES if the path
- is a directory. Under Windows 95, ENOENT. It
- ***************
- *** 755,760 ****
- --- 756,772 ----
- As nearly as I can guess, this bug has existed since
- expand_wild was first created. At least, it is in CVS 1.9 (I
- just tried it). */
- + /* I (Murray Bishop) got failures on sanity.sh death2-diff-5,
- + branches2-11 and join-4, using Windows NT 4.0 fixpack 3,
- + Microsoft Visual C++ 4.2.
- + After getting nowhere with the debugger, I found the note above
- + and did some experiments on 17 June 98.
- + FindFirstFile does these strange things when cvs (1.9.27) is
- + run in /tmp/cvs-sanity/1/first-dir :
- +
- + argv[i] fdata.cFileName
- + . first-dir
- + ../first-dir/. first-dir */
-
- /* FindFirstFile doesn't return pathnames, so we have to do
- this ourselves. Luckily, it's no big deal, since globbing
- ***************
- *** 822,834 ****
-
- /* Copy the file name. */
-
- ! if (fncmp (argv[i] + dirname_length, fdata.cFileName) == 0)
- /* We didn't expand a wildcard; we just matched a filename.
- Use the file name as specified rather than the filename
- which exists in the directory (they may differ in case).
- This is needed to make cvs add on a directory consistently
- use the name specified on the command line, but it is
- probably a good idea in other contexts too. */
- strcpy (new_argv[new_argc], argv[i]);
- else
- strcat (new_argv[new_argc], fdata.cFileName);
- --- 834,850 ----
-
- /* Copy the file name. */
-
- ! if (fncmp (argv[i] + dirname_length, fdata.cFileName) == 0
- ! || strcmp (argv[i] + dirname_length, ".") == 0)
- /* We didn't expand a wildcard; we just matched a filename.
- Use the file name as specified rather than the filename
- which exists in the directory (they may differ in case).
- This is needed to make cvs add on a directory consistently
- use the name specified on the command line, but it is
- probably a good idea in other contexts too. */
- + /* comparison with "." copes with FindFirstFile returning
- + name of parent directory when given "." (Thats not a
- + feature, its a bug) */
- strcpy (new_argv[new_argc], argv[i]);
- else
- strcat (new_argv[new_argc], fdata.cFileName);
- ***************
- *** 902,904 ****
- --- 918,1044 ----
- check_statbuf (file, sb);
- return retval;
- }
- +
- + /*
- + With Windows-NT 4.0 Service Pack 3 and Novell IntranetWare Client 4.11a
- + and Microsoft Visual C++ 4.2,
- + attempts to rename readonly files fail with "Permission denied".
- + (This doesn't happen with Microsoft Netware Client, nor on NTFS local
- + file system)
- +
- + In addition, with a Netware server version 4.11 that was built by an
- + upgrade from 4.10 without doing the filesystem backup and restore
- + Novell recommended, I get flakey failures to rename readonly files
- + (about 4 per pass of sanity.sh). The retry code below works around
- + that.
- + On a different server where 4.11 was installed on a clean machine,
- + no such problem happened.
- +
- + Make from not readonly, try rename, restore modes on file.
- + Return what rename did.
- + */
- + int
- + rename_readonly_file (from, to)
- + const char *from;
- + const char *to;
- + {
- + struct stat sb;
- + int rename_rc;
- + const char *final_name;
- + int rename_errno;
- + static int retrying_rename = 0;
- +
- + if (trace)
- + #ifdef SERVER_SUPPORT
- + (void) fprintf (stderr, "%c-> rename_readonly_file(%s,%s)\n",
- + (server_active) ? 'S' : ' ', from, to);
- + #else
- + (void) fprintf (stderr, "-> rename_readonly_file(%s,%s)\n", from, to);
- + #endif
- + if (noexec)
- + return 0;
- +
- + /* If we can't stat from, we probably won't be able to rename it */
- + if (stat (from, &sb) < 0)
- + return -1;
- +
- + if (chmod (from, sb.st_mode | S_IWRITE | S_IWGRP | S_IWOTH) < 0)
- + error (0, errno, "cannot change mode of file %s", from);
- +
- + rename_rc = rename (from, to);
- + rename_errno = errno;
- +
- + final_name = (rename_rc < 0) ? from : to;
- + if (chmod (final_name, sb.st_mode) < 0)
- + error (0, errno, "cannot restore mode of file %s", final_name);
- +
- + /*
- + With Windows-NT 4.0 Service Pack 3 and Novell IntranetWare Client 4.11a
- + and Microsoft Visual C++ 4.2, in sanity.sh we get occasional
- + "cannot rename file .../,file3, to .../file3,v: File exists"
- + in various places (not always in same place).
- + (This doesn't happen or on NTFS local file system)
- + */
- + if (rename_rc < 0)
- + {
- + ++retrying_rename;
- + if (retrying_rename <= 3)
- + {
- + error (0, rename_errno,
- + " rename_readonly_file(%s,%s) failed. "
- + "waiting %d seconds before retry\n",
- + from, to, retrying_rename);
- + sleep( retrying_rename /*seconds*/ );
- + rename_rc = wnt_rename( from, to );
- + }
- + --retrying_rename;
- + if (retrying_rename == 0 && rename_rc == 0)
- + {
- + #ifdef SERVER_SUPPORT
- + (void) fprintf (stderr, "%c retry succeeded.\n",
- + (server_active) ? 'S' : ' ');
- + #else
- + (void) fprintf (stderr, " retry succeeded.\n");
- + #endif
- + }
- + }
- +
- + return rename_rc;
- + }
- +
- + int wnt_rename(const char * from, const char * to)
- + {
- + int rename_rc;
- +
- + if (trace)
- + #ifdef SERVER_SUPPORT
- + (void) fprintf (stderr, "%c-> wnt_rename(%s,%s)\n",
- + (server_active) ? 'S' : ' ', from, to);
- + #else
- + (void) fprintf (stderr, "-> wnt_rename(%s,%s)\n", from, to);
- + #endif
- + if (noexec)
- + return 0;
- +
- + /* Win32 unlink is stupid --- it fails if the file is read-only */
- + /* Win32 unlink also fails when file is open via Novell IntranetWare */
- + /*
- + Under windows and OS/2 you can't rename an open file, and
- + the target file must not exist before rename.
- + If you're Windows-NT on a Netware fileserver via IntranetWare,
- + the source file must not be readonly.
- + See also http://www.cyclic.com/cvs/dev-emx27.txt, which suggests
- + identical function (os2_rename) in emx-new/system.c
- + and provides the two RCS functions mentioned here.
- + */
- + unlink_file ( to );
- + if (RCS_get_cached ( from ) != NULL)
- + RCS_cache_close ();
- + rename_rc = rename ( from, to);
- + if (rename_rc < 0)
- + {
- + rename_rc = rename_readonly_file ( from, to);
- + }
- + return rename_rc;
- + }
- +
- Index: windows-NT/options.h
- ===================================================================
- RCS file: e:/cvsroot/ccvs/windows-NT/options.h,v
- retrieving revision 1.3
- retrieving revision 1.3.2.1
- diff -c -r1.3 -r1.3.2.1
- *** windows-NT/options.h 1998/05/31 01:02:56 1.3
- --- windows-NT/options.h 1998/07/16 00:07:30 1.3.2.1
- ***************
- *** 165,167 ****
- --- 165,184 ----
- #ifndef STDC_HEADERS
- extern void exit ();
- #endif
- +
- + /*
- + * In various places, CVS waits a tick of the filesystem clock to make
- + * sure that files have different timestamps. This was coded as sleep (1).
- + * For some filesystems (eg FAT, FAT32) 2 seconds are needed.
- + * I've defined FILESYSTEM_TICK in windows-NT/options.h,
- + * and in src/cvs.h a default of 1 second is defined.
- + *
- + * I'm pretty sure that CVS doesn't do enough waiting, but it's too
- + * hard for me to figure out where to add more.
- + * See sanity.sh [FILESYSTEM_TICK] for more information.
- + */
- + #ifndef FILESYSTEM_TICK
- + #define FILESYSTEM_TICK 2
- + /* #define FILESYSTEM_TICK 1 */
- + #endif
- +
- Index: windows-NT/run.c
- ===================================================================
- RCS file: e:/cvsroot/ccvs/windows-NT/run.c,v
- retrieving revision 1.3
- retrieving revision 1.3.2.1
- diff -c -r1.3 -r1.3.2.1
- *** windows-NT/run.c 1998/05/31 01:02:57 1.3
- --- windows-NT/run.c 1998/07/16 00:07:31 1.3.2.1
- ***************
- *** 296,316 ****
- }
- }
-
- - static char *
- - requote (const char *cmd)
- - {
- - char *requoted = xmalloc (strlen (cmd) + 1);
- - char *p = requoted;
- -
- - strcpy (requoted, cmd);
- - while ((p = strchr (p, '\'')) != NULL)
- - {
- - *p++ = '"';
- - }
- -
- - return requoted;
- - }
- -
- FILE *
- run_popen (cmd, mode)
- const char *cmd;
- --- 296,301 ----
- ***************
- *** 326,335 ****
- if (noexec)
- return (NULL);
-
- ! /* If the command string uses single quotes, turn them into
- ! double quotes. */
- {
- - char *requoted = requote (cmd);
- /* Save and restore our file descriptors to work around
- apparent bugs in _popen. We are perhaps better off using
- the win32 functions instead of _popen. */
- --- 311,321 ----
- if (noexec)
- return (NULL);
-
- ! /* If the command string uses single quotes, don't turn them into
- ! double quotes like for OS/2 CMD.EXE.
- ! Windows-NT CMD.EXE and Windows-95 COMMAND.COM don't recognize
- ! " as a quoting mechanism. */
- {
- /* Save and restore our file descriptors to work around
- apparent bugs in _popen. We are perhaps better off using
- the win32 functions instead of _popen. */
- ***************
- *** 337,343 ****
- int old_stdout = dup (STDOUT_FILENO);
- int old_stderr = dup (STDERR_FILENO);
-
- ! FILE *result = popen (requoted, mode);
-
- dup2 (old_stdin, STDIN_FILENO);
- dup2 (old_stdout, STDOUT_FILENO);
- --- 323,329 ----
- int old_stdout = dup (STDOUT_FILENO);
- int old_stderr = dup (STDERR_FILENO);
-
- ! FILE *result = popen (cmd, mode);
-
- dup2 (old_stdin, STDIN_FILENO);
- dup2 (old_stdout, STDOUT_FILENO);
- ***************
- *** 346,352 ****
- close (old_stdout);
- close (old_stderr);
-
- - free (requoted);
- return result;
- }
- }
- --- 332,337 ----
-