Fossil SCM

Add the x= query parameter to /timeline. Satisfies ticket [208e3fc206af9b61].

drh 2023-11-10 14:14 trunk
Commit cad7c10b3730c1c54da19ffa468a6092beff21922318ae491a25a5f88ae44f92
1 file changed +19
--- src/timeline.c
+++ src/timeline.c
@@ -1576,10 +1576,12 @@
15761576
** the file with FILEHASH
15771577
** m=TIMEORTAG Highlight the event at TIMEORTAG, or the closest available
15781578
** event if TIMEORTAG is not part of the timeline. If
15791579
** the t= or r= is used, the m event is added to the timeline
15801580
** if it isn't there already.
1581
+** x=HASHLIST Show all check-ins in the comma-separated HASHLIST
1582
+** in addition to check-ins specified by t= or r=
15811583
** sel1=TIMEORTAG Highlight the check-in at TIMEORTAG if it is part of
15821584
** the timeline. Similar to m= except TIMEORTAG must
15831585
** match a check-in that is already in the timeline.
15841586
** sel2=TIMEORTAG Like sel1= but use the secondary highlight.
15851587
** n=COUNT Maximum number of events. "all" for no limit
@@ -2465,10 +2467,27 @@
24652467
/* If the t=release option is used with m=UUID, then also
24662468
** include the UUID check-in in the display list */
24672469
int ridMark = name_to_rid(zMark);
24682470
db_multi_exec(
24692471
"INSERT OR IGNORE INTO selected_nodes(rid) VALUES(%d)", ridMark);
2472
+ }
2473
+ if( P("x")!=0 ){
2474
+ char *zX = fossil_strdup(P("x"));
2475
+ int ii;
2476
+ int ridX;
2477
+ while( zX[0] ){
2478
+ char c;
2479
+ if( zX[0]==',' || zX[0]==' ' ){ zX++; continue; }
2480
+ for(ii=1; zX[ii] && zX[ii]!=',' && zX[ii]!=' '; ii++){}
2481
+ c = zX[ii];
2482
+ zX[ii] = 0;
2483
+ ridX = name_to_rid(zX);
2484
+ db_multi_exec(
2485
+ "INSERT OR IGNORE INTO selected_nodes(rid) VALUES(%d)", ridX);
2486
+ zX[ii] = c;
2487
+ zX += ii;
2488
+ }
24702489
}
24712490
if( !related ){
24722491
blob_append_sql(&cond, " AND blob.rid IN selected_nodes");
24732492
}else{
24742493
db_multi_exec(
24752494
--- src/timeline.c
+++ src/timeline.c
@@ -1576,10 +1576,12 @@
1576 ** the file with FILEHASH
1577 ** m=TIMEORTAG Highlight the event at TIMEORTAG, or the closest available
1578 ** event if TIMEORTAG is not part of the timeline. If
1579 ** the t= or r= is used, the m event is added to the timeline
1580 ** if it isn't there already.
 
 
1581 ** sel1=TIMEORTAG Highlight the check-in at TIMEORTAG if it is part of
1582 ** the timeline. Similar to m= except TIMEORTAG must
1583 ** match a check-in that is already in the timeline.
1584 ** sel2=TIMEORTAG Like sel1= but use the secondary highlight.
1585 ** n=COUNT Maximum number of events. "all" for no limit
@@ -2465,10 +2467,27 @@
2465 /* If the t=release option is used with m=UUID, then also
2466 ** include the UUID check-in in the display list */
2467 int ridMark = name_to_rid(zMark);
2468 db_multi_exec(
2469 "INSERT OR IGNORE INTO selected_nodes(rid) VALUES(%d)", ridMark);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2470 }
2471 if( !related ){
2472 blob_append_sql(&cond, " AND blob.rid IN selected_nodes");
2473 }else{
2474 db_multi_exec(
2475
--- src/timeline.c
+++ src/timeline.c
@@ -1576,10 +1576,12 @@
1576 ** the file with FILEHASH
1577 ** m=TIMEORTAG Highlight the event at TIMEORTAG, or the closest available
1578 ** event if TIMEORTAG is not part of the timeline. If
1579 ** the t= or r= is used, the m event is added to the timeline
1580 ** if it isn't there already.
1581 ** x=HASHLIST Show all check-ins in the comma-separated HASHLIST
1582 ** in addition to check-ins specified by t= or r=
1583 ** sel1=TIMEORTAG Highlight the check-in at TIMEORTAG if it is part of
1584 ** the timeline. Similar to m= except TIMEORTAG must
1585 ** match a check-in that is already in the timeline.
1586 ** sel2=TIMEORTAG Like sel1= but use the secondary highlight.
1587 ** n=COUNT Maximum number of events. "all" for no limit
@@ -2465,10 +2467,27 @@
2467 /* If the t=release option is used with m=UUID, then also
2468 ** include the UUID check-in in the display list */
2469 int ridMark = name_to_rid(zMark);
2470 db_multi_exec(
2471 "INSERT OR IGNORE INTO selected_nodes(rid) VALUES(%d)", ridMark);
2472 }
2473 if( P("x")!=0 ){
2474 char *zX = fossil_strdup(P("x"));
2475 int ii;
2476 int ridX;
2477 while( zX[0] ){
2478 char c;
2479 if( zX[0]==',' || zX[0]==' ' ){ zX++; continue; }
2480 for(ii=1; zX[ii] && zX[ii]!=',' && zX[ii]!=' '; ii++){}
2481 c = zX[ii];
2482 zX[ii] = 0;
2483 ridX = name_to_rid(zX);
2484 db_multi_exec(
2485 "INSERT OR IGNORE INTO selected_nodes(rid) VALUES(%d)", ridX);
2486 zX[ii] = c;
2487 zX += ii;
2488 }
2489 }
2490 if( !related ){
2491 blob_append_sql(&cond, " AND blob.rid IN selected_nodes");
2492 }else{
2493 db_multi_exec(
2494

Keyboard Shortcuts

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