Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| 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". |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
713b8be852b99fee6d3f538707fe4c38 |
| User & Date: | drh 2009-08-28 22:59:27.000 |
References
|
2009-09-10
| ||
| 21:24 | • New ticket [8d073be880] diff/editor/gdiff settings don't support paths with spaces. ... (artifact: 63e2b019d4 user: anonymous) | |
Context
|
2009-08-29
| ||
| 16:45 | Add additional hyperlinking of dates and userids. For a "circa" timeline, show the "circa" point in the timeline listing. ... (check-in: b5f4f910b7 user: drh tags: trunk) | |
|
2009-08-28
| ||
| 22:59 | 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". ... (check-in: 713b8be852 user: drh tags: trunk) | |
| 21:36 | Update the FAQ to describe how to make a clone of the self-hosting fossil repository. ... (check-in: 68b73eb9b9 user: drh tags: trunk) | |
Changes
Changes to BUILD.txt.
| ︙ | ︙ | |||
11 12 13 14 15 16 17 | commented. The complete Makefile is only a few dozen lines long. Do not be intimidated. -------------------------------------------------------------------------- Here are some notes on what is happening behind the scenes: | | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | commented. The complete Makefile is only a few dozen lines long. Do not be intimidated. -------------------------------------------------------------------------- Here are some notes on what is happening behind the scenes: * 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. * The *.h header files are automatically generated using a program called "makeheaders". Source code to the makeheaders program is |
| ︙ | ︙ |
Changes to src/diff.c.
| ︙ | ︙ | |||
74 75 76 77 78 79 80 | ** bits of the hash store the length of each line. ** ** Trailing whitespace is removed from each line. ** ** Return 0 if the file is binary or contains a line that is ** too long. */ | | | | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
** bits of the hash store the length of each line.
**
** 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 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; i<n; i++, j++){
int c = z[i];
if( c==0 ){
return 0;
}
if( c=='\n' && z[i+1]!=0 ){
nLine++;
if( j>LENGTH_MASK ){
|
| ︙ | ︙ | |||
482 483 484 485 486 487 488 |
Blob *pOut, /* Write unified diff here if not NULL */
int nContext /* Amount of context to unified diff */
){
DContext c;
/* Prepare the input files */
memset(&c, 0, sizeof(c));
| | | | 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
Blob *pOut, /* Write unified diff here if not NULL */
int nContext /* Amount of context to unified diff */
){
DContext c;
/* Prepare the input files */
memset(&c, 0, sizeof(c));
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");
}
return 0;
|
| ︙ | ︙ | |||
578 579 580 581 582 583 584 |
** to be annotated. The annotator takes control of the input Blob and
** will release it when it is finished with it.
*/
static int annotation_start(Annotator *p, Blob *pInput){
int i;
memset(p, 0, sizeof(*p));
| | | 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 |
** to be annotated. The annotator takes control of the input Blob and
** will release it when it is finished with it.
*/
static int annotation_start(Annotator *p, Blob *pInput){
int i;
memset(p, 0, sizeof(*p));
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");
for(i=0; i<p->c.nTo; i++){
p->aOrig[i].z = p->c.aTo[i].z;
|
| ︙ | ︙ | |||
605 606 607 608 609 610 611 |
** pParent. Memory to hold zPName is leaked.
*/
static int annotation_step(Annotator *p, Blob *pParent, char *zPName){
int i, j;
int lnTo;
/* Prepare the parent file to be diffed */
| | > | 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 |
** pParent. Memory to hold zPName is leaked.
*/
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), blob_size(pParent),
&p->c.nFrom);
if( p->c.aFrom==0 ){
return 1;
}
/* Compute the differences going from pParent to the file being
** annotated. */
diff_all(&p->c);
|
| ︙ | ︙ |
Changes to src/info.c.
| ︙ | ︙ | |||
239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
db_finalize(&q);
if( cnt ){
@ </ul>
}
}
/*
** Show information about baselines mentioned in the "leaves" table.
*/
static void showLeaves(int rid){
Stmt q;
int cnt = 0;
db_prepare(&q,
| > | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
db_finalize(&q);
if( cnt ){
@ </ul>
}
}
#if 0 /* NOT USED */
/*
** Show information about baselines mentioned in the "leaves" table.
*/
static void showLeaves(int rid){
Stmt q;
int cnt = 0;
db_prepare(&q,
|
| ︙ | ︙ | |||
274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
@ %w(zCom) (by %s(zUser) on %s(zDate))
}
db_finalize(&q);
if( cnt ){
@ </ul>
}
}
/*
** Show information about all tags on a given node.
*/
static void showTags(int rid, const char *zNotGlob){
Stmt q;
int cnt = 0;
| > | 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
@ %w(zCom) (by %s(zUser) on %s(zDate))
}
db_finalize(&q);
if( cnt ){
@ </ul>
}
}
#endif
/*
** Show information about all tags on a given node.
*/
static void showTags(int rid, const char *zNotGlob){
Stmt q;
int cnt = 0;
|
| ︙ | ︙ | |||
334 335 336 337 338 339 340 341 342 343 344 345 346 |
}
db_finalize(&q);
if( cnt ){
@ </ul>
}
}
/*
** WEBPAGE: vinfo
** WEBPAGE: ci
** URL: /ci?name=RID|ARTIFACTID
**
| > > > > > > > > > > > > > > > > | | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
}
db_finalize(&q);
if( cnt ){
@ </ul>
}
}
/*
** 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
**
** Display information about a particular check-in.
*/
void ci_page(void){
Stmt q;
int rid;
int isLeaf;
login_check_credentials();
|
| ︙ | ︙ | |||
383 384 385 386 387 388 389 |
zEComment = db_text(0,
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
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">
| | < | > > | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 |
zEComment = db_text(0,
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
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)
if( g.okSetup ){
@ (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>
}
if( zEComment ){
|
| ︙ | ︙ | |||
435 436 437 438 439 440 441 |
" AND +tag.tagname GLOB 'sym-*'", rid);
while( db_step(&q)==SQLITE_ROW ){
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>
| | < | | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 |
" AND +tag.tagname GLOB 'sym-*'", rid);
while( db_step(&q)==SQLITE_ROW ){
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>Other Links:</th>
@ <td>
@ <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>
}
@ </td>
@ </tr>
free(zShortUuid);
}
@ </table></p>
}else{
style_header("Check-in Information");
login_anonymous_available();
}
db_finalize(&q);
showTags(rid, "");
@ <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"
" AND a.fnid=mlink.fnid"
" AND b.fnid=mlink.pfnid",
|
| ︙ | ︙ | |||
508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
}
}
@ </ul>
compute_leaves(rid, 0);
showDescendants(rid, 2, "Descendants");
showLeaves(rid);
showAncestors(rid, 2, "Ancestors");
style_footer();
}
/*
** WEBPAGE: winfo
** URL: /winfo?name=RID
**
| > > | 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 |
}
}
@ </ul>
compute_leaves(rid, 0);
showDescendants(rid, 2, "Descendants");
showLeaves(rid);
showAncestors(rid, 2, "Ancestors");
#endif
style_footer();
}
/*
** WEBPAGE: winfo
** URL: /winfo?name=RID
**
|
| ︙ | ︙ | |||
668 669 670 671 672 673 674 |
}
}
db_finalize(&q);
@ </table>
style_footer();
}
| < < < < < < < < < < < < < < < < | 722 723 724 725 726 727 728 729 730 731 732 733 734 735 |
}
}
db_finalize(&q);
@ </table>
style_footer();
}
/*
** WEBPAGE: vdiff
** URL: /vdiff?name=RID
**
** Show all differences for a particular check-in.
*/
|
| ︙ | ︙ | |||
1220 1221 1222 1223 1224 1225 1226 |
if( rid==0 ){
style_header("Broken Link");
@ <p>No such object: %h(zName)</p>
style_footer();
return;
}
if( db_exists("SELECT 1 FROM mlink WHERE mid=%d", rid) ){
| | | 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 |
if( rid==0 ){
style_header("Broken Link");
@ <p>No such object: %h(zName)</p>
style_footer();
return;
}
if( db_exists("SELECT 1 FROM mlink WHERE mid=%d", rid) ){
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
if( db_exists("SELECT 1 FROM tagxref JOIN tag USING(tagid)"
" WHERE rid=%d AND tagname LIKE 'tkt-%%'", rid) ){
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
52 53 54 55 56 57 58 |
const char *zOut, /* Javascript proc for mouseout */
int id /* Argument to javascript procs */
){
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)")'
| | | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
const char *zOut, /* Javascript proc for mouseout */
int id /* Argument to javascript procs */
){
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)/vinfo/%s(zUuid)">[%s(zShortUuid)]</a>
}else{
@ <b onmouseover='%s(zIn)("m%d(id)")' onmouseout='%s(zOut)("m%d(id)")'>
@ [%s(zShortUuid)]</b>
}
}
/*
|
| ︙ | ︙ |
Changes to www/faq.tcl.
| ︙ | ︙ | |||
102 103 104 105 106 107 108 | fossil clone http://www.fossil-scm.org/ fossil.fossil<br> fossil clone http://www2.fossil-scm.org/ fossil.fossil<br> 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> | | | < < | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | fossil clone http://www.fossil-scm.org/ fossil.fossil<br> fossil clone http://www2.fossil-scm.org/ fossil.fossil<br> 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 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 by typing: <blockquote><pre> fossil update </pre></blockquote> } ############################################################################# # Code to actually generate the FAQ # puts "<title>Fossil FAQ</title>" puts "<h1 align=\"center\">Frequently Asked Questions</h1>\n" puts "<p>Note: See also <a href=\"qandc.wiki\">Questions and Criticisms</a>.\n" |
| ︙ | ︙ |
Changes to www/faq.wiki.
| ︙ | ︙ | |||
101 102 103 104 105 106 107 | fossil clone http://www.fossil-scm.org/ fossil.fossil<br> fossil clone http://www2.fossil-scm.org/ fossil.fossil<br> 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> | | | | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | fossil clone http://www.fossil-scm.org/ fossil.fossil<br> fossil clone http://www2.fossil-scm.org/ fossil.fossil<br> 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 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 by typing: <blockquote><pre> fossil update </pre></blockquote></blockquote></li> </ol> |