Fossil

Diff
Login

Diff

Differences From Artifact [90205f43ef]:

To Artifact [bedc1e6994]:


176
177
178
179
180
181
182

183
184
185
186
187
188
189
  int useMtime = (cksigFlags & CKSIG_HASH)==0
                    && db_get_boolean("mtime-changes", 1);

  /* On Windows, get symlink permission status from the "manifest.symlinks" file
  ** if it exists and if the "manifest" setting contains the "l" flag. */
#ifdef _WIN32
  int manifestSymlinks = get_checkout_symlink_table();

#endif

  db_begin_transaction();
  db_prepare(&q, "SELECT id, %Q || pathname,"
                 "       vfile.mrid, deleted, chnged, uuid, size, mtime,"
                 "      CASE WHEN isexe THEN %d WHEN islink THEN %d ELSE %d END"
                 "  FROM vfile LEFT JOIN blob ON vfile.mrid=blob.rid"







>







176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
  int useMtime = (cksigFlags & CKSIG_HASH)==0
                    && db_get_boolean("mtime-changes", 1);

  /* On Windows, get symlink permission status from the "manifest.symlinks" file
  ** if it exists and if the "manifest" setting contains the "l" flag. */
#ifdef _WIN32
  int manifestSymlinks = get_checkout_symlink_table();
  int nRoot = strlen(g.zLocalRoot);
#endif

  db_begin_transaction();
  db_prepare(&q, "SELECT id, %Q || pathname,"
                 "       vfile.mrid, deleted, chnged, uuid, size, mtime,"
                 "      CASE WHEN isexe THEN %d WHEN islink THEN %d ELSE %d END"
                 "  FROM vfile LEFT JOIN blob ON vfile.mrid=blob.rid"
207
208
209
210
211
212
213
214
215
216
217
218

219

220
221
222
223
224
225
226
227
228
229
    isDeleted = db_column_int(&q, 3);
    oldChnged = chnged = db_column_int(&q, 4);
    oldMtime = db_column_int64(&q, 7);
    origSize = db_column_int64(&q, 6);
    currentSize = file_wd_size(zName);
    currentMtime = file_wd_mtime(0);
    origPerm = db_column_int(&q, 8);
#ifdef _WIN32
    /* For Windows, if the "manifest" setting contains the "l" flag and the
    ** "manifest.symlinks" file exists, use its contents to determine which
    ** files do and do not have the symlink permission. */
    if( manifestSymlinks

     && db_exists("SELECT 1 FROM symlink_perm WHERE filename=%Q", zName) ){

      currentPerm = PERM_LNK;
    }else{
      currentPerm = origPerm;
    }
#else
    currentPerm = file_wd_perm(zName);
#endif
    if( chnged==0 && (isDeleted || rid==0) ){
      /* "fossil rm" or "fossil add" always change the file */
      chnged = 1;







|



|
>
|
>


|







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
    isDeleted = db_column_int(&q, 3);
    oldChnged = chnged = db_column_int(&q, 4);
    oldMtime = db_column_int64(&q, 7);
    origSize = db_column_int64(&q, 6);
    currentSize = file_wd_size(zName);
    currentMtime = file_wd_mtime(0);
    origPerm = db_column_int(&q, 8);
#ifndef _WIN32
    /* For Windows, if the "manifest" setting contains the "l" flag and the
    ** "manifest.symlinks" file exists, use its contents to determine which
    ** files do and do not have the symlink permission. */
    if( !manifestSymlinks ){
      currentPerm = origPerm;
    }else if( db_exists("SELECT 1 FROM symlink_perm "
                        "WHERE filename=%Q", zName+nRoot) ){
      currentPerm = PERM_LNK;
    }else{
      currentPerm = 0;
    }
#else
    currentPerm = file_wd_perm(zName);
#endif
    if( chnged==0 && (isDeleted || rid==0) ){
      /* "fossil rm" or "fossil add" always change the file */
      chnged = 1;