Fossil SCM

merge trunk (ongoing)

jan.nijtmans 2014-03-13 12:55 strip-trailing-cr merge
Commit 2e45fb7b3915872d7fb94e4e611a7a359f9af8e5
--- 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
+8
--- src/add.c
+++ src/add.c
@@ -692,5 +692,13 @@
692692
mv_one_file(vid, zFrom, zTo);
693693
}
694694
db_finalize(&q);
695695
db_end_transaction(0);
696696
}
697
+
698
+/*
699
+** Function for stash_apply to be able to restore a file and indicate
700
+** newly ADDED state.
701
+*/
702
+int stash_add_files_in_sfile(int vid){
703
+ return add_files_in_sfile(vid);
704
+}
697705
--- src/add.c
+++ src/add.c
@@ -692,5 +692,13 @@
692 mv_one_file(vid, zFrom, zTo);
693 }
694 db_finalize(&q);
695 db_end_transaction(0);
696 }
 
 
 
 
 
 
 
 
697
--- src/add.c
+++ src/add.c
@@ -692,5 +692,13 @@
692 mv_one_file(vid, zFrom, zTo);
693 }
694 db_finalize(&q);
695 db_end_transaction(0);
696 }
697
698 /*
699 ** Function for stash_apply to be able to restore a file and indicate
700 ** newly ADDED state.
701 */
702 int stash_add_files_in_sfile(int vid){
703 return add_files_in_sfile(vid);
704 }
705
+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
+43 -67
--- src/diff.c
+++ src/diff.c
@@ -78,11 +78,12 @@
7878
*/
7979
typedef struct DLine DLine;
8080
struct DLine {
8181
const char *z; /* The text of the line */
8282
unsigned int h; /* Hash of the line */
83
- unsigned short extent; /* Extent of the line. how much longer than recorded in h */
83
+ unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */
84
+ unsigned short n; /* number of bytes */
8485
unsigned int iNext; /* 1+(Index of next line with same the same hash) */
8586
8687
/* an array of DLine elements serves two purposes. The fields
8788
** above are one per line of input text. But each entry is also
8889
** a bucket in a hash table, as follows: */
@@ -132,11 +133,11 @@
132133
**
133134
** Profiling show that in most cases this routine consumes the bulk of
134135
** the CPU time on a diff.
135136
*/
136137
static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
137
- int nLine, i, j, k, s, extent, x, numws;
138
+ int nLine, i, j, k, s, x;
138139
unsigned int h, h2;
139140
DLine *a;
140141
141142
/* Count the number of lines. Allocate space to hold
142143
** the returned array.
@@ -165,52 +166,27 @@
165166
}
166167
167168
/* Fill in the array */
168169
for(i=0; i<nLine; i++){
169170
for(j=0; z[j] && z[j]!='\n'; j++){}
170
- k = j;
171
- s = 0;
172
- extent = 0; /* number of spaces ignored from start/end */
173
- numws = 0; /* number of spaces ignored in between */
171
+ a[i].z = z;
174172
if( diffFlags & DIFF_STRIP_EOLCR ){
175
- /* Don't do "extend++" here, because the CR needs to be stripped! */
176173
if( k>0 && z[k-1]=='\r' ){ k--; }
177174
}
178
- if( diffFlags & DIFF_IGNORE_ALLWS ){
179
- while( k>0 && fossil_isspace(z[k-1]) ){ k--; extent++;}
180
- }
181
- if( diffFlags & DIFF_IGNORE_WSCHG ){
182
- if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
183
- while( s<k && fossil_isspace(z[s]) ){s++; extent++;}
184
- for(h=0, x=s; x<k; x++){
185
- if( fossil_isspace(z[x]) ){
186
- ++numws;
187
- }else{
188
- h = h ^ (h<<2) ^ z[x];
189
- }
190
- }
191
- }else{
192
- for(h=0, x=0; x<k; x++){
193
- if( fossil_isspace(z[x]) ){
194
- if( x>0 && !fossil_isspace(z[x-1]) ){
195
- ++numws;
196
- }else{
197
- h = h ^ (h<<2) ^ ' ';
198
- }
199
- }else{
200
- h = h ^ (h<<2) ^ z[x];
201
- }
202
- }
203
- }
204
- }else{
205
- for(h=0, x=0; x<k; x++){
206
- h = h ^ (h<<2) ^ z[x];
207
- }
208
- }
209
- a[i].z = z;
210
- a[i].extent = extent+numws;
211
- a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s-numws);
175
+ a[i].n = k = j;
176
+ s = 0;
177
+ if( diffFlags & DIFF_IGNORE_EOLWS ){
178
+ while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
179
+ }
180
+ if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
181
+ while( s<k && fossil_isspace(z[s]) ){ s++; }
182
+ }
183
+ a[i].indent = s;
184
+ for(h=0, x=s; x<k; x++){
185
+ h = h ^ (h<<2) ^ z[x];
186
+ }
187
+ a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s);
212188
h2 = h % nLine;
213189
a[i].iNext = a[h2].iHash;
214190
a[h2].iHash = i+1;
215191
z += j+1;
216192
}
@@ -263,16 +239,16 @@
263239
}else if( cPrefix=='+' ){
264240
blob_append(pOut, "<span class=\"diffadd\">", -1);
265241
}else if( cPrefix=='-' ){
266242
blob_append(pOut, "<span class=\"diffrm\">", -1);
267243
}
268
- htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK));
244
+ htmlize_to_blob(pOut, pLine->z, pLine->n);
269245
if( cPrefix!=' ' ){
270246
blob_append(pOut, "</span>", -1);
271247
}
272248
}else{
273
- blob_append(pOut, pLine->z, (pLine->h & LENGTH_MASK) + pLine->extent);
249
+ blob_append(pOut, pLine->z, pLine->n);
274250
}
275251
blob_append(pOut, "\n", 1);
276252
}
277253
278254
/*
@@ -444,11 +420,11 @@
444420
b += m;
445421
if( i<nr-1 ){
446422
m = R[r+i*3+3];
447423
for(j=0; j<m; j++){
448424
if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
449
- appendDiffLine(pOut, ' ', &B[b+j], html, 0);
425
+ appendDiffLine(pOut, ' ', &A[a+j], html, 0);
450426
}
451427
b += m;
452428
a += m;
453429
}
454430
}
@@ -457,11 +433,11 @@
457433
assert( nr==i );
458434
m = R[r+nr*3];
459435
if( m>nContext ) m = nContext;
460436
for(j=0; j<m; j++){
461437
if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
462
- appendDiffLine(pOut, ' ', &B[b+j], html, 0);
438
+ appendDiffLine(pOut, ' ', &A[a+j], html, 0);
463439
}
464440
}
465441
}
466442
467443
/*
@@ -518,11 +494,11 @@
518494
** This comment contains multibyte unicode characters (ü, Æ, ð) in order
519495
** to test the ability of the diff code to handle such characters.
520496
*/
521497
static void sbsWriteText(SbsLine *p, DLine *pLine, int col){
522498
Blob *pCol = p->apCols[col];
523
- int n = (pLine->h & LENGTH_MASK) + pLine->extent;
499
+ int n = pLine->n;
524500
int i; /* Number of input characters consumed */
525501
int k; /* Cursor position */
526502
int needEndSpan = 0;
527503
const char *zIn = pLine->z;
528504
int w = p->width;
@@ -1882,12 +1858,12 @@
18821858
** --invert Invert the diff DIFF_INVERT
18831859
** -n|--linenum Show line numbers DIFF_LINENO
18841860
** --noopt Disable optimization DIFF_NOOPT
18851861
** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR
18861862
** --unified Unified diff. ~DIFF_SIDEBYSIDE
1887
-** -W|--width N N character lines. DIFF_WIDTH_MASK
18881863
** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS
1864
+** -W|--width N N character lines. DIFF_WIDTH_MASK
18891865
** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE
18901866
** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS
18911867
*/
18921868
u64 diff_options(void){
18931869
u64 diffFlags = 0;
@@ -1995,11 +1971,11 @@
19951971
typedef struct Annotator Annotator;
19961972
struct Annotator {
19971973
DContext c; /* The diff-engine context */
19981974
struct AnnLine { /* Lines of the original files... */
19991975
const char *z; /* The text of the line */
2000
- short int n; /* Number of bytes */
1976
+ short int n; /* Number of bytes (omitting trailing \n) */
20011977
short int iVers; /* Level at which tag was set */
20021978
} *aOrig;
20031979
int nOrig; /* Number of elements in aOrig[] */
20041980
int nVers; /* Number of versions analyzed */
20051981
int bLimit; /* True if the iLimit was reached */
@@ -2029,11 +2005,11 @@
20292005
return 1;
20302006
}
20312007
p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
20322008
for(i=0; i<p->c.nTo; i++){
20332009
p->aOrig[i].z = p->c.aTo[i].z;
2034
- p->aOrig[i].n = (p->c.aTo[i].h & LENGTH_MASK) + p->c.aTo[i].extent;
2010
+ p->aOrig[i].n = p->c.aTo[i].n;
20352011
p->aOrig[i].iVers = -1;
20362012
}
20372013
p->nOrig = p->c.nTo;
20382014
return 0;
20392015
}
@@ -2086,13 +2062,13 @@
20862062
/* Return no errors */
20872063
return 0;
20882064
}
20892065
20902066
2091
-/* Annotation flags. Cannot overlap with DIFF flags */
2092
-#define ANN_FILE_VERS (((u64)0x40)<<32) /* Show file vers rather than commit vers */
2093
-#define ANN_FILE_ANCEST (((u64)0x80)<<32) /* Prefer check-ins in the ANCESTOR table */
2067
+/* Annotation flags (any DIFF flag can be used as Annotation flag as well) */
2068
+#define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */
2069
+#define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */
20942070
20952071
/*
20962072
** Compute a complete annotation on a file. The file is identified
20972073
** by its filename number (filename.fnid) and the baseline in which
20982074
** it was checked in (mlink.mid).
@@ -2100,11 +2076,11 @@
21002076
static void annotate_file(
21012077
Annotator *p, /* The annotator */
21022078
int fnid, /* The name of the file to be annotated */
21032079
int mid, /* Use the version of the file in this check-in */
21042080
int iLimit, /* Limit the number of levels if greater than zero */
2105
- u64 flags /* Flags to alter the annotation/whitespace handling */
2081
+ u64 annFlags /* Flags to alter the annotation */
21062082
){
21072083
Blob toAnnotate; /* Text of the final (mid) version of the file */
21082084
Blob step; /* Text of previous revision */
21092085
int rid; /* Artifact ID of the file being annotated */
21102086
Stmt q; /* Query returning all ancestor versions */
@@ -2119,11 +2095,11 @@
21192095
if( !content_get(rid, &toAnnotate) ){
21202096
fossil_fatal("unable to retrieve content of artifact #%d", rid);
21212097
}
21222098
if( iLimit<=0 ) iLimit = 1000000000;
21232099
blob_to_utf8_no_bom(&toAnnotate, 0);
2124
- annotation_start(p, &toAnnotate, flags);
2100
+ annotation_start(p, &toAnnotate, annFlags);
21252101
db_begin_transaction();
21262102
db_multi_exec(
21272103
"CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);"
21282104
"DELETE FROM vseen;"
21292105
);
@@ -2138,11 +2114,11 @@
21382114
" FROM mlink, event"
21392115
" WHERE mlink.fid=:rid"
21402116
" AND event.objid=mlink.mid"
21412117
" AND mlink.pid NOT IN vseen"
21422118
" ORDER BY %s event.mtime",
2143
- (flags & ANN_FILE_ANCEST)!=0 ?
2119
+ (annFlags & ANN_FILE_ANCEST)!=0 ?
21442120
"(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":""
21452121
);
21462122
21472123
db_bind_int(&q, ":rid", rid);
21482124
if( iLimit==0 ) iLimit = 1000000000;
@@ -2154,11 +2130,11 @@
21542130
p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2));
21552131
p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3));
21562132
if( p->nVers ){
21572133
content_get(rid, &step);
21582134
blob_to_utf8_no_bom(&step, 0);
2159
- annotation_step(p, &step, p->nVers-1, flags);
2135
+ annotation_step(p, &step, p->nVers-1, annFlags);
21602136
blob_reset(&step);
21612137
}
21622138
p->nVers++;
21632139
db_bind_int(&ins, ":rid", rid);
21642140
db_step(&ins);
@@ -2209,14 +2185,13 @@
22092185
void annotation_page(void){
22102186
int mid;
22112187
int fnid;
22122188
int i;
22132189
int iLimit; /* Depth limit */
2214
- u64 flags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2190
+ u64 annFlags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
22152191
int showLog = 0; /* True to display the log */
22162192
int ignoreWs = 0; /* Ignore whitespace */
2217
- u64 diffFlags; /* diff flags for ignore whitespace */
22182193
const char *zFilename; /* Name of file to annotate */
22192194
const char *zCI; /* The check-in containing zFilename */
22202195
Annotator ann;
22212196
HQuery url;
22222197
struct AnnVers *p;
@@ -2226,25 +2201,26 @@
22262201
/* Gather query parameters */
22272202
showLog = atoi(PD("log","1"));
22282203
login_check_credentials();
22292204
if( !g.perm.Read ){ login_needed(); return; }
22302205
if( exclude_spiders("annotate") ) return;
2206
+ load_control();
22312207
mid = name_to_typed_rid(PD("checkin","0"),"ci");
22322208
zFilename = P("filename");
22332209
fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
22342210
if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
22352211
iLimit = atoi(PD("limit","20"));
2236
- if( P("filevers") ) flags |= ANN_FILE_VERS;
2212
+ if( P("filevers") ) annFlags |= ANN_FILE_VERS;
22372213
ignoreWs = P("w")!=0;
2238
- if( ignoreWs ) flags |= DIFF_IGNORE_ALLWS;
2214
+ if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS;
22392215
if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
22402216
fossil_redirect_home();
22412217
}
22422218
22432219
/* compute the annotation */
22442220
compute_direct_ancestors(mid, 10000000);
2245
- annotate_file(&ann, fnid, mid, iLimit, flags);
2221
+ annotate_file(&ann, fnid, mid, iLimit, annFlags);
22462222
zCI = ann.aVers[0].zMUuid;
22472223
22482224
/* generate the web page */
22492225
style_header("Annotation For %h", zFilename);
22502226
if( bBlame ){
@@ -2407,27 +2383,27 @@
24072383
Annotator ann; /* The annotation of the file */
24082384
int i; /* Loop counter */
24092385
const char *zLimit; /* The value to the -n|--limit option */
24102386
int iLimit; /* How far back in time to look */
24112387
int showLog; /* True to show the log */
2412
- u64 flags = 0; /* Flags to control annotation/whitespace handling */
24132388
int fileVers; /* Show file version instead of check-in versions */
2389
+ u64 annFlags = 0; /* Flags to control annotation properties */
24142390
int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */
24152391
24162392
bBlame = g.argv[1][0]!='a';
24172393
zLimit = find_option("limit","n",1);
24182394
if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
24192395
iLimit = atoi(zLimit);
24202396
showLog = find_option("log","l",0)!=0;
24212397
if( find_option("ignore-trailing-space","Z",0)!=0 ){
2422
- flags = DIFF_IGNORE_EOLWS;
2398
+ annFlags = DIFF_IGNORE_EOLWS;
24232399
}
24242400
if( find_option("ignore-space-change","b",0)!=0 ){
2425
- flags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */
2401
+ annFlags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */
24262402
}
24272403
if( find_option("ignore-all-space","w",0)!=0 ){
2428
- flags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */
2404
+ annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */
24292405
}
24302406
fileVers = find_option("filevers",0,0)!=0;
24312407
db_must_be_within_tree();
24322408
if( g.argc<3 ) {
24332409
usage("FILENAME");
@@ -2453,12 +2429,12 @@
24532429
" ORDER BY ancestor.generation ASC LIMIT 1",
24542430
fid, fnid);
24552431
if( mid==0 ){
24562432
fossil_fatal("unable to find manifest");
24572433
}
2458
- flags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2459
- annotate_file(&ann, fnid, mid, iLimit, flags);
2434
+ annFlags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2435
+ annotate_file(&ann, fnid, mid, iLimit, annFlags);
24602436
if( showLog ){
24612437
struct AnnVers *p;
24622438
for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
24632439
fossil_print("version %3d: %s %.10s file %.10s\n",
24642440
i+1, p->zDate, p->zMUuid, p->zFUuid);
24652441
--- src/diff.c
+++ src/diff.c
@@ -78,11 +78,12 @@
78 */
79 typedef struct DLine DLine;
80 struct DLine {
81 const char *z; /* The text of the line */
82 unsigned int h; /* Hash of the line */
83 unsigned short extent; /* Extent of the line. how much longer than recorded in h */
 
84 unsigned int iNext; /* 1+(Index of next line with same the same hash) */
85
86 /* an array of DLine elements serves two purposes. The fields
87 ** above are one per line of input text. But each entry is also
88 ** a bucket in a hash table, as follows: */
@@ -132,11 +133,11 @@
132 **
133 ** Profiling show that in most cases this routine consumes the bulk of
134 ** the CPU time on a diff.
135 */
136 static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
137 int nLine, i, j, k, s, extent, x, numws;
138 unsigned int h, h2;
139 DLine *a;
140
141 /* Count the number of lines. Allocate space to hold
142 ** the returned array.
@@ -165,52 +166,27 @@
165 }
166
167 /* Fill in the array */
168 for(i=0; i<nLine; i++){
169 for(j=0; z[j] && z[j]!='\n'; j++){}
170 k = j;
171 s = 0;
172 extent = 0; /* number of spaces ignored from start/end */
173 numws = 0; /* number of spaces ignored in between */
174 if( diffFlags & DIFF_STRIP_EOLCR ){
175 /* Don't do "extend++" here, because the CR needs to be stripped! */
176 if( k>0 && z[k-1]=='\r' ){ k--; }
177 }
178 if( diffFlags & DIFF_IGNORE_ALLWS ){
179 while( k>0 && fossil_isspace(z[k-1]) ){ k--; extent++;}
180 }
181 if( diffFlags & DIFF_IGNORE_WSCHG ){
182 if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
183 while( s<k && fossil_isspace(z[s]) ){s++; extent++;}
184 for(h=0, x=s; x<k; x++){
185 if( fossil_isspace(z[x]) ){
186 ++numws;
187 }else{
188 h = h ^ (h<<2) ^ z[x];
189 }
190 }
191 }else{
192 for(h=0, x=0; x<k; x++){
193 if( fossil_isspace(z[x]) ){
194 if( x>0 && !fossil_isspace(z[x-1]) ){
195 ++numws;
196 }else{
197 h = h ^ (h<<2) ^ ' ';
198 }
199 }else{
200 h = h ^ (h<<2) ^ z[x];
201 }
202 }
203 }
204 }else{
205 for(h=0, x=0; x<k; x++){
206 h = h ^ (h<<2) ^ z[x];
207 }
208 }
209 a[i].z = z;
210 a[i].extent = extent+numws;
211 a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s-numws);
212 h2 = h % nLine;
213 a[i].iNext = a[h2].iHash;
214 a[h2].iHash = i+1;
215 z += j+1;
216 }
@@ -263,16 +239,16 @@
263 }else if( cPrefix=='+' ){
264 blob_append(pOut, "<span class=\"diffadd\">", -1);
265 }else if( cPrefix=='-' ){
266 blob_append(pOut, "<span class=\"diffrm\">", -1);
267 }
268 htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK));
269 if( cPrefix!=' ' ){
270 blob_append(pOut, "</span>", -1);
271 }
272 }else{
273 blob_append(pOut, pLine->z, (pLine->h & LENGTH_MASK) + pLine->extent);
274 }
275 blob_append(pOut, "\n", 1);
276 }
277
278 /*
@@ -444,11 +420,11 @@
444 b += m;
445 if( i<nr-1 ){
446 m = R[r+i*3+3];
447 for(j=0; j<m; j++){
448 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
449 appendDiffLine(pOut, ' ', &B[b+j], html, 0);
450 }
451 b += m;
452 a += m;
453 }
454 }
@@ -457,11 +433,11 @@
457 assert( nr==i );
458 m = R[r+nr*3];
459 if( m>nContext ) m = nContext;
460 for(j=0; j<m; j++){
461 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
462 appendDiffLine(pOut, ' ', &B[b+j], html, 0);
463 }
464 }
465 }
466
467 /*
@@ -518,11 +494,11 @@
518 ** This comment contains multibyte unicode characters (ü, Æ, ð) in order
519 ** to test the ability of the diff code to handle such characters.
520 */
521 static void sbsWriteText(SbsLine *p, DLine *pLine, int col){
522 Blob *pCol = p->apCols[col];
523 int n = (pLine->h & LENGTH_MASK) + pLine->extent;
524 int i; /* Number of input characters consumed */
525 int k; /* Cursor position */
526 int needEndSpan = 0;
527 const char *zIn = pLine->z;
528 int w = p->width;
@@ -1882,12 +1858,12 @@
1882 ** --invert Invert the diff DIFF_INVERT
1883 ** -n|--linenum Show line numbers DIFF_LINENO
1884 ** --noopt Disable optimization DIFF_NOOPT
1885 ** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR
1886 ** --unified Unified diff. ~DIFF_SIDEBYSIDE
1887 ** -W|--width N N character lines. DIFF_WIDTH_MASK
1888 ** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS
 
1889 ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE
1890 ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS
1891 */
1892 u64 diff_options(void){
1893 u64 diffFlags = 0;
@@ -1995,11 +1971,11 @@
1995 typedef struct Annotator Annotator;
1996 struct Annotator {
1997 DContext c; /* The diff-engine context */
1998 struct AnnLine { /* Lines of the original files... */
1999 const char *z; /* The text of the line */
2000 short int n; /* Number of bytes */
2001 short int iVers; /* Level at which tag was set */
2002 } *aOrig;
2003 int nOrig; /* Number of elements in aOrig[] */
2004 int nVers; /* Number of versions analyzed */
2005 int bLimit; /* True if the iLimit was reached */
@@ -2029,11 +2005,11 @@
2029 return 1;
2030 }
2031 p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
2032 for(i=0; i<p->c.nTo; i++){
2033 p->aOrig[i].z = p->c.aTo[i].z;
2034 p->aOrig[i].n = (p->c.aTo[i].h & LENGTH_MASK) + p->c.aTo[i].extent;
2035 p->aOrig[i].iVers = -1;
2036 }
2037 p->nOrig = p->c.nTo;
2038 return 0;
2039 }
@@ -2086,13 +2062,13 @@
2086 /* Return no errors */
2087 return 0;
2088 }
2089
2090
2091 /* Annotation flags. Cannot overlap with DIFF flags */
2092 #define ANN_FILE_VERS (((u64)0x40)<<32) /* Show file vers rather than commit vers */
2093 #define ANN_FILE_ANCEST (((u64)0x80)<<32) /* Prefer check-ins in the ANCESTOR table */
2094
2095 /*
2096 ** Compute a complete annotation on a file. The file is identified
2097 ** by its filename number (filename.fnid) and the baseline in which
2098 ** it was checked in (mlink.mid).
@@ -2100,11 +2076,11 @@
2100 static void annotate_file(
2101 Annotator *p, /* The annotator */
2102 int fnid, /* The name of the file to be annotated */
2103 int mid, /* Use the version of the file in this check-in */
2104 int iLimit, /* Limit the number of levels if greater than zero */
2105 u64 flags /* Flags to alter the annotation/whitespace handling */
2106 ){
2107 Blob toAnnotate; /* Text of the final (mid) version of the file */
2108 Blob step; /* Text of previous revision */
2109 int rid; /* Artifact ID of the file being annotated */
2110 Stmt q; /* Query returning all ancestor versions */
@@ -2119,11 +2095,11 @@
2119 if( !content_get(rid, &toAnnotate) ){
2120 fossil_fatal("unable to retrieve content of artifact #%d", rid);
2121 }
2122 if( iLimit<=0 ) iLimit = 1000000000;
2123 blob_to_utf8_no_bom(&toAnnotate, 0);
2124 annotation_start(p, &toAnnotate, flags);
2125 db_begin_transaction();
2126 db_multi_exec(
2127 "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);"
2128 "DELETE FROM vseen;"
2129 );
@@ -2138,11 +2114,11 @@
2138 " FROM mlink, event"
2139 " WHERE mlink.fid=:rid"
2140 " AND event.objid=mlink.mid"
2141 " AND mlink.pid NOT IN vseen"
2142 " ORDER BY %s event.mtime",
2143 (flags & ANN_FILE_ANCEST)!=0 ?
2144 "(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":""
2145 );
2146
2147 db_bind_int(&q, ":rid", rid);
2148 if( iLimit==0 ) iLimit = 1000000000;
@@ -2154,11 +2130,11 @@
2154 p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2));
2155 p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3));
2156 if( p->nVers ){
2157 content_get(rid, &step);
2158 blob_to_utf8_no_bom(&step, 0);
2159 annotation_step(p, &step, p->nVers-1, flags);
2160 blob_reset(&step);
2161 }
2162 p->nVers++;
2163 db_bind_int(&ins, ":rid", rid);
2164 db_step(&ins);
@@ -2209,14 +2185,13 @@
2209 void annotation_page(void){
2210 int mid;
2211 int fnid;
2212 int i;
2213 int iLimit; /* Depth limit */
2214 u64 flags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2215 int showLog = 0; /* True to display the log */
2216 int ignoreWs = 0; /* Ignore whitespace */
2217 u64 diffFlags; /* diff flags for ignore whitespace */
2218 const char *zFilename; /* Name of file to annotate */
2219 const char *zCI; /* The check-in containing zFilename */
2220 Annotator ann;
2221 HQuery url;
2222 struct AnnVers *p;
@@ -2226,25 +2201,26 @@
2226 /* Gather query parameters */
2227 showLog = atoi(PD("log","1"));
2228 login_check_credentials();
2229 if( !g.perm.Read ){ login_needed(); return; }
2230 if( exclude_spiders("annotate") ) return;
 
2231 mid = name_to_typed_rid(PD("checkin","0"),"ci");
2232 zFilename = P("filename");
2233 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
2234 if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
2235 iLimit = atoi(PD("limit","20"));
2236 if( P("filevers") ) flags |= ANN_FILE_VERS;
2237 ignoreWs = P("w")!=0;
2238 if( ignoreWs ) flags |= DIFF_IGNORE_ALLWS;
2239 if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
2240 fossil_redirect_home();
2241 }
2242
2243 /* compute the annotation */
2244 compute_direct_ancestors(mid, 10000000);
2245 annotate_file(&ann, fnid, mid, iLimit, flags);
2246 zCI = ann.aVers[0].zMUuid;
2247
2248 /* generate the web page */
2249 style_header("Annotation For %h", zFilename);
2250 if( bBlame ){
@@ -2407,27 +2383,27 @@
2407 Annotator ann; /* The annotation of the file */
2408 int i; /* Loop counter */
2409 const char *zLimit; /* The value to the -n|--limit option */
2410 int iLimit; /* How far back in time to look */
2411 int showLog; /* True to show the log */
2412 u64 flags = 0; /* Flags to control annotation/whitespace handling */
2413 int fileVers; /* Show file version instead of check-in versions */
 
2414 int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */
2415
2416 bBlame = g.argv[1][0]!='a';
2417 zLimit = find_option("limit","n",1);
2418 if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
2419 iLimit = atoi(zLimit);
2420 showLog = find_option("log","l",0)!=0;
2421 if( find_option("ignore-trailing-space","Z",0)!=0 ){
2422 flags = DIFF_IGNORE_EOLWS;
2423 }
2424 if( find_option("ignore-space-change","b",0)!=0 ){
2425 flags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */
2426 }
2427 if( find_option("ignore-all-space","w",0)!=0 ){
2428 flags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */
2429 }
2430 fileVers = find_option("filevers",0,0)!=0;
2431 db_must_be_within_tree();
2432 if( g.argc<3 ) {
2433 usage("FILENAME");
@@ -2453,12 +2429,12 @@
2453 " ORDER BY ancestor.generation ASC LIMIT 1",
2454 fid, fnid);
2455 if( mid==0 ){
2456 fossil_fatal("unable to find manifest");
2457 }
2458 flags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2459 annotate_file(&ann, fnid, mid, iLimit, flags);
2460 if( showLog ){
2461 struct AnnVers *p;
2462 for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
2463 fossil_print("version %3d: %s %.10s file %.10s\n",
2464 i+1, p->zDate, p->zMUuid, p->zFUuid);
2465
--- src/diff.c
+++ src/diff.c
@@ -78,11 +78,12 @@
78 */
79 typedef struct DLine DLine;
80 struct DLine {
81 const char *z; /* The text of the line */
82 unsigned int h; /* Hash of the line */
83 unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */
84 unsigned short n; /* number of bytes */
85 unsigned int iNext; /* 1+(Index of next line with same the same hash) */
86
87 /* an array of DLine elements serves two purposes. The fields
88 ** above are one per line of input text. But each entry is also
89 ** a bucket in a hash table, as follows: */
@@ -132,11 +133,11 @@
133 **
134 ** Profiling show that in most cases this routine consumes the bulk of
135 ** the CPU time on a diff.
136 */
137 static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
138 int nLine, i, j, k, s, x;
139 unsigned int h, h2;
140 DLine *a;
141
142 /* Count the number of lines. Allocate space to hold
143 ** the returned array.
@@ -165,52 +166,27 @@
166 }
167
168 /* Fill in the array */
169 for(i=0; i<nLine; i++){
170 for(j=0; z[j] && z[j]!='\n'; j++){}
171 a[i].z = z;
 
 
 
172 if( diffFlags & DIFF_STRIP_EOLCR ){
 
173 if( k>0 && z[k-1]=='\r' ){ k--; }
174 }
175 a[i].n = k = j;
176 s = 0;
177 if( diffFlags & DIFF_IGNORE_EOLWS ){
178 while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
179 }
180 if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
181 while( s<k && fossil_isspace(z[s]) ){ s++; }
182 }
183 a[i].indent = s;
184 for(h=0, x=s; x<k; x++){
185 h = h ^ (h<<2) ^ z[x];
186 }
187 a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188 h2 = h % nLine;
189 a[i].iNext = a[h2].iHash;
190 a[h2].iHash = i+1;
191 z += j+1;
192 }
@@ -263,16 +239,16 @@
239 }else if( cPrefix=='+' ){
240 blob_append(pOut, "<span class=\"diffadd\">", -1);
241 }else if( cPrefix=='-' ){
242 blob_append(pOut, "<span class=\"diffrm\">", -1);
243 }
244 htmlize_to_blob(pOut, pLine->z, pLine->n);
245 if( cPrefix!=' ' ){
246 blob_append(pOut, "</span>", -1);
247 }
248 }else{
249 blob_append(pOut, pLine->z, pLine->n);
250 }
251 blob_append(pOut, "\n", 1);
252 }
253
254 /*
@@ -444,11 +420,11 @@
420 b += m;
421 if( i<nr-1 ){
422 m = R[r+i*3+3];
423 for(j=0; j<m; j++){
424 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
425 appendDiffLine(pOut, ' ', &A[a+j], html, 0);
426 }
427 b += m;
428 a += m;
429 }
430 }
@@ -457,11 +433,11 @@
433 assert( nr==i );
434 m = R[r+nr*3];
435 if( m>nContext ) m = nContext;
436 for(j=0; j<m; j++){
437 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
438 appendDiffLine(pOut, ' ', &A[a+j], html, 0);
439 }
440 }
441 }
442
443 /*
@@ -518,11 +494,11 @@
494 ** This comment contains multibyte unicode characters (ü, Æ, ð) in order
495 ** to test the ability of the diff code to handle such characters.
496 */
497 static void sbsWriteText(SbsLine *p, DLine *pLine, int col){
498 Blob *pCol = p->apCols[col];
499 int n = pLine->n;
500 int i; /* Number of input characters consumed */
501 int k; /* Cursor position */
502 int needEndSpan = 0;
503 const char *zIn = pLine->z;
504 int w = p->width;
@@ -1882,12 +1858,12 @@
1858 ** --invert Invert the diff DIFF_INVERT
1859 ** -n|--linenum Show line numbers DIFF_LINENO
1860 ** --noopt Disable optimization DIFF_NOOPT
1861 ** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR
1862 ** --unified Unified diff. ~DIFF_SIDEBYSIDE
 
1863 ** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS
1864 ** -W|--width N N character lines. DIFF_WIDTH_MASK
1865 ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE
1866 ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS
1867 */
1868 u64 diff_options(void){
1869 u64 diffFlags = 0;
@@ -1995,11 +1971,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 (omitting trailing \n) */
1977 short int iVers; /* Level at which tag was set */
1978 } *aOrig;
1979 int nOrig; /* Number of elements in aOrig[] */
1980 int nVers; /* Number of versions analyzed */
1981 int bLimit; /* True if the iLimit was reached */
@@ -2029,11 +2005,11 @@
2005 return 1;
2006 }
2007 p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
2008 for(i=0; i<p->c.nTo; i++){
2009 p->aOrig[i].z = p->c.aTo[i].z;
2010 p->aOrig[i].n = p->c.aTo[i].n;
2011 p->aOrig[i].iVers = -1;
2012 }
2013 p->nOrig = p->c.nTo;
2014 return 0;
2015 }
@@ -2086,13 +2062,13 @@
2062 /* Return no errors */
2063 return 0;
2064 }
2065
2066
2067 /* Annotation flags (any DIFF flag can be used as Annotation flag as well) */
2068 #define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */
2069 #define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */
2070
2071 /*
2072 ** Compute a complete annotation on a file. The file is identified
2073 ** by its filename number (filename.fnid) and the baseline in which
2074 ** it was checked in (mlink.mid).
@@ -2100,11 +2076,11 @@
2076 static void annotate_file(
2077 Annotator *p, /* The annotator */
2078 int fnid, /* The name of the file to be annotated */
2079 int mid, /* Use the version of the file in this check-in */
2080 int iLimit, /* Limit the number of levels if greater than zero */
2081 u64 annFlags /* Flags to alter the annotation */
2082 ){
2083 Blob toAnnotate; /* Text of the final (mid) version of the file */
2084 Blob step; /* Text of previous revision */
2085 int rid; /* Artifact ID of the file being annotated */
2086 Stmt q; /* Query returning all ancestor versions */
@@ -2119,11 +2095,11 @@
2095 if( !content_get(rid, &toAnnotate) ){
2096 fossil_fatal("unable to retrieve content of artifact #%d", rid);
2097 }
2098 if( iLimit<=0 ) iLimit = 1000000000;
2099 blob_to_utf8_no_bom(&toAnnotate, 0);
2100 annotation_start(p, &toAnnotate, annFlags);
2101 db_begin_transaction();
2102 db_multi_exec(
2103 "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);"
2104 "DELETE FROM vseen;"
2105 );
@@ -2138,11 +2114,11 @@
2114 " FROM mlink, event"
2115 " WHERE mlink.fid=:rid"
2116 " AND event.objid=mlink.mid"
2117 " AND mlink.pid NOT IN vseen"
2118 " ORDER BY %s event.mtime",
2119 (annFlags & ANN_FILE_ANCEST)!=0 ?
2120 "(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":""
2121 );
2122
2123 db_bind_int(&q, ":rid", rid);
2124 if( iLimit==0 ) iLimit = 1000000000;
@@ -2154,11 +2130,11 @@
2130 p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2));
2131 p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3));
2132 if( p->nVers ){
2133 content_get(rid, &step);
2134 blob_to_utf8_no_bom(&step, 0);
2135 annotation_step(p, &step, p->nVers-1, annFlags);
2136 blob_reset(&step);
2137 }
2138 p->nVers++;
2139 db_bind_int(&ins, ":rid", rid);
2140 db_step(&ins);
@@ -2209,14 +2185,13 @@
2185 void annotation_page(void){
2186 int mid;
2187 int fnid;
2188 int i;
2189 int iLimit; /* Depth limit */
2190 u64 annFlags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2191 int showLog = 0; /* True to display the log */
2192 int ignoreWs = 0; /* Ignore whitespace */
 
2193 const char *zFilename; /* Name of file to annotate */
2194 const char *zCI; /* The check-in containing zFilename */
2195 Annotator ann;
2196 HQuery url;
2197 struct AnnVers *p;
@@ -2226,25 +2201,26 @@
2201 /* Gather query parameters */
2202 showLog = atoi(PD("log","1"));
2203 login_check_credentials();
2204 if( !g.perm.Read ){ login_needed(); return; }
2205 if( exclude_spiders("annotate") ) return;
2206 load_control();
2207 mid = name_to_typed_rid(PD("checkin","0"),"ci");
2208 zFilename = P("filename");
2209 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
2210 if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
2211 iLimit = atoi(PD("limit","20"));
2212 if( P("filevers") ) annFlags |= ANN_FILE_VERS;
2213 ignoreWs = P("w")!=0;
2214 if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS;
2215 if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
2216 fossil_redirect_home();
2217 }
2218
2219 /* compute the annotation */
2220 compute_direct_ancestors(mid, 10000000);
2221 annotate_file(&ann, fnid, mid, iLimit, annFlags);
2222 zCI = ann.aVers[0].zMUuid;
2223
2224 /* generate the web page */
2225 style_header("Annotation For %h", zFilename);
2226 if( bBlame ){
@@ -2407,27 +2383,27 @@
2383 Annotator ann; /* The annotation of the file */
2384 int i; /* Loop counter */
2385 const char *zLimit; /* The value to the -n|--limit option */
2386 int iLimit; /* How far back in time to look */
2387 int showLog; /* True to show the log */
 
2388 int fileVers; /* Show file version instead of check-in versions */
2389 u64 annFlags = 0; /* Flags to control annotation properties */
2390 int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */
2391
2392 bBlame = g.argv[1][0]!='a';
2393 zLimit = find_option("limit","n",1);
2394 if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
2395 iLimit = atoi(zLimit);
2396 showLog = find_option("log","l",0)!=0;
2397 if( find_option("ignore-trailing-space","Z",0)!=0 ){
2398 annFlags = DIFF_IGNORE_EOLWS;
2399 }
2400 if( find_option("ignore-space-change","b",0)!=0 ){
2401 annFlags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */
2402 }
2403 if( find_option("ignore-all-space","w",0)!=0 ){
2404 annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */
2405 }
2406 fileVers = find_option("filevers",0,0)!=0;
2407 db_must_be_within_tree();
2408 if( g.argc<3 ) {
2409 usage("FILENAME");
@@ -2453,12 +2429,12 @@
2429 " ORDER BY ancestor.generation ASC LIMIT 1",
2430 fid, fnid);
2431 if( mid==0 ){
2432 fossil_fatal("unable to find manifest");
2433 }
2434 annFlags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2435 annotate_file(&ann, fnid, mid, iLimit, annFlags);
2436 if( showLog ){
2437 struct AnnVers *p;
2438 for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
2439 fossil_print("version %3d: %s %.10s file %.10s\n",
2440 i+1, p->zDate, p->zMUuid, p->zFUuid);
2441
+43 -67
--- src/diff.c
+++ src/diff.c
@@ -78,11 +78,12 @@
7878
*/
7979
typedef struct DLine DLine;
8080
struct DLine {
8181
const char *z; /* The text of the line */
8282
unsigned int h; /* Hash of the line */
83
- unsigned short extent; /* Extent of the line. how much longer than recorded in h */
83
+ unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */
84
+ unsigned short n; /* number of bytes */
8485
unsigned int iNext; /* 1+(Index of next line with same the same hash) */
8586
8687
/* an array of DLine elements serves two purposes. The fields
8788
** above are one per line of input text. But each entry is also
8889
** a bucket in a hash table, as follows: */
@@ -132,11 +133,11 @@
132133
**
133134
** Profiling show that in most cases this routine consumes the bulk of
134135
** the CPU time on a diff.
135136
*/
136137
static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
137
- int nLine, i, j, k, s, extent, x, numws;
138
+ int nLine, i, j, k, s, x;
138139
unsigned int h, h2;
139140
DLine *a;
140141
141142
/* Count the number of lines. Allocate space to hold
142143
** the returned array.
@@ -165,52 +166,27 @@
165166
}
166167
167168
/* Fill in the array */
168169
for(i=0; i<nLine; i++){
169170
for(j=0; z[j] && z[j]!='\n'; j++){}
170
- k = j;
171
- s = 0;
172
- extent = 0; /* number of spaces ignored from start/end */
173
- numws = 0; /* number of spaces ignored in between */
171
+ a[i].z = z;
174172
if( diffFlags & DIFF_STRIP_EOLCR ){
175
- /* Don't do "extend++" here, because the CR needs to be stripped! */
176173
if( k>0 && z[k-1]=='\r' ){ k--; }
177174
}
178
- if( diffFlags & DIFF_IGNORE_ALLWS ){
179
- while( k>0 && fossil_isspace(z[k-1]) ){ k--; extent++;}
180
- }
181
- if( diffFlags & DIFF_IGNORE_WSCHG ){
182
- if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
183
- while( s<k && fossil_isspace(z[s]) ){s++; extent++;}
184
- for(h=0, x=s; x<k; x++){
185
- if( fossil_isspace(z[x]) ){
186
- ++numws;
187
- }else{
188
- h = h ^ (h<<2) ^ z[x];
189
- }
190
- }
191
- }else{
192
- for(h=0, x=0; x<k; x++){
193
- if( fossil_isspace(z[x]) ){
194
- if( x>0 && !fossil_isspace(z[x-1]) ){
195
- ++numws;
196
- }else{
197
- h = h ^ (h<<2) ^ ' ';
198
- }
199
- }else{
200
- h = h ^ (h<<2) ^ z[x];
201
- }
202
- }
203
- }
204
- }else{
205
- for(h=0, x=0; x<k; x++){
206
- h = h ^ (h<<2) ^ z[x];
207
- }
208
- }
209
- a[i].z = z;
210
- a[i].extent = extent+numws;
211
- a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s-numws);
175
+ a[i].n = k = j;
176
+ s = 0;
177
+ if( diffFlags & DIFF_IGNORE_EOLWS ){
178
+ while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
179
+ }
180
+ if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
181
+ while( s<k && fossil_isspace(z[s]) ){ s++; }
182
+ }
183
+ a[i].indent = s;
184
+ for(h=0, x=s; x<k; x++){
185
+ h = h ^ (h<<2) ^ z[x];
186
+ }
187
+ a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s);
212188
h2 = h % nLine;
213189
a[i].iNext = a[h2].iHash;
214190
a[h2].iHash = i+1;
215191
z += j+1;
216192
}
@@ -263,16 +239,16 @@
263239
}else if( cPrefix=='+' ){
264240
blob_append(pOut, "<span class=\"diffadd\">", -1);
265241
}else if( cPrefix=='-' ){
266242
blob_append(pOut, "<span class=\"diffrm\">", -1);
267243
}
268
- htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK));
244
+ htmlize_to_blob(pOut, pLine->z, pLine->n);
269245
if( cPrefix!=' ' ){
270246
blob_append(pOut, "</span>", -1);
271247
}
272248
}else{
273
- blob_append(pOut, pLine->z, (pLine->h & LENGTH_MASK) + pLine->extent);
249
+ blob_append(pOut, pLine->z, pLine->n);
274250
}
275251
blob_append(pOut, "\n", 1);
276252
}
277253
278254
/*
@@ -444,11 +420,11 @@
444420
b += m;
445421
if( i<nr-1 ){
446422
m = R[r+i*3+3];
447423
for(j=0; j<m; j++){
448424
if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
449
- appendDiffLine(pOut, ' ', &B[b+j], html, 0);
425
+ appendDiffLine(pOut, ' ', &A[a+j], html, 0);
450426
}
451427
b += m;
452428
a += m;
453429
}
454430
}
@@ -457,11 +433,11 @@
457433
assert( nr==i );
458434
m = R[r+nr*3];
459435
if( m>nContext ) m = nContext;
460436
for(j=0; j<m; j++){
461437
if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
462
- appendDiffLine(pOut, ' ', &B[b+j], html, 0);
438
+ appendDiffLine(pOut, ' ', &A[a+j], html, 0);
463439
}
464440
}
465441
}
466442
467443
/*
@@ -518,11 +494,11 @@
518494
** This comment contains multibyte unicode characters (ü, Æ, ð) in order
519495
** to test the ability of the diff code to handle such characters.
520496
*/
521497
static void sbsWriteText(SbsLine *p, DLine *pLine, int col){
522498
Blob *pCol = p->apCols[col];
523
- int n = (pLine->h & LENGTH_MASK) + pLine->extent;
499
+ int n = pLine->n;
524500
int i; /* Number of input characters consumed */
525501
int k; /* Cursor position */
526502
int needEndSpan = 0;
527503
const char *zIn = pLine->z;
528504
int w = p->width;
@@ -1882,12 +1858,12 @@
18821858
** --invert Invert the diff DIFF_INVERT
18831859
** -n|--linenum Show line numbers DIFF_LINENO
18841860
** --noopt Disable optimization DIFF_NOOPT
18851861
** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR
18861862
** --unified Unified diff. ~DIFF_SIDEBYSIDE
1887
-** -W|--width N N character lines. DIFF_WIDTH_MASK
18881863
** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS
1864
+** -W|--width N N character lines. DIFF_WIDTH_MASK
18891865
** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE
18901866
** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS
18911867
*/
18921868
u64 diff_options(void){
18931869
u64 diffFlags = 0;
@@ -1995,11 +1971,11 @@
19951971
typedef struct Annotator Annotator;
19961972
struct Annotator {
19971973
DContext c; /* The diff-engine context */
19981974
struct AnnLine { /* Lines of the original files... */
19991975
const char *z; /* The text of the line */
2000
- short int n; /* Number of bytes */
1976
+ short int n; /* Number of bytes (omitting trailing \n) */
20011977
short int iVers; /* Level at which tag was set */
20021978
} *aOrig;
20031979
int nOrig; /* Number of elements in aOrig[] */
20041980
int nVers; /* Number of versions analyzed */
20051981
int bLimit; /* True if the iLimit was reached */
@@ -2029,11 +2005,11 @@
20292005
return 1;
20302006
}
20312007
p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
20322008
for(i=0; i<p->c.nTo; i++){
20332009
p->aOrig[i].z = p->c.aTo[i].z;
2034
- p->aOrig[i].n = (p->c.aTo[i].h & LENGTH_MASK) + p->c.aTo[i].extent;
2010
+ p->aOrig[i].n = p->c.aTo[i].n;
20352011
p->aOrig[i].iVers = -1;
20362012
}
20372013
p->nOrig = p->c.nTo;
20382014
return 0;
20392015
}
@@ -2086,13 +2062,13 @@
20862062
/* Return no errors */
20872063
return 0;
20882064
}
20892065
20902066
2091
-/* Annotation flags. Cannot overlap with DIFF flags */
2092
-#define ANN_FILE_VERS (((u64)0x40)<<32) /* Show file vers rather than commit vers */
2093
-#define ANN_FILE_ANCEST (((u64)0x80)<<32) /* Prefer check-ins in the ANCESTOR table */
2067
+/* Annotation flags (any DIFF flag can be used as Annotation flag as well) */
2068
+#define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */
2069
+#define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */
20942070
20952071
/*
20962072
** Compute a complete annotation on a file. The file is identified
20972073
** by its filename number (filename.fnid) and the baseline in which
20982074
** it was checked in (mlink.mid).
@@ -2100,11 +2076,11 @@
21002076
static void annotate_file(
21012077
Annotator *p, /* The annotator */
21022078
int fnid, /* The name of the file to be annotated */
21032079
int mid, /* Use the version of the file in this check-in */
21042080
int iLimit, /* Limit the number of levels if greater than zero */
2105
- u64 flags /* Flags to alter the annotation/whitespace handling */
2081
+ u64 annFlags /* Flags to alter the annotation */
21062082
){
21072083
Blob toAnnotate; /* Text of the final (mid) version of the file */
21082084
Blob step; /* Text of previous revision */
21092085
int rid; /* Artifact ID of the file being annotated */
21102086
Stmt q; /* Query returning all ancestor versions */
@@ -2119,11 +2095,11 @@
21192095
if( !content_get(rid, &toAnnotate) ){
21202096
fossil_fatal("unable to retrieve content of artifact #%d", rid);
21212097
}
21222098
if( iLimit<=0 ) iLimit = 1000000000;
21232099
blob_to_utf8_no_bom(&toAnnotate, 0);
2124
- annotation_start(p, &toAnnotate, flags);
2100
+ annotation_start(p, &toAnnotate, annFlags);
21252101
db_begin_transaction();
21262102
db_multi_exec(
21272103
"CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);"
21282104
"DELETE FROM vseen;"
21292105
);
@@ -2138,11 +2114,11 @@
21382114
" FROM mlink, event"
21392115
" WHERE mlink.fid=:rid"
21402116
" AND event.objid=mlink.mid"
21412117
" AND mlink.pid NOT IN vseen"
21422118
" ORDER BY %s event.mtime",
2143
- (flags & ANN_FILE_ANCEST)!=0 ?
2119
+ (annFlags & ANN_FILE_ANCEST)!=0 ?
21442120
"(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":""
21452121
);
21462122
21472123
db_bind_int(&q, ":rid", rid);
21482124
if( iLimit==0 ) iLimit = 1000000000;
@@ -2154,11 +2130,11 @@
21542130
p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2));
21552131
p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3));
21562132
if( p->nVers ){
21572133
content_get(rid, &step);
21582134
blob_to_utf8_no_bom(&step, 0);
2159
- annotation_step(p, &step, p->nVers-1, flags);
2135
+ annotation_step(p, &step, p->nVers-1, annFlags);
21602136
blob_reset(&step);
21612137
}
21622138
p->nVers++;
21632139
db_bind_int(&ins, ":rid", rid);
21642140
db_step(&ins);
@@ -2209,14 +2185,13 @@
22092185
void annotation_page(void){
22102186
int mid;
22112187
int fnid;
22122188
int i;
22132189
int iLimit; /* Depth limit */
2214
- u64 flags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2190
+ u64 annFlags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
22152191
int showLog = 0; /* True to display the log */
22162192
int ignoreWs = 0; /* Ignore whitespace */
2217
- u64 diffFlags; /* diff flags for ignore whitespace */
22182193
const char *zFilename; /* Name of file to annotate */
22192194
const char *zCI; /* The check-in containing zFilename */
22202195
Annotator ann;
22212196
HQuery url;
22222197
struct AnnVers *p;
@@ -2226,25 +2201,26 @@
22262201
/* Gather query parameters */
22272202
showLog = atoi(PD("log","1"));
22282203
login_check_credentials();
22292204
if( !g.perm.Read ){ login_needed(); return; }
22302205
if( exclude_spiders("annotate") ) return;
2206
+ load_control();
22312207
mid = name_to_typed_rid(PD("checkin","0"),"ci");
22322208
zFilename = P("filename");
22332209
fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
22342210
if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
22352211
iLimit = atoi(PD("limit","20"));
2236
- if( P("filevers") ) flags |= ANN_FILE_VERS;
2212
+ if( P("filevers") ) annFlags |= ANN_FILE_VERS;
22372213
ignoreWs = P("w")!=0;
2238
- if( ignoreWs ) flags |= DIFF_IGNORE_ALLWS;
2214
+ if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS;
22392215
if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
22402216
fossil_redirect_home();
22412217
}
22422218
22432219
/* compute the annotation */
22442220
compute_direct_ancestors(mid, 10000000);
2245
- annotate_file(&ann, fnid, mid, iLimit, flags);
2221
+ annotate_file(&ann, fnid, mid, iLimit, annFlags);
22462222
zCI = ann.aVers[0].zMUuid;
22472223
22482224
/* generate the web page */
22492225
style_header("Annotation For %h", zFilename);
22502226
if( bBlame ){
@@ -2407,27 +2383,27 @@
24072383
Annotator ann; /* The annotation of the file */
24082384
int i; /* Loop counter */
24092385
const char *zLimit; /* The value to the -n|--limit option */
24102386
int iLimit; /* How far back in time to look */
24112387
int showLog; /* True to show the log */
2412
- u64 flags = 0; /* Flags to control annotation/whitespace handling */
24132388
int fileVers; /* Show file version instead of check-in versions */
2389
+ u64 annFlags = 0; /* Flags to control annotation properties */
24142390
int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */
24152391
24162392
bBlame = g.argv[1][0]!='a';
24172393
zLimit = find_option("limit","n",1);
24182394
if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
24192395
iLimit = atoi(zLimit);
24202396
showLog = find_option("log","l",0)!=0;
24212397
if( find_option("ignore-trailing-space","Z",0)!=0 ){
2422
- flags = DIFF_IGNORE_EOLWS;
2398
+ annFlags = DIFF_IGNORE_EOLWS;
24232399
}
24242400
if( find_option("ignore-space-change","b",0)!=0 ){
2425
- flags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */
2401
+ annFlags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */
24262402
}
24272403
if( find_option("ignore-all-space","w",0)!=0 ){
2428
- flags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */
2404
+ annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */
24292405
}
24302406
fileVers = find_option("filevers",0,0)!=0;
24312407
db_must_be_within_tree();
24322408
if( g.argc<3 ) {
24332409
usage("FILENAME");
@@ -2453,12 +2429,12 @@
24532429
" ORDER BY ancestor.generation ASC LIMIT 1",
24542430
fid, fnid);
24552431
if( mid==0 ){
24562432
fossil_fatal("unable to find manifest");
24572433
}
2458
- flags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2459
- annotate_file(&ann, fnid, mid, iLimit, flags);
2434
+ annFlags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2435
+ annotate_file(&ann, fnid, mid, iLimit, annFlags);
24602436
if( showLog ){
24612437
struct AnnVers *p;
24622438
for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
24632439
fossil_print("version %3d: %s %.10s file %.10s\n",
24642440
i+1, p->zDate, p->zMUuid, p->zFUuid);
24652441
--- src/diff.c
+++ src/diff.c
@@ -78,11 +78,12 @@
78 */
79 typedef struct DLine DLine;
80 struct DLine {
81 const char *z; /* The text of the line */
82 unsigned int h; /* Hash of the line */
83 unsigned short extent; /* Extent of the line. how much longer than recorded in h */
 
84 unsigned int iNext; /* 1+(Index of next line with same the same hash) */
85
86 /* an array of DLine elements serves two purposes. The fields
87 ** above are one per line of input text. But each entry is also
88 ** a bucket in a hash table, as follows: */
@@ -132,11 +133,11 @@
132 **
133 ** Profiling show that in most cases this routine consumes the bulk of
134 ** the CPU time on a diff.
135 */
136 static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
137 int nLine, i, j, k, s, extent, x, numws;
138 unsigned int h, h2;
139 DLine *a;
140
141 /* Count the number of lines. Allocate space to hold
142 ** the returned array.
@@ -165,52 +166,27 @@
165 }
166
167 /* Fill in the array */
168 for(i=0; i<nLine; i++){
169 for(j=0; z[j] && z[j]!='\n'; j++){}
170 k = j;
171 s = 0;
172 extent = 0; /* number of spaces ignored from start/end */
173 numws = 0; /* number of spaces ignored in between */
174 if( diffFlags & DIFF_STRIP_EOLCR ){
175 /* Don't do "extend++" here, because the CR needs to be stripped! */
176 if( k>0 && z[k-1]=='\r' ){ k--; }
177 }
178 if( diffFlags & DIFF_IGNORE_ALLWS ){
179 while( k>0 && fossil_isspace(z[k-1]) ){ k--; extent++;}
180 }
181 if( diffFlags & DIFF_IGNORE_WSCHG ){
182 if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
183 while( s<k && fossil_isspace(z[s]) ){s++; extent++;}
184 for(h=0, x=s; x<k; x++){
185 if( fossil_isspace(z[x]) ){
186 ++numws;
187 }else{
188 h = h ^ (h<<2) ^ z[x];
189 }
190 }
191 }else{
192 for(h=0, x=0; x<k; x++){
193 if( fossil_isspace(z[x]) ){
194 if( x>0 && !fossil_isspace(z[x-1]) ){
195 ++numws;
196 }else{
197 h = h ^ (h<<2) ^ ' ';
198 }
199 }else{
200 h = h ^ (h<<2) ^ z[x];
201 }
202 }
203 }
204 }else{
205 for(h=0, x=0; x<k; x++){
206 h = h ^ (h<<2) ^ z[x];
207 }
208 }
209 a[i].z = z;
210 a[i].extent = extent+numws;
211 a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s-numws);
212 h2 = h % nLine;
213 a[i].iNext = a[h2].iHash;
214 a[h2].iHash = i+1;
215 z += j+1;
216 }
@@ -263,16 +239,16 @@
263 }else if( cPrefix=='+' ){
264 blob_append(pOut, "<span class=\"diffadd\">", -1);
265 }else if( cPrefix=='-' ){
266 blob_append(pOut, "<span class=\"diffrm\">", -1);
267 }
268 htmlize_to_blob(pOut, pLine->z, (pLine->h & LENGTH_MASK));
269 if( cPrefix!=' ' ){
270 blob_append(pOut, "</span>", -1);
271 }
272 }else{
273 blob_append(pOut, pLine->z, (pLine->h & LENGTH_MASK) + pLine->extent);
274 }
275 blob_append(pOut, "\n", 1);
276 }
277
278 /*
@@ -444,11 +420,11 @@
444 b += m;
445 if( i<nr-1 ){
446 m = R[r+i*3+3];
447 for(j=0; j<m; j++){
448 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
449 appendDiffLine(pOut, ' ', &B[b+j], html, 0);
450 }
451 b += m;
452 a += m;
453 }
454 }
@@ -457,11 +433,11 @@
457 assert( nr==i );
458 m = R[r+nr*3];
459 if( m>nContext ) m = nContext;
460 for(j=0; j<m; j++){
461 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
462 appendDiffLine(pOut, ' ', &B[b+j], html, 0);
463 }
464 }
465 }
466
467 /*
@@ -518,11 +494,11 @@
518 ** This comment contains multibyte unicode characters (ü, Æ, ð) in order
519 ** to test the ability of the diff code to handle such characters.
520 */
521 static void sbsWriteText(SbsLine *p, DLine *pLine, int col){
522 Blob *pCol = p->apCols[col];
523 int n = (pLine->h & LENGTH_MASK) + pLine->extent;
524 int i; /* Number of input characters consumed */
525 int k; /* Cursor position */
526 int needEndSpan = 0;
527 const char *zIn = pLine->z;
528 int w = p->width;
@@ -1882,12 +1858,12 @@
1882 ** --invert Invert the diff DIFF_INVERT
1883 ** -n|--linenum Show line numbers DIFF_LINENO
1884 ** --noopt Disable optimization DIFF_NOOPT
1885 ** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR
1886 ** --unified Unified diff. ~DIFF_SIDEBYSIDE
1887 ** -W|--width N N character lines. DIFF_WIDTH_MASK
1888 ** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS
 
1889 ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE
1890 ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS
1891 */
1892 u64 diff_options(void){
1893 u64 diffFlags = 0;
@@ -1995,11 +1971,11 @@
1995 typedef struct Annotator Annotator;
1996 struct Annotator {
1997 DContext c; /* The diff-engine context */
1998 struct AnnLine { /* Lines of the original files... */
1999 const char *z; /* The text of the line */
2000 short int n; /* Number of bytes */
2001 short int iVers; /* Level at which tag was set */
2002 } *aOrig;
2003 int nOrig; /* Number of elements in aOrig[] */
2004 int nVers; /* Number of versions analyzed */
2005 int bLimit; /* True if the iLimit was reached */
@@ -2029,11 +2005,11 @@
2029 return 1;
2030 }
2031 p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
2032 for(i=0; i<p->c.nTo; i++){
2033 p->aOrig[i].z = p->c.aTo[i].z;
2034 p->aOrig[i].n = (p->c.aTo[i].h & LENGTH_MASK) + p->c.aTo[i].extent;
2035 p->aOrig[i].iVers = -1;
2036 }
2037 p->nOrig = p->c.nTo;
2038 return 0;
2039 }
@@ -2086,13 +2062,13 @@
2086 /* Return no errors */
2087 return 0;
2088 }
2089
2090
2091 /* Annotation flags. Cannot overlap with DIFF flags */
2092 #define ANN_FILE_VERS (((u64)0x40)<<32) /* Show file vers rather than commit vers */
2093 #define ANN_FILE_ANCEST (((u64)0x80)<<32) /* Prefer check-ins in the ANCESTOR table */
2094
2095 /*
2096 ** Compute a complete annotation on a file. The file is identified
2097 ** by its filename number (filename.fnid) and the baseline in which
2098 ** it was checked in (mlink.mid).
@@ -2100,11 +2076,11 @@
2100 static void annotate_file(
2101 Annotator *p, /* The annotator */
2102 int fnid, /* The name of the file to be annotated */
2103 int mid, /* Use the version of the file in this check-in */
2104 int iLimit, /* Limit the number of levels if greater than zero */
2105 u64 flags /* Flags to alter the annotation/whitespace handling */
2106 ){
2107 Blob toAnnotate; /* Text of the final (mid) version of the file */
2108 Blob step; /* Text of previous revision */
2109 int rid; /* Artifact ID of the file being annotated */
2110 Stmt q; /* Query returning all ancestor versions */
@@ -2119,11 +2095,11 @@
2119 if( !content_get(rid, &toAnnotate) ){
2120 fossil_fatal("unable to retrieve content of artifact #%d", rid);
2121 }
2122 if( iLimit<=0 ) iLimit = 1000000000;
2123 blob_to_utf8_no_bom(&toAnnotate, 0);
2124 annotation_start(p, &toAnnotate, flags);
2125 db_begin_transaction();
2126 db_multi_exec(
2127 "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);"
2128 "DELETE FROM vseen;"
2129 );
@@ -2138,11 +2114,11 @@
2138 " FROM mlink, event"
2139 " WHERE mlink.fid=:rid"
2140 " AND event.objid=mlink.mid"
2141 " AND mlink.pid NOT IN vseen"
2142 " ORDER BY %s event.mtime",
2143 (flags & ANN_FILE_ANCEST)!=0 ?
2144 "(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":""
2145 );
2146
2147 db_bind_int(&q, ":rid", rid);
2148 if( iLimit==0 ) iLimit = 1000000000;
@@ -2154,11 +2130,11 @@
2154 p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2));
2155 p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3));
2156 if( p->nVers ){
2157 content_get(rid, &step);
2158 blob_to_utf8_no_bom(&step, 0);
2159 annotation_step(p, &step, p->nVers-1, flags);
2160 blob_reset(&step);
2161 }
2162 p->nVers++;
2163 db_bind_int(&ins, ":rid", rid);
2164 db_step(&ins);
@@ -2209,14 +2185,13 @@
2209 void annotation_page(void){
2210 int mid;
2211 int fnid;
2212 int i;
2213 int iLimit; /* Depth limit */
2214 u64 flags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2215 int showLog = 0; /* True to display the log */
2216 int ignoreWs = 0; /* Ignore whitespace */
2217 u64 diffFlags; /* diff flags for ignore whitespace */
2218 const char *zFilename; /* Name of file to annotate */
2219 const char *zCI; /* The check-in containing zFilename */
2220 Annotator ann;
2221 HQuery url;
2222 struct AnnVers *p;
@@ -2226,25 +2201,26 @@
2226 /* Gather query parameters */
2227 showLog = atoi(PD("log","1"));
2228 login_check_credentials();
2229 if( !g.perm.Read ){ login_needed(); return; }
2230 if( exclude_spiders("annotate") ) return;
 
2231 mid = name_to_typed_rid(PD("checkin","0"),"ci");
2232 zFilename = P("filename");
2233 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
2234 if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
2235 iLimit = atoi(PD("limit","20"));
2236 if( P("filevers") ) flags |= ANN_FILE_VERS;
2237 ignoreWs = P("w")!=0;
2238 if( ignoreWs ) flags |= DIFF_IGNORE_ALLWS;
2239 if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
2240 fossil_redirect_home();
2241 }
2242
2243 /* compute the annotation */
2244 compute_direct_ancestors(mid, 10000000);
2245 annotate_file(&ann, fnid, mid, iLimit, flags);
2246 zCI = ann.aVers[0].zMUuid;
2247
2248 /* generate the web page */
2249 style_header("Annotation For %h", zFilename);
2250 if( bBlame ){
@@ -2407,27 +2383,27 @@
2407 Annotator ann; /* The annotation of the file */
2408 int i; /* Loop counter */
2409 const char *zLimit; /* The value to the -n|--limit option */
2410 int iLimit; /* How far back in time to look */
2411 int showLog; /* True to show the log */
2412 u64 flags = 0; /* Flags to control annotation/whitespace handling */
2413 int fileVers; /* Show file version instead of check-in versions */
 
2414 int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */
2415
2416 bBlame = g.argv[1][0]!='a';
2417 zLimit = find_option("limit","n",1);
2418 if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
2419 iLimit = atoi(zLimit);
2420 showLog = find_option("log","l",0)!=0;
2421 if( find_option("ignore-trailing-space","Z",0)!=0 ){
2422 flags = DIFF_IGNORE_EOLWS;
2423 }
2424 if( find_option("ignore-space-change","b",0)!=0 ){
2425 flags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */
2426 }
2427 if( find_option("ignore-all-space","w",0)!=0 ){
2428 flags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */
2429 }
2430 fileVers = find_option("filevers",0,0)!=0;
2431 db_must_be_within_tree();
2432 if( g.argc<3 ) {
2433 usage("FILENAME");
@@ -2453,12 +2429,12 @@
2453 " ORDER BY ancestor.generation ASC LIMIT 1",
2454 fid, fnid);
2455 if( mid==0 ){
2456 fossil_fatal("unable to find manifest");
2457 }
2458 flags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2459 annotate_file(&ann, fnid, mid, iLimit, flags);
2460 if( showLog ){
2461 struct AnnVers *p;
2462 for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
2463 fossil_print("version %3d: %s %.10s file %.10s\n",
2464 i+1, p->zDate, p->zMUuid, p->zFUuid);
2465
--- src/diff.c
+++ src/diff.c
@@ -78,11 +78,12 @@
78 */
79 typedef struct DLine DLine;
80 struct DLine {
81 const char *z; /* The text of the line */
82 unsigned int h; /* Hash of the line */
83 unsigned short indent; /* Indent of the line. Only !=0 with -w/-Z option */
84 unsigned short n; /* number of bytes */
85 unsigned int iNext; /* 1+(Index of next line with same the same hash) */
86
87 /* an array of DLine elements serves two purposes. The fields
88 ** above are one per line of input text. But each entry is also
89 ** a bucket in a hash table, as follows: */
@@ -132,11 +133,11 @@
133 **
134 ** Profiling show that in most cases this routine consumes the bulk of
135 ** the CPU time on a diff.
136 */
137 static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){
138 int nLine, i, j, k, s, x;
139 unsigned int h, h2;
140 DLine *a;
141
142 /* Count the number of lines. Allocate space to hold
143 ** the returned array.
@@ -165,52 +166,27 @@
166 }
167
168 /* Fill in the array */
169 for(i=0; i<nLine; i++){
170 for(j=0; z[j] && z[j]!='\n'; j++){}
171 a[i].z = z;
 
 
 
172 if( diffFlags & DIFF_STRIP_EOLCR ){
 
173 if( k>0 && z[k-1]=='\r' ){ k--; }
174 }
175 a[i].n = k = j;
176 s = 0;
177 if( diffFlags & DIFF_IGNORE_EOLWS ){
178 while( k>0 && fossil_isspace(z[k-1]) ){ k--; }
179 }
180 if( (diffFlags & DIFF_IGNORE_ALLWS)==DIFF_IGNORE_ALLWS ){
181 while( s<k && fossil_isspace(z[s]) ){ s++; }
182 }
183 a[i].indent = s;
184 for(h=0, x=s; x<k; x++){
185 h = h ^ (h<<2) ^ z[x];
186 }
187 a[i].h = h = (h<<LENGTH_MASK_SZ) | (k-s);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188 h2 = h % nLine;
189 a[i].iNext = a[h2].iHash;
190 a[h2].iHash = i+1;
191 z += j+1;
192 }
@@ -263,16 +239,16 @@
239 }else if( cPrefix=='+' ){
240 blob_append(pOut, "<span class=\"diffadd\">", -1);
241 }else if( cPrefix=='-' ){
242 blob_append(pOut, "<span class=\"diffrm\">", -1);
243 }
244 htmlize_to_blob(pOut, pLine->z, pLine->n);
245 if( cPrefix!=' ' ){
246 blob_append(pOut, "</span>", -1);
247 }
248 }else{
249 blob_append(pOut, pLine->z, pLine->n);
250 }
251 blob_append(pOut, "\n", 1);
252 }
253
254 /*
@@ -444,11 +420,11 @@
420 b += m;
421 if( i<nr-1 ){
422 m = R[r+i*3+3];
423 for(j=0; j<m; j++){
424 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
425 appendDiffLine(pOut, ' ', &A[a+j], html, 0);
426 }
427 b += m;
428 a += m;
429 }
430 }
@@ -457,11 +433,11 @@
433 assert( nr==i );
434 m = R[r+nr*3];
435 if( m>nContext ) m = nContext;
436 for(j=0; j<m; j++){
437 if( showLn ) appendDiffLineno(pOut, a+j+1, b+j+1, html);
438 appendDiffLine(pOut, ' ', &A[a+j], html, 0);
439 }
440 }
441 }
442
443 /*
@@ -518,11 +494,11 @@
494 ** This comment contains multibyte unicode characters (ü, Æ, ð) in order
495 ** to test the ability of the diff code to handle such characters.
496 */
497 static void sbsWriteText(SbsLine *p, DLine *pLine, int col){
498 Blob *pCol = p->apCols[col];
499 int n = pLine->n;
500 int i; /* Number of input characters consumed */
501 int k; /* Cursor position */
502 int needEndSpan = 0;
503 const char *zIn = pLine->z;
504 int w = p->width;
@@ -1882,12 +1858,12 @@
1858 ** --invert Invert the diff DIFF_INVERT
1859 ** -n|--linenum Show line numbers DIFF_LINENO
1860 ** --noopt Disable optimization DIFF_NOOPT
1861 ** --strip-trailing-cr Strip trailing CR DIFF_STRIP_EOLCR
1862 ** --unified Unified diff. ~DIFF_SIDEBYSIDE
 
1863 ** -w|--ignore-all-space Ignore all white space DIFF_IGNORE_ALLWS
1864 ** -W|--width N N character lines. DIFF_WIDTH_MASK
1865 ** -y|--side-by-side Side-by-side diff. DIFF_SIDEBYSIDE
1866 ** -Z|--ignore-trailing-space Ignore eol-whitespaces DIFF_IGNORE_EOLWS
1867 */
1868 u64 diff_options(void){
1869 u64 diffFlags = 0;
@@ -1995,11 +1971,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 (omitting trailing \n) */
1977 short int iVers; /* Level at which tag was set */
1978 } *aOrig;
1979 int nOrig; /* Number of elements in aOrig[] */
1980 int nVers; /* Number of versions analyzed */
1981 int bLimit; /* True if the iLimit was reached */
@@ -2029,11 +2005,11 @@
2005 return 1;
2006 }
2007 p->aOrig = fossil_malloc( sizeof(p->aOrig[0])*p->c.nTo );
2008 for(i=0; i<p->c.nTo; i++){
2009 p->aOrig[i].z = p->c.aTo[i].z;
2010 p->aOrig[i].n = p->c.aTo[i].n;
2011 p->aOrig[i].iVers = -1;
2012 }
2013 p->nOrig = p->c.nTo;
2014 return 0;
2015 }
@@ -2086,13 +2062,13 @@
2062 /* Return no errors */
2063 return 0;
2064 }
2065
2066
2067 /* Annotation flags (any DIFF flag can be used as Annotation flag as well) */
2068 #define ANN_FILE_VERS (((u64)0x20)<<32) /* Show file vers rather than commit vers */
2069 #define ANN_FILE_ANCEST (((u64)0x40)<<32) /* Prefer check-ins in the ANCESTOR table */
2070
2071 /*
2072 ** Compute a complete annotation on a file. The file is identified
2073 ** by its filename number (filename.fnid) and the baseline in which
2074 ** it was checked in (mlink.mid).
@@ -2100,11 +2076,11 @@
2076 static void annotate_file(
2077 Annotator *p, /* The annotator */
2078 int fnid, /* The name of the file to be annotated */
2079 int mid, /* Use the version of the file in this check-in */
2080 int iLimit, /* Limit the number of levels if greater than zero */
2081 u64 annFlags /* Flags to alter the annotation */
2082 ){
2083 Blob toAnnotate; /* Text of the final (mid) version of the file */
2084 Blob step; /* Text of previous revision */
2085 int rid; /* Artifact ID of the file being annotated */
2086 Stmt q; /* Query returning all ancestor versions */
@@ -2119,11 +2095,11 @@
2095 if( !content_get(rid, &toAnnotate) ){
2096 fossil_fatal("unable to retrieve content of artifact #%d", rid);
2097 }
2098 if( iLimit<=0 ) iLimit = 1000000000;
2099 blob_to_utf8_no_bom(&toAnnotate, 0);
2100 annotation_start(p, &toAnnotate, annFlags);
2101 db_begin_transaction();
2102 db_multi_exec(
2103 "CREATE TEMP TABLE IF NOT EXISTS vseen(rid INTEGER PRIMARY KEY);"
2104 "DELETE FROM vseen;"
2105 );
@@ -2138,11 +2114,11 @@
2114 " FROM mlink, event"
2115 " WHERE mlink.fid=:rid"
2116 " AND event.objid=mlink.mid"
2117 " AND mlink.pid NOT IN vseen"
2118 " ORDER BY %s event.mtime",
2119 (annFlags & ANN_FILE_ANCEST)!=0 ?
2120 "(mlink.mid IN (SELECT rid FROM ancestor)) DESC,":""
2121 );
2122
2123 db_bind_int(&q, ":rid", rid);
2124 if( iLimit==0 ) iLimit = 1000000000;
@@ -2154,11 +2130,11 @@
2130 p->aVers[p->nVers].zDate = fossil_strdup(db_column_text(&q, 2));
2131 p->aVers[p->nVers].zUser = fossil_strdup(db_column_text(&q, 3));
2132 if( p->nVers ){
2133 content_get(rid, &step);
2134 blob_to_utf8_no_bom(&step, 0);
2135 annotation_step(p, &step, p->nVers-1, annFlags);
2136 blob_reset(&step);
2137 }
2138 p->nVers++;
2139 db_bind_int(&ins, ":rid", rid);
2140 db_step(&ins);
@@ -2209,14 +2185,13 @@
2185 void annotation_page(void){
2186 int mid;
2187 int fnid;
2188 int i;
2189 int iLimit; /* Depth limit */
2190 u64 annFlags = (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2191 int showLog = 0; /* True to display the log */
2192 int ignoreWs = 0; /* Ignore whitespace */
 
2193 const char *zFilename; /* Name of file to annotate */
2194 const char *zCI; /* The check-in containing zFilename */
2195 Annotator ann;
2196 HQuery url;
2197 struct AnnVers *p;
@@ -2226,25 +2201,26 @@
2201 /* Gather query parameters */
2202 showLog = atoi(PD("log","1"));
2203 login_check_credentials();
2204 if( !g.perm.Read ){ login_needed(); return; }
2205 if( exclude_spiders("annotate") ) return;
2206 load_control();
2207 mid = name_to_typed_rid(PD("checkin","0"),"ci");
2208 zFilename = P("filename");
2209 fnid = db_int(0, "SELECT fnid FROM filename WHERE name=%Q", zFilename);
2210 if( mid==0 || fnid==0 ){ fossil_redirect_home(); }
2211 iLimit = atoi(PD("limit","20"));
2212 if( P("filevers") ) annFlags |= ANN_FILE_VERS;
2213 ignoreWs = P("w")!=0;
2214 if( ignoreWs ) annFlags |= DIFF_IGNORE_ALLWS;
2215 if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d AND fnid=%d",mid,fnid) ){
2216 fossil_redirect_home();
2217 }
2218
2219 /* compute the annotation */
2220 compute_direct_ancestors(mid, 10000000);
2221 annotate_file(&ann, fnid, mid, iLimit, annFlags);
2222 zCI = ann.aVers[0].zMUuid;
2223
2224 /* generate the web page */
2225 style_header("Annotation For %h", zFilename);
2226 if( bBlame ){
@@ -2407,27 +2383,27 @@
2383 Annotator ann; /* The annotation of the file */
2384 int i; /* Loop counter */
2385 const char *zLimit; /* The value to the -n|--limit option */
2386 int iLimit; /* How far back in time to look */
2387 int showLog; /* True to show the log */
 
2388 int fileVers; /* Show file version instead of check-in versions */
2389 u64 annFlags = 0; /* Flags to control annotation properties */
2390 int bBlame = 0; /* True for BLAME output. False for ANNOTATE. */
2391
2392 bBlame = g.argv[1][0]!='a';
2393 zLimit = find_option("limit","n",1);
2394 if( zLimit==0 || zLimit[0]==0 ) zLimit = "-1";
2395 iLimit = atoi(zLimit);
2396 showLog = find_option("log","l",0)!=0;
2397 if( find_option("ignore-trailing-space","Z",0)!=0 ){
2398 annFlags = DIFF_IGNORE_EOLWS;
2399 }
2400 if( find_option("ignore-space-change","b",0)!=0 ){
2401 annFlags = DIFF_IGNORE_WSCHG; /* stronger than DIFF_IGNORE_EOLWS */
2402 }
2403 if( find_option("ignore-all-space","w",0)!=0 ){
2404 annFlags = DIFF_IGNORE_ALLWS; /* stronger than DIFF_IGNORE_WSCHG */
2405 }
2406 fileVers = find_option("filevers",0,0)!=0;
2407 db_must_be_within_tree();
2408 if( g.argc<3 ) {
2409 usage("FILENAME");
@@ -2453,12 +2429,12 @@
2429 " ORDER BY ancestor.generation ASC LIMIT 1",
2430 fid, fnid);
2431 if( mid==0 ){
2432 fossil_fatal("unable to find manifest");
2433 }
2434 annFlags |= (ANN_FILE_ANCEST|DIFF_STRIP_EOLCR);
2435 annotate_file(&ann, fnid, mid, iLimit, annFlags);
2436 if( showLog ){
2437 struct AnnVers *p;
2438 for(p=ann.aVers, i=0; i<ann.nVers; i++, p++){
2439 fossil_print("version %3d: %s %.10s file %.10s\n",
2440 i+1, p->zDate, p->zMUuid, p->zFUuid);
2441
+1 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1105,11 +1105,11 @@
11051105
** --to VERSION select VERSION as target for the diff
11061106
** --unified unified diff
11071107
** -v|--verbose output complete text of added or deleted files
11081108
** -w|--ignore-all-space Ignore white space when comparing lines
11091109
** -W|--width <num> Width of lines in side-by-side diff
1110
-** -Z|--ignore-trailing-space Ignore whitespace at line end
1110
+** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace
11111111
*/
11121112
void diff_cmd(void){
11131113
int isGDiff; /* True for gdiff. False for normal diff */
11141114
int isInternDiff; /* True for internal diff */
11151115
int verboseFlag; /* True if -v or --verbose flag is used */
11161116
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1105,11 +1105,11 @@
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-all-space Ignore white space when comparing lines
1109 ** -W|--width <num> Width of lines in side-by-side diff
1110 ** -Z|--ignore-trailing-space Ignore whitespace at line end
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
@@ -1105,11 +1105,11 @@
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-all-space Ignore white space when comparing lines
1109 ** -W|--width <num> Width of lines in side-by-side diff
1110 ** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace
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
+1 -1
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1105,11 +1105,11 @@
11051105
** --to VERSION select VERSION as target for the diff
11061106
** --unified unified diff
11071107
** -v|--verbose output complete text of added or deleted files
11081108
** -w|--ignore-all-space Ignore white space when comparing lines
11091109
** -W|--width <num> Width of lines in side-by-side diff
1110
-** -Z|--ignore-trailing-space Ignore whitespace at line end
1110
+** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace
11111111
*/
11121112
void diff_cmd(void){
11131113
int isGDiff; /* True for gdiff. False for normal diff */
11141114
int isInternDiff; /* True for internal diff */
11151115
int verboseFlag; /* True if -v or --verbose flag is used */
11161116
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -1105,11 +1105,11 @@
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-all-space Ignore white space when comparing lines
1109 ** -W|--width <num> Width of lines in side-by-side diff
1110 ** -Z|--ignore-trailing-space Ignore whitespace at line end
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
@@ -1105,11 +1105,11 @@
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-all-space Ignore white space when comparing lines
1109 ** -W|--width <num> Width of lines in side-by-side diff
1110 ** -Z|--ignore-trailing-space Ignore changes to end-of-line whitespace
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
+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
+68 -68
--- src/info.c
+++ src/info.c
@@ -500,10 +500,13 @@
500500
const char *zName; /* Name of the checkin to be displayed */
501501
const char *zUuid; /* UUID of zName */
502502
const char *zParent; /* UUID of the parent checkin (if any) */
503503
const char *zRe; /* regex parameter */
504504
ReCompiled *pRe = 0; /* regex */
505
+ const char *zW; /* URL param for ignoring whitespace */
506
+ const char *zPage = "vinfo"; /* Page that shows diffs */
507
+ const char *zPageHide = "ci"; /* Page that hides diffs */
505508
506509
login_check_credentials();
507510
if( !g.perm.Read ){ login_needed(); return; }
508511
zName = P("name");
509512
rid = name_to_rid_www("name");
@@ -665,76 +668,74 @@
665668
style_header("Check-in Information");
666669
login_anonymous_available();
667670
}
668671
db_finalize(&q1);
669672
showTags(rid, "");
670
- if( zParent ){
671
- const char *zW; /* URL param for ignoring whitespace */
672
- const char *zPage = "vinfo"; /* Page that shows diffs */
673
- const char *zPageHide = "ci"; /* Page that hides diffs */
674
- @ <div class="section">Changes</div>
675
- @ <div class="sectionmenu">
676
- verboseFlag = g.zPath[0]!='c';
677
- if( db_get_boolean("show-version-diffs", 0)==0 ){
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))
689
- @ Unified&nbsp;Diffs</a>
690
- }else{
691
- @ %z(xhref("class='button'","%R/%s/%T?sbs=1%s",zPage,zName,zW))
692
- @ Side-by-Side&nbsp;Diffs</a>
693
- }
694
- if( *zW ){
695
- @ %z(xhref("class='button'","%R/%s/%T?sbs=%d",zPage,zName,sideBySide))
696
- @ Show&nbsp;Whitespace&nbsp;Changes</a>
697
- }else{
698
- @ %z(xhref("class='button'","%R/%s/%T?sbs=%d&w",zPage,zName,sideBySide))
699
- @ Ignore&nbsp;Whitespace</a>
700
- }
701
- }else{
702
- @ %z(xhref("class='button'","%R/%s/%T?sbs=0",zPage,zName))
703
- @ Show&nbsp;Unified&nbsp;Diffs</a>
704
- @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName))
705
- @ Show&nbsp;Side-by-Side&nbsp;Diffs</a>
706
- }
673
+ @ <div class="section">Changes</div>
674
+ @ <div class="sectionmenu">
675
+ verboseFlag = g.zPath[0]!='c';
676
+ if( db_get_boolean("show-version-diffs", 0)==0 ){
677
+ verboseFlag = !verboseFlag;
678
+ zPage = "ci";
679
+ zPageHide = "vinfo";
680
+ }
681
+ diffFlags = construct_diff_flags(verboseFlag, sideBySide);
682
+ zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
683
+ if( verboseFlag ){
684
+ @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName))
685
+ @ Hide&nbsp;Diffs</a>
686
+ if( sideBySide ){
687
+ @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW))
688
+ @ Unified&nbsp;Diffs</a>
689
+ }else{
690
+ @ %z(xhref("class='button'","%R/%s/%T?sbs=1%s",zPage,zName,zW))
691
+ @ Side-by-Side&nbsp;Diffs</a>
692
+ }
693
+ if( *zW ){
694
+ @ %z(xhref("class='button'","%R/%s/%T?sbs=%d",zPage,zName,sideBySide))
695
+ @ Show&nbsp;Whitespace&nbsp;Changes</a>
696
+ }else{
697
+ @ %z(xhref("class='button'","%R/%s/%T?sbs=%d&w",zPage,zName,sideBySide))
698
+ @ Ignore&nbsp;Whitespace</a>
699
+ }
700
+ }else{
701
+ @ %z(xhref("class='button'","%R/%s/%T?sbs=0",zPage,zName))
702
+ @ Show&nbsp;Unified&nbsp;Diffs</a>
703
+ @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName))
704
+ @ Show&nbsp;Side-by-Side&nbsp;Diffs</a>
705
+ }
706
+ if( zParent ){
707707
@ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
708
- @ Patch</a></div>
709
- if( pRe ){
710
- @ <p><b>Only differences that match regular expression "%h(zRe)"
711
- @ are shown.</b></p>
712
- }
713
- db_prepare(&q3,
714
- "SELECT name,"
715
- " mperm,"
716
- " (SELECT uuid FROM blob WHERE rid=mlink.pid),"
717
- " (SELECT uuid FROM blob WHERE rid=mlink.fid),"
718
- " (SELECT name FROM filename WHERE filename.fnid=mlink.pfnid)"
719
- " FROM mlink JOIN filename ON filename.fnid=mlink.fnid"
720
- " WHERE mlink.mid=%d"
721
- " AND (mlink.fid>0"
722
- " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))"
723
- " ORDER BY name /*sort*/",
724
- rid, rid
725
- );
726
- while( db_step(&q3)==SQLITE_ROW ){
727
- const char *zName = db_column_text(&q3,0);
728
- int mperm = db_column_int(&q3, 1);
729
- const char *zOld = db_column_text(&q3,2);
730
- const char *zNew = db_column_text(&q3,3);
731
- const char *zOldName = db_column_text(&q3, 4);
732
- append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm);
733
- }
734
- db_finalize(&q3);
735
- }
708
+ @ Patch</a>
709
+ }
710
+ @</div>
711
+ if( pRe ){
712
+ @ <p><b>Only differences that match regular expression "%h(zRe)"
713
+ @ are shown.</b></p>
714
+ }
715
+ db_prepare(&q3,
716
+ "SELECT name,"
717
+ " mperm,"
718
+ " (SELECT uuid FROM blob WHERE rid=mlink.pid),"
719
+ " (SELECT uuid FROM blob WHERE rid=mlink.fid),"
720
+ " (SELECT name FROM filename WHERE filename.fnid=mlink.pfnid)"
721
+ " FROM mlink JOIN filename ON filename.fnid=mlink.fnid"
722
+ " WHERE mlink.mid=%d"
723
+ " AND (mlink.fid>0"
724
+ " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))"
725
+ " ORDER BY name /*sort*/",
726
+ rid, rid
727
+ );
728
+ while( db_step(&q3)==SQLITE_ROW ){
729
+ const char *zName = db_column_text(&q3,0);
730
+ int mperm = db_column_int(&q3, 1);
731
+ const char *zOld = db_column_text(&q3,2);
732
+ const char *zNew = db_column_text(&q3,3);
733
+ const char *zOldName = db_column_text(&q3, 4);
734
+ append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm);
735
+ }
736
+ db_finalize(&q3);
736737
append_diff_javascript(sideBySide);
737738
style_footer();
738739
}
739740
740741
/*
@@ -1384,11 +1385,10 @@
13841385
diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML;
13851386
13861387
style_header("Diff");
13871388
zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
13881389
if( *zW ){
1389
- diffFlags |= DIFF_IGNORE_ALLWS;
13901390
style_submenu_element("Show Whitespace Changes", "Show Whitespace Changes",
13911391
"%s/fdiff?v1=%T&v2=%T&sbs=%d",
13921392
g.zTop, P("v1"), P("v2"), sideBySide);
13931393
}else{
13941394
style_submenu_element("Ignore Whitespace", "Ignore Whitespace",
@@ -1444,11 +1444,11 @@
14441444
rid = name_to_rid_www("name");
14451445
login_check_credentials();
14461446
if( !g.perm.Read ){ login_needed(); return; }
14471447
if( rid==0 ) fossil_redirect_home();
14481448
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
1449
- if( fossil_strcmp(P("name"), zUuid)==0 ){
1449
+ if( fossil_strcmp(P("name"), zUuid)==0 && login_is_nobody() ){
14501450
g.isConst = 1;
14511451
}
14521452
free(zUuid);
14531453
zMime = P("m");
14541454
if( zMime==0 ){
@@ -2263,11 +2263,11 @@
22632263
}
22642264
db_finalize(&q);
22652265
if( nChng>0 ){
22662266
int nrid;
22672267
Blob cksum;
2268
- blob_appendf(&ctrl, "U %F\n", g.zLogin);
2268
+ blob_appendf(&ctrl, "U %F\n", login_name());
22692269
md5sum_blob(&ctrl, &cksum);
22702270
blob_appendf(&ctrl, "Z %b\n", &cksum);
22712271
db_begin_transaction();
22722272
g.markPrivate = content_is_private(rid);
22732273
nrid = content_put(&ctrl);
22742274
22752275
ADDED src/loadctrl.c
--- src/info.c
+++ src/info.c
@@ -500,10 +500,13 @@
500 const char *zName; /* Name of the checkin to be displayed */
501 const char *zUuid; /* UUID of zName */
502 const char *zParent; /* UUID of the parent checkin (if any) */
503 const char *zRe; /* regex parameter */
504 ReCompiled *pRe = 0; /* regex */
 
 
 
