File: cvs-1.10.1-statushash

package info (click to toggle)
curves 0.8.7
  • links: PTS
  • area: main
  • in suites: slink
  • size: 704 kB
  • ctags: 1,001
  • sloc: cpp: 6,197; ansic: 519; makefile: 270; sh: 192; fortran: 149
file content (1710 lines) | stat: -rw-r--r-- 51,954 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/ChangeLog cvs-1.10.1p1/ChangeLog
--- cvs-1.10.1/ChangeLog	Tue Sep  1 06:48:00 1998
+++ cvs-1.10.1p1/ChangeLog	Thu Sep 10 14:10:44 1998
@@ -1,3 +1,8 @@
+1998-09-08  Marc Singer  <elf@netcom.netcom.com>
+
+	* config.h.in: Added STATUSHASH_SUPPORT macro.
+	* configure.in: Same.
+
 1998-08-31  Jim Kingdon  <kingdon@harvey.cyclic.com>
 
 	* INSTALL (Tested platforms): Add Solaris x86 (reported by Jeremy of
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/config.h.in cvs-1.10.1p1/config.h.in
--- cvs-1.10.1/config.h.in	Tue Jun  2 10:29:50 1998
+++ cvs-1.10.1p1/config.h.in	Thu Sep 10 14:10:44 1998
@@ -85,6 +85,9 @@
    clients.  */
 #undef SERVER_SUPPORT
 
+/* Define if you want CVS to be able enable status hashing features.  */
+#undef STATUSHASH_SUPPORT
+
 /* Define if you want to use the password authenticated server.  */
 #undef AUTH_SERVER_SUPPORT
 
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/configure.in cvs-1.10.1p1/configure.in
--- cvs-1.10.1/configure.in	Tue Jun  2 10:29:56 1998
+++ cvs-1.10.1p1/configure.in	Thu Sep 10 14:10:44 1998
@@ -216,18 +216,21 @@
 includeopt=
 AC_SUBST(includeopt)
 if test -n "$krb_h"; then
+#  elf, Perhaps not the most elegant solution, but we do a prelim
+#  check for des so we know that we can include it when looking for kerberos
+  AC_CHECK_LIB(des,printf,[krb_otherlib="-ldes"])
   krb_lib=
   if test "$cross_compiling" != yes && test -r $KRB4/lib/libkrb.a; then
        hold_ldflags=$LDFLAGS
        LDFLAGS="-L${KRB4}/lib $LDFLAGS"
-       AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=${KRB4}/lib],
+       AC_CHECK_LIB(krb,krb_create_ticket,[krb_lib=yes krb_libdir=${KRB4}/lib],
            [LDFLAGS=$hold_ldflags
             # Using open here instead of printf so we don't
             # get confused by the cached value for printf from above.
-            AC_CHECK_LIB(krb,open,[krb_lib=yes krb_libdir=])])
+            AC_CHECK_LIB(krb,krb_create_ticket,[krb_lib=yes krb_libdir=],[],${krb_otherlib})],[],${krb_otherlib})
        LDFLAGS=$hold_ldflags
   else
-       AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=])
+       AC_CHECK_LIB(krb,printf,[krb_lib=yes krb_libdir=],[],${krb_otherlib})
   fi
   if test -n "$krb_lib"; then
     AC_DEFINE(HAVE_KERBEROS)
@@ -325,6 +328,13 @@
   AC_DEFINE(SERVER_SUPPORT)
   enable_server=yes
 fi])
+AC_ARG_ENABLE(statushash,
+[  --enable-statushash     include code for status hashing (default)
+  --disable-statushash    exclude code for status hashing],
+[if test "$enable_statushash" = yes; then
+  AC_DEFINE(STATUSHASH_SUPPORT)
+fi],
+[AC_DEFINE(STATUSHASH_SUPPORT)])
 
 ### The auth server needs to be able to check passwords against passwd
 ### file entries, so we only #define AUTH_SERVER_SUPPORT if we can
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/.gdbinit cvs-1.10.1p1/src/.gdbinit
--- cvs-1.10.1/src/.gdbinit	Wed Dec 31 16:00:00 1969
+++ cvs-1.10.1p1/src/.gdbinit	Sat Sep 12 17:15:56 1998
@@ -0,0 +1,2 @@
+file ./cvs
+set args -n update -H /home/elf/src/curves/foo/curves.4
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/ChangeLog cvs-1.10.1p1/src/ChangeLog
--- cvs-1.10.1/src/ChangeLog	Tue Sep  1 23:30:38 1998
+++ cvs-1.10.1p1/src/ChangeLog	Fri Sep 11 14:11:32 1998
@@ -1,3 +1,60 @@
+1998-09-11  Marc Singer  <elf@netcom.netcom.com>
+
+	* client.c (send_fileproc): Support for SEND_MODIFIED_ONLY in
+	send_files.  We transmit *only* Modified-hashed file entries since
+	we already know the status of Unmodified ones.
+
+	* status.c (cvsstatus): -M switch to return status of any file
+	that may have been modified.  This is intended for use with update
+	to optimize transmission of locally modified files.
+
+1998-09-11  Marc Singer  <elf@netcom.com>
+
+	* status.c (status_fileproc): Added e_report status output,
+	shortened format that is a little easier to parse.  This isn't
+	complete and it isn't 'necessarily' a big win.
+
+1998-09-10  Marc Singer  <elf@netcom.com>
+
+	* update.c (update): Added a status hash option here, but it
+	doesn't work because the server performs the merge.  This *could*
+	work if we move the patch step to the local machine.
+
+1998-09-08  Marc Singer  <elf@netcom.com>
+
+	* vers_ts.c (time_stamp_server): Interpret timestamps with leading
+	'#' as hash codes.  Convert them to numbers and store in vers_ts.
+	Also, we set the ts_user to string value of the hash (skipping the
+	'#') so we don't have a blank timestamp.
+
+	* status.c (cvsstatus): Added -H option to status command to
+	send hashes for modified files.
+	(status_fileproc): Report the hash for the repository revision
+	that the user checked-out.  Also tied to -H, but deserves another
+	option. 
+
+	* server.c (serve_modified_hashed): Implement receipt of
+	Modified-hashed protocol request.  All we do is store the string
+	in the Entry table as a timestamp with leading '#'.
+
+	* no_diff.c (No_Difference): Perform hash comparison when there is
+	a rglHash value in the vers structure.  The discovered value came
+	from the client.
+
+	* main.c (main): Augmented version command to report on optional
+	components.  This may not be the best way, but it help to know
+	which version is running.
+
+	* cvs.h (struct vers_ts): Make room for hash values in the vers_ts
+	structure.  This appears to be the best place to store them.
+
+	* client.h: SEND_HASH constant.
+
+	* client.c (send_fileproc): Using Modified-hashed protocol to send
+	hash values instead of the file source.
+
+	* Makefile.in (SOURCES): Added sha.c/sha.o to Makefile.
+
 Wed Sep  2 02:30:22 1998  Jim Kingdon  <kingdon@pennington.cyclic.com>
 
 	* Version 1.10.1.
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/Makefile.in cvs-1.10.1p1/src/Makefile.in
--- cvs-1.10.1/src/Makefile.in	Thu Jun 18 10:21:42 1998
+++ cvs-1.10.1p1/src/Makefile.in	Thu Sep 10 14:10:44 1998
@@ -43,7 +43,7 @@
 lock.c log.c login.c logmsg.c main.c mkmodules.c modules.c myndbm.c no_diff.c \
 parseinfo.c patch.c rcs.c rcscmds.c recurse.c release.c remove.c repos.c \
 root.c rtag.c scramble.c server.c status.c subr.c filesubr.c run.c \
-tag.c update.c watch.c wrapper.c vers_ts.c version.c zlib.c
+tag.c update.c watch.c wrapper.c vers_ts.c version.c zlib.c sha.c
 
 OBJECTS = add.o admin.o buffer.o checkin.o checkout.o classify.o client.o \
 commit.o create_adm.o cvsrc.o diff.o edit.o entries.o expand_path.o \
