Fossil SCM
When listing the history of a file, show the check-in associated with each new version of that file.
Commit
96c1043c61aa57728b0b87c04e29b372c32baf27
Parent
5fe3aee8394b13b…
1 file changed
+8
-2
+8
-2
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -498,15 +498,16 @@ | ||
| 498 | 498 | zFilename = PD("name",""); |
| 499 | 499 | db_prepare(&q, |
| 500 | 500 | "SELECT substr(b.uuid,1,10), datetime(event.mtime,'localtime')," |
| 501 | 501 | " coalesce(event.ecomment, event.comment)," |
| 502 | 502 | " coalesce(event.euser, event.user)," |
| 503 | - " mlink.pid, mlink.fid, mlink.mid, mlink.fnid" | |
| 504 | - " FROM mlink, blob b, event" | |
| 503 | + " mlink.pid, mlink.fid, mlink.mid, mlink.fnid, ci.uuid" | |
| 504 | + " FROM mlink, blob b, event, blob ci" | |
| 505 | 505 | " WHERE mlink.fnid=(SELECT fnid FROM filename WHERE name=%Q)" |
| 506 | 506 | " AND b.rid=mlink.fid" |
| 507 | 507 | " AND event.objid=mlink.mid" |
| 508 | + " AND event.objid=ci.rid" | |
| 508 | 509 | " ORDER BY event.mtime DESC", |
| 509 | 510 | zFilename |
| 510 | 511 | ); |
| 511 | 512 | blob_zero(&title); |
| 512 | 513 | blob_appendf(&title, "History of "); |
| @@ -521,11 +522,13 @@ | ||
| 521 | 522 | const char *zUser = db_column_text(&q, 3); |
| 522 | 523 | int fpid = db_column_int(&q, 4); |
| 523 | 524 | int frid = db_column_int(&q, 5); |
| 524 | 525 | int mid = db_column_int(&q, 6); |
| 525 | 526 | int fnid = db_column_int(&q, 7); |
| 527 | + const char *zCkin = db_column_text(&q,8); | |
| 526 | 528 | char zShort[20]; |
| 529 | + char zShortCkin[20]; | |
| 527 | 530 | if( memcmp(zDate, zPrevDate, 10) ){ |
| 528 | 531 | sprintf(zPrevDate, "%.10s", zDate); |
| 529 | 532 | @ <tr><td colspan=3> |
| 530 | 533 | @ <div class="divider">%s(zPrevDate)</div> |
| 531 | 534 | @ </td></tr> |
| @@ -532,15 +535,18 @@ | ||
| 532 | 535 | } |
| 533 | 536 | @ <tr><td valign="top">%s(&zDate[11])</td> |
| 534 | 537 | @ <td width="20"></td> |
| 535 | 538 | @ <td valign="top" align="left"> |
| 536 | 539 | sqlite3_snprintf(sizeof(zShort), zShort, "%.10s", zUuid); |
| 540 | + sqlite3_snprintf(sizeof(zShortCkin), zShortCkin, "%.10s", zCkin); | |
| 537 | 541 | if( g.okHistory ){ |
| 538 | 542 | @ <a href="%s(g.zTop)/artifact/%s(zUuid)">[%s(zShort)]</a> |
| 539 | 543 | }else{ |
| 540 | 544 | @ [%s(zShort)] |
| 541 | 545 | } |
| 546 | + @ part of check-in | |
| 547 | + hyperlink_to_uuid(zShortCkin); | |
| 542 | 548 | @ %h(zCom) (By: |
| 543 | 549 | hyperlink_to_user(zUser, zDate, " on"); |
| 544 | 550 | hyperlink_to_date(zDate, ")"); |
| 545 | 551 | if( g.okHistory ){ |
| 546 | 552 | if( fpid ){ |
| 547 | 553 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -498,15 +498,16 @@ | |
| 498 | zFilename = PD("name",""); |
| 499 | db_prepare(&q, |
| 500 | "SELECT substr(b.uuid,1,10), datetime(event.mtime,'localtime')," |
| 501 | " coalesce(event.ecomment, event.comment)," |
| 502 | " coalesce(event.euser, event.user)," |
| 503 | " mlink.pid, mlink.fid, mlink.mid, mlink.fnid" |
| 504 | " FROM mlink, blob b, event" |
| 505 | " WHERE mlink.fnid=(SELECT fnid FROM filename WHERE name=%Q)" |
| 506 | " AND b.rid=mlink.fid" |
| 507 | " AND event.objid=mlink.mid" |
| 508 | " ORDER BY event.mtime DESC", |
| 509 | zFilename |
| 510 | ); |
| 511 | blob_zero(&title); |
| 512 | blob_appendf(&title, "History of "); |
| @@ -521,11 +522,13 @@ | |
| 521 | const char *zUser = db_column_text(&q, 3); |
| 522 | int fpid = db_column_int(&q, 4); |
| 523 | int frid = db_column_int(&q, 5); |
| 524 | int mid = db_column_int(&q, 6); |
| 525 | int fnid = db_column_int(&q, 7); |
| 526 | char zShort[20]; |
| 527 | if( memcmp(zDate, zPrevDate, 10) ){ |
| 528 | sprintf(zPrevDate, "%.10s", zDate); |
| 529 | @ <tr><td colspan=3> |
| 530 | @ <div class="divider">%s(zPrevDate)</div> |
| 531 | @ </td></tr> |
| @@ -532,15 +535,18 @@ | |
| 532 | } |
| 533 | @ <tr><td valign="top">%s(&zDate[11])</td> |
| 534 | @ <td width="20"></td> |
| 535 | @ <td valign="top" align="left"> |
| 536 | sqlite3_snprintf(sizeof(zShort), zShort, "%.10s", zUuid); |
| 537 | if( g.okHistory ){ |
| 538 | @ <a href="%s(g.zTop)/artifact/%s(zUuid)">[%s(zShort)]</a> |
| 539 | }else{ |
| 540 | @ [%s(zShort)] |
| 541 | } |
| 542 | @ %h(zCom) (By: |
| 543 | hyperlink_to_user(zUser, zDate, " on"); |
| 544 | hyperlink_to_date(zDate, ")"); |
| 545 | if( g.okHistory ){ |
| 546 | if( fpid ){ |
| 547 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -498,15 +498,16 @@ | |
| 498 | zFilename = PD("name",""); |
| 499 | db_prepare(&q, |
| 500 | "SELECT substr(b.uuid,1,10), datetime(event.mtime,'localtime')," |
| 501 | " coalesce(event.ecomment, event.comment)," |
| 502 | " coalesce(event.euser, event.user)," |
| 503 | " mlink.pid, mlink.fid, mlink.mid, mlink.fnid, ci.uuid" |
| 504 | " FROM mlink, blob b, event, blob ci" |
| 505 | " WHERE mlink.fnid=(SELECT fnid FROM filename WHERE name=%Q)" |
| 506 | " AND b.rid=mlink.fid" |
| 507 | " AND event.objid=mlink.mid" |
| 508 | " AND event.objid=ci.rid" |
| 509 | " ORDER BY event.mtime DESC", |
| 510 | zFilename |
| 511 | ); |
| 512 | blob_zero(&title); |
| 513 | blob_appendf(&title, "History of "); |
| @@ -521,11 +522,13 @@ | |
| 522 | const char *zUser = db_column_text(&q, 3); |
| 523 | int fpid = db_column_int(&q, 4); |
| 524 | int frid = db_column_int(&q, 5); |
| 525 | int mid = db_column_int(&q, 6); |
| 526 | int fnid = db_column_int(&q, 7); |
| 527 | const char *zCkin = db_column_text(&q,8); |
| 528 | char zShort[20]; |
| 529 | char zShortCkin[20]; |
| 530 | if( memcmp(zDate, zPrevDate, 10) ){ |
| 531 | sprintf(zPrevDate, "%.10s", zDate); |
| 532 | @ <tr><td colspan=3> |
| 533 | @ <div class="divider">%s(zPrevDate)</div> |
| 534 | @ </td></tr> |
| @@ -532,15 +535,18 @@ | |
| 535 | } |
| 536 | @ <tr><td valign="top">%s(&zDate[11])</td> |
| 537 | @ <td width="20"></td> |
| 538 | @ <td valign="top" align="left"> |
| 539 | sqlite3_snprintf(sizeof(zShort), zShort, "%.10s", zUuid); |
| 540 | sqlite3_snprintf(sizeof(zShortCkin), zShortCkin, "%.10s", zCkin); |
| 541 | if( g.okHistory ){ |
| 542 | @ <a href="%s(g.zTop)/artifact/%s(zUuid)">[%s(zShort)]</a> |
| 543 | }else{ |
| 544 | @ [%s(zShort)] |
| 545 | } |
| 546 | @ part of check-in |
| 547 | hyperlink_to_uuid(zShortCkin); |
| 548 | @ %h(zCom) (By: |
| 549 | hyperlink_to_user(zUser, zDate, " on"); |
| 550 | hyperlink_to_date(zDate, ")"); |
| 551 | if( g.okHistory ){ |
| 552 | if( fpid ){ |
| 553 |