Fossil SCM

Added a 's' parameter to the web timeline view. This will search the comment and brief fields for the given text via LIKE '%value%'.

jeremy_c 2009-12-30 01:57 trunk
Commit 1e2ec3ff8746f9fdfb98557d6d1ee1ff15565335
1 file changed +7
--- src/timeline.c
+++ src/timeline.c
@@ -417,10 +417,11 @@
417417
** p=RID artifact RID and up to COUNT parents and ancestors
418418
** d=RID artifact RID and up to COUNT descendants
419419
** t=TAGID show only check-ins with the given tagid
420420
** u=USER only if belonging to this user
421421
** y=TYPE 'ci', 'w', 't'
422
+** s=TEXT string search (comment and brief)
422423
**
423424
** p= and d= can appear individually or together. If either p= or d=
424425
** appear, then u=, y=, a=, and b= are ignored.
425426
**
426427
** If a= and b= appear, only a= is used. If neither appear, the most
@@ -439,10 +440,11 @@
439440
const char *zType = PD("y","all"); /* Type of events. All if NULL */
440441
const char *zAfter = P("a"); /* Events after this time */
441442
const char *zBefore = P("b"); /* Events before this time */
442443
const char *zCirca = P("c"); /* Events near this time */
443444
const char *zTagName = P("t"); /* Show events with this tag */
445
+ const char *zString = P("s"); /* String text search of comment and brief */
444446
HQuery url; /* URL for various branch links */
445447
int tagid; /* Tag ID */
446448
int tmFlags; /* Timeline flags */
447449
448450
/* To view the timeline, must have permission to read project data.
@@ -544,10 +546,15 @@
544546
}
545547
if( zUser ){
546548
blob_appendf(&sql, " AND event.user=%Q", zUser);
547549
url_add_parameter(&url, "u", zUser);
548550
}
551
+ if ( zString ){
552
+ blob_appendf(&sql, " AND (event.comment LIKE '%%%q%%' OR event.brief LIKE '%%%q%%')",
553
+ zString, zString);
554
+ url_add_parameter(&url, "s", zString);
555
+ }
549556
if( zAfter ){
550557
while( isspace(zAfter[0]) ){ zAfter++; }
551558
if( zAfter[0] ){
552559
blob_appendf(&sql,
553560
" AND event.mtime>=(SELECT julianday(%Q, 'utc'))"
554561
--- src/timeline.c
+++ src/timeline.c
@@ -417,10 +417,11 @@
417 ** p=RID artifact RID and up to COUNT parents and ancestors
418 ** d=RID artifact RID and up to COUNT descendants
419 ** t=TAGID show only check-ins with the given tagid
420 ** u=USER only if belonging to this user
421 ** y=TYPE 'ci', 'w', 't'
 
422 **
423 ** p= and d= can appear individually or together. If either p= or d=
424 ** appear, then u=, y=, a=, and b= are ignored.
425 **
426 ** If a= and b= appear, only a= is used. If neither appear, the most
@@ -439,10 +440,11 @@
439 const char *zType = PD("y","all"); /* Type of events. All if NULL */
440 const char *zAfter = P("a"); /* Events after this time */
441 const char *zBefore = P("b"); /* Events before this time */
442 const char *zCirca = P("c"); /* Events near this time */
443 const char *zTagName = P("t"); /* Show events with this tag */
 
444 HQuery url; /* URL for various branch links */
445 int tagid; /* Tag ID */
446 int tmFlags; /* Timeline flags */
447
448 /* To view the timeline, must have permission to read project data.
@@ -544,10 +546,15 @@
544 }
545 if( zUser ){
546 blob_appendf(&sql, " AND event.user=%Q", zUser);
547 url_add_parameter(&url, "u", zUser);
548 }
 
 
 
 
 
549 if( zAfter ){
550 while( isspace(zAfter[0]) ){ zAfter++; }
551 if( zAfter[0] ){
552 blob_appendf(&sql,
553 " AND event.mtime>=(SELECT julianday(%Q, 'utc'))"
554
--- src/timeline.c
+++ src/timeline.c
@@ -417,10 +417,11 @@
417 ** p=RID artifact RID and up to COUNT parents and ancestors
418 ** d=RID artifact RID and up to COUNT descendants
419 ** t=TAGID show only check-ins with the given tagid
420 ** u=USER only if belonging to this user
421 ** y=TYPE 'ci', 'w', 't'
422 ** s=TEXT string search (comment and brief)
423 **
424 ** p= and d= can appear individually or together. If either p= or d=
425 ** appear, then u=, y=, a=, and b= are ignored.
426 **
427 ** If a= and b= appear, only a= is used. If neither appear, the most
@@ -439,10 +440,11 @@
440 const char *zType = PD("y","all"); /* Type of events. All if NULL */
441 const char *zAfter = P("a"); /* Events after this time */
442 const char *zBefore = P("b"); /* Events before this time */
443 const char *zCirca = P("c"); /* Events near this time */
444 const char *zTagName = P("t"); /* Show events with this tag */
445 const char *zString = P("s"); /* String text search of comment and brief */
446 HQuery url; /* URL for various branch links */
447 int tagid; /* Tag ID */
448 int tmFlags; /* Timeline flags */
449
450 /* To view the timeline, must have permission to read project data.
@@ -544,10 +546,15 @@
546 }
547 if( zUser ){
548 blob_appendf(&sql, " AND event.user=%Q", zUser);
549 url_add_parameter(&url, "u", zUser);
550 }
551 if ( zString ){
552 blob_appendf(&sql, " AND (event.comment LIKE '%%%q%%' OR event.brief LIKE '%%%q%%')",
553 zString, zString);
554 url_add_parameter(&url, "s", zString);
555 }
556 if( zAfter ){
557 while( isspace(zAfter[0]) ){ zAfter++; }
558 if( zAfter[0] ){
559 blob_appendf(&sql,
560 " AND event.mtime>=(SELECT julianday(%Q, 'utc'))"
561

Keyboard Shortcuts

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