Fossil SCM
Limit the complexiting of the diff display on check-in information pages.
Commit
4f95ea8c56718447fc29f7566048b1c27edb6b8d
Parent
d2e07756d9ecc50…
2 files changed
+28
-1
+3
-61
+28
-1
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -39,10 +39,11 @@ | ||
| 39 | 39 | #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */ |
| 40 | 40 | #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */ |
| 41 | 41 | #define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */ |
| 42 | 42 | #define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */ |
| 43 | 43 | #define DIFF_CONTEXT_EX (((u64)0x04)<<32) /* Use context even if zero */ |
| 44 | +#define DIFF_NOTTOOBIG (((u64)0x08)<<32) /* Only display if not too big */ | |
| 44 | 45 | |
| 45 | 46 | /* |
| 46 | 47 | ** These error messages are shared in multiple locations. They are defined |
| 47 | 48 | ** here for consistency. |
| 48 | 49 | */ |
| @@ -50,10 +51,16 @@ | ||
| 50 | 51 | "cannot compute difference between binary files\n" |
| 51 | 52 | |
| 52 | 53 | #define DIFF_CANNOT_COMPUTE_SYMLINK \ |
| 53 | 54 | "cannot compute difference between symlink and regular file\n" |
| 54 | 55 | |
| 56 | +#define DIFF_TOO_MANY_CHANGES_TXT \ | |
| 57 | + "more than 10,000 changes\n" | |
| 58 | + | |
| 59 | +#define DIFF_TOO_MANY_CHANGES_HTML \ | |
| 60 | + "<p class='generalError'>More than 10,000 changes</p>\n" | |
| 61 | + | |
| 55 | 62 | #define looks_like_binary(blob) (looks_like_utf8((blob)) == 0) |
| 56 | 63 | #endif /* INTERFACE */ |
| 57 | 64 | |
| 58 | 65 | /* |
| 59 | 66 | ** Maximum length of a line in a text file, in bytes. (2**13 = 8192 bytes) |
| @@ -1904,10 +1911,11 @@ | ||
| 1904 | 1911 | ReCompiled *pRe, /* Only output changes where this Regexp matches */ |
| 1905 | 1912 | u64 diffFlags /* DIFF_* flags defined above */ |
| 1906 | 1913 | ){ |
| 1907 | 1914 | int ignoreEolWs; /* Ignore whitespace at the end of lines */ |
| 1908 | 1915 | DContext c; |
| 1916 | + int i, nChng; | |
| 1909 | 1917 | |
| 1910 | 1918 | if( diffFlags & DIFF_INVERT ){ |
| 1911 | 1919 | Blob *pTemp = pA_Blob; |
| 1912 | 1920 | pA_Blob = pB_Blob; |
| 1913 | 1921 | pB_Blob = pTemp; |
| @@ -1929,11 +1937,30 @@ | ||
| 1929 | 1937 | return 0; |
| 1930 | 1938 | } |
| 1931 | 1939 | |
| 1932 | 1940 | /* Compute the difference */ |
| 1933 | 1941 | diff_all(&c); |
| 1934 | - if( (diffFlags & DIFF_NOOPT)==0 ) diff_optimize(&c); | |
| 1942 | + if( (diffFlags & DIFF_NOTTOOBIG)!=0 ){ | |
| 1943 | + int i, m, n; | |
| 1944 | + int *a = c.aEdit; | |
| 1945 | + int mx = c.nEdit; | |
| 1946 | + for(i=m=n=0; i<mx; i+=3){ m += a[i]; n += a[i+1]+a[i+2]; } | |
| 1947 | + if( n>10000 ){ | |
| 1948 | + fossil_free(c.aFrom); | |
| 1949 | + fossil_free(c.aTo); | |
| 1950 | + fossil_free(c.aEdit); | |
| 1951 | + if( diffFlags & DIFF_HTML ){ | |
| 1952 | + blob_append(pOut, DIFF_TOO_MANY_CHANGES_HTML, -1); | |
| 1953 | + }else{ | |
| 1954 | + blob_append(pOut, DIFF_TOO_MANY_CHANGES_TXT, -1); | |
| 1955 | + } | |
| 1956 | + return 0; | |
| 1957 | + } | |
| 1958 | + } | |
| 1959 | + if( (diffFlags & DIFF_NOOPT)==0 ){ | |
| 1960 | + diff_optimize(&c); | |
| 1961 | + } | |
| 1935 | 1962 | |
| 1936 | 1963 | if( pOut ){ |
| 1937 | 1964 | /* Compute a context or side-by-side diff into pOut */ |
| 1938 | 1965 | if( diffFlags & DIFF_SIDEBYSIDE ){ |
| 1939 | 1966 | sbsDiff(&c, pOut, pRe, diffFlags); |
| 1940 | 1967 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -39,10 +39,11 @@ | |
| 39 | #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */ |
| 40 | #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */ |
| 41 | #define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */ |
| 42 | #define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */ |
| 43 | #define DIFF_CONTEXT_EX (((u64)0x04)<<32) /* Use context even if zero */ |
| 44 | |
| 45 | /* |
| 46 | ** These error messages are shared in multiple locations. They are defined |
| 47 | ** here for consistency. |
| 48 | */ |
| @@ -50,10 +51,16 @@ | |
| 50 | "cannot compute difference between binary files\n" |
| 51 | |
| 52 | #define DIFF_CANNOT_COMPUTE_SYMLINK \ |
| 53 | "cannot compute difference between symlink and regular file\n" |
| 54 | |
| 55 | #define looks_like_binary(blob) (looks_like_utf8((blob)) == 0) |
| 56 | #endif /* INTERFACE */ |
| 57 | |
| 58 | /* |
| 59 | ** Maximum length of a line in a text file, in bytes. (2**13 = 8192 bytes) |
| @@ -1904,10 +1911,11 @@ | |
| 1904 | ReCompiled *pRe, /* Only output changes where this Regexp matches */ |
| 1905 | u64 diffFlags /* DIFF_* flags defined above */ |
| 1906 | ){ |
| 1907 | int ignoreEolWs; /* Ignore whitespace at the end of lines */ |
| 1908 | DContext c; |
| 1909 | |
| 1910 | if( diffFlags & DIFF_INVERT ){ |
| 1911 | Blob *pTemp = pA_Blob; |
| 1912 | pA_Blob = pB_Blob; |
| 1913 | pB_Blob = pTemp; |
| @@ -1929,11 +1937,30 @@ | |
| 1929 | return 0; |
| 1930 | } |
| 1931 | |
| 1932 | /* Compute the difference */ |
| 1933 | diff_all(&c); |
| 1934 | if( (diffFlags & DIFF_NOOPT)==0 ) diff_optimize(&c); |
| 1935 | |
| 1936 | if( pOut ){ |
| 1937 | /* Compute a context or side-by-side diff into pOut */ |
| 1938 | if( diffFlags & DIFF_SIDEBYSIDE ){ |
| 1939 | sbsDiff(&c, pOut, pRe, diffFlags); |
| 1940 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -39,10 +39,11 @@ | |
| 39 | #define DIFF_LINENO ((u64)0x20000000) /* Show line numbers */ |
| 40 | #define DIFF_WS_WARNING ((u64)0x40000000) /* Warn about whitespace */ |
| 41 | #define DIFF_NOOPT (((u64)0x01)<<32) /* Suppress optimizations (debug) */ |
| 42 | #define DIFF_INVERT (((u64)0x02)<<32) /* Invert the diff (debug) */ |
| 43 | #define DIFF_CONTEXT_EX (((u64)0x04)<<32) /* Use context even if zero */ |
| 44 | #define DIFF_NOTTOOBIG (((u64)0x08)<<32) /* Only display if not too big */ |
| 45 | |
| 46 | /* |
| 47 | ** These error messages are shared in multiple locations. They are defined |
| 48 | ** here for consistency. |
| 49 | */ |
| @@ -50,10 +51,16 @@ | |
| 51 | "cannot compute difference between binary files\n" |
| 52 | |
| 53 | #define DIFF_CANNOT_COMPUTE_SYMLINK \ |
| 54 | "cannot compute difference between symlink and regular file\n" |
| 55 | |
| 56 | #define DIFF_TOO_MANY_CHANGES_TXT \ |
| 57 | "more than 10,000 changes\n" |
| 58 | |
| 59 | #define DIFF_TOO_MANY_CHANGES_HTML \ |
| 60 | "<p class='generalError'>More than 10,000 changes</p>\n" |
| 61 | |
| 62 | #define looks_like_binary(blob) (looks_like_utf8((blob)) == 0) |
| 63 | #endif /* INTERFACE */ |
| 64 | |
| 65 | /* |
| 66 | ** Maximum length of a line in a text file, in bytes. (2**13 = 8192 bytes) |
| @@ -1904,10 +1911,11 @@ | |
| 1911 | ReCompiled *pRe, /* Only output changes where this Regexp matches */ |
| 1912 | u64 diffFlags /* DIFF_* flags defined above */ |
| 1913 | ){ |
| 1914 | int ignoreEolWs; /* Ignore whitespace at the end of lines */ |
| 1915 | DContext c; |
| 1916 | int i, nChng; |
| 1917 | |
| 1918 | if( diffFlags & DIFF_INVERT ){ |
| 1919 | Blob *pTemp = pA_Blob; |
| 1920 | pA_Blob = pB_Blob; |
| 1921 | pB_Blob = pTemp; |
| @@ -1929,11 +1937,30 @@ | |
| 1937 | return 0; |
| 1938 | } |
| 1939 | |
| 1940 | /* Compute the difference */ |
| 1941 | diff_all(&c); |
| 1942 | if( (diffFlags & DIFF_NOTTOOBIG)!=0 ){ |
| 1943 | int i, m, n; |
| 1944 | int *a = c.aEdit; |
| 1945 | int mx = c.nEdit; |
| 1946 | for(i=m=n=0; i<mx; i+=3){ m += a[i]; n += a[i+1]+a[i+2]; } |
| 1947 | if( n>10000 ){ |
| 1948 | fossil_free(c.aFrom); |
| 1949 | fossil_free(c.aTo); |
| 1950 | fossil_free(c.aEdit); |
| 1951 | if( diffFlags & DIFF_HTML ){ |
| 1952 | blob_append(pOut, DIFF_TOO_MANY_CHANGES_HTML, -1); |
| 1953 | }else{ |
| 1954 | blob_append(pOut, DIFF_TOO_MANY_CHANGES_TXT, -1); |
| 1955 | } |
| 1956 | return 0; |
| 1957 | } |
| 1958 | } |
| 1959 | if( (diffFlags & DIFF_NOOPT)==0 ){ |
| 1960 | diff_optimize(&c); |
| 1961 | } |
| 1962 | |
| 1963 | if( pOut ){ |
| 1964 | /* Compute a context or side-by-side diff into pOut */ |
| 1965 | if( diffFlags & DIFF_SIDEBYSIDE ){ |
| 1966 | sbsDiff(&c, pOut, pRe, diffFlags); |
| 1967 |
+3
-61
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -314,16 +314,17 @@ | ||
| 314 | 314 | }else{ |
| 315 | 315 | blob_zero(&to); |
| 316 | 316 | } |
| 317 | 317 | blob_zero(&out); |
| 318 | 318 | if( diffFlags & DIFF_SIDEBYSIDE ){ |
| 319 | - text_diff(&from, &to, &out, pRe, diffFlags | DIFF_HTML); | |
| 319 | + text_diff(&from, &to, &out, pRe, diffFlags | DIFF_HTML | DIFF_NOTTOOBIG); | |
| 320 | 320 | @ <div class="sbsdiff"> |
| 321 | 321 | @ %s(blob_str(&out)) |
| 322 | 322 | @ </div> |
| 323 | 323 | }else{ |
| 324 | - text_diff(&from, &to, &out, pRe, diffFlags | DIFF_LINENO | DIFF_HTML); | |
| 324 | + text_diff(&from, &to, &out, pRe, | |
| 325 | + diffFlags | DIFF_LINENO | DIFF_HTML | DIFF_NOTTOOBIG); | |
| 325 | 326 | @ <div class="udiff"> |
| 326 | 327 | @ %s(blob_str(&out)) |
| 327 | 328 | @ </div> |
| 328 | 329 | } |
| 329 | 330 | blob_reset(&from); |
| @@ -491,15 +492,10 @@ | ||
| 491 | 492 | char *zEUser, *zEComment; |
| 492 | 493 | const char *zUser; |
| 493 | 494 | const char *zComment; |
| 494 | 495 | const char *zDate; |
| 495 | 496 | const char *zOrigDate; |
| 496 | -#if 0 | |
| 497 | - char *zThisBranch; | |
| 498 | - double thisMtime; | |
| 499 | - int seenDiffTitle = 0; | |
| 500 | -#endif | |
| 501 | 497 | |
| 502 | 498 | style_header(zTitle); |
| 503 | 499 | login_anonymous_available(); |
| 504 | 500 | free(zTitle); |
| 505 | 501 | zEUser = db_text(0, |
| @@ -510,13 +506,10 @@ | ||
| 510 | 506 | TAG_COMMENT, rid); |
| 511 | 507 | zUser = db_column_text(&q, 2); |
| 512 | 508 | zComment = db_column_text(&q, 3); |
| 513 | 509 | zDate = db_column_text(&q,1); |
| 514 | 510 | zOrigDate = db_column_text(&q, 4); |
| 515 | -#if 0 | |
| 516 | - thisMtime = db_column_double(&q, 5); | |
| 517 | -#endif | |
| 518 | 511 | @ <div class="section">Overview</div> |
| 519 | 512 | @ <table class="label-value"> |
| 520 | 513 | @ <tr><th>SHA1 Hash:</th><td>%s(zUuid) |
| 521 | 514 | if( g.perm.Setup ){ |
| 522 | 515 | @ (Record ID: %d(rid)) |
| @@ -581,61 +574,10 @@ | ||
| 581 | 574 | const char *zTagName = db_column_text(&q, 0); |
| 582 | 575 | @ | %z(href("%R/timeline?r=%T",zTagName))%h(zTagName)</a> |
| 583 | 576 | } |
| 584 | 577 | db_finalize(&q); |
| 585 | 578 | |
| 586 | -#if 0 | |
| 587 | - /* Select a few other branches to diff against */ | |
| 588 | - zThisBranch = db_text("trunk", "SELECT value FROM tagxref" | |
| 589 | - " WHERE tagid=%d AND tagtype>0" | |
| 590 | - " AND rid=%d", | |
| 591 | - TAG_BRANCH, rid); | |
| 592 | - | |
| 593 | - /* Find nearby leaves to offer to diff against */ | |
| 594 | - db_prepare(&q, | |
| 595 | - "SELECT tagxref.value, blob.uuid, min(%.17g-event.mtime)" | |
| 596 | - " FROM leaf, event, tagxref, blob" | |
| 597 | - " WHERE event.mtime BETWEEN %.17g AND %.17g" | |
| 598 | - " AND event.type='ci'" | |
| 599 | - " AND event.objid=leaf.rid" | |
| 600 | - " AND NOT %z" | |
| 601 | - " AND tagxref.rid=event.objid" | |
| 602 | - " AND tagxref.tagid=%d AND tagxref.tagtype>0" | |
| 603 | - " AND tagxref.value!=%Q" | |
| 604 | - " AND blob.rid=tagxref.rid" | |
| 605 | - " GROUP BY 1 ORDER BY 3", | |
| 606 | - thisMtime, thisMtime-7, thisMtime+7, | |
| 607 | - leaf_is_closed_sql("leaf.rid"), | |
| 608 | - TAG_BRANCH, zThisBranch | |
| 609 | - ); | |
| 610 | - while( db_step(&q)==SQLITE_ROW ){ | |
| 611 | - const char *zBr = db_column_text(&q, 0); | |
| 612 | - const char *zId = db_column_text(&q, 1); | |
| 613 | - if( !seenDiffTitle ){ | |
| 614 | - @ <tr><th valign="top">Diffs:</th><td valign="top"> | |
| 615 | - seenDiffTitle = 1; | |
| 616 | - }else{ | |
| 617 | - @ | | |
| 618 | - } | |
| 619 | - @ %z(href("%R/vdiff?from=%S&to=%S",zId, zUuid))%h(zBr)</a> | |
| 620 | - } | |
| 621 | - db_finalize(&q); | |
| 622 | - | |
| 623 | - if( fossil_strcmp(zThisBranch,"trunk")!=0 ){ | |
| 624 | - if( !seenDiffTitle ){ | |
| 625 | - @ <tr><th valign="top">Diffs:</th><td valign="top"> | |
| 626 | - seenDiffTitle = 1; | |
| 627 | - }else{ | |
| 628 | - @ | | |
| 629 | - } | |
| 630 | - @ %z(href("%R/vdiff?from=root:%S&to=%S",zUuid,zUuid))root of | |
| 631 | - @ this branch</a> | |
| 632 | - } | |
| 633 | - if( seenDiffTitle ){ | |
| 634 | - @ </td></tr> | |
| 635 | - } | |
| 636 | -#endif | |
| 637 | 579 | |
| 638 | 580 | /* The Download: line */ |
| 639 | 581 | if( g.perm.Zip ){ |
| 640 | 582 | char *zUrl = mprintf("%R/tarball/%t-%S.tar.gz?uuid=%s", |
| 641 | 583 | zProjName, zUuid, zUuid); |
| 642 | 584 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -314,16 +314,17 @@ | |
| 314 | }else{ |
| 315 | blob_zero(&to); |
| 316 | } |
| 317 | blob_zero(&out); |
| 318 | if( diffFlags & DIFF_SIDEBYSIDE ){ |
| 319 | text_diff(&from, &to, &out, pRe, diffFlags | DIFF_HTML); |
| 320 | @ <div class="sbsdiff"> |
| 321 | @ %s(blob_str(&out)) |
| 322 | @ </div> |
| 323 | }else{ |
| 324 | text_diff(&from, &to, &out, pRe, diffFlags | DIFF_LINENO | DIFF_HTML); |
| 325 | @ <div class="udiff"> |
| 326 | @ %s(blob_str(&out)) |
| 327 | @ </div> |
| 328 | } |
| 329 | blob_reset(&from); |
| @@ -491,15 +492,10 @@ | |
| 491 | char *zEUser, *zEComment; |
| 492 | const char *zUser; |
| 493 | const char *zComment; |
| 494 | const char *zDate; |
| 495 | const char *zOrigDate; |
| 496 | #if 0 |
| 497 | char *zThisBranch; |
| 498 | double thisMtime; |
| 499 | int seenDiffTitle = 0; |
| 500 | #endif |
| 501 | |
| 502 | style_header(zTitle); |
| 503 | login_anonymous_available(); |
| 504 | free(zTitle); |
| 505 | zEUser = db_text(0, |
| @@ -510,13 +506,10 @@ | |
| 510 | TAG_COMMENT, rid); |
| 511 | zUser = db_column_text(&q, 2); |
| 512 | zComment = db_column_text(&q, 3); |
| 513 | zDate = db_column_text(&q,1); |
| 514 | zOrigDate = db_column_text(&q, 4); |
| 515 | #if 0 |
| 516 | thisMtime = db_column_double(&q, 5); |
| 517 | #endif |
| 518 | @ <div class="section">Overview</div> |
| 519 | @ <table class="label-value"> |
| 520 | @ <tr><th>SHA1 Hash:</th><td>%s(zUuid) |
| 521 | if( g.perm.Setup ){ |
| 522 | @ (Record ID: %d(rid)) |
| @@ -581,61 +574,10 @@ | |
| 581 | const char *zTagName = db_column_text(&q, 0); |
| 582 | @ | %z(href("%R/timeline?r=%T",zTagName))%h(zTagName)</a> |
| 583 | } |
| 584 | db_finalize(&q); |
| 585 | |
| 586 | #if 0 |
| 587 | /* Select a few other branches to diff against */ |
| 588 | zThisBranch = db_text("trunk", "SELECT value FROM tagxref" |
| 589 | " WHERE tagid=%d AND tagtype>0" |
| 590 | " AND rid=%d", |
| 591 | TAG_BRANCH, rid); |
| 592 | |
| 593 | /* Find nearby leaves to offer to diff against */ |
| 594 | db_prepare(&q, |
| 595 | "SELECT tagxref.value, blob.uuid, min(%.17g-event.mtime)" |
| 596 | " FROM leaf, event, tagxref, blob" |
| 597 | " WHERE event.mtime BETWEEN %.17g AND %.17g" |
| 598 | " AND event.type='ci'" |
| 599 | " AND event.objid=leaf.rid" |
| 600 | " AND NOT %z" |
| 601 | " AND tagxref.rid=event.objid" |
| 602 | " AND tagxref.tagid=%d AND tagxref.tagtype>0" |
| 603 | " AND tagxref.value!=%Q" |
| 604 | " AND blob.rid=tagxref.rid" |
| 605 | " GROUP BY 1 ORDER BY 3", |
| 606 | thisMtime, thisMtime-7, thisMtime+7, |
| 607 | leaf_is_closed_sql("leaf.rid"), |
| 608 | TAG_BRANCH, zThisBranch |
| 609 | ); |
| 610 | while( db_step(&q)==SQLITE_ROW ){ |
| 611 | const char *zBr = db_column_text(&q, 0); |
| 612 | const char *zId = db_column_text(&q, 1); |
| 613 | if( !seenDiffTitle ){ |
| 614 | @ <tr><th valign="top">Diffs:</th><td valign="top"> |
| 615 | seenDiffTitle = 1; |
| 616 | }else{ |
| 617 | @ | |
| 618 | } |
| 619 | @ %z(href("%R/vdiff?from=%S&to=%S",zId, zUuid))%h(zBr)</a> |
| 620 | } |
| 621 | db_finalize(&q); |
| 622 | |
| 623 | if( fossil_strcmp(zThisBranch,"trunk")!=0 ){ |
| 624 | if( !seenDiffTitle ){ |
| 625 | @ <tr><th valign="top">Diffs:</th><td valign="top"> |
| 626 | seenDiffTitle = 1; |
| 627 | }else{ |
| 628 | @ | |
| 629 | } |
| 630 | @ %z(href("%R/vdiff?from=root:%S&to=%S",zUuid,zUuid))root of |
| 631 | @ this branch</a> |
| 632 | } |
| 633 | if( seenDiffTitle ){ |
| 634 | @ </td></tr> |
| 635 | } |
| 636 | #endif |
| 637 | |
| 638 | /* The Download: line */ |
| 639 | if( g.perm.Zip ){ |
| 640 | char *zUrl = mprintf("%R/tarball/%t-%S.tar.gz?uuid=%s", |
| 641 | zProjName, zUuid, zUuid); |
| 642 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -314,16 +314,17 @@ | |
| 314 | }else{ |
| 315 | blob_zero(&to); |
| 316 | } |
| 317 | blob_zero(&out); |
| 318 | if( diffFlags & DIFF_SIDEBYSIDE ){ |
| 319 | text_diff(&from, &to, &out, pRe, diffFlags | DIFF_HTML | DIFF_NOTTOOBIG); |
| 320 | @ <div class="sbsdiff"> |
| 321 | @ %s(blob_str(&out)) |
| 322 | @ </div> |
| 323 | }else{ |
| 324 | text_diff(&from, &to, &out, pRe, |
| 325 | diffFlags | DIFF_LINENO | DIFF_HTML | DIFF_NOTTOOBIG); |
| 326 | @ <div class="udiff"> |
| 327 | @ %s(blob_str(&out)) |
| 328 | @ </div> |
| 329 | } |
| 330 | blob_reset(&from); |
| @@ -491,15 +492,10 @@ | |
| 492 | char *zEUser, *zEComment; |
| 493 | const char *zUser; |
| 494 | const char *zComment; |
| 495 | const char *zDate; |
| 496 | const char *zOrigDate; |
| 497 | |
| 498 | style_header(zTitle); |
| 499 | login_anonymous_available(); |
| 500 | free(zTitle); |
| 501 | zEUser = db_text(0, |
| @@ -510,13 +506,10 @@ | |
| 506 | TAG_COMMENT, rid); |
| 507 | zUser = db_column_text(&q, 2); |
| 508 | zComment = db_column_text(&q, 3); |
| 509 | zDate = db_column_text(&q,1); |
| 510 | zOrigDate = db_column_text(&q, 4); |
| 511 | @ <div class="section">Overview</div> |
| 512 | @ <table class="label-value"> |
| 513 | @ <tr><th>SHA1 Hash:</th><td>%s(zUuid) |
| 514 | if( g.perm.Setup ){ |
| 515 | @ (Record ID: %d(rid)) |
| @@ -581,61 +574,10 @@ | |
| 574 | const char *zTagName = db_column_text(&q, 0); |
| 575 | @ | %z(href("%R/timeline?r=%T",zTagName))%h(zTagName)</a> |
| 576 | } |
| 577 | db_finalize(&q); |
| 578 | |
| 579 | |
| 580 | /* The Download: line */ |
| 581 | if( g.perm.Zip ){ |
| 582 | char *zUrl = mprintf("%R/tarball/%t-%S.tar.gz?uuid=%s", |
| 583 | zProjName, zUuid, zUuid); |
| 584 |