Fossil

Check-in [e1dac0e4]
Login

Check-in [e1dac0e4]

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

Overview
Comment:Fix the ticket-change artifact generator so that it puts all fields with the "+" prefix on their name first, where they ought to be.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e1dac0e4f68d7bc4a2b9b2b056cad3c160710792
User & Date: drh 2010-11-23 22:18:24
References
2010-11-25
11:21 Ticket [3dbc12f4] Edit ticket fails to save changes if assigned_to AND remark are changed. status still Open with 1 other change ... (artifact: ce8da48e user: anonymous)
Context
2010-11-24
12:03
Factor the sql-command shell out into a separate source file. Add the new content(X) SQL function for accessing uncompressed and undeltaed artifact content. ... (check-in: b4687be4 user: drh tags: trunk)
2010-11-23
22:18
Fix the ticket-change artifact generator so that it puts all fields with the "+" prefix on their name first, where they ought to be. ... (check-in: e1dac0e4 user: drh tags: trunk)
2010-11-19
22:29
Further work on getting a "commit" or "update" to continue operating after an autosync failure. The "commit" command prompts to verify that you want to continue. ... (check-in: 0cc4875f user: drh tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/tkt.c.

432
433
434
435
436
437
438
439
440
441
442
443


444



445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
  zUuid = (const char *)pUuid;
  blob_zero(&tktchng);
  zDate = db_text(0, "SELECT datetime('now')");
  zDate[10] = 'T';
  blob_appendf(&tktchng, "D %s\n", zDate);
  free(zDate);
  for(i=0; i<nField; i++){
    const char *zValue;
    int nValue;
    if( azAppend[i] ){
      blob_appendf(&tktchng, "J +%s %z\n", azField[i],
                   fossilize(azAppend[i], -1));


    }else{



      zValue = Th_Fetch(azField[i], &nValue);
      if( zValue ){
        while( nValue>0 && fossil_isspace(zValue[nValue-1]) ){ nValue--; }
        if( strncmp(zValue, azValue[i], nValue) || strlen(azValue[i])!=nValue ){
          if( strncmp(azField[i], "private_", 8)==0 ){
            zValue = db_conceal(zValue, nValue);
            blob_appendf(&tktchng, "J %s %s\n", azField[i], zValue);
          }else{
            blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue);
          }
        }
      }
    }
  }
  if( *(char**)pUuid ){
    zUuid = db_text(0, 
       "SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%s*'", P("name")







<
<



>
>
|
>
>
>
|
|
|
|
|
|
|
|
|
<







432
433
434
435
436
437
438


439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456

457
458
459
460
461
462
463
  zUuid = (const char *)pUuid;
  blob_zero(&tktchng);
  zDate = db_text(0, "SELECT datetime('now')");
  zDate[10] = 'T';
  blob_appendf(&tktchng, "D %s\n", zDate);
  free(zDate);
  for(i=0; i<nField; i++){


    if( azAppend[i] ){
      blob_appendf(&tktchng, "J +%s %z\n", azField[i],
                   fossilize(azAppend[i], -1));
    }
  }
  for(i=0; i<nField; i++){
    const char *zValue;
    int nValue;
    if( azAppend[i] ) continue;
    zValue = Th_Fetch(azField[i], &nValue);
    if( zValue ){
      while( nValue>0 && fossil_isspace(zValue[nValue-1]) ){ nValue--; }
      if( strncmp(zValue, azValue[i], nValue) || strlen(azValue[i])!=nValue ){
        if( strncmp(azField[i], "private_", 8)==0 ){
          zValue = db_conceal(zValue, nValue);
          blob_appendf(&tktchng, "J %s %s\n", azField[i], zValue);
        }else{
          blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue);

        }
      }
    }
  }
  if( *(char**)pUuid ){
    zUuid = db_text(0, 
       "SELECT tkt_uuid FROM ticket WHERE tkt_uuid GLOB '%s*'", P("name")