Check-in [96c1043c61]
Not logged in
Overview

SHA1 Hash:96c1043c61aa57728b0b87c04e29b372c32baf27
Date: 2009-08-31 00:09:16
User: drh
Comment:When listing the history of a file, show the check-in associated with each new version of that file.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/info.c from [7cbe41c03c] to [eec9dcd76a].

@@ -498,15 +498,16 @@
   zFilename = PD("name","");
   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);
   blob_appendf(&title, "History of ");
@@ -521,11 +522,13 @@
     const char *zUser = db_column_text(&q, 3);
     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>
       @ </td></tr>
@@ -532,15 +535,18 @@
     }
     @ <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 ){
       if( fpid ){