Diff
Not logged in

Differences From:

File src/info.c part of check-in [5fe3aee839] - Disable additional hyperlinks when "history" privilege is disabled (by default when the user has not signed in as "anonymous" or other known user.) Help prevent spiders for soaking up bandwidth. by drh on 2009-08-30 01:22:15. [view]

To:

File src/info.c part of check-in [96c1043c61] - When listing the history of a file, show the check-in associated with each new version of that file. by drh on 2009-08-31 00:09:16. [view]

@@ -499,13 +499,14 @@
   db_prepare(&q,
     "SELECT substr(b.uuid,1,10), datetime(event.mtime,'localtime'),"
     "       coalesce(event.ecomment, event.comment),"
     "       coalesce(event.euser, event.user),"
-    "       mlink.pid, mlink.fid, mlink.mid, mlink.fnid"
-    "  FROM mlink, blob b, event"
+    "       mlink.pid, mlink.fid, mlink.mid, mlink.fnid, ci.uuid"
+    "  FROM mlink, blob b, event, blob ci"
     " WHERE mlink.fnid=(SELECT fnid FROM filename WHERE name=%Q)"
     "   AND b.rid=mlink.fid"
     "   AND event.objid=mlink.mid"
+    "   AND event.objid=ci.rid"
     " ORDER BY event.mtime DESC",
     zFilename
   );
   blob_zero(&title);
@@ -522,9 +523,11 @@
     int fpid = db_column_int(&q, 4);
     int frid = db_column_int(&q, 5);
     int mid = db_column_int(&q, 6);
     int fnid = db_column_int(&q, 7);
+    const char *zCkin = db_column_text(&q,8);
     char zShort[20];
+    char zShortCkin[20];
     if( memcmp(zDate, zPrevDate, 10) ){
       sprintf(zPrevDate, "%.10s", zDate);
       @ <tr><td colspan=3>
       @   <div class="divider">%s(zPrevDate)</div>
@@ -533,13 +536,16 @@
     @ <tr><td valign="top">%s(&zDate[11])</td>
     @ <td width="20"></td>
     @ <td valign="top" align="left">
     sqlite3_snprintf(sizeof(zShort), zShort, "%.10s", zUuid);
+    sqlite3_snprintf(sizeof(zShortCkin), zShortCkin, "%.10s", zCkin);
     if( g.okHistory ){
       @ <a href="%s(g.zTop)/artifact/%s(zUuid)">[%s(zShort)]</a>
     }else{
       @ [%s(zShort)]
     }
+    @ part of check-in
+    hyperlink_to_uuid(zShortCkin);
     @ %h(zCom) (By:
     hyperlink_to_user(zUser, zDate, " on");
     hyperlink_to_date(zDate, ")");
     if( g.okHistory ){