Fossil SCM

merge trunk into creole

robert 2009-10-05 10:08 creole merge
Commit 651c75c5b77a8fbeeb2c483dc9ec2741922592a4
+1 -1
--- Makefile
+++ Makefile
@@ -24,11 +24,11 @@
2424
# the finished binary for fossil. The BCC compiler above is used
2525
# for building intermediate code-generator tools.
2626
#
2727
#TCC = gcc -O6
2828
#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
29
-TCC = gcc -Os
29
+TCC = gcc -g -Os -Wall
3030
3131
#### Extra arguments for linking the finished binary. Fossil needs
3232
# to link against the Z-Lib compression library. There are no
3333
# other dependencies. We sometimes add the -static option here
3434
# so that we can build a static executable that will run in a
3535
--- Makefile
+++ Makefile
@@ -24,11 +24,11 @@
24 # the finished binary for fossil. The BCC compiler above is used
25 # for building intermediate code-generator tools.
26 #
27 #TCC = gcc -O6
28 #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
29 TCC = gcc -Os
30
31 #### Extra arguments for linking the finished binary. Fossil needs
32 # to link against the Z-Lib compression library. There are no
33 # other dependencies. We sometimes add the -static option here
34 # so that we can build a static executable that will run in a
35
--- Makefile
+++ Makefile
@@ -24,11 +24,11 @@
24 # the finished binary for fossil. The BCC compiler above is used
25 # for building intermediate code-generator tools.
26 #
27 #TCC = gcc -O6
28 #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
29 TCC = gcc -g -Os -Wall
30
31 #### Extra arguments for linking the finished binary. Fossil needs
32 # to link against the Z-Lib compression library. There are no
33 # other dependencies. We sometimes add the -static option here
34 # so that we can build a static executable that will run in a
35
+1 -1
--- src/clone.c
+++ src/clone.c
@@ -78,11 +78,11 @@
7878
db_record_repository_filename(g.argv[3]);
7979
db_initial_setup(0, 0);
8080
user_select();
8181
db_set("content-schema", CONTENT_SCHEMA, 0);
8282
db_set("aux-schema", AUX_SCHEMA, 0);
83
- db_set("last-sync-url", g.urlCanonical, 0);
83
+ db_set("last-sync-url", g.argv[2], 0);
8484
db_multi_exec(
8585
"REPLACE INTO config(name,value)"
8686
" VALUES('server-code', lower(hex(randomblob(20))));"
8787
);
8888
url_enable_proxy(0);
8989
--- src/clone.c
+++ src/clone.c
@@ -78,11 +78,11 @@
78 db_record_repository_filename(g.argv[3]);
79 db_initial_setup(0, 0);
80 user_select();
81 db_set("content-schema", CONTENT_SCHEMA, 0);
82 db_set("aux-schema", AUX_SCHEMA, 0);
83 db_set("last-sync-url", g.urlCanonical, 0);
84 db_multi_exec(
85 "REPLACE INTO config(name,value)"
86 " VALUES('server-code', lower(hex(randomblob(20))));"
87 );
88 url_enable_proxy(0);
89
--- src/clone.c
+++ src/clone.c
@@ -78,11 +78,11 @@
78 db_record_repository_filename(g.argv[3]);
79 db_initial_setup(0, 0);
80 user_select();
81 db_set("content-schema", CONTENT_SCHEMA, 0);
82 db_set("aux-schema", AUX_SCHEMA, 0);
83 db_set("last-sync-url", g.argv[2], 0);
84 db_multi_exec(
85 "REPLACE INTO config(name,value)"
86 " VALUES('server-code', lower(hex(randomblob(20))));"
87 );
88 url_enable_proxy(0);
89
+1 -1
--- src/clone.c
+++ src/clone.c
@@ -78,11 +78,11 @@
7878
db_record_repository_filename(g.argv[3]);
7979
db_initial_setup(0, 0);
8080
user_select();
8181
db_set("content-schema", CONTENT_SCHEMA, 0);
8282
db_set("aux-schema", AUX_SCHEMA, 0);
83
- db_set("last-sync-url", g.urlCanonical, 0);
83
+ db_set("last-sync-url", g.argv[2], 0);
8484
db_multi_exec(
8585
"REPLACE INTO config(name,value)"
8686
" VALUES('server-code', lower(hex(randomblob(20))));"
8787
);
8888
url_enable_proxy(0);
8989
--- src/clone.c
+++ src/clone.c
@@ -78,11 +78,11 @@
78 db_record_repository_filename(g.argv[3]);
79 db_initial_setup(0, 0);
80 user_select();
81 db_set("content-schema", CONTENT_SCHEMA, 0);
82 db_set("aux-schema", AUX_SCHEMA, 0);
83 db_set("last-sync-url", g.urlCanonical, 0);
84 db_multi_exec(
85 "REPLACE INTO config(name,value)"
86 " VALUES('server-code', lower(hex(randomblob(20))));"
87 );
88 url_enable_proxy(0);
89
--- src/clone.c
+++ src/clone.c
@@ -78,11 +78,11 @@
78 db_record_repository_filename(g.argv[3]);
79 db_initial_setup(0, 0);
80 user_select();
81 db_set("content-schema", CONTENT_SCHEMA, 0);
82 db_set("aux-schema", AUX_SCHEMA, 0);
83 db_set("last-sync-url", g.argv[2], 0);
84 db_multi_exec(
85 "REPLACE INTO config(name,value)"
86 " VALUES('server-code', lower(hex(randomblob(20))));"
87 );
88 url_enable_proxy(0);
89
+2 -4
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -171,12 +171,11 @@
171171
}
172172
if( zExternalCommand==0 ){
173173
internalDiff=1;
174174
}else{
175175
blob_zero(&cmd);
176
- shell_escape(&cmd, zExternalCommand);
177
- blob_append(&cmd, " ", 1);
176
+ blob_appendf(&cmd,"%s ",zExternalCommand);
178177
}
179178
}
180179
zFile = g.argv[g.argc-1];
181180
file_tree_name(zFile, &fname, 1);
182181
@@ -207,12 +206,11 @@
207206
blob_reset(&current);
208207
blob_reset(&out);
209208
}else{
210209
blob_write_to_file(&record, blob_str(&vname));
211210
blob_reset(&record);
212
- shell_escape(&cmd, blob_str(&vname));
213
- blob_appendf(&cmd, " ");
211
+ blob_appendf(&cmd, "%s ", blob_str(&vname));
214212
shell_escape(&cmd, zFile);
215213
portable_system(blob_str(&cmd));
216214
unlink(blob_str(&vname));
217215
blob_reset(&vname);
218216
blob_reset(&cmd);
219217
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -171,12 +171,11 @@
171 }
172 if( zExternalCommand==0 ){
173 internalDiff=1;
174 }else{
175 blob_zero(&cmd);
176 shell_escape(&cmd, zExternalCommand);
177 blob_append(&cmd, " ", 1);
178 }
179 }
180 zFile = g.argv[g.argc-1];
181 file_tree_name(zFile, &fname, 1);
182
@@ -207,12 +206,11 @@
207 blob_reset(&current);
208 blob_reset(&out);
209 }else{
210 blob_write_to_file(&record, blob_str(&vname));
211 blob_reset(&record);
212 shell_escape(&cmd, blob_str(&vname));
213 blob_appendf(&cmd, " ");
214 shell_escape(&cmd, zFile);
215 portable_system(blob_str(&cmd));
216 unlink(blob_str(&vname));
217 blob_reset(&vname);
218 blob_reset(&cmd);
219
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -171,12 +171,11 @@
171 }
172 if( zExternalCommand==0 ){
173 internalDiff=1;
174 }else{
175 blob_zero(&cmd);
176 blob_appendf(&cmd,"%s ",zExternalCommand);
 
177 }
178 }
179 zFile = g.argv[g.argc-1];
180 file_tree_name(zFile, &fname, 1);
181
@@ -207,12 +206,11 @@
206 blob_reset(&current);
207 blob_reset(&out);
208 }else{
209 blob_write_to_file(&record, blob_str(&vname));
210 blob_reset(&record);
211 blob_appendf(&cmd, "%s ", blob_str(&vname));
 
212 shell_escape(&cmd, zFile);
213 portable_system(blob_str(&cmd));
214 unlink(blob_str(&vname));
215 blob_reset(&vname);
216 blob_reset(&cmd);
217
+2 -4
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -171,12 +171,11 @@
171171
}
172172
if( zExternalCommand==0 ){
173173
internalDiff=1;
174174
}else{
175175
blob_zero(&cmd);
176
- shell_escape(&cmd, zExternalCommand);
177
- blob_append(&cmd, " ", 1);
176
+ blob_appendf(&cmd,"%s ",zExternalCommand);
178177
}
179178
}
180179
zFile = g.argv[g.argc-1];
181180
file_tree_name(zFile, &fname, 1);
182181
@@ -207,12 +206,11 @@
207206
blob_reset(&current);
208207
blob_reset(&out);
209208
}else{
210209
blob_write_to_file(&record, blob_str(&vname));
211210
blob_reset(&record);
212
- shell_escape(&cmd, blob_str(&vname));
213
- blob_appendf(&cmd, " ");
211
+ blob_appendf(&cmd, "%s ", blob_str(&vname));
214212
shell_escape(&cmd, zFile);
215213
portable_system(blob_str(&cmd));
216214
unlink(blob_str(&vname));
217215
blob_reset(&vname);
218216
blob_reset(&cmd);
219217
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -171,12 +171,11 @@
171 }
172 if( zExternalCommand==0 ){
173 internalDiff=1;
174 }else{
175 blob_zero(&cmd);
176 shell_escape(&cmd, zExternalCommand);
177 blob_append(&cmd, " ", 1);
178 }
179 }
180 zFile = g.argv[g.argc-1];
181 file_tree_name(zFile, &fname, 1);
182
@@ -207,12 +206,11 @@
207 blob_reset(&current);
208 blob_reset(&out);
209 }else{
210 blob_write_to_file(&record, blob_str(&vname));
211 blob_reset(&record);
212 shell_escape(&cmd, blob_str(&vname));
213 blob_appendf(&cmd, " ");
214 shell_escape(&cmd, zFile);
215 portable_system(blob_str(&cmd));
216 unlink(blob_str(&vname));
217 blob_reset(&vname);
218 blob_reset(&cmd);
219
--- src/diffcmd.c
+++ src/diffcmd.c
@@ -171,12 +171,11 @@
171 }
172 if( zExternalCommand==0 ){
173 internalDiff=1;
174 }else{
175 blob_zero(&cmd);
176 blob_appendf(&cmd,"%s ",zExternalCommand);
 
177 }
178 }
179 zFile = g.argv[g.argc-1];
180 file_tree_name(zFile, &fname, 1);
181
@@ -207,12 +206,11 @@
206 blob_reset(&current);
207 blob_reset(&out);
208 }else{
209 blob_write_to_file(&record, blob_str(&vname));
210 blob_reset(&record);
211 blob_appendf(&cmd, "%s ", blob_str(&vname));
 
212 shell_escape(&cmd, zFile);
213 portable_system(blob_str(&cmd));
214 unlink(blob_str(&vname));
215 blob_reset(&vname);
216 blob_reset(&cmd);
217
+2 -1
--- src/sha1.c
+++ src/sha1.c
@@ -536,11 +536,12 @@
536536
return 0;
537537
}
538538
539539
540540
/*
541
-** COMMAND: test-sha1sum
541
+** COMMAND: sha1sum
542
+** %fossil sha1sum FILE...
542543
**
543544
** Compute an SHA1 checksum of all files named on the command-line.
544545
** If an file is named "-" then take its content from standard input.
545546
*/
546547
void sha1sum_test(void){
547548
--- src/sha1.c
+++ src/sha1.c
@@ -536,11 +536,12 @@
536 return 0;
537 }
538
539
540 /*
541 ** COMMAND: test-sha1sum
 
542 **
543 ** Compute an SHA1 checksum of all files named on the command-line.
544 ** If an file is named "-" then take its content from standard input.
545 */
546 void sha1sum_test(void){
547
--- src/sha1.c
+++ src/sha1.c
@@ -536,11 +536,12 @@
536 return 0;
537 }
538
539
540 /*
541 ** COMMAND: sha1sum
542 ** %fossil sha1sum FILE...
543 **
544 ** Compute an SHA1 checksum of all files named on the command-line.
545 ** If an file is named "-" then take its content from standard input.
546 */
547 void sha1sum_test(void){
548
+2 -1
--- src/sha1.c
+++ src/sha1.c
@@ -536,11 +536,12 @@
536536
return 0;
537537
}
538538
539539
540540
/*
541
-** COMMAND: test-sha1sum
541
+** COMMAND: sha1sum
542
+** %fossil sha1sum FILE...
542543
**
543544
** Compute an SHA1 checksum of all files named on the command-line.
544545
** If an file is named "-" then take its content from standard input.
545546
*/
546547
void sha1sum_test(void){
547548
--- src/sha1.c
+++ src/sha1.c
@@ -536,11 +536,12 @@
536 return 0;
537 }
538
539
540 /*
541 ** COMMAND: test-sha1sum
 
542 **
543 ** Compute an SHA1 checksum of all files named on the command-line.
544 ** If an file is named "-" then take its content from standard input.
545 */
546 void sha1sum_test(void){
547
--- src/sha1.c
+++ src/sha1.c
@@ -536,11 +536,12 @@
536 return 0;
537 }
538
539
540 /*
541 ** COMMAND: sha1sum
542 ** %fossil sha1sum FILE...
543 **
544 ** Compute an SHA1 checksum of all files named on the command-line.
545 ** If an file is named "-" then take its content from standard input.
546 */
547 void sha1sum_test(void){
548
+2 -2
--- src/style.c
+++ src/style.c
@@ -191,11 +191,11 @@
191191
@ media="screen">
192192
@ </head>
193193
@ <body>
194194
@ <div class="header">
195195
@ <div class="logo">
196
-@ <img src="/logo" alt="logo">
196
+@ <img src="$baseurl/logo" alt="logo">
197197
@ <br><nobr>$<project_name></nobr>
198198
@ </div>
199199
@ <div class="title">$<title></div>
200200
@ <div class="status"><nobr><th1>
201201
@ if {[info exists login]} {
@@ -431,11 +431,11 @@
431431
@ border:1px solid green;
432432
@ }
433433
@ .creole-nomacro {
434434
@ color:red;
435435
@ border:1px solid red;
436
-@ }
436
+@ }
437437
;
438438
439439
/*
440440
** WEBPAGE: style.css
441441
*/
442442
--- src/style.c
+++ src/style.c
@@ -191,11 +191,11 @@
191 @ media="screen">
192 @ </head>
193 @ <body>
194 @ <div class="header">
195 @ <div class="logo">
196 @ <img src="/logo" alt="logo">
197 @ <br><nobr>$<project_name></nobr>
198 @ </div>
199 @ <div class="title">$<title></div>
200 @ <div class="status"><nobr><th1>
201 @ if {[info exists login]} {
@@ -431,11 +431,11 @@
431 @ border:1px solid green;
432 @ }
433 @ .creole-nomacro {
434 @ color:red;
435 @ border:1px solid red;
436 @ }
437 ;
438
439 /*
440 ** WEBPAGE: style.css
441 */
442
--- src/style.c
+++ src/style.c
@@ -191,11 +191,11 @@
191 @ media="screen">
192 @ </head>
193 @ <body>
194 @ <div class="header">
195 @ <div class="logo">
196 @ <img src="$baseurl/logo" alt="logo">
197 @ <br><nobr>$<project_name></nobr>
198 @ </div>
199 @ <div class="title">$<title></div>
200 @ <div class="status"><nobr><th1>
201 @ if {[info exists login]} {
@@ -431,11 +431,11 @@
431 @ border:1px solid green;
432 @ }
433 @ .creole-nomacro {
434 @ color:red;
435 @ border:1px solid red;
436 @ }
437 ;
438
439 /*
440 ** WEBPAGE: style.css
441 */
442
+2 -2
--- src/style.c
+++ src/style.c
@@ -191,11 +191,11 @@
191191
@ media="screen">
192192
@ </head>
193193
@ <body>
194194
@ <div class="header">
195195
@ <div class="logo">
196
-@ <img src="/logo" alt="logo">
196
+@ <img src="$baseurl/logo" alt="logo">
197197
@ <br><nobr>$<project_name></nobr>
198198
@ </div>
199199
@ <div class="title">$<title></div>
200200
@ <div class="status"><nobr><th1>
201201
@ if {[info exists login]} {
@@ -431,11 +431,11 @@
431431
@ border:1px solid green;
432432
@ }
433433
@ .creole-nomacro {
434434
@ color:red;
435435
@ border:1px solid red;
436
-@ }
436
+@ }
437437
;
438438
439439
/*
440440
** WEBPAGE: style.css
441441
*/
442442
--- src/style.c
+++ src/style.c
@@ -191,11 +191,11 @@
191 @ media="screen">
192 @ </head>
193 @ <body>
194 @ <div class="header">
195 @ <div class="logo">
196 @ <img src="/logo" alt="logo">
197 @ <br><nobr>$<project_name></nobr>
198 @ </div>
199 @ <div class="title">$<title></div>
200 @ <div class="status"><nobr><th1>
201 @ if {[info exists login]} {
@@ -431,11 +431,11 @@
431 @ border:1px solid green;
432 @ }
433 @ .creole-nomacro {
434 @ color:red;
435 @ border:1px solid red;
436 @ }
437 ;
438
439 /*
440 ** WEBPAGE: style.css
441 */
442
--- src/style.c
+++ src/style.c
@@ -191,11 +191,11 @@
191 @ media="screen">
192 @ </head>
193 @ <body>
194 @ <div class="header">
195 @ <div class="logo">
196 @ <img src="$baseurl/logo" alt="logo">
197 @ <br><nobr>$<project_name></nobr>
198 @ </div>
199 @ <div class="title">$<title></div>
200 @ <div class="status"><nobr><th1>
201 @ if {[info exists login]} {
@@ -431,11 +431,11 @@
431 @ border:1px solid green;
432 @ }
433 @ .creole-nomacro {
434 @ color:red;
435 @ border:1px solid red;
436 @ }
437 ;
438
439 /*
440 ** WEBPAGE: style.css
441 */
442
+11 -1
--- src/xfer.c
+++ src/xfer.c
@@ -658,13 +658,21 @@
658658
if( xfer.nToken==3
659659
&& (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
660660
&& blob_is_uuid(&xfer.aToken[1])
661661
&& blob_is_uuid(&xfer.aToken[2])
662662
){
663
- const char *zSCode;
664663
const char *zPCode;
665664
665
+#if 0
666
+ /* This block checks to see if a server is trying to sync with itself.
667
+ ** This used to be disallowed, but I cannot think of any significant
668
+ ** harm, so I have disabled the check.
669
+ **
670
+ ** With this check disabled, it is sufficient to copy the repository
671
+ ** database. No need to run clone.
672
+ */
673
+ const char *zSCode;
666674
zSCode = db_get("server-code", 0);
667675
if( zSCode==0 ){
668676
fossil_panic("missing server code");
669677
}
670678
if( blob_eq_str(&xfer.aToken[1], zSCode, -1) ){
@@ -671,10 +679,12 @@
671679
cgi_reset_content();
672680
@ error server\sloop
673681
nErr++;
674682
break;
675683
}
684
+#endif
685
+
676686
zPCode = db_get("project-code", 0);
677687
if( zPCode==0 ){
678688
fossil_panic("missing project code");
679689
}
680690
if( !blob_eq_str(&xfer.aToken[2], zPCode, -1) ){
681691
--- src/xfer.c
+++ src/xfer.c
@@ -658,13 +658,21 @@
658 if( xfer.nToken==3
659 && (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
660 && blob_is_uuid(&xfer.aToken[1])
661 && blob_is_uuid(&xfer.aToken[2])
662 ){
663 const char *zSCode;
664 const char *zPCode;
665
 
 
 
 
 
 
 
 
 
666 zSCode = db_get("server-code", 0);
667 if( zSCode==0 ){
668 fossil_panic("missing server code");
669 }
670 if( blob_eq_str(&xfer.aToken[1], zSCode, -1) ){
@@ -671,10 +679,12 @@
671 cgi_reset_content();
672 @ error server\sloop
673 nErr++;
674 break;
675 }
 
 
676 zPCode = db_get("project-code", 0);
677 if( zPCode==0 ){
678 fossil_panic("missing project code");
679 }
680 if( !blob_eq_str(&xfer.aToken[2], zPCode, -1) ){
681
--- src/xfer.c
+++ src/xfer.c
@@ -658,13 +658,21 @@
658 if( xfer.nToken==3
659 && (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
660 && blob_is_uuid(&xfer.aToken[1])
661 && blob_is_uuid(&xfer.aToken[2])
662 ){
 
663 const char *zPCode;
664
665 #if 0
666 /* This block checks to see if a server is trying to sync with itself.
667 ** This used to be disallowed, but I cannot think of any significant
668 ** harm, so I have disabled the check.
669 **
670 ** With this check disabled, it is sufficient to copy the repository
671 ** database. No need to run clone.
672 */
673 const char *zSCode;
674 zSCode = db_get("server-code", 0);
675 if( zSCode==0 ){
676 fossil_panic("missing server code");
677 }
678 if( blob_eq_str(&xfer.aToken[1], zSCode, -1) ){
@@ -671,10 +679,12 @@
679 cgi_reset_content();
680 @ error server\sloop
681 nErr++;
682 break;
683 }
684 #endif
685
686 zPCode = db_get("project-code", 0);
687 if( zPCode==0 ){
688 fossil_panic("missing project code");
689 }
690 if( !blob_eq_str(&xfer.aToken[2], zPCode, -1) ){
691
+11 -1
--- src/xfer.c
+++ src/xfer.c
@@ -658,13 +658,21 @@
658658
if( xfer.nToken==3
659659
&& (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
660660
&& blob_is_uuid(&xfer.aToken[1])
661661
&& blob_is_uuid(&xfer.aToken[2])
662662
){
663
- const char *zSCode;
664663
const char *zPCode;
665664
665
+#if 0
666
+ /* This block checks to see if a server is trying to sync with itself.
667
+ ** This used to be disallowed, but I cannot think of any significant
668
+ ** harm, so I have disabled the check.
669
+ **
670
+ ** With this check disabled, it is sufficient to copy the repository
671
+ ** database. No need to run clone.
672
+ */
673
+ const char *zSCode;
666674
zSCode = db_get("server-code", 0);
667675
if( zSCode==0 ){
668676
fossil_panic("missing server code");
669677
}
670678
if( blob_eq_str(&xfer.aToken[1], zSCode, -1) ){
@@ -671,10 +679,12 @@
671679
cgi_reset_content();
672680
@ error server\sloop
673681
nErr++;
674682
break;
675683
}
684
+#endif
685
+
676686
zPCode = db_get("project-code", 0);
677687
if( zPCode==0 ){
678688
fossil_panic("missing project code");
679689
}
680690
if( !blob_eq_str(&xfer.aToken[2], zPCode, -1) ){
681691
--- src/xfer.c
+++ src/xfer.c
@@ -658,13 +658,21 @@
658 if( xfer.nToken==3
659 && (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
660 && blob_is_uuid(&xfer.aToken[1])
661 && blob_is_uuid(&xfer.aToken[2])
662 ){
663 const char *zSCode;
664 const char *zPCode;
665
 
 
 
 
 
 
 
 
 
666 zSCode = db_get("server-code", 0);
667 if( zSCode==0 ){
668 fossil_panic("missing server code");
669 }
670 if( blob_eq_str(&xfer.aToken[1], zSCode, -1) ){
@@ -671,10 +679,12 @@
671 cgi_reset_content();
672 @ error server\sloop
673 nErr++;
674 break;
675 }
 
 
676 zPCode = db_get("project-code", 0);
677 if( zPCode==0 ){
678 fossil_panic("missing project code");
679 }
680 if( !blob_eq_str(&xfer.aToken[2], zPCode, -1) ){
681
--- src/xfer.c
+++ src/xfer.c
@@ -658,13 +658,21 @@
658 if( xfer.nToken==3
659 && (blob_eq(&xfer.aToken[0], "pull") || blob_eq(&xfer.aToken[0], "push"))
660 && blob_is_uuid(&xfer.aToken[1])
661 && blob_is_uuid(&xfer.aToken[2])
662 ){
 
663 const char *zPCode;
664
665 #if 0
666 /* This block checks to see if a server is trying to sync with itself.
667 ** This used to be disallowed, but I cannot think of any significant
668 ** harm, so I have disabled the check.
669 **
670 ** With this check disabled, it is sufficient to copy the repository
671 ** database. No need to run clone.
672 */
673 const char *zSCode;
674 zSCode = db_get("server-code", 0);
675 if( zSCode==0 ){
676 fossil_panic("missing server code");
677 }
678 if( blob_eq_str(&xfer.aToken[1], zSCode, -1) ){
@@ -671,10 +679,12 @@
679 cgi_reset_content();
680 @ error server\sloop
681 nErr++;
682 break;
683 }
684 #endif
685
686 zPCode = db_get("project-code", 0);
687 if( zPCode==0 ){
688 fossil_panic("missing project code");
689 }
690 if( !blob_eq_str(&xfer.aToken[2], zPCode, -1) ){
691

Keyboard Shortcuts

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