Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Merge trunk |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | sync-forkwarn |
| Files: | files | file ages | folders |
| SHA1: |
9f507ffe494859c604109f735f4962ec |
| User & Date: | jan.nijtmans 2015-05-20 11:45:38.869 |
Context
|
2015-05-30
| ||
| 08:53 | merge trunk Leaf check-in: 7699d14104 user: jan.nijtmans tags: sync-forkwarn | |
|
2015-05-20
| ||
| 11:45 | Merge trunk check-in: 9f507ffe49 user: jan.nijtmans tags: sync-forkwarn | |
|
2015-05-19
| ||
| 19:22 | Revert [48499514cc], changing nUsed to zero is not redundant as blob_append() changes it to one. check-in: 4742716fc1 user: mistachkin tags: trunk | |
|
2015-05-07
| ||
| 19:28 | merge trunk check-in: c1416fd133 user: jan.nijtmans tags: sync-forkwarn | |
Changes
Changes to VERSION.
|
| | | 1 | 1.33 |
Changes to auto.def.
| ︙ | ︙ | |||
297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
if {![cc-check-functions getpassphrase]} {
# Haiku needs this
cc-check-function-in-lib getpass bsd
}
cc-check-function-in-lib dlopen dl
# Check for the FuseFS library
if {[opt-bool fusefs]} {
if {[cc-check-function-in-lib fuse_mount fuse]} {
define FOSSIL_HAVE_FUSEFS 1
define-append LIBS -lfuse
msg-result "FuseFS support enabled"
| > | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
# Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars
if {![cc-check-functions getpassphrase]} {
# Haiku needs this
cc-check-function-in-lib getpass bsd
}
cc-check-function-in-lib dlopen dl
cc-check-function-in-lib sin m
# Check for the FuseFS library
if {[opt-bool fusefs]} {
if {[cc-check-function-in-lib fuse_mount fuse]} {
define FOSSIL_HAVE_FUSEFS 1
define-append LIBS -lfuse
msg-result "FuseFS support enabled"
|
| ︙ | ︙ |
Changes to skins/default/details.txt.
1 | timeline-arrowheads: 1 | | | | 1 2 3 4 | timeline-arrowheads: 1 timeline-circle-nodes: 1 timeline-color-graph-lines: 1 white-foreground: 0 |
Changes to skins/eagle/css.txt.
| ︙ | ︙ | |||
166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
font-family: "courier new";
border-collapse: collapse;
}
tr.timelineSelected {
background-color: #7EA2D9;
}
/* Side-by-side diff */
table.sbsdiff {
background-color: #485D7B;
font-family: fixed, Dejavu Sans Mono, Monaco, Lucida Console, monospace;
font-size: 8pt;
border-collapse:collapse;
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
font-family: "courier new";
border-collapse: collapse;
}
tr.timelineSelected {
background-color: #7EA2D9;
}
/* commit node */
.tl-node {
width: 10px;
height: 10px;
border: 1px solid #fff;
background: #485D7B;
cursor: pointer;
}
/* leaf commit marker */
.tl-node.leaf:after {
content: '';
position: absolute;
top: 3px;
left: 3px;
width: 4px;
height: 4px;
background: #fff;
}
/* up arrow */
.tl-arrow.u {
margin-top: -1px;
border-width: 0 3px;
border-bottom: 7px solid #fff;
}
/* small up arrow */
.tl-arrow.u.sm {
border-bottom: 5px solid #fff;
}
/* line */
.tl-line {
background: #fff;
width: 2px;
}
/* left merge arrow */
.tl-arrow.merge.l {
border-right: 3px solid #fff;
}
/* right merge arrow */
.tl-arrow.merge.r {
border-left: 3px solid #fff;
}
/* Side-by-side diff */
table.sbsdiff {
background-color: #485D7B;
font-family: fixed, Dejavu Sans Mono, Monaco, Lucida Console, monospace;
font-size: 8pt;
border-collapse:collapse;
|
| ︙ | ︙ | |||
262 263 264 265 266 267 268 |
}
/* line numbers in a diff */
span.diffln {
color: white;
}
| < < < < | 310 311 312 313 314 315 316 317 318 319 320 321 322 323 |
}
/* line numbers in a diff */
span.diffln {
color: white;
}
.fileage tr:hover {
background-color: #7EA2D9;
}
.fileage td {
font-family: "courier new";
}
|
| ︙ | ︙ |
Changes to skins/xekri/css.txt.
| ︙ | ︙ | |||
200 201 202 203 204 205 206 207 208 209 210 211 212 213 |
padding-bottom: 1rem;
padding-top: 0.5rem;
}
div.content table[bgcolor="white"] {
color: #000;
}
/**************************************
* Main Area: Footer
*/
div.footer {
color: #ee0;
| > > > > > > > | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
padding-bottom: 1rem;
padding-top: 0.5rem;
}
div.content table[bgcolor="white"] {
color: #000;
}
.piechartLabel {
fill: white;
}
.piechartLine {
stroke: white;
}
/**************************************
* Main Area: Footer
*/
div.footer {
color: #ee0;
|
| ︙ | ︙ | |||
698 699 700 701 702 703 704 | } /************************************** * Timeline */ | < < < < < | 705 706 707 708 709 710 711 712 713 714 715 716 717 718 |
}
/**************************************
* Timeline
*/
div.divider {
color: #ee0;
font-size: 1.2rem;
font-weight: bold;
margin-top: 1rem;
white-space: nowrap;
}
|
| ︙ | ︙ | |||
1025 1026 1027 1028 1029 1030 1031 |
tr.row0 {
/* use default */
}
/* odd table row color */
tr.row1 {
/* Use default */
}
| < | 1027 1028 1029 1030 1031 1032 1033 |
tr.row0 {
/* use default */
}
/* odd table row color */
tr.row1 {
/* Use default */
}
|
Changes to skins/xekri/header.txt.
| ︙ | ︙ | |||
125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
}
if {[anoncap r]} {
menulink /ticket Tickets
}
if {[anoncap j]} {
menulink /wiki Wiki
}
if {[hascap s]} {
menulink /setup Admin
} elseif {[hascap a]} {
menulink /setup_ulist Users
}
if {[info exists login]} {
menulink /login Logout
| > | 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
}
if {[anoncap r]} {
menulink /ticket Tickets
}
if {[anoncap j]} {
menulink /wiki Wiki
}
menulink /sitemap More...
if {[hascap s]} {
menulink /setup Admin
} elseif {[hascap a]} {
menulink /setup_ulist Users
}
if {[info exists login]} {
menulink /login Logout
|
| ︙ | ︙ |
Changes to src/add.c.
| ︙ | ︙ | |||
315 316 317 318 319 320 321 |
file_canonical_name(g.argv[i], &fullName, 0);
zName = blob_str(&fullName);
isDir = file_wd_isdir(zName);
if( isDir==1 ){
vfile_scan(&fullName, nRoot-1, scanFlags, pClean, pIgnore);
}else if( isDir==0 ){
fossil_warning("not found: %s", zName);
| < < | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
file_canonical_name(g.argv[i], &fullName, 0);
zName = blob_str(&fullName);
isDir = file_wd_isdir(zName);
if( isDir==1 ){
vfile_scan(&fullName, nRoot-1, scanFlags, pClean, pIgnore);
}else if( isDir==0 ){
fossil_warning("not found: %s", zName);
}else{
char *zTreeName = &zName[nRoot];
if( !forceFlag && glob_match(pIgnore, zTreeName) ){
Blob ans;
char cReply;
char *prompt = mprintf("file \"%s\" matches \"ignore-glob\". "
"Add it (a=all/y/N)? ", zTreeName);
|
| ︙ | ︙ | |||
630 631 632 633 634 635 636 637 638 639 640 641 642 643 |
if( !dryRunFlag ){
dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
}
/* We should be done with options.. */
verify_all_options();
db_must_be_within_tree();
if( zCleanFlag==0 ){
zCleanFlag = db_get("clean-glob", 0);
}
if( zIgnoreFlag==0 ){
zIgnoreFlag = db_get("ignore-glob", 0);
}
| > > > > > > > > | 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 |
if( !dryRunFlag ){
dryRunFlag = find_option("test",0,0)!=0; /* deprecated */
}
/* We should be done with options.. */
verify_all_options();
/* Fail if unprocessed arguments are present, in case user expect the
** addremove command to accept a list of file or directory.
*/
if( g.argc>2 ){
fossil_fatal(
"%s: Can only work on the entire checkout, no arguments supported.",
g.argv[1]);
}
db_must_be_within_tree();
if( zCleanFlag==0 ){
zCleanFlag = db_get("clean-glob", 0);
}
if( zIgnoreFlag==0 ){
zIgnoreFlag = db_get("ignore-glob", 0);
}
|
| ︙ | ︙ |
Changes to src/allrepo.c.
| ︙ | ︙ | |||
229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
}else if( strncmp(zCmd, "pull", n)==0 ){
zCmd = "pull -autourl -R";
collect_argument(&extra, "verbose","v");
}else if( strncmp(zCmd, "rebuild", n)==0 ){
zCmd = "rebuild";
collect_argument(&extra, "cluster",0);
collect_argument(&extra, "compress",0);
collect_argument(&extra, "noverify",0);
collect_argument_value(&extra, "pagesize");
collect_argument(&extra, "vacuum",0);
collect_argument(&extra, "deanalyze",0);
collect_argument(&extra, "analyze",0);
collect_argument(&extra, "wal",0);
collect_argument(&extra, "stats",0);
| > | 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
}else if( strncmp(zCmd, "pull", n)==0 ){
zCmd = "pull -autourl -R";
collect_argument(&extra, "verbose","v");
}else if( strncmp(zCmd, "rebuild", n)==0 ){
zCmd = "rebuild";
collect_argument(&extra, "cluster",0);
collect_argument(&extra, "compress",0);
collect_argument(&extra, "compress-only",0);
collect_argument(&extra, "noverify",0);
collect_argument_value(&extra, "pagesize");
collect_argument(&extra, "vacuum",0);
collect_argument(&extra, "deanalyze",0);
collect_argument(&extra, "analyze",0);
collect_argument(&extra, "wal",0);
collect_argument(&extra, "stats",0);
|
| ︙ | ︙ |
Changes to src/blob.c.
| ︙ | ︙ | |||
298 299 300 301 302 303 304 |
/*
** Return a pointer to a null-terminated string for a blob.
*/
char *blob_str(Blob *p){
blob_is_init(p);
if( p->nUsed==0 ){
| | | 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
/*
** Return a pointer to a null-terminated string for a blob.
*/
char *blob_str(Blob *p){
blob_is_init(p);
if( p->nUsed==0 ){
blob_append(p, "", 1); /* NOTE: Changes nUsed. */
p->nUsed = 0;
}
if( p->aData[p->nUsed]!=0 ){
blob_materialize(p);
}
return p->aData;
}
|
| ︙ | ︙ | |||
837 838 839 840 841 842 843 |
#endif
fwrite(blob_buffer(pBlob), 1, nWrote, stdout);
#if defined(_WIN32)
fflush(stdout);
_setmode(_fileno(stdout), _O_TEXT);
#endif
}else{
| | | 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 |
#endif
fwrite(blob_buffer(pBlob), 1, nWrote, stdout);
#if defined(_WIN32)
fflush(stdout);
_setmode(_fileno(stdout), _O_TEXT);
#endif
}else{
file_mkfolder(zFilename, 1, 0);
out = fossil_fopen(zFilename, "wb");
if( out==0 ){
fossil_fatal_recursive("unable to open file \"%s\" for writing",
zFilename);
return 0;
}
blob_is_init(pBlob);
|
| ︙ | ︙ |
Changes to src/checkin.c.
| ︙ | ︙ | |||
111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
blob_appendf(report, "UPDATED_BY_MERGE %s\n", zDisplayName);
}else if( isChnged==3 ){
blob_appendf(report, "ADDED_BY_MERGE %s\n", zDisplayName);
}else if( isChnged==4 ){
blob_appendf(report, "UPDATED_BY_INTEGRATE %s\n", zDisplayName);
}else if( isChnged==5 ){
blob_appendf(report, "ADDED_BY_INTEGRATE %s\n", zDisplayName);
}else if( file_contains_merge_marker(zFullName) ){
blob_appendf(report, "CONFLICT %s\n", zDisplayName);
}else{
blob_appendf(report, "EDITED %s\n", zDisplayName);
}
}else if( isRenamed ){
blob_appendf(report, "RENAMED %s\n", zDisplayName);
| > > > > > > > > | 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
blob_appendf(report, "UPDATED_BY_MERGE %s\n", zDisplayName);
}else if( isChnged==3 ){
blob_appendf(report, "ADDED_BY_MERGE %s\n", zDisplayName);
}else if( isChnged==4 ){
blob_appendf(report, "UPDATED_BY_INTEGRATE %s\n", zDisplayName);
}else if( isChnged==5 ){
blob_appendf(report, "ADDED_BY_INTEGRATE %s\n", zDisplayName);
}else if( isChnged==6 ){
blob_appendf(report, "EXECUTABLE %s\n", zDisplayName);
}else if( isChnged==7 ){
blob_appendf(report, "SYMLINK %s\n", zDisplayName);
}else if( isChnged==8 ){
blob_appendf(report, "UNEXEC %s\n", zDisplayName);
}else if( isChnged==9 ){
blob_appendf(report, "UNLINK %s\n", zDisplayName);
}else if( file_contains_merge_marker(zFullName) ){
blob_appendf(report, "CONFLICT %s\n", zDisplayName);
}else{
blob_appendf(report, "EDITED %s\n", zDisplayName);
}
}else if( isRenamed ){
blob_appendf(report, "RENAMED %s\n", zDisplayName);
|
| ︙ | ︙ | |||
1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 | int useCksum; /* True if checksums should be computed and verified */ int outputManifest; /* True to output "manifest" and "manifest.uuid" */ int dryRunFlag; /* True for a test run. Debugging only */ CheckinInfo sCiInfo; /* Information about this check-in */ const char *zComFile; /* Read commit message from this file */ int nTag = 0; /* Number of --tag arguments */ const char *zTag; /* A single --tag argument */ Blob manifest; /* Manifest in baseline form */ Blob muuid; /* Manifest uuid */ Blob cksum1, cksum2; /* Before and after commit checksums */ Blob cksum1b; /* Checksum recorded in the manifest */ int szD; /* Size of the delta manifest */ int szB; /* Size of the baseline manifest */ int nConflict = 0; /* Number of unresolved merge conflicts */ | > > | 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 | int useCksum; /* True if checksums should be computed and verified */ int outputManifest; /* True to output "manifest" and "manifest.uuid" */ int dryRunFlag; /* True for a test run. Debugging only */ CheckinInfo sCiInfo; /* Information about this check-in */ const char *zComFile; /* Read commit message from this file */ int nTag = 0; /* Number of --tag arguments */ const char *zTag; /* A single --tag argument */ ManifestFile *pFile; /* File structure in the manifest */ Manifest *pManifest; /* Manifest structure */ Blob manifest; /* Manifest in baseline form */ Blob muuid; /* Manifest uuid */ Blob cksum1, cksum2; /* Before and after commit checksums */ Blob cksum1b; /* Checksum recorded in the manifest */ int szD; /* Size of the delta manifest */ int szB; /* Size of the baseline manifest */ int nConflict = 0; /* Number of unresolved merge conflicts */ |
| ︙ | ︙ | |||
1898 1899 1900 1901 1902 1903 1904 | if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1); /* Step 2: Insert records for all modified files into the blob ** table. If there were arguments passed to this command, only ** the identified files are inserted (if they have been modified). */ db_prepare(&q, | | | < | | | | 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 |
if( useCksum ) vfile_aggregate_checksum_disk(vid, &cksum1);
/* Step 2: Insert records for all modified files into the blob
** table. If there were arguments passed to this command, only
** the identified files are inserted (if they have been modified).
*/
db_prepare(&q,
"SELECT id, %Q || pathname, mrid, %s, %s, %s FROM vfile "
"WHERE chnged==1 AND NOT deleted AND is_selected(id)",
g.zLocalRoot,
glob_expr("pathname", db_get("crnl-glob","")),
glob_expr("pathname", db_get("binary-glob","")),
glob_expr("pathname", db_get("encoding-glob",""))
);
while( db_step(&q)==SQLITE_ROW ){
int id, rid;
const char *zFullname;
Blob content;
int crnlOk, binOk, encodingOk;
id = db_column_int(&q, 0);
zFullname = db_column_text(&q, 1);
rid = db_column_int(&q, 2);
crnlOk = db_column_int(&q, 3);
binOk = db_column_int(&q, 4);
encodingOk = db_column_int(&q, 5);
blob_zero(&content);
if( file_wd_islink(zFullname) ){
/* Instead of file content, put link destination path */
blob_read_link(&content, zFullname);
}else{
blob_read_from_file(&content, zFullname);
}
/* Do not emit any warnings when they are disabled. */
if( !noWarningFlag ){
abortCommit |= commit_warning(&content, crnlOk, binOk,
encodingOk, zFullname);
}
if( contains_merge_marker(&content) ){
Blob fname; /* Relative pathname of the file */
nConflict++;
file_relative_name(zFullname, &fname, 0);
fossil_print("possible unresolved merge conflict in %s\n",
blob_str(&fname));
blob_reset(&fname);
|
| ︙ | ︙ | |||
2069 2070 2071 2072 2073 2074 2075 |
blob_zero(&muuid);
blob_appendf(&muuid, "%s\n", zUuid);
blob_write_to_file(&muuid, zManifestFile);
free(zManifestFile);
blob_reset(&muuid);
}
| < > > > > > > > > > > > > > > > > > > | 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 |
blob_zero(&muuid);
blob_appendf(&muuid, "%s\n", zUuid);
blob_write_to_file(&muuid, zManifestFile);
free(zManifestFile);
blob_reset(&muuid);
}
/* Update the vfile and vmerge tables */
db_multi_exec(
"DELETE FROM vfile WHERE (vid!=%d OR deleted) AND is_selected(id);"
"DELETE FROM vmerge;"
"UPDATE vfile SET vid=%d;"
"UPDATE vfile SET rid=mrid, chnged=0, deleted=0, origname=NULL"
" WHERE is_selected(id);"
, vid, nvid
);
db_lset_int("checkout", nvid);
/* Update the isexe and islink columns of the vfile table */
db_prepare(&q,
"UPDATE vfile SET isexe=:exec, islink=:link"
" WHERE vid=:vid AND pathname=:path AND (isexe!=:exec OR islink!=:link)"
);
db_bind_int(&q, ":vid", nvid);
pManifest = manifest_get(nvid, CFTYPE_MANIFEST, 0);
manifest_file_rewind(pManifest);
while( (pFile = manifest_file_next(pManifest, 0)) ){
db_bind_int(&q, ":exec", pFile->zPerm && strstr(pFile->zPerm, "x"));
db_bind_int(&q, ":link", pFile->zPerm && strstr(pFile->zPerm, "l"));
db_bind_text(&q, ":path", pFile->zName);
db_step(&q);
db_reset(&q);
}
db_finalize(&q);
manifest_destroy(pManifest);
if( useCksum ){
/* Verify that the repository checksum matches the expected checksum
** calculated before the check-in started (and stored as the R record
** of the manifest file).
*/
vfile_aggregate_checksum_repository(nvid, &cksum2);
|
| ︙ | ︙ |
Changes to src/db.c.
| ︙ | ︙ | |||
1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 |
** non-versioned value for this setting. If both a versioned and a
** non-versioned value exist and are not equal, then a warning message
** might be generated.
*/
char *db_get_versioned(const char *zName, char *zNonVersionedSetting){
char *zVersionedSetting = 0;
int noWarn = 0;
struct _cacheEntry {
struct _cacheEntry *next;
const char *zName, *zValue;
} *cacheEntry = 0;
static struct _cacheEntry *cache = 0;
| > | | < > | | > > > > > | > > > > > > > | > > > > > < < | < < < > < > > > > > > | 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 |
** non-versioned value for this setting. If both a versioned and a
** non-versioned value exist and are not equal, then a warning message
** might be generated.
*/
char *db_get_versioned(const char *zName, char *zNonVersionedSetting){
char *zVersionedSetting = 0;
int noWarn = 0;
int found = 0;
struct _cacheEntry {
struct _cacheEntry *next;
const char *zName, *zValue;
} *cacheEntry = 0;
static struct _cacheEntry *cache = 0;
if( !g.localOpen && g.zOpenRevision==0 ) return zNonVersionedSetting;
/* Look up name in cache */
cacheEntry = cache;
while( cacheEntry!=0 ){
if( fossil_strcmp(cacheEntry->zName, zName)==0 ){
zVersionedSetting = fossil_strdup(cacheEntry->zValue);
break;
}
cacheEntry = cacheEntry->next;
}
/* Attempt to read value from file in checkout if there wasn't a cache hit. */
if( cacheEntry==0 ){
Blob versionedPathname;
Blob setting;
blob_zero(&versionedPathname);
blob_zero(&setting);
blob_appendf(&versionedPathname, "%s.fossil-settings/%s",
g.zLocalRoot, zName);
if( !g.localOpen ){
/* Repository is in the process of being opened, but files have not been
* written to disk. Load from the database. */
Blob noWarnFile;
if( historical_version_of_file(g.zOpenRevision,
blob_str(&versionedPathname),
&setting, 0, 0, 0, 2)!=2 ){
found = 1;
}
/* See if there's a no-warn flag */
blob_append(&versionedPathname, ".no-warn", -1);
blob_zero(&noWarnFile);
if( historical_version_of_file(g.zOpenRevision,
blob_str(&versionedPathname),
&noWarnFile, 0, 0, 0, 2)!=2 ){
noWarn = 1;
}
blob_reset(&noWarnFile);
}else if( file_size(blob_str(&versionedPathname))>=0 ){
/* File exists, and contains the value for this setting. Load from
** the file. */
if( blob_read_from_file(&setting, blob_str(&versionedPathname))>=0 ){
found = 1;
}
/* See if there's a no-warn flag */
blob_append(&versionedPathname, ".no-warn", -1);
if( file_size(blob_str(&versionedPathname))>=0 ){
noWarn = 1;
}
}
blob_reset(&versionedPathname);
if( found ){
blob_trim(&setting); /* Avoid non-obvious problems with line endings
** on boolean properties */
zVersionedSetting = fossil_strdup(blob_str(&setting));
}
blob_reset(&setting);
/* Store result in cache, which can be the value or 0 if not found */
cacheEntry = (struct _cacheEntry*)fossil_malloc(sizeof(struct _cacheEntry));
cacheEntry->next = cache;
cacheEntry->zName = zName;
cacheEntry->zValue = fossil_strdup(zVersionedSetting);
cache = cacheEntry;
}
|
| ︙ | ︙ | |||
2196 2197 2198 2199 2200 2201 2202 |
** See also: close
*/
void cmd_open(void){
int emptyFlag;
int keepFlag;
int forceMissingFlag;
int allowNested;
| < < > > > > > > > > > > > > > > > > < < | | < < | | 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 |
** See also: close
*/
void cmd_open(void){
int emptyFlag;
int keepFlag;
int forceMissingFlag;
int allowNested;
static char *azNewArgv[] = { 0, "checkout", "--prompt", 0, 0, 0, 0 };
url_proxy_options();
emptyFlag = find_option("empty",0,0)!=0;
keepFlag = find_option("keep",0,0)!=0;
forceMissingFlag = find_option("force-missing",0,0)!=0;
allowNested = find_option("nested",0,0)!=0;
/* We should be done with options.. */
verify_all_options();
if( g.argc!=3 && g.argc!=4 ){
usage("REPOSITORY-FILENAME ?VERSION?");
}
if( !allowNested && db_open_local(0) ){
fossil_fatal("already within an open tree rooted at %s", g.zLocalRoot);
}
db_open_repository(g.argv[2]);
/* Figure out which revision to open. */
if( !emptyFlag ){
if( g.argc==4 ){
g.zOpenRevision = g.argv[3];
}else if( db_exists("SELECT 1 FROM event WHERE type='ci'") ){
g.zOpenRevision = db_get("main-branch", "trunk");
}
}
if( g.zOpenRevision ){
/* Since the repository is open and we know the revision now,
** refresh the allow-symlinks flag. */
g.allowSymlinks = db_get_boolean("allow-symlinks", 0);
}
#if defined(_WIN32) || defined(__CYGWIN__)
# define LOCALDB_NAME "./_FOSSIL_"
#else
# define LOCALDB_NAME "./.fslckout"
#endif
db_init_database(LOCALDB_NAME, zLocalSchema,
#ifdef FOSSIL_LOCAL_WAL
"COMMIT; PRAGMA journal_mode=WAL; BEGIN;",
#endif
(char*)0);
db_delete_on_failure(LOCALDB_NAME);
db_open_local(0);
db_lset("repository", g.argv[2]);
db_record_repository_filename(g.argv[2]);
db_lset_int("checkout", 0);
azNewArgv[0] = g.argv[0];
g.argv = azNewArgv;
if( !emptyFlag ){
g.argc = 3;
if( g.zOpenRevision ){
azNewArgv[g.argc-1] = g.zOpenRevision;
}else{
azNewArgv[g.argc-1] = "--latest";
}
if( keepFlag ){
azNewArgv[g.argc++] = "--keep";
}
if( forceMissingFlag ){
azNewArgv[g.argc++] = "--force-missing";
}
|
| ︙ | ︙ |
Changes to src/descendants.c.
| ︙ | ︙ | |||
367 368 369 370 371 372 373 |
void leaves_cmd(void){
Stmt q;
Blob sql;
int showAll = find_option("all", "a", 0)!=0;
int showClosed = find_option("closed", "c", 0)!=0;
int recomputeFlag = find_option("recompute",0,0)!=0;
int showForks = g.argv[1][0]!='l';
| < > < | 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
void leaves_cmd(void){
Stmt q;
Blob sql;
int showAll = find_option("all", "a", 0)!=0;
int showClosed = find_option("closed", "c", 0)!=0;
int recomputeFlag = find_option("recompute",0,0)!=0;
int showForks = g.argv[1][0]!='l';
int multipleFlag = (find_option("multiple","m",0))!=0 || showForks;
int byBranch = (find_option("bybranch",0,0)!=0) || multipleFlag;
const char *zWidth = find_option("width","W",1);
char *zLastBr = 0;
int n, width;
char zLineNo[10];
if( zWidth ){
width = atoi(zWidth);
if( (width!=0) && (width<=39) ){
fossil_fatal("-W|--width value must be >39 or 0");
}
}else{
width = -1;
|
| ︙ | ︙ | |||
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
const char *zId = db_column_text(&q, 1);
const char *zDate = db_column_text(&q, 2);
const char *zCom = db_column_text(&q, 3);
const char *zBr = db_column_text(&q, 7);
char *z;
if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
fossil_print("*** %s ***\n", zBr);
fossil_free(zLastBr);
zLastBr = fossil_strdup(zBr);
if( multipleFlag ) n = 0;
}
n++;
sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
fossil_print("%6s ", zLineNo);
z = mprintf("%s [%S] %s", zDate, zId, zCom);
comment_print(z, zCom, 7, width, g.comFmtFlags);
fossil_free(z);
}
fossil_free(zLastBr);
db_finalize(&q);
| > > > > < | 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 |
const char *zId = db_column_text(&q, 1);
const char *zDate = db_column_text(&q, 2);
const char *zCom = db_column_text(&q, 3);
const char *zBr = db_column_text(&q, 7);
char *z;
if( byBranch && fossil_strcmp(zBr, zLastBr)!=0 ){
if( showForks ){
fossil_print("WARNING: multiple open leaves on the following branches:\n");
showForks = 0;
}
fossil_print("*** %s ***\n", zBr);
fossil_free(zLastBr);
zLastBr = fossil_strdup(zBr);
if( multipleFlag ) n = 0;
}
n++;
sqlite3_snprintf(sizeof(zLineNo), zLineNo, "(%d)", n);
fossil_print("%6s ", zLineNo);
z = mprintf("%s [%S] %s", zDate, zId, zCom);
comment_print(z, zCom, 7, width, g.comFmtFlags);
fossil_free(z);
}
fossil_free(zLastBr);
db_finalize(&q);
}
/*
** WEBPAGE: leaves
**
** Show leaf check-ins in a timeline. By default only open leaves
** are listed.
|
| ︙ | ︙ |
Changes to src/file.c.
| ︙ | ︙ | |||
384 385 386 387 388 389 390 |
*/
void file_copy(const char *zFrom, const char *zTo){
FILE *in, *out;
int got;
char zBuf[8192];
in = fossil_fopen(zFrom, "rb");
if( in==0 ) fossil_fatal("cannot open \"%s\" for reading", zFrom);
| | | 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 |
*/
void file_copy(const char *zFrom, const char *zTo){
FILE *in, *out;
int got;
char zBuf[8192];
in = fossil_fopen(zFrom, "rb");
if( in==0 ) fossil_fatal("cannot open \"%s\" for reading", zFrom);
file_mkfolder(zTo, 0, 0);
out = fossil_fopen(zTo, "wb");
if( out==0 ) fossil_fatal("cannot open \"%s\" for writing", zTo);
while( (got=fread(zBuf, 1, sizeof(zBuf), in))>0 ){
fwrite(zBuf, 1, got, out);
}
fclose(in);
fclose(out);
|
| ︙ | ︙ | |||
528 529 530 531 532 533 534 535 | } return 0; } /* ** Create the tree of directories in which zFilename belongs, if that sequence ** of directories does not already exist. */ | > > > | | > | > | > > | 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 |
}
return 0;
}
/*
** Create the tree of directories in which zFilename belongs, if that sequence
** of directories does not already exist.
**
** On success, return zero. On error, return errorReturn if positive, otherwise
** print an error message and abort.
*/
int file_mkfolder(const char *zFilename, int forceFlag, int errorReturn){
int i, nName, rc = 0;
char *zName;
nName = strlen(zFilename);
zName = mprintf("%s", zFilename);
nName = file_simplify_name(zName, nName, 0);
for(i=1; i<nName; i++){
if( zName[i]=='/' ){
zName[i] = 0;
#if defined(_WIN32) || defined(__CYGWIN__)
/*
** On Windows, local path looks like: C:/develop/project/file.txt
** The if stops us from trying to create a directory of a drive letter
** C: in this example.
*/
if( !(i==2 && zName[1]==':') ){
#endif
if( file_mkdir(zName, forceFlag) && file_isdir(zName)!=1 ){
if (errorReturn <= 0) {
fossil_fatal_recursive("unable to create directory %s", zName);
}
rc = errorReturn;
break;
}
#if defined(_WIN32) || defined(__CYGWIN__)
}
#endif
zName[i] = '/';
}
}
free(zName);
return rc;
}
/*
** Removes the directory named in the argument, if it exists. The directory
** must be empty and cannot be the current directory or the root directory.
**
** Returns zero upon success.
|
| ︙ | ︙ |
Changes to src/finfo.c.
| ︙ | ︙ | |||
180 181 182 183 184 185 186 |
rid = db_int(0, "SELECT rid FROM vfile WHERE pathname=%B %s",
&fname, filename_collation());
if( rid==0 ){
fossil_fatal("no history for file: %b", &fname);
}
zFilename = blob_str(&fname);
db_prepare(&q,
| | | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
rid = db_int(0, "SELECT rid FROM vfile WHERE pathname=%B %s",
&fname, filename_collation());
if( rid==0 ){
fossil_fatal("no history for file: %b", &fname);
}
zFilename = blob_str(&fname);
db_prepare(&q,
"SELECT DISTINCT b.uuid, ci.uuid, date(event.mtime%s),"
" coalesce(event.ecomment, event.comment),"
" coalesce(event.euser, event.user),"
" (SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0"
" AND tagxref.rid=mlink.mid)" /* Tags */
" FROM mlink, blob b, event, blob ci, filename"
" WHERE filename.name=%Q %s"
" AND mlink.fnid=filename.fnid"
|
| ︙ | ︙ | |||
401 402 403 404 405 406 407 |
blob_appendf(&title, "History of files named ");
hyperlinked_path(zFilename, &title, 0, "tree", "");
if( fShowId ) blob_appendf(&title, " (%d)", fnid);
}
@ <h2>%b(&title)</h2>
blob_reset(&title);
pGraph = graph_init();
| < < | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 |
blob_appendf(&title, "History of files named ");
hyperlinked_path(zFilename, &title, 0, "tree", "");
if( fShowId ) blob_appendf(&title, " (%d)", fnid);
}
@ <h2>%b(&title)</h2>
blob_reset(&title);
pGraph = graph_init();
@ <table id="timelineTable" class="timelineTable">
while( db_step(&q)==SQLITE_ROW ){
const char *zDate = db_column_text(&q, 0);
const char *zCom = db_column_text(&q, 1);
const char *zUser = db_column_text(&q, 2);
int fpid = db_column_int(&q, 3);
int frid = db_column_int(&q, 4);
|
| ︙ | ︙ | |||
457 458 459 460 461 462 463 |
@ <div class="divider timelineDate">%s(zPrevDate)</div>
@ </td><td></td><td></td></tr>
}
memcpy(zTime, &zDate[11], 5);
zTime[5] = 0;
@ <tr><td class="timelineTime">
@ %z(href("%R/timeline?c=%t",zDate))%s(zTime)</a></td>
| | | 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
@ <div class="divider timelineDate">%s(zPrevDate)</div>
@ </td><td></td><td></td></tr>
}
memcpy(zTime, &zDate[11], 5);
zTime[5] = 0;
@ <tr><td class="timelineTime">
@ %z(href("%R/timeline?c=%t",zDate))%s(zTime)</a></td>
@ <td class="timelineGraph"><div id="m%d(gidx)" class="tl-nodemark"></div></td>
if( zBgClr && zBgClr[0] ){
@ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
}else{
@ <td class="timelineTableCell">
}
if( zUuid ){
if( nParent==0 ){
|
| ︙ | ︙ | |||
534 535 536 537 538 539 540 |
db_finalize(&q);
if( pGraph ){
graph_finish(pGraph, 1);
if( pGraph->nErr ){
graph_free(pGraph);
pGraph = 0;
}else{
| < < < | | 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
db_finalize(&q);
if( pGraph ){
graph_finish(pGraph, 1);
if( pGraph->nErr ){
graph_free(pGraph);
pGraph = 0;
}else{
@ <tr class="timelineBottom"><td></td><td></td><td></td></tr>
}
}
@ </table>
timeline_output_graph_javascript(pGraph, 0, 1);
style_footer();
}
|
Changes to src/graph.c.
| ︙ | ︙ | |||
45 46 47 48 49 50 51 | int idxTop; /* Direct descendent highest up on the graph */ GraphRow *pChild; /* Child immediately above this node */ u8 isDup; /* True if this is duplicate of a prior entry */ u8 isLeaf; /* True if this is a leaf node */ u8 timeWarp; /* Child is earlier in time */ u8 bDescender; /* True if riser from bottom of graph to here. */ i8 iRail; /* Which rail this check-in appears on. 0-based.*/ | | < | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
int idxTop; /* Direct descendent highest up on the graph */
GraphRow *pChild; /* Child immediately above this node */
u8 isDup; /* True if this is duplicate of a prior entry */
u8 isLeaf; /* True if this is a leaf node */
u8 timeWarp; /* Child is earlier in time */
u8 bDescender; /* True if riser from bottom of graph to here. */
i8 iRail; /* Which rail this check-in appears on. 0-based.*/
i8 mergeOut; /* Merge out to this rail. -1 if no merge-out */
u8 mergeIn[GR_MAX_RAIL]; /* Merge in from non-zero rails */
int aiRiser[GR_MAX_RAIL]; /* Risers from this node to a higher row. */
int mergeUpto; /* Draw the mergeOut rail up to this level */
u64 mergeDown; /* Draw merge lines up from bottom of graph */
u64 railInUse; /* Mask of occupied rails at this row */
};
/* Context while building a graph
*/
struct GraphContext {
int nErr; /* Number of errors encountered */
int mxRail; /* Number of rails required to render the graph */
GraphRow *pFirst; /* First row in the list */
GraphRow *pLast; /* Last row in the list */
int nBranch; /* Number of distinct branches */
char **azBranch; /* Names of the branches */
int nRow; /* Number of rows */
int nHash; /* Number of slots in apHash[] */
GraphRow **apHash; /* Hash table of GraphRow objects. Key: rid */
|
| ︙ | ︙ | |||
292 293 294 295 296 297 298 |
if( pParent->mergeOut<0 ){
u = pParent->aiRiser[pParent->iRail];
if( u>=0 && u<pChild->idx ){
/* The thick arrow up to the next primary child of pDesc goes
** further up than the thin merge arrow riser, so draw them both
** on the same rail. */
| | < | | | | | 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
if( pParent->mergeOut<0 ){
u = pParent->aiRiser[pParent->iRail];
if( u>=0 && u<pChild->idx ){
/* The thick arrow up to the next primary child of pDesc goes
** further up than the thin merge arrow riser, so draw them both
** on the same rail. */
pParent->mergeOut = pParent->iRail;
pParent->mergeUpto = pChild->idx;
}else{
/* The thin merge arrow riser is taller than the thick primary
** child riser, so use separate rails. */
int iTarget = pParent->iRail;
pParent->mergeOut = findFreeRail(p, pChild->idx, pParent->idx-1,
0, iTarget);
pParent->mergeUpto = pChild->idx;
mask = BIT(pParent->mergeOut);
for(pLoop=pChild->pNext; pLoop && pLoop->rid!=pParent->rid;
pLoop=pLoop->pNext){
pLoop->railInUse |= mask;
}
}
}
pChild->mergeIn[pParent->mergeOut] = 1;
}
/*
** Compute the maximum rail number.
*/
static void find_max_rail(GraphContext *p){
GraphRow *pRow;
p->mxRail = 0;
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
if( pRow->iRail>p->mxRail ) p->mxRail = pRow->iRail;
if( pRow->mergeOut>p->mxRail ) p->mxRail = pRow->mergeOut;
while( p->mxRail<GR_MAX_RAIL && pRow->mergeDown>(BIT(p->mxRail+1)-1) ){
p->mxRail++;
}
}
}
|
| ︙ | ︙ | |||
538 539 540 541 542 543 544 |
int parentRid = pRow->aParent[i];
pDesc = hashFind(p, parentRid);
if( pDesc==0 ){
/* Merge from a node that is off-screen */
int iMrail = findFreeRail(p, pRow->idx, p->nRow, 0, 0);
if( p->mxRail>=GR_MAX_RAIL ) return;
mask = BIT(iMrail);
| | | 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 |
int parentRid = pRow->aParent[i];
pDesc = hashFind(p, parentRid);
if( pDesc==0 ){
/* Merge from a node that is off-screen */
int iMrail = findFreeRail(p, pRow->idx, p->nRow, 0, 0);
if( p->mxRail>=GR_MAX_RAIL ) return;
mask = BIT(iMrail);
pRow->mergeIn[iMrail] = 1;
pRow->mergeDown |= mask;
for(pLoop=pRow->pNext; pLoop; pLoop=pLoop->pNext){
pLoop->railInUse |= mask;
}
}else{
/* Merge from an on-screen node */
createMergeRiser(p, pDesc, pRow);
|
| ︙ | ︙ | |||
567 568 569 570 571 572 573 |
if( p->mxRail>=GR_MAX_RAIL ) return;
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
if( !pRow->isDup ) continue;
pRow->iRail = dupRail;
pDesc = hashFind(p, pRow->rid);
assert( pDesc!=0 && pDesc!=pRow );
createMergeRiser(p, pDesc, pRow);
| | < < < < < | 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 |
if( p->mxRail>=GR_MAX_RAIL ) return;
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
if( !pRow->isDup ) continue;
pRow->iRail = dupRail;
pDesc = hashFind(p, pRow->rid);
assert( pDesc!=0 && pDesc!=pRow );
createMergeRiser(p, pDesc, pRow);
if( pDesc->mergeOut>mxRail ) mxRail = pDesc->mergeOut;
}
if( dupRail<=mxRail ){
dupRail = mxRail+1;
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
if( pRow->isDup ) pRow->iRail = dupRail;
}
}
if( mxRail>=GR_MAX_RAIL ) return;
}
/*
** Find the maximum rail number.
*/
find_max_rail(p);
p->nErr = 0;
}
|
Changes to src/http.c.
| ︙ | ︙ | |||
336 337 338 339 340 341 342 |
goto write_err;
}
j = strlen(zLine) - 1;
while( j>4 && fossil_strcmp(&zLine[j-4],"/xfer")==0 ){
j -= 4;
zLine[j] = 0;
}
| < < > > | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
goto write_err;
}
j = strlen(zLine) - 1;
while( j>4 && fossil_strcmp(&zLine[j-4],"/xfer")==0 ){
j -= 4;
zLine[j] = 0;
}
fossil_print("redirect with status %d to %s\n", rc, &zLine[i]);
url_parse(&zLine[i], 0);
transport_close(&g.url);
transport_global_shutdown(&g.url);
fSeenHttpAuth = 0;
if( g.zHttpAuth ) free(g.zHttpAuth);
g.zHttpAuth = get_httpauth();
return http_exchange(pSend, pReply, useLogin, maxRedirect);
}else if( fossil_strnicmp(zLine, "content-type: ", 14)==0 ){
if( fossil_strnicmp(&zLine[14], "application/x-fossil-debug", -1)==0 ){
isCompressed = 0;
|
| ︙ | ︙ |
Changes to src/info.c.
| ︙ | ︙ | |||
220 221 222 223 224 225 226 |
int rid;
rid = name_to_rid(g.argv[2]);
if( rid==0 ){
fossil_fatal("no such object: %s\n", g.argv[2]);
}
show_common_info(rid, "uuid:", 1, 1);
}
| < | 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
int rid;
rid = name_to_rid(g.argv[2]);
if( rid==0 ){
fossil_fatal("no such object: %s\n", g.argv[2]);
}
show_common_info(rid, "uuid:", 1, 1);
}
leaves_cmd();
}
/*
** Show information about all tags on a given check-in.
*/
static void showTags(int rid){
|
| ︙ | ︙ | |||
368 369 370 371 372 373 374 375 376 |
const char *zOld, /* blob.uuid before change. NULL for added files */
const char *zNew, /* blob.uuid after change. NULL for deletes */
const char *zOldName, /* Prior name. NULL if no name change. */
u64 diffFlags, /* Flags for text_diff(). Zero to omit diffs */
ReCompiled *pRe, /* Only show diffs that match this regex, if not NULL */
int mperm /* executable or symlink permission for zNew */
){
if( !g.perm.Hyperlink ){
if( zNew==0 ){
| > | | | | > > | | > > > | | | < | > > > > > > | > > | | | | > | 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 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 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 |
const char *zOld, /* blob.uuid before change. NULL for added files */
const char *zNew, /* blob.uuid after change. NULL for deletes */
const char *zOldName, /* Prior name. NULL if no name change. */
u64 diffFlags, /* Flags for text_diff(). Zero to omit diffs */
ReCompiled *pRe, /* Only show diffs that match this regex, if not NULL */
int mperm /* executable or symlink permission for zNew */
){
@ <p>
if( !g.perm.Hyperlink ){
if( zNew==0 ){
@ Deleted %h(zName).
}else if( zOld==0 ){
@ Added %h(zName).
}else if( zOldName!=0 && fossil_strcmp(zName,zOldName)!=0 ){
@ Name change from %h(zOldName) to %h(zName).
}else if( fossil_strcmp(zNew, zOld)==0 ){
if( mperm==PERM_EXE ){
@ %h(zName) became executable.
}else if( mperm==PERM_LNK ){
@ %h(zName) became a symlink.
}else{
@ %h(zName) became a regular file.
}
}else{
@ Changes to %h(zName).
}
if( diffFlags ){
append_diff(zOld, zNew, diffFlags, pRe);
}
}else{
if( zOld && zNew ){
if( fossil_strcmp(zOld, zNew)!=0 ){
@ Modified %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
@ from %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a>
@ to %z(href("%R/artifact/%!S",zNew))[%S(zNew)]</a>.
}else if( zOldName!=0 && fossil_strcmp(zName,zOldName)!=0 ){
@ Name change
@ from %z(href("%R/finfo?name=%T",zOldName))%h(zOldName)</a>
@ to %z(href("%R/finfo?name=%T",zName))%h(zName)</a>.
}else{
@ %z(href("%R/finfo?name=%T",zName))%h(zName)</a> became
if( mperm==PERM_EXE ){
@ executable with contents
}else if( mperm==PERM_LNK ){
@ a symlink with target
}else{
@ a regular file with contents
}
@ %z(href("%R/artifact/%!S",zNew))[%S(zNew)]</a>.
}
}else if( zOld ){
@ Deleted %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
@ version %z(href("%R/artifact/%!S",zOld))[%S(zOld)]</a>.
}else{
@ Added %z(href("%R/finfo?name=%T",zName))%h(zName)</a>
@ version %z(href("%R/artifact/%!S",zNew))[%S(zNew)]</a>.
}
if( diffFlags ){
append_diff(zOld, zNew, diffFlags, pRe);
}else if( zOld && zNew && fossil_strcmp(zOld,zNew)!=0 ){
@
@ %z(href("%R/fdiff?v1=%!S&v2=%!S&sbs=1",zOld,zNew))[diff]</a>
}
}
@ </p>
}
/*
** Generate javascript to enhance HTML diffs.
*/
void append_diff_javascript(int sideBySide){
if( !sideBySide ) return;
|
| ︙ | ︙ |
Changes to src/json.c.
| ︙ | ︙ | |||
1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 | INT(g, thTrace); INT(g, isHome); INT(g, nAux); INT(g, allowSymlinks); CSTR(g, zMainDbType); CSTR(g, zConfigDbType); CSTR(g, zLocalRoot); CSTR(g, zPath); CSTR(g, zExtra); CSTR(g, zBaseURL); CSTR(g, zTop); CSTR(g, zContentType); CSTR(g, zErrMsg); | > | 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 | INT(g, thTrace); INT(g, isHome); INT(g, nAux); INT(g, allowSymlinks); CSTR(g, zMainDbType); CSTR(g, zConfigDbType); CSTR(g, zOpenRevision); CSTR(g, zLocalRoot); CSTR(g, zPath); CSTR(g, zExtra); CSTR(g, zBaseURL); CSTR(g, zTop); CSTR(g, zContentType); CSTR(g, zErrMsg); |
| ︙ | ︙ |
Changes to src/main.c.
| ︙ | ︙ | |||
133 134 135 136 137 138 139 140 141 142 143 144 145 146 | sqlite3_int64 now; /* Seconds since 1970 */ int repositoryOpen; /* True if the main repository database is open */ char *zRepositoryOption; /* Most recent cached repository option value */ char *zRepositoryName; /* Name of the repository database */ char *zLocalDbName; /* Name of the local database */ const char *zMainDbType;/* "configdb", "localdb", or "repository" */ const char *zConfigDbType; /* "configdb", "localdb", or "repository" */ int localOpen; /* True if the local database is open */ char *zLocalRoot; /* The directory holding the local database */ int minPrefix; /* Number of digits needed for a distinct UUID */ int fSqlTrace; /* True if --sqltrace flag is present */ int fSqlStats; /* True if --sqltrace or --sqlstats are present */ int fSqlPrint; /* True if -sqlprint flag is present */ int fQuiet; /* True if -quiet flag is present */ | > | 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | sqlite3_int64 now; /* Seconds since 1970 */ int repositoryOpen; /* True if the main repository database is open */ char *zRepositoryOption; /* Most recent cached repository option value */ char *zRepositoryName; /* Name of the repository database */ char *zLocalDbName; /* Name of the local database */ const char *zMainDbType;/* "configdb", "localdb", or "repository" */ const char *zConfigDbType; /* "configdb", "localdb", or "repository" */ char *zOpenRevision; /* Check-in version to use during database open */ int localOpen; /* True if the local database is open */ char *zLocalRoot; /* The directory holding the local database */ int minPrefix; /* Number of digits needed for a distinct UUID */ int fSqlTrace; /* True if --sqltrace flag is present */ int fSqlStats; /* True if --sqltrace or --sqlstats are present */ int fSqlPrint; /* True if -sqlprint flag is present */ int fQuiet; /* True if -quiet flag is present */ |
| ︙ | ︙ | |||
1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 |
db_multi_exec("CREATE TABLE sfile(x TEXT);");
db_multi_exec("CREATE TABLE vfile(pathname);");
vfile_scan(&base, blob_size(&base), 0, 0, 0);
db_multi_exec("DELETE FROM sfile WHERE x NOT GLOB '*.fossil'");
n = db_int(0, "SELECT count(*) FROM sfile");
if( n>0 ){
Stmt q;
@ <h1>Available Repositories:</h1>
@ <ol>
db_prepare(&q, "SELECT x, substr(x,-7,-100000)||'/home'"
" FROM sfile ORDER BY x COLLATE nocase;");
while( db_step(&q)==SQLITE_ROW ){
const char *zName = db_column_text(&q, 0);
const char *zUrl = db_column_text(&q, 1);
| > > > > > | > > | 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 |
db_multi_exec("CREATE TABLE sfile(x TEXT);");
db_multi_exec("CREATE TABLE vfile(pathname);");
vfile_scan(&base, blob_size(&base), 0, 0, 0);
db_multi_exec("DELETE FROM sfile WHERE x NOT GLOB '*.fossil'");
n = db_int(0, "SELECT count(*) FROM sfile");
if( n>0 ){
Stmt q;
@ <html>
@ <head>
@ <title>Repository List</title>
@ </head>
@ <body>
@ <h1>Available Repositories:</h1>
@ <ol>
db_prepare(&q, "SELECT x, substr(x,-7,-100000)||'/home'"
" FROM sfile ORDER BY x COLLATE nocase;");
while( db_step(&q)==SQLITE_ROW ){
const char *zName = db_column_text(&q, 0);
const char *zUrl = db_column_text(&q, 1);
@ <li><a href="%h(zUrl)" target="_blank">%h(zName)</a></li>
}
@ </ol>
@ </body>
@ </html>
cgi_reply();
}
sqlite3_close(g.db);
g.db = 0;
return n;
}
|
| ︙ | ︙ | |||
1561 1562 1563 1564 1565 1566 1567 |
return;
}
zRepo[j] = '.';
}
if( szFile<1024 ){
set_base_url(0);
| < < | > > | 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 |
return;
}
zRepo[j] = '.';
}
if( szFile<1024 ){
set_base_url(0);
if( strcmp(zPathInfo,"/")==0
&& allowRepoList
&& repo_list_page() ){
/* Will return a list of repositories */
}else if( zNotFound ){
cgi_redirect(zNotFound);
}else{
#ifdef FOSSIL_ENABLE_JSON
if(g.json.isJsonMode){
json_err(FSL_JSON_E_RESOURCE_NOT_FOUND,NULL,1);
return;
}
#endif
|
| ︙ | ︙ | |||
2167 2168 2169 2170 2171 2172 2173 |
if( zAltBase ) set_base_url(zAltBase);
if( find_option("https",0,0)!=0 ){
zIpAddr = fossil_getenv("REMOTE_HOST"); /* From stunnel */
cgi_replace_parameter("HTTPS","on");
}
zHost = find_option("host", 0, 1);
if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost);
| < > | 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 |
if( zAltBase ) set_base_url(zAltBase);
if( find_option("https",0,0)!=0 ){
zIpAddr = fossil_getenv("REMOTE_HOST"); /* From stunnel */
cgi_replace_parameter("HTTPS","on");
}
zHost = find_option("host", 0, 1);
if( zHost ) cgi_replace_parameter("HTTP_HOST",zHost);
/* We should be done with options.. */
verify_all_options();
if( g.argc!=2 && g.argc!=3 && g.argc!=5 && g.argc!=6 ){
fossil_fatal("no repository specified");
}
g.cgiOutput = 1;
g.fullHttpReply = 1;
if( g.argc>=5 ){
g.httpIn = fossil_fopen(g.argv[2], "rb");
g.httpOut = fossil_fopen(g.argv[3], "wb");
zIpAddr = g.argv[4];
find_server_repository(5, 0);
}else{
|
| ︙ | ︙ |
Changes to src/main.mk.
| ︙ | ︙ | |||
82 83 84 85 86 87 88 89 90 91 92 93 94 95 | $(SRCDIR)/markdown_html.c \ $(SRCDIR)/md5.c \ $(SRCDIR)/merge.c \ $(SRCDIR)/merge3.c \ $(SRCDIR)/moderate.c \ $(SRCDIR)/name.c \ $(SRCDIR)/path.c \ $(SRCDIR)/pivot.c \ $(SRCDIR)/popen.c \ $(SRCDIR)/pqueue.c \ $(SRCDIR)/printf.c \ $(SRCDIR)/publish.c \ $(SRCDIR)/purge.c \ $(SRCDIR)/rebuild.c \ | > | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | $(SRCDIR)/markdown_html.c \ $(SRCDIR)/md5.c \ $(SRCDIR)/merge.c \ $(SRCDIR)/merge3.c \ $(SRCDIR)/moderate.c \ $(SRCDIR)/name.c \ $(SRCDIR)/path.c \ $(SRCDIR)/piechart.c \ $(SRCDIR)/pivot.c \ $(SRCDIR)/popen.c \ $(SRCDIR)/pqueue.c \ $(SRCDIR)/printf.c \ $(SRCDIR)/publish.c \ $(SRCDIR)/purge.c \ $(SRCDIR)/rebuild.c \ |
| ︙ | ︙ | |||
253 254 255 256 257 258 259 260 261 262 263 264 265 266 | $(OBJDIR)/markdown_html_.c \ $(OBJDIR)/md5_.c \ $(OBJDIR)/merge_.c \ $(OBJDIR)/merge3_.c \ $(OBJDIR)/moderate_.c \ $(OBJDIR)/name_.c \ $(OBJDIR)/path_.c \ $(OBJDIR)/pivot_.c \ $(OBJDIR)/popen_.c \ $(OBJDIR)/pqueue_.c \ $(OBJDIR)/printf_.c \ $(OBJDIR)/publish_.c \ $(OBJDIR)/purge_.c \ $(OBJDIR)/rebuild_.c \ | > | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | $(OBJDIR)/markdown_html_.c \ $(OBJDIR)/md5_.c \ $(OBJDIR)/merge_.c \ $(OBJDIR)/merge3_.c \ $(OBJDIR)/moderate_.c \ $(OBJDIR)/name_.c \ $(OBJDIR)/path_.c \ $(OBJDIR)/piechart_.c \ $(OBJDIR)/pivot_.c \ $(OBJDIR)/popen_.c \ $(OBJDIR)/pqueue_.c \ $(OBJDIR)/printf_.c \ $(OBJDIR)/publish_.c \ $(OBJDIR)/purge_.c \ $(OBJDIR)/rebuild_.c \ |
| ︙ | ︙ | |||
373 374 375 376 377 378 379 380 381 382 383 384 385 386 | $(OBJDIR)/markdown_html.o \ $(OBJDIR)/md5.o \ $(OBJDIR)/merge.o \ $(OBJDIR)/merge3.o \ $(OBJDIR)/moderate.o \ $(OBJDIR)/name.o \ $(OBJDIR)/path.o \ $(OBJDIR)/pivot.o \ $(OBJDIR)/popen.o \ $(OBJDIR)/pqueue.o \ $(OBJDIR)/printf.o \ $(OBJDIR)/publish.o \ $(OBJDIR)/purge.o \ $(OBJDIR)/rebuild.o \ | > | 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 | $(OBJDIR)/markdown_html.o \ $(OBJDIR)/md5.o \ $(OBJDIR)/merge.o \ $(OBJDIR)/merge3.o \ $(OBJDIR)/moderate.o \ $(OBJDIR)/name.o \ $(OBJDIR)/path.o \ $(OBJDIR)/piechart.o \ $(OBJDIR)/pivot.o \ $(OBJDIR)/popen.o \ $(OBJDIR)/pqueue.o \ $(OBJDIR)/printf.o \ $(OBJDIR)/publish.o \ $(OBJDIR)/purge.o \ $(OBJDIR)/rebuild.o \ |
| ︙ | ︙ | |||
472 473 474 475 476 477 478 |
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
-DSQLITE_THREADSAFE=0 \
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
-DSQLITE_OMIT_DEPRECATED \
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
-DSQLITE_ENABLE_FTS4 \
| | > | 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 |
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
-DSQLITE_THREADSAFE=0 \
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
-DSQLITE_OMIT_DEPRECATED \
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_DBSTAT_VTAB
# Setup the options used to compile the included SQLite shell.
SHELL_OPTIONS = -Dmain=sqlite3_shell \
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
-DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
-DSQLITE_SHELL_DBNAME_PROC=fossil_open
|
| ︙ | ︙ | |||
604 605 606 607 608 609 610 611 612 613 614 615 616 617 | $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h \ $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h \ $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h \ $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h \ $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h \ $(OBJDIR)/name_.c:$(OBJDIR)/name.h \ $(OBJDIR)/path_.c:$(OBJDIR)/path.h \ $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \ $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \ $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \ $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \ $(OBJDIR)/publish_.c:$(OBJDIR)/publish.h \ $(OBJDIR)/purge_.c:$(OBJDIR)/purge.h \ $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \ | > | 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 | $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h \ $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h \ $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h \ $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h \ $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h \ $(OBJDIR)/name_.c:$(OBJDIR)/name.h \ $(OBJDIR)/path_.c:$(OBJDIR)/path.h \ $(OBJDIR)/piechart_.c:$(OBJDIR)/piechart.h \ $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \ $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \ $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \ $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \ $(OBJDIR)/publish_.c:$(OBJDIR)/publish.h \ $(OBJDIR)/purge_.c:$(OBJDIR)/purge.h \ $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \ |
| ︙ | ︙ | |||
1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 | $(OBJDIR)/path_.c: $(SRCDIR)/path.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/path.c >$@ $(OBJDIR)/path.o: $(OBJDIR)/path_.c $(OBJDIR)/path.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/path.o -c $(OBJDIR)/path_.c $(OBJDIR)/path.h: $(OBJDIR)/headers $(OBJDIR)/pivot_.c: $(SRCDIR)/pivot.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/pivot.c >$@ $(OBJDIR)/pivot.o: $(OBJDIR)/pivot_.c $(OBJDIR)/pivot.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/pivot.o -c $(OBJDIR)/pivot_.c | > > > > > > > > | 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 | $(OBJDIR)/path_.c: $(SRCDIR)/path.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/path.c >$@ $(OBJDIR)/path.o: $(OBJDIR)/path_.c $(OBJDIR)/path.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/path.o -c $(OBJDIR)/path_.c $(OBJDIR)/path.h: $(OBJDIR)/headers $(OBJDIR)/piechart_.c: $(SRCDIR)/piechart.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/piechart.c >$@ $(OBJDIR)/piechart.o: $(OBJDIR)/piechart_.c $(OBJDIR)/piechart.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/piechart.o -c $(OBJDIR)/piechart_.c $(OBJDIR)/piechart.h: $(OBJDIR)/headers $(OBJDIR)/pivot_.c: $(SRCDIR)/pivot.c $(OBJDIR)/translate $(OBJDIR)/translate $(SRCDIR)/pivot.c >$@ $(OBJDIR)/pivot.o: $(OBJDIR)/pivot_.c $(OBJDIR)/pivot.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/pivot.o -c $(OBJDIR)/pivot_.c |
| ︙ | ︙ |
Changes to src/makemake.tcl.
| ︙ | ︙ | |||
88 89 90 91 92 93 94 95 96 97 98 99 100 101 | markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf publish purge rebuild | > | 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild |
| ︙ | ︙ | |||
157 158 159 160 161 162 163 164 165 166 167 168 169 170 | -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS } #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_FTS3=1 #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_STAT4 #lappend SQLITE_OPTIONS -DSQLITE_WIN32_NO_ANSI #lappend SQLITE_OPTIONS -DSQLITE_WINNT_MAX_PATH_CHARS=4096 # Options used to compile the included SQLite shell. | > | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB } #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_FTS3=1 #lappend SQLITE_OPTIONS -DSQLITE_ENABLE_STAT4 #lappend SQLITE_OPTIONS -DSQLITE_WIN32_NO_ANSI #lappend SQLITE_OPTIONS -DSQLITE_WINNT_MAX_PATH_CHARS=4096 # Options used to compile the included SQLite shell. |
| ︙ | ︙ |
Changes to src/markdown_html.c.
| ︙ | ︙ | |||
32 33 34 35 36 37 38 |
#endif /* INTERFACE */
/* INTER_BLOCK -- skip a line between block level elements */
#define INTER_BLOCK(ob) \
do { if( blob_size(ob)>0 ) blob_append(ob, "\n", 1); } while (0)
| | | | | | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
#endif /* INTERFACE */
/* INTER_BLOCK -- skip a line between block level elements */
#define INTER_BLOCK(ob) \
do { if( blob_size(ob)>0 ) blob_append(ob, "\n", 1); } while (0)
/* BLOB_APPEND_LITERAL -- append a string literal to a blob */
#define BLOB_APPEND_LITERAL(blob, literal) \
blob_append((blob), "" literal, (sizeof literal)-1)
/*
* The empty string in the second argument leads to a syntax error
* when the macro is not used with a string literal. Unfortunately
* the error is not overly explicit.
*/
/* BLOB_APPEND_BLOB -- append blob contents to another */
#define BLOB_APPEND_BLOB(dest, src) \
blob_append((dest), blob_buffer(src), blob_size(src))
|
| ︙ | ︙ | |||
63 64 65 66 67 68 69 |
&& data[i]!='&'
){
i++;
}
blob_append(ob, data+beg, i-beg);
while( i<size ){
if( data[i]=='<' ){
| | | | | | | | | | | | | 63 64 65 66 67 68 69 70 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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
&& data[i]!='&'
){
i++;
}
blob_append(ob, data+beg, i-beg);
while( i<size ){
if( data[i]=='<' ){
BLOB_APPEND_LITERAL(ob, "<");
}else if( data[i]=='>' ){
BLOB_APPEND_LITERAL(ob, ">");
}else if( data[i]=='&' ){
BLOB_APPEND_LITERAL(ob, "&");
}else if( data[i]=='"' ){
BLOB_APPEND_LITERAL(ob, """);
}else{
break;
}
i++;
}
}
}
/* HTML block tags */
/* Size of the prolog: "<div class='markdown'>\n" */
#define PROLOG_SIZE 23
static void html_prolog(struct Blob *ob, void *opaque){
INTER_BLOCK(ob);
BLOB_APPEND_LITERAL(ob, "<div class=\"markdown\">\n");
assert( blob_size(ob)==PROLOG_SIZE );
}
static void html_epilog(struct Blob *ob, void *opaque){
INTER_BLOCK(ob);
BLOB_APPEND_LITERAL(ob, "</div>\n");
}
static void html_raw_block(struct Blob *ob, struct Blob *text, void *opaque){
char *data = blob_buffer(text);
size_t first = 0, size = blob_size(text);
INTER_BLOCK(ob);
while( first<size && data[first]=='\n' ) first++;
while( size>first && data[size-1]=='\n' ) size--;
blob_append(ob, data+first, size-first);
BLOB_APPEND_LITERAL(ob, "\n");
}
static void html_blockcode(struct Blob *ob, struct Blob *text, void *opaque){
INTER_BLOCK(ob);
BLOB_APPEND_LITERAL(ob, "<pre><code>");
html_escape(ob, blob_buffer(text), blob_size(text));
BLOB_APPEND_LITERAL(ob, "</code></pre>\n");
}
static void html_blockquote(struct Blob *ob, struct Blob *text, void *opaque){
INTER_BLOCK(ob);
BLOB_APPEND_LITERAL(ob, "<blockquote>\n");
BLOB_APPEND_BLOB(ob, text);
BLOB_APPEND_LITERAL(ob, "</blockquote>\n");
}
static void html_header(
struct Blob *ob,
struct Blob *text,
int level,
void *opaque
|
| ︙ | ︙ | |||
139 140 141 142 143 144 145 |
blob_appendf(ob, "<h%d>", level);
BLOB_APPEND_BLOB(ob, text);
blob_appendf(ob, "</h%d>", level);
}
static void html_hrule(struct Blob *ob, void *opaque){
INTER_BLOCK(ob);
| | | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
blob_appendf(ob, "<h%d>", level);
BLOB_APPEND_BLOB(ob, text);
blob_appendf(ob, "</h%d>", level);
}
static void html_hrule(struct Blob *ob, void *opaque){
INTER_BLOCK(ob);
BLOB_APPEND_LITERAL(ob, "<hr />\n");
}
static void html_list(
struct Blob *ob,
struct Blob *text,
int flags,
|
| ︙ | ︙ | |||
167 168 169 170 171 172 173 |
struct Blob *text,
int flags,
void *opaque
){
char *text_data = blob_buffer(text);
size_t text_size = blob_size(text);
while( text_size>0 && text_data[text_size-1]=='\n' ) text_size--;
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 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 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
struct Blob *text,
int flags,
void *opaque
){
char *text_data = blob_buffer(text);
size_t text_size = blob_size(text);
while( text_size>0 && text_data[text_size-1]=='\n' ) text_size--;
BLOB_APPEND_LITERAL(ob, "<li>");
blob_append(ob, text_data, text_size);
BLOB_APPEND_LITERAL(ob, "</li>\n");
}
static void html_paragraph(struct Blob *ob, struct Blob *text, void *opaque){
INTER_BLOCK(ob);
BLOB_APPEND_LITERAL(ob, "<p>");
BLOB_APPEND_BLOB(ob, text);
BLOB_APPEND_LITERAL(ob, "</p>\n");
}
static void html_table(
struct Blob *ob,
struct Blob *head_row,
struct Blob *rows,
void *opaque
){
INTER_BLOCK(ob);
BLOB_APPEND_LITERAL(ob, "<table>\n");
if( head_row && blob_size(head_row)>0 ){
BLOB_APPEND_LITERAL(ob, "<thead>\n");
BLOB_APPEND_BLOB(ob, head_row);
BLOB_APPEND_LITERAL(ob, "</thead>\n<tbody>\n");
}
if( rows ){
BLOB_APPEND_BLOB(ob, rows);
}
if( head_row && blob_size(head_row)>0 ){
BLOB_APPEND_LITERAL(ob, "</tbody>\n");
}
BLOB_APPEND_LITERAL(ob, "</table>\n");
}
static void html_table_cell(
struct Blob *ob,
struct Blob *text,
int flags,
void *opaque
){
if( flags & MKD_CELL_HEAD ){
BLOB_APPEND_LITERAL(ob, " <th");
}else{
BLOB_APPEND_LITERAL(ob, " <td");
}
switch( flags & MKD_CELL_ALIGN_MASK ){
case MKD_CELL_ALIGN_LEFT: {
BLOB_APPEND_LITERAL(ob, " align=\"left\"");
break;
}
case MKD_CELL_ALIGN_RIGHT: {
BLOB_APPEND_LITERAL(ob, " align=\"right\"");
break;
}
case MKD_CELL_ALIGN_CENTER: {
BLOB_APPEND_LITERAL(ob, " align=\"center\"");
break;
}
}
BLOB_APPEND_LITERAL(ob, ">");
BLOB_APPEND_BLOB(ob, text);
if( flags & MKD_CELL_HEAD ){
BLOB_APPEND_LITERAL(ob, "</th>\n");
}else{
BLOB_APPEND_LITERAL(ob, "</td>\n");
}
}
static void html_table_row(
struct Blob *ob,
struct Blob *cells,
int flags,
void *opaque
){
BLOB_APPEND_LITERAL(ob, " <tr>\n");
BLOB_APPEND_BLOB(ob, cells);
BLOB_APPEND_LITERAL(ob, " </tr>\n");
}
/* HTML span tags */
static int html_raw_span(struct Blob *ob, struct Blob *text, void *opaque){
BLOB_APPEND_BLOB(ob, text);
return 1;
}
static int html_autolink(
struct Blob *ob,
struct Blob *link,
enum mkd_autolink type,
void *opaque
){
if( !link || blob_size(link)<=0 ) return 0;
BLOB_APPEND_LITERAL(ob, "<a href=\"");
if( type==MKDA_IMPLICIT_EMAIL ) BLOB_APPEND_LITERAL(ob, "mailto:");
html_escape(ob, blob_buffer(link), blob_size(link));
BLOB_APPEND_LITERAL(ob, "\">");
if( type==MKDA_EXPLICIT_EMAIL && blob_size(link)>7 ){
/* remove "mailto:" from displayed text */
html_escape(ob, blob_buffer(link)+7, blob_size(link)-7);
}else{
html_escape(ob, blob_buffer(link), blob_size(link));
}
BLOB_APPEND_LITERAL(ob, "</a>");
return 1;
}
static int html_code_span(struct Blob *ob, struct Blob *text, void *opaque){
BLOB_APPEND_LITERAL(ob, "<code>");
html_escape(ob, blob_buffer(text), blob_size(text));
BLOB_APPEND_LITERAL(ob, "</code>");
return 1;
}
static int html_double_emphasis(
struct Blob *ob,
struct Blob *text,
char c,
void *opaque
){
BLOB_APPEND_LITERAL(ob, "<strong>");
BLOB_APPEND_BLOB(ob, text);
BLOB_APPEND_LITERAL(ob, "</strong>");
return 1;
}
static int html_emphasis(
struct Blob *ob,
struct Blob *text,
char c,
void *opaque
){
BLOB_APPEND_LITERAL(ob, "<em>");
BLOB_APPEND_BLOB(ob, text);
BLOB_APPEND_LITERAL(ob, "</em>");
return 1;
}
static int html_image(
struct Blob *ob,
struct Blob *link,
struct Blob *title,
struct Blob *alt,
void *opaque
){
BLOB_APPEND_LITERAL(ob, "<img src=\"");
html_escape(ob, blob_buffer(link), blob_size(link));
BLOB_APPEND_LITERAL(ob, "\" alt=\"");
html_escape(ob, blob_buffer(alt), blob_size(alt));
if( title && blob_size(title)>0 ){
BLOB_APPEND_LITERAL(ob, "\" title=\"");
html_escape(ob, blob_buffer(title), blob_size(title));
}
BLOB_APPEND_LITERAL(ob, "\" />");
return 1;
}
static int html_line_break(struct Blob *ob, void *opaque){
BLOB_APPEND_LITERAL(ob, "<br />\n");
return 1;
}
static int html_link(
struct Blob *ob,
struct Blob *link,
struct Blob *title,
struct Blob *content,
void *opaque
){
BLOB_APPEND_LITERAL(ob, "<a href=\"");
html_escape(ob, blob_buffer(link), blob_size(link));
if( title && blob_size(title)>0 ){
BLOB_APPEND_LITERAL(ob, "\" title=\"");
html_escape(ob, blob_buffer(title), blob_size(title));
}
BLOB_APPEND_LITERAL(ob, "\">");
BLOB_APPEND_BLOB(ob, content);
BLOB_APPEND_LITERAL(ob, "</a>");
return 1;
}
static int html_triple_emphasis(
struct Blob *ob,
struct Blob *text,
char c,
void *opaque
){
BLOB_APPEND_LITERAL(ob, "<strong><em>");
BLOB_APPEND_BLOB(ob, text);
BLOB_APPEND_LITERAL(ob, "</em></strong>");
return 1;
}
static void html_normal_text(struct Blob *ob, struct Blob *text, void *opaque){
html_escape(ob, blob_buffer(text), blob_size(text));
}
|
| ︙ | ︙ |
Changes to src/name.c.
| ︙ | ︙ | |||
1066 1067 1068 1069 1070 1071 1072 |
describe_artifacts_to_stdout("IN (SELECT rid FROM blob WHERE size<0)", 0);
}
/* Maximum number of collision examples to remember */
#define MAX_COLLIDE 25
/*
| | | < | < < | < < < | 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 |
describe_artifacts_to_stdout("IN (SELECT rid FROM blob WHERE size<0)", 0);
}
/* Maximum number of collision examples to remember */
#define MAX_COLLIDE 25
/*
** Generate a report on the number of collisions in SHA1 hashes
** generated by the SQL given in the argument.
*/
static void collision_report(const char *zSql){
int i, j, kk;
int nHash = 0;
Stmt q;
char zPrev[UUID_SIZE+1];
struct {
int cnt;
char *azHit[MAX_COLLIDE];
char z[UUID_SIZE+1];
} aCollide[UUID_SIZE+1];
memset(aCollide, 0, sizeof(aCollide));
memset(zPrev, 0, sizeof(zPrev));
db_prepare(&q,"%s",zSql/*safe-for-%s*/);
while( db_step(&q)==SQLITE_ROW ){
const char *zUuid = db_column_text(&q,0);
int n = db_column_bytes(&q,0);
int i;
nHash++;
for(i=0; zPrev[i] && zPrev[i]==zUuid[i]; i++){}
if( i>0 && i<=UUID_SIZE ){
if( i>=4 && aCollide[i].cnt<MAX_COLLIDE ){
aCollide[i].azHit[aCollide[i].cnt] = mprintf("%.*s", i, zPrev);
}
aCollide[i].cnt++;
if( aCollide[i].z[0]==0 ) memcpy(aCollide[i].z, zPrev, n+1);
}
memcpy(zPrev, zUuid, n+1);
}
db_finalize(&q);
@ <table border=1><thead>
@ <tr><th>Length<th>Instances<th>First Instance</tr>
@ </thead><tbody>
for(i=1; i<=UUID_SIZE; i++){
if( aCollide[i].cnt==0 ) continue;
@ <tr><td>%d(i)<td>%d(aCollide[i].cnt)<td>%h(aCollide[i].z)</tr>
}
|
| ︙ | ︙ | |||
1129 1130 1131 1132 1133 1134 1135 1136 1137 |
}
for(j=0; j<aCollide[i].cnt && j<MAX_COLLIDE; j++){
char *zId = aCollide[i].azHit[j];
if( zId==0 ) continue;
@ %z(href("%R/whatis/%s",zId))%h(zId)</a>
}
}
style_footer();
}
| > > > > > > > > > > > > > > > > > > > > > > > > | 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 |
}
for(j=0; j<aCollide[i].cnt && j<MAX_COLLIDE; j++){
char *zId = aCollide[i].azHit[j];
if( zId==0 ) continue;
@ %z(href("%R/whatis/%s",zId))%h(zId)</a>
}
}
for(i=4; i<ArraySize(aCollide); i++){
for(j=0; j<aCollide[i].cnt && j<MAX_COLLIDE; j++){
fossil_free(aCollide[i].azHit[j]);
}
}
}
/*
** WEBPAGE: hash-collisions
**
** Show the number of hash collisions for hash prefixes of various lengths.
*/
void hash_collisions_webpage(void){
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_header("SHA1 Prefix Collisions");
style_submenu_element("Activity Reports", 0, "reports");
style_submenu_element("Stats", 0, "stat");
@ <h1>Hash Prefix Collisions on Check-ins</h1>
collision_report("SELECT (SELECT uuid FROM blob WHERE rid=objid)"
" FROM event WHERE event.type='ci'"
" ORDER BY 1");
@ <h1>Hash Prefix Collisions on All Artifacts</h1>
collision_report("SELECT uuid FROM blob ORDER BY 1");
style_footer();
}
|
Added src/piechart.c.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 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 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
/*
** Copyright (c) 2015 D. Richard Hipp
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the Simplified BSD License (also
** known as the "2-Clause License" or "FreeBSD License".)
** This program is distributed in the hope that it will be useful,
** but without any warranty; without even the implied warranty of
** merchantability or fitness for a particular purpose.
**
** Author contact information:
** drh@hwaci.com
** http://www.hwaci.com/drh/
**
*******************************************************************************
**
** This file contains code for generating pie charts on web pages.
**
*/
#include "config.h"
#include "piechart.h"
#include <math.h>
#ifndef M_PI
# define M_PI 3.1415926535897932385
#endif
/*
** Return an RGB color name given HSV values. The HSV values
** must each be between between 0 and 255. The string
** returned is held in a static buffer and is overwritten
** on each call.
*/
const char *rgbName(unsigned char h, unsigned char s, unsigned char v){
static char zColor[8];
unsigned char A, B, C, r, g, b;
unsigned int i, m;
if( s==0 ){
r = g = b = v;
}else{
i = (h*6)/256;
m = (h*6)&0xff;
A = v*(256-s)/256;
B = v*(65536-s*m)/65536;
C = v*(65536-s*(256-m))/65536;
@ <!-- hsv=%d(h),%d(s),%d(v) i=%d(i) m=%d(m) ABC=%d(A),%d(B),%d(C) -->
switch( i ){
case 0: r=v; g=C; b=A; break;
case 1: r=B; g=v; b=A; break;
case 2: r=A; g=v; b=C; break;
case 3: r=A; g=B; b=v; break;
case 4: r=C; g=A; b=v; break;
default: r=v; g=A; b=B; break;
}
}
sqlite3_snprintf(sizeof(zColor),zColor,"#%02x%02x%02x",r,g,b);
return zColor;
}
/*
** Flags that can be passed into the pie-chart generator
*/
#if INTERFACE
#define PIE_OTHER 0x0001 /* No wedge less than 1/60th of the circle */
#define PIE_CHROMATIC 0x0002 /* Wedge colors are in chromatic order */
#define PIE_PERCENT 0x0004 /* Add "(XX%)" marks on each label */
#endif
/*
** A pie-chart wedge label
*/
struct WedgeLabel {
double rCos, rSin; /* Sine and Cosine of center angle of wedge */
char *z; /* Label to draw on this wedge */
};
typedef struct WedgeLabel WedgeLabel;
/*
** Comparison callback for qsort() to sort labels in order of increasing
** distance above and below the horizontal centerline.
*/
static int wedgeCompare(const void *a, const void *b){
const WedgeLabel *pA = (const WedgeLabel*)a;
const WedgeLabel *pB = (const WedgeLabel*)b;
double rA = fabs(pA->rCos);
double rB = fabs(pB->rCos);
if( rA<rB ) return -1;
if( rA>rB ) return +1;
return 0;
}
/*
** Output HTML that will render a pie chart using data from
** the PIECHART temporary table.
**
** The schema for the PIECHART table should be:
**
** CREATE TEMP TABLE piechart(amt REAL, label TEXT);
*/
void piechart_render(int width, int height, unsigned int pieFlags){
Stmt q;
double cx, cy; /* center of the pie */
double r, r2; /* Radius of the pie */
double x1,y1; /* Start of the slice */
double x2,y2; /* End of the slice */
double x3,y3; /* Middle point of the slice */
double x4,y4; /* End of line extending from x3,y3 */
double x5,y5; /* Text anchor */
double d1; /* radius to x4,y4 */
const char *zAnc; /* Anchor point for text */
double a1 = 0.0; /* Angle for first edge of slice */
double a2; /* Angle for second edge */
double a3; /* Angle at middle of slice */
unsigned char h; /* Hue */
const char *zClr; /* Color */
int l; /* Large arc flag */
int j; /* Wedge number */
double rTotal; /* Total piechart.amt */
double rTooSmall; /* Sum of pieChart.amt entries less than 1/60th */
int nTotal; /* Total number of entries in piechart */
int nTooSmall; /* Number of pieChart.amt entries less than 1/60th */
const char *zFg; /* foreground color for lines and text */
int nWedgeAlloc = 0; /* Slots allocated for aWedge[] */
int nWedge = 0; /* Slots used for aWedge[] */
WedgeLabel *aWedge = 0; /* Labels */
double rUprRight; /* Floor for next label in the upper right quadrant */
double rUprLeft; /* Floor for next label in the upper left quadrant */
double rLwrRight; /* Ceiling for label in the lower right quadrant */
double rLwrLeft; /* Ceiling for label in the lower left quadrant */
int i; /* Loop counter looping over wedge labels */
# define SATURATION 128
# define VALUE 192
# define OTHER_CUTOFF 90.0
# define TEXT_HEIGHT 15.0
cx = 0.5*width;
cy = 0.5*height;
r2 = cx<cy ? cx : cy;
r = r2 - 80.0;
if( r<0.33333*r2 ) r = 0.33333*r2;
h = 0;
zFg = skin_detail_boolean("white-foreground") ? "white" : "black";
db_prepare(&q, "SELECT sum(amt), count(*) FROM piechart");
if( db_step(&q)!=SQLITE_ROW ) return;
rTotal = db_column_double(&q, 0);
nTotal = db_column_int(&q, 1);
db_finalize(&q);
rTooSmall = 0.0;
nTooSmall = 0;
if( (pieFlags & PIE_OTHER)!=0 && nTotal>1 ){
db_prepare(&q, "SELECT sum(amt), count(*) FROM piechart WHERE amt<:amt");
db_bind_double(&q, ":amt", rTotal/OTHER_CUTOFF);
if( db_step(&q)==SQLITE_ROW ){
rTooSmall = db_column_double(&q, 0);
nTooSmall = db_column_double(&q, 1);
}
db_finalize(&q);
}
if( nTooSmall>1 ){
db_prepare(&q, "SELECT amt, label FROM piechart WHERE amt>=:limit"
" UNION ALL SELECT %.17g, '%d others';",
rTooSmall, nTooSmall);
db_bind_double(&q, ":limit", rTotal/OTHER_CUTOFF);
nTotal += 1 - nTooSmall;
}else{
db_prepare(&q, "SELECT amt, label FROM piechart");
}
if( nTotal<=10 ) pieFlags |= PIE_CHROMATIC;
for(j=0; db_step(&q)==SQLITE_ROW; j++){
double x = db_column_double(&q,0)/rTotal;
const char *zLbl = db_column_text(&q,1);
/* @ <!-- x=%g(x) zLbl="%h(zLbl)" h=%d(h) --> */
if( x<=0.0 ) continue;
x1 = cx + sin(a1)*r;
y1 = cy - cos(a1)*r;
a2 = a1 + x*2.0*M_PI;
x2 = cx + sin(a2)*r;
y2 = cy - cos(a2)*r;
a3 = 0.5*(a1+a2);
if( nWedge+1>nWedgeAlloc ){
nWedgeAlloc = nWedgeAlloc*2 + 40;
aWedge = fossil_realloc(aWedge, sizeof(aWedge[0])*nWedgeAlloc);
}
if( pieFlags & PIE_PERCENT ){
int pct = (int)(x*100.0 + 0.5);
aWedge[nWedge].z = mprintf("%s (%d%%)", zLbl, pct);
}else{
aWedge[nWedge].z = fossil_strdup(zLbl);
}
aWedge[nWedge].rSin = sin(a3);
aWedge[nWedge].rCos = cos(a3);
nWedge++;
if( (j&1)==0 || (pieFlags & PIE_CHROMATIC)!=0 ){
h = 256*j/nTotal;
}else if( j+2<nTotal ){
h = 256*(j+2)/nTotal;
}else{
h = 256*((j+2+(nTotal&1))%nTotal)/nTotal;
}
zClr = rgbName(h,SATURATION,VALUE);
l = x>=0.5;
a1 = a2;
@ <path class='piechartWedge'
@ stroke="black" stroke-width="1" fill="%s(zClr)"
@ d='M%g(cx),%g(cy)L%g(x1),%g(y1)A%g(r),%g(r) 0 %d(l),1 %g(x2),%g(y2)z'/>
}
qsort(aWedge, nWedge, sizeof(aWedge[0]), wedgeCompare);
rUprLeft = height;
rLwrLeft = 0;
rUprRight = height;
rLwrRight = 0;
d1 = r*1.1;
for(i=0; i<nWedge; i++){
WedgeLabel *p = &aWedge[i];
x3 = cx + p->rSin*r;
y3 = cy - p->rCos*r;
x4 = cx + p->rSin*d1;
y4 = cy - p->rCos*d1;
if( y4<=cy ){
if( x4>=cx ){
if( y4>rUprRight ){
y4 = rUprRight;
}
rUprRight = y4 - TEXT_HEIGHT;
}else{
if( y4>rUprLeft ){
y4 = rUprLeft;
}
rUprLeft = y4 - TEXT_HEIGHT;
}
}else{
if( x4>=cx ){
if( y4<rLwrRight ){
y4 = rLwrRight;
}
rLwrRight = y4 + TEXT_HEIGHT;
}else{
if( y4<rLwrLeft ){
y4 = rLwrLeft;
}
rLwrLeft = y4 + TEXT_HEIGHT;
}
}
if( x4<=cx ){
x5 = x4 - 1.0;
zAnc = "end";
}else{
x5 = x4 + 1.0;
zAnc = "start";
}
y5 = y4 - 3.0 + 6.0*(1.0 - p->rCos);
@ <line stroke-width='1' stroke='%s(zFg)' class='piechartLine'
@ x1='%g(x3)' y1='%g(y3)' x2='%g(x4)' y2='%g(y4)''/>
@ <text text-anchor="%s(zAnc)" fill='%s(zFg)' class="piechartLabel"
@ x='%g(x5)' y='%g(y5)'>%h(p->z)</text>
fossil_free(p->z);
}
db_finalize(&q);
fossil_free(aWedge);
}
/*
** WEBPAGE: test-piechart
**
** Generate a pie-chart based on data input from a form.
*/
void piechart_test_page(void){
const char *zData;
Stmt ins, q;
Blob all, line, token1, token2;
int n = 0;
int width;
int height;
login_check_credentials();
style_header("Pie Chart Test");
db_multi_exec("CREATE TEMP TABLE piechart(amt REAL, label TEXT);");
db_prepare(&ins, "INSERT INTO piechart(amt,label) VALUES(:amt,:label)");
zData = PD("data","");
width = atoi(PD("width","800"));
height = atoi(PD("height","400"));
blob_init(&all, zData, -1);
while( blob_line(&all, &line) ){
double rAmt;
if( blob_token(&line, &token1)==0 ) continue;
rAmt = atof(blob_str(&token1));
if( rAmt<=0.0 ) continue;
blob_tail(&line, &token2);
db_bind_double(&ins, ":amt", rAmt);
db_bind_text(&ins, ":label", blob_str(&token2));
db_step(&ins);
db_reset(&ins);
n++;
}
db_finalize(&ins);
blob_reset(&all);
if( n>0 ){
@ <svg width=%d(width) height=%d(height) style="border:1px solid #d3d3d3;">
piechart_render(width,height, PIE_OTHER);
@ </svg>
@ <hr>
}
@ <form method="post" action='%R/test-piechart'>
@ <p>One slice per line. Value and then Label.<p>
@ <textarea name='data' rows='20' cols='80'>%h(zData)</textarea><br/>
@ Width: <input type='text' size='8' name='width' value='%d(width)'/>
@ Height: <input type='text' size='8' name='height' value='%d(height)'/><br/>
@ <input type='hidden' name='width' value='%d(width)'/>
@ <input type='hidden' name='height' value='%d(height)'/>
@ <input type='submit' value='Draw The Pie Chart'/>
@ </form>
@ <hr><p>Previous Data:</p>
@ <table border="1">
db_prepare(&q, "SELECT rowid, amt, label FROM piechart");
while( db_step(&q)==SQLITE_ROW ){
@ <tr><td>%d(db_column_int(&q,0))</td>
@ <td>%g(db_column_double(&q,1))</td>
@ <td>%h(db_column_text(&q,2))</td></tr>
}
db_finalize(&q);
@ </table>
style_footer();
}
|
Changes to src/rebuild.c.
| ︙ | ︙ | |||
520 521 522 523 524 525 526 | ** Usage: %fossil rebuild ?REPOSITORY? ?OPTIONS? ** ** Reconstruct the named repository database from the core ** records. Run this command after updating the fossil ** executable in a way that changes the database schema. ** ** Options: | | | | > | | | | | | | | | | | | > > > | > | | | | > | 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 |
** Usage: %fossil rebuild ?REPOSITORY? ?OPTIONS?
**
** Reconstruct the named repository database from the core
** records. Run this command after updating the fossil
** executable in a way that changes the database schema.
**
** Options:
** --analyze Run ANALYZE on the database after rebuilding
** --cluster Compute clusters for unclustered artifacts
** --compress Strive to make the database as small as possible
** --compress-only Skip the rebuilding step. Do --compress only
** --deanalyze Remove ANALYZE tables from the database
** --force Force the rebuild to complete even if errors are seen
** --ifneeded Only do the rebuild if it would change the schema version
** --index Always add in the full-text search index
** --noverify Skip the verification of changes to the BLOB table
** --noindex Always omit the full-text search index
** --pagesize N Set the database pagesize to N. (512..65536 and power of 2)
** --randomize Scan artifacts in a random order
** --stats Show artifact statistics after rebuilding
** --vacuum Run VACUUM on the database after rebuilding
** --wal Set Write-Ahead-Log journalling mode on the database
**
** See also: deconstruct, reconstruct
*/
void rebuild_database(void){
int forceFlag;
int randomizeFlag;
int errCnt = 0;
int omitVerify;
int doClustering;
const char *zPagesize;
int newPagesize = 0;
int activateWal;
int runVacuum;
int runDeanalyze;
int runAnalyze;
int runCompress;
int showStats;
int runReindex;
int optNoIndex;
int optIndex;
int optIfNeeded;
int compressOnlyFlag;
omitVerify = find_option("noverify",0,0)!=0;
forceFlag = find_option("force","f",0)!=0;
randomizeFlag = find_option("randomize", 0, 0)!=0;
doClustering = find_option("cluster", 0, 0)!=0;
runVacuum = find_option("vacuum",0,0)!=0;
runDeanalyze = find_option("deanalyze",0,0)!=0;
runAnalyze = find_option("analyze",0,0)!=0;
runCompress = find_option("compress",0,0)!=0;
zPagesize = find_option("pagesize",0,1);
showStats = find_option("stats",0,0)!=0;
optIndex = find_option("index",0,0)!=0;
optNoIndex = find_option("noindex",0,0)!=0;
optIfNeeded = find_option("ifneeded",0,0)!=0;
compressOnlyFlag = find_option("compress-only",0,0)!=0;
if( compressOnlyFlag ) runCompress = runVacuum = 1;
if( zPagesize ){
newPagesize = atoi(zPagesize);
if( newPagesize<512 || newPagesize>65536
|| (newPagesize&(newPagesize-1))!=0
){
fossil_fatal("page size must be a power of two between 512 and 65536");
}
}
activateWal = find_option("wal",0,0)!=0;
if( g.argc==3 ){
db_open_repository(g.argv[2]);
}else{
db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
if( g.argc!=2 ){
usage("?REPOSITORY-FILENAME?");
}
db_close(1);
db_open_repository(g.zRepositoryName);
}
runReindex = search_index_exists() && !compressOnlyFlag;
if( optIndex ) runReindex = 1;
if( optNoIndex ) runReindex = 0;
if( optIfNeeded && fossil_strcmp(db_get("aux-schema",""),AUX_SCHEMA_MAX)==0 ){
return;
}
/* We should be done with options.. */
verify_all_options();
db_begin_transaction();
if( !compressOnlyFlag ){
search_drop_index();
ttyOutput = 1;
errCnt = rebuild_db(randomizeFlag, 1, doClustering);
reconstruct_private_table();
}
db_multi_exec(
"REPLACE INTO config(name,value,mtime) VALUES('content-schema',%Q,now());"
"REPLACE INTO config(name,value,mtime) VALUES('aux-schema',%Q,now());"
"REPLACE INTO config(name,value,mtime) VALUES('rebuilt',%Q,now());",
CONTENT_SCHEMA, AUX_SCHEMA_MAX, get_version()
);
if( errCnt && !forceFlag ){
|
| ︙ | ︙ |
Changes to src/search.c.
| ︙ | ︙ | |||
100 101 102 103 104 105 106 |
if( p!=&gSearch ) fossil_free(p);
}
}
/*
** Compile a search pattern
*/
| | | 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
if( p!=&gSearch ) fossil_free(p);
}
}
/*
** Compile a search pattern
*/
static Search *search_init(
const char *zPattern, /* The search pattern */
const char *zMarkBegin, /* Start of a match */
const char *zMarkEnd, /* End of a match */
const char *zMarkGap, /* A gap between two matches */
unsigned fSrchFlg /* Flags */
){
Search *p;
|
| ︙ | ︙ |
Changes to src/sqlite3.c.
1 2 | /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite | | | 1 2 3 4 5 6 7 8 9 10 | /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite ** version 3.8.10.1. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a single translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements ** of 5% or more are commonly seen when SQLite is compiled as a single ** translation unit. ** ** This file is all you need to compile SQLite. To use SQLite in other |
| ︙ | ︙ | |||
314 315 316 317 318 319 320 | ** string contains the date and time of the check-in (UTC) and an SHA1 ** hash of the entire source tree. ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ | | | | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 | ** string contains the date and time of the check-in (UTC) and an SHA1 ** hash of the entire source tree. ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ #define SQLITE_VERSION "3.8.10.1" #define SQLITE_VERSION_NUMBER 3008010 #define SQLITE_SOURCE_ID "2015-05-09 12:14:55 05b4b1f2a937c06c90db70c09890038f6c98ec40" /* ** CAPI3REF: Run-Time Library Version Numbers ** KEYWORDS: sqlite3_version, sqlite3_sourceid ** ** These interfaces provide the same information as the [SQLITE_VERSION], ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros |
| ︙ | ︙ | |||
14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 | "ENABLE_ATOMIC_WRITE", #endif #if SQLITE_ENABLE_CEROD "ENABLE_CEROD", #endif #if SQLITE_ENABLE_COLUMN_METADATA "ENABLE_COLUMN_METADATA", #endif #if SQLITE_ENABLE_EXPENSIVE_ASSERT "ENABLE_EXPENSIVE_ASSERT", #endif #if SQLITE_ENABLE_FTS1 "ENABLE_FTS1", #endif | > > > | 14121 14122 14123 14124 14125 14126 14127 14128 14129 14130 14131 14132 14133 14134 14135 14136 14137 | "ENABLE_ATOMIC_WRITE", #endif #if SQLITE_ENABLE_CEROD "ENABLE_CEROD", #endif #if SQLITE_ENABLE_COLUMN_METADATA "ENABLE_COLUMN_METADATA", #endif #if SQLITE_ENABLE_DBSTAT_VTAB "ENABLE_DBSTAT_VTAB", #endif #if SQLITE_ENABLE_EXPENSIVE_ASSERT "ENABLE_EXPENSIVE_ASSERT", #endif #if SQLITE_ENABLE_FTS1 "ENABLE_FTS1", #endif |
| ︙ | ︙ | |||
155329 155330 155331 155332 155333 155334 155335 155336 155337 155338 155339 155340 155341 155342 155343 155344 155345 155346 155347 155348 155349 155350 155351 155352 155353 155354 155355 155356 155357 155358 155359 155360 155361 155362 155363 155364 155365 155366 155367 155368 155369 155370 155371 |
i64 iOffset; /* Value of 'pgOffset' column */
int szPage; /* Value of 'pgSize' column */
};
struct StatTable {
sqlite3_vtab base;
sqlite3 *db;
};
#ifndef get2byte
# define get2byte(x) ((x)[0]<<8 | (x)[1])
#endif
/*
** Connect to or create a statvfs virtual table.
*/
static int statConnect(
sqlite3 *db,
void *pAux,
int argc, const char *const*argv,
sqlite3_vtab **ppVtab,
char **pzErr
){
StatTable *pTab = 0;
int rc = SQLITE_OK;
rc = sqlite3_declare_vtab(db, VTAB_SCHEMA);
if( rc==SQLITE_OK ){
pTab = (StatTable *)sqlite3_malloc64(sizeof(StatTable));
if( pTab==0 ) rc = SQLITE_NOMEM;
}
assert( rc==SQLITE_OK || pTab==0 );
if( rc==SQLITE_OK ){
memset(pTab, 0, sizeof(StatTable));
pTab->db = db;
}
*ppVtab = (sqlite3_vtab*)pTab;
return rc;
}
/*
| > > > > > > > > > > > > | 155332 155333 155334 155335 155336 155337 155338 155339 155340 155341 155342 155343 155344 155345 155346 155347 155348 155349 155350 155351 155352 155353 155354 155355 155356 155357 155358 155359 155360 155361 155362 155363 155364 155365 155366 155367 155368 155369 155370 155371 155372 155373 155374 155375 155376 155377 155378 155379 155380 155381 155382 155383 155384 155385 155386 |
i64 iOffset; /* Value of 'pgOffset' column */
int szPage; /* Value of 'pgSize' column */
};
struct StatTable {
sqlite3_vtab base;
sqlite3 *db;
int iDb; /* Index of database to analyze */
};
#ifndef get2byte
# define get2byte(x) ((x)[0]<<8 | (x)[1])
#endif
/*
** Connect to or create a statvfs virtual table.
*/
static int statConnect(
sqlite3 *db,
void *pAux,
int argc, const char *const*argv,
sqlite3_vtab **ppVtab,
char **pzErr
){
StatTable *pTab = 0;
int rc = SQLITE_OK;
int iDb;
if( argc>=4 ){
iDb = sqlite3FindDbName(db, argv[3]);
if( iDb<0 ){
*pzErr = sqlite3_mprintf("no such database: %s", argv[3]);
return SQLITE_ERROR;
}
}else{
iDb = 0;
}
rc = sqlite3_declare_vtab(db, VTAB_SCHEMA);
if( rc==SQLITE_OK ){
pTab = (StatTable *)sqlite3_malloc64(sizeof(StatTable));
if( pTab==0 ) rc = SQLITE_NOMEM;
}
assert( rc==SQLITE_OK || pTab==0 );
if( rc==SQLITE_OK ){
memset(pTab, 0, sizeof(StatTable));
pTab->db = db;
pTab->iDb = iDb;
}
*ppVtab = (sqlite3_vtab*)pTab;
return rc;
}
/*
|
| ︙ | ︙ | |||
155412 155413 155414 155415 155416 155417 155418 155419 155420 155421 |
StatCursor *pCsr;
int rc;
pCsr = (StatCursor *)sqlite3_malloc64(sizeof(StatCursor));
if( pCsr==0 ){
rc = SQLITE_NOMEM;
}else{
memset(pCsr, 0, sizeof(StatCursor));
pCsr->base.pVtab = pVTab;
| > | | > | > > > | | > | 155427 155428 155429 155430 155431 155432 155433 155434 155435 155436 155437 155438 155439 155440 155441 155442 155443 155444 155445 155446 155447 155448 155449 155450 155451 155452 155453 155454 155455 155456 |
StatCursor *pCsr;
int rc;
pCsr = (StatCursor *)sqlite3_malloc64(sizeof(StatCursor));
if( pCsr==0 ){
rc = SQLITE_NOMEM;
}else{
char *zSql;
memset(pCsr, 0, sizeof(StatCursor));
pCsr->base.pVtab = pVTab;
zSql = sqlite3_mprintf(
"SELECT 'sqlite_master' AS name, 1 AS rootpage, 'table' AS type"
" UNION ALL "
"SELECT name, rootpage, type"
" FROM \"%w\".sqlite_master WHERE rootpage!=0"
" ORDER BY name", pTab->db->aDb[pTab->iDb].zName);
if( zSql==0 ){
rc = SQLITE_NOMEM;
}else{
rc = sqlite3_prepare_v2(pTab->db, zSql, -1, &pCsr->pStmt, 0);
sqlite3_free(zSql);
}
if( rc!=SQLITE_OK ){
sqlite3_free(pCsr);
pCsr = 0;
}
}
*ppCursor = (sqlite3_vtab_cursor *)pCsr;
|
| ︙ | ︙ | |||
155587 155588 155589 155590 155591 155592 155593 |
/*
** Populate the pCsr->iOffset and pCsr->szPage member variables. Based on
** the current value of pCsr->iPageno.
*/
static void statSizeAndOffset(StatCursor *pCsr){
StatTable *pTab = (StatTable *)((sqlite3_vtab_cursor *)pCsr)->pVtab;
| | | > | | > | 155608 155609 155610 155611 155612 155613 155614 155615 155616 155617 155618 155619 155620 155621 155622 155623 155624 155625 155626 155627 155628 155629 155630 155631 155632 155633 155634 155635 155636 155637 155638 155639 155640 155641 155642 155643 155644 155645 155646 155647 155648 155649 155650 155651 155652 155653 155654 155655 155656 155657 155658 155659 155660 155661 155662 155663 155664 155665 155666 155667 155668 155669 155670 155671 155672 155673 |
/*
** Populate the pCsr->iOffset and pCsr->szPage member variables. Based on
** the current value of pCsr->iPageno.
*/
static void statSizeAndOffset(StatCursor *pCsr){
StatTable *pTab = (StatTable *)((sqlite3_vtab_cursor *)pCsr)->pVtab;
Btree *pBt = pTab->db->aDb[pTab->iDb].pBt;
Pager *pPager = sqlite3BtreePager(pBt);
sqlite3_file *fd;
sqlite3_int64 x[2];
/* The default page size and offset */
pCsr->szPage = sqlite3BtreeGetPageSize(pBt);
pCsr->iOffset = (i64)pCsr->szPage * (pCsr->iPageno - 1);
/* If connected to a ZIPVFS backend, override the page size and
** offset with actual values obtained from ZIPVFS.
*/
fd = sqlite3PagerFile(pPager);
x[0] = pCsr->iPageno;
if( fd->pMethods!=0 && sqlite3OsFileControl(fd, 230440, &x)==SQLITE_OK ){
pCsr->iOffset = x[0];
pCsr->szPage = (int)x[1];
}
}
/*
** Move a statvfs cursor to the next entry in the file.
*/
static int statNext(sqlite3_vtab_cursor *pCursor){
int rc;
int nPayload;
char *z;
StatCursor *pCsr = (StatCursor *)pCursor;
StatTable *pTab = (StatTable *)pCursor->pVtab;
Btree *pBt = pTab->db->aDb[pTab->iDb].pBt;
Pager *pPager = sqlite3BtreePager(pBt);
sqlite3_free(pCsr->zPath);
pCsr->zPath = 0;
statNextRestart:
if( pCsr->aPage[0].pPg==0 ){
rc = sqlite3_step(pCsr->pStmt);
if( rc==SQLITE_ROW ){
int nPage;
u32 iRoot = (u32)sqlite3_column_int64(pCsr->pStmt, 1);
sqlite3PagerPagecount(pPager, &nPage);
if( nPage==0 ){
pCsr->isEof = 1;
return sqlite3_reset(pCsr->pStmt);
}
rc = sqlite3PagerGet(pPager, iRoot, &pCsr->aPage[0].pPg);
pCsr->aPage[0].iPgno = iRoot;
pCsr->aPage[0].iCell = 0;
pCsr->aPage[0].zPath = z = sqlite3_mprintf("/");
pCsr->iPage = 0;
if( z==0 ) rc = SQLITE_NOMEM;
}else{
pCsr->isEof = 1;
return sqlite3_reset(pCsr->pStmt);
}
}else{
/* Page p itself has already been visited. */
|
| ︙ | ︙ | |||
155659 155660 155661 155662 155663 155664 155665 |
sqlite3BtreeGetReserveNoMutex(pBt);
sqlite3BtreeLeave(pBt);
pCsr->zName = (char *)sqlite3_column_text(pCsr->pStmt, 0);
pCsr->iPageno = pCell->aOvfl[pCell->iOvfl];
pCsr->zPagetype = "overflow";
pCsr->nCell = 0;
pCsr->nMxPayload = 0;
| | | | 155682 155683 155684 155685 155686 155687 155688 155689 155690 155691 155692 155693 155694 155695 155696 155697 155698 155699 155700 155701 155702 155703 155704 155705 155706 155707 155708 |
sqlite3BtreeGetReserveNoMutex(pBt);
sqlite3BtreeLeave(pBt);
pCsr->zName = (char *)sqlite3_column_text(pCsr->pStmt, 0);
pCsr->iPageno = pCell->aOvfl[pCell->iOvfl];
pCsr->zPagetype = "overflow";
pCsr->nCell = 0;
pCsr->nMxPayload = 0;
pCsr->zPath = z = sqlite3_mprintf(
"%s%.3x+%.6x", p->zPath, p->iCell, pCell->iOvfl
);
if( pCell->iOvfl<pCell->nOvfl-1 ){
pCsr->nUnused = 0;
pCsr->nPayload = nUsable - 4;
}else{
pCsr->nPayload = pCell->nLastOvfl;
pCsr->nUnused = nUsable - 4 - pCsr->nPayload;
}
pCell->iOvfl++;
statSizeAndOffset(pCsr);
return z==0 ? SQLITE_NOMEM : SQLITE_OK;
}
if( p->iRightChildPg ) break;
p->iCell++;
}
if( !p->iRightChildPg || p->iCell>p->nCell ){
statClearPage(p);
|
| ︙ | ︙ | |||
155693 155694 155695 155696 155697 155698 155699 |
if( p->iCell==p->nCell ){
p[1].iPgno = p->iRightChildPg;
}else{
p[1].iPgno = p->aCell[p->iCell].iChildPg;
}
rc = sqlite3PagerGet(pPager, p[1].iPgno, &p[1].pPg);
p[1].iCell = 0;
| | > | 155716 155717 155718 155719 155720 155721 155722 155723 155724 155725 155726 155727 155728 155729 155730 155731 155732 |
if( p->iCell==p->nCell ){
p[1].iPgno = p->iRightChildPg;
}else{
p[1].iPgno = p->aCell[p->iCell].iChildPg;
}
rc = sqlite3PagerGet(pPager, p[1].iPgno, &p[1].pPg);
p[1].iCell = 0;
p[1].zPath = z = sqlite3_mprintf("%s%.3x/", p->zPath, p->iCell);
p->iCell++;
if( z==0 ) rc = SQLITE_NOMEM;
}
/* Populate the StatCursor fields with the values to be returned
** by the xColumn() and xRowid() methods.
*/
if( rc==SQLITE_OK ){
|
| ︙ | ︙ | |||
155727 155728 155729 155730 155731 155732 155733 |
default:
pCsr->zPagetype = "corrupted";
break;
}
pCsr->nCell = p->nCell;
pCsr->nUnused = p->nUnused;
pCsr->nMxPayload = p->nMxPayload;
| | > | 155751 155752 155753 155754 155755 155756 155757 155758 155759 155760 155761 155762 155763 155764 155765 155766 |
default:
pCsr->zPagetype = "corrupted";
break;
}
pCsr->nCell = p->nCell;
pCsr->nUnused = p->nUnused;
pCsr->nMxPayload = p->nMxPayload;
pCsr->zPath = z = sqlite3_mprintf("%s", p->zPath);
if( z==0 ) rc = SQLITE_NOMEM;
nPayload = 0;
for(i=0; i<p->nCell; i++){
nPayload += p->aCell[i].nLocal;
}
pCsr->nPayload = nPayload;
}
}
|
| ︙ | ︙ | |||
155763 155764 155765 155766 155767 155768 155769 |
sqlite3_vtab_cursor *pCursor,
sqlite3_context *ctx,
int i
){
StatCursor *pCsr = (StatCursor *)pCursor;
switch( i ){
case 0: /* name */
| | | 155788 155789 155790 155791 155792 155793 155794 155795 155796 155797 155798 155799 155800 155801 155802 |
sqlite3_vtab_cursor *pCursor,
sqlite3_context *ctx,
int i
){
StatCursor *pCsr = (StatCursor *)pCursor;
switch( i ){
case 0: /* name */
sqlite3_result_text(ctx, pCsr->zName, -1, SQLITE_TRANSIENT);
break;
case 1: /* path */
sqlite3_result_text(ctx, pCsr->zPath, -1, SQLITE_TRANSIENT);
break;
case 2: /* pageno */
sqlite3_result_int64(ctx, pCsr->iPageno);
break;
|
| ︙ | ︙ | |||
155789 155790 155791 155792 155793 155794 155795 |
break;
case 7: /* mx_payload */
sqlite3_result_int(ctx, pCsr->nMxPayload);
break;
case 8: /* pgoffset */
sqlite3_result_int64(ctx, pCsr->iOffset);
break;
| | > | 155814 155815 155816 155817 155818 155819 155820 155821 155822 155823 155824 155825 155826 155827 155828 155829 |
break;
case 7: /* mx_payload */
sqlite3_result_int(ctx, pCsr->nMxPayload);
break;
case 8: /* pgoffset */
sqlite3_result_int64(ctx, pCsr->iOffset);
break;
default: /* pgsize */
assert( i==9 );
sqlite3_result_int(ctx, pCsr->szPage);
break;
}
return SQLITE_OK;
}
static int statRowid(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){
|
| ︙ | ︙ |
Changes to src/sqlite3.h.
| ︙ | ︙ | |||
107 108 109 110 111 112 113 | ** string contains the date and time of the check-in (UTC) and an SHA1 ** hash of the entire source tree. ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ | | | | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | ** string contains the date and time of the check-in (UTC) and an SHA1 ** hash of the entire source tree. ** ** See also: [sqlite3_libversion()], ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ #define SQLITE_VERSION "3.8.10.1" #define SQLITE_VERSION_NUMBER 3008010 #define SQLITE_SOURCE_ID "2015-05-09 12:14:55 05b4b1f2a937c06c90db70c09890038f6c98ec40" /* ** CAPI3REF: Run-Time Library Version Numbers ** KEYWORDS: sqlite3_version, sqlite3_sourceid ** ** These interfaces provide the same information as the [SQLITE_VERSION], ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros |
| ︙ | ︙ |
Changes to src/stat.c.
| ︙ | ︙ | |||
34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
sqlite3_snprintf(nOut, zOut, "%lld bytes (%.1fMB)",
v, (double)v/1000000.0);
}else{
sqlite3_snprintf(nOut, zOut, "%lld bytes (%.1fGB)",
v, (double)v/1000000000.0);
}
}
/*
** WEBPAGE: stat
**
** Show statistics and global information about the repository.
*/
void stat_page(void){
| > > > > > > > > > > > > > > > | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
sqlite3_snprintf(nOut, zOut, "%lld bytes (%.1fMB)",
v, (double)v/1000000.0);
}else{
sqlite3_snprintf(nOut, zOut, "%lld bytes (%.1fGB)",
v, (double)v/1000000000.0);
}
}
/*
** Return the approximate size as KB, MB, GB, or TB.
*/
void approxSizeName(int nOut, char *zOut, sqlite3_int64 v){
if( v<1000 ){
sqlite3_snprintf(nOut, zOut, "%lld bytes", v);
}else if( v<1000000 ){
sqlite3_snprintf(nOut, zOut, "%.1fKB", (double)v/1000.0);
}else if( v<1000000000 ){
sqlite3_snprintf(nOut, zOut, "%.1fMB", (double)v/1000000.0);
}else{
sqlite3_snprintf(nOut, zOut, "%.1fGB", (double)v/1000000000.0);
}
}
/*
** WEBPAGE: stat
**
** Show statistics and global information about the repository.
*/
void stat_page(void){
|
| ︙ | ︙ | |||
61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
if( g.perm.Admin ){
style_submenu_element("URLs", "URLs and Checkouts", "urllist");
style_submenu_element("Schema", "Repository Schema", "repo_schema");
style_submenu_element("Web-Cache", "Web-Cache Stats", "cachestat");
}
style_submenu_element("Activity Reports", 0, "reports");
style_submenu_element("SHA1 Collisions", 0, "hash-collisions");
@ <table class="label-value">
@ <tr><th>Repository Size:</th><td>
fsize = file_size(g.zRepositoryName);
bigSizeName(sizeof(zBuf), zBuf, fsize);
@ %s(zBuf)
@ </td></tr>
if( !brief ){
| > > > | 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
if( g.perm.Admin ){
style_submenu_element("URLs", "URLs and Checkouts", "urllist");
style_submenu_element("Schema", "Repository Schema", "repo_schema");
style_submenu_element("Web-Cache", "Web-Cache Stats", "cachestat");
}
style_submenu_element("Activity Reports", 0, "reports");
style_submenu_element("SHA1 Collisions", 0, "hash-collisions");
if( sqlite3_libversion_number()>=3008010 ){
style_submenu_element("Table Sizes", 0, "repo-tabsize");
}
@ <table class="label-value">
@ <tr><th>Repository Size:</th><td>
fsize = file_size(g.zRepositoryName);
bigSizeName(sizeof(zBuf), zBuf, fsize);
@ %s(zBuf)
@ </td></tr>
if( !brief ){
|
| ︙ | ︙ | |||
353 354 355 356 357 358 359 |
while( db_step(&q)==SQLITE_ROW ){
@ %h(db_column_text(&q, 0));
}
@ </pre>
db_finalize(&q);
style_footer();
}
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 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 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 |
while( db_step(&q)==SQLITE_ROW ){
@ %h(db_column_text(&q, 0));
}
@ </pre>
db_finalize(&q);
style_footer();
}
/*
** WEBPAGE: repo-tabsize
**
** Show relative sizes of tables in the repository database.
*/
void repo_tabsize_page(void){
int nPageFree;
sqlite3_int64 fsize;
char zBuf[100];
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
style_header("Repository Table Sizes");
style_adunit_config(ADUNIT_RIGHT_OK);
style_submenu_element("Stat", "Repository Stats", "stat");
db_multi_exec(
"CREATE VIRTUAL TABLE temp.dbx USING dbstat(%s);"
"CREATE TEMP TABLE trans(name TEXT PRIMARY KEY, tabname TEXT)WITHOUT ROWID;"
"INSERT INTO trans(name,tabname)"
" SELECT name, tbl_name FROM %s.sqlite_master;"
"CREATE TEMP TABLE piechart(amt REAL, label TEXT);"
"INSERT INTO piechart(amt,label)"
" SELECT count(*), "
" coalesce((SELECT tabname FROM trans WHERE trans.name=dbx.name),name)"
" FROM dbx"
" GROUP BY 2 ORDER BY 2;",
db_name("repository"), db_name("repository")
);
nPageFree = db_int(0, "PRAGMA \"%w\".freelist_count", db_name("repository"));
if( nPageFree>0 ){
db_multi_exec(
"INSERT INTO piechart(amt,label) VALUES(%d,'freelist')",
nPageFree
);
}
fsize = file_size(g.zRepositoryName);
approxSizeName(sizeof(zBuf), zBuf, fsize);
@ <h2>Repository Size: %s(zBuf)</h2>
@ <center><svg width='800' height='500'>
piechart_render(800,500,PIE_OTHER|PIE_PERCENT);
@ </svg></center>
if( g.localOpen ){
db_multi_exec(
"DROP TABLE temp.dbx;"
"CREATE VIRTUAL TABLE temp.dbx USING dbstat(%s);"
"DELETE FROM trans;"
"INSERT INTO trans(name,tabname)"
" SELECT name, tbl_name FROM %s.sqlite_master;"
"DELETE FROM piechart;"
"INSERT INTO piechart(amt,label)"
" SELECT count(*), "
" coalesce((SELECT tabname FROM trans WHERE trans.name=dbx.name),name)"
" FROM dbx"
" GROUP BY 2 ORDER BY 2;",
db_name("localdb"), db_name("localdb")
);
nPageFree = db_int(0, "PRAGMA \"%s\".freelist_count", db_name("localdb"));
if( nPageFree>0 ){
db_multi_exec(
"INSERT INTO piechart(amt,label) VALUES(%d,'freelist')",
nPageFree
);
}
fsize = file_size(g.zLocalDbName);
approxSizeName(sizeof(zBuf), zBuf, fsize);
@ <h2>%h(file_tail(g.zLocalDbName)) Size: %s(zBuf)</h2>
@ <center><svg width='800' height='500'>
piechart_render(800,500,PIE_OTHER|PIE_PERCENT);
@ </svg></center>
}
style_footer();
}
|
Changes to src/statrep.c.
| ︙ | ︙ | |||
139 140 141 142 143 144 145 |
case 'g':
return "tag changes";
default:
return "all types";
}
}
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 |
case 'g':
return "tag changes";
default:
return "all types";
}
}
/*
** Helper for stats_report_by_month_year(), which generates a list of
** week numbers. zTimeframe should be either a timeframe in the form YYYY
** or YYYY-MM.
*/
static void stats_report_output_week_links(const char *zTimeframe){
|
| ︙ | ︙ | |||
225 226 227 228 229 230 231 | } db_finalize(&stWeek); } /* ** Implements the "byyear" and "bymonth" reports for /reports. ** If includeMonth is true then it generates the "bymonth" report, | | | < < > < | < < | > > > | | | > > > | > > | < | < < < < < < | < | 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
}
db_finalize(&stWeek);
}
/*
** Implements the "byyear" and "bymonth" reports for /reports.
** If includeMonth is true then it generates the "bymonth" report,
** else the "byyear" report. If zUserName is not NULL then the report is
** restricted to events created by the named user account.
*/
static void stats_report_by_month_year(char includeMonth,
char includeWeeks,
const char *zUserName){
Stmt query = empty_Stmt;
int nRowNumber = 0; /* current TR number */
int nEventTotal = 0; /* Total event count */
int rowClass = 0; /* counter for alternating
row colors */
const char *zTimeLabel = includeMonth ? "Year/Month" : "Year";
char zPrevYear[5] = {0}; /* For keeping track of when
we change years while looping */
int nEventsPerYear = 0; /* Total event count for the
current year */
char showYearTotal = 0; /* Flag telling us when to show
the per-year event totals */
Blob header = empty_blob; /* Page header text */
int nMaxEvents = 1; /* for calculating length of graph
bars. */
int iterations = 0; /* number of weeks/months we iterate
over */
Blob userFilter = empty_blob; /* Optional user=johndoe query string */
stats_report_init_view();
if( zUserName ){
blob_appendf(&userFilter, "user=%s", zUserName);
}
blob_reset(&userFilter);
db_prepare(&query,
"SELECT substr(date(mtime),1,%d) AS timeframe,"
" count(*) AS eventCount"
" FROM v_reports"
" WHERE ifnull(coalesce(euser,user,'')=%Q,1)"
" GROUP BY timeframe"
" ORDER BY timeframe DESC",
includeMonth ? 7 : 4, zUserName);
@ <h1>Timeline Events (%s(stats_report_label_for_type()))
@ by year%s(includeMonth ? "/month" : "")
if( zUserName ){
@ for user %h(zUserName)
}
@ </h1>
@ <table class='statistics-report-table-events' border='0' cellpadding='2'
@ cellspacing='0' id='statsTable'>
@ <thead>
@ <th>%s(zTimeLabel)</th>
@ <th>Events</th>
@ <th width='90%%'><!-- relative commits graph --></th>
@ </thead><tbody>
/*
Run the query twice. The first time we calculate the maximum
number of events for a given row. Maybe someone with better SQL
Fu can re-implement this with a single query.
*/
while( SQLITE_ROW == db_step(&query) ){
const int nCount = db_column_int(&query, 1);
|
| ︙ | ︙ | |||
333 334 335 336 337 338 339 |
cgi_printf("<a href='%R/timeline?"
"ym=%t&n=%d&y=%s",
zTimeframe, nCount,
statsReportTimelineYFlag );
/* Reminder: n=nCount is not actually correct for bymonth unless
that was the only user who caused events.
*/
| | | | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
cgi_printf("<a href='%R/timeline?"
"ym=%t&n=%d&y=%s",
zTimeframe, nCount,
statsReportTimelineYFlag );
/* Reminder: n=nCount is not actually correct for bymonth unless
that was the only user who caused events.
*/
if( zUserName ){
cgi_printf("&u=%t", zUserName);
}
cgi_printf("' target='_new'>%s</a>",zTimeframe);
}else {
cgi_printf("<a href='?view=byweek&y=%s&type=%c",
zTimeframe, (char)statsReportType);
if( zUserName ){
cgi_printf("&u=%t", zUserName);
}
cgi_printf("'>%s</a>", zTimeframe);
}
@ </td><td>%d(nCount)</td>
@ <td>
@ <div class='statistics-report-graph-line'
|
| ︙ | ︙ | |||
401 402 403 404 405 406 407 |
int nRowNumber = 0; /* current TR number */
int nEventTotal = 0; /* Total event count */
int rowClass = 0; /* counter for alternating
row colors */
int nMaxEvents = 1; /* max number of events for
all rows. */
stats_report_init_view();
| < < < < < < > > > > > > > > > > > > > > > > | | | > | | > > | | > > > > | 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 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 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 |
int nRowNumber = 0; /* current TR number */
int nEventTotal = 0; /* Total event count */
int rowClass = 0; /* counter for alternating
row colors */
int nMaxEvents = 1; /* max number of events for
all rows. */
stats_report_init_view();
@ <h1>Timeline Events
@ (%s(stats_report_label_for_type())) by User</h1>
db_multi_exec(
"CREATE TEMP TABLE piechart(amt,label);"
"INSERT INTO piechart SELECT count(*), ifnull(euser,user) FROM v_reports"
" GROUP BY ifnull(euser,user) ORDER BY count(*) DESC;"
);
if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
@ <center><svg width=700 height=400>
piechart_render(700, 400, PIE_OTHER|PIE_PERCENT);
@ </svg></centre><hr/>
}
@ <table class='statistics-report-table-events' border='0'
@ cellpadding='2' cellspacing='0' id='statsTable'>
@ <thead><tr>
@ <th>User</th>
@ <th>Events</th>
@ <th width='90%%'><!-- relative commits graph --></th>
@ </tr></thead><tbody>
db_prepare(&query,
"SELECT ifnull(euser,user), "
"COUNT(*) AS eventCount "
"FROM v_reports "
"GROUP BY ifnull(euser,user) ORDER BY eventCount DESC");
while( SQLITE_ROW == db_step(&query) ){
const int nCount = db_column_int(&query, 1);
if(nCount>nMaxEvents){
nMaxEvents = nCount;
}
}
db_reset(&query);
while( SQLITE_ROW == db_step(&query) ){
const char *zUser = db_column_text(&query, 0);
const int nCount = db_column_int(&query, 1);
char y = (char)statsReportType;
int nSize = nCount
? (int)(100 * nCount / nMaxEvents)
: 0;
if(!nCount) continue /* arguable! Possible? */;
else if(!nSize) nSize = 1;
rowClass = ++nRowNumber % 2;
nEventTotal += nCount;
@ <tr class='row%d(rowClass)'>
@ <td>
@ <a href="?view=bymonth&user=%h(zUser)&type=%c(y)">%h(zUser)</a>
@ </td><td data-sortkey='%08x(-nCount)'>%d(nCount)</td>
@ <td>
@ <div class='statistics-report-graph-line'
@ style='width:%d(nSize)%%;'> </div>
@ </td>
@</tr>
/*
Potential improvement: calculate the min/max event counts and
use percent-based graph bars.
*/
}
@ </tbody></table>
db_finalize(&query);
output_table_sorting_javascript("statsTable","tkx",2);
}
/*
** Implements the "byfile" view for /reports. If zUserName is not NULL then the
** report is restricted to events created by the named user account.
*/
static void stats_report_by_file(const char *zUserName){
Stmt query;
int mxEvent = 1; /* max number of events across all rows */
int nRowNumber = 0;
db_multi_exec(
"CREATE TEMP TABLE statrep(filename, cnt);"
"INSERT INTO statrep(filename, cnt)"
" SELECT filename.name, count(distinct mlink.mid)"
" FROM filename, mlink, event"
" WHERE filename.fnid=mlink.fnid"
" AND mlink.mid=event.objid"
" AND ifnull(coalesce(euser,user,'')=%Q,1)"
" GROUP BY 1", zUserName
);
db_prepare(&query,
"SELECT filename, cnt FROM statrep ORDER BY cnt DESC, filename /*sort*/"
);
mxEvent = db_int(1, "SELECT max(cnt) FROM statrep");
@ <h1>Check-ins Per File
if( zUserName ){
@ for user %h(zUserName)
}
@ </h1>
@ <table class='statistics-report-table-events' border='0'
@ cellpadding='2' cellspacing='0' id='statsTable'>
@ <thead><tr>
@ <th>File</th>
@ <th>Check-ins</th>
@ <th width='90%%'><!-- relative commits graph --></th>
@ </tr></thead><tbody>
|
| ︙ | ︙ | |||
502 503 504 505 506 507 508 |
}
@ </tbody></table>
db_finalize(&query);
output_table_sorting_javascript("statsTable","tNx",2);
}
/*
| | > | > | > > | | | > | | > > > | > > > > > > > > > > > > > > > > > > > > | 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 |
}
@ </tbody></table>
db_finalize(&query);
output_table_sorting_javascript("statsTable","tNx",2);
}
/*
** Implements the "byweekday" view for /reports. If zUserName is not NULL then
** the report is restricted to events created by the named user account.
*/
static void stats_report_day_of_week(const char *zUserName){
Stmt query = empty_Stmt;
int nRowNumber = 0; /* current TR number */
int nEventTotal = 0; /* Total event count */
int rowClass = 0; /* counter for alternating
row colors */
int nMaxEvents = 1; /* max number of events for
all rows. */
Blob userFilter = empty_blob; /* Optional user=johndoe query string */
static const char *const daysOfWeek[] = {
"Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday", "Sunday"
};
stats_report_init_view();
if( zUserName ){
blob_appendf(&userFilter, "user=%s", zUserName);
}
db_prepare(&query,
"SELECT cast(mtime %% 7 AS INTEGER) dow,"
" COUNT(*) AS eventCount"
" FROM v_reports"
" WHERE ifnull(coalesce(euser,user,'')=%Q,1)"
" GROUP BY dow ORDER BY dow", zUserName);
@ <h1>Timeline Events (%h(stats_report_label_for_type())) by Day of the Week
if( zUserName ){
@ for user %h(zUserName)
}
@ </h1>
db_multi_exec(
"CREATE TEMP TABLE piechart(amt,label);"
"INSERT INTO piechart"
" SELECT count(*), cast(mtime %% 7 AS INT) FROM v_reports"
" WHERE ifnull(coalesce(euser,user,'')=%Q,1)"
" GROUP BY 2 ORDER BY 2;"
"UPDATE piechart SET label = CASE label"
" WHEN 0 THEN 'Monday'"
" WHEN 1 THEN 'Tuesday'"
" WHEN 2 THEN 'Wednesday'"
" WHEN 3 THEN 'Thursday'"
" WHEN 4 THEN 'Friday'"
" WHEN 5 THEN 'Saturday'"
" ELSE 'Sunday' END;", zUserName
);
if( db_int(0, "SELECT count(*) FROM piechart")>=2 ){
@ <center><svg width=700 height=400>
piechart_render(700, 400, PIE_OTHER|PIE_PERCENT);
@ </svg></centre><hr/>
}
@ <table class='statistics-report-table-events' border='0'
@ cellpadding='2' cellspacing='0' id='statsTable'>
@ <thead><tr>
@ <th>DoW</th>
@ <th>Day</th>
@ <th>Events</th>
@ <th width='90%%'><!-- relative commits graph --></th>
|
| ︙ | ︙ | |||
570 571 572 573 574 575 576 |
output_table_sorting_javascript("statsTable","ntnx",1);
}
/*
** Helper for stats_report_by_month_year(), which generates a list of
** week numbers. zTimeframe should be either a timeframe in the form YYYY
| | > | | | < < | | | < < < | < | < > > > | | < < < > | < < < | | < < < < < < < < < < < < < < < < < < < < < < | < | | | | | > > > | | < | | < | < | | | | | | | | | < < | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | < | | | | | | | | | | > > > > > > > > > | 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 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 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 |
output_table_sorting_javascript("statsTable","ntnx",1);
}
/*
** Helper for stats_report_by_month_year(), which generates a list of
** week numbers. zTimeframe should be either a timeframe in the form YYYY
** or YYYY-MM. If zUserName is not NULL then the report is restricted to events
** created by the named user account.
*/
static void stats_report_year_weeks(const char *zUserName){
const char *zYear = P("y"); /* Year for which report shown */
int isValidYear = 0; /* True if a valid year */
int i = 0;
Stmt q;
int nMaxEvents = 1; /* max number of events for
all rows. */
int iterations = 0; /* # of active time periods. */
int n = 0; /* Number of entries in azYear */
char **azYear = 0; /* Year dropdown menu */
int rowCount = 0;
int total = 0;
stats_report_init_view();
style_submenu_sql("y", "Year:",
"WITH RECURSIVE a(b) AS ("
" SELECT substr(date('now'),1,4) UNION ALL"
" SELECT b-1 FROM a"
" WHERE b>0+(SELECT substr(date(min(mtime)),1,4) FROM event)"
") SELECT b, b FROM a ORDER BY b DESC");
if( zYear==0 || strlen(zYear)!=4 ){
zYear = db_text("1970","SELECT substr(date('now'),1,4);");
}
cgi_printf("<br/>");
db_prepare(&q,
"SELECT DISTINCT strftime('%%W',mtime) AS wk, "
" count(*) AS n "
" FROM v_reports "
" WHERE %Q=substr(date(mtime),1,4) "
" AND mtime < current_timestamp "
" AND ifnull(coalesce(euser,user,'')=%Q,1)"
" GROUP BY wk ORDER BY wk DESC", zYear, zUserName);
@ <h1>Timeline events (%h(stats_report_label_for_type()))
@ for the calendar weeks of %h(zYear)
if( zUserName ){
@ for user %h(zUserName)
}
@ </h1>
cgi_printf("<table class='statistics-report-table-events' "
"border='0' cellpadding='2' width='100%%' "
"cellspacing='0' id='statsTable'>");
cgi_printf("<thead><tr>"
"<th>Week</th>"
"<th>Events</th>"
"<th width='90%%'><!-- relative commits graph --></th>"
"</tr></thead>"
"<tbody>");
while( SQLITE_ROW == db_step(&q) ){
const int nCount = db_column_int(&q, 1);
if(nCount>nMaxEvents){
nMaxEvents = nCount;
}
++iterations;
}
db_reset(&q);
while( SQLITE_ROW == db_step(&q) ){
const char *zWeek = db_column_text(&q,0);
const int nCount = db_column_int(&q,1);
int nSize = nCount
? (int)(100 * nCount / nMaxEvents)
: 0;
if(!nSize) nSize = 1;
total += nCount;
cgi_printf("<tr class='row%d'>", ++rowCount % 2 );
cgi_printf("<td><a href='%R/timeline?yw=%t-%s&n=%d&y=%s",
zYear, zWeek, nCount,
statsReportTimelineYFlag);
if( zUserName ){
cgi_printf("&u=%t",zUserName);
}
cgi_printf("'>%s</a></td>",zWeek);
cgi_printf("<td>%d</td>",nCount);
cgi_printf("<td>");
if(nCount){
cgi_printf("<div class='statistics-report-graph-line'"
"style='width:%d%%;'> </div>",
nSize);
}
cgi_printf("</td></tr>");
}
db_finalize(&q);
cgi_printf("</tbody></table>");
if(total){
int nAvg = iterations ? (total/iterations) : 0;
cgi_printf("<br><div>Total events: %d<br>"
"Average per active week: %d</div>",
total, nAvg);
}
output_table_sorting_javascript("statsTable","tnx",-1);
}
/* Report types
*/
#define RPT_BYFILE 1
#define RPT_BYMONTH 2
#define RPT_BYUSER 3
#define RPT_BYWEEK 4
#define RPT_BYWEEKDAY 5
#define RPT_BYYEAR 6
#define RPT_NONE 0 /* None of the above */
/*
** WEBPAGE: reports
**
** Shows activity reports for the repository.
**
** Query Parameters:
|
| ︙ | ︙ | |||
722 723 724 725 726 727 728 |
** view=byweek:
**
** y=YYYY The year to report (default is the server's
** current year).
*/
void stats_report_page(){
HQuery url; /* URL for various branch links */
| | > > | > > > > > > > > > > > > > > > > > > > > | > | > > > > > > > > > > > < | > > > > | > | > | > | > | < < < > > > > > > > > | > | > | | > | | > > | | < > > | > | | | < < < < < < < < < < | 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 |
** view=byweek:
**
** y=YYYY The year to report (default is the server's
** current year).
*/
void stats_report_page(){
HQuery url; /* URL for various branch links */
const char *zView = P("view"); /* Which view/report to show. */
int eType = RPT_NONE; /* Numeric code for view/report to show */
int i; /* Loop counter */
const char *zUserName; /* Name of user */
const struct {
const char *zName; /* Name of view= screen type */
const char *zVal; /* Value of view= query parameter */
int eType; /* Corresponding RPT_* define */
} aViewType[] = {
{ "File Changes","byfile", RPT_BYFILE },
{ "By Month", "bymonth", RPT_BYMONTH },
{ "By User", "byuser", RPT_BYUSER },
{ "By Week", "byweek", RPT_BYWEEK },
{ "By Weekday", "byweekday", RPT_BYWEEKDAY },
{ "By Year", "byyear", RPT_BYYEAR },
};
const char *azType[] = {
"a", "All Changes",
"ci", "Check-ins",
"g", "Tags",
"e", "Tech Notes",
"t", "Tickets",
"w", "Wiki"
};
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
zUserName = P("user");
if( zUserName==0 ) zUserName = P("u");
if( zUserName && zUserName[0]==0 ) zUserName = 0;
if( zView==0 ){
zView = "byuser";
cgi_replace_query_parameter("view","byuser");
}
for(i=0; i<ArraySize(aViewType); i++){
if( fossil_strcmp(zView, aViewType[i].zVal)==0 ){
eType = aViewType[i].eType;
break;
}
}
url_initialize(&url, "reports");
cgi_query_parameters_to_url(&url);
if( eType!=RPT_NONE ){
int nView = 0; /* Slots used in azView[] */
const char *azView[16]; /* Drop-down menu of view types */
for(i=0; i<ArraySize(aViewType); i++){
azView[nView++] = aViewType[i].zVal;
azView[nView++] = aViewType[i].zName;
}
if( eType!=RPT_BYFILE ){
style_submenu_multichoice("type", ArraySize(azType)/2, azType, 0);
}
style_submenu_multichoice("view", nView/2, azView, 0);
if( eType!=RPT_BYUSER ){
style_submenu_sql("u","User:",
"SELECT '', 'All Users' UNION ALL "
"SELECT x, x FROM ("
" SELECT DISTINCT trim(coalesce(euser,user)) AS x FROM event %s"
" ORDER BY 1 COLLATE nocase) WHERE x!=''",
eType==RPT_BYFILE ? "WHERE type='ci'" : ""
);
}
}
style_submenu_element("Stats", "Stats", "%R/stat");
url_reset(&url);
style_header("Activity Reports");
switch( eType ){
case RPT_BYYEAR:
stats_report_by_month_year(0, 0, zUserName);
break;
case RPT_BYMONTH:
stats_report_by_month_year(1, 0, zUserName);
break;
case RPT_BYWEEK:
stats_report_year_weeks(zUserName);
break;
default:
case RPT_BYUSER:
stats_report_by_user();
break;
case RPT_BYWEEKDAY:
stats_report_day_of_week(zUserName);
break;
case RPT_BYFILE:
stats_report_by_file(zUserName);
break;
}
style_footer();
}
|
Changes to src/style.c.
| ︙ | ︙ | |||
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
aSubmenuCtrl[nSubmenuCtrl].iSize = nChoice;
aSubmenuCtrl[nSubmenuCtrl].azChoice = azChoice;
aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI;
nSubmenuCtrl++;
}
/*
** Compare two submenu items for sorting purposes
*/
static int submenuCompare(const void *a, const void *b){
const struct Submenu *A = (const struct Submenu*)a;
const struct Submenu *B = (const struct Submenu*)b;
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
aSubmenuCtrl[nSubmenuCtrl].iSize = nChoice;
aSubmenuCtrl[nSubmenuCtrl].azChoice = azChoice;
aSubmenuCtrl[nSubmenuCtrl].isDisabled = isDisabled;
aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI;
nSubmenuCtrl++;
}
void style_submenu_sql(
const char *zName, /* Query parameter name */
const char *zLabel, /* Label on the control */
const char *zFormat, /* Format string for SQL command for choices */
... /* Arguments to the format string */
){
Stmt q;
int n = 0;
int nAlloc = 0;
char **az = 0;
va_list ap;
va_start(ap, zFormat);
db_vprepare(&q, 0, zFormat, ap);
va_end(ap);
while( SQLITE_ROW==db_step(&q) ){
if( n+2>=nAlloc ){
nAlloc += nAlloc + 20;
az = fossil_realloc(az, sizeof(char*)*nAlloc);
}
az[n++] = fossil_strdup(db_column_text(&q,0));
az[n++] = fossil_strdup(db_column_text(&q,1));
}
db_finalize(&q);
if( n>0 ){
aSubmenuCtrl[nSubmenuCtrl].zName = zName;
aSubmenuCtrl[nSubmenuCtrl].zLabel = zLabel;
aSubmenuCtrl[nSubmenuCtrl].iSize = n/2;
aSubmenuCtrl[nSubmenuCtrl].azChoice = (const char**)az;
aSubmenuCtrl[nSubmenuCtrl].isDisabled = 0;
aSubmenuCtrl[nSubmenuCtrl].eType = FF_MULTI;
nSubmenuCtrl++;
}
}
/*
** Compare two submenu items for sorting purposes
*/
static int submenuCompare(const void *a, const void *b){
const struct Submenu *A = (const struct Submenu*)a;
const struct Submenu *B = (const struct Submenu*)b;
|
| ︙ | ︙ | |||
512 513 514 515 516 517 518 519 520 521 522 523 524 525 |
zDisabled
);
break;
}
case FF_MULTI: {
int j;
const char *zVal = P(zQPN);
cgi_printf(
"<select class='submenuctrl' size='1' name='%s'%s "
"onchange='gebi(\"f01\").submit();'>\n",
zQPN, zDisabled
);
for(j=0; j<aSubmenuCtrl[i].iSize*2; j+=2){
const char *zQPV = aSubmenuCtrl[i].azChoice[j];
| > > > | 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
zDisabled
);
break;
}
case FF_MULTI: {
int j;
const char *zVal = P(zQPN);
if( aSubmenuCtrl[i].zLabel ){
cgi_printf(" %h", aSubmenuCtrl[i].zLabel);
}
cgi_printf(
"<select class='submenuctrl' size='1' name='%s'%s "
"onchange='gebi(\"f01\").submit();'>\n",
zQPN, zDisabled
);
for(j=0; j<aSubmenuCtrl[i].iSize*2; j+=2){
const char *zQPV = aSubmenuCtrl[i].azChoice[j];
|
| ︙ | ︙ | |||
699 700 701 702 703 704 705 |
{ "td.timelineTime",
"the format for the timeline time display",
@ vertical-align: top;
@ text-align: right;
@ white-space: nowrap;
},
{ "td.timelineGraph",
| | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 |
{ "td.timelineTime",
"the format for the timeline time display",
@ vertical-align: top;
@ text-align: right;
@ white-space: nowrap;
},
{ "td.timelineGraph",
"the format for the graph placeholder cells in timelines",
@ width: 20px;
@ text-align: left;
@ vertical-align: top;
},
{ ".tl-canvas",
"timeline graph canvas",
@ margin: 0 6px 0 10px;
},
{ ".tl-rail",
"maximum rail spacing",
@ width: 18px;
},
{ ".tl-mergeoffset",
"maximum spacing between merge risers and primary child risers",
@ width: 2px;
},
{ ".tl-nodemark",
"adjusts the vertical position of graph nodes",
@ margin-top: 5px;
},
{ ".tl-node",
"commit node",
@ width: 10px;
@ height: 10px;
@ border: 1px solid #000;
@ background: #fff;
@ cursor: pointer;
},
{ ".tl-node.leaf:after",
"leaf commit marker",
@ content: '';
@ position: absolute;
@ top: 3px;
@ left: 3px;
@ width: 4px;
@ height: 4px;
@ background: #000;
},
{ ".tl-node.sel:after",
"selected commit node marker",
@ content: '';
@ position: absolute;
@ top: 2px;
@ left: 2px;
@ width: 6px;
@ height: 6px;
@ background: red;
},
{ ".tl-arrow",
"arrow",
@ width: 0;
@ height: 0;
@ transform: scale(.999);
@ border: 0 solid transparent;
},
{ ".tl-arrow.u",
"up arrow",
@ margin-top: -1px;
@ border-width: 0 3px;
@ border-bottom: 7px solid #000;
},
{ ".tl-arrow.u.sm",
"small up arrow",
@ border-bottom: 5px solid #000;
},
{ ".tl-line",
"line",
@ background: #000;
@ width: 2px;
},
{ ".tl-arrow.merge",
"merge arrow",
@ height: 1px;
@ border-width: 2px 0;
},
{ ".tl-arrow.merge.l",
"left merge arrow",
@ border-right: 3px solid #000;
},
{ ".tl-arrow.merge.r",
"right merge arrow",
@ border-left: 3px solid #000;
},
{ ".tl-line.merge",
"merge line",
@ width: 1px;
},
{ ".tl-arrow.warp",
"timewarp arrow",
@ margin-left: 1px;
@ border-width: 3px 0;
@ border-left: 7px solid #600000;
},
{ ".tl-line.warp",
"timewarp line",
@ background: #600000;
},
{ "a.tagLink",
"the format for the tag links",
@
},
{ "span.tagDsp",
"the format for the tag display(no history permission!)",
@ font-weight: bold;
|
| ︙ | ︙ | |||
1224 1225 1226 1227 1228 1229 1230 |
"odd table row color",
@ /* Use default */
},
{ "#usetupEditCapability",
"format for capabilities string, mentioned on the user edit page",
@ font-weight: bold;
},
| < < < < | 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 |
"odd table row color",
@ /* Use default */
},
{ "#usetupEditCapability",
"format for capabilities string, mentioned on the user edit page",
@ font-weight: bold;
},
{ "table.adminLogTable",
"Class for the /admin_log table",
@ text-align: left;
},
{ ".adminLogTable .adminTime",
"Class for the /admin_log table",
@ text-align: left;
|
| ︙ | ︙ | |||
1334 1335 1336 1337 1338 1339 1340 |
cssDefaultList[i].value
);
}
}
}
/*
| | < | | > < > | < | | > < > > > > > > > > > > > > > > > > > > > > > | | 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 |
cssDefaultList[i].value
);
}
}
}
/*
** Search string zCss for zSelector.
**
** Return true if found. Return false if not found
*/
static int containsSelector(const char *zCss, const char *zSelector){
const char *z;
int n;
int selectorLen = (int)strlen(zSelector);
for(z=zCss; *z; z+=selectorLen){
z = strstr(z, zSelector);
if( z==0 ) return 0;
if( z!=zCss ){
for( n=-1; z+n!=zCss && fossil_isspace(z[n]); n--);
if( z+n!=zCss && z[n]!=',' && z[n]!= '}' && z[n]!='/' ) continue;
}
for( n=selectorLen; z[n] && fossil_isspace(z[n]); n++ );
if( z[n]==',' || z[n]=='{' || z[n]=='/' ) return 1;
}
return 0;
}
/*
** COMMAND: test-contains-selector
**
** Usage: %fossil test-contains-selector FILENAME SELECTOR
**
** Determine if the CSS stylesheet FILENAME contains SELECTOR.
*/
void contains_selector_cmd(void){
int found;
char *zSelector;
Blob css;
if( g.argc!=4 ) usage("FILENAME SELECTOR");
blob_read_from_file(&css, g.argv[2]);
zSelector = g.argv[3];
found = containsSelector(blob_str(&css), zSelector);
fossil_print("%s %s\n", zSelector, found ? "found" : "not found");
blob_reset(&css);
}
/*
** WEBPAGE: style.css
**
** Return the style sheet.
*/
void page_style_css(void){
Blob css;
int i;
cgi_set_content_type("text/css");
blob_init(&css,skin_get("css"),-1);
/* add special missing definitions */
for(i=1; cssDefaultList[i].elementClass; i++){
char *z = blob_str(&css);
if( !containsSelector(z, cssDefaultList[i].elementClass) ){
blob_appendf(&css, "/* %s */\n%s {\n%s}\n",
cssDefaultList[i].comment,
cssDefaultList[i].elementClass,
cssDefaultList[i].value);
}
}
|
| ︙ | ︙ |
Changes to src/timeline.c.
| ︙ | ︙ | |||
239 240 241 242 243 244 245 |
zPrevDate[0] = 0;
mxWikiLen = db_get_int("timeline-max-comment", 0);
dateFormat = db_get_int("timeline-date-format", 0);
zDateFmt = P("datefmt");
if( zDateFmt ) dateFormat = atoi(zDateFmt);
if( tmFlags & TIMELINE_GRAPH ){
pGraph = graph_init();
| < < < < < | < | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 |
zPrevDate[0] = 0;
mxWikiLen = db_get_int("timeline-max-comment", 0);
dateFormat = db_get_int("timeline-date-format", 0);
zDateFmt = P("datefmt");
if( zDateFmt ) dateFormat = atoi(zDateFmt);
if( tmFlags & TIMELINE_GRAPH ){
pGraph = graph_init();
}
db_static_prepare(&qbranch,
"SELECT value FROM tagxref WHERE tagid=%d AND tagtype>0 AND rid=:rid",
TAG_BRANCH
);
@ <table id="timelineTable" class="timelineTable">
blob_zero(&comment);
while( db_step(pQuery)==SQLITE_ROW ){
int rid = db_column_int(pQuery, 0);
const char *zUuid = db_column_text(pQuery, 1);
int isLeaf = db_column_int(pQuery, 5);
const char *zBgClr = db_column_text(pQuery, 6);
const char *zDate = db_column_text(pQuery, 2);
|
| ︙ | ︙ | |||
389 390 391 392 393 394 395 |
while( db_step(&qparent)==SQLITE_ROW && nParent<ArraySize(aParent) ){
aParent[nParent++] = db_column_int(&qparent, 0);
}
db_reset(&qparent);
gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr,
zUuid, isLeaf);
db_reset(&qbranch);
| | | 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
while( db_step(&qparent)==SQLITE_ROW && nParent<ArraySize(aParent) ){
aParent[nParent++] = db_column_int(&qparent, 0);
}
db_reset(&qparent);
gidx = graph_add_row(pGraph, rid, nParent, aParent, zBr, zBgClr,
zUuid, isLeaf);
db_reset(&qbranch);
@ <div id="m%d(gidx)" class="tl-nodemark"></div>
}
@</td>
if( zBgClr && zBgClr[0] && rid!=selectedRid ){
@ <td class="timelineTableCell" style="background-color: %h(zBgClr);">
}else{
@ <td class="timelineTableCell">
}
|
| ︙ | ︙ | |||
587 588 589 590 591 592 593 |
}
if( pGraph ){
graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
if( pGraph->nErr ){
graph_free(pGraph);
pGraph = 0;
}else{
| < < < < < | < < | 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 |
}
if( pGraph ){
graph_finish(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0);
if( pGraph->nErr ){
graph_free(pGraph);
pGraph = 0;
}else{
@ <tr class="timelineBottom"><td></td><td></td><td></td></tr>
}
}
@ </table>
if( fchngQueryInit ) db_finalize(&fchngQuery);
timeline_output_graph_javascript(pGraph, (tmFlags & TIMELINE_DISJOINT)!=0, 0);
}
|
| ︙ | ︙ | |||
646 647 648 649 650 651 652 |
int omitDescenders, /* True to omit descenders */
int fileDiff /* True for file diff. False for check-in diff */
){
if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
GraphRow *pRow;
int i;
char cSep;
| < | | | | < < | > | > | < | > > > > > | | | | < < < < < < < < < < < < | | 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 |
int omitDescenders, /* True to omit descenders */
int fileDiff /* True for file diff. False for check-in diff */
){
if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
GraphRow *pRow;
int i;
char cSep;
int iRailPitch; /* Pixels between consecutive rails */
int showArrowheads; /* True to draw arrowheads. False to omit. */
int circleNodes; /* True for circle nodes. False for square nodes */
int colorGraph; /* Use colors for graph lines */
iRailPitch = atoi(PD("railpitch","0"));
showArrowheads = skin_detail_boolean("timeline-arrowheads");
circleNodes = skin_detail_boolean("timeline-circle-nodes");
colorGraph = skin_detail_boolean("timeline-color-graph-lines");
@ <script>(function(){
@ "use strict";
@ var css = "";
if( circleNodes ){
@ css += ".tl-node, .tl-node:after { border-radius: 50%%; }";
}
if( !showArrowheads ){
@ css += ".tl-arrow.u { display: none; }";
}
@ if( css!=="" ){
@ var style = document.createElement("style");
@ style.textContent = css;
@ document.querySelector("head").appendChild(style);
@ }
/* the rowinfo[] array contains all the information needed to generate
** the graph. Each entry contains information for a single row:
**
** id: The id of the <div> element for the row. This is an integer.
** to get an actual id, prepend "m" to the integer. The top node
** is 1 and numbers increase moving down the timeline.
** bg: The background color for this row
** r: The "rail" that the node for this row sits on. The left-most
** rail is 0 and the number increases to the right.
** d: True if there is a "descender" - an arrow coming from the bottom
** of the page straight up to this node.
** mo: "merge-out". If non-negative, this is the rail position
** for the upward portion of a merge arrow. The merge arrow goes up
** to the row identified by mu:. If this value is negative then
** node has no merge children and no merge-out line is drawn.
** mu: The id of the row which is the top of the merge-out arrow.
** u: Draw a thick child-line out of the top of this node and up to
** the node with an id equal to this value. 0 if it is straight to
** the top of the page, -1 if there is no thick-line riser.
** f: 0x01: a leaf node.
** au: An array of integers that define thick-line risers for branches.
** The integers are in pairs. For each pair, the first integer is
** is the rail on which the riser should run and the second integer
** is the id of the node upto which the riser should run.
** mi: "merge-in". An array of integer rail positions from which
** merge arrows should be drawn into this node. If the value is
** negative, then the rail position is the absolute value of mi[]
** and a thin merge-arrow descender is drawn to the bottom of
** the screen.
** h: The SHA1 hash of the object being graphed
*/
cgi_printf("var rowinfo = [\n");
for(pRow=pGraph->pFirst; pRow; pRow=pRow->pNext){
cgi_printf("{id:%d,bg:\"%s\",r:%d,d:%d,mo:%d,mu:%d,u:%d,f:%d,au:",
pRow->idx, /* id */
pRow->zBgClr, /* bg */
pRow->iRail, /* r */
pRow->bDescender, /* d */
pRow->mergeOut, /* mo */
pRow->mergeUpto, /* mu */
pRow->aiRiser[pRow->iRail], /* u */
pRow->isLeaf ? 1 : 0 /* f */
);
/* u */
cSep = '[';
for(i=0; i<GR_MAX_RAIL; i++){
|
| ︙ | ︙ | |||
741 742 743 744 745 746 747 |
cgi_printf("fg:\"%s\",", bg_to_fg(pRow->zBgClr));
}
/* mi */
cgi_printf("mi:");
cSep = '[';
for(i=0; i<GR_MAX_RAIL; i++){
if( pRow->mergeIn[i] ){
| | < < | | | | > > > > > > | > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > > | | < | | | > | | < < | < < < < < < < < | < | < | | | < < < | < < < < < < < < | | | < | | | < | | < < < | | | | | | | | | | | | | | > | | | < | < < | > | | > > | | > > > > | | | | < < < < < < < | | | > | < < | | > | > > | > > | | | | < | | | > > > > > > | | | | | | < | | < < < | | < < < < < < < | < | | < | < < < < | < < | | | < < < < < < < < | < < < < < < < < | < > | > | | | | | | | | | < | < < | < < < < < < | > | > | < < < < > > < < < > > | | | > | | 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 |
cgi_printf("fg:\"%s\",", bg_to_fg(pRow->zBgClr));
}
/* mi */
cgi_printf("mi:");
cSep = '[';
for(i=0; i<GR_MAX_RAIL; i++){
if( pRow->mergeIn[i] ){
int mi = i;
if( pRow->mergeDown & (1<<i) ) mi = -mi;
cgi_printf("%c%d", cSep, mi);
cSep = ',';
}
}
if( cSep=='[' ) cgi_printf("[");
cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n");
}
cgi_printf("var nrail = %d\n", pGraph->mxRail+1);
graph_free(pGraph);
@ var canvasDiv;
@ var railPitch;
@ var mergeOffset;
@ var node, arrow, arrowSmall, line, mArrow, mLine, wArrow, wLine;
@ function initGraph(){
@ var parent = gebi("timelineTable").rows[0].cells[1];
@ parent.style.verticalAlign = "top";
@ canvasDiv = document.createElement("div");
@ canvasDiv.className = "tl-canvas";
@ canvasDiv.style.position = "absolute";
@ parent.appendChild(canvasDiv);
@
@ var elems = {};
@ var elemClasses = [
@ "rail", "mergeoffset", "node", "arrow u", "arrow u sm", "line",
@ "arrow merge r", "line merge", "arrow warp", "line warp"
@ ];
@ for( var i=0; i<elemClasses.length; i++ ){
@ var cls = elemClasses[i];
@ var elem = document.createElement("div");
@ elem.className = "tl-" + cls;
@ if( cls.indexOf("line")==0 ) elem.className += " v";
@ canvasDiv.appendChild(elem);
@ var k = cls.replace(/\s/g, "_");
@ var r = elem.getBoundingClientRect();
@ var w = Math.round(r.right - r.left);
@ var h = Math.round(r.bottom - r.top);
@ elems[k] = {w: w, h: h, cls: cls};
@ }
@ node = elems.node;
@ arrow = elems.arrow_u;
@ arrowSmall = elems.arrow_u_sm;
@ line = elems.line;
@ mArrow = elems.arrow_merge_r;
@ mLine = elems.line_merge;
@ wArrow = elems.arrow_warp;
@ wLine = elems.line_warp;
@
@ var minRailPitch = Math.ceil((node.w+line.w)/2 + mArrow.w + 1);
if( iRailPitch ){
@ railPitch = %d(iRailPitch);
}else{
@ railPitch = elems.rail.w;
@ railPitch -= Math.floor((nrail-1)*(railPitch-minRailPitch)/21);
}
@ railPitch = Math.max(railPitch, minRailPitch);
@
if( PB("nomo") ){
@ mergeOffset = 0;
}else{
@ mergeOffset = railPitch-minRailPitch-mLine.w;
@ mergeOffset = Math.min(mergeOffset, elems.mergeoffset.w);
@ mergeOffset = mergeOffset>0 ? mergeOffset + line.w/2 : 0;
}
@
@ var canvasWidth = (nrail-1)*railPitch + node.w;
@ canvasDiv.style.width = canvasWidth + "px";
@ canvasDiv.style.position = "relative";
@ }
@ function drawBox(cls,color,x0,y0,x1,y1){
@ var n = document.createElement("div");
@ x0 = Math.floor(x0);
@ y0 = Math.floor(y0);
@ x1 = x1 || x1===0 ? Math.floor(x1) : x0;
@ y1 = y1 || y1===0 ? Math.floor(y1) : y0;
@ if( x0>x1 ){ var t=x0; x0=x1; x1=t; }
@ if( y0>y1 ){ var t=y0; y0=y1; y1=t; }
@ var w = x1-x0;
@ var h = y1-y0;
@ n.style.position = "absolute";
@ n.style.left = x0+"px";
@ n.style.top = y0+"px";
@ if( w ) n.style.width = w+"px";
@ if( h ) n.style.height = h+"px";
@ if( color ) n.style.backgroundColor = color;
@ n.className = "tl-"+cls;
@ canvasDiv.appendChild(n);
@ return n;
@ }
@ function absoluteY(obj){
@ var top = 0;
@ if( obj.offsetParent ){
@ do{
@ top += obj.offsetTop;
@ }while( obj = obj.offsetParent );
@ }
@ return top;
@ }
@ function miLineY(p){
@ return p.y + node.h - mLine.w - 1;
@ }
@ function drawLine(elem,color,x0,y0,x1,y1){
@ var cls = elem.cls + " ";
@ if( x1===null ){
@ x1 = x0+elem.w;
@ cls += "v";
@ }else{
@ y1 = y0+elem.w;
@ cls += "h";
@ }
@ drawBox(cls,color,x0,y0,x1,y1);
@ }
@ function drawUpArrow(from,to,color){
@ var y = to.y + node.h;
@ var arrowSpace = from.y - y + (!from.id || from.r!=to.r ? node.h/2 : 0);
@ var arw = arrowSpace < arrow.h*1.5 ? arrowSmall : arrow;
@ var x = to.x + (node.w-line.w)/2;
@ var y0 = from.y + node.h/2;
@ var y1 = Math.ceil(to.y + node.h + arw.h/2);
@ drawLine(line,color,x,y0,null,y1);
@ x = to.x + (node.w-arw.w)/2;
@ var n = drawBox(arw.cls,null,x,y);
@ n.style.borderBottomColor = color;
@ }
@ function drawMergeLine(x0,y0,x1,y1){
@ drawLine(mLine,null,x0,y0,x1,y1);
@ }
@ function drawMergeArrow(p,rail){
@ var x0 = rail*railPitch + node.w/2;
@ if( rail in mergeLines ){
@ x0 += mergeLines[rail];
@ if( p.r<rail ) x0 += mLine.w;
@ }else{
@ x0 += (p.r<rail ? -1 : 1)*line.w/2;
@ }
@ var x1 = mArrow.w ? mArrow.w/2 : -node.w/2;
@ x1 = p.x + (p.r<rail ? node.w + Math.ceil(x1) : -x1);
@ var y = miLineY(p);
@ drawMergeLine(x0,y,x1,null);
@ var x = p.x + (p.r<rail ? node.w : -mArrow.w);
@ var cls = "arrow merge " + (p.r<rail ? "l" : "r");
@ drawBox(cls,null,x,y+(mLine.w-mArrow.h)/2);
@ }
@ function drawNode(p, btm){
@ if( p.u>0 ) drawUpArrow(p,rowinfo[p.u-1],p.fg);
@ var cls = node.cls;
@ if( p.mi.length ) cls += " merge";
@ if( p.f&1 ) cls += " leaf";
@ var n = drawBox(cls,p.bg,p.x,p.y);
@ n.id = "tln"+p.id;
@ n.onclick = clickOnNode;
@ n.style.zIndex = 10;
if( !omitDescenders ){
@ if( p.u==0 ) drawUpArrow(p,{x: p.x, y: -node.h},p.fg);
@ if( p.d ) drawUpArrow({x: p.x, y: btm-node.h/2},p,p.fg);
}
@ if( p.mo>=0 ){
@ var x0 = p.x + node.w/2;
@ var x1 = p.mo*railPitch + node.w/2;
@ var u = rowinfo[p.mu-1];
@ var y1 = miLineY(u);
@ if( p.u<0 || p.mo!=p.r ){
@ x1 += mergeLines[p.mo] = -mLine.w/2;
@ var y0 = p.y+2;
@ if( p.r!=p.mo ) drawMergeLine(x0,y0,x1+(x0<x1 ? mLine.w : 0),null);
@ drawMergeLine(x1,y0+mLine.w,null,y1);
@ }else if( mergeOffset ){
@ mergeLines[p.mo] = u.r<p.r ? -mergeOffset-mLine.w : mergeOffset;
@ x1 += mergeLines[p.mo];
@ drawMergeLine(x1,p.y+node.h/2,null,y1);
@ }else{
@ delete mergeLines[p.mo];
@ }
@ }
@ for( var i=0; i<p.au.length; i+=2 ){
@ var rail = p.au[i];
@ var x0 = p.x + node.w/2;
@ var x1 = rail*railPitch + (node.w-line.w)/2;
@ if( x0<x1 ){
@ x0 = Math.ceil(x0);
@ x1 += line.w;
@ }
@ var y0 = p.y + (node.h-line.w)/2;
@ var u = rowinfo[p.au[i+1]-1];
@ if( u.id<p.id ){
@ drawLine(line,u.fg,x0,y0,x1,null);
@ drawUpArrow(p,u,u.fg);
@ }else{
@ var y1 = u.y + (node.h-line.w)/2;
@ drawLine(wLine,u.fg,x0,y0,x1,null);
@ drawLine(wLine,u.fg,x1-line.w,y0,null,y1+line.w);
@ drawLine(wLine,u.fg,x1,y1,u.x-wArrow.w/2,null);
@ var x = u.x-wArrow.w;
@ var y = u.y+(node.h-wArrow.h)/2;
@ var n = drawBox(wArrow.cls,null,x,y);
@ if( u.fg ) n.style.borderLeftColor = u.fg;
@ }
@ }
@ for( var i=0; i<p.mi.length; i++ ){
@ var rail = p.mi[i];
@ if( rail<0 ){
@ rail = -rail;
@ mergeLines[rail] = -mLine.w/2;
@ var x = rail*railPitch + (node.w-mLine.w)/2;
@ drawMergeLine(x,miLineY(p),null,btm);
@ }
@ drawMergeArrow(p,rail);
@ }
@ }
@ var mergeLines;
@ function renderGraph(){
@ mergeLines = {};
@ canvasDiv.innerHTML = "";
@ var canvasY = absoluteY(canvasDiv);
@ for( var i=0; i<rowinfo.length; i++ ){
@ rowinfo[i].y = absoluteY(gebi("m"+rowinfo[i].id)) - canvasY;
@ rowinfo[i].x = rowinfo[i].r*railPitch;
@ }
@ var tlBtm = document.querySelector(".timelineBottom");
@ if( tlBtm.offsetHeight<node.h ){
@ tlBtm.style.height = node.h + "px";
@ }
@ var btm = absoluteY(tlBtm) - canvasY + tlBtm.offsetHeight;
@ for( var i=rowinfo.length-1; i>=0; i-- ){
@ drawNode(rowinfo[i], btm);
@ }
@ }
@ var selRow;
@ function clickOnNode(){
@ var p = rowinfo[parseInt(this.id.match(/\d+$/)[0], 10)-1];
@ if( !selRow ){
@ selRow = p;
@ this.className += " sel";
@ canvasDiv.className += " sel";
@ }else if( selRow==p ){
@ selRow = null;
@ this.className = this.className.replace(" sel", "");
@ canvasDiv.className = canvasDiv.className.replace(" sel", "");
@ }else{
if( fileDiff ){
@ location.href="%R/fdiff?v1="+selRow.h+"&v2="+p.h+"&sbs=1";
}else{
if( db_get_boolean("show-version-diffs", 0)==0 ){
@ location.href="%R/vdiff?from="+selRow.h+"&to="+p.h+"&sbs=0";
}else{
@ location.href="%R/vdiff?from="+selRow.h+"&to="+p.h+"&sbs=1";
}
}
@ }
@ }
@ var lastRow = gebi("m"+rowinfo[rowinfo.length-1].id);
@ var lastY = 0;
@ function checkHeight(){
@ var h = absoluteY(lastRow);
@ if( h!=lastY ){
@ renderGraph();
@ lastY = h;
@ }
@ setTimeout(checkHeight, 1000);
@ }
@ initGraph();
@ checkHeight();
@ }())</script>
}
}
/*
** Create a temporary table suitable for storing timeline data.
*/
static void timeline_temp_table(void){
|
| ︙ | ︙ | |||
1306 1307 1308 1309 1310 1311 1312 |
if( !g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki ){
login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki);
return;
}
url_initialize(&url, "timeline");
cgi_query_parameters_to_url(&url);
if( zTagName && g.perm.Read ){
| | | | | 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 |
if( !g.perm.Read && !g.perm.RdTkt && !g.perm.RdWiki ){
login_needed(g.anon.Read && g.anon.RdTkt && g.anon.RdWiki);
return;
}
url_initialize(&url, "timeline");
cgi_query_parameters_to_url(&url);
if( zTagName && g.perm.Read ){
tagid = db_int(-1,"SELECT tagid FROM tag WHERE tagname='sym-%q'",zTagName);
zThisTag = zTagName;
}else if( zBrName && g.perm.Read ){
tagid = db_int(-1,"SELECT tagid FROM tag WHERE tagname='sym-%q'",zBrName);
zThisTag = zBrName;
}else{
tagid = 0;
}
if( zMark && zMark[0]==0 ){
if( zAfter ) zMark = zAfter;
if( zBefore ) zMark = zBefore;
if( zCirca ) zMark = zCirca;
}
if( tagid
&& db_int(0,"SELECT count(*) FROM tagxref WHERE tagid=%d",tagid)<=nEntry
){
nEntry = -1;
zCirca = 0;
}
if( zType[0]=='a' ){
tmFlags |= TIMELINE_BRIEF | TIMELINE_GRAPH;
|
| ︙ | ︙ | |||
1522 1523 1524 1525 1526 1527 1528 |
blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ",
zYearMonth);
}
else if( zYearWeek ){
blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%W',event.mtime) ",
zYearWeek);
}
| | | 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 |
blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%m',event.mtime) ",
zYearMonth);
}
else if( zYearWeek ){
blob_append_sql(&sql, " AND %Q=strftime('%%Y-%%W',event.mtime) ",
zYearWeek);
}
if( tagid ){
blob_append_sql(&sql,
" AND (EXISTS(SELECT 1 FROM tagxref"
" WHERE tagid=%d AND tagtype>0 AND rid=blob.rid)\n", tagid);
if( zBrName ){
/* The next two blob_appendf() calls add SQL that causes check-ins that
** are not part of the branch which are parents or children of the
|
| ︙ | ︙ |
Changes to src/translate.c.
| ︙ | ︙ | |||
38 39 40 41 42 43 44 | ** If the last non-whitespace character prior to the first "@" of a ** @-block is "=" or "," then the @-block is a string literal initializer ** rather than text that is to be output via cgi_printf(). Render it ** as such. ** ** Enhancement #2: ** | | | | | | | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | ** If the last non-whitespace character prior to the first "@" of a ** @-block is "=" or "," then the @-block is a string literal initializer ** rather than text that is to be output via cgi_printf(). Render it ** as such. ** ** Enhancement #2: ** ** Comments of the form: "|* @-comment: CC" (where "|" is really "/") ** cause CC to become a comment character for the @-substitution. ** Typical values for CC are "--" (for SQL text) or "#" (for Tcl script) ** or "//" (for C++ code). Lines of subsequent @-blocks that begin with ** CC are omitted from the output. ** */ #include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <string.h> |
| ︙ | ︙ |
Changes to src/update.c.
| ︙ | ︙ | |||
584 585 586 587 588 589 590 |
if( !internalUpdate ) undo_finish();
if( setmtimeFlag ) vfile_check_signature(tid, CKSIG_SETMTIME);
db_end_transaction(0);
}
}
/*
| | < | | | < < < | < < | | < < < < < | < < > > | > | > > | 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 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 636 637 638 |
if( !internalUpdate ) undo_finish();
if( setmtimeFlag ) vfile_check_signature(tid, CKSIG_SETMTIME);
db_end_transaction(0);
}
}
/*
** Create empty directories specified by the empty-dirs setting.
*/
void ensure_empty_dirs_created(void){
char *zEmptyDirs = db_get("empty-dirs", 0);
if( zEmptyDirs!=0 ){
int i;
Blob dirName;
Blob dirsList;
zEmptyDirs = fossil_strdup(zEmptyDirs);
for(i=0; zEmptyDirs[i]; i++){
if( zEmptyDirs[i]==',' ) zEmptyDirs[i] = ' ';
}
blob_init(&dirsList, zEmptyDirs, -1);
while( blob_token(&dirsList, &dirName) ){
char *zDir = blob_str(&dirName);
char *zPath = mprintf("%s/%s", g.zLocalRoot, zDir);
switch( file_wd_isdir(zPath) ){
case 0: { /* doesn't exist */
fossil_free(zPath);
zPath = mprintf("%s/%s/x", g.zLocalRoot, zDir);
if( file_mkfolder(zPath, 0, 1)!=0 ) {
fossil_warning("couldn't create directory %s as "
"required by empty-dirs setting", zDir);
}
break;
}
case 1: { /* exists, and is a directory */
/* do nothing - required directory exists already */
break;
}
case 2: { /* exists, but isn't a directory */
fossil_warning("file %s found, but a directory is required "
"by empty-dirs setting", zDir);
}
}
fossil_free(zPath);
blob_reset(&dirName);
}
blob_reset(&dirsList);
fossil_free(zEmptyDirs);
}
}
/*
** Get the contents of a file within the check-in "revision". If
** revision==NULL then get the file content for the current checkout.
|
| ︙ | ︙ |
Changes to src/url.c.
| ︙ | ︙ | |||
452 453 454 455 456 457 458 |
/*
** Resets the given URL object, deallocating any memory
** it uses.
*/
void url_reset(HQuery *p){
blob_reset(&p->url);
| | | | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
/*
** Resets the given URL object, deallocating any memory
** it uses.
*/
void url_reset(HQuery *p){
blob_reset(&p->url);
fossil_free((void *)p->azName);
fossil_free((void *)p->azValue);
url_initialize(p, p->zBase);
}
/*
** Add a fixed parameter to an HQuery. Or remove the parameters if zValue==0.
*/
void url_add_parameter(HQuery *p, const char *zName, const char *zValue){
|
| ︙ | ︙ | |||
478 479 480 481 482 483 484 |
return;
}
}
assert( i==p->nParam );
if( zValue==0 ) return;
if( i>=p->nAlloc ){
p->nAlloc = p->nAlloc*2 + 10;
| | > | > | 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 |
return;
}
}
assert( i==p->nParam );
if( zValue==0 ) return;
if( i>=p->nAlloc ){
p->nAlloc = p->nAlloc*2 + 10;
p->azName = fossil_realloc((void *)p->azName,
sizeof(p->azName[0])*p->nAlloc);
p->azValue = fossil_realloc((void *)p->azValue,
sizeof(p->azValue[0])*p->nAlloc);
}
p->azName[i] = zName;
p->azValue[i] = zValue;
p->nParam++;
}
/*
|
| ︙ | ︙ |
Changes to src/vfile.c.
| ︙ | ︙ | |||
134 135 136 137 138 139 140 | #define CKSIG_ENOTFILE 0x001 /* non-file FS objects throw an error */ #define CKSIG_SHA1 0x002 /* Verify file content using sha1sum */ #define CKSIG_SETMTIME 0x004 /* Set mtime to last check-out time */ #endif /* INTERFACE */ /* | | | | > | | > > > > > > | 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | #define CKSIG_ENOTFILE 0x001 /* non-file FS objects throw an error */ #define CKSIG_SHA1 0x002 /* Verify file content using sha1sum */ #define CKSIG_SETMTIME 0x004 /* Set mtime to last check-out time */ #endif /* INTERFACE */ /* ** Look at every VFILE entry with the given vid and update VFILE.CHNGED field ** according to whether or not the file has changed. ** - 0 means no change. ** - 1 means edited. ** - 2 means changed due to a merge. ** - 3 means added by a merge. ** - 4 means changed due to an integrate merge. ** - 5 means added by an integrate merge. ** - 6 means became executable but has unmodified contents. ** - 7 means became a symlink whose target equals its old contents. ** - 8 means lost executable status but has unmodified contents. ** - 9 means lost symlink status and has contents equal to its old target. ** ** If VFILE.DELETED is true or if VFILE.RID is zero, then the file was either ** removed from configuration management via "fossil rm" or added via ** "fossil add", respectively, and in both cases we always know that ** the file has changed without having the check the size, mtime, ** or on-disk content. ** |
| ︙ | ︙ | |||
168 169 170 171 172 173 174 |
Stmt q;
Blob fileCksum, origCksum;
int useMtime = (cksigFlags & CKSIG_SHA1)==0
&& db_get_boolean("mtime-changes", 1);
db_begin_transaction();
db_prepare(&q, "SELECT id, %Q || pathname,"
| | > | > > > > > | 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
Stmt q;
Blob fileCksum, origCksum;
int useMtime = (cksigFlags & CKSIG_SHA1)==0
&& db_get_boolean("mtime-changes", 1);
db_begin_transaction();
db_prepare(&q, "SELECT id, %Q || pathname,"
" vfile.mrid, deleted, chnged, uuid, size, mtime,"
" CASE WHEN isexe THEN %d WHEN islink THEN %d ELSE %d END"
" FROM vfile LEFT JOIN blob ON vfile.mrid=blob.rid"
" WHERE vid=%d ", g.zLocalRoot, PERM_EXE, PERM_LNK, PERM_REG,
vid);
while( db_step(&q)==SQLITE_ROW ){
int id, rid, isDeleted;
const char *zName;
int chnged = 0;
int oldChnged;
int origPerm;
int currentPerm;
i64 oldMtime;
i64 currentMtime;
i64 origSize;
i64 currentSize;
id = db_column_int(&q, 0);
zName = db_column_text(&q, 1);
rid = db_column_int(&q, 2);
isDeleted = db_column_int(&q, 3);
oldChnged = chnged = db_column_int(&q, 4);
oldMtime = db_column_int64(&q, 7);
origSize = db_column_int64(&q, 6);
currentSize = file_wd_size(zName);
currentMtime = file_wd_mtime(0);
origPerm = db_column_int(&q, 8);
currentPerm = file_wd_perm(zName);
if( chnged==0 && (isDeleted || rid==0) ){
/* "fossil rm" or "fossil add" always change the file */
chnged = 1;
}else if( !file_wd_isfile_or_link(0) && currentSize>=0 ){
if( cksigFlags & CKSIG_ENOTFILE ){
fossil_warning("not an ordinary file: %s", zName);
nErr++;
|
| ︙ | ︙ | |||
243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
if( mtime_of_manifest_file(vid,rid,&desiredMtime)==0 ){
if( currentMtime!=desiredMtime ){
file_set_mtime(zName, desiredMtime);
currentMtime = file_wd_mtime(zName);
}
}
}
if( currentMtime!=oldMtime || chnged!=oldChnged ){
db_multi_exec("UPDATE vfile SET mtime=%lld, chnged=%d WHERE id=%d",
currentMtime, chnged, id);
}
}
db_finalize(&q);
if( nErr ) fossil_fatal("abort due to prior errors");
| > > > > > > > > > > > > > > > | 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 |
if( mtime_of_manifest_file(vid,rid,&desiredMtime)==0 ){
if( currentMtime!=desiredMtime ){
file_set_mtime(zName, desiredMtime);
currentMtime = file_wd_mtime(zName);
}
}
}
#ifndef _WIN32
if( chnged==0 || chnged==6 || chnged==7 || chnged==8 || chnged==9 ){
if( origPerm == currentPerm ){
chnged = 0;
}else if( currentPerm == PERM_EXE ){
chnged = 6;
}else if( currentPerm == PERM_LNK ){
chnged = 7;
}else if( origPerm == PERM_EXE ){
chnged = 8;
}else if( origPerm == PERM_LNK ){
chnged = 9;
}
}
#endif
if( currentMtime!=oldMtime || chnged!=oldChnged ){
db_multi_exec("UPDATE vfile SET mtime=%lld, chnged=%d WHERE id=%d",
currentMtime, chnged, id);
}
}
db_finalize(&q);
if( nErr ) fossil_fatal("abort due to prior errors");
|
| ︙ | ︙ |
Changes to src/wikiformat.c.
| ︙ | ︙ | |||
1149 1150 1151 1152 1153 1154 1155 |
if( strncmp(zTarget, "wiki:", 5)==0
&& wiki_name_is_wellformed((const unsigned char*)zTarget) ){
return zTarget+5;
}
if( strcmp(zTarget, "Sandbox")==0 ) return zTarget;
if( wiki_name_is_wellformed((const unsigned char *)zTarget)
&& ((p->state & WIKI_NOBADLINKS)==0 ||
| | > > | 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 |
if( strncmp(zTarget, "wiki:", 5)==0
&& wiki_name_is_wellformed((const unsigned char*)zTarget) ){
return zTarget+5;
}
if( strcmp(zTarget, "Sandbox")==0 ) return zTarget;
if( wiki_name_is_wellformed((const unsigned char *)zTarget)
&& ((p->state & WIKI_NOBADLINKS)==0 ||
db_exists("SELECT 1 FROM tag WHERE tagname GLOB 'wiki-%q'"
" AND (SELECT value FROM tagxref WHERE tagid=tag.tagid"
" ORDER BY mtime DESC LIMIT 1) > 0", zTarget))
){
return zTarget;
}
return 0;
}
/*
|
| ︙ | ︙ |
Changes to src/xfer.c.
| ︙ | ︙ | |||
1971 1972 1973 1974 1975 1976 1977 |
if( nErr && go==2 ){
db_multi_exec("DROP TABLE onremote");
manifest_crosslink_end(MC_PERMIT_HOOKS);
content_enable_dephantomize(1);
db_end_transaction(0);
}
if( (syncFlags & SYNC_CLONE)==0 && g.rcvid && fossil_any_has_fork(g.rcvid) ){
| | | 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 |
if( nErr && go==2 ){
db_multi_exec("DROP TABLE onremote");
manifest_crosslink_end(MC_PERMIT_HOOKS);
content_enable_dephantomize(1);
db_end_transaction(0);
}
if( (syncFlags & SYNC_CLONE)==0 && g.rcvid && fossil_any_has_fork(g.rcvid) ){
fossil_warning("***** WARNING: a fork has occurred *****\n"
"use \"fossil info\" for more details.");
}
return nErr;
}
|
Added test/contains-selector.test.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
#
# Copyright (c) 2015 D. Richard Hipp
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the Simplified BSD License (also
# known as the "2-Clause License" or "FreeBSD License".)
#
# This program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose.
#
# Author contact information:
# drh@hwaci.com
# http://www.hwaci.com/drh/
#
############################################################################
#
# Test containsSelector() function in src/style.c
#
proc contains-selector {testId css selectorResultMap} {
set css [string trim $css]
set filename [file join $::tempPath compare-selector.css]
set fh [open $filename w]
puts -nonewline $fh $css
close $fh
foreach {selector found} $selectorResultMap {
set expected "$selector [expr {$found ? "found" : "not found"}]"
set result [fossil test-contains-selector $filename $selector]
test "contains-selector $testId $selector" {$result eq $expected}
}
file delete $filename
}
contains-selector 1 {
.a.b {}
.c .de {}
/* comment */
.c .d, .e /* comment */ {}
} {
.a 0
.b 0
.a.b 1
.c 0
.d 0
{.c.d} 0
{.c .d} 1
.e 1
}
|
Changes to win/Makefile.PellesCGMake.
| ︙ | ︙ | |||
81 82 83 84 85 86 87 | UTILS_OBJ=$(UTILS:.exe=.obj) UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) # define the SQLite files, which need special flags on compile SQLITESRC=sqlite3.c ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) | | | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | UTILS_OBJ=$(UTILS:.exe=.obj) UTILS_SRC=$(foreach uf,$(UTILS),$(SRCDIR)$(uf:.exe=.c)) # define the SQLite files, which need special flags on compile SQLITESRC=sqlite3.c ORIGSQLITESRC=$(foreach sf,$(SQLITESRC),$(SRCDIR)$(sf)) SQLITEOBJ=$(foreach sf,$(SQLITESRC),$(sf:.c=.obj)) SQLITEDEFINES=-DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_WIN32_NO_ANSI # define the SQLite shell files, which need special flags on compile SQLITESHELLSRC=shell.c ORIGSQLITESHELLSRC=$(foreach sf,$(SQLITESHELLSRC),$(SRCDIR)$(sf)) SQLITESHELLOBJ=$(foreach sf,$(SQLITESHELLSRC),$(sf:.c=.obj)) SQLITESHELLDEFINES=-Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen |
| ︙ | ︙ |
Changes to win/Makefile.dmc.
| ︙ | ︙ | |||
22 23 24 25 26 27 28 | SSL = CFLAGS = -o BCC = $(DMDIR)\bin\dmc $(CFLAGS) TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 | | | | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | SSL = CFLAGS = -o BCC = $(DMDIR)\bin\dmc $(CFLAGS) TCC = $(DMDIR)\bin\dmc $(CFLAGS) $(DMCDEF) $(SSL) $(INCL) LIBS = $(DMDIR)\extra\lib\ zlib wsock32 advapi32 SQLITE_OPTIONS = -DNDEBUG=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_DBSTAT_VTAB SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=file_access -Dsystem=fossil_system -Dgetenv=fossil_getenv -Dfopen=fossil_fopen SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.c builtin_.c bundle_.c cache_.c captcha_.c cgi_.c checkin_.c checkout_.c clearsign_.c clone_.c comformat_.c configure_.c content_.c db_.c delta_.c deltacmd_.c descendants_.c diff_.c diffcmd_.c doc_.c encode_.c event_.c export_.c file_.c finfo_.c foci_.c fusefs_.c glob_.c graph_.c gzip_.c http_.c http_socket_.c http_ssl_.c http_transport_.c import_.c info_.c json_.c json_artifact_.c json_branch_.c json_config_.c json_diff_.c json_dir_.c json_finfo_.c json_login_.c json_query_.c json_report_.c json_status_.c json_tag_.c json_timeline_.c json_user_.c json_wiki_.c leaf_.c loadctrl_.c login_.c lookslike_.c main_.c manifest_.c markdown_.c markdown_html_.c md5_.c merge_.c merge3_.c moderate_.c name_.c path_.c piechart_.c pivot_.c popen_.c pqueue_.c printf_.c publish_.c purge_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c sitemap_.c skins_.c sqlcmd_.c stash_.c stat_.c statrep_.c style_.c sync_.c tag_.c tar_.c th_main_.c timeline_.c tkt_.c tktsetup_.c undo_.c unicode_.c update_.c url_.c user_.c utf8_.c util_.c verify_.c vfile_.c wiki_.c wikiformat_.c winfile_.c winhttp_.c wysiwyg_.c xfer_.c xfersetup_.c zip_.c OBJ = $(OBJDIR)\add$O $(OBJDIR)\allrepo$O $(OBJDIR)\attach$O $(OBJDIR)\bag$O $(OBJDIR)\bisect$O $(OBJDIR)\blob$O $(OBJDIR)\branch$O $(OBJDIR)\browse$O $(OBJDIR)\builtin$O $(OBJDIR)\bundle$O $(OBJDIR)\cache$O $(OBJDIR)\captcha$O $(OBJDIR)\cgi$O $(OBJDIR)\checkin$O $(OBJDIR)\checkout$O $(OBJDIR)\clearsign$O $(OBJDIR)\clone$O $(OBJDIR)\comformat$O $(OBJDIR)\configure$O $(OBJDIR)\content$O $(OBJDIR)\db$O $(OBJDIR)\delta$O $(OBJDIR)\deltacmd$O $(OBJDIR)\descendants$O $(OBJDIR)\diff$O $(OBJDIR)\diffcmd$O $(OBJDIR)\doc$O $(OBJDIR)\encode$O $(OBJDIR)\event$O $(OBJDIR)\export$O $(OBJDIR)\file$O $(OBJDIR)\finfo$O $(OBJDIR)\foci$O $(OBJDIR)\fusefs$O $(OBJDIR)\glob$O $(OBJDIR)\graph$O $(OBJDIR)\gzip$O $(OBJDIR)\http$O $(OBJDIR)\http_socket$O $(OBJDIR)\http_ssl$O $(OBJDIR)\http_transport$O $(OBJDIR)\import$O $(OBJDIR)\info$O $(OBJDIR)\json$O $(OBJDIR)\json_artifact$O $(OBJDIR)\json_branch$O $(OBJDIR)\json_config$O $(OBJDIR)\json_diff$O $(OBJDIR)\json_dir$O $(OBJDIR)\json_finfo$O $(OBJDIR)\json_login$O $(OBJDIR)\json_query$O $(OBJDIR)\json_report$O $(OBJDIR)\json_status$O $(OBJDIR)\json_tag$O $(OBJDIR)\json_timeline$O $(OBJDIR)\json_user$O $(OBJDIR)\json_wiki$O $(OBJDIR)\leaf$O $(OBJDIR)\loadctrl$O $(OBJDIR)\login$O $(OBJDIR)\lookslike$O $(OBJDIR)\main$O $(OBJDIR)\manifest$O $(OBJDIR)\markdown$O $(OBJDIR)\markdown_html$O $(OBJDIR)\md5$O $(OBJDIR)\merge$O $(OBJDIR)\merge3$O $(OBJDIR)\moderate$O $(OBJDIR)\name$O $(OBJDIR)\path$O $(OBJDIR)\piechart$O $(OBJDIR)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$O $(OBJDIR)\publish$O $(OBJDIR)\purge$O $(OBJDIR)\rebuild$O $(OBJDIR)\regexp$O $(OBJDIR)\report$O $(OBJDIR)\rss$O $(OBJDIR)\schema$O $(OBJDIR)\search$O $(OBJDIR)\setup$O $(OBJDIR)\sha1$O $(OBJDIR)\shun$O $(OBJDIR)\sitemap$O $(OBJDIR)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$O $(OBJDIR)\statrep$O $(OBJDIR)\style$O $(OBJDIR)\sync$O $(OBJDIR)\tag$O $(OBJDIR)\tar$O $(OBJDIR)\th_main$O $(OBJDIR)\timeline$O $(OBJDIR)\tkt$O $(OBJDIR)\tktsetup$O $(OBJDIR)\undo$O $(OBJDIR)\unicode$O $(OBJDIR)\update$O $(OBJDIR)\url$O $(OBJDIR)\user$O $(OBJDIR)\utf8$O $(OBJDIR)\util$O $(OBJDIR)\verify$O $(OBJDIR)\vfile$O $(OBJDIR)\wiki$O $(OBJDIR)\wikiformat$O $(OBJDIR)\winfile$O $(OBJDIR)\winhttp$O $(OBJDIR)\wysiwyg$O $(OBJDIR)\xfer$O $(OBJDIR)\xfersetup$O $(OBJDIR)\zip$O $(OBJDIR)\shell$O $(OBJDIR)\sqlite3$O $(OBJDIR)\th$O $(OBJDIR)\th_lang$O RC=$(DMDIR)\bin\rcc RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__ APPNAME = $(OBJDIR)\fossil$(E) all: $(APPNAME) $(APPNAME) : translate$E mkindex$E codecheck1$E headers $(OBJ) $(OBJDIR)\link cd $(OBJDIR) codecheck1$E $(SRC) $(DMDIR)\bin\link @link $(OBJDIR)\fossil.res: $B\win\fossil.rc $(RC) $(RCFLAGS) -o$@ $** $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res +echo add allrepo attach bag bisect blob branch browse builtin bundle cache captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo foci fusefs glob graph gzip http http_socket http_ssl http_transport import info json json_artifact json_branch json_config json_diff json_dir json_finfo json_login json_query json_report json_status json_tag json_timeline json_user json_wiki leaf loadctrl login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path piechart pivot popen pqueue printf publish purge rebuild regexp report rss schema search setup sha1 shun sitemap skins sqlcmd stash stat statrep style sync tag tar th_main timeline tkt tktsetup undo unicode update url user utf8 util verify vfile wiki wikiformat winfile winhttp wysiwyg xfer xfersetup zip shell sqlite3 th th_lang > $@ +echo fossil >> $@ +echo fossil >> $@ +echo $(LIBS) >> $@ +echo. >> $@ +echo fossil >> $@ translate$E: $(SRCDIR)\translate.c |
| ︙ | ︙ | |||
552 553 554 555 556 557 558 559 560 561 562 563 564 565 | +translate$E $** > $@ $(OBJDIR)\path$O : path_.c path.h $(TCC) -o$@ -c path_.c path_.c : $(SRCDIR)\path.c +translate$E $** > $@ $(OBJDIR)\pivot$O : pivot_.c pivot.h $(TCC) -o$@ -c pivot_.c pivot_.c : $(SRCDIR)\pivot.c +translate$E $** > $@ | > > > > > > | 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | +translate$E $** > $@ $(OBJDIR)\path$O : path_.c path.h $(TCC) -o$@ -c path_.c path_.c : $(SRCDIR)\path.c +translate$E $** > $@ $(OBJDIR)\piechart$O : piechart_.c piechart.h $(TCC) -o$@ -c piechart_.c piechart_.c : $(SRCDIR)\piechart.c +translate$E $** > $@ $(OBJDIR)\pivot$O : pivot_.c pivot.h $(TCC) -o$@ -c pivot_.c pivot_.c : $(SRCDIR)\pivot.c +translate$E $** > $@ |
| ︙ | ︙ | |||
830 831 832 833 834 835 836 | $(OBJDIR)\zip$O : zip_.c zip.h $(TCC) -o$@ -c zip_.c zip_.c : $(SRCDIR)\zip.c +translate$E $** > $@ headers: makeheaders$E page_index.h builtin_data.h VERSION.h | | | 836 837 838 839 840 841 842 843 844 | $(OBJDIR)\zip$O : zip_.c zip.h $(TCC) -o$@ -c zip_.c zip_.c : $(SRCDIR)\zip.c +translate$E $** > $@ headers: makeheaders$E page_index.h builtin_data.h VERSION.h +makeheaders$E add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.h bisect_.c:bisect.h blob_.c:blob.h branch_.c:branch.h browse_.c:browse.h builtin_.c:builtin.h bundle_.c:bundle.h cache_.c:cache.h captcha_.c:captcha.h cgi_.c:cgi.h checkin_.c:checkin.h checkout_.c:checkout.h clearsign_.c:clearsign.h clone_.c:clone.h comformat_.c:comformat.h configure_.c:configure.h content_.c:content.h db_.c:db.h delta_.c:delta.h deltacmd_.c:deltacmd.h descendants_.c:descendants.h diff_.c:diff.h diffcmd_.c:diffcmd.h doc_.c:doc.h encode_.c:encode.h event_.c:event.h export_.c:export.h file_.c:file.h finfo_.c:finfo.h foci_.c:foci.h fusefs_.c:fusefs.h glob_.c:glob.h graph_.c:graph.h gzip_.c:gzip.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h import_.c:import.h info_.c:info.h json_.c:json.h json_artifact_.c:json_artifact.h json_branch_.c:json_branch.h json_config_.c:json_config.h json_diff_.c:json_diff.h json_dir_.c:json_dir.h json_finfo_.c:json_finfo.h json_login_.c:json_login.h json_query_.c:json_query.h json_report_.c:json_report.h json_status_.c:json_status.h json_tag_.c:json_tag.h json_timeline_.c:json_timeline.h json_user_.c:json_user.h json_wiki_.c:json_wiki.h leaf_.c:leaf.h loadctrl_.c:loadctrl.h login_.c:login.h lookslike_.c:lookslike.h main_.c:main.h manifest_.c:manifest.h markdown_.c:markdown.h markdown_html_.c:markdown_html.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h moderate_.c:moderate.h name_.c:name.h path_.c:path.h piechart_.c:piechart.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h publish_.c:publish.h purge_.c:purge.h rebuild_.c:rebuild.h regexp_.c:regexp.h report_.c:report.h rss_.c:rss.h schema_.c:schema.h search_.c:search.h setup_.c:setup.h sha1_.c:sha1.h shun_.c:shun.h sitemap_.c:sitemap.h skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.h statrep_.c:statrep.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h tar_.c:tar.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h unicode_.c:unicode.h update_.c:update.h url_.c:url.h user_.c:user.h utf8_.c:utf8.h util_.c:util.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winfile_.c:winfile.h winhttp_.c:winhttp.h wysiwyg_.c:wysiwyg.h xfer_.c:xfer.h xfersetup_.c:xfersetup.h zip_.c:zip.h $(SRCDIR)\sqlite3.h $(SRCDIR)\th.h VERSION.h $(SRCDIR)\cson_amalgamation.h @copy /Y nul: headers |
Changes to win/Makefile.mingw.
| ︙ | ︙ | |||
445 446 447 448 449 450 451 452 453 454 455 456 457 458 | $(SRCDIR)/markdown_html.c \ $(SRCDIR)/md5.c \ $(SRCDIR)/merge.c \ $(SRCDIR)/merge3.c \ $(SRCDIR)/moderate.c \ $(SRCDIR)/name.c \ $(SRCDIR)/path.c \ $(SRCDIR)/pivot.c \ $(SRCDIR)/popen.c \ $(SRCDIR)/pqueue.c \ $(SRCDIR)/printf.c \ $(SRCDIR)/publish.c \ $(SRCDIR)/purge.c \ $(SRCDIR)/rebuild.c \ | > | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | $(SRCDIR)/markdown_html.c \ $(SRCDIR)/md5.c \ $(SRCDIR)/merge.c \ $(SRCDIR)/merge3.c \ $(SRCDIR)/moderate.c \ $(SRCDIR)/name.c \ $(SRCDIR)/path.c \ $(SRCDIR)/piechart.c \ $(SRCDIR)/pivot.c \ $(SRCDIR)/popen.c \ $(SRCDIR)/pqueue.c \ $(SRCDIR)/printf.c \ $(SRCDIR)/publish.c \ $(SRCDIR)/purge.c \ $(SRCDIR)/rebuild.c \ |
| ︙ | ︙ | |||
616 617 618 619 620 621 622 623 624 625 626 627 628 629 | $(OBJDIR)/markdown_html_.c \ $(OBJDIR)/md5_.c \ $(OBJDIR)/merge_.c \ $(OBJDIR)/merge3_.c \ $(OBJDIR)/moderate_.c \ $(OBJDIR)/name_.c \ $(OBJDIR)/path_.c \ $(OBJDIR)/pivot_.c \ $(OBJDIR)/popen_.c \ $(OBJDIR)/pqueue_.c \ $(OBJDIR)/printf_.c \ $(OBJDIR)/publish_.c \ $(OBJDIR)/purge_.c \ $(OBJDIR)/rebuild_.c \ | > | 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 | $(OBJDIR)/markdown_html_.c \ $(OBJDIR)/md5_.c \ $(OBJDIR)/merge_.c \ $(OBJDIR)/merge3_.c \ $(OBJDIR)/moderate_.c \ $(OBJDIR)/name_.c \ $(OBJDIR)/path_.c \ $(OBJDIR)/piechart_.c \ $(OBJDIR)/pivot_.c \ $(OBJDIR)/popen_.c \ $(OBJDIR)/pqueue_.c \ $(OBJDIR)/printf_.c \ $(OBJDIR)/publish_.c \ $(OBJDIR)/purge_.c \ $(OBJDIR)/rebuild_.c \ |
| ︙ | ︙ | |||
736 737 738 739 740 741 742 743 744 745 746 747 748 749 | $(OBJDIR)/markdown_html.o \ $(OBJDIR)/md5.o \ $(OBJDIR)/merge.o \ $(OBJDIR)/merge3.o \ $(OBJDIR)/moderate.o \ $(OBJDIR)/name.o \ $(OBJDIR)/path.o \ $(OBJDIR)/pivot.o \ $(OBJDIR)/popen.o \ $(OBJDIR)/pqueue.o \ $(OBJDIR)/printf.o \ $(OBJDIR)/publish.o \ $(OBJDIR)/purge.o \ $(OBJDIR)/rebuild.o \ | > | 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 | $(OBJDIR)/markdown_html.o \ $(OBJDIR)/md5.o \ $(OBJDIR)/merge.o \ $(OBJDIR)/merge3.o \ $(OBJDIR)/moderate.o \ $(OBJDIR)/name.o \ $(OBJDIR)/path.o \ $(OBJDIR)/piechart.o \ $(OBJDIR)/pivot.o \ $(OBJDIR)/popen.o \ $(OBJDIR)/pqueue.o \ $(OBJDIR)/printf.o \ $(OBJDIR)/publish.o \ $(OBJDIR)/purge.o \ $(OBJDIR)/rebuild.o \ |
| ︙ | ︙ | |||
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h \ $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h \ $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h \ $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h \ $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h \ $(OBJDIR)/name_.c:$(OBJDIR)/name.h \ $(OBJDIR)/path_.c:$(OBJDIR)/path.h \ $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \ $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \ $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \ $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \ $(OBJDIR)/publish_.c:$(OBJDIR)/publish.h \ $(OBJDIR)/purge_.c:$(OBJDIR)/purge.h \ $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \ | > | 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 | $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h \ $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h \ $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h \ $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h \ $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h \ $(OBJDIR)/name_.c:$(OBJDIR)/name.h \ $(OBJDIR)/path_.c:$(OBJDIR)/path.h \ $(OBJDIR)/piechart_.c:$(OBJDIR)/piechart.h \ $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \ $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \ $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \ $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \ $(OBJDIR)/publish_.c:$(OBJDIR)/publish.h \ $(OBJDIR)/purge_.c:$(OBJDIR)/purge.h \ $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \ |
| ︙ | ︙ | |||
1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 | $(OBJDIR)/path_.c: $(SRCDIR)/path.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/path.c >$@ $(OBJDIR)/path.o: $(OBJDIR)/path_.c $(OBJDIR)/path.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/path.o -c $(OBJDIR)/path_.c $(OBJDIR)/path.h: $(OBJDIR)/headers $(OBJDIR)/pivot_.c: $(SRCDIR)/pivot.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/pivot.c >$@ $(OBJDIR)/pivot.o: $(OBJDIR)/pivot_.c $(OBJDIR)/pivot.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/pivot.o -c $(OBJDIR)/pivot_.c | > > > > > > > > | 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 | $(OBJDIR)/path_.c: $(SRCDIR)/path.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/path.c >$@ $(OBJDIR)/path.o: $(OBJDIR)/path_.c $(OBJDIR)/path.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/path.o -c $(OBJDIR)/path_.c $(OBJDIR)/path.h: $(OBJDIR)/headers $(OBJDIR)/piechart_.c: $(SRCDIR)/piechart.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/piechart.c >$@ $(OBJDIR)/piechart.o: $(OBJDIR)/piechart_.c $(OBJDIR)/piechart.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/piechart.o -c $(OBJDIR)/piechart_.c $(OBJDIR)/piechart.h: $(OBJDIR)/headers $(OBJDIR)/pivot_.c: $(SRCDIR)/pivot.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/pivot.c >$@ $(OBJDIR)/pivot.o: $(OBJDIR)/pivot_.c $(OBJDIR)/pivot.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/pivot.o -c $(OBJDIR)/pivot_.c |
| ︙ | ︙ | |||
2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 |
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
-DSQLITE_THREADSAFE=0 \
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
-DSQLITE_OMIT_DEPRECATED \
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_WIN32_NO_ANSI \
-D_HAVE__MINGW_H \
-DSQLITE_USE_MALLOC_H \
-DSQLITE_USE_MSIZE
SHELL_OPTIONS = -Dmain=sqlite3_shell \
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
| > | 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 |
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
-DSQLITE_THREADSAFE=0 \
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
-DSQLITE_OMIT_DEPRECATED \
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_WIN32_NO_ANSI \
-D_HAVE__MINGW_H \
-DSQLITE_USE_MALLOC_H \
-DSQLITE_USE_MSIZE
SHELL_OPTIONS = -Dmain=sqlite3_shell \
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
|
| ︙ | ︙ |
Changes to win/Makefile.mingw.mistachkin.
| ︙ | ︙ | |||
445 446 447 448 449 450 451 452 453 454 455 456 457 458 | $(SRCDIR)/markdown_html.c \ $(SRCDIR)/md5.c \ $(SRCDIR)/merge.c \ $(SRCDIR)/merge3.c \ $(SRCDIR)/moderate.c \ $(SRCDIR)/name.c \ $(SRCDIR)/path.c \ $(SRCDIR)/pivot.c \ $(SRCDIR)/popen.c \ $(SRCDIR)/pqueue.c \ $(SRCDIR)/printf.c \ $(SRCDIR)/publish.c \ $(SRCDIR)/purge.c \ $(SRCDIR)/rebuild.c \ | > | 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | $(SRCDIR)/markdown_html.c \ $(SRCDIR)/md5.c \ $(SRCDIR)/merge.c \ $(SRCDIR)/merge3.c \ $(SRCDIR)/moderate.c \ $(SRCDIR)/name.c \ $(SRCDIR)/path.c \ $(SRCDIR)/piechart.c \ $(SRCDIR)/pivot.c \ $(SRCDIR)/popen.c \ $(SRCDIR)/pqueue.c \ $(SRCDIR)/printf.c \ $(SRCDIR)/publish.c \ $(SRCDIR)/purge.c \ $(SRCDIR)/rebuild.c \ |
| ︙ | ︙ | |||
616 617 618 619 620 621 622 623 624 625 626 627 628 629 | $(OBJDIR)/markdown_html_.c \ $(OBJDIR)/md5_.c \ $(OBJDIR)/merge_.c \ $(OBJDIR)/merge3_.c \ $(OBJDIR)/moderate_.c \ $(OBJDIR)/name_.c \ $(OBJDIR)/path_.c \ $(OBJDIR)/pivot_.c \ $(OBJDIR)/popen_.c \ $(OBJDIR)/pqueue_.c \ $(OBJDIR)/printf_.c \ $(OBJDIR)/publish_.c \ $(OBJDIR)/purge_.c \ $(OBJDIR)/rebuild_.c \ | > | 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 | $(OBJDIR)/markdown_html_.c \ $(OBJDIR)/md5_.c \ $(OBJDIR)/merge_.c \ $(OBJDIR)/merge3_.c \ $(OBJDIR)/moderate_.c \ $(OBJDIR)/name_.c \ $(OBJDIR)/path_.c \ $(OBJDIR)/piechart_.c \ $(OBJDIR)/pivot_.c \ $(OBJDIR)/popen_.c \ $(OBJDIR)/pqueue_.c \ $(OBJDIR)/printf_.c \ $(OBJDIR)/publish_.c \ $(OBJDIR)/purge_.c \ $(OBJDIR)/rebuild_.c \ |
| ︙ | ︙ | |||
736 737 738 739 740 741 742 743 744 745 746 747 748 749 | $(OBJDIR)/markdown_html.o \ $(OBJDIR)/md5.o \ $(OBJDIR)/merge.o \ $(OBJDIR)/merge3.o \ $(OBJDIR)/moderate.o \ $(OBJDIR)/name.o \ $(OBJDIR)/path.o \ $(OBJDIR)/pivot.o \ $(OBJDIR)/popen.o \ $(OBJDIR)/pqueue.o \ $(OBJDIR)/printf.o \ $(OBJDIR)/publish.o \ $(OBJDIR)/purge.o \ $(OBJDIR)/rebuild.o \ | > | 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 | $(OBJDIR)/markdown_html.o \ $(OBJDIR)/md5.o \ $(OBJDIR)/merge.o \ $(OBJDIR)/merge3.o \ $(OBJDIR)/moderate.o \ $(OBJDIR)/name.o \ $(OBJDIR)/path.o \ $(OBJDIR)/piechart.o \ $(OBJDIR)/pivot.o \ $(OBJDIR)/popen.o \ $(OBJDIR)/pqueue.o \ $(OBJDIR)/printf.o \ $(OBJDIR)/publish.o \ $(OBJDIR)/purge.o \ $(OBJDIR)/rebuild.o \ |
| ︙ | ︙ | |||
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 | $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h \ $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h \ $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h \ $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h \ $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h \ $(OBJDIR)/name_.c:$(OBJDIR)/name.h \ $(OBJDIR)/path_.c:$(OBJDIR)/path.h \ $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \ $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \ $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \ $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \ $(OBJDIR)/publish_.c:$(OBJDIR)/publish.h \ $(OBJDIR)/purge_.c:$(OBJDIR)/purge.h \ $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \ | > | 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 | $(OBJDIR)/markdown_html_.c:$(OBJDIR)/markdown_html.h \ $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h \ $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h \ $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.h \ $(OBJDIR)/moderate_.c:$(OBJDIR)/moderate.h \ $(OBJDIR)/name_.c:$(OBJDIR)/name.h \ $(OBJDIR)/path_.c:$(OBJDIR)/path.h \ $(OBJDIR)/piechart_.c:$(OBJDIR)/piechart.h \ $(OBJDIR)/pivot_.c:$(OBJDIR)/pivot.h \ $(OBJDIR)/popen_.c:$(OBJDIR)/popen.h \ $(OBJDIR)/pqueue_.c:$(OBJDIR)/pqueue.h \ $(OBJDIR)/printf_.c:$(OBJDIR)/printf.h \ $(OBJDIR)/publish_.c:$(OBJDIR)/publish.h \ $(OBJDIR)/purge_.c:$(OBJDIR)/purge.h \ $(OBJDIR)/rebuild_.c:$(OBJDIR)/rebuild.h \ |
| ︙ | ︙ | |||
1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 | $(OBJDIR)/path_.c: $(SRCDIR)/path.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/path.c >$@ $(OBJDIR)/path.o: $(OBJDIR)/path_.c $(OBJDIR)/path.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/path.o -c $(OBJDIR)/path_.c $(OBJDIR)/path.h: $(OBJDIR)/headers $(OBJDIR)/pivot_.c: $(SRCDIR)/pivot.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/pivot.c >$@ $(OBJDIR)/pivot.o: $(OBJDIR)/pivot_.c $(OBJDIR)/pivot.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/pivot.o -c $(OBJDIR)/pivot_.c | > > > > > > > > | 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 | $(OBJDIR)/path_.c: $(SRCDIR)/path.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/path.c >$@ $(OBJDIR)/path.o: $(OBJDIR)/path_.c $(OBJDIR)/path.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/path.o -c $(OBJDIR)/path_.c $(OBJDIR)/path.h: $(OBJDIR)/headers $(OBJDIR)/piechart_.c: $(SRCDIR)/piechart.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/piechart.c >$@ $(OBJDIR)/piechart.o: $(OBJDIR)/piechart_.c $(OBJDIR)/piechart.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/piechart.o -c $(OBJDIR)/piechart_.c $(OBJDIR)/piechart.h: $(OBJDIR)/headers $(OBJDIR)/pivot_.c: $(SRCDIR)/pivot.c $(TRANSLATE) $(TRANSLATE) $(SRCDIR)/pivot.c >$@ $(OBJDIR)/pivot.o: $(OBJDIR)/pivot_.c $(OBJDIR)/pivot.h $(SRCDIR)/config.h $(XTCC) -o $(OBJDIR)/pivot.o -c $(OBJDIR)/pivot_.c |
| ︙ | ︙ | |||
2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 |
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
-DSQLITE_THREADSAFE=0 \
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
-DSQLITE_OMIT_DEPRECATED \
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_WIN32_NO_ANSI \
-D_HAVE__MINGW_H \
-DSQLITE_USE_MALLOC_H \
-DSQLITE_USE_MSIZE
SHELL_OPTIONS = -Dmain=sqlite3_shell \
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
| > | 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 |
-DSQLITE_ENABLE_LOCKING_STYLE=0 \
-DSQLITE_THREADSAFE=0 \
-DSQLITE_DEFAULT_FILE_FORMAT=4 \
-DSQLITE_OMIT_DEPRECATED \
-DSQLITE_ENABLE_EXPLAIN_COMMENTS \
-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_WIN32_NO_ANSI \
-D_HAVE__MINGW_H \
-DSQLITE_USE_MALLOC_H \
-DSQLITE_USE_MSIZE
SHELL_OPTIONS = -Dmain=sqlite3_shell \
-DSQLITE_OMIT_LOAD_EXTENSION=1 \
|
| ︙ | ︙ |
Changes to win/Makefile.msc.
| ︙ | ︙ | |||
197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
/DSQLITE_ENABLE_LOCKING_STYLE=0 \
/DSQLITE_THREADSAFE=0 \
/DSQLITE_DEFAULT_FILE_FORMAT=4 \
/DSQLITE_OMIT_DEPRECATED \
/DSQLITE_ENABLE_EXPLAIN_COMMENTS \
/DSQLITE_ENABLE_FTS4 \
/DSQLITE_ENABLE_FTS3_PARENTHESIS \
/DSQLITE_WIN32_NO_ANSI
SHELL_OPTIONS = /Dmain=sqlite3_shell \
/DSQLITE_OMIT_LOAD_EXTENSION=1 \
/DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
/DSQLITE_SHELL_DBNAME_PROC=fossil_open \
/Daccess=file_access \
| > | 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
/DSQLITE_ENABLE_LOCKING_STYLE=0 \
/DSQLITE_THREADSAFE=0 \
/DSQLITE_DEFAULT_FILE_FORMAT=4 \
/DSQLITE_OMIT_DEPRECATED \
/DSQLITE_ENABLE_EXPLAIN_COMMENTS \
/DSQLITE_ENABLE_FTS4 \
/DSQLITE_ENABLE_FTS3_PARENTHESIS \
/DSQLITE_ENABLE_DBSTAT_VTAB \
/DSQLITE_WIN32_NO_ANSI
SHELL_OPTIONS = /Dmain=sqlite3_shell \
/DSQLITE_OMIT_LOAD_EXTENSION=1 \
/DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) \
/DSQLITE_SHELL_DBNAME_PROC=fossil_open \
/Daccess=file_access \
|
| ︙ | ︙ | |||
284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
markdown_html_.c \
md5_.c \
merge_.c \
merge3_.c \
moderate_.c \
name_.c \
path_.c \
pivot_.c \
popen_.c \
pqueue_.c \
printf_.c \
publish_.c \
purge_.c \
rebuild_.c \
| > | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
markdown_html_.c \
md5_.c \
merge_.c \
merge3_.c \
moderate_.c \
name_.c \
path_.c \
piechart_.c \
pivot_.c \
popen_.c \
pqueue_.c \
printf_.c \
publish_.c \
purge_.c \
rebuild_.c \
|
| ︙ | ︙ | |||
454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
$(OX)\markdown_html$O \
$(OX)\md5$O \
$(OX)\merge$O \
$(OX)\merge3$O \
$(OX)\moderate$O \
$(OX)\name$O \
$(OX)\path$O \
$(OX)\pivot$O \
$(OX)\popen$O \
$(OX)\pqueue$O \
$(OX)\printf$O \
$(OX)\publish$O \
$(OX)\purge$O \
$(OX)\rebuild$O \
| > | 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
$(OX)\markdown_html$O \
$(OX)\md5$O \
$(OX)\merge$O \
$(OX)\merge3$O \
$(OX)\moderate$O \
$(OX)\name$O \
$(OX)\path$O \
$(OX)\piechart$O \
$(OX)\pivot$O \
$(OX)\popen$O \
$(OX)\pqueue$O \
$(OX)\printf$O \
$(OX)\publish$O \
$(OX)\purge$O \
$(OX)\rebuild$O \
|
| ︙ | ︙ | |||
629 630 631 632 633 634 635 636 637 638 639 640 641 642 | echo $(OX)\markdown_html.obj >> $@ echo $(OX)\md5.obj >> $@ echo $(OX)\merge.obj >> $@ echo $(OX)\merge3.obj >> $@ echo $(OX)\moderate.obj >> $@ echo $(OX)\name.obj >> $@ echo $(OX)\path.obj >> $@ echo $(OX)\pivot.obj >> $@ echo $(OX)\popen.obj >> $@ echo $(OX)\pqueue.obj >> $@ echo $(OX)\printf.obj >> $@ echo $(OX)\publish.obj >> $@ echo $(OX)\purge.obj >> $@ echo $(OX)\rebuild.obj >> $@ | > | 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 | echo $(OX)\markdown_html.obj >> $@ echo $(OX)\md5.obj >> $@ echo $(OX)\merge.obj >> $@ echo $(OX)\merge3.obj >> $@ echo $(OX)\moderate.obj >> $@ echo $(OX)\name.obj >> $@ echo $(OX)\path.obj >> $@ echo $(OX)\piechart.obj >> $@ echo $(OX)\pivot.obj >> $@ echo $(OX)\popen.obj >> $@ echo $(OX)\pqueue.obj >> $@ echo $(OX)\printf.obj >> $@ echo $(OX)\publish.obj >> $@ echo $(OX)\purge.obj >> $@ echo $(OX)\rebuild.obj >> $@ |
| ︙ | ︙ | |||
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 | translate$E $** > $@ $(OX)\path$O : path_.c path.h $(TCC) /Fo$@ -c path_.c path_.c : $(SRCDIR)\path.c translate$E $** > $@ $(OX)\pivot$O : pivot_.c pivot.h $(TCC) /Fo$@ -c pivot_.c pivot_.c : $(SRCDIR)\pivot.c translate$E $** > $@ | > > > > > > | 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 | translate$E $** > $@ $(OX)\path$O : path_.c path.h $(TCC) /Fo$@ -c path_.c path_.c : $(SRCDIR)\path.c translate$E $** > $@ $(OX)\piechart$O : piechart_.c piechart.h $(TCC) /Fo$@ -c piechart_.c piechart_.c : $(SRCDIR)\piechart.c translate$E $** > $@ $(OX)\pivot$O : pivot_.c pivot.h $(TCC) /Fo$@ -c pivot_.c pivot_.c : $(SRCDIR)\pivot.c translate$E $** > $@ |
| ︙ | ︙ | |||
1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 | markdown_html_.c:markdown_html.h \ md5_.c:md5.h \ merge_.c:merge.h \ merge3_.c:merge3.h \ moderate_.c:moderate.h \ name_.c:name.h \ path_.c:path.h \ pivot_.c:pivot.h \ popen_.c:popen.h \ pqueue_.c:pqueue.h \ printf_.c:printf.h \ publish_.c:publish.h \ purge_.c:purge.h \ rebuild_.c:rebuild.h \ | > | 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 | markdown_html_.c:markdown_html.h \ md5_.c:md5.h \ merge_.c:merge.h \ merge3_.c:merge3.h \ moderate_.c:moderate.h \ name_.c:name.h \ path_.c:path.h \ piechart_.c:piechart.h \ pivot_.c:pivot.h \ popen_.c:popen.h \ pqueue_.c:pqueue.h \ printf_.c:printf.h \ publish_.c:publish.h \ purge_.c:purge.h \ rebuild_.c:rebuild.h \ |
| ︙ | ︙ |
Changes to www/build.wiki.
| ︙ | ︙ | |||
24 25 26 27 28 29 30 | </ol> <p><hr> <h2>1.0 Obtaining The Source Code</h2> <p>Fossil is self-hosting, so you can obtain a ZIP archive or tarball | | | | | | | | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | </ol> <p><hr> <h2>1.0 Obtaining The Source Code</h2> <p>Fossil is self-hosting, so you can obtain a ZIP archive or tarball containing a snapshot of the <em>latest</em> version directly from Fossil's own fossil repository. Additionally, source archives of <em>released</em> versions of fossil are available from the <a href="http://www.fossil-scm.org/download.html">downloads page</a>. To obtain a development version of fossil, follow these steps:</p> <ol> <li><p>Point your web browser to <a href="http://www.fossil-scm.org/"> http://www.fossil-scm.org/</a>.</p></li> <li><p>Click on the <a href="http://www.fossil-scm.org/fossil/timeline">Timeline</a> link at the top of the page.</p></li> <li><p>Select a version of of Fossil you want to download. The latest version on the trunk branch is usually a good choice. Click on its link.</p></li> <li><p>Finally, click on one of the "Zip Archive" or "Tarball" links, according to your preference. These link will build a ZIP archive or a gzip-compressed tarball of the complete source code and download it to your computer. </ol> <h2>Aside: Is it really safe to use an unreleased development version of the Fossil source code?</h2> Yes! Any check-in on the [/timeline?t=trunk | trunk branch] of the Fossil [http://fossil-scm.org/fossil/timeline | Fossil self-hosting repository] will work fine. (Dodgy code is always on a branch.) In the unlikely event that you pick a version with a serious bug, it still won't clobber your files. Fossil uses several [./selfcheck.wiki | self-checks] prior to committing any repository change that prevent loss-of-work due to bugs. |
| ︙ | ︙ | |||
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | If you do not have the OpenSSL library installed on your system, then add <b>--with-openssl=none</b> to omit the https functionality. <li><p> To build a statically linked binary (suitable for use inside a chroot jail) add the <b>--static</b> option. <li><p> Other configuration options can be seen by running <b>./configure --help</b> </ol> <li><p>Run "<b>make</b>" to build the "fossil" or "fossil.exe" executable. The details depend on your platform and compiler. <ol type="a"> <li><p><i>Unix</i> → the configure-generated Makefile should work on all Unix and Unix-like systems. Simply type "<b>make</b>". | > > > > | | | > > > > > > | 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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
If you do not have the OpenSSL library installed on your system, then
add <b>--with-openssl=none</b> to omit the https functionality.
<li><p>
To build a statically linked binary (suitable for use inside a chroot
jail) add the <b>--static</b> option.
<li><p>
To enable the native [./th1.md#tclEval | Tcl integration feature] feature,
add the <b>--with-tcl=1</b> and <b>--with-tcl-private-stubs=1</b> options.
<li><p>
Other configuration options can be seen by running
<b>./configure --help</b>
</ol>
<li><p>Run "<b>make</b>" to build the "fossil" or "fossil.exe" executable.
The details depend on your platform and compiler.
<ol type="a">
<li><p><i>Unix</i> → the configure-generated Makefile should work on
all Unix and Unix-like systems. Simply type "<b>make</b>".
<li><p><i>Unix without running "configure"</i> → if you prefer to avoid
running configure, you can also use: <b>make -f Makefile.classic</b>. You may
want to make minor edits to Makefile.classic to configure the build for your
system.
<li><p><i>MinGW3.x (not 4.0)/MinGW-w64</i> → Use the mingw makefile:
"<b>make -f win/Makefile.mingw</b>". On a Windows box you will
need either Cygwin or Msys as build environment. On Cygwin, Linux
or Darwin you may want to make minor edits to win/Makefile.mingw
to configure the cross-compile environment.
To enable the native [./th1.md#tclEval | Tcl integration feature], use a
command line like the following (all on one line):
<b>make -f win/Makefile.mingw FOSSIL_ENABLE_TCL=1 FOSSIL_ENABLE_TCL_STUBS=1 FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1</b>
Hint: don't use MinGW-4.0, it will compile but fossil won't work correctly, see
<a href="https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c">https://www.fossil-scm.org/index.html/tktview/18cff45a4e210430e24c</a>.
<li><p><i>MSVC</i> → Use the MSVC makefile. First
change to the "win/" subdirectory ("<b>cd win</b>") then run
"<b>nmake /f Makefile.msc</b>".<br><br>Alternatively, the batch
file "<b>win\buildmsvc.bat</b>" may be used and it will attempt to
|
| ︙ | ︙ | |||
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | and finally run one of the following commands: <blockquote><pre> nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin </pre></blockquote> <blockquote><pre> buildmsvc.bat FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin </pre></blockquote> <li><p><i>Cygwin</i> → The same as other Unix-like systems. It is recommended to configure using: "<b>configure --disable-internal-sqlite</b>", making sure you have the "libsqlite3-devel" , "zlib-devel" and "openssl-devel" packages installed first. </ol> </ol> <h2>3.0 Installing</h2> <ol> <li value="8"> | > > > > > > > > > | | | | | | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | and finally run one of the following commands: <blockquote><pre> nmake /f Makefile.msc FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin </pre></blockquote> <blockquote><pre> buildmsvc.bat FOSSIL_ENABLE_SSL=1 FOSSIL_BUILD_SSL=1 PERLDIR=C:\full\path\to\Perl\bin </pre></blockquote> To enable the optional native [./th1.md#tclEval | Tcl integration feature], run one of the following commands or add the "FOSSIL_ENABLE_TCL=1" argument to one of the other NMAKE command lines: <blockquote><pre> nmake /f Makefile.msc FOSSIL_ENABLE_TCL=1 </pre></blockquote> <blockquote><pre> buildmsvc.bat FOSSIL_ENABLE_TCL=1 </pre></blockquote> <li><p><i>Cygwin</i> → The same as other Unix-like systems. It is recommended to configure using: "<b>configure --disable-internal-sqlite</b>", making sure you have the "libsqlite3-devel" , "zlib-devel" and "openssl-devel" packages installed first. </ol> </ol> <h2>3.0 Installing</h2> <ol> <li value="8"> <p>The finished binary is named "fossil" (or "fossil.exe" on Windows). Put this binary in a directory that is somewhere on your PATH environment variable. It does not matter where.</p> <li> <p><b>(Optional:)</b> To uninstall, just delete the binary.</p> </ol> <h2>4.0 Additional Considerations</h2> <ul> <li><p> If the makefiles that come with Fossil do not work for you, or for some other reason you want to know how to build Fossil manually, then refer to the [./makefile.wiki | Fossil Build Process] document which describes in detail what the makefiles do behind the scenes. <li><p> The fossil executable is self-contained and stand-alone and usually requires no special libraries or other software to be installed. However, the "--tk" option to the [/help/diff|diff command] requires that Tcl/Tk be installed on the local machine. You can get Tcl/Tk from [http://www.activestate.com/activetcl|ActiveState]. <li><p> To build on older Macs (circa 2002, MacOS 10.2) edit the Makefile generated by configure to add the following lines: <blockquote><pre> TCC += -DSQLITE_WITHOUT_ZONEMALLOC TCC += -D_BSD_SOURCE TCC += -DWITHOUT_ICONV TCC += -Dsocketlen_t=int TCC += -DSQLITE_MAX_MMAP_SIZE=0 </pre></blockquote> </ul> |
Changes to www/changes.wiki.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<title>Change Log</title>
<h2>Changes for Version 1.33 (not released yet)</h2>
* Add [/help?cmd=import|fossil import --svn], for importing a subversion
repository into fossil which was exported using "svnadmin dump".
* Added <nowiki>[info commands] and [info vars]</nowiki> commands to TH1.
These commands perform the same function as their Tcl counterparts,
except they do not accept a pattern argument.
* Fix some obscure issues with TH1 expression processing.
* Fix titles in search results for documents that are not wiki, markdown,
or HTML.
* Formally translate TH1 to Tcl return codes and vice-versa, where
necessary, in the Tcl integration subsystem.
| > > > > > > > > > > > > > > > < < > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
<title>Change Log</title>
<h2>Changes for Version 1.33 (not released yet)</h2>
* Improved fork detection on [/help?cmd=update|fossil update],
[/help?cmd=status|fossil status] and related commands.
* Change the default skin to what used to be called "San Francisco Modern".
* Add the [/repo-tabsize] web page
* Add [/help?cmd=import|fossil import --svn], for importing a subversion
repository into fossil which was exported using "svnadmin dump".
* Add the "--compress-only" option to [/help?cmd=rebuild|fossil rebuild].
* Use a pie chart on the [/reports?view=byuser] page.
* Enhanced [/help?cmd=clean|fossil clean --verily] so that it ignores
keep-glob and ignore-glob settings. Added the -x alias for --verily.
* Add the --soft and --hard options to [/help?cmd=rm|fossil rm] and
[/help?cmd=mv|fossil mv]. The default is still --soft, but that is
now configurable at compile-time or by the mv-rm-files setting.
* Improved ability to [./customgraph.md|customize the timelime graph].
* Improvements to the [/sitemap] page.
* Automatically adjust the [/help?cmd=timeline|CLI timeline] to the terminal
width on Linux.
* Added <nowiki>[info commands] and [info vars]</nowiki> commands to TH1.
These commands perform the same function as their Tcl counterparts,
except they do not accept a pattern argument.
* Fix some obscure issues with TH1 expression processing.
* Fix titles in search results for documents that are not wiki, markdown,
or HTML.
* Formally translate TH1 to Tcl return codes and vice-versa, where
necessary, in the Tcl integration subsystem.
* Add [/help?cmd=leaves|fossil leaves -multiple], for finding multiple
leaves on the same branch.
* Added the "Blitz" skin option.
* Removed the ".fossil-settings/keep-glob" file. It should not have been
checked into the repository.
* Update the built-in SQLite to version 3.8.10.1.
* Make [/help?cmd=open|fossil open] honor ".fossil-settings/allow-symlinks".
* Allow [/help?cmd=add|fossil add] to be used on symlinks to nonexistent or
unreadable files in the same way as [/help?cmd=addremove|fossil addremove].
* Added fork warning to be issued if sync produced a fork
* Update the [/help?cmd=/info|info] page to report when a file becomes a
symlink. Additionally show the UUID for files whose types have changed
without changing contents or symlink target.
* Have [/help?cmd=changes|fossil changes] and
[/help?cmd=status|fossil status] report when executable or symlink status
changes on otherwise unmodified files.
* Permit filtering weekday and file [/help?cmd=/reports|reports] by user.
Also ensure the user parameter is preserved when changing types. Add a
field for direct entry of the user name to each applicable report.
* Create parent directories of [/help?cmd=settings|empty-dirs] if they don't
already exist.
* Inhibit timeline links to wiki pages that have been deleted.
<h2>Changes for Version 1.32 (2015-03-14)</h2>
* When creating a new repository using [/help?cmd=init|fossil init], ensure
that the new repository is fully compatible with historical versions of
Fossil by having a valid manifest as RID 1.
* Anti-aliased rendering of arrowheads on timeline graphs.
* Added vi/less-style key bindings to the --tk diff GUI.
|
| ︙ | ︙ |
Added www/customgraph.md.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# Customizing the Timeline Graph
Beginning with version 1.33, Fossil gives users and skin authors significantly
more control over the look and feel of the timeline graph.
## <a id="basic-style"></a>Basic Style Options
Fossil includes several options for changing the graph's style without having
to delve into CSS. These can be found in the details.txt file of your skin or
under Admin/Skins/Details in the web UI.
* ###`timeline-arrowheads`
Set this to `0` to hide arrowheads on primary child lines.
* ###`timeline-circle-nodes`
Set this to `1` to make check-in nodes circular instead of square.
* ###`timeline-color-graph-lines`
Set this to `1` to colorize primary child lines.
* ###`white-foreground`
Set this to `1` if your skin uses white (or any light color) text.
This tells Fossil to generate darker background colors for branches.
## <a id="adv-style"></a>Advanced Styling
If the above options aren't enough for you, it's time to get your hands dirty
with CSS. To get started, I recommend first copying all the [graph-related CSS
rules](#default-css) to your stylesheet. Then it's simply a matter of making
the necessary changes to achieve the look you want. So, next, let's look at the
various graph elements and what purpose they serve.
Each element used to construct the timeline graph falls into one of two
categories: visible elements and positioning elements. We'll start with the
latter, less obvious type.
## <a id="pos-elems"></a>Positioning Elements
These elements aren't intended to be seen. They're only used to help position
the graph and its visible elements.
* ###<a id="tl-canvas"></a>`.tl-canvas`
Set the left and right margins on this class to give the desired amount
of space between the graph and its adjacent columns in the timeline.
#### Additional Classes
* `.sel`: See [`.tl-node`](#tl-node) for more information.
* ###<a id="tl-rail"></a>`.tl-rail`
Think of rails as invisible vertical lines on which check-in nodes are
placed. The more simultaneous branches in a graph, the more rails required
to draw it. Setting the `width` property on this class determines the
maximum spacing between rails. This spacing is automatically reduced as
the number of rails increases. If you change the `width` of `.tl-node`
elements, you'll probably need to change this value, too.
* ###<a id="tl-mergeoffset"></a>`.tl-mergeoffset`
A merge line often runs vertically right beside a primary child line. This
class's `width` property specifies the maximum spacing between the two.
Setting this value to `0` will eliminate the vertical merge lines.
Instead, the merge arrow will extend directly off the primary child line.
As with rail spacing, this is also adjusted automatically as needed.
* ###<a id="tl-nodemark"></a>`.tl-nodemark`
In the timeline table, the second cell in each check-in row contains an
invisible div with this class. These divs are used to determine the
vertical position of the nodes. By setting the `margin-top` property,
you can adjust this position.
## <a id="vis-elems"></a>Visible Elements
These are the elements you can actually see on the timeline graph: the nodes,
arrows, and lines. Each of these elements may also have additional classes
attached to them, depending on their context.
* ###<a id="tl-node"></a>`.tl-node`
A node exists for each check-in in the timeline.
#### Additional Classes
* `.leaf`: Specifies that the check-in is a leaf (i.e. that it has no
children in the same branch).
* `.merge`: Specifies that the check-in contains a merge.
* `.sel`: When the user clicks a node to designate it as the beginning
of a diff, this class is added to both the node itself and the
[`.tl-canvas`](#tl-canvas) element. The class is removed from both
elements when the node is clicked again.
* ###<a id="tl-arrow"></a>`.tl-arrow`
Arrows point from parent nodes to their children. Technically, this
class is just for the arrowhead. The rest of the arrow is composed
of [`.tl-line`](#tl-line) elements.
There are six additional classes that are used to distinguish the different
types of arrows. However, only these combinations are valid:
* `.u`: Up arrow that points to a child from its primary parent.
* `.u.sm`: Smaller up arrow, used when there is limited space between
parent and child nodes.
* `.merge.l` or `.merge.r`: Merge arrow pointing either to the left or
right.
* `.warp`: A timewarped arrow (always points to the right), used when a
misconfigured clock makes a check-in appear to have occurred before its
parent ([example](https://www.sqlite.org/src/timeline?c=2010-09-29&nd)).
* ###<a id="tl-line"></a>`.tl-line`
Along with arrows, lines connect parent and child nodes. Line thickness is
determined by the `width` property, regardless of whether the line is
horizontal or vertical. You can also use borders to create special line
styles. Here's a CSS snippet for making dotted merge lines:
.tl-line.merge {
width: 0;
background: transparent;
border: 0 dotted #000;
}
.tl-line.merge.h {
border-top-width: 1px;
}
.tl-line.merge.v {
border-left-width: 1px;
}
#### Additional Classes
* `.merge`: A merge line.
* `.h` or `.v`: Horizontal or vertical.
* `.warp`: A timewarped line.
## <a id="default-css"></a>Default Timeline Graph CSS
.tl-canvas {
margin: 0 6px 0 10px;
}
.tl-rail {
width: 18px;
}
.tl-mergeoffset {
width: 2px;
}
.tl-nodemark {
margin-top: 5px;
}
.tl-node {
width: 10px;
height: 10px;
border: 1px solid #000;
background: #fff;
cursor: pointer;
}
.tl-node.leaf:after {
content: '';
position: absolute;
top: 3px;
left: 3px;
width: 4px;
height: 4px;
background: #000;
}
.tl-node.sel:after {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 6px;
height: 6px;
background: red;
}
.tl-arrow {
width: 0;
height: 0;
transform: scale(.999);
border: 0 solid transparent;
}
.tl-arrow.u {
margin-top: -1px;
border-width: 0 3px;
border-bottom: 7px solid #000;
}
.tl-arrow.u.sm {
border-bottom: 5px solid #000;
}
.tl-line {
background: #000;
width: 2px;
}
.tl-arrow.merge {
height: 1px;
border-width: 2px 0;
}
.tl-arrow.merge.l {
border-right: 3px solid #000;
}
.tl-arrow.merge.r {
border-left: 3px solid #000;
}
.tl-line.merge {
width: 1px;
}
.tl-arrow.warp {
margin-left: 1px;
border-width: 3px 0;
border-left: 7px solid #600000;
}
.tl-line.warp {
background: #600000;
}
|
Changes to www/customskin.md.
| ︙ | ︙ | |||
230 231 232 233 234 235 236 |
press Reload on the web browser to see the effect of that change.
Iterate until the desired look is achieved.
4. Copy/paste the resulting css.txt, details.txt,
header.txt, and footer.txt files
into the CSS, details, header, and footer configuration screens
under the Admin/Skins menu.
| > > > > > | 230 231 232 233 234 235 236 237 238 239 240 241 |
press Reload on the web browser to see the effect of that change.
Iterate until the desired look is achieved.
4. Copy/paste the resulting css.txt, details.txt,
header.txt, and footer.txt files
into the CSS, details, header, and footer configuration screens
under the Admin/Skins menu.
See Also
--------
* [Customizing the Timeline Graph](customgraph.md)
|
Changes to www/mkindex.tcl.
| ︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
build.wiki {Compiling and Installing Fossil}
checkin_names.wiki {Check-in And Version Names}
checkin.wiki {Check-in Checklist}
changes.wiki {Fossil Changelog}
copyright-release.html {Contributor License Agreement}
concepts.wiki {Fossil Core Concepts}
contribute.wiki {Contributing Code or Documentation To The Fossil Project}
customskin.md {Theming: Customizing The Appearance of Web Pages}
custom_ticket.wiki {Customizing The Ticket System}
delta_encoder_algorithm.wiki {Fossil Delta Encoding Algorithm}
delta_format.wiki {Fossil Delta Format}
embeddeddoc.wiki {Embedded Project Documentation}
event.wiki {Events}
faq.wiki {Frequently Asked Questions}
| > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
build.wiki {Compiling and Installing Fossil}
checkin_names.wiki {Check-in And Version Names}
checkin.wiki {Check-in Checklist}
changes.wiki {Fossil Changelog}
copyright-release.html {Contributor License Agreement}
concepts.wiki {Fossil Core Concepts}
contribute.wiki {Contributing Code or Documentation To The Fossil Project}
customgraph.md {Theming: Customizing the Timeline Graph}
customskin.md {Theming: Customizing The Appearance of Web Pages}
custom_ticket.wiki {Customizing The Ticket System}
delta_encoder_algorithm.wiki {Fossil Delta Encoding Algorithm}
delta_format.wiki {Fossil Delta Format}
embeddeddoc.wiki {Embedded Project Documentation}
event.wiki {Events}
faq.wiki {Frequently Asked Questions}
|
| ︙ | ︙ |
Changes to www/permutedindex.html.
| ︙ | ︙ | |||
32 33 34 35 36 37 38 | <li><a href="password.wiki">Authentication — Password Management And</a></li> <li><a href="antibot.wiki">Bots — Defense against Spiders and</a></li> <li><a href="private.wiki">Branches — Creating, Syncing, and Deleting Private</a></li> <li><a href="branching.wiki">Branching, Forking, Merging, and Tagging</a></li> <li><a href="bugtheory.wiki">Bug Tracking In Fossil</a></li> <li><a href="makefile.wiki">Build Process — The Fossil</a></li> <li><a href="changes.wiki">Changelog — Fossil</a></li> | < > > | 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | <li><a href="password.wiki">Authentication — Password Management And</a></li> <li><a href="antibot.wiki">Bots — Defense against Spiders and</a></li> <li><a href="private.wiki">Branches — Creating, Syncing, and Deleting Private</a></li> <li><a href="branching.wiki">Branching, Forking, Merging, and Tagging</a></li> <li><a href="bugtheory.wiki">Bug Tracking In Fossil</a></li> <li><a href="makefile.wiki">Build Process — The Fossil</a></li> <li><a href="changes.wiki">Changelog — Fossil</a></li> <li><a href="checkin_names.wiki">Check-in And Version Names</a></li> <li><a href="checkin.wiki">Check-in Checklist</a></li> <li><a href="checkin.wiki">Checklist — Check-in</a></li> <li><a href="../test/release-checklist.wiki">Checklist — Pre-Release Testing</a></li> <li><a href="foss-cklist.wiki">Checklist For Successful Open-Source Projects</a></li> <li><a href="selfcheck.wiki">Checks — Fossil Repository Integrity Self</a></li> <li><a href="contribute.wiki">Code or Documentation To The Fossil Project — Contributing</a></li> <li><a href="style.wiki">Code Style Guidelines — Source</a></li> <li><a href="build.wiki">Compiling and Installing Fossil</a></li> <li><a href="concepts.wiki">Concepts — Fossil Core</a></li> <li><a href="server.wiki">Configure A Fossil Server — How To</a></li> <li><a href="shunning.wiki">Content From Fossil — Shunning: Deleting</a></li> <li><a href="contribute.wiki">Contributing Code or Documentation To The Fossil Project</a></li> <li><a href="copyright-release.html">Contributor License Agreement</a></li> <li><a href="concepts.wiki">Core Concepts — Fossil</a></li> <li><a href="newrepo.wiki">Create A New Fossil Repository — How To</a></li> <li><a href="private.wiki">Creating, Syncing, and Deleting Private Branches</a></li> <li><a href="qandc.wiki">Criticisms — Questions And</a></li> <li><a href="customskin.md">Customizing The Appearance of Web Pages — Theming:</a></li> <li><a href="custom_ticket.wiki">Customizing The Ticket System</a></li> <li><a href="customgraph.md">Customizing the Timeline Graph — Theming:</a></li> <li><a href="tech_overview.wiki">Databases Used By Fossil — SQLite</a></li> <li><a href="antibot.wiki">Defense against Spiders and Bots</a></li> <li><a href="shunning.wiki">Deleting Content From Fossil — Shunning:</a></li> <li><a href="private.wiki">Deleting Private Branches — Creating, Syncing, and</a></li> <li><a href="delta_encoder_algorithm.wiki">Delta Encoding Algorithm — Fossil</a></li> <li><a href="delta_format.wiki">Delta Format — Fossil</a></li> <li><a href="tech_overview.wiki">Design And Implementation Of Fossil — A Technical Overview Of The</a></li> |
| ︙ | ︙ | |||
93 94 95 96 97 98 99 100 101 102 103 104 105 106 | <li><a href="faq.wiki">Frequently Asked Questions</a></li> <li><a href="shunning.wiki">From Fossil — Shunning: Deleting Content</a></li> <li><a href="inout.wiki">From Git — Import And Export To And</a></li> <li><a href="quotes.wiki">General — Quotes: What People Are Saying About Fossil, Git, and DVCSes in</a></li> <li><a href="fossil-v-git.wiki">Git — Fossil Versus</a></li> <li><a href="inout.wiki">Git — Import And Export To And From</a></li> <li><a href="quotes.wiki">Git, and DVCSes in General — Quotes: What People Are Saying About Fossil,</a></li> <li><a href="quickstart.wiki">Guide — Fossil Quick Start</a></li> <li><a href="style.wiki">Guidelines — Source Code Style</a></li> <li><a href="hacker-howto.wiki">Hacker How-To</a></li> <li><a href="adding_code.wiki">Hacking Fossil</a></li> <li><a href="hints.wiki">Hints — Fossil Tips And Usage</a></li> <li><a href="index.wiki">Home Page</a></li> <li><a href="selfhost.wiki">Hosting Repositories — Fossil Self</a></li> | > | 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | <li><a href="faq.wiki">Frequently Asked Questions</a></li> <li><a href="shunning.wiki">From Fossil — Shunning: Deleting Content</a></li> <li><a href="inout.wiki">From Git — Import And Export To And</a></li> <li><a href="quotes.wiki">General — Quotes: What People Are Saying About Fossil, Git, and DVCSes in</a></li> <li><a href="fossil-v-git.wiki">Git — Fossil Versus</a></li> <li><a href="inout.wiki">Git — Import And Export To And From</a></li> <li><a href="quotes.wiki">Git, and DVCSes in General — Quotes: What People Are Saying About Fossil,</a></li> <li><a href="customgraph.md">Graph — Theming: Customizing the Timeline</a></li> <li><a href="quickstart.wiki">Guide — Fossil Quick Start</a></li> <li><a href="style.wiki">Guidelines — Source Code Style</a></li> <li><a href="hacker-howto.wiki">Hacker How-To</a></li> <li><a href="adding_code.wiki">Hacking Fossil</a></li> <li><a href="hints.wiki">Hints — Fossil Tips And Usage</a></li> <li><a href="index.wiki">Home Page</a></li> <li><a href="selfhost.wiki">Hosting Repositories — Fossil Self</a></li> |
| ︙ | ︙ | |||
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | <li><a href="th1.md">TH1 Scripting Language — The</a></li> <li><a href="makefile.wiki">The Fossil Build Process</a></li> <li><a href="sync.wiki">The Fossil Sync Protocol</a></li> <li><a href="tickets.wiki">The Fossil Ticket System</a></li> <li><a href="webui.wiki">The Fossil Web Interface</a></li> <li><a href="th1.md">The TH1 Scripting Language</a></li> <li><a href="customskin.md">Theming: Customizing The Appearance of Web Pages</a></li> <li><a href="theory1.wiki">Thoughts On The Design Of The Fossil DVCS</a></li> <li><a href="custom_ticket.wiki">Ticket System — Customizing The</a></li> <li><a href="tickets.wiki">Ticket System — The Fossil</a></li> <li><a href="hints.wiki">Tips And Usage Hints — Fossil</a></li> <li><a href="bugtheory.wiki">Tracking In Fossil — Bug</a></li> <li><a href="fiveminutes.wiki">Update and Running in 5 Minutes as a Single User</a></li> <li><a href="hints.wiki">Usage Hints — Fossil Tips And</a></li> <li><a href="fiveminutes.wiki">User — Update and Running in 5 Minutes as a Single</a></li> <li><a href="ssl.wiki">Using SSL with Fossil</a></li> <li><a href="checkin_names.wiki">Version Names — Check-in And</a></li> | > > | 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | <li><a href="th1.md">TH1 Scripting Language — The</a></li> <li><a href="makefile.wiki">The Fossil Build Process</a></li> <li><a href="sync.wiki">The Fossil Sync Protocol</a></li> <li><a href="tickets.wiki">The Fossil Ticket System</a></li> <li><a href="webui.wiki">The Fossil Web Interface</a></li> <li><a href="th1.md">The TH1 Scripting Language</a></li> <li><a href="customskin.md">Theming: Customizing The Appearance of Web Pages</a></li> <li><a href="customgraph.md">Theming: Customizing the Timeline Graph</a></li> <li><a href="theory1.wiki">Thoughts On The Design Of The Fossil DVCS</a></li> <li><a href="custom_ticket.wiki">Ticket System — Customizing The</a></li> <li><a href="tickets.wiki">Ticket System — The Fossil</a></li> <li><a href="customgraph.md">Timeline Graph — Theming: Customizing the</a></li> <li><a href="hints.wiki">Tips And Usage Hints — Fossil</a></li> <li><a href="bugtheory.wiki">Tracking In Fossil — Bug</a></li> <li><a href="fiveminutes.wiki">Update and Running in 5 Minutes as a Single User</a></li> <li><a href="hints.wiki">Usage Hints — Fossil Tips And</a></li> <li><a href="fiveminutes.wiki">User — Update and Running in 5 Minutes as a Single</a></li> <li><a href="ssl.wiki">Using SSL with Fossil</a></li> <li><a href="checkin_names.wiki">Version Names — Check-in And</a></li> |
| ︙ | ︙ |
Changes to www/th1.md.
| ︙ | ︙ | |||
164 165 166 167 168 169 170 | implementation in the th\_main.c or th\_tcl.c source files. All commands starting with "tcl", with the exception of "tclReady", require the Tcl integration subsystem be included at compile-time. Additionally, the "tcl" repository setting must be enabled at runtime in order to successfully make use of these commands. | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 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 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
implementation in the th\_main.c or th\_tcl.c source files.
All commands starting with "tcl", with the exception of "tclReady",
require the Tcl integration subsystem be included at compile-time.
Additionally, the "tcl" repository setting must be enabled at runtime
in order to successfully make use of these commands.
<a name="anoncap"></a>TH1 anoncap Command
-----------------------------------------
* anoncap STRING...
Returns true if the anonymous user has all of the capabilities listed
in STRING.
<a name="anycap"></a>TH1 anycap Command
---------------------------------------
* anycap STRING
Returns true if the current user user has any one of the capabilities
listed in STRING.
<a name="artifact"></a>TH1 artifact Command
-------------------------------------------
* artifact ID ?FILENAME?
Attempts to locate the specified artifact and return its contents. An
error is generated if the repository is not open or the artifact cannot
be found.
<a name="checkout"></a>TH1 checkout Command
-------------------------------------------
* checkout ?BOOLEAN?
Return the fully qualified directory name of the current checkout or an
empty string if it is not available. Optionally, it will attempt to find
the current checkout, opening the configuration ("user") database and the
repository as necessary, if the boolean argument is non-zero.
<a name="combobox"></a>TH1 combobox Command
-------------------------------------------
* combobox NAME TEXT-LIST NUMLINES
Generates and emits an HTML combobox. NAME is both the name of the
CGI parameter and the name of a variable that contains the currently
selected value. TEXT-LIST is a list of possible values for the
combobox. NUMLINES is 1 for a true combobox. If NUMLINES is greater
than one then the display is a listbox with the number of lines given.
<a name="date"></a>TH1 date Command
-----------------------------------
* date ?-local?
Return a strings which is the current time and date. If the -local
option is used, the date appears using localtime instead of UTC.
<a name="decorate"></a>TH1 decorate Command
-------------------------------------------
* decorate STRING
Renders STRING as wiki content; however, only links are handled. No
other markup is processed.
<a name="enable_output"></a>TH1 enable_output Command
-----------------------------------------------------
* enable_output BOOLEAN
Enable or disable sending output when the combobox, puts, or wiki
commands are used.
<a name="getParameter"></a>TH1 getParameter Command
---------------------------------------------------
* getParameter NAME ?DEFAULT?
Returns the value of the specified query parameter or the specified
default value when there is no matching query parameter.
<a name="globalState"></a>TH1 globalState Command
-------------------------------------------------
* globalState NAME ?DEFAULT?
Returns a string containing the value of the specified global state
variable -OR- the specified default value. The supported items are:
1. **checkout** -- _Active local checkout directory, if any._
1. **configuration** -- _Active configuration database file name, if any._
1. **executable** -- _Fully qualified executable file name._
1. **flags** -- _TH1 initialization flags._
1. **log** -- _Error log file name, if any._
1. **repository** -- _Active local repository file name, if any._
1. **top** -- _Base path for the active server instance, if applicable._
1. **user** -- _Active user name, if any._
1. **vfs** -- _SQLite VFS in use, if overridden._
Attempts to query for unsupported global state variables will result
in a script error. Additional global state variables may be exposed
in the future.
<a name="hascap"></a>TH1 hascap Command
---------------------------------------
* hascap STRING...
Returns true if the current user has all of the capabilities listed
in STRING.
<a name="hasfeature"></a>TH1 hasfeature Command
-----------------------------------------------
* hasfeature STRING
Returns true if the binary has the given compile-time feature enabled.
The possible features are:
1. **ssl** -- _Support for the HTTPS transport._
1. **legacyMvRm** -- _Support for legacy mv/rm command behavior._
1. **th1Docs** -- _Support for TH1 in embedded documentation._
1. **th1Hooks** -- _Support for TH1 command and web page hooks._
1. **tcl** -- _Support for Tcl integration._
1. **useTclStubs** -- _Tcl stubs enabled in the Tcl headers._
1. **tclStubs** -- _Uses Tcl stubs (i.e. linking with stubs library)._
1. **tclPrivateStubs** -- _Uses Tcl private stubs (i.e. header-only)._
1. **json** -- _Support for the JSON APIs._
1. **markdown** -- _Support for Markdown documentation format._
1. **unicodeCmdLine** -- _The command line arguments are Unicode._
<a name="html"></a>TH1 html Command
-----------------------------------
* html STRING
Outputs the STRING escaped for HTML.
<a name="htmlize"></a>TH1 htmlize Command
-----------------------------------------
* htmlize STRING
Escape all characters of STRING which have special meaning in HTML.
Returns the escaped string.
<a name="http"></a>TH1 http Command
-----------------------------------
* http ?-asynchronous? ?--? url ?payload?
Performs an HTTP or HTTPS request for the specified URL. If a
payload is present, it will be interpreted as text/plain and
the POST method will be used; otherwise, the GET method will
be used. Upon success, if the -asynchronous option is used, an
empty string is returned as the result; otherwise, the response
from the server is returned as the result. Synchronous requests
are not currently implemented.
<a name="httpize"></a>TH1 httpize Command
-----------------------------------------
* httpize STRING
Escape all characters of STRING which have special meaning in URI
components. Returns the escaped string.
<a name="linecount"></a>TH1 linecount Command
---------------------------------------------
* linecount STRING MAX MIN
Returns one more than the number of \n characters in STRING. But
never returns less than MIN or more than MAX.
<a name="puts"></a>TH1 puts Command
-----------------------------------
* puts STRING
Outputs the STRING unchanged.
<a name="query"></a>TH1 query Command
-------------------------------------
* query SQL CODE
Runs the SQL query given by the SQL argument. For each row in the result
set, run CODE.
In SQL, parameters such as $var are filled in using the value of variable
"var". Result values are stored in variables with the column name prior
to each invocation of CODE.
<a name="randhex"></a>TH1 randhex Command
-----------------------------------------
* randhex N
Returns a string of N*2 random hexadecimal digits with N<50. If N is
omitted, use a value of 10.
<a name="regexp"></a>TH1 regexp Command
---------------------------------------
* regexp ?-nocase? ?--? exp string
Checks the string against the specified regular expression and returns
non-zero if it matches. If the regular expression is invalid or cannot
be compiled, an error will be generated.
<a name="reinitialize"></a>TH1 reinitialize Command
---------------------------------------------------
* reinitialize ?FLAGS?
Reinitializes the TH1 interpreter using the specified flags.
<a name="render"></a>TH1 render Command
---------------------------------------
* render STRING
Renders the TH1 template and writes the results.
<a name="repository"></a>TH1 repository Command
-----------------------------------------------
* repository ?BOOLEAN?
Returns the fully qualified file name of the open repository or an empty
string if one is not currently open. Optionally, it will attempt to open
the repository if the boolean argument is non-zero.
<a name="searchable"></a>TH1 searchable Command
-----------------------------------------------
* searchable STRING...
Return true if searching in any of the document classes identified
by STRING is enabled for the repository and user has the necessary
capabilities to perform the search. The possible document classes
are:
|
| ︙ | ︙ | |||
424 425 426 427 428 429 430 |
But to see if ANY document class is searchable:
if {[searchable cdtw]} {...}
This command is useful for enabling or disabling a "Search" entry on the
menu bar.
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 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 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
But to see if ANY document class is searchable:
if {[searchable cdtw]} {...}
This command is useful for enabling or disabling a "Search" entry on the
menu bar.
<a name="setParameter"></a>TH1 setParameter Command
---------------------------------------------------
* setParameter NAME VALUE
Sets the value of the specified query parameter.
<a name="setting"></a>TH1 setting Command
-----------------------------------------
* setting name
Gets and returns the value of the specified setting.
<a name="styleHeader"></a>TH1 styleHeader Command
-------------------------------------------------
* styleHeader TITLE
Render the configured style header.
<a name="styleFooter"></a>TH1 styleFooter Command
-------------------------------------------------
* styleFooter
Render the configured style footer.
<a name="tclEval"></a>TH1 tclEval Command
-----------------------------------------
**This command requires the Tcl integration feature.**
* tclEval arg ?arg ...?
Evaluates the Tcl script and returns its result verbatim. If a Tcl script
error is generated, it will be transformed into a TH1 script error. A Tcl
interpreter will be created automatically if it has not been already.
<a name="tclExpr"></a>TH1 tclExpr Command
-----------------------------------------
**This command requires the Tcl integration feature.**
* tclExpr arg ?arg ...?
Evaluates the Tcl expression and returns its result verbatim. If a Tcl
script error is generated, it will be transformed into a TH1 script error.
A Tcl interpreter will be created automatically if it has not been already.
<a name="tclInvoke"></a>TH1 tclInvoke Command
---------------------------------------------
**This command requires the Tcl integration feature.**
* tclInvoke command ?arg ...?
Invokes the Tcl command using the supplied arguments. No additional
substitutions are performed on the arguments. A Tcl interpreter will
be created automatically if it has not been already.
<a name="tclReady"></a>TH1 tclReady Command
-------------------------------------------
* tclReady
Returns true if the binary has the Tcl integration feature enabled and it
is currently available for use by TH1 scripts.
<a name="trace"></a>TH1 trace Command
-------------------------------------
* trace STRING
Generates a TH1 trace message if TH1 tracing is enabled.
<a name="stime"></a>TH1 stime Command
-------------------------------------
* stime
Returns the number of microseconds of CPU time consumed by the current
process in system space.
<a name="utime"></a>TH1 utime Command
-------------------------------------
* utime
Returns the number of microseconds of CPU time consumed by the current
process in user space.
<a name="wiki"></a>TH1 wiki Command
-----------------------------------
* wiki STRING
Renders STRING as wiki content.
Tcl Integration Commands
------------------------
When the Tcl integration subsystem is enabled, several commands are added
to the Tcl interpreter. They are used to allow Tcl scripts access to the
Fossil functionality provided via TH1. The following is a summary of the
Tcl commands:
* th1Eval
* th1Expr
<a name="th1Eval"></a>Tcl th1Eval Command
-----------------------------------------
**This command requires the Tcl integration feature.**
* th1Eval arg
Evaluates the TH1 script and returns its result verbatim. If a TH1 script
error is generated, it will be transformed into a Tcl script error.
<a name="th1Expr"></a>Tcl th1Expr Command
-----------------------------------------
**This command requires the Tcl integration feature.**
* th1Expr arg
Evaluates the TH1 expression and returns its result verbatim. If a TH1
script error is generated, it will be transformed into a Tcl script error.
|
| ︙ | ︙ |