Fossil SCM

merge from trunk

wolfgang 2010-10-11 15:49 wolfgangHelpCmd merge
Commit c9df94776183f72f52420d9bcaefc4b240dd634a
--- src/encode.c
+++ src/encode.c
@@ -530,10 +530,11 @@
530530
char *obscure(const char *zIn){
531531
int n, i;
532532
unsigned char salt;
533533
char *zOut;
534534
535
+ if( zIn==0 ) return 0;
535536
n = strlen(zIn);
536537
zOut = malloc( n*2+3 );
537538
if( zOut==0 ) fossil_panic("out of memory");
538539
sqlite3_randomness(1, &salt);
539540
zOut[n+1] = (char)salt;
@@ -552,10 +553,11 @@
552553
char *unobscure(const char *zIn){
553554
int n, i;
554555
unsigned char salt;
555556
char *zOut;
556557
558
+ if( zIn==0 ) return 0;
557559
n = strlen(zIn);
558560
zOut = malloc( n + 1 );
559561
if( zOut==0 ) fossil_panic("out of memory");
560562
if( n<2
561563
|| decode16((unsigned char*)zIn, &salt, 2)
562564
--- 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 @@
4646
free(zEventId);
4747
}
4848
4949
/*
5050
** 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.
5257
**
5358
** Display an existing event identified by EVENTID
5459
*/
5560
void event_page(void){
5661
int rid = 0; /* rid of the event artifact */
@@ -82,11 +87,11 @@
8287
zUuid = (char*)P("aid");
8388
specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0;
8489
rid = nextRid = prevRid = 0;
8590
db_prepare(&q1,
8691
"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*')"
8893
" ORDER BY mtime DESC",
8994
zEventId
9095
);
9196
while( db_step(&q1)==SQLITE_ROW ){
9297
nextRid = rid;
9398
--- 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 @@
4646
free(zEventId);
4747
}
4848
4949
/*
5050
** 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.
5257
**
5358
** Display an existing event identified by EVENTID
5459
*/
5560
void event_page(void){
5661
int rid = 0; /* rid of the event artifact */
@@ -82,11 +87,11 @@
8287
zUuid = (char*)P("aid");
8388
specRid = zUuid ? uuid_to_rid(zUuid, 0) : 0;
8489
rid = nextRid = prevRid = 0;
8590
db_prepare(&q1,
8691
"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*')"
8893
" ORDER BY mtime DESC",
8994
zEventId
9095
);
9196
while( db_step(&q1)==SQLITE_ROW ){
9297
nextRid = rid;
9398
--- 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 @@
469469
*(const char**)pUuid = zUuid;
470470
blob_appendf(&tktchng, "K %s\n", zUuid);
471471
blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : "");
472472
md5sum_blob(&tktchng, &cksum);
473473
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 ){
475482
Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n"
476483
"}<br />\n",
477484
blob_str(&tktchng));
478485
}else{
479486
rid = content_put(&tktchng, 0, 0);
480487
--- 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 @@
469469
*(const char**)pUuid = zUuid;
470470
blob_appendf(&tktchng, "K %s\n", zUuid);
471471
blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : "");
472472
md5sum_blob(&tktchng, &cksum);
473473
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 ){
475482
Th_Trace("submit_ticket {\n<blockquote><pre>\n%h\n</pre></blockquote>\n"
476483
"}<br />\n",
477484
blob_str(&tktchng));
478485
}else{
479486
rid = content_put(&tktchng, 0, 0);
480487
--- 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

Keyboard Shortcuts

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