@@ -476,94 +476,8 @@
manifest_clear(&m);
}
style_footer();
}
-
-/*
-** WEBPAGE: finfo
-** URL: /finfo?name=FILENAME
-**
-** Show the complete change history for a single file.
-*/
-void finfo_page(void){
- Stmt q;
- const char *zFilename;
- char zPrevDate[20];
- Blob title;
-
- login_check_credentials();
- if( !g.okRead ){ login_needed(); return; }
- style_header("File History");
- login_anonymous_available();
-
- zPrevDate[0] = 0;
- 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, 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 ");
- hyperlinked_path(zFilename, &title);
- @ <h2>%b(&title)</h2>
- blob_reset(&title);
- @ <table cellspacing=0 border=0 cellpadding=0>
- while( db_step(&q)==SQLITE_ROW ){
- const char *zUuid = db_column_text(&q, 0);
- const char *zDate = db_column_text(&q, 1);
- const char *zCom = db_column_text(&q, 2);
- 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>
- }
- @ <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 ){
- @ <a href="%s(g.zBaseURL)/fdiff?v1=%d(fpid)&v2=%d(frid)">[diff]</a>
- }
- @ <a href="%s(g.zBaseURL)/annotate?mid=%d(mid)&fnid=%d(fnid)">
- @ [annotate]</a>
- @ </td>
- }
- }
- db_finalize(&q);
- @ </table>
- style_footer();
-}
-
/*
** WEBPAGE: vdiff
** URL: /vdiff?name=RID