Fossil

Check-in [23022a85]
Login

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

Overview
Comment:Improved detection of changes to a file after a merge that do not change the size of the file.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 23022a8546d9fdc6bfb0560eb9c6b69db754b1c4
User & Date: drh 2012-06-25 15:43:40.632
Context
2012-06-29
11:05
Update the test-parse-manifest test command so that it reports parse failures on standard output. ... (check-in: 4113f588 user: drh tags: trunk)
2012-06-27
12:30
Begin a branch that is modified to use sqlite4 instead of sqlite3 as the storage engine. This check-in compiles (on unix) but does not work. ... (check-in: 68239127 user: drh tags: sqlite4)
2012-06-25
15:43
Improved detection of changes to a file after a merge that do not change the size of the file. ... (check-in: 23022a85 user: drh tags: trunk)
15:15
Whan a commit fails because the repository checksum does match the working directory, in addition to printing the names of the files that disagree, also output the repository version of the files to separate temporary files to facilitate error analysis. ... (check-in: edc0c946 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vfile.c.
204
205
206
207
208
209
210

211
212

213
214
215
216
217
218
219
220
221
      db_ephemeral_blob(&q, 5, &origCksum);
      if( sha1sum_file(zName, &fileCksum) ){
        blob_zero(&fileCksum);
      }
      if( blob_compare(&fileCksum, &origCksum)==0 ) chnged = 0;
      blob_reset(&origCksum);
      blob_reset(&fileCksum);

    }else if( chnged==0 && (useMtime==0 || currentMtime!=oldMtime) ){
      /* For files that were formerly believed to be unchanged, if their

      ** mtime changes, or unconditionally if --sha1sum is used, check
      ** to see if they have been edited by looking at their SHA1 sum */
      assert( origSize==currentSize );
      db_ephemeral_blob(&q, 5, &origCksum);
      if( sha1sum_file(zName, &fileCksum) ){
        blob_zero(&fileCksum);
      }
      if( blob_compare(&fileCksum, &origCksum) ){
        chnged = 1;







>
|
|
>
|
|







204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
      db_ephemeral_blob(&q, 5, &origCksum);
      if( sha1sum_file(zName, &fileCksum) ){
        blob_zero(&fileCksum);
      }
      if( blob_compare(&fileCksum, &origCksum)==0 ) chnged = 0;
      blob_reset(&origCksum);
      blob_reset(&fileCksum);
    }else if( (chnged==0 || chnged==2)
           && (useMtime==0 || currentMtime!=oldMtime) ){
      /* For files that were formerly believed to be unchanged or that were
      ** changed by merging, if their mtime changes, or unconditionally
      ** if --sha1sum is used, check to see if they have been edited by
      ** looking at their SHA1 sum */
      assert( origSize==currentSize );
      db_ephemeral_blob(&q, 5, &origCksum);
      if( sha1sum_file(zName, &fileCksum) ){
        blob_zero(&fileCksum);
      }
      if( blob_compare(&fileCksum, &origCksum) ){
        chnged = 1;