Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add additional hyperlinking of dates and userids. For a "circa" timeline, show the "circa" point in the timeline listing. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
b5f4f910b72477f3a61b1ea0d65e2059 |
| User & Date: | drh 2009-08-29 16:45:30.000 |
Context
|
2009-08-29
| ||
| 17:01 | Patches to get Fossil working on OS/2. Ticket [89bec0d9aa9f30] ... (check-in: df97fae2bd user: drh tags: trunk) | |
| 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) | |
Changes
Changes to src/info.c.
| ︙ | ︙ | |||
19 20 21 22 23 24 25 | ** drh@hwaci.com ** http://www.hwaci.com/drh/ ** ******************************************************************************* ** ** This file contains code to implement the "info" command. The ** "info" command gives command-line access to information about | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ** drh@hwaci.com ** http://www.hwaci.com/drh/ ** ******************************************************************************* ** ** This file contains code to implement the "info" command. The ** "info" command gives command-line access to information about ** the current tree, or a particular artifact or check-in. */ #include "config.h" #include "info.h" #include <assert.h> /* |
| ︙ | ︙ | |||
142 143 144 145 146 147 148 |
if( rid==0 ){
fossil_panic("no such object: %s\n", g.argv[2]);
}
show_common_info(rid, "uuid:", 1);
}
}
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
if( rid==0 ){
fossil_panic("no such object: %s\n", g.argv[2]);
}
show_common_info(rid, "uuid:", 1);
}
}
/*
** Show information about all tags on a given node.
*/
static void showTags(int rid, const char *zNotGlob){
Stmt q;
int cnt = 0;
db_prepare(&q,
|
| ︙ | ︙ | |||
327 328 329 330 331 332 333 |
if( zSrcUuid && zSrcUuid[0] ){
if( tagtype==0 ){
@ by
}else{
@ added by
}
hyperlink_to_uuid(zSrcUuid);
| | > | 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
if( zSrcUuid && zSrcUuid[0] ){
if( tagtype==0 ){
@ by
}else{
@ added by
}
hyperlink_to_uuid(zSrcUuid);
@ on
hyperlink_to_date(zDate,0);
}
}
db_finalize(&q);
if( cnt ){
@ </ul>
}
}
|
| ︙ | ︙ | |||
388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
);
if( db_step(&q)==SQLITE_ROW ){
const char *zUuid = db_column_text(&q, 0);
char *zTitle = mprintf("Check-in [%.10s]", zUuid);
char *zEUser, *zEComment;
const char *zUser;
const char *zComment;
style_header(zTitle);
login_anonymous_available();
free(zTitle);
zEUser = db_text(0,
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
TAG_USER, rid);
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>
| > > | > | > | > | > | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
);
if( db_step(&q)==SQLITE_ROW ){
const char *zUuid = db_column_text(&q, 0);
char *zTitle = mprintf("Check-in [%.10s]", zUuid);
char *zEUser, *zEComment;
const char *zUser;
const char *zComment;
const char *zDate;
style_header(zTitle);
login_anonymous_available();
free(zTitle);
zEUser = db_text(0,
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
TAG_USER, rid);
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);
zDate = db_column_text(&q,1);
@ <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>
hyperlink_to_date(zDate, "</td></tr>");
if( zEUser ){
@ <tr><th>Edited User:</td><td>
hyperlink_to_user(zEUser,zDate,"</td></tr>");
@ <tr><th>Original User:</th><td>
hyperlink_to_user(zUser,zDate,"</td></tr>");
}else{
@ <tr><th>User:</td><td>
hyperlink_to_user(zUser,zDate,"</td></tr>");
}
if( zEComment ){
@ <tr><th>Edited Comment:</th><td>%w(zEComment)</td></tr>
@ <tr><th>Original Comment:</th><td>%w(zComment)</td></tr>
}else{
@ <tr><th>Comment:</th><td>%w(zComment)</td></tr>
}
|
| ︙ | ︙ | |||
507 508 509 510 511 512 513 |
@ version <a href="%s(g.zBaseURL)/artifact/%s(zNew)">[%s(zNew)]</a></p>
}
@ <blockquote><pre>
append_diff(pid, fid);
@ </pre></blockquote>
}
db_finalize(&q);
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 379 380 381 382 383 384 385 386 387 388 389 390 391 392 |
@ version <a href="%s(g.zBaseURL)/artifact/%s(zNew)">[%s(zNew)]</a></p>
}
@ <blockquote><pre>
append_diff(pid, fid);
@ </pre></blockquote>
}
db_finalize(&q);
style_footer();
}
/*
** WEBPAGE: winfo
** URL: /winfo?name=RID
**
|
| ︙ | ︙ | |||
756 757 758 759 760 761 762 |
rid
);
while( db_step(&q)==SQLITE_ROW ){
const char *zDate = db_column_text(&q, 0);
const char *zUser = db_column_text(&q, 2);
const char *zComment = db_column_text(&q, 1);
@ <h2>Check-in %s(zUuid)</h2>
| | > | | 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 |
rid
);
while( db_step(&q)==SQLITE_ROW ){
const char *zDate = db_column_text(&q, 0);
const char *zUser = db_column_text(&q, 2);
const char *zComment = db_column_text(&q, 1);
@ <h2>Check-in %s(zUuid)</h2>
@ <p>Made by
hyperlink_to_user(zUser,zDate," on");
hyperlink_to_date(zDate, ":");
@ %w(zComment). <a href="%s(g.zBaseURL)/ci/%s(zUuid)">[details]</a></p>
@ <hr>
}
db_finalize(&q);
db_prepare(&q,
"SELECT pid, fid, name"
" FROM mlink, filename"
|
| ︙ | ︙ | |||
790 791 792 793 794 795 796 | /* ** Write a description of an object to the www reply. ** ** If the object is a file then mention: ** ** * It's artifact ID ** * All its filenames | | | 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 | /* ** Write a description of an object to the www reply. ** ** If the object is a file then mention: ** ** * It's artifact ID ** * All its filenames ** * The check-in it was part of, with times and users ** ** If the object is a manifest, then mention: ** ** * It's artifact ID ** * date of check-in ** * Comment & user */ |
| ︙ | ︙ | |||
834 835 836 837 838 839 840 |
@ Also file
}else{
@ File
}
@ <a href="%s(g.zBaseURL)/finfo?name=%T(zName)">%h(zName)</a>
@ artifact %s(zFuuid) part of check-in
hyperlink_to_uuid(zVers);
| | > > | 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 |
@ Also file
}else{
@ File
}
@ <a href="%s(g.zBaseURL)/finfo?name=%T(zName)">%h(zName)</a>
@ artifact %s(zFuuid) part of check-in
hyperlink_to_uuid(zVers);
@ - %w(zCom) by
hyperlink_to_user(zUser,zDate," on");
hyperlink_to_date(zDate,".");
cnt++;
if( pDownloadName && blob_size(pDownloadName)==0 ){
blob_append(pDownloadName, zName, -1);
}
}
db_finalize(&q);
db_prepare(&q,
|
| ︙ | ︙ | |||
863 864 865 866 867 868 869 |
const char *zUuid = db_column_text(&q, 3);
if( cnt>0 ){
@ Also wiki page
}else{
@ Wiki page
}
@ [<a href="%s(g.zBaseURL)/wiki?name=%t(zPagename)">%h(zPagename)</a>]
| | > > | 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 |
const char *zUuid = db_column_text(&q, 3);
if( cnt>0 ){
@ Also wiki page
}else{
@ Wiki page
}
@ [<a href="%s(g.zBaseURL)/wiki?name=%t(zPagename)">%h(zPagename)</a>]
@ artifact %s(zUuid) by
hyperlink_to_user(zUser,zDate," on");
hyperlink_to_date(zDate,".");
nWiki++;
cnt++;
if( pDownloadName && blob_size(pDownloadName)==0 ){
blob_append(pDownloadName, zPagename, -1);
}
}
db_finalize(&q);
|
| ︙ | ︙ | |||
893 894 895 896 897 898 899 |
@ Also
}
if( zType[0]=='w' ){
@ Wiki edit
}else if( zType[0]=='t' ){
@ Ticket change
}else if( zType[0]=='c' ){
| | | > > | 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 |
@ Also
}
if( zType[0]=='w' ){
@ Wiki edit
}else if( zType[0]=='t' ){
@ Ticket change
}else if( zType[0]=='c' ){
@ Manifest of check-in
}else{
@ Control file referencing
}
hyperlink_to_uuid(zUuid);
@ - %w(zCom) by
hyperlink_to_user(zUser,zDate," on");
hyperlink_to_date(zDate, ".");
if( pDownloadName && blob_size(pDownloadName)==0 ){
blob_append(pDownloadName, zUuid, -1);
}
cnt++;
}
db_finalize(&q);
}
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
if( zV2==0 ){
@ <a href="%s(g.zBaseURL)/diff?v2=%s(zV1)">[diff]</a>
}else{
@ <a href="%s(g.zBaseURL)/diff?v1=%s(zV1)&v2=%s(zV2)">[diff]</a>
}
}
}
/*
** Count the number of primary non-branch children for the given check-in.
**
** A primary child is one where the parent is the primary parent, not
** a merge parent.
**
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
if( zV2==0 ){
@ <a href="%s(g.zBaseURL)/diff?v2=%s(zV1)">[diff]</a>
}else{
@ <a href="%s(g.zBaseURL)/diff?v1=%s(zV1)&v2=%s(zV2)">[diff]</a>
}
}
}
/*
** Generate a hyperlink to a date & time.
*/
void hyperlink_to_date(const char *zDate, const char *zSuffix){
if( zSuffix==0 ) zSuffix = "";
if( g.okHistory ){
@ <a href="%s(g.zTop)/timeline?c=%T(zDate)">%s(zDate)</a>%s(zSuffix)
}else{
@ %s(zDate)%s(zSuffix)
}
}
/*
** Generate a hyperlink to a user. This will link to a timeline showing
** events by that user. If the date+time is specified, then the timeline
** is centered on that date+time.
*/
void hyperlink_to_user(const char *zU, const char *zD, const char *zSuf){
if( zSuf==0 ) zSuf = "";
if( g.okHistory ){
if( zD && zD[0] ){
@ <a href="%s(g.zTop)/timeline?c=%T(zD)&u=%T(zU)">%h(zU)</a>%s(zSuf)
}else{
@ <a href="%s(g.zTop)/timeline?u=%T(zU)">%h(zU)</a>%s(zSuf)
}
}else{
@ %s(zU)
}
}
/*
** Count the number of primary non-branch children for the given check-in.
**
** A primary child is one where the parent is the primary parent, not
** a merge parent.
**
|
| ︙ | ︙ | |||
153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
int nParent = db_column_int(pQuery, 6);
int isLeaf = db_column_int(pQuery, 7);
const char *zBgClr = db_column_text(pQuery, 8);
const char *zDate = db_column_text(pQuery, 2);
const char *zType = db_column_text(pQuery, 9);
const char *zUser = db_column_text(pQuery, 4);
const char *zTagList = db_column_text(pQuery, 10);
db_multi_exec("INSERT OR IGNORE INTO seen VALUES(%d)", rid);
if( memcmp(zDate, zPrevDate, 10) ){
sprintf(zPrevDate, "%.10s", zDate);
@ <tr><td colspan=3>
@ <div class="divider">%s(zPrevDate)</div>
@ </td></tr>
}
| > > > > | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
int nParent = db_column_int(pQuery, 6);
int isLeaf = db_column_int(pQuery, 7);
const char *zBgClr = db_column_text(pQuery, 8);
const char *zDate = db_column_text(pQuery, 2);
const char *zType = db_column_text(pQuery, 9);
const char *zUser = db_column_text(pQuery, 4);
const char *zTagList = db_column_text(pQuery, 10);
if( strcmp(zType,"div")==0 ){
@ <tr><td colspan=3><hr></td></tr>
continue;
}
db_multi_exec("INSERT OR IGNORE INTO seen VALUES(%d)", rid);
if( memcmp(zDate, zPrevDate, 10) ){
sprintf(zPrevDate, "%.10s", zDate);
@ <tr><td colspan=3>
@ <div class="divider">%s(zPrevDate)</div>
@ </td></tr>
}
|
| ︙ | ︙ | |||
459 460 461 462 463 464 465 466 467 468 469 470 471 472 |
db_multi_exec("%s", blob_str(&sql2));
blob_reset(&sql2);
blob_appendf(&sql,
" AND event.mtime>=%f ORDER BY event.mtime ASC",
rCirca
);
nEntry -= (nEntry+1)/2;
url_add_parameter(&url, "c", zCirca);
}else{
zCirca = 0;
}
}else{
blob_appendf(&sql, " ORDER BY event.mtime DESC");
}
| > > > > > | 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 |
db_multi_exec("%s", blob_str(&sql2));
blob_reset(&sql2);
blob_appendf(&sql,
" AND event.mtime>=%f ORDER BY event.mtime ASC",
rCirca
);
nEntry -= (nEntry+1)/2;
db_multi_exec(
"INSERT OR IGNORE INTO timeline(timestamp,etype)"
"VALUES(datetime(%f,'localtime'),'div')",
rCirca
);
url_add_parameter(&url, "c", zCirca);
}else{
zCirca = 0;
}
}else{
blob_appendf(&sql, " ORDER BY event.mtime DESC");
}
|
| ︙ | ︙ | |||
625 626 627 628 629 630 631 | @ } @ } @ } @ </script> style_footer(); } | < < < < < < < | 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | @ } @ } @ } @ </script> style_footer(); } /* ** The input query q selects various records. Print a human-readable ** summary of those records. ** ** Limit the number of entries printed to nLine. ** ** The query should return these columns: |
| ︙ | ︙ |