Fossil SCM
merge from trunk
Commit
c9df94776183f72f52420d9bcaefc4b240dd634a
Parent
c880f0920fc9cec…
5 files changed
+2
+7
-2
+7
-2
+8
-1
+8
-1
+2
| --- src/encode.c | ||
| +++ src/encode.c | ||
| @@ -530,10 +530,11 @@ | ||
| 530 | 530 | char *obscure(const char *zIn){ |
| 531 | 531 | int n, i; |
| 532 | 532 | unsigned char salt; |
| 533 | 533 | char *zOut; |
| 534 | 534 | |
| 535 | + if( zIn==0 ) return 0; | |
| 535 | 536 | n = strlen(zIn); |
| 536 | 537 | zOut = malloc( n*2+3 ); |
| 537 | 538 | if( zOut==0 ) fossil_panic("out of memory"); |
| 538 | 539 | sqlite3_randomness(1, &salt); |
| 539 | 540 | zOut[n+1] = (char)salt; |
| @@ -552,10 +553,11 @@ | ||
| 552 | 553 | char *unobscure(const char *zIn){ |
| 553 | 554 | int n, i; |
| 554 | 555 | unsigned char salt; |
| 555 | 556 | char *zOut; |
| 556 | 557 | |
| 558 | + if( zIn==0 ) return 0; | |
| 557 | 559 | n = strlen(zIn); |
| 558 | 560 | zOut = malloc( n + 1 ); |
| 559 | 561 | if( zOut==0 ) fossil_panic("out of memory"); |
| 560 | 562 | if( n<2 |
| 561 | 563 | || decode16((unsigned char*)zIn, &salt, 2) |
| 562 | 564 |
| --- src/encode.c | |
| +++ src/encode.c | |
| @@ -530,10 +530,11 @@ | |
| 530 | char *obscure(const char *zIn){ |
| 531 | int n, i; |
| 532 | unsigned char salt; |
| 533 | char *zOut; |
| 534 | |
| 535 | n = strlen(zIn); |
| 536 | zOut = malloc( n*2+3 ); |
| 537 | if( zOut==0 ) fossil_panic("out of memory"); |
| 538 | sqlite3_randomness(1, &salt); |
| 539 | zOut[n+1] = (char)salt; |
| @@ -552,10 +553,11 @@ | |
| 552 | char *unobscure(const char *zIn){ |
| 553 | int n, i; |
| 554 | unsigned char salt; |
| 555 | char *zOut; |
| 556 | |
| 557 | n = strlen(zIn); |
| 558 | zOut = malloc( n + 1 ); |
| 559 | if( zOut==0 ) fossil_panic("out of memory"); |
| 560 | if( n<2 |
| 561 | || decode16((unsigned char*)zIn, &salt, 2) |
| 562 |
| --- src/encode.c | |
| +++ src/encode.c | |
| @@ -530,10 +530,11 @@ | |
| 530 | char *obscure(const char *zIn){ |
| 531 | int n, i; |
| 532 | unsigned char salt; |
| 533 | char *zOut; |
| 534 | |
| 535 | if( zIn==0 ) return 0; |
| 536 | n = strlen(zIn); |
| 537 | zOut = malloc( n*2+3 ); |
| 538 | if( zOut==0 ) fossil_panic("out of memory"); |
| 539 | sqlite3_randomness(1, &salt); |
| 540 | zOut[n+1] = (char)salt; |
| @@ -552,10 +553,11 @@ | |
| 553 | char *unobscure(const char *zIn){ |
| 554 | int n, i; |
| 555 | unsigned char salt; |
| 556 | char *zOut; |
| 557 | |
| 558 | if( zIn==0 ) return 0; |
| 559 | n = strlen(zIn); |
| 560 | zOut = malloc( n + 1 ); |
| 561 | if( zOut==0 ) fossil_panic("out of memory"); |
| 562 | if( n<2 |
| 563 | || decode16((unsigned char*)zIn, &salt, 2) |
| 564 |
+7
-2
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -46,11 +46,16 @@ | ||
| 46 | 46 | free(zEventId); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /* |
| 50 | 50 | ** WEBPAGE: event |
| 51 | -** URL: /event?name=EVENTID&detail=BOOLEAN&aid=ARTIFACTID | |
| 51 | +** URL: /event | |
| 52 | +** PARAMETERS: | |
| 53 | +** | |
| 54 | +** name=EVENTID // Identify the event to display EVENTID must be complete | |
| 55 | +** detail=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. | |
| 56 | +** aid=ARTIFACTID // Which specific version of the event. Optional. | |
| 52 | 57 | ** |
| 53 | 58 | ** Display an existing event identified by EVENTID |
| 54 | 59 | */ |
| 55 | 60 | void event_page(void){ |
| 56 | 61 | int rid = 0; /* rid of the event artifact */ |
| @@ -82,11 +87,11 @@ | ||
| 82 | 87 | zUuid = (char*)P("aid"); |
| 83 | 88 | specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0; |
| 84 | 89 | rid = nextRid = prevRid = 0; |
| 85 | 90 | db_prepare(&q1, |
| 86 | 91 | "SELECT rid FROM tagxref" |
| 87 | - " WHERE tagid=(SELECT tagid FROM tag WHERE tagname='event-%q')" | |
| 92 | + " WHERE tagid=(SELECT tagid FROM tag WHERE tagname GLOB 'event-%q*')" | |
| 88 | 93 | " ORDER BY mtime DESC", |
| 89 | 94 | zEventId |
| 90 | 95 | ); |
| 91 | 96 | while( db_step(&q1)==SQLITE_ROW ){ |
| 92 | 97 | nextRid = rid; |
| 93 | 98 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -46,11 +46,16 @@ | |
| 46 | free(zEventId); |
| 47 | } |
| 48 | |
| 49 | /* |
| 50 | ** WEBPAGE: event |
| 51 | ** URL: /event?name=EVENTID&detail=BOOLEAN&aid=ARTIFACTID |
| 52 | ** |
| 53 | ** Display an existing event identified by EVENTID |
| 54 | */ |
| 55 | void event_page(void){ |
| 56 | int rid = 0; /* rid of the event artifact */ |
| @@ -82,11 +87,11 @@ | |
| 82 | zUuid = (char*)P("aid"); |
| 83 | specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0; |
| 84 | rid = nextRid = prevRid = 0; |
| 85 | db_prepare(&q1, |
| 86 | "SELECT rid FROM tagxref" |
| 87 | " WHERE tagid=(SELECT tagid FROM tag WHERE tagname='event-%q')" |
| 88 | " ORDER BY mtime DESC", |
| 89 | zEventId |
| 90 | ); |
| 91 | while( db_step(&q1)==SQLITE_ROW ){ |
| 92 | nextRid = rid; |
| 93 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -46,11 +46,16 @@ | |
| 46 | free(zEventId); |
| 47 | } |
| 48 | |
| 49 | /* |
| 50 | ** WEBPAGE: event |
| 51 | ** URL: /event |
| 52 | ** PARAMETERS: |
| 53 | ** |
| 54 | ** name=EVENTID // Identify the event to display EVENTID must be complete |
| 55 | ** detail=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. |
| 56 | ** aid=ARTIFACTID // Which specific version of the event. Optional. |
| 57 | ** |
| 58 | ** Display an existing event identified by EVENTID |
| 59 | */ |
| 60 | void event_page(void){ |
| 61 | int rid = 0; /* rid of the event artifact */ |
| @@ -82,11 +87,11 @@ | |
| 87 | zUuid = (char*)P("aid"); |
| 88 | specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0; |
| 89 | rid = nextRid = prevRid = 0; |
| 90 | db_prepare(&q1, |
| 91 | "SELECT rid FROM tagxref" |
| 92 | " WHERE tagid=(SELECT tagid FROM tag WHERE tagname GLOB 'event-%q*')" |
| 93 | " ORDER BY mtime DESC", |
| 94 | zEventId |
| 95 | ); |
| 96 | while( db_step(&q1)==SQLITE_ROW ){ |
| 97 | nextRid = rid; |
| 98 |
+7
-2
| --- src/event.c | ||
| +++ src/event.c | ||
| @@ -46,11 +46,16 @@ | ||
| 46 | 46 | free(zEventId); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /* |
| 50 | 50 | ** WEBPAGE: event |
| 51 | -** URL: /event?name=EVENTID&detail=BOOLEAN&aid=ARTIFACTID | |
| 51 | +** URL: /event | |
| 52 | +** PARAMETERS: | |
| 53 | +** | |
| 54 | +** name=EVENTID // Identify the event to display EVENTID must be complete | |
| 55 | +** detail=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. | |
| 56 | +** aid=ARTIFACTID // Which specific version of the event. Optional. | |
| 52 | 57 | ** |
| 53 | 58 | ** Display an existing event identified by EVENTID |
| 54 | 59 | */ |
| 55 | 60 | void event_page(void){ |
| 56 | 61 | int rid = 0; /* rid of the event artifact */ |
| @@ -82,11 +87,11 @@ | ||
| 82 | 87 | zUuid = (char*)P("aid"); |
| 83 | 88 | specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0; |
| 84 | 89 | rid = nextRid = prevRid = 0; |
| 85 | 90 | db_prepare(&q1, |
| 86 | 91 | "SELECT rid FROM tagxref" |
| 87 | - " WHERE tagid=(SELECT tagid FROM tag WHERE tagname='event-%q')" | |
| 92 | + " WHERE tagid=(SELECT tagid FROM tag WHERE tagname GLOB 'event-%q*')" | |
| 88 | 93 | " ORDER BY mtime DESC", |
| 89 | 94 | zEventId |
| 90 | 95 | ); |
| 91 | 96 | while( db_step(&q1)==SQLITE_ROW ){ |
| 92 | 97 | nextRid = rid; |
| 93 | 98 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -46,11 +46,16 @@ | |
| 46 | free(zEventId); |
| 47 | } |
| 48 | |
| 49 | /* |
| 50 | ** WEBPAGE: event |
| 51 | ** URL: /event?name=EVENTID&detail=BOOLEAN&aid=ARTIFACTID |
| 52 | ** |
| 53 | ** Display an existing event identified by EVENTID |
| 54 | */ |
| 55 | void event_page(void){ |
| 56 | int rid = 0; /* rid of the event artifact */ |
| @@ -82,11 +87,11 @@ | |
| 82 | zUuid = (char*)P("aid"); |
| 83 | specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0; |
| 84 | rid = nextRid = prevRid = 0; |
| 85 | db_prepare(&q1, |
| 86 | "SELECT rid FROM tagxref" |
| 87 | " WHERE tagid=(SELECT tagid FROM tag WHERE tagname='event-%q')" |
| 88 | " ORDER BY mtime DESC", |
| 89 | zEventId |
| 90 | ); |
| 91 | while( db_step(&q1)==SQLITE_ROW ){ |
| 92 | nextRid = rid; |
| 93 |
| --- src/event.c | |
| +++ src/event.c | |
| @@ -46,11 +46,16 @@ | |
| 46 | free(zEventId); |
| 47 | } |
| 48 | |
| 49 | /* |
| 50 | ** WEBPAGE: event |
| 51 | ** URL: /event |
| 52 | ** PARAMETERS: |
| 53 | ** |
| 54 | ** name=EVENTID // Identify the event to display EVENTID must be complete |
| 55 | ** detail=BOOLEAN // Show details if TRUE. Default is FALSE. Optional. |
| 56 | ** aid=ARTIFACTID // Which specific version of the event. Optional. |
| 57 | ** |
| 58 | ** Display an existing event identified by EVENTID |
| 59 | */ |
| 60 | void event_page(void){ |
| 61 | int rid = 0; /* rid of the event artifact */ |
| @@ -82,11 +87,11 @@ | |
| 87 | zUuid = (char*)P("aid"); |
| 88 | specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0; |
| 89 | rid = nextRid = prevRid = 0; |
| 90 | db_prepare(&q1, |
| 91 | "SELECT rid FROM tagxref" |
| 92 | " WHERE tagid=(SELECT tagid FROM tag WHERE tagname GLOB 'event-%q*')" |
| 93 | " ORDER BY mtime DESC", |
| 94 | zEventId |
| 95 | ); |
| 96 | while( db_step(&q1)==SQLITE_ROW ){ |
| 97 | nextRid = rid; |
| 98 |
+8
-1
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -469,11 +469,18 @@ | ||
| 469 | 469 | *(const char**)pUuid = zUuid; |
| 470 | 470 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 471 | 471 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 472 | 472 | md5sum_blob(&tktchng, &cksum); |
| 473 | 473 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 474 | - if( g.thTrace ){ | |
| 474 | + if( g.zPath[0]=='d' ){ | |
| 475 | + /* If called from /debug_tktnew or /debug_tktedit... */ | |
| 476 | + @ <font color="blue"> | |
| 477 | + @ <p>Ticket artifact that would have been submitted:</p> | |
| 478 | + @ <blockquote><pre>%h(blob_str(&tktchng))</pre></blockquote> | |
| 479 | + @ <hr /></font> | |
| 480 | + return TH_OK; | |
| 481 | + }else if( g.thTrace ){ | |
| 475 | 482 | Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n" |
| 476 | 483 | "}<br />\n", |
| 477 | 484 | blob_str(&tktchng)); |
| 478 | 485 | }else{ |
| 479 | 486 | rid = content_put(&tktchng, 0, 0); |
| 480 | 487 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -469,11 +469,18 @@ | |
| 469 | *(const char**)pUuid = zUuid; |
| 470 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 471 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 472 | md5sum_blob(&tktchng, &cksum); |
| 473 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 474 | if( g.thTrace ){ |
| 475 | Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n" |
| 476 | "}<br />\n", |
| 477 | blob_str(&tktchng)); |
| 478 | }else{ |
| 479 | rid = content_put(&tktchng, 0, 0); |
| 480 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -469,11 +469,18 @@ | |
| 469 | *(const char**)pUuid = zUuid; |
| 470 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 471 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 472 | md5sum_blob(&tktchng, &cksum); |
| 473 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 474 | if( g.zPath[0]=='d' ){ |
| 475 | /* If called from /debug_tktnew or /debug_tktedit... */ |
| 476 | @ <font color="blue"> |
| 477 | @ <p>Ticket artifact that would have been submitted:</p> |
| 478 | @ <blockquote><pre>%h(blob_str(&tktchng))</pre></blockquote> |
| 479 | @ <hr /></font> |
| 480 | return TH_OK; |
| 481 | }else if( g.thTrace ){ |
| 482 | Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n" |
| 483 | "}<br />\n", |
| 484 | blob_str(&tktchng)); |
| 485 | }else{ |
| 486 | rid = content_put(&tktchng, 0, 0); |
| 487 |
+8
-1
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -469,11 +469,18 @@ | ||
| 469 | 469 | *(const char**)pUuid = zUuid; |
| 470 | 470 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 471 | 471 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 472 | 472 | md5sum_blob(&tktchng, &cksum); |
| 473 | 473 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 474 | - if( g.thTrace ){ | |
| 474 | + if( g.zPath[0]=='d' ){ | |
| 475 | + /* If called from /debug_tktnew or /debug_tktedit... */ | |
| 476 | + @ <font color="blue"> | |
| 477 | + @ <p>Ticket artifact that would have been submitted:</p> | |
| 478 | + @ <blockquote><pre>%h(blob_str(&tktchng))</pre></blockquote> | |
| 479 | + @ <hr /></font> | |
| 480 | + return TH_OK; | |
| 481 | + }else if( g.thTrace ){ | |
| 475 | 482 | Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n" |
| 476 | 483 | "}<br />\n", |
| 477 | 484 | blob_str(&tktchng)); |
| 478 | 485 | }else{ |
| 479 | 486 | rid = content_put(&tktchng, 0, 0); |
| 480 | 487 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -469,11 +469,18 @@ | |
| 469 | *(const char**)pUuid = zUuid; |
| 470 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 471 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 472 | md5sum_blob(&tktchng, &cksum); |
| 473 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 474 | if( g.thTrace ){ |
| 475 | Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n" |
| 476 | "}<br />\n", |
| 477 | blob_str(&tktchng)); |
| 478 | }else{ |
| 479 | rid = content_put(&tktchng, 0, 0); |
| 480 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -469,11 +469,18 @@ | |
| 469 | *(const char**)pUuid = zUuid; |
| 470 | blob_appendf(&tktchng, "K %s\n", zUuid); |
| 471 | blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : ""); |
| 472 | md5sum_blob(&tktchng, &cksum); |
| 473 | blob_appendf(&tktchng, "Z %b\n", &cksum); |
| 474 | if( g.zPath[0]=='d' ){ |
| 475 | /* If called from /debug_tktnew or /debug_tktedit... */ |
| 476 | @ <font color="blue"> |
| 477 | @ <p>Ticket artifact that would have been submitted:</p> |
| 478 | @ <blockquote><pre>%h(blob_str(&tktchng))</pre></blockquote> |
| 479 | @ <hr /></font> |
| 480 | return TH_OK; |
| 481 | }else if( g.thTrace ){ |
| 482 | Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n" |
| 483 | "}<br />\n", |
| 484 | blob_str(&tktchng)); |
| 485 | }else{ |
| 486 | rid = content_put(&tktchng, 0, 0); |
| 487 |