Fossil SCM

Merge in latest load average enhancement (very nice), and other cleanup.

andybradford 2014-03-11 05:05 http-auth merge
Commit 75406df20739b152effdd507f88a5f08cce1f008
+2 -2
--- BUILD.txt
+++ BUILD.txt
@@ -22,11 +22,11 @@
2222
2323
cd win; nmake /f Makefile.msc
2424
2525
If you have trouble, or you want to do something fancy, just look at
2626
Makefile.classic. There are 6 configuration options that are all well
27
-commented. Instead of editing the Makefile.classic, consider copying
27
+commented. Instead of editing the Makefile.classic, consider copying
2828
Makefile.classic to an alternative name such as "GNUMakefile",
2929
"BSDMakefile", or "makefile" and editing the copy.
3030
3131
3232
BUILDING OUTSIDE THE SOURCE TREE
@@ -61,11 +61,11 @@
6161
Do not edit src/main.mk directly. Update src/makemake.tcl and
6262
then rerun it.
6363
6464
* The *.h header files are automatically generated using a program
6565
called "makeheaders". Source code to the makeheaders program is
66
- found in src/makeheaders.c. Documentation is found in
66
+ found in src/makeheaders.c. Documentation is found in
6767
src/makeheaders.html.
6868
6969
* Most *.c source files are preprocessed using a program called
7070
"translate". The sources to translate are found in src/translate.c.
7171
A header comment in src/translate.c explains in detail what it does.
7272
--- BUILD.txt
+++ BUILD.txt
@@ -22,11 +22,11 @@
22
23 cd win; nmake /f Makefile.msc
24
25 If you have trouble, or you want to do something fancy, just look at
26 Makefile.classic. There are 6 configuration options that are all well
27 commented. Instead of editing the Makefile.classic, consider copying
28 Makefile.classic to an alternative name such as "GNUMakefile",
29 "BSDMakefile", or "makefile" and editing the copy.
30
31
32 BUILDING OUTSIDE THE SOURCE TREE
@@ -61,11 +61,11 @@
61 Do not edit src/main.mk directly. Update src/makemake.tcl and
62 then rerun it.
63
64 * The *.h header files are automatically generated using a program
65 called "makeheaders". Source code to the makeheaders program is
66 found in src/makeheaders.c. Documentation is found in
67 src/makeheaders.html.
68
69 * Most *.c source files are preprocessed using a program called
70 "translate". The sources to translate are found in src/translate.c.
71 A header comment in src/translate.c explains in detail what it does.
72
--- BUILD.txt
+++ BUILD.txt
@@ -22,11 +22,11 @@
22
23 cd win; nmake /f Makefile.msc
24
25 If you have trouble, or you want to do something fancy, just look at
26 Makefile.classic. There are 6 configuration options that are all well
27 commented. Instead of editing the Makefile.classic, consider copying
28 Makefile.classic to an alternative name such as "GNUMakefile",
29 "BSDMakefile", or "makefile" and editing the copy.
30
31
32 BUILDING OUTSIDE THE SOURCE TREE
@@ -61,11 +61,11 @@
61 Do not edit src/main.mk directly. Update src/makemake.tcl and
62 then rerun it.
63
64 * The *.h header files are automatically generated using a program
65 called "makeheaders". Source code to the makeheaders program is
66 found in src/makeheaders.c. Documentation is found in
67 src/makeheaders.html.
68
69 * Most *.c source files are preprocessed using a program called
70 "translate". The sources to translate are found in src/translate.c.
71 A header comment in src/translate.c explains in detail what it does.
72
+12 -12
--- COPYRIGHT-BSD2.txt
+++ COPYRIGHT-BSD2.txt
@@ -1,31 +1,31 @@
11
Copyright 2007 D. Richard Hipp. All rights reserved.
22
3
-Redistribution and use in source and binary forms, with or
4
-without modification, are permitted provided that the
3
+Redistribution and use in source and binary forms, with or
4
+without modification, are permitted provided that the
55
following conditions are met:
66
77
1. Redistributions of source code must retain the above
8
- copyright notice, this list of conditions and the
8
+ copyright notice, this list of conditions and the
99
following disclaimer.
1010
1111
2. Redistributions in binary form must reproduce the above
1212
copyright notice, this list of conditions and the
1313
following disclaimer in the documentation and/or other
1414
materials provided with the distribution.
1515
16
-THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
17
-OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16
+THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
17
+OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
1818
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
-ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
19
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
2020
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
21
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
2323
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
24
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
2626
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727
28
-The views and conclusions contained in the software and documentation
29
-are those of the authors and contributors and should not be interpreted
28
+The views and conclusions contained in the software and documentation
29
+are those of the authors and contributors and should not be interpreted
3030
as representing official policies, either expressed or implied, of anybody
3131
else.
3232
--- COPYRIGHT-BSD2.txt
+++ COPYRIGHT-BSD2.txt
@@ -1,31 +1,31 @@
1 Copyright 2007 D. Richard Hipp. All rights reserved.
2
3 Redistribution and use in source and binary forms, with or
4 without modification, are permitted provided that the
5 following conditions are met:
6
7 1. Redistributions of source code must retain the above
8 copyright notice, this list of conditions and the
9 following disclaimer.
10
11 2. Redistributions in binary form must reproduce the above
12 copyright notice, this list of conditions and the
13 following disclaimer in the documentation and/or other
14 materials provided with the distribution.
15
16 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
17 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
20 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 The views and conclusions contained in the software and documentation
29 are those of the authors and contributors and should not be interpreted
30 as representing official policies, either expressed or implied, of anybody
31 else.
32
--- COPYRIGHT-BSD2.txt
+++ COPYRIGHT-BSD2.txt
@@ -1,31 +1,31 @@
1 Copyright 2007 D. Richard Hipp. All rights reserved.
2
3 Redistribution and use in source and binary forms, with or
4 without modification, are permitted provided that the
5 following conditions are met:
6
7 1. Redistributions of source code must retain the above
8 copyright notice, this list of conditions and the
9 following disclaimer.
10
11 2. Redistributions in binary form must reproduce the above
12 copyright notice, this list of conditions and the
13 following disclaimer in the documentation and/or other
14 materials provided with the distribution.
15
16 THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
17 OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
20 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
28 The views and conclusions contained in the software and documentation
29 are those of the authors and contributors and should not be interpreted
30 as representing official policies, either expressed or implied, of anybody
31 else.
32
--- Makefile.Cygwin.in
+++ Makefile.Cygwin.in
@@ -36,11 +36,11 @@
3636
# care about testing the end result, this can be blank.
3737
#
3838
TCLSH = tclsh
3939
4040
LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
41
-TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H
41
+TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -DFOSSIL_OMIT_LOAD_AVERAGE
4242
INSTALLDIR =$(DESTDIR)@prefix@/bin
4343
USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
4444
FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
4545
FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@
4646
FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@
4747
--- Makefile.Cygwin.in
+++ Makefile.Cygwin.in
@@ -36,11 +36,11 @@
36 # care about testing the end result, this can be blank.
37 #
38 TCLSH = tclsh
39
40 LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
41 TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H
42 INSTALLDIR =$(DESTDIR)@prefix@/bin
43 USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
44 FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
45 FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@
46 FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@
47
--- Makefile.Cygwin.in
+++ Makefile.Cygwin.in
@@ -36,11 +36,11 @@
36 # care about testing the end result, this can be blank.
37 #
38 TCLSH = tclsh
39
40 LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
41 TCC += @EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -DFOSSIL_OMIT_LOAD_AVERAGE
42 INSTALLDIR =$(DESTDIR)@prefix@/bin
43 USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
44 FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
45 FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@
46 FOSSIL_ENABLE_TCL_PRIVATE_STUBS = @FOSSIL_ENABLE_TCL_PRIVATE_STUBS@
47
+18 -1
--- src/allrepo.c
+++ src/allrepo.c
@@ -65,10 +65,16 @@
6565
}else{
6666
blob_appendf(pExtra, " --%s \"\"", zArg);
6767
}
6868
}
6969
}
70
+static void collect_argv(Blob *pExtra, int iStart){
71
+ int i;
72
+ for(i=iStart; i<g.argc; i++){
73
+ blob_appendf(pExtra, " %s", g.argv[i]);
74
+ }
75
+}
7076
7177
7278
/*
7379
** COMMAND: all
7480
**
@@ -118,10 +124,15 @@
118124
** present, are passed along verbatim. The --force and
119125
** --randomize options are not supported.
120126
**
121127
** sync Run a "sync" on all repositories. Only the --verbose
122128
** option is supported.
129
+**
130
+** setting Run the "setting", "set", or "unset" commands on all
131
+** set repositories. These command are particularly useful in
132
+** unset conjunection with the "max-loadavg" setting which cannot
133
+** otherwise be set globally.
123134
**
124135
** Repositories are automatically added to the set of known repositories
125136
** when one of the following commands are run against the repository:
126137
** clone, info, pull, push, or sync. Even previously ignored repositories
127138
** are added back to the list of repositories by these commands.
@@ -155,11 +166,11 @@
155166
}
156167
n = strlen(g.argv[2]);
157168
db_open_config(1);
158169
blob_zero(&extra);
159170
zCmd = g.argv[2];
160
- if( g.zLogin ) blob_appendf(&extra, " -U %s", g.zLogin);
171
+ if( !login_is_nobody() ) blob_appendf(&extra, " -U %s", g.zLogin);
161172
if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){
162173
zCmd = "list";
163174
useCheckouts = find_option("ckout","c",0)!=0;
164175
}else if( strncmp(zCmd, "clean", n)==0 ){
165176
zCmd = "clean --chdir";
@@ -201,10 +212,16 @@
201212
collect_argument(&extra, "vacuum",0);
202213
collect_argument(&extra, "deanalyze",0);
203214
collect_argument(&extra, "analyze",0);
204215
collect_argument(&extra, "wal",0);
205216
collect_argument(&extra, "stats",0);
217
+ }else if( strncmp(zCmd, "setting", n)==0 ){
218
+ zCmd = "setting -R";
219
+ collect_argv(&extra, 3);
220
+ }else if( strncmp(zCmd, "unset", n)==0 ){
221
+ zCmd = "unset -R";
222
+ collect_argv(&extra, 3);
206223
}else if( strncmp(zCmd, "sync", n)==0 ){
207224
zCmd = "sync -autourl -R";
208225
collect_argument(&extra, "verbose","v");
209226
}else if( strncmp(zCmd, "test-integrity", n)==0 ){
210227
collect_argument(&extra, "parse", 0);
211228
--- src/allrepo.c
+++ src/allrepo.c
@@ -65,10 +65,16 @@
65 }else{
66 blob_appendf(pExtra, " --%s \"\"", zArg);
67 }
68 }
69 }
 
 
 
 
 
 
70
71
72 /*
73 ** COMMAND: all
74 **
@@ -118,10 +124,15 @@
118 ** present, are passed along verbatim. The --force and
119 ** --randomize options are not supported.
120 **
121 ** sync Run a "sync" on all repositories. Only the --verbose
122 ** option is supported.
 
 
 
 
 
123 **
124 ** Repositories are automatically added to the set of known repositories
125 ** when one of the following commands are run against the repository:
126 ** clone, info, pull, push, or sync. Even previously ignored repositories
127 ** are added back to the list of repositories by these commands.
@@ -155,11 +166,11 @@
155 }
156 n = strlen(g.argv[2]);
157 db_open_config(1);
158 blob_zero(&extra);
159 zCmd = g.argv[2];
160 if( g.zLogin ) blob_appendf(&extra, " -U %s", g.zLogin);
161 if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){
162 zCmd = "list";
163 useCheckouts = find_option("ckout","c",0)!=0;
164 }else if( strncmp(zCmd, "clean", n)==0 ){
165 zCmd = "clean --chdir";
@@ -201,10 +212,16 @@
201 collect_argument(&extra, "vacuum",0);
202 collect_argument(&extra, "deanalyze",0);
203 collect_argument(&extra, "analyze",0);
204 collect_argument(&extra, "wal",0);
205 collect_argument(&extra, "stats",0);
 
 
 
 
 
 
206 }else if( strncmp(zCmd, "sync", n)==0 ){
207 zCmd = "sync -autourl -R";
208 collect_argument(&extra, "verbose","v");
209 }else if( strncmp(zCmd, "test-integrity", n)==0 ){
210 collect_argument(&extra, "parse", 0);
211
--- src/allrepo.c
+++ src/allrepo.c
@@ -65,10 +65,16 @@
65 }else{
66 blob_appendf(pExtra, " --%s \"\"", zArg);
67 }
68 }
69 }
70 static void collect_argv(Blob *pExtra, int iStart){
71 int i;
72 for(i=iStart; i<g.argc; i++){
73 blob_appendf(pExtra, " %s", g.argv[i]);
74 }
75 }
76
77
78 /*
79 ** COMMAND: all
80 **
@@ -118,10 +124,15 @@
124 ** present, are passed along verbatim. The --force and
125 ** --randomize options are not supported.
126 **
127 ** sync Run a "sync" on all repositories. Only the --verbose
128 ** option is supported.
129 **
130 ** setting Run the "setting", "set", or "unset" commands on all
131 ** set repositories. These command are particularly useful in
132 ** unset conjunection with the "max-loadavg" setting which cannot
133 ** otherwise be set globally.
134 **
135 ** Repositories are automatically added to the set of known repositories
136 ** when one of the following commands are run against the repository:
137 ** clone, info, pull, push, or sync. Even previously ignored repositories
138 ** are added back to the list of repositories by these commands.
@@ -155,11 +166,11 @@
166 }
167 n = strlen(g.argv[2]);
168 db_open_config(1);
169 blob_zero(&extra);
170 zCmd = g.argv[2];
171 if( !login_is_nobody() ) blob_appendf(&extra, " -U %s", g.zLogin);
172 if( strncmp(zCmd, "list", n)==0 || strncmp(zCmd,"ls",n)==0 ){
173 zCmd = "list";
174 useCheckouts = find_option("ckout","c",0)!=0;
175 }else if( strncmp(zCmd, "clean", n)==0 ){
176 zCmd = "clean --chdir";
@@ -201,10 +212,16 @@
212 collect_argument(&extra, "vacuum",0);
213 collect_argument(&extra, "deanalyze",0);
214 collect_argument(&extra, "analyze",0);
215 collect_argument(&extra, "wal",0);
216 collect_argument(&extra, "stats",0);
217 }else if( strncmp(zCmd, "setting", n)==0 ){
218 zCmd = "setting -R";
219 collect_argv(&extra, 3);
220 }else if( strncmp(zCmd, "unset", n)==0 ){
221 zCmd = "unset -R";
222 collect_argv(&extra, 3);
223 }else if( strncmp(zCmd, "sync", n)==0 ){
224 zCmd = "sync -autourl -R";
225 collect_argument(&extra, "verbose","v");
226 }else if( strncmp(zCmd, "test-integrity", n)==0 ){
227 collect_argument(&extra, "parse", 0);
228
+2 -2
--- src/attach.c
+++ src/attach.c
@@ -309,11 +309,11 @@
309309
if( n>0 ){
310310
blob_appendf(&manifest, "C %#F\n", n, zComment);
311311
}
312312
zDate = date_in_standard_format("now");
313313
blob_appendf(&manifest, "D %s\n", zDate);
314
- blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody");
314
+ blob_appendf(&manifest, "U %F\n", login_name());
315315
md5sum_blob(&manifest, &cksum);
316316
blob_appendf(&manifest, "Z %b\n", &cksum);
317317
attach_put(&manifest, rid, needModerator);
318318
assert( blob_is_reset(&manifest) );
319319
db_end_transaction(0);
@@ -427,11 +427,11 @@
427427
zFile += n;
428428
if( zFile[0]==0 ) zFile = "unknown";
429429
blob_appendf(&manifest, "A %F %F\n", zFile, zTarget);
430430
zDate = date_in_standard_format("now");
431431
blob_appendf(&manifest, "D %s\n", zDate);
432
- blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody");
432
+ blob_appendf(&manifest, "U %F\n", login_name());
433433
md5sum_blob(&manifest, &cksum);
434434
blob_appendf(&manifest, "Z %b\n", &cksum);
435435
rid = content_put(&manifest);
436436
manifest_crosslink(rid, &manifest, MC_NONE);
437437
db_end_transaction(0);
438438
--- src/attach.c
+++ src/attach.c
@@ -309,11 +309,11 @@
309 if( n>0 ){
310 blob_appendf(&manifest, "C %#F\n", n, zComment);
311 }
312 zDate = date_in_standard_format("now");
313 blob_appendf(&manifest, "D %s\n", zDate);
314 blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody");
315 md5sum_blob(&manifest, &cksum);
316 blob_appendf(&manifest, "Z %b\n", &cksum);
317 attach_put(&manifest, rid, needModerator);
318 assert( blob_is_reset(&manifest) );
319 db_end_transaction(0);
@@ -427,11 +427,11 @@
427 zFile += n;
428 if( zFile[0]==0 ) zFile = "unknown";
429 blob_appendf(&manifest, "A %F %F\n", zFile, zTarget);
430 zDate = date_in_standard_format("now");
431 blob_appendf(&manifest, "D %s\n", zDate);
432 blob_appendf(&manifest, "U %F\n", g.zLogin ? g.zLogin : "nobody");
433 md5sum_blob(&manifest, &cksum);
434 blob_appendf(&manifest, "Z %b\n", &cksum);
435 rid = content_put(&manifest);
436 manifest_crosslink(rid, &manifest, MC_NONE);
437 db_end_transaction(0);
438
--- src/attach.c
+++ src/attach.c
@@ -309,11 +309,11 @@
309 if( n>0 ){
310 blob_appendf(&manifest, "C %#F\n", n, zComment);
311 }
312 zDate = date_in_standard_format("now");
313 blob_appendf(&manifest, "D %s\n", zDate);
314 blob_appendf(&manifest, "U %F\n", login_name());
315 md5sum_blob(&manifest, &cksum);
316 blob_appendf(&manifest, "Z %b\n", &cksum);
317 attach_put(&manifest, rid, needModerator);
318 assert( blob_is_reset(&manifest) );
319 db_end_transaction(0);
@@ -427,11 +427,11 @@
427 zFile += n;
428 if( zFile[0]==0 ) zFile = "unknown";
429 blob_appendf(&manifest, "A %F %F\n", zFile, zTarget);
430 zDate = date_in_standard_format("now");
431 blob_appendf(&manifest, "D %s\n", zDate);
432 blob_appendf(&manifest, "U %F\n", login_name());
433 md5sum_blob(&manifest, &cksum);
434 blob_appendf(&manifest, "Z %b\n", &cksum);
435 rid = content_put(&manifest);
436 manifest_crosslink(rid, &manifest, MC_NONE);
437 db_end_transaction(0);
438
+1 -1
--- src/branch.c
+++ src/branch.c
@@ -134,11 +134,11 @@
134134
const char *zTag = db_column_text(&q, 0);
135135
blob_appendf(&branch, "T -%F *\n", zTag);
136136
}
137137
db_finalize(&q);
138138
139
- blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
139
+ blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : login_name());
140140
md5sum_blob(&branch, &mcksum);
141141
blob_appendf(&branch, "Z %b\n", &mcksum);
142142
if( !noSign && clearsign(&branch, &branch) ){
143143
Blob ans;
144144
char cReply;
145145
--- src/branch.c
+++ src/branch.c
@@ -134,11 +134,11 @@
134 const char *zTag = db_column_text(&q, 0);
135 blob_appendf(&branch, "T -%F *\n", zTag);
136 }
137 db_finalize(&q);
138
139 blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
140 md5sum_blob(&branch, &mcksum);
141 blob_appendf(&branch, "Z %b\n", &mcksum);
142 if( !noSign && clearsign(&branch, &branch) ){
143 Blob ans;
144 char cReply;
145
--- src/branch.c
+++ src/branch.c
@@ -134,11 +134,11 @@
134 const char *zTag = db_column_text(&q, 0);
135 blob_appendf(&branch, "T -%F *\n", zTag);
136 }
137 db_finalize(&q);
138
139 blob_appendf(&branch, "U %F\n", zUserOvrd ? zUserOvrd : login_name());
140 md5sum_blob(&branch, &mcksum);
141 blob_appendf(&branch, "Z %b\n", &mcksum);
142 if( !noSign && clearsign(&branch, &branch) ){
143 Blob ans;
144 char cReply;
145
+1 -2
--- src/captcha.c
+++ src/captcha.c
@@ -482,12 +482,11 @@
482482
** are user "nobody") and if the "require-captcha" setting is true. The
483483
** "require-captcha" setting is controlled on the Admin/Access page. It
484484
** defaults to true.
485485
*/
486486
int captcha_needed(void){
487
- if( g.zLogin!=0 ) return 0;
488
- return db_get_boolean("require-captcha", 1);
487
+ return login_is_nobody() && db_get_boolean("require-captcha", 1);
489488
}
490489
491490
/*
492491
** If a captcha is required but the correct captcha code is not supplied
493492
** in the query parameters, then return false (0).
494493
--- src/captcha.c
+++ src/captcha.c
@@ -482,12 +482,11 @@
482 ** are user "nobody") and if the "require-captcha" setting is true. The
483 ** "require-captcha" setting is controlled on the Admin/Access page. It
484 ** defaults to true.
485 */
486 int captcha_needed(void){
487 if( g.zLogin!=0 ) return 0;
488 return db_get_boolean("require-captcha", 1);
489 }
490
491 /*
492 ** If a captcha is required but the correct captcha code is not supplied
493 ** in the query parameters, then return false (0).
494
--- src/captcha.c
+++ src/captcha.c
@@ -482,12 +482,11 @@
482 ** are user "nobody") and if the "require-captcha" setting is true. The
483 ** "require-captcha" setting is controlled on the Admin/Access page. It
484 ** defaults to true.
485 */
486 int captcha_needed(void){
487 return login_is_nobody() && db_get_boolean("require-captcha", 1);
 
488 }
489
490 /*
491 ** If a captcha is required but the correct captcha code is not supplied
492 ** in the query parameters, then return false (0).
493
+3 -3
--- src/checkin.c
+++ src/checkin.c
@@ -801,11 +801,11 @@
801801
blob_append(&prompt,
802802
"\n"
803803
"# Enter commit message for this check-in. Lines beginning with # are ignored.\n"
804804
"#\n", -1
805805
);
806
- blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin);
806
+ blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : login_name());
807807
if( p->zBranch && p->zBranch[0] ){
808808
blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch);
809809
}else{
810810
char *zTags = info_tags_of_checkin(parent_rid, 1);
811811
if( zTags ) blob_appendf(&prompt, "# tags: %z\n#\n", zTags);
@@ -963,11 +963,11 @@
963963
int verifyDate; /* Verify that child is younger */
964964
int closeFlag; /* Close the branch being committed */
965965
int integrateFlag; /* Close merged-in branches */
966966
Blob *pCksum; /* Repository checksum. May be 0 */
967967
const char *zDateOvrd; /* Date override. If 0 then use 'now' */
968
- const char *zUserOvrd; /* User override. If 0 then use g.zLogin */
968
+ const char *zUserOvrd; /* User override. If 0 then use login_name() */
969969
const char *zBranch; /* Branch name. May be 0 */
970970
const char *zColor; /* One-time background color. May be 0 */
971971
const char *zBrClr; /* Persistent branch color. May be 0 */
972972
const char **azTag; /* Tags to apply to this check-in */
973973
};
@@ -1189,11 +1189,11 @@
11891189
const char *zBrTag = db_column_text(&q, 0);
11901190
blob_appendf(pOut, "T -%F *\n", zBrTag);
11911191
}
11921192
db_finalize(&q);
11931193
}
1194
- blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin);
1194
+ blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : login_name());
11951195
md5sum_blob(pOut, &mcksum);
11961196
blob_appendf(pOut, "Z %b\n", &mcksum);
11971197
if( pnFBcard ) *pnFBcard = nFBcard;
11981198
}
11991199
12001200
--- src/checkin.c
+++ src/checkin.c
@@ -801,11 +801,11 @@
801 blob_append(&prompt,
802 "\n"
803 "# Enter commit message for this check-in. Lines beginning with # are ignored.\n"
804 "#\n", -1
805 );
806 blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin);
807 if( p->zBranch && p->zBranch[0] ){
808 blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch);
809 }else{
810 char *zTags = info_tags_of_checkin(parent_rid, 1);
811 if( zTags ) blob_appendf(&prompt, "# tags: %z\n#\n", zTags);
@@ -963,11 +963,11 @@
963 int verifyDate; /* Verify that child is younger */
964 int closeFlag; /* Close the branch being committed */
965 int integrateFlag; /* Close merged-in branches */
966 Blob *pCksum; /* Repository checksum. May be 0 */
967 const char *zDateOvrd; /* Date override. If 0 then use 'now' */
968 const char *zUserOvrd; /* User override. If 0 then use g.zLogin */
969 const char *zBranch; /* Branch name. May be 0 */
970 const char *zColor; /* One-time background color. May be 0 */
971 const char *zBrClr; /* Persistent branch color. May be 0 */
972 const char **azTag; /* Tags to apply to this check-in */
973 };
@@ -1189,11 +1189,11 @@
1189 const char *zBrTag = db_column_text(&q, 0);
1190 blob_appendf(pOut, "T -%F *\n", zBrTag);
1191 }
1192 db_finalize(&q);
1193 }
1194 blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : g.zLogin);
1195 md5sum_blob(pOut, &mcksum);
1196 blob_appendf(pOut, "Z %b\n", &mcksum);
1197 if( pnFBcard ) *pnFBcard = nFBcard;
1198 }
1199
1200
--- src/checkin.c
+++ src/checkin.c
@@ -801,11 +801,11 @@
801 blob_append(&prompt,
802 "\n"
803 "# Enter commit message for this check-in. Lines beginning with # are ignored.\n"
804 "#\n", -1
805 );
806 blob_appendf(&prompt, "# user: %s\n", p->zUserOvrd ? p->zUserOvrd : login_name());
807 if( p->zBranch && p->zBranch[0] ){
808 blob_appendf(&prompt, "# tags: %s\n#\n", p->zBranch);
809 }else{
810 char *zTags = info_tags_of_checkin(parent_rid, 1);
811 if( zTags ) blob_appendf(&prompt, "# tags: %z\n#\n", zTags);
@@ -963,11 +963,11 @@
963 int verifyDate; /* Verify that child is younger */
964 int closeFlag; /* Close the branch being committed */
965 int integrateFlag; /* Close merged-in branches */
966 Blob *pCksum; /* Repository checksum. May be 0 */
967 const char *zDateOvrd; /* Date override. If 0 then use 'now' */
968 const char *zUserOvrd; /* User override. If 0 then use login_name() */
969 const char *zBranch; /* Branch name. May be 0 */
970 const char *zColor; /* One-time background color. May be 0 */
971 const char *zBrClr; /* Persistent branch color. May be 0 */
972 const char **azTag; /* Tags to apply to this check-in */
973 };
@@ -1189,11 +1189,11 @@
1189 const char *zBrTag = db_column_text(&q, 0);
1190 blob_appendf(pOut, "T -%F *\n", zBrTag);
1191 }
1192 db_finalize(&q);
1193 }
1194 blob_appendf(pOut, "U %F\n", p->zUserOvrd ? p->zUserOvrd : login_name());
1195 md5sum_blob(pOut, &mcksum);
1196 blob_appendf(pOut, "Z %b\n", &mcksum);
1197 if( pnFBcard ) *pnFBcard = nFBcard;
1198 }
1199
1200
+8
--- src/db.c
+++ src/db.c
@@ -2147,10 +2147,11 @@
21472147
{ "ignore-glob", 0, 40, 1, 0, "" },
21482148
{ "keep-glob", 0, 40, 1, 0, "" },
21492149
{ "localauth", 0, 0, 0, 0, "off" },
21502150
{ "main-branch", 0, 40, 0, 0, "trunk" },
21512151
{ "manifest", 0, 0, 1, 0, "off" },
2152
+ { "max-loadavg", 0, 25, 0, 0, "0.0" },
21522153
{ "max-upload", 0, 25, 0, 0, "250000" },
21532154
{ "mtime-changes", 0, 0, 0, 0, "on" },
21542155
{ "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " },
21552156
{ "proxy", 0, 32, 0, 0, "off" },
21562157
{ "relative-paths", 0, 0, 0, 0, "on" },
@@ -2296,10 +2297,17 @@
22962297
** main-branch The primary branch for the project. Default: trunk
22972298
**
22982299
** manifest If enabled, automatically create files "manifest" and
22992300
** (versionable) "manifest.uuid" in every checkout. The SQLite and
23002301
** Fossil repositories both require this. Default: off.
2302
+**
2303
+** max-loadavg Some CPU-intensive web pages (ex: /zip, /tarball, /blame)
2304
+** are disallowed if the system load average goes above this
2305
+** value. "0.0" means no limit. This only works on unix.
2306
+** Only local settings of this value make a difference since
2307
+** when running as a web-server, Fossil does not open the
2308
+** global configuration database.
23012309
**
23022310
** max-upload A limit on the size of uplink HTTP requests. The
23032311
** default is 250000 bytes.
23042312
**
23052313
** mtime-changes Use file modification times (mtimes) to detect when
23062314
--- src/db.c
+++ src/db.c
@@ -2147,10 +2147,11 @@
2147 { "ignore-glob", 0, 40, 1, 0, "" },
2148 { "keep-glob", 0, 40, 1, 0, "" },
2149 { "localauth", 0, 0, 0, 0, "off" },
2150 { "main-branch", 0, 40, 0, 0, "trunk" },
2151 { "manifest", 0, 0, 1, 0, "off" },
 
