Fossil with Commonmark

Changes On Branch andygoth-metadata-changes
Login

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

Changes In Branch andygoth-metadata-changes Excluding Merge-Ins

This is equivalent to a diff from be25d412f1 to 9e52251e6e

2015-05-17
00:58
Integrate andygoth-metadata-changes. Now the [fossil changes] command shows execute and symlink (type) changes, and -allow-empty is not needed for [fossil commit] to commit such type changes in absence of content changes. check-in: dca018c447 user: andygoth tags: trunk
2015-05-16
11:48
Add class tags to elements of the piechart so that they can be configured using CSS. Add appropriate CSS markup to the xekri skin. Merge the xekri skin into trunk. check-in: f1dd937c20 user: drh tags: trunk
02:18
Merge updates from trunk. check-in: 777db01e1d user: zakero tags: skin-xekri
2015-05-15
18:16
Show when files become symlinks in /info report. check-in: 5f26745652 user: andygoth tags: andygoth-metadata-info
17:51
Replace call to checkout_set_all_exe() which only works on the execute bit with inline code that updates both the isexe and islink columns of the vfile table for all files in the checkout. Closed-Leaf check-in: 9e52251e6e user: andygoth tags: andygoth-metadata-changes
17:10
Update all executable bits in vfile at end of successful commit. check-in: 076c854482 user: andygoth tags: andygoth-metadata-changes
17:10
Merge trunk. check-in: d186eb56f1 user: andygoth tags: andygoth-metadata-changes
16:49
Remove redundant use of chnged column/variable. The SELECT statement already ensures each row has chnged==1, so there is no need to check it repeatedly. check-in: be25d412f1 user: andygoth tags: trunk
14:43
Update change log with detail about fork warning on sync. check-in: 209da9bced user: andybradford tags: trunk

Changes to src/checkin.c.

111
112
113
114
115
116
117








118
119
120
121
122
123
124
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132







