| | @@ -93,10 +93,11 @@ |
| 93 | 93 | #define TIMELINE_BRCOLOR 0x0040 /* Background color by branch name */ |
| 94 | 94 | #define TIMELINE_UCOLOR 0x0080 /* Background color by user */ |
| 95 | 95 | #define TIMELINE_FRENAMES 0x0100 /* Detail only file name changes */ |
| 96 | 96 | #define TIMELINE_UNHIDE 0x0200 /* Unhide check-ins with "hidden" tag */ |
| 97 | 97 | #define TIMELINE_SHOWRID 0x0400 /* Show RID values in addition to UUIDs */ |
| 98 | +#define TIMELINE_BISECT 0x0800 /* Show supplimental bisect information */ |
| 98 | 99 | #endif |
| 99 | 100 | |
| 100 | 101 | /* |
| 101 | 102 | ** Hash a string and use the hash to determine a background color. |
| 102 | 103 | */ |
| | @@ -400,10 +401,20 @@ |
| 400 | 401 | } |
| 401 | 402 | if( modPending ){ |
| 402 | 403 | @ <span class="modpending">(Awaiting Moderator Approval)</span> |
| 403 | 404 | } |
| 404 | 405 | if( zType[0]=='c' ){ |
| 406 | + if( tmFlags & TIMELINE_BISECT ){ |
| 407 | + static Stmt bisectQuery; |
| 408 | + db_prepare(&bisectQuery, "SELECT seq, stat FROM bilog WHERE rid=:rid"); |
| 409 | + db_bind_int(&bisectQuery, ":rid", rid); |
| 410 | + if( db_step(&bisectQuery)==SQLITE_ROW ){ |
| 411 | + @ <b>%s(db_column_text(&bisectQuery,1))</b> |
| 412 | + @ (%d(db_column_int(&bisectQuery,0))) |
| 413 | + } |
| 414 | + db_reset(&bisectQuery); |
| 415 | + } |
| 405 | 416 | hyperlink_to_uuid(zUuid); |
| 406 | 417 | if( isLeaf ){ |
| 407 | 418 | if( db_exists("SELECT 1 FROM tagxref" |
| 408 | 419 | " WHERE rid=%d AND tagid=%d AND tagtype>0", |
| 409 | 420 | rid, TAG_CLOSED) ){ |
| | @@ -1195,10 +1206,11 @@ |
| 1195 | 1206 | ** namechng Show only check-ins that filename changes |
| 1196 | 1207 | ** forks Show only forks and their children |
| 1197 | 1208 | ** ym=YYYY-MM Show only events for the given year/month. |
| 1198 | 1209 | ** ymd=YYYY-MM-DD Show only events on the given day |
| 1199 | 1210 | ** datefmt=N Override the date format |
| 1211 | +** bisect Show the check-ins that are in the current bisect |
| 1200 | 1212 | ** |
| 1201 | 1213 | ** p= and d= can appear individually or together. If either p= or d= |
| 1202 | 1214 | ** appear, then u=, y=, a=, and b= are ignored. |
| 1203 | 1215 | ** |
| 1204 | 1216 | ** If both a= and b= appear then both upper and lower bounds are honored. |
| | @@ -1228,10 +1240,11 @@ |
| 1228 | 1240 | const char *zYearWeek = P("yw"); /* Check-ins for YYYY-WW (week-of-year) */ |
| 1229 | 1241 | const char *zDay = P("ymd"); /* Check-ins for the day YYYY-MM-DD */ |
| 1230 | 1242 | int useDividers = P("nd")==0; /* Show dividers if "nd" is missing */ |
| 1231 | 1243 | int renameOnly = P("namechng")!=0; /* Show only check-ins that rename files */ |
| 1232 | 1244 | int forkOnly = PB("forks"); /* Show only forks and their children */ |
| 1245 | + int bisectOnly = PB("bisect"); /* Show the check-ins of the bisect */ |
| 1233 | 1246 | int tagid; /* Tag ID */ |
| 1234 | 1247 | int tmFlags = 0; /* Timeline flags */ |
| 1235 | 1248 | const char *zThisTag = 0; /* Suppress links to this tag */ |
| 1236 | 1249 | const char *zThisUser = 0; /* Suppress links to this user */ |
| 1237 | 1250 | HQuery url; /* URL for various branch links */ |
| | @@ -1272,11 +1285,13 @@ |
| 1272 | 1285 | pd_rid = name_to_typed_rid(P("dp"),"ci"); |
| 1273 | 1286 | if( pd_rid ){ |
| 1274 | 1287 | p_rid = d_rid = pd_rid; |
| 1275 | 1288 | } |
| 1276 | 1289 | login_check_credentials(); |
| 1277 | | - if( !g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki ){ |
| 1290 | + if( (!g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki) |
| 1291 | + || (bisectOnly && !g.perm.Setup) |
| 1292 | + ){ |
| 1278 | 1293 | login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki); |
| 1279 | 1294 | return; |
| 1280 | 1295 | } |
| 1281 | 1296 | url_initialize(&url, "timeline"); |
| 1282 | 1297 | cgi_query_parameters_to_url(&url); |
| | @@ -1355,10 +1370,22 @@ |
| 1355 | 1370 | ); |
| 1356 | 1371 | tmFlags |= TIMELINE_UNHIDE; |
| 1357 | 1372 | zType = "ci"; |
| 1358 | 1373 | disableY = 1; |
| 1359 | 1374 | } |
| 1375 | + if( bisectOnly |
| 1376 | + && fossil_strcmp(g.zIpAddr,"127.0.0.1")==0 |
| 1377 | + && db_open_local(0) |
| 1378 | + ){ |
| 1379 | + int iCurrent = db_lget_int("checkout",0); |
| 1380 | + bisect_create_bilog_table(iCurrent); |
| 1381 | + tmFlags |= TIMELINE_UNHIDE | TIMELINE_BISECT; |
| 1382 | + zType = "ci"; |
| 1383 | + disableY = 1; |
| 1384 | + }else{ |
| 1385 | + bisectOnly = 0; |
| 1386 | + } |
| 1360 | 1387 | |
| 1361 | 1388 | style_header("Timeline"); |
| 1362 | 1389 | login_anonymous_available(); |
| 1363 | 1390 | timeline_temp_table(); |
| 1364 | 1391 | blob_zero(&sql); |
| | @@ -1487,10 +1514,13 @@ |
| 1487 | 1514 | blob_append_sql(&sql, " AND event.objid IN rnfile "); |
| 1488 | 1515 | } |
| 1489 | 1516 | if( forkOnly ){ |
| 1490 | 1517 | blob_append_sql(&sql, " AND event.objid IN rnfork "); |
| 1491 | 1518 | } |
| 1519 | + if( bisectOnly ){ |
| 1520 | + blob_append_sql(&sql, " AND event.objid IN (SELECT rid FROM bilog) "); |
| 1521 | + } |
| 1492 | 1522 | if( zYearMonth ){ |
| 1493 | 1523 | blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ", |
| 1494 | 1524 | zYearMonth); |
| 1495 | 1525 | } |
| 1496 | 1526 | else if( zYearWeek ){ |
| | @@ -1669,10 +1699,14 @@ |
| 1669 | 1699 | } |
| 1670 | 1700 | if( forkOnly ){ |
| 1671 | 1701 | blob_appendf(&desc, " associated with forks"); |
| 1672 | 1702 | tmFlags |= TIMELINE_DISJOINT; |
| 1673 | 1703 | } |
| 1704 | + if( bisectOnly ){ |
| 1705 | + blob_appendf(&desc, " in the most recent bisect"); |
| 1706 | + tmFlags |= TIMELINE_DISJOINT; |
| 1707 | + } |
| 1674 | 1708 | if( zUser ){ |
| 1675 | 1709 | blob_appendf(&desc, " by user %h", zUser); |
| 1676 | 1710 | tmFlags |= TIMELINE_DISJOINT; |
| 1677 | 1711 | } |
| 1678 | 1712 | if( zTagName ){ |
| 1679 | 1713 | |