Fossil

Check-in [81bf21bd]
Login

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

Overview
Comment:Fix working tree manifest generation/deletion to handle all cases properly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | jan-manifest-tags
Files: files | file ages | folders
SHA1:81bf21bd6374e076211e1c95156a57f3d4990bbb
User & Date: jan 2016-08-03 15:01:09
Context
2016-08-05
00:46
Add a basic set of tests for the manifest property, including minimal coverage of the existance of the tags manifest. This can and should be extended to cover interesting content for the tags manifest, and likely should be extended to cover lots more corner cases. These new tests pass on Windows, but should be tried on at least one unix-like platform. check-in: c33f02de user: rberteig tags: jan-manifest-tags
2016-08-03
15:01
Fix working tree manifest generation/deletion to handle all cases properly. check-in: 81bf21bd user: jan tags: jan-manifest-tags
14:31
Comment typo fix. check-in: af574ca3 user: jan tags: jan-manifest-tags
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkout.c.

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
  int flg;

  flg = db_get_manifest_setting();

  if( flg & (MFESTFLG_RAW|MFESTFLG_UUID) ){
    blob_zero(&manifest);
    content_get(vid, &manifest);
    zManFile = mprintf("%smanifest", g.zLocalRoot);
    blob_zero(&hash);
    sha1sum_blob(&manifest, &hash);
    sterilize_manifest(&manifest);

    if( flg & MFESTFLG_RAW ){

      blob_write_to_file(&manifest, zManFile);

    }else{
      if( !db_exists("SELECT 1 FROM vfile WHERE pathname='manifest'") ){

        file_delete(zManFile);
      }
    }
    free(zManFile);

  }
  if( flg & MFESTFLG_UUID ){
    zManFile = mprintf("%smanifest.uuid", g.zLocalRoot);
    blob_append(&hash, "\n", 1);
    blob_write_to_file(&hash, zManFile);
    free(zManFile);
    blob_reset(&hash);







<



>
|
>
|
>
|
|
>
|
<
<
|
>







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
  int flg;

  flg = db_get_manifest_setting();

  if( flg & (MFESTFLG_RAW|MFESTFLG_UUID) ){
    blob_zero(&manifest);
    content_get(vid, &manifest);

    blob_zero(&hash);
    sha1sum_blob(&manifest, &hash);
    sterilize_manifest(&manifest);
  }
  if( flg & MFESTFLG_RAW ){
    zManFile = mprintf("%smanifest", g.zLocalRoot);
    blob_write_to_file(&manifest, zManFile);
    free(zManFile);
  }else{
    if( !db_exists("SELECT 1 FROM vfile WHERE pathname='manifest'") ){
      zManFile = mprintf("%smanifest", g.zLocalRoot);
      file_delete(zManFile);


      free(zManFile);
    }
  }
  if( flg & MFESTFLG_UUID ){
    zManFile = mprintf("%smanifest.uuid", g.zLocalRoot);
    blob_append(&hash, "\n", 1);
    blob_write_to_file(&hash, zManFile);
    free(zManFile);
    blob_reset(&hash);