Fossil SCM
Add the x= query parameter to /timeline. Satisfies ticket [208e3fc206af9b61].
Commit
cad7c10b3730c1c54da19ffa468a6092beff21922318ae491a25a5f88ae44f92
Parent
88871c0203eef4d…
1 file changed
+19
+19
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1576,10 +1576,12 @@ | ||
| 1576 | 1576 | ** the file with FILEHASH |
| 1577 | 1577 | ** m=TIMEORTAG Highlight the event at TIMEORTAG, or the closest available |
| 1578 | 1578 | ** event if TIMEORTAG is not part of the timeline. If |
| 1579 | 1579 | ** the t= or r= is used, the m event is added to the timeline |
| 1580 | 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= | |
| 1581 | 1583 | ** sel1=TIMEORTAG Highlight the check-in at TIMEORTAG if it is part of |
| 1582 | 1584 | ** the timeline. Similar to m= except TIMEORTAG must |
| 1583 | 1585 | ** match a check-in that is already in the timeline. |
| 1584 | 1586 | ** sel2=TIMEORTAG Like sel1= but use the secondary highlight. |
| 1585 | 1587 | ** n=COUNT Maximum number of events. "all" for no limit |
| @@ -2465,10 +2467,27 @@ | ||
| 2465 | 2467 | /* If the t=release option is used with m=UUID, then also |
| 2466 | 2468 | ** include the UUID check-in in the display list */ |
| 2467 | 2469 | int ridMark = name_to_rid(zMark); |
| 2468 | 2470 | db_multi_exec( |
| 2469 | 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 | + } | |
| 2470 | 2489 | } |
| 2471 | 2490 | if( !related ){ |
| 2472 | 2491 | blob_append_sql(&cond, " AND blob.rid IN selected_nodes"); |
| 2473 | 2492 | }else{ |
| 2474 | 2493 | db_multi_exec( |
| 2475 | 2494 |
| --- 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 |