@@ -52,7 +52,7 @@
 parseinfo.o patch.o rcs.o rcscmds.o recurse.o release.o remove.o repos.o \
 root.o rtag.o scramble.o server.o status.o tag.o update.o \
 watch.o wrapper.o vers_ts.o \
-subr.o filesubr.o run.o version.o error.o zlib.o
+subr.o filesubr.o run.o version.o error.o zlib.o sha.o
 
 HEADERS = buffer.h cvs.h rcs.h hardlink.h hash.h myndbm.h \
 	update.h server.h client.h error.h fileattr.h edit.h watch.h
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/client.c cvs-1.10.1p1/src/client.c
--- cvs-1.10.1/src/client.c	Tue Sep  1 06:54:46 1998
+++ cvs-1.10.1p1/src/client.c	Sat Sep 12 23:16:54 1998
@@ -143,6 +143,7 @@
 static void handle_m PROTO((char *, int));
 static void handle_e PROTO((char *, int));
 static void handle_f PROTO((char *, int));
+static void handle_s PROTO((char *, int));
 static void handle_notified PROTO((char *, int));
 
 static size_t try_read_from_server PROTO ((char *, size_t));
@@ -155,6 +156,16 @@
    decide which command-line arguments to send.  */
 List *dirs_sent_to_server = NULL;
 
+/* elf: list of Needs Merge files from 'S' protocol.  This is a
+   special result protocol ONLY for controlling which files are send
+   when SEND_HASH and SEND_MODIFIED_LIST is set.  While I could have
+   generalized the filtering of the 'S' protocol, it seems best not to
+   since there are few hooks in this code for passing data back and
+   forth.  I could use a function pointer to call a procedure in
+   update.c for filtering, but I'd still need to modify send_files()
+   to accept a list. */
+static List* listModified = (List*) NULL;
+
 static int is_arg_a_parent_or_listed_dir PROTO((Node *, void *));
 
 static int
@@ -3327,6 +3338,51 @@
     }
 }
 
+/* handle_s
+
+   filter the response which must be status lines with the e_report,
+   single line style.  Anything that is Needs Merge is added to the
+   listModified global and can be used to optimize the update
+   command. 
+
+*/
+
+static void
+handle_s (args, len)
+    char *args;
+    int len;
+{
+  Node* p;
+  char* szPath = NULL;
+
+  fprintf (stderr, "handle_s %s\n", args);
+
+  for (;*args; ++args) {
+    if (*args != '/' || *(args + 1) != '/')
+      continue;
+    if (!szPath) {
+      szPath = args + 2;
+      continue;
+    }
+    else
+      *args = 0;		/* Null terminate filename */
+    args += 2;
+    break;
+  }
+  if (strncmp (args, "Needs Merge", 11) != 0)
+    return;
+
+  if (!listModified && !(listModified = getlist ()))
+    return;
+  p = getnode ();
+  fprintf (stderr, " p 0x%x\n", p);
+  p->type = FILES;
+  p->key = xstrdup (szPath);
+  fprintf (stderr, " szPath 0x%x  p->key 0x%x\n", szPath, p->key);
+  if (addnode (listModified, p) != 0)
+    freenode (p);
+}
+
 #endif /* CLIENT_SUPPORT */
 #if defined(CLIENT_SUPPORT) || defined(SERVER_SUPPORT)
 
@@ -3386,6 +3442,7 @@
     RSP_LINE("Mbinary", handle_mbinary, response_type_normal, rs_optional),
     RSP_LINE("E", handle_e, response_type_normal, rs_essential),
     RSP_LINE("F", handle_f, response_type_normal, rs_optional),
+    RSP_LINE("S", handle_s, response_type_normal, rs_optional),
     RSP_LINE("MT", handle_mt, response_type_normal, rs_optional),
     /* Possibly should be response_type_error.  */
     RSP_LINE(NULL, NULL, response_type_normal, rs_essential)
