Fossil

Check-in [364d0431]
Login

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

Overview
Comment:Tweak comment style for consistency within functions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | enhanced-symlink
Files: files | file ages | folders
SHA3-256:364d04315b162ec5496b56ac9de265272d0ef204b045bd14415a59e0b307dd91
User & Date: andygoth 2017-10-14 21:48:27
Context
2017-10-14
22:03
Additional corrections to Windows symlink permissions logic check-in: f29c8a44 user: andygoth tags: enhanced-symlink
21:48
Tweak comment style for consistency within functions check-in: 364d0431 user: andygoth tags: enhanced-symlink
21:44
Correct vfile_check_signature() handling of manifest.symlinks not existing or manifest setting not containing the l flag check-in: de50c496 user: andygoth tags: enhanced-symlink
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/checkin.c.

1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
....
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
  Blob mcksum;                /* Manifest checksum */
  ManifestFile *pFile;        /* File from the baseline */
  int nFBcard = 0;            /* Number of B-cards and F-cards */
  int i;                      /* Loop counter */
  const char *zColor;         /* Modified value of p->zColor */

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

  assert( pBaseline==0 || pBaseline->zBaseline==0 );
  assert( pBaseline==0 || zBaselineUuid!=0 );
  blob_zero(pOut);
................................................................................
    blob_resize(&filename, nBasename);
    blob_append(&filename, zName, -1);

    /* Potentially update the permissions of files selected to be checked in. */
#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( isSelected && manifestSymlinks ){
      isLink = db_exists("SELECT 1 FROM symlink_perm WHERE filename=%Q", zName);
    }
#else
    /* For unix, extract the "executable" and "symlink" permissions
    ** directly from the filesystem.  On windows, permissions are
    ** unchanged from the original.
    */
    if( isSelected ){
      int mPerm;

      mPerm = file_wd_perm(blob_str(&filename));
      isExe = ( mPerm==PERM_EXE );
      isLink = ( mPerm==PERM_LNK );
    }







|







 







|
<






|
<







1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
....
1561
1562
1563
1564
1565
1566
1567
1568

1569
1570
1571
1572
1573
1574
1575

1576
1577
1578
1579
1580
1581
1582
  Blob mcksum;                /* Manifest checksum */
  ManifestFile *pFile;        /* File from the baseline */
  int nFBcard = 0;            /* Number of B-cards and F-cards */
  int i;                      /* Loop counter */
  const char *zColor;         /* Modified value of p->zColor */

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

  assert( pBaseline==0 || pBaseline->zBaseline==0 );
  assert( pBaseline==0 || zBaselineUuid!=0 );
  blob_zero(pOut);
................................................................................
    blob_resize(&filename, nBasename);
    blob_append(&filename, zName, -1);

    /* Potentially update the permissions of files selected to be checked in. */
#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( isSelected && manifestSymlinks ){
      isLink = db_exists("SELECT 1 FROM symlink_perm WHERE filename=%Q", zName);
    }
#else
    /* For unix, extract the "executable" and "symlink" permissions
    ** directly from the filesystem.  On windows, permissions are
    ** unchanged from the original. */

    if( isSelected ){
      int mPerm;

      mPerm = file_wd_perm(blob_str(&filename));
      isExe = ( mPerm==PERM_EXE );
      isLink = ( mPerm==PERM_LNK );
    }

Changes to src/vfile.c.

173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
...
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
void vfile_check_signature(int vid, unsigned int cksigFlags){
  int nErr = 0;
  Stmt q;
  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,"
................................................................................
    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







|







 







|
|







173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
...
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
void vfile_check_signature(int vid, unsigned int cksigFlags){
  int nErr = 0;
  Stmt q;
  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,"
................................................................................
    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