+
+
+
+
+
+
+
+







        blob_appendf(report, "UPDATED_BY_MERGE %s\n", zDisplayName);
      }else if( isChnged==3 ){
        blob_appendf(report, "ADDED_BY_MERGE %s\n", zDisplayName);
      }else if( isChnged==4 ){
        blob_appendf(report, "UPDATED_BY_INTEGRATE %s\n", zDisplayName);
      }else if( isChnged==5 ){
        blob_appendf(report, "ADDED_BY_INTEGRATE %s\n", zDisplayName);
      }else if( isChnged==6 ){
        blob_appendf(report, "EXECUTABLE %s\n", zDisplayName);
      }else if( isChnged==7 ){
        blob_appendf(report, "SYMLINK    %s\n", zDisplayName);
      }else if( isChnged==8 ){
        blob_appendf(report, "UNEXEC     %s\n", zDisplayName);
      }else if( isChnged==9 ){
        blob_appendf(report, "UNLINK     %s\n", zDisplayName);
      }else if( file_contains_merge_marker(zFullName) ){
        blob_appendf(report, "CONFLICT   %s\n", zDisplayName);
      }else{
        blob_appendf(report, "EDITED     %s\n", zDisplayName);
      }
    }else if( isRenamed ){
      blob_appendf(report, "RENAMED    %s\n", zDisplayName);
1631
1632
1633
1634
1635
1636
1637


1638
1639
1640
1641
1642
1643
1644
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654







+
+







  int useCksum;          /* True if checksums should be computed and verified */
  int outputManifest;    /* True to output "manifest" and "manifest.uuid" */
  int dryRunFlag;        /* True for a test run.  Debugging only */
  CheckinInfo sCiInfo;   /* Information about this check-in */
  const char *zComFile;  /* Read commit message from this file */
  int nTag = 0;          /* Number of --tag arguments */
  const char *zTag;      /* A single --tag argument */
  ManifestFile *pFile;   /* File structure in the manifest */
  Manifest *pManifest;   /* Manifest structure */
  Blob manifest;         /* Manifest in baseline form */
  Blob muuid;            /* Manifest uuid */
  Blob cksum1, cksum2;   /* Before and after commit checksums */
  Blob cksum1b;          /* Checksum recorded in the manifest */
  int szD;               /* Size of the delta manifest */
  int szB;               /* Size of the baseline manifest */
  int nConflict = 0;     /* Number of unresolved merge conflicts */
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085


















2086
2087
2088
2089
2090
2091
2092
2078
2079
2080
2081
2082
2083
2084

2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119







-










+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







    blob_zero(&muuid);
    blob_appendf(&muuid, "%s\n", zUuid);
    blob_write_to_file(&muuid, zManifestFile);
    free(zManifestFile);
    blob_reset(&muuid);
  }


  /* Update the vfile and vmerge tables */
  db_multi_exec(
    "DELETE FROM vfile WHERE (vid!=%d OR deleted) AND is_selected(id);"
    "DELETE FROM vmerge;"
    "UPDATE vfile SET vid=%d;"
    "UPDATE vfile SET rid=mrid, chnged=0, deleted=0, origname=NULL"
    " WHERE is_selected(id);"
    , vid, nvid
  );
  db_lset_int("checkout", nvid);

  /* Update the isexe and islink columns of the vfile table */
  db_prepare(&q,
    "UPDATE vfile SET isexe=:exec, islink=:link"
    " WHERE vid=:vid AND pathname=:path AND (isexe!=:exec OR islink!=:link)"
  );
  db_bind_int(&q, ":vid", nvid);
  pManifest = manifest_get(nvid, CFTYPE_MANIFEST, 0);
  manifest_file_rewind(pManifest);
  while( (pFile = manifest_file_next(pManifest, 0)) ){
    db_bind_int(&q, ":exec", pFile->zPerm && strstr(pFile->zPerm, "x"));
    db_bind_int(&q, ":link", pFile->zPerm && strstr(pFile->zPerm, "l"));
    db_bind_text(&q, ":path", pFile->zName);
    db_step(&q);
    db_reset(&q);
  }
  db_finalize(&q);
  manifest_destroy(pManifest);

  if( useCksum ){
    /* Verify that the repository checksum matches the expected checksum
    ** calculated before the check-in started (and stored as the R record
    ** of the manifest file).
    */
    vfile_aggregate_checksum_repository(nvid, &cksum2);

Changes to src/vfile.c.

134
135
136
137
138
139
140
141
142
143
144
145












146
147
148
149
150
151
152
134
135
136
137
138
139
140





141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159







-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+







#define CKSIG_ENOTFILE  0x001   /* non-file FS objects throw an error */
#define CKSIG_SHA1      0x002   /* Verify file content using sha1sum */
#define CKSIG_SETMTIME  0x004   /* Set mtime to last check-out time */

#endif /* INTERFACE */

/*
** Look at every VFILE entry with the given vid and update
** VFILE.CHNGED field according to whether or not
** the file has changed.  0 means no change.  1 means edited.  2 means
** the file has changed due to a merge.  3 means the file was added
** by a merge.
** Look at every VFILE entry with the given vid and update VFILE.CHNGED field
** according to whether or not the file has changed.
** - 0 means no change.
** - 1 means edited.
** - 2 means changed due to a merge.
** - 3 means added by a merge.
** - 4 means changed due to an integrate merge.
** - 5 means added by an integrate merge.
** - 6 means became executable but has unmodified contents.
** - 7 means became a symlink whose target equals its old contents.
** - 8 means lost executable status but has unmodified contents.
** - 9 means lost symlink status and has contents equal to its old target.
**
** If VFILE.DELETED is true or if VFILE.RID is zero, then the file was either
** removed from configuration management via "fossil rm" or added via
** "fossil add", respectively, and in both cases we always know that
** the file has changed without having the check the size, mtime,
** or on-disk content.
**
168
169
170
171
172
173
174
175


176
177


178
179
180
181
182


183
184
185
186
187
188
189
190
191
192
193
194
195
196


197
198
199
200
201
202
203
175
176
177
178
179
180
181

182
183
184

185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216







-
+
+

-
+
+





+
+














+
+







  Stmt q;
  Blob fileCksum, origCksum;
  int useMtime = (cksigFlags & CKSIG_SHA1)==0
                    && db_get_boolean("mtime-changes", 1);

  db_begin_transaction();
  db_prepare(&q, "SELECT id, %Q || pathname,"
                 "       vfile.mrid, deleted, chnged, uuid, size, mtime"
                 "       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"
                 " WHERE vid=%d ", g.zLocalRoot, vid);
                 " WHERE vid=%d ", g.zLocalRoot, PERM_EXE, PERM_LNK, PERM_REG,
                 vid);
  while( db_step(&q)==SQLITE_ROW ){
    int id, rid, isDeleted;
    const char *zName;
    int chnged = 0;
    int oldChnged;
    int origPerm;
    int currentPerm;
    i64 oldMtime;
    i64 currentMtime;
    i64 origSize;
    i64 currentSize;

    id = db_column_int(&q, 0);
    zName = db_column_text(&q, 1);
    rid = db_column_int(&q, 2);
    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);
    currentPerm = file_wd_perm(zName);
    if( chnged==0 && (isDeleted || rid==0) ){
      /* "fossil rm" or "fossil add" always change the file */
      chnged = 1;
    }else if( !file_wd_isfile_or_link(0) && currentSize>=0 ){
      if( cksigFlags & CKSIG_ENOTFILE ){
        fossil_warning("not an ordinary file: %s", zName);
        nErr++;
243
244
245
246
247
248
249















250
251
252
253
254
255
256
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







      if( mtime_of_manifest_file(vid,rid,&desiredMtime)==0 ){
        if( currentMtime!=desiredMtime ){
          file_set_mtime(zName, desiredMtime);
          currentMtime = file_wd_mtime(zName);
        }
      }
    }
#ifndef _WIN32
    if( chnged==0 || chnged==6 || chnged==7 || chnged==8 || chnged==9 ){
      if( origPerm == currentPerm ){
        chnged = 0;
      }else if( currentPerm == PERM_EXE ){
        chnged = 6;
      }else if( currentPerm == PERM_LNK ){
        chnged = 7;
      }else if( origPerm == PERM_EXE ){
        chnged = 8;
      }else if( origPerm == PERM_LNK ){
        chnged = 9;
      }
    }
#endif
    if( currentMtime!=oldMtime || chnged!=oldChnged ){
      db_multi_exec("UPDATE vfile SET mtime=%lld, chnged=%d WHERE id=%d",
                    currentMtime, chnged, id);
    }
  }
  db_finalize(&q);
  if( nErr ) fossil_fatal("abort due to prior errors");

