Fossil

Check-in [2f15cd80]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improvements to some comments in vfile.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2f15cd805e037885140957e922d6e8421af24d5d
User & Date: drh 2009-12-16 02:02:54
Context
2009-12-17
14:21
Change the "revert" command so that it will take multiple file arguments and revert each one. check-in: 353297a1 user: drh tags: trunk
2009-12-16
02:02
Improvements to some comments in vfile.c. check-in: 2f15cd80 user: drh tags: trunk
2009-12-14
23:26
Found two more places that fQuiet should have been checked. check-in: 137d653a user: jeremy_c tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vfile.c.

370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
...
394
395
396
397
398
399
400
401
402



403
404
405
406
407
408
409
*/
void vfile_aggregate_checksum_repository(int vid, Blob *pOut){
  Blob file;
  Stmt q;
  char zBuf[100];

  db_must_be_within_tree();
  
  db_prepare(&q, "SELECT pathname, rid FROM vfile"
                 " WHERE NOT deleted AND rid>0 AND vid=%d"
                 " ORDER BY pathname",
                 vid);
  blob_zero(&file);
  md5sum_init();
  while( db_step(&q)==SQLITE_ROW ){
................................................................................
  db_finalize(&q);
  md5sum_finish(pOut);
}

/*
** 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.



*/
void vfile_aggregate_checksum_manifest(int vid, Blob *pOut, Blob *pManOut){
  int i, fid;
  Blob file, mfile;
  Manifest m;
  char zBuf[100];








|







 







<

>
>
>







370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
...
394
395
396
397
398
399
400

401
402
403
404
405
406
407
408
409
410
411
*/
void vfile_aggregate_checksum_repository(int vid, Blob *pOut){
  Blob file;
  Stmt q;
  char zBuf[100];

  db_must_be_within_tree();
 
  db_prepare(&q, "SELECT pathname, rid FROM vfile"
                 " WHERE NOT deleted AND rid>0 AND vid=%d"
                 " ORDER BY pathname",
                 vid);
  blob_zero(&file);
  md5sum_init();
  while( db_step(&q)==SQLITE_ROW ){
................................................................................
  db_finalize(&q);
  md5sum_finish(pOut);
}

/*
** 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;
  Manifest m;
  char zBuf[100];