505
506 login_check_credentials();
507 if( !g.perm.Read ){ login_needed(); return; }
508 zName = P("name");
509 rid = name_to_rid_www("name");
@@ -665,76 +668,74 @@
665 style_header("Check-in Information");
666 login_anonymous_available();
667 }
668 db_finalize(&q1);
669 showTags(rid, "");
670 if( zParent ){
671 const char *zW; /* URL param for ignoring whitespace */
672 const char *zPage = "vinfo"; /* Page that shows diffs */
673 const char *zPageHide = "ci"; /* Page that hides diffs */
674 @ <div class="section">Changes</div>
675 @ <div class="sectionmenu">
676 verboseFlag = g.zPath[0]!='c';
677 if( db_get_boolean("show-version-diffs", 0)==0 ){
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))
689 @ Unified&nbsp;Diffs</a>
690 }else{
691 @ %z(xhref("class='button'","%R/%s/%T?sbs=1%s",zPage,zName,zW))
692 @ Side-by-Side&nbsp;Diffs</a>
693 }
694 if( *zW ){
695 @ %z(xhref("class='button'","%R/%s/%T?sbs=%d",zPage,zName,sideBySide))
696 @ Show&nbsp;Whitespace&nbsp;Changes</a>
697 }else{
698 @ %z(xhref("class='button'","%R/%s/%T?sbs=%d&w",zPage,zName,sideBySide))
699 @ Ignore&nbsp;Whitespace</a>
700 }
701 }else{
702 @ %z(xhref("class='button'","%R/%s/%T?sbs=0",zPage,zName))
703 @ Show&nbsp;Unified&nbsp;Diffs</a>
704 @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName))
705 @ Show&nbsp;Side-by-Side&nbsp;Diffs</a>
706 }
707 @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
708 @ Patch</a></div>
709 if( pRe ){
710 @ <p><b>Only differences that match regular expression "%h(zRe)"
711 @ are shown.</b></p>
712 }
713 db_prepare(&q3,
714 "SELECT name,"
715 " mperm,"
716 " (SELECT uuid FROM blob WHERE rid=mlink.pid),"
717 " (SELECT uuid FROM blob WHERE rid=mlink.fid),"
718 " (SELECT name FROM filename WHERE filename.fnid=mlink.pfnid)"
719 " FROM mlink JOIN filename ON filename.fnid=mlink.fnid"
720 " WHERE mlink.mid=%d"
721 " AND (mlink.fid>0"
722 " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))"
723 " ORDER BY name /*sort*/",
724 rid, rid
725 );
726 while( db_step(&q3)==SQLITE_ROW ){
727 const char *zName = db_column_text(&q3,0);
728 int mperm = db_column_int(&q3, 1);
729 const char *zOld = db_column_text(&q3,2);
730 const char *zNew = db_column_text(&q3,3);
731 const char *zOldName = db_column_text(&q3, 4);
732 append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm);
733 }
734 db_finalize(&q3);
735 }
 