Changes to www/changes.wiki.

28
29
30
31
32
33
34
35

36
37
38



39
40
41
42
43
44
45
28
29
30
31
32
33
34

35
36
37
38
39
40
41
42
43
44
45
46
47
48







-
+



+
+
+







     necessary, in the Tcl integration subsystem.
  *  Add [/help?cmd=leaves|fossil leaves -multiple], for finding multiple
     leaves on the same branch.
  *  Added the "Blitz" skin option.
  *  Removed the ".fossil-settings/keep-glob" file.  It should not have been
     checked into the repository.
  *  Update the built-in SQLite to version 3.8.10.1.
  *  Made [/help?cmd=open|fossil open] honor ".fossil-settings/allow-symlinks".
  *  Make [/help?cmd=open|fossil open] honor ".fossil-settings/allow-symlinks".
  *  Allow [/help?cmd=add|fossil add] to be used on symlinks to nonexistent or
     unreadable files in the same way as [/help?cmd=addremove|fossil addremove].
  *  Added fork warning to be issued if sync produced a fork
  *  Have [/help/cmd=changes|fossil changes] and
     [/help/cmd=status|fossil status] report when executable or symlink status
     changes on otherwise unmodified files.

<h2>Changes for Version 1.32 (2015-03-14)</h2>
  *  When creating a new repository using [/help?cmd=init|fossil init], ensure
     that the new repository is fully compatible with historical versions of
     Fossil by having a valid manifest as RID 1.
  *  Anti-aliased rendering of arrowheads on timeline graphs.
  *  Added vi/less-style key bindings to the --tk diff GUI.