Attachment "r-card.diff" to
ticket [a32ff1eddb]
added by
anonymous
2010-10-03 13:04:03.
Index: src/checkin.c
===================================================================
--- src/checkin.c
+++ src/checkin.c
@@ -925,11 +925,11 @@
fossil_panic("tree checksum does not match repository after commit");
}
/* Verify that the manifest checksum matches the expected checksum */
vfile_aggregate_checksum_manifest(nvid, &cksum2, &cksum1b);
- if( blob_compare(&cksum1, &cksum1b) ){
+ if( blob_size(&cksum1b) && blob_compare(&cksum1, &cksum1b) ){
fossil_panic("manifest checksum does not agree with manifest: "
"%b versus %b", &cksum1, &cksum1b);
}
if( blob_compare(&cksum1, &cksum2) ){
fossil_panic("tree checksum does not match manifest after commit: "
Index: src/checkout.c
===================================================================
--- src/checkout.c
+++ src/checkout.c
@@ -238,11 +238,11 @@
vfile_aggregate_checksum_manifest(vid, &cksum1, &cksum1b);
vfile_aggregate_checksum_disk(vid, &cksum2);
if( blob_compare(&cksum1, &cksum2) ){
printf("WARNING: manifest checksum does not agree with disk\n");
}
- if( blob_compare(&cksum1, &cksum1b) ){
+ if( blob_size(&cksum1b) && blob_compare(&cksum1, &cksum1b) ){
printf("WARNING: manifest checksum does not agree with manifest\n");
}
}
db_end_transaction(0);
}
Index: src/vfile.c
===================================================================
--- src/vfile.c
+++ src/vfile.c
@@ -461,12 +461,15 @@
sprintf(zBuf, " %d\n", blob_size(&file));
md5sum_step_text(zBuf, -1);
md5sum_step_blob(&file);
blob_reset(&file);
}
- if( pManOut ){
- blob_append(pManOut, m.zRepoCksum, -1);
+ if( pManOut){
+ if (m.zRepoCksum)
+ blob_append(pManOut, m.zRepoCksum, -1);
+ else
+ blob_zero(pManOut);
}
manifest_clear(&m);
md5sum_finish(pOut);
}