Fossil SCM
Give greater emphasis to the check-in comment on timeline displays. Move the check-in hash into the details section at the end of each entry.
Commit
4438e68de3d53c859a41cc33ddf6ff07846c6cad0ced09e1cd90bd056514941d
Parent
49cde9fcaf1506e…
2 files changed
+28
-25
+39
-45
+28
-25
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -502,55 +502,58 @@ | ||
| 502 | 502 | if( zBgClr && zBgClr[0] ){ |
| 503 | 503 | @ <td class="timelineTableCell" style="background-color: %h(zBgClr);"> |
| 504 | 504 | }else{ |
| 505 | 505 | @ <td class="timelineTableCell"> |
| 506 | 506 | } |
| 507 | + @ <span class="timelineComment">%W(zCom)</span> | |
| 508 | + cgi_printf("<span class='timelineDetail'>("); | |
| 507 | 509 | if( zUuid ){ |
| 508 | - if( origCheckin==0 ){ | |
| 509 | - if( nParent==0 ){ | |
| 510 | - @ <b>Added</b> | |
| 511 | - }else if( pfnid ){ | |
| 512 | - char *zPrevName = db_text(0,"SELECT name FROM filename WHERE fnid=%d", | |
| 513 | - pfnid); | |
| 514 | - @ <b>Renamed</b> from | |
| 515 | - @ %z(href("%R/finfo?name=%t", zPrevName))%h(zPrevName)</a> | |
| 516 | - } | |
| 517 | - } | |
| 518 | - @ %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a> | |
| 510 | + @ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a> | |
| 519 | 511 | if( fShowId ){ |
| 520 | 512 | int srcId = delta_source_rid(frid); |
| 521 | 513 | if( srcId>0 ){ |
| 522 | - @ (%d(frid)←%d(srcId)) | |
| 514 | + @ id: %d(frid)←%d(srcId) | |
| 523 | 515 | }else{ |
| 524 | - @ (%d(frid)) | |
| 516 | + @ id: %d(frid) | |
| 525 | 517 | } |
| 526 | 518 | } |
| 527 | - @ part of check-in | |
| 528 | - }else{ | |
| 519 | + } | |
| 520 | + @ check-in: | |
| 521 | + hyperlink_to_uuid(zCkin); | |
| 522 | + if( fShowId ){ | |
| 523 | + @ (%d(fmid)) | |
| 524 | + } | |
| 525 | + @ user: | |
| 526 | + hyperlink_to_user(zUser, zDate, ","); | |
| 527 | + @ branch: %z(href("%R/timeline?t=%T&n=200",zBr))%h(zBr)</a>, | |
| 528 | + @ size: %d(szFile))</span> | |
| 529 | + if( zUuid && origCheckin==0 ){ | |
| 530 | + if( nParent==0 ){ | |
| 531 | + @ <b>Added</b> | |
| 532 | + }else if( pfnid ){ | |
| 533 | + char *zPrevName = db_text(0,"SELECT name FROM filename WHERE fnid=%d", | |
| 534 | + pfnid); | |
| 535 | + @ <b>Renamed</b> from | |
| 536 | + @ %z(href("%R/finfo?name=%t", zPrevName))%h(zPrevName)</a> | |
| 537 | + } | |
| 538 | + } | |
| 539 | + if( zUuid==0 ){ | |
| 529 | 540 | char *zNewName; |
| 530 | 541 | zNewName = db_text(0, |
| 531 | 542 | "SELECT name FROM filename WHERE fnid = " |
| 532 | 543 | " (SELECT fnid FROM mlink" |
| 533 | 544 | " WHERE mid=%d" |
| 534 | 545 | " AND pfnid IN (SELECT fnid FROM filename WHERE name=%Q))", |
| 535 | 546 | fmid, zFilename); |
| 536 | 547 | if( zNewName ){ |
| 537 | 548 | @ <b>Renamed</b> to |
| 538 | - @ %z(href("%R/finfo?name=%t",zNewName))%h(zNewName)</a> by check-in | |
| 549 | + @ %z(href("%R/finfo?name=%t",zNewName))%h(zNewName)</a> | |
| 539 | 550 | fossil_free(zNewName); |
| 540 | 551 | }else{ |
| 541 | - @ <b>Deleted</b> by check-in | |
| 552 | + @ <b>Deleted</b> | |
| 542 | 553 | } |
| 543 | 554 | } |
| 544 | - hyperlink_to_uuid(zCkin); | |
| 545 | - if( fShowId ){ | |
| 546 | - @ (%d(fmid)) | |
| 547 | - } | |
| 548 | - @ %W(zCom) (user: | |
| 549 | - hyperlink_to_user(zUser, zDate, ","); | |
| 550 | - @ branch: %z(href("%R/timeline?t=%T&n=200",zBr))%h(zBr)</a>, | |
| 551 | - @ size: %d(szFile)) | |
| 552 | 555 | if( g.perm.Hyperlink && zUuid ){ |
| 553 | 556 | const char *z = zFilename; |
| 554 | 557 | @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin)) |
| 555 | 558 | @ [annotate]</a> |
| 556 | 559 | @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin)) |
| 557 | 560 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -502,55 +502,58 @@ | |
| 502 | if( zBgClr && zBgClr[0] ){ |
| 503 | @ <td class="timelineTableCell" style="background-color: %h(zBgClr);"> |
| 504 | }else{ |
| 505 | @ <td class="timelineTableCell"> |
| 506 | } |
| 507 | if( zUuid ){ |
| 508 | if( origCheckin==0 ){ |
| 509 | if( nParent==0 ){ |
| 510 | @ <b>Added</b> |
| 511 | }else if( pfnid ){ |
| 512 | char *zPrevName = db_text(0,"SELECT name FROM filename WHERE fnid=%d", |
| 513 | pfnid); |
| 514 | @ <b>Renamed</b> from |
| 515 | @ %z(href("%R/finfo?name=%t", zPrevName))%h(zPrevName)</a> |
| 516 | } |
| 517 | } |
| 518 | @ %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a> |
| 519 | if( fShowId ){ |
| 520 | int srcId = delta_source_rid(frid); |
| 521 | if( srcId>0 ){ |
| 522 | @ (%d(frid)←%d(srcId)) |
| 523 | }else{ |
| 524 | @ (%d(frid)) |
| 525 | } |
| 526 | } |
| 527 | @ part of check-in |
| 528 | }else{ |
| 529 | char *zNewName; |
| 530 | zNewName = db_text(0, |
| 531 | "SELECT name FROM filename WHERE fnid = " |
| 532 | " (SELECT fnid FROM mlink" |
| 533 | " WHERE mid=%d" |
| 534 | " AND pfnid IN (SELECT fnid FROM filename WHERE name=%Q))", |
| 535 | fmid, zFilename); |
| 536 | if( zNewName ){ |
| 537 | @ <b>Renamed</b> to |
| 538 | @ %z(href("%R/finfo?name=%t",zNewName))%h(zNewName)</a> by check-in |
| 539 | fossil_free(zNewName); |
| 540 | }else{ |
| 541 | @ <b>Deleted</b> by check-in |
| 542 | } |
| 543 | } |
| 544 | hyperlink_to_uuid(zCkin); |
| 545 | if( fShowId ){ |
| 546 | @ (%d(fmid)) |
| 547 | } |
| 548 | @ %W(zCom) (user: |
| 549 | hyperlink_to_user(zUser, zDate, ","); |
| 550 | @ branch: %z(href("%R/timeline?t=%T&n=200",zBr))%h(zBr)</a>, |
| 551 | @ size: %d(szFile)) |
| 552 | if( g.perm.Hyperlink && zUuid ){ |
| 553 | const char *z = zFilename; |
| 554 | @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin)) |
| 555 | @ [annotate]</a> |
| 556 | @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin)) |
| 557 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -502,55 +502,58 @@ | |
| 502 | if( zBgClr && zBgClr[0] ){ |
| 503 | @ <td class="timelineTableCell" style="background-color: %h(zBgClr);"> |
| 504 | }else{ |
| 505 | @ <td class="timelineTableCell"> |
| 506 | } |
| 507 | @ <span class="timelineComment">%W(zCom)</span> |
| 508 | cgi_printf("<span class='timelineDetail'>("); |
| 509 | if( zUuid ){ |
| 510 | @ file: %z(href("%R/artifact/%!S",zUuid))[%S(zUuid)]</a> |
| 511 | if( fShowId ){ |
| 512 | int srcId = delta_source_rid(frid); |
| 513 | if( srcId>0 ){ |
| 514 | @ id: %d(frid)←%d(srcId) |
| 515 | }else{ |
| 516 | @ id: %d(frid) |
| 517 | } |
| 518 | } |
| 519 | } |
| 520 | @ check-in: |
| 521 | hyperlink_to_uuid(zCkin); |
| 522 | if( fShowId ){ |
| 523 | @ (%d(fmid)) |
| 524 | } |
| 525 | @ user: |
| 526 | hyperlink_to_user(zUser, zDate, ","); |
| 527 | @ branch: %z(href("%R/timeline?t=%T&n=200",zBr))%h(zBr)</a>, |
| 528 | @ size: %d(szFile))</span> |
| 529 | if( zUuid && origCheckin==0 ){ |
| 530 | if( nParent==0 ){ |
| 531 | @ <b>Added</b> |
| 532 | }else if( pfnid ){ |
| 533 | char *zPrevName = db_text(0,"SELECT name FROM filename WHERE fnid=%d", |
| 534 | pfnid); |
| 535 | @ <b>Renamed</b> from |
| 536 | @ %z(href("%R/finfo?name=%t", zPrevName))%h(zPrevName)</a> |
| 537 | } |
| 538 | } |
| 539 | if( zUuid==0 ){ |
| 540 | char *zNewName; |
| 541 | zNewName = db_text(0, |
| 542 | "SELECT name FROM filename WHERE fnid = " |
| 543 | " (SELECT fnid FROM mlink" |
| 544 | " WHERE mid=%d" |
| 545 | " AND pfnid IN (SELECT fnid FROM filename WHERE name=%Q))", |
| 546 | fmid, zFilename); |
| 547 | if( zNewName ){ |
| 548 | @ <b>Renamed</b> to |
| 549 | @ %z(href("%R/finfo?name=%t",zNewName))%h(zNewName)</a> |
| 550 | fossil_free(zNewName); |
| 551 | }else{ |
| 552 | @ <b>Deleted</b> |
| 553 | } |
| 554 | } |
| 555 | if( g.perm.Hyperlink && zUuid ){ |
| 556 | const char *z = zFilename; |
| 557 | @ %z(href("%R/annotate?filename=%h&checkin=%s",z,zCkin)) |
| 558 | @ [annotate]</a> |
| 559 | @ %z(href("%R/blame?filename=%h&checkin=%s",z,zCkin)) |
| 560 |
+39
-45
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -420,43 +420,19 @@ | ||
| 420 | 420 | @ • |
| 421 | 421 | } |
| 422 | 422 | if( modPending ){ |
| 423 | 423 | @ <span class="modpending">(Awaiting Moderator Approval)</span> |
| 424 | 424 | } |
| 425 | - if( zType[0]=='c' ){ | |
| 426 | - if( tmFlags & TIMELINE_BISECT ){ | |
| 427 | - static Stmt bisectQuery; | |
| 428 | - db_prepare(&bisectQuery, "SELECT seq, stat FROM bilog WHERE rid=:rid"); | |
| 429 | - db_bind_int(&bisectQuery, ":rid", rid); | |
| 430 | - if( db_step(&bisectQuery)==SQLITE_ROW ){ | |
| 431 | - @ <b>%s(db_column_text(&bisectQuery,1))</b> | |
| 432 | - @ (%d(db_column_int(&bisectQuery,0))) | |
| 433 | - } | |
| 434 | - db_reset(&bisectQuery); | |
| 435 | - } | |
| 436 | - hyperlink_to_uuid(zUuid); | |
| 437 | - if( isLeaf ){ | |
| 438 | - if( db_exists("SELECT 1 FROM tagxref" | |
| 439 | - " WHERE rid=%d AND tagid=%d AND tagtype>0", | |
| 440 | - rid, TAG_CLOSED) ){ | |
| 441 | - @ <span class="timelineLeaf">Closed-Leaf:</span> | |
| 442 | - }else{ | |
| 443 | - @ <span class="timelineLeaf">Leaf:</span> | |
| 444 | - } | |
| 445 | - } | |
| 446 | - }else if( zType[0]=='e' && tagid ){ | |
| 447 | - hyperlink_to_event_tagid(tagid<0?-tagid:tagid); | |
| 448 | - }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ | |
| 449 | - hyperlink_to_uuid(zUuid); | |
| 450 | - } | |
| 451 | - if( tmFlags & TIMELINE_SHOWRID ){ | |
| 452 | - int srcId = delta_source_rid(rid); | |
| 453 | - if( srcId ){ | |
| 454 | - @ (%d(rid)←%d(srcId)) | |
| 455 | - }else{ | |
| 456 | - @ (%d(rid)) | |
| 457 | - } | |
| 425 | + if( (tmFlags & TIMELINE_BISECT)!=0 && zType[0]=='c' ){ | |
| 426 | + static Stmt bisectQuery; | |
| 427 | + db_prepare(&bisectQuery, "SELECT seq, stat FROM bilog WHERE rid=:rid"); | |
| 428 | + db_bind_int(&bisectQuery, ":rid", rid); | |
| 429 | + if( db_step(&bisectQuery)==SQLITE_ROW ){ | |
| 430 | + @ <b>%s(db_column_text(&bisectQuery,1))</b> | |
| 431 | + @ (%d(db_column_int(&bisectQuery,0))) | |
| 432 | + } | |
| 433 | + db_reset(&bisectQuery); | |
| 458 | 434 | } |
| 459 | 435 | db_column_blob(pQuery, commentColumn, &comment); |
| 460 | 436 | if( zType[0]!='c' ){ |
| 461 | 437 | /* Comments for anything other than a check-in are generated by |
| 462 | 438 | ** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */ |
| @@ -484,29 +460,36 @@ | ||
| 484 | 460 | }else{ |
| 485 | 461 | @ <span class="timelineComment">%W(blob_str(&comment))</span> |
| 486 | 462 | } |
| 487 | 463 | blob_reset(&comment); |
| 488 | 464 | |
| 489 | - /* Generate the "user: USERNAME" at the end of the comment, together | |
| 490 | - ** with a hyperlink to another timeline for that user. | |
| 465 | + /* Generate extra information and hyperlinks to follow the comment. | |
| 466 | + ** Example: "(check-in: [abcdefg], user: drh, tags: trunk)" | |
| 491 | 467 | */ |
| 492 | - if( zTagList && zTagList[0]==0 ) zTagList = 0; | |
| 468 | + cgi_printf("<span class='timelineDetail'>("); | |
| 469 | + if( zType[0]=='c' ){ | |
| 470 | + cgi_printf("check-in: "); | |
| 471 | + hyperlink_to_uuid(zUuid); | |
| 472 | + }else if( zType[0]=='e' && tagid ){ | |
| 473 | + cgi_printf("technote: "); | |
| 474 | + hyperlink_to_event_tagid(tagid<0?-tagid:tagid); | |
| 475 | + }else{ | |
| 476 | + cgi_printf("artifact: "); | |
| 477 | + hyperlink_to_uuid(zUuid); | |
| 478 | + } | |
| 479 | + | |
| 493 | 480 | if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){ |
| 494 | 481 | char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd&n=200", zDispUser, zDate); |
| 495 | - @ (user: %z(href("%z",zLink))%h(zDispUser)</a>%s(zTagList?",":"\051") | |
| 482 | + cgi_printf("user: %z%h</a>", href("%z",zLink), zDispUser); | |
| 496 | 483 | }else{ |
| 497 | - @ (user: %h(zDispUser)%s(zTagList?",":"\051") | |
| 498 | - } | |
| 499 | - | |
| 500 | - /* Generate a "detail" link for tags. */ | |
| 501 | - if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){ | |
| 502 | - @ [%z(href("%R/info/%!S",zUuid))details</a>] | |
| 484 | + cgi_printf("user: %h", zDispUser); | |
| 503 | 485 | } |
| 504 | 486 | |
| 505 | 487 | /* Generate the "tags: TAGLIST" at the end of the comment, together |
| 506 | 488 | ** with hyperlinks to the tag list. |
| 507 | 489 | */ |
| 490 | + if( zTagList && zTagList[0]==0 ) zTagList = 0; | |
| 508 | 491 | if( zTagList ){ |
| 509 | 492 | if( g.perm.Hyperlink ){ |
| 510 | 493 | int i; |
| 511 | 494 | const char *z = zTagList; |
| 512 | 495 | Blob links; |
| @@ -522,16 +505,27 @@ | ||
| 522 | 505 | blob_appendf(&links, "%#h", i+2, z); |
| 523 | 506 | } |
| 524 | 507 | if( z[i]==0 ) break; |
| 525 | 508 | z += i+2; |
| 526 | 509 | } |
| 527 | - @ tags: %s(blob_str(&links))) | |
| 510 | + cgi_printf(" tags: %s", blob_str(&links)); | |
| 528 | 511 | blob_reset(&links); |
| 529 | 512 | }else{ |
| 530 | - @ tags: %h(zTagList)) | |
| 513 | + cgi_printf(" tags: %h", zTagList); | |
| 514 | + } | |
| 515 | + } | |
| 516 | + | |
| 517 | + if( tmFlags & TIMELINE_SHOWRID ){ | |
| 518 | + int srcId = delta_source_rid(rid); | |
| 519 | + if( srcId ){ | |
| 520 | + cgi_printf(" id: %d←%d", rid, srcId); | |
| 521 | + }else{ | |
| 522 | + cgi_printf(" id: %d", rid); | |
| 531 | 523 | } |
| 532 | 524 | } |
| 525 | + cgi_printf(")</span>\n"); /* End of the details section */ | |
| 526 | + | |
| 533 | 527 | tag_private_status(rid); |
| 534 | 528 | |
| 535 | 529 | /* Generate extra hyperlinks at the end of the comment */ |
| 536 | 530 | if( xExtra ){ |
| 537 | 531 | xExtra(rid); |
| 538 | 532 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -420,43 +420,19 @@ | |
| 420 | @ • |
| 421 | } |
| 422 | if( modPending ){ |
| 423 | @ <span class="modpending">(Awaiting Moderator Approval)</span> |
| 424 | } |
| 425 | if( zType[0]=='c' ){ |
| 426 | if( tmFlags & TIMELINE_BISECT ){ |
| 427 | static Stmt bisectQuery; |
| 428 | db_prepare(&bisectQuery, "SELECT seq, stat FROM bilog WHERE rid=:rid"); |
| 429 | db_bind_int(&bisectQuery, ":rid", rid); |
| 430 | if( db_step(&bisectQuery)==SQLITE_ROW ){ |
| 431 | @ <b>%s(db_column_text(&bisectQuery,1))</b> |
| 432 | @ (%d(db_column_int(&bisectQuery,0))) |
| 433 | } |
| 434 | db_reset(&bisectQuery); |
| 435 | } |
| 436 | hyperlink_to_uuid(zUuid); |
| 437 | if( isLeaf ){ |
| 438 | if( db_exists("SELECT 1 FROM tagxref" |
| 439 | " WHERE rid=%d AND tagid=%d AND tagtype>0", |
| 440 | rid, TAG_CLOSED) ){ |
| 441 | @ <span class="timelineLeaf">Closed-Leaf:</span> |
| 442 | }else{ |
| 443 | @ <span class="timelineLeaf">Leaf:</span> |
| 444 | } |
| 445 | } |
| 446 | }else if( zType[0]=='e' && tagid ){ |
| 447 | hyperlink_to_event_tagid(tagid<0?-tagid:tagid); |
| 448 | }else if( (tmFlags & TIMELINE_ARTID)!=0 ){ |
| 449 | hyperlink_to_uuid(zUuid); |
| 450 | } |
| 451 | if( tmFlags & TIMELINE_SHOWRID ){ |
| 452 | int srcId = delta_source_rid(rid); |
| 453 | if( srcId ){ |
| 454 | @ (%d(rid)←%d(srcId)) |
| 455 | }else{ |
| 456 | @ (%d(rid)) |
| 457 | } |
| 458 | } |
| 459 | db_column_blob(pQuery, commentColumn, &comment); |
| 460 | if( zType[0]!='c' ){ |
| 461 | /* Comments for anything other than a check-in are generated by |
| 462 | ** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */ |
| @@ -484,29 +460,36 @@ | |
| 484 | }else{ |
| 485 | @ <span class="timelineComment">%W(blob_str(&comment))</span> |
| 486 | } |
| 487 | blob_reset(&comment); |
| 488 | |
| 489 | /* Generate the "user: USERNAME" at the end of the comment, together |
| 490 | ** with a hyperlink to another timeline for that user. |
| 491 | */ |
| 492 | if( zTagList && zTagList[0]==0 ) zTagList = 0; |
| 493 | if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){ |
| 494 | char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd&n=200", zDispUser, zDate); |
| 495 | @ (user: %z(href("%z",zLink))%h(zDispUser)</a>%s(zTagList?",":"\051") |
| 496 | }else{ |
| 497 | @ (user: %h(zDispUser)%s(zTagList?",":"\051") |
| 498 | } |
| 499 | |
| 500 | /* Generate a "detail" link for tags. */ |
| 501 | if( (zType[0]=='g' || zType[0]=='w' || zType[0]=='t') && g.perm.Hyperlink ){ |
| 502 | @ [%z(href("%R/info/%!S",zUuid))details</a>] |
| 503 | } |
| 504 | |
| 505 | /* Generate the "tags: TAGLIST" at the end of the comment, together |
| 506 | ** with hyperlinks to the tag list. |
| 507 | */ |
| 508 | if( zTagList ){ |
| 509 | if( g.perm.Hyperlink ){ |
| 510 | int i; |
| 511 | const char *z = zTagList; |
| 512 | Blob links; |
| @@ -522,16 +505,27 @@ | |
| 522 | blob_appendf(&links, "%#h", i+2, z); |
| 523 | } |
| 524 | if( z[i]==0 ) break; |
| 525 | z += i+2; |
| 526 | } |
| 527 | @ tags: %s(blob_str(&links))) |
| 528 | blob_reset(&links); |
| 529 | }else{ |
| 530 | @ tags: %h(zTagList)) |
| 531 | } |
| 532 | } |
| 533 | tag_private_status(rid); |
| 534 | |
| 535 | /* Generate extra hyperlinks at the end of the comment */ |
| 536 | if( xExtra ){ |
| 537 | xExtra(rid); |
| 538 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -420,43 +420,19 @@ | |
| 420 | @ • |
| 421 | } |
| 422 | if( modPending ){ |
| 423 | @ <span class="modpending">(Awaiting Moderator Approval)</span> |
| 424 | } |
| 425 | if( (tmFlags & TIMELINE_BISECT)!=0 && zType[0]=='c' ){ |
| 426 | static Stmt bisectQuery; |
| 427 | db_prepare(&bisectQuery, "SELECT seq, stat FROM bilog WHERE rid=:rid"); |
| 428 | db_bind_int(&bisectQuery, ":rid", rid); |
| 429 | if( db_step(&bisectQuery)==SQLITE_ROW ){ |
| 430 | @ <b>%s(db_column_text(&bisectQuery,1))</b> |
| 431 | @ (%d(db_column_int(&bisectQuery,0))) |
| 432 | } |
| 433 | db_reset(&bisectQuery); |
| 434 | } |
| 435 | db_column_blob(pQuery, commentColumn, &comment); |
| 436 | if( zType[0]!='c' ){ |
| 437 | /* Comments for anything other than a check-in are generated by |
| 438 | ** "fossil rebuild" and expect to be rendered as text/x-fossil-wiki */ |
| @@ -484,29 +460,36 @@ | |
| 460 | }else{ |
| 461 | @ <span class="timelineComment">%W(blob_str(&comment))</span> |
| 462 | } |
| 463 | blob_reset(&comment); |
| 464 | |
| 465 | /* Generate extra information and hyperlinks to follow the comment. |
| 466 | ** Example: "(check-in: [abcdefg], user: drh, tags: trunk)" |
| 467 | */ |
| 468 | cgi_printf("<span class='timelineDetail'>("); |
| 469 | if( zType[0]=='c' ){ |
| 470 | cgi_printf("check-in: "); |
| 471 | hyperlink_to_uuid(zUuid); |
| 472 | }else if( zType[0]=='e' && tagid ){ |
| 473 | cgi_printf("technote: "); |
| 474 | hyperlink_to_event_tagid(tagid<0?-tagid:tagid); |
| 475 | }else{ |
| 476 | cgi_printf("artifact: "); |
| 477 | hyperlink_to_uuid(zUuid); |
| 478 | } |
| 479 | |
| 480 | if( g.perm.Hyperlink && fossil_strcmp(zDispUser, zThisUser)!=0 ){ |
| 481 | char *zLink = mprintf("%R/timeline?u=%h&c=%t&nd&n=200", zDispUser, zDate); |
| 482 | cgi_printf("user: %z%h</a>", href("%z",zLink), zDispUser); |
| 483 | }else{ |
| 484 | cgi_printf("user: %h", zDispUser); |
| 485 | } |
| 486 | |
| 487 | /* Generate the "tags: TAGLIST" at the end of the comment, together |
| 488 | ** with hyperlinks to the tag list. |
| 489 | */ |
| 490 | if( zTagList && zTagList[0]==0 ) zTagList = 0; |
| 491 | if( zTagList ){ |
| 492 | if( g.perm.Hyperlink ){ |
| 493 | int i; |
| 494 | const char *z = zTagList; |
| 495 | Blob links; |
| @@ -522,16 +505,27 @@ | |
| 505 | blob_appendf(&links, "%#h", i+2, z); |
| 506 | } |
| 507 | if( z[i]==0 ) break; |
| 508 | z += i+2; |
| 509 | } |
| 510 | cgi_printf(" tags: %s", blob_str(&links)); |
| 511 | blob_reset(&links); |
| 512 | }else{ |
| 513 | cgi_printf(" tags: %h", zTagList); |
| 514 | } |
| 515 | } |
| 516 | |
| 517 | if( tmFlags & TIMELINE_SHOWRID ){ |
| 518 | int srcId = delta_source_rid(rid); |
| 519 | if( srcId ){ |
| 520 | cgi_printf(" id: %d←%d", rid, srcId); |
| 521 | }else{ |
| 522 | cgi_printf(" id: %d", rid); |
| 523 | } |
| 524 | } |
| 525 | cgi_printf(")</span>\n"); /* End of the details section */ |
| 526 | |
| 527 | tag_private_status(rid); |
| 528 | |
| 529 | /* Generate extra hyperlinks at the end of the comment */ |
| 530 | if( xExtra ){ |
| 531 | xExtra(rid); |
| 532 |