@@ -3481,6 +3538,11 @@
 get_server_responses ()
 {
     struct response *rs;
+
+				/* Erase list before every command */
+    if (listModified)
+      dellist (&listModified);
+
     do
     {
 	char *cmd;
@@ -4988,6 +5050,11 @@
     int build_dirs;
     int force;
     int no_contents;
+#if STATUSHASH_SUPPORT
+    int send_hash;
+    int modified_only;	/* Implies send_hash */
+    int modified_list;	/* Implies send_hash; Use list to prune request data */
+#endif
 };
 
 static int send_fileproc PROTO ((void *callerdat, struct file_info *finfo));
@@ -5017,6 +5084,16 @@
     else
 	filename = finfo->file;
 
+#if STATUSHASH_SUPPORT
+				/* Only get status on those files that
+				   *could* be modified  */
+    if (!(args->modified_only
+	  && (   vers->ts_user == NULL
+	      || (   vers->ts_rcs != NULL
+		  && !args->force
+		  && strcmp (vers->ts_user, vers->ts_rcs) == 0)))) {
+#endif
+
     if (vers->vn_user != NULL)
     {
 	/* The Entries request.  */
@@ -5100,6 +5177,30 @@
 	     || args->force
 	     || strcmp (vers->ts_user, vers->ts_rcs) != 0)
     {
+		/* elf: this is a little more involved with status
+		   hashing.  We use a new version of Modified,
+		   Modified-hashed, when the request is supported
+		   and when the caller indicates SEND_HASH.  */ 
+#if STATUSHASH_SUPPORT
+        if (args->send_hash && supported_request ("Modified-hashed")
+	    && (!args->modified_list
+		|| findnode (listModified, finfo->fullname) == NULL)) {
+	  unsigned long rgl[5];
+	  char sz[80];
+	  //	  fprintf (stderr, "hashing %s =>", filename);
+	  sha_file (filename, rgl);
+	  //	  fprintf (stderr, "(SHA) %08lx %08lx %08lx %08lx %08lx\n", 
+	  //		   rgl[0], rgl[1], rgl[2], rgl[3], rgl[4]);
+	  sprintf (sz, "(SHA) %08lx %08lx %08lx %08lx %08lx", 
+		   rgl[0], rgl[1], rgl[2], rgl[3], rgl[4]);
+	  send_to_server ("Modified-hashed ", 0);
+	  send_to_server (filename, 0);
+	  send_to_server ("\012", 1);
+	  send_to_server (sz, 0);
+	  send_to_server ("\012", 1);
+	}
+	else
+#endif
 	if (args->no_contents
 	    && supported_request ("Is-modified"))
 	{
@@ -5117,6 +5218,13 @@
 	send_to_server ("\012", 1);
     }
 
+#if STATUSHASH_SUPPORT 
+				/* elf: use a block to skip over the
+				   output so we don't miss the good
+				   parts after */
+    }
+#endif
+
     /* if this directory has an ignore list, add this file to it */
     if (ignlist)
     {
@@ -5450,6 +5558,12 @@
     args.build_dirs = flags & SEND_BUILD_DIRS;
     args.force = flags & SEND_FORCE;
     args.no_contents = flags & SEND_NO_CONTENTS;
+#if STATUSHASH_SUPPORT
+    args.send_hash		= (flags & (SEND_HASH | SEND_MODIFIED_ONLY
+						      | SEND_MODIFIED_LIST));
+    args.modified_only		=  flags &  		SEND_MODIFIED_ONLY;
+    args.modified_list		= (flags &		SEND_MODIFIED_LIST);
+#endif
     err = start_recursion
 	(send_fileproc, send_filesdoneproc,
 	 send_dirent_proc, (DIRLEAVEPROC)NULL, (void *) &args,
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/client.h cvs-1.10.1p1/src/client.h
--- cvs-1.10.1/src/client.h	Wed Aug 19 14:53:57 1998
+++ cvs-1.10.1p1/src/client.h	Sat Sep 12 22:56:18 1998
@@ -111,6 +111,11 @@
 #define SEND_BUILD_DIRS 1
 #define SEND_FORCE 2
 #define SEND_NO_CONTENTS 4
+#if STATUSHASH_SUPPORT
+# define SEND_HASH 8
+# define SEND_MODIFIED_ONLY 16	/* Send files that may be locally modified */
+# define SEND_MODIFIED_LIST 32	/* Send file contents for files on the list */
+#endif
 
 /* Send an argument to the remote server.  */
 void
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/cvs.h cvs-1.10.1p1/src/cvs.h
--- cvs-1.10.1/src/cvs.h	Tue Sep  1 06:54:51 1998
+++ cvs-1.10.1p1/src/cvs.h	Sat Sep 12 22:02:30 1998
@@ -737,6 +737,11 @@
 
     /* Pointer to parsed src file info */
     RCSNode *srcfile;
+
+#if STATUSHASH_SUPPORT
+    unsigned long rglHash[5];	/* Hash of workfile bits */
+    unsigned long rglHashRepository[5];	/* Hash of repository data */
+#endif
 };
 typedef struct vers_ts Vers_TS;
 
@@ -880,6 +885,7 @@
 extern void cvs_flusherr PROTO ((void));
 extern void cvs_flushout PROTO ((void));
 extern void cvs_output_tagged PROTO ((char *, char *));
+extern void cvs_output_filter PROTO ((const char *, size_t)); /* Server only */
 
 #if defined(SERVER_SUPPORT) || defined(CLIENT_SUPPORT)
 #include "server.h"
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/main.c cvs-1.10.1p1/src/main.c
--- cvs-1.10.1/src/main.c	Tue Sep  1 08:20:26 1998
+++ cvs-1.10.1p1/src/main.c	Thu Sep 10 14:10:44 1998
@@ -558,6 +558,22 @@
 		   released.  */
 		(void) fputs (version_string, stdout);
 		(void) fputs (config_string, stdout);
+#if HAVE_KERBEROS || HAVE_GSSAPI || STATUSHASH_SUPPORT
+		(void) fputs ("  options:", stdout);
+# if HAVE_KERBEROS
+		(void) fputs (" KERBEROS", stdout);
+# endif
+# if HAVE_GSSAPI
+		(void) fputs (" GSS_API", stdout);
+# endif
+# if HAVE_GSS_C_NT_HOSTBASED_SERVICE
+		(void) fputs (" GSS_API_NT", stdout);
+# endif
+# if STATUSHASH_SUPPORT
+		(void) fputs (" STATUSHASH", stdout);
+# endif
+		(void) fputs ("\n", stdout);
+#endif
 		(void) fputs ("\n", stdout);
 		(void) fputs ("\
 Copyright (c) 1989-1998 Brian Berliner, david d `zoo' zuhn, \n\
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/no_diff.c cvs-1.10.1p1/src/no_diff.c
--- cvs-1.10.1/src/no_diff.c	Sat Aug 15 07:05:57 1998
+++ cvs-1.10.1p1/src/no_diff.c	Thu Sep 10 14:10:44 1998
@@ -16,6 +16,13 @@
 
 #include "cvs.h"
 
+#if STATUSHASH_SUPPORT
+				/* Routines in sha.c */
+extern void sha_memory (const char* pv, long cb, unsigned long* rgl);
+extern void sha_file (const char* szPath, unsigned long* rgl);
+extern void checkoutproc_hash PROTO ((void* rgl, const char* pv, size_t cb));
+#endif
+
 int
 No_Difference (finfo, vers)
     struct file_info *finfo;
@@ -25,7 +32,7 @@
     int ret;
     char *ts, *options;
     int retcode = 0;
-    char *tocvsPath;
+    char *tocvsPath = NULL;
 
     /* If ts_user is "Is-modified", we can only conclude the files are
        different (since we don't have the file's contents).  */
@@ -48,9 +55,32 @@
     else
 	options = xstrdup ("");
 
+#if STATUSHASH_SUPPORT
+		/* If there is a hash for the workfile, hash the
+		   repository and return a comparison of the two. */
+    if (   vers->rglHash[0] || vers->rglHash[1] || vers->rglHash[2]
+	|| vers->rglHash[3] || vers->rglHash[4]) {
+				/* Hash the repository revision.*/
+      RCS_checkout (vers->srcfile, NULL, vers->vn_user, NULL,
+		    (vers->entdata && vers->entdata->options)
+		    ? vers->entdata->options : "", NULL, 
+		    checkoutproc_hash, (void*) vers->rglHashRepository);
+      retcode = (   vers->rglHash[0] != vers->rglHashRepository[0]
+		 || vers->rglHash[1] != vers->rglHashRepository[1]
+		 || vers->rglHash[2] != vers->rglHashRepository[2]
+		 || vers->rglHash[3] != vers->rglHashRepository[3]
+		 || vers->rglHash[4] != vers->rglHashRepository[4]) ? -1 : 0;
+    }
+    else 
+		/* Else'd here so we can capture the rest of this
+		   function's statements.  Only the comparison is
+		   performed differently. */
+#endif
+    {
     tocvsPath = wrap_tocvs_process_file (finfo->file);
     retcode = RCS_cmp_file (vers->srcfile, vers->vn_user, options,
 			    tocvsPath == NULL ? finfo->file : tocvsPath);
+    }
     if (retcode == 0)
     {
 	/* no difference was found, so fix the entries file */
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/server.c cvs-1.10.1p1/src/server.c
--- cvs-1.10.1/src/server.c	Tue Sep  1 08:20:30 1998
+++ cvs-1.10.1p1/src/server.c	Sat Sep 12 23:11:16 1998
@@ -1253,6 +1253,9 @@
 static time_t checkin_time;
 
 static void serve_modified PROTO ((char *));
+#if STATUSHASH_SUPPORT
+static void serve_modified_hashed PROTO ((char *));
+#endif
 
 static void
 serve_modified (arg)
@@ -1624,6 +1627,106 @@
     checkin_time_valid = 1;
 }
 
+/* serve_modified_hashed
+
+   is a hacked version of serve_modified that accepts a hashed
+   modified entry instead of the typical modified entry with the file
+   contents. 
+
+*/
+
+#if STATUSHASH_SUPPORT
+
+static void
+serve_modified_hashed (arg)
+     char *arg;
+{
+    int status;
+    char *szHash;		/* Text of the hash from the client */
+    unsigned long rgl[5];	/* Binary hash value */
+
+    /*
+     * This used to return immediately if error_pending () was true.
+     * However, that fails, because it causes each line of the file to
+     * be echoed back to the client as an unrecognized command.  The
+     * client isn't reading from the socket, so eventually both
+     * processes block trying to write to the other.  Now, we try to
+     * read the file if we can.
+     */
+
+    status = buf_read_line (buf_from_net, &szHash, (int *) NULL);
+    if (status != 0)
+    {
+        if (status == -2)
+	    pending_error = ENOMEM;
+	else
+	{
+	    pending_error_text = malloc (80 + strlen (arg));
+	    if (pending_error_text == NULL)
+		pending_error = ENOMEM;
+	    else
+	    {
+		if (status == -1)
+		    sprintf (pending_error_text,
+			     "E end of file reading mode for %s", arg);
+		else
+		{
+		    sprintf (pending_error_text,
+			     "E error reading mode for %s", arg);
+		    pending_error = status;
+		}
+	    }
+	}
+	return;
+    }
+
+				/* Insert into the appropriate entry */
+				/* *** FIXME elf, we may be in trouble
+				   if there is not entry already.
+				   Though I don't think this will
+				   happen with status commands. */
+    {
+      int cchName = strlen (arg);
+      char* pch;
+      struct an_entry *pEntry;
+      for (pEntry = entries; pEntry != NULL; pEntry = pEntry->next) {
+	int cchPrefix;		/* Characters preceeding the timestamp */
+	int ichSuffix;		/* Start of characters following timestamp */
+	int i;
+	char* sz;
+	pch = pEntry->entry;
+	
+	if (   !*pch
+	    || *pch != '/'
+	    || strncmp (arg, pch + 1, cchName)
+	    || pch[1 + cchName] != '/')
+	  continue;
+	
+	cchPrefix = 1 + strcspn (pch + 1, "/");
+	if (pch[cchPrefix] == 0)
+	  continue;
+	cchPrefix = 1 + cchPrefix + strcspn (pch + cchPrefix + 1, "/");
+	if (pch[cchPrefix] == 0)
+	  continue;
+	++cchPrefix;
+	ichSuffix = cchPrefix + strcspn (pch + cchPrefix, "/");
+	sz = malloc (strlen (pch) + 80); /* Space for the Hash */
+	*sz = 0;
+	strncat (sz, pch, cchPrefix);
+	strcat (sz, "#");
+	strcat (sz, szHash);
+	strcat (sz, pch + ichSuffix);
+	pEntry->entry = sz;
+	free (pch);
+	break;
+      }
+    }
+
+    free (szHash);
+}
+#endif
+
+
 static void
 server_write_entries ()
 {
@@ -4317,6 +4420,9 @@
   REQ_LINE("Checkin-time", serve_checkin_time, rq_optional),
   REQ_LINE("Modified", serve_modified, rq_essential),
   REQ_LINE("Is-modified", serve_is_modified, rq_optional),
+#if STATUSHASH_SUPPORT
+  REQ_LINE("Modified-hashed", serve_modified_hashed, rq_optional),
+#endif
 
   /* The client must send this request to interoperate with CVS 1.5
      through 1.9 servers.  The server must support it (although it can
@@ -5925,6 +6031,67 @@
 	}
     }
 }
+
+/* cvs_output_filter
+
+   emits a string to the client using the 'S' protocol.  Similar to
+   cvs_output except that the output is directed to a response filter
+   described by the protocol request.  This is used to permit the
+   client to perform a request and parse the output, such as a status
+   query.
+
+   LEN bytes of STR are emitted if LEN != 0.  strlen(STR) bytes of STR
+   are emitted if LEN == 0.
+
+   Note that this call is IFDEF'd with server 
+
+   Note that while we duplicate the code for cvs_output, this call
+   should only be made by the server in sending data to the client.
+
+*/
+
+#ifdef SERVER_SUPPORT
+void
+cvs_output_filter (str, len)
+    const char *str;
+    size_t len;
+{
+    if (len == 0)
+	len = strlen (str);
+    if (error_use_protocol)
+    {
+	buf_output (saved_output, str, len);
+	buf_copy_lines (buf_to_net, saved_output, 'S');
+    }
+    else if (server_active)
+    {
+	buf_output (saved_output, str, len);
+	buf_copy_lines (protocol, saved_output, 'S');
+	buf_send_counted (protocol);
+    }
+    else {
+	size_t written;
+	size_t to_write = len;
+	const char *p = str;
+
+	/* For symmetry with cvs_outerr we would call fflush (stderr)
+	   here.  I guess the assumption is that stderr will be
+	   unbuffered, so we don't need to.  That sounds like a sound
+	   assumption from the manpage I looked at, but if there was
+	   something fishy about it, my guess is that calling fflush
+	   would not produce a significant performance problem.  */
+
+	while (to_write > 0)
+	{
+	    written = fwrite (p, 1, to_write, stdout);
+	    if (written == 0)
+		break;
+	    p += written;
+	    to_write -= written;
+	}
+    }
+}
+#endif
 
 /* Flush stderr.  stderr is normally flushed automatically, of course,
    but this function is used to flush information from the server back
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/sha.c cvs-1.10.1p1/src/sha.c
--- cvs-1.10.1/src/sha.c	Wed Dec 31 16:00:00 1969
+++ cvs-1.10.1p1/src/sha.c	Fri Sep 11 14:08:02 1998
@@ -0,0 +1,395 @@
+#include "cvs.h"
+#if STATUSHASH_SUPPORT
+/* Implementation of NIST's Secure Hash Algorithm (FIPS 180)
+ * Lightly bummed for execution efficiency.
+ *
+ * Jim Gillogly 3 May 1993
+ *
+ * 27 Aug 93: imported LITTLE_ENDIAN mods from Peter Gutmann's implementation
+ * 5 Jul 94: Modified for NSA fix
+ *
+ * Compile: cc -O -o sha sha.c
+ *
+ * To remove the test wrapper and use just the nist_hash() routine,
+ *      compile with -DONT_WRAP
+ *
+ * To reverse byte order for little-endian machines, use -DLITTLE_ENDIAN
+ *
+ * To get the original SHA definition before the 1994 fix, use -DVERSION_0
+ *
+ * Usage: sha [-vt] [filename ...]
+ *
+ *      -v switch: output the filename as well
+ *      -t switch: suppress spaces between 32-bit blocks
+ *
+ *      If no input files are specified, process standard input.
+ *
+ * Output: 40-hex-digit digest of each file specified (160 bits)
+ *
+ * Synopsis of the function calls:
+ *
+ *   sha_file(char *filename, unsigned long *buffer)
+ *      Filename is a file to be opened and processed.
+ *      buffer is a user-supplied array of 5 or more longs.
+ *      The 5-word buffer is filled with 160 bits of non-terminated hash.
+ *      Returns 0 if successful, non-zero if bad file.
+ *
+ *   void sha_stream(FILE *stream, unsigned long *buffer)
+ *      Input is from already-opened stream, not file.
+ *
+ *   void sha_memory(char *mem, long length, unsigned long *buffer)
+ *      Input is a memory block "length" bytes long.
+ *
+ * Caveat:
+ *      Not tested for case that requires the high word of the length,
+ *      which would be files larger than 1/2 gig or so.
+ *
+ * Limitation:
+ *      sha_memory (the memory block function) will deal with blocks no longer
+ *      than 4 gigabytes; for longer samples, the stream version will
+ *      probably be most convenient (e.g. perl moby_data.pl | sha).
+ *
+ * Bugs:
+ *      The standard is defined for bit strings; I assume bytes.
+ *
+ * 7 Sep 1998 elf@netcom.com <Marc Singer>
+ *   I tested this code on a Sparc and got the following output for
+ *   the sample files: 
+ *     app.a:a9993e36 4706816a ba3e2571 7850c26c 9cd0d89d
+ *     app.b:84983e44 1c3bd26e baae4aa1 f95129e5 e54670f1
+ *
+ * Copyright 1993, Dr. James J. Gillogly
+ * This code may be freely used in any application.
+ */
+
+
+/* #define LSB_BYTE_ORDER */
+
+
+
+#define ONT_WRAP		/* elf: the command-line switch was -DONT_WRAP
+				   This eliminates the main() wrapper. */
+				/* *** FIXME: we need to check on this
+				   since autoconf doesn't like the
+				   AC_C_BIGENDIAN macro.  This works
+				   on i386 since lsb is the default. */
+#ifndef WORDS_BIGENDIAN		/* elf: autoconf lets us know endian-ness */
+# define LSB_BYTE_ORDER
+#endif
+
+/* #define VERSION_0 */  /* Define this to get the original SHA definition */
+
+#include <stdio.h>
+#include <memory.h>
+
+#define VERBOSE
+
+#define TRUE  1
+#define FALSE 0
+
+#define SUCCESS 0
+#define FAILURE -1
+
+int sha_file();                         /* External entries */
+void sha_stream(), sha_memory();
+
+static void nist_guts();
+
+#ifndef ONT_WRAP        /* Using just the hash routine itself */
+
+#define HASH_SIZE 5     /* Produces 160-bit digest of the message */
+
+
+
+
+main(argc, argv)
+int argc;
+char **argv;
+{
+    unsigned long hbuf[HASH_SIZE];
+    char *s;
+    int file_args = FALSE;  /* If no files, take it from stdin */
+    int verbose = FALSE;
+    int terse = FALSE;
+
+#ifdef MEMTEST
+    sha_memory("abc", 3l, hbuf);         /* NIST test value from appendix A */
+    if (verbose) printf("Memory:");
+    if (terse) printf("%08lx%08lx%08lx%08lx%08lx\n",
+	hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
+    else printf("%08lx %08lx %08lx %08lx %08lx\n",
+	hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
+#endif
+
+    for (++argv; --argc; ++argv)           /* March down the arg list */
+    {
+	if (**argv == '-')                 /* Process one or more flags */
+	    for (s = &(*argv)[1]; *s; s++) /* Obfuscated C contest entry */
+		switch(*s)
+		{
+		    case 'v': case 'V':
+			verbose = TRUE;
+			break;
+		    case 't': case 'T':
+			terse = TRUE;
+			break;
+		    default:
+			fprintf(stderr, "Unrecognized flag: %c\n", *s);
+			return FALSE;
+		}
+	else                            /* Process a file */
+	{
+	    if (verbose) printf("%s:", *argv);
+	    file_args = TRUE;           /* Whether or not we could read it */
+
+	    if (sha_file(*argv, hbuf) == FAILURE)
+		printf("Can't open file %s.\n", *argv);
+	    else
+		if (terse) printf("%08lx%08lx%08lx%08lx%08lx\n",
+		    hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
+		else printf("%08lx %08lx %08lx %08lx %08lx\n",
+		    hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
+	}
+    }
+    if (! file_args)    /* No file specified */
+    {
+	if (verbose) printf("%s:", *argv);
+	sha_stream(stdin, hbuf);
+
+	if (terse) printf("%08lx%08lx%08lx%08lx%08lx\n",
+	    hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
+	else printf("%08lx %08lx %08lx %08lx %08lx\n",
+	    hbuf[0], hbuf[1], hbuf[2], hbuf[3], hbuf[4]);
+    }
+    return TRUE;
+}
+
+#endif ONT_WRAP
+
+#ifdef LSB_BYTE_ORDER    /* Imported from Peter Gutmann's implementation */
+
+/* When run on a little-endian CPU we need to perform byte reversal on an
+   array of longwords.  It is possible to make the code endianness-
+   independant by fiddling around with data at the byte level, but this
+   makes for very slow code, so we rely on the user to sort out endianness
+   at compile time */
+
+static void byteReverse( unsigned long *buffer, int byteCount )
+    {
+    unsigned long value;
+    int count;
+
+    byteCount /= sizeof( unsigned long );
+    for( count = 0; count < byteCount; count++ )
+	{
+	value = ( buffer[ count ] << 16 ) | ( buffer[ count ] >> 16 );
+	buffer[ count ] = ( ( value & 0xFF00FF00L ) >> 8 ) | ( ( value & 0x00FF00FFL ) << 8 );
+	}
+    }
+#endif /* LSB_BYTE_ORDER */
+
+
+
+union longbyte
+{
+    unsigned long W[80];        /* Process 16 32-bit words at a time */
+    char B[320];                /* But read them as bytes for counting */
+};
+
+sha_file(filename, buffer)      /* Hash a file */
+char *filename;
+unsigned long *buffer;
+{
+    FILE *infile;
+
+    if ((infile = fopen(filename, "rb")) == NULL)
+    {
+	int i;
+
+	for (i = 0; i < 5; i++)
+	    buffer[i] = 0xdeadbeef;
+	return FAILURE;
+    }
+    (void) sha_stream(infile, buffer);
+    fclose(infile);
+    return SUCCESS;
+}
+
+void sha_memory(mem, length, buffer)    /* Hash a memory block */
+char *mem;
+unsigned long length;
+unsigned long *buffer;
+{
+    nist_guts(FALSE, (FILE *) NULL, mem, length, buffer);
+}
+
+void sha_stream(stream, buffer)
+FILE *stream;
+unsigned long *buffer;
+{
+    nist_guts(TRUE, stream, (char *) NULL, 0l, buffer);
+}
+
+#define f0(x,y,z) (z ^ (x & (y ^ z)))           /* Magic functions */
+#define f1(x,y,z) (x ^ y ^ z)
+#define f2(x,y,z) ((x & y) | (z & (x | y)))
+#define f3(x,y,z) (x ^ y ^ z)
+
+#define K0 0x5a827999                           /* Magic constants */
+#define K1 0x6ed9eba1
+#define K2 0x8f1bbcdc
+#define K3 0xca62c1d6
+
+#define S(n, X) ((X << n) | (X >> (32 - n)))    /* Barrel roll */
+
+#define r0(f, K) \
+    temp = S(5, A) + f(B, C, D) + E + *p0++ + K; \
+    E = D;  \
+    D = C;  \
+    C = S(30, B); \
+    B = A;  \
+    A = temp
+
+#ifdef VERSION_0
+#define r1(f, K) \
+    temp = S(5, A) + f(B, C, D) + E + \
+	   (*p0++ = *p1++ ^ *p2++ ^ *p3++ ^ *p4++) + K; \
+    E = D;  \
+    D = C;  \
+    C = S(30, B); \
+    B = A;  \
+    A = temp
+#else                   /* Version 1: Summer '94 update */
+#define r1(f, K) \
+    temp = *p1++ ^ *p2++ ^ *p3++ ^ *p4++; \
+    temp = S(5, A) + f(B, C, D) + E + (*p0++ = S(1,temp)) + K; \
+    E = D;  \
+    D = C;  \
+    C = S(30, B); \
+    B = A;  \
+    A = temp
+#endif
+
+static void nist_guts(file_flag, stream, mem, length, buf)
+int file_flag;                  /* Input from memory, or from stream? */
+FILE *stream;
+char *mem;
+unsigned long length;
+unsigned long *buf;
+{
+    int i, nread, nbits;
+    union longbyte d;
+    unsigned long hi_length, lo_length;
+    int padded;
+    char *s;
+
+    register unsigned long *p0, *p1, *p2, *p3, *p4;
+    unsigned long A, B, C, D, E, temp;
+
+    unsigned long h0, h1, h2, h3, h4;
+
+    h0 = 0x67452301;                            /* Accumulators */
+    h1 = 0xefcdab89;
+    h2 = 0x98badcfe;
+    h3 = 0x10325476;
+    h4 = 0xc3d2e1f0;
+
+    padded = FALSE;
+    s = mem;
+    for (hi_length = lo_length = 0; ;)  /* Process 16 longs at a time */
+    {
+	if (file_flag)
+	{
+		nread = fread(d.B, 1, 64, stream);  /* Read as 64 bytes */
+	}
+	else
+	{
+		if (length < 64) nread = length;
+		else             nread = 64;
+		length -= nread;
+		memcpy(d.B, s, nread);
+		s += nread;
+	}
+	if (nread < 64)   /* Partial block? */
+	{
+		nbits = nread << 3;               /* Length: bits */
+		if ((lo_length += nbits) < nbits)
+			hi_length++;              /* 64-bit integer */
+
+		if (nread < 64 && ! padded)  /* Append a single bit */
+		{
+			d.B[nread++] = 0x80; /* Using up next byte */
+			padded = TRUE;       /* Single bit once */
+		}
+		for (i = nread; i < 64; i++) /* Pad with nulls */
+			d.B[i] = 0;
+		if (nread <= 56)   /* Room for length in this block */
+		{
+			d.W[14] = hi_length;
+			d.W[15] = lo_length;
+#ifdef LSB_BYTE_ORDER
+	      byteReverse(d.W, 56 );
+#endif /* LSB_BYTE_ORDER */
+		}
+#ifdef LSB_BYTE_ORDER
+	   else byteReverse(d.W, 64 );
+#endif /* LSB_BYTE_ORDER */
+	}
+	else    /* Full block -- get efficient */
+	{
+		if ((lo_length += 512) < 512)
+			hi_length++;    /* 64-bit integer */
+#ifdef LSB_BYTE_ORDER
+	   byteReverse(d.W, 64 );
+#endif /* LSB_BYTE_ORDER */
+	}
+
+	p0 = d.W;
+	A = h0; B = h1; C = h2; D = h3; E = h4;
+
+	r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0);
+	r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0);
+	r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0); r0(f0,K0);
+	r0(f0,K0);
+
+	p1 = &d.W[13]; p2 = &d.W[8]; p3 = &d.W[2]; p4 = &d.W[0];
+
+		   r1(f0,K0); r1(f0,K0); r1(f0,K0); r1(f0,K0);
+	r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1);
+	r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1);
+	r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1);
+	r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1); r1(f1,K1);
+	r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2);
+	r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2);
+	r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2);
+	r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2); r1(f2,K2);
+	r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3);
+	r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3);
+	r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3);
+	r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3); r1(f3,K3);
+
+	h0 += A; h1 += B; h2 += C; h3 += D; h4 += E;
+
+	if (nread <= 56) break; /* If it's greater, length in next block */
+    }
+    buf[0] = h0; buf[1] = h1; buf[2] = h2; buf[3] = h3; buf[4] = h4;
+}
+
+/*
+ * checkoutproc_hash
+ * 
+ *  catch the output of the rcs_checkout and return the sha_hash.
+ *  Note that we assume we are called at most one time.  If not, the
+ *  sha code needs to be modified to handle a stream of buffers.
+ *  We could add some assertions or sanity checks, but it's left out
+ *  because it clouds the meaning of the code.
+ *
+ */
+
+void checkoutproc_hash (void* rgl, const char* pv, size_t cb)
+{
+  //  fprintf (stderr, "sha hashing 0x%lx %d\n", pv, cb);
+  sha_memory (pv, (long) cb, (unsigned long*) rgl);
+}
+
+#endif
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/status.c cvs-1.10.1p1/src/status.c
--- cvs-1.10.1/src/status.c	Tue Sep  1 06:55:28 1998
+++ cvs-1.10.1p1/src/status.c	Sat Sep 12 22:38:32 1998
@@ -20,12 +20,35 @@
 static int long_format = 0;
 static RCSNode *xrcsnode;
 
