home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cvs110.zip / cvs / src / diffs < prev    next >
Text File  |  1998-08-21  |  162KB  |  5,094 lines

  1. Index: diff/ChangeLog
  2. ===================================================================
  3. RCS file: e:/cvsroot/ccvs/diff/ChangeLog,v
  4. retrieving revision 1.5
  5. retrieving revision 1.2.2.5
  6. diff -c -r1.5 -r1.2.2.5
  7. *** diff/ChangeLog    1998/08/10 21:22:44    1.5
  8. --- diff/ChangeLog    1998/08/10 22:07:07    1.2.2.5
  9. ***************
  10. *** 12,17 ****
  11. --- 12,22 ----
  12.       than printf_output callback.
  13.       * diff3.c (read_diff): Don't set my_callbacks.printf_output.
  14.   
  15. + 1998-06-22  Murray Bishop  <mbishop@acnielsen.com.au>
  16. +     * diff3.c (diff3_run): disconnect stdin from infile after
  17. +     output_diff3_merge.
  18.   Thu Jun 18 12:43:53 1998  Ian Lance Taylor  <ian@cygnus.com>
  19.   
  20.       * diffrun.h: New file.
  21. ***************
  22. *** 50,55 ****
  23. --- 55,65 ----
  24.       * side.c: Likewise.
  25.       * Makefile.in (SOURCES): Add diffrun.h.
  26.       ($(OBJECTS)): Depend upon diffrun.h.
  27. + Fri May 29 13:30:00 1998  Murray Bishop  <mbishop@acnielsen.com.au>
  28. +     * diff.c (compare_files) [__EMX__]: Cope with "nul" file under 
  29. +     OS/2 EMX using the hack from emx port of gnu diffutils.
  30.   
  31.   Fri Jan 16 14:58:19 1998  Larry Jones  <larry.jones@sdrc.com>
  32.   
  33. Index: diff/diff.c
  34. ===================================================================
  35. RCS file: e:/cvsroot/ccvs/diff/diff.c,v
  36. retrieving revision 1.3
  37. retrieving revision 1.2.2.2
  38. diff -c -r1.3 -r1.2.2.2
  39. *** diff/diff.c    1998/06/23 15:31:06    1.3
  40. --- diff/diff.c    1998/06/23 21:04:36    1.2.2.2
  41. ***************
  42. *** 1011,1016 ****
  43. --- 1011,1032 ----
  44.         else
  45.           stat_result = stat (inf[i].name, &inf[i].stat);
  46.   
  47. +       /* EMX bug - we can't stat("nul",&sb),
  48. +        * (but can fd = open("nul",...), fstat(fd,&sb)
  49. +        * - but that doesn't really help us pass death2-diff-2 in sanity.sh
  50. +        * The kludge below is from the emx port of GNU diffutils
  51. +        */
  52. + #ifdef __EMX__
  53. +          /* HACK: Treat 'nul' as a nonexistent file. */
  54. +          if (stat_result != 0 && errno == EINVAL
  55. +       && stricmp (inf[i].name, "nul") == 0)
  56. +         {
  57. +              stat_result = 0;
  58. +              inf[i].desc = -1;
  59. +         }
  60. + #endif /*__EMX__*/
  61.         if (stat_result != 0)
  62.           {
  63.             perror_with_name (inf[i].name);
  64. Index: diff/diff3.c
  65. ===================================================================
  66. RCS file: e:/cvsroot/ccvs/diff/diff3.c,v
  67. retrieving revision 1.4
  68. retrieving revision 1.2.2.3
  69. diff -c -r1.4 -r1.2.2.3
  70. *** diff/diff3.c    1998/07/13 15:24:47    1.4
  71. --- diff/diff3.c    1998/07/16 00:03:40    1.2.2.3
  72. ***************
  73. *** 459,464 ****
  74. --- 459,475 ----
  75.                      tag_strings[0], tag_strings[1], tag_strings[2]);
  76.     else if (merge)
  77.       {
  78. +       /* On Windows-NT 4.0 Service Pack 3, Novell Intranetware Client 4.11a,
  79. +     Microsoft Visual C++ 4.2,
  80. +     not disconnecting stdin from the disk file causes failure to
  81. +     open( , O_CREAT | O_TRUNC ...) windows-NT/filesubr.c(copy_file)
  82. +     in sanity.sh test conflicts-130.
  83. +     (there is no problem with tests on local NTFS disk)
  84. +     
  85. +     work around by using dup */
  86. +       int stdin_save = dup(0);
  87.         if (! freopen (file[rev_mapping[FILE0]], "r", stdin))
  88.       diff3_perror_with_exit (file[rev_mapping[FILE0]]);
  89.         conflicts_found
  90. ***************
  91. *** 466,471 ****
  92. --- 477,489 ----
  93.                     tag_strings[0], tag_strings[1], tag_strings[2]);
  94.         if (ferror (stdin))
  95.       diff3_fatal ("read error");
  96. +       /* close file[rev_mapping[FILE0]], re-connect stdin to where it was
  97. +     before freopen. */
  98. +       dup2( stdin_save, 0 );
  99. +       /* give handle back to os */
  100. +       close( stdin_save );
  101.       }
  102.     else
  103.       {
  104. Index: lib/ChangeLog
  105. ===================================================================
  106. RCS file: e:/cvsroot/ccvs/lib/ChangeLog,v
  107. retrieving revision 1.5
  108. retrieving revision 1.5.2.3
  109. diff -c -r1.5 -r1.5.2.3
  110. *** lib/ChangeLog    1998/05/31 01:12:22    1.5
  111. --- lib/ChangeLog    1998/07/16 00:05:08    1.5.2.3
  112. ***************
  113. *** 1,6 ****
  114. --- 1,24 ----
  115. + 1998-05-31  Andreas Huber  <ahuber@ping.at>
  116. +     * system.h: Added the CVS_CHMOD macro to allow for platform-
  117. +     specific behaviour.
  118. + 1998-05-27  Murray Bishop  <mbishop@acnielsen.com.au>
  119. +     * getdate.y (get_date): Use (Start == -1) rather than (Start < 0)
  120. +     so that Convert failures are detected when time_t is unsigned
  121. +     (as it is on EMX gcc port).
  122.   Tue Mar 24 16:08:00 1998  Ian Lance Taylor  <ian@cygnus.com>
  123.   
  124.       * Makefile.in (CFLAGS): Set to @CFLAGS@, not -g.
  125. + 1998-05-19  Murray Bishop <mbishop@acnielsen.com.au>
  126. +     Murray Bishop applies the Andreas Huber <ahuber.ping.at>
  127. +     patches for cvs-1.9.27
  128. +     
  129. +     * system.h (CVS_CHMOD): Define as chmod if undefined.
  130.   
  131.   1998-02-20  Jim Kingdon  <kingdon@harvey.cyclic.com>
  132.   
  133. Index: lib/getdate.c
  134. ===================================================================
  135. RCS file: e:/cvsroot/ccvs/lib/getdate.c,v
  136. retrieving revision 1.1
  137. diff -c -r1.1 getdate.c
  138. *** lib/getdate.c    1998/05/31 00:45:18    1.1
  139. --- lib/getdate.c    1998/06/23 21:04:58
  140. ***************
  141. *** 991,997 ****
  142.       if (yyHaveDate || yyHaveTime || yyHaveDay) {
  143.       Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds,
  144.               yyMeridian, yyDSTmode);
  145. !     if (Start < 0)
  146.           return -1;
  147.       }
  148.       else {
  149. --- 991,997 ----
  150.       if (yyHaveDate || yyHaveTime || yyHaveDay) {
  151.       Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds,
  152.               yyMeridian, yyDSTmode);
  153. !     if (Start == -1)
  154.           return -1;
  155.       }
  156.       else {
  157. Index: lib/getdate.y
  158. ===================================================================
  159. RCS file: e:/cvsroot/ccvs/lib/getdate.y,v
  160. retrieving revision 1.1
  161. diff -c -r1.1 getdate.y
  162. *** lib/getdate.y    1998/05/31 00:45:18    1.1
  163. --- lib/getdate.y    1998/06/23 21:04:00
  164. ***************
  165. *** 977,983 ****
  166.       if (yyHaveDate || yyHaveTime || yyHaveDay) {
  167.       Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds,
  168.               yyMeridian, yyDSTmode);
  169. !     if (Start < 0)
  170.           return -1;
  171.       }
  172.       else {
  173. --- 977,983 ----
  174.       if (yyHaveDate || yyHaveTime || yyHaveDay) {
  175.       Start = Convert(yyMonth, yyDay, yyYear, yyHour, yyMinutes, yySeconds,
  176.               yyMeridian, yyDSTmode);
  177. !     if (Start == -1)
  178.           return -1;
  179.       }
  180.       else {
  181. Index: lib/system.h
  182. ===================================================================
  183. RCS file: e:/cvsroot/ccvs/lib/system.h,v
  184. retrieving revision 1.4
  185. retrieving revision 1.4.2.1
  186. diff -c -r1.4 -r1.4.2.1
  187. *** lib/system.h    1998/05/31 01:07:33    1.4
  188. --- lib/system.h    1998/05/31 02:10:12    1.4.2.1
  189. ***************
  190. *** 469,474 ****
  191. --- 469,478 ----
  192.   #define CVS_FNMATCH fnmatch
  193.   #endif
  194.   
  195. + #ifndef CVS_CHMOD
  196. + #define CVS_CHMOD chmod
  197. + #endif
  198.   #if defined (__CYGWIN32__) || defined (WIN32)
  199.   
  200.   /* Under Windows NT, filenames are case-insensitive, and both / and \
  201. Index: src/ChangeLog
  202. ===================================================================
  203. RCS file: e:/cvsroot/ccvs/src/ChangeLog,v
  204. retrieving revision 1.15
  205. retrieving revision 1.5.2.21.2.1
  206. diff -c -r1.15 -r1.5.2.21.2.1
  207. *** src/ChangeLog    1998/08/13 21:08:04    1.15
  208. --- src/ChangeLog    1998/08/15 11:03:17    1.5.2.21.2.1
  209. ***************
  210. *** 1,3 ****
  211. --- 1,8 ----
  212. + 1998-08-15  Andreas Huber  <ahuber@ping.at>
  213. +     * sanity.sh (rcslib): Don't run rcslib-symlink-* tests if
  214. +     WONT_PRESERVE_PERMISSIONS is set.
  215.   Thu Aug 13 11:15:24 1998  Noel Cragg  <noel@swish.red-bean.com>
  216.   
  217.       * version.c: Change version number to 1.10 and name to `Halibut'.
  218. ***************
  219. *** 5,10 ****
  220. --- 10,27 ----
  221.       * sanity.sh (rcslib): new tests to check behavior of symlinks in
  222.        the repository.
  223.   
  224. + 1998-08-13  Andreas Huber  <ahuber@ping.at>
  225. +     * sanity.sh (unedit-without-baserev-5): Use ${DOTSTAR} to match
  226. +     a second "D" line.
  227. + 1998-08-12  Andreas Huber  <ahuber@ping.at>
  228. +     * server.c (dirswitch):
  229. +     Explicitly set dir_name to NULL so other functions
  230. +     can determine wether we successfully changed the directory.
  231. +     (server_write_entries) Don't write anything if dirswitch() failed.
  232.   Wed Aug 12 15:39:38 1998  Noel Cragg  <noel@swish.red-bean.com>
  233.   
  234.       * main.c (lookup_command_attribute): the `annotate' command
  235. ***************
  236. *** 15,20 ****
  237. --- 32,49 ----
  238.   
  239.       * version.c: Change version number to 1.9.30.
  240.   
  241. + 1998-08-10  Andreas Huber  <ahuber@ping.at>
  242. +     * client.c, client.h (client_process_import_file): In order for any
  243. +     global -k option (not just -kb) to take precedence in
  244. +     client/server mode, we need to pass it to the server.
  245. +     Otherwise the results of specifying a -k option on the
  246. +     command line would be inconsistent between client/server
  247. +     and local mode.
  248. +     * import.c (import_descend): Pass any global -k options to
  249. +     client_process_import_file(), not just -kb.
  250.   Thu Aug  6 17:44:50 1998  Noel Cragg  <noel@swish.red-bean.com>
  251.   
  252.       * server.c (serve_rdiff): change the name of the command (for
  253. ***************
  254. *** 49,54 ****
  255. --- 78,101 ----
  256.       * mkmodules.c: add comment about TopLevelAdmin for the initial
  257.        contents of CVSROOT/config.
  258.   
  259. + 1998-08-01  Andreas Huber  <ahuber@ping.at>
  260. +     * server.c: Moved the definition of 'kopt' above receive_file.
  261. +     (receive_file) Check kopt in case Entries is not yet available
  262. +     (e.g. import) to see if the file needs to be opened in binary
  263. +     mode. Corrected a minor style fauxpas.
  264. + 1998-07-31  Andreas Huber  <ahuber@ping.at>
  265. +     * sanity.sh:
  266. +     Don't convert slashes to sloshes for CVS_SERVER. Instead,
  267. +     require that rshd uses a unixy shell to run commands.
  268. +     * sanity.sh:
  269. +     Early detection of OS_COMPILER_EMU so we can add additional flags
  270. +     to the rsh detection if required by the OS (OS/2 needs a -b).
  271. +     CVS_SERVER needs slashes converted to sloshes on some OS's.
  272.   1998-07-29  Jim Kingdon  <kingdon@harvey.cyclic.com>
  273.   
  274.       * rcs.c (RCS_checkin): Only try to call xreadlink if HAVE_READLINK
  275. ***************
  276. *** 61,66 ****
  277. --- 108,123 ----
  278.       * rcs.c (RCS_checkin): add code to follow symbolic links in the
  279.        repository.
  280.   
  281. + 1998-07-27  Andreas Huber  <ahuber@ping.at>
  282. +     * server.c (dirswitch): Check for an absolute path before trying to
  283. +     create the directory. This is necessary for platforms, where
  284. +     a path may contain a drive specification. It avoids a bogus
  285. +     message for an error that is caught later in server_pathname_check().
  286. +     * client.c (send_a_repository): Use isabsolute() to check update_dir
  287. +     for an absolute path.
  288.   Sun Jul 26 05:14:41 1998  Noel Cragg  <noel@swish.red-bean.com>
  289.   
  290.       * This set of changes reverts the code to pre-1.9.2 behavior and
  291. ***************
  292. *** 128,133 ****
  293. --- 185,212 ----
  294.       * build_src.com (rcscmds.c): Also look for include files in
  295.       [-.diff], just like Ian's 1998-06-18 change to Makefile.in
  296.   
  297. + 1998-07-16  Andreas Huber  <ahuber@ping.at>
  298. +     * sanity.sh:
  299. +     Applied Murray Bishop's <mbishop@acnielsen.com.au> patches.
  300. +     (unedit_without_baserev-4, unedit_without_baserev-14)
  301. +     Replaced "revert changes?" by "revert changes." to make the EMX port
  302. +     of GNU expr from sh-utils 1.12 happy.
  303. +     (unedit_without_baserev-5) Disabled the SunOS4.1.4 test
  304. +     for CVS/Entries corruption.
  305. +     * update.c  (do_update), client.c (get_reponses_and_close),
  306. +     commit.c (commit):
  307. +     Fixed a bug with code that was supposed to avoid time-stamp
  308. +     races but didn't under specific circumstances.
  309. +     * cvs.h: Applied Murray Bishop's <mbishop@acnielsen.com.au> patches.
  310. + 1998-07-15  Andreas Huber  <ahuber@ping.at>
  311. +     * update.c, sanity.sh, commit.c, cvs.h, client.c:
  312. +     Applied Murray Bishop's <mbishop@acnielsen.com.au> patches.
  313.   1998-07-14  Jim Kingdon  <kingdon@harvey.cyclic.com>
  314.   
  315.       * tag.c (pretag_proc), rtag.c (pretag_proc): Don't pass RUN_REALLY
  316. ***************
  317. *** 139,144 ****
  318. --- 218,262 ----
  319.       happen.
  320.       * sanity.sh (taginfo): New tests taginfo-11 to taginfo-13, for this.
  321.   
  322. + 1998-07-13  Andreas Huber  <ahuber@ping.at>
  323. +     * server.c (receive_file):
  324. +     Shut up a warning about variables that might be used
  325. +     uninitialized.
  326. + 1998-07-13  Andreas Huber  <ahuber@ping.at>
  327. +     * sanity.sh: Changed /tmp to ${TMPDIR}.
  328. +     Changed argument parsing to accept drive specifications for
  329. +     the CVS executable.
  330. +     EDHACK_EDITOR is no longer necessary.
  331. +     Added :local: to repository specifications.
  332. +     (editor) Changed to sleep two seconds instead of one to avoid
  333. +     time-stamp races on platforms where the time-stamp resolution
  334. +     is two seconds.
  335. +     * server.c (receive_file):
  336. +     The server writes the files it receives from
  337. +     the client to the temporary directory using the default binary
  338. +     translation mode. While this works on *nix platforms, it certainly
  339. +     doesn't on OS/2. 'Entries' is now searched for a -kb to determine
  340. +     the proper translation mode before creating the file.
  341. +     (server_updated) The server writes the files it is about to send to
  342. +     the client to the temporary directory using the proper translation
  343. +     mode (in RCS_checkout), but reads the file in binary mode. The file
  344. +     is now read in the same mode it was written. finfo->rcs->expand is
  345. +     examined to determine the proper translation mode.
  346. +     * logmsg.c (logfile_write):
  347. +     Changed the quoting character back to `'∩. Quoting
  348. +     is now handled correctly by os2_popen().
  349. +     * client.c (get_responses_and_close), commit.c (commit),
  350. +     update.c (do_update):
  351. +     Changed to sleep two seconds instead of one to avoid time-stamp
  352. +     races. This is required for platforms where the time-stamp
  353. +     resolution is two seconds (e.g. OS/2).
  354.   1998-07-12  Jim Kingdon  <kingdon@harvey.cyclic.com>
  355.   
  356.       * sanity.sh (ann-id): Write the test so that it tests for the
  357. ***************
  358. *** 176,181 ****
  359. --- 294,317 ----
  360.       you version 1.1 of the working file and put 1.2 in CVS/Entries.
  361.       * sanity.sh (unedit-without-baserev): New tests test for this.
  362.   
  363. + 1998-07-07  Murray Bishop  <mbishop@acnielsen.com.au>
  364. +     * sanity.sh: Make local mode mostly runnable on various platforms :
  365. +     - Windows-NT with cygwin32 b19.1
  366. +     - Windows-95 with MKS Toolkit
  367. +     - OS/2 with EMX
  368. +     (and test local mode on Linux too)
  369. +     * cvs.h [FILESYSTEM_TICK]: Define as 1 (second) unless defined.
  370. + 1998-07-06  Murray Bishop  <mbishop@acnielsen.com.au>
  371. +     * client.c(get_responses_and_close): Wait FILESYSTEM_TICK
  372. +     instead of 1 second to avoid time-stamp races.
  373. +     * commit.c(commit): Wait FILESYSTEM_TICK
  374. +     instead of 1 second to avoid time-stamp races.
  375. +     * update.c(do_update): Wait FILESYSTEM_TICK
  376. +     instead of 1 second to avoid time-stamp races.
  377.   1998-07-02  Jim Kingdon  <kingdon@harvey.cyclic.com>
  378.   
  379.       * sanity.sh (unedit-without-baserev): Move the test itself to be
  380. ***************
  381. *** 243,248 ****
  382. --- 379,408 ----
  383.   
  384.       * sanity.sh (modes2): Touch the file before chmod'ing it.
  385.   
  386. + 1998-06-23  Andreas Huber  <ahuber@ping.at>
  387. +     * server.c (mkdir_p): Search for the first occurrence of '/' instead
  388. +     of just skipping the first character. This is required for platforms,
  389. +     where absolute path names do not necessarily start with a '/'.
  390. +     * server.c (serve_root): Added a :local: prefix for platforms, where a
  391. +     path may contain ':'.
  392. +     * server.c (receive_file): Look up the file in Entries first to see if
  393. +     it has a '-kb' option attached to it. Then create the file accordingly.
  394. +     * server.c (server_updated): Look at finfo->rcs->expand first, to see
  395. +     if it includes a '-kb'. If it does, open the file in binary mode. We
  396. +     also need to use buf_read_file_to_eof() and buf_chain_length() now.
  397. +     * logmsg.c (logfile_write): Changed the quoting character from
  398. +     `'∩ to `"∩.
  399. +     * expand_path.c (expand_variable): Replaced CVSroot_original by
  400. +     CVSroot_directory, since former may include the access method.
  401. +     This is for platforms, where paths may contain ':' and a :local:
  402. +     prefix is required.
  403.   1998-06-21  Ian Lance Taylor  <ian@cygnus.com>
  404.   
  405.       * update.c (merge_files): Revert changes of 1998-06-19.  Instead,
  406. ***************
  407. *** 285,290 ****
  408. --- 445,459 ----
  409.       directory.
  410.       (zlib.o): Depend upon zlib.h.
  411.   
  412. + 1998-06-16  Murray Bishop  <mbishop@acnielsen.com.au>
  413. +     * sanity.sh: Modify to run test for windows-NT using cygwin32
  414. +     with compiler MS Visual C++ 4.2.
  415. + 1998-06-12  Murray Bishop  <mbishop@acnielsen.com.au>
  416. +     * sanity.sh: Modify as was run for OS/2 EMX testing.
  417.   1998-06-09  Mike Sutton@SAIC
  418.   
  419.       Make it compile with Sun's bundled K&R C compiler:
  420. ***************
  421. *** 332,343 ****
  422. --- 501,541 ----
  423.   
  424.       * sanity.sh (tag8k): Add a test for the 1998-05-02 rcs.c bug fix.
  425.   
  426. + 1998-05-31  Andreas Huber  <ahuber@ping.at>
  427. +     * client.c, commit.c, filesubr.c, import.c, rcs.c, update.c:
  428. +     Replaced all occurrences of chmod() by CVS_CHMOD().
  429. +     * client.c (start_rsh_server) [START_RSH_WITH_POPEN_RW]:
  430. +     Slightly reordered the arguments to rsh to match the ordering in the
  431. +     !START_RSH_WITH_POPEN_RW case.
  432. +     * client.c (start_rsh_server) [!START_RSH_WITH_POPEN_RW,
  433. +     RSH_NEEDS_BINARY]: Added missing '-b' to the rsh argument list.
  434. +     * filesubr.c: Replaced one occurrence of rename() by CVS_RENAME().
  435. +     * rcs.c, rcs.h: Added two new functions: RCS_get_cached() and
  436. +     RCS_cache_close(). On some platforms, it is not possible to rename()
  437. +     or chmod() open files. The new functions are used to check if a
  438. +     particular file is currently kept open in the RCS cache and to close
  439. +     it, if necessary.
  440. +     * server.c (server) [RSHD_NOT_TRANSPARENT]: On some platforms with a
  441. +     non-tranparent rshd, the standard handles need to be switched to
  442. +     binary mode.
  443.   1998-05-26  Jim Kingdon  <kingdon@harvey.cyclic.com>
  444.   
  445.       * rcs.c (annotate): Call tag_check_valid like the other functions
  446.       which have a -r option.
  447.       * sanity.sh (ann): New test ann-14 tests for this.
  448.   
  449. + 1998-05-25  Murray Bishop  <mbishop@acnielsen.com.au>
  450. +     * commit.c (commit): Open the -F logfile in text rather than
  451. +     binary mode to pass log-11 and keywordlog-7 under OS/2 EMX.
  452.   1998-05-24  Jim Kingdon  <kingdon@harvey.cyclic.com>
  453.   
  454.       * sanity.sh (importc): New tests importc-5 through importc-8 test
  455. ***************
  456. *** 374,379 ****
  457. --- 572,604 ----
  458.       * wrapper.c (wrap_add): Disable -t/-f wrappers at least until the
  459.       serious bug can be fixed.
  460.   
  461. + 1998-05-19  Murray Bishop  <mbishop@acnielsen.com.au>
  462. +     * sanity.sh: Modify to run for OS/2 EMX testing.
  463. +     * commit.c (commit): Open the -F logfile in text rather than
  464. +     binary mode to pass log-11 and keywordlog-7 under OS/2 EMX.
  465. +     * parseinfo.c (parse_config): have fp_info closed before 
  466. +     returning, even if goto error_return happened. Pass config-5.
  467. + 1998-05-19  Murray Bishop <mbishop@acnielsen.com.au>
  468. +     Murray Bishop applies the Andreas Huber <ahuber.ping.at>
  469. +     patches for cvs-1.9.27
  470. +     
  471. +     * client.c (change_mode) [!CHMOD_BROKEN]: Call CVS_CHMOD 
  472. +     instead of chmod.
  473. +     * client.c (start_rsh_server): Move -b flag after hostname.
  474. +     * commit.c (fix_rcs_modes): Use CVS_CHMOD in place of chmod.
  475. +     * filesubr.c (xchmod): Use CVS_CHMOD in place of chmod.
  476. +     * filesubr.c (rename_file): Use CVS_RENAME in place of rename.
  477. +     * import.c (add_rcs_file): Use CVS_CHMOD in place of chmod.
  478. +     * rcs.c (RCS_checkout): Use CVS_CHMOD in place of chmod.
  479. +     * rcs.c (RCS_get_cached): Add function.
  480. +     * rcs.c (RCS_cache_close): Add function.
  481. +     * rcs.h: add prototypes for RCS_get_cached and RCS_cache_close.
  482. +     * server.c (server): Set stdin, stdout, stderr into binary mode.
  483. +     * update.c (patch_file): Use CVS_CHMOD in place of chmod.
  484. +     
  485.   1998-05-15  Jim Kingdon  <kingdon@harvey.cyclic.com>
  486.   
  487.       * checkout.c (checkout): Call server_pathname_check on the
  488. Index: src/client.c
  489. ===================================================================
  490. RCS file: e:/cvsroot/ccvs/src/client.c,v
  491. retrieving revision 1.7
  492. retrieving revision 1.5.2.7
  493. diff -c -r1.7 -r1.5.2.7
  494. *** src/client.c    1998/07/27 10:17:13    1.7
  495. --- src/client.c    1998/08/10 22:00:47    1.5.2.7
  496. ***************
  497. *** 301,307 ****
  498.       mode &= ~oumask;
  499.       }
  500.   
  501. !     if (chmod (filename, mode) < 0)
  502.       return errno;
  503.       return 0;
  504.   #endif /* ! CHMOD_BROKEN */
  505. --- 301,307 ----
  506.       mode &= ~oumask;
  507.       }
  508.   
  509. !     if (CVS_CHMOD (filename, mode) < 0)
  510.       return errno;
  511.       return 0;
  512.   #endif /* ! CHMOD_BROKEN */
  513. ***************
  514. *** 2746,2752 ****
  515.            * sure it matters what toplevel_repos we get, but it does
  516.            * matter that we don't hit the "internal error" code below).
  517.            */
  518. !         if (update_dir[0] == '/')
  519.           toplevel_repos = Name_Repository (update_dir, update_dir);
  520.           else
  521.           {
  522. --- 2746,2752 ----
  523.            * sure it matters what toplevel_repos we get, but it does
  524.            * matter that we don't hit the "internal error" code below).
  525.            */
  526. !         if (isabsolute (update_dir))
  527.           toplevel_repos = Name_Repository (update_dir, update_dir);
  528.           else
  529.           {
  530. ***************
  531. *** 3405,3412 ****
  532.       time_t now;
  533.   
  534.       (void) time (&now);
  535. !     if (now == last_register_time)
  536. !         sleep (1);            /* to avoid time-stamp races */
  537.       }
  538.   
  539.       return errs;
  540. --- 3405,3415 ----
  541.       time_t now;
  542.   
  543.       (void) time (&now);
  544. !     if (now < last_register_time + FILESYSTEM_TICK)
  545. !     {
  546. !         /* to avoid time-stamp races */
  547. !         sleep (last_register_time + FILESYSTEM_TICK - now);
  548. !     }
  549.       }
  550.   
  551.       return errs;
  552. ***************
  553. *** 4439,4444 ****
  554. --- 4442,4448 ----
  555.   
  556.       /* The command line starts out with rsh. */
  557.       rsh_argv[i++] = cvs_rsh;
  558. +     rsh_argv[i++] = CVSroot_hostname;
  559.   
  560.   #ifdef RSH_NEEDS_BINARY_FLAG
  561.       /* "-b" for binary, under OS/2. */
  562. ***************
  563. *** 4452,4458 ****
  564.       rsh_argv[i++] = CVSroot_username;
  565.       }
  566.   
  567. -     rsh_argv[i++] = CVSroot_hostname;
  568.       rsh_argv[i++] = cvs_server;
  569.       rsh_argv[i++] = "server";
  570.   
  571. --- 4456,4461 ----
  572. ***************
  573. *** 4515,4520 ****
  574. --- 4518,4528 ----
  575.       *p++ = cvs_rsh;
  576.       *p++ = CVSroot_hostname;
  577.   
  578. + #ifdef RSH_NEEDS_BINARY_FLAG
  579. +     /* "-b" for binary, under OS/2. */
  580. +     *p++ = "-b";
  581. + #endif /* RSH_NEEDS_BINARY_FLAG */
  582.       /* If the login names differ between client and server
  583.        * pass it on to rsh.
  584.        */
  585. ***************
  586. *** 5224,5237 ****
  587.    */
  588.   int
  589.   client_process_import_file (message, vfile, vtag, targc, targv, repository,
  590. !                             all_files_binary)
  591.       char *message;
  592.       char *vfile;
  593.       char *vtag;
  594.       int targc;
  595.       char *targv[];
  596.       char *repository;
  597. !     int all_files_binary;
  598.   {
  599.       char *update_dir;
  600.       char *fullname;
  601. --- 5232,5245 ----
  602.    */
  603.   int
  604.   client_process_import_file (message, vfile, vtag, targc, targv, repository,
  605. !                             kopt)
  606.       char *message;
  607.       char *vfile;
  608.       char *vtag;
  609.       int targc;
  610.       char *targv[];
  611.       char *repository;
  612. !     char *kopt;
  613.   {
  614.       char *update_dir;
  615.       char *fullname;
  616. ***************
  617. *** 5260,5269 ****
  618.       }
  619.   
  620.       send_a_repository ("", repository, update_dir);
  621. !     if (all_files_binary)
  622.       {
  623. !     vers.options = xmalloc (4); /* strlen("-kb") + 1 */
  624. !     strcpy (vers.options, "-kb");
  625.       }
  626.       else
  627.       {
  628. --- 5268,5278 ----
  629.       }
  630.   
  631.       send_a_repository ("", repository, update_dir);
  632. !     if (kopt != NULL)
  633.       {
  634. !     vers.options = xmalloc (strlen(kopt) + 3);
  635. !     strcpy (vers.options, "-k");
  636. !     strcat (vers.options, kopt);
  637.       }
  638.       else
  639.       {
  640. Index: src/client.h
  641. ===================================================================
  642. RCS file: e:/cvsroot/ccvs/src/client.h,v
  643. retrieving revision 1.4
  644. retrieving revision 1.4.2.1
  645. diff -c -r1.4 -r1.4.2.1
  646. *** src/client.h    1998/05/31 01:07:59    1.4
  647. --- src/client.h    1998/08/10 22:00:21    1.4.2.1
  648. ***************
  649. *** 195,201 ****
  650.   extern void client_import_setup PROTO((char *repository));
  651.   extern int client_process_import_file
  652.       PROTO((char *message, char *vfile, char *vtag,
  653. !        int targc, char *targv[], char *repository, int all_files_binary));
  654.   extern void client_import_done PROTO((void));
  655.   extern void client_notify PROTO((char *, char *, char *, int, char *));
  656.   #endif /* CLIENT_SUPPORT */
  657. --- 195,201 ----
  658.   extern void client_import_setup PROTO((char *repository));
  659.   extern int client_process_import_file
  660.       PROTO((char *message, char *vfile, char *vtag,
  661. !        int targc, char *targv[], char *repository, char *kopt));
  662.   extern void client_import_done PROTO((void));
  663.   extern void client_notify PROTO((char *, char *, char *, int, char *));
  664.   #endif /* CLIENT_SUPPORT */
  665. Index: src/commit.c
  666. ===================================================================
  667. RCS file: e:/cvsroot/ccvs/src/commit.c,v
  668. retrieving revision 1.6
  669. retrieving revision 1.4.2.6
  670. diff -c -r1.6 -r1.4.2.6
  671. *** src/commit.c    1998/08/10 21:22:53    1.6
  672. --- src/commit.c    1998/08/10 22:06:01    1.4.2.6
  673. ***************
  674. *** 423,430 ****
  675.       if (saved_message)
  676.           error (1, 0, "cannot specify both a message and a log file");
  677.   
  678. !     /* FIXME: Why is this binary?  Needs more investigation.  */
  679. !     if ((logfd = CVS_OPEN (logfile, O_RDONLY | OPEN_BINARY)) < 0)
  680.           error (1, errno, "cannot open log file %s", logfile);
  681.   
  682.       if (fstat(logfd, &statbuf) < 0)
  683. --- 423,434 ----
  684.       if (saved_message)
  685.           error (1, 0, "cannot specify both a message and a log file");
  686.   
  687. !     /* What we have here is the name of file whose contents are
  688. !      * the log message. I guess it's better to open text mode for
  689. !      * those OS where it makes a difference.
  690. !      * (sanity.sh probably works better on EMX OS/2 with text mode)
  691. !      */
  692. !     if ((logfd = CVS_OPEN (logfile, O_RDONLY)) < 0)
  693.           error (1, errno, "cannot open log file %s", logfile);
  694.   
  695.       if (fstat(logfd, &statbuf) < 0)
  696. ***************
  697. *** 673,681 ****
  698.       time_t now;
  699.   
  700.       (void) time (&now);
  701. !     if (now == last_register_time)
  702.       {
  703. !         sleep (1);            /* to avoid time-stamp races */
  704.       }
  705.       }
  706.   
  707. --- 677,686 ----
  708.       time_t now;
  709.   
  710.       (void) time (&now);
  711. !     if (now < last_register_time + FILESYSTEM_TICK)
  712.       {
  713. !         /* to avoid time-stamp races */
  714. !         sleep (last_register_time + FILESYSTEM_TICK - now);
  715.       }
  716.       }
  717.   
  718. ***************
  719. *** 2327,2333 ****
  720.       if (sb.st_mode & S_IXUSR)
  721.       rcs_mode |= S_IXUSR | S_IXGRP | S_IXOTH;
  722.       rcs_mode &= ~cvsumask;
  723. !     if (chmod (rcs, rcs_mode) < 0)
  724.       error (0, errno, "warning: cannot change mode of %s", rcs);
  725.   }
  726.   
  727. --- 2332,2338 ----
  728.       if (sb.st_mode & S_IXUSR)
  729.       rcs_mode |= S_IXUSR | S_IXGRP | S_IXOTH;
  730.       rcs_mode &= ~cvsumask;
  731. !     if (CVS_CHMOD (rcs, rcs_mode) < 0)
  732.       error (0, errno, "warning: cannot change mode of %s", rcs);
  733.   }
  734.   
  735. Index: src/cvs.h
  736. ===================================================================
  737. RCS file: e:/cvsroot/ccvs/src/cvs.h,v
  738. retrieving revision 1.7
  739. retrieving revision 1.5.2.3
  740. diff -c -r1.7 -r1.5.2.3
  741. *** src/cvs.h    1998/07/27 10:17:14    1.7
  742. --- src/cvs.h    1998/07/27 15:26:00    1.5.2.3
  743. ***************
  744. *** 866,868 ****
  745. --- 866,885 ----
  746.   #if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT)
  747.   #include "server.h"
  748.   #endif
  749. + /*
  750. +  * In various places, CVS waits a tick of the filesystem clock to make
  751. +  * sure that files have different timestamps. This was coded as sleep (1).
  752. +  * For some filesystems (eg FAT, FAT32) 2 seconds are needed.
  753. +  * I've defined FILESYSTEM_TICK in windows-NT/options.h,
  754. +  * and in src/cvs.h a default of 1 second is defined.
  755. +  *
  756. +  * I'm pretty sure that CVS doesn't do enough waiting, but it's too
  757. +  * hard for me to figure out where to add more.
  758. +  * See sanity.sh [FILESYSTEM_TICK] for more information.
  759. +  */
  760. + #ifndef FILESYSTEM_TICK
  761. + #define FILESYSTEM_TICK 1
  762. + #endif
  763. Index: src/expand_path.c
  764. ===================================================================
  765. RCS file: e:/cvsroot/ccvs/src/expand_path.c,v
  766. retrieving revision 1.1
  767. retrieving revision 1.1.2.1
  768. diff -c -r1.1 -r1.1.2.1
  769. *** src/expand_path.c    1998/05/31 00:45:30    1.1
  770. --- src/expand_path.c    1998/06/23 10:43:18    1.1.2.1
  771. ***************
  772. *** 269,275 ****
  773.       int line;
  774.   {
  775.       if (strcmp (name, CVSROOT_ENV) == 0)
  776. !     return CVSroot_original;
  777.       else if (strcmp (name, "RCSBIN") == 0)
  778.       {
  779.       error (0, 0, "RCSBIN internal variable is no longer supported");
  780. --- 269,275 ----
  781.       int line;
  782.   {
  783.       if (strcmp (name, CVSROOT_ENV) == 0)
  784. !     return CVSroot_directory;
  785.       else if (strcmp (name, "RCSBIN") == 0)
  786.       {
  787.       error (0, 0, "RCSBIN internal variable is no longer supported");
  788. Index: src/filesubr.c
  789. ===================================================================
  790. RCS file: e:/cvsroot/ccvs/src/filesubr.c,v
  791. retrieving revision 1.4
  792. retrieving revision 1.3.2.2
  793. diff -c -r1.4 -r1.3.2.2
  794. *** src/filesubr.c    1998/05/31 01:18:40    1.4
  795. --- src/filesubr.c    1998/06/23 10:28:24    1.3.2.2
  796. ***************
  797. *** 388,394 ****
  798.       if (noexec)
  799.       return;
  800.   
  801. !     if (chmod (fname, mode) < 0)
  802.       error (0, errno, "cannot change mode of file %s", fname);
  803.   }
  804.   
  805. --- 388,394 ----
  806.       if (noexec)
  807.       return;
  808.   
  809. !     if (CVS_CHMOD (fname, mode) < 0)
  810.       error (0, errno, "cannot change mode of file %s", fname);
  811.   }
  812.   
  813. ***************
  814. *** 410,416 ****
  815.       if (noexec)
  816.       return;
  817.   
  818. !     if (rename (from, to) < 0)
  819.       error (1, errno, "cannot rename file %s to %s", from, to);
  820.   }
  821.   
  822. --- 410,416 ----
  823.       if (noexec)
  824.       return;
  825.   
  826. !     if (CVS_RENAME (from, to) < 0)
  827.       error (1, errno, "cannot rename file %s to %s", from, to);
  828.   }
  829.   
  830. Index: src/import.c
  831. ===================================================================
  832. RCS file: e:/cvsroot/ccvs/src/import.c,v
  833. retrieving revision 1.5
  834. retrieving revision 1.5.2.2
  835. diff -c -r1.5 -r1.5.2.2
  836. *** src/import.c    1998/05/31 01:12:48    1.5
  837. --- src/import.c    1998/08/10 21:46:22    1.5.2.2
  838. ***************
  839. *** 417,424 ****
  840.               err += client_process_import_file (message, dp->d_name,
  841.                                                          vtag, targc, targv,
  842.                                                          repository,
  843. !                                                        keyword_opt != NULL &&
  844. !                                                        keyword_opt[0] == 'b');
  845.           else
  846.   #endif
  847.               err += process_import_file (message, dp->d_name,
  848. --- 417,423 ----
  849.               err += client_process_import_file (message, dp->d_name,
  850.                                                          vtag, targc, targv,
  851.                                                          repository,
  852. !                                                        keyword_opt);
  853.           else
  854.   #endif
  855.               err += process_import_file (message, dp->d_name,
  856. ***************
  857. *** 1315,1321 ****
  858.           (sb.st_mode & S_IRWXU) >> 6) &
  859.          ~cvsumask &
  860.          ~(S_IWRITE | S_IWGRP | S_IWOTH);
  861. !     if (chmod (rcs, mode) < 0)
  862.       {
  863.       ierrno = errno;
  864.       if (add_logfp != NULL)
  865. --- 1314,1320 ----
  866.           (sb.st_mode & S_IRWXU) >> 6) &
  867.          ~cvsumask &
  868.          ~(S_IWRITE | S_IWGRP | S_IWOTH);
  869. !     if (CVS_CHMOD (rcs, mode) < 0)
  870.       {
  871.       ierrno = errno;
  872.       if (add_logfp != NULL)
  873. Index: src/parseinfo.c
  874. ===================================================================
  875. RCS file: e:/cvsroot/ccvs/src/parseinfo.c,v
  876. retrieving revision 1.3
  877. retrieving revision 1.2.2.2
  878. diff -c -r1.3 -r1.2.2.2
  879. *** src/parseinfo.c    1998/07/27 10:17:14    1.3
  880. --- src/parseinfo.c    1998/07/27 15:26:01    1.2.2.2
  881. ***************
  882. *** 205,211 ****
  883.       char *cvsroot;
  884.   {
  885.       char *infopath;
  886. !     FILE *fp_info;
  887.       char *line = NULL;
  888.       size_t line_allocated = 0;
  889.       size_t len;
  890. --- 205,211 ----
  891.       char *cvsroot;
  892.   {
  893.       char *infopath;
  894. !     FILE *fp_info = NULL; /* look like fopen failed */
  895.       char *line = NULL;
  896.       size_t line_allocated = 0;
  897.       size_t len;
  898. ***************
  899. *** 392,397 ****
  900. --- 392,401 ----
  901.       return 0;
  902.   
  903.    error_return:
  904. +     if (fp_info != NULL)
  905. +        {
  906. +        fclose( fp_info );
  907. +        }
  908.       if (infopath != NULL)
  909.       free (infopath);
  910.       if (line != NULL)
  911. Index: src/rcs.c
  912. ===================================================================
  913. RCS file: e:/cvsroot/ccvs/src/rcs.c,v
  914. retrieving revision 1.12
  915. retrieving revision 1.5.2.8
  916. diff -c -r1.12 -r1.5.2.8
  917. *** src/rcs.c    1998/08/10 21:22:54    1.12
  918. --- src/rcs.c    1998/08/10 22:06:02    1.5.2.8
  919. ***************
  920. *** 4630,4636 ****
  921.                  workfile);
  922.       }
  923.   
  924. !     ret = chmod (workfile,
  925.                change_rcs_mode
  926.                ? rcs_mode
  927.                : sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH));
  928. --- 4630,4636 ----
  929.                  workfile);
  930.       }
  931.   
  932. !     ret = CVS_CHMOD (workfile,
  933.                change_rcs_mode
  934.                ? rcs_mode
  935.                : sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH));
  936. ***************
  937. *** 4641,4647 ****
  938.           return 1;
  939.       }
  940.   
  941. !     ret = chmod (workfile,
  942.                sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH));
  943.   #endif
  944.       if (ret < 0)
  945. --- 4641,4647 ----
  946.           return 1;
  947.       }
  948.   
  949. !     ret = CVS_CHMOD (workfile,
  950.                sb.st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH));
  951.   #endif
  952.       if (ret < 0)
  953. ***************
  954. *** 8681,8683 ****
  955. --- 8681,8695 ----
  956.       return label;
  957.   }
  958.   
  959. + FILE* RCS_get_cached (name)
  960. +     const char* name;
  961. + {
  962. +     return cached_rcs != NULL &&
  963. +         strcmp (cached_rcs->path, name) == 0 ?
  964. +         cached_rcsbuf.fp : NULL;
  965. + }
  966. + void RCS_cache_close ()
  967. + {
  968. +     rcsbuf_cache_close ();
  969. + }
  970. Index: src/rcs.h
  971. ===================================================================
  972. RCS file: e:/cvsroot/ccvs/src/rcs.h,v
  973. retrieving revision 1.3
  974. retrieving revision 1.3.2.1
  975. diff -c -r1.3 -r1.3.2.1
  976. *** src/rcs.h    1998/05/31 01:12:54    1.3
  977. --- src/rcs.h    1998/05/31 02:10:22    1.3.2.1
  978. ***************
  979. *** 236,238 ****
  980. --- 236,241 ----
  981.   extern int add_rcs_file PROTO ((char *, char *, char *, char *, char *,
  982.                   char *, char *, int, char **,
  983.                   char *, size_t, FILE *));
  984. + FILE* RCS_get_cached PROTO ((const char *));
  985. + void RCS_cache_close PROTO ((void));
  986. Index: src/sanity.sh
  987. ===================================================================
  988. RCS file: e:/cvsroot/ccvs/src/sanity.sh,v
  989. retrieving revision 1.16
  990. diff -c -r1.16 sanity.sh
  991. *** src/sanity.sh    1998/08/14 22:19:03    1.16
  992. --- src/sanity.sh    1998/08/21 10:21:36
  993. ***************
  994. *** 43,52 ****
  995.   # required to make this script work properly.
  996.   unset CVSREAD
  997.   
  998. ! # The default value of /tmp/cvs-sanity for TESTDIR is dubious,
  999.   # because it loses if two people/scripts try to run the tests
  1000.   # at the same time.  Some possible solutions:
  1001. ! # 1.  Use /tmp/cvs-test$$.  One disadvantage is that the old
  1002.   #     cvs-test* directories would pile up, because they wouldn't
  1003.   #     necessarily get removed.
  1004.   # 2.  Have everyone/everything running the testsuite set
  1005. --- 43,52 ----
  1006.   # required to make this script work properly.
  1007.   unset CVSREAD
  1008.   
  1009. ! # The default value of ${TMPDIR}/cvs-sanity for TESTDIR is dubious,
  1010.   # because it loses if two people/scripts try to run the tests
  1011.   # at the same time.  Some possible solutions:
  1012. ! # 1.  Use ${TMPDIR}/cvs-test$$.  One disadvantage is that the old
  1013.   #     cvs-test* directories would pile up, because they wouldn't
  1014.   #     necessarily get removed.
  1015.   # 2.  Have everyone/everything running the testsuite set
  1016. ***************
  1017. *** 59,77 ****
  1018.   #     So this would be lost if everything was `pwd`-based.  I suppose
  1019.   #     if we wanted to get baroque we could start making symlinks
  1020.   #     to ensure the two are different.
  1021. ! TESTDIR=${TESTDIR:-/tmp/cvs-sanity}
  1022.   
  1023.   # "debugger"
  1024.   #set -x
  1025.   
  1026.   echo 'This test should produce no other output than this line, and a final "OK".'
  1027.   
  1028.   if test x"$1" = x"-r"; then
  1029.       shift
  1030.       remote=yes
  1031.       # If we're going to do remote testing, make sure 'rsh' works first.
  1032.           host="`hostname`"
  1033. !     if test "x`${CVS_RSH-rsh} $host -n 'echo hi'`" != "xhi"; then
  1034.           echo "ERROR: cannot test remote CVS, because \`rsh $host' fails." >&2
  1035.           exit 1
  1036.       fi
  1037. --- 59,93 ----
  1038.   #     So this would be lost if everything was `pwd`-based.  I suppose
  1039.   #     if we wanted to get baroque we could start making symlinks
  1040.   #     to ensure the two are different.
  1041. ! TESTDIR=${TESTDIR:-${TMPDIR}/cvs-sanity}
  1042.   
  1043.   # "debugger"
  1044.   #set -x
  1045.   
  1046.   echo 'This test should produce no other output than this line, and a final "OK".'
  1047.   
  1048. + # FIXME: The detection of OS_COMPILER_EMU only tests for OS.
  1049. + # Is there some way to tell what compiled cvs? If so, then things
  1050. + # like cygwin32 compiled cvs might be handled.
  1051. + OS_COMPILER_EMU=""
  1052. + if test x"${OS2_SHELL}" != x; then
  1053. +   OS_COMPILER_EMU="os2_gcc_emx"
  1054. +   RSH_FLAGS="-b"
  1055. + fi
  1056. + if test x"${OS}" = x"Windows_NT"; then
  1057. +   OS_COMPILER_EMU="win32_msvc_cygwin32"
  1058. + fi
  1059. + if test "x`uname`" = "xWindows_95"; then
  1060. +   OS_COMPILER_EMU="win95_msvc_mks"
  1061. + fi
  1062. +   
  1063.   if test x"$1" = x"-r"; then
  1064.       shift
  1065.       remote=yes
  1066.       # If we're going to do remote testing, make sure 'rsh' works first.
  1067.           host="`hostname`"
  1068. !     if test "x`${CVS_RSH-rsh} $host $RSH_FLAGS -n 'echo hi'`" != "xhi"; then
  1069.           echo "ERROR: cannot test remote CVS, because \`rsh $host' fails." >&2
  1070.           exit 1
  1071.       fi
  1072. ***************
  1073. *** 80,86 ****
  1074.   fi
  1075.   
  1076.   # The --keep option will eventually cause all the tests to leave around the
  1077. ! # contents of the /tmp directory; right now only some implement it.  Not
  1078.   # useful if you are running more than one test.
  1079.   # FIXME: need some real option parsing so this doesn't depend on the order
  1080.   # in which they are specified.
  1081. --- 96,102 ----
  1082.   fi
  1083.   
  1084.   # The --keep option will eventually cause all the tests to leave around the
  1085. ! # contents of the ${TMPDIR} directory; right now only some implement it.  Not
  1086.   # useful if you are running more than one test.
  1087.   # FIXME: need some real option parsing so this doesn't depend on the order
  1088.   # in which they are specified.
  1089. ***************
  1090. *** 94,100 ****
  1091.   # Use full path for CVS executable, so that CVS_SERVER gets set properly
  1092.   # for remote.
  1093.   case $1 in
  1094. ! /*)
  1095.       testcvs=$1
  1096.       ;;
  1097.   *)
  1098. --- 110,116 ----
  1099.   # Use full path for CVS executable, so that CVS_SERVER gets set properly
  1100.   # for remote.
  1101.   case $1 in
  1102. ! /*|[a-zA-Z]:/*)
  1103.       testcvs=$1
  1104.       ;;
  1105.   *)
  1106. ***************
  1107. *** 129,134 ****
  1108. --- 145,324 ----
  1109.     fi
  1110.   fi
  1111.   
  1112. + # Here are a bunch of things that let sanity.sh run better on EMX
  1113. + # and on windows-NT.
  1114. + case $OS_COMPILER_EMU in
  1115. +   os2_gcc_emx)
  1116. +     echo "Bending sanity.sh for ${OS_COMPILER_EMU}"
  1117. +     # Regexp to match the name of a temporary file (from cvs_temp_name).
  1118. +     # redefine to allow colon
  1119. +     tempname="[-a-zA-Z0-9/.%_:]*"
  1120. +     # when asked `type -p sh`, pd korn shell for OS/2 5.27 says 
  1121. +     # "sh is a tracked alias for d:\gnu\bin/sh.exe"
  1122. +     TESTSHELL=sh
  1123. +     # On OS/2 and Windows-NT, we can't make directories readonly with 
  1124. +     # chmod -w
  1125. +     # When the line below is uncommented, test needing that are not run
  1126. +     CANT_PROTECT_DIRS=1
  1127. +     # On OS/2 and Windows-NT, sometimes we can't run shell scripts by 
  1128. +     # naming them.
  1129. +     # When the line below is uncommented, hack around such problems
  1130. +     # Andreas Huber says when he is finished his port of 1.9.28.1
  1131. +     # scripts will run ok.
  1132. +     CANT_RUN_SCRIPTS=1
  1133. +     # On OS/2 with EMX, invoke edhack.exe instead of a shell script editme
  1134. +     # You'll need edhack.exe on your path for this one
  1135. +     # You can find a copy below in this file (look for edhack.c)
  1136. +     #EDHACK_EDITOR=1
  1137. +     # On OS/2 and Win-NT do tests for PreservePermissions only if asked
  1138. +     # (that way, default sanity.sh run is easy)
  1139. +     WONT_PRESERVE_PERMISSIONS=1
  1140. +     # OS/2 (EMX) ls - GNU file utilities 3.13 shows things like drwxa--
  1141. +     # rather than -r--r--r--. this breaks most of modes) test, so don't
  1142. +     # do it unless asked.
  1143. +     BROKEN_LS_L=1
  1144. +     # DEVNULL is used for expr comparison (like macro in src/cvs.h 
  1145. +     # (/dev/null) and also in windows-NT/config.h (nul) for 
  1146. +     # OS/2 emx gcc and Windows-NT MSVC++ want nul
  1147. +     DEVNULL=nul
  1148. +     DEVNULL_TIME="[a-zA-Z0-9: ]*"
  1149. +     # OS/2 EMX and cygwin32 have cat and echo emit lines with crlf at end
  1150. +     # This is no good for For making RCS files, so the kludge crlf2lf.exe
  1151. +     # can be used instead (you'll need it on your path)
  1152. +     # You can find a copy below in this file (look for crlf2lf.c)
  1153. +     CRLF_ENDLINES=1
  1154. +     SLASH="/"
  1155. +   ;;
  1156. +   win32_msvc_cygwin32)
  1157. +     echo "Bending sanity.sh for ${OS_COMPILER_EMU}"
  1158. +     tempname="[-a-zA-Z0-9/\\.%_:]*"
  1159. +     # reserved-13b works like this
  1160. +     TESTSHELL=sh
  1161. +     CANT_PROTECT_DIRS=1
  1162. +     CANT_RUN_SCRIPTS=1
  1163. +     EDHACK_EDITOR=1
  1164. +     WONT_PRESERVE_PERMISSIONS=1
  1165. +     # FIXME: cygwyn32 is a lot less broken than emx, and may possibly
  1166. +     # be made to work. 
  1167. +         # For instance, emx fails at modes-5, but nt fails at modes-7b
  1168. +     # when the BROKEN_LS_L isn't defined.
  1169. +     # On the other hand, maybe cygwin32 not passing modes) is a real bug.
  1170. +     BROKEN_LS_L=1
  1171. +     DEVNULL=nul
  1172. +     CRLF_ENDLINES=1
  1173. +     # Some RCS outputs have \ rather than / on windows-NT when
  1174. +     # compiled by MS Visual C++
  1175. +       SLASH="[/\\]"
  1176. +     # death2-diff tests give ? as filetime of nul
  1177. +     DEVNULL_TIME="?"
  1178. +   ;;
  1179. +   win95_msvc_mks)
  1180. +     echo "Bending sanity.sh for ${OS_COMPILER_EMU}"
  1181. +     tempname="[-a-zA-Z0-9/\\.%_:]*"
  1182. +     # MKS ksh seems to run DOS type rather than *nix type, so
  1183. +     # shell detection just doesn't work.
  1184. +     TESTSHELL=sh
  1185. +     CANT_PROTECT_DIRS=1
  1186. +     CANT_RUN_SCRIPTS=1
  1187. +     EDHACK_EDITOR=1
  1188. +     WONT_PRESERVE_PERMISSIONS=1
  1189. +     # FIXME: cygwyn32 is a lot less broken than emx, and may possibly
  1190. +     # be made to work. 
  1191. +         # For instance, emx fails at modes-5, but nt fails at modes-7b
  1192. +     # when the BROKEN_LS_L isn't defined.
  1193. +     # On the other hand, maybe cygwin32 not passing modes) is a real bug.
  1194. +     BROKEN_LS_L=1
  1195. +     DEVNULL=nul
  1196. +     CRLF_ENDLINES=1
  1197. +     # Some RCS outputs have \ rather than / on windows-NT when
  1198. +     # compiled by MS Visual C++
  1199. +       SLASH="[/\\]"
  1200. +     # death2-diff tests give ? as filetime of nul
  1201. +     DEVNULL_TIME="?"
  1202. +      DEVNULL_TIME="[a-zA-Z0-9: ]*"
  1203. +   ;;
  1204. +   *)
  1205. +     DEVNULL=/dev/null
  1206. +     SLASH="/"
  1207. +     DEVNULL_TIME="[a-zA-Z0-9: ]*"
  1208. +     FILESYSTEM_TICK=0
  1209. +   ;;
  1210. + esac
  1211. + # here is a hack that converts files with cr lf end lines to lf endlines
  1212. + lf_endlines ()
  1213. + {
  1214. +   if test x"${CRLF_ENDLINES}" = x; then
  1215. +     return 0
  1216. +   fi
  1217. +   crlf2lf <$1 ${TMPDIR}/lf$$
  1218. +   cp ${TMPDIR}/lf$$ $1
  1219. +   rm -f ${TMPDIR}/lf$$
  1220. +   return 0
  1221. + }
  1222. + # /* crlf2lf.c */
  1223. + # #include <stdio.h>
  1224. + # 
  1225. + # int Usage( const char * pszPgmname )
  1226. + # {
  1227. + #    fprintf( stdout, "Usage: %s OUTFILE\n", pszPgmname );
  1228. + #    fprintf( stdout,
  1229. + #       "\n"
  1230. + #       "Copy stdin to OUTFILE replacing crlf by lf.\n");
  1231. + #    return 1;
  1232. + # }
  1233. + # 
  1234. + # int main(int argc, const char * argv[])
  1235. + # {
  1236. + #    FILE *         pOutFile;
  1237. + #    int i;
  1238. + # 
  1239. + #    if (argc != 2)
  1240. + #       {
  1241. + #       return Usage(argv[0]);
  1242. + #       }
  1243. + #    pOutFile = fopen( argv[1], "wb");
  1244. + #    if (0 == pOutFile)
  1245. + #       {
  1246. + #       printf("Can't open %s for writing\n", argv[1]);
  1247. + #       return Usage(argv[0]);
  1248. + #       }
  1249. + # 
  1250. + #    while (EOF != (i= getc(stdin)))
  1251. + #       putc(i, pOutFile);
  1252. + #    return 0;
  1253. + # 
  1254. + #    fflush( pOutFile );
  1255. + # }
  1256.   # FIXME: try things (what things? checkins?) without -m.
  1257.   #
  1258.   # Some of these tests are written to expect -Q.  But testing with
  1259. ***************
  1260. *** 528,540 ****
  1261.   # likely that we test whether CVS is distinguishing between TMPPWD
  1262.   # and TESTDIR.  However, there is no guarantee that will test it anyway.
  1263.   # If we really care, we should do something along the lines of:
  1264. ! #   cd /tmp/cvs-sanity  # In reality, overridable with environment variable?
  1265.   #   mkdir realdir
  1266.   #   ln -s realdir testdir
  1267. ! #   TESTDIR=/tmp/cvs-sanity/testdir
  1268. ! #   TMPPWD=/tmp/cvs-sanity/realdir
  1269. ! TMPPWD=`pwd`
  1270.   
  1271.   # Avoid picking up any stray .cvsrc, etc., from the user running the tests
  1272.   mkdir home
  1273.   HOME=${TESTDIR}/home; export HOME
  1274. --- 718,824 ----
  1275.   # likely that we test whether CVS is distinguishing between TMPPWD
  1276.   # and TESTDIR.  However, there is no guarantee that will test it anyway.
  1277.   # If we really care, we should do something along the lines of:
  1278. ! #   cd ${TMPDIR}/cvs-sanity  # In reality, overridable with environment variable?
  1279.   #   mkdir realdir
  1280.   #   ln -s realdir testdir
  1281. ! #   TESTDIR=${TMPDIR}/cvs-sanity/testdir
  1282. ! #   TMPPWD=${TMPDIR}/cvs-sanity/realdir
  1283. ! # allow overide of TMPPWD from outside sanity.sh
  1284. ! if test x"${TMPPWD}" = x; then
  1285. !   if test x"${SLASH}" = x"/"; then
  1286. !     TMPPWD=`pwd`
  1287. !   else
  1288. !     if test x"${TESTDIR}" = x"/tmp/cvs-sanity"; then
  1289. !       # but here's a hack that makes basic2-64 happier with winnt, MS Visual C++ 4.0
  1290. !       # and cygwin32 beta19 bash by accepting optional drive letter and slosh
  1291. !       # instead of slash
  1292. !       TMPPWD=[A-Za-z:]*${SLASH}tmp${SLASH}cvs-sanity
  1293. !     else
  1294. !       echo '${SLASH} != / and ${TESTDIR} != /tmp/cvs-sanity. TMPPWD will be wrongly set'
  1295. !     fi
  1296. !   fi
  1297. ! fi
  1298. ! # In various places, CVS waits a tick of the filesystem clock to make
  1299. ! # sure that files have different timestamps. This was coded as sleep (1).
  1300. ! # For some filesystems (eg FAT, FAT32) 2 seconds are needed.
  1301. ! # In my local cvs, I've defined FILESYSTEM_TICK in windows-NT/options.h,
  1302. ! # and in src/cvs.h a default of 1 second is defined.
  1303. ! #
  1304. ! # I found some timing problems using sanity.sh Windows-95 on Pentium 90
  1305. ! # with MKS Toolkit and FAT. These are worse on Pentium-II 333.
  1306. ! # On the other hand, I didn't see these problems withPentium 133 NT and
  1307. ! # cygwin32 on a netware 4.10 server for which the script below reports
  1308. ! # 2 seconds per filesystem tick.
  1309. ! # Nor did I see these problems with OS/2 HPFS using EMX port.
  1310. ! #
  1311. ! # Perhaps part of the problem is not 
  1312. ! #
  1313. ! # I suspect that CVS doesn't sleep in enough places for this to work 
  1314. ! # properly.
  1315. ! #
  1316. ! # multibranch2 often fails, as does the second ci here :
  1317. ! #   cvs add file1
  1318. ! #   cvs ci
  1319. ! #   echo foo >file1
  1320. ! #   cvs ci
  1321. ! #
  1322. ! # Windows_95 on Pentium 90 using FAT I found that I had about 18 mostly
  1323. ! # consistent failures where sanity.sh expected a file just modified
  1324. ! # in the sandbox to be checked in and cvs didn't do that.
  1325. ! # When I ran on Pentium-II 333 (FAT32) I got about 30.
  1326. ! # Eventually, I tried putting sleep before the echo command modifying
  1327. ! # the file - problem gone.
  1328. ! # I'm told FAT doesn't keep the low order bit of time in seconds.
  1329. ! #
  1330. ! # The code below works out the number of seconds (>=0) to wait between
  1331. ! # creating files to be sure that they have different timestamps.
  1332. ! # I've put sleeps where they seem to be needed (before
  1333. ! # echo cat or cp before ci modified, 
  1334. ! # before update -r,
  1335. ! # before tag -b branch)
  1336. ! #
  1337. ! # Having different timestamps on fileX and in CVS/Entries for fileX is
  1338. ! # how cvs decides file is modified since checkout. Detection would be
  1339. ! # more robust if bytesize was also compared. 
  1340. ! # Would changing the Entries file be a bad thing?
  1341. ! #
  1342. ! # Murray Bishop, 1 July 98
  1343. ! if test "x${FILESYSTEM_TICK}" = "x"; then
  1344. !   seconds=0
  1345. !   while test "x${FILESYSTEM_TICK}" = "x"; do
  1346. !     echo tock >tick1
  1347. !     sleep ${seconds}
  1348. !     echo tock >tick2
  1349. !     sleep ${seconds}
  1350. !     echo tock >tick3
  1351. !     sleep ${seconds}
  1352. !     echo tock >tick4
  1353. !     sleep ${seconds}
  1354. !     echo tock >tick5
  1355. !     if test  tick1 -ot tick2 \
  1356. !     -a tick2 -ot tick3 \
  1357. !     -a tick3 -ot tick4 \
  1358. !     -a tick4 -ot tick5; then
  1359. !       FILESYSTEM_TICK=${seconds}
  1360. !     fi
  1361. !     seconds=`expr ${seconds} + 1`
  1362. !   done
  1363. !   rm tick1 tick2 tick3 tick4 tick5
  1364. ! fi
  1365. ! if test "x${FILESYSTEM_TICK}" != "x0"; then
  1366. !   : When we depart from distribution behavior - say so.
  1367. !   echo "Waiting ${FILESYSTEM_TICK} seconds between creating files gives different modified times."
  1368. ! fi
  1369.   
  1370.   # Avoid picking up any stray .cvsrc, etc., from the user running the tests
  1371.   mkdir home
  1372.   HOME=${TESTDIR}/home; export HOME
  1373. ***************
  1374. *** 571,579 ****
  1375.       tests="${tests} binwrap3 mwrap info taginfo config"
  1376.       tests="${tests} serverpatch log log2 ann ann-id crerepos rcs rcs2"
  1377.       tests="${tests} history"
  1378. !     tests="${tests} big modes modes2 stamps"
  1379. !     # PreservePermissions stuff: permissions, symlinks et al.
  1380. !     tests="${tests} perms symlinks hardlinks"
  1381.       # More tag and branch tests, keywords.
  1382.       tests="${tests} sticky keyword keywordlog"
  1383.       tests="${tests} head tagdate multibranch2 tag8k"
  1384. --- 855,873 ----
  1385.       tests="${tests} binwrap3 mwrap info taginfo config"
  1386.       tests="${tests} serverpatch log log2 ann ann-id crerepos rcs rcs2"
  1387.       tests="${tests} history"
  1388. !     tests="${tests} big"
  1389. !     if test x"${BROKEN_LS_L}" = x; then
  1390. !       tests="${tests} modes modes2"
  1391. !     else
  1392. !       echo "Won't run modes modes2 tests - BROKEN_LS_L"
  1393. !     fi
  1394. !     tests="${tests} stamps"
  1395. !     if test x"${WONT_PRESERVE_PERMISSIONS}" = x; then
  1396. !       # PreservePermissions stuff: permissions, symlinks et al.
  1397. !       tests="${tests} perms symlinks hardlinks"
  1398. !     else
  1399. !       echo "Won't run perms symlinks hardlinks tests - WONT_PRESERVE_PERMISSIONS"
  1400. !     fi
  1401.       # More tag and branch tests, keywords.
  1402.       tests="${tests} sticky keyword keywordlog"
  1403.       tests="${tests} head tagdate multibranch2 tag8k"
  1404. ***************
  1405. *** 598,611 ****
  1406.       ISDIFF=false
  1407.   
  1408.       cd $DIR_1
  1409. !     find . -print | fgrep -v /CVS | sort > /tmp/dc$$d1
  1410.   
  1411.       # go back where we were to avoid symlink hell...
  1412.       cd $OLDPWD
  1413.       cd $DIR_2
  1414. !     find . -print | fgrep -v /CVS | sort > /tmp/dc$$d2
  1415.   
  1416. !     if diff /tmp/dc$$d1 /tmp/dc$$d2 >/dev/null 2>&1
  1417.       then
  1418.           :
  1419.       else
  1420. --- 892,906 ----
  1421.       ISDIFF=false
  1422.   
  1423.       cd $DIR_1
  1424. !     # EMX gnu find 4.1 emits CVS rather than ./CVS
  1425. !     find . -print | fgrep -v CVS | sort > ${TMPDIR}/dc$$d1
  1426.   
  1427.       # go back where we were to avoid symlink hell...
  1428.       cd $OLDPWD
  1429.       cd $DIR_2
  1430. !     find . -print | fgrep -v CVS | sort > ${TMPDIR}/dc$$d2
  1431.   
  1432. !     if diff ${TMPDIR}/dc$$d1 ${TMPDIR}/dc$$d2 >/dev/null 2>&1
  1433.       then
  1434.           :
  1435.       else
  1436. ***************
  1437. *** 621,633 ****
  1438.                   ISDIFF=true
  1439.               fi
  1440.           fi
  1441. !     done < /tmp/dc$$d1
  1442. !     rm -f /tmp/dc$$*
  1443.   }
  1444.   
  1445.   # Set up CVSROOT (the crerepos tests will test operating without CVSROOT set).
  1446.   CVSROOT_DIRNAME=${TESTDIR}/cvsroot
  1447. ! CVSROOT=${CVSROOT_DIRNAME} ; export CVSROOT
  1448.   if test "x$remote" = xyes; then
  1449.       # Use rsh so we can test it without having to muck with inetd
  1450.       # or anything like that.  Also needed to get CVS_SERVER to
  1451. --- 916,928 ----
  1452.                   ISDIFF=true
  1453.               fi
  1454.           fi
  1455. !     done < ${TMPDIR}/dc$$d1
  1456. !     rm -f ${TMPDIR}/dc$$*
  1457.   }
  1458.   
  1459.   # Set up CVSROOT (the crerepos tests will test operating without CVSROOT set).
  1460.   CVSROOT_DIRNAME=${TESTDIR}/cvsroot
  1461. ! CVSROOT=:local:${CVSROOT_DIRNAME} ; export CVSROOT
  1462.   if test "x$remote" = xyes; then
  1463.       # Use rsh so we can test it without having to muck with inetd
  1464.       # or anything like that.  Also needed to get CVS_SERVER to
  1465. ***************
  1466. *** 787,796 ****
  1467.         # The .* here will normally be "No such file or directory",
  1468.         # but if memory serves some systems (AIX?) have a different message.
  1469.   :      dotest_fail basica-9 \
  1470. !         "${testcvs} -q -d ${TESTDIR}/nonexist update" \
  1471.   "${PROG}: cannot access cvs root ${TESTDIR}/nonexist: .*"
  1472.         dotest_fail basica-9 \
  1473. !         "${testcvs} -q -d ${TESTDIR}/nonexist update" \
  1474.   "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/nonexist/CVSROOT: .*"
  1475.   
  1476.         dotest basica-10 "${testcvs} annotate" \
  1477. --- 1082,1091 ----
  1478.         # The .* here will normally be "No such file or directory",
  1479.         # but if memory serves some systems (AIX?) have a different message.
  1480.   :      dotest_fail basica-9 \
  1481. !         "${testcvs} -q -d :local:${TESTDIR}/nonexist update" \
  1482.   "${PROG}: cannot access cvs root ${TESTDIR}/nonexist: .*"
  1483.         dotest_fail basica-9 \
  1484. !         "${testcvs} -q -d :local:${TESTDIR}/nonexist update" \
  1485.   "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/nonexist/CVSROOT: .*"
  1486.   
  1487.         dotest basica-10 "${testcvs} annotate" \
  1488. ***************
  1489. *** 972,977 ****
  1490. --- 1267,1273 ----
  1491.   ${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v  <--  sfile2
  1492.   initial revision: 1\.1
  1493.   done"
  1494. +       sleep ${FILESYSTEM_TICK}
  1495.         echo sfile1 develops >Emptydir/sfile1
  1496.         dotest basicb-6 "${testcvs} -q ci -m modify" \
  1497.   "Checking in Emptydir/sfile1;
  1498. ***************
  1499. *** 1755,1760 ****
  1500. --- 2051,2057 ----
  1501.               cd $i
  1502.   
  1503.               # modify a file
  1504. +             sleep ${FILESYSTEM_TICK}
  1505.               echo file6 >>file6
  1506.   
  1507.               # delete a file
  1508. ***************
  1509. *** 1895,1901 ****
  1510.           fi
  1511.   
  1512.           # directory copies are done in an oblique way in order to avoid a bug in sun's tmp filesystem.
  1513. !         mkdir first-dir.cpy ; (cd first-dir ; tar cf - . | (cd ../first-dir.cpy ; tar xf -))
  1514.   
  1515.           directory_cmp first-dir export-dir
  1516.   
  1517. --- 2192,2209 ----
  1518.           fi
  1519.   
  1520.           # directory copies are done in an oblique way in order to avoid a bug in sun's tmp filesystem.
  1521. !         if test "x${OS_COMPILER_EMU}" = "xwin95_msvc_mks"; then
  1522. !           # MKS Toolkit on win95 sometimes chokes on the usual way
  1523. !           mkdir first-dir.cpy
  1524. !           cd first-dir
  1525. !           tar cf ${TESTDIR}/ball.tar .
  1526. !           cd ../first-dir.cpy
  1527. !           tar xf ${TESTDIR}/ball.tar
  1528. !           rm ${TESTDIR}/ball.tar
  1529. !           cd ..
  1530. !         else
  1531. !          mkdir first-dir.cpy ; (cd first-dir ; tar cf - . | (cd ../first-dir.cpy ; tar xf -))
  1532. !         fi
  1533.   
  1534.           directory_cmp first-dir export-dir
  1535.   
  1536. ***************
  1537. *** 1943,1949 ****
  1538.   
  1539.           rm -r export-dir first-dir
  1540.           mkdir first-dir
  1541. !         (cd first-dir.cpy ; tar cf - . | (cd ../first-dir ; tar xf -))
  1542.   
  1543.           # update the top, cancelling sticky tags, retag, update other copy, compare.
  1544.           cd first-dir
  1545. --- 2251,2267 ----
  1546.   
  1547.           rm -r export-dir first-dir
  1548.           mkdir first-dir
  1549. !         if test "x${OS_COMPILER_EMU}" = "xwin95_msvc_mks"; then
  1550. !           # MKS Toolkit on win95 sometimes chokes on the usual way
  1551. !           cd first-dir.cpy
  1552. !           tar cf ${TESTDIR}/ball.tar .
  1553. !           cd ../first-dir
  1554. !           tar xf ${TESTDIR}/ball.tar
  1555. !           rm ${TESTDIR}/ball.tar
  1556. !           cd ..
  1557. !         else
  1558. !           (cd first-dir.cpy ; tar cf - . | (cd ../first-dir ; tar xf -))
  1559. !         fi
  1560.   
  1561.           # update the top, cancelling sticky tags, retag, update other copy, compare.
  1562.           cd first-dir
  1563. ***************
  1564. *** 2022,2029 ****
  1565.   T [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\]
  1566.   T [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\]
  1567.   O [0-9/]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir           =first-dir= ${TMPPWD}/\*
  1568. ! U [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6     first-dir           == ${TMPPWD}/first-dir
  1569. ! U [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7     first-dir           == ${TMPPWD}/first-dir" \
  1570.   "O [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir           =first-dir= <remote>/\*
  1571.   A [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6     first-dir           == <remote>
  1572.   A [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7     first-dir           == <remote>
  1573. --- 2340,2347 ----
  1574.   T [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-tag:rtagged-by-head\]
  1575.   T [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir \[rtagged-by-revision:1\.1\]
  1576.   O [0-9/]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir           =first-dir= ${TMPPWD}/\*
  1577. ! U [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file6     first-dir           == ${TMPPWD}${SLASH}first-dir
  1578. ! U [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.2 file7     first-dir           == ${TMPPWD}${SLASH}first-dir" \
  1579.   "O [0-9/]* [0-9:]* ${PLUS}0000 ${username} first-dir           =first-dir= <remote>/\*
  1580.   A [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file6     first-dir           == <remote>
  1581.   A [0-9/]* [0-9:]* ${PLUS}0000 ${username} 1\.1 file7     first-dir           == <remote>
  1582. ***************
  1583. *** 2112,2117 ****
  1584. --- 2430,2436 ----
  1585.   U trdiff/bar
  1586.   U trdiff/foo"
  1587.           cd trdiff
  1588. +         sleep ${FILESYSTEM_TICK}
  1589.           echo something >> foo
  1590.           dotest rdiff-3 \
  1591.             "${testcvs} ci -m added-something foo" \
  1592. ***************
  1593. *** 2174,2181 ****
  1594.   ! \$''Name: local-v0 \$
  1595.   ! something
  1596.   Index: trdiff/new
  1597. ! diff -c /dev/null trdiff/new:1\.1
  1598. ! \*\*\* /dev/null    .*
  1599.   --- trdiff/new    .*
  1600.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1601.   \*\*\* 0 \*\*\*\*
  1602. --- 2493,2500 ----
  1603.   ! \$''Name: local-v0 \$
  1604.   ! something
  1605.   Index: trdiff/new
  1606. ! diff -c '"${DEVNULL}"' trdiff/new:1\.1
  1607. ! \*\*\* '"${DEVNULL}"'    .*
  1608.   --- trdiff/new    .*
  1609.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1610.   \*\*\* 0 \*\*\*\*
  1611. ***************
  1612. *** 2329,2334 ****
  1613. --- 2648,2654 ----
  1614.   T file2'
  1615.   
  1616.           # branch1
  1617. +         sleep ${FILESYSTEM_TICK}
  1618.           if ${CVS} tag -b branch1  ; then
  1619.               pass 73
  1620.           else
  1621. ***************
  1622. *** 2336,2341 ****
  1623. --- 2656,2662 ----
  1624.           fi
  1625.   
  1626.           # and move to the branch.
  1627. +         sleep ${FILESYSTEM_TICK}
  1628.           if ${CVS} update -r branch1  ; then
  1629.               pass 74
  1630.           else
  1631. ***************
  1632. *** 2362,2369 ****
  1633.           dotest death-76a0 \
  1634.   "${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir" \
  1635.   "Index: first-dir/file3
  1636. ! diff -c /dev/null first-dir/file3:1\.1\.2\.1
  1637. ! \*\*\* /dev/null    .*
  1638.   --- first-dir/file3    .*
  1639.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1640.   \*\*\* 0 \*\*\*\*
  1641. --- 2683,2690 ----
  1642.           dotest death-76a0 \
  1643.   "${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir" \
  1644.   "Index: first-dir/file3
  1645. ! diff -c ${DEVNULL} first-dir/file3:1\.1\.2\.1
  1646. ! \*\*\* ${DEVNULL}    .*
  1647.   --- first-dir/file3    .*
  1648.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1649.   \*\*\* 0 \*\*\*\*
  1650. ***************
  1651. *** 2526,2531 ****
  1652. --- 2847,2853 ----
  1653.           fi
  1654.   
  1655.           # typo; try to get to the branch and fail
  1656. +         sleep ${FILESYSTEM_TICK}
  1657.           dotest_fail 92.1a "${testcvs} update -r brnach1" \
  1658.             "${PROG}"' \[[a-z]* aborted\]: no such tag brnach1'
  1659.           # Make sure we are still on the trunk
  1660. ***************
  1661. *** 2541,2546 ****
  1662. --- 2863,2869 ----
  1663.           fi
  1664.   
  1665.           # back to branch1
  1666. +         sleep ${FILESYSTEM_TICK}
  1667.           if ${CVS} update -r branch1  2>> ${LOGFILE}; then
  1668.               pass 93
  1669.           else
  1670. ***************
  1671. *** 2602,2607 ****
  1672. --- 2925,2931 ----
  1673.   done"
  1674.   
  1675.         # Make a branch and a non-branch tag.
  1676. +       sleep ${FILESYSTEM_TICK}
  1677.         dotest death2-4 "${testcvs} -q tag -b branch" \
  1678.   'T file1
  1679.   T file4'
  1680. ***************
  1681. *** 2610,2615 ****
  1682. --- 2934,2940 ----
  1683.   T file4'
  1684.   
  1685.         # Switch over to the branch.
  1686. +       sleep ${FILESYSTEM_TICK}
  1687.         dotest death2-6 "${testcvs} -q update -r branch" ''
  1688.   
  1689.         # Delete the file on the branch.
  1690. ***************
  1691. *** 2631,2637 ****
  1692.   RCS file: file1
  1693.   diff -N file1
  1694.   \*\*\* ${tempname}[     ][    ]*[a-zA-Z0-9: ]*
  1695. ! --- /dev/null[     ][     ]*[a-zA-Z0-9: ]*
  1696.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1697.   \*\*\* 1 \*\*\*\*
  1698.   - first revision
  1699. --- 2956,2962 ----
  1700.   RCS file: file1
  1701.   diff -N file1
  1702.   \*\*\* ${tempname}[     ][    ]*[a-zA-Z0-9: ]*
  1703. ! --- ${DEVNULL}[     ][     ]*${DEVNULL_TIME}
  1704.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1705.   \*\*\* 1 \*\*\*\*
  1706.   - first revision
  1707. ***************
  1708. *** 2655,2661 ****
  1709.   RCS file: file1
  1710.   diff -N file1
  1711.   \*\*\* ${tempname}[     ][    ]*[a-zA-Z0-9: ]*
  1712. ! --- /dev/null[     ][     ]*[a-zA-Z0-9: ]*
  1713.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1714.   \*\*\* 1 \*\*\*\*
  1715.   - first revision
  1716. --- 2980,2986 ----
  1717.   RCS file: file1
  1718.   diff -N file1
  1719.   \*\*\* ${tempname}[     ][    ]*[a-zA-Z0-9: ]*
  1720. ! --- ${DEVNULL}[     ][     ]*${DEVNULL_TIME}
  1721.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1722.   \*\*\* 1 \*\*\*\*
  1723.   - first revision
  1724. ***************
  1725. *** 2670,2676 ****
  1726.   RCS file: file1
  1727.   diff -N file1
  1728.   \*\*\* ${tempname}[     ][    ]*[a-zA-Z0-9: ]*
  1729. ! --- /dev/null[     ][     ]*[a-zA-Z0-9: ]*
  1730.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1731.   \*\*\* 1 \*\*\*\*
  1732.   - first revision
  1733. --- 2995,3001 ----
  1734.   RCS file: file1
  1735.   diff -N file1
  1736.   \*\*\* ${tempname}[     ][    ]*[a-zA-Z0-9: ]*
  1737. ! --- ${DEVNULL}[     ][     ]*${DEVNULL_TIME}
  1738.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1739.   \*\*\* 1 \*\*\*\*
  1740.   - first revision
  1741. ***************
  1742. *** 2705,2711 ****
  1743.   ===================================================================
  1744.   RCS file: file1
  1745.   diff -N file1
  1746. ! \*\*\* /dev/null[     ][     ]*[a-zA-Z0-9: ]*
  1747.   --- ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1748.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1749.   \*\*\* 0 \*\*\*\*
  1750. --- 3030,3036 ----
  1751.   ===================================================================
  1752.   RCS file: file1
  1753.   diff -N file1
  1754. ! \*\*\* ${DEVNULL}[     ][     ]*${DEVNULL_TIME}
  1755.   --- ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1756.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1757.   \*\*\* 0 \*\*\*\*
  1758. ***************
  1759. *** 2758,2763 ****
  1760. --- 3083,3089 ----
  1761.         # The ``no longer in the repository'' message doesn't really
  1762.         # look right to me, but that's what CVS currently prints for
  1763.         # this case.
  1764. +       sleep ${FILESYSTEM_TICK}
  1765.         dotest death2-14 "${testcvs} -q update -r branch" \
  1766.   "[UP] file1
  1767.   ${PROG} [a-z]*: file2 is no longer in the repository
  1768. ***************
  1769. *** 2796,2802 ****
  1770.   ===================================================================
  1771.   RCS file: file3
  1772.   diff -N file3
  1773. ! \*\*\* /dev/null[     ][     ]*[a-zA-Z0-9: ]*
  1774.   --- ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1775.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1776.   \*\*\* 0 \*\*\*\*
  1777. --- 3122,3128 ----
  1778.   ===================================================================
  1779.   RCS file: file3
  1780.   diff -N file3
  1781. ! \*\*\* ${DEVNULL}[     ][     ]*${DEVNULL_TIME}
  1782.   --- ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1783.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1784.   \*\*\* 0 \*\*\*\*
  1785. ***************
  1786. *** 2839,2845 ****
  1787.   ===================================================================
  1788.   RCS file: file2
  1789.   diff -N file2
  1790. ! \*\*\* /dev/null[     ][     ]*[a-zA-Z0-9: ]*
  1791.   --- ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1792.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1793.   \*\*\* 0 \*\*\*\*
  1794. --- 3165,3171 ----
  1795.   ===================================================================
  1796.   RCS file: file2
  1797.   diff -N file2
  1798. ! \*\*\* ${DEVNULL}[     ][     ]*${DEVNULL_TIME}
  1799.   --- ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1800.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1801.   \*\*\* 0 \*\*\*\*
  1802. ***************
  1803. *** 2849,2855 ****
  1804.   ===================================================================
  1805.   RCS file: file3
  1806.   diff -N file3
  1807. ! \*\*\* /dev/null[     ][     ]*[a-zA-Z0-9: ]*
  1808.   --- ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1809.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1810.   \*\*\* 0 \*\*\*\*
  1811. --- 3175,3181 ----
  1812.   ===================================================================
  1813.   RCS file: file3
  1814.   diff -N file3
  1815. ! \*\*\* ${DEVNULL}[     ][     ]*${DEVNULL_TIME}
  1816.   --- ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1817.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1818.   \*\*\* 0 \*\*\*\*
  1819. ***************
  1820. *** 2860,2872 ****
  1821.   RCS file: file4
  1822.   diff -N file4
  1823.   \*\*\* ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1824. ! --- /dev/null[     ][     ]*[a-zA-Z0-9: ]*
  1825.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1826.   \*\*\* 1 \*\*\*\*
  1827.   - file4 first revision
  1828.   --- 0 ----"
  1829.   
  1830.         # Switch to the nonbranch tag.
  1831.         dotest death2-19 "${testcvs} -q update -r tag" \
  1832.   "[UP] file1
  1833.   ${PROG} [a-z]*: file2 is no longer in the repository
  1834. --- 3186,3199 ----
  1835.   RCS file: file4
  1836.   diff -N file4
  1837.   \*\*\* ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1838. ! --- ${DEVNULL}[     ][     ]*${DEVNULL_TIME}
  1839.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1840.   \*\*\* 1 \*\*\*\*
  1841.   - file4 first revision
  1842.   --- 0 ----"
  1843.   
  1844.         # Switch to the nonbranch tag.
  1845. +       sleep ${FILESYSTEM_TICK}
  1846.         dotest death2-19 "${testcvs} -q update -r tag" \
  1847.   "[UP] file1
  1848.   ${PROG} [a-z]*: file2 is no longer in the repository
  1849. ***************
  1850. *** 2884,2890 ****
  1851.   ===================================================================
  1852.   RCS file: file1
  1853.   diff -N file1
  1854. ! \*\*\* /dev/null[     ][     ]*[a-zA-Z0-9: ]*
  1855.   --- ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1856.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1857.   \*\*\* 0 \*\*\*\*
  1858. --- 3211,3217 ----
  1859.   ===================================================================
  1860.   RCS file: file1
  1861.   diff -N file1
  1862. ! \*\*\* ${DEVNULL}[     ][     ]*${DEVNULL_TIME}
  1863.   --- ${tempname}[     ][     ]*[a-zA-Z0-9: ]*
  1864.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1865.   \*\*\* 0 \*\*\*\*
  1866. ***************
  1867. *** 2936,2941 ****
  1868. --- 3263,3269 ----
  1869.   initial revision: 1.1
  1870.   done
  1871.   HERE
  1872. +       sleep ${FILESYSTEM_TICK}
  1873.         echo 4:trunk-2 >file4
  1874.         dotest branches-3.2 "${testcvs} -q ci -m trunk-before-branch" \
  1875.   "Checking in file4;
  1876. ***************
  1877. *** 2949,2961 ****
  1878. --- 3277,3292 ----
  1879.   T file2
  1880.   T file3
  1881.   T file4"
  1882. +       sleep ${FILESYSTEM_TICK}
  1883.         dotest branches-4 "${testcvs} tag -b br1" "${PROG}"' [a-z]*: Tagging \.
  1884.   T file1
  1885.   T file2
  1886.   T file3
  1887.   T file4'
  1888. +       sleep ${FILESYSTEM_TICK}
  1889.         dotest branches-5 "${testcvs} update -r br1" \
  1890.   "${PROG}"' [a-z]*: Updating \.'
  1891. +       sleep ${FILESYSTEM_TICK}
  1892.         echo 1:br1 >file1
  1893.         echo 2:br1 >file2
  1894.         echo 4:br1 >file4
  1895. ***************
  1896. *** 2972,2982 ****
  1897. --- 3303,3316 ----
  1898.   ${TESTDIR}/cvsroot/first-dir/file4,v  <--  file4
  1899.   new revision: 1\.2\.2\.1; previous revision: 1\.2
  1900.   done"
  1901. +       sleep ${FILESYSTEM_TICK}
  1902.         dotest branches-7 "${testcvs} -q tag -b brbr" 'T file1
  1903.   T file2
  1904.   T file3
  1905.   T file4'
  1906. +       sleep ${FILESYSTEM_TICK}
  1907.         dotest branches-8 "${testcvs} -q update -r brbr" ''
  1908. +       sleep ${FILESYSTEM_TICK}
  1909.         echo 1:brbr >file1
  1910.         echo 4:brbr >file4
  1911.         dotest branches-9 "${testcvs} -q ci -m modify" \
  1912. ***************
  1913. *** 2992,2997 ****
  1914. --- 3326,3332 ----
  1915.   2:br1
  1916.   3:ancest
  1917.   4:brbr'
  1918. +       sleep ${FILESYSTEM_TICK}
  1919.         dotest branches-11 "${testcvs} -q update -r br1" \
  1920.   '[UP] file1
  1921.   [UP] file4'
  1922. ***************
  1923. *** 2999,3004 ****
  1924. --- 3334,3340 ----
  1925.   2:br1
  1926.   3:ancest
  1927.   4:br1'
  1928. +       sleep ${FILESYSTEM_TICK}
  1929.         echo 4:br1-2 >file4
  1930.         dotest branches-12.2 "${testcvs} -q ci -m change-on-br1" \
  1931.   "Checking in file4;
  1932. ***************
  1933. *** 3012,3017 ****
  1934. --- 3348,3354 ----
  1935.   2:ancest
  1936.   3:ancest
  1937.   4:trunk-2'
  1938. +       sleep ${FILESYSTEM_TICK}
  1939.         echo 4:trunk-3 >file4
  1940.         dotest branches-14.2 \
  1941.           "${testcvs} -q ci -m trunk-change-after-branch" \
  1942. ***************
  1943. *** 3152,3158 ****
  1944. --- 3489,3497 ----
  1945.         dotest branches2-4 "${testcvs} -q tag tag1" 'T file1'
  1946.   
  1947.         # Make two branches.
  1948. +       sleep ${FILESYSTEM_TICK}
  1949.         dotest branches2-5 "${testcvs} -q rtag -b -r tag1 b1 first-dir" ''
  1950. +       sleep ${FILESYSTEM_TICK}
  1951.         dotest branches2-6 "${testcvs} -q rtag -b -r tag1 b2 first-dir" ''
  1952.   
  1953.         # Create some files and a subdirectory on branch b1.
  1954. ***************
  1955. *** 3419,3424 ****
  1956. --- 3758,3764 ----
  1957.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  1958.   I am the first foo, and my name is \$""Name: first \$\."
  1959.   
  1960. +       sleep ${FILESYSTEM_TICK}
  1961.         echo "I am the second foo, and my name is $""Name$." > foo.c
  1962.         dotest rcsdiff-6 "${testcvs} commit -m rev2 foo.c" \
  1963.   "Checking in foo\.c;
  1964. ***************
  1965. *** 3447,3452 ****
  1966. --- 3787,3793 ----
  1967.   ---
  1968.   > I am the second foo, and my name is \$""Name:  \$\."
  1969.   
  1970. +       sleep ${FILESYSTEM_TICK}
  1971.         echo "I am the once and future foo, and my name is $""Name$." > foo.c
  1972.         dotest_fail rcsdiff-10 "${testcvs} diff -r first" \
  1973.   "${PROG} [a-z]*: Diffing \.
  1974. ***************
  1975. *** 3485,3490 ****
  1976. --- 3826,3832 ----
  1977.   ${TESTDIR}/cvsroot/first-dir/rgx\.c,v  <--  rgx\.c
  1978.   initial revision: 1\.1
  1979.   done"
  1980. +       sleep ${FILESYSTEM_TICK}
  1981.         cat >rgx.c <<EOF
  1982.   test_regex (whiz, bang)
  1983.   {
  1984. ***************
  1985. *** 3549,3561 ****
  1986. --- 3891,3906 ----
  1987.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  1988.   initial revision: 1\.1
  1989.   done"
  1990. +       sleep ${FILESYSTEM_TICK}
  1991.         sed -e 's/2/two/' file1 > f; mv f file1
  1992.         dotest rcslib-merge-6 "${testcvs} -q commit -m '' file1" \
  1993.   "Checking in file1;
  1994.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  1995.   new revision: 1\.2; previous revision: 1\.1
  1996.   done"
  1997. +       sleep ${FILESYSTEM_TICK}
  1998.         dotest rcslib-merge-7 "${testcvs} -q tag -b -r 1.1 patch1" "T file1"
  1999. +       sleep ${FILESYSTEM_TICK}
  2000.         dotest rcslib-merge-8 "${testcvs} -q update -r patch1" "[UP] file1"
  2001.         dotest rcslib-merge-9 "${testcvs} -q status" \
  2002.   "===================================================================
  2003. ***************
  2004. *** 3570,3575 ****
  2005. --- 3915,3921 ----
  2006.   '$''Revision: 1\.1 $
  2007.   2
  2008.   3'
  2009. +       sleep ${FILESYSTEM_TICK}
  2010.         sed -e 's/3/three/' file1 > f; mv f file1
  2011.         dotest rcslib-merge-11 "${testcvs} -q commit -m '' file1" \
  2012.   "Checking in file1;
  2013. ***************
  2014. *** 3594,3609 ****
  2015.   3
  2016.   [>]>>>>>> 1\.2"
  2017.   
  2018. !       # Test behavior of symlinks in the repository.
  2019. !       dotest rcslib-symlink-1 "ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v"
  2020. !       dotest rcslib-symlink-2 "${testcvs} update file2" "U file2"
  2021. !       echo "This is a change" >> file2
  2022. !       dotest rcslib-symlink-3 "${testcvs} ci -m because file2" \
  2023.   "Checking in file2;
  2024.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file2
  2025.   new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
  2026.   done"
  2027. !       dotest rcslib-symlink-4 "test -L ${CVSROOT_DIRNAME}/first-dir/file2,v"
  2028.   
  2029.         cd ..
  2030.   
  2031. --- 3940,3959 ----
  2032.   3
  2033.   [>]>>>>>> 1\.2"
  2034.   
  2035. !       if test x"${WONT_PRESERVE_PERMISSIONS}" = x; then
  2036. !         # Test behavior of symlinks in the repository.
  2037. !         dotest rcslib-symlink-1 "ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v"
  2038. !         dotest rcslib-symlink-2 "${testcvs} update file2" "U file2"
  2039. !         echo "This is a change" >> file2
  2040. !         dotest rcslib-symlink-3 "${testcvs} ci -m because file2" \
  2041.   "Checking in file2;
  2042.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file2
  2043.   new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1
  2044.   done"
  2045. !         dotest rcslib-symlink-4 "test -L ${CVSROOT_DIRNAME}/first-dir/file2,v"
  2046. !       else
  2047. !         echo "Won't run rcslib-symlink-* tests - WONT_PRESERVE_PERMISSIONS"
  2048. !       fi
  2049.   
  2050.         cd ..
  2051.   
  2052. ***************
  2053. *** 3634,3661 ****
  2054. --- 3984,4019 ----
  2055.   initial revision: 1.1
  2056.   done
  2057.   HERE
  2058. +       sleep ${FILESYSTEM_TICK}
  2059.         dotest multibranch-4 "${testcvs} tag -b br1" \
  2060.   "${PROG} [a-z]*: Tagging \.
  2061.   T file1"
  2062. +       sleep ${FILESYSTEM_TICK}
  2063.         dotest multibranch-5 "${testcvs} tag -b br2" \
  2064.   "${PROG} [a-z]*: Tagging \.
  2065.   T file1"
  2066. +       sleep ${FILESYSTEM_TICK}
  2067.         dotest multibranch-6 "${testcvs} -q update -r br1" ''
  2068. +       sleep ${FILESYSTEM_TICK}
  2069.         echo on-br1 >file1
  2070.         dotest multibranch-7 "${testcvs} -q ci -m modify-on-br1" \
  2071.   "Checking in file1;
  2072.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  2073.   new revision: 1\.1\.2\.1; previous revision: 1\.1
  2074.   done"
  2075. +       sleep ${FILESYSTEM_TICK}
  2076.         dotest multibranch-8 "${testcvs} -q update -r br2" '[UP] file1'
  2077. +       sleep ${FILESYSTEM_TICK}
  2078.         echo br2 adds a line >>file1
  2079.         dotest multibranch-9 "${testcvs} -q ci -m modify-on-br2" \
  2080.   "Checking in file1;
  2081.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  2082.   new revision: 1\.1\.4\.1; previous revision: 1\.1
  2083.   done"
  2084. +       sleep ${FILESYSTEM_TICK}
  2085.         dotest multibranch-10 "${testcvs} -q update -r br1" '[UP] file1'
  2086.         dotest multibranch-11 "cat file1" 'on-br1'
  2087. +       sleep ${FILESYSTEM_TICK}
  2088.         dotest multibranch-12 "${testcvs} -q update -r br2" '[UP] file1'
  2089.         dotest multibranch-13 "cat file1" '1:trunk-1
  2090.   br2 adds a line'
  2091. ***************
  2092. *** 3772,3777 ****
  2093. --- 4130,4136 ----
  2094.           fi
  2095.   
  2096.           # change
  2097. +         sleep ${FILESYSTEM_TICK}
  2098.           echo local-change >> imported-f2
  2099.   
  2100.           # commit
  2101. ***************
  2102. *** 3789,3794 ****
  2103. --- 4148,4154 ----
  2104.           fi
  2105.   
  2106.           # update into the vendor branch.
  2107. +         sleep ${FILESYSTEM_TICK}
  2108.           if ${CVS} update -rvendor-branch  ; then
  2109.               pass 102
  2110.           else
  2111. ***************
  2112. *** 3820,3825 ****
  2113. --- 4180,4186 ----
  2114.   
  2115.           # second import - file4 deliberately unchanged
  2116.           cd ../import-dir
  2117. +         sleep ${FILESYSTEM_TICK}
  2118.           for i in 1 2 3 ; do
  2119.               echo rev 2 of file $i >> imported-f"$i"
  2120.           done
  2121. ***************
  2122. *** 3862,3867 ****
  2123. --- 4223,4229 ----
  2124.           done
  2125.   
  2126.           # check vendor branch for file4
  2127. +         sleep ${FILESYSTEM_TICK}
  2128.           if ${CVS} update -rvendor-branch  ; then
  2129.               pass 110
  2130.           else
  2131. ***************
  2132. *** 4077,4083 ****
  2133.           # 1.9 did not).
  2134.           dotest_fail importc-7 "${testcvs} -q ci -m modify -r wip_test" \
  2135.   "${PROG} [a-z]*: in directory adir/sub1/ssdir:
  2136. ! ${PROG} \[[a-z]* aborted\]: there is no version here; do .cvs checkout. first"
  2137.           # The workaround is to leave off the "-r wip_test".
  2138.           dotest importc-8 "${testcvs} -q ci -m modify" \
  2139.   "Checking in cdir/cfile;
  2140. --- 4439,4445 ----
  2141.           # 1.9 did not).
  2142.           dotest_fail importc-7 "${testcvs} -q ci -m modify -r wip_test" \
  2143.   "${PROG} [a-z]*: in directory adir/sub1/ssdir:
  2144. ! ${PROG} \[[a-z]* aborted\]: there is no version here; do .${PROG} checkout. first"
  2145.           # The workaround is to leave off the "-r wip_test".
  2146.           dotest importc-8 "${testcvs} -q ci -m modify" \
  2147.   "Checking in cdir/cfile;
  2148. ***************
  2149. *** 4214,4219 ****
  2150. --- 4576,4582 ----
  2151.   done"
  2152.   
  2153.         # Make a branch.
  2154. +       sleep ${FILESYSTEM_TICK}
  2155.         dotest join-4 "${testcvs} -q tag -b branch ." \
  2156.   'T file3
  2157.   T file4
  2158. ***************
  2159. *** 4222,4227 ****
  2160. --- 4585,4591 ----
  2161.   
  2162.         # Add file2 and file7, modify file4, and remove file6 and file8.
  2163.         echo 'first revision of file2' > file2
  2164. +       sleep ${FILESYSTEM_TICK}
  2165.         echo 'second revision of file4' > file4
  2166.         echo 'first revision of file7' > file7
  2167.         rm file6 file8
  2168. ***************
  2169. *** 4273,4278 ****
  2170. --- 4637,4643 ----
  2171.   
  2172.         # Modify the files on the branch, so that T1 is not an
  2173.         # ancestor of the main line, and add file5
  2174. +       sleep ${FILESYSTEM_TICK}
  2175.         echo 'first branch revision of file3' > file3
  2176.         echo 'first branch revision of file4' > file4
  2177.         echo 'first branch revision of file6' > file6
  2178. ***************
  2179. *** 4440,4445 ****
  2180. --- 4805,4811 ----
  2181.         # single revision.
  2182.         # The file2 handling is a bug; see above join-20.
  2183.         cd first-dir
  2184. +       sleep ${FILESYSTEM_TICK}
  2185.         echo 'third revision of file4' > file4
  2186.         dotest join-23 "${testcvs} -q update -jbranch ." \
  2187.   "U file1
  2188. ***************
  2189. *** 4470,4480 ****
  2190. --- 4836,4848 ----
  2191.   U first-dir/file4
  2192.   U first-dir/file7'
  2193.         cd first-dir
  2194. +       sleep ${FILESYSTEM_TICK}
  2195.         dotest join-26 "${testcvs} -q tag -b br2" \
  2196.   "T file2
  2197.   T file3
  2198.   T file4
  2199.   T file7"
  2200. +       sleep ${FILESYSTEM_TICK}
  2201.         dotest join-27 "${testcvs} -q update -r br2" ""
  2202.         # The handling of file8 here looks fishy to me.  I don't see
  2203.         # why it should be different from the case where we merge to
  2204. ***************
  2205. *** 4523,4530 ****
  2206. --- 4891,4901 ----
  2207.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  2208.   initial revision: 1\.1
  2209.   done"
  2210. +       sleep ${FILESYSTEM_TICK}
  2211.         dotest join2-5 "${testcvs} -q tag -b br1" "T file1"
  2212. +       sleep ${FILESYSTEM_TICK}
  2213.         dotest join2-6 "${testcvs} -q update -r br1" ""
  2214. +       sleep ${FILESYSTEM_TICK}
  2215.         echo 'modify on branch' >>file1
  2216.         touch bradd
  2217.         dotest join2-6a "${testcvs} add bradd" \
  2218. ***************
  2219. *** 4584,4589 ****
  2220. --- 4955,4961 ----
  2221.         # OK, the above is all well and good and has worked for some
  2222.         # time.  Now try the case where the file had been added on
  2223.         # the branch.
  2224. +       sleep ${FILESYSTEM_TICK}
  2225.         dotest join2-16 "${testcvs} -q update -r br1" "[UP] file1"
  2226.         # The workaround is to update the whole directory.
  2227.         # The non-circumvented version won't work.  The reason is that
  2228. ***************
  2229. *** 4641,4647 ****
  2230. --- 5013,5021 ----
  2231.   initial revision: 1\.1
  2232.   done"
  2233.         dotest join3-5 "${testcvs} -q tag -b br1" "T file1"
  2234. +       sleep ${FILESYSTEM_TICK}
  2235.         dotest join3-6 "${testcvs} -q update -r br1" ""
  2236. +       sleep ${FILESYSTEM_TICK}
  2237.         echo 'br1:line1' >>file1
  2238.         dotest join3-7 "${testcvs} -q ci -m modify" \
  2239.   "Checking in file1;
  2240. ***************
  2241. *** 4652,4662 ****
  2242. --- 5026,5039 ----
  2243.         # Now back to the trunk for:
  2244.         # another revision and another branch for file1.
  2245.         # add file2, which will exist on trunk and br2 but not br1.
  2246. +       sleep ${FILESYSTEM_TICK}
  2247.         dotest join3-8 "${testcvs} -q update -A" "[UP] file1"
  2248. +       sleep ${FILESYSTEM_TICK}
  2249.         echo 'trunk:line1' > file2
  2250.         dotest join3-8a "${testcvs} add file2" \
  2251.   "${PROG} [a-z]*: scheduling file .file2. for addition
  2252.   ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
  2253. +       sleep ${FILESYSTEM_TICK}
  2254.         echo 'trunk:line1' >>file1
  2255.         dotest join3-9 "${testcvs} -q ci -m modify" \
  2256.   "Checking in file1;
  2257. ***************
  2258. *** 4669,4678 ****
  2259. --- 5046,5057 ----
  2260.   ${TESTDIR}/cvsroot/first-dir/file2,v  <--  file2
  2261.   initial revision: 1\.1
  2262.   done"
  2263. +       sleep ${FILESYSTEM_TICK}
  2264.         dotest join3-10 "${testcvs} -q tag -b br2" "T file1
  2265.   T file2"
  2266.   
  2267.         # Before we actually have any revision on br2, let's try a join
  2268. +       sleep ${FILESYSTEM_TICK}
  2269.         dotest join3-11 "${testcvs} -q update -r br1" "[UP] file1
  2270.   ${PROG} [a-z]*: file2 is no longer in the repository"
  2271.         dotest join3-12 "${testcvs} -q update -j br2" \
  2272. ***************
  2273. *** 4692,4700 ****
  2274. --- 5071,5081 ----
  2275.         rm file1
  2276.   
  2277.         # OK, we'll try the same thing with a revision on br2.
  2278. +       sleep ${FILESYSTEM_TICK}
  2279.         dotest join3-14 "${testcvs} -q update -r br2 file1" \
  2280.   "${PROG} [a-z]*: warning: file1 was lost
  2281.   U file1" "U file1"
  2282. +       sleep ${FILESYSTEM_TICK}
  2283.         echo 'br2:line1' >>file1
  2284.         dotest join3-15 "${testcvs} -q ci -m modify file1" \
  2285.   "Checking in file1;
  2286. ***************
  2287. *** 4703,4708 ****
  2288. --- 5084,5090 ----
  2289.   done"
  2290.   
  2291.         # OK, now we can join br2 to br1
  2292. +       sleep ${FILESYSTEM_TICK} 
  2293.         dotest join3-16 "${testcvs} -q update -r br1 file1" "[UP] file1"
  2294.         # It may seem odd, to merge a higher branch into a lower
  2295.         # branch, but in fact CVS defines the ancestor as 1.1
  2296. ***************
  2297. *** 4772,4777 ****
  2298. --- 5154,5160 ----
  2299.               pass 122
  2300.           fi
  2301.   
  2302. +         sleep ${FILESYSTEM_TICK}
  2303.           if ${CVS} update -rHEAD 2>&1 | grep longer ; then
  2304.               fail 123
  2305.           else
  2306. ***************
  2307. *** 4807,4812 ****
  2308. --- 5190,5196 ----
  2309.   done"
  2310.   
  2311.         # Make a branch.
  2312. +       sleep ${FILESYSTEM_TICK}
  2313.         dotest newb-123d "${testcvs} -q tag -b branch" "T a"
  2314.   
  2315.         # Check out the branch.
  2316. ***************
  2317. *** 4911,4917 ****
  2318.   "${PROG} [a-z]*: Updating first-dir
  2319.   ===================================================================
  2320.   Checking out first-dir/a
  2321. ! RCS:  ${TMPPWD}/cvsroot/first-dir/a,v
  2322.   VERS: 1\.1
  2323.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
  2324.           if ${CVS} co first-dir ; then
  2325. --- 5295,5301 ----
  2326.   "${PROG} [a-z]*: Updating first-dir
  2327.   ===================================================================
  2328.   Checking out first-dir/a
  2329. ! RCS:  ${TMPPWD}${SLASH}cvsroot${SLASH}first-dir${SLASH}a,v
  2330.   VERS: 1\.1
  2331.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
  2332.           if ${CVS} co first-dir ; then
  2333. ***************
  2334. *** 4927,4932 ****
  2335. --- 5311,5317 ----
  2336.           fi
  2337.   
  2338.           cd ../../1/first-dir
  2339. +         sleep ${FILESYSTEM_TICK}
  2340.           echo add a line >>a
  2341.           mkdir dir1
  2342.           dotest conflicts-127b "${testcvs} add dir1" \
  2343. ***************
  2344. *** 4948,4954 ****
  2345.   "${PROG} [a-z]*: Updating first-dir
  2346.   ===================================================================
  2347.   Checking out first-dir/a
  2348. ! RCS:  ${TMPPWD}/cvsroot/first-dir/a,v
  2349.   VERS: 1\.2
  2350.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  2351.   add a line"
  2352. --- 5333,5339 ----
  2353.   "${PROG} [a-z]*: Updating first-dir
  2354.   ===================================================================
  2355.   Checking out first-dir/a
  2356. ! RCS:  ${TMPPWD}${SLASH}cvsroot${SLASH}first-dir${SLASH}a,v
  2357.   VERS: 1\.2
  2358.   \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
  2359.   add a line"
  2360. ***************
  2361. *** 4958,4963 ****
  2362. --- 5343,5349 ----
  2363.           # Now go over the to the other working directory and
  2364.           # start testing conflicts
  2365.           cd 2/first-dir
  2366. +         sleep ${FILESYSTEM_TICK}
  2367.           echo add a conflicting line >>a
  2368.           dotest_fail conflicts-129 "${testcvs} -q ci -m changed" \
  2369.   "${PROG}"' [a-z]*: Up-to-date check failed for `a'\''
  2370. ***************
  2371. *** 5007,5012 ****
  2372. --- 5393,5399 ----
  2373.   "${PROG} [a-z]*: file .a. had a conflict and has not been modified
  2374.   ${PROG} \[[a-z]* aborted\]: correct above errors first!"
  2375.   
  2376. +         sleep ${FILESYSTEM_TICK}
  2377.           echo lame attempt at resolving it >>a
  2378.           # Try to check in the file with the conflict markers in it.
  2379.           dotest conflicts-status-2 "${testcvs} status a" \
  2380. ***************
  2381. *** 5027,5032 ****
  2382. --- 5414,5420 ----
  2383.   
  2384.           # OK, the user saw the warning (good user), and now
  2385.           # resolves it for real.
  2386. +         sleep ${FILESYSTEM_TICK}
  2387.           echo resolve conflict >a
  2388.           dotest conflicts-status-3 "${testcvs} status a" \
  2389.   "===================================================================
  2390. ***************
  2391. *** 5494,5499 ****
  2392. --- 5882,5888 ----
  2393.   U CVSROOT/rcsinfo
  2394.   U CVSROOT/taginfo
  2395.   U CVSROOT/verifymsg'
  2396. +       sleep ${FILESYSTEM_TICK}
  2397.         echo "# made a change" >>CVSROOT/modules
  2398.         dotest modules-1d "${testcvs} -q ci -m add-modules" \
  2399.   "Checking in CVSROOT/modules;
  2400. ***************
  2401. *** 5518,5523 ****
  2402. --- 5907,5913 ----
  2403.   U CVSROOT/rcsinfo
  2404.   U CVSROOT/taginfo
  2405.   U CVSROOT/verifymsg'
  2406. +       sleep ${FILESYSTEM_TICK}
  2407.         echo "# made a change" >>CVSROOT/modules
  2408.         dotest modules-2d "${testcvs} -q ci -m add-modules" \
  2409.   "Checking in CVSROOT/modules;
  2410. ***************
  2411. *** 5545,5550 ****
  2412. --- 5935,5941 ----
  2413.   U CVSROOT/rcsinfo
  2414.   U CVSROOT/taginfo
  2415.   U CVSROOT/verifymsg'
  2416. +       sleep ${FILESYSTEM_TICK}
  2417.         echo "# made a change" >>CVSROOT/modules
  2418.         dotest modules-3g "${testcvs} -q ci -m add-modules" \
  2419.   "Checking in CVSROOT/modules;
  2420. ***************
  2421. *** 5610,5615 ****
  2422. --- 6001,6007 ----
  2423.             fail 147
  2424.         fi
  2425.   
  2426. +       sleep ${FILESYSTEM_TICK}
  2427.         echo realmodule first-dir/subdir a >CVSROOT/modules
  2428.         echo dirmodule first-dir/subdir >>CVSROOT/modules
  2429.         echo namedmodule -d nameddir first-dir/subdir >>CVSROOT/modules
  2430. ***************
  2431. *** 5736,5741 ****
  2432. --- 6128,6134 ----
  2433.         else
  2434.           fail 150h2
  2435.         fi
  2436. +       sleep ${FILESYSTEM_TICK}
  2437.         echo add line >>nameddir/a
  2438.         dotest 150h3 "${testcvs} -q co namedmodule" 'M nameddir/a'
  2439.         rm nameddir/a
  2440. ***************
  2441. *** 5758,5763 ****
  2442. --- 6151,6157 ----
  2443.         else
  2444.             pass 152
  2445.         fi
  2446. +       sleep ${FILESYSTEM_TICK}
  2447.         echo abc >>first-dir/subdir/a
  2448.         if (${testcvs} -q co aliasmodule | tee test153.tmp) \
  2449.             >>${LOGFILE}; then
  2450. ***************
  2451. *** 5888,5893 ****
  2452. --- 6282,6288 ----
  2453.         dotest modules2-1 "${testcvs} -q co CVSROOT/modules" \
  2454.   'U CVSROOT/modules'
  2455.         cd CVSROOT
  2456. +       sleep ${FILESYSTEM_TICK}
  2457.         echo 'ampermodule &first-dir &second-dir' > modules
  2458.         echo 'combmodule third-dir file3 &first-dir' >> modules
  2459.         # Depending on whether the user also ran the modules test
  2460. ***************
  2461. *** 6020,6025 ****
  2462. --- 6415,6421 ----
  2463.         dotest modules2-a0.5 "${testcvs} -q co CVSROOT/modules" \
  2464.   'U CVSROOT/modules'
  2465.         cd CVSROOT
  2466. +       sleep ${FILESYSTEM_TICK}
  2467.         echo 'aliasopt -a -d onedir first-dir' >modules
  2468.         dotest modules2-a0 "${testcvs} -q ci -m add-modules" \
  2469.   "Checking in modules;
  2470. ***************
  2471. *** 6071,6076 ****
  2472. --- 6467,6473 ----
  2473.         dotest modules3-4 "${testcvs} -q update -d CVSROOT" \
  2474.   "U CVSROOT${DOTSTAR}"
  2475.         cd CVSROOT
  2476. +       sleep ${FILESYSTEM_TICK}
  2477.         cat >modules <<EOF
  2478.   mod1 -a first-dir/file1
  2479.   bigmod -a mod1 first-dir/file1
  2480. ***************
  2481. *** 6261,6266 ****
  2482. --- 6658,6664 ----
  2483.         dotest modules4-7 "${testcvs} -q update -d CVSROOT" \
  2484.   "U CVSROOT${DOTSTAR}"
  2485.         cd CVSROOT
  2486. +       sleep ${FILESYSTEM_TICK}
  2487.         cat >modules <<EOF
  2488.   all -a first-dir
  2489.   some -a !first-dir/subdir first-dir
  2490. ***************
  2491. *** 7775,7780 ****
  2492. --- 8173,8179 ----
  2493.         mkdir 1; cd 1
  2494.         dotest emptydir-1 "${testcvs} co CVSROOT/modules" \
  2495.   "U CVSROOT/modules"
  2496. +       sleep ${FILESYSTEM_TICK}
  2497.         echo "# Module defs for emptydir tests" > CVSROOT/modules
  2498.         echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT/modules
  2499.   
  2500. ***************
  2501. *** 7979,7984 ****
  2502. --- 8378,8384 ----
  2503.         rm -rf ${TESTDIR}/1
  2504.   
  2505.   
  2506. +     if test x"${CANT_PROTECT_DIRS}" = x; then
  2507.         # Now try someplace where we don't have permission.
  2508.         mkdir ${TESTDIR}/barf
  2509.         chmod -w ${TESTDIR}/barf
  2510. ***************
  2511. *** 7992,7997 ****
  2512. --- 8392,8400 ----
  2513.         chmod +w ${TESTDIR}/barf
  2514.         rmdir ${TESTDIR}/barf
  2515.         # Done.  Nothing to clean up.
  2516. +     else
  2517. +       echo "didn't run abspath-4 - CANT_PROTECT_DIRS"
  2518. +     fi
  2519.   
  2520.   
  2521.         # Try checking out two modules into the same directory.
  2522. ***************
  2523. *** 8083,8089 ****
  2524.         rm -r 1 2 3
  2525.   
  2526.         #
  2527. !       # FIXME: do other functions here (e.g. update /tmp/foo)
  2528.         #
  2529.   
  2530.         # Finished with all tests.  Remove the module.
  2531. --- 8486,8492 ----
  2532.         rm -r 1 2 3
  2533.   
  2534.         #
  2535. !       # FIXME: do other functions here (e.g. update ${TMPDIR}/foo)
  2536.         #
  2537.   
  2538.         # Finished with all tests.  Remove the module.
  2539. ***************
  2540. *** 8193,8198 ****
  2541. --- 8596,8602 ----
  2542.         dotest toplevel-11 "${testcvs} -q update -d second-dir" \
  2543.   "U second-dir/file2"
  2544.   
  2545. +     if test x"${CANT_PROTECT_DIRS}" = x; then
  2546.         # Now remove the CVS directory (people may do this manually,
  2547.         # especially if they formed their habits with CVS
  2548.         # 1.9 and older, which didn't create it.  Or perhaps the working
  2549. ***************
  2550. *** 8211,8216 ****
  2551. --- 8615,8623 ----
  2552.   ${PROG} [a-z]*: Updating top-dir"
  2553.   
  2554.         chmod +w ../1
  2555. +     else
  2556. +       echo "didn't run toplevel-12 - CANT_PROTECT_DIRS"
  2557. +     fi
  2558.   
  2559.         dotest toplevel-cleanup-1 "${testcvs} -q co CVSROOT/config" \
  2560.   "U CVSROOT/config"
  2561. ***************
  2562. *** 8387,8399 ****
  2563.         # can see the "CVS:" lines.
  2564.         cat >${TESTDIR}/editme <<EOF
  2565.   #!${TESTSHELL}
  2566. ! sleep 1
  2567. ! sed <\$1 -e 's/^/x/' >${TESTDIR}/edit.new
  2568. ! mv ${TESTDIR}/edit.new \$1
  2569.   exit 0
  2570.   EOF
  2571.         chmod +x ${TESTDIR}/editme
  2572.   
  2573.         mkdir 1; cd 1
  2574.         dotest editor-1 "${testcvs} -q co -l ." ''
  2575.         mkdir first-dir
  2576. --- 8794,8865 ----
  2577.         # can see the "CVS:" lines.
  2578.         cat >${TESTDIR}/editme <<EOF
  2579.   #!${TESTSHELL}
  2580. ! sleep 2
  2581. ! sed <\$1 -e 's/^/x&/g' >${TESTDIR}/edit.new
  2582. ! rm \$1
  2583. ! sleep 2
  2584. ! cp ${TESTDIR}/edit.new \$1
  2585. ! rm ${TESTDIR}/edit.new
  2586.   exit 0
  2587.   EOF
  2588. + # /* edhack.c */
  2589. + # #include <stdio.h>
  2590. + # #include <stdlib.h>
  2591. + # 
  2592. + # int main( int argc, const char * argv[] )
  2593. + # {
  2594. + #    static char editor[1024];
  2595. + #    const char * testdir;
  2596. + #    const char * testshell;
  2597. + #    int argi;
  2598. + # 
  2599. + #    int iRc = system( NULL );
  2600. + #    if (0 == iRc)
  2601. + #       {
  2602. + #       printf("Can't find a command processor to run system()\n");
  2603. + #       return 1;
  2604. + #       }
  2605. + # 
  2606. + #    testshell = getenv( "TESTSHELL" );
  2607. + #    if (testshell)
  2608. + #       {
  2609. + #       strcpy( editor, testshell );
  2610. + #       }
  2611. + #    else
  2612. + #       {
  2613. + #       strcpy( editor, "sh" );
  2614. + #       }
  2615. + #    strcat( editor, " ");
  2616. + # 
  2617. + #    testdir = getenv( "TESTDIR" );
  2618. + #    if (testdir)
  2619. + #       {
  2620. + #       strcat( editor, testdir );
  2621. + #       strcat( editor, "/" );
  2622. + #       }
  2623. + #    strcat( editor, "editme" );
  2624. + #    
  2625. + #    for (argi = 1; argi < argc; ++argi)
  2626. + #       {
  2627. + #       strcat(editor," ");
  2628. + #       strcat(editor, argv[argi] );
  2629. + #       }
  2630. + #    
  2631. + # /*   printf("about to run:\"%s\"\n", editor); */
  2632. + #    iRc = system( editor );
  2633. + #    return iRc;
  2634. + # }
  2635.         chmod +x ${TESTDIR}/editme
  2636.   
  2637. +       if test x"${EDHACK_EDITOR}" = x; then
  2638. +         EDITME_DO=${TESTDIR}/editme
  2639. +       else
  2640. +         EDITME_DO=edhack
  2641. +         export TESTDIR
  2642. +       fi
  2643.         mkdir 1; cd 1
  2644.         dotest editor-1 "${testcvs} -q co -l ." ''
  2645.         mkdir first-dir
  2646. ***************
  2647. *** 8405,8411 ****
  2648.   "${PROG} [a-z]*: scheduling file .file1. for addition
  2649.   ${PROG} [a-z]*: scheduling file .file2. for addition
  2650.   ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
  2651. !       dotest editor-4 "${testcvs} -e ${TESTDIR}/editme -q ci" \
  2652.   "RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
  2653.   done
  2654.   Checking in file1;
  2655. --- 8871,8877 ----
  2656.   "${PROG} [a-z]*: scheduling file .file1. for addition
  2657.   ${PROG} [a-z]*: scheduling file .file2. for addition
  2658.   ${PROG} [a-z]*: use .${PROG} commit. to add these files permanently"
  2659. !       dotest editor-4 "${testcvs} -e ${EDITME_DO} -q ci" \
  2660.   "RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v
  2661.   done
  2662.   Checking in file1;
  2663. ***************
  2664. *** 8418,8428 ****
  2665.   ${TESTDIR}/cvsroot/first-dir/file2,v  <--  file2
  2666.   initial revision: 1\.1
  2667.   done"
  2668.         dotest editor-5 "${testcvs} -q tag -b br" "T file1
  2669.   T file2"
  2670.         dotest editor-6 "${testcvs} -q update -r br" ''
  2671.         echo modify >>file1
  2672. !       dotest editor-7 "${testcvs} -e ${TESTDIR}/editme -q ci" \
  2673.   "Checking in file1;
  2674.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  2675.   new revision: 1\.1\.2\.1; previous revision: 1\.1
  2676. --- 8884,8897 ----
  2677.   ${TESTDIR}/cvsroot/first-dir/file2,v  <--  file2
  2678.   initial revision: 1\.1
  2679.   done"
  2680. +       sleep ${FILESYSTEM_TICK}
  2681.         dotest editor-5 "${testcvs} -q tag -b br" "T file1
  2682.   T file2"
  2683. +       sleep ${FILESYSTEM_TICK}
  2684.         dotest editor-6 "${testcvs} -q update -r br" ''
  2685. +       sleep ${FILESYSTEM_TICK}
  2686.         echo modify >>file1
  2687. !       dotest editor-7 "${testcvs} -e ${EDITME_DO} -q ci" \
  2688.   "Checking in file1;
  2689.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  2690.   new revision: 1\.1\.2\.1; previous revision: 1\.1
  2691. ***************
  2692. *** 8433,8440 ****
  2693.         # already on the branch.  If there were a revision on the branch,
  2694.         # CVS would correctly give an up-to-date check failed.
  2695.         dotest editor-8 "${testcvs} -q update -A" "U file1"
  2696.         echo add a line >>file2
  2697. !       dotest editor-9 "${testcvs} -q -e ${TESTDIR}/editme ci -rbr file2" \
  2698.   "Checking in file2;
  2699.   ${TESTDIR}/cvsroot/first-dir/file2,v  <--  file2
  2700.   new revision: 1\.1\.2\.1; previous revision: 1\.1
  2701. --- 8902,8910 ----
  2702.         # already on the branch.  If there were a revision on the branch,
  2703.         # CVS would correctly give an up-to-date check failed.
  2704.         dotest editor-8 "${testcvs} -q update -A" "U file1"
  2705. +       sleep ${FILESYSTEM_TICK}
  2706.         echo add a line >>file2
  2707. !       dotest editor-9 "${testcvs} -q -e ${EDITME_DO} ci -rbr file2" \
  2708.   "Checking in file2;
  2709.   ${TESTDIR}/cvsroot/first-dir/file2,v  <--  file2
  2710.   new revision: 1\.1\.2\.1; previous revision: 1\.1
  2711. ***************
  2712. *** 8601,8606 ****
  2713. --- 9071,9077 ----
  2714.         fi
  2715.   
  2716.         cd ../../2/1dir
  2717. +     if test x"${CANT_PROTECT_DIRS}" = x; then
  2718.         # FIXME: should be using dotest.
  2719.         ${testcvs} -q update 2>../tst167.err
  2720.         cat ../tst167.err >>${LOGFILE}
  2721. ***************
  2722. *** 8615,8620 ****
  2723. --- 9086,9094 ----
  2724.         else
  2725.             fail 168
  2726.         fi
  2727. +     else
  2728. +       echo "didn't run 168 (errmsg1) - CANT_PROTECT_DIRS"
  2729. +     fi
  2730.   
  2731.         cd ..
  2732.         chmod u+w 1dir
  2733. ***************
  2734. *** 8818,8823 ****
  2735. --- 9292,9298 ----
  2736.             pass 178a
  2737.         fi
  2738.   
  2739. +       sleep ${FILESYSTEM_TICK}
  2740.         if ${testcvs} edit abb; then
  2741.             pass 179
  2742.         else
  2743. ***************
  2744. *** 8836,8841 ****
  2745. --- 9311,9317 ----
  2746.             fail 181
  2747.         fi
  2748.   
  2749. +       sleep ${FILESYSTEM_TICK}
  2750.         echo aaaa >>abb
  2751.         if ${testcvs} ci -m modify abb >>${LOGFILE} 2>&1; then
  2752.             pass 182
  2753. ***************
  2754. *** 8857,8868 ****
  2755.             pass 184
  2756.         fi
  2757.   
  2758. !       if test -w abb; then
  2759. !           fail 185
  2760.         else
  2761. !           pass 185
  2762.         fi
  2763.   
  2764.         if ${testcvs} edit abc; then
  2765.             pass 186a1
  2766.         else
  2767. --- 9333,9347 ----
  2768.             pass 184
  2769.         fi
  2770.   
  2771. !       if test "x${OS_COMPILER_EMU}" = xwin32_msvc_cygwin32; then
  2772. !           echo 'devcom: (cygwin32 b19.1 test -w strange) - using attrib'
  2773. !           dotest 185 "attrib abb"  "A    R ${DOTSTAR}"
  2774.         else
  2775. !           dotest_fail 185 "test -w abb" ''
  2776.         fi
  2777.   
  2778.         if ${testcvs} edit abc; then
  2779.             pass 186a1
  2780.         else
  2781. ***************
  2782. *** 8879,8884 ****
  2783. --- 9358,9364 ----
  2784.         else
  2785.             fail 186a3
  2786.         fi
  2787. +       sleep ${FILESYSTEM_TICK}
  2788.         echo changedabc >abc
  2789.         # Try to unedit a modified file; cvs should ask for confirmation
  2790.         if (echo no | ${testcvs} unedit abc) >>${LOGFILE}; then
  2791. ***************
  2792. *** 8975,8982 ****
  2793.         cd 3
  2794.         dotest devcom-some1 "${testcvs} -q co first-dir" 'U first-dir/abb
  2795.   U first-dir/abc'
  2796. !       dotest devcom-some2 "test -w first-dir/abb" ''
  2797. !       dotest_fail devcom-some3 "test -w first-dir/abc" ''
  2798.         cd ..
  2799.   
  2800.         if test "$keep" = yes; then
  2801. --- 9455,9468 ----
  2802.         cd 3
  2803.         dotest devcom-some1 "${testcvs} -q co first-dir" 'U first-dir/abb
  2804.   U first-dir/abc'
  2805. !       if test "x${OS_COMPILER_EMU}" = xwin32_msvc_cygwin32; then
  2806. !         echo 'devcom: cygwin32 b19.1 test -w is very weird - using attrib instead'
  2807. !         dotest devcom-some2 "attrib first-dir\\abb" "A      ${DOTSTAR}"
  2808. !         dotest devcom-some2 "attrib first-dir\\abc" "A    R ${DOTSTAR}"
  2809. !       else
  2810. !         dotest devcom-some2 "test -w first-dir/abb" ''
  2811. !         dotest_fail devcom-some3 "test -w first-dir/abc" ''
  2812. !       fi
  2813.         cd ..
  2814.   
  2815.         if test "$keep" = yes; then
  2816. ***************
  2817. *** 9031,9040 ****
  2818.   U first-dir/w1
  2819.   U first-dir/w2
  2820.   U first-dir/w3'
  2821. !       dotest devcom2-8 "test -w first-dir/nw1" ''
  2822. !       dotest_fail devcom2-9 "test -w first-dir/w1" ''
  2823. !       dotest_fail devcom2-10 "test -w first-dir/w2" ''
  2824. !       dotest_fail devcom2-11 "test -w first-dir/w3" ''
  2825.   
  2826.         cd first-dir
  2827.         # OK, now we want to try files in various states with cvs edit.
  2828. --- 9517,9534 ----
  2829.   U first-dir/w1
  2830.   U first-dir/w2
  2831.   U first-dir/w3'
  2832. !       if test "x${OS_COMPILER_EMU}" = xwin32_msvc_cygwin32; then
  2833. !         echo 'devcom2: cygwin32 b19.1 test -w is very weird - using attrib instead'
  2834. !         dotest devcom2-8 "attrib first-dir\\nw1" "A      ${DOTSTAR}"
  2835. !         dotest devcom2-9 "attrib first-dir\\w1" "A    R ${DOTSTAR}"
  2836. !         dotest devcom2-10 "attrib first-dir\\w2" "A    R ${DOTSTAR}"
  2837. !         dotest devcom2-11 "attrib first-dir\\w3" "A    R ${DOTSTAR}"
  2838. !       else
  2839. !         dotest devcom2-8 "test -w first-dir/nw1" ''
  2840. !         dotest_fail devcom2-9 "test -w first-dir/w1" ''
  2841. !         dotest_fail devcom2-10 "test -w first-dir/w2" ''
  2842. !         dotest_fail devcom2-11 "test -w first-dir/w3" ''
  2843. !       fi
  2844.   
  2845.         cd first-dir
  2846.         # OK, now we want to try files in various states with cvs edit.
  2847. ***************
  2848. *** 9175,9186 ****
  2849. --- 9669,9684 ----
  2850.         dotest_fail watch4-8 "test -w first-dir/file1" ''
  2851.         dotest_fail watch4-9 "test -w first-dir/subdir/sfile" ''
  2852.         cd first-dir
  2853. +       sleep ${FILESYSTEM_TICK}
  2854.         dotest watch4-10 "${testcvs} edit file1" ''
  2855. +       sleep ${FILESYSTEM_TICK}
  2856.         echo 'edited in 2' >file1
  2857.         cd ../..
  2858.   
  2859.         cd 1/first-dir
  2860. +       sleep ${FILESYSTEM_TICK}
  2861.         dotest watch4-11 "${testcvs} edit file1" ''
  2862. +       sleep ${FILESYSTEM_TICK}
  2863.         echo 'edited in 1' >file1
  2864.         dotest watch4-12 "${testcvs} -q ci -m edit-in-1" \
  2865.   "Checking in file1;
  2866. ***************
  2867. *** 9249,9256 ****
  2868.   
  2869.         # SunOS4.1.4 systems make it this far, but with a corrupted
  2870.         # CVS/Entries file.  Demonstrate the corruption!
  2871.         dotest unedit-without-baserev-5 "cat CVS/Entries" \
  2872. !         "/$file/1\.1\.1\.1/.*"
  2873.   
  2874.         if test "$remote" = yes; then
  2875.           dotest unedit-without-baserev-6 "${testcvs} -q update" "U m"
  2876. --- 9747,9756 ----
  2877.   
  2878.         # SunOS4.1.4 systems make it this far, but with a corrupted
  2879.         # CVS/Entries file.  Demonstrate the corruption!
  2880. +       # Note there will tend to be a second "D" line which the DOTSTAR
  2881. +       # matches.
  2882.         dotest unedit-without-baserev-5 "cat CVS/Entries" \
  2883. !         "/$file/1\.1\.1\.1/${DOTSTAR}"
  2884.   
  2885.         if test "$remote" = yes; then
  2886.           dotest unedit-without-baserev-6 "${testcvs} -q update" "U m"
  2887. ***************
  2888. *** 9483,9488 ****
  2889. --- 9983,9989 ----
  2890.           </dev/null >binfile.dat
  2891.         cat binfile.dat binfile.dat >binfile2.dat
  2892.         cd first-dir
  2893. +       sleep ${FILESYSTEM_TICK}
  2894.         cp ../binfile.dat binfile
  2895.         dotest binfiles-2 "${testcvs} add -kb binfile" \
  2896.   "${PROG}"' [a-z]*: scheduling file `binfile'\'' for addition
  2897. ***************
  2898. *** 9533,9538 ****
  2899. --- 10034,10040 ----
  2900.         rm -r 3
  2901.         cd 2/first-dir
  2902.   
  2903. +       sleep ${FILESYSTEM_TICK}
  2904.         cp ../../1/binfile2.dat binfile
  2905.         dotest binfiles-6 "${testcvs} -q ci -m modify-it" \
  2906.   "Checking in binfile;
  2907. ***************
  2908. *** 9544,9549 ****
  2909. --- 10046,10052 ----
  2910.         dotest binfiles-8 "cmp ../binfile2.dat binfile" ''
  2911.   
  2912.         # Now test handling of conflicts with binary files.
  2913. +       sleep ${FILESYSTEM_TICK}
  2914.         cp ../binfile.dat binfile
  2915.         dotest binfiles-con0 "${testcvs} -q ci -m modify-it" \
  2916.   "Checking in binfile;
  2917. ***************
  2918. *** 9551,9556 ****
  2919. --- 10054,10060 ----
  2920.   new revision: 1\.3; previous revision: 1\.2
  2921.   done"
  2922.         cd ../../2/first-dir
  2923. +       sleep ${FILESYSTEM_TICK}
  2924.         echo 'edits in dir 2' >binfile
  2925.         dotest binfiles-con1 "${testcvs} -q update" \
  2926.   "U binfile
  2927. ***************
  2928. *** 9561,9566 ****
  2929. --- 10065,10071 ----
  2930.         dotest binfiles-con2 "cmp binfile ../../1/binfile.dat" ''
  2931.         dotest binfiles-con3 "cat .#binfile.1.2" 'edits in dir 2'
  2932.   
  2933. +       sleep ${FILESYSTEM_TICK}
  2934.         cp ../../1/binfile2.dat binfile
  2935.         dotest binfiles-con4 "${testcvs} -q ci -m resolve-it" \
  2936.   "Checking in binfile;
  2937. ***************
  2938. *** 9597,9603 ****
  2939. --- 10102,10110 ----
  2940.         rm -r 3
  2941.   
  2942.         cd 2/first-dir
  2943. +       sleep ${FILESYSTEM_TICK}
  2944.         echo 'this file is $''RCSfile$' >binfile
  2945. +       lf_endlines binfile
  2946.         dotest binfiles-14a "${testcvs} -q ci -m modify-it" \
  2947.   "Checking in binfile;
  2948.   ${TESTDIR}/cvsroot/first-dir/binfile,v  <--  binfile
  2949. ***************
  2950. *** 9782,9795 ****
  2951. --- 10289,10305 ----
  2952.   ${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v  <--  brmod-wdmod
  2953.   initial revision: 1\.1
  2954.   done"
  2955. +       sleep ${FILESYSTEM_TICK}
  2956.         dotest binfiles2-2 "${testcvs} -q tag -b br" 'T brmod
  2957.   T brmod-trmod
  2958.   T brmod-wdmod'
  2959. +       sleep ${FILESYSTEM_TICK}
  2960.         dotest binfiles2-3 "${testcvs} -q update -r br" ''
  2961.         cp ../binfile binfile.dat
  2962.         dotest binfiles2-4 "${testcvs} add -kb binfile.dat" \
  2963.   "${PROG} [a-z]*: scheduling file .binfile\.dat. for addition on branch .br.
  2964.   ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
  2965. +       sleep ${FILESYSTEM_TICK}
  2966.         cp ../binfile2 brmod
  2967.         cp ../binfile2 brmod-trmod
  2968.         cp ../binfile2 brmod-wdmod
  2969. ***************
  2970. *** 9819,9830 ****
  2971. --- 10329,10342 ----
  2972.   [UP] brmod-wdmod"
  2973.         dotest_fail binfiles2-7 "test -f binfile.dat" ''
  2974.         dotest binfiles2-7-brmod "cmp ../binfile brmod"
  2975. +       sleep ${FILESYSTEM_TICK}
  2976.         cp ../binfile3 brmod-trmod
  2977.         dotest binfiles2-7a "${testcvs} -q ci -m tr-modify" \
  2978.   "Checking in brmod-trmod;
  2979.   ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v  <--  brmod-trmod
  2980.   new revision: 1\.2; previous revision: 1\.1
  2981.   done"
  2982. +       sleep ${FILESYSTEM_TICK}
  2983.         cp ../binfile3 brmod-wdmod
  2984.   
  2985.         dotest binfiles2-8 "${testcvs} -q update -j br" \
  2986. ***************
  2987. *** 9974,9984 ****
  2988. --- 10486,10499 ----
  2989.         # both.
  2990.         CVSWRAPPERS="* -m 'COPY'"
  2991.         export CVSWRAPPERS
  2992. +       sleep ${FILESYSTEM_TICK}
  2993.         dotest mcopy-2 "${testcvs} -q tag -b br" 'T \.cvswrappers
  2994.   T brmod
  2995.   T brmod-trmod
  2996.   T brmod-wdmod'
  2997. +       sleep ${FILESYSTEM_TICK}
  2998.         dotest mcopy-3 "${testcvs} -q update -r br" ''
  2999. +       sleep ${FILESYSTEM_TICK}
  3000.         echo 'modify brmod on br' >brmod
  3001.         echo 'modify brmod-trmod on br' >brmod-trmod
  3002.         echo 'modify brmod-wdmod on br' >brmod-wdmod
  3003. ***************
  3004. *** 9995,10000 ****
  3005. --- 10510,10516 ----
  3006.   ${TESTDIR}/cvsroot/first-dir/brmod-wdmod,v  <--  brmod-wdmod
  3007.   new revision: 1\.1\.2\.1; previous revision: 1\.1
  3008.   done"
  3009. +       sleep ${FILESYSTEM_TICK}
  3010.         dotest mcopy-6 "${testcvs} -q update -A" \
  3011.   "[UP] brmod
  3012.   [UP] brmod-trmod
  3013. ***************
  3014. *** 10004,10015 ****
  3015. --- 10520,10533 ----
  3016.   brmod-trmod initial contents
  3017.   brmod-wdmod initial contents"
  3018.   
  3019. +       sleep ${FILESYSTEM_TICK}
  3020.         echo 'modify brmod-trmod again on trunk' >brmod-trmod
  3021.         dotest mcopy-7a "${testcvs} -q ci -m tr-modify" \
  3022.   "Checking in brmod-trmod;
  3023.   ${TESTDIR}/cvsroot/first-dir/brmod-trmod,v  <--  brmod-trmod
  3024.   new revision: 1\.2; previous revision: 1\.1
  3025.   done"
  3026. +       sleep ${FILESYSTEM_TICK}
  3027.         echo 'modify brmod-wdmod in working dir' >brmod-wdmod
  3028.   
  3029.         dotest mcopy-8 "${testcvs} -q update -j br" \
  3030. ***************
  3031. *** 10250,10255 ****
  3032. --- 10768,10774 ----
  3033.             # This destroys anything currently in cvswrappers, but
  3034.         # presumably other tests will take care of it themselves if
  3035.         # they use cvswrappers:
  3036. +       sleep ${FILESYSTEM_TICK}
  3037.         echo "foo*.sb  -k 'b'" > cvswrappers
  3038.         dotest binwrap3-2 "${testcvs} -q ci -m cvswrappers-mod" \
  3039.   "Checking in cvswrappers;
  3040. ***************
  3041. *** 10409,10414 ****
  3042. --- 10928,10934 ----
  3043.   
  3044.         dotest mwrap-c1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
  3045.         cd CVSROOT
  3046. +       sleep ${FILESYSTEM_TICK}
  3047.         echo "* -m 'COPY'" >>cvswrappers
  3048.         dotest mwrap-c2 "${testcvs} -q ci -m wrapper-mod" \
  3049.   "Checking in cvswrappers;
  3050. ***************
  3051. *** 10438,10443 ****
  3052. --- 10958,10964 ----
  3053.         mkdir m2; cd m2
  3054.         dotest mwrap-5 "${testcvs} -q co first-dir" "U first-dir/aa"
  3055.         cd first-dir
  3056. +       sleep ${FILESYSTEM_TICK}
  3057.         echo "changed in m2" >aa
  3058.         dotest mwrap-6 "${testcvs} -q ci -m m2-mod" \
  3059.   "Checking in aa;
  3060. ***************
  3061. *** 10491,10504 ****
  3062.   
  3063.         dotest info-1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
  3064.         cd CVSROOT
  3065.         echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\"" > loginfo
  3066.             # The following cases test the format string substitution
  3067. !           echo "ALL echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
  3068. !           echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
  3069. !           echo "ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
  3070. !           echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
  3071. !           echo "first-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null" \
  3072. !             >> loginfo
  3073.   
  3074.         # Might be nice to move this to crerepos tests; it should
  3075.         # work to create a loginfo file if you didn't create one
  3076. --- 11012,11035 ----
  3077.   
  3078.         dotest info-1 "${testcvs} -q co CVSROOT" "[UP] CVSROOT${DOTSTAR}"
  3079.         cd CVSROOT
  3080. +       sleep ${FILESYSTEM_TICK}
  3081.         echo "ALL sh -c \"echo x\${=MYENV}\${=OTHER}y\${=ZEE}=\$USER=\$CVSROOT= >>$TESTDIR/testlog; cat >/dev/null\"" > loginfo
  3082.             # The following cases test the format string substitution
  3083. !        if test x"${CANT_RUN_SCRIPTS}" = x; then
  3084. !            echo "ALL echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
  3085. !            echo "ALL echo %{v} >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
  3086. !            echo "ALL echo %s >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
  3087. !            echo "ALL echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null" >> loginfo
  3088. !            echo "first-dir echo %sux >>$TESTDIR/testlog2; cat >/dev/null" \
  3089. !               >> loginfo
  3090. !       else
  3091. !         echo "ALL ${TESTSHELL} -c \"echo %{sVv} >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo
  3092. !         echo "ALL ${TESTSHELL} -c \"echo %{v} >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo
  3093. !         echo "ALL ${TESTSHELL} -c \"echo %s >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo
  3094. !         echo "ALL ${TESTSHELL} -c \"echo %{V}AX >>$TESTDIR/testlog2; cat >/dev/null\"" >> loginfo
  3095. !         echo "first-dir ${TESTSHELL} -c \"echo %sux >>$TESTDIR/testlog2; cat >/dev/null\"" \
  3096. !               >> loginfo
  3097. !       fi
  3098.   
  3099.         # Might be nice to move this to crerepos tests; it should
  3100.         # work to create a loginfo file if you didn't create one
  3101. ***************
  3102. *** 10531,10537 ****
  3103. --- 11062,11070 ----
  3104.   initial revision: 1\.1
  3105.   done
  3106.   ${PROG} [a-z]*: loginfo:1: no such user variable \${=ZEE}"
  3107. +       sleep ${FILESYSTEM_TICK}
  3108.         echo line1 >>file1
  3109. + #      dotest info-7 "${testcvs} -t -s OTHER=value -s ZEE=z ci -m mod-it" \
  3110.         dotest info-7 "${testcvs} -q -s OTHER=value -s ZEE=z ci -m mod-it" \
  3111.   "Checking in file1;
  3112.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  3113. ***************
  3114. *** 10539,10544 ****
  3115. --- 11072,11084 ----
  3116.   done"
  3117.         cd ..
  3118.         dotest info-9 "cat $TESTDIR/testlog" "xenv-valueyz=${username}=${TESTDIR}/cvsroot="
  3119. +       # Windows-NT, Microsoft Visual C++ 4.2 does badly on info-10
  3120. +       # for files that have %{sVv} substitutions.
  3121. +       # src/logmsg.c(logfile_write) puts apostrophe around strings,
  3122. +       # windows-NT/run.c(requote) changes these to quote.
  3123. +       # windows-NT/run.c(run_popen) passes these to CMD.EXE.
  3124. +       # 
  3125.             dotest info-10 "cat $TESTDIR/testlog2" 'first-dir file1,NONE,1.1
  3126.   first-dir 1.1
  3127.   first-dir file1
  3128. ***************
  3129. *** 10551,10556 ****
  3130. --- 11091,11097 ----
  3131.   first-dir file1ux'
  3132.   
  3133.         cd CVSROOT
  3134. +       sleep ${FILESYSTEM_TICK}
  3135.         echo '# do nothing' >loginfo
  3136.         dotest info-11 "${testcvs} -q -s ZEE=garbage ci -m nuke-loginfo" \
  3137.   "Checking in loginfo;
  3138. ***************
  3139. *** 10570,10576 ****
  3140.   fi
  3141.   EOF
  3142.         chmod +x ${TESTDIR}/vscript
  3143. !       echo "^first-dir ${TESTDIR}/vscript" >>verifymsg
  3144.         dotest info-v1 "${testcvs} -q ci -m add-verification" \
  3145.   "Checking in verifymsg;
  3146.   ${TESTDIR}/cvsroot/CVSROOT/verifymsg,v  <--  verifymsg
  3147. --- 11111,11121 ----
  3148.   fi
  3149.   EOF
  3150.         chmod +x ${TESTDIR}/vscript
  3151. !       if test x"${CANT_RUN_SCRIPTS}" = x; then
  3152. !         echo "^first-dir ${TESTDIR}/vscript" >>verifymsg
  3153. !       else
  3154. !         echo "^first-dir ${TESTSHELL} ${TESTDIR}/vscript" >>verifymsg
  3155. !       fi
  3156.         dotest info-v1 "${testcvs} -q ci -m add-verification" \
  3157.   "Checking in verifymsg;
  3158.   ${TESTDIR}/cvsroot/CVSROOT/verifymsg,v  <--  verifymsg
  3159. ***************
  3160. *** 10606,10611 ****
  3161. --- 11151,11157 ----
  3162.         rmdir another-dir
  3163.   
  3164.         cd CVSROOT
  3165. +       sleep ${FILESYSTEM_TICK}
  3166.         echo '# do nothing' >verifymsg
  3167.         dotest info-cleanup-verifymsg "${testcvs} -q ci -m nuke-verifymsg" \
  3168.   "Checking in verifymsg;
  3169. ***************
  3170. *** 10750,10755 ****
  3171. --- 11296,11302 ----
  3172.   
  3173.         dotest config-1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}"
  3174.         cd CVSROOT
  3175. +       sleep ${FILESYSTEM_TICK}
  3176.         echo 'bogus line' >config
  3177.         # We can't rely on specific revisions, since other tests
  3178.         # might need to modify CVSROOT/config
  3179. ***************
  3180. *** 10759,10764 ****
  3181. --- 11306,11312 ----
  3182.   new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
  3183.   done
  3184.   ${PROG} [a-z]*: Rebuilding administrative file database"
  3185. +       sleep ${FILESYSTEM_TICK}
  3186.         echo 'BogusOption=yes' >config
  3187.         dotest config-4 "${testcvs} -q ci -m change-to-bogus-opt" \
  3188.   "${PROG} [a-z]*: syntax error in ${TESTDIR}/cvsroot/CVSROOT/config: line 'bogus line' is missing '='
  3189. ***************
  3190. *** 10767,10772 ****
  3191. --- 11315,11321 ----
  3192.   new revision: 1\.[0-9]*; previous revision: 1\.[0-9]*
  3193.   done
  3194.   ${PROG} [a-z]*: Rebuilding administrative file database"
  3195. +       sleep ${FILESYSTEM_TICK}
  3196.         echo '# No config is a good config' > config
  3197.         dotest config-5 "${testcvs} -q ci -m change-to-comment" \
  3198.   "${PROG} [a-z]*: ${TESTDIR}/cvsroot/CVSROOT/config: unrecognized keyword 'BogusOption'
  3199. ***************
  3200. *** 10885,10890 ****
  3201. --- 11434,11440 ----
  3202.   done"
  3203.         rm -f ${TESTDIR}/comment.tmp
  3204.   
  3205. +       sleep ${FILESYSTEM_TICK}
  3206.         echo 'second revision' > file1
  3207.         dotest log-4 "${testcvs} -q ci -m2 file1" \
  3208.   "Checking in file1;
  3209. ***************
  3210. *** 10892,10899 ****
  3211. --- 11442,11451 ----
  3212.   new revision: 1\.2; previous revision: 1\.1
  3213.   done"
  3214.   
  3215. +       sleep ${FILESYSTEM_TICK}
  3216.         dotest log-5 "${testcvs} -q tag -b branch file1" 'T file1'
  3217.   
  3218. +       sleep ${FILESYSTEM_TICK}
  3219.         echo 'third revision' > file1
  3220.         dotest log-6 "${testcvs} -q ci -m3 file1" \
  3221.   "Checking in file1;
  3222. ***************
  3223. *** 10901,10908 ****
  3224. --- 11453,11462 ----
  3225.   new revision: 1\.3; previous revision: 1\.2
  3226.   done"
  3227.   
  3228. +       sleep ${FILESYSTEM_TICK}
  3229.         dotest log-7 "${testcvs} -q update -r branch" '[UP] file1'
  3230.   
  3231. +       sleep ${FILESYSTEM_TICK}
  3232.         echo 'first branch revision' > file1
  3233.         dotest log-8 "${testcvs} -q ci -m1b file1" \
  3234.   "Checking in file1;
  3235. ***************
  3236. *** 10912,10917 ****
  3237. --- 11466,11472 ----
  3238.   
  3239.         dotest log-9 "${testcvs} -q tag tag file1" 'T file1'
  3240.   
  3241. +       sleep ${FILESYSTEM_TICK}
  3242.         echo 'second branch revision' > file1
  3243.         dotest log-10 "${testcvs} -q ci -m2b file1" \
  3244.   "Checking in file1;
  3245. ***************
  3246. *** 11263,11268 ****
  3247. --- 11818,11824 ----
  3248.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  3249.   initial revision: 1\.1
  3250.   done"
  3251. +       sleep ${FILESYSTEM_TICK}
  3252.         cat >file1 <<EOF
  3253.   this
  3254.   is
  3255. ***************
  3256. *** 11279,11285 ****
  3257. --- 11835,11843 ----
  3258.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  3259.   new revision: 1\.2; previous revision: 1\.1
  3260.   done"
  3261. +       sleep ${FILESYSTEM_TICK}
  3262.         dotest ann-6 "${testcvs} -q tag -b br" "T file1"
  3263. +       sleep ${FILESYSTEM_TICK}
  3264.         cat >file1 <<EOF
  3265.   this
  3266.   is
  3267. ***************
  3268. *** 11296,11302 ****
  3269. --- 11854,11862 ----
  3270.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  3271.   new revision: 1\.3; previous revision: 1\.2
  3272.   done"
  3273. +       sleep ${FILESYSTEM_TICK}
  3274.         dotest ann-8 "${testcvs} -q update -r br" "[UP] file1"
  3275. +       sleep ${FILESYSTEM_TICK}
  3276.         cat >file1 <<EOF
  3277.   this
  3278.   is
  3279. ***************
  3280. *** 11427,11445 ****
  3281.   
  3282.           # First, if the repository doesn't exist at all...
  3283.           dotest_fail crerepos-1 \
  3284. ! "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
  3285.   "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
  3286.           mkdir crerepos
  3287.   
  3288.           # The repository exists but CVSROOT doesn't.
  3289.           dotest_fail crerepos-2 \
  3290. ! "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
  3291.   "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
  3292.           mkdir crerepos/CVSROOT
  3293.   
  3294.           # Checkout of nonexistent module
  3295.           dotest_fail crerepos-3 \
  3296. ! "${testcvs} -d ${TESTDIR}/crerepos co cvs-sanity" \
  3297.   "${PROG} [a-z]*: cannot find module .cvs-sanity. - ignored"
  3298.   
  3299.           # Now test that CVS works correctly without a modules file
  3300. --- 11987,12005 ----
  3301.   
  3302.           # First, if the repository doesn't exist at all...
  3303.           dotest_fail crerepos-1 \
  3304. ! "${testcvs} -d :local:${TESTDIR}/crerepos co cvs-sanity" \
  3305.   "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
  3306.           mkdir crerepos
  3307.   
  3308.           # The repository exists but CVSROOT doesn't.
  3309.           dotest_fail crerepos-2 \
  3310. ! "${testcvs} -d :local:${TESTDIR}/crerepos co cvs-sanity" \
  3311.   "${PROG} \[[a-z]* aborted\]: ${TESTDIR}/crerepos/CVSROOT: .*"
  3312.           mkdir crerepos/CVSROOT
  3313.   
  3314.           # Checkout of nonexistent module
  3315.           dotest_fail crerepos-3 \
  3316. ! "${testcvs} -d :local:${TESTDIR}/crerepos co cvs-sanity" \
  3317.   "${PROG} [a-z]*: cannot find module .cvs-sanity. - ignored"
  3318.   
  3319.           # Now test that CVS works correctly without a modules file
  3320. ***************
  3321. *** 11449,11458 ****
  3322.           # been created with an old version of CVS.
  3323.           mkdir tmp; cd tmp
  3324.           dotest crerepos-4 \
  3325. ! "${testcvs} -q -d ${TESTDIR}/crerepos co CVSROOT" \
  3326.   ''
  3327.           if echo yes | \
  3328. ! ${testcvs} -d ${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then
  3329.             pass crerepos-5
  3330.           else
  3331.             fail crerepos-5
  3332. --- 12009,12018 ----
  3333.           # been created with an old version of CVS.
  3334.           mkdir tmp; cd tmp
  3335.           dotest crerepos-4 \
  3336. ! "${testcvs} -q -d :local:${TESTDIR}/crerepos co CVSROOT" \
  3337.   ''
  3338.           if echo yes | \
  3339. ! ${testcvs} -d :local:${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then
  3340.             pass crerepos-5
  3341.           else
  3342.             fail crerepos-5
  3343. ***************
  3344. *** 11462,11468 ****
  3345.           # The directory tmp should be empty
  3346.           dotest crerepos-6 "rmdir tmp" ''
  3347.   
  3348. !         CREREPOS_ROOT=${TESTDIR}/crerepos
  3349.   
  3350.         else
  3351.           # For remote, just create the repository.  We don't yet do
  3352. --- 12022,12028 ----
  3353.           # The directory tmp should be empty
  3354.           dotest crerepos-6 "rmdir tmp" ''
  3355.   
  3356. !         CREREPOS_ROOT=:local:${TESTDIR}/crerepos
  3357.   
  3358.         else
  3359.           # For remote, just create the repository.  We don't yet do
  3360. ***************
  3361. *** 11686,11691 ****
  3362. --- 12246,12252 ----
  3363.   @d2 12
  3364.   @
  3365.   EOF
  3366. +       lf_endlines ${CVSROOT_DIRNAME}/first-dir/file1,v
  3367.         dotest rcs-1 "${testcvs} -q co first-dir" 'U first-dir/file1'
  3368.         cd first-dir
  3369.         dotest rcs-2 "${testcvs} -q log" "
  3370. ***************
  3371. *** 11795,11800 ****
  3372. --- 12356,12384 ----
  3373.         # doc/RCSFILES and friends.  One subtle point is that none of
  3374.         # the lines end with newlines; that is a feature which we
  3375.         # should be testing.
  3376. +       # Windows-NT, Microsoft Visual C++ 4.2, Novell IntraNetware
  3377. +       # Client 4.11a does badly on rcs-5 when the /tmp is on Netware
  3378. +       # server.
  3379. +       # src/vers-ts.c(Version-TS) does utime (finfo->file, &t) with
  3380. +       # t.actime = t.modtime = 31564805 which causes modified time 
  3381. +       # of file2 to be set to 1 jan 2099 (rather than 1 jan 1971).
  3382. +       # Looks to me like Netware counts file times from 1 jan 1980 0:0:0.
  3383. +       # Here is some mush to use dates in 1980 rather than 1971 when
  3384. +       # it looks like we have Netware
  3385. +       DECADE="7"
  3386. +       if touch -t123123591979.59 netware; then
  3387. +         if $EXPR "`ls -l netware`" : \
  3388. +            "${DOTSTAR}1979${DOTSTAR}" >/dev/null; then
  3389. +           : base date probably before 1980
  3390. +         else
  3391. +           echo "I think you are using a Netware Fileserver"
  3392. +           DECADE="8"
  3393. +         fi
  3394. +       fi
  3395. +       rm netware
  3396. +       
  3397.         cat <<EOF >${CVSROOT_DIRNAME}/first-dir/file2,v
  3398.   head                 1.5                 ;
  3399.        branch        1.2.6;
  3400. ***************
  3401. *** 11802,11813 ****
  3402.   symbols branch:1.2.6;
  3403.   locks;
  3404.   testofanewphrase @without newphrase we'd have trouble extending @@ all@ ;
  3405. ! 1.5 date 71.01.01.01.00.00; author joe; state bogus; branches; next 1.4;
  3406. ! 1.4 date 71.01.01.00.00.05; author joe; state bogus; branches; next 1.3;
  3407. ! 1.3 date 70.12.31.15.00.05; author joe; state bogus; branches; next 1.2;
  3408. ! 1.2 date 70.12.31.12.15.05; author me; state bogus; branches 1.2.6.1; next 1.1;
  3409. ! 1.1 date 70.12.31.11.00.05; author joe; state bogus; branches; next; newph;
  3410. ! 1.2.6.1 date 71.01.01.08.00.05; author joe; state Exp; branches; next;
  3411.   desc @@
  3412.   1.5 log @@ newphrase1; newphrase2 42; text @head revision@
  3413.   1.4 log @@ text @d1 1
  3414. --- 12386,12397 ----
  3415.   symbols branch:1.2.6;
  3416.   locks;
  3417.   testofanewphrase @without newphrase we'd have trouble extending @@ all@ ;
  3418. ! 1.5 date ${DECADE}1.01.01.01.00.00; author joe; state bogus; branches; next 1.4;
  3419. ! 1.4 date ${DECADE}1.01.01.00.00.05; author joe; state bogus; branches; next 1.3;
  3420. ! 1.3 date ${DECADE}0.12.31.15.00.05; author joe; state bogus; branches; next 1.2;
  3421. ! 1.2 date ${DECADE}0.12.31.12.15.05; author me; state bogus; branches 1.2.6.1; next 1.1;
  3422. ! 1.1 date ${DECADE}0.12.31.11.00.05; author joe; state bogus; branches; next; newph;
  3423. ! 1.2.6.1 date ${DECADE}1.01.01.08.00.05; author joe; state Exp; branches; next;
  3424.   desc @@
  3425.   1.5 log @@ newphrase1; newphrase2 42; text @head revision@
  3426.   1.4 log @@ text @d1 1
  3427. ***************
  3428. *** 11829,11841 ****
  3429. --- 12413,12429 ----
  3430.   EOF
  3431.         # ' Match the single quote in above here doc -- for font-lock mode.
  3432.   
  3433. +       lf_endlines ${CVSROOT_DIRNAME}/first-dir/file2,v
  3434.         # First test the default branch.
  3435.         dotest rcs-5 "${testcvs} -q update file2" "U file2"
  3436.         dotest rcs-6 "cat file2" "branch revision"
  3437.   
  3438.         # Check in a revision on the branch to force CVS to
  3439.         # interpret every revision in the file.
  3440. +       sleep ${FILESYSTEM_TICK}
  3441.         dotest rcs-6a "${testcvs} -q update -r branch file2" ""
  3442. +       sleep ${FILESYSTEM_TICK}
  3443.         echo "next branch revision" > file2
  3444.         dotest rcs-6b "${testcvs} -q ci -m mod file2" \
  3445.   "Checking in file2;
  3446. ***************
  3447. *** 11866,11899 ****
  3448.   testofanewphrase    @without newphrase we'd have trouble extending @@ all@;
  3449.   
  3450.   1\.5
  3451. ! date    71\.01\.01\.01\.00\.00;    author joe;    state bogus;
  3452.   branches;
  3453.   next    1\.4;
  3454.   
  3455.   1\.4
  3456. ! date    71\.01\.01\.00\.00\.05;    author joe;    state bogus;
  3457.   branches;
  3458.   next    1\.3;
  3459.   
  3460.   1\.3
  3461. ! date    70\.12\.31\.15\.00\.05;    author joe;    state bogus;
  3462.   branches;
  3463.   next    1\.2;
  3464.   
  3465.   1\.2
  3466. ! date    70\.12\.31\.12\.15\.05;    author me;    state bogus;
  3467.   branches
  3468.       1\.2\.6\.1;
  3469.   next    1\.1;
  3470.   
  3471.   1\.1
  3472. ! date    70\.12\.31\.11\.00\.05;    author joe;    state bogus;
  3473.   branches;
  3474.   next    ;
  3475.   newph    ;
  3476.   
  3477.   1\.2\.6\.1
  3478. ! date    71\.01\.01\.08\.00\.05;    author joe;    state Exp;
  3479.   branches;
  3480.   next    1\.2\.6\.2;
  3481.   
  3482. --- 12454,12487 ----
  3483.   testofanewphrase    @without newphrase we'd have trouble extending @@ all@;
  3484.   
  3485.   1\.5
  3486. ! date    ${DECADE}1\.01\.01\.01\.00\.00;    author joe;    state bogus;
  3487.   branches;
  3488.   next    1\.4;
  3489.   
  3490.   1\.4
  3491. ! date    ${DECADE}1\.01\.01\.00\.00\.05;    author joe;    state bogus;
  3492.   branches;
  3493.   next    1\.3;
  3494.   
  3495.   1\.3
  3496. ! date    ${DECADE}0\.12\.31\.15\.00\.05;    author joe;    state bogus;
  3497.   branches;
  3498.   next    1\.2;
  3499.   
  3500.   1\.2
  3501. ! date    ${DECADE}0\.12\.31\.12\.15\.05;    author me;    state bogus;
  3502.   branches
  3503.       1\.2\.6\.1;
  3504.   next    1\.1;
  3505.   
  3506.   1\.1
  3507. ! date    ${DECADE}0\.12\.31\.11\.00\.05;    author joe;    state bogus;
  3508.   branches;
  3509.   next    ;
  3510.   newph    ;
  3511.   
  3512.   1\.2\.6\.1
  3513. ! date    ${DECADE}1\.01\.01\.08\.00\.05;    author joe;    state Exp;
  3514.   branches;
  3515.   next    1\.2\.6\.2;
  3516.   
  3517. ***************
  3518. *** 11971,11977 ****
  3519.   next branch revision
  3520.   @"
  3521.   
  3522. !       if ${testcvs} -q update -p -D '1970-12-31 11:30 UT' file2 \
  3523.             >${TESTDIR}/rcs4.tmp
  3524.         then
  3525.           dotest rcs-9 "cat ${TESTDIR}/rcs4.tmp" "start revision"
  3526. --- 12559,12565 ----
  3527.   next branch revision
  3528.   @"
  3529.   
  3530. !       if ${testcvs} -q update -p -D "19${DECADE}0-12-31 11:30 UT" file2 \
  3531.             >${TESTDIR}/rcs4.tmp
  3532.         then
  3533.           dotest rcs-9 "cat ${TESTDIR}/rcs4.tmp" "start revision"
  3534. ***************
  3535. *** 11979,11985 ****
  3536.           fail rcs-9
  3537.         fi
  3538.   
  3539. !       if ${testcvs} -q update -p -D '1970-12-31 12:30 UT' file2 \
  3540.             >${TESTDIR}/rcs4.tmp
  3541.         then
  3542.           dotest rcs-10 "cat ${TESTDIR}/rcs4.tmp" "mid revision"
  3543. --- 12567,12573 ----
  3544.           fail rcs-9
  3545.         fi
  3546.   
  3547. !       if ${testcvs} -q update -p -D "19${DECADE}0-12-31 12:30 UT" file2 \
  3548.             >${TESTDIR}/rcs4.tmp
  3549.         then
  3550.           dotest rcs-10 "cat ${TESTDIR}/rcs4.tmp" "mid revision"
  3551. ***************
  3552. *** 11987,11993 ****
  3553.           fail rcs-10
  3554.         fi
  3555.   
  3556. !       if ${testcvs} -q update -p -D '1971-01-01 00:30 UT' file2 \
  3557.             >${TESTDIR}/rcs4.tmp
  3558.         then
  3559.           dotest rcs-11 "cat ${TESTDIR}/rcs4.tmp" "new year revision"
  3560. --- 12575,12581 ----
  3561.           fail rcs-10
  3562.         fi
  3563.   
  3564. !       if ${testcvs} -q update -p -D "19${DECADE}1-01-01 00:30 UT" file2 \
  3565.             >${TESTDIR}/rcs4.tmp
  3566.         then
  3567.           dotest rcs-11 "cat ${TESTDIR}/rcs4.tmp" "new year revision"
  3568. ***************
  3569. *** 11996,12002 ****
  3570.         fi
  3571.   
  3572.         # Same test as rcs-10, but with am/pm.
  3573. !       if ${testcvs} -q update -p -D 'December 31, 1970 12:30pm UT' file2 \
  3574.             >${TESTDIR}/rcs4.tmp
  3575.         then
  3576.           dotest rcs-12 "cat ${TESTDIR}/rcs4.tmp" "mid revision"
  3577. --- 12584,12590 ----
  3578.         fi
  3579.   
  3580.         # Same test as rcs-10, but with am/pm.
  3581. !       if ${testcvs} -q update -p -D "December 31, 19${DECADE}0 12:30pm UT" file2 \
  3582.             >${TESTDIR}/rcs4.tmp
  3583.         then
  3584.           dotest rcs-12 "cat ${TESTDIR}/rcs4.tmp" "mid revision"
  3585. ***************
  3586. *** 12005,12011 ****
  3587.         fi
  3588.   
  3589.         # Same test as rcs-11, but with am/pm.
  3590. !       if ${testcvs} -q update -p -D 'January 1, 1971 12:30am UT' file2 \
  3591.             >${TESTDIR}/rcs4.tmp
  3592.         then
  3593.           dotest rcs-13 "cat ${TESTDIR}/rcs4.tmp" "new year revision"
  3594. --- 12593,12599 ----
  3595.         fi
  3596.   
  3597.         # Same test as rcs-11, but with am/pm.
  3598. !       if ${testcvs} -q update -p -D "January 1, 19${DECADE}1 12:30am UT" file2 \
  3599.             >${TESTDIR}/rcs4.tmp
  3600.         then
  3601.           dotest rcs-13 "cat ${TESTDIR}/rcs4.tmp" "new year revision"
  3602. ***************
  3603. *** 12029,12052 ****
  3604.   description:
  3605.   ----------------------------
  3606.   revision 1\.5
  3607. ! date: 1971/01/01 01:00:00;  author: joe;  state: bogus;  lines: ${PLUS}1 -1
  3608.   \*\*\* empty log message \*\*\*
  3609.   ----------------------------
  3610.   revision 1\.4
  3611. ! date: 1971/01/01 00:00:05;  author: joe;  state: bogus;  lines: ${PLUS}1 -1
  3612.   \*\*\* empty log message \*\*\*
  3613.   ----------------------------
  3614.   revision 1\.3
  3615. ! date: 1970/12/31 15:00:05;  author: joe;  state: bogus;  lines: ${PLUS}1 -1
  3616.   \*\*\* empty log message \*\*\*
  3617.   ----------------------------
  3618.   revision 1\.2
  3619. ! date: 1970/12/31 12:15:05;  author: me;  state: bogus;  lines: ${PLUS}1 -1
  3620.   branches:  1\.2\.6;
  3621.   \*\*\* empty log message \*\*\*
  3622.   ----------------------------
  3623.   revision 1\.1
  3624. ! date: 1970/12/31 11:00:05;  author: joe;  state: bogus;
  3625.   \*\*\* empty log message \*\*\*
  3626.   ----------------------------
  3627.   revision 1\.2\.6\.2
  3628. --- 12617,12640 ----
  3629.   description:
  3630.   ----------------------------
  3631.   revision 1\.5
  3632. ! date: 19${DECADE}1/01/01 01:00:00;  author: joe;  state: bogus;  lines: ${PLUS}1 -1
  3633.   \*\*\* empty log message \*\*\*
  3634.   ----------------------------
  3635.   revision 1\.4
  3636. ! date: 19${DECADE}1/01/01 00:00:05;  author: joe;  state: bogus;  lines: ${PLUS}1 -1
  3637.   \*\*\* empty log message \*\*\*
  3638.   ----------------------------
  3639.   revision 1\.3
  3640. ! date: 19${DECADE}0/12/31 15:00:05;  author: joe;  state: bogus;  lines: ${PLUS}1 -1
  3641.   \*\*\* empty log message \*\*\*
  3642.   ----------------------------
  3643.   revision 1\.2
  3644. ! date: 19${DECADE}0/12/31 12:15:05;  author: me;  state: bogus;  lines: ${PLUS}1 -1
  3645.   branches:  1\.2\.6;
  3646.   \*\*\* empty log message \*\*\*
  3647.   ----------------------------
  3648.   revision 1\.1
  3649. ! date: 19${DECADE}0/12/31 11:00:05;  author: joe;  state: bogus;
  3650.   \*\*\* empty log message \*\*\*
  3651.   ----------------------------
  3652.   revision 1\.2\.6\.2
  3653. ***************
  3654. *** 12054,12060 ****
  3655.   mod
  3656.   ----------------------------
  3657.   revision 1\.2\.6\.1
  3658. ! date: 1971/01/01 08:00:05;  author: joe;  state: Exp;  lines: ${PLUS}1 -1
  3659.   \*\*\* empty log message \*\*\*
  3660.   ============================================================================="
  3661.         cd ..
  3662. --- 12642,12648 ----
  3663.   mod
  3664.   ----------------------------
  3665.   revision 1\.2\.6\.1
  3666. ! date: 19${DECADE}1/01/01 08:00:05;  author: joe;  state: Exp;  lines: ${PLUS}1 -1
  3667.   \*\*\* empty log message \*\*\*
  3668.   ============================================================================="
  3669.         cd ..
  3670. ***************
  3671. *** 12106,12111 ****
  3672. --- 12694,12700 ----
  3673.   EOF
  3674.         # ' Match the 3rd single quote in the here doc -- for font-lock mode.
  3675.   
  3676. +       lf_endlines ${CVSROOT_DIRNAME}/first-dir/file1,v
  3677.         dotest rcs2-1 "${testcvs} -q co first-dir" 'U first-dir/file1'
  3678.         cd first-dir
  3679.   
  3680. ***************
  3681. *** 12170,12175 ****
  3682. --- 12759,12765 ----
  3683.   C3b235f50|kingdon|<remote>|ccvs/emx|1.3|README
  3684.   M3b23af50|kingdon|~/work/*0|ccvs/doc|1.281|cvs.texinfo
  3685.   EOF
  3686. +       lf_endlines ${CVSROOT_DIRNAME}/CVSROOT/history
  3687.         dotest history-1 "${testcvs} history -e -a" \
  3688.   "O 06/04 19:48 ${PLUS}0000 anonymous ccvs     =ccvs= <remote>/\*
  3689.   W 06/17 19:51 ${PLUS}0000 anonymous       Makefile\.in ccvs/emx == <remote>/emx
  3690. ***************
  3691. *** 12348,12355 ****
  3692. --- 12938,12947 ----
  3693.   
  3694.         # OK, now add a file on a branch.  Check that the mode gets
  3695.         # set the same way (it is a different code path in CVS).
  3696. +       sleep ${FILESYSTEM_TICK}
  3697.         dotest modes-11 "${testcvs} -q tag -b br" 'T aa
  3698.   T ab'
  3699. +       sleep ${FILESYSTEM_TICK}
  3700.         dotest modes-12 "${testcvs} -q update -r br" ''
  3701.         touch ac
  3702.         dotest modes-13 "${testcvs} add ac" \
  3703. ***************
  3704. *** 12797,12802 ****
  3705. --- 13389,13395 ----
  3706.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  3707.   new revision: 1\.2; previous revision: 1\.1
  3708.   done"
  3709. +       sleep ${FILESYSTEM_TICK}
  3710.         dotest sticky-7 "${testcvs} -q update -r tag1" "[UP] file1"
  3711.         dotest sticky-8 "cat file1" ''
  3712.         dotest sticky-9 "${testcvs} -q update" ''
  3713. ***************
  3714. *** 12819,12824 ****
  3715. --- 13412,13418 ----
  3716.   done"
  3717.   
  3718.         # Now back to tag1
  3719. +       sleep ${FILESYSTEM_TICK}
  3720.         dotest sticky-15 "${testcvs} -q update -r tag1" "[UP] file1
  3721.   ${PROG} [a-z]*: file2 is no longer in the repository"
  3722.   
  3723. ***************
  3724. *** 12832,12837 ****
  3725. --- 13426,13432 ----
  3726.         dotest sticky-17 "${testcvs} -q ci -m remove-it" ""
  3727.         dotest sticky-18 "${testcvs} -q update -A" "U file1
  3728.   U file2"
  3729. +       sleep ${FILESYSTEM_TICK}
  3730.         dotest sticky-19 "${testcvs} -q update -r tag1" \
  3731.   "${PROG} [a-z]*: file1 is no longer in the repository
  3732.   ${PROG} [a-z]*: file2 is no longer in the repository"
  3733. ***************
  3734. *** 12839,12844 ****
  3735. --- 13434,13440 ----
  3736.   U file2"
  3737.   
  3738.         # Now try with a numeric revision.
  3739. +       sleep ${FILESYSTEM_TICK}
  3740.         dotest sticky-21 "${testcvs} -q update -r 1.1 file1" "U file1"
  3741.         rm file1
  3742.         dotest sticky-22 "${testcvs} rm file1" \
  3743. ***************
  3744. *** 13034,13041 ****
  3745. --- 13630,13639 ----
  3746.   
  3747.         # Test the Name keyword.  First go back to normal expansion.
  3748.   
  3749. +       sleep ${FILESYSTEM_TICK}
  3750.         dotest keyword-17 "${testcvs} update -A file1" "U file1"
  3751.   
  3752. +       sleep ${FILESYSTEM_TICK}
  3753.         echo '$''Name$' > file1
  3754.         dotest keyword-18 "${testcvs} ci -m modify file1" \
  3755.   "Checking in file1;
  3756. ***************
  3757. *** 13043,13054 ****
  3758. --- 13641,13654 ----
  3759.   new revision: 1\.2; previous revision: 1\.1
  3760.   done"
  3761.         dotest keyword-19 "${testcvs} -q tag tag1" "T file1"
  3762. +       sleep ${FILESYSTEM_TICK}
  3763.         echo "change" >> file1
  3764.         dotest keyword-20 "${testcvs} -q ci -m mod2 file1" \
  3765.   "Checking in file1;
  3766.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  3767.   new revision: 1\.3; previous revision: 1\.2
  3768.   done"
  3769. +       sleep ${FILESYSTEM_TICK}
  3770.         dotest keyword-21 "${testcvs} -q update -r tag1" "[UP] file1"
  3771.   
  3772.         # FIXME: This test fails when remote.  The second expect
  3773. ***************
  3774. *** 13094,13099 ****
  3775. --- 13694,13700 ----
  3776.         dotest keywordlog-4a "${testcvs} -q co first-dir" "U first-dir/file1"
  3777.         cd ../1/first-dir
  3778.   
  3779. +       sleep ${FILESYSTEM_TICK}
  3780.         echo 'xx $''Log$' > file1
  3781.         cat >${TESTDIR}/comment.tmp <<EOF
  3782.   First log line
  3783. ***************
  3784. *** 13105,13110 ****
  3785. --- 13706,13712 ----
  3786.   new revision: 1\.2; previous revision: 1\.1
  3787.   done"
  3788.         rm -f ${TESTDIR}/comment.tmp
  3789. +       sleep ${FILESYSTEM_TICK}
  3790.         dotest keywordlog-6 "${testcvs} -q tag -b br" "T file1"
  3791.         dotest keywordlog-7 "cat file1" \
  3792.   "xx "'\$'"Log: file1,v "'\$'"
  3793. ***************
  3794. *** 13123,13128 ****
  3795. --- 13725,13731 ----
  3796.   xx"
  3797.         cd ../../1/first-dir
  3798.   
  3799. +       sleep ${FILESYSTEM_TICK}
  3800.         echo "change" >> file1
  3801.         dotest keywordlog-10 "${testcvs} ci -m modify file1" \
  3802.   "Checking in file1;
  3803. ***************
  3804. *** 13154,13160 ****
  3805. --- 13757,13765 ----
  3806.   change"
  3807.   
  3808.         cd ../../1/first-dir
  3809. +       sleep ${FILESYSTEM_TICK}
  3810.         dotest keywordlog-14 "${testcvs} -q update -r br" "[UP] file1"
  3811. +       sleep ${FILESYSTEM_TICK}
  3812.         echo br-change >>file1
  3813.         dotest keywordlog-15 "${testcvs} -q ci -m br-modify" \
  3814.   "Checking in file1;
  3815. ***************
  3816. *** 13172,13177 ****
  3817. --- 13777,13783 ----
  3818.   xx
  3819.   br-change"
  3820.         cd ../../2/first-dir
  3821. +       sleep ${FILESYSTEM_TICK}
  3822.         dotest keywordlog-17 "${testcvs} -q update -r br" "[UP] file1"
  3823.         dotest keywordlog-18 "cat file1" \
  3824.   "xx "'\$'"Log: file1,v "'\$'"
  3825. ***************
  3826. *** 13243,13248 ****
  3827. --- 13849,13855 ----
  3828.   "U first-dir/file1
  3829.   U first-dir/file2"
  3830.         cd first-dir
  3831. +       sleep ${FILESYSTEM_TICK}
  3832.         echo 'add a line on trunk' >> file1
  3833.         dotest head-3 "${testcvs} -q ci -m modify" \
  3834.   "Checking in file1;
  3835. ***************
  3836. *** 13251,13265 ****
  3837. --- 13858,13876 ----
  3838.   done"
  3839.         dotest head-4 "${testcvs} -q tag trunktag" "T file1
  3840.   T file2"
  3841. +       sleep ${FILESYSTEM_TICK}
  3842.         echo 'add a line on trunk after trunktag' >> file1
  3843.         dotest head-5 "${testcvs} -q ci -m modify" \
  3844.   "Checking in file1;
  3845.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  3846.   new revision: 1\.3; previous revision: 1\.2
  3847.   done"
  3848. +       sleep ${FILESYSTEM_TICK}
  3849.         dotest head-6 "${testcvs} -q tag -b br1" "T file1
  3850.   T file2"
  3851. +       sleep ${FILESYSTEM_TICK}
  3852.         dotest head-7 "${testcvs} -q update -r br1" ""
  3853. +       sleep ${FILESYSTEM_TICK}
  3854.         echo 'modify on branch' >>file1
  3855.         dotest head-8 "${testcvs} -q ci -m modify" \
  3856.   "Checking in file1;
  3857. ***************
  3858. *** 13268,13273 ****
  3859. --- 13879,13885 ----
  3860.   done"
  3861.         dotest head-9 "${testcvs} -q tag brtag" "T file1
  3862.   T file2"
  3863. +       sleep ${FILESYSTEM_TICK}
  3864.         echo 'modify on branch after brtag' >>file1
  3865.         dotest head-10 "${testcvs} -q ci -m modify" \
  3866.   "Checking in file1;
  3867. ***************
  3868. *** 13276,13281 ****
  3869. --- 13888,13894 ----
  3870.   done"
  3871.         # With no sticky tags, HEAD is the head of the trunk.
  3872.         dotest head-trunk-setup "${testcvs} -q update -A" "[UP] file1"
  3873. +       sleep ${FILESYSTEM_TICK}
  3874.         dotest head-trunk-update "${testcvs} -q update -r HEAD -p file1" \
  3875.   "imported contents
  3876.   add a line on trunk
  3877. ***************
  3878. *** 13301,13307 ****
  3879. --- 13914,13922 ----
  3880.   ${PLUS} modify on branch after brtag"
  3881.   
  3882.         # With a branch sticky tag, HEAD is the head of the trunk.
  3883. +       sleep ${FILESYSTEM_TICK}
  3884.         dotest head-br1-setup "${testcvs} -q update -r br1" "[UP] file1"
  3885. +       sleep ${FILESYSTEM_TICK}
  3886.         dotest head-br1-update "${testcvs} -q update -r HEAD -p file1" \
  3887.   "imported contents
  3888.   add a line on trunk
  3889. ***************
  3890. *** 13312,13318 ****
  3891. --- 13927,13935 ----
  3892.   
  3893.         # With a nonbranch sticky tag on a branch,
  3894.         # HEAD is the head of the trunk
  3895. +       sleep ${FILESYSTEM_TICK}
  3896.         dotest head-brtag-setup "${testcvs} -q update -r brtag" "[UP] file1"
  3897. +       sleep ${FILESYSTEM_TICK}
  3898.         dotest head-brtag-update "${testcvs} -q update -r HEAD -p file1" \
  3899.   "imported contents
  3900.   add a line on trunk
  3901. ***************
  3902. *** 13325,13334 ****
  3903. --- 13942,13953 ----
  3904.   
  3905.         # With a nonbranch sticky tag on the trunk, HEAD is the head
  3906.         # of the trunk, I think.
  3907. +       sleep ${FILESYSTEM_TICK}
  3908.         dotest head-trunktag-setup "${testcvs} -q update -r trunktag" \
  3909.   "[UP] file1"
  3910.         dotest head-trunktag-check "cat file1" "imported contents
  3911.   add a line on trunk"
  3912. +       sleep ${FILESYSTEM_TICK}
  3913.         dotest head-trunktag-update "${testcvs} -q update -r HEAD -p file1" \
  3914.   "imported contents
  3915.   add a line on trunk
  3916. ***************
  3917. *** 13403,13410 ****
  3918. --- 14022,14032 ----
  3919.   ${TESTDIR}/cvsroot/first-dir/file1,v  <--  file1
  3920.   initial revision: 1\.1
  3921.   done"
  3922. +       sleep ${FILESYSTEM_TICK}
  3923.         dotest tagdate-5 "${testcvs} -q tag -b br1" "T file1"
  3924. +       sleep ${FILESYSTEM_TICK}
  3925.         dotest tagdate-6 "${testcvs} -q tag -b br2" "T file1"
  3926. +       sleep ${FILESYSTEM_TICK}
  3927.         echo trunk-2 >file1
  3928.         dotest tagdate-7 "${testcvs} -q ci -m modify-on-trunk" \
  3929.   "Checking in file1;
  3930. ***************
  3931. *** 13415,13421 ****
  3932. --- 14037,14045 ----
  3933.         # any revisions.  First the case where br2 doesn't have any
  3934.         # revisions either:
  3935.         dotest tagdate-8 "${testcvs} -q update -p -r br1 -D now" "trunk-1"
  3936. +       sleep ${FILESYSTEM_TICK}
  3937.         dotest tagdate-9 "${testcvs} -q update -r br2" "[UP] file1"
  3938. +       sleep ${FILESYSTEM_TICK}
  3939.         echo br2-1 >file1
  3940.         dotest tagdate-10 "${testcvs} -q ci -m modify-on-br2" \
  3941.   "Checking in file1;
  3942. ***************
  3943. *** 13461,13472 ****
  3944. --- 14085,14100 ----
  3945.   ${TESTDIR}/cvsroot/first-dir/file2,v  <--  file2
  3946.   initial revision: 1\.1
  3947.   done"
  3948. +       sleep ${FILESYSTEM_TICK}
  3949.         dotest multibranch2-5 "${testcvs} -q tag -b A" "T file1
  3950.   T file2"
  3951. +       sleep ${FILESYSTEM_TICK}
  3952.         dotest multibranch2-6 "${testcvs} -q tag -b B" "T file1
  3953.   T file2"
  3954.   
  3955. +       sleep ${FILESYSTEM_TICK}
  3956.         dotest multibranch2-7 "${testcvs} -q update -r B" ''
  3957. +       sleep ${FILESYSTEM_TICK}
  3958.         echo branch-B >file1
  3959.         echo branch-B >file2
  3960.         dotest multibranch2-8 "${testcvs} -q ci -m modify-on-B" \
  3961. ***************
  3962. *** 13479,13486 ****
  3963. --- 14107,14116 ----
  3964.   new revision: 1\.1\.4\.1; previous revision: 1\.1
  3965.   done"
  3966.   
  3967. +       sleep ${FILESYSTEM_TICK}
  3968.         dotest multibranch2-9 "${testcvs} -q update -r A" '[UP] file1
  3969.   [UP] file2'
  3970. +       sleep ${FILESYSTEM_TICK}
  3971.         echo branch-A >file1
  3972.         # When using cvs-1.9.20, this commit gets a failed assertion in rcs.c.
  3973.         dotest multibranch2-10 "${testcvs} -q ci -m modify-on-A" \
  3974. ***************
  3975. *** 13544,13551 ****
  3976. --- 14174,14183 ----
  3977.         # bring the changes from B to A.  Probably tests many of the
  3978.         # same code paths but might as well keep it separate, I guess.
  3979.   
  3980. +       sleep ${FILESYSTEM_TICK}
  3981.         dotest multibranch2-13 "${testcvs} -q update -r B" "[UP] file1
  3982.   [UP] file2"
  3983. +       sleep ${FILESYSTEM_TICK}
  3984.         dotest multibranch2-14 "${testcvs} -q update -r A -j B file2" \
  3985.   "[UP] file2
  3986.   RCS file: ${TESTDIR}/cvsroot/first-dir/file2,v
  3987. ***************
  3988. *** 13704,13712 ****
  3989. --- 14336,14347 ----
  3990.   ${TESTDIR}/cvsroot/first-dir/file2,v  <--  file2
  3991.   initial revision: 1\.1
  3992.   done"
  3993. +       sleep ${FILESYSTEM_TICK}
  3994.         dotest admin-7 "${testcvs} -q tag -b br" "T file1
  3995.   T file2"
  3996. +       sleep ${FILESYSTEM_TICK}
  3997.         dotest admin-8 "${testcvs} -q update -r br" ""
  3998. +       sleep ${FILESYSTEM_TICK}
  3999.         echo 'add a line on the branch' >> file1
  4000.         dotest admin-9 "${testcvs} -q ci -m modify-on-branch" \
  4001.   "Checking in file1;
  4002. ***************
  4003. *** 13974,13979 ****
  4004. --- 14609,14615 ----
  4005.         fi # end of tests skipped for remote
  4006.   
  4007.         # Add another revision to file2, so we can delete one.
  4008. +       sleep ${FILESYSTEM_TICK}
  4009.         echo 'add a line' >> file2
  4010.         dotest admin-21 "${testcvs} -q ci -m modify file2" \
  4011.   "Checking in file2;
  4012. ***************
  4013. *** 14001,14030 ****
  4014. --- 14637,14671 ----
  4015.   ${TESTDIR}/cvsroot/first-dir/aaa,v  <--  aaa
  4016.   initial revision: 1\.1
  4017.   done"
  4018. +       sleep ${FILESYSTEM_TICK}
  4019.         echo second rev >> aaa
  4020.         dotest admin-22-o3 "${testcvs} -q ci -m second aaa" \
  4021.   "Checking in aaa;
  4022.   ${TESTDIR}/cvsroot/first-dir/aaa,v  <--  aaa
  4023.   new revision: 1\.2; previous revision: 1\.1
  4024.   done"
  4025. +       sleep ${FILESYSTEM_TICK}
  4026.         echo third rev >> aaa
  4027.         dotest admin-22-o4 "${testcvs} -q ci -m third aaa" \
  4028.   "Checking in aaa;
  4029.   ${TESTDIR}/cvsroot/first-dir/aaa,v  <--  aaa
  4030.   new revision: 1\.3; previous revision: 1\.2
  4031.   done"
  4032. +       sleep ${FILESYSTEM_TICK}
  4033.         echo fourth rev >> aaa
  4034.         dotest admin-22-o5 "${testcvs} -q ci -m fourth aaa" \
  4035.   "Checking in aaa;
  4036.   ${TESTDIR}/cvsroot/first-dir/aaa,v  <--  aaa
  4037.   new revision: 1\.4; previous revision: 1\.3
  4038.   done"
  4039. +       sleep ${FILESYSTEM_TICK}
  4040.         echo fifth rev >>aaa
  4041.         dotest admin-22-o6 "${testcvs} -q ci -m fifth aaa" \
  4042.   "Checking in aaa;
  4043.   ${TESTDIR}/cvsroot/first-dir/aaa,v  <--  aaa
  4044.   new revision: 1\.5; previous revision: 1\.4
  4045.   done"
  4046. +       sleep ${FILESYSTEM_TICK}
  4047.         echo sixth rev >> aaa
  4048.         dotest admin-22-o7 "${testcvs} -q ci -m sixth aaa" \
  4049.   "Checking in aaa;
  4050. ***************
  4051. *** 14094,14101 ****
  4052. --- 14735,14745 ----
  4053.   first
  4054.   ============================================================================="
  4055.   
  4056. +       sleep ${FILESYSTEM_TICK}
  4057.         dotest admin-22-o14 "${testcvs} tag -b -r1.3 br1 aaa" "T aaa"
  4058. +       sleep ${FILESYSTEM_TICK}
  4059.         dotest admin-22-o15 "${testcvs} update -rbr1 aaa" "U aaa"
  4060. +       sleep ${FILESYSTEM_TICK}
  4061.         echo new branch rev >> aaa
  4062.         dotest admin-22-o16 "${testcvs} ci -m new-branch aaa" \
  4063.   "Checking in aaa;
  4064. ***************
  4065. *** 14117,14134 ****
  4066. --- 14761,14781 ----
  4067.   second rev
  4068.   third rev
  4069.   fourth rev"
  4070. +       sleep ${FILESYSTEM_TICK}
  4071.         echo second branch rev >> aaa
  4072.         dotest admin-22-o19 "${testcvs} ci -m branch-two aaa" \
  4073.   "Checking in aaa;
  4074.   ${TESTDIR}/cvsroot/first-dir/aaa,v  <--  aaa
  4075.   new revision: 1\.3\.2\.2; previous revision: 1\.3\.2\.1
  4076.   done"
  4077. +       sleep ${FILESYSTEM_TICK}
  4078.         echo third branch rev >> aaa
  4079.         dotest admin-22-o20 "${testcvs} ci -m branch-three aaa" \
  4080.   "Checking in aaa;
  4081.   ${TESTDIR}/cvsroot/first-dir/aaa,v  <--  aaa
  4082.   new revision: 1\.3\.2\.3; previous revision: 1\.3\.2\.2
  4083.   done"
  4084. +       sleep ${FILESYSTEM_TICK}
  4085.         echo fourth branch rev >> aaa
  4086.         dotest admin-22-o21 "${testcvs} ci -m branch-four aaa" \
  4087.   "Checking in aaa;
  4088. ***************
  4089. *** 14309,14314 ****
  4090. --- 14956,14962 ----
  4091.               
  4092.         # Add a couple more revisions
  4093.         #
  4094. +       sleep ${FILESYSTEM_TICK}
  4095.         echo "nuthr_line" >> file2
  4096.         dotest admin-27-1 "${testcvs} commit -m nuthr_line file2"  \
  4097.   "Checking in file2;
  4098. ***************
  4099. *** 14316,14321 ****
  4100. --- 14964,14970 ----
  4101.   new revision: 1\.3; previous revision: 1\.2
  4102.   done"
  4103.   
  4104. +       sleep ${FILESYSTEM_TICK}
  4105.         echo "yet_another" >> file2
  4106.         dotest admin-27-2 "${testcvs} commit -m yet_another file2"  \
  4107.   "Checking in file2;
  4108. ***************
  4109. *** 14565,14571 ****
  4110.           fail reserved-11
  4111.         fi
  4112.         cd CVSROOT
  4113. !       echo "DEFAULT ${TESTDIR}/lockme" >>commitinfo
  4114.         dotest reserved-12 "${testcvs} -q ci -m rcslock commitinfo" \
  4115.   "Checking in commitinfo;
  4116.   ${TESTDIR}/cvsroot/CVSROOT/commitinfo,v  <--  commitinfo
  4117. --- 15214,15225 ----
  4118.           fail reserved-11
  4119.         fi
  4120.         cd CVSROOT
  4121. !       sleep ${FILESYSTEM_TICK}
  4122. !       if test x"${CANT_RUN_SCRIPTS}" = x; then
  4123. !         echo "DEFAULT ${TESTDIR}/lockme" >>commitinfo
  4124. !       else
  4125. !         echo "DEFAULT ${TESTSHELL} ${TESTDIR}/lockme" >>commitinfo
  4126. !       fi
  4127.         dotest reserved-12 "${testcvs} -q ci -m rcslock commitinfo" \
  4128.   "Checking in commitinfo;
  4129.   ${TESTDIR}/cvsroot/CVSROOT/commitinfo,v  <--  commitinfo
  4130. ***************
  4131. *** 15475,15480 ****
  4132. --- 16129,16135 ----
  4133.           CPen *pMinorPen;        // pen to use for drawing minor grid lines
  4134.   d472 12
  4135.   @" > diffmerge2/sgrid.h,v
  4136. +       lf_endlines diffmerge2/sgrid.h,v
  4137.   
  4138.         # We have to put the RCS file in the repository by hand for
  4139.         # this test:
  4140. ***************
  4141. *** 15538,15544 ****
  4142.   # End of TODO list.
  4143.   
  4144.   # Remove the test directory, but first change out of it.
  4145. ! cd /tmp
  4146.   rm -rf ${TESTDIR}
  4147.   
  4148.   # end of sanity.sh
  4149. --- 16193,16199 ----
  4150.   # End of TODO list.
  4151.   
  4152.   # Remove the test directory, but first change out of it.
  4153. ! cd ${TMPDIR}
  4154.   rm -rf ${TESTDIR}
  4155.   
  4156.   # end of sanity.sh
  4157. Index: src/server.c
  4158. ===================================================================
  4159. RCS file: e:/cvsroot/ccvs/src/server.c,v
  4160. retrieving revision 1.9
  4161. retrieving revision 1.5.2.9
  4162. diff -c -r1.9 -r1.5.2.9
  4163. *** src/server.c    1998/08/10 21:22:59    1.9
  4164. --- src/server.c    1998/08/12 10:22:42    1.5.2.9
  4165. ***************
  4166. *** 364,370 ****
  4167.        * Skip over leading slash if present.  We won't bother to try to
  4168.        * make '/'.
  4169.        */
  4170. !     p = dir + 1;
  4171.       while (1)
  4172.       {
  4173.       while (*p != '/' && *p != '\0')
  4174. --- 364,370 ----
  4175.        * Skip over leading slash if present.  We won't bother to try to
  4176.        * make '/'.
  4177.        */
  4178. !     p = strchr(dir, '/') + 1;
  4179.       while (1)
  4180.       {
  4181.       while (*p != '/' && *p != '\0')
  4182. ***************
  4183. *** 624,636 ****
  4184.       free (path);
  4185.   
  4186.   #ifdef HAVE_PUTENV
  4187. !     env = malloc (strlen (CVSROOT_ENV) + strlen (CVSroot_directory) + 1 + 1);
  4188.       if (env == NULL)
  4189.       {
  4190.       pending_error = ENOMEM;
  4191.       return;
  4192.       }
  4193. !     (void) sprintf (env, "%s=%s", CVSROOT_ENV, CVSroot_directory);
  4194.       (void) putenv (env);
  4195.       /* do not free env, as putenv has control of it */
  4196.   #endif
  4197. --- 624,636 ----
  4198.       free (path);
  4199.   
  4200.   #ifdef HAVE_PUTENV
  4201. !     env = malloc (strlen (CVSROOT_ENV) + strlen (CVSroot_directory) + 8 + 1);
  4202.       if (env == NULL)
  4203.       {
  4204.       pending_error = ENOMEM;
  4205.       return;
  4206.       }
  4207. !     (void) sprintf (env, "%s=:local:%s", CVSROOT_ENV, CVSroot_directory);
  4208.       (void) putenv (env);
  4209.       /* do not free env, as putenv has control of it */
  4210.   #endif
  4211. ***************
  4212. *** 717,723 ****
  4213. --- 717,726 ----
  4214.       if (error_pending()) return;
  4215.   
  4216.       if (dir_name != NULL)
  4217. +     {
  4218.       free (dir_name);
  4219. +     dir_name = NULL;
  4220. +     }
  4221.   
  4222.       dir_len = strlen (dir);
  4223.   
  4224. ***************
  4225. *** 734,739 ****
  4226. --- 737,745 ----
  4227.       return;
  4228.       }
  4229.   
  4230. +     if (isabsolute (dir))
  4231. +     return;
  4232.       dir_name = malloc (strlen (server_temp_dir) + dir_len + 40);
  4233.       if (dir_name == NULL)
  4234.       {
  4235. ***************
  4236. *** 1046,1051 ****
  4237. --- 1052,1067 ----
  4238.       }
  4239.   }
  4240.   
  4241. + /* Kopt for the next file sent in Modified or Is-modified.  */
  4242. + static char *kopt;
  4243. + struct an_entry {
  4244. +     struct an_entry *next;
  4245. +     char *entry;
  4246. + };
  4247. + static struct an_entry *entries;
  4248.   /* Receive SIZE bytes, write to filename FILE.  */
  4249.   static void
  4250.   receive_file (size, file, gzipped)
  4251. ***************
  4252. *** 1057,1065 ****
  4253.       char *arg = file;
  4254.       pid_t gzip_pid = 0;
  4255.       int gzip_status;
  4256.   
  4257.       /* Write the file.  */
  4258. !     fd = CVS_OPEN (arg, O_WRONLY | O_CREAT | O_TRUNC, 0600);
  4259.       if (fd < 0)
  4260.       {
  4261.       pending_error_text = malloc (40 + strlen (arg));
  4262. --- 1073,1104 ----
  4263.       char *arg = file;
  4264.       pid_t gzip_pid = 0;
  4265.       int gzip_status;
  4266. +     int len, bin;
  4267. +     struct an_entry *ent;
  4268. +     char *p = NULL;
  4269. +     len = strlen (arg);
  4270. +     for (ent = entries; ent != NULL; ent = ent->next)
  4271. +     {
  4272. +     if ((p = strchr (ent->entry, '/')) == NULL)
  4273. +        continue;
  4274. +     if (strncmp (p+1, arg, len) == 0 && p[1+len] == '/')
  4275. +        break;
  4276. +     }
  4277. +     bin = 0;
  4278. +     if (ent != NULL)
  4279. +     {
  4280. +     p += 1+len;
  4281. +     if ((p = strchr(p+1, '/')) != NULL &&
  4282. +         (p = strchr(p+1, '/')) != NULL &&
  4283. +         strncmp(p, "/-kb/", 4) == 0)
  4284. +         bin = OPEN_BINARY;
  4285. +     }
  4286. +     else if (kopt != NULL && strcmp(kopt, "-kb") == 0)
  4287. +     bin = OPEN_BINARY;
  4288.   
  4289.       /* Write the file.  */
  4290. !     fd = CVS_OPEN (arg, O_WRONLY | O_CREAT | O_TRUNC | bin, 0600);
  4291.       if (fd < 0)
  4292.       {
  4293.       pending_error_text = malloc (40 + strlen (arg));
  4294. ***************
  4295. *** 1112,1120 ****
  4296.       }
  4297.   }
  4298.   
  4299. - /* Kopt for the next file sent in Modified or Is-modified.  */
  4300. - static char *kopt;
  4301.   static void serve_modified PROTO ((char *));
  4302.   
  4303.   static void
  4304. --- 1151,1156 ----
  4305. ***************
  4306. *** 1247,1259 ****
  4307.   {
  4308.   }
  4309.   
  4310. - struct an_entry {
  4311. -     struct an_entry *next;
  4312. -     char *entry;
  4313. - };
  4314. - static struct an_entry *entries;
  4315.   static void serve_unchanged PROTO ((char *));
  4316.   
  4317.   static void
  4318. --- 1283,1288 ----
  4319. ***************
  4320. *** 1455,1461 ****
  4321.   
  4322.       f = NULL;
  4323.       /* Note that we free all the entries regardless of errors.  */
  4324. !     if (!error_pending ())
  4325.       {
  4326.       /* We open in append mode because we don't want to clobber an
  4327.              existing Entries file.  If we are checking out a module
  4328. --- 1484,1490 ----
  4329.   
  4330.       f = NULL;
  4331.       /* Note that we free all the entries regardless of errors.  */
  4332. !     if (dir_name != NULL && !error_pending ())
  4333.       {
  4334.       /* We open in append mode because we don't want to clobber an
  4335.              existing Entries file.  If we are checking out a module
  4336. ***************
  4337. *** 1474,1480 ****
  4338.       {
  4339.       if (!error_pending ())
  4340.       {
  4341. !         if (fprintf (f, "%s\n", p->entry) < 0)
  4342.           {
  4343.           pending_error = errno;
  4344.           if (alloc_pending (80 + strlen(CVSADM_ENT)))
  4345. --- 1503,1509 ----
  4346.       {
  4347.       if (!error_pending ())
  4348.       {
  4349. !         if (f != NULL && fprintf (f, "%s\n", p->entry) < 0)
  4350.           {
  4351.           pending_error = errno;
  4352.           if (alloc_pending (80 + strlen(CVSADM_ENT)))
  4353. ***************
  4354. *** 3563,3568 ****
  4355. --- 3592,3598 ----
  4356.           {
  4357.           int status, fd, gzip_status;
  4358.           pid_t gzip_pid;
  4359. +         int bin = 0;
  4360.   
  4361.           /* Callers must avoid passing us a buffer if
  4362.                      file_gzip_level is set.  We could handle this case,
  4363. ***************
  4364. *** 3571,3578 ****
  4365.           if (filebuf != NULL)
  4366.               error (1, 0, "\
  4367.   CVS server internal error: unhandled case in server_updated");
  4368. !         fd = CVS_OPEN (finfo->file, O_RDONLY | OPEN_BINARY, 0);
  4369.           if (fd < 0)
  4370.               error (1, errno, "reading %s", finfo->fullname);
  4371.           fd = filter_through_gzip (fd, 1, file_gzip_level, &gzip_pid);
  4372. --- 3601,3610 ----
  4373.           if (filebuf != NULL)
  4374.               error (1, 0, "\
  4375.   CVS server internal error: unhandled case in server_updated");
  4376. !         if (finfo->rcs->expand != NULL &&
  4377. !             strcmp(finfo->rcs->expand, "b") == 0)
  4378. !             bin = OPEN_BINARY;
  4379. !         fd = CVS_OPEN (finfo->file, O_RDONLY | bin, 0);
  4380.           if (fd < 0)
  4381.               error (1, errno, "reading %s", finfo->fullname);
  4382.           fd = filter_through_gzip (fd, 1, file_gzip_level, &gzip_pid);
  4383. ***************
  4384. *** 3597,3607 ****
  4385.           else if (filebuf == NULL)
  4386.           {
  4387.           long status;
  4388.   
  4389. !         f = CVS_FOPEN (finfo->file, "rb");
  4390.           if (f == NULL)
  4391.               error (1, errno, "reading %s", finfo->fullname);
  4392. !         status = buf_read_file (f, size, &list, &last);
  4393.           if (status == -2)
  4394.               (*protocol->memory_error) (protocol);
  4395.           else if (status != 0)
  4396. --- 3629,3643 ----
  4397.           else if (filebuf == NULL)
  4398.           {
  4399.           long status;
  4400. +         int bin = 0;
  4401.   
  4402. !         if (finfo->rcs->expand != NULL &&
  4403. !             strcmp(finfo->rcs->expand, "b") == 0)
  4404. !             bin = 1;
  4405. !         f = CVS_FOPEN (finfo->file, bin ? "rb" : "r");
  4406.           if (f == NULL)
  4407.               error (1, errno, "reading %s", finfo->fullname);
  4408. !         status = buf_read_file_to_eof (f, &list, &last);
  4409.           if (status == -2)
  4410.               (*protocol->memory_error) (protocol);
  4411.           else if (status != 0)
  4412. ***************
  4413. *** 3609,3614 ****
  4414. --- 3645,3651 ----
  4415.                  finfo->fullname);
  4416.           if (fclose (f) == EOF)
  4417.               error (1, errno, "reading %s", finfo->fullname);
  4418. +         size = buf_chain_length (list);
  4419.           }
  4420.       }
  4421.   
  4422. ***************
  4423. *** 4395,4400 ****
  4424. --- 4432,4442 ----
  4425.        int argc;
  4426.        char **argv;
  4427.   {
  4428. + #ifdef RSHD_NOT_TRANSPARENT
  4429. +     setmode (STDIN_FILENO, O_BINARY);
  4430. +     setmode (STDOUT_FILENO, O_BINARY);
  4431. +     setmode (STDERR_FILENO, O_BINARY);
  4432. + #endif
  4433.       if (argc == -1)
  4434.       {
  4435.       static const char *const msg[] =
  4436. Index: src/update.c
  4437. ===================================================================
  4438. RCS file: e:/cvsroot/ccvs/src/update.c,v
  4439. retrieving revision 1.7
  4440. retrieving revision 1.5.2.5
  4441. diff -c -r1.7 -r1.5.2.5
  4442. *** src/update.c    1998/07/13 15:25:02    1.7
  4443. --- src/update.c    1998/07/16 00:33:55    1.5.2.5
  4444. ***************
  4445. *** 487,494 ****
  4446.       time_t now;
  4447.   
  4448.       (void) time (&now);
  4449. !     if (now == last_register_time)
  4450. !         sleep (1);            /* to avoid time-stamp races */
  4451.       }
  4452.   
  4453.       return (err);
  4454. --- 487,497 ----
  4455.       time_t now;
  4456.   
  4457.       (void) time (&now);
  4458. !     if (now < last_register_time + FILESYSTEM_TICK)
  4459. !     {
  4460. !         /* to avoid time-stamp races */
  4461. !         sleep (last_register_time + FILESYSTEM_TICK - now);
  4462. !     }
  4463.       }
  4464.   
  4465.       return (err);
  4466. ***************
  4467. *** 1685,1691 ****
  4468.              violation.  */
  4469.           if (CVS_STAT (vers_ts->srcfile->path, file_info) < 0)
  4470.           error (1, errno, "could not stat %s", vers_ts->srcfile->path);
  4471. !         if (chmod (finfo->file,
  4472.                  file_info->st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH))
  4473.           < 0)
  4474.           error (0, errno, "cannot change mode of file %s", finfo->file);
  4475. --- 1688,1694 ----
  4476.              violation.  */
  4477.           if (CVS_STAT (vers_ts->srcfile->path, file_info) < 0)
  4478.           error (1, errno, "could not stat %s", vers_ts->srcfile->path);
  4479. !         if (CVS_CHMOD (finfo->file,
  4480.                  file_info->st_mode & ~(S_IWRITE | S_IWGRP | S_IWOTH))
  4481.           < 0)
  4482.           error (0, errno, "cannot change mode of file %s", finfo->file);
  4483. Index: windows-NT/ChangeLog
  4484. ===================================================================
  4485. RCS file: e:/cvsroot/ccvs/windows-NT/ChangeLog,v
  4486. retrieving revision 1.7
  4487. retrieving revision 1.5.2.3
  4488. diff -c -r1.7 -r1.5.2.3
  4489. *** windows-NT/ChangeLog    1998/07/13 15:25:15    1.7
  4490. --- windows-NT/ChangeLog    1998/07/16 00:07:30    1.5.2.3
  4491. ***************
  4492. *** 1,3 ****
  4493. --- 1,13 ----
  4494. + 1998-07-06  Murray Bishop  <bishop@acnielsen.com.au>
  4495. +     * options.h [FILESYSTEM_TICK]: Define seconds per tick as 2 for FAT.
  4496. + 1998-07-02  Murray Bishop  <bishop@acnielsen.com.au>
  4497. +     * run.c (run_popen): Don't change ' to " (breaks sanity.sh info-10).
  4498. +     * run.c (requote): Remove. Useless for Windows-NT CMD.EXE and also
  4499. +     for Windows-95 COMMAND.COM.
  4500.   1998-07-01  Jim Kingdon  <kingdon@harvey.cyclic.com>
  4501.   
  4502.       * startserver.c (wnt_shutdown_server): Check for errors from close().
  4503. ***************
  4504. *** 11,18 ****
  4505. --- 21,60 ----
  4506.       (wnt_shutdown_server): use the new global to decide whether or not
  4507.       to call socket routines or simply use close.
  4508.       
  4509. + 1998-06-23  Murray Bishop  <bishop@acnielsen.com.au>
  4510. +     * filesubr.c (rename_file): If either from or to is open in RCS
  4511. +     cache, close RCS cache before any other file operations.
  4512. + 1998-06-19  Murray Bishop  <bishop@acnielsen.com.au>
  4513.   
  4514. +     * filesubr.c (rename_readonly_file): add function so renames
  4515. +     work when using Novell IntranetWare client.
  4516. +     * filesubr.c (rename_file): try rename_readonly_file before 
  4517. +         calling error.
  4518. +     * filesubr.c (wnt_rename): try rename_readonly_file before
  4519. +         returning < 0.
  4520. + 1998-06-16  Murray Bishop  <bishop@acnielsen.com.au>
  4521. +     * config.h (CVS_RENAME): Define.
  4522. +     * filesubr.c (wnt_rename): If the oldname is open in rcs cache,
  4523. +     close it before attempting rename(). - under windows and OS/2
  4524. +     you can't rename an open file (nor pass binfiles2-10, join2-20,
  4525. +     (death-)71.
  4526. +     See also http://www.cyclic.com/cvs/dev-emx27.txt, which suggests
  4527. +     identical function (os2_rename) in emx-new/system.c.
  4528. +     * filesubr.c (expand_wild): When path whose last component is
  4529. +     "." is passed as argument, copy that rather than replacing by
  4530. +     last component of parent directory.
  4531.   1998-06-11  Jim Kingdon
  4532. +     * config.h (CVS_STAT, CVS_LSTAT): Define.
  4533. +     * filesubr.c, config.h (wnt_stat, wnt_lstat, check_statbuf):
  4534. +     New functions.
  4535. + Thu Jun 11 21:58:58 1998 by kingdon
  4536.   
  4537.       * config.h (CVS_STAT, CVS_LSTAT): Define.
  4538.       * filesubr.c, config.h (wnt_stat, wnt_lstat, check_statbuf):
  4539. Index: windows-NT/config.h
  4540. ===================================================================
  4541. RCS file: e:/cvsroot/ccvs/windows-NT/config.h,v
  4542. retrieving revision 1.4
  4543. retrieving revision 1.3.2.2
  4544. diff -c -r1.4 -r1.3.2.2
  4545. *** windows-NT/config.h    1998/06/23 15:32:10    1.4
  4546. --- windows-NT/config.h    1998/07/16 00:07:30    1.3.2.2
  4547. ***************
  4548. *** 240,245 ****
  4549. --- 240,249 ----
  4550.   #define CVS_LSTAT wnt_lstat
  4551.   extern int wnt_lstat ();
  4552.   
  4553. + /* Windows NT rename needs 'to' doesn't exist and 'from' isn't open */
  4554. + #define CVS_RENAME wnt_rename
  4555. + extern int wnt_rename(const char * from, const char * to);
  4556.   /* This function doesn't exist under Windows NT; we
  4557.      provide a stub.  */
  4558.   extern int readlink (char *path, char *buf, int buf_size);
  4559. Index: windows-NT/filesubr.c
  4560. ===================================================================
  4561. RCS file: e:/cvsroot/ccvs/windows-NT/filesubr.c,v
  4562. retrieving revision 1.6
  4563. retrieving revision 1.5.2.2
  4564. diff -c -r1.6 -r1.5.2.2
  4565. *** windows-NT/filesubr.c    1998/06/23 15:32:11    1.6
  4566. --- windows-NT/filesubr.c    1998/07/16 00:07:30    1.5.2.2
  4567. ***************
  4568. *** 23,28 ****
  4569. --- 23,29 ----
  4570.   #include "cvs.h"
  4571.   
  4572.   static int deep_remove_dir PROTO((const char *path));
  4573. + static int rename_readonly_file PROTO((const char *from, const char *to));
  4574.   
  4575.   /* Copies "from" to "to".  Note that the functionality here is similar
  4576.      to the win32 function CopyFile, but (1) we copy LastAccessTime and
  4577. ***************
  4578. *** 387,396 ****
  4579.       if (noexec)
  4580.       return;
  4581.   
  4582. !     /* Win32 unlink is stupid --- it fails if the file is read-only  */
  4583. !     chmod(to, S_IWRITE);
  4584. !     unlink(to);
  4585. !     if (rename (from, to) < 0)
  4586.       error (1, errno, "cannot rename file %s to %s", from, to);
  4587.   }
  4588.   
  4589. --- 388,394 ----
  4590.       if (noexec)
  4591.       return;
  4592.   
  4593. !     if (wnt_rename (from, to) < 0)
  4594.       error (1, errno, "cannot rename file %s to %s", from, to);
  4595.   }
  4596.   
  4597. ***************
  4598. *** 413,418 ****
  4599. --- 411,421 ----
  4600.   
  4601.       /* Win32 unlink is stupid - it fails if the file is read-only */
  4602.       chmod (f, _S_IWRITE);
  4603. +     /* And also if the file is open */
  4604. +     if (RCS_get_cached ( f ) != NULL)
  4605. +     RCS_cache_close ();
  4606.       return (unlink (f));
  4607.   }
  4608.   
  4609. ***************
  4610. *** 436,443 ****
  4611.       return (0);
  4612.   
  4613.       /* Win32 unlink is stupid - it fails if the file is read-only */
  4614. !     chmod (f, _S_IWRITE);
  4615. !     if (unlink (f) != 0)
  4616.       {
  4617.       /* under Windows NT, unlink returns EACCES if the path
  4618.          is a directory.  Under Windows 95, ENOENT.  */
  4619. --- 439,445 ----
  4620.       return (0);
  4621.   
  4622.       /* Win32 unlink is stupid - it fails if the file is read-only */
  4623. !     if (unlink_file (f) != 0)
  4624.       {
  4625.       /* under Windows NT, unlink returns EACCES if the path
  4626.          is a directory.  Under Windows 95, ENOENT.  */
  4627. ***************
  4628. *** 484,491 ****
  4629.           sprintf (buf, "%s/%s", path, dp->d_name);
  4630.   
  4631.           /* Win32 unlink is stupid - it fails if the file is read-only */
  4632. !         chmod (buf, _S_IWRITE);
  4633. !         if (unlink (buf) != 0 )
  4634.           {
  4635.           /* Under Windows NT, unlink returns EACCES if the path
  4636.              is a directory.  Under Windows 95, ENOENT.  It
  4637. --- 486,492 ----
  4638.           sprintf (buf, "%s/%s", path, dp->d_name);
  4639.   
  4640.           /* Win32 unlink is stupid - it fails if the file is read-only */
  4641. !         if (unlink_file (buf) != 0 )
  4642.           {
  4643.           /* Under Windows NT, unlink returns EACCES if the path
  4644.              is a directory.  Under Windows 95, ENOENT.  It
  4645. ***************
  4646. *** 755,760 ****
  4647. --- 756,772 ----
  4648.          As nearly as I can guess, this bug has existed since
  4649.          expand_wild was first created.  At least, it is in CVS 1.9 (I
  4650.          just tried it).  */
  4651. +     /* I (Murray Bishop) got failures on sanity.sh death2-diff-5,
  4652. +           branches2-11 and join-4, using Windows NT 4.0 fixpack 3,
  4653. +        Microsoft Visual C++ 4.2.
  4654. +        After getting nowhere with the debugger, I found the note above
  4655. +        and did some experiments on 17 June 98.
  4656. +        FindFirstFile does these strange things when cvs (1.9.27) is
  4657. +        run in /tmp/cvs-sanity/1/first-dir :
  4658. +        argv[i]        fdata.cFileName
  4659. +        .            first-dir
  4660. +        ../first-dir/.    first-dir */
  4661.   
  4662.       /* FindFirstFile doesn't return pathnames, so we have to do
  4663.          this ourselves.  Luckily, it's no big deal, since globbing
  4664. ***************
  4665. *** 822,834 ****
  4666.   
  4667.           /* Copy the file name. */
  4668.           
  4669. !         if (fncmp (argv[i] + dirname_length, fdata.cFileName) == 0)
  4670.               /* We didn't expand a wildcard; we just matched a filename.
  4671.                  Use the file name as specified rather than the filename
  4672.                  which exists in the directory (they may differ in case).
  4673.                  This is needed to make cvs add on a directory consistently
  4674.                  use the name specified on the command line, but it is
  4675.                  probably a good idea in other contexts too.  */
  4676.               strcpy (new_argv[new_argc], argv[i]);
  4677.           else
  4678.               strcat (new_argv[new_argc], fdata.cFileName);
  4679. --- 834,850 ----
  4680.   
  4681.           /* Copy the file name. */
  4682.           
  4683. !         if (fncmp (argv[i] + dirname_length, fdata.cFileName) == 0
  4684. !             || strcmp (argv[i] + dirname_length, ".") == 0)
  4685.               /* We didn't expand a wildcard; we just matched a filename.
  4686.                  Use the file name as specified rather than the filename
  4687.                  which exists in the directory (they may differ in case).
  4688.                  This is needed to make cvs add on a directory consistently
  4689.                  use the name specified on the command line, but it is
  4690.                  probably a good idea in other contexts too.  */
  4691. +             /* comparison with "." copes with FindFirstFile returning
  4692. +             name of parent directory when given "." (Thats not a
  4693. +             feature, its a bug) */
  4694.               strcpy (new_argv[new_argc], argv[i]);
  4695.           else
  4696.               strcat (new_argv[new_argc], fdata.cFileName);
  4697. ***************
  4698. *** 902,904 ****
  4699. --- 918,1044 ----
  4700.       check_statbuf (file, sb);
  4701.       return retval;
  4702.   }
  4703. + /*
  4704. +    With Windows-NT 4.0 Service Pack 3 and Novell IntranetWare Client 4.11a
  4705. +    and Microsoft Visual C++ 4.2,
  4706. +    attempts to rename readonly files fail with "Permission denied".
  4707. +    (This doesn't happen with Microsoft Netware Client, nor on NTFS local
  4708. +    file system)
  4709. +    In addition, with a Netware server version 4.11 that was built by an
  4710. +    upgrade from 4.10 without doing the filesystem backup and restore
  4711. +    Novell recommended, I get flakey failures to rename readonly files
  4712. +    (about 4 per pass of sanity.sh). The retry code below works around
  4713. +    that.
  4714. +    On a different server where 4.11 was installed on a clean machine,
  4715. +    no such problem happened.
  4716. +    Make from not readonly, try rename, restore modes on file.
  4717. +    Return what rename did.
  4718. +  */
  4719. + int
  4720. + rename_readonly_file (from, to)
  4721. +     const char *from;
  4722. +     const char *to;
  4723. + {
  4724. +     struct stat sb;
  4725. +     int rename_rc;
  4726. +     const char *final_name;
  4727. +     int rename_errno;
  4728. +     static int retrying_rename = 0;
  4729. +     if (trace)
  4730. + #ifdef SERVER_SUPPORT
  4731. +     (void) fprintf (stderr, "%c-> rename_readonly_file(%s,%s)\n",
  4732. +             (server_active) ? 'S' : ' ', from, to);
  4733. + #else
  4734. +     (void) fprintf (stderr, "-> rename_readonly_file(%s,%s)\n", from, to);
  4735. + #endif
  4736. +     if (noexec)
  4737. +     return 0;
  4738. +     /* If we can't stat from, we probably won't be able to rename it */
  4739. +     if (stat (from, &sb) < 0)
  4740. +     return -1;
  4741. +     if (chmod (from, sb.st_mode | S_IWRITE | S_IWGRP | S_IWOTH) < 0)
  4742. +     error (0, errno, "cannot change mode of file %s", from);
  4743. +     rename_rc = rename (from, to);
  4744. +     rename_errno = errno;
  4745. +     final_name = (rename_rc < 0) ? from : to;
  4746. +     if (chmod (final_name, sb.st_mode) < 0)
  4747. +     error (0, errno, "cannot restore mode of file %s", final_name);
  4748. +     /*
  4749. +     With Windows-NT 4.0 Service Pack 3 and Novell IntranetWare Client 4.11a
  4750. +     and Microsoft Visual C++ 4.2, in sanity.sh we get occasional
  4751. +     "cannot rename file .../,file3, to .../file3,v: File exists"
  4752. +     in various places (not always in same place).
  4753. +     (This doesn't happen or on NTFS local file system)
  4754. +    */
  4755. +     if (rename_rc < 0)
  4756. +     {
  4757. +     ++retrying_rename;
  4758. +     if (retrying_rename <= 3)
  4759. +         {
  4760. +         error (0, rename_errno,
  4761. +         " rename_readonly_file(%s,%s) failed. "
  4762. +         "waiting %d seconds before retry\n",
  4763. +         from, to, retrying_rename);
  4764. +         sleep( retrying_rename /*seconds*/ );
  4765. +         rename_rc = wnt_rename( from, to );
  4766. +         }
  4767. +     --retrying_rename;
  4768. +     if (retrying_rename == 0 && rename_rc == 0)
  4769. +         {
  4770. + #ifdef SERVER_SUPPORT
  4771. +         (void) fprintf (stderr, "%c retry succeeded.\n",
  4772. +         (server_active) ? 'S' : ' ');
  4773. + #else
  4774. +         (void) fprintf (stderr, " retry succeeded.\n");
  4775. + #endif
  4776. +         }
  4777. +     }
  4778. +     return rename_rc;
  4779. + }
  4780. + int wnt_rename(const char * from, const char * to)
  4781. + {
  4782. +     int rename_rc;
  4783. +     if (trace)
  4784. + #ifdef SERVER_SUPPORT
  4785. +     (void) fprintf (stderr, "%c-> wnt_rename(%s,%s)\n",
  4786. +             (server_active) ? 'S' : ' ', from, to);
  4787. + #else
  4788. +     (void) fprintf (stderr, "-> wnt_rename(%s,%s)\n", from, to);
  4789. + #endif
  4790. +     if (noexec)
  4791. +     return 0;
  4792. +     /* Win32 unlink is stupid --- it fails if the file is read-only  */
  4793. +     /* Win32 unlink also fails when file is open via Novell IntranetWare */
  4794. +     /*
  4795. +     Under windows and OS/2 you can't rename an open file, and
  4796. +     the target file must not exist before rename.
  4797. +     If you're Windows-NT on a Netware fileserver via IntranetWare,
  4798. +     the source file must not be readonly.
  4799. +     See also http://www.cyclic.com/cvs/dev-emx27.txt, which suggests
  4800. +     identical function (os2_rename) in emx-new/system.c
  4801. +     and provides the two RCS functions mentioned here.
  4802. +     */
  4803. +     unlink_file ( to );
  4804. +     if (RCS_get_cached ( from ) != NULL)
  4805. +     RCS_cache_close ();
  4806. +     rename_rc = rename ( from, to);
  4807. +     if (rename_rc < 0)
  4808. +     {
  4809. +     rename_rc = rename_readonly_file ( from, to);
  4810. +     }
  4811. +     return rename_rc;
  4812. + }
  4813. Index: windows-NT/options.h
  4814. ===================================================================
  4815. RCS file: e:/cvsroot/ccvs/windows-NT/options.h,v
  4816. retrieving revision 1.3
  4817. retrieving revision 1.3.2.1
  4818. diff -c -r1.3 -r1.3.2.1
  4819. *** windows-NT/options.h    1998/05/31 01:02:56    1.3
  4820. --- windows-NT/options.h    1998/07/16 00:07:30    1.3.2.1
  4821. ***************
  4822. *** 165,167 ****
  4823. --- 165,184 ----
  4824.   #ifndef STDC_HEADERS
  4825.   extern void exit ();
  4826.   #endif
  4827. + /*
  4828. +  * In various places, CVS waits a tick of the filesystem clock to make
  4829. +  * sure that files have different timestamps. This was coded as sleep (1).
  4830. +  * For some filesystems (eg FAT, FAT32) 2 seconds are needed.
  4831. +  * I've defined FILESYSTEM_TICK in windows-NT/options.h,
  4832. +  * and in src/cvs.h a default of 1 second is defined.
  4833. +  *
  4834. +  * I'm pretty sure that CVS doesn't do enough waiting, but it's too
  4835. +  * hard for me to figure out where to add more.
  4836. +  * See sanity.sh [FILESYSTEM_TICK] for more information.
  4837. +  */
  4838. + #ifndef FILESYSTEM_TICK
  4839. + #define FILESYSTEM_TICK 2
  4840. + /* #define FILESYSTEM_TICK 1 */
  4841. + #endif
  4842. Index: windows-NT/run.c
  4843. ===================================================================
  4844. RCS file: e:/cvsroot/ccvs/windows-NT/run.c,v
  4845. retrieving revision 1.3
  4846. retrieving revision 1.3.2.1
  4847. diff -c -r1.3 -r1.3.2.1
  4848. *** windows-NT/run.c    1998/05/31 01:02:57    1.3
  4849. --- windows-NT/run.c    1998/07/16 00:07:31    1.3.2.1
  4850. ***************
  4851. *** 296,316 ****
  4852.       }
  4853.   }
  4854.   
  4855. - static char *
  4856. - requote (const char *cmd)
  4857. - {
  4858. -     char *requoted = xmalloc (strlen (cmd) + 1);
  4859. -     char *p = requoted;
  4860. -     strcpy (requoted, cmd);
  4861. -     while ((p = strchr (p, '\'')) != NULL)
  4862. -     {
  4863. -         *p++ = '"';
  4864. -     }
  4865. -     return requoted;
  4866. - }
  4867.   FILE *
  4868.   run_popen (cmd, mode)
  4869.       const char *cmd;
  4870. --- 296,301 ----
  4871. ***************
  4872. *** 326,335 ****
  4873.       if (noexec)
  4874.       return (NULL);
  4875.   
  4876. !     /* If the command string uses single quotes, turn them into
  4877. !        double quotes.  */
  4878.       {
  4879. -         char *requoted = requote (cmd);
  4880.       /* Save and restore our file descriptors to work around
  4881.          apparent bugs in _popen.  We are perhaps better off using
  4882.          the win32 functions instead of _popen.  */
  4883. --- 311,321 ----
  4884.       if (noexec)
  4885.       return (NULL);
  4886.   
  4887. !     /* If the command string uses single quotes, don't turn them into
  4888. !        double quotes like for OS/2 CMD.EXE.
  4889. !     Windows-NT CMD.EXE and Windows-95 COMMAND.COM don't recognize
  4890. !     " as a quoting mechanism. */
  4891.       {
  4892.       /* Save and restore our file descriptors to work around
  4893.          apparent bugs in _popen.  We are perhaps better off using
  4894.          the win32 functions instead of _popen.  */
  4895. ***************
  4896. *** 337,343 ****
  4897.       int old_stdout = dup (STDOUT_FILENO);
  4898.       int old_stderr = dup (STDERR_FILENO);
  4899.   
  4900. !     FILE *result = popen (requoted, mode);
  4901.   
  4902.       dup2 (old_stdin, STDIN_FILENO);
  4903.       dup2 (old_stdout, STDOUT_FILENO);
  4904. --- 323,329 ----
  4905.       int old_stdout = dup (STDOUT_FILENO);
  4906.       int old_stderr = dup (STDERR_FILENO);
  4907.   
  4908. !     FILE *result = popen (cmd, mode);
  4909.   
  4910.       dup2 (old_stdin, STDIN_FILENO);
  4911.       dup2 (old_stdout, STDOUT_FILENO);
  4912. ***************
  4913. *** 346,352 ****
  4914.       close (old_stdout);
  4915.       close (old_stderr);
  4916.   
  4917. -     free (requoted);
  4918.       return result;
  4919.       }
  4920.   }
  4921. --- 332,337 ----
  4922.