Fossil SCM

Merge with trunk

venkat 2010-11-09 17:37 venks-emacs merge
Commit 96c0c68a86f5847d313ad7f6e08623d8ce656e0b
+1 -1
--- Makefile
+++ Makefile
@@ -7,11 +7,11 @@
77
SRCDIR = ./src
88
99
#### The directory into which object code files should be written.
1010
#
1111
#
12
-OBJDIR = ./obj
12
+OBJDIR = ./bld
1313
1414
#### C Compiler and options for use in building executables that
1515
# will run on the platform that is doing the build. This is used
1616
# to compile code-generator programs as part of the build process.
1717
# See TCC below for the C compiler for building the finished binary.
1818
--- Makefile
+++ Makefile
@@ -7,11 +7,11 @@
7 SRCDIR = ./src
8
9 #### The directory into which object code files should be written.
10 #
11 #
12 OBJDIR = ./obj
13
14 #### C Compiler and options for use in building executables that
15 # will run on the platform that is doing the build. This is used
16 # to compile code-generator programs as part of the build process.
17 # See TCC below for the C compiler for building the finished binary.
18
--- Makefile
+++ Makefile
@@ -7,11 +7,11 @@
7 SRCDIR = ./src
8
9 #### The directory into which object code files should be written.
10 #
11 #
12 OBJDIR = ./bld
13
14 #### C Compiler and options for use in building executables that
15 # will run on the platform that is doing the build. This is used
16 # to compile code-generator programs as part of the build process.
17 # See TCC below for the C compiler for building the finished binary.
18
+2
--- src/db.c
+++ src/db.c
@@ -1031,12 +1031,14 @@
10311031
}
10321032
}
10331033
10341034
/*
10351035
** COMMAND: new
1036
+** COMMAND: init
10361037
**
10371038
** Usage: %fossil new ?OPTIONS? FILENAME
1039
+** Or: %fossil init ?OPTIONS? FILENAME
10381040
**
10391041
** Create a repository for a new project in the file named FILENAME.
10401042
** This command is distinct from "clone". The "clone" command makes
10411043
** a copy of an existing project. This command starts a new project.
10421044
**
10431045
10441046
ADDED src/export.c
10451047
ADDED src/import.c
--- src/db.c
+++ src/db.c
@@ -1031,12 +1031,14 @@
1031 }
1032 }
1033
1034 /*
1035 ** COMMAND: new
 
1036 **
1037 ** Usage: %fossil new ?OPTIONS? FILENAME
 
1038 **
1039 ** Create a repository for a new project in the file named FILENAME.
1040 ** This command is distinct from "clone". The "clone" command makes
1041 ** a copy of an existing project. This command starts a new project.
1042 **
1043
1044 DDED src/export.c
1045 DDED src/import.c
--- src/db.c
+++ src/db.c
@@ -1031,12 +1031,14 @@
1031 }
1032 }
1033
1034 /*
1035 ** COMMAND: new
1036 ** COMMAND: init
1037 **
1038 ** Usage: %fossil new ?OPTIONS? FILENAME
1039 ** Or: %fossil init ?OPTIONS? FILENAME
1040 **
1041 ** Create a repository for a new project in the file named FILENAME.
1042 ** This command is distinct from "clone". The "clone" command makes
1043 ** a copy of an existing project. This command starts a new project.
1044 **
1045
1046 DDED src/export.c
1047 DDED src/import.c
--- a/src/export.c
+++ b/src/export.c
@@ -0,0 +1,2 @@
1
+ destroy Git "fast-import" formator wiki
2
+**at is0);1
--- a/src/export.c
+++ b/src/export.c
@@ -0,0 +1,2 @@
 
 
--- a/src/export.c
+++ b/src/export.c
@@ -0,0 +1,2 @@
1 destroy Git "fast-import" formator wiki
2 **at is0);1
--- a/src/import.c
+++ b/src/import.c
@@ -0,0 +1,2 @@
1
+gsvz/* TBD... */char zLine[1000];
2
+mprintf("%s", mprintf("%s", fossil_fatal("no
--- a/src/import.c
+++ b/src/import.c
@@ -0,0 +1,2 @@
 
 
--- a/src/import.c
+++ b/src/import.c
@@ -0,0 +1,2 @@
1 gsvz/* TBD... */char zLine[1000];
2 mprintf("%s", mprintf("%s", fossil_fatal("no
+1 -1
--- src/login.c
+++ src/login.c
@@ -458,11 +458,11 @@
458458
if( g.zLogin && once ){
459459
const char *zCap;
460460
/* All logged-in users inherit privileges from "nobody" */
461461
zCap = db_text("", "SELECT cap FROM user WHERE login = 'nobody'");
462462
login_set_capabilities(zCap);
463
- if( strcmp(g.zLogin, "anonymous")!=0 ){
463
+ if( strcmp(g.zLogin, "nobody")!=0 ){
464464
/* All logged-in users inherit privileges from "anonymous" */
465465
zCap = db_text("", "SELECT cap FROM user WHERE login = 'anonymous'");
466466
login_set_capabilities(zCap);
467467
}
468468
once = 0;
469469
--- src/login.c
+++ src/login.c
@@ -458,11 +458,11 @@
458 if( g.zLogin && once ){
459 const char *zCap;
460 /* All logged-in users inherit privileges from "nobody" */
461 zCap = db_text("", "SELECT cap FROM user WHERE login = 'nobody'");
462 login_set_capabilities(zCap);
463 if( strcmp(g.zLogin, "anonymous")!=0 ){
464 /* All logged-in users inherit privileges from "anonymous" */
465 zCap = db_text("", "SELECT cap FROM user WHERE login = 'anonymous'");
466 login_set_capabilities(zCap);
467 }
468 once = 0;
469
--- src/login.c
+++ src/login.c
@@ -458,11 +458,11 @@
458 if( g.zLogin && once ){
459 const char *zCap;
460 /* All logged-in users inherit privileges from "nobody" */
461 zCap = db_text("", "SELECT cap FROM user WHERE login = 'nobody'");
462 login_set_capabilities(zCap);
463 if( strcmp(g.zLogin, "nobody")!=0 ){
464 /* All logged-in users inherit privileges from "anonymous" */
465 zCap = db_text("", "SELECT cap FROM user WHERE login = 'anonymous'");
466 login_set_capabilities(zCap);
467 }
468 once = 0;
469
+8 -15
--- src/main.c
+++ src/main.c
@@ -223,39 +223,32 @@
223223
*/
224224
int main(int argc, char **argv){
225225
const char *zCmdName = "unknown";
226226
int idx;
227227
int rc;
228
- int mightBeCgi;
229228
230229
sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
231230
g.now = time(0);
232231
g.argc = argc;
233232
g.argv = argv;
234
- mightBeCgi = getenv("GATEWAY_INTERFACE")!=0;
235
- if( argc<2 ){
236
- if( mightBeCgi ){
237
- zCmdName = "cgi";
238
- }else{
239
- fprintf(stderr, "Usage: %s COMMAND ...\n"
240
- "\"%s help\" for a list of available commands\n"
241
- "\"%s help COMMAND\" for specific details\n",
242
- argv[0], argv[0], argv[0]);
243
- fossil_exit(1);
244
- }
233
+ if( getenv("GATEWAY_INTERFACE")!=0 && !find_option("nocgi", 0, 0)){
234
+ zCmdName = "cgi";
235
+ }else if( argc<2 ){
236
+ fprintf(stderr, "Usage: %s COMMAND ...\n"
237
+ "\"%s help\" for a list of available commands\n"
238
+ "\"%s help COMMAND\" for specific details\n",
239
+ argv[0], argv[0], argv[0]);
240
+ fossil_exit(1);
245241
}else{
246242
g.fQuiet = find_option("quiet", 0, 0)!=0;
247243
g.fSqlTrace = find_option("sqltrace", 0, 0)!=0;
248244
g.fSqlPrint = find_option("sqlprint", 0, 0)!=0;
249245
g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
250246
g.zLogin = find_option("user", "U", 1);
251247
zCmdName = argv[1];
252248
}
253249
rc = name_search(zCmdName, aCommand, count(aCommand), &idx);
254
- if( rc==1 && mightBeCgi ){
255
- rc = name_search("cgi", aCommand, count(aCommand), &idx);
256
- }
257250
if( rc==1 ){
258251
fprintf(stderr,"%s: unknown command: %s\n"
259252
"%s: use \"help\" for more information\n",
260253
argv[0], zCmdName, argv[0]);
261254
fossil_exit(1);
262255
--- src/main.c
+++ src/main.c
@@ -223,39 +223,32 @@
223 */
224 int main(int argc, char **argv){
225 const char *zCmdName = "unknown";
226 int idx;
227 int rc;
228 int mightBeCgi;
229
230 sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
231 g.now = time(0);
232 g.argc = argc;
233 g.argv = argv;
234 mightBeCgi = getenv("GATEWAY_INTERFACE")!=0;
235 if( argc<2 ){
236 if( mightBeCgi ){
237 zCmdName = "cgi";
238 }else{
239 fprintf(stderr, "Usage: %s COMMAND ...\n"
240 "\"%s help\" for a list of available commands\n"
241 "\"%s help COMMAND\" for specific details\n",
242 argv[0], argv[0], argv[0]);
243 fossil_exit(1);
244 }
245 }else{
246 g.fQuiet = find_option("quiet", 0, 0)!=0;
247 g.fSqlTrace = find_option("sqltrace", 0, 0)!=0;
248 g.fSqlPrint = find_option("sqlprint", 0, 0)!=0;
249 g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
250 g.zLogin = find_option("user", "U", 1);
251 zCmdName = argv[1];
252 }
253 rc = name_search(zCmdName, aCommand, count(aCommand), &idx);
254 if( rc==1 && mightBeCgi ){
255 rc = name_search("cgi", aCommand, count(aCommand), &idx);
256 }
257 if( rc==1 ){
258 fprintf(stderr,"%s: unknown command: %s\n"
259 "%s: use \"help\" for more information\n",
260 argv[0], zCmdName, argv[0]);
261 fossil_exit(1);
262
--- src/main.c
+++ src/main.c
@@ -223,39 +223,32 @@
223 */
224 int main(int argc, char **argv){
225 const char *zCmdName = "unknown";
226 int idx;
227 int rc;
 
228
229 sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
230 g.now = time(0);
231 g.argc = argc;
232 g.argv = argv;
233 if( getenv("GATEWAY_INTERFACE")!=0 && !find_option("nocgi", 0, 0)){
234 zCmdName = "cgi";
235 }else if( argc<2 ){
236 fprintf(stderr, "Usage: %s COMMAND ...\n"
237 "\"%s help\" for a list of available commands\n"
238 "\"%s help COMMAND\" for specific details\n",
239 argv[0], argv[0], argv[0]);
240 fossil_exit(1);
 
 
 
241 }else{
242 g.fQuiet = find_option("quiet", 0, 0)!=0;
243 g.fSqlTrace = find_option("sqltrace", 0, 0)!=0;
244 g.fSqlPrint = find_option("sqlprint", 0, 0)!=0;
245 g.fHttpTrace = find_option("httptrace", 0, 0)!=0;
246 g.zLogin = find_option("user", "U", 1);
247 zCmdName = argv[1];
248 }
249 rc = name_search(zCmdName, aCommand, count(aCommand), &idx);
 
 
 
250 if( rc==1 ){
251 fprintf(stderr,"%s: unknown command: %s\n"
252 "%s: use \"help\" for more information\n",
253 argv[0], zCmdName, argv[0]);
254 fossil_exit(1);
255
+22 -2
--- src/main.mk
+++ src/main.mk
@@ -36,17 +36,19 @@
3636
$(SRCDIR)/diff.c \
3737
$(SRCDIR)/diffcmd.c \
3838
$(SRCDIR)/doc.c \
3939
$(SRCDIR)/encode.c \
4040
$(SRCDIR)/event.c \
41
+ $(SRCDIR)/export.c \
4142
$(SRCDIR)/file.c \
4243
$(SRCDIR)/finfo.c \
4344
$(SRCDIR)/graph.c \
4445
$(SRCDIR)/http.c \
4546
$(SRCDIR)/http_socket.c \
4647
$(SRCDIR)/http_ssl.c \
4748
$(SRCDIR)/http_transport.c \
49
+ $(SRCDIR)/import.c \
4850
$(SRCDIR)/info.c \
4951
$(SRCDIR)/login.c \
5052
$(SRCDIR)/main.c \
5153
$(SRCDIR)/manifest.c \
5254
$(SRCDIR)/md5.c \
@@ -110,17 +112,19 @@
110112
diff_.c \
111113
diffcmd_.c \
112114
doc_.c \
113115
encode_.c \
114116
event_.c \
117
+ export_.c \
115118
file_.c \
116119
finfo_.c \
117120
graph_.c \
118121
http_.c \
119122
http_socket_.c \
120123
http_ssl_.c \
121124
http_transport_.c \
125
+ import_.c \
122126
info_.c \
123127
login_.c \
124128
main_.c \
125129
manifest_.c \
126130
md5_.c \
@@ -184,17 +188,19 @@
184188
$(OBJDIR)/diff.o \
185189
$(OBJDIR)/diffcmd.o \
186190
$(OBJDIR)/doc.o \
187191
$(OBJDIR)/encode.o \
188192
$(OBJDIR)/event.o \
193
+ $(OBJDIR)/export.o \
189194
$(OBJDIR)/file.o \
190195
$(OBJDIR)/finfo.o \
191196
$(OBJDIR)/graph.o \
192197
$(OBJDIR)/http.o \
193198
$(OBJDIR)/http_socket.o \
194199
$(OBJDIR)/http_ssl.o \
195200
$(OBJDIR)/http_transport.o \
201
+ $(OBJDIR)/import.o \
196202
$(OBJDIR)/info.o \
197203
$(OBJDIR)/login.o \
198204
$(OBJDIR)/main.o \
199205
$(OBJDIR)/manifest.o \
200206
$(OBJDIR)/md5.o \
@@ -278,16 +284,16 @@
278284
# noop
279285
280286
clean:
281287
rm -f $(OBJDIR)/*.o *_.c $(APPNAME) VERSION.h
282288
rm -f translate makeheaders mkindex page_index.h headers
283
- rm -f add.h allrepo.h attach.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h event.h file.h finfo.h graph.h http.h http_socket.h http_ssl.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h popen.h pqueue.h printf.h rebuild.h report.h rss.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
289
+ rm -f add.h allrepo.h attach.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h event.h export.h file.h finfo.h graph.h http.h http_socket.h http_ssl.h http_transport.h import.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h popen.h pqueue.h printf.h rebuild.h report.h rss.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
284290
285291
page_index.h: $(TRANS_SRC) mkindex
286292
./mkindex $(TRANS_SRC) >$@
287293
headers: page_index.h makeheaders VERSION.h
288
- ./makeheaders add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.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 file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.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 stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
294
+ ./makeheaders add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.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 graph_.c:graph.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 login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.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 stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
289295
touch headers
290296
headers: Makefile
291297
Makefile:
292298
add_.c: $(SRCDIR)/add.c translate
293299
./translate $(SRCDIR)/add.c >add_.c
@@ -462,10 +468,17 @@
462468
463469
$(OBJDIR)/event.o: event_.c event.h $(SRCDIR)/config.h
464470
$(XTCC) -o $(OBJDIR)/event.o -c event_.c
465471
466472
event.h: headers
473
+export_.c: $(SRCDIR)/export.c translate
474
+ ./translate $(SRCDIR)/export.c >export_.c
475
+
476
+$(OBJDIR)/export.o: export_.c export.h $(SRCDIR)/config.h
477
+ $(XTCC) -o $(OBJDIR)/export.o -c export_.c
478
+
479
+export.h: headers
467480
file_.c: $(SRCDIR)/file.c translate
468481
./translate $(SRCDIR)/file.c >file_.c
469482
470483
$(OBJDIR)/file.o: file_.c file.h $(SRCDIR)/config.h
471484
$(XTCC) -o $(OBJDIR)/file.o -c file_.c
@@ -511,10 +524,17 @@
511524
512525
$(OBJDIR)/http_transport.o: http_transport_.c http_transport.h $(SRCDIR)/config.h
513526
$(XTCC) -o $(OBJDIR)/http_transport.o -c http_transport_.c
514527
515528
http_transport.h: headers
529
+import_.c: $(SRCDIR)/import.c translate
530
+ ./translate $(SRCDIR)/import.c >import_.c
531
+
532
+$(OBJDIR)/import.o: import_.c import.h $(SRCDIR)/config.h
533
+ $(XTCC) -o $(OBJDIR)/import.o -c import_.c
534
+
535
+import.h: headers
516536
info_.c: $(SRCDIR)/info.c translate
517537
./translate $(SRCDIR)/info.c >info_.c
518538
519539
$(OBJDIR)/info.o: info_.c info.h $(SRCDIR)/config.h
520540
$(XTCC) -o $(OBJDIR)/info.o -c info_.c
521541
--- src/main.mk
+++ src/main.mk
@@ -36,17 +36,19 @@
36 $(SRCDIR)/diff.c \
37 $(SRCDIR)/diffcmd.c \
38 $(SRCDIR)/doc.c \
39 $(SRCDIR)/encode.c \
40 $(SRCDIR)/event.c \
 
41 $(SRCDIR)/file.c \
42 $(SRCDIR)/finfo.c \
43 $(SRCDIR)/graph.c \
44 $(SRCDIR)/http.c \
45 $(SRCDIR)/http_socket.c \
46 $(SRCDIR)/http_ssl.c \
47 $(SRCDIR)/http_transport.c \
 
48 $(SRCDIR)/info.c \
49 $(SRCDIR)/login.c \
50 $(SRCDIR)/main.c \
51 $(SRCDIR)/manifest.c \
52 $(SRCDIR)/md5.c \
@@ -110,17 +112,19 @@
110 diff_.c \
111 diffcmd_.c \
112 doc_.c \
113 encode_.c \
114 event_.c \
 
115 file_.c \
116 finfo_.c \
117 graph_.c \
118 http_.c \
119 http_socket_.c \
120 http_ssl_.c \
121 http_transport_.c \
 
122 info_.c \
123 login_.c \
124 main_.c \
125 manifest_.c \
126 md5_.c \
@@ -184,17 +188,19 @@
184 $(OBJDIR)/diff.o \
185 $(OBJDIR)/diffcmd.o \
186 $(OBJDIR)/doc.o \
187 $(OBJDIR)/encode.o \
188 $(OBJDIR)/event.o \
 
189 $(OBJDIR)/file.o \
190 $(OBJDIR)/finfo.o \
191 $(OBJDIR)/graph.o \
192 $(OBJDIR)/http.o \
193 $(OBJDIR)/http_socket.o \
194 $(OBJDIR)/http_ssl.o \
195 $(OBJDIR)/http_transport.o \
 
196 $(OBJDIR)/info.o \
197 $(OBJDIR)/login.o \
198 $(OBJDIR)/main.o \
199 $(OBJDIR)/manifest.o \
200 $(OBJDIR)/md5.o \
@@ -278,16 +284,16 @@
278 # noop
279
280 clean:
281 rm -f $(OBJDIR)/*.o *_.c $(APPNAME) VERSION.h
282 rm -f translate makeheaders mkindex page_index.h headers
283 rm -f add.h allrepo.h attach.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h event.h file.h finfo.h graph.h http.h http_socket.h http_ssl.h http_transport.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h popen.h pqueue.h printf.h rebuild.h report.h rss.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
284
285 page_index.h: $(TRANS_SRC) mkindex
286 ./mkindex $(TRANS_SRC) >$@
287 headers: page_index.h makeheaders VERSION.h
288 ./makeheaders add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.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 file_.c:file.h finfo_.c:finfo.h graph_.c:graph.h http_.c:http.h http_socket_.c:http_socket.h http_ssl_.c:http_ssl.h http_transport_.c:http_transport.h info_.c:info.h login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.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 stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
289 touch headers
290 headers: Makefile
291 Makefile:
292 add_.c: $(SRCDIR)/add.c translate
293 ./translate $(SRCDIR)/add.c >add_.c
@@ -462,10 +468,17 @@
462
463 $(OBJDIR)/event.o: event_.c event.h $(SRCDIR)/config.h
464 $(XTCC) -o $(OBJDIR)/event.o -c event_.c
465
466 event.h: headers
 
 
 
 
 
 
 
467 file_.c: $(SRCDIR)/file.c translate
468 ./translate $(SRCDIR)/file.c >file_.c
469
470 $(OBJDIR)/file.o: file_.c file.h $(SRCDIR)/config.h
471 $(XTCC) -o $(OBJDIR)/file.o -c file_.c
@@ -511,10 +524,17 @@
511
512 $(OBJDIR)/http_transport.o: http_transport_.c http_transport.h $(SRCDIR)/config.h
513 $(XTCC) -o $(OBJDIR)/http_transport.o -c http_transport_.c
514
515 http_transport.h: headers
 
 
 
 
 
 
 
516 info_.c: $(SRCDIR)/info.c translate
517 ./translate $(SRCDIR)/info.c >info_.c
518
519 $(OBJDIR)/info.o: info_.c info.h $(SRCDIR)/config.h
520 $(XTCC) -o $(OBJDIR)/info.o -c info_.c
521
--- src/main.mk
+++ src/main.mk
@@ -36,17 +36,19 @@
36 $(SRCDIR)/diff.c \
37 $(SRCDIR)/diffcmd.c \
38 $(SRCDIR)/doc.c \
39 $(SRCDIR)/encode.c \
40 $(SRCDIR)/event.c \
41 $(SRCDIR)/export.c \
42 $(SRCDIR)/file.c \
43 $(SRCDIR)/finfo.c \
44 $(SRCDIR)/graph.c \
45 $(SRCDIR)/http.c \
46 $(SRCDIR)/http_socket.c \
47 $(SRCDIR)/http_ssl.c \
48 $(SRCDIR)/http_transport.c \
49 $(SRCDIR)/import.c \
50 $(SRCDIR)/info.c \
51 $(SRCDIR)/login.c \
52 $(SRCDIR)/main.c \
53 $(SRCDIR)/manifest.c \
54 $(SRCDIR)/md5.c \
@@ -110,17 +112,19 @@
112 diff_.c \
113 diffcmd_.c \
114 doc_.c \
115 encode_.c \
116 event_.c \
117 export_.c \
118 file_.c \
119 finfo_.c \
120 graph_.c \
121 http_.c \
122 http_socket_.c \
123 http_ssl_.c \
124 http_transport_.c \
125 import_.c \
126 info_.c \
127 login_.c \
128 main_.c \
129 manifest_.c \
130 md5_.c \
@@ -184,17 +188,19 @@
188 $(OBJDIR)/diff.o \
189 $(OBJDIR)/diffcmd.o \
190 $(OBJDIR)/doc.o \
191 $(OBJDIR)/encode.o \
192 $(OBJDIR)/event.o \
193 $(OBJDIR)/export.o \
194 $(OBJDIR)/file.o \
195 $(OBJDIR)/finfo.o \
196 $(OBJDIR)/graph.o \
197 $(OBJDIR)/http.o \
198 $(OBJDIR)/http_socket.o \
199 $(OBJDIR)/http_ssl.o \
200 $(OBJDIR)/http_transport.o \
201 $(OBJDIR)/import.o \
202 $(OBJDIR)/info.o \
203 $(OBJDIR)/login.o \
204 $(OBJDIR)/main.o \
205 $(OBJDIR)/manifest.o \
206 $(OBJDIR)/md5.o \
@@ -278,16 +284,16 @@
284 # noop
285
286 clean:
287 rm -f $(OBJDIR)/*.o *_.c $(APPNAME) VERSION.h
288 rm -f translate makeheaders mkindex page_index.h headers
289 rm -f add.h allrepo.h attach.h bag.h blob.h branch.h browse.h captcha.h cgi.h checkin.h checkout.h clearsign.h clone.h comformat.h configure.h content.h db.h delta.h deltacmd.h descendants.h diff.h diffcmd.h doc.h encode.h event.h export.h file.h finfo.h graph.h http.h http_socket.h http_ssl.h http_transport.h import.h info.h login.h main.h manifest.h md5.h merge.h merge3.h name.h pivot.h popen.h pqueue.h printf.h rebuild.h report.h rss.h schema.h search.h setup.h sha1.h shun.h skins.h stat.h style.h sync.h tag.h th_main.h timeline.h tkt.h tktsetup.h undo.h update.h url.h user.h verify.h vfile.h wiki.h wikiformat.h winhttp.h xfer.h zip.h
290
291 page_index.h: $(TRANS_SRC) mkindex
292 ./mkindex $(TRANS_SRC) >$@
293 headers: page_index.h makeheaders VERSION.h
294 ./makeheaders add_.c:add.h allrepo_.c:allrepo.h attach_.c:attach.h bag_.c:bag.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 graph_.c:graph.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 login_.c:login.h main_.c:main.h manifest_.c:manifest.h md5_.c:md5.h merge_.c:merge.h merge3_.c:merge3.h name_.c:name.h pivot_.c:pivot.h popen_.c:popen.h pqueue_.c:pqueue.h printf_.c:printf.h rebuild_.c:rebuild.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 stat_.c:stat.h style_.c:style.h sync_.c:sync.h tag_.c:tag.h th_main_.c:th_main.h timeline_.c:timeline.h tkt_.c:tkt.h tktsetup_.c:tktsetup.h undo_.c:undo.h update_.c:update.h url_.c:url.h user_.c:user.h verify_.c:verify.h vfile_.c:vfile.h wiki_.c:wiki.h wikiformat_.c:wikiformat.h winhttp_.c:winhttp.h xfer_.c:xfer.h zip_.c:zip.h $(SRCDIR)/sqlite3.h $(SRCDIR)/th.h VERSION.h
295 touch headers
296 headers: Makefile
297 Makefile:
298 add_.c: $(SRCDIR)/add.c translate
299 ./translate $(SRCDIR)/add.c >add_.c
@@ -462,10 +468,17 @@
468
469 $(OBJDIR)/event.o: event_.c event.h $(SRCDIR)/config.h
470 $(XTCC) -o $(OBJDIR)/event.o -c event_.c
471
472 event.h: headers
473 export_.c: $(SRCDIR)/export.c translate
474 ./translate $(SRCDIR)/export.c >export_.c
475
476 $(OBJDIR)/export.o: export_.c export.h $(SRCDIR)/config.h
477 $(XTCC) -o $(OBJDIR)/export.o -c export_.c
478
479 export.h: headers
480 file_.c: $(SRCDIR)/file.c translate
481 ./translate $(SRCDIR)/file.c >file_.c
482
483 $(OBJDIR)/file.o: file_.c file.h $(SRCDIR)/config.h
484 $(XTCC) -o $(OBJDIR)/file.o -c file_.c
@@ -511,10 +524,17 @@
524
525 $(OBJDIR)/http_transport.o: http_transport_.c http_transport.h $(SRCDIR)/config.h
526 $(XTCC) -o $(OBJDIR)/http_transport.o -c http_transport_.c
527
528 http_transport.h: headers
529 import_.c: $(SRCDIR)/import.c translate
530 ./translate $(SRCDIR)/import.c >import_.c
531
532 $(OBJDIR)/import.o: import_.c import.h $(SRCDIR)/config.h
533 $(XTCC) -o $(OBJDIR)/import.o -c import_.c
534
535 import.h: headers
536 info_.c: $(SRCDIR)/info.c translate
537 ./translate $(SRCDIR)/info.c >info_.c
538
539 $(OBJDIR)/info.o: info_.c info.h $(SRCDIR)/config.h
540 $(XTCC) -o $(OBJDIR)/info.o -c info_.c
541
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -30,16 +30,18 @@
3030
diff
3131
diffcmd
3232
doc
3333
encode
3434
event
35
+ export
3536
file
3637
finfo
3738
graph
3839
http
3940
http_socket
4041
http_transport
42
+ import
4143
info
4244
login
4345
main
4446
manifest
4547
md5
4648
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -30,16 +30,18 @@
30 diff
31 diffcmd
32 doc
33 encode
34 event
 
35 file
36 finfo
37 graph
38 http
39 http_socket
40 http_transport
 
41 info
42 login
43 main
44 manifest
45 md5
46
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -30,16 +30,18 @@
30 diff
31 diffcmd
32 doc
33 encode
34 event
35 export
36 file
37 finfo
38 graph
39 http
40 http_socket
41 http_transport
42 import
43 info
44 login
45 main
46 manifest
47 md5
48
+19 -9
--- src/vfile.c
+++ src/vfile.c
@@ -24,10 +24,28 @@
2424
#if defined(__DMC__)
2525
#include "dirent.h"
2626
#else
2727
#include <dirent.h>
2828
#endif
29
+
30
+/*
31
+** The input is guaranteed to be a 40-character well-formed UUID.
32
+** Find its rid.
33
+*/
34
+int fast_uuid_to_rid(const char *zUuid){
35
+ static Stmt q;
36
+ int rid;
37
+ db_static_prepare(&q, "SELECT rid FROM blob WHERE uuid=:uuid");
38
+ db_bind_text(&q, ":uuid", zUuid);
39
+ if( db_step(&q)==SQLITE_ROW ){
40
+ rid = db_column_int(&q, 0);
41
+ }else{
42
+ rid = 0;
43
+ }
44
+ db_reset(&q);
45
+ return rid;
46
+}
2947
3048
/*
3149
** Given a UUID, return the corresponding record ID. If the UUID
3250
** does not exist, then return 0.
3351
**
@@ -37,27 +55,19 @@
3755
** If the UUID is not found and phantomize is 1, then attempt to
3856
** create a phantom record.
3957
*/
4058
int uuid_to_rid(const char *zUuid, int phantomize){
4159
int rid, sz;
42
- static Stmt q;
4360
char z[UUID_SIZE+1];
4461
4562
sz = strlen(zUuid);
4663
if( sz!=UUID_SIZE || !validate16(zUuid, sz) ){
4764
return 0;
4865
}
4966
strcpy(z, zUuid);
5067
canonical16(z, sz);
51
- db_static_prepare(&q, "SELECT rid FROM blob WHERE uuid=:uuid");
52
- db_bind_text(&q, ":uuid", z);
53
- if( db_step(&q)==SQLITE_ROW ){
54
- rid = db_column_int(&q, 0);
55
- }else{
56
- rid = 0;
57
- }
58
- db_reset(&q);
68
+ rid = fast_uuid_to_rid(z);
5969
if( rid==0 && phantomize ){
6070
rid = content_new(zUuid);
6171
}
6272
return rid;
6373
}
6474
--- src/vfile.c
+++ src/vfile.c
@@ -24,10 +24,28 @@
24 #if defined(__DMC__)
25 #include "dirent.h"
26 #else
27 #include <dirent.h>
28 #endif
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
30 /*
31 ** Given a UUID, return the corresponding record ID. If the UUID
32 ** does not exist, then return 0.
33 **
@@ -37,27 +55,19 @@
37 ** If the UUID is not found and phantomize is 1, then attempt to
38 ** create a phantom record.
39 */
40 int uuid_to_rid(const char *zUuid, int phantomize){
41 int rid, sz;
42 static Stmt q;
43 char z[UUID_SIZE+1];
44
45 sz = strlen(zUuid);
46 if( sz!=UUID_SIZE || !validate16(zUuid, sz) ){
47 return 0;
48 }
49 strcpy(z, zUuid);
50 canonical16(z, sz);
51 db_static_prepare(&q, "SELECT rid FROM blob WHERE uuid=:uuid");
52 db_bind_text(&q, ":uuid", z);
53 if( db_step(&q)==SQLITE_ROW ){
54 rid = db_column_int(&q, 0);
55 }else{
56 rid = 0;
57 }
58 db_reset(&q);
59 if( rid==0 && phantomize ){
60 rid = content_new(zUuid);
61 }
62 return rid;
63 }
64
--- src/vfile.c
+++ src/vfile.c
@@ -24,10 +24,28 @@
24 #if defined(__DMC__)
25 #include "dirent.h"
26 #else
27 #include <dirent.h>
28 #endif
29
30 /*
31 ** The input is guaranteed to be a 40-character well-formed UUID.
32 ** Find its rid.
33 */
34 int fast_uuid_to_rid(const char *zUuid){
35 static Stmt q;
36 int rid;
37 db_static_prepare(&q, "SELECT rid FROM blob WHERE uuid=:uuid");
38 db_bind_text(&q, ":uuid", zUuid);
39 if( db_step(&q)==SQLITE_ROW ){
40 rid = db_column_int(&q, 0);
41 }else{
42 rid = 0;
43 }
44 db_reset(&q);
45 return rid;
46 }
47
48 /*
49 ** Given a UUID, return the corresponding record ID. If the UUID
50 ** does not exist, then return 0.
51 **
@@ -37,27 +55,19 @@
55 ** If the UUID is not found and phantomize is 1, then attempt to
56 ** create a phantom record.
57 */
58 int uuid_to_rid(const char *zUuid, int phantomize){
59 int rid, sz;
 
60 char z[UUID_SIZE+1];
61
62 sz = strlen(zUuid);
63 if( sz!=UUID_SIZE || !validate16(zUuid, sz) ){
64 return 0;
65 }
66 strcpy(z, zUuid);
67 canonical16(z, sz);
68 rid = fast_uuid_to_rid(z);
 
 
 
 
 
 
 
69 if( rid==0 && phantomize ){
70 rid = content_new(zUuid);
71 }
72 return rid;
73 }
74
+2 -5
--- src/xfer.c
+++ src/xfer.c
@@ -454,15 +454,10 @@
454454
fprintf(stderr, "# login [%s] with capabilities [%s]\n", g.zLogin,zCap);
455455
}
456456
}
457457
}
458458
db_finalize(&q);
459
-
460
- if( rc==0 ){
461
- /* If the login was successful. */
462
- login_set_anon_nobody_capabilities();
463
- }
464459
return rc;
465460
}
466461
467462
/*
468463
** Send the content of all files in the unsent table.
@@ -631,10 +626,12 @@
631626
char *zNow;
632627
633628
if( strcmp(PD("REQUEST_METHOD","POST"),"POST") ){
634629
fossil_redirect_home();
635630
}
631
+ g.zLogin = "anonymous";
632
+ login_set_anon_nobody_capabilities();
636633
memset(&xfer, 0, sizeof(xfer));
637634
blobarray_zero(xfer.aToken, count(xfer.aToken));
638635
cgi_set_content_type(g.zContentType);
639636
blob_zero(&xfer.err);
640637
xfer.pIn = &g.cgiIn;
641638
--- src/xfer.c
+++ src/xfer.c
@@ -454,15 +454,10 @@
454 fprintf(stderr, "# login [%s] with capabilities [%s]\n", g.zLogin,zCap);
455 }
456 }
457 }
458 db_finalize(&q);
459
460 if( rc==0 ){
461 /* If the login was successful. */
462 login_set_anon_nobody_capabilities();
463 }
464 return rc;
465 }
466
467 /*
468 ** Send the content of all files in the unsent table.
@@ -631,10 +626,12 @@
631 char *zNow;
632
633 if( strcmp(PD("REQUEST_METHOD","POST"),"POST") ){
634 fossil_redirect_home();
635 }
 
 
636 memset(&xfer, 0, sizeof(xfer));
637 blobarray_zero(xfer.aToken, count(xfer.aToken));
638 cgi_set_content_type(g.zContentType);
639 blob_zero(&xfer.err);
640 xfer.pIn = &g.cgiIn;
641
--- src/xfer.c
+++ src/xfer.c
@@ -454,15 +454,10 @@
454 fprintf(stderr, "# login [%s] with capabilities [%s]\n", g.zLogin,zCap);
455 }
456 }
457 }
458 db_finalize(&q);
 
 
 
 
 
459 return rc;
460 }
461
462 /*
463 ** Send the content of all files in the unsent table.
@@ -631,10 +626,12 @@
626 char *zNow;
627
628 if( strcmp(PD("REQUEST_METHOD","POST"),"POST") ){
629 fossil_redirect_home();
630 }
631 g.zLogin = "anonymous";
632 login_set_anon_nobody_capabilities();
633 memset(&xfer, 0, sizeof(xfer));
634 blobarray_zero(xfer.aToken, count(xfer.aToken));
635 cgi_set_content_type(g.zContentType);
636 blob_zero(&xfer.err);
637 xfer.pIn = &g.cgiIn;
638

Keyboard Shortcuts

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