2152 { "max-upload", 0, 25, 0, 0, "250000" },
2153 { "mtime-changes", 0, 0, 0, 0, "on" },
2154 { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " },
2155 { "proxy", 0, 32, 0, 0, "off" },
2156 { "relative-paths", 0, 0, 0, 0, "on" },
@@ -2296,10 +2297,17 @@
2296 ** main-branch The primary branch for the project. Default: trunk
2297 **
2298 ** manifest If enabled, automatically create files "manifest" and
2299 ** (versionable) "manifest.uuid" in every checkout. The SQLite and
2300 ** Fossil repositories both require this. Default: off.
 
 
 
 
 
 
 
2301 **
2302 ** max-upload A limit on the size of uplink HTTP requests. The
2303 ** default is 250000 bytes.
2304 **
2305 ** mtime-changes Use file modification times (mtimes) to detect when
2306
--- src/db.c
+++ src/db.c
@@ -2147,10 +2147,11 @@
2147 { "ignore-glob", 0, 40, 1, 0, "" },
2148 { "keep-glob", 0, 40, 1, 0, "" },
2149 { "localauth", 0, 0, 0, 0, "off" },
2150 { "main-branch", 0, 40, 0, 0, "trunk" },
2151 { "manifest", 0, 0, 1, 0, "off" },
2152 { "max-loadavg", 0, 25, 0, 0, "0.0" },
2153 { "max-upload", 0, 25, 0, 0, "250000" },
2154 { "mtime-changes", 0, 0, 0, 0, "on" },
2155 { "pgp-command", 0, 40, 0, 0, "gpg --clearsign -o " },
2156 { "proxy", 0, 32, 0, 0, "off" },
2157 { "relative-paths", 0, 0, 0, 0, "on" },
@@ -2296,10 +2297,17 @@
2297 ** main-branch The primary branch for the project. Default: trunk
2298 **
2299 ** manifest If enabled, automatically create files "manifest" and
2300 ** (versionable) "manifest.uuid" in every checkout. The SQLite and
2301 ** Fossil repositories both require this. Default: off.
2302 **
2303 ** max-loadavg Some CPU-intensive web pages (ex: /zip, /tarball, /blame)
2304 ** are disallowed if the system load average goes above this
2305 ** value. "0.0" means no limit. This only works on unix.
2306 ** Only local settings of this value make a difference since
2307 ** when running as a web-server, Fossil does not open the
2308 ** global configuration database.
2309 **
2310 ** max-upload A limit on the size of uplink HTTP requests. The
2311 ** default is 250000 bytes.
2312 **
2313 ** mtime-changes Use file modification times (mtimes) to detect when
2314
+67 -92
--- src/diff.c
+++ src/diff.c
@@ -28,12 +28,12 @@
2828
** Flag parameters to the text_diff() routine used to control the formatting
2929
** of the diff output.
3030
*/
3131
#define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */
3232
#define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
33
-#define DIFF_IGNORE_SOLWS ((u64)0x01000000) /* Ignore start-of-line whitespace */
34
-#define DIFF_IGNORE_EOLWS ((u64)0x02000000) /* Ignore end-of-line whitespace */
33
+#define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
34
+#define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */
3535
#define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
3636
#define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
3737
#define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
3838
#define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
3939
#define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
@@ -76,11 +76,12 @@
7676
*/
7777
typedef struct DLine DLine;
7878
struct DLine {
7979
const char *z; /* The text of the line */
8080
unsigned int h; /* Hash of the line */
81
- unsigned short indent; /* Indent of the line. Only !=0 with --ignore-space-at sol option */
81
+ unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */
82
+ unsigned short n; /* number of bytes */
8283
unsigned int iNext; /* 1+(Index of next line with same the same hash) */
8384
8485
/* an array of DLine elements serves two purposes. The fields
8586
** above are one per line of input text. But each entry is also
8687
** a bucket in a hash table, as follows: */
@@ -130,11 +131,11 @@
130131
**
131132
** Profiling show that in most cases this routine consumes the bulk of
132133
** the CPU time on a diff.
133134
*/
134135
static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
135
- int nLine, i, j, k, s, indent, x;
136
+ int nLine, i, j, k, s, x;
136137
unsigned int h, h2;
137138
DLine *a;
138139
139140
/* Count the number of lines. Allocate space to hold
140141
** the returned array.
@@ -163,27 +164,19 @@
163164
}
164165
165166
/* Fill in the array */
166167
for(i=0; i<nLine; i++){
167168
for(j=0; z[j] && z[j]!='\n'; j++){}
168
- k = j;
169
+ a[i].z = z;
170
+ a[i].n = k = j;
169171
s = 0;
170
- indent = 0;
171172
if( diffFlags & DIFF_IGNORE_EOLWS ){
172173
while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
173174
}
174
- if( diffFlags & DIFF_IGNORE_SOLWS ){
175
- while( s<k && fossil_isspace(z[s]) ){
176
- if( z[s]=='\t' ){
177
- indent = ((indent+9)/8)*8;
178
- }else if( z[s]==' ' ){
179
- indent++;
180
- }
181
- s++;
182
- }
183
- }
184
- a[i].z = z+s;
175
+ if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
176
+ while( s<k && fossil_isspace(z[s]) ){ s++; }
177
+ }
185178
a[i].indent = s;
186179
for(h=0, x=s; x<k; x++){
187180
h = h ^ (h<<2) ^ z[x];
188181
}
189182
a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s);
@@ -200,11 +193,12 @@
200193
201194
/*
202195
** Return true if two DLine elements are identical.
203196
*/
204197
static int same_dline(DLine *pA, DLine *pB){
205
- return pA->h==pB->h && memcmp(pA->z,pB->z,pA->h & LENGTH_MASK)==0;
198
+ return pA->h==pB->h && memcmp(pA->z+pA->indent,pB->z+pB->indent,
199
+ pA->h & LENGTH_MASK)==0;
206200
}
207201
208202
/*
209203
** Return true if the regular expression *pRe matches any of the
210204
** N dlines
@@ -240,22 +234,16 @@
240234
}else if( cPrefix=='+' ){
241235
blob_append(pOut, "<span class=\"diffadd\">", -1);
242236
}else if( cPrefix=='-' ){
243237
blob_append(pOut, "<span class=\"diffrm\">", -1);
244238
}
245
- if( pLine->indent ){
246
- blob_appendf(pOut, "%*s", pLine->indent, " ");
247
- }
248
- htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK));
239
+ htmlize_to_blob(pOut, pLine->z, pLine->n);
249240
if( cPrefix!=' ' ){
250241
blob_append(pOut, "</span>", -1);
251242
}
252243
}else{
253
- if( pLine->indent ){
254
- blob_appendf(pOut, "%*s", pLine->indent, " ");
255
- }
256
- blob_append(pOut, pLine->z, pLine->h & LENGTH_MASK);
244
+ blob_append(pOut, pLine->z, pLine->n);
257245
}
258246
blob_append(pOut, "\n", 1);
259247
}
260248
261249
/*
@@ -427,11 +415,11 @@
427415
b += m;
428416
if( i<nr-1 ){
429417
m = R[r+i*3+3];
430418
for(j=0; j<m; j++){
431419
if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
432
- appendDiffLine(pOut, ' ', &B[b+j], html, 0);
420
+ appendDiffLine(pOut, ' ', &A[a+j], html, 0);
433421
}
434422
b += m;
435423
a += m;
436424
}
437425
}
@@ -440,11 +428,11 @@
440428
assert( nr==i );
441429
m = R[r+nr*3];
442430
if( m>nContext ) m = nContext;
443431
for(j=0; j<m; j++){
444432
if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
445
- appendDiffLine(pOut, ' ', &B[b+j], html, 0);
433
+ appendDiffLine(pOut, ' ', &A[a+j], html, 0);
446434
}
447435
}
448436
}
449437
450438
/*
@@ -501,11 +489,11 @@
501489
** This comment contains multibyte unicode characters (ü, Æ, ð) in order
502490
** to test the ability of the diff code to handle such characters.
503491
*/
504492
static void sbsWriteText(SbsLine *p, DLine *pLine, int col){
505493
Blob *pCol = p->apCols[col];
506
- int n = pLine->h & LENGTH_MASK;
494
+ int n = pLine->n;
507495
int i; /* Number of input characters consumed */
508496
int k; /* Cursor position */
509497
int needEndSpan = 0;
510498
const char *zIn = pLine->z;
511499
int w = p->width;
@@ -532,13 +520,10 @@
532520
p->iEnd = p->iEnd2;
533521
p->iEnd2 = 0;
534522
}
535523
}
536524
}
537
- if( pLine->indent && i==0 ){
538
- blob_appendf(pCol, "%*s", pLine->indent, " ");
539
- }
540525
if( c=='\t' && !p->escHtml ){
541526
blob_append(pCol, " ", 1);
542527
while( (k&7)!=7 && (p->escHtml || k<w) ){
543528
blob_append(pCol, " ", 1);
544529
k++;
@@ -562,11 +547,11 @@
562547
blob_append(pCol, "</span>", 7);
563548
}
564549
if( col==SBS_TXTB ){
565550
sbsWriteNewlines(p);
566551
}else if( !p->escHtml ){
567
- sbsWriteSpace(p, w-k-pLine->indent, SBS_TXTA);
552
+ sbsWriteSpace(p, w-k, SBS_TXTA);
568553
}
569554
}
570555
571556
/*
572557
** Append a column to the final output blob.
@@ -1789,11 +1774,11 @@
17891774
if( diffFlags & DIFF_INVERT ){
17901775
Blob *pTemp = pA_Blob;
17911776
pA_Blob = pB_Blob;
17921777
pB_Blob = pTemp;
17931778
}
1794
- ignoreWs = (diffFlags & (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))!=0;
1779
+ ignoreWs = (diffFlags & DIFF_IGNORE_ALLWS)!=0;
17951780
blob_to_utf8_no_bom(pA_Blob, 0);
17961781
blob_to_utf8_no_bom(pB_Blob, 0);
17971782
17981783
/* Prepare the input files */
17991784
memset(&c, 0, sizeof(c));
@@ -1859,22 +1844,21 @@
18591844
18601845
/*
18611846
** Process diff-related command-line options and return an appropriate
18621847
** "diffFlags" integer.
18631848
**
1864
-** --brief Show filenames only DIFF_BRIEF
1865
-** --context|-c N N lines of context. DIFF_CONTEXT_MASK
1866
-** --html Format for HTML DIFF_HTML
1867
-** --invert Invert the diff DIFF_INVERT
1868
-** --ignore-space-at-eol Ignore eol-whitespaces DIFF_IGNORE_EOLWS
1869
-** --ignore-space-at-sol Ignore sol-whitespaces DIFF_IGNORE_SOLWS
1870
-** --linenum|-n Show line numbers DIFF_LINENO
1871
-** --noopt Disable optimization DIFF_NOOPT
1872
-** --side-by-side|-y Side-by-side diff. DIFF_SIDEBYSIDE
1873
-** --unified Unified diff. ~DIFF_SIDEBYSIDE
1874
-** -w Ignore all whitespaces DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS
1875
-** --width|-W N N character lines. DIFF_WIDTH_MASK
1849
+** --brief Show filenames only DIFF_BRIEF
1850
+** -c|--context N N lines of context. DIFF_CONTEXT_MASK
1851
+** --html Format for HTML DIFF_HTML
1852
+** --invert Invert the diff DIFF_INVERT
1853
+** -n|--linenum Show line numbers DIFF_LINENO
1854
+** --noopt Disable optimization DIFF_NOOPT
1855
+** --unified Unified diff. ~DIFF_SIDEBYSIDE
1856
+** -w|--ignore-all-space Ignore all whitespaces DIFF_IGNORE_ALLWS
1857
+** --width|-W N N character lines. DIFF_WIDTH_MASK
1858
+** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE
1859
+** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS
18761860
*/
18771861
u64 diff_options(void){
18781862
u64 diffFlags = 0;
18791863
const char *z;
18801864
int f;
@@ -1888,13 +1872,12 @@
18881872
f *= DIFF_CONTEXT_MASK+1;
18891873
if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK;
18901874
diffFlags |= f;
18911875
}
18921876
if( find_option("html",0,0)!=0 ) diffFlags |= DIFF_HTML;
1893
- if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS;
1894
- if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
1895
- if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
1877
+ if( find_option("ignore-trailing-space","Z",0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
1878
+ if( find_option("ignore-all-space","w",0)!=0 ) diffFlags |= DIFF_IGNORE_ALLWS;
18961879
if( find_option("linenum","n",0)!=0 ) diffFlags |= DIFF_LINENO;
18971880
if( find_option("noopt",0,0)!=0 ) diffFlags |= DIFF_NOOPT;
18981881
if( find_option("invert",0,0)!=0 ) diffFlags |= DIFF_INVERT;
18991882
if( find_option("brief",0,0)!=0 ) diffFlags |= DIFF_BRIEF;
19001883
return diffFlags;
@@ -1971,14 +1954,11 @@
19711954
typedef struct Annotator Annotator;
19721955
struct Annotator {
19731956
DContext c; /* The diff-engine context */
19741957
struct AnnLine { /* Lines of the original files... */
19751958
const char *z; /* The text of the line */
1976
- short int n; /* Number of bytes. Whether this omits sol/eol spacing
1977
- depends on the diffFlags) */
1978
- unsigned short indent; /* Indenting (number of initial spaces, only used
1979
- if sol-spacing is ignored in the diffFlags) */
1959
+ short int n; /* Number of bytes (omitting trailing space and \n) */
19801960
short int iVers; /* Level at which tag was set */
19811961
} *aOrig;
19821962
int nOrig; /* Number of elements in aOrig[] */
19831963
int nVers; /* Number of versions analyzed */
19841964
int bLimit; /* True if the iLimit was reached */
@@ -2008,12 +1988,11 @@
20081988
return 1;
20091989
}
20101990
p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
20111991
for(i=0; i<p->c.nTo; i++){
20121992
p->aOrig[i].z = p->c.aTo[i].z;
2013
- p->aOrig[i].n = p->c.aTo[i].h & LENGTH_MASK;
2014
- p->aOrig[i].indent = p->c.aTo[i].indent;
1993
+ p->aOrig[i].n = p->c.aTo[i].n;
20151994
p->aOrig[i].iVers = -1;
20161995
}
20171996
p->nOrig = p->c.nTo;
20181997
return 0;
20191998
}
@@ -2066,13 +2045,13 @@
20662045
/* Return no errors */
20672046
return 0;
20682047
}
20692048
20702049
2071
-/* Annotation flags */
2072
-#define ANN_FILE_VERS 0x01 /* Show file vers rather than commit vers */
2073
-#define ANN_FILE_ANCEST 0x02 /* Prefer check-ins in the ANCESTOR table */
2050
+/* Annotation flags (any DIFF flag can be used as Annotation flag as well) */
2051
+#define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */
2052
+#define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */
20742053
20752054
/*
20762055
** Compute a complete annotation on a file. The file is identified
20772056
** by its filename number (filename.fnid) and the baseline in which
20782057
** it was checked in (mlink.mid).
@@ -2080,12 +2059,11 @@
20802059
static void annotate_file(
20812060
Annotator *p, /* The annotator */
20822061
int fnid, /* The name of the file to be annotated */
20832062
int mid, /* Use the version of the file in this check-in */
20842063
int iLimit, /* Limit the number of levels if greater than zero */
2085
- int annFlags, /* Flags to alter the annotation */
2086
- u64 diffFlags /* Flags to alter the whitespace handling */
2064
+ u64 annFlags /* Flags to alter the annotation */
20872065
){
20882066
Blob toAnnotate; /* Text of the final (mid) version of the file */
20892067
Blob step; /* Text of previous revision */
20902068
int rid; /* Artifact ID of the file being annotated */
20912069
Stmt q; /* Query returning all ancestor versions */
@@ -2099,11 +2077,12 @@
20992077
}
21002078
if( !content_get(rid, &toAnnotate) ){
21012079
fossil_fatal("unable to retrieve content of artifact #%d", rid);
21022080
}
21032081
if( iLimit<=0 ) iLimit = 1000000000;
2104
- annotation_start(p, &toAnnotate, diffFlags);
2082
+ blob_to_utf8_no_bom(&toAnnotate, 0);
2083
+ annotation_start(p, &toAnnotate, annFlags);
21052084
db_begin_transaction();
21062085
db_multi_exec(
21072086
"CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);"
21082087
"DELETE FROM vseen;"
21092088
);
@@ -2133,11 +2112,12 @@
21332112
p->aVers[p->nVers].zMUuid = fossil_strdup(db_column_text(&q, 1));
21342113
p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2));
21352114
p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3));
21362115
if( p->nVers ){
21372116
content_get(rid, &step);
2138
- annotation_step(p, &step, p->nVers-1, diffFlags);
2117
+ blob_to_utf8_no_bom(&step, 0);
2118
+ annotation_step(p, &step, p->nVers-1, annFlags);
21392119
blob_reset(&step);
21402120
}
21412121
p->nVers++;
21422122
db_bind_int(&ins, ":rid", rid);
21432123
db_step(&ins);
@@ -2188,14 +2168,13 @@
21882168
void annotation_page(void){
21892169
int mid;
21902170
int fnid;
21912171
int i;
21922172
int iLimit; /* Depth limit */
2193
- int annFlags = ANN_FILE_ANCEST;
2173
+ u64 annFlags = ANN_FILE_ANCEST;
21942174
int showLog = 0; /* True to display the log */
21952175
int ignoreWs = 0; /* Ignore whitespace */
2196
- u64 diffFlags = 0; /* diff flags for ignore whitespace */
21972176
const char *zFilename; /* Name of file to annotate */
21982177
const char *zCI; /* The check-in containing zFilename */
21992178
Annotator ann;
22002179
HQuery url;
22012180
struct AnnVers *p;
@@ -2205,25 +2184,26 @@
22052184
/* Gather query parameters */
22062185
showLog = atoi(PD("log","1"));
22072186
login_check_credentials();
22082187
if( !g.perm.Read ){ login_needed(); return; }
22092188
if( exclude_spiders("annotate") ) return;
2189
+ load_control();
22102190
mid = name_to_typed_rid(PD("checkin","0"),"ci");
22112191
zFilename = P("filename");
22122192
fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
22132193
if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
22142194
iLimit = atoi(PD("limit","20"));
22152195
if( P("filevers") ) annFlags |= ANN_FILE_VERS;
22162196
ignoreWs = P("w")!=0;
2217
- if( ignoreWs ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
2197
+ if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS;
22182198
if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
22192199
fossil_redirect_home();
22202200
}
22212201
22222202
/* compute the annotation */
22232203
compute_direct_ancestors(mid, 10000000);
2224
- annotate_file(&ann, fnid, mid, iLimit, annFlags, diffFlags);
2204
+ annotate_file(&ann, fnid, mid, iLimit, annFlags);
22252205
zCI = ann.aVers[0].zMUuid;
22262206
22272207
/* generate the web page */
22282208
style_header("Annotation For %h", zFilename);
22292209
if( bBlame ){
@@ -2316,11 +2296,10 @@
23162296
@ <pre>
23172297
for(i=0; i<ann.nOrig; i++){
23182298
int iVers = ann.aOrig[i].iVers;
23192299
char *z = (char*)ann.aOrig[i].z;
23202300
int n = ann.aOrig[i].n;
2321
- int indent = ann.aOrig[i].indent+1;
23222301
char zPrefix[300];
23232302
z[n] = 0;
23242303
if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1;
23252304
23262305
if( bBlame ){
@@ -2331,26 +2310,26 @@
23312310
"<span style='background-color:%s'>"
23322311
"%s%.10s</a> %s</span> %13.13s:",
23332312
p->zBgColor, zLink, p->zMUuid, p->zDate, p->zUser);
23342313
fossil_free(zLink);
23352314
}else{
2336
- sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s%*s", indent, " ");
2315
+ sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s", "");
23372316
}
23382317
}else{
23392318
if( iVers>=0 ){
23402319
struct AnnVers *p = ann.aVers+iVers;
23412320
char *zLink = xhref("target='infowindow'", "%R/info/%S", p->zMUuid);
23422321
sqlite3_snprintf(sizeof(zPrefix), zPrefix,
23432322
"<span style='background-color:%s'>"
2344
- "%s%.10s</a> %s</span> %4d:%*s",
2345
- p->zBgColor, zLink, p->zMUuid, p->zDate, i+1, indent, " ");
2323
+ "%s%.10s</a> %s</span> %4d:",
2324
+ p->zBgColor, zLink, p->zMUuid, p->zDate, i+1);
23462325
fossil_free(zLink);
23472326
}else{
2348
- sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%22s%4d:%*s", "", i+1, indent, " ");
2327
+ sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%22s%4d:", "", i+1);
23492328
}
23502329
}
2351
- @ %s(zPrefix)%h(z)
2330
+ @ %s(zPrefix) %h(z)
23522331
23532332
}
23542333
@ </pre>
23552334
style_footer();
23562335
}
@@ -2366,16 +2345,15 @@
23662345
** the file was last modified. The "annotate" command shows line numbers
23672346
** and omits the username. The "blame" and "praise" commands show the user
23682347
** who made each checkin and omits the line number.
23692348
**
23702349
** Options:
2371
-** --filevers Show file version numbers rather than check-in versions
2372
-** -l|--log List all versions analyzed
2373
-** -n|--limit N Only look backwards in time by N versions
2374
-** --ignore-space-at-eol Ignore eol-whitespaces
2375
-** --ignore-space-at-sol Ignore sol-whitespaces
2376
-** -w Ignore all whitespaces
2350
+** --filevers Show file version numbers rather than check-in versions
2351
+** -l|--log List all versions analyzed
2352
+** -n|--limit N Only look backwards in time by N versions
2353
+** -Z|--ignore-trailing-space Ignore eol-whitespaces
2354
+** -w|--ignore-all-space Ignore all whitespaces
23772355
**
23782356
** See also: info, finfo, timeline
23792357
*/
23802358
void annotate_cmd(void){
23812359
int fnid; /* Filename ID */
@@ -2387,23 +2365,21 @@
23872365
Annotator ann; /* The annotation of the file */
23882366
int i; /* Loop counter */
23892367
const char *zLimit; /* The value to the -n|--limit option */
23902368
int iLimit; /* How far back in time to look */
23912369
int showLog; /* True to show the log */
2392
- u64 diffFlags = 0;/* Flags to control whitespace handling */
23932370
int fileVers; /* Show file version instead of check-in versions */
2394
- int annFlags = 0; /* Flags to control annotation properties */
2371
+ u64 annFlags = 0; /* Flags to control annotation properties */
23952372
int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */
23962373
23972374
bBlame = g.argv[1][0]!='a';
23982375
zLimit = find_option("limit","n",1);
23992376
if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
24002377
iLimit = atoi(zLimit);
24012378
showLog = find_option("log","l",0)!=0;
2402
- if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS;
2403
- if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
2404
- if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
2379
+ if( find_option("ignore-trailing-space","Z",0)!=0 ) annFlags |= DIFF_IGNORE_EOLWS;
2380
+ if( find_option("ignore-all-space","w",0)!=0 ) annFlags |= DIFF_IGNORE_ALLWS;
24052381
fileVers = find_option("filevers",0,0)!=0;
24062382
db_must_be_within_tree();
24072383
if( g.argc<3 ) {
24082384
usage("FILENAME");
24092385
}
@@ -2429,11 +2405,11 @@
24292405
fid, fnid);
24302406
if( mid==0 ){
24312407
fossil_fatal("unable to find manifest");
24322408
}
24332409
annFlags |= ANN_FILE_ANCEST;
2434
- annotate_file(&ann, fnid, mid, iLimit, annFlags, diffFlags);
2410
+ annotate_file(&ann, fnid, mid, iLimit, annFlags);
24352411
if( showLog ){
24362412
struct AnnVers *p;
24372413
for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
24382414
fossil_print("version %3d: %s %.10s file %.10s\n",
24392415
i+1, p->zDate, p->zMUuid, p->zFUuid);
@@ -2441,28 +2417,27 @@
24412417
fossil_print("---------------------------------------------------\n");
24422418
}
24432419
for(i=0; i<ann.nOrig; i++){
24442420
int iVers = ann.aOrig[i].iVers;
24452421
char *z = (char*)ann.aOrig[i].z;
2446
- int indent = ann.aOrig[i].indent + 1;
24472422
int n = ann.aOrig[i].n;
24482423
struct AnnVers *p;
24492424
if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1;
24502425
p = ann.aVers + iVers;
24512426
if( bBlame ){
24522427
if( iVers>=0 ){
2453
- fossil_print("%.10s %s %13.13s:%*s%.*s\n",
2454
- fileVers ? p->zFUuid : p->zMUuid, p->zDate, p->zUser, indent, " ", n, z);
2428
+ fossil_print("%.10s %s %13.13s: %.*s\n",
2429
+ fileVers ? p->zFUuid : p->zMUuid, p->zDate, p->zUser, n, z);
24552430
}else{
2456
- fossil_print("%35s %*s%.*s\n", "", indent, " ", n, z);
2431
+ fossil_print("%35s %.*s\n", "", n, z);
24572432
}
24582433
}else{
24592434
if( iVers>=0 ){
2460
- fossil_print("%.10s %s %5d:%*s%.*s\n",
2461
- fileVers ? p->zFUuid : p->zMUuid, p->zDate, i+1, indent, " ", n, z);
2435
+ fossil_print("%.10s %s %5d: %.*s\n",
2436
+ fileVers ? p->zFUuid : p->zMUuid, p->zDate, i+1, n, z);
24622437
}else{
2463
- fossil_print("%21s %5d:%*s%.*s\n",
2464
- "", i+1, indent, " ", n, z);
2438
+ fossil_print("%21s %5d: %.*s\n",
2439
+ "", i+1, n, z);
24652440
}
24662441
}
24672442
}
24682443
}
24692444
--- src/diff.c
+++ src/diff.c
@@ -28,12 +28,12 @@
28 ** Flag parameters to the text_diff() routine used to control the formatting
29 ** of the diff output.
30 */
31 #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */
32 #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
33 #define DIFF_IGNORE_SOLWS ((u64)0x01000000) /* Ignore start-of-line whitespace */
34 #define DIFF_IGNORE_EOLWS ((u64)0x02000000) /* Ignore end-of-line whitespace */
35 #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
36 #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
37 #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
38 #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
39 #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
@@ -76,11 +76,12 @@
76 */
77 typedef struct DLine DLine;
78 struct DLine {
79 const char *z; /* The text of the line */
80 unsigned int h; /* Hash of the line */
81 unsigned short indent; /* Indent of the line. Only !=0 with --ignore-space-at sol option */
 
82 unsigned int iNext; /* 1+(Index of next line with same the same hash) */
83
84 /* an array of DLine elements serves two purposes. The fields
85 ** above are one per line of input text. But each entry is also
86 ** a bucket in a hash table, as follows: */
@@ -130,11 +131,11 @@
130 **
131 ** Profiling show that in most cases this routine consumes the bulk of
132 ** the CPU time on a diff.
133 */
134 static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
135 int nLine, i, j, k, s, indent, x;
136 unsigned int h, h2;
137 DLine *a;
138
139 /* Count the number of lines. Allocate space to hold
140 ** the returned array.
@@ -163,27 +164,19 @@
163 }
164
165 /* Fill in the array */
166 for(i=0; i<nLine; i++){
167 for(j=0; z[j] && z[j]!='\n'; j++){}
168 k = j;
 
169 s = 0;
170 indent = 0;
171 if( diffFlags & DIFF_IGNORE_EOLWS ){
172 while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
173 }
174 if( diffFlags & DIFF_IGNORE_SOLWS ){
175 while( s<k && fossil_isspace(z[s]) ){
176 if( z[s]=='\t' ){
177 indent = ((indent+9)/8)*8;
178 }else if( z[s]==' ' ){
179 indent++;
180 }
181 s++;
182 }
183 }
184 a[i].z = z+s;
185 a[i].indent = s;
186 for(h=0, x=s; x<k; x++){
187 h = h ^ (h<<2) ^ z[x];
188 }
189 a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s);
@@ -200,11 +193,12 @@
200
201 /*
202 ** Return true if two DLine elements are identical.
203 */
204 static int same_dline(DLine *pA, DLine *pB){
205 return pA->h==pB->h && memcmp(pA->z,pB->z,pA->h & LENGTH_MASK)==0;
 
206 }
207
208 /*
209 ** Return true if the regular expression *pRe matches any of the
210 ** N dlines
@@ -240,22 +234,16 @@
240 }else if( cPrefix=='+' ){
241 blob_append(pOut, "<span class=\"diffadd\">", -1);
242 }else if( cPrefix=='-' ){
243 blob_append(pOut, "<span class=\"diffrm\">", -1);
244 }
245 if( pLine->indent ){
246 blob_appendf(pOut, "%*s", pLine->indent, " ");
247 }
248 htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK));
249 if( cPrefix!=' ' ){
250 blob_append(pOut, "</span>", -1);
251 }
252 }else{
253 if( pLine->indent ){
254 blob_appendf(pOut, "%*s", pLine->indent, " ");
255 }
256 blob_append(pOut, pLine->z, pLine->h & LENGTH_MASK);
257 }
258 blob_append(pOut, "\n", 1);
259 }
260
261 /*
@@ -427,11 +415,11 @@
427 b += m;
428 if( i<nr-1 ){
429 m = R[r+i*3+3];
430 for(j=0; j<m; j++){
431 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
432 appendDiffLine(pOut, ' ', &B[b+j], html, 0);
433 }
434 b += m;
435 a += m;
436 }
437 }
@@ -440,11 +428,11 @@
440 assert( nr==i );
441 m = R[r+nr*3];
442 if( m>nContext ) m = nContext;
443 for(j=0; j<m; j++){
444 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
445 appendDiffLine(pOut, ' ', &B[b+j], html, 0);
446 }
447 }
448 }
449
450 /*
@@ -501,11 +489,11 @@
501 ** This comment contains multibyte unicode characters (ü, Æ, ð) in order
502 ** to test the ability of the diff code to handle such characters.
503 */
504 static void sbsWriteText(SbsLine *p, DLine *pLine, int col){
505 Blob *pCol = p->apCols[col];
506 int n = pLine->h & LENGTH_MASK;
507 int i; /* Number of input characters consumed */
508 int k; /* Cursor position */
509 int needEndSpan = 0;
510 const char *zIn = pLine->z;
511 int w = p->width;
@@ -532,13 +520,10 @@
532 p->iEnd = p->iEnd2;
533 p->iEnd2 = 0;
534 }
535 }
536 }
537 if( pLine->indent && i==0 ){
538 blob_appendf(pCol, "%*s", pLine->indent, " ");
539 }
540 if( c=='\t' && !p->escHtml ){
541 blob_append(pCol, " ", 1);
542 while( (k&7)!=7 && (p->escHtml || k<w) ){
543 blob_append(pCol, " ", 1);
544 k++;
@@ -562,11 +547,11 @@
562 blob_append(pCol, "</span>", 7);
563 }
564 if( col==SBS_TXTB ){
565 sbsWriteNewlines(p);
566 }else if( !p->escHtml ){
567 sbsWriteSpace(p, w-k-pLine->indent, SBS_TXTA);
568 }
569 }
570
571 /*
572 ** Append a column to the final output blob.
@@ -1789,11 +1774,11 @@
1789 if( diffFlags & DIFF_INVERT ){
1790 Blob *pTemp = pA_Blob;
1791 pA_Blob = pB_Blob;
1792 pB_Blob = pTemp;
1793 }
1794 ignoreWs = (diffFlags & (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))!=0;
1795 blob_to_utf8_no_bom(pA_Blob, 0);
1796 blob_to_utf8_no_bom(pB_Blob, 0);
1797
1798 /* Prepare the input files */
1799 memset(&c, 0, sizeof(c));
@@ -1859,22 +1844,21 @@
1859
1860 /*
1861 ** Process diff-related command-line options and return an appropriate
1862 ** "diffFlags" integer.
1863 **
1864 ** --brief Show filenames only DIFF_BRIEF
1865 ** --context|-c N N lines of context. DIFF_CONTEXT_MASK
1866 ** --html Format for HTML DIFF_HTML
1867 ** --invert Invert the diff DIFF_INVERT
1868 ** --ignore-space-at-eol Ignore eol-whitespaces DIFF_IGNORE_EOLWS
1869 ** --ignore-space-at-sol Ignore sol-whitespaces DIFF_IGNORE_SOLWS
1870 ** --linenum|-n Show line numbers DIFF_LINENO
1871 ** --noopt Disable optimization DIFF_NOOPT
1872 ** --side-by-side|-y Side-by-side diff. DIFF_SIDEBYSIDE
1873 ** --unified Unified diff. ~DIFF_SIDEBYSIDE
1874 ** -w Ignore all whitespaces DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS
1875 ** --width|-W N N character lines. DIFF_WIDTH_MASK
1876 */
1877 u64 diff_options(void){
1878 u64 diffFlags = 0;
1879 const char *z;
1880 int f;
@@ -1888,13 +1872,12 @@
1888 f *= DIFF_CONTEXT_MASK+1;
1889 if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK;
1890 diffFlags |= f;
1891 }
1892 if( find_option("html",0,0)!=0 ) diffFlags |= DIFF_HTML;
1893 if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS;
1894 if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
1895 if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
1896 if( find_option("linenum","n",0)!=0 ) diffFlags |= DIFF_LINENO;
1897 if( find_option("noopt",0,0)!=0 ) diffFlags |= DIFF_NOOPT;
1898 if( find_option("invert",0,0)!=0 ) diffFlags |= DIFF_INVERT;
1899 if( find_option("brief",0,0)!=0 ) diffFlags |= DIFF_BRIEF;
1900 return diffFlags;
@@ -1971,14 +1954,11 @@
1971 typedef struct Annotator Annotator;
1972 struct Annotator {
1973 DContext c; /* The diff-engine context */
1974 struct AnnLine { /* Lines of the original files... */
1975 const char *z; /* The text of the line */
1976 short int n; /* Number of bytes. Whether this omits sol/eol spacing
1977 depends on the diffFlags) */
1978 unsigned short indent; /* Indenting (number of initial spaces, only used
1979 if sol-spacing is ignored in the diffFlags) */
1980 short int iVers; /* Level at which tag was set */
1981 } *aOrig;
1982 int nOrig; /* Number of elements in aOrig[] */
1983 int nVers; /* Number of versions analyzed */
1984 int bLimit; /* True if the iLimit was reached */
@@ -2008,12 +1988,11 @@
2008 return 1;
2009 }
2010 p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
2011 for(i=0; i<p->c.nTo; i++){
2012 p->aOrig[i].z = p->c.aTo[i].z;
2013 p->aOrig[i].n = p->c.aTo[i].h & LENGTH_MASK;
2014 p->aOrig[i].indent = p->c.aTo[i].indent;
2015 p->aOrig[i].iVers = -1;
2016 }
2017 p->nOrig = p->c.nTo;
2018 return 0;
2019 }
@@ -2066,13 +2045,13 @@
2066 /* Return no errors */
2067 return 0;
2068 }
2069
2070
2071 /* Annotation flags */
2072 #define ANN_FILE_VERS 0x01 /* Show file vers rather than commit vers */
2073 #define ANN_FILE_ANCEST 0x02 /* Prefer check-ins in the ANCESTOR table */
2074
2075 /*
2076 ** Compute a complete annotation on a file. The file is identified
2077 ** by its filename number (filename.fnid) and the baseline in which
2078 ** it was checked in (mlink.mid).
@@ -2080,12 +2059,11 @@
2080 static void annotate_file(
2081 Annotator *p, /* The annotator */
2082 int fnid, /* The name of the file to be annotated */
2083 int mid, /* Use the version of the file in this check-in */
2084 int iLimit, /* Limit the number of levels if greater than zero */
2085 int annFlags, /* Flags to alter the annotation */
2086 u64 diffFlags /* Flags to alter the whitespace handling */
2087 ){
2088 Blob toAnnotate; /* Text of the final (mid) version of the file */
2089 Blob step; /* Text of previous revision */
2090 int rid; /* Artifact ID of the file being annotated */
2091 Stmt q; /* Query returning all ancestor versions */
@@ -2099,11 +2077,12 @@
2099 }
2100 if( !content_get(rid, &toAnnotate) ){
2101 fossil_fatal("unable to retrieve content of artifact #%d", rid);
2102 }
2103 if( iLimit<=0 ) iLimit = 1000000000;
2104 annotation_start(p, &toAnnotate, diffFlags);
 
