Diff
Not logged in

Differences From:

File src/checkout.c part of check-in [394505791628e] - Add primitive start-time and duration controols to the timeline. Additional checksums on check-in and check-out. by drh on 2007-08-01 21:03:03. [view]

To:

File src/checkout.c part of check-in [a040ae6e17] - Write the new manifest file to the root of the check-out tree when doing an update. by drh on 2007-08-08 15:18:53. [view]

@@ -92,8 +92,24 @@
   blob_reset(&manifest);
 }
 
 /*
+** Read the manifest file given by vid out of the repository
+** and store it in the root of the local check-out.
+*/
+void manifest_to_disk(int vid){
+  char *zManFile;
+  Blob manifest;
+
+  blob_zero(&manifest);
+  zManFile = mprintf("%smanifest", g.zLocalRoot);
+  content_get(vid, &manifest);
+  blob_write_to_file(&manifest, zManFile);
+  free(zManFile);
+  blob_reset(&manifest);
+}
+
+/*
 ** COMMAND: checkout
 **
 ** Check out a version specified on the command-line.
 */
@@ -125,16 +141,10 @@
     uncheckout(prior);
   }
   db_multi_exec("DELETE FROM vfile WHERE vid!=%d", vid);
   if( !noWrite ){
-    Blob manifest;
-    char *zManFile;
     vfile_to_disk(vid, 0, 1);
-    blob_zero(&manifest);
-    zManFile = mprintf("%smanifest", g.zLocalRoot);
-    content_get(vid, &manifest);
-    blob_write_to_file(&manifest, zManFile);
-    free(zManFile);
+    manifest_to_disk(vid);
     db_lset_int("checkout", vid);
   }
   db_multi_exec("DELETE FROM vmerge");
   vfile_aggregate_checksum_manifest(vid, &cksum1, &cksum1b);