Fossil SCM
Add the "m=" query parameter to the /finfo page.
Commit
7dcf8c7a4507f339589b344b07619d6bb68be0dd49fea6814f8decc2c94e3d0f
Parent
cee4bcf047bacba…
1 file changed
+13
-1
+13
-1
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -280,10 +280,11 @@ | ||
| 280 | 280 | ** |
| 281 | 281 | ** Additional query parameters: |
| 282 | 282 | ** |
| 283 | 283 | ** a=DATETIME Only show changes after DATETIME |
| 284 | 284 | ** b=DATETIME Only show changes before DATETIME |
| 285 | +** m=HASH Mark this particular file version | |
| 285 | 286 | ** n=NUM Show the first NUM changes only |
| 286 | 287 | ** brbg Background color by branch name |
| 287 | 288 | ** ubg Background color by user name |
| 288 | 289 | ** ci=UUID Ancestors of a particular check-in |
| 289 | 290 | ** orig=UUID If both ci and orig are supplied, only show those |
| @@ -315,10 +316,12 @@ | ||
| 315 | 316 | int fShowId = P("showid")!=0; |
| 316 | 317 | Stmt qparent; |
| 317 | 318 | int iTableId = timeline_tableid(); |
| 318 | 319 | int tmFlags = 0; /* Viewing mode */ |
| 319 | 320 | const char *zStyle; /* Viewing mode name */ |
| 321 | + const char *zMark; /* Mark this version of the file */ | |
| 322 | + int selRid = 0; /* RID of the marked file version */ | |
| 320 | 323 | |
| 321 | 324 | login_check_credentials(); |
| 322 | 325 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 323 | 326 | style_header("File History"); |
| 324 | 327 | login_anonymous_available(); |
| @@ -414,10 +417,14 @@ | ||
| 414 | 417 | } |
| 415 | 418 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 416 | 419 | if( P("showsql")!=0 ){ |
| 417 | 420 | @ <p>SQL: %h(blob_str(&sql))</p> |
| 418 | 421 | } |
| 422 | + zMark = P("m"); | |
| 423 | + if( zMark ){ | |
| 424 | + selRid = symbolic_name_to_rid(zMark, "*"); | |
| 425 | + } | |
| 419 | 426 | blob_reset(&sql); |
| 420 | 427 | blob_zero(&title); |
| 421 | 428 | if( baseCheckin ){ |
| 422 | 429 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin); |
| 423 | 430 | char *zLink = href("%R/info/%!S", zUuid); |
| @@ -506,11 +513,16 @@ | ||
| 506 | 513 | @ <div class="divider timelineDate">%s(zPrevDate)</div> |
| 507 | 514 | @ </td><td></td><td></td></tr> |
| 508 | 515 | } |
| 509 | 516 | memcpy(zTime, &zDate[11], 5); |
| 510 | 517 | zTime[5] = 0; |
| 511 | - @ <tr><td class="timelineTime"> | |
| 518 | + if( frid==selRid ){ | |
| 519 | + @ <tr class='timelineSelected'> | |
| 520 | + }else{ | |
| 521 | + @ <tr> | |
| 522 | + } | |
| 523 | + @ <td class="timelineTime">\ | |
| 512 | 524 | @ %z(href("%R/artifact/%!S",zUuid))%s(zTime)</a></td> |
| 513 | 525 | @ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div> |
| 514 | 526 | @ </td> |
| 515 | 527 | if( zBgClr && zBgClr[0] ){ |
| 516 | 528 | @ <td class="timeline%s(zStyle)Cell" \ |
| 517 | 529 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -280,10 +280,11 @@ | |
| 280 | ** |
| 281 | ** Additional query parameters: |
| 282 | ** |
| 283 | ** a=DATETIME Only show changes after DATETIME |
| 284 | ** b=DATETIME Only show changes before DATETIME |
| 285 | ** n=NUM Show the first NUM changes only |
| 286 | ** brbg Background color by branch name |
| 287 | ** ubg Background color by user name |
| 288 | ** ci=UUID Ancestors of a particular check-in |
| 289 | ** orig=UUID If both ci and orig are supplied, only show those |
| @@ -315,10 +316,12 @@ | |
| 315 | int fShowId = P("showid")!=0; |
| 316 | Stmt qparent; |
| 317 | int iTableId = timeline_tableid(); |
| 318 | int tmFlags = 0; /* Viewing mode */ |
| 319 | const char *zStyle; /* Viewing mode name */ |
| 320 | |
| 321 | login_check_credentials(); |
| 322 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 323 | style_header("File History"); |
| 324 | login_anonymous_available(); |
| @@ -414,10 +417,14 @@ | |
| 414 | } |
| 415 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 416 | if( P("showsql")!=0 ){ |
| 417 | @ <p>SQL: %h(blob_str(&sql))</p> |
| 418 | } |
| 419 | blob_reset(&sql); |
| 420 | blob_zero(&title); |
| 421 | if( baseCheckin ){ |
| 422 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin); |
| 423 | char *zLink = href("%R/info/%!S", zUuid); |
| @@ -506,11 +513,16 @@ | |
| 506 | @ <div class="divider timelineDate">%s(zPrevDate)</div> |
| 507 | @ </td><td></td><td></td></tr> |
| 508 | } |
| 509 | memcpy(zTime, &zDate[11], 5); |
| 510 | zTime[5] = 0; |
| 511 | @ <tr><td class="timelineTime"> |
| 512 | @ %z(href("%R/artifact/%!S",zUuid))%s(zTime)</a></td> |
| 513 | @ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div> |
| 514 | @ </td> |
| 515 | if( zBgClr && zBgClr[0] ){ |
| 516 | @ <td class="timeline%s(zStyle)Cell" \ |
| 517 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -280,10 +280,11 @@ | |
| 280 | ** |
| 281 | ** Additional query parameters: |
| 282 | ** |
| 283 | ** a=DATETIME Only show changes after DATETIME |
| 284 | ** b=DATETIME Only show changes before DATETIME |
| 285 | ** m=HASH Mark this particular file version |
| 286 | ** n=NUM Show the first NUM changes only |
| 287 | ** brbg Background color by branch name |
| 288 | ** ubg Background color by user name |
| 289 | ** ci=UUID Ancestors of a particular check-in |
| 290 | ** orig=UUID If both ci and orig are supplied, only show those |
| @@ -315,10 +316,12 @@ | |
| 316 | int fShowId = P("showid")!=0; |
| 317 | Stmt qparent; |
| 318 | int iTableId = timeline_tableid(); |
| 319 | int tmFlags = 0; /* Viewing mode */ |
| 320 | const char *zStyle; /* Viewing mode name */ |
| 321 | const char *zMark; /* Mark this version of the file */ |
| 322 | int selRid = 0; /* RID of the marked file version */ |
| 323 | |
| 324 | login_check_credentials(); |
| 325 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 326 | style_header("File History"); |
| 327 | login_anonymous_available(); |
| @@ -414,10 +417,14 @@ | |
| 417 | } |
| 418 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 419 | if( P("showsql")!=0 ){ |
| 420 | @ <p>SQL: %h(blob_str(&sql))</p> |
| 421 | } |
| 422 | zMark = P("m"); |
| 423 | if( zMark ){ |
| 424 | selRid = symbolic_name_to_rid(zMark, "*"); |
| 425 | } |
| 426 | blob_reset(&sql); |
| 427 | blob_zero(&title); |
| 428 | if( baseCheckin ){ |
| 429 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin); |
| 430 | char *zLink = href("%R/info/%!S", zUuid); |
| @@ -506,11 +513,16 @@ | |
| 513 | @ <div class="divider timelineDate">%s(zPrevDate)</div> |
| 514 | @ </td><td></td><td></td></tr> |
| 515 | } |
| 516 | memcpy(zTime, &zDate[11], 5); |
| 517 | zTime[5] = 0; |
| 518 | if( frid==selRid ){ |
| 519 | @ <tr class='timelineSelected'> |
| 520 | }else{ |
| 521 | @ <tr> |
| 522 | } |
| 523 | @ <td class="timelineTime">\ |
| 524 | @ %z(href("%R/artifact/%!S",zUuid))%s(zTime)</a></td> |
| 525 | @ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div> |
| 526 | @ </td> |
| 527 | if( zBgClr && zBgClr[0] ){ |
| 528 | @ <td class="timeline%s(zStyle)Cell" \ |
| 529 |