+#if STATUSHASH_SUPPORT
+				/* Routines in sha.c */
+extern void checkoutproc_hash PROTO ((void* rgl, const char* pv, size_t cb));
+static int use_hash = 0;
+static int use_e_report = 0;
+static int use_modified_only = 0;
+static int use_filter = 0;
+#endif
+
 static const char *const status_usage[] =
 {
-    "Usage: %s %s [-vlR] [files...]\n",
+    "Usage: %s %s [-vlR"
+#if STATUSHASH_SUPPORT
+    "H"				/* Use Modified-hashed protocol element */
+    "e"				/* Enhanced (compressed) status report */
+    "M"				/* Ask for status of locally modified files */
+    "F"				/* Status emitted using 'I', filter protocol */
+#endif
+    "] [files...]\n",
     "\t-v\tVerbose format; includes tag information for the file\n",
     "\t-l\tProcess this directory only (not recursive).\n",
     "\t-R\tProcess directories recursively.\n",
+#if STATUSHASH_SUPPORT
+    "\t-H\tUse and report hash values when checking for differences.\n",
+    "\t-e\tGenerate simpler, electronically parsable, status report.\n",
+    "\t-M\tReport status on modified files only.\n",
+    "\t-F\tReport status using 'I' filter protocol.  "
+    	"Used internally to CVS.\n",
+#endif
     "(Specify the --help global option for a list of other help options)\n",
     NULL
 };
