Fossil SCM
Fix the ticket-change artifact generator so that it puts all fields with the "+" prefix on their name first, where they ought to be.
Commit
e1dac0e4f68d7bc4a2b9b2b056cad3c160710792
Parent
0cc4875fde9f492…
1 file changed
+15
-13
+15
-13
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -434,26 +434,28 @@ | ||
| 434 | 434 | zDate = db_text(0, "SELECT datetime('now')"); |
| 435 | 435 | zDate[10] = 'T'; |
| 436 | 436 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 437 | 437 | free(zDate); |
| 438 | 438 | for(i=0; i<nField; i++){ |
| 439 | - const char *zValue; | |
| 440 | - int nValue; | |
| 441 | 439 | if( azAppend[i] ){ |
| 442 | 440 | blob_appendf(&tktchng, "J +%s %z\n", azField[i], |
| 443 | 441 | fossilize(azAppend[i], -1)); |
| 444 | - }else{ | |
| 445 | - zValue = Th_Fetch(azField[i], &nValue); | |
| 446 | - if( zValue ){ | |
| 447 | - while( nValue>0 && fossil_isspace(zValue[nValue-1]) ){ nValue--; } | |
| 448 | - if( strncmp(zValue, azValue[i], nValue) || strlen(azValue[i])!=nValue ){ | |
| 449 | - if( strncmp(azField[i], "private_", 8)==0 ){ | |
| 450 | - zValue = db_conceal(zValue, nValue); | |
| 451 | - blob_appendf(&tktchng, "J %s %s\n", azField[i], zValue); | |
| 452 | - }else{ | |
| 453 | - blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue); | |
| 454 | - } | |
| 442 | + } | |
| 443 | + } | |
| 444 | + for(i=0; i<nField; i++){ | |
| 445 | + const char *zValue; | |
| 446 | + int nValue; | |
| 447 | + if( azAppend[i] ) continue; | |
| 448 | + zValue = Th_Fetch(azField[i], &nValue); | |
| 449 | + if( zValue ){ | |
| 450 | + while( nValue>0 && fossil_isspace(zValue[nValue-1]) ){ nValue--; } | |
| 451 | + if( strncmp(zValue, azValue[i], nValue) || strlen(azValue[i])!=nValue ){ | |
| 452 | + if( strncmp(azField[i], "private_", 8)==0 ){ | |
| 453 | + zValue = db_conceal(zValue, nValue); | |
| 454 | + blob_appendf(&tktchng, "J %s %s\n", azField[i], zValue); | |
| 455 | + }else{ | |
| 456 | + blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue); | |
| 455 | 457 | } |
| 456 | 458 | } |
| 457 | 459 | } |
| 458 | 460 | } |
| 459 | 461 | if( *(char**)pUuid ){ |
| 460 | 462 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -434,26 +434,28 @@ | |
| 434 | zDate = db_text(0, "SELECT datetime('now')"); |
| 435 | zDate[10] = 'T'; |
| 436 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 437 | free(zDate); |
| 438 | for(i=0; i<nField; i++){ |
| 439 | const char *zValue; |
| 440 | int nValue; |
| 441 | if( azAppend[i] ){ |
| 442 | blob_appendf(&tktchng, "J +%s %z\n", azField[i], |
| 443 | fossilize(azAppend[i], -1)); |
| 444 | }else{ |
| 445 | zValue = Th_Fetch(azField[i], &nValue); |
| 446 | if( zValue ){ |
| 447 | while( nValue>0 && fossil_isspace(zValue[nValue-1]) ){ nValue--; } |
| 448 | if( strncmp(zValue, azValue[i], nValue) || strlen(azValue[i])!=nValue ){ |
| 449 | if( strncmp(azField[i], "private_", 8)==0 ){ |
| 450 | zValue = db_conceal(zValue, nValue); |
| 451 | blob_appendf(&tktchng, "J %s %s\n", azField[i], zValue); |
| 452 | }else{ |
| 453 | blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue); |
| 454 | } |
| 455 | } |
| 456 | } |
| 457 | } |
| 458 | } |
| 459 | if( *(char**)pUuid ){ |
| 460 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -434,26 +434,28 @@ | |
| 434 | zDate = db_text(0, "SELECT datetime('now')"); |
| 435 | zDate[10] = 'T'; |
| 436 | blob_appendf(&tktchng, "D %s\n", zDate); |
| 437 | free(zDate); |
| 438 | for(i=0; i<nField; i++){ |
| 439 | if( azAppend[i] ){ |
| 440 | blob_appendf(&tktchng, "J +%s %z\n", azField[i], |
| 441 | fossilize(azAppend[i], -1)); |
| 442 | } |
| 443 | } |
| 444 | for(i=0; i<nField; i++){ |
| 445 | const char *zValue; |
| 446 | int nValue; |
| 447 | if( azAppend[i] ) continue; |
| 448 | zValue = Th_Fetch(azField[i], &nValue); |
| 449 | if( zValue ){ |
| 450 | while( nValue>0 && fossil_isspace(zValue[nValue-1]) ){ nValue--; } |
| 451 | if( strncmp(zValue, azValue[i], nValue) || strlen(azValue[i])!=nValue ){ |
| 452 | if( strncmp(azField[i], "private_", 8)==0 ){ |
| 453 | zValue = db_conceal(zValue, nValue); |
| 454 | blob_appendf(&tktchng, "J %s %s\n", azField[i], zValue); |
| 455 | }else{ |
| 456 | blob_appendf(&tktchng, "J %s %#F\n", azField[i], nValue, zValue); |
| 457 | } |
| 458 | } |
| 459 | } |
| 460 | } |
| 461 | if( *(char**)pUuid ){ |
| 462 |