736 append_diff_javascript(sideBySide);
737 style_footer();
738 }
739
740 /*
@@ -1384,11 +1385,10 @@
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 diffFlags |= DIFF_IGNORE_ALLWS;
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 +1444,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 +2263,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
@@ -500,10 +500,13 @@
500 const char *zName; /* Name of the checkin to be displayed */
501 const char *zUuid; /* UUID of zName */
502 const char *zParent; /* UUID of the parent checkin (if any) */
503 const char *zRe; /* regex parameter */
504 ReCompiled *pRe = 0; /* regex */
505 const char *zW; /* URL param for ignoring whitespace */
506 const char *zPage = "vinfo"; /* Page that shows diffs */
507 const char *zPageHide = "ci"; /* Page that hides diffs */
508
509 login_check_credentials();
510 if( !g.perm.Read ){ login_needed(); return; }
511 zName = P("name");
512 rid = name_to_rid_www("name");
@@ -665,76 +668,74 @@
668 style_header("Check-in Information");
669 login_anonymous_available();
670 }
671 db_finalize(&q1);
672 showTags(rid, "");
673 @ <div class="section">Changes</div>
674 @ <div class="sectionmenu">
675 verboseFlag = g.zPath[0]!='c';
676 if( db_get_boolean("show-version-diffs", 0)==0 ){
677 verboseFlag = !verboseFlag;
678 zPage = "ci";
679 zPageHide = "vinfo";
680 }
681 diffFlags = construct_diff_flags(verboseFlag, sideBySide);
682 zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
683 if( verboseFlag ){
684 @ %z(xhref("class='button'","%R/%s/%T",zPageHide,zName))
685 @ Hide&nbsp;Diffs</a>
686 if( sideBySide ){
687 @ %z(xhref("class='button'","%R/%s/%T?sbs=0%s",zPage,zName,zW))
688 @ Unified&nbsp;Diffs</a>
689 }else{
690 @ %z(xhref("class='button'","%R/%s/%T?sbs=1%s",zPage,zName,zW))
691 @ Side-by-Side&nbsp;Diffs</a>
692 }
693 if( *zW ){
694 @ %z(xhref("class='button'","%R/%s/%T?sbs=%d",zPage,zName,sideBySide))
695 @ Show&nbsp;Whitespace&nbsp;Changes</a>
696 }else{
697 @ %z(xhref("class='button'","%R/%s/%T?sbs=%d&w",zPage,zName,sideBySide))
698 @ Ignore&nbsp;Whitespace</a>
699 }
700 }else{
701 @ %z(xhref("class='button'","%R/%s/%T?sbs=0",zPage,zName))
702 @ Show&nbsp;Unified&nbsp;Diffs</a>
703 @ %z(xhref("class='button'","%R/%s/%T?sbs=1",zPage,zName))
704 @ Show&nbsp;Side-by-Side&nbsp;Diffs</a>
705 }
706 if( zParent ){
 
 
 
707 @ %z(xhref("class='button'","%R/vpatch?from=%S&to=%S",zParent,zUuid))
708 @ Patch</a>
709 }
710 @</div>
711 if( pRe ){
712 @ <p><b>Only differences that match regular expression "%h(zRe)"
713 @ are shown.</b></p>
714 }
715 db_prepare(&q3,
716 "SELECT name,"
717 " mperm,"
718 " (SELECT uuid FROM blob WHERE rid=mlink.pid),"
719 " (SELECT uuid FROM blob WHERE rid=mlink.fid),"
720 " (SELECT name FROM filename WHERE filename.fnid=mlink.pfnid)"
721 " FROM mlink JOIN filename ON filename.fnid=mlink.fnid"
722 " WHERE mlink.mid=%d"
723 " AND (mlink.fid>0"
724 " OR mlink.fnid NOT IN (SELECT pfnid FROM mlink WHERE mid=%d))"
725 " ORDER BY name /*sort*/",
726 rid, rid
727 );
728 while( db_step(&q3)==SQLITE_ROW ){
729 const char *zName = db_column_text(&q3,0);
730 int mperm = db_column_int(&q3, 1);
731 const char *zOld = db_column_text(&q3,2);
732 const char *zNew = db_column_text(&q3,3);
733 const char *zOldName = db_column_text(&q3, 4);
734 append_file_change_line(zName, zOld, zNew, zOldName, diffFlags,pRe,mperm);
735 }
736 db_finalize(&q3);
737 append_diff_javascript(sideBySide);
738 style_footer();
739 }
740
741 /*
@@ -1384,11 +1385,10 @@
1385 diffFlags = construct_diff_flags(1, sideBySide) | DIFF_HTML;
1386
1387 style_header("Diff");
1388 zW = (diffFlags&DIFF_IGNORE_ALLWS)?"&w":"";
1389 if( *zW ){
 
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 +1444,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 && login_is_nobody() ){
1450 g.isConst = 1;
1451 }
1452 free(zUuid);
1453 zMime = P("m");
1454 if( zMime==0 ){
@@ -2263,11 +2263,11 @@
2263 }
2264 db_finalize(&q);
2265 if( nChng>0 ){
2266 int nrid;
2267 Blob cksum;
2268 blob_appendf(&ctrl, "U %F\n", login_name());
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
--- 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 */
@@ -193,11 +193,11 @@
193193
char *urlFossil; /* The fossil query parameter on ssh: */
194194
unsigned urlFlags; /* Boolean flags controlling URL processing */
195195
int useProxy; /* Used to remember that a proxy is in use */
196196
char *proxyUrlPath;
197197
int proxyOrigPort; /* Tunneled port number for https through proxy */
198
- const char *zLogin; /* Login name. "" if not logged in. */
198
+ const char *zLogin; /* Login name. NULL or "" if not logged in. */
199199
const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
200200
** SSL client identity */
201201
int useLocalauth; /* No login required if from 127.0.0.1 */
202202
int noPswd; /* Logged in without password (on 127.0.0.1) */
203203
int userUid; /* Integer user id */
@@ -1457,11 +1457,11 @@
14571457
zAltRepo[jj] = 0;
14581458
zAltRepo += jj+1;
14591459
}else{
14601460
zUser = "nobody";
14611461
}
1462
- if( g.zLogin==0 ) zUser = "nobody";
1462
+ if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody";
14631463
if( zAltRepo[0]!='/' ){
14641464
zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo);
14651465
file_simplify_name(zAltRepo, -1, 0);
14661466
}
14671467
db_close(1);
14681468
--- 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 */
@@ -193,11 +193,11 @@
193 char *urlFossil; /* The fossil query parameter on ssh: */
194 unsigned urlFlags; /* Boolean flags controlling URL processing */
195 int useProxy; /* Used to remember that a proxy is in use */
196 char *proxyUrlPath;
197 int proxyOrigPort; /* Tunneled port number for https through proxy */
198 const char *zLogin; /* Login name. "" if not logged in. */
199 const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
200 ** SSL client identity */
201 int useLocalauth; /* No login required if from 127.0.0.1 */
202 int noPswd; /* Logged in without password (on 127.0.0.1) */
203 int userUid; /* Integer user id */
@@ -1457,11 +1457,11 @@
1457 zAltRepo[jj] = 0;
1458 zAltRepo += jj+1;
1459 }else{
1460 zUser = "nobody";
1461 }
1462 if( g.zLogin==0 ) zUser = "nobody";
1463 if( zAltRepo[0]!='/' ){
1464 zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo);
1465 file_simplify_name(zAltRepo, -1, 0);
1466 }
1467 db_close(1);
1468
--- 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 */
@@ -193,11 +193,11 @@
193 char *urlFossil; /* The fossil query parameter on ssh: */
194 unsigned urlFlags; /* Boolean flags controlling URL processing */
195 int useProxy; /* Used to remember that a proxy is in use */
196 char *proxyUrlPath;
197 int proxyOrigPort; /* Tunneled port number for https through proxy */
198 const char *zLogin; /* Login name. NULL or "" if not logged in. */
199 const char *zSSLIdentity; /* Value of --ssl-identity option, filename of
200 ** SSL client identity */
201 int useLocalauth; /* No login required if from 127.0.0.1 */
202 int noPswd; /* Logged in without password (on 127.0.0.1) */
203 int userUid; /* Integer user id */
@@ -1457,11 +1457,11 @@
1457 zAltRepo[jj] = 0;
1458 zAltRepo += jj+1;
1459 }else{
1460 zUser = "nobody";
1461 }
1462 if( g.zLogin==0 || g.zLogin[0]==0 ) zUser = "nobody";
1463 if( zAltRepo[0]!='/' ){
1464 zAltRepo = mprintf("%s/../%s", g.zRepositoryName, zAltRepo);
1465 file_simplify_name(zAltRepo, -1, 0);
1466 }
1467 db_close(1);
1468
+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
+23 -16
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,8 +1,8 @@
11
/******************************************************************************
22
** This file is an amalgamation of many separate C source files from SQLite
3
-** version 3.8.4. By combining all the individual C code files into this
3
+** version 3.8.4.1. By combining all the individual C code files into this
44
** single large file, the entire code can be compiled as a single translation
55
** unit. This allows many compilers to do optimizations that would not be
66
** possible if the files were compiled separately. Performance improvements
77
** of 5% or more are commonly seen when SQLite is compiled as a single
88
** translation unit.
@@ -220,13 +220,13 @@
220220
**
221221
** See also: [sqlite3_libversion()],
222222
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
223223
** [sqlite_version()] and [sqlite_source_id()].
224224
*/
225
-#define SQLITE_VERSION "3.8.4"
225
+#define SQLITE_VERSION "3.8.4.1"
226226
#define SQLITE_VERSION_NUMBER 3008004
227
-#define SQLITE_SOURCE_ID "2014-03-06 13:38:37 0a4200f95cf46ad620b9fd91f4444114a0c74730"
227
+#define SQLITE_SOURCE_ID "2014-03-11 15:27:36 018d317b1257ce68a92908b05c9c7cf1494050d0"
228228
229229
/*
230230
** CAPI3REF: Run-Time Library Version Numbers
231231
** KEYWORDS: sqlite3_version, sqlite3_sourceid
232232
**
@@ -9428,15 +9428,17 @@
94289428
SQLITE_PRIVATE void sqlite3VdbeSetLineNumber(Vdbe*,int);
94299429
# define VdbeCoverage(v) sqlite3VdbeSetLineNumber(v,__LINE__)
94309430
# define VdbeCoverageIf(v,x) if(x)sqlite3VdbeSetLineNumber(v,__LINE__)
94319431
# define VdbeCoverageAlwaysTaken(v) sqlite3VdbeSetLineNumber(v,2);
94329432
# define VdbeCoverageNeverTaken(v) sqlite3VdbeSetLineNumber(v,1);
9433
+# define VDBE_OFFSET_LINENO(x) (__LINE__+x)
94339434
#else
94349435
# define VdbeCoverage(v)
94359436
# define VdbeCoverageIf(v,x)
94369437
# define VdbeCoverageAlwaysTaken(v)
94379438
# define VdbeCoverageNeverTaken(v)
9439
+# define VDBE_OFFSET_LINENO(x) 0
94389440
#endif
94399441
94409442
#endif
94419443
94429444
/************** End of vdbe.h ************************************************/
@@ -44422,19 +44424,21 @@
4442244424
*/
4442344425
rc = sqlite3OsCheckReservedLock(pPager->fd, &locked);
4442444426
if( rc==SQLITE_OK && !locked ){
4442544427
Pgno nPage; /* Number of pages in database file */
4442644428
44427
- /* Check the size of the database file. If it consists of 0 pages,
44428
- ** then delete the journal file. See the header comment above for
44429
- ** the reasoning here. Delete the obsolete journal file under
44430
- ** a RESERVED lock to avoid race conditions and to avoid violating
44431
- ** [H33020].
44432
- */
4443344429
rc = pagerPagecount(pPager, &nPage);
4443444430
if( rc==SQLITE_OK ){
44435
- if( nPage==0 ){
44431
+ /* If the database is zero pages in size, that means that either (1) the
44432
+ ** journal is a remnant from a prior database with the same name where
44433
+ ** the database file but not the journal was deleted, or (2) the initial
44434
+ ** transaction that populates a new database is being rolled back.
44435
+ ** In either case, the journal file can be deleted. However, take care
44436
+ ** not to delete the journal file if it is already open due to
44437
+ ** journal_mode=PERSIST.
44438
+ */
44439
+ if( nPage==0 && !jrnlOpen ){
4443644440
sqlite3BeginBenignMalloc();
4443744441
if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){
4443844442
sqlite3OsDelete(pVfs, pPager->zJournal, 0);
4443944443
if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
4444044444
}
@@ -73588,11 +73592,11 @@
7358873592
**
7358973593
** The sqlite3_blob_close() function finalizes the vdbe program,
7359073594
** which closes the b-tree cursor and (possibly) commits the
7359173595
** transaction.
7359273596
*/
73593
- static const int iLn = __LINE__+4;
73597
+ static const int iLn = VDBE_OFFSET_LINENO(4);
7359473598
static const VdbeOpList openBlob[] = {
7359573599
/* {OP_Transaction, 0, 0, 0}, // 0: Inserted separately */
7359673600
{OP_TableLock, 0, 0, 0}, /* 1: Acquire a read or write lock */
7359773601
/* One of the following two instructions is replaced by an OP_Noop. */
7359873602
{OP_OpenRead, 0, 0, 0}, /* 2: Open cursor 0 for reading */
@@ -91334,11 +91338,11 @@
9133491338
int argc,
9133591339
sqlite3_value **argv
9133691340
){
9133791341
unsigned char *z, *zOut;
9133891342
int i;
91339
- zOut = z = sqlite3_malloc( argc*4 );
91343
+ zOut = z = sqlite3_malloc( argc*4+1 );
9134091344
if( z==0 ){
9134191345
sqlite3_result_error_nomem(context);
9134291346
return;
9134391347
}
9134491348
for(i=0; i<argc; i++){
@@ -97661,11 +97665,11 @@
9766197665
** is always on by default regardless of the sign of the default cache
9766297666
** size. But continue to take the absolute value of the default cache
9766397667
** size of historical compatibility.
9766497668
*/
9766597669
case PragTyp_DEFAULT_CACHE_SIZE: {
97666
- static const int iLn = __LINE__+2;
97670
+ static const int iLn = VDBE_OFFSET_LINENO(2);
9766797671
static const VdbeOpList getCacheSize[] = {
9766897672
{ OP_Transaction, 0, 0, 0}, /* 0 */
9766997673
{ OP_ReadCookie, 0, 1, BTREE_DEFAULT_CACHE_SIZE}, /* 1 */
9767097674
{ OP_IfPos, 1, 8, 0},
9767197675
{ OP_Integer, 0, 2, 0},
@@ -97924,11 +97928,11 @@
9792497928
/* When setting the auto_vacuum mode to either "full" or
9792597929
** "incremental", write the value of meta[6] in the database
9792697930
** file. Before writing to meta[6], check that meta[3] indicates
9792797931
** that this really is an auto-vacuum capable database.
9792897932
*/
97929
- static const int iLn = __LINE__+2;
97933
+ static const int iLn = VDBE_OFFSET_LINENO(2);
9793097934
static const VdbeOpList setMeta6[] = {
9793197935
{ OP_Transaction, 0, 1, 0}, /* 0 */
9793297936
{ OP_ReadCookie, 0, 1, BTREE_LARGEST_ROOT_PAGE},
9793397937
{ OP_If, 1, 0, 0}, /* 2 */
9793497938
{ OP_Halt, SQLITE_OK, OE_Abort, 0}, /* 3 */
@@ -98627,11 +98631,11 @@
9862798631
9862898632
/* Code that appears at the end of the integrity check. If no error
9862998633
** messages have been generated, output OK. Otherwise output the
9863098634
** error message
9863198635
*/
98632
- static const int iLn = __LINE__+2;
98636
+ static const int iLn = VDBE_OFFSET_LINENO(2);
9863398637
static const VdbeOpList endCode[] = {
9863498638
{ OP_AddImm, 1, 0, 0}, /* 0 */
9863598639
{ OP_IfNeg, 1, 0, 0}, /* 1 */
9863698640
{ OP_String8, 0, 3, 0}, /* 2 */
9863798641
{ OP_ResultRow, 3, 1, 0},
@@ -106114,11 +106118,11 @@
106114106118
/* Generate code to destroy the database record of the trigger.
106115106119
*/
106116106120
assert( pTable!=0 );
106117106121
if( (v = sqlite3GetVdbe(pParse))!=0 ){
106118106122
int base;
106119
- static const int iLn = __LINE__+2;
106123
+ static const int iLn = VDBE_OFFSET_LINENO(2);
106120106124
static const VdbeOpList dropTrigger[] = {
106121106125
{ OP_Rewind, 0, ADDR(9), 0},
106122106126
{ OP_String8, 0, 1, 0}, /* 1 */
106123106127
{ OP_Column, 0, 1, 2},
106124106128
{ OP_Ne, 2, ADDR(8), 1},
@@ -113356,11 +113360,14 @@
113356113360
pNew->u.btree.nEq++;
113357113361
pNew->u.btree.nSkip++;
113358113362
pNew->aLTerm[pNew->nLTerm++] = 0;
113359113363
pNew->wsFlags |= WHERE_SKIPSCAN;
113360113364
nIter = sqlite3LogEst(pProbe->aiRowEst[0]/pProbe->aiRowEst[saved_nEq+1]);
113365
+ pNew->rRun = rLogSize + nIter;
113366
+ pNew->nOut += nIter;
113361113367
whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter);
113368
+ pNew->nOut = saved_nOut;
113362113369
}
113363113370
for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){
113364113371
int nIn = 0;
113365113372
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
113366113373
int nRecValid = pBuilder->nRecValid;
113367113374
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,8 +1,8 @@
1 /******************************************************************************
2 ** This file is an amalgamation of many separate C source files from SQLite
3 ** version 3.8.4. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a single translation
5 ** unit. This allows many compilers to do optimizations that would not be
6 ** possible if the files were compiled separately. Performance improvements
7 ** of 5% or more are commonly seen when SQLite is compiled as a single
8 ** translation unit.
@@ -220,13 +220,13 @@
220 **
221 ** See also: [sqlite3_libversion()],
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-06 13:38:37 0a4200f95cf46ad620b9fd91f4444114a0c74730"
228
229 /*
230 ** CAPI3REF: Run-Time Library Version Numbers
231 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
232 **
@@ -9428,15 +9428,17 @@
9428 SQLITE_PRIVATE void sqlite3VdbeSetLineNumber(Vdbe*,int);
9429 # define VdbeCoverage(v) sqlite3VdbeSetLineNumber(v,__LINE__)
9430 # define VdbeCoverageIf(v,x) if(x)sqlite3VdbeSetLineNumber(v,__LINE__)
9431 # define VdbeCoverageAlwaysTaken(v) sqlite3VdbeSetLineNumber(v,2);
9432 # define VdbeCoverageNeverTaken(v) sqlite3VdbeSetLineNumber(v,1);
 
9433 #else
9434 # define VdbeCoverage(v)
9435 # define VdbeCoverageIf(v,x)
9436 # define VdbeCoverageAlwaysTaken(v)
9437 # define VdbeCoverageNeverTaken(v)
 
9438 #endif
9439
9440 #endif
9441
9442 /************** End of vdbe.h ************************************************/
@@ -44422,19 +44424,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 /* Check the size of the database file. If it consists of 0 pages,
44428 ** then delete the journal file. See the header comment above for
44429 ** the reasoning here. Delete the obsolete journal file under
44430 ** a RESERVED lock to avoid race conditions and to avoid violating
44431 ** [H33020].
44432 */
44433 rc = pagerPagecount(pPager, &nPage);
44434 if( rc==SQLITE_OK ){
44435 if( nPage==0 ){
 
 
 
 
 
 
 
 
44436 sqlite3BeginBenignMalloc();
44437 if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){
44438 sqlite3OsDelete(pVfs, pPager->zJournal, 0);
44439 if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
44440 }
@@ -73588,11 +73592,11 @@
73588 **
73589 ** The sqlite3_blob_close() function finalizes the vdbe program,
73590 ** which closes the b-tree cursor and (possibly) commits the
73591 ** transaction.
73592 */
73593 static const int iLn = __LINE__+4;
73594 static const VdbeOpList openBlob[] = {
73595 /* {OP_Transaction, 0, 0, 0}, // 0: Inserted separately */
73596 {OP_TableLock, 0, 0, 0}, /* 1: Acquire a read or write lock */
73597 /* One of the following two instructions is replaced by an OP_Noop. */
73598 {OP_OpenRead, 0, 0, 0}, /* 2: Open cursor 0 for reading */
@@ -91334,11 +91338,11 @@
91334 int argc,
91335 sqlite3_value **argv
91336 ){
91337 unsigned char *z, *zOut;
91338 int i;
91339 zOut = z = sqlite3_malloc( argc*4 );
91340 if( z==0 ){
91341 sqlite3_result_error_nomem(context);
91342 return;
91343 }
91344 for(i=0; i<argc; i++){
@@ -97661,11 +97665,11 @@
97661 ** is always on by default regardless of the sign of the default cache
97662 ** size. But continue to take the absolute value of the default cache
97663 ** size of historical compatibility.
97664 */
97665 case PragTyp_DEFAULT_CACHE_SIZE: {
97666 static const int iLn = __LINE__+2;
97667 static const VdbeOpList getCacheSize[] = {
97668 { OP_Transaction, 0, 0, 0}, /* 0 */
97669 { OP_ReadCookie, 0, 1, BTREE_DEFAULT_CACHE_SIZE}, /* 1 */
97670 { OP_IfPos, 1, 8, 0},
97671 { OP_Integer, 0, 2, 0},
@@ -97924,11 +97928,11 @@
97924 /* When setting the auto_vacuum mode to either "full" or
97925 ** "incremental", write the value of meta[6] in the database
97926 ** file. Before writing to meta[6], check that meta[3] indicates
97927 ** that this really is an auto-vacuum capable database.
97928 */
97929 static const int iLn = __LINE__+2;
97930 static const VdbeOpList setMeta6[] = {
97931 { OP_Transaction, 0, 1, 0}, /* 0 */
97932 { OP_ReadCookie, 0, 1, BTREE_LARGEST_ROOT_PAGE},
97933 { OP_If, 1, 0, 0}, /* 2 */
97934 { OP_Halt, SQLITE_OK, OE_Abort, 0}, /* 3 */
@@ -98627,11 +98631,11 @@
98627
98628 /* Code that appears at the end of the integrity check. If no error
98629 ** messages have been generated, output OK. Otherwise output the
98630 ** error message
98631 */
98632 static const int iLn = __LINE__+2;
98633 static const VdbeOpList endCode[] = {
98634 { OP_AddImm, 1, 0, 0}, /* 0 */
98635 { OP_IfNeg, 1, 0, 0}, /* 1 */
98636 { OP_String8, 0, 3, 0}, /* 2 */
98637 { OP_ResultRow, 3, 1, 0},
@@ -106114,11 +106118,11 @@
106114 /* Generate code to destroy the database record of the trigger.
106115 */
106116 assert( pTable!=0 );
106117 if( (v = sqlite3GetVdbe(pParse))!=0 ){
106118 int base;
106119 static const int iLn = __LINE__+2;
106120 static const VdbeOpList dropTrigger[] = {
106121 { OP_Rewind, 0, ADDR(9), 0},
106122 { OP_String8, 0, 1, 0}, /* 1 */
106123 { OP_Column, 0, 1, 2},
106124 { OP_Ne, 2, ADDR(8), 1},
@@ -113356,11 +113360,14 @@
113356 pNew->u.btree.nEq++;
113357 pNew->u.btree.nSkip++;
113358 pNew->aLTerm[pNew->nLTerm++] = 0;
113359 pNew->wsFlags |= WHERE_SKIPSCAN;
113360 nIter = sqlite3LogEst(pProbe->aiRowEst[0]/pProbe->aiRowEst[saved_nEq+1]);
 
 
113361 whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter);
 
113362 }
113363 for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){
113364 int nIn = 0;
113365 #ifdef SQLITE_ENABLE_STAT3_OR_STAT4
113366 int nRecValid = pBuilder->nRecValid;
113367
--- src/sqlite3.c
+++ src/sqlite3.c
@@ -1,8 +1,8 @@
1 /******************************************************************************
2 ** This file is an amalgamation of many separate C source files from SQLite
3 ** version 3.8.4.1. By combining all the individual C code files into this
4 ** single large file, the entire code can be compiled as a single translation
5 ** unit. This allows many compilers to do optimizations that would not be
6 ** possible if the files were compiled separately. Performance improvements
7 ** of 5% or more are commonly seen when SQLite is compiled as a single
8 ** translation unit.
@@ -220,13 +220,13 @@
220 **
221 ** See also: [sqlite3_libversion()],
222 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
223 ** [sqlite_version()] and [sqlite_source_id()].
224 */
225 #define SQLITE_VERSION "3.8.4.1"
226 #define SQLITE_VERSION_NUMBER 3008004
227 #define SQLITE_SOURCE_ID "2014-03-11 15:27:36 018d317b1257ce68a92908b05c9c7cf1494050d0"
228
229 /*
230 ** CAPI3REF: Run-Time Library Version Numbers
231 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
232 **
@@ -9428,15 +9428,17 @@
9428 SQLITE_PRIVATE void sqlite3VdbeSetLineNumber(Vdbe*,int);
9429 # define VdbeCoverage(v) sqlite3VdbeSetLineNumber(v,__LINE__)
9430 # define VdbeCoverageIf(v,x) if(x)sqlite3VdbeSetLineNumber(v,__LINE__)
9431 # define VdbeCoverageAlwaysTaken(v) sqlite3VdbeSetLineNumber(v,2);
9432 # define VdbeCoverageNeverTaken(v) sqlite3VdbeSetLineNumber(v,1);
9433 # define VDBE_OFFSET_LINENO(x) (__LINE__+x)
9434 #else
9435 # define VdbeCoverage(v)
9436 # define VdbeCoverageIf(v,x)
9437 # define VdbeCoverageAlwaysTaken(v)
9438 # define VdbeCoverageNeverTaken(v)
9439 # define VDBE_OFFSET_LINENO(x) 0
9440 #endif
9441
9442 #endif
9443
9444 /************** End of vdbe.h ************************************************/
@@ -44422,19 +44424,21 @@
44424 */
44425 rc = sqlite3OsCheckReservedLock(pPager->fd, &locked);
44426 if( rc==SQLITE_OK && !locked ){
44427 Pgno nPage; /* Number of pages in database file */
44428
 
 
 
 
 
 
44429 rc = pagerPagecount(pPager, &nPage);
44430 if( rc==SQLITE_OK ){
44431 /* If the database is zero pages in size, that means that either (1) the
44432 ** journal is a remnant from a prior database with the same name where
44433 ** the database file but not the journal was deleted, or (2) the initial
44434 ** transaction that populates a new database is being rolled back.
44435 ** In either case, the journal file can be deleted. However, take care
44436 ** not to delete the journal file if it is already open due to
44437 ** journal_mode=PERSIST.
44438 */
44439 if( nPage==0 && !jrnlOpen ){
44440 sqlite3BeginBenignMalloc();
44441 if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){
44442 sqlite3OsDelete(pVfs, pPager->zJournal, 0);
44443 if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
44444 }
@@ -73588,11 +73592,11 @@
73592 **
73593 ** The sqlite3_blob_close() function finalizes the vdbe program,
73594 ** which closes the b-tree cursor and (possibly) commits the
73595 ** transaction.
73596 */
73597 static const int iLn = VDBE_OFFSET_LINENO(4);
73598 static const VdbeOpList openBlob[] = {
73599 /* {OP_Transaction, 0, 0, 0}, // 0: Inserted separately */
73600 {OP_TableLock, 0, 0, 0}, /* 1: Acquire a read or write lock */
73601 /* One of the following two instructions is replaced by an OP_Noop. */
73602 {OP_OpenRead, 0, 0, 0}, /* 2: Open cursor 0 for reading */
@@ -91334,11 +91338,11 @@
91338 int argc,
91339 sqlite3_value **argv
91340 ){
91341 unsigned char *z, *zOut;
91342 int i;
91343 zOut = z = sqlite3_malloc( argc*4+1 );
91344 if( z==0 ){
91345 sqlite3_result_error_nomem(context);
91346 return;
91347 }
91348 for(i=0; i<argc; i++){
@@ -97661,11 +97665,11 @@
97665 ** is always on by default regardless of the sign of the default cache
97666 ** size. But continue to take the absolute value of the default cache
97667 ** size of historical compatibility.
97668 */
97669 case PragTyp_DEFAULT_CACHE_SIZE: {
97670 static const int iLn = VDBE_OFFSET_LINENO(2);
97671 static const VdbeOpList getCacheSize[] = {
97672 { OP_Transaction, 0, 0, 0}, /* 0 */
97673 { OP_ReadCookie, 0, 1, BTREE_DEFAULT_CACHE_SIZE}, /* 1 */
97674 { OP_IfPos, 1, 8, 0},
97675 { OP_Integer, 0, 2, 0},
@@ -97924,11 +97928,11 @@
97928 /* When setting the auto_vacuum mode to either "full" or
97929 ** "incremental", write the value of meta[6] in the database
97930 ** file. Before writing to meta[6], check that meta[3] indicates
97931 ** that this really is an auto-vacuum capable database.
97932 */
97933 static const int iLn = VDBE_OFFSET_LINENO(2);
97934 static const VdbeOpList setMeta6[] = {
97935 { OP_Transaction, 0, 1, 0}, /* 0 */
97936 { OP_ReadCookie, 0, 1, BTREE_LARGEST_ROOT_PAGE},
97937 { OP_If, 1, 0, 0}, /* 2 */
97938 { OP_Halt, SQLITE_OK, OE_Abort, 0}, /* 3 */
@@ -98627,11 +98631,11 @@
98631
98632 /* Code that appears at the end of the integrity check. If no error
98633 ** messages have been generated, output OK. Otherwise output the
98634 ** error message
98635 */
98636 static const int iLn = VDBE_OFFSET_LINENO(2);
98637 static const VdbeOpList endCode[] = {
98638 { OP_AddImm, 1, 0, 0}, /* 0 */
98639 { OP_IfNeg, 1, 0, 0}, /* 1 */
98640 { OP_String8, 0, 3, 0}, /* 2 */
98641 { OP_ResultRow, 3, 1, 0},
@@ -106114,11 +106118,11 @@
106118 /* Generate code to destroy the database record of the trigger.
106119 */
106120 assert( pTable!=0 );
106121 if( (v = sqlite3GetVdbe(pParse))!=0 ){
106122 int base;
106123 static const int iLn = VDBE_OFFSET_LINENO(2);
106124 static const VdbeOpList dropTrigger[] = {
106125 { OP_Rewind, 0, ADDR(9), 0},
106126 { OP_String8, 0, 1, 0}, /* 1 */
106127 { OP_Column, 0, 1, 2},
106128 { OP_Ne, 2, ADDR(8), 1},
@@ -113356,11 +113360,14 @@
113360 pNew->u.btree.nEq++;
113361 pNew->u.btree.nSkip++;
113362 pNew->aLTerm[pNew->nLTerm++] = 0;
113363 pNew->wsFlags |= WHERE_SKIPSCAN;
113364 nIter = sqlite3LogEst(pProbe->aiRowEst[0]/pProbe->aiRowEst[saved_nEq+1]);
113365 pNew->rRun = rLogSize + nIter;
113366 pNew->nOut += nIter;
113367 whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter);
113368 pNew->nOut = saved_nOut;
113369 }
113370 for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){
113371 int nIn = 0;
113372 #ifdef SQLITE_ENABLE_STAT3_OR_STAT4
113373 int nRecValid = pBuilder->nRecValid;
113374
+2 -2
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -105,13 +105,13 @@
105105
**
106106
** See also: [sqlite3_libversion()],
107107
** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108108
** [sqlite_version()] and [sqlite_source_id()].
109109
*/
110
-#define SQLITE_VERSION "3.8.4"
110
+#define SQLITE_VERSION "3.8.4.1"
111111
#define SQLITE_VERSION_NUMBER 3008004
112
-#define SQLITE_SOURCE_ID "2014-03-06 13:38:37 0a4200f95cf46ad620b9fd91f4444114a0c74730"
112
+#define SQLITE_SOURCE_ID "2014-03-11 15:27:36 018d317b1257ce68a92908b05c9c7cf1494050d0"
113113
114114
/*
115115
** CAPI3REF: Run-Time Library Version Numbers
116116
** KEYWORDS: sqlite3_version, sqlite3_sourceid
117117
**
118118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -105,13 +105,13 @@
105 **
106 ** See also: [sqlite3_libversion()],
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-06 13:38:37 0a4200f95cf46ad620b9fd91f4444114a0c74730"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
--- src/sqlite3.h
+++ src/sqlite3.h
@@ -105,13 +105,13 @@
105 **
106 ** See also: [sqlite3_libversion()],
107 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
108 ** [sqlite_version()] and [sqlite_source_id()].
109 */
110 #define SQLITE_VERSION "3.8.4.1"
111 #define SQLITE_VERSION_NUMBER 3008004
112 #define SQLITE_SOURCE_ID "2014-03-11 15:27:36 018d317b1257ce68a92908b05c9c7cf1494050d0"
113
114 /*
115 ** CAPI3REF: Run-Time Library Version Numbers
116 ** KEYWORDS: sqlite3_version, sqlite3_sourceid
117 **
118
+6 -1
--- src/stash.c
+++ src/stash.c
@@ -199,16 +199,20 @@
199199
200200
/*
201201
** Apply a stash to the current check-out.
202202
*/
203203
static void stash_apply(int stashid, int nConflict){
204
+ int vid;
204205
Stmt q;
205206
db_prepare(&q,
206207
"SELECT rid, isRemoved, isExec, isLink, origname, newname, delta"
207208
" FROM stashfile WHERE stashid=%d",
208209
stashid
209210
);
211
+ vid = db_lget_int("checkout",0);
212
+ db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
213
+ filename_collation());
210214
while( db_step(&q)==SQLITE_ROW ){
211215
int rid = db_column_int(&q, 0);
212216
int isRemoved = db_column_int(&q, 1);
213217
int isExec = db_column_int(&q, 2);
214218
int isLink = db_column_int(&q, 3);
@@ -218,14 +222,14 @@
218222
char *zNPath = mprintf("%s%s", g.zLocalRoot, zNew);
219223
Blob delta;
220224
undo_save(zNew);
221225
blob_zero(&delta);
222226
if( rid==0 ){
227
+ db_multi_exec("INSERT OR IGNORE INTO sfile(x) VALUES(%Q)", zNew);
223228
db_ephemeral_blob(&q, 6, &delta);
224229
blob_write_to_file(&delta, zNPath);
225230
file_wd_setexe(zNPath, isExec);
226
- fossil_print("ADD %s\n", zNew);
227231
}else if( isRemoved ){
228232
fossil_print("DELETE %s\n", zOrig);
229233
file_delete(zOPath);
230234
}else{
231235
Blob a, b, out, disk;
@@ -276,10 +280,11 @@
276280
if( fossil_strcmp(zOrig,zNew)!=0 ){
277281
undo_save(zOrig);
278282
file_delete(zOPath);
279283
}
280284
}
285
+ stash_add_files_in_sfile(vid);
281286
db_finalize(&q);
282287
if( nConflict ){
283288
fossil_print(
284289
"WARNING: %d merge conflicts - see messages above for details.\n",
285290
nConflict);
286291
--- src/stash.c
+++ src/stash.c
@@ -199,16 +199,20 @@
199
200 /*
201 ** Apply a stash to the current check-out.
202 */
203 static void stash_apply(int stashid, int nConflict){
 
204 Stmt q;
205 db_prepare(&q,
206 "SELECT rid, isRemoved, isExec, isLink, origname, newname, delta"
207 " FROM stashfile WHERE stashid=%d",
208 stashid
209 );
 
 
 
210 while( db_step(&q)==SQLITE_ROW ){
211 int rid = db_column_int(&q, 0);
212 int isRemoved = db_column_int(&q, 1);
213 int isExec = db_column_int(&q, 2);
214 int isLink = db_column_int(&q, 3);
@@ -218,14 +222,14 @@
218 char *zNPath = mprintf("%s%s", g.zLocalRoot, zNew);
219 Blob delta;
220 undo_save(zNew);
221 blob_zero(&delta);
222 if( rid==0 ){
 
223 db_ephemeral_blob(&q, 6, &delta);
224 blob_write_to_file(&delta, zNPath);
225 file_wd_setexe(zNPath, isExec);
226 fossil_print("ADD %s\n", zNew);
227 }else if( isRemoved ){
228 fossil_print("DELETE %s\n", zOrig);
229 file_delete(zOPath);
230 }else{
231 Blob a, b, out, disk;
@@ -276,10 +280,11 @@
276 if( fossil_strcmp(zOrig,zNew)!=0 ){
277 undo_save(zOrig);
278 file_delete(zOPath);
279 }
280 }
 
281 db_finalize(&q);
282 if( nConflict ){
283 fossil_print(
284 "WARNING: %d merge conflicts - see messages above for details.\n",
285 nConflict);
286
--- src/stash.c
+++ src/stash.c
@@ -199,16 +199,20 @@
199
200 /*
201 ** Apply a stash to the current check-out.
202 */
203 static void stash_apply(int stashid, int nConflict){
204 int vid;
205 Stmt q;
206 db_prepare(&q,
207 "SELECT rid, isRemoved, isExec, isLink, origname, newname, delta"
208 " FROM stashfile WHERE stashid=%d",
209 stashid
210 );
211 vid = db_lget_int("checkout",0);
212 db_multi_exec("CREATE TEMP TABLE sfile(x TEXT PRIMARY KEY %s)",
213 filename_collation());
214 while( db_step(&q)==SQLITE_ROW ){
215 int rid = db_column_int(&q, 0);
216 int isRemoved = db_column_int(&q, 1);
217 int isExec = db_column_int(&q, 2);
218 int isLink = db_column_int(&q, 3);
@@ -218,14 +222,14 @@
222 char *zNPath = mprintf("%s%s", g.zLocalRoot, zNew);
223 Blob delta;
224 undo_save(zNew);
225 blob_zero(&delta);
226 if( rid==0 ){
227 db_multi_exec("INSERT OR IGNORE INTO sfile(x) VALUES(%Q)", zNew);
228 db_ephemeral_blob(&q, 6, &delta);
229 blob_write_to_file(&delta, zNPath);
230 file_wd_setexe(zNPath, isExec);
 
231 }else if( isRemoved ){
232 fossil_print("DELETE %s\n", zOrig);
233 file_delete(zOPath);
234 }else{
235 Blob a, b, out, disk;
@@ -276,10 +280,11 @@
280 if( fossil_strcmp(zOrig,zNew)!=0 ){
281 undo_save(zOrig);
282 file_delete(zOPath);
283 }
284 }
285 stash_add_files_in_sfile(vid);
286 db_finalize(&q);
287 if( nConflict ){
288 fossil_print(
289 "WARNING: %d merge conflicts - see messages above for details.\n",
290 nConflict);
291
+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
+3 -3
--- src/timeline.c
+++ src/timeline.c
@@ -592,11 +592,11 @@
592592
if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
593593
GraphRow *pRow;
594594
int i;
595595
char cSep;
596596
597
- @ <script>
597
+ @ <script type='text/javascript'>(function(){
598598
@ var railPitch=%d(pGraph->iRailPitch);
599599
600600
/* the rowinfo[] array contains all the information needed to generate
601601
** the graph. Each entry contains information for a single row:
602602
**
@@ -868,14 +868,14 @@
868868
@ var h = absoluteY(lastId);
869869
@ if( h!=lastY ){
870870
@ renderGraph();
871871
@ lastY = h;
872872
@ }
873
- @ setTimeout("checkHeight();", 1000);
873
+ @ setTimeout(arguments.callee, 1000);
874874
@ }
875875
@ checkHeight();
876
- @ </script>
876
+ @ })()</script>
877877
}
878878
}
879879
880880
/*
881881
** Create a temporary table suitable for storing timeline data.
882882
--- src/timeline.c
+++ src/timeline.c
@@ -592,11 +592,11 @@
592 if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
593 GraphRow *pRow;
594 int i;
595 char cSep;
596
597 @ <script>
598 @ var railPitch=%d(pGraph->iRailPitch);
599
600 /* the rowinfo[] array contains all the information needed to generate
601 ** the graph. Each entry contains information for a single row:
602 **
@@ -868,14 +868,14 @@
868 @ var h = absoluteY(lastId);
869 @ if( h!=lastY ){
870 @ renderGraph();
871 @ lastY = h;
872 @ }
873 @ setTimeout("checkHeight();", 1000);
874 @ }
875 @ checkHeight();
876 @ </script>
877 }
878 }
879
880 /*
881 ** Create a temporary table suitable for storing timeline data.
882
--- src/timeline.c
+++ src/timeline.c
@@ -592,11 +592,11 @@
592 if( pGraph && pGraph->nErr==0 && pGraph->nRow>0 ){
593 GraphRow *pRow;
594 int i;
595 char cSep;
596
597 @ <script type='text/javascript'>(function(){
598 @ var railPitch=%d(pGraph->iRailPitch);
599
600 /* the rowinfo[] array contains all the information needed to generate
601 ** the graph. Each entry contains information for a single row:
602 **
@@ -868,14 +868,14 @@
868 @ var h = absoluteY(lastId);
869 @ if( h!=lastY ){
870 @ renderGraph();
871 @ lastY = h;
872 @ }
873 @ setTimeout(arguments.callee, 1000);
874 @ }
875 @ checkHeight();
876 @ })()</script>
877 }
878 }
879
880 /*
881 ** Create a temporary table suitable for storing timeline data.
882
+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
+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/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