Differences From:
File
src/vfile.c
part of check-in
[7a2c37063a]
- merge trunk into creole branch
by
bob on
2009-09-22 07:49:39.
Also file
src/vfile.c
part of check-in
[a2749215b7]
- Add the --dotfiles option to the "extra" and "clean" commands.
Ticket 4de876322f066.
by
drh on
2009-09-19 15:32:14.
[view]
To:
File
src/vfile.c
part of check-in
[76f169fca6]
- Detect when the check-out contains missing files and filesystem objects that
ought to be files but are not. Issue reasonable warnings.
by
drh on
2009-12-18 00:29:51.
Also file
src/vfile.c
part of check-in
[76bc05d739]
- merge with trunk
by
btheado on
2009-12-30 20:33:59.
[view]
@@ -143,9 +143,10 @@
**
** If VFILE.DELETED is null or if VFILE.RID is zero, then we can assume
** the file has changed without having the check the on-disk image.
*/
-void vfile_check_signature(int vid){
+void vfile_check_signature(int vid, int notFileIsFatal){
+ int nErr = 0;
Stmt q;
Blob fileCksum, origCksum;
int checkMtime = db_get_boolean("mtime-changes", 0);
@@ -167,9 +168,15 @@
rid = db_column_int(&q, 2);
isDeleted = db_column_int(&q, 3);
oldChnged = db_column_int(&q, 4);
oldMtime = db_column_int64(&q, 6);
- if( oldChnged>=2 ){
+ if( !file_isfile(zName) && file_size(zName)>=0 ){
+ if( notFileIsFatal ){
+ fossil_warning("not a ordinary file: %s", zName);
+ nErr++;
+ }
+ chnged = 1;
+ }else if( oldChnged>=2 ){
chnged = oldChnged;
}else if( isDeleted || rid==0 ){
chnged = 1;
}
@@ -194,8 +201,9 @@
db_multi_exec("UPDATE vfile SET chnged=%d WHERE id=%d", chnged, id);
}
}
db_finalize(&q);
+ if( nErr ) fossil_fatal("abort due to prior errors");
db_end_transaction(0);
}
/*
@@ -397,10 +405,12 @@
/*
** Compute an aggregate MD5 checksum over the repository image of every
** file in manifest vid. The file names are part of the checksum.
-**
** Return the resulting checksum in blob pOut.
+**
+** If pManOut is not NULL then fill it with the checksum found in the
+** "R" card near the end of the manifest.
*/
void vfile_aggregate_checksum_manifest(int vid, Blob *pOut, Blob *pManOut){
int i, fid;
Blob file, mfile;