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.

drh 2010-11-23 22:18 trunk
Commit e1dac0e4f68d7bc4a2b9b2b056cad3c160710792
1 file changed +15 -13
+15 -13
--- src/tkt.c
+++ src/tkt.c
@@ -434,26 +434,28 @@
434434
zDate = db_text(0, "SELECT datetime('now')");
435435
zDate[10] = 'T';
436436
blob_appendf(&tktchng, "D %s\n", zDate);
437437
free(zDate);
438438
for(i=0; i<nField; i++){
439
- const char *zValue;
440
- int nValue;
441439
if( azAppend[i] ){
442440
blob_appendf(&tktchng, "J +%s %z\n", azField[i],
443441
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);
455457
}
456458
}
457459
}
458460
}
459461
if( *(char**)pUuid ){
460462
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button