Fossil SCM
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.
Commit
fe6d393021d9205a33d490bdeed36cacaa8d1914
Parent
5b26a50e1ba7bd0…
13 files changed
+1
-1
+1
-1
+1
-1
+1
-1
+1
-1
+2
-2
+1
-1
+1
-1
+1
-1
+3
-3
+8
-4
+6
-30
+6
-30
+1
-1
| --- src/browse.c | ||
| +++ src/browse.c | ||
| @@ -179,11 +179,11 @@ | ||
| 179 | 179 | if( linkTip ){ |
| 180 | 180 | style_submenu_element("Tip", "Tip", "%s", |
| 181 | 181 | url_render(&sURI, "ci", "tip", 0, 0)); |
| 182 | 182 | } |
| 183 | 183 | if( zCI ){ |
| 184 | - @ <h2>Files of check-in [%z(href("vinfo?name=%s",zUuid))%.10s(zUuid)</a>] | |
| 184 | + @ <h2>Files of check-in [%z(href("vinfo?name=%s",zUuid))%S(zUuid)</a>] | |
| 185 | 185 | @ %s(blob_str(&dirname))</h2> |
| 186 | 186 | zSubdirLink = mprintf("%R/dir?ci=%s&name=%T", zUuid, zPrefix); |
| 187 | 187 | if( nD==0 ){ |
| 188 | 188 | style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s", |
| 189 | 189 | zUuid); |
| 190 | 190 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -179,11 +179,11 @@ | |
| 179 | if( linkTip ){ |
| 180 | style_submenu_element("Tip", "Tip", "%s", |
| 181 | url_render(&sURI, "ci", "tip", 0, 0)); |
| 182 | } |
| 183 | if( zCI ){ |
| 184 | @ <h2>Files of check-in [%z(href("vinfo?name=%s",zUuid))%.10s(zUuid)</a>] |
| 185 | @ %s(blob_str(&dirname))</h2> |
| 186 | zSubdirLink = mprintf("%R/dir?ci=%s&name=%T", zUuid, zPrefix); |
| 187 | if( nD==0 ){ |
| 188 | style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s", |
| 189 | zUuid); |
| 190 |
| --- src/browse.c | |
| +++ src/browse.c | |
| @@ -179,11 +179,11 @@ | |
| 179 | if( linkTip ){ |
| 180 | style_submenu_element("Tip", "Tip", "%s", |
| 181 | url_render(&sURI, "ci", "tip", 0, 0)); |
| 182 | } |
| 183 | if( zCI ){ |
| 184 | @ <h2>Files of check-in [%z(href("vinfo?name=%s",zUuid))%S(zUuid)</a>] |
| 185 | @ %s(blob_str(&dirname))</h2> |
| 186 | zSubdirLink = mprintf("%R/dir?ci=%s&name=%T", zUuid, zPrefix); |
| 187 | if( nD==0 ){ |
| 188 | style_submenu_element("File Ages", "File Ages", "%R/fileage?name=%s", |
| 189 | zUuid); |
| 190 |
+1
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -928,11 +928,11 @@ | ||
| 928 | 928 | " WHERE datetime(mtime)>=%Q" |
| 929 | 929 | " AND type='ci' AND objid=%d", |
| 930 | 930 | zDate, rid |
| 931 | 931 | ); |
| 932 | 932 | if( b ){ |
| 933 | - fossil_fatal("ancestor check-in [%.10s] (%s) is not older (clock skew?)" | |
| 933 | + fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)" | |
| 934 | 934 | " Use --allow-older to override.", zUuid, zDate); |
| 935 | 935 | } |
| 936 | 936 | #endif |
| 937 | 937 | } |
| 938 | 938 | |
| 939 | 939 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -928,11 +928,11 @@ | |
| 928 | " WHERE datetime(mtime)>=%Q" |
| 929 | " AND type='ci' AND objid=%d", |
| 930 | zDate, rid |
| 931 | ); |
| 932 | if( b ){ |
| 933 | fossil_fatal("ancestor check-in [%.10s] (%s) is not older (clock skew?)" |
| 934 | " Use --allow-older to override.", zUuid, zDate); |
| 935 | } |
| 936 | #endif |
| 937 | } |
| 938 | |
| 939 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -928,11 +928,11 @@ | |
| 928 | " WHERE datetime(mtime)>=%Q" |
| 929 | " AND type='ci' AND objid=%d", |
| 930 | zDate, rid |
| 931 | ); |
| 932 | if( b ){ |
| 933 | fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)" |
| 934 | " Use --allow-older to override.", zUuid, zDate); |
| 935 | } |
| 936 | #endif |
| 937 | } |
| 938 | |
| 939 |
+1
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -928,11 +928,11 @@ | ||
| 928 | 928 | " WHERE datetime(mtime)>=%Q" |
| 929 | 929 | " AND type='ci' AND objid=%d", |
| 930 | 930 | zDate, rid |
| 931 | 931 | ); |
| 932 | 932 | if( b ){ |
| 933 | - fossil_fatal("ancestor check-in [%.10s] (%s) is not older (clock skew?)" | |
| 933 | + fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)" | |
| 934 | 934 | " Use --allow-older to override.", zUuid, zDate); |
| 935 | 935 | } |
| 936 | 936 | #endif |
| 937 | 937 | } |
| 938 | 938 | |
| 939 | 939 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -928,11 +928,11 @@ | |
| 928 | " WHERE datetime(mtime)>=%Q" |
| 929 | " AND type='ci' AND objid=%d", |
| 930 | zDate, rid |
| 931 | ); |
| 932 | if( b ){ |
| 933 | fossil_fatal("ancestor check-in [%.10s] (%s) is not older (clock skew?)" |
| 934 | " Use --allow-older to override.", zUuid, zDate); |
| 935 | } |
| 936 | #endif |
| 937 | } |
| 938 | |
| 939 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -928,11 +928,11 @@ | |
| 928 | " WHERE datetime(mtime)>=%Q" |
| 929 | " AND type='ci' AND objid=%d", |
| 930 | zDate, rid |
| 931 | ); |
| 932 | if( b ){ |
| 933 | fossil_fatal("ancestor check-in [%S] (%s) is not older (clock skew?)" |
| 934 | " Use --allow-older to override.", zUuid, zDate); |
| 935 | } |
| 936 | #endif |
| 937 | } |
| 938 | |
| 939 |
+1
-1
| --- src/checkout.c | ||
| +++ src/checkout.c | ||
| @@ -67,11 +67,11 @@ | ||
| 67 | 67 | vid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid); |
| 68 | 68 | if( vid==0 ){ |
| 69 | 69 | fossil_fatal("no such check-in: %s", g.argv[2]); |
| 70 | 70 | } |
| 71 | 71 | if( !is_a_version(vid) ){ |
| 72 | - fossil_fatal("object [%.10s] is not a check-in", blob_str(&uuid)); | |
| 72 | + fossil_fatal("object [%S] is not a check-in", blob_str(&uuid)); | |
| 73 | 73 | } |
| 74 | 74 | if( load_vfile_from_rid(vid) && !forceMissingFlag ){ |
| 75 | 75 | fossil_fatal("missing content, unable to checkout"); |
| 76 | 76 | }; |
| 77 | 77 | return vid; |
| 78 | 78 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -67,11 +67,11 @@ | |
| 67 | vid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid); |
| 68 | if( vid==0 ){ |
| 69 | fossil_fatal("no such check-in: %s", g.argv[2]); |
| 70 | } |
| 71 | if( !is_a_version(vid) ){ |
| 72 | fossil_fatal("object [%.10s] is not a check-in", blob_str(&uuid)); |
| 73 | } |
| 74 | if( load_vfile_from_rid(vid) && !forceMissingFlag ){ |
| 75 | fossil_fatal("missing content, unable to checkout"); |
| 76 | }; |
| 77 | return vid; |
| 78 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -67,11 +67,11 @@ | |
| 67 | vid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid); |
| 68 | if( vid==0 ){ |
| 69 | fossil_fatal("no such check-in: %s", g.argv[2]); |
| 70 | } |
| 71 | if( !is_a_version(vid) ){ |
| 72 | fossil_fatal("object [%S] is not a check-in", blob_str(&uuid)); |
| 73 | } |
| 74 | if( load_vfile_from_rid(vid) && !forceMissingFlag ){ |
| 75 | fossil_fatal("missing content, unable to checkout"); |
| 76 | }; |
| 77 | return vid; |
| 78 |
+1
-1
| --- src/descendants.c | ||
| +++ src/descendants.c | ||
| @@ -406,11 +406,11 @@ | ||
| 406 | 406 | zLastBr = fossil_strdup(zBr); |
| 407 | 407 | } |
| 408 | 408 | n++; |
| 409 | 409 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 410 | 410 | fossil_print("%6s ", zLineNo); |
| 411 | - z = mprintf("%s [%.10s] %s", zDate, zId, zCom); | |
| 411 | + z = mprintf("%s [%S] %s", zDate, zId, zCom); | |
| 412 | 412 | comment_print(z, 7, width); |
| 413 | 413 | fossil_free(z); |
| 414 | 414 | } |
| 415 | 415 | fossil_free(zLastBr); |
| 416 | 416 | db_finalize(&q); |
| 417 | 417 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -406,11 +406,11 @@ | |
| 406 | zLastBr = fossil_strdup(zBr); |
| 407 | } |
| 408 | n++; |
| 409 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 410 | fossil_print("%6s ", zLineNo); |
| 411 | z = mprintf("%s [%.10s] %s", zDate, zId, zCom); |
| 412 | comment_print(z, 7, width); |
| 413 | fossil_free(z); |
| 414 | } |
| 415 | fossil_free(zLastBr); |
| 416 | db_finalize(&q); |
| 417 |
| --- src/descendants.c | |
| +++ src/descendants.c | |
| @@ -406,11 +406,11 @@ | |
| 406 | zLastBr = fossil_strdup(zBr); |
| 407 | } |
| 408 | n++; |
| 409 | sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n); |
| 410 | fossil_print("%6s ", zLineNo); |
| 411 | z = mprintf("%s [%S] %s", zDate, zId, zCom); |
| 412 | comment_print(z, 7, width); |
| 413 | fossil_free(z); |
| 414 | } |
| 415 | fossil_free(zLastBr); |
| 416 | db_finalize(&q); |
| 417 |
+2
-2
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -200,11 +200,11 @@ | ||
| 200 | 200 | char *zOut; |
| 201 | 201 | if( zBr==0 ) zBr = "trunk"; |
| 202 | 202 | if( iBrief ){ |
| 203 | 203 | fossil_print("%s ", zDate); |
| 204 | 204 | zOut = sqlite3_mprintf( |
| 205 | - "[%.10s] %s (user: %s, artifact: [%.10s], branch: %s)", | |
| 205 | + "[%S] %s (user: %s, artifact: [%S], branch: %s)", | |
| 206 | 206 | zCiUuid, zCom, zUser, zFileUuid, zBr); |
| 207 | 207 | comment_print(zOut, 11, iWidth); |
| 208 | 208 | sqlite3_free(zOut); |
| 209 | 209 | }else{ |
| 210 | 210 | blob_reset(&line); |
| @@ -382,11 +382,11 @@ | ||
| 382 | 382 | if( baseCheckin ){ |
| 383 | 383 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin); |
| 384 | 384 | char *zLink = href("%R/info/%s", zUuid); |
| 385 | 385 | blob_appendf(&title, "Ancestors of file "); |
| 386 | 386 | hyperlinked_path(zFilename, &title, zUuid, "tree", ""); |
| 387 | - blob_appendf(&title, " from check-in %z%.10s</a>", zLink, zUuid); | |
| 387 | + blob_appendf(&title, " from check-in %z%S</a>", zLink, zUuid); | |
| 388 | 388 | fossil_free(zUuid); |
| 389 | 389 | }else{ |
| 390 | 390 | blob_appendf(&title, "History of files named "); |
| 391 | 391 | hyperlinked_path(zFilename, &title, 0, "tree", ""); |
| 392 | 392 | } |
| 393 | 393 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -200,11 +200,11 @@ | |
| 200 | char *zOut; |
| 201 | if( zBr==0 ) zBr = "trunk"; |
| 202 | if( iBrief ){ |
| 203 | fossil_print("%s ", zDate); |
| 204 | zOut = sqlite3_mprintf( |
| 205 | "[%.10s] %s (user: %s, artifact: [%.10s], branch: %s)", |
| 206 | zCiUuid, zCom, zUser, zFileUuid, zBr); |
| 207 | comment_print(zOut, 11, iWidth); |
| 208 | sqlite3_free(zOut); |
| 209 | }else{ |
| 210 | blob_reset(&line); |
| @@ -382,11 +382,11 @@ | |
| 382 | if( baseCheckin ){ |
| 383 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin); |
| 384 | char *zLink = href("%R/info/%s", zUuid); |
| 385 | blob_appendf(&title, "Ancestors of file "); |
| 386 | hyperlinked_path(zFilename, &title, zUuid, "tree", ""); |
| 387 | blob_appendf(&title, " from check-in %z%.10s</a>", zLink, zUuid); |
| 388 | fossil_free(zUuid); |
| 389 | }else{ |
| 390 | blob_appendf(&title, "History of files named "); |
| 391 | hyperlinked_path(zFilename, &title, 0, "tree", ""); |
| 392 | } |
| 393 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -200,11 +200,11 @@ | |
| 200 | char *zOut; |
| 201 | if( zBr==0 ) zBr = "trunk"; |
| 202 | if( iBrief ){ |
| 203 | fossil_print("%s ", zDate); |
| 204 | zOut = sqlite3_mprintf( |
| 205 | "[%S] %s (user: %s, artifact: [%S], branch: %s)", |
| 206 | zCiUuid, zCom, zUser, zFileUuid, zBr); |
| 207 | comment_print(zOut, 11, iWidth); |
| 208 | sqlite3_free(zOut); |
| 209 | }else{ |
| 210 | blob_reset(&line); |
| @@ -382,11 +382,11 @@ | |
| 382 | if( baseCheckin ){ |
| 383 | char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin); |
| 384 | char *zLink = href("%R/info/%s", zUuid); |
| 385 | blob_appendf(&title, "Ancestors of file "); |
| 386 | hyperlinked_path(zFilename, &title, zUuid, "tree", ""); |
| 387 | blob_appendf(&title, " from check-in %z%S</a>", zLink, zUuid); |
| 388 | fossil_free(zUuid); |
| 389 | }else{ |
| 390 | blob_appendf(&title, "History of files named "); |
| 391 | hyperlinked_path(zFilename, &title, 0, "tree", ""); |
| 392 | } |
| 393 |
+1
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -531,11 +531,11 @@ | ||
| 531 | 531 | timeline_utc(), timeline_utc(), rid, rid |
| 532 | 532 | ); |
| 533 | 533 | sideBySide = !is_false(PD("sbs","1")); |
| 534 | 534 | if( db_step(&q1)==SQLITE_ROW ){ |
| 535 | 535 | const char *zUuid = db_column_text(&q1, 0); |
| 536 | - char *zTitle = mprintf("Check-in [%.10s]", zUuid); | |
| 536 | + char *zTitle = mprintf("Check-in [%S]", zUuid); | |
| 537 | 537 | char *zEUser, *zEComment; |
| 538 | 538 | const char *zUser; |
| 539 | 539 | const char *zComment; |
| 540 | 540 | const char *zDate; |
| 541 | 541 | const char *zOrigDate; |
| 542 | 542 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -531,11 +531,11 @@ | |
| 531 | timeline_utc(), timeline_utc(), rid, rid |
| 532 | ); |
| 533 | sideBySide = !is_false(PD("sbs","1")); |
| 534 | if( db_step(&q1)==SQLITE_ROW ){ |
| 535 | const char *zUuid = db_column_text(&q1, 0); |
| 536 | char *zTitle = mprintf("Check-in [%.10s]", zUuid); |
| 537 | char *zEUser, *zEComment; |
| 538 | const char *zUser; |
| 539 | const char *zComment; |
| 540 | const char *zDate; |
| 541 | const char *zOrigDate; |
| 542 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -531,11 +531,11 @@ | |
| 531 | timeline_utc(), timeline_utc(), rid, rid |
| 532 | ); |
| 533 | sideBySide = !is_false(PD("sbs","1")); |
| 534 | if( db_step(&q1)==SQLITE_ROW ){ |
| 535 | const char *zUuid = db_column_text(&q1, 0); |
| 536 | char *zTitle = mprintf("Check-in [%S]", zUuid); |
| 537 | char *zEUser, *zEComment; |
| 538 | const char *zUser; |
| 539 | const char *zComment; |
| 540 | const char *zDate; |
| 541 | const char *zOrigDate; |
| 542 |
+1
-1
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -1983,11 +1983,11 @@ | ||
| 1983 | 1983 | for(i=0; i<p->nTag; i++){ |
| 1984 | 1984 | zTagUuid = p->aTag[i].zUuid; |
| 1985 | 1985 | if( !zTagUuid ) continue; |
| 1986 | 1986 | if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){ |
| 1987 | 1987 | blob_appendf(&comment, |
| 1988 | - " Edit [%s|%.10s]:", | |
| 1988 | + " Edit [%s|%S]:", | |
| 1989 | 1989 | zTagUuid, zTagUuid); |
| 1990 | 1990 | branchMove = 0; |
| 1991 | 1991 | if( permitHooks && db_exists("SELECT 1 FROM event, blob" |
| 1992 | 1992 | " WHERE event.type='ci' AND event.objid=blob.rid" |
| 1993 | 1993 | " AND blob.uuid='%s'", zTagUuid) ){ |
| 1994 | 1994 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1983,11 +1983,11 @@ | |
| 1983 | for(i=0; i<p->nTag; i++){ |
| 1984 | zTagUuid = p->aTag[i].zUuid; |
| 1985 | if( !zTagUuid ) continue; |
| 1986 | if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){ |
| 1987 | blob_appendf(&comment, |
| 1988 | " Edit [%s|%.10s]:", |
| 1989 | zTagUuid, zTagUuid); |
| 1990 | branchMove = 0; |
| 1991 | if( permitHooks && db_exists("SELECT 1 FROM event, blob" |
| 1992 | " WHERE event.type='ci' AND event.objid=blob.rid" |
| 1993 | " AND blob.uuid='%s'", zTagUuid) ){ |
| 1994 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1983,11 +1983,11 @@ | |
| 1983 | for(i=0; i<p->nTag; i++){ |
| 1984 | zTagUuid = p->aTag[i].zUuid; |
| 1985 | if( !zTagUuid ) continue; |
| 1986 | if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){ |
| 1987 | blob_appendf(&comment, |
| 1988 | " Edit [%s|%S]:", |
| 1989 | zTagUuid, zTagUuid); |
| 1990 | branchMove = 0; |
| 1991 | if( permitHooks && db_exists("SELECT 1 FROM event, blob" |
| 1992 | " WHERE event.type='ci' AND event.objid=blob.rid" |
| 1993 | " AND blob.uuid='%s'", zTagUuid) ){ |
| 1994 |
+1
-1
| --- src/manifest.c | ||
| +++ src/manifest.c | ||
| @@ -1983,11 +1983,11 @@ | ||
| 1983 | 1983 | for(i=0; i<p->nTag; i++){ |
| 1984 | 1984 | zTagUuid = p->aTag[i].zUuid; |
| 1985 | 1985 | if( !zTagUuid ) continue; |
| 1986 | 1986 | if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){ |
| 1987 | 1987 | blob_appendf(&comment, |
| 1988 | - " Edit [%s|%.10s]:", | |
| 1988 | + " Edit [%s|%S]:", | |
| 1989 | 1989 | zTagUuid, zTagUuid); |
| 1990 | 1990 | branchMove = 0; |
| 1991 | 1991 | if( permitHooks && db_exists("SELECT 1 FROM event, blob" |
| 1992 | 1992 | " WHERE event.type='ci' AND event.objid=blob.rid" |
| 1993 | 1993 | " AND blob.uuid='%s'", zTagUuid) ){ |
| 1994 | 1994 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1983,11 +1983,11 @@ | |
| 1983 | for(i=0; i<p->nTag; i++){ |
| 1984 | zTagUuid = p->aTag[i].zUuid; |
| 1985 | if( !zTagUuid ) continue; |
| 1986 | if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){ |
| 1987 | blob_appendf(&comment, |
| 1988 | " Edit [%s|%.10s]:", |
| 1989 | zTagUuid, zTagUuid); |
| 1990 | branchMove = 0; |
| 1991 | if( permitHooks && db_exists("SELECT 1 FROM event, blob" |
| 1992 | " WHERE event.type='ci' AND event.objid=blob.rid" |
| 1993 | " AND blob.uuid='%s'", zTagUuid) ){ |
| 1994 |
| --- src/manifest.c | |
| +++ src/manifest.c | |
| @@ -1983,11 +1983,11 @@ | |
| 1983 | for(i=0; i<p->nTag; i++){ |
| 1984 | zTagUuid = p->aTag[i].zUuid; |
| 1985 | if( !zTagUuid ) continue; |
| 1986 | if( i==0 || fossil_strcmp(zTagUuid, p->aTag[i-1].zUuid)!=0 ){ |
| 1987 | blob_appendf(&comment, |
| 1988 | " Edit [%s|%S]:", |
| 1989 | zTagUuid, zTagUuid); |
| 1990 | branchMove = 0; |
| 1991 | if( permitHooks && db_exists("SELECT 1 FROM event, blob" |
| 1992 | " WHERE event.type='ci' AND event.objid=blob.rid" |
| 1993 | " AND blob.uuid='%s'", zTagUuid) ){ |
| 1994 |
+3
-3
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -444,11 +444,11 @@ | ||
| 444 | 444 | " WHERE ticket.tkt_id = ticketchng.tkt_id" |
| 445 | 445 | " AND tkt_uuid GLOB '%q*'" |
| 446 | 446 | " GROUP BY tkt_uuid" |
| 447 | 447 | " ORDER BY tkt_ctime DESC", z); |
| 448 | 448 | while( db_step(&q)==SQLITE_ROW ){ |
| 449 | - int rid = db_column_int(&q, 0); | |
| 449 | + int rid = db_column_int(&q, 0); | |
| 450 | 450 | const char *zUuid = db_column_text(&q, 1); |
| 451 | 451 | const char *zTitle = db_column_text(&q, 2); |
| 452 | 452 | @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)"> |
| 453 | 453 | @ %s(zUuid)</a> - |
| 454 | 454 | @ <ul></ul> |
| @@ -465,11 +465,11 @@ | ||
| 465 | 465 | "SELECT rid, uuid FROM" |
| 466 | 466 | " (SELECT tagxref.rid AS rid, substr(tagname, 7) AS uuid" |
| 467 | 467 | " FROM tagxref, tag WHERE tagxref.tagid = tag.tagid" |
| 468 | 468 | " AND tagname GLOB 'event-%q*') GROUP BY uuid", z); |
| 469 | 469 | while( db_step(&q)==SQLITE_ROW ){ |
| 470 | - int rid = db_column_int(&q, 0); | |
| 470 | + int rid = db_column_int(&q, 0); | |
| 471 | 471 | const char* zUuid = db_column_text(&q, 1); |
| 472 | 472 | @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)"> |
| 473 | 473 | @ %s(zUuid)</a> - |
| 474 | 474 | @ <ul><li> |
| 475 | 475 | object_description(rid, 0, 0); |
| @@ -599,11 +599,11 @@ | ||
| 599 | 599 | " AND blob.rid=mlink.mid" |
| 600 | 600 | " ORDER BY event.mtime DESC /*sort*/", |
| 601 | 601 | timeline_utc(), rid); |
| 602 | 602 | while( db_step(&q)==SQLITE_ROW ){ |
| 603 | 603 | fossil_print("file: %s\n", db_column_text(&q,0)); |
| 604 | - fossil_print(" part of [%.10s] by %s on %s\n", | |
| 604 | + fossil_print(" part of [%S] by %s on %s\n", | |
| 605 | 605 | db_column_text(&q, 1), |
| 606 | 606 | db_column_text(&q, 3), |
| 607 | 607 | db_column_text(&q, 2)); |
| 608 | 608 | fossil_print(" "); |
| 609 | 609 | comment_print(db_column_text(&q,4), 12, -1); |
| 610 | 610 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -444,11 +444,11 @@ | |
| 444 | " WHERE ticket.tkt_id = ticketchng.tkt_id" |
| 445 | " AND tkt_uuid GLOB '%q*'" |
| 446 | " GROUP BY tkt_uuid" |
| 447 | " ORDER BY tkt_ctime DESC", z); |
| 448 | while( db_step(&q)==SQLITE_ROW ){ |
| 449 | int rid = db_column_int(&q, 0); |
| 450 | const char *zUuid = db_column_text(&q, 1); |
| 451 | const char *zTitle = db_column_text(&q, 2); |
| 452 | @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)"> |
| 453 | @ %s(zUuid)</a> - |
| 454 | @ <ul></ul> |
| @@ -465,11 +465,11 @@ | |
| 465 | "SELECT rid, uuid FROM" |
| 466 | " (SELECT tagxref.rid AS rid, substr(tagname, 7) AS uuid" |
| 467 | " FROM tagxref, tag WHERE tagxref.tagid = tag.tagid" |
| 468 | " AND tagname GLOB 'event-%q*') GROUP BY uuid", z); |
| 469 | while( db_step(&q)==SQLITE_ROW ){ |
| 470 | int rid = db_column_int(&q, 0); |
| 471 | const char* zUuid = db_column_text(&q, 1); |
| 472 | @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)"> |
| 473 | @ %s(zUuid)</a> - |
| 474 | @ <ul><li> |
| 475 | object_description(rid, 0, 0); |
| @@ -599,11 +599,11 @@ | |
| 599 | " AND blob.rid=mlink.mid" |
| 600 | " ORDER BY event.mtime DESC /*sort*/", |
| 601 | timeline_utc(), rid); |
| 602 | while( db_step(&q)==SQLITE_ROW ){ |
| 603 | fossil_print("file: %s\n", db_column_text(&q,0)); |
| 604 | fossil_print(" part of [%.10s] by %s on %s\n", |
| 605 | db_column_text(&q, 1), |
| 606 | db_column_text(&q, 3), |
| 607 | db_column_text(&q, 2)); |
| 608 | fossil_print(" "); |
| 609 | comment_print(db_column_text(&q,4), 12, -1); |
| 610 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -444,11 +444,11 @@ | |
| 444 | " WHERE ticket.tkt_id = ticketchng.tkt_id" |
| 445 | " AND tkt_uuid GLOB '%q*'" |
| 446 | " GROUP BY tkt_uuid" |
| 447 | " ORDER BY tkt_ctime DESC", z); |
| 448 | while( db_step(&q)==SQLITE_ROW ){ |
| 449 | int rid = db_column_int(&q, 0); |
| 450 | const char *zUuid = db_column_text(&q, 1); |
| 451 | const char *zTitle = db_column_text(&q, 2); |
| 452 | @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)"> |
| 453 | @ %s(zUuid)</a> - |
| 454 | @ <ul></ul> |
| @@ -465,11 +465,11 @@ | |
| 465 | "SELECT rid, uuid FROM" |
| 466 | " (SELECT tagxref.rid AS rid, substr(tagname, 7) AS uuid" |
| 467 | " FROM tagxref, tag WHERE tagxref.tagid = tag.tagid" |
| 468 | " AND tagname GLOB 'event-%q*') GROUP BY uuid", z); |
| 469 | while( db_step(&q)==SQLITE_ROW ){ |
| 470 | int rid = db_column_int(&q, 0); |
| 471 | const char* zUuid = db_column_text(&q, 1); |
| 472 | @ <li><p><a href="%s(g.zTop)/%T(zSrc)/%s(zUuid)"> |
| 473 | @ %s(zUuid)</a> - |
| 474 | @ <ul><li> |
| 475 | object_description(rid, 0, 0); |
| @@ -599,11 +599,11 @@ | |
| 599 | " AND blob.rid=mlink.mid" |
| 600 | " ORDER BY event.mtime DESC /*sort*/", |
| 601 | timeline_utc(), rid); |
| 602 | while( db_step(&q)==SQLITE_ROW ){ |
| 603 | fossil_print("file: %s\n", db_column_text(&q,0)); |
| 604 | fossil_print(" part of [%S] by %s on %s\n", |
| 605 | db_column_text(&q, 1), |
| 606 | db_column_text(&q, 3), |
| 607 | db_column_text(&q, 2)); |
| 608 | fossil_print(" "); |
| 609 | comment_print(db_column_text(&q,4), 12, -1); |
| 610 |
+8
-4
| --- src/printf.c | ||
| +++ src/printf.c | ||
| @@ -608,22 +608,26 @@ | ||
| 608 | 608 | case etROOT: { |
| 609 | 609 | bufpt = g.zTop ? g.zTop : ""; |
| 610 | 610 | length = (int)strlen(bufpt); |
| 611 | 611 | break; |
| 612 | 612 | } |
| 613 | - case etSTRINGID: { | |
| 614 | - precision = 16; | |
| 615 | - /* Fall through */ | |
| 616 | - } | |
| 613 | + case etSTRINGID: | |
| 617 | 614 | case etSTRING: |
| 618 | 615 | case etDYNSTRING: { |
| 619 | 616 | int limit = flag_alternateform ? va_arg(ap,int) : -1; |
| 620 | 617 | bufpt = va_arg(ap,char*); |
| 621 | 618 | if( bufpt==0 ){ |
| 622 | 619 | bufpt = ""; |
| 623 | 620 | }else if( xtype==etDYNSTRING ){ |
| 624 | 621 | zExtra = bufpt; |
| 622 | + }else if( xtype==etSTRINGID ){ | |
| 623 | + precision = 0; | |
| 624 | + while( bufpt[precision]>='0' && bufpt[precision]<='9' ){ | |
| 625 | + precision++; | |
| 626 | + } | |
| 627 | + if( bufpt[precision]!=0 ) precision++; | |
| 628 | + if( precision<10 ) precision=10; | |
| 625 | 629 | } |
| 626 | 630 | length = StrNLen32(bufpt, limit); |
| 627 | 631 | if( precision>=0 && precision<length ) length = precision; |
| 628 | 632 | break; |
| 629 | 633 | } |
| 630 | 634 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -608,22 +608,26 @@ | |
| 608 | case etROOT: { |
| 609 | bufpt = g.zTop ? g.zTop : ""; |
| 610 | length = (int)strlen(bufpt); |
| 611 | break; |
| 612 | } |
| 613 | case etSTRINGID: { |
| 614 | precision = 16; |
| 615 | /* Fall through */ |
| 616 | } |
| 617 | case etSTRING: |
| 618 | case etDYNSTRING: { |
| 619 | int limit = flag_alternateform ? va_arg(ap,int) : -1; |
| 620 | bufpt = va_arg(ap,char*); |
| 621 | if( bufpt==0 ){ |
| 622 | bufpt = ""; |
| 623 | }else if( xtype==etDYNSTRING ){ |
| 624 | zExtra = bufpt; |
| 625 | } |
| 626 | length = StrNLen32(bufpt, limit); |
| 627 | if( precision>=0 && precision<length ) length = precision; |
| 628 | break; |
| 629 | } |
| 630 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -608,22 +608,26 @@ | |
| 608 | case etROOT: { |
| 609 | bufpt = g.zTop ? g.zTop : ""; |
| 610 | length = (int)strlen(bufpt); |
| 611 | break; |
| 612 | } |
| 613 | case etSTRINGID: |
| 614 | case etSTRING: |
| 615 | case etDYNSTRING: { |
| 616 | int limit = flag_alternateform ? va_arg(ap,int) : -1; |
| 617 | bufpt = va_arg(ap,char*); |
| 618 | if( bufpt==0 ){ |
| 619 | bufpt = ""; |
| 620 | }else if( xtype==etDYNSTRING ){ |
| 621 | zExtra = bufpt; |
| 622 | }else if( xtype==etSTRINGID ){ |
| 623 | precision = 0; |
| 624 | while( bufpt[precision]>='0' && bufpt[precision]<='9' ){ |
| 625 | precision++; |
| 626 | } |
| 627 | if( bufpt[precision]!=0 ) precision++; |
| 628 | if( precision<10 ) precision=10; |
| 629 | } |
| 630 | length = StrNLen32(bufpt, limit); |
| 631 | if( precision>=0 && precision<length ) length = precision; |
| 632 | break; |
| 633 | } |
| 634 |
+6
-30
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -20,41 +20,19 @@ | ||
| 20 | 20 | */ |
| 21 | 21 | #include "config.h" |
| 22 | 22 | #include <string.h> |
| 23 | 23 | #include <time.h> |
| 24 | 24 | #include "timeline.h" |
| 25 | - | |
| 26 | -/* | |
| 27 | -** Shorten a UUID so that is the minimum length needed to contain | |
| 28 | -** at least one digit in the range 'a'..'f'. The minimum length is 10. | |
| 29 | -*/ | |
| 30 | -static void shorten_uuid(char *zDest, const char *zSrc){ | |
| 31 | - int i; | |
| 32 | - for(i=0; i<10 && zSrc[i]<='9'; i++){} | |
| 33 | - memcpy(zDest, zSrc, 10); | |
| 34 | - if( i==10 && zSrc[i] ){ | |
| 35 | - do{ | |
| 36 | - zDest[i] = zSrc[i]; | |
| 37 | - i++; | |
| 38 | - }while( zSrc[i-1]<='9' ); | |
| 39 | - }else{ | |
| 40 | - i = 10; | |
| 41 | - } | |
| 42 | - zDest[i] = 0; | |
| 43 | -} | |
| 44 | - | |
| 45 | 25 | |
| 46 | 26 | /* |
| 47 | 27 | ** Generate a hyperlink to a version. |
| 48 | 28 | */ |
| 49 | 29 | void hyperlink_to_uuid(const char *zUuid){ |
| 50 | - char z[UUID_SIZE+1]; | |
| 51 | - shorten_uuid(z, zUuid); | |
| 52 | 30 | if( g.perm.Hyperlink ){ |
| 53 | - @ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%s(z)]</a> | |
| 31 | + @ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%S(zUuid)]</a> | |
| 54 | 32 | }else{ |
| 55 | - @ <span class="timelineHistDsp">[%s(z)]</span> | |
| 33 | + @ <span class="timelineHistDsp">[%S(zUuid)]</span> | |
| 56 | 34 | } |
| 57 | 35 | } |
| 58 | 36 | |
| 59 | 37 | /* |
| 60 | 38 | ** Generate a hyperlink to a date & time. |
| @@ -1220,11 +1198,11 @@ | ||
| 1220 | 1198 | blob_appendf(&desc, "%d ancestors", np); |
| 1221 | 1199 | db_multi_exec("%s", blob_str(&sql)); |
| 1222 | 1200 | } |
| 1223 | 1201 | if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid); |
| 1224 | 1202 | } |
| 1225 | - blob_appendf(&desc, " of %z[%.10s]</a>", | |
| 1203 | + blob_appendf(&desc, " of %z[%S]</a>", | |
| 1226 | 1204 | href("%R/info/%s", zUuid), zUuid); |
| 1227 | 1205 | if( p_rid ){ |
| 1228 | 1206 | url_add_parameter(&url, "p", zUuid); |
| 1229 | 1207 | } |
| 1230 | 1208 | if( d_rid ){ |
| @@ -1261,11 +1239,11 @@ | ||
| 1261 | 1239 | blob_appendf(&sql, " AND event.objid IN ok"); |
| 1262 | 1240 | db_multi_exec("%s", blob_str(&sql)); |
| 1263 | 1241 | if( useDividers ) timeline_add_dividers(0, f_rid); |
| 1264 | 1242 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1265 | 1243 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1266 | - blob_appendf(&desc, "%z[%.10s]</a>", href("%R/info/%s", zUuid), zUuid); | |
| 1244 | + blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%s", zUuid), zUuid); | |
| 1267 | 1245 | tmFlags |= TIMELINE_DISJOINT; |
| 1268 | 1246 | url_add_parameter(&url, "f", zUuid); |
| 1269 | 1247 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1270 | 1248 | timeline_submenu(&url, "Hide Files", "v", 0, 0); |
| 1271 | 1249 | }else{ |
| @@ -1587,11 +1565,10 @@ | ||
| 1587 | 1565 | int nChild = db_column_int(q, 4); |
| 1588 | 1566 | int nParent = db_column_int(q, 5); |
| 1589 | 1567 | char *zFree = 0; |
| 1590 | 1568 | int n = 0; |
| 1591 | 1569 | char zPrefix[80]; |
| 1592 | - char zUuid[UUID_SIZE+1]; | |
| 1593 | 1570 | |
| 1594 | 1571 | if( nAbsLimit!=0 ){ |
| 1595 | 1572 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1596 | 1573 | fossil_print("--- line limit (%d) reached ---\n", nAbsLimit); |
| 1597 | 1574 | break; /* line count limit hit, stop. */ |
| @@ -1598,11 +1575,10 @@ | ||
| 1598 | 1575 | }else if( nEntry>=nAbsLimit ){ |
| 1599 | 1576 | fossil_print("--- entry limit (%d) reached ---\n", nAbsLimit); |
| 1600 | 1577 | break; /* entry count limit hit, stop. */ |
| 1601 | 1578 | } |
| 1602 | 1579 | } |
| 1603 | - sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId); | |
| 1604 | 1580 | if( fossil_strnicmp(zDate, zPrevDate, 10) ){ |
| 1605 | 1581 | fossil_print("=== %.10s ===\n", zDate); |
| 1606 | 1582 | memcpy(zPrevDate, zDate, 10); |
| 1607 | 1583 | nLine++; /* record another line */ |
| 1608 | 1584 | } |
| @@ -1625,13 +1601,13 @@ | ||
| 1625 | 1601 | } |
| 1626 | 1602 | if( fossil_strcmp(zCurrentUuid,zId)==0 ){ |
| 1627 | 1603 | sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* "); |
| 1628 | 1604 | n += strlen(zPrefix); |
| 1629 | 1605 | } |
| 1630 | - zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); | |
| 1606 | + zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom); | |
| 1631 | 1607 | nLine += comment_print(zFree, 9, width); /* record another X lines */ |
| 1632 | - sqlite3_free(zFree); | |
| 1608 | + fossil_free(zFree); | |
| 1633 | 1609 | |
| 1634 | 1610 | if(verboseFlag){ |
| 1635 | 1611 | if( !fchngQueryInit ){ |
| 1636 | 1612 | db_prepare(&fchngQuery, |
| 1637 | 1613 | "SELECT (pid==0) AS isnew," |
| 1638 | 1614 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -20,41 +20,19 @@ | |
| 20 | */ |
| 21 | #include "config.h" |
| 22 | #include <string.h> |
| 23 | #include <time.h> |
| 24 | #include "timeline.h" |
| 25 | |
| 26 | /* |
| 27 | ** Shorten a UUID so that is the minimum length needed to contain |
| 28 | ** at least one digit in the range 'a'..'f'. The minimum length is 10. |
| 29 | */ |
| 30 | static void shorten_uuid(char *zDest, const char *zSrc){ |
| 31 | int i; |
| 32 | for(i=0; i<10 && zSrc[i]<='9'; i++){} |
| 33 | memcpy(zDest, zSrc, 10); |
| 34 | if( i==10 && zSrc[i] ){ |
| 35 | do{ |
| 36 | zDest[i] = zSrc[i]; |
| 37 | i++; |
| 38 | }while( zSrc[i-1]<='9' ); |
| 39 | }else{ |
| 40 | i = 10; |
| 41 | } |
| 42 | zDest[i] = 0; |
| 43 | } |
| 44 | |
| 45 | |
| 46 | /* |
| 47 | ** Generate a hyperlink to a version. |
| 48 | */ |
| 49 | void hyperlink_to_uuid(const char *zUuid){ |
| 50 | char z[UUID_SIZE+1]; |
| 51 | shorten_uuid(z, zUuid); |
| 52 | if( g.perm.Hyperlink ){ |
| 53 | @ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%s(z)]</a> |
| 54 | }else{ |
| 55 | @ <span class="timelineHistDsp">[%s(z)]</span> |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | /* |
| 60 | ** Generate a hyperlink to a date & time. |
| @@ -1220,11 +1198,11 @@ | |
| 1220 | blob_appendf(&desc, "%d ancestors", np); |
| 1221 | db_multi_exec("%s", blob_str(&sql)); |
| 1222 | } |
| 1223 | if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid); |
| 1224 | } |
| 1225 | blob_appendf(&desc, " of %z[%.10s]</a>", |
| 1226 | href("%R/info/%s", zUuid), zUuid); |
| 1227 | if( p_rid ){ |
| 1228 | url_add_parameter(&url, "p", zUuid); |
| 1229 | } |
| 1230 | if( d_rid ){ |
| @@ -1261,11 +1239,11 @@ | |
| 1261 | blob_appendf(&sql, " AND event.objid IN ok"); |
| 1262 | db_multi_exec("%s", blob_str(&sql)); |
| 1263 | if( useDividers ) timeline_add_dividers(0, f_rid); |
| 1264 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1265 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1266 | blob_appendf(&desc, "%z[%.10s]</a>", href("%R/info/%s", zUuid), zUuid); |
| 1267 | tmFlags |= TIMELINE_DISJOINT; |
| 1268 | url_add_parameter(&url, "f", zUuid); |
| 1269 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1270 | timeline_submenu(&url, "Hide Files", "v", 0, 0); |
| 1271 | }else{ |
| @@ -1587,11 +1565,10 @@ | |
| 1587 | int nChild = db_column_int(q, 4); |
| 1588 | int nParent = db_column_int(q, 5); |
| 1589 | char *zFree = 0; |
| 1590 | int n = 0; |
| 1591 | char zPrefix[80]; |
| 1592 | char zUuid[UUID_SIZE+1]; |
| 1593 | |
| 1594 | if( nAbsLimit!=0 ){ |
| 1595 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1596 | fossil_print("--- line limit (%d) reached ---\n", nAbsLimit); |
| 1597 | break; /* line count limit hit, stop. */ |
| @@ -1598,11 +1575,10 @@ | |
| 1598 | }else if( nEntry>=nAbsLimit ){ |
| 1599 | fossil_print("--- entry limit (%d) reached ---\n", nAbsLimit); |
| 1600 | break; /* entry count limit hit, stop. */ |
| 1601 | } |
| 1602 | } |
| 1603 | sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId); |
| 1604 | if( fossil_strnicmp(zDate, zPrevDate, 10) ){ |
| 1605 | fossil_print("=== %.10s ===\n", zDate); |
| 1606 | memcpy(zPrevDate, zDate, 10); |
| 1607 | nLine++; /* record another line */ |
| 1608 | } |
| @@ -1625,13 +1601,13 @@ | |
| 1625 | } |
| 1626 | if( fossil_strcmp(zCurrentUuid,zId)==0 ){ |
| 1627 | sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* "); |
| 1628 | n += strlen(zPrefix); |
| 1629 | } |
| 1630 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1631 | nLine += comment_print(zFree, 9, width); /* record another X lines */ |
| 1632 | sqlite3_free(zFree); |
| 1633 | |
| 1634 | if(verboseFlag){ |
| 1635 | if( !fchngQueryInit ){ |
| 1636 | db_prepare(&fchngQuery, |
| 1637 | "SELECT (pid==0) AS isnew," |
| 1638 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -20,41 +20,19 @@ | |
| 20 | */ |
| 21 | #include "config.h" |
| 22 | #include <string.h> |
| 23 | #include <time.h> |
| 24 | #include "timeline.h" |
| 25 | |
| 26 | /* |
| 27 | ** Generate a hyperlink to a version. |
| 28 | */ |
| 29 | void hyperlink_to_uuid(const char *zUuid){ |
| 30 | if( g.perm.Hyperlink ){ |
| 31 | @ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%S(zUuid)]</a> |
| 32 | }else{ |
| 33 | @ <span class="timelineHistDsp">[%S(zUuid)]</span> |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | /* |
| 38 | ** Generate a hyperlink to a date & time. |
| @@ -1220,11 +1198,11 @@ | |
| 1198 | blob_appendf(&desc, "%d ancestors", np); |
| 1199 | db_multi_exec("%s", blob_str(&sql)); |
| 1200 | } |
| 1201 | if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid); |
| 1202 | } |
| 1203 | blob_appendf(&desc, " of %z[%S]</a>", |
| 1204 | href("%R/info/%s", zUuid), zUuid); |
| 1205 | if( p_rid ){ |
| 1206 | url_add_parameter(&url, "p", zUuid); |
| 1207 | } |
| 1208 | if( d_rid ){ |
| @@ -1261,11 +1239,11 @@ | |
| 1239 | blob_appendf(&sql, " AND event.objid IN ok"); |
| 1240 | db_multi_exec("%s", blob_str(&sql)); |
| 1241 | if( useDividers ) timeline_add_dividers(0, f_rid); |
| 1242 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1243 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1244 | blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%s", zUuid), zUuid); |
| 1245 | tmFlags |= TIMELINE_DISJOINT; |
| 1246 | url_add_parameter(&url, "f", zUuid); |
| 1247 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1248 | timeline_submenu(&url, "Hide Files", "v", 0, 0); |
| 1249 | }else{ |
| @@ -1587,11 +1565,10 @@ | |
| 1565 | int nChild = db_column_int(q, 4); |
| 1566 | int nParent = db_column_int(q, 5); |
| 1567 | char *zFree = 0; |
| 1568 | int n = 0; |
| 1569 | char zPrefix[80]; |
| 1570 | |
| 1571 | if( nAbsLimit!=0 ){ |
| 1572 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1573 | fossil_print("--- line limit (%d) reached ---\n", nAbsLimit); |
| 1574 | break; /* line count limit hit, stop. */ |
| @@ -1598,11 +1575,10 @@ | |
| 1575 | }else if( nEntry>=nAbsLimit ){ |
| 1576 | fossil_print("--- entry limit (%d) reached ---\n", nAbsLimit); |
| 1577 | break; /* entry count limit hit, stop. */ |
| 1578 | } |
| 1579 | } |
| 1580 | if( fossil_strnicmp(zDate, zPrevDate, 10) ){ |
| 1581 | fossil_print("=== %.10s ===\n", zDate); |
| 1582 | memcpy(zPrevDate, zDate, 10); |
| 1583 | nLine++; /* record another line */ |
| 1584 | } |
| @@ -1625,13 +1601,13 @@ | |
| 1601 | } |
| 1602 | if( fossil_strcmp(zCurrentUuid,zId)==0 ){ |
| 1603 | sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* "); |
| 1604 | n += strlen(zPrefix); |
| 1605 | } |
| 1606 | zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom); |
| 1607 | nLine += comment_print(zFree, 9, width); /* record another X lines */ |
| 1608 | fossil_free(zFree); |
| 1609 | |
| 1610 | if(verboseFlag){ |
| 1611 | if( !fchngQueryInit ){ |
| 1612 | db_prepare(&fchngQuery, |
| 1613 | "SELECT (pid==0) AS isnew," |
| 1614 |
+6
-30
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -20,41 +20,19 @@ | ||
| 20 | 20 | */ |
| 21 | 21 | #include "config.h" |
| 22 | 22 | #include <string.h> |
| 23 | 23 | #include <time.h> |
| 24 | 24 | #include "timeline.h" |
| 25 | - | |
| 26 | -/* | |
| 27 | -** Shorten a UUID so that is the minimum length needed to contain | |
| 28 | -** at least one digit in the range 'a'..'f'. The minimum length is 10. | |
| 29 | -*/ | |
| 30 | -static void shorten_uuid(char *zDest, const char *zSrc){ | |
| 31 | - int i; | |
| 32 | - for(i=0; i<10 && zSrc[i]<='9'; i++){} | |
| 33 | - memcpy(zDest, zSrc, 10); | |
| 34 | - if( i==10 && zSrc[i] ){ | |
| 35 | - do{ | |
| 36 | - zDest[i] = zSrc[i]; | |
| 37 | - i++; | |
| 38 | - }while( zSrc[i-1]<='9' ); | |
| 39 | - }else{ | |
| 40 | - i = 10; | |
| 41 | - } | |
| 42 | - zDest[i] = 0; | |
| 43 | -} | |
| 44 | - | |
| 45 | 25 | |
| 46 | 26 | /* |
| 47 | 27 | ** Generate a hyperlink to a version. |
| 48 | 28 | */ |
| 49 | 29 | void hyperlink_to_uuid(const char *zUuid){ |
| 50 | - char z[UUID_SIZE+1]; | |
| 51 | - shorten_uuid(z, zUuid); | |
| 52 | 30 | if( g.perm.Hyperlink ){ |
| 53 | - @ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%s(z)]</a> | |
| 31 | + @ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%S(zUuid)]</a> | |
| 54 | 32 | }else{ |
| 55 | - @ <span class="timelineHistDsp">[%s(z)]</span> | |
| 33 | + @ <span class="timelineHistDsp">[%S(zUuid)]</span> | |
| 56 | 34 | } |
| 57 | 35 | } |
| 58 | 36 | |
| 59 | 37 | /* |
| 60 | 38 | ** Generate a hyperlink to a date & time. |
| @@ -1220,11 +1198,11 @@ | ||
| 1220 | 1198 | blob_appendf(&desc, "%d ancestors", np); |
| 1221 | 1199 | db_multi_exec("%s", blob_str(&sql)); |
| 1222 | 1200 | } |
| 1223 | 1201 | if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid); |
| 1224 | 1202 | } |
| 1225 | - blob_appendf(&desc, " of %z[%.10s]</a>", | |
| 1203 | + blob_appendf(&desc, " of %z[%S]</a>", | |
| 1226 | 1204 | href("%R/info/%s", zUuid), zUuid); |
| 1227 | 1205 | if( p_rid ){ |
| 1228 | 1206 | url_add_parameter(&url, "p", zUuid); |
| 1229 | 1207 | } |
| 1230 | 1208 | if( d_rid ){ |
| @@ -1261,11 +1239,11 @@ | ||
| 1261 | 1239 | blob_appendf(&sql, " AND event.objid IN ok"); |
| 1262 | 1240 | db_multi_exec("%s", blob_str(&sql)); |
| 1263 | 1241 | if( useDividers ) timeline_add_dividers(0, f_rid); |
| 1264 | 1242 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1265 | 1243 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1266 | - blob_appendf(&desc, "%z[%.10s]</a>", href("%R/info/%s", zUuid), zUuid); | |
| 1244 | + blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%s", zUuid), zUuid); | |
| 1267 | 1245 | tmFlags |= TIMELINE_DISJOINT; |
| 1268 | 1246 | url_add_parameter(&url, "f", zUuid); |
| 1269 | 1247 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1270 | 1248 | timeline_submenu(&url, "Hide Files", "v", 0, 0); |
| 1271 | 1249 | }else{ |
| @@ -1587,11 +1565,10 @@ | ||
| 1587 | 1565 | int nChild = db_column_int(q, 4); |
| 1588 | 1566 | int nParent = db_column_int(q, 5); |
| 1589 | 1567 | char *zFree = 0; |
| 1590 | 1568 | int n = 0; |
| 1591 | 1569 | char zPrefix[80]; |
| 1592 | - char zUuid[UUID_SIZE+1]; | |
| 1593 | 1570 | |
| 1594 | 1571 | if( nAbsLimit!=0 ){ |
| 1595 | 1572 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1596 | 1573 | fossil_print("--- line limit (%d) reached ---\n", nAbsLimit); |
| 1597 | 1574 | break; /* line count limit hit, stop. */ |
| @@ -1598,11 +1575,10 @@ | ||
| 1598 | 1575 | }else if( nEntry>=nAbsLimit ){ |
| 1599 | 1576 | fossil_print("--- entry limit (%d) reached ---\n", nAbsLimit); |
| 1600 | 1577 | break; /* entry count limit hit, stop. */ |
| 1601 | 1578 | } |
| 1602 | 1579 | } |
| 1603 | - sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId); | |
| 1604 | 1580 | if( fossil_strnicmp(zDate, zPrevDate, 10) ){ |
| 1605 | 1581 | fossil_print("=== %.10s ===\n", zDate); |
| 1606 | 1582 | memcpy(zPrevDate, zDate, 10); |
| 1607 | 1583 | nLine++; /* record another line */ |
| 1608 | 1584 | } |
| @@ -1625,13 +1601,13 @@ | ||
| 1625 | 1601 | } |
| 1626 | 1602 | if( fossil_strcmp(zCurrentUuid,zId)==0 ){ |
| 1627 | 1603 | sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* "); |
| 1628 | 1604 | n += strlen(zPrefix); |
| 1629 | 1605 | } |
| 1630 | - zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); | |
| 1606 | + zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom); | |
| 1631 | 1607 | nLine += comment_print(zFree, 9, width); /* record another X lines */ |
| 1632 | - sqlite3_free(zFree); | |
| 1608 | + fossil_free(zFree); | |
| 1633 | 1609 | |
| 1634 | 1610 | if(verboseFlag){ |
| 1635 | 1611 | if( !fchngQueryInit ){ |
| 1636 | 1612 | db_prepare(&fchngQuery, |
| 1637 | 1613 | "SELECT (pid==0) AS isnew," |
| 1638 | 1614 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -20,41 +20,19 @@ | |
| 20 | */ |
| 21 | #include "config.h" |
| 22 | #include <string.h> |
| 23 | #include <time.h> |
| 24 | #include "timeline.h" |
| 25 | |
| 26 | /* |
| 27 | ** Shorten a UUID so that is the minimum length needed to contain |
| 28 | ** at least one digit in the range 'a'..'f'. The minimum length is 10. |
| 29 | */ |
| 30 | static void shorten_uuid(char *zDest, const char *zSrc){ |
| 31 | int i; |
| 32 | for(i=0; i<10 && zSrc[i]<='9'; i++){} |
| 33 | memcpy(zDest, zSrc, 10); |
| 34 | if( i==10 && zSrc[i] ){ |
| 35 | do{ |
| 36 | zDest[i] = zSrc[i]; |
| 37 | i++; |
| 38 | }while( zSrc[i-1]<='9' ); |
| 39 | }else{ |
| 40 | i = 10; |
| 41 | } |
| 42 | zDest[i] = 0; |
| 43 | } |
| 44 | |
| 45 | |
| 46 | /* |
| 47 | ** Generate a hyperlink to a version. |
| 48 | */ |
| 49 | void hyperlink_to_uuid(const char *zUuid){ |
| 50 | char z[UUID_SIZE+1]; |
| 51 | shorten_uuid(z, zUuid); |
| 52 | if( g.perm.Hyperlink ){ |
| 53 | @ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%s(z)]</a> |
| 54 | }else{ |
| 55 | @ <span class="timelineHistDsp">[%s(z)]</span> |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | /* |
| 60 | ** Generate a hyperlink to a date & time. |
| @@ -1220,11 +1198,11 @@ | |
| 1220 | blob_appendf(&desc, "%d ancestors", np); |
| 1221 | db_multi_exec("%s", blob_str(&sql)); |
| 1222 | } |
| 1223 | if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid); |
| 1224 | } |
| 1225 | blob_appendf(&desc, " of %z[%.10s]</a>", |
| 1226 | href("%R/info/%s", zUuid), zUuid); |
| 1227 | if( p_rid ){ |
| 1228 | url_add_parameter(&url, "p", zUuid); |
| 1229 | } |
| 1230 | if( d_rid ){ |
| @@ -1261,11 +1239,11 @@ | |
| 1261 | blob_appendf(&sql, " AND event.objid IN ok"); |
| 1262 | db_multi_exec("%s", blob_str(&sql)); |
| 1263 | if( useDividers ) timeline_add_dividers(0, f_rid); |
| 1264 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1265 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1266 | blob_appendf(&desc, "%z[%.10s]</a>", href("%R/info/%s", zUuid), zUuid); |
| 1267 | tmFlags |= TIMELINE_DISJOINT; |
| 1268 | url_add_parameter(&url, "f", zUuid); |
| 1269 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1270 | timeline_submenu(&url, "Hide Files", "v", 0, 0); |
| 1271 | }else{ |
| @@ -1587,11 +1565,10 @@ | |
| 1587 | int nChild = db_column_int(q, 4); |
| 1588 | int nParent = db_column_int(q, 5); |
| 1589 | char *zFree = 0; |
| 1590 | int n = 0; |
| 1591 | char zPrefix[80]; |
| 1592 | char zUuid[UUID_SIZE+1]; |
| 1593 | |
| 1594 | if( nAbsLimit!=0 ){ |
| 1595 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1596 | fossil_print("--- line limit (%d) reached ---\n", nAbsLimit); |
| 1597 | break; /* line count limit hit, stop. */ |
| @@ -1598,11 +1575,10 @@ | |
| 1598 | }else if( nEntry>=nAbsLimit ){ |
| 1599 | fossil_print("--- entry limit (%d) reached ---\n", nAbsLimit); |
| 1600 | break; /* entry count limit hit, stop. */ |
| 1601 | } |
| 1602 | } |
| 1603 | sqlite3_snprintf(sizeof(zUuid), zUuid, "%.10s", zId); |
| 1604 | if( fossil_strnicmp(zDate, zPrevDate, 10) ){ |
| 1605 | fossil_print("=== %.10s ===\n", zDate); |
| 1606 | memcpy(zPrevDate, zDate, 10); |
| 1607 | nLine++; /* record another line */ |
| 1608 | } |
| @@ -1625,13 +1601,13 @@ | |
| 1625 | } |
| 1626 | if( fossil_strcmp(zCurrentUuid,zId)==0 ){ |
| 1627 | sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* "); |
| 1628 | n += strlen(zPrefix); |
| 1629 | } |
| 1630 | zFree = sqlite3_mprintf("[%.10s] %s%s", zUuid, zPrefix, zCom); |
| 1631 | nLine += comment_print(zFree, 9, width); /* record another X lines */ |
| 1632 | sqlite3_free(zFree); |
| 1633 | |
| 1634 | if(verboseFlag){ |
| 1635 | if( !fchngQueryInit ){ |
| 1636 | db_prepare(&fchngQuery, |
| 1637 | "SELECT (pid==0) AS isnew," |
| 1638 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -20,41 +20,19 @@ | |
| 20 | */ |
| 21 | #include "config.h" |
| 22 | #include <string.h> |
| 23 | #include <time.h> |
| 24 | #include "timeline.h" |
| 25 | |
| 26 | /* |
| 27 | ** Generate a hyperlink to a version. |
| 28 | */ |
| 29 | void hyperlink_to_uuid(const char *zUuid){ |
| 30 | if( g.perm.Hyperlink ){ |
| 31 | @ %z(xhref("class='timelineHistLink'","%R/info/%s",zUuid))[%S(zUuid)]</a> |
| 32 | }else{ |
| 33 | @ <span class="timelineHistDsp">[%S(zUuid)]</span> |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | /* |
| 38 | ** Generate a hyperlink to a date & time. |
| @@ -1220,11 +1198,11 @@ | |
| 1198 | blob_appendf(&desc, "%d ancestors", np); |
| 1199 | db_multi_exec("%s", blob_str(&sql)); |
| 1200 | } |
| 1201 | if( d_rid==0 && useDividers ) timeline_add_dividers(0, p_rid); |
| 1202 | } |
| 1203 | blob_appendf(&desc, " of %z[%S]</a>", |
| 1204 | href("%R/info/%s", zUuid), zUuid); |
| 1205 | if( p_rid ){ |
| 1206 | url_add_parameter(&url, "p", zUuid); |
| 1207 | } |
| 1208 | if( d_rid ){ |
| @@ -1261,11 +1239,11 @@ | |
| 1239 | blob_appendf(&sql, " AND event.objid IN ok"); |
| 1240 | db_multi_exec("%s", blob_str(&sql)); |
| 1241 | if( useDividers ) timeline_add_dividers(0, f_rid); |
| 1242 | blob_appendf(&desc, "Parents and children of check-in "); |
| 1243 | zUuid = db_text("", "SELECT uuid FROM blob WHERE rid=%d", f_rid); |
| 1244 | blob_appendf(&desc, "%z[%S]</a>", href("%R/info/%s", zUuid), zUuid); |
| 1245 | tmFlags |= TIMELINE_DISJOINT; |
| 1246 | url_add_parameter(&url, "f", zUuid); |
| 1247 | if( tmFlags & TIMELINE_FCHANGES ){ |
| 1248 | timeline_submenu(&url, "Hide Files", "v", 0, 0); |
| 1249 | }else{ |
| @@ -1587,11 +1565,10 @@ | |
| 1565 | int nChild = db_column_int(q, 4); |
| 1566 | int nParent = db_column_int(q, 5); |
| 1567 | char *zFree = 0; |
| 1568 | int n = 0; |
| 1569 | char zPrefix[80]; |
| 1570 | |
| 1571 | if( nAbsLimit!=0 ){ |
| 1572 | if( nLimit<0 && nLine>=nAbsLimit ){ |
| 1573 | fossil_print("--- line limit (%d) reached ---\n", nAbsLimit); |
| 1574 | break; /* line count limit hit, stop. */ |
| @@ -1598,11 +1575,10 @@ | |
| 1575 | }else if( nEntry>=nAbsLimit ){ |
| 1576 | fossil_print("--- entry limit (%d) reached ---\n", nAbsLimit); |
| 1577 | break; /* entry count limit hit, stop. */ |
| 1578 | } |
| 1579 | } |
| 1580 | if( fossil_strnicmp(zDate, zPrevDate, 10) ){ |
| 1581 | fossil_print("=== %.10s ===\n", zDate); |
| 1582 | memcpy(zPrevDate, zDate, 10); |
| 1583 | nLine++; /* record another line */ |
| 1584 | } |
| @@ -1625,13 +1601,13 @@ | |
| 1601 | } |
| 1602 | if( fossil_strcmp(zCurrentUuid,zId)==0 ){ |
| 1603 | sqlite3_snprintf(sizeof(zPrefix)-n, &zPrefix[n], "*CURRENT* "); |
| 1604 | n += strlen(zPrefix); |
| 1605 | } |
| 1606 | zFree = mprintf("[%S] %s%s", zId, zPrefix, zCom); |
| 1607 | nLine += comment_print(zFree, 9, width); /* record another X lines */ |
| 1608 | fossil_free(zFree); |
| 1609 | |
| 1610 | if(verboseFlag){ |
| 1611 | if( !fchngQueryInit ){ |
| 1612 | db_prepare(&fchngQuery, |
| 1613 | "SELECT (pid==0) AS isnew," |
| 1614 |