Overview
SHA1 Hash: | 713b8be852b99fee6d3f538707fe4c384c212cad |
---|---|
Date: | 2009-08-28 22:59:27 |
User: | drh |
Comment: | Deleted some obsolete "todo" files. Updated the FAQ. Modified the the "vinfo" page to show check-in differences and made "vinfo" the default display for check-ins instead of "vdiff". |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified BUILD.txt from [e7fed9d5b6] to [334b80c575].
@@ -13,11 +13,11 @@ -------------------------------------------------------------------------- Here are some notes on what is happening behind the scenes: -* The Makefile just set up a few macros and then invokes the +* The Makefile just sets up a few macros and then invokes the real makefile in src/main.mk. The src/main.mk makefile is automatically generated by a TCL script found at src/makemake.tcl. Do not edit src/main.mk directly. Update src/makemake.tcl and then rerun it.
Modified src/diff.c from [cebb8ba99c] to [423e7bd7db].
@@ -76,19 +76,19 @@ ** Trailing whitespace is removed from each line. ** ** Return 0 if the file is binary or contains a line that is ** too long. */ -static DLine *break_into_lines(const char *z, int *pnLine){ +static DLine *break_into_lines(const char *z, int n, int *pnLine){ int nLine, i, j, k, x; unsigned int h, h2; DLine *a; /* Count the number of lines. Allocate space to hold ** the returned array. */ - for(i=j=0, nLine=1; z[i]; i++, j++){ + for(i=j=0, nLine=1; i<n; i++, j++){ int c = z[i]; if( c==0 ){ return 0; } if( c=='\n' && z[i+1]!=0 ){ @@ -484,12 +484,12 @@ ){ DContext c; /* Prepare the input files */ memset(&c, 0, sizeof(c)); - c.aFrom = break_into_lines(blob_str(pA_Blob), &c.nFrom); - c.aTo = break_into_lines(blob_str(pB_Blob), &c.nTo); + c.aFrom = break_into_lines(blob_str(pA_Blob), blob_size(pA_Blob), &c.nFrom); + c.aTo = break_into_lines(blob_str(pB_Blob), blob_size(pB_Blob), &c.nTo); if( c.aFrom==0 || c.aTo==0 ){ free(c.aFrom); free(c.aTo); if( pOut ){ blob_appendf(pOut, "cannot compute difference between binary files\n"); @@ -580,11 +580,11 @@ */ static int annotation_start(Annotator *p, Blob *pInput){ int i; memset(p, 0, sizeof(*p)); - p->c.aTo = break_into_lines(blob_str(pInput), &p->c.nTo); + p->c.aTo = break_into_lines(blob_str(pInput), blob_size(pInput), &p->c.nTo); if( p->c.aTo==0 ){ return 1; } p->aOrig = malloc( sizeof(p->aOrig[0])*p->c.nTo ); if( p->aOrig==0 ) fossil_panic("out of memory"); @@ -607,11 +607,12 @@ static int annotation_step(Annotator *p, Blob *pParent, char *zPName){ int i, j; int lnTo; /* Prepare the parent file to be diffed */ - p->c.aFrom = break_into_lines(blob_str(pParent), &p->c.nFrom); + p->c.aFrom = break_into_lines(blob_str(pParent), blob_size(pParent), + &p->c.nFrom); if( p->c.aFrom==0 ){ return 1; } /* Compute the differences going from pParent to the file being
Modified src/info.c from [11d48dcc33] to [781d76a85f].
@@ -241,10 +241,11 @@ @ </ul> } } +#if 0 /* NOT USED */ /* ** Show information about baselines mentioned in the "leaves" table. */ static void showLeaves(int rid){ Stmt q; @@ -276,10 +277,11 @@ db_finalize(&q); if( cnt ){ @ </ul> } } +#endif /* ** Show information about all tags on a given node. */ static void showTags(int rid, const char *zNotGlob){ @@ -338,15 +340,31 @@ } } /* +** Append the difference between two RIDs to the output +*/ +static void append_diff(int fromid, int toid){ + Blob from, to, out; + content_get(fromid, &from); + content_get(toid, &to); + blob_zero(&out); + text_diff(&from, &to, &out, 5); + @ %h(blob_str(&out)) + blob_reset(&from); + blob_reset(&to); + blob_reset(&out); +} + + +/* ** WEBPAGE: vinfo ** WEBPAGE: ci ** URL: /ci?name=RID|ARTIFACTID ** -** Return information about a baseline +** Display information about a particular check-in. */ void ci_page(void){ Stmt q; int rid; int isLeaf; @@ -385,15 +403,16 @@ TAG_COMMENT, rid); zUser = db_column_text(&q, 2); zComment = db_column_text(&q, 3); @ <div class="section">Overview</div> @ <p><table class="label-value"> - @ <tr><th>SHA1 Hash:</th><td>%s(zUuid)</td></tr> - @ <tr><th>Date:</th><td>%s(db_column_text(&q, 1))</td></tr> + @ <tr><th>SHA1 Hash:</th><td>%s(zUuid) if( g.okSetup ){ - @ <tr><th>Record ID:</th><td>%d(rid)</td></tr> - } + @ (Record ID: %d(rid)) + } + @ </td></tr> + @ <tr><th>Date:</th><td>%s(db_column_text(&q, 1))</td></tr> if( zEUser ){ @ <tr><th>Edited User:</td><td>%h(zEUser)</td></tr> @ <tr><th>Original User:</th><td>%h(zUser)</td></tr> }else{ @ <tr><th>User:</td><td>%h(zUser)</td></tr> @@ -437,14 +456,13 @@ const char *zTagName = db_column_text(&q, 0); @ | <a href="%s(g.zBaseURL)/timeline?t=%T(zTagName)">%h(zTagName)</a> } db_finalize(&q); @ </td></tr> - @ <tr><th>Commands:</th> + @ <tr><th>Other Links:</th> @ <td> - @ <a href="%s(g.zBaseURL)/vdiff/%s(zShortUuid)">diff</a> - @ | <a href="%s(g.zBaseURL)/dir?ci=%s(zShortUuid)">files</a> + @ <a href="%s(g.zBaseURL)/dir?ci=%s(zShortUuid)">files</a> @ | <a href="%s(g.zBaseURL)/zip/%s(zProjName)-%s(zShortUuid).zip?uuid=%s(zUuid)"> @ ZIP archive</a> @ | <a href="%s(g.zBaseURL)/artifact/%d(rid)">manifest</a> if( g.okWrite ){ @ | <a href="%s(g.zBaseURL)/ci_edit?r=%d(rid)">edit</a> @@ -458,11 +476,45 @@ style_header("Check-in Information"); login_anonymous_available(); } db_finalize(&q); showTags(rid, ""); - @ <div class="section">File Changes</div> + @ <div class="section">Changes</div> + db_prepare(&q, + "SELECT pid, fid, name, substr(a.uuid,1,10), substr(b.uuid,1,10)" + " FROM mlink JOIN filename ON filename.fnid=mlink.fnid" + " LEFT JOIN blob a ON a.rid=pid" + " LEFT JOIN blob b ON b.rid=fid" + " WHERE mlink.mid=%d" + " ORDER BY name", + rid + ); + while( db_step(&q)==SQLITE_ROW ){ + int pid = db_column_int(&q,0); + int fid = db_column_int(&q,1); + const char *zName = db_column_text(&q,2); + const char *zOld = db_column_text(&q,3); + const char *zNew = db_column_text(&q,4); + if( zOld && zNew ){ + @ <p>Modified <a href="%s(g.zBaseURL)/finfo?name=%T(zName)">%h(zName)</a> + @ from <a href="%s(g.zBaseURL)/artifact/%s(zOld)">[%s(zOld)]</a> + @ to <a href="%s(g.zBaseURL)/artifact/%s(zNew)">[%s(zNew)]</a></p> + }else if( zOld ){ + @ <p>Deleted <a href="%s(g.zBaseURL)/finfo?name=%T(zName)">%h(zName)</a> + @ version <a href="%s(g.zBaseURL)/artifact/%s(zOld)">[%s(zOld)]</a></p> + continue; + }else{ + @ <p>Added <a href="%s(g.zBaseURL)/finfo?name=%T(zName)">%h(zName)</a> + @ version <a href="%s(g.zBaseURL)/artifact/%s(zNew)">[%s(zNew)]</a></p> + } + @ <blockquote><pre> + append_diff(pid, fid); + @ </pre></blockquote> + } + db_finalize(&q); + +#if 0 @ <ul> db_prepare(&q, "SELECT a.name, b.name" " FROM mlink, filename AS a, filename AS b" " WHERE mid=%d" @@ -510,10 +562,12 @@ @ </ul> compute_leaves(rid, 0); showDescendants(rid, 2, "Descendants"); showLeaves(rid); showAncestors(rid, 2, "Ancestors"); +#endif + style_footer(); } /* ** WEBPAGE: winfo @@ -668,26 +722,10 @@ } } db_finalize(&q); @ </table> style_footer(); -} - - -/* -** Append the difference between two RIDs to the output -*/ -static void append_diff(int fromid, int toid){ - Blob from, to, out; - content_get(fromid, &from); - content_get(toid, &to); - blob_zero(&out); - text_diff(&from, &to, &out, 5); - @ %h(blob_str(&out)) - blob_reset(&from); - blob_reset(&to); - blob_reset(&out); } /* ** WEBPAGE: vdiff @@ -1222,11 +1260,11 @@ @ <p>No such object: %h(zName)</p> style_footer(); return; } if( db_exists("SELECT 1 FROM mlink WHERE mid=%d", rid) ){ - vdiff_page(); + ci_page(); }else if( db_exists("SELECT 1 FROM tagxref JOIN tag USING(tagid)" " WHERE rid=%d AND tagname LIKE 'wiki-%%'", rid) ){ winfo_page(); }else
Modified src/timeline.c from [56d2a51056] to [c172ebcb91].
@@ -54,11 +54,11 @@ ){ char zShortUuid[UUID_SIZE+1]; sprintf(zShortUuid, "%.10s", zUuid); if( g.okHistory ){ @ <a onmouseover='%s(zIn)("m%d(id)")' onmouseout='%s(zOut)("m%d(id)")' - @ href="%s(g.zBaseURL)/vdiff/%s(zUuid)">[%s(zShortUuid)]</a> + @ href="%s(g.zBaseURL)/vinfo/%s(zUuid)">[%s(zShortUuid)]</a> }else{ @ <b onmouseover='%s(zIn)("m%d(id)")' onmouseout='%s(zOut)("m%d(id)")'> @ [%s(zShortUuid)]</b> } }
Modified www/faq.tcl from [fcdedc015f] to [032c2fe5ed].
@@ -104,20 +104,18 @@ fossil clone http://www.hwaci.com/cgi-bin/fossil fossil.fossil </pre></blockquote> Once you have the repository cloned, you can open a local check-out as follows: <blockquote><pre> - mkdir fossil; cd fossil; fossil open ../fossil.fossil + mkdir src; cd src; fossil open ../fossil.fossil </pre></blockquote> Thereafter you should be able to keep your local check-out up to date - with the latest code in the public repository simply by typing: + with the latest code in the public repository by typing: <blockquote><pre> fossil update </pre></blockquote> } - - ############################################################################# # Code to actually generate the FAQ # puts "<title>Fossil FAQ</title>"
Modified www/faq.wiki from [0b78f4031f] to [26afb3550c].
@@ -103,14 +103,14 @@ fossil clone http://www.hwaci.com/cgi-bin/fossil fossil.fossil </pre></blockquote> Once you have the repository cloned, you can open a local check-out as follows: <blockquote><pre> -mkdir fossil; cd fossil; fossil open ../fossil.fossil +mkdir src; cd src; fossil open ../fossil.fossil </pre></blockquote> Thereafter you should be able to keep your local check-out up to date -with the latest code in the public repository simply by typing: +with the latest code in the public repository by typing: <blockquote><pre> fossil update </pre></blockquote></blockquote></li> </ol>