Fossil

Check-in [67f787dc4e]
Login

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

Overview
Comment:Revised ticket processing to align with coding style guide, and for clarity of presentation.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 67f787dc4e2e4eab8e58943005312c90bf71dcb0
User & Date: drh 2013-02-12 19:23:57.496
Context
2013-02-13
11:31
Add a draft document describing the ticket tables and how they are generated from ticket change artifacts. ... (check-in: d5be709c20 user: drh tags: trunk)
03:14
Improvements to the UTF-16 BOM detection. ... (check-in: 81c4d78137 user: mistachkin tags: utf16Bom)
2013-02-12
20:17
Picking recent trunk fixes on tickets. ... (check-in: 7a8ed6d7df user: viriketo tags: annotate_links)
19:23
Revised ticket processing to align with coding style guide, and for clarity of presentation. ... (check-in: 67f787dc4e user: drh tags: trunk)
19:09
Fixing the rebuild of the ticket databases, so they get properly the comments included by manifests' "+comment". drh says not to be able to reproduce this issue, but here is a fix that makes all work for me. Feel free to rewrite this patch to match your taste. ... (check-in: 9cca9398ab user: viriketo tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/tkt.c.
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
  if( haveTicketCTime ){
    blob_appendf(&sql1, ", tkt_ctime=coalesce(tkt_ctime,:mtime)");
  }
  aUsed = fossil_malloc( nField );
  memset(aUsed, 0, nField);
  for(i=0; i<p->nField; i++){
    const char *zName = p->aField[i].zName;
    if( zName[0]!='+' && (j = fieldId(zName))<0 ) continue;
    if( zName[0]=='+' && (j = fieldId(zName+1))<0 )
        continue;
    aUsed[j] = 1;
    if( aField[j].mUsed & USEDBY_TICKET ){
      if( zName[0]=='+' ){
        zName++;
        blob_appendf(&sql1,", %s=coalesce(%s,'') || %Q",
                     zName, zName, p->aField[i].zValue);
      }else{







|
|
|







208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
  if( haveTicketCTime ){
    blob_appendf(&sql1, ", tkt_ctime=coalesce(tkt_ctime,:mtime)");
  }
  aUsed = fossil_malloc( nField );
  memset(aUsed, 0, nField);
  for(i=0; i<p->nField; i++){
    const char *zName = p->aField[i].zName;
    const char *zBaseName = zName[0]=='+' ? zName+1 : zName;
    j = fieldId(zBaseName);
    if( j<0 ) continue;
    aUsed[j] = 1;
    if( aField[j].mUsed & USEDBY_TICKET ){
      if( zName[0]=='+' ){
        zName++;
        blob_appendf(&sql1,", %s=coalesce(%s,'') || %Q",
                     zName, zName, p->aField[i].zValue);
      }else{