@@ -42,7 +65,11 @@
 	usage (status_usage);
 
     optind = 0;
-    while ((c = getopt (argc, argv, "+vlR")) != -1)
+    while ((c = getopt (argc, argv, "+vlR"
+#if STATUSHASH_SUPPORT
+			"HeMF"
+#endif
+			)) != -1)
     {
 	switch (c)
 	{
@@ -55,6 +82,21 @@
 	    case 'R':
 		local = 0;
 		break;
+#if STATUSHASH_SUPPORT
+	    case 'H':
+	        use_hash = 1;
+		break;
+	    case 'e':
+	        use_e_report = 1;
+		break;
+	    case 'M':
+	        use_modified_only = 1;
+		use_hash = 1;	/* Only makes sense if this is true */
+		break;
+	    case 'F':
+	        use_filter = 1;
+		break;
+#endif
 	    case '?':
 	    default:
 		usage (status_usage);
@@ -76,6 +118,16 @@
 	send_arg("-v");
       if (local)
 	send_arg("-l");
+#if STATUSHASH_SUPPORT
+      if (use_hash)
+	send_arg("-H");
+      if (use_e_report)
+	send_arg("-e");
+      if (use_modified_only)
+	send_arg("-M");
+      if (use_filter)
+	send_arg("-F");
+#endif
 
       /* For a while, we tried setting SEND_NO_CONTENTS here so this
 	 could be a fast operation.  That prevents the
@@ -90,7 +142,14 @@
 	 seem to have the potential to get munged for any number of
 	 reasons, it seems better to not rely too much on them.  */
 
-      send_files (argc, argv, local, 0, 0);
+      send_files (argc, argv, local, 0, 
+#if STATUSHASH_SUPPORT
+		  (use_modified_only ? SEND_MODIFIED_ONLY : 0)
+		  | (use_hash ? SEND_HASH : 0)
+		  |
+#endif
+		  0
+		  );
 
       send_file_names (argc, argv, SEND_EXPAND_WILD);
 
@@ -122,6 +181,14 @@
     Ctype status;
     char *sstat;
     Vers_TS *vers;
+    void (*pfnOut) (const char*, size_t) = cvs_output;
+
+#ifdef SERVER_SUPPORT
+# ifdef STATUSHASH_SUPPORT
+    if (server_active && use_filter)
+      pfnOut = cvs_output_filter;
+# endif
+#endif
 
     status = Classify_File (finfo, (char *) NULL, (char *) NULL, (char *) NULL,
 			    1, 0, &vers, 0);
@@ -172,59 +239,148 @@
 	    break;
     }
 
-    cvs_output ("\
+#if STATUSHASH_SUPPORT
+    if (use_e_report) {
+      pfnOut ("//", 0);
+      pfnOut (finfo->fullname, 0);
+      pfnOut ("//", 0);
+      pfnOut (sstat, 0);
+      pfnOut ("//", 0);
+      if (vers->vn_user)
+	pfnOut (vers->vn_user, 0);
+#ifdef SERVER_SUPPORT
+      if (server_active)
+	;
+      else
+#endif
+      {
+	pfnOut ("\t", 0);
+	pfnOut (vers->ts_rcs, 0);
+      }	
+      pfnOut ("//", 0);
+      if (vers->vn_rcs) {
+	pfnOut (vers->vn_rcs, 0);
+	pfnOut ("\t", 0);
+	pfnOut (vers->srcfile->path, 0);
+      }
+      pfnOut ("//", 0);
+      if (vers->entdata) {
+	Entnode *edata;
+	edata = vers->entdata;
+
+	if (edata->tag)	{
+	  if (vers->vn_rcs == NULL) {
+	    pfnOut (edata->tag, 0);
+	    pfnOut (" [MISSING from RCS file]", 0);
+	  }
+	  else {
+	    if (isdigit (edata->tag[0]))
+	      pfnOut (edata->tag, 0);
+	    else {
+	      char *branch = NULL;
+
+	      if (RCS_nodeisbranch (finfo->rcs, edata->tag))
+		branch = RCS_whatbranch(finfo->rcs, edata->tag);
+
+	      pfnOut (edata->tag, 0);
+	      pfnOut (" (", 0);
+	      pfnOut (branch ? "branch" : "revision", 0);
+	      pfnOut (": ", 0);
+	      pfnOut (branch ? branch : vers->vn_rcs, 0);
+	      pfnOut (")", 0);
+
+	      if (branch)
+		free (branch);
+	    }
+	  }
+	}
+
+	pfnOut ("//", 0);
+
+	if (edata->date)
+	    pfnOut (edata->date, 0);
+
+	pfnOut ("//", 0);
+
+	if (edata->options && edata->options[0])
+	    pfnOut (edata->options, 0);
+
+	pfnOut ("//", 0);
+    }
+
+				/* Report the hash for repository version */
+    if (use_hash && vers->vn_rcs != NULL) {
+      char* buf;
+
+      if (vers->rglHashRepository[0] == 0)
+	RCS_checkout (vers->srcfile, NULL, vers->vn_user, NULL,
+		      (vers->entdata && vers->entdata->options)
+		      ? vers->entdata->options : "", NULL, 
+		      checkoutproc_hash, (void*) vers->rglHashRepository);
+      buf = xmalloc (80);
+      sprintf (buf, "(SHA) %08lx %08lx %08lx %08lx %08lx//",
+	       vers->rglHashRepository[0], vers->rglHashRepository[1], 
+	       vers->rglHashRepository[2], vers->rglHashRepository[3], 
+	       vers->rglHashRepository[4]);
+      pfnOut (buf, 0);
+      free (buf);
+    }
+    }
+    else {
+#endif 
+    pfnOut ("\
 ===================================================================\n", 0);
     if (vers->ts_user == NULL)
     {
-	cvs_output ("File: no file ", 0);
-	cvs_output (finfo->file, 0);
-	cvs_output ("\t\tStatus: ", 0);
-	cvs_output (sstat, 0);
-	cvs_output ("\n\n", 0);
+	pfnOut ("File: no file ", 0);
+	pfnOut (finfo->file, 0);
+	pfnOut ("\t\tStatus: ", 0);
+	pfnOut (sstat, 0);
+	pfnOut ("\n\n", 0);
     }
     else
     {
 	char *buf;
 	buf = xmalloc (strlen (finfo->file) + strlen (sstat) + 80);
 	sprintf (buf, "File: %-17s\tStatus: %s\n\n", finfo->file, sstat);
-	cvs_output (buf, 0);
+	pfnOut (buf, 0);
 	free (buf);
     }
 
     if (vers->vn_user == NULL)
     {
-	cvs_output ("   Working revision:\tNo entry for ", 0);
-	cvs_output (finfo->file, 0);
-	cvs_output ("\n", 0);
+	pfnOut ("   Working revision:\tNo entry for ", 0);
+	pfnOut (finfo->file, 0);
+	pfnOut ("\n", 0);
     }
     else if (vers->vn_user[0] == '0' && vers->vn_user[1] == '\0')
-	cvs_output ("   Working revision:\tNew file!\n", 0);
+	pfnOut ("   Working revision:\tNew file!\n", 0);
 #ifdef SERVER_SUPPORT
     else if (server_active)
     {
-	cvs_output ("   Working revision:\t", 0);
-	cvs_output (vers->vn_user, 0);
-	cvs_output ("\n", 0);
+	pfnOut ("   Working revision:\t", 0);
+	pfnOut (vers->vn_user, 0);
+	pfnOut ("\n", 0);
     }
 #endif
     else
     {
-	cvs_output ("   Working revision:\t", 0);
-	cvs_output (vers->vn_user, 0);
-	cvs_output ("\t", 0);
-	cvs_output (vers->ts_rcs, 0);
-	cvs_output ("\n", 0);
+	pfnOut ("   Working revision:\t", 0);
+	pfnOut (vers->vn_user, 0);
+	pfnOut ("\t", 0);
+	pfnOut (vers->ts_rcs, 0);
+	pfnOut ("\n", 0);
     }
 
     if (vers->vn_rcs == NULL)
-	cvs_output ("   Repository revision:\tNo revision control file\n", 0);
+	pfnOut ("   Repository revision:\tNo revision control file\n", 0);
     else
     {
-	cvs_output ("   Repository revision:\t", 0);
-	cvs_output (vers->vn_rcs, 0);
-	cvs_output ("\t", 0);
-	cvs_output (vers->srcfile->path, 0);
-	cvs_output ("\n", 0);
+	pfnOut ("   Repository revision:\t", 0);
+	pfnOut (vers->vn_rcs, 0);
+	pfnOut ("\t", 0);
+	pfnOut (vers->srcfile->path, 0);
+	pfnOut ("\n", 0);
     }
 
     if (vers->entdata)
@@ -236,17 +392,17 @@
 	{
 	    if (vers->vn_rcs == NULL)
 	    {
-		cvs_output ("   Sticky Tag:\t\t", 0);
-		cvs_output (edata->tag, 0);
-		cvs_output (" - MISSING from RCS file!\n", 0);
+		pfnOut ("   Sticky Tag:\t\t", 0);
+		pfnOut (edata->tag, 0);
+		pfnOut (" - MISSING from RCS file!\n", 0);
 	    }
 	    else
 	    {
 		if (isdigit (edata->tag[0]))
 		{
-		    cvs_output ("   Sticky Tag:\t\t", 0);
-		    cvs_output (edata->tag, 0);
-		    cvs_output ("\n", 0);
+		    pfnOut ("   Sticky Tag:\t\t", 0);
+		    pfnOut (edata->tag, 0);
+		    pfnOut ("\n", 0);
 		}
 		else
 		{
@@ -255,13 +411,13 @@
 		    if (RCS_nodeisbranch (finfo->rcs, edata->tag))
 			branch = RCS_whatbranch(finfo->rcs, edata->tag);
 
-		    cvs_output ("   Sticky Tag:\t\t", 0);
-		    cvs_output (edata->tag, 0);
-		    cvs_output (" (", 0);
-		    cvs_output (branch ? "branch" : "revision", 0);
-		    cvs_output (": ", 0);
-		    cvs_output (branch ? branch : vers->vn_rcs, 0);
-		    cvs_output (")\n", 0);
+		    pfnOut ("   Sticky Tag:\t\t", 0);
+		    pfnOut (edata->tag, 0);
+		    pfnOut (" (", 0);
+		    pfnOut (branch ? "branch" : "revision", 0);
+		    pfnOut (": ", 0);
+		    pfnOut (branch ? branch : vers->vn_rcs, 0);
+		    pfnOut (")\n", 0);
 
 		    if (branch)
 			free (branch);
@@ -269,42 +425,63 @@
 	    }
 	}
 	else if (!really_quiet)
-	    cvs_output ("   Sticky Tag:\t\t(none)\n", 0);
+	    pfnOut ("   Sticky Tag:\t\t(none)\n", 0);
 
 	if (edata->date)
 	{
-	    cvs_output ("   Sticky Date:\t\t", 0);
-	    cvs_output (edata->date, 0);
-	    cvs_output ("\n", 0);
+	    pfnOut ("   Sticky Date:\t\t", 0);
+	    pfnOut (edata->date, 0);
+	    pfnOut ("\n", 0);
 	}
 	else if (!really_quiet)
-	    cvs_output ("   Sticky Date:\t\t(none)\n", 0);
+	    pfnOut ("   Sticky Date:\t\t(none)\n", 0);
 
 	if (edata->options && edata->options[0])
 	{
-	    cvs_output ("   Sticky Options:\t", 0);
-	    cvs_output (edata->options, 0);
-	    cvs_output ("\n", 0);
+	    pfnOut ("   Sticky Options:\t", 0);
+	    pfnOut (edata->options, 0);
+	    pfnOut ("\n", 0);
 	}
 	else if (!really_quiet)
-	    cvs_output ("   Sticky Options:\t(none)\n", 0);
+	    pfnOut ("   Sticky Options:\t(none)\n", 0);
 
 	if (long_format && vers->srcfile)
 	{
 	    List *symbols = RCS_symbols(vers->srcfile);
 
-	    cvs_output ("\n   Existing Tags:\n", 0);
+	    pfnOut ("\n   Existing Tags:\n", 0);
 	    if (symbols)
 	    {
 		xrcsnode = finfo->rcs;
-		(void) walklist (symbols, tag_list_proc, NULL);
+		(void) walklist (symbols, tag_list_proc, (void*) pfnOut);
 	    }
 	    else
-		cvs_output ("\tNo Tags Exist\n", 0);
+		pfnOut ("\tNo Tags Exist\n", 0);
 	}
     }
 
-    cvs_output ("\n", 0);
+#if STATUSHASH_SUPPORT 
+				/* Report the hash for repository version */
+    if (use_hash && vers->vn_rcs != NULL) {
+      char* buf;
+
+      if (vers->rglHashRepository[0] == 0)
+	RCS_checkout (vers->srcfile, NULL, vers->vn_user, NULL,
+		      (vers->entdata && vers->entdata->options)
+		      ? vers->entdata->options : "", NULL, 
+		      checkoutproc_hash, (void*) vers->rglHashRepository);
+      buf = xmalloc (80);
+      sprintf (buf, "   Hash:\t\t(SHA) %08lx %08lx %08lx %08lx %08lx\n",
+	       vers->rglHashRepository[0], vers->rglHashRepository[1], 
+	       vers->rglHashRepository[2], vers->rglHashRepository[3], 
+	       vers->rglHashRepository[4]);
+      pfnOut (buf, 0);
+      free (buf);
+    }
+    } /* else from use_e_report */
+#endif
+
+    pfnOut ("\n", 0);
     freevers_ts (&vers);
     return (0);
 }
@@ -336,6 +513,8 @@
 {
     char *branch = NULL;
     char *buf;
+    void (*pfnOut) (const char*, size_t) = closure;
+    
 
     if (RCS_nodeisbranch (xrcsnode, p->key))
 	branch = RCS_whatbranch(xrcsnode, p->key) ;
@@ -345,7 +524,7 @@
     sprintf (buf, "\t%-25s\t(%s: %s)\n", p->key,
 	     branch ? "branch" : "revision",
 	     branch ? branch : p->data);
-    cvs_output (buf, 0);
+    pfnOut (buf, 0);
     free (buf);
 
     if (branch)
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/update.c cvs-1.10.1p1/src/update.c
--- cvs-1.10.1/src/update.c	Tue Sep  1 06:55:31 1998
+++ cvs-1.10.1p1/src/update.c	Sat Sep 12 23:32:26 1998
@@ -106,7 +106,11 @@
 static time_t last_register_time;
 static const char *const update_usage[] =
 {
-    "Usage: %s %s [-APdflRp] [-k kopt] [-r rev|-D date] [-j rev]\n",
+    "Usage: %s %s [-APdflRp"
+#if STATUSHASH_SUPPORT
+    "H"
+#endif
+    "] [-k kopt] [-r rev|-D date] [-j rev]\n",
     "    [-I ign] [-W spec] [files...]\n",
     "\t-A\tReset any sticky tags/date/kopts.\n",
     "\t-P\tPrune empty directories.\n",
@@ -121,10 +125,18 @@
     "\t-j rev\tMerge in changes made between current revision and rev.\n",
     "\t-I ign\tMore files to ignore (! to reset).\n",
     "\t-W spec\tWrappers specification line.\n",
+#if STATUSHASH_SUPPORT
+    "\t-H\tUse and report hash values when checking for differences.\n",
+#endif
     "(Specify the --help global option for a list of other help options)\n",
     NULL
 };
 
+#if STATUSHASH_SUPPORT
+static int use_hash = 0;
+void i_handler PROTO ((char* args, int len, void* pvClosure));
+#endif
+
 /*
  * update is the argv,argc based front end for arg parsing
  */
@@ -145,7 +157,11 @@
 
     /* parse the args */
     optind = 0;
-    while ((c = getopt (argc, argv, "+ApPflRQqduk:r:D:j:I:W:")) != -1)
+    while ((c = getopt (argc, argv, "+ApPflRQ"
+#if STATUSHASH_SUPPORT
+			"H"
+#endif
+			"qduk:r:D:j:I:W:")) != -1)
     {
 	switch (c)
 	{
@@ -218,6 +234,11 @@
 #endif
 		    usage (update_usage);
 		break;
+#if STATUSHASH_SUPPORT
+	    case 'H':
+	        use_hash = 1;
+		break;
+#endif
 	    case '?':
 	    default:
 		usage (update_usage);
@@ -232,6 +253,26 @@
     {
 	int pass;
 
+#if STATUSHASH_SUPPORT
+				/* When enabled, perform a status -M
+				   first to recover the names of the
+				   files in the repository for which we
+				   need to send the contents. */
+	if (use_hash) {
+	  start_server ();
+	  if (local)
+	    send_arg ("-l");
+	  send_arg ("-H");
+	  send_arg ("-e");
+	  send_arg ("-F");	/* Invoke 'I' filter */
+	  send_arg ("-M");
+	  send_files (argc, argv, local, 0, SEND_MODIFIED_ONLY | SEND_HASH);
+	  send_file_names (argc, argv, SEND_EXPAND_WILD);
+	  send_to_server ("status\012", 0);
+	  err = get_server_responses ();
+	}
+#endif
+
 	/* The first pass does the regular update.  If we receive at least
 	   one patch which failed, we do a second pass and just fetch
 	   those files whose patches failed.  */
@@ -240,10 +281,15 @@
 	{
 	    int status;
 
-	    start_server ();
+	    if (!use_hash || pass != 1)
+	      start_server ();
 
 	    if (local)
 		send_arg("-l");
+#if STATUSHASH_SUPPORT
+	    if (use_hash && pass == 1)
+	      send_arg("-H");
+#endif
 	    if (update_build_dirs)
 		send_arg("-d");
 	    if (pipeout)
@@ -287,7 +333,12 @@
 		/* If noexec, probably could be setting SEND_NO_CONTENTS.
 		   Same caveats as for "cvs status" apply.  */
 		send_files (argc, argv, local, aflag,
-			    update_build_dirs ? SEND_BUILD_DIRS : 0);
+#if STATUSHASH_SUPPORT
+			    ((use_hash && pass == 1)
+			     ? (SEND_HASH | SEND_MODIFIED_LIST) : 0) |
+#endif
+			    (update_build_dirs ? SEND_BUILD_DIRS : 0)
+			    );
 		send_file_names (argc, argv, SEND_EXPAND_WILD);
 	    }
 	    else
@@ -309,7 +360,13 @@
 			error (0, errno, "cannot remove %s",
 			       failed_patches[i]);
 		send_files (failed_patches_count, failed_patches, local,
-			    aflag, update_build_dirs ? SEND_BUILD_DIRS : 0);
+			    aflag, 
+#if STATUSHASH_SUPPORT
+			    ((use_hash && pass == 1)
+			     ? (SEND_HASH | SEND_MODIFIED_LIST) : 0) |
+#endif
+			    (update_build_dirs ? SEND_BUILD_DIRS : 0)
+			    );
 		send_file_names (failed_patches_count, failed_patches, 0);
 	    }
 
@@ -1874,7 +1931,9 @@
 
     if (unlink_file (backup) && !existence_error (errno))
 	error (0, errno, "unable to remove %s", backup);
-    copy_file (finfo->file, backup);
+
+    //    if (isfile (finfo->file))	/* elf*** due to status hash */
+      copy_file (finfo->file, backup);
     xchmod (finfo->file, 1);
 
     if (strcmp (vers->options, "-kb") == 0
@@ -2794,3 +2853,30 @@
 {
     return (join_rev1 != NULL);
 }
+
+#if STATUSHASH_SUPPORT
+void i_handler (argc, len, pvClosure)
+     char* argc;
+     int len;
+     void* pvClosure;
+{
+  char* szPath = NULL;
+  for (;*argc; ++argc) {
+    if (*argc != '/' || *(argc + 1) != '/')
+      continue;
+    if (!szPath) {
+      szPath = argc + 2;
+      continue;
+    }
+    else
+      *argc = 0;		/* Null terminate filename */
+    argc += 2;
+    break;
+  }
+  cvs_output (szPath, 0);
+  if (strncmp (argc, "Needs Merge", 11) == 0)
+    cvs_output (" send to server\n", 0);
+  else
+    cvs_output (" locally modified, only\n", 0);
+}
+#endif
diff -u -r -N --exclude-from /home/elf/diffexclude cvs-1.10.1/src/vers_ts.c cvs-1.10.1p1/src/vers_ts.c
--- cvs-1.10.1/src/vers_ts.c	Mon Feb 16 10:57:38 1998
+++ cvs-1.10.1p1/src/vers_ts.c	Thu Sep 10 14:10:44 1998
@@ -269,6 +269,29 @@
 	else if (entdata->timestamp
 		 && entdata->timestamp[0] == '=')
 	    mark_unchanged (vers_ts);
+#if STATUSHASH_SUPPORT
+	else if (entdata->timestamp
+		 && *entdata->timestamp == '#') {
+	  char* pch = entdata->timestamp + 1;
+	  int i;
+	  if (*pch == '(')		/* Hash type, skip it for now */
+	    while (*pch && *pch != ')')
+	      ++pch;
+	  ++pch;
+	  while (*pch == ' ' || *pch == '\t')
+	    ++pch;
+	  for (i = 0; i < 5 && *pch; ++i) {
+	    vers_ts->rglHash[i] = strtoul (pch, &pch, 16);
+	    while (*pch == ' ' || *pch == '\t')
+	      ++pch;
+	  }
+				/* Dup this so that the timestamp
+				   isn't null.  Perhaps we'll store
+				   the hash here in the end instead of
+				   converting it to binary. */
+	  vers_ts->ts_user = xstrdup (entdata->timestamp + 1);
+	}
+#endif
 	else if (entdata->timestamp != NULL
 		 && (entdata->timestamp[0] == 'M'
 		     || entdata->timestamp[0] == 'D')