Fossil SCM

When listing the history of a file, show the check-in associated with each new version of that file.

drh 2009-08-31 00:09 trunk
Commit 96c1043c61aa57728b0b87c04e29b372c32baf27
1 file changed +8 -2
+8 -2
--- src/info.c
+++ src/info.c
@@ -498,15 +498,16 @@
498498
zFilename = PD("name","");
499499
db_prepare(&q,
500500
"SELECT substr(b.uuid,1,10), datetime(event.mtime,'localtime'),"
501501
" coalesce(event.ecomment, event.comment),"
502502
" 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"
505505
" WHERE mlink.fnid=(SELECT fnid FROM filename WHERE name=%Q)"
506506
" AND b.rid=mlink.fid"
507507
" AND event.objid=mlink.mid"
508
+ " AND event.objid=ci.rid"
508509
" ORDER BY event.mtime DESC",
509510
zFilename
510511
);
511512
blob_zero(&title);
512513
blob_appendf(&title, "History of ");
@@ -521,11 +522,13 @@
521522
const char *zUser = db_column_text(&q, 3);
522523
int fpid = db_column_int(&q, 4);
523524
int frid = db_column_int(&q, 5);
524525
int mid = db_column_int(&q, 6);
525526
int fnid = db_column_int(&q, 7);
527
+ const char *zCkin = db_column_text(&q,8);
526528
char zShort[20];
529
+ char zShortCkin[20];
527530
if( memcmp(zDate, zPrevDate, 10) ){
528531
sprintf(zPrevDate, "%.10s", zDate);
529532
@ <tr><td colspan=3>
530533
@ <div class="divider">%s(zPrevDate)</div>
531534
@ </td></tr>
@@ -532,15 +535,18 @@
532535
}
533536
@ <tr><td valign="top">%s(&zDate[11])</td>
534537
@ <td width="20"></td>
535538
@ <td valign="top" align="left">
536539
sqlite3_snprintf(sizeof(zShort), zShort, "%.10s", zUuid);
540
+ sqlite3_snprintf(sizeof(zShortCkin), zShortCkin, "%.10s", zCkin);
537541
if( g.okHistory ){
538542
@ <a href="%s(g.zTop)/artifact/%s(zUuid)">[%s(zShort)]</a>
539543
}else{
540544
@ [%s(zShort)]
541545
}
546
+ @ part of check-in
547
+ hyperlink_to_uuid(zShortCkin);
542548
@ %h(zCom) (By:
543549
hyperlink_to_user(zUser, zDate, " on");
544550
hyperlink_to_date(zDate, ")");
545551
if( g.okHistory ){
546552
if( fpid ){
547553
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button