2105 db_begin_transaction();
2106 db_multi_exec(
2107 "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);"
2108 "DELETE FROM vseen;"
2109 );
@@ -2133,11 +2112,12 @@
2133 p->aVers[p->nVers].zMUuid = fossil_strdup(db_column_text(&q, 1));
2134 p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2));
2135 p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3));
2136 if( p->nVers ){
2137 content_get(rid, &step);
2138 annotation_step(p, &step, p->nVers-1, diffFlags);
 
2139 blob_reset(&step);
2140 }
2141 p->nVers++;
2142 db_bind_int(&ins, ":rid", rid);
2143 db_step(&ins);
@@ -2188,14 +2168,13 @@
2188 void annotation_page(void){
2189 int mid;
2190 int fnid;
2191 int i;
2192 int iLimit; /* Depth limit */
2193 int annFlags = ANN_FILE_ANCEST;
2194 int showLog = 0; /* True to display the log */
2195 int ignoreWs = 0; /* Ignore whitespace */
2196 u64 diffFlags = 0; /* diff flags for ignore whitespace */
2197 const char *zFilename; /* Name of file to annotate */
2198 const char *zCI; /* The check-in containing zFilename */
2199 Annotator ann;
2200 HQuery url;
2201 struct AnnVers *p;
@@ -2205,25 +2184,26 @@
2205 /* Gather query parameters */
2206 showLog = atoi(PD("log","1"));
2207 login_check_credentials();
2208 if( !g.perm.Read ){ login_needed(); return; }
2209 if( exclude_spiders("annotate") ) return;
 
2210 mid = name_to_typed_rid(PD("checkin","0"),"ci");
2211 zFilename = P("filename");
2212 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
2213 if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
2214 iLimit = atoi(PD("limit","20"));
2215 if( P("filevers") ) annFlags |= ANN_FILE_VERS;
2216 ignoreWs = P("w")!=0;
2217 if( ignoreWs ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
2218 if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
2219 fossil_redirect_home();
2220 }
2221
2222 /* compute the annotation */
2223 compute_direct_ancestors(mid, 10000000);
2224 annotate_file(&ann, fnid, mid, iLimit, annFlags, diffFlags);
2225 zCI = ann.aVers[0].zMUuid;
2226
2227 /* generate the web page */
2228 style_header("Annotation For %h", zFilename);
2229 if( bBlame ){
@@ -2316,11 +2296,10 @@
2316 @ <pre>
2317 for(i=0; i<ann.nOrig; i++){
2318 int iVers = ann.aOrig[i].iVers;
2319 char *z = (char*)ann.aOrig[i].z;
2320 int n = ann.aOrig[i].n;
2321 int indent = ann.aOrig[i].indent+1;
2322 char zPrefix[300];
2323 z[n] = 0;
2324 if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1;
2325
2326 if( bBlame ){
@@ -2331,26 +2310,26 @@
2331 "<span style='background-color:%s'>"
2332 "%s%.10s</a> %s</span> %13.13s:",
2333 p->zBgColor, zLink, p->zMUuid, p->zDate, p->zUser);
2334 fossil_free(zLink);
2335 }else{
2336 sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s%*s", indent, " ");
2337 }
2338 }else{
2339 if( iVers>=0 ){
2340 struct AnnVers *p = ann.aVers+iVers;
2341 char *zLink = xhref("target='infowindow'", "%R/info/%S", p->zMUuid);
2342 sqlite3_snprintf(sizeof(zPrefix), zPrefix,
2343 "<span style='background-color:%s'>"
2344 "%s%.10s</a> %s</span> %4d:%*s",
2345 p->zBgColor, zLink, p->zMUuid, p->zDate, i+1, indent, " ");
2346 fossil_free(zLink);
2347 }else{
2348 sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%22s%4d:%*s", "", i+1, indent, " ");
2349 }
2350 }
2351 @ %s(zPrefix)%h(z)
2352
2353 }
2354 @ </pre>
2355 style_footer();
2356 }
@@ -2366,16 +2345,15 @@
2366 ** the file was last modified. The "annotate" command shows line numbers
2367 ** and omits the username. The "blame" and "praise" commands show the user
2368 ** who made each checkin and omits the line number.
2369 **
2370 ** Options:
2371 ** --filevers Show file version numbers rather than check-in versions
2372 ** -l|--log List all versions analyzed
2373 ** -n|--limit N Only look backwards in time by N versions
2374 ** --ignore-space-at-eol Ignore eol-whitespaces
2375 ** --ignore-space-at-sol Ignore sol-whitespaces
2376 ** -w Ignore all whitespaces
2377 **
2378 ** See also: info, finfo, timeline
2379 */
2380 void annotate_cmd(void){
2381 int fnid; /* Filename ID */
@@ -2387,23 +2365,21 @@
2387 Annotator ann; /* The annotation of the file */
2388 int i; /* Loop counter */
2389 const char *zLimit; /* The value to the -n|--limit option */
2390 int iLimit; /* How far back in time to look */
2391 int showLog; /* True to show the log */
2392 u64 diffFlags = 0;/* Flags to control whitespace handling */
2393 int fileVers; /* Show file version instead of check-in versions */
2394 int annFlags = 0; /* Flags to control annotation properties */
2395 int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */
2396
2397 bBlame = g.argv[1][0]!='a';
2398 zLimit = find_option("limit","n",1);
2399 if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
2400 iLimit = atoi(zLimit);
2401 showLog = find_option("log","l",0)!=0;
2402 if( find_option("ignore-space-at-sol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_SOLWS;
2403 if( find_option("ignore-space-at-eol",0,0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
2404 if( find_option("w",0,0)!=0 ) diffFlags |= (DIFF_IGNORE_EOLWS|DIFF_IGNORE_SOLWS);
2405 fileVers = find_option("filevers",0,0)!=0;
2406 db_must_be_within_tree();
2407 if( g.argc<3 ) {
2408 usage("FILENAME");
2409 }
@@ -2429,11 +2405,11 @@
2429 fid, fnid);
2430 if( mid==0 ){
2431 fossil_fatal("unable to find manifest");
2432 }
2433 annFlags |= ANN_FILE_ANCEST;
2434 annotate_file(&ann, fnid, mid, iLimit, annFlags, diffFlags);
2435 if( showLog ){
2436 struct AnnVers *p;
2437 for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
2438 fossil_print("version %3d: %s %.10s file %.10s\n",
2439 i+1, p->zDate, p->zMUuid, p->zFUuid);
@@ -2441,28 +2417,27 @@
2441 fossil_print("---------------------------------------------------\n");
2442 }
2443 for(i=0; i<ann.nOrig; i++){
2444 int iVers = ann.aOrig[i].iVers;
2445 char *z = (char*)ann.aOrig[i].z;
2446 int indent = ann.aOrig[i].indent + 1;
2447 int n = ann.aOrig[i].n;
2448 struct AnnVers *p;
2449 if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1;
2450 p = ann.aVers + iVers;
2451 if( bBlame ){
2452 if( iVers>=0 ){
2453 fossil_print("%.10s %s %13.13s:%*s%.*s\n",
2454 fileVers ? p->zFUuid : p->zMUuid, p->zDate, p->zUser, indent, " ", n, z);
2455 }else{
2456 fossil_print("%35s %*s%.*s\n", "", indent, " ", n, z);
2457 }
2458 }else{
2459 if( iVers>=0 ){
2460 fossil_print("%.10s %s %5d:%*s%.*s\n",
2461 fileVers ? p->zFUuid : p->zMUuid, p->zDate, i+1, indent, " ", n, z);
2462 }else{
2463 fossil_print("%21s %5d:%*s%.*s\n",
2464 "", i+1, indent, " ", n, z);
2465 }
2466 }
2467 }
2468 }
2469
--- src/diff.c
+++ src/diff.c
@@ -28,12 +28,12 @@
28 ** Flag parameters to the text_diff() routine used to control the formatting
29 ** of the diff output.
30 */
31 #define DIFF_CONTEXT_MASK ((u64)0x0000ffff) /* Lines of context. Default if 0 */
32 #define DIFF_WIDTH_MASK ((u64)0x00ff0000) /* side-by-side column width */
33 #define DIFF_IGNORE_EOLWS ((u64)0x01000000) /* Ignore end-of-line whitespace */
34 #define DIFF_IGNORE_ALLWS ((u64)0x03000000) /* Ignore all whitespace */
35 #define DIFF_SIDEBYSIDE ((u64)0x04000000) /* Generate a side-by-side diff */
36 #define DIFF_VERBOSE ((u64)0x08000000) /* Missing shown as empty files */
37 #define DIFF_INLINE ((u64)0x00000000) /* Inline (not side-by-side) diff */
38 #define DIFF_BRIEF ((u64)0x10000000) /* Show filenames only */
39 #define DIFF_HTML ((u64)0x20000000) /* Render for HTML */
@@ -76,11 +76,12 @@
76 */
77 typedef struct DLine DLine;
78 struct DLine {
79 const char *z; /* The text of the line */
80 unsigned int h; /* Hash of the line */
81 unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */
82 unsigned short n; /* number of bytes */
83 unsigned int iNext; /* 1+(Index of next line with same the same hash) */
84
85 /* an array of DLine elements serves two purposes. The fields
86 ** above are one per line of input text. But each entry is also
87 ** a bucket in a hash table, as follows: */
@@ -130,11 +131,11 @@
131 **
132 ** Profiling show that in most cases this routine consumes the bulk of
133 ** the CPU time on a diff.
134 */
135 static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
136 int nLine, i, j, k, s, x;
137 unsigned int h, h2;
138 DLine *a;
139
140 /* Count the number of lines. Allocate space to hold
141 ** the returned array.
@@ -163,27 +164,19 @@
164 }
165
166 /* Fill in the array */
167 for(i=0; i<nLine; i++){
168 for(j=0; z[j] && z[j]!='\n'; j++){}
169 a[i].z = z;
170 a[i].n = k = j;
171 s = 0;
 
172 if( diffFlags & DIFF_IGNORE_EOLWS ){
173 while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
174 }
175 if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
176 while( s<k && fossil_isspace(z[s]) ){ s++; }
177 }
 
 
 
 
 
 
 
 
178 a[i].indent = s;
179 for(h=0, x=s; x<k; x++){
180 h = h ^ (h<<2) ^ z[x];
181 }
182 a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s);
@@ -200,11 +193,12 @@
193
194 /*
195 ** Return true if two DLine elements are identical.
196 */
197 static int same_dline(DLine *pA, DLine *pB){
198 return pA->h==pB->h && memcmp(pA->z+pA->indent,pB->z+pB->indent,
199 pA->h & LENGTH_MASK)==0;
200 }
201
202 /*
203 ** Return true if the regular expression *pRe matches any of the
204 ** N dlines
@@ -240,22 +234,16 @@
234 }else if( cPrefix=='+' ){
235 blob_append(pOut, "<span class=\"diffadd\">", -1);
236 }else if( cPrefix=='-' ){
237 blob_append(pOut, "<span class=\"diffrm\">", -1);
238 }
239 htmlize_to_blob(pOut, pLine->z, pLine->n);
 
 
 
240 if( cPrefix!=' ' ){
241 blob_append(pOut, "</span>", -1);
242 }
243 }else{
244 blob_append(pOut, pLine->z, pLine->n);
 
 
 
245 }
246 blob_append(pOut, "\n", 1);
247 }
248
249 /*
@@ -427,11 +415,11 @@
415 b += m;
416 if( i<nr-1 ){
417 m = R[r+i*3+3];
418 for(j=0; j<m; j++){
419 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
420 appendDiffLine(pOut, ' ', &A[a+j], html, 0);
421 }
422 b += m;
423 a += m;
424 }
425 }
@@ -440,11 +428,11 @@
428 assert( nr==i );
429 m = R[r+nr*3];
430 if( m>nContext ) m = nContext;
431 for(j=0; j<m; j++){
432 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
433 appendDiffLine(pOut, ' ', &A[a+j], html, 0);
434 }
435 }
436 }
437
438 /*
@@ -501,11 +489,11 @@
489 ** This comment contains multibyte unicode characters (ü, Æ, ð) in order
490 ** to test the ability of the diff code to handle such characters.
491 */
492 static void sbsWriteText(SbsLine *p, DLine *pLine, int col){
493 Blob *pCol = p->apCols[col];
494 int n = pLine->n;
495 int i; /* Number of input characters consumed */
496 int k; /* Cursor position */
497 int needEndSpan = 0;
498 const char *zIn = pLine->z;
499 int w = p->width;
@@ -532,13 +520,10 @@
520 p->iEnd = p->iEnd2;
521 p->iEnd2 = 0;
522 }
523 }
524 }
 
 
 
525 if( c=='\t' && !p->escHtml ){
526 blob_append(pCol, " ", 1);
527 while( (k&7)!=7 && (p->escHtml || k<w) ){
528 blob_append(pCol, " ", 1);
529 k++;
@@ -562,11 +547,11 @@
547 blob_append(pCol, "</span>", 7);
548 }
549 if( col==SBS_TXTB ){
550 sbsWriteNewlines(p);
551 }else if( !p->escHtml ){
552 sbsWriteSpace(p, w-k, SBS_TXTA);
553 }
554 }
555
556 /*
557 ** Append a column to the final output blob.
@@ -1789,11 +1774,11 @@
1774 if( diffFlags & DIFF_INVERT ){
1775 Blob *pTemp = pA_Blob;
1776 pA_Blob = pB_Blob;
1777 pB_Blob = pTemp;
1778 }
1779 ignoreWs = (diffFlags & DIFF_IGNORE_ALLWS)!=0;
1780 blob_to_utf8_no_bom(pA_Blob, 0);
1781 blob_to_utf8_no_bom(pB_Blob, 0);
1782
1783 /* Prepare the input files */
1784 memset(&c, 0, sizeof(c));
@@ -1859,22 +1844,21 @@
1844
1845 /*
1846 ** Process diff-related command-line options and return an appropriate
1847 ** "diffFlags" integer.
1848 **
1849 ** --brief Show filenames only DIFF_BRIEF
1850 ** -c|--context N N lines of context. DIFF_CONTEXT_MASK
1851 ** --html Format for HTML DIFF_HTML
1852 ** --invert Invert the diff DIFF_INVERT
1853 ** -n|--linenum Show line numbers DIFF_LINENO
1854 ** --noopt Disable optimization DIFF_NOOPT
1855 ** --unified Unified diff. ~DIFF_SIDEBYSIDE
1856 ** -w|--ignore-all-space Ignore all whitespaces DIFF_IGNORE_ALLWS
1857 ** --width|-W N N character lines. DIFF_WIDTH_MASK
1858 ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE
1859 ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS
 
1860 */
1861 u64 diff_options(void){
1862 u64 diffFlags = 0;
1863 const char *z;
1864 int f;
@@ -1888,13 +1872,12 @@
1872 f *= DIFF_CONTEXT_MASK+1;
1873 if( f > DIFF_WIDTH_MASK ) f = DIFF_CONTEXT_MASK;
1874 diffFlags |= f;
1875 }
1876 if( find_option("html",0,0)!=0 ) diffFlags |= DIFF_HTML;
1877 if( find_option("ignore-trailing-space","Z",0)!=0 ) diffFlags |= DIFF_IGNORE_EOLWS;
1878 if( find_option("ignore-all-space","w",0)!=0 ) diffFlags |= DIFF_IGNORE_ALLWS;
 
1879 if( find_option("linenum","n",0)!=0 ) diffFlags |= DIFF_LINENO;
1880 if( find_option("noopt",0,0)!=0 ) diffFlags |= DIFF_NOOPT;
1881 if( find_option("invert",0,0)!=0 ) diffFlags |= DIFF_INVERT;
1882 if( find_option("brief",0,0)!=0 ) diffFlags |= DIFF_BRIEF;
1883 return diffFlags;
@@ -1971,14 +1954,11 @@
1954 typedef struct Annotator Annotator;
1955 struct Annotator {
1956 DContext c; /* The diff-engine context */
1957 struct AnnLine { /* Lines of the original files... */
1958 const char *z; /* The text of the line */
1959 short int n; /* Number of bytes (omitting trailing space and \n) */
 
 
 
1960 short int iVers; /* Level at which tag was set */
1961 } *aOrig;
1962 int nOrig; /* Number of elements in aOrig[] */
1963 int nVers; /* Number of versions analyzed */
1964 int bLimit; /* True if the iLimit was reached */
@@ -2008,12 +1988,11 @@
1988 return 1;
1989 }
1990 p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
1991 for(i=0; i<p->c.nTo; i++){
1992 p->aOrig[i].z = p->c.aTo[i].z;
1993 p->aOrig[i].n = p->c.aTo[i].n;
 
1994 p->aOrig[i].iVers = -1;
1995 }
1996 p->nOrig = p->c.nTo;
1997 return 0;
1998 }
@@ -2066,13 +2045,13 @@
2045 /* Return no errors */
2046 return 0;
2047 }
2048
2049
2050 /* Annotation flags (any DIFF flag can be used as Annotation flag as well) */
2051 #define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */
2052 #define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */
2053
2054 /*
2055 ** Compute a complete annotation on a file. The file is identified
2056 ** by its filename number (filename.fnid) and the baseline in which
2057 ** it was checked in (mlink.mid).
@@ -2080,12 +2059,11 @@
2059 static void annotate_file(
2060 Annotator *p, /* The annotator */
2061 int fnid, /* The name of the file to be annotated */
2062 int mid, /* Use the version of the file in this check-in */
2063 int iLimit, /* Limit the number of levels if greater than zero */
2064 u64 annFlags /* Flags to alter the annotation */
 
2065 ){
2066 Blob toAnnotate; /* Text of the final (mid) version of the file */
2067 Blob step; /* Text of previous revision */
2068 int rid; /* Artifact ID of the file being annotated */
2069 Stmt q; /* Query returning all ancestor versions */
@@ -2099,11 +2077,12 @@
2077 }
2078 if( !content_get(rid, &toAnnotate) ){
2079 fossil_fatal("unable to retrieve content of artifact #%d", rid);
2080 }
2081 if( iLimit<=0 ) iLimit = 1000000000;
2082 blob_to_utf8_no_bom(&toAnnotate, 0);
2083 annotation_start(p, &toAnnotate, annFlags);
2084 db_begin_transaction();
2085 db_multi_exec(
2086 "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);"
2087 "DELETE FROM vseen;"
2088 );
@@ -2133,11 +2112,12 @@
2112 p->aVers[p->nVers].zMUuid = fossil_strdup(db_column_text(&q, 1));
2113 p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2));
2114 p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3));
2115 if( p->nVers ){
2116 content_get(rid, &step);
2117 blob_to_utf8_no_bom(&step, 0);
2118 annotation_step(p, &step, p->nVers-1, annFlags);
2119 blob_reset(&step);
2120 }
2121 p->nVers++;
2122 db_bind_int(&ins, ":rid", rid);
2123 db_step(&ins);
@@ -2188,14 +2168,13 @@
2168 void annotation_page(void){
2169 int mid;
2170 int fnid;
2171 int i;
2172 int iLimit; /* Depth limit */
2173 u64 annFlags = ANN_FILE_ANCEST;
2174 int showLog = 0; /* True to display the log */
2175 int ignoreWs = 0; /* Ignore whitespace */
 
2176 const char *zFilename; /* Name of file to annotate */
2177 const char *zCI; /* The check-in containing zFilename */
2178 Annotator ann;
2179 HQuery url;
2180 struct AnnVers *p;
@@ -2205,25 +2184,26 @@
2184 /* Gather query parameters */
2185 showLog = atoi(PD("log","1"));
2186 login_check_credentials();
2187 if( !g.perm.Read ){ login_needed(); return; }
2188 if( exclude_spiders("annotate") ) return;
2189 load_control();
2190 mid = name_to_typed_rid(PD("checkin","0"),"ci");
2191 zFilename = P("filename");
2192 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
2193 if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
2194 iLimit = atoi(PD("limit","20"));
2195 if( P("filevers") ) annFlags |= ANN_FILE_VERS;
2196 ignoreWs = P("w")!=0;
2197 if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS;
2198 if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
2199 fossil_redirect_home();
2200 }
2201
2202 /* compute the annotation */
2203 compute_direct_ancestors(mid, 10000000);
2204 annotate_file(&ann, fnid, mid, iLimit, annFlags);
2205 zCI = ann.aVers[0].zMUuid;
2206
2207 /* generate the web page */
2208 style_header("Annotation For %h", zFilename);
2209 if( bBlame ){
@@ -2316,11 +2296,10 @@
2296 @ <pre>
2297 for(i=0; i<ann.nOrig; i++){
2298 int iVers = ann.aOrig[i].iVers;
2299 char *z = (char*)ann.aOrig[i].z;
2300 int n = ann.aOrig[i].n;
 
2301 char zPrefix[300];
2302 z[n] = 0;
2303 if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1;
2304
2305 if( bBlame ){
@@ -2331,26 +2310,26 @@
2310 "<span style='background-color:%s'>"
2311 "%s%.10s</a> %s</span> %13.13s:",
2312 p->zBgColor, zLink, p->zMUuid, p->zDate, p->zUser);
2313 fossil_free(zLink);
2314 }else{
2315 sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%36s", "");
2316 }
2317 }else{
2318 if( iVers>=0 ){
2319 struct AnnVers *p = ann.aVers+iVers;
2320 char *zLink = xhref("target='infowindow'", "%R/info/%S", p->zMUuid);
2321 sqlite3_snprintf(sizeof(zPrefix), zPrefix,
2322 "<span style='background-color:%s'>"
2323 "%s%.10s</a> %s</span> %4d:",
2324 p->zBgColor, zLink, p->zMUuid, p->zDate, i+1);
2325 fossil_free(zLink);
2326 }else{
2327 sqlite3_snprintf(sizeof(zPrefix), zPrefix, "%22s%4d:", "", i+1);
2328 }
2329 }
2330 @ %s(zPrefix) %h(z)
2331
2332 }
2333 @ </pre>
2334 style_footer();
2335 }
@@ -2366,16 +2345,15 @@
2345 ** the file was last modified. The "annotate" command shows line numbers
2346 ** and omits the username. The "blame" and "praise" commands show the user
2347 ** who made each checkin and omits the line number.
2348 **
2349 ** Options:
2350 ** --filevers Show file version numbers rather than check-in versions
2351 ** -l|--log List all versions analyzed
2352 ** -n|--limit N Only look backwards in time by N versions
2353 ** -Z|--ignore-trailing-space Ignore eol-whitespaces
2354 ** -w|--ignore-all-space Ignore all whitespaces
 
