Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Further improvements to the web display of annotations and file history. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
ef26e7624e1e81ed16ebb9c1d40ff6e1 |
| User & Date: | drh 2013-05-27 02:18:06.699 |
Context
|
2013-05-27
| ||
| 02:25 | Remove an unused variable from the annotation logic in diff.c. check-in: 770fd05fe8 user: drh tags: trunk | |
| 02:18 | Further improvements to the web display of annotations and file history. check-in: ef26e7624e user: drh tags: trunk | |
| 02:00 | Do not redirect "diff" links on the "Show Files" option of the timeline to a different window. If the user wants to show the diff in a different window, let them click while holding down the Shift key. check-in: 71a916ee95 user: drh tags: trunk | |
Changes
Changes to src/diff.c.
| ︙ | ︙ | |||
2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 | int mid; int fnid; int i; int iLimit; /* Depth limit */ int annFlags = ANN_FILE_ANCEST; int showLog = 0; /* True to display the log */ const char *zFilename; /* Name of file to annotate */ char zFormat[10]; /* Format string for line numbers */ Annotator ann; HQuery url; struct AnnVers *p; unsigned clr1, clr2, clr; /* Gather query parameters */ | > | 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 | int mid; int fnid; int i; int iLimit; /* Depth limit */ int annFlags = ANN_FILE_ANCEST; int showLog = 0; /* True to display the log */ const char *zFilename; /* Name of file to annotate */ const char *zCI; /* The check-in containing zFilename */ char zFormat[10]; /* Format string for line numbers */ Annotator ann; HQuery url; struct AnnVers *p; unsigned clr1, clr2, clr; /* Gather query parameters */ |
| ︙ | ︙ | |||
2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 |
if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
fossil_redirect_home();
}
/* compute the annotation */
compute_direct_ancestors(mid, 10000000);
annotate_file(&ann, fnid, mid, iLimit, annFlags);
/* generate the web page */
style_header("Annotation For %h", zFilename);
url_initialize(&url, "annotate");
url_add_parameter(&url, "checkin", P("checkin"));
url_add_parameter(&url, "filename", zFilename);
if( iLimit!=20 ){
| > | 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 |
if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
fossil_redirect_home();
}
/* compute the annotation */
compute_direct_ancestors(mid, 10000000);
annotate_file(&ann, fnid, mid, iLimit, annFlags);
zCI = ann.aVers[0].zMUuid;
/* generate the web page */
style_header("Annotation For %h", zFilename);
url_initialize(&url, "annotate");
url_add_parameter(&url, "checkin", P("checkin"));
url_add_parameter(&url, "filename", zFilename);
if( iLimit!=20 ){
|
| ︙ | ︙ | |||
2461 2462 2463 2464 2465 2466 2467 |
}
for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
clr = gradient_color(clr1, clr2, ann.nVers-1, i);
ann.aVers[i].zBgColor = mprintf("#%06x", clr);
}
if( showLog ){
| > | | 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 |
}
for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
clr = gradient_color(clr1, clr2, ann.nVers-1, i);
ann.aVers[i].zBgColor = mprintf("#%06x", clr);
}
if( showLog ){
char *zLink = href("%R/finfo?name=%t&ci=%S",zFilename,zCI);
@ <h2>Ancestors of %z(zLink)%h(zFilename)</a> analyzed:</h2>
@ <ol>
for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
@ <li><span style='background-color:%s(p->zBgColor);'>%s(p->zDate)
@ check-in %z(href("%R/info/%S",p->zMUuid))%.10s(p->zMUuid)</a>
@ artifact %z(href("%R/artifact/%S",p->zFUuid))%.10s(p->zFUuid)</a>
@ </span>
#if 0
|
| ︙ | ︙ | |||
2487 2488 2489 2490 2491 2492 2493 |
}
#endif
}
@ </ol>
@ <hr>
}
if( !ann.bLimit ){
| | > > | | > | 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 |
}
#endif
}
@ </ol>
@ <hr>
}
if( !ann.bLimit ){
@ <h2>Origin for each line in
@ %z(href("%R/finfo?name=%h&ci=%S", zFilename, zCI))%h(zFilename)</a>
@ from check-in %z(href("%R/info/%S",zCI))%S(zCI)</a>:</h2>
iLimit = ann.nVers+10;
}else{
@ <h2>Lines added by the %d(iLimit) most recent ancestors of
@ %z(href("%R/finfo?name=%h&ci=%S", zFilename, zCI))%h(zFilename)</a>
@ from check-in %z(href("%R/info/%S",zCI))%S(zCI)</a>:</h2>
}
@ <pre>
for(i=0; i<ann.nOrig; i++){
int iVers = ann.aOrig[i].iVers;
char *z = (char*)ann.aOrig[i].z;
int n = ann.aOrig[i].n;
char zPrefix[300];
|
| ︙ | ︙ |
Changes to src/finfo.c.
| ︙ | ︙ | |||
364 365 366 367 368 369 370 |
@ <p>SQL: %h(blob_str(&sql))</p>
}
blob_reset(&sql);
blob_zero(&title);
if( baseCheckin ){
char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin);
char *zLink = href("%R/info/%S", zUuid);
| | | | | 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
@ <p>SQL: %h(blob_str(&sql))</p>
}
blob_reset(&sql);
blob_zero(&title);
if( baseCheckin ){
char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin);
char *zLink = href("%R/info/%S", zUuid);
blob_appendf(&title, "Ancestors of file ");
hyperlinked_path(zFilename, &title, zUuid);
blob_appendf(&title, " from check-in %z%.10s</a>", zLink, zUuid);
fossil_free(zUuid);
}else{
blob_appendf(&title, "History of files named ");
hyperlinked_path(zFilename, &title, 0);
}
@ <h2>%b(&title)</h2>
blob_reset(&title);
pGraph = graph_init();
@ <div id="canvas" style="position:relative;width:1px;height:1px;"
@ onclick="clickOnGraph(event)"></div>
|
| ︙ | ︙ |