Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | In the UI and CL, output UUID's the same (almost) everywhere: The first 10 characters of UUID's are always displayed, but more are added until the UUID contains at least a single 'a'-'f'. Hyperlinks still usee the full-length UUID. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
fe6d393021d9205a33d490bdeed36cac |
| User & Date: | jan.nijtmans 2014-07-16 07:57:26.516 |
Context
|
2014-07-16
| ||
| 22:17 | Clean up the command-search logic. check-in: bcb7c7a9b1 user: drh tags: trunk | |
| 08:09 | Update internal tables to Unicode 7.0. Closed-Leaf check-in: e17f7304dd user: jan.nijtmans tags: unicode-7.0 | |
| 07:57 | In the UI and CL, output UUID's the same (almost) everywhere: The first 10 characters of UUID's are always displayed, but more are added until the UUID contains at least a single 'a'-'f'. Hyperlinks still usee the full-length UUID. check-in: fe6d393021 user: jan.nijtmans tags: trunk | |
| 07:19 | make local aDia[] and aChar[] tables "static const". check-in: 5b26a50e1b user: jan.nijtmans tags: trunk | |
|
2014-07-02
| ||
| 10:50 | Use "%S" format in stead of "%.10s" in more places where UUID's are handled. Closed-Leaf check-in: b246fa0cee user: jan.nijtmans tags: 16-digit-event-ids | |
Changes
Changes to src/browse.c.
| ︙ | ︙ | |||
177 178 179 180 181 182 183 |
url_render(&sURI, "ci", "trunk", 0, 0));
}
if( linkTip ){
style_submenu_element("Tip", "Tip", "%s",
url_render(&sURI, "ci", "tip", 0, 0));
}
if( zCI ){
| | | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
url_render(&sURI, "ci", "trunk", 0, 0));
}
if( linkTip ){
style_submenu_element("Tip", "Tip", "%s",
url_render(&sURI, "ci", "tip", 0, 0));
}
if( zCI ){
@ <h2>Files of check-in [%z(href("vinfo?name=%s",zUuid))%S(zUuid)</a>]
@ %s(blob_str(&dirname))</h2>
zSubdirLink = mprintf("%R/dir?ci=%s&name=%T", zUuid, zPrefix);
if( nD==0 ){
style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s",
zUuid);
}
}else{
|
| ︙ | ︙ |
Changes to src/checkin.c.
| ︙ | ︙ | |||
926 927 928 929 930 931 932 |
b = db_exists(
"SELECT 1 FROM event"
" WHERE datetime(mtime)>=%Q"
" AND type='ci' AND objid=%d",
zDate, rid
);
if( b ){
| | | 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 |
b = db_exists(
"SELECT 1 FROM event"
" WHERE datetime(mtime)>=%Q"
" AND type='ci' AND objid=%d",
zDate, rid
);
if( b ){
fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)"
" Use --allow-older to override.", zUuid, zDate);
}
#endif
}
/*
** zDate should be a valid date string. Convert this string into the
|
| ︙ | ︙ |
Changes to src/checkout.c.
| ︙ | ︙ | |||
65 66 67 68 69 70 71 |
fossil_fatal(g.zErrMsg);
}
vid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid);
if( vid==0 ){
fossil_fatal("no such check-in: %s", g.argv[2]);
}
if( !is_a_version(vid) ){
| | | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
fossil_fatal(g.zErrMsg);
}
vid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid);
if( vid==0 ){
fossil_fatal("no such check-in: %s", g.argv[2]);
}
if( !is_a_version(vid) ){
fossil_fatal("object [%S] is not a check-in", blob_str(&uuid));
}
if( load_vfile_from_rid(vid) && !forceMissingFlag ){
fossil_fatal("missing content, unable to checkout");
};
return vid;
}
|
| ︙ | ︙ |
Changes to src/descendants.c.
| ︙ | ︙ | |||
404 405 406 407 408 409 410 |
fossil_print("*** %s ***\n", zBr);
fossil_free(zLastBr);
zLastBr = fossil_strdup(zBr);
}
n++;
sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
fossil_print("%6s ", zLineNo);
| | | 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
fossil_print("*** %s ***\n", zBr);
fossil_free(zLastBr);
zLastBr = fossil_strdup(zBr);
}
n++;
sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
fossil_print("%6s ", zLineNo);
z = mprintf("%s [%S] %s", zDate, zId, zCom);
comment_print(z, 7, width);
fossil_free(z);
}
fossil_free(zLastBr);
db_finalize(&q);
}
|
| ︙ | ︙ |
Changes to src/finfo.c.
| ︙ | ︙ | |||
198 199 200 201 202 203 204 |
const char *zUser = db_column_text(&q, 4);
const char *zBr = db_column_text(&q, 5);
char *zOut;
if( zBr==0 ) zBr = "trunk";
if( iBrief ){
fossil_print("%s ", zDate);
zOut = sqlite3_mprintf(
| | | 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
const char *zUser = db_column_text(&q, 4);
const char *zBr = db_column_text(&q, 5);
char *zOut;
if( zBr==0 ) zBr = "trunk";
if( iBrief ){
fossil_print("%s ", zDate);
zOut = sqlite3_mprintf(
"[%S] %s (user: %s, artifact: [%S], branch: %s)",
zCiUuid, zCom, zUser, zFileUuid, zBr);
comment_print(zOut, 11, iWidth);
sqlite3_free(zOut);
}else{
blob_reset(&line);
blob_appendf(&line, "%.10s ", zCiUuid);
blob_appendf(&line, "%.10s ", zDate);
|
| ︙ | ︙ | |||
380 381 382 383 384 385 386 |
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, "tree", "");
| | | 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 |
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, "tree", "");
blob_appendf(&title, " from check-in %z%S</a>", zLink, zUuid);
fossil_free(zUuid);
}else{
blob_appendf(&title, "History of files named ");
hyperlinked_path(zFilename, &title, 0, "tree", "");
}
@ <h2>%b(&title)</h2>
blob_reset(&title);
|
| ︙ | ︙ |
Changes to src/info.c.
| ︙ | ︙ | |||
529 530 531 532 533 534 535 |
" WHERE blob.rid=%d"
" AND event.objid=%d",
timeline_utc(), timeline_utc(), rid, rid
);
sideBySide = !is_false(PD("sbs","1"));
if( db_step(&q1)==SQLITE_ROW ){
const char *zUuid = db_column_text(&q1, 0);
| | | 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 |
" WHERE blob.rid=%d"
" AND event.objid=%d",
timeline_utc(), timeline_utc(), rid, rid
);
sideBySide = !is_false(PD("sbs","1"));
if( db_step(&q1)==SQLITE_ROW ){
const char *zUuid = db_column_text(&q1, 0);
char *zTitle = mprintf("Check-in [%S]", zUuid);
char *zEUser, *zEComment;
const char *zUser;
const char *zComment;
const char *zDate;
const char *zOrigDate;
style_header(zTitle);
|
| ︙ | ︙ |
Changes to src/manifest.c.
| ︙ | ︙ | |||
1981 1982 1983 1984 1985 1986 1987 |
/* Next loop expects tags to be sorted on UUID, so sort it. */
qsort(p->aTag, p->nTag, sizeof(p->aTag[0]), tag_compare);
for(i=0; i<p->nTag; i++){
zTagUuid = p->aTag[i].zUuid;
if( !zTagUuid ) continue;
if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){
blob_appendf(&comment,
| | | 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 |
/* Next loop expects tags to be sorted on UUID, so sort it. */
qsort(p->aTag, p->nTag, sizeof(p->aTag[0]), tag_compare);
for(i=0; i<p->nTag; i++){
zTagUuid = p->aTag[i].zUuid;
if( !zTagUuid ) continue;
if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){
blob_appendf(&comment,
" Edit [%s|%S]:",
zTagUuid, zTagUuid);
branchMove = 0;
if( permitHooks && db_exists("SELECT 1 FROM event, blob"
" WHERE event.type='ci' AND event.objid=blob.rid"
" AND blob.uuid='%s'", zTagUuid) ){
zScript = xfer_commit_code();
zUuid = zTagUuid;
|
| ︙ | ︙ |
Changes to src/name.c.
| ︙ | ︙ | |||
442 443 444 445 446 447 448 |
" SELECT tkt_rid, tkt_uuid, title"
" FROM ticket, ticketchng"
" WHERE ticket.tkt_id = ticketchng.tkt_id"
" AND tkt_uuid GLOB '%q*'"
" GROUP BY tkt_uuid"
" ORDER BY tkt_ctime DESC", z);
while( db_step(&q)==SQLITE_ROW ){
| | | | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
" SELECT tkt_rid, tkt_uuid, title"
" FROM ticket, ticketchng"
" WHERE ticket.tkt_id = ticketchng.tkt_id"
" AND tkt_uuid GLOB '%q*'"
" GROUP BY tkt_uuid"
" ORDER BY tkt_ctime DESC", z);
while( db_step(&q)==SQLITE_ROW ){
int rid = db_column_int(&q, 0);
const char *zUuid = db_column_text(&q, 1);
const char *zTitle = db_column_text(&q, 2);
@ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)">
@ %s(zUuid)</a> -
@ <ul></ul>
@ Ticket
hyperlink_to_uuid(zUuid);
@ - %s(zTitle).
@ <ul><li>
object_description(rid, 0, 0);
@ </li></ul>
@ </p></li>
}
db_finalize(&q);
db_prepare(&q,
"SELECT rid, uuid FROM"
" (SELECT tagxref.rid AS rid, substr(tagname, 7) AS uuid"
" FROM tagxref, tag WHERE tagxref.tagid = tag.tagid"
" AND tagname GLOB 'event-%q*') GROUP BY uuid", z);
while( db_step(&q)==SQLITE_ROW ){
int rid = db_column_int(&q, 0);
const char* zUuid = db_column_text(&q, 1);
@ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)">
@ %s(zUuid)</a> -
@ <ul><li>
object_description(rid, 0, 0);
@ </li></ul>
@ </p></li>
|
| ︙ | ︙ | |||
597 598 599 600 601 602 603 |
" AND filename.fnid=mlink.fnid"
" AND event.objid=mlink.mid"
" AND blob.rid=mlink.mid"
" ORDER BY event.mtime DESC /*sort*/",
timeline_utc(), rid);
while( db_step(&q)==SQLITE_ROW ){
fossil_print("file: %s\n", db_column_text(&q,0));
| | | 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 |
" AND filename.fnid=mlink.fnid"
" AND event.objid=mlink.mid"
" AND blob.rid=mlink.mid"
" ORDER BY event.mtime DESC /*sort*/",
timeline_utc(), rid);
while( db_step(&q)==SQLITE_ROW ){
fossil_print("file: %s\n", db_column_text(&q,0));
fossil_print(" part of [%S] by %s on %s\n",
db_column_text(&q, 1),
db_column_text(&q, 3),
db_column_text(&q, 2));
fossil_print(" ");
comment_print(db_column_text(&q,4), 12, -1);
}
db_finalize(&q);
|
| ︙ | ︙ |
Changes to src/printf.c.
| ︙ | ︙ | |||
606 607 608 609 610 611 612 |
break;
}
case etROOT: {
bufpt = g.zTop ? g.zTop : "";
length = (int)strlen(bufpt);
break;
}
| | < < < > > > > > > > | 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
break;
}
case etROOT: {
bufpt = g.zTop ? g.zTop : "";
length = (int)strlen(bufpt);
break;
}
case etSTRINGID:
case etSTRING:
case etDYNSTRING: {
int limit = flag_alternateform ? va_arg(ap,int) : -1;
bufpt = va_arg(ap,char*);
if( bufpt==0 ){
bufpt = "";
}else if( xtype==etDYNSTRING ){
zExtra = bufpt;
}else if( xtype==etSTRINGID ){
precision = 0;
while( bufpt[precision]>='0' && bufpt[precision]<='9' ){
precision++;
}
if( bufpt[precision]!=0 ) precision++;
if( precision<10 ) precision=10;
}
length = StrNLen32(bufpt, limit);
if( precision>=0 && precision<length ) length = precision;
break;
}
case etBLOB: {
int limit = flag_alternateform ? va_arg(ap, int) : -1;
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
18 19 20 21 22 23 24 | ** This file contains code to implement the timeline web page ** */ #include "config.h" #include <string.h> #include <time.h> #include "timeline.h" | < < < < < < < < < < < < < < < < < < < < < < | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
** This file contains code to implement the timeline web page
**
*/
#include "config.h"
#include <string.h>
#include <time.h>
#include "timeline.h"
/*
** Generate a hyperlink to a version.
*/
void hyperlink_to_uuid(const char *zUuid){
if( g.perm.Hyperlink ){
@ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%S(zUuid)]</a>
}else{
@ <span class="timelineHistDsp">[%S(zUuid)]</span>
}
}
/*
** Generate a hyperlink to a date & time.
*/
void hyperlink_to_date(const char *zDate, const char *zSuffix){
|
| ︙ | ︙ | |||
1218 1219 1220 1221 1222 1223 1224 |
if( np>0 ){
if( nd>0 ) blob_appendf(&desc, " and ");
blob_appendf(&desc, "%d ancestors", np);
db_multi_exec("%s", blob_str(&sql));
}
if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid);
}
| | | 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 |
if( np>0 ){
if( nd>0 ) blob_appendf(&desc, " and ");
blob_appendf(&desc, "%d ancestors", np);
db_multi_exec("%s", blob_str(&sql));
}
if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid);
}
blob_appendf(&desc, " of %z[%S]</a>",
href("%R/info/%s", zUuid), zUuid);
if( p_rid ){
url_add_parameter(&url, "p", zUuid);
}
if( d_rid ){
if( p_rid ){
/* If both p= and d= are set, we don't have the uuid of d yet. */
|
| ︙ | ︙ | |||
1259 1260 1261 1262 1263 1264 1265 |
f_rid, f_rid, f_rid
);
blob_appendf(&sql, " AND event.objid IN ok");
db_multi_exec("%s", blob_str(&sql));
if( useDividers ) timeline_add_dividers(0, f_rid);
blob_appendf(&desc, "Parents and children of check-in ");
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
| | | 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 |
f_rid, f_rid, f_rid
);
blob_appendf(&sql, " AND event.objid IN ok");
db_multi_exec("%s", blob_str(&sql));
if( useDividers ) timeline_add_dividers(0, f_rid);
blob_appendf(&desc, "Parents and children of check-in ");
zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid);
blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%s", zUuid), zUuid);
tmFlags |= TIMELINE_DISJOINT;
url_add_parameter(&url, "f", zUuid);
if( tmFlags & TIMELINE_FCHANGES ){
timeline_submenu(&url, "Hide Files", "v", 0, 0);
}else{
timeline_submenu(&url, "Show Files", "v", "", 0);
}
|
| ︙ | ︙ | |||
1585 1586 1587 1588 1589 1590 1591 |
const char *zDate = db_column_text(q, 2);
const char *zCom = db_column_text(q, 3);
int nChild = db_column_int(q, 4);
int nParent = db_column_int(q, 5);
char *zFree = 0;
int n = 0;
char zPrefix[80];
| < < | 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 |
const char *zDate = db_column_text(q, 2);
const char *zCom = db_column_text(q, 3);
int nChild = db_column_int(q, 4);
int nParent = db_column_int(q, 5);
char *zFree = 0;
int n = 0;
char zPrefix[80];
if( nAbsLimit!=0 ){
if( nLimit<0 && nLine>=nAbsLimit ){
fossil_print("--- line limit (%d) reached ---\n", nAbsLimit);
break; /* line count limit hit, stop. */
}else if( nEntry>=nAbsLimit ){
fossil_print("--- entry limit (%d) reached ---\n", nAbsLimit);
break; /* entry count limit hit, stop. */
}
}
if( fossil_strnicmp(zDate, zPrevDate, 10) ){
fossil_print("=== %.10s ===\n", zDate);
memcpy(zPrevDate, zDate, 10);
nLine++; /* record another line */
}
if( zCom==0 ) zCom = "";
fossil_print("%.8s ", &zDate[11]);
|
| ︙ | ︙ | |||
1623 1624 1625 1626 1627 1628 1629 |
sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], zBrType);
n = strlen(zPrefix);
}
if( fossil_strcmp(zCurrentUuid,zId)==0 ){
sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* ");
n += strlen(zPrefix);
}
| | | | 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 |
sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], zBrType);
n = strlen(zPrefix);
}
if( fossil_strcmp(zCurrentUuid,zId)==0 ){
sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* ");
n += strlen(zPrefix);
}
zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom);
nLine += comment_print(zFree, 9, width); /* record another X lines */
fossil_free(zFree);
if(verboseFlag){
if( !fchngQueryInit ){
db_prepare(&fchngQuery,
"SELECT (pid==0) AS isnew,"
" (fid==0) AS isdel,"
" (SELECT name FROM filename WHERE fnid=mlink.fnid) AS name,"
|
| ︙ | ︙ |