2355 **
2356 ** See also: info, finfo, timeline
2357 */
2358 void annotate_cmd(void){
2359 int fnid; /* Filename ID */
@@ -2387,23 +2365,21 @@
2365 Annotator ann; /* The annotation of the file */
2366 int i; /* Loop counter */
2367 const char *zLimit; /* The value to the -n|--limit option */
2368 int iLimit; /* How far back in time to look */
2369 int showLog; /* True to show the log */
 
2370 int fileVers; /* Show file version instead of check-in versions */
2371 u64 annFlags = 0; /* Flags to control annotation properties */
2372 int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */
2373
2374 bBlame = g.argv[1][0]!='a';
2375 zLimit = find_option("limit","n",1);
2376 if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
2377 iLimit = atoi(zLimit);
2378 showLog = find_option("log","l",0)!=0;
2379 if( find_option("ignore-trailing-space","Z",0)!=0 ) annFlags |= DIFF_IGNORE_EOLWS;
2380 if( find_option("ignore-all-space","w",0)!=0 ) annFlags |= DIFF_IGNORE_ALLWS;
 
2381 fileVers = find_option("filevers",0,0)!=0;
2382 db_must_be_within_tree();
2383 if( g.argc<3 ) {
2384 usage("FILENAME");
2385 }
@@ -2429,11 +2405,11 @@
2405 fid, fnid);
2406 if( mid==0 ){
2407 fossil_fatal("unable to find manifest");
2408 }
2409 annFlags |= ANN_FILE_ANCEST;
2410 annotate_file(&ann, fnid, mid, iLimit, annFlags);
2411 if( showLog ){
2412 struct AnnVers *p;
2413 for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
2414 fossil_print("version %3d: %s %.10s file %.10s\n",
2415 i+1, p->zDate, p->zMUuid, p->zFUuid);
@@ -2441,28 +2417,27 @@
2417 fossil_print("---------------------------------------------------\n");
2418 }
2419 for(i=0; i<ann.nOrig; i++){
2420 int iVers = ann.aOrig[i].iVers;
2421 char *z = (char*)ann.aOrig[i].z;
 
2422 int n = ann.aOrig[i].n;
2423 struct AnnVers *p;
2424 if( iLimit>ann.nVers && iVers<0 ) iVers = ann.nVers-1;
2425 p = ann.aVers + iVers;
2426 if( bBlame ){
2427 if( iVers>=0 ){
2428 fossil_print("%.10s %s %13.13s: %.*s\n",
2429 fileVers ? p->zFUuid : p->zMUuid, p->zDate, p->zUser, n, z);
2430 }else{
2431 fossil_print("%35s %.*s\n", "", n, z);
2432 }
2433 }else{
2434 if( iVers>=0 ){
2435 fossil_print("%.10s %s %5d: %.*s\n",
2436 fileVers ? p->zFUuid : p->zMUuid, p->zDate, i+1, n, z);
2437 }else{
2438 fossil_print("%21s %5d: %.*s\n",
2439 "", i+1, n, z);
2440 }
2441 }
2442 }
2443 }
2444
+16 -17
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1089,27 +1089,26 @@
10891089
** The "--binary" option causes files matching the glob PATTERN to be treated
10901090
** as binary when considering if they should be used with external diff program.
10911091
** This option overrides the "binary-glob" setting.
10921092
**
10931093
** Options:
1094
-** --binary PATTERN Treat files that match the glob PATTERN as binary
1095
-** --branch BRANCH Show diff of all changes on BRANCH
1096
-** --brief Show filenames only
1097
-** --context|-c N Use N lines of context
1098
-** --diff-binary BOOL Include binary files when using external commands
1099
-** --from|-r VERSION select VERSION as source for the diff
1100
-** --ignore-space-at-eol Ignore changes to end-of-line whitespace
1101
-** --ignore-space-at-sol Ignore changes to start-of-line whitespace
1102
-** --internal|-i use internal diff logic
1103
-** --side-by-side|-y side-by-side diff
1104
-** --tk Launch a Tcl/Tk GUI for display
1105
-** --to VERSION select VERSION as target for the diff
1106
-** --unified unified diff
1107
-** -v|--verbose output complete text of added or deleted files
1108
-** -w Ignore changes to start-of-line and end-of-line
1109
-** whitespace
1110
-** -W|--width Width of lines in side-by-side diff
1094
+** --binary PATTERN Treat files that match the glob PATTERN as binary
1095
+** --branch BRANCH Show diff of all changes on BRANCH
1096
+** --brief Show filenames only
1097
+** --context|-c N Use N lines of context
1098
+** --diff-binary BOOL Include binary files when using external commands
1099
+** --from|-r VERSION select VERSION as source for the diff
1100
+** --internal|-i use internal diff logic
1101
+** --side-by-side|-y side-by-side diff
1102
+** --tk Launch a Tcl/Tk GUI for display
1103
+** --to VERSION select VERSION as target for the diff
1104
+** --unified unified diff
1105
+** -v|--verbose output complete text of added or deleted files
1106
+** -w|--ignore-all-space Ignore changes to start-of-line and end-of-line
1107
+** whitespace
1108
+** -W|--width Width of lines in side-by-side diff
1109
+** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace
11111110
*/
11121111
void diff_cmd(void){
11131112
int isGDiff; /* True for gdiff. False for normal diff */
11141113
int isInternDiff; /* True for internal diff */
11151114
int verboseFlag; /* True if -v or --verbose flag is used */
11161115
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1089,27 +1089,26 @@
1089 ** The "--binary" option causes files matching the glob PATTERN to be treated
1090 ** as binary when considering if they should be used with external diff program.
1091 ** This option overrides the "binary-glob" setting.
1092 **
1093 ** Options:
1094 ** --binary PATTERN Treat files that match the glob PATTERN as binary
1095 ** --branch BRANCH Show diff of all changes on BRANCH
1096 ** --brief Show filenames only
1097 ** --context|-c N Use N lines of context
1098 ** --diff-binary BOOL Include binary files when using external commands
1099 ** --from|-r VERSION select VERSION as source for the diff
1100 ** --ignore-space-at-eol Ignore changes to end-of-line whitespace
1101 ** --ignore-space-at-sol Ignore changes to start-of-line whitespace
1102 ** --internal|-i use internal diff logic
1103 ** --side-by-side|-y side-by-side diff
1104 ** --tk Launch a Tcl/Tk GUI for display
1105 ** --to VERSION select VERSION as target for the diff
1106 ** --unified unified diff
1107 ** -v|--verbose output complete text of added or deleted files
1108 ** -w Ignore changes to start-of-line and end-of-line
1109 ** whitespace
1110 ** -W|--width Width of lines in side-by-side diff
1111 */
1112 void diff_cmd(void){
1113 int isGDiff; /* True for gdiff. False for normal diff */
1114 int isInternDiff; /* True for internal diff */
1115 int verboseFlag; /* True if -v or --verbose flag is used */
1116
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1089,27 +1089,26 @@
1089 ** The "--binary" option causes files matching the glob PATTERN to be treated
1090 ** as binary when considering if they should be used with external diff program.
1091 ** This option overrides the "binary-glob" setting.
1092 **
1093 ** Options:
1094 ** --binary PATTERN Treat files that match the glob PATTERN as binary
1095 ** --branch BRANCH Show diff of all changes on BRANCH
1096 ** --brief Show filenames only
1097 ** --context|-c N Use N lines of context
1098 ** --diff-binary BOOL Include binary files when using external commands
1099 ** --from|-r VERSION select VERSION as source for the diff
1100 ** --internal|-i use internal diff logic
1101 ** --side-by-side|-y side-by-side diff
1102 ** --tk Launch a Tcl/Tk GUI for display
1103 ** --to VERSION select VERSION as target for the diff
1104 ** --unified unified diff
1105 ** -v|--verbose output complete text of added or deleted files
1106 ** -w|--ignore-all-space Ignore changes to start-of-line and end-of-line
1107 ** whitespace
1108 ** -W|--width Width of lines in side-by-side diff
1109 ** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace
 
1110 */
1111 void diff_cmd(void){
1112 int isGDiff; /* True for gdiff. False for normal diff */
1113 int isInternDiff; /* True for internal diff */
1114 int verboseFlag; /* True if -v or --verbose flag is used */
1115
+2 -2
--- src/event.c
+++ src/event.c
@@ -342,12 +342,12 @@
342342
while( db_step(&q)==SQLITE_ROW ){
343343
blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0));
344344
}
345345
db_finalize(&q);
346346
}
347
- if( g.zLogin ){
348
- blob_appendf(&event, "U %F\n", g.zLogin);
347
+ if( !login_is_nobody() ){
348
+ blob_appendf(&event, "U %F\n", login_name());
349349
}
350350
blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody);
351351
md5sum_blob(&event, &cksum);
352352
blob_appendf(&event, "Z %b\n", &cksum);
353353
blob_reset(&cksum);
354354
--- src/event.c
+++ src/event.c
@@ -342,12 +342,12 @@
342 while( db_step(&q)==SQLITE_ROW ){
343 blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0));
344 }
345 db_finalize(&q);
346 }
347 if( g.zLogin ){
348 blob_appendf(&event, "U %F\n", g.zLogin);
349 }
350 blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody);
351 md5sum_blob(&event, &cksum);
352 blob_appendf(&event, "Z %b\n", &cksum);
353 blob_reset(&cksum);
354
--- src/event.c
+++ src/event.c
@@ -342,12 +342,12 @@
342 while( db_step(&q)==SQLITE_ROW ){
343 blob_appendf(&event, "T +sym-%F *\n", db_column_text(&q, 0));
344 }
345 db_finalize(&q);
346 }
347 if( !login_is_nobody() ){
348 blob_appendf(&event, "U %F\n", login_name());
349 }
350 blob_appendf(&event, "W %d\n%s\n", strlen(zBody), zBody);
351 md5sum_blob(&event, &cksum);
352 blob_appendf(&event, "Z %b\n", &cksum);
353 blob_reset(&cksum);
354
+6 -7
--- src/info.c
+++ src/info.c
@@ -460,11 +460,11 @@
460460
}else{
461461
diffFlags = DIFF_INLINE;
462462
}
463463
464464
if( P("w") ){
465
- diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS);
465
+ diffFlags |= DIFF_IGNORE_ALLWS;
466466
}
467467
/* "dc" query parameter determines lines of context */
468468
x = atoi(PD("dc","7"));
469469
if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
470470
diffFlags += x;
@@ -678,11 +678,11 @@
678678
verboseFlag = !verboseFlag;
679679
zPage = "ci";
680680
zPageHide = "vinfo";
681681
}
682682
diffFlags = construct_diff_flags(verboseFlag, sideBySide);
683
- zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
683
+ zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
684684
if( verboseFlag ){
685685
@ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName))
686686
@ Hide&nbsp;Diffs</a>
687687
if( sideBySide ){
688688
@ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW))
@@ -988,11 +988,11 @@
988988
zTo = P("to");
989989
if(zGlob && !*zGlob){
990990
zGlob = NULL;
991991
}
992992
diffFlags = construct_diff_flags(verboseFlag, sideBySide);
993
- zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
993
+ zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
994994
if( sideBySide || verboseFlag ){
995995
style_submenu_element("Hide Diff", "hidediff",
996996
"%R/vdiff?from=%T&to=%T&sbs=0%s%T%s",
997997
zFrom, zTo,
998998
zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
@@ -1382,13 +1382,12 @@
13821382
zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1);
13831383
zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
13841384
diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML;
13851385
13861386
style_header("Diff");
1387
- zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
1387
+ zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
13881388
if( *zW ){
1389
- diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS);
13901389
style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes",
13911390
"%s/fdiff?v1=%T&v2=%T&sbs=%d",
13921391
g.zTop, P("v1"), P("v2"), sideBySide);
13931392
}else{
13941393
style_submenu_element("Ignore Whitespace", "Ignore Whitespace",
@@ -1444,11 +1443,11 @@
14441443
rid = name_to_rid_www("name");
14451444
login_check_credentials();
14461445
if( !g.perm.Read ){ login_needed(); return; }
14471446
if( rid==0 ) fossil_redirect_home();
14481447
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
1449
- if( fossil_strcmp(P("name"), zUuid)==0 ){
1448
+ if( fossil_strcmp(P("name"), zUuid)==0 && login_is_nobody() ){
14501449
g.isConst = 1;
14511450
}
14521451
free(zUuid);
14531452
zMime = P("m");
14541453
if( zMime==0 ){
@@ -2263,11 +2262,11 @@
22632262
}
22642263
db_finalize(&q);
22652264
if( nChng>0 ){
22662265
int nrid;
22672266
Blob cksum;
2268
- blob_appendf(&ctrl, "U %F\n", g.zLogin);
2267
+ blob_appendf(&ctrl, "U %F\n", login_name());
22692268
md5sum_blob(&ctrl, &cksum);
22702269
blob_appendf(&ctrl, "Z %b\n", &cksum);
22712270
db_begin_transaction();
22722271
g.markPrivate = content_is_private(rid);
22732272
nrid = content_put(&ctrl);
22742273
22752274
ADDED src/loadctrl.c
--- src/info.c
+++ src/info.c
@@ -460,11 +460,11 @@
460 }else{
461 diffFlags = DIFF_INLINE;
462 }
463
464 if( P("w") ){
465 diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS);
466 }
467 /* "dc" query parameter determines lines of context */
468 x = atoi(PD("dc","7"));
469 if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
470 diffFlags += x;
@@ -678,11 +678,11 @@
678 verboseFlag = !verboseFlag;
679 zPage = "ci";
680 zPageHide = "vinfo";
681 }
682 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
683 zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
684 if( verboseFlag ){
685 @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName))
686 @ Hide&nbsp;Diffs</a>
687 if( sideBySide ){
688 @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW))
@@ -988,11 +988,11 @@
988 zTo = P("to");
989 if(zGlob && !*zGlob){
990 zGlob = NULL;
991 }
992 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
993 zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
994 if( sideBySide || verboseFlag ){
995 style_submenu_element("Hide Diff", "hidediff",
996 "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s",
997 zFrom, zTo,
998 zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
@@ -1382,13 +1382,12 @@
1382 zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1);
1383 zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
1384 diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML;
1385
1386 style_header("Diff");
1387 zW = (diffFlags&(DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS))?"&w":"";
1388 if( *zW ){
1389 diffFlags |= (DIFF_IGNORE_SOLWS|DIFF_IGNORE_EOLWS);
1390 style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes",
1391 "%s/fdiff?v1=%T&v2=%T&sbs=%d",
1392 g.zTop, P("v1"), P("v2"), sideBySide);
1393 }else{
1394 style_submenu_element("Ignore Whitespace", "Ignore Whitespace",
@@ -1444,11 +1443,11 @@
1444 rid = name_to_rid_www("name");
1445 login_check_credentials();
1446 if( !g.perm.Read ){ login_needed(); return; }
1447 if( rid==0 ) fossil_redirect_home();
1448 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
1449 if( fossil_strcmp(P("name"), zUuid)==0 ){
1450 g.isConst = 1;
1451 }
1452 free(zUuid);
1453 zMime = P("m");
1454 if( zMime==0 ){
@@ -2263,11 +2262,11 @@
2263 }
2264 db_finalize(&q);
2265 if( nChng>0 ){
2266 int nrid;
2267 Blob cksum;
2268 blob_appendf(&ctrl, "U %F\n", g.zLogin);
2269 md5sum_blob(&ctrl, &cksum);
2270 blob_appendf(&ctrl, "Z %b\n", &cksum);
2271 db_begin_transaction();
2272 g.markPrivate = content_is_private(rid);
2273 nrid = content_put(&ctrl);
2274
2275 DDED src/loadctrl.c
--- src/info.c
+++ src/info.c
@@ -460,11 +460,11 @@
460 }else{
461 diffFlags = DIFF_INLINE;
462 }
463
464 if( P("w") ){
465 diffFlags |= DIFF_IGNORE_ALLWS;
466 }
467 /* "dc" query parameter determines lines of context */
468 x = atoi(PD("dc","7"));
469 if( x<0 || x>DIFF_CONTEXT_MASK ) x = DIFF_CONTEXT_MASK;
470 diffFlags += x;
@@ -678,11 +678,11 @@
678 verboseFlag = !verboseFlag;
679 zPage = "ci";
680 zPageHide = "vinfo";
681 }
682 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
683 zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
684 if( verboseFlag ){
685 @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName))
686 @ Hide&nbsp;Diffs</a>
687 if( sideBySide ){
688 @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW))
@@ -988,11 +988,11 @@
988 zTo = P("to");
989 if(zGlob && !*zGlob){
990 zGlob = NULL;
991 }
992 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
993 zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
994 if( sideBySide || verboseFlag ){
995 style_submenu_element("Hide Diff", "hidediff",
996 "%R/vdiff?from=%T&to=%T&sbs=0%s%T%s",
997 zFrom, zTo,
998 zGlob ? "&glob=" : "", zGlob ? zGlob : "", zW);
@@ -1382,13 +1382,12 @@
1382 zV1 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v1);
1383 zV2 = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", v2);
1384 diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML;
1385
1386 style_header("Diff");
1387 zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
1388 if( *zW ){
 
1389 style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes",
1390 "%s/fdiff?v1=%T&v2=%T&sbs=%d",
1391 g.zTop, P("v1"), P("v2"), sideBySide);
1392 }else{
1393 style_submenu_element("Ignore Whitespace", "Ignore Whitespace",
@@ -1444,11 +1443,11 @@
1443 rid = name_to_rid_www("name");
1444 login_check_credentials();
1445 if( !g.perm.Read ){ login_needed(); return; }
1446 if( rid==0 ) fossil_redirect_home();
1447 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
1448 if( fossil_strcmp(P("name"), zUuid)==0 && login_is_nobody() ){
1449 g.isConst = 1;
1450 }
1451 free(zUuid);
1452 zMime = P("m");
1453 if( zMime==0 ){
@@ -2263,11 +2262,11 @@
2262 }
2263 db_finalize(&q);
2264 if( nChng>0 ){
2265 int nrid;
2266 Blob cksum;
2267 blob_appendf(&ctrl, "U %F\n", login_name());
2268 md5sum_blob(&ctrl, &cksum);
2269 blob_appendf(&ctrl, "Z %b\n", &cksum);
2270 db_begin_transaction();
2271 g.markPrivate = content_is_private(rid);
2272 nrid = content_put(&ctrl);
2273
2274 DDED src/loadctrl.c
--- a/src/loadctrl.c
+++ b/src/loadctrl.c
@@ -0,0 +1 @@
1
+header(test_loadavgooter(loadavg_test"0"
--- a/src/loadctrl.c
+++ b/src/loadctrl.c
@@ -0,0 +1 @@
 
--- a/src/loadctrl.c
+++ b/src/loadctrl.c
@@ -0,0 +1 @@
1 header(test_loadavgooter(loadavg_test"0"
+14
--- src/login.c
+++ src/login.c
@@ -1142,10 +1142,24 @@
11421142
/* Set the capabilities */
11431143
login_set_capabilities(zCap, 0);
11441144
login_anon_once = 1;
11451145
login_set_anon_nobody_capabilities();
11461146
}
1147
+
1148
+/*
1149
+** Return true if the user is "nobody"
1150
+*/
1151
+int login_is_nobody(void){
1152
+ return g.zLogin==0 || g.zLogin[0]==0 || fossil_strcmp(g.zLogin,"nobody")==0;
1153
+}
1154
+
1155
+/*
1156
+** Return the login name. If no login name is specified, return "nobody".
1157
+*/
1158
+const char *login_name(void){
1159
+ return (g.zLogin && g.zLogin[0]) ? g.zLogin : "nobody";
1160
+}
11471161
11481162
/*
11491163
** Call this routine when the credential check fails. It causes
11501164
** a redirect to the "login" page.
11511165
*/
11521166
--- src/login.c
+++ src/login.c
@@ -1142,10 +1142,24 @@
1142 /* Set the capabilities */
1143 login_set_capabilities(zCap, 0);
1144 login_anon_once = 1;
1145 login_set_anon_nobody_capabilities();
1146 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1147
1148 /*
1149 ** Call this routine when the credential check fails. It causes
1150 ** a redirect to the "login" page.
1151 */
1152
--- src/login.c
+++ src/login.c
@@ -1142,10 +1142,24 @@
1142 /* Set the capabilities */
1143 login_set_capabilities(zCap, 0);
1144 login_anon_once = 1;
1145 login_set_anon_nobody_capabilities();
1146 }
1147
1148 /*
1149 ** Return true if the user is "nobody"
1150 */
1151 int login_is_nobody(void){
1152 return g.zLogin==0 || g.zLogin[0]==0 || fossil_strcmp(g.zLogin,"nobody")==0;
1153 }
1154
1155 /*
1156 ** Return the login name. If no login name is specified, return "nobody".
1157 */
1158 const char *login_name(void){
1159 return (g.zLogin && g.zLogin[0]) ? g.zLogin : "nobody";
1160 }
1161
1162 /*
1163 ** Call this routine when the credential check fails. It causes
1164 ** a redirect to the "login" page.
1165 */
1166
+3 -3
--- src/main.c
+++ src/main.c
@@ -121,11 +121,11 @@
121121
122122
struct Global {
123123
int argc; char **argv; /* Command-line arguments to the program */
124124
char *nameOfExe; /* Full path of executable. */
125125
const char *zErrlog; /* Log errors to this file, if not NULL */
126
- int isConst; /* True if the output is unchanging */
126
+ int isConst; /* True if the output is unchanging & cacheable */
127127
const char *zVfsName; /* The VFS to use for database connections */
128128
sqlite3 *db; /* The connection to the databases */
129129
sqlite3 *dbConfig; /* Separate connection for global_config table */
130130
int useAttach; /* True if global_config is attached to repository */
131131
const char *zConfigDbName;/* Path of the config database. NULL if not open */
@@ -194,11 +194,11 @@
194194
char *urlFossil; /* The fossil query parameter on ssh: */
195195
unsigned urlFlags; /* Boolean flags controlling URL processing */
196196
int useProxy; /* Used to remember that a proxy is in use */
197197
char *proxyUrlPath;
198198
int proxyOrigPort; /* Tunneled port number for https through proxy */
199
- const char *zLogin; /* Login name. "" if not logged in. */
199
+ const char *zLogin; /* Login name. NULL or "" if not logged in. */
200200
const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
201201
** SSL client identity */
202202
int useLocalauth; /* No login required if from 127.0.0.1 */
203203
int noPswd; /* Logged in without password (on 127.0.0.1) */
204204
int userUid; /* Integer user id */
@@ -1459,11 +1459,11 @@
14591459
zAltRepo[jj] = 0;
14601460
zAltRepo += jj+1;
14611461
}else{
14621462
zUser = "nobody";
14631463
}
1464
- if( g.zLogin==0 ) zUser = "nobody";
1464
+ if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody";
14651465
if( zAltRepo[0]!='/' ){
14661466
zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo);
14671467
file_simplify_name(zAltRepo, -1, 0);
14681468
}
14691469
db_close(1);
14701470
--- src/main.c
+++ src/main.c
@@ -121,11 +121,11 @@
121
122 struct Global {
123 int argc; char **argv; /* Command-line arguments to the program */
124 char *nameOfExe; /* Full path of executable. */
125 const char *zErrlog; /* Log errors to this file, if not NULL */
126 int isConst; /* True if the output is unchanging */
127 const char *zVfsName; /* The VFS to use for database connections */
128 sqlite3 *db; /* The connection to the databases */
129 sqlite3 *dbConfig; /* Separate connection for global_config table */
130 int useAttach; /* True if global_config is attached to repository */
131 const char *zConfigDbName;/* Path of the config database. NULL if not open */
@@ -194,11 +194,11 @@
194 char *urlFossil; /* The fossil query parameter on ssh: */
195 unsigned urlFlags; /* Boolean flags controlling URL processing */
196 int useProxy; /* Used to remember that a proxy is in use */
197 char *proxyUrlPath;
198 int proxyOrigPort; /* Tunneled port number for https through proxy */
199 const char *zLogin; /* Login name. "" if not logged in. */
200 const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
201 ** SSL client identity */
202 int useLocalauth; /* No login required if from 127.0.0.1 */
203 int noPswd; /* Logged in without password (on 127.0.0.1) */
204 int userUid; /* Integer user id */
@@ -1459,11 +1459,11 @@
1459 zAltRepo[jj] = 0;
1460 zAltRepo += jj+1;
1461 }else{
1462 zUser = "nobody";
1463 }
1464 if( g.zLogin==0 ) zUser = "nobody";
1465 if( zAltRepo[0]!='/' ){
1466 zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo);
1467 file_simplify_name(zAltRepo, -1, 0);
1468 }
1469 db_close(1);
1470
--- src/main.c
+++ src/main.c
@@ -121,11 +121,11 @@
121
122 struct Global {
123 int argc; char **argv; /* Command-line arguments to the program */
124 char *nameOfExe; /* Full path of executable. */
125 const char *zErrlog; /* Log errors to this file, if not NULL */
126 int isConst; /* True if the output is unchanging & cacheable */
127 const char *zVfsName; /* The VFS to use for database connections */
128 sqlite3 *db; /* The connection to the databases */
129 sqlite3 *dbConfig; /* Separate connection for global_config table */
130 int useAttach; /* True if global_config is attached to repository */
131 const char *zConfigDbName;/* Path of the config database. NULL if not open */
@@ -194,11 +194,11 @@
194 char *urlFossil; /* The fossil query parameter on ssh: */
195 unsigned urlFlags; /* Boolean flags controlling URL processing */
196 int useProxy; /* Used to remember that a proxy is in use */
197 char *proxyUrlPath;
198 int proxyOrigPort; /* Tunneled port number for https through proxy */
199 const char *zLogin; /* Login name. NULL or "" if not logged in. */
200 const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
201 ** SSL client identity */
202 int useLocalauth; /* No login required if from 127.0.0.1 */
203 int noPswd; /* Logged in without password (on 127.0.0.1) */
204 int userUid; /* Integer user id */
@@ -1459,11 +1459,11 @@
1459 zAltRepo[jj] = 0;
1460 zAltRepo += jj+1;
1461 }else{
1462 zUser = "nobody";
1463 }
1464 if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody";
1465 if( zAltRepo[0]!='/' ){
1466 zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo);
1467 file_simplify_name(zAltRepo, -1, 0);
1468 }
1469 db_close(1);
1470
+3 -3
--- src/main.c
+++ src/main.c
@@ -121,11 +121,11 @@
121121
122122
struct Global {
123123
int argc; char **argv; /* Command-line arguments to the program */
124124
char *nameOfExe; /* Full path of executable. */
125125
const char *zErrlog; /* Log errors to this file, if not NULL */
126
- int isConst; /* True if the output is unchanging */
126
+ int isConst; /* True if the output is unchanging & cacheable */
127127
const char *zVfsName; /* The VFS to use for database connections */
128128
sqlite3 *db; /* The connection to the databases */
129129
sqlite3 *dbConfig; /* Separate connection for global_config table */
130130
int useAttach; /* True if global_config is attached to repository */
131131
const char *zConfigDbName;/* Path of the config database. NULL if not open */
@@ -194,11 +194,11 @@
194194
char *urlFossil; /* The fossil query parameter on ssh: */
195195
unsigned urlFlags; /* Boolean flags controlling URL processing */
196196
int useProxy; /* Used to remember that a proxy is in use */
197197
char *proxyUrlPath;
198198
int proxyOrigPort; /* Tunneled port number for https through proxy */
199
- const char *zLogin; /* Login name. "" if not logged in. */
199
+ const char *zLogin; /* Login name. NULL or "" if not logged in. */
200200
const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
201201
** SSL client identity */
202202
int useLocalauth; /* No login required if from 127.0.0.1 */
203203
int noPswd; /* Logged in without password (on 127.0.0.1) */
204204
int userUid; /* Integer user id */
@@ -1459,11 +1459,11 @@
14591459
zAltRepo[jj] = 0;
14601460
zAltRepo += jj+1;
14611461
}else{
14621462
zUser = "nobody";
14631463
}
1464
- if( g.zLogin==0 ) zUser = "nobody";
1464
+ if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody";
14651465
if( zAltRepo[0]!='/' ){
14661466
zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo);
14671467
file_simplify_name(zAltRepo, -1, 0);
14681468
}
14691469
db_close(1);
14701470
--- src/main.c
+++ src/main.c
@@ -121,11 +121,11 @@
121
122 struct Global {
123 int argc; char **argv; /* Command-line arguments to the program */
124 char *nameOfExe; /* Full path of executable. */
125 const char *zErrlog; /* Log errors to this file, if not NULL */
126 int isConst; /* True if the output is unchanging */
127 const char *zVfsName; /* The VFS to use for database connections */
128 sqlite3 *db; /* The connection to the databases */
129 sqlite3 *dbConfig; /* Separate connection for global_config table */
130 int useAttach; /* True if global_config is attached to repository */
131 const char *zConfigDbName;/* Path of the config database. NULL if not open */
@@ -194,11 +194,11 @@
194 char *urlFossil; /* The fossil query parameter on ssh: */
195 unsigned urlFlags; /* Boolean flags controlling URL processing */
196 int useProxy; /* Used to remember that a proxy is in use */
197 char *proxyUrlPath;
198 int proxyOrigPort; /* Tunneled port number for https through proxy */
199 const char *zLogin; /* Login name. "" if not logged in. */
200 const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
201 ** SSL client identity */
202 int useLocalauth; /* No login required if from 127.0.0.1 */
203 int noPswd; /* Logged in without password (on 127.0.0.1) */
204 int userUid; /* Integer user id */
@@ -1459,11 +1459,11 @@
1459 zAltRepo[jj] = 0;
1460 zAltRepo += jj+1;
1461 }else{
1462 zUser = "nobody";
1463 }
1464 if( g.zLogin==0 ) zUser = "nobody";
1465 if( zAltRepo[0]!='/' ){
1466 zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo);
1467 file_simplify_name(zAltRepo, -1, 0);
1468 }
1469 db_close(1);
1470
--- src/main.c
+++ src/main.c
@@ -121,11 +121,11 @@
121
122 struct Global {
123 int argc; char **argv; /* Command-line arguments to the program */
124 char *nameOfExe; /* Full path of executable. */
125 const char *zErrlog; /* Log errors to this file, if not NULL */
126 int isConst; /* True if the output is unchanging & cacheable */
127 const char *zVfsName; /* The VFS to use for database connections */
128 sqlite3 *db; /* The connection to the databases */
129 sqlite3 *dbConfig; /* Separate connection for global_config table */
130 int useAttach; /* True if global_config is attached to repository */
131 const char *zConfigDbName;/* Path of the config database. NULL if not open */
@@ -194,11 +194,11 @@
194 char *urlFossil; /* The fossil query parameter on ssh: */
195 unsigned urlFlags; /* Boolean flags controlling URL processing */
196 int useProxy; /* Used to remember that a proxy is in use */
197 char *proxyUrlPath;
198 int proxyOrigPort; /* Tunneled port number for https through proxy */
199 const char *zLogin; /* Login name. NULL or "" if not logged in. */
200 const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
201 ** SSL client identity */
202 int useLocalauth; /* No login required if from 127.0.0.1 */
203 int noPswd; /* Logged in without password (on 127.0.0.1) */
204 int userUid; /* Integer user id */
@@ -1459,11 +1459,11 @@
1459 zAltRepo[jj] = 0;
1460 zAltRepo += jj+1;
1461 }else{
1462 zUser = "nobody";
1463 }
1464 if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody";
1465 if( zAltRepo[0]!='/' ){
1466 zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo);
1467 file_simplify_name(zAltRepo, -1, 0);
1468 }
1469 db_close(1);
1470
+11 -1
--- src/main.mk
+++ src/main.mk
@@ -66,10 +66,11 @@
6666
$(SRCDIR)/json_tag.c \
6767
$(SRCDIR)/json_timeline.c \
6868
$(SRCDIR)/json_user.c \
6969
$(SRCDIR)/json_wiki.c \
7070
$(SRCDIR)/leaf.c \
71
+ $(SRCDIR)/loadctrl.c \
7172
$(SRCDIR)/login.c \
7273
$(SRCDIR)/lookslike.c \
7374
$(SRCDIR)/main.c \
7475
$(SRCDIR)/manifest.c \
7576
$(SRCDIR)/markdown.c \
@@ -176,10 +177,11 @@
176177
$(OBJDIR)/json_tag_.c \
177178
$(OBJDIR)/json_timeline_.c \
178179
$(OBJDIR)/json_user_.c \
179180
$(OBJDIR)/json_wiki_.c \
180181
$(OBJDIR)/leaf_.c \
182
+ $(OBJDIR)/loadctrl_.c \
181183
$(OBJDIR)/login_.c \
182184
$(OBJDIR)/lookslike_.c \
183185
$(OBJDIR)/main_.c \
184186
$(OBJDIR)/manifest_.c \
185187
$(OBJDIR)/markdown_.c \
@@ -286,10 +288,11 @@
286288
$(OBJDIR)/json_tag.o \
287289
$(OBJDIR)/json_timeline.o \
288290
$(OBJDIR)/json_user.o \
289291
$(OBJDIR)/json_wiki.o \
290292
$(OBJDIR)/leaf.o \
293
+ $(OBJDIR)/loadctrl.o \
291294
$(OBJDIR)/login.o \
292295
$(OBJDIR)/lookslike.o \
293296
$(OBJDIR)/main.o \
294297
$(OBJDIR)/manifest.o \
295298
$(OBJDIR)/markdown.o \
@@ -422,11 +425,11 @@
422425
423426
424427
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
425428
$(OBJDIR)/mkindex $(TRANS_SRC) >$@
426429
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
427
- $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(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)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
430
+ $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(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)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
428431
touch $(OBJDIR)/headers
429432
$(OBJDIR)/headers: Makefile
430433
$(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 : $(SRCDIR)/json_detail.h
431434
Makefile:
432435
$(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -805,10 +808,17 @@
805808
806809
$(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
807810
$(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
808811
809812
$(OBJDIR)/leaf.h: $(OBJDIR)/headers
813
+$(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate
814
+ $(OBJDIR)/translate $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c
815
+
816
+$(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h
817
+ $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c
818
+
819
+$(OBJDIR)/loadctrl.h: $(OBJDIR)/headers
810820
$(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate
811821
$(OBJDIR)/translate $(SRCDIR)/login.c >$(OBJDIR)/login_.c
812822
813823
$(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h
814824
$(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c
815825
--- src/main.mk
+++ src/main.mk
@@ -66,10 +66,11 @@
66 $(SRCDIR)/json_tag.c \
67 $(SRCDIR)/json_timeline.c \
68 $(SRCDIR)/json_user.c \
69 $(SRCDIR)/json_wiki.c \
70 $(SRCDIR)/leaf.c \
 
71 $(SRCDIR)/login.c \
72 $(SRCDIR)/lookslike.c \
73 $(SRCDIR)/main.c \
74 $(SRCDIR)/manifest.c \
75 $(SRCDIR)/markdown.c \
@@ -176,10 +177,11 @@
176 $(OBJDIR)/json_tag_.c \
177 $(OBJDIR)/json_timeline_.c \
178 $(OBJDIR)/json_user_.c \
179 $(OBJDIR)/json_wiki_.c \
180 $(OBJDIR)/leaf_.c \
 
181 $(OBJDIR)/login_.c \
182 $(OBJDIR)/lookslike_.c \
183 $(OBJDIR)/main_.c \
184 $(OBJDIR)/manifest_.c \
185 $(OBJDIR)/markdown_.c \
@@ -286,10 +288,11 @@
286 $(OBJDIR)/json_tag.o \
287 $(OBJDIR)/json_timeline.o \
288 $(OBJDIR)/json_user.o \
289 $(OBJDIR)/json_wiki.o \
290 $(OBJDIR)/leaf.o \
 
291 $(OBJDIR)/login.o \
292 $(OBJDIR)/lookslike.o \
293 $(OBJDIR)/main.o \
294 $(OBJDIR)/manifest.o \
295 $(OBJDIR)/markdown.o \
@@ -422,11 +425,11 @@
422
423
424 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
425 $(OBJDIR)/mkindex $(TRANS_SRC) >$@
426 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
427 $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(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)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
428 touch $(OBJDIR)/headers
429 $(OBJDIR)/headers: Makefile
430 $(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 : $(SRCDIR)/json_detail.h
431 Makefile:
432 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -805,10 +808,17 @@
805
806 $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
807 $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
808
809 $(OBJDIR)/leaf.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
810 $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate
811 $(OBJDIR)/translate $(SRCDIR)/login.c >$(OBJDIR)/login_.c
812
813 $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h
814 $(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c
815
--- src/main.mk
+++ src/main.mk
@@ -66,10 +66,11 @@
66 $(SRCDIR)/json_tag.c \
67 $(SRCDIR)/json_timeline.c \
68 $(SRCDIR)/json_user.c \
69 $(SRCDIR)/json_wiki.c \
70 $(SRCDIR)/leaf.c \
71 $(SRCDIR)/loadctrl.c \
72 $(SRCDIR)/login.c \
73 $(SRCDIR)/lookslike.c \
74 $(SRCDIR)/main.c \
75 $(SRCDIR)/manifest.c \
76 $(SRCDIR)/markdown.c \
@@ -176,10 +177,11 @@
177 $(OBJDIR)/json_tag_.c \
178 $(OBJDIR)/json_timeline_.c \
179 $(OBJDIR)/json_user_.c \
180 $(OBJDIR)/json_wiki_.c \
181 $(OBJDIR)/leaf_.c \
182 $(OBJDIR)/loadctrl_.c \
183 $(OBJDIR)/login_.c \
184 $(OBJDIR)/lookslike_.c \
185 $(OBJDIR)/main_.c \
186 $(OBJDIR)/manifest_.c \
187 $(OBJDIR)/markdown_.c \
@@ -286,10 +288,11 @@
288 $(OBJDIR)/json_tag.o \
289 $(OBJDIR)/json_timeline.o \
290 $(OBJDIR)/json_user.o \
291 $(OBJDIR)/json_wiki.o \
292 $(OBJDIR)/leaf.o \
293 $(OBJDIR)/loadctrl.o \
294 $(OBJDIR)/login.o \
295 $(OBJDIR)/lookslike.o \
296 $(OBJDIR)/main.o \
297 $(OBJDIR)/manifest.o \
298 $(OBJDIR)/markdown.o \
@@ -422,11 +425,11 @@
425
426
427 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
428 $(OBJDIR)/mkindex $(TRANS_SRC) >$@
429 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
430 $(OBJDIR)/makeheaders $(OBJDIR)/add_.c:$(OBJDIR)/add.h $(OBJDIR)/allrepo_.c:$(OBJDIR)/allrepo.h $(OBJDIR)/attach_.c:$(OBJDIR)/attach.h $(OBJDIR)/bag_.c:$(OBJDIR)/bag.h $(OBJDIR)/bisect_.c:$(OBJDIR)/bisect.h $(OBJDIR)/blob_.c:$(OBJDIR)/blob.h $(OBJDIR)/branch_.c:$(OBJDIR)/branch.h $(OBJDIR)/browse_.c:$(OBJDIR)/browse.h $(OBJDIR)/captcha_.c:$(OBJDIR)/captcha.h $(OBJDIR)/cgi_.c:$(OBJDIR)/cgi.h $(OBJDIR)/checkin_.c:$(OBJDIR)/checkin.h $(OBJDIR)/checkout_.c:$(OBJDIR)/checkout.h $(OBJDIR)/clearsign_.c:$(OBJDIR)/clearsign.h $(OBJDIR)/clone_.c:$(OBJDIR)/clone.h $(OBJDIR)/comformat_.c:$(OBJDIR)/comformat.h $(OBJDIR)/configure_.c:$(OBJDIR)/configure.h $(OBJDIR)/content_.c:$(OBJDIR)/content.h $(OBJDIR)/db_.c:$(OBJDIR)/db.h $(OBJDIR)/delta_.c:$(OBJDIR)/delta.h $(OBJDIR)/deltacmd_.c:$(OBJDIR)/deltacmd.h $(OBJDIR)/descendants_.c:$(OBJDIR)/descendants.h $(OBJDIR)/diff_.c:$(OBJDIR)/diff.h $(OBJDIR)/diffcmd_.c:$(OBJDIR)/diffcmd.h $(OBJDIR)/doc_.c:$(OBJDIR)/doc.h $(OBJDIR)/encode_.c:$(OBJDIR)/encode.h $(OBJDIR)/event_.c:$(OBJDIR)/event.h $(OBJDIR)/export_.c:$(OBJDIR)/export.h $(OBJDIR)/file_.c:$(OBJDIR)/file.h $(OBJDIR)/finfo_.c:$(OBJDIR)/finfo.h $(OBJDIR)/glob_.c:$(OBJDIR)/glob.h $(OBJDIR)/graph_.c:$(OBJDIR)/graph.h $(OBJDIR)/gzip_.c:$(OBJDIR)/gzip.h $(OBJDIR)/http_.c:$(OBJDIR)/http.h $(OBJDIR)/http_socket_.c:$(OBJDIR)/http_socket.h $(OBJDIR)/http_ssl_.c:$(OBJDIR)/http_ssl.h $(OBJDIR)/http_transport_.c:$(OBJDIR)/http_transport.h $(OBJDIR)/import_.c:$(OBJDIR)/import.h $(OBJDIR)/info_.c:$(OBJDIR)/info.h $(OBJDIR)/json_.c:$(OBJDIR)/json.h $(OBJDIR)/json_artifact_.c:$(OBJDIR)/json_artifact.h $(OBJDIR)/json_branch_.c:$(OBJDIR)/json_branch.h $(OBJDIR)/json_config_.c:$(OBJDIR)/json_config.h $(OBJDIR)/json_diff_.c:$(OBJDIR)/json_diff.h $(OBJDIR)/json_dir_.c:$(OBJDIR)/json_dir.h $(OBJDIR)/json_finfo_.c:$(OBJDIR)/json_finfo.h $(OBJDIR)/json_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.h $(OBJDIR)/json_status_.c:$(OBJDIR)/json_status.h $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h $(OBJDIR)/login_.c:$(OBJDIR)/login.h $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h $(OBJDIR)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h $(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)/rebuild_.c:$(OBJDIR)/rebuild.h $(OBJDIR)/regexp_.c:$(OBJDIR)/regexp.h $(OBJDIR)/report_.c:$(OBJDIR)/report.h $(OBJDIR)/rss_.c:$(OBJDIR)/rss.h $(OBJDIR)/schema_.c:$(OBJDIR)/schema.h $(OBJDIR)/search_.c:$(OBJDIR)/search.h $(OBJDIR)/setup_.c:$(OBJDIR)/setup.h $(OBJDIR)/sha1_.c:$(OBJDIR)/sha1.h $(OBJDIR)/shun_.c:$(OBJDIR)/shun.h $(OBJDIR)/skins_.c:$(OBJDIR)/skins.h $(OBJDIR)/sqlcmd_.c:$(OBJDIR)/sqlcmd.h $(OBJDIR)/stash_.c:$(OBJDIR)/stash.h $(OBJDIR)/stat_.c:$(OBJDIR)/stat.h $(OBJDIR)/style_.c:$(OBJDIR)/style.h $(OBJDIR)/sync_.c:$(OBJDIR)/sync.h $(OBJDIR)/tag_.c:$(OBJDIR)/tag.h $(OBJDIR)/tar_.c:$(OBJDIR)/tar.h $(OBJDIR)/th_main_.c:$(OBJDIR)/th_main.h $(OBJDIR)/timeline_.c:$(OBJDIR)/timeline.h $(OBJDIR)/tkt_.c:$(OBJDIR)/tkt.h $(OBJDIR)/tktsetup_.c:$(OBJDIR)/tktsetup.h $(OBJDIR)/undo_.c:$(OBJDIR)/undo.h $(OBJDIR)/unicode_.c:$(OBJDIR)/unicode.h $(OBJDIR)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.h $(OBJDIR)/utf8_.c:$(OBJDIR)/utf8.h $(OBJDIR)/util_.c:$(OBJDIR)/util.h $(OBJDIR)/verify_.c:$(OBJDIR)/verify.h $(OBJDIR)/vfile_.c:$(OBJDIR)/vfile.h $(OBJDIR)/wiki_.c:$(OBJDIR)/wiki.h $(OBJDIR)/wikiformat_.c:$(OBJDIR)/wikiformat.h $(OBJDIR)/winfile_.c:$(OBJDIR)/winfile.h $(OBJDIR)/winhttp_.c:$(OBJDIR)/winhttp.h $(OBJDIR)/wysiwyg_.c:$(OBJDIR)/wysiwyg.h $(OBJDIR)/xfer_.c:$(OBJDIR)/xfer.h $(OBJDIR)/xfersetup_.c:$(OBJDIR)/xfersetup.h $(OBJDIR)/zip_.c:$(OBJDIR)/zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h $(OBJDIR)/VERSION.h
431 touch $(OBJDIR)/headers
432 $(OBJDIR)/headers: Makefile
433 $(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 : $(SRCDIR)/json_detail.h
434 Makefile:
435 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -805,10 +808,17 @@
808
809 $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
810 $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
811
812 $(OBJDIR)/leaf.h: $(OBJDIR)/headers
813 $(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate
814 $(OBJDIR)/translate $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c
815
816 $(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h
817 $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c
818
819 $(OBJDIR)/loadctrl.h: $(OBJDIR)/headers
820 $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate
821 $(OBJDIR)/translate $(SRCDIR)/login.c >$(OBJDIR)/login_.c
822
823 $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h
824 $(XTCC) -o $(OBJDIR)/login.o -c $(OBJDIR)/login_.c
825
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -69,10 +69,11 @@
6969
json_tag
7070
json_timeline
7171
json_user
7272
json_wiki
7373
leaf
74
+ loadctrl
7475
login
7576
lookslike
7677
main
7778
manifest
7879
markdown
7980
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -69,10 +69,11 @@
69 json_tag
70 json_timeline
71 json_user
72 json_wiki
73 leaf
 
74 login
75 lookslike
76 main
77 manifest
78 markdown
79
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -69,10 +69,11 @@
69 json_tag
70 json_timeline
71 json_user
72 json_wiki
73 leaf
74 loadctrl
75 login
76 lookslike
77 main
78 manifest
79 markdown
80
+13 -1
--- src/setup.c
+++ src/setup.c
@@ -962,10 +962,21 @@
962962
@ <p>Fossil tries to spend less than this many seconds gathering
963963
@ the out-bound data of sync, clone, and pull packets.
964964
@ If the client request takes longer, a partial reply is given similar
965965
@ to the download packet limit. 30s is a reasonable default.</p>
966966
967
+ @ <hr />
968
+ entry_attribute("Server Load Average Limit", 11, "max-loadavg", "mxldavg",
969
+ "0.0", 0);
970
+ @ <p>Some expensive operations (such as computing tarballs, zip archives,
971
+ @ or annotation/blame pages) are prohibited if the load average on the host
972
+ @ computer is too large. Set the threshold for disallowing expensive
973
+ @ computations here. Set this to 0.0 to disable the load average limit.
974
+ @ This limit is only enforced on Unix servers. On Linux systems,
975
+ @ access to the /proc virtual filesystem is required, which means this limit
976
+ @ might not work inside a chroot() jail.</p>
977
+
967978
@ <hr />
968979
onoff_attribute(
969980
"Enable hyperlinks for \"nobody\" based on User-Agent and Javascript",
970981
"auto-hyperlink", "autohyperlink", 1, 0);
971982
@ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users
@@ -973,11 +984,12 @@
973984
@ HTTP header indicates that the request is coming from an actual human
974985
@ being and not a a robot or spider and (2) the user agent is able to
975986
@ run Javascript in order to set the href= attribute of hyperlinks. Bots
976987
@ and spiders can forge a User-Agent string that makes them seem to be a
977988
@ normal browser and they can run javascript just like browsers. But most
978
- @ bots do not go to that much trouble so this is normally an effective defense.</p>
989
+ @ bots do not go to that much trouble so this is normally an effective
990
+ @ defense.</p>
979991
@
980992
@ <p>You do not normally want a bot to walk your entire repository because
981993
@ if it does, your server will end up computing diffs and annotations for
982994
@ every historical version of every file and creating ZIPs and tarballs of
983995
@ every historical check-in, which can use a lot of CPU and bandwidth
984996
--- src/setup.c
+++ src/setup.c
@@ -962,10 +962,21 @@
962 @ <p>Fossil tries to spend less than this many seconds gathering
963 @ the out-bound data of sync, clone, and pull packets.
964 @ If the client request takes longer, a partial reply is given similar
965 @ to the download packet limit. 30s is a reasonable default.</p>
966
 
 
 
 
 
 
 
 
 
 
 
967 @ <hr />
968 onoff_attribute(
969 "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript",
970 "auto-hyperlink", "autohyperlink", 1, 0);
971 @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users
@@ -973,11 +984,12 @@
973 @ HTTP header indicates that the request is coming from an actual human
974 @ being and not a a robot or spider and (2) the user agent is able to
975 @ run Javascript in order to set the href= attribute of hyperlinks. Bots
976 @ and spiders can forge a User-Agent string that makes them seem to be a
977 @ normal browser and they can run javascript just like browsers. But most
978 @ bots do not go to that much trouble so this is normally an effective defense.</p>
 
979 @
980 @ <p>You do not normally want a bot to walk your entire repository because
981 @ if it does, your server will end up computing diffs and annotations for
982 @ every historical version of every file and creating ZIPs and tarballs of
983 @ every historical check-in, which can use a lot of CPU and bandwidth
984
--- src/setup.c
+++ src/setup.c
@@ -962,10 +962,21 @@
962 @ <p>Fossil tries to spend less than this many seconds gathering
963 @ the out-bound data of sync, clone, and pull packets.
964 @ If the client request takes longer, a partial reply is given similar
965 @ to the download packet limit. 30s is a reasonable default.</p>
966
967 @ <hr />
968 entry_attribute("Server Load Average Limit", 11, "max-loadavg", "mxldavg",
969 "0.0", 0);
970 @ <p>Some expensive operations (such as computing tarballs, zip archives,
971 @ or annotation/blame pages) are prohibited if the load average on the host
972 @ computer is too large. Set the threshold for disallowing expensive
973 @ computations here. Set this to 0.0 to disable the load average limit.
974 @ This limit is only enforced on Unix servers. On Linux systems,
975 @ access to the /proc virtual filesystem is required, which means this limit
976 @ might not work inside a chroot() jail.</p>
977
978 @ <hr />
979 onoff_attribute(
980 "Enable hyperlinks for \"nobody\" based on User-Agent and Javascript",
981 "auto-hyperlink", "autohyperlink", 1, 0);
982 @ <p>Enable hyperlinks (the equivalent of the "h" permission) for all users
@@ -973,11 +984,12 @@
984 @ HTTP header indicates that the request is coming from an actual human
985 @ being and not a a robot or spider and (2) the user agent is able to
986 @ run Javascript in order to set the href= attribute of hyperlinks. Bots
987 @ and spiders can forge a User-Agent string that makes them seem to be a
988 @ normal browser and they can run javascript just like browsers. But most
989 @ bots do not go to that much trouble so this is normally an effective
990 @ defense.</p>
991 @
992 @ <p>You do not normally want a bot to walk your entire repository because
993 @ if it does, your server will end up computing diffs and annotations for
994 @ every historical version of every file and creating ZIPs and tarballs of
995 @ every historical check-in, which can use a lot of CPU and bandwidth
996
+6 -3
--- src/shell.c
+++ src/shell.c
@@ -1182,10 +1182,11 @@
11821182
** itself by 2 spaces.
11831183
**
11841184
** * For each "Goto", if the jump destination is earlier in the program
11851185
** and ends on one of:
11861186
** Yield SeekGt SeekLt RowSetRead Rewind
1187
+** or if the P1 parameter is one instead of zero,
11871188
** then indent all opcodes between the earlier instruction
11881189
** and "Goto" by 2 spaces.
11891190
*/
11901191
static void explain_data_prepare(struct callback_data *p, sqlite3_stmt *pSql){
11911192
const char *zSql; /* The text of the SQL statement */
@@ -1229,11 +1230,13 @@
12291230
p->nIndent = iOp+1;
12301231
12311232
if( str_in_array(zOp, azNext) ){
12321233
for(i=p2op; i<iOp; i++) p->aiIndent[i] += 2;
12331234
}
1234
- if( str_in_array(zOp, azGoto) && p2op<p->nIndent && abYield[p2op] ){
1235
+ if( str_in_array(zOp, azGoto) && p2op<p->nIndent
1236
+ && (abYield[p2op] || sqlite3_column_int(pSql, 2))
1237
+ ){
12351238
for(i=p2op+1; i<iOp; i++) p->aiIndent[i] += 2;
12361239
}
12371240
}
12381241
12391242
p->iIndent = 0;
@@ -3815,12 +3818,12 @@
38153818
"Enter \".help\" for usage hints.\n",
38163819
sqlite3_libversion(), sqlite3_sourceid()
38173820
);
38183821
if( warnInmemoryDb ){
38193822
printf("Connected to a ");
3820
- printBold("transient in-memory database.");
3821
- printf("\nUse \".open FILENAME\" to reopen on a "
3823
+ printBold("transient in-memory database");
3824
+ printf(".\nUse \".open FILENAME\" to reopen on a "
38223825
"persistent database.\n");
38233826
}
38243827
zHome = find_home_dir();
38253828
if( zHome ){
38263829
nHistory = strlen30(zHome) + 20;
38273830
--- src/shell.c
+++ src/shell.c
@@ -1182,10 +1182,11 @@
1182 ** itself by 2 spaces.
1183 **
1184 ** * For each "Goto", if the jump destination is earlier in the program
1185 ** and ends on one of:
1186 ** Yield SeekGt SeekLt RowSetRead Rewind
 
1187 ** then indent all opcodes between the earlier instruction
1188 ** and "Goto" by 2 spaces.
1189 */
1190 static void explain_data_prepare(struct callback_data *p, sqlite3_stmt *pSql){
1191 const char *zSql; /* The text of the SQL statement */
@@ -1229,11 +1230,13 @@
1229 p->nIndent = iOp+1;
1230
1231 if( str_in_array(zOp, azNext) ){
1232 for(i=p2op; i<iOp; i++) p->aiIndent[i] += 2;
1233 }
1234 if( str_in_array(zOp, azGoto) && p2op<p->nIndent && abYield[p2op] ){
 
 
1235 for(i=p2op+1; i<iOp; i++) p->aiIndent[i] += 2;
1236 }
1237 }
1238
1239 p->iIndent = 0;
@@ -3815,12 +3818,12 @@
3815 "Enter \".help\" for usage hints.\n",
3816 sqlite3_libversion(), sqlite3_sourceid()
3817 );
3818 if( warnInmemoryDb ){
3819 printf("Connected to a ");
3820 printBold("transient in-memory database.");
3821 printf("\nUse \".open FILENAME\" to reopen on a "
3822 "persistent database.\n");
3823 }
3824 zHome = find_home_dir();
3825 if( zHome ){
3826 nHistory = strlen30(zHome) + 20;
3827
--- src/shell.c
+++ src/shell.c
@@ -1182,10 +1182,11 @@
1182 ** itself by 2 spaces.
1183 **
1184 ** * For each "Goto", if the jump destination is earlier in the program
1185 ** and ends on one of:
1186 ** Yield SeekGt SeekLt RowSetRead Rewind
1187 ** or if the P1 parameter is one instead of zero,
1188 ** then indent all opcodes between the earlier instruction
1189 ** and "Goto" by 2 spaces.
1190 */
1191 static void explain_data_prepare(struct callback_data *p, sqlite3_stmt *pSql){
1192 const char *zSql; /* The text of the SQL statement */
@@ -1229,11 +1230,13 @@
1230 p->nIndent = iOp+1;
1231
1232 if( str_in_array(zOp, azNext) ){
1233 for(i=p2op; i<iOp; i++) p->aiIndent[i] += 2;
1234 }
1235 if( str_in_array(zOp, azGoto) && p2op<p->nIndent
1236 && (abYield[p2op] || sqlite3_column_int(pSql, 2))
1237 ){
1238 for(i=p2op+1; i<iOp; i++) p->aiIndent[i] += 2;
1239 }
1240 }
1241
1242 p->iIndent = 0;
@@ -3815,12 +3818,12 @@
3818 "Enter \".help\" for usage hints.\n",
3819 sqlite3_libversion(), sqlite3_sourceid()
3820 );
3821 if( warnInmemoryDb ){
3822 printf("Connected to a ");
3823 printBold("transient in-memory database");
3824 printf(".\nUse \".open FILENAME\" to reopen on a "
3825 "persistent database.\n");
3826 }
3827 zHome = find_home_dir();
3828 if( zHome ){
3829 nHistory = strlen30(zHome) + 20;
3830
+81 -24
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -222,11 +222,11 @@
222222
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
223223
** [sqlite_version()] and [sqlite_source_id()].
224224
*/
225225
#define SQLITE_VERSION "3.8.4"
226226
#define SQLITE_VERSION_NUMBER 3008004
227
-#define SQLITE_SOURCE_ID "2014-03-05 19:04:46 0723effc9ccae7c660fb847b36ce9324e0cb5042"
227
+#define SQLITE_SOURCE_ID "2014-03-10 12:20:37 530a1ee7dc2435f80960ce4710a3c2d2bfaaccc5"
228228
229229
/*
230230
** CAPI3REF: Run-Time Library Version Numbers
231231
** KEYWORDS: sqlite3_version, sqlite3_sourceid
232232
**
@@ -36484,12 +36484,29 @@
3648436484
** Interfaces for opening a shared library, finding entry points
3648536485
** within the shared library, and closing the shared library.
3648636486
*/
3648736487
static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
3648836488
HANDLE h;
36489
+#if defined(__CYGWIN__)
36490
+ int nFull = pVfs->mxPathname+1;
36491
+ char *zFull = sqlite3MallocZero( nFull );
36492
+ void *zConverted = 0;
36493
+ if( zFull==0 ){
36494
+ OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0));
36495
+ return 0;
36496
+ }
36497
+ if( winFullPathname(pVfs, zFilename, nFull, zFull)!=SQLITE_OK ){
36498
+ sqlite3_free(zFull);
36499
+ OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0));
36500
+ return 0;
36501
+ }
36502
+ zConverted = winConvertFromUtf8Filename(zFull);
36503
+ sqlite3_free(zFull);
36504
+#else
3648936505
void *zConverted = winConvertFromUtf8Filename(zFilename);
3649036506
UNUSED_PARAMETER(pVfs);
36507
+#endif
3649136508
if( zConverted==0 ){
3649236509
OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0));
3649336510
return 0;
3649436511
}
3649536512
if( osIsNT() ){
@@ -44405,19 +44422,21 @@
4440544422
*/
4440644423
rc = sqlite3OsCheckReservedLock(pPager->fd, &locked);
4440744424
if( rc==SQLITE_OK && !locked ){
4440844425
Pgno nPage; /* Number of pages in database file */
4440944426
44410
- /* Check the size of the database file. If it consists of 0 pages,
44411
- ** then delete the journal file. See the header comment above for
44412
- ** the reasoning here. Delete the obsolete journal file under
44413
- ** a RESERVED lock to avoid race conditions and to avoid violating
44414
- ** [H33020].
44415
- */
4441644427
rc = pagerPagecount(pPager, &nPage);
4441744428
if( rc==SQLITE_OK ){
44418
- if( nPage==0 ){
44429
+ /* If the database is zero pages in size, that means that either (1) the
44430
+ ** journal is a remnant from a prior database with the same name where
44431
+ ** the database file but not the journal was deleted, or (2) the initial
44432
+ ** transaction that populates a new database is being rolled back.
44433
+ ** In either case, the journal file can be deleted. However, take care
44434
+ ** not to delete the journal file if it is already open due to
44435
+ ** journal_mode=PERSIST.
44436
+ */
44437
+ if( nPage==0 && !jrnlOpen ){
4441944438
sqlite3BeginBenignMalloc();
4442044439
if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){
4442144440
sqlite3OsDelete(pVfs, pPager->zJournal, 0);
4442244441
if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
4442344442
}
@@ -55371,11 +55390,11 @@
5537155390
assert( pIdxKey->default_rc==1
5537255391
|| pIdxKey->default_rc==0
5537355392
|| pIdxKey->default_rc==-1
5537455393
);
5537555394
}else{
55376
- xRecordCompare = 0; /* Not actually used. Avoids a compiler warning. */
55395
+ xRecordCompare = 0; /* All keys are integers */
5537755396
}
5537855397
5537955398
rc = moveToRoot(pCur);
5538055399
if( rc ){
5538155400
return rc;
@@ -62561,10 +62580,14 @@
6256162580
** sqlite3MemRelease() were called from here. With -O2, this jumps
6256262581
** to 6.6 percent. The test case is inserting 1000 rows into a table
6256362582
** with no indexes using a single prepared INSERT statement, bind()
6256462583
** and reset(). Inserts are grouped into a transaction.
6256562584
*/
62585
+ testcase( p->flags & MEM_Agg );
62586
+ testcase( p->flags & MEM_Dyn );
62587
+ testcase( p->flags & MEM_Frame );
62588
+ testcase( p->flags & MEM_RowSet );
6256662589
if( p->flags&(MEM_Agg|MEM_Dyn|MEM_Frame|MEM_RowSet) ){
6256762590
sqlite3VdbeMemRelease(p);
6256862591
}else if( p->zMalloc ){
6256962592
sqlite3DbFree(db, p->zMalloc);
6257062593
p->zMalloc = 0;
@@ -64289,31 +64312,36 @@
6428964312
break;
6429064313
}
6429164314
case 1: { /* 1-byte signed integer */
6429264315
pMem->u.i = ONE_BYTE_INT(buf);
6429364316
pMem->flags = MEM_Int;
64317
+ testcase( pMem->u.i<0 );
6429464318
return 1;
6429564319
}
6429664320
case 2: { /* 2-byte signed integer */
6429764321
pMem->u.i = TWO_BYTE_INT(buf);
6429864322
pMem->flags = MEM_Int;
64323
+ testcase( pMem->u.i<0 );
6429964324
return 2;
6430064325
}
6430164326
case 3: { /* 3-byte signed integer */
6430264327
pMem->u.i = THREE_BYTE_INT(buf);
6430364328
pMem->flags = MEM_Int;
64329
+ testcase( pMem->u.i<0 );
6430464330
return 3;
6430564331
}
6430664332
case 4: { /* 4-byte signed integer */
6430764333
y = FOUR_BYTE_UINT(buf);
6430864334
pMem->u.i = (i64)*(int*)&y;
6430964335
pMem->flags = MEM_Int;
64336
+ testcase( pMem->u.i<0 );
6431064337
return 4;
6431164338
}
6431264339
case 5: { /* 6-byte signed integer */
6431364340
pMem->u.i = FOUR_BYTE_UINT(buf+2) + (((i64)1)<<32)*TWO_BYTE_INT(buf);
6431464341
pMem->flags = MEM_Int;
64342
+ testcase( pMem->u.i<0 );
6431564343
return 6;
6431664344
}
6431764345
case 6: /* 8-byte signed integer */
6431864346
case 7: { /* IEEE floating point */
6431964347
#if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT)
@@ -64332,10 +64360,11 @@
6433264360
y = FOUR_BYTE_UINT(buf+4);
6433364361
x = (x<<32) | y;
6433464362
if( serial_type==6 ){
6433564363
pMem->u.i = *(i64*)&x;
6433664364
pMem->flags = MEM_Int;
64365
+ testcase( pMem->u.i<0 );
6433764366
}else{
6433864367
assert( sizeof(x)==8 && sizeof(pMem->r)==8 );
6433964368
swapMixedEndianFloat(x);
6434064369
memcpy(&pMem->r, &x, sizeof(x));
6434164370
pMem->flags = sqlite3IsNaN(pMem->r) ? MEM_Null : MEM_Real;
@@ -64677,24 +64706,30 @@
6467764706
u32 y;
6467864707
assert( CORRUPT_DB || (serial_type>=1 && serial_type<=9 && serial_type!=7) );
6467964708
switch( serial_type ){
6468064709
case 0:
6468164710
case 1:
64711
+ testcase( aKey[0]&0x80 );
6468264712
return ONE_BYTE_INT(aKey);
6468364713
case 2:
64714
+ testcase( aKey[0]&0x80 );
6468464715
return TWO_BYTE_INT(aKey);
6468564716
case 3:
64717
+ testcase( aKey[0]&0x80 );
6468664718
return THREE_BYTE_INT(aKey);
6468764719
case 4: {
64720
+ testcase( aKey[0]&0x80 );
6468864721
y = FOUR_BYTE_UINT(aKey);
6468964722
return (i64)*(int*)&y;
6469064723
}
6469164724
case 5: {
64725
+ testcase( aKey[0]&0x80 );
6469264726
return FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey);
6469364727
}
6469464728
case 6: {
6469564729
u64 x = FOUR_BYTE_UINT(aKey);
64730
+ testcase( aKey[0]&0x80 );
6469664731
x = (x<<32) | FOUR_BYTE_UINT(aKey+4);
6469764732
return (i64)*(i64*)&x;
6469864733
}
6469964734
}
6470064735
@@ -64758,10 +64793,11 @@
6475864793
u32 serial_type;
6475964794
6476064795
/* RHS is an integer */
6476164796
if( pRhs->flags & MEM_Int ){
6476264797
serial_type = aKey1[idx1];
64798
+ testcase( serial_type==12 );
6476364799
if( serial_type>=12 ){
6476464800
rc = +1;
6476564801
}else if( serial_type==0 ){
6476664802
rc = -1;
6476764803
}else if( serial_type==7 ){
@@ -64808,16 +64844,19 @@
6480864844
}
6480964845
6481064846
/* RHS is a string */
6481164847
else if( pRhs->flags & MEM_Str ){
6481264848
getVarint32(&aKey1[idx1], serial_type);
64849
+ testcase( serial_type==12 );
6481364850
if( serial_type<12 ){
6481464851
rc = -1;
6481564852
}else if( !(serial_type & 0x01) ){
6481664853
rc = +1;
6481764854
}else{
6481864855
mem1.n = (serial_type - 12) / 2;
64856
+ testcase( (d1+mem1.n)==(unsigned)nKey1 );
64857
+ testcase( (d1+mem1.n+1)==(unsigned)nKey1 );
6481964858
if( (d1+mem1.n) > (unsigned)nKey1 ){
6482064859
rc = 1; /* Corruption */
6482164860
}else if( pKeyInfo->aColl[i] ){
6482264861
mem1.enc = pKeyInfo->enc;
6482364862
mem1.db = pKeyInfo->db;
@@ -64833,14 +64872,17 @@
6483364872
}
6483464873
6483564874
/* RHS is a blob */
6483664875
else if( pRhs->flags & MEM_Blob ){
6483764876
getVarint32(&aKey1[idx1], serial_type);
64877
+ testcase( serial_type==12 );
6483864878
if( serial_type<12 || (serial_type & 0x01) ){
6483964879
rc = -1;
6484064880
}else{
6484164881
int nStr = (serial_type - 12) / 2;
64882
+ testcase( (d1+nStr)==(unsigned)nKey1 );
64883
+ testcase( (d1+nStr+1)==(unsigned)nKey1 );
6484264884
if( (d1+nStr) > (unsigned)nKey1 ){
6484364885
rc = 1; /* Corruption */
6484464886
}else{
6484564887
int nCmp = MIN(nStr, pRhs->n);
6484664888
rc = memcmp(&aKey1[d1], pRhs->z, nCmp);
@@ -64910,33 +64952,39 @@
6491064952
6491164953
assert( bSkip==0 );
6491264954
switch( serial_type ){
6491364955
case 1: { /* 1-byte signed integer */
6491464956
lhs = ONE_BYTE_INT(aKey);
64957
+ testcase( lhs<0 );
6491564958
break;
6491664959
}
6491764960
case 2: { /* 2-byte signed integer */
6491864961
lhs = TWO_BYTE_INT(aKey);
64962
+ testcase( lhs<0 );
6491964963
break;
6492064964
}
6492164965
case 3: { /* 3-byte signed integer */
6492264966
lhs = THREE_BYTE_INT(aKey);
64967
+ testcase( lhs<0 );
6492364968
break;
6492464969
}
6492564970
case 4: { /* 4-byte signed integer */
6492664971
y = FOUR_BYTE_UINT(aKey);
6492764972
lhs = (i64)*(int*)&y;
64973
+ testcase( lhs<0 );
6492864974
break;
6492964975
}
6493064976
case 5: { /* 6-byte signed integer */
6493164977
lhs = FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey);
64978
+ testcase( lhs<0 );
6493264979
break;
6493364980
}
6493464981
case 6: { /* 8-byte signed integer */
6493564982
x = FOUR_BYTE_UINT(aKey);
6493664983
x = (x<<32) | FOUR_BYTE_UINT(aKey+4);
6493764984
lhs = *(i64*)&x;
64985
+ testcase( lhs<0 );
6493864986
break;
6493964987
}
6494064988
case 8:
6494164989
lhs = 0;
6494264990
break;
@@ -65069,13 +65117,15 @@
6506965117
p->r2 = 1;
6507065118
}
6507165119
if( (flags & MEM_Int) ){
6507265120
return vdbeRecordCompareInt;
6507365121
}
65074
- if( (flags & (MEM_Int|MEM_Real|MEM_Null|MEM_Blob))==0
65075
- && p->pKeyInfo->aColl[0]==0
65076
- ){
65122
+ testcase( flags & MEM_Real );
65123
+ testcase( flags & MEM_Null );
65124
+ testcase( flags & MEM_Blob );
65125
+ if( (flags & (MEM_Real|MEM_Null|MEM_Blob))==0 && p->pKeyInfo->aColl[0]==0 ){
65126
+ assert( flags & MEM_Str );
6507765127
return vdbeRecordCompareString;
6507865128
}
6507965129
}
6508065130
6508165131
return sqlite3VdbeRecordCompare;
@@ -66978,11 +67028,11 @@
6697867028
** value of the cell. This macro verifies that shallow copies are
6697967029
** not misused. A shallow copy of a string or blob just copies a
6698067030
** pointer to the string or blob, not the content. If the original
6698167031
** is changed while the copy is still in use, the string or blob might
6698267032
** be changed out from under the copy. This macro verifies that nothing
66983
-** like that every happens.
67033
+** like that ever happens.
6698467034
*/
6698567035
#ifdef SQLITE_DEBUG
6698667036
# define memAboutToChange(P,M) sqlite3VdbeMemAboutToChange(P,M)
6698767037
#else
6698867038
# define memAboutToChange(P,M)
@@ -67710,10 +67760,15 @@
6771067760
**
6771167761
** An unconditional jump to address P2.
6771267762
** The next instruction executed will be
6771367763
** the one at index P2 from the beginning of
6771467764
** the program.
67765
+**
67766
+** The P1 parameter is not actually used by this opcode. However, it
67767
+** is sometimes set to 1 instead of 0 as a hint to the command-line shell
67768
+** that this Goto is the bottom of a loop and that the lines from P2 down
67769
+** to the current line should be indented for EXPLAIN output.
6771567770
*/
6771667771
case OP_Goto: { /* jump */
6771767772
pc = pOp->p2 - 1;
6771867773
6771967774
/* Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev,
@@ -69205,12 +69260,12 @@
6920569260
6920669261
/* Opcode: Once P1 P2 * * *
6920769262
**
6920869263
** Check if OP_Once flag P1 is set. If so, jump to instruction P2. Otherwise,
6920969264
** set the flag and fall through to the next instruction. In other words,
69210
-** this opcode causes all following up codes up through P2 (but not including
69211
-** P2) to run just once and skipped on subsequent times through the loop.
69265
+** this opcode causes all following opcodes up through P2 (but not including
69266
+** P2) to run just once and to be skipped on subsequent times through the loop.
6921269267
*/
6921369268
case OP_Once: { /* jump */
6921469269
assert( pOp->p1<p->nOnceFlag );
6921569270
VdbeBranchTaken(p->aOnceFlag[pOp->p1]!=0, 2);
6921669271
if( p->aOnceFlag[pOp->p1] ){
@@ -83299,11 +83354,14 @@
8329983354
VdbeCoverage(v);
8330083355
callStatGet(v, regStat4, STAT_GET_NEQ, regEq);
8330183356
callStatGet(v, regStat4, STAT_GET_NLT, regLt);
8330283357
callStatGet(v, regStat4, STAT_GET_NDLT, regDLt);
8330383358
sqlite3VdbeAddOp4Int(v, seekOp, iTabCur, addrNext, regSampleRowid, 0);
83304
- VdbeCoverage(v);
83359
+ /* We know that the regSampleRowid row exists because it was read by
83360
+ ** the previous loop. Thus the not-found jump of seekOp will never
83361
+ ** be taken */
83362
+ VdbeCoverageNeverTaken(v);
8330583363
#ifdef SQLITE_ENABLE_STAT3
8330683364
sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur,
8330783365
pIdx->aiColumn[0], regSample);
8330883366
#else
8330983367
for(i=0; i<nCol; i++){
@@ -83313,11 +83371,11 @@
8331383371
sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol+1, regSample);
8331483372
#endif
8331583373
sqlite3VdbeAddOp3(v, OP_MakeRecord, regTabname, 6, regTemp);
8331683374
sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regNewRowid);
8331783375
sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regTemp, regNewRowid);
83318
- sqlite3VdbeAddOp2(v, OP_Goto, 0, addrNext);
83376
+ sqlite3VdbeAddOp2(v, OP_Goto, 1, addrNext); /* P1==1 for end-of-loop */
8331983377
sqlite3VdbeJumpHere(v, addrIsNull);
8332083378
}
8332183379
#endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */
8332283380
8332383381
/* End of analysis */
@@ -91278,11 +91336,11 @@
9127891336
int argc,
9127991337
sqlite3_value **argv
9128091338
){
9128191339
unsigned char *z, *zOut;
9128291340
int i;
91283
- zOut = z = sqlite3_malloc( argc*4 );
91341
+ zOut = z = sqlite3_malloc( argc*4+1 );
9128491342
if( z==0 ){
9128591343
sqlite3_result_error_nomem(context);
9128691344
return;
9128791345
}
9128891346
for(i=0; i<argc; i++){
@@ -93479,17 +93537,17 @@
9347993537
9348093538
/*
9348193539
** Compute the affinity string for table pTab, if it has not already been
9348293540
** computed. As an optimization, omit trailing SQLITE_AFF_NONE affinities.
9348393541
**
93484
-** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values and
93542
+** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values) and
9348593543
** if iReg>0 then code an OP_Affinity opcode that will set the affinities
9348693544
** for register iReg and following. Or if affinities exists and iReg==0,
9348793545
** then just set the P4 operand of the previous opcode (which should be
9348893546
** an OP_MakeRecord) to the affinity string.
9348993547
**
93490
-** A column affinity string has one character column:
93548
+** A column affinity string has one character per column:
9349193549
**
9349293550
** Character Column affinity
9349393551
** ------------------------------
9349493552
** 'a' TEXT
9349593553
** 'b' NONE
@@ -93526,14 +93584,13 @@
9352693584
}
9352793585
}
9352893586
9352993587
/*
9353093588
** Return non-zero if the table pTab in database iDb or any of its indices
93531
-** have been opened at any point in the VDBE program beginning at location
93532
-** iStartAddr throught the end of the program. This is used to see if
93589
+** have been opened at any point in the VDBE program. This is used to see if
9353393590
** a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can
93534
-** run without using temporary table for the results of the SELECT.
93591
+** run without using a temporary table for the results of the SELECT.
9353593592
*/
9353693593
static int readsTable(Parse *p, int iDb, Table *pTab){
9353793594
Vdbe *v = sqlite3GetVdbe(p);
9353893595
int i;
9353993596
int iEnd = sqlite3VdbeCurrentAddr(v);
@@ -112384,17 +112441,17 @@
112384112441
}
112385112442
if( pLoop->wsFlags & WHERE_TOP_LIMIT ){
112386112443
pRangeEnd = pLoop->aLTerm[j++];
112387112444
nExtraReg = 1;
112388112445
if( pRangeStart==0
112389
- && (pRangeEnd->wtFlags & TERM_VNULL)==0
112390112446
&& (j = pIdx->aiColumn[nEq])>=0
112391112447
&& pIdx->pTable->aCol[j].notNull==0
112392112448
){
112393112449
bSeekPastNull = 1;
112394112450
}
112395112451
}
112452
+ assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 );
112396112453
112397112454
/* Generate code to evaluate all constraint terms using == or IN
112398112455
** and store the values of those terms in an array of registers
112399112456
** starting at regBase.
112400112457
*/
112401112458
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -222,11 +222,11 @@
222 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
223 ** [sqlite_version()] and [sqlite_source_id()].
224 */
225 #define SQLITE_VERSION "3.8.4"
226 #define SQLITE_VERSION_NUMBER 3008004
227 #define SQLITE_SOURCE_ID "2014-03-05 19:04:46 0723effc9ccae7c660fb847b36ce9324e0cb5042"
228
229 /*
230 ** CAPI3REF: Run-Time Library Version Numbers
231 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
232 **
@@ -36484,12 +36484,29 @@
36484 ** Interfaces for opening a shared library, finding entry points
36485 ** within the shared library, and closing the shared library.
36486 */
36487 static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
36488 HANDLE h;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36489 void *zConverted = winConvertFromUtf8Filename(zFilename);
36490 UNUSED_PARAMETER(pVfs);
 
36491 if( zConverted==0 ){
36492 OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0));
36493 return 0;
36494 }
36495 if( osIsNT() ){
@@ -44405,19 +44422,21 @@
44405 */
44406 rc = sqlite3OsCheckReservedLock(pPager->fd, &locked);
44407 if( rc==SQLITE_OK && !locked ){
44408 Pgno nPage; /* Number of pages in database file */
44409
44410 /* Check the size of the database file. If it consists of 0 pages,
44411 ** then delete the journal file. See the header comment above for
44412 ** the reasoning here. Delete the obsolete journal file under
44413 ** a RESERVED lock to avoid race conditions and to avoid violating
44414 ** [H33020].
44415 */
44416 rc = pagerPagecount(pPager, &nPage);
44417 if( rc==SQLITE_OK ){
44418 if( nPage==0 ){
 
 
 
 
 
 
 
 
44419 sqlite3BeginBenignMalloc();
44420 if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){
44421 sqlite3OsDelete(pVfs, pPager->zJournal, 0);
44422 if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
44423 }
@@ -55371,11 +55390,11 @@
55371 assert( pIdxKey->default_rc==1
55372 || pIdxKey->default_rc==0
55373 || pIdxKey->default_rc==-1
55374 );
55375 }else{
55376 xRecordCompare = 0; /* Not actually used. Avoids a compiler warning. */
55377 }
55378
55379 rc = moveToRoot(pCur);
55380 if( rc ){
55381 return rc;
@@ -62561,10 +62580,14 @@
62561 ** sqlite3MemRelease() were called from here. With -O2, this jumps
62562 ** to 6.6 percent. The test case is inserting 1000 rows into a table
62563 ** with no indexes using a single prepared INSERT statement, bind()
62564 ** and reset(). Inserts are grouped into a transaction.
62565 */
 
 
 
 
62566 if( p->flags&(MEM_Agg|MEM_Dyn|MEM_Frame|MEM_RowSet) ){
62567 sqlite3VdbeMemRelease(p);
62568 }else if( p->zMalloc ){
62569 sqlite3DbFree(db, p->zMalloc);
62570 p->zMalloc = 0;
@@ -64289,31 +64312,36 @@
64289 break;
64290 }
64291 case 1: { /* 1-byte signed integer */
64292 pMem->u.i = ONE_BYTE_INT(buf);
64293 pMem->flags = MEM_Int;
 
64294 return 1;
64295 }
64296 case 2: { /* 2-byte signed integer */
64297 pMem->u.i = TWO_BYTE_INT(buf);
64298 pMem->flags = MEM_Int;
 
64299 return 2;
64300 }
64301 case 3: { /* 3-byte signed integer */
64302 pMem->u.i = THREE_BYTE_INT(buf);
64303 pMem->flags = MEM_Int;
 
64304 return 3;
64305 }
64306 case 4: { /* 4-byte signed integer */
64307 y = FOUR_BYTE_UINT(buf);
64308 pMem->u.i = (i64)*(int*)&y;
64309 pMem->flags = MEM_Int;
 
64310 return 4;
64311 }
64312 case 5: { /* 6-byte signed integer */
64313 pMem->u.i = FOUR_BYTE_UINT(buf+2) + (((i64)1)<<32)*TWO_BYTE_INT(buf);
64314 pMem->flags = MEM_Int;
 
64315 return 6;
64316 }
64317 case 6: /* 8-byte signed integer */
64318 case 7: { /* IEEE floating point */
64319 #if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT)
@@ -64332,10 +64360,11 @@
64332 y = FOUR_BYTE_UINT(buf+4);
64333 x = (x<<32) | y;
64334 if( serial_type==6 ){
64335 pMem->u.i = *(i64*)&x;
64336 pMem->flags = MEM_Int;
 
64337 }else{
64338 assert( sizeof(x)==8 && sizeof(pMem->r)==8 );
64339 swapMixedEndianFloat(x);
64340 memcpy(&pMem->r, &x, sizeof(x));
64341 pMem->flags = sqlite3IsNaN(pMem->r) ? MEM_Null : MEM_Real;
@@ -64677,24 +64706,30 @@
64677 u32 y;
64678 assert( CORRUPT_DB || (serial_type>=1 && serial_type<=9 && serial_type!=7) );
64679 switch( serial_type ){
64680 case 0:
64681 case 1:
 
64682 return ONE_BYTE_INT(aKey);
64683 case 2:
 
64684 return TWO_BYTE_INT(aKey);
64685 case 3:
 
64686 return THREE_BYTE_INT(aKey);
64687 case 4: {
 
64688 y = FOUR_BYTE_UINT(aKey);
64689 return (i64)*(int*)&y;
64690 }
64691 case 5: {
 
64692 return FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey);
64693 }
64694 case 6: {
64695 u64 x = FOUR_BYTE_UINT(aKey);
 
64696 x = (x<<32) | FOUR_BYTE_UINT(aKey+4);
64697 return (i64)*(i64*)&x;
64698 }
64699 }
64700
@@ -64758,10 +64793,11 @@
64758 u32 serial_type;
64759
64760 /* RHS is an integer */
64761 if( pRhs->flags & MEM_Int ){
64762 serial_type = aKey1[idx1];
 
64763 if( serial_type>=12 ){
64764 rc = +1;
64765 }else if( serial_type==0 ){
64766 rc = -1;
64767 }else if( serial_type==7 ){
@@ -64808,16 +64844,19 @@
64808 }
64809
64810 /* RHS is a string */
64811 else if( pRhs->flags & MEM_Str ){
64812 getVarint32(&aKey1[idx1], serial_type);
 
64813 if( serial_type<12 ){
64814 rc = -1;
64815 }else if( !(serial_type & 0x01) ){
64816 rc = +1;
64817 }else{
64818 mem1.n = (serial_type - 12) / 2;
 
 
64819 if( (d1+mem1.n) > (unsigned)nKey1 ){
64820 rc = 1; /* Corruption */
64821 }else if( pKeyInfo->aColl[i] ){
64822 mem1.enc = pKeyInfo->enc;
64823 mem1.db = pKeyInfo->db;
@@ -64833,14 +64872,17 @@
64833 }
64834
64835 /* RHS is a blob */
64836 else if( pRhs->flags & MEM_Blob ){
64837 getVarint32(&aKey1[idx1], serial_type);
 
64838 if( serial_type<12 || (serial_type & 0x01) ){
64839 rc = -1;
64840 }else{
64841 int nStr = (serial_type - 12) / 2;
 
 
64842 if( (d1+nStr) > (unsigned)nKey1 ){
64843 rc = 1; /* Corruption */
64844 }else{
64845 int nCmp = MIN(nStr, pRhs->n);
64846 rc = memcmp(&aKey1[d1], pRhs->z, nCmp);
@@ -64910,33 +64952,39 @@
64910
64911 assert( bSkip==0 );
64912 switch( serial_type ){
64913 case 1: { /* 1-byte signed integer */
64914 lhs = ONE_BYTE_INT(aKey);
 
64915 break;
64916 }
64917 case 2: { /* 2-byte signed integer */
64918 lhs = TWO_BYTE_INT(aKey);
 
64919 break;
64920 }
64921 case 3: { /* 3-byte signed integer */
64922 lhs = THREE_BYTE_INT(aKey);
 
64923 break;
64924 }
64925 case 4: { /* 4-byte signed integer */
64926 y = FOUR_BYTE_UINT(aKey);
64927 lhs = (i64)*(int*)&y;
 
64928 break;
64929 }
64930 case 5: { /* 6-byte signed integer */
64931 lhs = FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey);
 
64932 break;
64933 }
64934 case 6: { /* 8-byte signed integer */
64935 x = FOUR_BYTE_UINT(aKey);
64936 x = (x<<32) | FOUR_BYTE_UINT(aKey+4);
64937 lhs = *(i64*)&x;
 
64938 break;
64939 }
64940 case 8:
64941 lhs = 0;
64942 break;
@@ -65069,13 +65117,15 @@
65069 p->r2 = 1;
65070 }
65071 if( (flags & MEM_Int) ){
65072 return vdbeRecordCompareInt;
65073 }
65074 if( (flags & (MEM_Int|MEM_Real|MEM_Null|MEM_Blob))==0
65075 && p->pKeyInfo->aColl[0]==0
65076 ){
 
 
65077 return vdbeRecordCompareString;
65078 }
65079 }
65080
65081 return sqlite3VdbeRecordCompare;
@@ -66978,11 +67028,11 @@
66978 ** value of the cell. This macro verifies that shallow copies are
66979 ** not misused. A shallow copy of a string or blob just copies a
66980 ** pointer to the string or blob, not the content. If the original
66981 ** is changed while the copy is still in use, the string or blob might
66982 ** be changed out from under the copy. This macro verifies that nothing
66983 ** like that every happens.
66984 */
66985 #ifdef SQLITE_DEBUG
66986 # define memAboutToChange(P,M) sqlite3VdbeMemAboutToChange(P,M)
66987 #else
66988 # define memAboutToChange(P,M)
@@ -67710,10 +67760,15 @@
67710 **
67711 ** An unconditional jump to address P2.
67712 ** The next instruction executed will be
67713 ** the one at index P2 from the beginning of
67714 ** the program.
 
 
 
 
 
67715 */
67716 case OP_Goto: { /* jump */
67717 pc = pOp->p2 - 1;
67718
67719 /* Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev,
@@ -69205,12 +69260,12 @@
69205
69206 /* Opcode: Once P1 P2 * * *
69207 **
69208 ** Check if OP_Once flag P1 is set. If so, jump to instruction P2. Otherwise,
69209 ** set the flag and fall through to the next instruction. In other words,
69210 ** this opcode causes all following up codes up through P2 (but not including
69211 ** P2) to run just once and skipped on subsequent times through the loop.
69212 */
69213 case OP_Once: { /* jump */
69214 assert( pOp->p1<p->nOnceFlag );
69215 VdbeBranchTaken(p->aOnceFlag[pOp->p1]!=0, 2);
69216 if( p->aOnceFlag[pOp->p1] ){
@@ -83299,11 +83354,14 @@
83299 VdbeCoverage(v);
83300 callStatGet(v, regStat4, STAT_GET_NEQ, regEq);
83301 callStatGet(v, regStat4, STAT_GET_NLT, regLt);
83302 callStatGet(v, regStat4, STAT_GET_NDLT, regDLt);
83303 sqlite3VdbeAddOp4Int(v, seekOp, iTabCur, addrNext, regSampleRowid, 0);
83304 VdbeCoverage(v);
 
 
 
83305 #ifdef SQLITE_ENABLE_STAT3
83306 sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur,
83307 pIdx->aiColumn[0], regSample);
83308 #else
83309 for(i=0; i<nCol; i++){
@@ -83313,11 +83371,11 @@
83313 sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol+1, regSample);
83314 #endif
83315 sqlite3VdbeAddOp3(v, OP_MakeRecord, regTabname, 6, regTemp);
83316 sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regNewRowid);
83317 sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regTemp, regNewRowid);
83318 sqlite3VdbeAddOp2(v, OP_Goto, 0, addrNext);
83319 sqlite3VdbeJumpHere(v, addrIsNull);
83320 }
83321 #endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */
83322
83323 /* End of analysis */
@@ -91278,11 +91336,11 @@
91278 int argc,
91279 sqlite3_value **argv
91280 ){
91281 unsigned char *z, *zOut;
91282 int i;
91283 zOut = z = sqlite3_malloc( argc*4 );
91284 if( z==0 ){
91285 sqlite3_result_error_nomem(context);
91286 return;
91287 }
91288 for(i=0; i<argc; i++){
@@ -93479,17 +93537,17 @@
93479
93480 /*
93481 ** Compute the affinity string for table pTab, if it has not already been
93482 ** computed. As an optimization, omit trailing SQLITE_AFF_NONE affinities.
93483 **
93484 ** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values and
93485 ** if iReg>0 then code an OP_Affinity opcode that will set the affinities
93486 ** for register iReg and following. Or if affinities exists and iReg==0,
93487 ** then just set the P4 operand of the previous opcode (which should be
93488 ** an OP_MakeRecord) to the affinity string.
93489 **
93490 ** A column affinity string has one character column:
93491 **
93492 ** Character Column affinity
93493 ** ------------------------------
93494 ** 'a' TEXT
93495 ** 'b' NONE
@@ -93526,14 +93584,13 @@
93526 }
93527 }
93528
93529 /*
93530 ** Return non-zero if the table pTab in database iDb or any of its indices
93531 ** have been opened at any point in the VDBE program beginning at location
93532 ** iStartAddr throught the end of the program. This is used to see if
93533 ** a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can
93534 ** run without using temporary table for the results of the SELECT.
93535 */
93536 static int readsTable(Parse *p, int iDb, Table *pTab){
93537 Vdbe *v = sqlite3GetVdbe(p);
93538 int i;
93539 int iEnd = sqlite3VdbeCurrentAddr(v);
@@ -112384,17 +112441,17 @@
112384 }
112385 if( pLoop->wsFlags & WHERE_TOP_LIMIT ){
112386 pRangeEnd = pLoop->aLTerm[j++];
112387 nExtraReg = 1;
112388 if( pRangeStart==0
112389 && (pRangeEnd->wtFlags & TERM_VNULL)==0
112390 && (j = pIdx->aiColumn[nEq])>=0
112391 && pIdx->pTable->aCol[j].notNull==0
112392 ){
112393 bSeekPastNull = 1;
112394 }
112395 }
 
112396
112397 /* Generate code to evaluate all constraint terms using == or IN
112398 ** and store the values of those terms in an array of registers
112399 ** starting at regBase.
112400 */
112401
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -222,11 +222,11 @@
222 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
223 ** [sqlite_version()] and [sqlite_source_id()].
224 */
225 #define SQLITE_VERSION "3.8.4"
226 #define SQLITE_VERSION_NUMBER 3008004
227 #define SQLITE_SOURCE_ID "2014-03-10 12:20:37 530a1ee7dc2435f80960ce4710a3c2d2bfaaccc5"
228
229 /*
230 ** CAPI3REF: Run-Time Library Version Numbers
231 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
232 **
@@ -36484,12 +36484,29 @@
36484 ** Interfaces for opening a shared library, finding entry points
36485 ** within the shared library, and closing the shared library.
36486 */
36487 static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
36488 HANDLE h;
36489 #if defined(__CYGWIN__)
36490 int nFull = pVfs->mxPathname+1;
36491 char *zFull = sqlite3MallocZero( nFull );
36492 void *zConverted = 0;
36493 if( zFull==0 ){
36494 OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0));
36495 return 0;
36496 }
36497 if( winFullPathname(pVfs, zFilename, nFull, zFull)!=SQLITE_OK ){
36498 sqlite3_free(zFull);
36499 OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0));
36500 return 0;
36501 }
36502 zConverted = winConvertFromUtf8Filename(zFull);
36503 sqlite3_free(zFull);
36504 #else
36505 void *zConverted = winConvertFromUtf8Filename(zFilename);
36506 UNUSED_PARAMETER(pVfs);
36507 #endif
36508 if( zConverted==0 ){
36509 OSTRACE(("DLOPEN name=%s, handle=%p\n", zFilename, (void*)0));
36510 return 0;
36511 }
36512 if( osIsNT() ){
@@ -44405,19 +44422,21 @@
44422 */
44423 rc = sqlite3OsCheckReservedLock(pPager->fd, &locked);
44424 if( rc==SQLITE_OK && !locked ){
44425 Pgno nPage; /* Number of pages in database file */
44426
 
 
 
 
 
 
44427 rc = pagerPagecount(pPager, &nPage);
44428 if( rc==SQLITE_OK ){
44429 /* If the database is zero pages in size, that means that either (1) the
44430 ** journal is a remnant from a prior database with the same name where
44431 ** the database file but not the journal was deleted, or (2) the initial
44432 ** transaction that populates a new database is being rolled back.
44433 ** In either case, the journal file can be deleted. However, take care
44434 ** not to delete the journal file if it is already open due to
44435 ** journal_mode=PERSIST.
44436 */
44437 if( nPage==0 && !jrnlOpen ){
44438 sqlite3BeginBenignMalloc();
44439 if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){
44440 sqlite3OsDelete(pVfs, pPager->zJournal, 0);
44441 if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
44442 }
@@ -55371,11 +55390,11 @@
55390 assert( pIdxKey->default_rc==1
55391 || pIdxKey->default_rc==0
55392 || pIdxKey->default_rc==-1
55393 );
55394 }else{
55395 xRecordCompare = 0; /* All keys are integers */
55396 }
55397
55398 rc = moveToRoot(pCur);
55399 if( rc ){
55400 return rc;
@@ -62561,10 +62580,14 @@
62580 ** sqlite3MemRelease() were called from here. With -O2, this jumps
62581 ** to 6.6 percent. The test case is inserting 1000 rows into a table
62582 ** with no indexes using a single prepared INSERT statement, bind()
62583 ** and reset(). Inserts are grouped into a transaction.
62584 */
62585 testcase( p->flags & MEM_Agg );
62586 testcase( p->flags & MEM_Dyn );
62587 testcase( p->flags & MEM_Frame );
62588 testcase( p->flags & MEM_RowSet );
62589 if( p->flags&(MEM_Agg|MEM_Dyn|MEM_Frame|MEM_RowSet) ){
62590 sqlite3VdbeMemRelease(p);
62591 }else if( p->zMalloc ){
62592 sqlite3DbFree(db, p->zMalloc);
62593 p->zMalloc = 0;
@@ -64289,31 +64312,36 @@
64312 break;
64313 }
64314 case 1: { /* 1-byte signed integer */
64315 pMem->u.i = ONE_BYTE_INT(buf);
64316 pMem->flags = MEM_Int;
64317 testcase( pMem->u.i<0 );
64318 return 1;
64319 }
64320 case 2: { /* 2-byte signed integer */
64321 pMem->u.i = TWO_BYTE_INT(buf);
64322 pMem->flags = MEM_Int;
64323 testcase( pMem->u.i<0 );
64324 return 2;
64325 }
64326 case 3: { /* 3-byte signed integer */
64327 pMem->u.i = THREE_BYTE_INT(buf);
64328 pMem->flags = MEM_Int;
64329 testcase( pMem->u.i<0 );
64330 return 3;
64331 }
64332 case 4: { /* 4-byte signed integer */
64333 y = FOUR_BYTE_UINT(buf);
64334 pMem->u.i = (i64)*(int*)&y;
64335 pMem->flags = MEM_Int;
64336 testcase( pMem->u.i<0 );
64337 return 4;
64338 }
64339 case 5: { /* 6-byte signed integer */
64340 pMem->u.i = FOUR_BYTE_UINT(buf+2) + (((i64)1)<<32)*TWO_BYTE_INT(buf);
64341 pMem->flags = MEM_Int;
64342 testcase( pMem->u.i<0 );
64343 return 6;
64344 }
64345 case 6: /* 8-byte signed integer */
64346 case 7: { /* IEEE floating point */
64347 #if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT)
@@ -64332,10 +64360,11 @@
64360 y = FOUR_BYTE_UINT(buf+4);
64361 x = (x<<32) | y;
64362 if( serial_type==6 ){
64363 pMem->u.i = *(i64*)&x;
64364 pMem->flags = MEM_Int;
64365 testcase( pMem->u.i<0 );
64366 }else{
64367 assert( sizeof(x)==8 && sizeof(pMem->r)==8 );
64368 swapMixedEndianFloat(x);
64369 memcpy(&pMem->r, &x, sizeof(x));
64370 pMem->flags = sqlite3IsNaN(pMem->r) ? MEM_Null : MEM_Real;
@@ -64677,24 +64706,30 @@
64706 u32 y;
64707 assert( CORRUPT_DB || (serial_type>=1 && serial_type<=9 && serial_type!=7) );
64708 switch( serial_type ){
64709 case 0:
64710 case 1:
64711 testcase( aKey[0]&0x80 );
64712 return ONE_BYTE_INT(aKey);
64713 case 2:
64714 testcase( aKey[0]&0x80 );
64715 return TWO_BYTE_INT(aKey);
64716 case 3:
64717 testcase( aKey[0]&0x80 );
64718 return THREE_BYTE_INT(aKey);
64719 case 4: {
64720 testcase( aKey[0]&0x80 );
64721 y = FOUR_BYTE_UINT(aKey);
64722 return (i64)*(int*)&y;
64723 }
64724 case 5: {
64725 testcase( aKey[0]&0x80 );
64726 return FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey);
64727 }
64728 case 6: {
64729 u64 x = FOUR_BYTE_UINT(aKey);
64730 testcase( aKey[0]&0x80 );
64731 x = (x<<32) | FOUR_BYTE_UINT(aKey+4);
64732 return (i64)*(i64*)&x;
64733 }
64734 }
64735
@@ -64758,10 +64793,11 @@
64793 u32 serial_type;
64794
64795 /* RHS is an integer */
64796 if( pRhs->flags & MEM_Int ){
64797 serial_type = aKey1[idx1];
64798 testcase( serial_type==12 );
64799 if( serial_type>=12 ){
64800 rc = +1;
64801 }else if( serial_type==0 ){
64802 rc = -1;
64803 }else if( serial_type==7 ){
@@ -64808,16 +64844,19 @@
64844 }
64845
64846 /* RHS is a string */
64847 else if( pRhs->flags & MEM_Str ){
64848 getVarint32(&aKey1[idx1], serial_type);
64849 testcase( serial_type==12 );
64850 if( serial_type<12 ){
64851 rc = -1;
64852 }else if( !(serial_type & 0x01) ){
64853 rc = +1;
64854 }else{
64855 mem1.n = (serial_type - 12) / 2;
64856 testcase( (d1+mem1.n)==(unsigned)nKey1 );
64857 testcase( (d1+mem1.n+1)==(unsigned)nKey1 );
64858 if( (d1+mem1.n) > (unsigned)nKey1 ){
64859 rc = 1; /* Corruption */
64860 }else if( pKeyInfo->aColl[i] ){
64861 mem1.enc = pKeyInfo->enc;
64862 mem1.db = pKeyInfo->db;
@@ -64833,14 +64872,17 @@
64872 }
64873
64874 /* RHS is a blob */
64875 else if( pRhs->flags & MEM_Blob ){
64876 getVarint32(&aKey1[idx1], serial_type);
64877 testcase( serial_type==12 );
64878 if( serial_type<12 || (serial_type & 0x01) ){
64879 rc = -1;
64880 }else{
64881 int nStr = (serial_type - 12) / 2;
64882 testcase( (d1+nStr)==(unsigned)nKey1 );
64883 testcase( (d1+nStr+1)==(unsigned)nKey1 );
64884 if( (d1+nStr) > (unsigned)nKey1 ){
64885 rc = 1; /* Corruption */
64886 }else{
64887 int nCmp = MIN(nStr, pRhs->n);
64888 rc = memcmp(&aKey1[d1], pRhs->z, nCmp);
@@ -64910,33 +64952,39 @@
64952
64953 assert( bSkip==0 );
64954 switch( serial_type ){
64955 case 1: { /* 1-byte signed integer */
64956 lhs = ONE_BYTE_INT(aKey);
64957 testcase( lhs<0 );
64958 break;
64959 }
64960 case 2: { /* 2-byte signed integer */
64961 lhs = TWO_BYTE_INT(aKey);
64962 testcase( lhs<0 );
64963 break;
64964 }
64965 case 3: { /* 3-byte signed integer */
64966 lhs = THREE_BYTE_INT(aKey);
64967 testcase( lhs<0 );
64968 break;
64969 }
64970 case 4: { /* 4-byte signed integer */
64971 y = FOUR_BYTE_UINT(aKey);
64972 lhs = (i64)*(int*)&y;
64973 testcase( lhs<0 );
64974 break;
64975 }
64976 case 5: { /* 6-byte signed integer */
64977 lhs = FOUR_BYTE_UINT(aKey+2) + (((i64)1)<<32)*TWO_BYTE_INT(aKey);
64978 testcase( lhs<0 );
64979 break;
64980 }
64981 case 6: { /* 8-byte signed integer */
64982 x = FOUR_BYTE_UINT(aKey);
64983 x = (x<<32) | FOUR_BYTE_UINT(aKey+4);
64984 lhs = *(i64*)&x;
64985 testcase( lhs<0 );
64986 break;
64987 }
64988 case 8:
64989 lhs = 0;
64990 break;
@@ -65069,13 +65117,15 @@
65117 p->r2 = 1;
65118 }
65119 if( (flags & MEM_Int) ){
65120 return vdbeRecordCompareInt;
65121 }
65122 testcase( flags & MEM_Real );
65123 testcase( flags & MEM_Null );
65124 testcase( flags & MEM_Blob );
65125 if( (flags & (MEM_Real|MEM_Null|MEM_Blob))==0 && p->pKeyInfo->aColl[0]==0 ){
65126 assert( flags & MEM_Str );
65127 return vdbeRecordCompareString;
65128 }
65129 }
65130
65131 return sqlite3VdbeRecordCompare;
@@ -66978,11 +67028,11 @@
67028 ** value of the cell. This macro verifies that shallow copies are
67029 ** not misused. A shallow copy of a string or blob just copies a
67030 ** pointer to the string or blob, not the content. If the original
67031 ** is changed while the copy is still in use, the string or blob might
67032 ** be changed out from under the copy. This macro verifies that nothing
67033 ** like that ever happens.
67034 */
67035 #ifdef SQLITE_DEBUG
67036 # define memAboutToChange(P,M) sqlite3VdbeMemAboutToChange(P,M)
67037 #else
67038 # define memAboutToChange(P,M)
@@ -67710,10 +67760,15 @@
67760 **
67761 ** An unconditional jump to address P2.
67762 ** The next instruction executed will be
67763 ** the one at index P2 from the beginning of
67764 ** the program.
67765 **
67766 ** The P1 parameter is not actually used by this opcode. However, it
67767 ** is sometimes set to 1 instead of 0 as a hint to the command-line shell
67768 ** that this Goto is the bottom of a loop and that the lines from P2 down
67769 ** to the current line should be indented for EXPLAIN output.
67770 */
67771 case OP_Goto: { /* jump */
67772 pc = pOp->p2 - 1;
67773
67774 /* Opcodes that are used as the bottom of a loop (OP_Next, OP_Prev,
@@ -69205,12 +69260,12 @@
69260
69261 /* Opcode: Once P1 P2 * * *
69262 **
69263 ** Check if OP_Once flag P1 is set. If so, jump to instruction P2. Otherwise,
69264 ** set the flag and fall through to the next instruction. In other words,
69265 ** this opcode causes all following opcodes up through P2 (but not including
69266 ** P2) to run just once and to be skipped on subsequent times through the loop.
69267 */
69268 case OP_Once: { /* jump */
69269 assert( pOp->p1<p->nOnceFlag );
69270 VdbeBranchTaken(p->aOnceFlag[pOp->p1]!=0, 2);
69271 if( p->aOnceFlag[pOp->p1] ){
@@ -83299,11 +83354,14 @@
83354 VdbeCoverage(v);
83355 callStatGet(v, regStat4, STAT_GET_NEQ, regEq);
83356 callStatGet(v, regStat4, STAT_GET_NLT, regLt);
83357 callStatGet(v, regStat4, STAT_GET_NDLT, regDLt);
83358 sqlite3VdbeAddOp4Int(v, seekOp, iTabCur, addrNext, regSampleRowid, 0);
83359 /* We know that the regSampleRowid row exists because it was read by
83360 ** the previous loop. Thus the not-found jump of seekOp will never
83361 ** be taken */
83362 VdbeCoverageNeverTaken(v);
83363 #ifdef SQLITE_ENABLE_STAT3
83364 sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur,
83365 pIdx->aiColumn[0], regSample);
83366 #else
83367 for(i=0; i<nCol; i++){
@@ -83313,11 +83371,11 @@
83371 sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol+1, regSample);
83372 #endif
83373 sqlite3VdbeAddOp3(v, OP_MakeRecord, regTabname, 6, regTemp);
83374 sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regNewRowid);
83375 sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regTemp, regNewRowid);
83376 sqlite3VdbeAddOp2(v, OP_Goto, 1, addrNext); /* P1==1 for end-of-loop */
83377 sqlite3VdbeJumpHere(v, addrIsNull);
83378 }
83379 #endif /* SQLITE_ENABLE_STAT3_OR_STAT4 */
83380
83381 /* End of analysis */
@@ -91278,11 +91336,11 @@
91336 int argc,
91337 sqlite3_value **argv
91338 ){
91339 unsigned char *z, *zOut;
91340 int i;
91341 zOut = z = sqlite3_malloc( argc*4+1 );
91342 if( z==0 ){
91343 sqlite3_result_error_nomem(context);
91344 return;
91345 }
91346 for(i=0; i<argc; i++){
@@ -93479,17 +93537,17 @@
93537
93538 /*
93539 ** Compute the affinity string for table pTab, if it has not already been
93540 ** computed. As an optimization, omit trailing SQLITE_AFF_NONE affinities.
93541 **
93542 ** If the affinity exists (if it is no entirely SQLITE_AFF_NONE values) and
93543 ** if iReg>0 then code an OP_Affinity opcode that will set the affinities
93544 ** for register iReg and following. Or if affinities exists and iReg==0,
93545 ** then just set the P4 operand of the previous opcode (which should be
93546 ** an OP_MakeRecord) to the affinity string.
93547 **
93548 ** A column affinity string has one character per column:
93549 **
93550 ** Character Column affinity
93551 ** ------------------------------
93552 ** 'a' TEXT
93553 ** 'b' NONE
@@ -93526,14 +93584,13 @@
93584 }
93585 }
93586
93587 /*
93588 ** Return non-zero if the table pTab in database iDb or any of its indices
93589 ** have been opened at any point in the VDBE program. This is used to see if
 
93590 ** a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can
93591 ** run without using a temporary table for the results of the SELECT.
93592 */
93593 static int readsTable(Parse *p, int iDb, Table *pTab){
93594 Vdbe *v = sqlite3GetVdbe(p);
93595 int i;
93596 int iEnd = sqlite3VdbeCurrentAddr(v);
@@ -112384,17 +112441,17 @@
112441 }
112442 if( pLoop->wsFlags & WHERE_TOP_LIMIT ){
112443 pRangeEnd = pLoop->aLTerm[j++];
112444 nExtraReg = 1;
112445 if( pRangeStart==0
 
112446 && (j = pIdx->aiColumn[nEq])>=0
112447 && pIdx->pTable->aCol[j].notNull==0
112448 ){
112449 bSeekPastNull = 1;
112450 }
112451 }
112452 assert( pRangeEnd==0 || (pRangeEnd->wtFlags & TERM_VNULL)==0 );
112453
112454 /* Generate code to evaluate all constraint terms using == or IN
112455 ** and store the values of those terms in an array of registers
112456 ** starting at regBase.
112457 */
112458
+1 -1
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110110
#define SQLITE_VERSION "3.8.4"
111111
#define SQLITE_VERSION_NUMBER 3008004
112
-#define SQLITE_SOURCE_ID "2014-03-05 19:04:46 0723effc9ccae7c660fb847b36ce9324e0cb5042"
112
+#define SQLITE_SOURCE_ID "2014-03-10 12:20:37 530a1ee7dc2435f80960ce4710a3c2d2bfaaccc5"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
118118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.8.4"
111 #define SQLITE_VERSION_NUMBER 3008004
112 #define SQLITE_SOURCE_ID "2014-03-05 19:04:46 0723effc9ccae7c660fb847b36ce9324e0cb5042"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -107,11 +107,11 @@
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.8.4"
111 #define SQLITE_VERSION_NUMBER 3008004
112 #define SQLITE_SOURCE_ID "2014-03-10 12:20:37 530a1ee7dc2435f80960ce4710a3c2d2bfaaccc5"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
+7 -3
--- src/style.c
+++ src/style.c
@@ -308,11 +308,11 @@
308308
Th_Store("manifest_date", MANIFEST_DATE);
309309
Th_Store("compiler_name", COMPILER_NAME);
310310
url_var("stylesheet", "css", "style.css");
311311
image_url_var("logo");
312312
image_url_var("background");
313
- if( g.zLogin ){
313
+ if( !login_is_nobody() ){
314314
Th_Store("login", g.zLogin);
315315
}
316316
if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
317317
Th_Render(zHeader);
318318
if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
@@ -346,12 +346,14 @@
346346
static void style_ad_unit(void){
347347
const char *zAd;
348348
if( g.perm.Admin && db_get_boolean("adunit-omit-if-admin",0) ){
349349
return;
350350
}
351
- if( g.zLogin && strcmp(g.zLogin,"anonymous")!=0
352
- && db_get_boolean("adunit-omit-if-user",0) ){
351
+ if( !login_is_nobody()
352
+ && fossil_strcmp(g.zLogin,"anonymous")!=0
353
+ && db_get_boolean("adunit-omit-if-user",0)
354
+ ){
353355
return;
354356
}
355357
zAd = db_get("adunit", 0);
356358
if( zAd ) cgi_append_content(zAd, -1);
357359
}
@@ -1298,10 +1300,12 @@
12981300
zCap[i] = 0;
12991301
@ g.userUid = %d(g.userUid)<br />
13001302
@ g.zLogin = %h(g.zLogin)<br />
13011303
@ g.isHuman = %d(g.isHuman)<br />
13021304
@ capabilities = %s(zCap)<br />
1305
+ @ g.zRepositoryName = %h(g.zRepositoryName)<br />
1306
+ @ load_average() = %f(load_average())<br />
13031307
@ <hr>
13041308
P("HTTP_USER_AGENT");
13051309
cgi_print_all(showAll);
13061310
if( showAll && blob_size(&g.httpHeader)>0 ){
13071311
@ <hr>
13081312
--- src/style.c
+++ src/style.c
@@ -308,11 +308,11 @@
308 Th_Store("manifest_date", MANIFEST_DATE);
309 Th_Store("compiler_name", COMPILER_NAME);
310 url_var("stylesheet", "css", "style.css");
311 image_url_var("logo");
312 image_url_var("background");
313 if( g.zLogin ){
314 Th_Store("login", g.zLogin);
315 }
316 if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
317 Th_Render(zHeader);
318 if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
@@ -346,12 +346,14 @@
346 static void style_ad_unit(void){
347 const char *zAd;
348 if( g.perm.Admin && db_get_boolean("adunit-omit-if-admin",0) ){
349 return;
350 }
351 if( g.zLogin && strcmp(g.zLogin,"anonymous")!=0
352 && db_get_boolean("adunit-omit-if-user",0) ){
 
 
353 return;
354 }
355 zAd = db_get("adunit", 0);
356 if( zAd ) cgi_append_content(zAd, -1);
357 }
@@ -1298,10 +1300,12 @@
1298 zCap[i] = 0;
1299 @ g.userUid = %d(g.userUid)<br />
1300 @ g.zLogin = %h(g.zLogin)<br />
1301 @ g.isHuman = %d(g.isHuman)<br />
1302 @ capabilities = %s(zCap)<br />
 
 
1303 @ <hr>
1304 P("HTTP_USER_AGENT");
1305 cgi_print_all(showAll);
1306 if( showAll && blob_size(&g.httpHeader)>0 ){
1307 @ <hr>
1308
--- src/style.c
+++ src/style.c
@@ -308,11 +308,11 @@
308 Th_Store("manifest_date", MANIFEST_DATE);
309 Th_Store("compiler_name", COMPILER_NAME);
310 url_var("stylesheet", "css", "style.css");
311 image_url_var("logo");
312 image_url_var("background");
313 if( !login_is_nobody() ){
314 Th_Store("login", g.zLogin);
315 }
316 if( g.thTrace ) Th_Trace("BEGIN_HEADER_SCRIPT<br />\n", -1);
317 Th_Render(zHeader);
318 if( g.thTrace ) Th_Trace("END_HEADER<br />\n", -1);
@@ -346,12 +346,14 @@
346 static void style_ad_unit(void){
347 const char *zAd;
348 if( g.perm.Admin && db_get_boolean("adunit-omit-if-admin",0) ){
349 return;
350 }
351 if( !login_is_nobody()
352 && fossil_strcmp(g.zLogin,"anonymous")!=0
353 && db_get_boolean("adunit-omit-if-user",0)
354 ){
355 return;
356 }
357 zAd = db_get("adunit", 0);
358 if( zAd ) cgi_append_content(zAd, -1);
359 }
@@ -1298,10 +1300,12 @@
1300 zCap[i] = 0;
1301 @ g.userUid = %d(g.userUid)<br />
1302 @ g.zLogin = %h(g.zLogin)<br />
1303 @ g.isHuman = %d(g.isHuman)<br />
1304 @ capabilities = %s(zCap)<br />
1305 @ g.zRepositoryName = %h(g.zRepositoryName)<br />
1306 @ load_average() = %f(load_average())<br />
1307 @ <hr>
1308 P("HTTP_USER_AGENT");
1309 cgi_print_all(showAll);
1310 if( showAll && blob_size(&g.httpHeader)>0 ){
1311 @ <hr>
1312
+1 -1
--- src/tag.c
+++ src/tag.c
@@ -322,11 +322,11 @@
322322
if( tagtype>0 && zValue && zValue[0] ){
323323
blob_appendf(&ctrl, " %F\n", zValue);
324324
}else{
325325
blob_appendf(&ctrl, "\n");
326326
}
327
- blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
327
+ blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : login_name());
328328
md5sum_blob(&ctrl, &cksum);
329329
blob_appendf(&ctrl, "Z %b\n", &cksum);
330330
nrid = content_put(&ctrl);
331331
manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS);
332332
assert( blob_is_reset(&ctrl) );
333333
--- src/tag.c
+++ src/tag.c
@@ -322,11 +322,11 @@
322 if( tagtype>0 && zValue && zValue[0] ){
323 blob_appendf(&ctrl, " %F\n", zValue);
324 }else{
325 blob_appendf(&ctrl, "\n");
326 }
327 blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : g.zLogin);
328 md5sum_blob(&ctrl, &cksum);
329 blob_appendf(&ctrl, "Z %b\n", &cksum);
330 nrid = content_put(&ctrl);
331 manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS);
332 assert( blob_is_reset(&ctrl) );
333
--- src/tag.c
+++ src/tag.c
@@ -322,11 +322,11 @@
322 if( tagtype>0 && zValue && zValue[0] ){
323 blob_appendf(&ctrl, " %F\n", zValue);
324 }else{
325 blob_appendf(&ctrl, "\n");
326 }
327 blob_appendf(&ctrl, "U %F\n", zUserOvrd ? zUserOvrd : login_name());
328 md5sum_blob(&ctrl, &cksum);
329 blob_appendf(&ctrl, "Z %b\n", &cksum);
330 nrid = content_put(&ctrl);
331 manifest_crosslink(nrid, &ctrl, MC_PERMIT_HOOKS);
332 assert( blob_is_reset(&ctrl) );
333
+1
--- src/tar.c
+++ src/tar.c
@@ -580,10 +580,11 @@
580580
int nName, nRid;
581581
Blob tarball;
582582
583583
login_check_credentials();
584584
if( !g.perm.Zip ){ login_needed(); return; }
585
+ load_control();
585586
zName = mprintf("%s", PD("name",""));
586587
nName = strlen(zName);
587588
zRid = mprintf("%s", PD("uuid","trunk"));
588589
nRid = strlen(zRid);
589590
if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){
590591
--- src/tar.c
+++ src/tar.c
@@ -580,10 +580,11 @@
580 int nName, nRid;
581 Blob tarball;
582
583 login_check_credentials();
584 if( !g.perm.Zip ){ login_needed(); return; }
 
585 zName = mprintf("%s", PD("name",""));
586 nName = strlen(zName);
587 zRid = mprintf("%s", PD("uuid","trunk"));
588 nRid = strlen(zRid);
589 if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){
590
--- src/tar.c
+++ src/tar.c
@@ -580,10 +580,11 @@
580 int nName, nRid;
581 Blob tarball;
582
583 login_check_credentials();
584 if( !g.perm.Zip ){ login_needed(); return; }
585 load_control();
586 zName = mprintf("%s", PD("name",""));
587 nName = strlen(zName);
588 zRid = mprintf("%s", PD("uuid","trunk"));
589 nRid = strlen(zRid);
590 if( nName>7 && fossil_strcmp(&zName[nName-7], ".tar.gz")==0 ){
591
+4 -4
--- src/tkt.c
+++ src/tkt.c
@@ -614,11 +614,11 @@
614614
}else{
615615
zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))");
616616
}
617617
*(const char**)pUuid = zUuid;
618618
blob_appendf(&tktchng, "K %s\n", zUuid);
619
- blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : "");
619
+ blob_appendf(&tktchng, "U %F\n", login_name());
620620
md5sum_blob(&tktchng, &cksum);
621621
blob_appendf(&tktchng, "Z %b\n", &cksum);
622622
if( nJ==0 ){
623623
blob_reset(&tktchng);
624624
return TH_OK;
@@ -675,11 +675,11 @@
675675
login_insert_csrf_secret();
676676
if( P("date_override") && g.perm.Setup ){
677677
@ <input type="hidden" name="date_override" value="%h(P("date_override"))">
678678
}
679679
zScript = ticket_newpage_code();
680
- Th_Store("login", g.zLogin ? g.zLogin : "nobody");
680
+ Th_Store("login", login_name());
681681
Th_Store("date", db_text(0, "SELECT datetime('now')"));
682682
Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd,
683683
(void*)&zNewUuid, 0);
684684
if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1);
685685
if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){
@@ -743,11 +743,11 @@
743743
if( g.zPath[0]=='d' ) showAllFields();
744744
form_begin(0, "%R/%s", g.zPath);
745745
@ <input type="hidden" name="name" value="%s(zName)" />
746746
login_insert_csrf_secret();
747747
zScript = ticket_editpage_code();
748
- Th_Store("login", g.zLogin ? g.zLogin : "nobody");
748
+ Th_Store("login", login_name());
749749
Th_Store("date", db_text(0, "SELECT datetime('now')"));
750750
Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0);
751751
Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0);
752752
if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1);
753753
if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){
@@ -1102,11 +1102,11 @@
11021102
/* do some ints, we want to be inside a checkout */
11031103
db_find_and_open_repository(0, 0);
11041104
user_select();
11051105
11061106
zUser = find_option("user-override",0,1);
1107
- if( zUser==0 ) zUser = g.zLogin;
1107
+ if( zUser==0 ) zUser = login_name();
11081108
zDate = find_option("date-override",0,1);
11091109
if( zDate==0 ) zDate = "now";
11101110
zDate = date_in_standard_format(zDate);
11111111
zTktUuid = find_option("uuid-override",0,1);
11121112
if( zTktUuid && (strlen(zTktUuid)!=40 || !validate16(zTktUuid,40)) ){
11131113
--- src/tkt.c
+++ src/tkt.c
@@ -614,11 +614,11 @@
614 }else{
615 zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))");
616 }
617 *(const char**)pUuid = zUuid;
618 blob_appendf(&tktchng, "K %s\n", zUuid);
619 blob_appendf(&tktchng, "U %F\n", g.zLogin ? g.zLogin : "");
620 md5sum_blob(&tktchng, &cksum);
621 blob_appendf(&tktchng, "Z %b\n", &cksum);
622 if( nJ==0 ){
623 blob_reset(&tktchng);
624 return TH_OK;
@@ -675,11 +675,11 @@
675 login_insert_csrf_secret();
676 if( P("date_override") && g.perm.Setup ){
677 @ <input type="hidden" name="date_override" value="%h(P("date_override"))">
678 }
679 zScript = ticket_newpage_code();
680 Th_Store("login", g.zLogin ? g.zLogin : "nobody");
681 Th_Store("date", db_text(0, "SELECT datetime('now')"));
682 Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd,
683 (void*)&zNewUuid, 0);
684 if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1);
685 if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){
@@ -743,11 +743,11 @@
743 if( g.zPath[0]=='d' ) showAllFields();
744 form_begin(0, "%R/%s", g.zPath);
745 @ <input type="hidden" name="name" value="%s(zName)" />
746 login_insert_csrf_secret();
747 zScript = ticket_editpage_code();
748 Th_Store("login", g.zLogin ? g.zLogin : "nobody");
749 Th_Store("date", db_text(0, "SELECT datetime('now')"));
750 Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0);
751 Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0);
752 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1);
753 if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){
@@ -1102,11 +1102,11 @@
1102 /* do some ints, we want to be inside a checkout */
1103 db_find_and_open_repository(0, 0);
1104 user_select();
1105
1106 zUser = find_option("user-override",0,1);
1107 if( zUser==0 ) zUser = g.zLogin;
1108 zDate = find_option("date-override",0,1);
1109 if( zDate==0 ) zDate = "now";
1110 zDate = date_in_standard_format(zDate);
1111 zTktUuid = find_option("uuid-override",0,1);
1112 if( zTktUuid && (strlen(zTktUuid)!=40 || !validate16(zTktUuid,40)) ){
1113
--- src/tkt.c
+++ src/tkt.c
@@ -614,11 +614,11 @@
614 }else{
615 zUuid = db_text(0, "SELECT lower(hex(randomblob(20)))");
616 }
617 *(const char**)pUuid = zUuid;
618 blob_appendf(&tktchng, "K %s\n", zUuid);
619 blob_appendf(&tktchng, "U %F\n", login_name());
620 md5sum_blob(&tktchng, &cksum);
621 blob_appendf(&tktchng, "Z %b\n", &cksum);
622 if( nJ==0 ){
623 blob_reset(&tktchng);
624 return TH_OK;
@@ -675,11 +675,11 @@
675 login_insert_csrf_secret();
676 if( P("date_override") && g.perm.Setup ){
677 @ <input type="hidden" name="date_override" value="%h(P("date_override"))">
678 }
679 zScript = ticket_newpage_code();
680 Th_Store("login", login_name());
681 Th_Store("date", db_text(0, "SELECT datetime('now')"));
682 Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd,
683 (void*)&zNewUuid, 0);
684 if( g.thTrace ) Th_Trace("BEGIN_TKTNEW_SCRIPT<br />\n", -1);
685 if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zNewUuid ){
@@ -743,11 +743,11 @@
743 if( g.zPath[0]=='d' ) showAllFields();
744 form_begin(0, "%R/%s", g.zPath);
745 @ <input type="hidden" name="name" value="%s(zName)" />
746 login_insert_csrf_secret();
747 zScript = ticket_editpage_code();
748 Th_Store("login", login_name());
749 Th_Store("date", db_text(0, "SELECT datetime('now')"));
750 Th_CreateCommand(g.interp, "append_field", appendRemarkCmd, 0, 0);
751 Th_CreateCommand(g.interp, "submit_ticket", submitTicketCmd, (void*)&zName,0);
752 if( g.thTrace ) Th_Trace("BEGIN_TKTEDIT_SCRIPT<br />\n", -1);
753 if( Th_Render(zScript)==TH_RETURN && !g.thTrace && zName ){
@@ -1102,11 +1102,11 @@
1102 /* do some ints, we want to be inside a checkout */
1103 db_find_and_open_repository(0, 0);
1104 user_select();
1105
1106 zUser = find_option("user-override",0,1);
1107 if( zUser==0 ) zUser = login_name();
1108 zDate = find_option("date-override",0,1);
1109 if( zDate==0 ) zDate = "now";
1110 zDate = date_in_standard_format(zDate);
1111 zTktUuid = find_option("uuid-override",0,1);
1112 if( zTktUuid && (strlen(zTktUuid)!=40 || !validate16(zTktUuid,40)) ){
1113
+12 -12
--- src/wiki.c
+++ src/wiki.c
@@ -420,12 +420,12 @@
420420
if( rid ){
421421
char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
422422
blob_appendf(&wiki, "P %s\n", zUuid);
423423
free(zUuid);
424424
}
425
- if( g.zLogin ){
426
- blob_appendf(&wiki, "U %F\n", g.zLogin);
425
+ if( !login_is_nobody() ){
426
+ blob_appendf(&wiki, "U %F\n", login_name());
427427
}
428428
blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody);
429429
md5sum_blob(&wiki, &cksum);
430430
blob_appendf(&wiki, "Z %b\n", &cksum);
431431
blob_reset(&cksum);
@@ -558,25 +558,25 @@
558558
zRemark = PD("r","");
559559
zUser = PD("u",g.zLogin);
560560
if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){
561561
zId = db_text(0, "SELECT lower(hex(randomblob(8)))");
562562
blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h",
563
- zId, zDate, g.zLogin);
564
- if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){
563
+ zId, zDate, login_name());
564
+ if( zUser[0] && fossil_strcmp(zUser,login_name()) ){
565565
blob_appendf(p, " (claiming to be %h)", zUser);
566566
}
567567
blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId);
568568
}else if( fossil_strcmp(zMimetype, "text/x-markdown")==0 ){
569
- blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, g.zLogin);
570
- if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){
569
+ blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, login_name());
570
+ if( zUser[0] && fossil_strcmp(zUser,login_name()) ){
571571
blob_appendf(p, " (claiming to be %h)", zUser);
572572
}
573573
blob_appendf(p, " added:*\n\n%s\n", zRemark);
574574
}else{
575575
blob_appendf(p, "\n\n------------------------------------------------\n"
576
- "On %s UTC %s", zDate, g.zLogin);
577
- if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){
576
+ "On %s UTC %s", zDate, login_name());
577
+ if( zUser[0] && fossil_strcmp(zUser,login_name()) ){
578578
blob_appendf(p, " (claiming to be %s)", zUser);
579579
}
580580
blob_appendf(p, " added:\n\n%s\n", zRemark);
581581
}
582582
fossil_free(zDate);
@@ -650,12 +650,12 @@
650650
if( rid ){
651651
char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
652652
blob_appendf(&wiki, "P %s\n", zUuid);
653653
free(zUuid);
654654
}
655
- if( g.zLogin ){
656
- blob_appendf(&wiki, "U %F\n", g.zLogin);
655
+ if( !login_is_nobody() ){
656
+ blob_appendf(&wiki, "U %F\n", login_name());
657657
}
658658
appendRemark(&body, zMimetype);
659659
blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body));
660660
md5sum_blob(&wiki, &cksum);
661661
blob_appendf(&wiki, "Z %b\n", &cksum);
@@ -993,12 +993,12 @@
993993
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
994994
blob_appendf(&wiki, "P %s\n", zUuid);
995995
free(zUuid);
996996
}
997997
user_select();
998
- if( g.zLogin ){
999
- blob_appendf(&wiki, "U %F\n", g.zLogin);
998
+ if( !login_is_nobody() ){
999
+ blob_appendf(&wiki, "U %F\n", login_name());
10001000
}
10011001
blob_appendf( &wiki, "W %d\n%s\n", blob_size(pContent),
10021002
blob_str(pContent) );
10031003
md5sum_blob(&wiki, &cksum);
10041004
blob_appendf(&wiki, "Z %b\n", &cksum);
10051005
--- src/wiki.c
+++ src/wiki.c
@@ -420,12 +420,12 @@
420 if( rid ){
421 char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
422 blob_appendf(&wiki, "P %s\n", zUuid);
423 free(zUuid);
424 }
425 if( g.zLogin ){
426 blob_appendf(&wiki, "U %F\n", g.zLogin);
427 }
428 blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody);
429 md5sum_blob(&wiki, &cksum);
430 blob_appendf(&wiki, "Z %b\n", &cksum);
431 blob_reset(&cksum);
@@ -558,25 +558,25 @@
558 zRemark = PD("r","");
559 zUser = PD("u",g.zLogin);
560 if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){
561 zId = db_text(0, "SELECT lower(hex(randomblob(8)))");
562 blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h",
563 zId, zDate, g.zLogin);
564 if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){
565 blob_appendf(p, " (claiming to be %h)", zUser);
566 }
567 blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId);
568 }else if( fossil_strcmp(zMimetype, "text/x-markdown")==0 ){
569 blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, g.zLogin);
570 if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){
571 blob_appendf(p, " (claiming to be %h)", zUser);
572 }
573 blob_appendf(p, " added:*\n\n%s\n", zRemark);
574 }else{
575 blob_appendf(p, "\n\n------------------------------------------------\n"
576 "On %s UTC %s", zDate, g.zLogin);
577 if( zUser[0] && fossil_strcmp(zUser,g.zLogin) ){
578 blob_appendf(p, " (claiming to be %s)", zUser);
579 }
580 blob_appendf(p, " added:\n\n%s\n", zRemark);
581 }
582 fossil_free(zDate);
@@ -650,12 +650,12 @@
650 if( rid ){
651 char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
652 blob_appendf(&wiki, "P %s\n", zUuid);
653 free(zUuid);
654 }
655 if( g.zLogin ){
656 blob_appendf(&wiki, "U %F\n", g.zLogin);
657 }
658 appendRemark(&body, zMimetype);
659 blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body));
660 md5sum_blob(&wiki, &cksum);
661 blob_appendf(&wiki, "Z %b\n", &cksum);
@@ -993,12 +993,12 @@
993 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
994 blob_appendf(&wiki, "P %s\n", zUuid);
995 free(zUuid);
996 }
997 user_select();
998 if( g.zLogin ){
999 blob_appendf(&wiki, "U %F\n", g.zLogin);
1000 }
1001 blob_appendf( &wiki, "W %d\n%s\n", blob_size(pContent),
1002 blob_str(pContent) );
1003 md5sum_blob(&wiki, &cksum);
1004 blob_appendf(&wiki, "Z %b\n", &cksum);
1005
--- src/wiki.c
+++ src/wiki.c
@@ -420,12 +420,12 @@
420 if( rid ){
421 char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
422 blob_appendf(&wiki, "P %s\n", zUuid);
423 free(zUuid);
424 }
425 if( !login_is_nobody() ){
426 blob_appendf(&wiki, "U %F\n", login_name());
427 }
428 blob_appendf(&wiki, "W %d\n%s\n", strlen(zBody), zBody);
429 md5sum_blob(&wiki, &cksum);
430 blob_appendf(&wiki, "Z %b\n", &cksum);
431 blob_reset(&cksum);
@@ -558,25 +558,25 @@
558 zRemark = PD("r","");
559 zUser = PD("u",g.zLogin);
560 if( fossil_strcmp(zMimetype, "text/x-fossil-wiki")==0 ){
561 zId = db_text(0, "SELECT lower(hex(randomblob(8)))");
562 blob_appendf(p, "\n\n<hr><div id=\"%s\"><i>On %s UTC %h",
563 zId, zDate, login_name());
564 if( zUser[0] && fossil_strcmp(zUser,login_name()) ){
565 blob_appendf(p, " (claiming to be %h)", zUser);
566 }
567 blob_appendf(p, " added:</i><br />\n%s</div id=\"%s\">", zRemark, zId);
568 }else if( fossil_strcmp(zMimetype, "text/x-markdown")==0 ){
569 blob_appendf(p, "\n\n------\n*On %s UTC %h", zDate, login_name());
570 if( zUser[0] && fossil_strcmp(zUser,login_name()) ){
571 blob_appendf(p, " (claiming to be %h)", zUser);
572 }
573 blob_appendf(p, " added:*\n\n%s\n", zRemark);
574 }else{
575 blob_appendf(p, "\n\n------------------------------------------------\n"
576 "On %s UTC %s", zDate, login_name());
577 if( zUser[0] && fossil_strcmp(zUser,login_name()) ){
578 blob_appendf(p, " (claiming to be %s)", zUser);
579 }
580 blob_appendf(p, " added:\n\n%s\n", zRemark);
581 }
582 fossil_free(zDate);
@@ -650,12 +650,12 @@
650 if( rid ){
651 char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
652 blob_appendf(&wiki, "P %s\n", zUuid);
653 free(zUuid);
654 }
655 if( !login_is_nobody() ){
656 blob_appendf(&wiki, "U %F\n", login_name());
657 }
658 appendRemark(&body, zMimetype);
659 blob_appendf(&wiki, "W %d\n%s\n", blob_size(&body), blob_str(&body));
660 md5sum_blob(&wiki, &cksum);
661 blob_appendf(&wiki, "Z %b\n", &cksum);
@@ -993,12 +993,12 @@
993 zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
994 blob_appendf(&wiki, "P %s\n", zUuid);
995 free(zUuid);
996 }
997 user_select();
998 if( !login_is_nobody() ){
999 blob_appendf(&wiki, "U %F\n", login_name());
1000 }
1001 blob_appendf( &wiki, "W %d\n%s\n", blob_size(pContent),
1002 blob_str(pContent) );
1003 md5sum_blob(&wiki, &cksum);
1004 blob_appendf(&wiki, "Z %b\n", &cksum);
1005
+1
--- src/zip.c
+++ src/zip.c
@@ -427,10 +427,11 @@
427427
int nName, nRid;
428428
Blob zip;
429429
430430
login_check_credentials();
431431
if( !g.perm.Zip ){ login_needed(); return; }
432
+ load_control();
432433
zName = mprintf("%s", PD("name",""));
433434
nName = strlen(zName);
434435
zRid = mprintf("%s", PD("uuid","trunk"));
435436
nRid = strlen(zRid);
436437
for(nName=strlen(zName)-1; nName>5; nName--){
437438
--- src/zip.c
+++ src/zip.c
@@ -427,10 +427,11 @@
427 int nName, nRid;
428 Blob zip;
429
430 login_check_credentials();
431 if( !g.perm.Zip ){ login_needed(); return; }
 
432 zName = mprintf("%s", PD("name",""));
433 nName = strlen(zName);
434 zRid = mprintf("%s", PD("uuid","trunk"));
435 nRid = strlen(zRid);
436 for(nName=strlen(zName)-1; nName>5; nName--){
437
--- src/zip.c
+++ src/zip.c
@@ -427,10 +427,11 @@
427 int nName, nRid;
428 Blob zip;
429
430 login_check_credentials();
431 if( !g.perm.Zip ){ login_needed(); return; }
432 load_control();
433 zName = mprintf("%s", PD("name",""));
434 nName = strlen(zName);
435 zRid = mprintf("%s", PD("uuid","trunk"));
436 nRid = strlen(zRid);
437 for(nName=strlen(zName)-1; nName>5; nName--){
438
--- test/tester.tcl
+++ test/tester.tcl
@@ -139,10 +139,11 @@
139139
catch {exec $::fossilexe close -f}
140140
file delete $filename
141141
exec $::fossilexe new $filename
142142
exec $::fossilexe open $filename
143143
exec $::fossilexe clean -f
144
+ exec $::fossilexe set mtime-changes off
144145
}
145146
146147
# Normalize file status lists (like those returned by 'fossil changes')
147148
# so they can be compared using simple string comparison
148149
#
149150
--- test/tester.tcl
+++ test/tester.tcl
@@ -139,10 +139,11 @@
139 catch {exec $::fossilexe close -f}
140 file delete $filename
141 exec $::fossilexe new $filename
142 exec $::fossilexe open $filename
143 exec $::fossilexe clean -f
 
144 }
145
146 # Normalize file status lists (like those returned by 'fossil changes')
147 # so they can be compared using simple string comparison
148 #
149
--- test/tester.tcl
+++ test/tester.tcl
@@ -139,10 +139,11 @@
139 catch {exec $::fossilexe close -f}
140 file delete $filename
141 exec $::fossilexe new $filename
142 exec $::fossilexe open $filename
143 exec $::fossilexe clean -f
144 exec $::fossilexe set mtime-changes off
145 }
146
147 # Normalize file status lists (like those returned by 'fossil changes')
148 # so they can be compared using simple string comparison
149 #
150
--- test/utf16be.txt
+++ test/utf16be.txt
@@ -12,11 +12,11 @@
1212
1313
Test procedures:
1414
1515
1. Verify that this file is correctly display using the /artifact
1616
webpage.
17
-
17
+
1818
2. Verify that this file is correctly displayed by the /doc webpage.
1919
2020
3. Verify that changes to are correctly displayed by the /fdiff webpage.
2121
2222
4. Verify that the "fossil diff" command correctly displays changes
2323
--- test/utf16be.txt
+++ test/utf16be.txt
@@ -12,11 +12,11 @@
12
13 Test procedures:
14
15 1. Verify that this file is correctly display using the /artifact
16 webpage.
17
18 2. Verify that this file is correctly displayed by the /doc webpage.
19
20 3. Verify that changes to are correctly displayed by the /fdiff webpage.
21
22 4. Verify that the "fossil diff" command correctly displays changes
23
--- test/utf16be.txt
+++ test/utf16be.txt
@@ -12,11 +12,11 @@
12
13 Test procedures:
14
15 1. Verify that this file is correctly display using the /artifact
16 webpage.
17
18 2. Verify that this file is correctly displayed by the /doc webpage.
19
20 3. Verify that changes to are correctly displayed by the /fdiff webpage.
21
22 4. Verify that the "fossil diff" command correctly displays changes
23
--- test/utf16le.txt
+++ test/utf16le.txt
@@ -12,11 +12,11 @@
1212
1313
Test procedures:
1414
1515
1. Verify that this file is correctly display using the /artifact
1616
webpage.
17
-
17
+
1818
2. Verify that this file is correctly displayed by the /doc webpage.
1919
2020
3. Verify that changes to are correctly displayed by the /fdiff webpage.
2121
2222
4. Verify that the "fossil diff" command correctly displays changes
2323
--- test/utf16le.txt
+++ test/utf16le.txt
@@ -12,11 +12,11 @@
12
13 Test procedures:
14
15 1. Verify that this file is correctly display using the /artifact
16 webpage.
17
18 2. Verify that this file is correctly displayed by the /doc webpage.
19
20 3. Verify that changes to are correctly displayed by the /fdiff webpage.
21
22 4. Verify that the "fossil diff" command correctly displays changes
23
--- test/utf16le.txt
+++ test/utf16le.txt
@@ -12,11 +12,11 @@
12
13 Test procedures:
14
15 1. Verify that this file is correctly display using the /artifact
16 webpage.
17
18 2. Verify that this file is correctly displayed by the /doc webpage.
19
20 3. Verify that changes to are correctly displayed by the /fdiff webpage.
21
22 4. Verify that the "fossil diff" command correctly displays changes
23
+10 -4
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
2828
2929
SQLITE_OPTIONS = -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
3030
3131
SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
3232
33
-SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.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 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 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 pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.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
33
+SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.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 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 pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.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
3434
35
-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)\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)\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)\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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$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)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$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
35
+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)\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)\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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$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)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$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
3636
3737
3838
RC=$(DMDIR)\bin\rcc
3939
RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
4040
@@ -48,11 +48,11 @@
4848
4949
$(OBJDIR)\fossil.res: $B\win\fossil.rc
5050
$(RC) $(RCFLAGS) -o$@ $**
5151
5252
$(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
53
- +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo 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 login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat 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 > $@
53
+ +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo 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 pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat 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 > $@
5454
+echo fossil >> $@
5555
+echo fossil >> $@
5656
+echo $(LIBS) >> $@
5757
+echo. >> $@
5858
+echo fossil >> $@
@@ -436,10 +436,16 @@
436436
$(OBJDIR)\leaf$O : leaf_.c leaf.h
437437
$(TCC) -o$@ -c leaf_.c
438438
439439
leaf_.c : $(SRCDIR)\leaf.c
440440
+translate$E $** > $@
441
+
442
+$(OBJDIR)\loadctrl$O : loadctrl_.c loadctrl.h
443
+ $(TCC) -o$@ -c loadctrl_.c
444
+
445
+loadctrl_.c : $(SRCDIR)\loadctrl.c
446
+ +translate$E $** > $@
441447
442448
$(OBJDIR)\login$O : login_.c login.h
443449
$(TCC) -o$@ -c login_.c
444450
445451
login_.c : $(SRCDIR)\login.c
@@ -762,7 +768,7 @@
762768
763769
zip_.c : $(SRCDIR)\zip.c
764770
+translate$E $** > $@
765771
766772
headers: makeheaders$E page_index.h VERSION.h
767
- +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 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 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 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 pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.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 skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.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
773
+ +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 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 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 pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.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 skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.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
768774
@copy /Y nul: headers
769775
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
28
29 SQLITE_OPTIONS = -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
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.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 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 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 pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.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
34
35 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)\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)\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)\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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$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)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$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
36
37
38 RC=$(DMDIR)\bin\rcc
39 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
40
@@ -48,11 +48,11 @@
48
49 $(OBJDIR)\fossil.res: $B\win\fossil.rc
50 $(RC) $(RCFLAGS) -o$@ $**
51
52 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
53 +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo 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 login lookslike main manifest markdown markdown_html md5 merge merge3 moderate name path pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat 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 > $@
54 +echo fossil >> $@
55 +echo fossil >> $@
56 +echo $(LIBS) >> $@
57 +echo. >> $@
58 +echo fossil >> $@
@@ -436,10 +436,16 @@
436 $(OBJDIR)\leaf$O : leaf_.c leaf.h
437 $(TCC) -o$@ -c leaf_.c
438
439 leaf_.c : $(SRCDIR)\leaf.c
440 +translate$E $** > $@
 
 
 
 
 
 
441
442 $(OBJDIR)\login$O : login_.c login.h
443 $(TCC) -o$@ -c login_.c
444
445 login_.c : $(SRCDIR)\login.c
@@ -762,7 +768,7 @@
762
763 zip_.c : $(SRCDIR)\zip.c
764 +translate$E $** > $@
765
766 headers: makeheaders$E page_index.h VERSION.h
767 +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 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 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 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 pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.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 skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.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
768 @copy /Y nul: headers
769
--- win/Makefile.dmc
+++ win/Makefile.dmc
@@ -28,13 +28,13 @@
28
29 SQLITE_OPTIONS = -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
30
31 SHELL_OPTIONS = -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -DUSE_SYSTEM_SQLITE=$(USE_SYSTEM_SQLITE) -DSQLITE_SHELL_DBNAME_PROC=fossil_open -Daccess=win32_access -Dgetenv=fossil_getenv -Dfopen=fossil_fopen
32
33 SRC = add_.c allrepo_.c attach_.c bag_.c bisect_.c blob_.c branch_.c browse_.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 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 pivot_.c popen_.c pqueue_.c printf_.c rebuild_.c regexp_.c report_.c rss_.c schema_.c search_.c setup_.c sha1_.c shun_.c skins_.c sqlcmd_.c stash_.c stat_.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
34
35 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)\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)\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)\pivot$O $(OBJDIR)\popen$O $(OBJDIR)\pqueue$O $(OBJDIR)\printf$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)\skins$O $(OBJDIR)\sqlcmd$O $(OBJDIR)\stash$O $(OBJDIR)\stat$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
36
37
38 RC=$(DMDIR)\bin\rcc
39 RCFLAGS=-32 -w1 -I$(SRCDIR) /D__DMC__
40
@@ -48,11 +48,11 @@
48
49 $(OBJDIR)\fossil.res: $B\win\fossil.rc
50 $(RC) $(RCFLAGS) -o$@ $**
51
52 $(OBJDIR)\link: $B\win\Makefile.dmc $(OBJDIR)\fossil.res
53 +echo add allrepo attach bag bisect blob branch browse captcha cgi checkin checkout clearsign clone comformat configure content db delta deltacmd descendants diff diffcmd doc encode event export file finfo 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 pivot popen pqueue printf rebuild regexp report rss schema search setup sha1 shun skins sqlcmd stash stat 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 > $@
54 +echo fossil >> $@
55 +echo fossil >> $@
56 +echo $(LIBS) >> $@
57 +echo. >> $@
58 +echo fossil >> $@
@@ -436,10 +436,16 @@
436 $(OBJDIR)\leaf$O : leaf_.c leaf.h
437 $(TCC) -o$@ -c leaf_.c
438
439 leaf_.c : $(SRCDIR)\leaf.c
440 +translate$E $** > $@
441
442 $(OBJDIR)\loadctrl$O : loadctrl_.c loadctrl.h
443 $(TCC) -o$@ -c loadctrl_.c
444
445 loadctrl_.c : $(SRCDIR)\loadctrl.c
446 +translate$E $** > $@
447
448 $(OBJDIR)\login$O : login_.c login.h
449 $(TCC) -o$@ -c login_.c
450
451 login_.c : $(SRCDIR)\login.c
@@ -762,7 +768,7 @@
768
769 zip_.c : $(SRCDIR)\zip.c
770 +translate$E $** > $@
771
772 headers: makeheaders$E page_index.h VERSION.h
773 +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 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 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 pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.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 skins_.c:skins.h sqlcmd_.c:sqlcmd.h stash_.c:stash.h stat_.c:stat.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
774 @copy /Y nul: headers
775
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -309,10 +309,11 @@
309309
$(SRCDIR)/json_tag.c \
310310
$(SRCDIR)/json_timeline.c \
311311
$(SRCDIR)/json_user.c \
312312
$(SRCDIR)/json_wiki.c \
313313
$(SRCDIR)/leaf.c \
314
+ $(SRCDIR)/loadctrl.c \
314315
$(SRCDIR)/login.c \
315316
$(SRCDIR)/lookslike.c \
316317
$(SRCDIR)/main.c \
317318
$(SRCDIR)/manifest.c \
318319
$(SRCDIR)/markdown.c \
@@ -419,10 +420,11 @@
419420
$(OBJDIR)/json_tag_.c \
420421
$(OBJDIR)/json_timeline_.c \
421422
$(OBJDIR)/json_user_.c \
422423
$(OBJDIR)/json_wiki_.c \
423424
$(OBJDIR)/leaf_.c \
425
+ $(OBJDIR)/loadctrl_.c \
424426
$(OBJDIR)/login_.c \
425427
$(OBJDIR)/lookslike_.c \
426428
$(OBJDIR)/main_.c \
427429
$(OBJDIR)/manifest_.c \
428430
$(OBJDIR)/markdown_.c \
@@ -529,10 +531,11 @@
529531
$(OBJDIR)/json_tag.o \
530532
$(OBJDIR)/json_timeline.o \
531533
$(OBJDIR)/json_user.o \
532534
$(OBJDIR)/json_wiki.o \
533535
$(OBJDIR)/leaf.o \
536
+ $(OBJDIR)/loadctrl.o \
534537
$(OBJDIR)/login.o \
535538
$(OBJDIR)/lookslike.o \
536539
$(OBJDIR)/main.o \
537540
$(OBJDIR)/manifest.o \
538541
$(OBJDIR)/markdown.o \
@@ -771,10 +774,11 @@
771774
$(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \
772775
$(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \
773776
$(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \
774777
$(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \
775778
$(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \
779
+ $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \
776780
$(OBJDIR)/login_.c:$(OBJDIR)/login.h \
777781
$(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \
778782
$(OBJDIR)/main_.c:$(OBJDIR)/main.h \
779783
$(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \
780784
$(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \
@@ -1265,10 +1269,18 @@
12651269
12661270
$(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
12671271
$(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
12681272
12691273
$(OBJDIR)/leaf.h: $(OBJDIR)/headers
1274
+
1275
+$(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate
1276
+ $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c
1277
+
1278
+$(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h
1279
+ $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c
1280
+
1281
+$(OBJDIR)/loadctrl.h: $(OBJDIR)/headers
12701282
12711283
$(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate
12721284
$(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c
12731285
12741286
$(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h
12751287
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -309,10 +309,11 @@
309 $(SRCDIR)/json_tag.c \
310 $(SRCDIR)/json_timeline.c \
311 $(SRCDIR)/json_user.c \
312 $(SRCDIR)/json_wiki.c \
313 $(SRCDIR)/leaf.c \
 
314 $(SRCDIR)/login.c \
315 $(SRCDIR)/lookslike.c \
316 $(SRCDIR)/main.c \
317 $(SRCDIR)/manifest.c \
318 $(SRCDIR)/markdown.c \
@@ -419,10 +420,11 @@
419 $(OBJDIR)/json_tag_.c \
420 $(OBJDIR)/json_timeline_.c \
421 $(OBJDIR)/json_user_.c \
422 $(OBJDIR)/json_wiki_.c \
423 $(OBJDIR)/leaf_.c \
 
424 $(OBJDIR)/login_.c \
425 $(OBJDIR)/lookslike_.c \
426 $(OBJDIR)/main_.c \
427 $(OBJDIR)/manifest_.c \
428 $(OBJDIR)/markdown_.c \
@@ -529,10 +531,11 @@
529 $(OBJDIR)/json_tag.o \
530 $(OBJDIR)/json_timeline.o \
531 $(OBJDIR)/json_user.o \
532 $(OBJDIR)/json_wiki.o \
533 $(OBJDIR)/leaf.o \
 
534 $(OBJDIR)/login.o \
535 $(OBJDIR)/lookslike.o \
536 $(OBJDIR)/main.o \
537 $(OBJDIR)/manifest.o \
538 $(OBJDIR)/markdown.o \
@@ -771,10 +774,11 @@
771 $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \
772 $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \
773 $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \
774 $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \
775 $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \
 
776 $(OBJDIR)/login_.c:$(OBJDIR)/login.h \
777 $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \
778 $(OBJDIR)/main_.c:$(OBJDIR)/main.h \
779 $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \
780 $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \
@@ -1265,10 +1269,18 @@
1265
1266 $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
1267 $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
1268
1269 $(OBJDIR)/leaf.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1270
1271 $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate
1272 $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c
1273
1274 $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h
1275
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -309,10 +309,11 @@
309 $(SRCDIR)/json_tag.c \
310 $(SRCDIR)/json_timeline.c \
311 $(SRCDIR)/json_user.c \
312 $(SRCDIR)/json_wiki.c \
313 $(SRCDIR)/leaf.c \
314 $(SRCDIR)/loadctrl.c \
315 $(SRCDIR)/login.c \
316 $(SRCDIR)/lookslike.c \
317 $(SRCDIR)/main.c \
318 $(SRCDIR)/manifest.c \
319 $(SRCDIR)/markdown.c \
@@ -419,10 +420,11 @@
420 $(OBJDIR)/json_tag_.c \
421 $(OBJDIR)/json_timeline_.c \
422 $(OBJDIR)/json_user_.c \
423 $(OBJDIR)/json_wiki_.c \
424 $(OBJDIR)/leaf_.c \
425 $(OBJDIR)/loadctrl_.c \
426 $(OBJDIR)/login_.c \
427 $(OBJDIR)/lookslike_.c \
428 $(OBJDIR)/main_.c \
429 $(OBJDIR)/manifest_.c \
430 $(OBJDIR)/markdown_.c \
@@ -529,10 +531,11 @@
531 $(OBJDIR)/json_tag.o \
532 $(OBJDIR)/json_timeline.o \
533 $(OBJDIR)/json_user.o \
534 $(OBJDIR)/json_wiki.o \
535 $(OBJDIR)/leaf.o \
536 $(OBJDIR)/loadctrl.o \
537 $(OBJDIR)/login.o \
538 $(OBJDIR)/lookslike.o \
539 $(OBJDIR)/main.o \
540 $(OBJDIR)/manifest.o \
541 $(OBJDIR)/markdown.o \
@@ -771,10 +774,11 @@
774 $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \
775 $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \
776 $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \
777 $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \
778 $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \
779 $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \
780 $(OBJDIR)/login_.c:$(OBJDIR)/login.h \
781 $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \
782 $(OBJDIR)/main_.c:$(OBJDIR)/main.h \
783 $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \
784 $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \
@@ -1265,10 +1269,18 @@
1269
1270 $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
1271 $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
1272
1273 $(OBJDIR)/leaf.h: $(OBJDIR)/headers
1274
1275 $(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate
1276 $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c
1277
1278 $(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h
1279 $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c
1280
1281 $(OBJDIR)/loadctrl.h: $(OBJDIR)/headers
1282
1283 $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate
1284 $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c
1285
1286 $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h
1287
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -309,10 +309,11 @@
309309
$(SRCDIR)/json_tag.c \
310310
$(SRCDIR)/json_timeline.c \
311311
$(SRCDIR)/json_user.c \
312312
$(SRCDIR)/json_wiki.c \
313313
$(SRCDIR)/leaf.c \
314
+ $(SRCDIR)/loadctrl.c \
314315
$(SRCDIR)/login.c \
315316
$(SRCDIR)/lookslike.c \
316317
$(SRCDIR)/main.c \
317318
$(SRCDIR)/manifest.c \
318319
$(SRCDIR)/markdown.c \
@@ -419,10 +420,11 @@
419420
$(OBJDIR)/json_tag_.c \
420421
$(OBJDIR)/json_timeline_.c \
421422
$(OBJDIR)/json_user_.c \
422423
$(OBJDIR)/json_wiki_.c \
423424
$(OBJDIR)/leaf_.c \
425
+ $(OBJDIR)/loadctrl_.c \
424426
$(OBJDIR)/login_.c \
425427
$(OBJDIR)/lookslike_.c \
426428
$(OBJDIR)/main_.c \
427429
$(OBJDIR)/manifest_.c \
428430
$(OBJDIR)/markdown_.c \
@@ -529,10 +531,11 @@
529531
$(OBJDIR)/json_tag.o \
530532
$(OBJDIR)/json_timeline.o \
531533
$(OBJDIR)/json_user.o \
532534
$(OBJDIR)/json_wiki.o \
533535
$(OBJDIR)/leaf.o \
536
+ $(OBJDIR)/loadctrl.o \
534537
$(OBJDIR)/login.o \
535538
$(OBJDIR)/lookslike.o \
536539
$(OBJDIR)/main.o \
537540
$(OBJDIR)/manifest.o \
538541
$(OBJDIR)/markdown.o \
@@ -771,10 +774,11 @@
771774
$(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \
772775
$(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \
773776
$(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \
774777
$(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \
775778
$(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \
779
+ $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \
776780
$(OBJDIR)/login_.c:$(OBJDIR)/login.h \
777781
$(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \
778782
$(OBJDIR)/main_.c:$(OBJDIR)/main.h \
779783
$(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \
780784
$(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \
@@ -1265,10 +1269,18 @@
12651269
12661270
$(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
12671271
$(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
12681272
12691273
$(OBJDIR)/leaf.h: $(OBJDIR)/headers
1274
+
1275
+$(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate
1276
+ $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c
1277
+
1278
+$(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h
1279
+ $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c
1280
+
1281
+$(OBJDIR)/loadctrl.h: $(OBJDIR)/headers
12701282
12711283
$(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate
12721284
$(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c
12731285
12741286
$(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h
12751287
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -309,10 +309,11 @@
309 $(SRCDIR)/json_tag.c \
310 $(SRCDIR)/json_timeline.c \
311 $(SRCDIR)/json_user.c \
312 $(SRCDIR)/json_wiki.c \
313 $(SRCDIR)/leaf.c \
 
314 $(SRCDIR)/login.c \
315 $(SRCDIR)/lookslike.c \
316 $(SRCDIR)/main.c \
317 $(SRCDIR)/manifest.c \
318 $(SRCDIR)/markdown.c \
@@ -419,10 +420,11 @@
419 $(OBJDIR)/json_tag_.c \
420 $(OBJDIR)/json_timeline_.c \
421 $(OBJDIR)/json_user_.c \
422 $(OBJDIR)/json_wiki_.c \
423 $(OBJDIR)/leaf_.c \
 
424 $(OBJDIR)/login_.c \
425 $(OBJDIR)/lookslike_.c \
426 $(OBJDIR)/main_.c \
427 $(OBJDIR)/manifest_.c \
428 $(OBJDIR)/markdown_.c \
@@ -529,10 +531,11 @@
529 $(OBJDIR)/json_tag.o \
530 $(OBJDIR)/json_timeline.o \
531 $(OBJDIR)/json_user.o \
532 $(OBJDIR)/json_wiki.o \
533 $(OBJDIR)/leaf.o \
 
534 $(OBJDIR)/login.o \
535 $(OBJDIR)/lookslike.o \
536 $(OBJDIR)/main.o \
537 $(OBJDIR)/manifest.o \
538 $(OBJDIR)/markdown.o \
@@ -771,10 +774,11 @@
771 $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \
772 $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \
773 $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \
774 $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \
775 $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \
 
776 $(OBJDIR)/login_.c:$(OBJDIR)/login.h \
777 $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \
778 $(OBJDIR)/main_.c:$(OBJDIR)/main.h \
779 $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \
780 $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \
@@ -1265,10 +1269,18 @@
1265
1266 $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
1267 $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
1268
1269 $(OBJDIR)/leaf.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
 
1270
1271 $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate
1272 $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c
1273
1274 $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h
1275
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -309,10 +309,11 @@
309 $(SRCDIR)/json_tag.c \
310 $(SRCDIR)/json_timeline.c \
311 $(SRCDIR)/json_user.c \
312 $(SRCDIR)/json_wiki.c \
313 $(SRCDIR)/leaf.c \
314 $(SRCDIR)/loadctrl.c \
315 $(SRCDIR)/login.c \
316 $(SRCDIR)/lookslike.c \
317 $(SRCDIR)/main.c \
318 $(SRCDIR)/manifest.c \
319 $(SRCDIR)/markdown.c \
@@ -419,10 +420,11 @@
420 $(OBJDIR)/json_tag_.c \
421 $(OBJDIR)/json_timeline_.c \
422 $(OBJDIR)/json_user_.c \
423 $(OBJDIR)/json_wiki_.c \
424 $(OBJDIR)/leaf_.c \
425 $(OBJDIR)/loadctrl_.c \
426 $(OBJDIR)/login_.c \
427 $(OBJDIR)/lookslike_.c \
428 $(OBJDIR)/main_.c \
429 $(OBJDIR)/manifest_.c \
430 $(OBJDIR)/markdown_.c \
@@ -529,10 +531,11 @@
531 $(OBJDIR)/json_tag.o \
532 $(OBJDIR)/json_timeline.o \
533 $(OBJDIR)/json_user.o \
534 $(OBJDIR)/json_wiki.o \
535 $(OBJDIR)/leaf.o \
536 $(OBJDIR)/loadctrl.o \
537 $(OBJDIR)/login.o \
538 $(OBJDIR)/lookslike.o \
539 $(OBJDIR)/main.o \
540 $(OBJDIR)/manifest.o \
541 $(OBJDIR)/markdown.o \
@@ -771,10 +774,11 @@
774 $(OBJDIR)/json_tag_.c:$(OBJDIR)/json_tag.h \
775 $(OBJDIR)/json_timeline_.c:$(OBJDIR)/json_timeline.h \
776 $(OBJDIR)/json_user_.c:$(OBJDIR)/json_user.h \
777 $(OBJDIR)/json_wiki_.c:$(OBJDIR)/json_wiki.h \
778 $(OBJDIR)/leaf_.c:$(OBJDIR)/leaf.h \
779 $(OBJDIR)/loadctrl_.c:$(OBJDIR)/loadctrl.h \
780 $(OBJDIR)/login_.c:$(OBJDIR)/login.h \
781 $(OBJDIR)/lookslike_.c:$(OBJDIR)/lookslike.h \
782 $(OBJDIR)/main_.c:$(OBJDIR)/main.h \
783 $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h \
784 $(OBJDIR)/markdown_.c:$(OBJDIR)/markdown.h \
@@ -1265,10 +1269,18 @@
1269
1270 $(OBJDIR)/leaf.o: $(OBJDIR)/leaf_.c $(OBJDIR)/leaf.h $(SRCDIR)/config.h
1271 $(XTCC) -o $(OBJDIR)/leaf.o -c $(OBJDIR)/leaf_.c
1272
1273 $(OBJDIR)/leaf.h: $(OBJDIR)/headers
1274
1275 $(OBJDIR)/loadctrl_.c: $(SRCDIR)/loadctrl.c $(OBJDIR)/translate
1276 $(TRANSLATE) $(SRCDIR)/loadctrl.c >$(OBJDIR)/loadctrl_.c
1277
1278 $(OBJDIR)/loadctrl.o: $(OBJDIR)/loadctrl_.c $(OBJDIR)/loadctrl.h $(SRCDIR)/config.h
1279 $(XTCC) -o $(OBJDIR)/loadctrl.o -c $(OBJDIR)/loadctrl_.c
1280
1281 $(OBJDIR)/loadctrl.h: $(OBJDIR)/headers
1282
1283 $(OBJDIR)/login_.c: $(SRCDIR)/login.c $(OBJDIR)/translate
1284 $(TRANSLATE) $(SRCDIR)/login.c >$(OBJDIR)/login_.c
1285
1286 $(OBJDIR)/login.o: $(OBJDIR)/login_.c $(OBJDIR)/login.h $(SRCDIR)/config.h
1287
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -160,10 +160,11 @@
160160
json_tag_.c \
161161
json_timeline_.c \
162162
json_user_.c \
163163
json_wiki_.c \
164164
leaf_.c \
165
+ loadctrl_.c \
165166
login_.c \
166167
lookslike_.c \
167168
main_.c \
168169
manifest_.c \
169170
markdown_.c \
@@ -270,10 +271,11 @@
270271
$(OX)\json_tag$O \
271272
$(OX)\json_timeline$O \
272273
$(OX)\json_user$O \
273274
$(OX)\json_wiki$O \
274275
$(OX)\leaf$O \
276
+ $(OX)\loadctrl$O \
275277
$(OX)\login$O \
276278
$(OX)\lookslike$O \
277279
$(OX)\main$O \
278280
$(OX)\manifest$O \
279281
$(OX)\markdown$O \
@@ -403,10 +405,11 @@
403405
echo $(OX)\json_tag.obj >> $@
404406
echo $(OX)\json_timeline.obj >> $@
405407
echo $(OX)\json_user.obj >> $@
406408
echo $(OX)\json_wiki.obj >> $@
407409
echo $(OX)\leaf.obj >> $@
410
+ echo $(OX)\loadctrl.obj >> $@
408411
echo $(OX)\login.obj >> $@
409412
echo $(OX)\lookslike.obj >> $@
410413
echo $(OX)\main.obj >> $@
411414
echo $(OX)\manifest.obj >> $@
412415
echo $(OX)\markdown.obj >> $@
@@ -864,10 +867,16 @@
864867
$(OX)\leaf$O : leaf_.c leaf.h
865868
$(TCC) /Fo$@ -c leaf_.c
866869
867870
leaf_.c : $(SRCDIR)\leaf.c
868871
translate$E $** > $@
872
+
873
+$(OX)\loadctrl$O : loadctrl_.c loadctrl.h
874
+ $(TCC) /Fo$@ -c loadctrl_.c
875
+
876
+loadctrl_.c : $(SRCDIR)\loadctrl.c
877
+ translate$E $** > $@
869878
870879
$(OX)\login$O : login_.c login.h
871880
$(TCC) /Fo$@ -c login_.c
872881
873882
login_.c : $(SRCDIR)\login.c
@@ -1247,10 +1256,11 @@
12471256
json_tag_.c:json_tag.h \
12481257
json_timeline_.c:json_timeline.h \
12491258
json_user_.c:json_user.h \
12501259
json_wiki_.c:json_wiki.h \
12511260
leaf_.c:leaf.h \
1261
+ loadctrl_.c:loadctrl.h \
12521262
login_.c:login.h \
12531263
lookslike_.c:lookslike.h \
12541264
main_.c:main.h \
12551265
manifest_.c:manifest.h \
12561266
markdown_.c:markdown.h \
12571267
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -160,10 +160,11 @@
160 json_tag_.c \
161 json_timeline_.c \
162 json_user_.c \
163 json_wiki_.c \
164 leaf_.c \
 
165 login_.c \
166 lookslike_.c \
167 main_.c \
168 manifest_.c \
169 markdown_.c \
@@ -270,10 +271,11 @@
270 $(OX)\json_tag$O \
271 $(OX)\json_timeline$O \
272 $(OX)\json_user$O \
273 $(OX)\json_wiki$O \
274 $(OX)\leaf$O \
 
275 $(OX)\login$O \
276 $(OX)\lookslike$O \
277 $(OX)\main$O \
278 $(OX)\manifest$O \
279 $(OX)\markdown$O \
@@ -403,10 +405,11 @@
403 echo $(OX)\json_tag.obj >> $@
404 echo $(OX)\json_timeline.obj >> $@
405 echo $(OX)\json_user.obj >> $@
406 echo $(OX)\json_wiki.obj >> $@
407 echo $(OX)\leaf.obj >> $@
 
408 echo $(OX)\login.obj >> $@
409 echo $(OX)\lookslike.obj >> $@
410 echo $(OX)\main.obj >> $@
411 echo $(OX)\manifest.obj >> $@
412 echo $(OX)\markdown.obj >> $@
@@ -864,10 +867,16 @@
864 $(OX)\leaf$O : leaf_.c leaf.h
865 $(TCC) /Fo$@ -c leaf_.c
866
867 leaf_.c : $(SRCDIR)\leaf.c
868 translate$E $** > $@
 
 
 
 
 
 
869
870 $(OX)\login$O : login_.c login.h
871 $(TCC) /Fo$@ -c login_.c
872
873 login_.c : $(SRCDIR)\login.c
@@ -1247,10 +1256,11 @@
1247 json_tag_.c:json_tag.h \
1248 json_timeline_.c:json_timeline.h \
1249 json_user_.c:json_user.h \
1250 json_wiki_.c:json_wiki.h \
1251 leaf_.c:leaf.h \
 
1252 login_.c:login.h \
1253 lookslike_.c:lookslike.h \
1254 main_.c:main.h \
1255 manifest_.c:manifest.h \
1256 markdown_.c:markdown.h \
1257
--- win/Makefile.msc
+++ win/Makefile.msc
@@ -160,10 +160,11 @@
160 json_tag_.c \
161 json_timeline_.c \
162 json_user_.c \
163 json_wiki_.c \
164 leaf_.c \
165 loadctrl_.c \
166 login_.c \
167 lookslike_.c \
168 main_.c \
169 manifest_.c \
170 markdown_.c \
@@ -270,10 +271,11 @@
271 $(OX)\json_tag$O \
272 $(OX)\json_timeline$O \
273 $(OX)\json_user$O \
274 $(OX)\json_wiki$O \
275 $(OX)\leaf$O \
276 $(OX)\loadctrl$O \
277 $(OX)\login$O \
278 $(OX)\lookslike$O \
279 $(OX)\main$O \
280 $(OX)\manifest$O \
281 $(OX)\markdown$O \
@@ -403,10 +405,11 @@
405 echo $(OX)\json_tag.obj >> $@
406 echo $(OX)\json_timeline.obj >> $@
407 echo $(OX)\json_user.obj >> $@
408 echo $(OX)\json_wiki.obj >> $@
409 echo $(OX)\leaf.obj >> $@
410 echo $(OX)\loadctrl.obj >> $@
411 echo $(OX)\login.obj >> $@
412 echo $(OX)\lookslike.obj >> $@
413 echo $(OX)\main.obj >> $@
414 echo $(OX)\manifest.obj >> $@
415 echo $(OX)\markdown.obj >> $@
@@ -864,10 +867,16 @@
867 $(OX)\leaf$O : leaf_.c leaf.h
868 $(TCC) /Fo$@ -c leaf_.c
869
870 leaf_.c : $(SRCDIR)\leaf.c
871 translate$E $** > $@
872
873 $(OX)\loadctrl$O : loadctrl_.c loadctrl.h
874 $(TCC) /Fo$@ -c loadctrl_.c
875
876 loadctrl_.c : $(SRCDIR)\loadctrl.c
877 translate$E $** > $@
878
879 $(OX)\login$O : login_.c login.h
880 $(TCC) /Fo$@ -c login_.c
881
882 login_.c : $(SRCDIR)\login.c
@@ -1247,10 +1256,11 @@
1256 json_tag_.c:json_tag.h \
1257 json_timeline_.c:json_timeline.h \
1258 json_user_.c:json_user.h \
1259 json_wiki_.c:json_wiki.h \
1260 leaf_.c:leaf.h \
1261 loadctrl_.c:loadctrl.h \
1262 login_.c:login.h \
1263 lookslike_.c:lookslike.h \
1264 main_.c:main.h \
1265 manifest_.c:manifest.h \
1266 markdown_.c:markdown.h \
1267
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,10 +1,10 @@
11
<title>Change Log</title>
22
33
<h2>Changes For Version 1.29 (as yet unreleased)</h2>
4
- * Add the ability to display content and diffs for UTF16 text files
5
- in the web interface.
4
+ * Add the ability to display content, diffs and annotations for UTF16
5
+ text files in the web interface.
66
* Add the "SaveAs..." button to the graphical diff display that results
77
from using the --tk option with the [/help/diff | fossil diff] command.
88
* Honor timezones in imports from git.
99
* The [/reports] page now requires Read ("o") permissions. The "byweek"
1010
report now properly propagates the selected year through the event type
@@ -11,14 +11,13 @@
1111
filter links.
1212
* The [/help/info | info command] now shows leaf status of the checkout.
1313
* Add support for tunneling https through a http proxy (Ticket [e854101c4f]).
1414
* Add option --empty to the "[/help?cmd=open | fossil open]" command.
1515
* Enhanced [/help?cmd=/fileage|the fileage page] to support a glob parameter.
16
- * Add --ignore-space-at-sol and --ignore-space-at-eol options to
16
+ * Add -w|--ignore-all-space and -Z|--ignore-trailing-space options to
1717
[/help?cmd=annotate|fossil annotate], [/help?cmd=blame|fossil blame],
1818
[/help?cmd=diff|fossil (g)diff], [/help?cmd=stash|fossil stash diff].
19
- The option -w activates both of them.
2019
* Add button "Ignore Whitespace" to /annotate, /blame, /ci, /fdiff
2120
and /vdiff UI pages.
2221
2322
<h2>Changes For Version 1.28 (2014-01-27)</h2>
2423
* Enhance [/help?cmd=/reports | /reports] to support event type filtering.
2524
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,10 +1,10 @@
1 <title>Change Log</title>
2
3 <h2>Changes For Version 1.29 (as yet unreleased)</h2>
4 * Add the ability to display content and diffs for UTF16 text files
5 in the web interface.
6 * Add the "SaveAs..." button to the graphical diff display that results
7 from using the --tk option with the [/help/diff | fossil diff] command.
8 * Honor timezones in imports from git.
9 * The [/reports] page now requires Read ("o") permissions. The "byweek"
10 report now properly propagates the selected year through the event type
@@ -11,14 +11,13 @@
11 filter links.
12 * The [/help/info | info command] now shows leaf status of the checkout.
13 * Add support for tunneling https through a http proxy (Ticket [e854101c4f]).
14 * Add option --empty to the "[/help?cmd=open | fossil open]" command.
15 * Enhanced [/help?cmd=/fileage|the fileage page] to support a glob parameter.
16 * Add --ignore-space-at-sol and --ignore-space-at-eol options to
17 [/help?cmd=annotate|fossil annotate], [/help?cmd=blame|fossil blame],
18 [/help?cmd=diff|fossil (g)diff], [/help?cmd=stash|fossil stash diff].
19 The option -w activates both of them.
20 * Add button "Ignore Whitespace" to /annotate, /blame, /ci, /fdiff
21 and /vdiff UI pages.
22
23 <h2>Changes For Version 1.28 (2014-01-27)</h2>
24 * Enhance [/help?cmd=/reports | /reports] to support event type filtering.
25
--- www/changes.wiki
+++ www/changes.wiki
@@ -1,10 +1,10 @@
1 <title>Change Log</title>
2
3 <h2>Changes For Version 1.29 (as yet unreleased)</h2>
4 * Add the ability to display content, diffs and annotations for UTF16
5 text files in the web interface.
6 * Add the "SaveAs..." button to the graphical diff display that results
7 from using the --tk option with the [/help/diff | fossil diff] command.
8 * Honor timezones in imports from git.
9 * The [/reports] page now requires Read ("o") permissions. The "byweek"
10 report now properly propagates the selected year through the event type
@@ -11,14 +11,13 @@
11 filter links.
12 * The [/help/info | info command] now shows leaf status of the checkout.
13 * Add support for tunneling https through a http proxy (Ticket [e854101c4f]).
14 * Add option --empty to the "[/help?cmd=open | fossil open]" command.
15 * Enhanced [/help?cmd=/fileage|the fileage page] to support a glob parameter.
16 * Add -w|--ignore-all-space and -Z|--ignore-trailing-space options to
17 [/help?cmd=annotate|fossil annotate], [/help?cmd=blame|fossil blame],
18 [/help?cmd=diff|fossil (g)diff], [/help?cmd=stash|fossil stash diff].
 
19 * Add button "Ignore Whitespace" to /annotate, /blame, /ci, /fdiff
20 and /vdiff UI pages.
21
22 <h2>Changes For Version 1.28 (2014-01-27)</h2>
23 * Enhance [/help?cmd=/reports | /reports] to support event type filtering.
24
--- www/server.wiki
+++ www/server.wiki
@@ -241,6 +241,73 @@
241241
<p>
242242
For more information, see <a href="./ssl.wiki">Using SSL with Fossil</a>.
243243
</p>
244244
</blockquote>
245245
246
+<a name="loadmgmt"></a>
247
+<h2>Managing Server Load</h2><blockquote>
248
+<p>
249
+A Fossil server is very efficient and normally presents a very light
250
+load on the server.
251
+The Fossil [./selfhost.wiki | self-host server] is a 1/24th slice VM at
252
+[http://www.linode.com | Linode.com] hosting 65 other repositories in
253
+addition to Fossil (and including some very high-traffic sites such
254
+as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and
255
+it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil
256
+normally takes less than 10 milliseconds of CPU time to complete. So
257
+requests can be arriving at a continuous rate of 20 or more per second
258
+and the CPU can still be mostly idle.
259
+<p>
260
+However, there are some Fossil web pages that can consume large
261
+amounts of CPU time, expecially on repositories with a large number
262
+of files or with long revision histories. High CPU usage pages include
263
+[/help?cmd=/zip | /zip], [/help?cmd=/tarball | /tarball],
264
+[/help?cmd=/annotate | /annotate] and others. On very large repositories,
265
+these commands can take 15 seconds or more of CPU time.
266
+If these kinds of requests arrive too quickly, the load average on the
267
+server can grow dramatically, making the server unresponsive.
268
+<p>
269
+To help avoid problems, Fossil has the ability to fail CPU-intensive
270
+web page requests with a
271
+[http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"]
272
+HTTP error if an expensive request is received while the host load
273
+average is too high. To activate this
274
+feature, visit the /Admin/Access setup page in the administrative web
275
+interface and in the "<b>Server Load Average Limit</b>" box
276
+enter the load average threshold above which "503 Server
277
+Overload" replies will be issued for expensive requests. On the
278
+self-host Fossil server, that value is set to 1.5. But you could easily
279
+set it higher on a multi-core server.
280
+<p>
281
+The maximum load average can also be set on the command line using
282
+commands like this:
283
+<blockquote><pre>
284
+fossil set max-loadavg 1.5
285
+fossil all set max-loadavg 1.5
286
+</pre></blockquote>
287
+The second form is especially useful for changing the maximum load average
288
+simultaneously on a large number of repositories.
289
+<p>
290
+Note that this load-average limiting feature is only available on operating
291
+systems that support the "getloadavg()" API. Most modern unix systems have
292
+this interface, but Windows does not, so the feature will not work on Windows.
293
+Note also that Linux implements "getloadavg()" by accessing the "/proc/loadavg"
294
+file in the "proc" virtual filesystem. If you are running a Fossil instance
295
+inside a chroot() jail on Linux, you will need to make the "/proc" file
296
+system available inside that jail in order for this feature to work. On
297
+the self-hosting Fossil repository, this was accomplished by adding a line
298
+to the "/etc/mtab" file that looks like:
299
+<blockquote><pre>
300
+chroot_jail_proc /home/www/proc proc r 0 0
301
+</pre></blockquote>
302
+Pathnames should be adjusted for individual systems, of course.
303
+<p>
304
+To see if the load-average limiter is functional, visit the [/test_env] page
305
+of the server to view the current load average. If the value for the load
306
+average is greater than zero, that means that it is possible to activate
307
+the load-average limiter on that repository. If the load average shows
308
+exactly "0.0", then that means that Fossil is unable to find the load average
309
+(either because it is in a chroot() jail without /proc access, or because
310
+it is running on a system that does not support "getloadavg()") and so the
311
+load-average limiter will not function.
312
+
246313
</blockquote>
247314
--- www/server.wiki
+++ www/server.wiki
@@ -241,6 +241,73 @@
241 <p>
242 For more information, see <a href="./ssl.wiki">Using SSL with Fossil</a>.
243 </p>
244 </blockquote>
245
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246 </blockquote>
247
--- www/server.wiki
+++ www/server.wiki
@@ -241,6 +241,73 @@
241 <p>
242 For more information, see <a href="./ssl.wiki">Using SSL with Fossil</a>.
243 </p>
244 </blockquote>
245
246 <a name="loadmgmt"></a>
247 <h2>Managing Server Load</h2><blockquote>
248 <p>
249 A Fossil server is very efficient and normally presents a very light
250 load on the server.
251 The Fossil [./selfhost.wiki | self-host server] is a 1/24th slice VM at
252 [http://www.linode.com | Linode.com] hosting 65 other repositories in
253 addition to Fossil (and including some very high-traffic sites such
254 as [http://www.sqlite.org] and [http://system.data.sqlite.org]) and
255 it has a typical load of 0.05 to 0.1. A single HTTP request to Fossil
256 normally takes less than 10 milliseconds of CPU time to complete. So
257 requests can be arriving at a continuous rate of 20 or more per second
258 and the CPU can still be mostly idle.
259 <p>
260 However, there are some Fossil web pages that can consume large
261 amounts of CPU time, expecially on repositories with a large number
262 of files or with long revision histories. High CPU usage pages include
263 [/help?cmd=/zip | /zip], [/help?cmd=/tarball | /tarball],
264 [/help?cmd=/annotate | /annotate] and others. On very large repositories,
265 these commands can take 15 seconds or more of CPU time.
266 If these kinds of requests arrive too quickly, the load average on the
267 server can grow dramatically, making the server unresponsive.
268 <p>
269 To help avoid problems, Fossil has the ability to fail CPU-intensive
270 web page requests with a
271 [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.3 | "503 Server Overload"]
272 HTTP error if an expensive request is received while the host load
273 average is too high. To activate this
274 feature, visit the /Admin/Access setup page in the administrative web
275 interface and in the "<b>Server Load Average Limit</b>" box
276 enter the load average threshold above which "503 Server
277 Overload" replies will be issued for expensive requests. On the
278 self-host Fossil server, that value is set to 1.5. But you could easily
279 set it higher on a multi-core server.
280 <p>
281 The maximum load average can also be set on the command line using
282 commands like this:
283 <blockquote><pre>
284 fossil set max-loadavg 1.5
285 fossil all set max-loadavg 1.5
286 </pre></blockquote>
287 The second form is especially useful for changing the maximum load average
288 simultaneously on a large number of repositories.
289 <p>
290 Note that this load-average limiting feature is only available on operating
291 systems that support the "getloadavg()" API. Most modern unix systems have
292 this interface, but Windows does not, so the feature will not work on Windows.
293 Note also that Linux implements "getloadavg()" by accessing the "/proc/loadavg"
294 file in the "proc" virtual filesystem. If you are running a Fossil instance
295 inside a chroot() jail on Linux, you will need to make the "/proc" file
296 system available inside that jail in order for this feature to work. On
297 the self-hosting Fossil repository, this was accomplished by adding a line
298 to the "/etc/mtab" file that looks like:
299 <blockquote><pre>
300 chroot_jail_proc /home/www/proc proc r 0 0
301 </pre></blockquote>
302 Pathnames should be adjusted for individual systems, of course.
303 <p>
304 To see if the load-average limiter is functional, visit the [/test_env] page
305 of the server to view the current load average. If the value for the load
306 average is greater than zero, that means that it is possible to activate
307 the load-average limiter on that repository. If the load average shows
308 exactly "0.0", then that means that Fossil is unable to find the load average
309 (either because it is in a chroot() jail without /proc access, or because
310 it is running on a system that does not support "getloadavg()") and so the
311 load-average limiter will not function.
312
313 </blockquote>
314

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button