Fossil SCM

Merging from trunk. I manually solved the conflict widening the user name on annotate.

viriketo 2012-03-01 22:30 annotate_links merge
Commit f201fbaea31ff3492d5e23e2e4d969fca311daec
--- ajax/index.html
+++ ajax/index.html
@@ -234,10 +234,11 @@
234234
<input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci?files=true")' />
235235
<input type='button' value='timeline/wiki' onclick='TheApp.cgi.sendCommand("/json/timeline/wiki")' />
236236
<input type='button' value='timeline/ticket' onclick='TheApp.cgi.sendCommand("/json/timeline/ticket")' />
237237
<input type='button' value='timeline/branch' onclick='TheApp.cgi.sendCommand("/json/timeline/branch")' />
238238
<input type='button' value='wiki/list' onclick='TheApp.cgi.sendCommand("/json/wiki/list")' />
239
+<input type='button' value='wiki/list verbose' onclick='TheApp.cgi.sendCommand("/json/wiki/list",{verbose:1})' />
239240
<input type='button' value='wiki/get Fossil' onclick='TheApp.cgi.sendCommand("/json/wiki/get",{name:"Fossil"})' />
240241
<input type='button' value='wiki/get/Fossil' onclick='TheApp.cgi.sendCommand("/json/wiki/get/Fossil")' />
241242
242243
<br/>
243244
244245
--- ajax/index.html
+++ ajax/index.html
@@ -234,10 +234,11 @@
234 <input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci?files=true")' />
235 <input type='button' value='timeline/wiki' onclick='TheApp.cgi.sendCommand("/json/timeline/wiki")' />
236 <input type='button' value='timeline/ticket' onclick='TheApp.cgi.sendCommand("/json/timeline/ticket")' />
237 <input type='button' value='timeline/branch' onclick='TheApp.cgi.sendCommand("/json/timeline/branch")' />
238 <input type='button' value='wiki/list' onclick='TheApp.cgi.sendCommand("/json/wiki/list")' />
 
239 <input type='button' value='wiki/get Fossil' onclick='TheApp.cgi.sendCommand("/json/wiki/get",{name:"Fossil"})' />
240 <input type='button' value='wiki/get/Fossil' onclick='TheApp.cgi.sendCommand("/json/wiki/get/Fossil")' />
241
242 <br/>
243
244
--- ajax/index.html
+++ ajax/index.html
@@ -234,10 +234,11 @@
234 <input type='button' value='timeline/ci' onclick='TheApp.cgi.sendCommand("/json/timeline/ci?files=true")' />
235 <input type='button' value='timeline/wiki' onclick='TheApp.cgi.sendCommand("/json/timeline/wiki")' />
236 <input type='button' value='timeline/ticket' onclick='TheApp.cgi.sendCommand("/json/timeline/ticket")' />
237 <input type='button' value='timeline/branch' onclick='TheApp.cgi.sendCommand("/json/timeline/branch")' />
238 <input type='button' value='wiki/list' onclick='TheApp.cgi.sendCommand("/json/wiki/list")' />
239 <input type='button' value='wiki/list verbose' onclick='TheApp.cgi.sendCommand("/json/wiki/list",{verbose:1})' />
240 <input type='button' value='wiki/get Fossil' onclick='TheApp.cgi.sendCommand("/json/wiki/get",{name:"Fossil"})' />
241 <input type='button' value='wiki/get/Fossil' onclick='TheApp.cgi.sendCommand("/json/wiki/get/Fossil")' />
242
243 <br/>
244
245
+1 -1
--- auto.def
+++ auto.def
@@ -156,11 +156,11 @@
156156
set cflags ""
157157
set ldflags ""
158158
} else {
159159
set msg "ssl in $dir"
160160
set cflags "-I$dir/include"
161
- set ldflags "-L$dir/include"
161
+ set ldflags "-L$dir/lib"
162162
}
163163
if {[check-for-openssl $msg "$cflags $ldflags"]} {
164164
incr found
165165
break
166166
}
167167
--- auto.def
+++ auto.def
@@ -156,11 +156,11 @@
156 set cflags ""
157 set ldflags ""
158 } else {
159 set msg "ssl in $dir"
160 set cflags "-I$dir/include"
161 set ldflags "-L$dir/include"
162 }
163 if {[check-for-openssl $msg "$cflags $ldflags"]} {
164 incr found
165 break
166 }
167
--- auto.def
+++ auto.def
@@ -156,11 +156,11 @@
156 set cflags ""
157 set ldflags ""
158 } else {
159 set msg "ssl in $dir"
160 set cflags "-I$dir/include"
161 set ldflags "-L$dir/lib"
162 }
163 if {[check-for-openssl $msg "$cflags $ldflags"]} {
164 incr found
165 break
166 }
167
+17 -9
--- src/clone.c
+++ src/clone.c
@@ -20,18 +20,20 @@
2020
#include "config.h"
2121
#include "clone.h"
2222
#include <assert.h>
2323
2424
/*
25
-** Delete all private content from a repository.
25
+** If there are public BLOBs that deltas from private BLOBs, then
26
+** undeltify the public BLOBs so that the private BLOBs may be safely
27
+** deleted.
2628
*/
27
-void delete_private_content(void){
29
+void fix_private_blob_dependencies(int showWarning){
2830
Bag toUndelta;
2931
Stmt q;
3032
int rid;
3133
32
- /* Carefule: We are about to delete all BLOB entries that are private.
34
+ /* Careful: We are about to delete all BLOB entries that are private.
3335
** So make sure that any no public BLOBs are deltas from a private BLOB.
3436
** Otherwise after the deletion, we won't be able to recreate the public
3537
** BLOBs.
3638
*/
3739
db_prepare(&q,
@@ -45,25 +47,31 @@
4547
while( db_step(&q)==SQLITE_ROW ){
4648
int rid = db_column_int(&q, 0);
4749
const char *zId = db_column_text(&q, 1);
4850
int srcid = db_column_int(&q, 2);
4951
const char *zSrc = db_column_text(&q, 3);
50
- fossil_warning(
51
- "public artifact %S (%d) is a delta from private artifact %S (%d)\n",
52
- zId, rid, zSrc, srcid
53
- );
52
+ if( showWarning ){
53
+ fossil_warning(
54
+ "public artifact %S (%d) is a delta from private artifact %S (%d)",
55
+ zId, rid, zSrc, srcid
56
+ );
57
+ }
5458
bag_insert(&toUndelta, rid);
5559
}
5660
db_finalize(&q);
5761
while( (rid = bag_first(&toUndelta))>0 ){
5862
content_undelta(rid);
5963
bag_remove(&toUndelta, rid);
6064
}
6165
bag_clear(&toUndelta);
66
+}
6267
63
- /* Now it is safe to remove all private content
64
- */
68
+/*
69
+** Delete all private content from a repository.
70
+*/
71
+void delete_private_content(void){
72
+ fix_private_blob_dependencies(1);
6573
db_multi_exec(
6674
"DELETE FROM blob WHERE rid IN private;"
6775
"DELETE FROM delta wHERE rid IN private;"
6876
"DELETE FROM private;"
6977
);
7078
--- src/clone.c
+++ src/clone.c
@@ -20,18 +20,20 @@
20 #include "config.h"
21 #include "clone.h"
22 #include <assert.h>
23
24 /*
25 ** Delete all private content from a repository.
 
 
26 */
27 void delete_private_content(void){
28 Bag toUndelta;
29 Stmt q;
30 int rid;
31
32 /* Carefule: We are about to delete all BLOB entries that are private.
33 ** So make sure that any no public BLOBs are deltas from a private BLOB.
34 ** Otherwise after the deletion, we won't be able to recreate the public
35 ** BLOBs.
36 */
37 db_prepare(&q,
@@ -45,25 +47,31 @@
45 while( db_step(&q)==SQLITE_ROW ){
46 int rid = db_column_int(&q, 0);
47 const char *zId = db_column_text(&q, 1);
48 int srcid = db_column_int(&q, 2);
49 const char *zSrc = db_column_text(&q, 3);
50 fossil_warning(
51 "public artifact %S (%d) is a delta from private artifact %S (%d)\n",
52 zId, rid, zSrc, srcid
53 );
 
 
54 bag_insert(&toUndelta, rid);
55 }
56 db_finalize(&q);
57 while( (rid = bag_first(&toUndelta))>0 ){
58 content_undelta(rid);
59 bag_remove(&toUndelta, rid);
60 }
61 bag_clear(&toUndelta);
 
62
63 /* Now it is safe to remove all private content
64 */
 
 
 
65 db_multi_exec(
66 "DELETE FROM blob WHERE rid IN private;"
67 "DELETE FROM delta wHERE rid IN private;"
68 "DELETE FROM private;"
69 );
70
--- src/clone.c
+++ src/clone.c
@@ -20,18 +20,20 @@
20 #include "config.h"
21 #include "clone.h"
22 #include <assert.h>
23
24 /*
25 ** If there are public BLOBs that deltas from private BLOBs, then
26 ** undeltify the public BLOBs so that the private BLOBs may be safely
27 ** deleted.
28 */
29 void fix_private_blob_dependencies(int showWarning){
30 Bag toUndelta;
31 Stmt q;
32 int rid;
33
34 /* Careful: We are about to delete all BLOB entries that are private.
35 ** So make sure that any no public BLOBs are deltas from a private BLOB.
36 ** Otherwise after the deletion, we won't be able to recreate the public
37 ** BLOBs.
38 */
39 db_prepare(&q,
@@ -45,25 +47,31 @@
47 while( db_step(&q)==SQLITE_ROW ){
48 int rid = db_column_int(&q, 0);
49 const char *zId = db_column_text(&q, 1);
50 int srcid = db_column_int(&q, 2);
51 const char *zSrc = db_column_text(&q, 3);
52 if( showWarning ){
53 fossil_warning(
54 "public artifact %S (%d) is a delta from private artifact %S (%d)",
55 zId, rid, zSrc, srcid
56 );
57 }
58 bag_insert(&toUndelta, rid);
59 }
60 db_finalize(&q);
61 while( (rid = bag_first(&toUndelta))>0 ){
62 content_undelta(rid);
63 bag_remove(&toUndelta, rid);
64 }
65 bag_clear(&toUndelta);
66 }
67
68 /*
69 ** Delete all private content from a repository.
70 */
71 void delete_private_content(void){
72 fix_private_blob_dependencies(1);
73 db_multi_exec(
74 "DELETE FROM blob WHERE rid IN private;"
75 "DELETE FROM delta wHERE rid IN private;"
76 "DELETE FROM private;"
77 );
78
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -2200,14 +2200,13 @@
22002200
# define VALUE_T_IS_PTR 1
22012201
#else
22022202
#endif
22032203
22042204
/**
2205
- Allocates a new value of the specified type ownership of it to the
2206
- caller. It must eventually be destroyed, by the caller or its
2207
- owning container, by passing it to cson_value_free() or transfering
2208
- ownership to a container.
2205
+ Allocates a new value of the specified type. Ownership is
2206
+ transfered to the caller, who must eventually free it by passing it
2207
+ to cson_value_free() or transfering ownership to a container.
22092208
22102209
extra is only valid for type CSON_TYPE_STRING, and must be the length
22112210
of the string to allocate + 1 byte (for the NUL).
22122211
22132212
The returned value->api member will be set appropriately and
@@ -2249,10 +2248,15 @@
22492248
tx = sizeof(cson_double_t);
22502249
reason = "cson_value:double";
22512250
break;
22522251
case CSON_TYPE_INTEGER:
22532252
assert( 0 == extra );
2253
+ /* FIXME: if sizeof(void*) >= sizeof(cson_int_t) then store
2254
+ the int value directly in the void pointer (requires no
2255
+ extra alloc). The current behaviour requires 32
2256
+ bytes(!!!) on 64-bit builds.
2257
+ */
22542258
def = cson_value_integer_empty;
22552259
tx = sizeof(cson_int_t);
22562260
reason = "cson_value:int";
22572261
break;
22582262
case CSON_TYPE_STRING:
@@ -2281,11 +2285,10 @@
22812285
}
22822286
}
22832287
return v;
22842288
}
22852289
2286
-
22872290
void cson_value_free(cson_value *v)
22882291
{
22892292
cson_refcount_decr( v );
22902293
}
22912294
@@ -2304,15 +2307,10 @@
23042307
}
23052308
#endif
23062309
23072310
char cson_value_is_undef( cson_value const * v )
23082311
{
2309
- /**
2310
- This special-case impl is needed because the underlying
2311
- (generic) list operations do not know how to populate
2312
- new entries
2313
- */
23142312
return ( !v || !v->api || (v->api==&cson_value_api_undef))
23152313
? 1 : 0;
23162314
}
23172315
#define ISA(T,TID) char cson_value_is_##T( cson_value const * v ) { \
23182316
/*return (v && v->api) ? cson_value_is_a(v,CSON_TYPE_##TID) : 0;*/ \
@@ -3733,12 +3731,14 @@
37333731
*pzNext = z;
37343732
return c;
37353733
}
37363734
#undef READ_UTF8
37373735
3738
-#if defined(_WIN32)
3739
-# pragma warning( pop )
3736
+#ifdef _MSC_VER
3737
+# if _MSC_VER >= 1400 /* Visual Studio 2005 and up */
3738
+# pragma warning( pop )
3739
+# endif
37403740
#endif
37413741
37423742
unsigned int cson_string_length_utf8( cson_string const * str )
37433743
{
37443744
if( ! str ) return 0;
@@ -5504,11 +5504,10 @@
55045504
else
55055505
{
55065506
cson_value * rootV = NULL;
55075507
cson_object * root = NULL;
55085508
cson_value * aryV = NULL;
5509
- cson_array * ary = NULL;
55105509
cson_value * rowsV = NULL;
55115510
cson_array * rows = NULL;
55125511
int rc = 0;
55135512
int const colCount = sqlite3_column_count(st);
55145513
if( colCount <= 0 ) return cson_rc.ArgError;
@@ -5526,11 +5525,10 @@
55265525
{
55275526
cson_value_free( aryV );
55285527
RETURN(rc);
55295528
}
55305529
aryV = NULL;
5531
- ary = NULL;
55325530
rowsV = cson_value_new_array();
55335531
if( ! rowsV ) RETURN(cson_rc.AllocError);
55345532
rc = cson_object_set( root, "rows", rowsV );
55355533
if( 0 != rc )
55365534
{
55375535
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -2200,14 +2200,13 @@
2200 # define VALUE_T_IS_PTR 1
2201 #else
2202 #endif
2203
2204 /**
2205 Allocates a new value of the specified type ownership of it to the
2206 caller. It must eventually be destroyed, by the caller or its
2207 owning container, by passing it to cson_value_free() or transfering
2208 ownership to a container.
2209
2210 extra is only valid for type CSON_TYPE_STRING, and must be the length
2211 of the string to allocate + 1 byte (for the NUL).
2212
2213 The returned value->api member will be set appropriately and
@@ -2249,10 +2248,15 @@
2249 tx = sizeof(cson_double_t);
2250 reason = "cson_value:double";
2251 break;
2252 case CSON_TYPE_INTEGER:
2253 assert( 0 == extra );
 
 
 
 
 
2254 def = cson_value_integer_empty;
2255 tx = sizeof(cson_int_t);
2256 reason = "cson_value:int";
2257 break;
2258 case CSON_TYPE_STRING:
@@ -2281,11 +2285,10 @@
2281 }
2282 }
2283 return v;
2284 }
2285
2286
2287 void cson_value_free(cson_value *v)
2288 {
2289 cson_refcount_decr( v );
2290 }
2291
@@ -2304,15 +2307,10 @@
2304 }
2305 #endif
2306
2307 char cson_value_is_undef( cson_value const * v )
2308 {
2309 /**
2310 This special-case impl is needed because the underlying
2311 (generic) list operations do not know how to populate
2312 new entries
2313 */
2314 return ( !v || !v->api || (v->api==&cson_value_api_undef))
2315 ? 1 : 0;
2316 }
2317 #define ISA(T,TID) char cson_value_is_##T( cson_value const * v ) { \
2318 /*return (v && v->api) ? cson_value_is_a(v,CSON_TYPE_##TID) : 0;*/ \
@@ -3733,12 +3731,14 @@
3733 *pzNext = z;
3734 return c;
3735 }
3736 #undef READ_UTF8
3737
3738 #if defined(_WIN32)
3739 # pragma warning( pop )
 
 
3740 #endif
3741
3742 unsigned int cson_string_length_utf8( cson_string const * str )
3743 {
3744 if( ! str ) return 0;
@@ -5504,11 +5504,10 @@
5504 else
5505 {
5506 cson_value * rootV = NULL;
5507 cson_object * root = NULL;
5508 cson_value * aryV = NULL;
5509 cson_array * ary = NULL;
5510 cson_value * rowsV = NULL;
5511 cson_array * rows = NULL;
5512 int rc = 0;
5513 int const colCount = sqlite3_column_count(st);
5514 if( colCount <= 0 ) return cson_rc.ArgError;
@@ -5526,11 +5525,10 @@
5526 {
5527 cson_value_free( aryV );
5528 RETURN(rc);
5529 }
5530 aryV = NULL;
5531 ary = NULL;
5532 rowsV = cson_value_new_array();
5533 if( ! rowsV ) RETURN(cson_rc.AllocError);
5534 rc = cson_object_set( root, "rows", rowsV );
5535 if( 0 != rc )
5536 {
5537
--- src/cson_amalgamation.c
+++ src/cson_amalgamation.c
@@ -2200,14 +2200,13 @@
2200 # define VALUE_T_IS_PTR 1
2201 #else
2202 #endif
2203
2204 /**
2205 Allocates a new value of the specified type. Ownership is
2206 transfered to the caller, who must eventually free it by passing it
2207 to cson_value_free() or transfering ownership to a container.
 
2208
2209 extra is only valid for type CSON_TYPE_STRING, and must be the length
2210 of the string to allocate + 1 byte (for the NUL).
2211
2212 The returned value->api member will be set appropriately and
@@ -2249,10 +2248,15 @@
2248 tx = sizeof(cson_double_t);
2249 reason = "cson_value:double";
2250 break;
2251 case CSON_TYPE_INTEGER:
2252 assert( 0 == extra );
2253 /* FIXME: if sizeof(void*) >= sizeof(cson_int_t) then store
2254 the int value directly in the void pointer (requires no
2255 extra alloc). The current behaviour requires 32
2256 bytes(!!!) on 64-bit builds.
2257 */
2258 def = cson_value_integer_empty;
2259 tx = sizeof(cson_int_t);
2260 reason = "cson_value:int";
2261 break;
2262 case CSON_TYPE_STRING:
@@ -2281,11 +2285,10 @@
2285 }
2286 }
2287 return v;
2288 }
2289
 
2290 void cson_value_free(cson_value *v)
2291 {
2292 cson_refcount_decr( v );
2293 }
2294
@@ -2304,15 +2307,10 @@
2307 }
2308 #endif
2309
2310 char cson_value_is_undef( cson_value const * v )
2311 {
 
 
 
 
 
2312 return ( !v || !v->api || (v->api==&cson_value_api_undef))
2313 ? 1 : 0;
2314 }
2315 #define ISA(T,TID) char cson_value_is_##T( cson_value const * v ) { \
2316 /*return (v && v->api) ? cson_value_is_a(v,CSON_TYPE_##TID) : 0;*/ \
@@ -3733,12 +3731,14 @@
3731 *pzNext = z;
3732 return c;
3733 }
3734 #undef READ_UTF8
3735
3736 #ifdef _MSC_VER
3737 # if _MSC_VER >= 1400 /* Visual Studio 2005 and up */
3738 # pragma warning( pop )
3739 # endif
3740 #endif
3741
3742 unsigned int cson_string_length_utf8( cson_string const * str )
3743 {
3744 if( ! str ) return 0;
@@ -5504,11 +5504,10 @@
5504 else
5505 {
5506 cson_value * rootV = NULL;
5507 cson_object * root = NULL;
5508 cson_value * aryV = NULL;
 
5509 cson_value * rowsV = NULL;
5510 cson_array * rows = NULL;
5511 int rc = 0;
5512 int const colCount = sqlite3_column_count(st);
5513 if( colCount <= 0 ) return cson_rc.ArgError;
@@ -5526,11 +5525,10 @@
5525 {
5526 cson_value_free( aryV );
5527 RETURN(rc);
5528 }
5529 aryV = NULL;
 
5530 rowsV = cson_value_new_array();
5531 if( ! rowsV ) RETURN(cson_rc.AllocError);
5532 rc = cson_object_set( root, "rows", rowsV );
5533 if( 0 != rc )
5534 {
5535
+3 -3
--- src/diff.c
+++ src/diff.c
@@ -1788,23 +1788,23 @@
17881788
if( webLabel ){
17891789
if (zUuidParentFile) {
17901790
zLabel = mprintf(
17911791
"<a href='%s/info/%s' %s>%.10s</a> "
17921792
"<a href='%s/fdiff?v1=%s&v2=%s' %s>d</a> "
1793
- "%s %9.9s",
1793
+ "%s %13.13s",
17941794
g.zTop, zUuid, zInfoTarget, zUuid,
17951795
g.zTop, zUuidParentFile, zUuidFile, zDiffTarget,
17961796
zDate, zUser);
17971797
}else{
17981798
zLabel = mprintf(
17991799
"<a href='%s/info/%s' %s>%.10s</a> "
1800
- "%s %9.9s",
1800
+ "%s %13.13s",
18011801
g.zTop, zUuid, zInfoTarget, zUuid,
18021802
zDate, zUser);
18031803
}
18041804
}else{
1805
- zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser);
1805
+ zLabel = mprintf("%.10s %s %13.13s", zUuid, zDate, zUser);
18061806
}
18071807
p->nVers++;
18081808
p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) );
18091809
p->azVers[p->nVers-1] = zLabel;
18101810
content_get(pid, &step);
18111811
--- src/diff.c
+++ src/diff.c
@@ -1788,23 +1788,23 @@
1788 if( webLabel ){
1789 if (zUuidParentFile) {
1790 zLabel = mprintf(
1791 "<a href='%s/info/%s' %s>%.10s</a> "
1792 "<a href='%s/fdiff?v1=%s&v2=%s' %s>d</a> "
1793 "%s %9.9s",
1794 g.zTop, zUuid, zInfoTarget, zUuid,
1795 g.zTop, zUuidParentFile, zUuidFile, zDiffTarget,
1796 zDate, zUser);
1797 }else{
1798 zLabel = mprintf(
1799 "<a href='%s/info/%s' %s>%.10s</a> "
1800 "%s %9.9s",
1801 g.zTop, zUuid, zInfoTarget, zUuid,
1802 zDate, zUser);
1803 }
1804 }else{
1805 zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser);
1806 }
1807 p->nVers++;
1808 p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) );
1809 p->azVers[p->nVers-1] = zLabel;
1810 content_get(pid, &step);
1811
--- src/diff.c
+++ src/diff.c
@@ -1788,23 +1788,23 @@
1788 if( webLabel ){
1789 if (zUuidParentFile) {
1790 zLabel = mprintf(
1791 "<a href='%s/info/%s' %s>%.10s</a> "
1792 "<a href='%s/fdiff?v1=%s&v2=%s' %s>d</a> "
1793 "%s %13.13s",
1794 g.zTop, zUuid, zInfoTarget, zUuid,
1795 g.zTop, zUuidParentFile, zUuidFile, zDiffTarget,
1796 zDate, zUser);
1797 }else{
1798 zLabel = mprintf(
1799 "<a href='%s/info/%s' %s>%.10s</a> "
1800 "%s %13.13s",
1801 g.zTop, zUuid, zInfoTarget, zUuid,
1802 zDate, zUser);
1803 }
1804 }else{
1805 zLabel = mprintf("%.10s %s %13.13s", zUuid, zDate, zUser);
1806 }
1807 p->nVers++;
1808 p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) );
1809 p->azVers[p->nVers-1] = zLabel;
1810 content_get(pid, &step);
1811
+3 -3
--- src/diff.c
+++ src/diff.c
@@ -1788,23 +1788,23 @@
17881788
if( webLabel ){
17891789
if (zUuidParentFile) {
17901790
zLabel = mprintf(
17911791
"<a href='%s/info/%s' %s>%.10s</a> "
17921792
"<a href='%s/fdiff?v1=%s&v2=%s' %s>d</a> "
1793
- "%s %9.9s",
1793
+ "%s %13.13s",
17941794
g.zTop, zUuid, zInfoTarget, zUuid,
17951795
g.zTop, zUuidParentFile, zUuidFile, zDiffTarget,
17961796
zDate, zUser);
17971797
}else{
17981798
zLabel = mprintf(
17991799
"<a href='%s/info/%s' %s>%.10s</a> "
1800
- "%s %9.9s",
1800
+ "%s %13.13s",
18011801
g.zTop, zUuid, zInfoTarget, zUuid,
18021802
zDate, zUser);
18031803
}
18041804
}else{
1805
- zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser);
1805
+ zLabel = mprintf("%.10s %s %13.13s", zUuid, zDate, zUser);
18061806
}
18071807
p->nVers++;
18081808
p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) );
18091809
p->azVers[p->nVers-1] = zLabel;
18101810
content_get(pid, &step);
18111811
--- src/diff.c
+++ src/diff.c
@@ -1788,23 +1788,23 @@
1788 if( webLabel ){
1789 if (zUuidParentFile) {
1790 zLabel = mprintf(
1791 "<a href='%s/info/%s' %s>%.10s</a> "
1792 "<a href='%s/fdiff?v1=%s&v2=%s' %s>d</a> "
1793 "%s %9.9s",
1794 g.zTop, zUuid, zInfoTarget, zUuid,
1795 g.zTop, zUuidParentFile, zUuidFile, zDiffTarget,
1796 zDate, zUser);
1797 }else{
1798 zLabel = mprintf(
1799 "<a href='%s/info/%s' %s>%.10s</a> "
1800 "%s %9.9s",
1801 g.zTop, zUuid, zInfoTarget, zUuid,
1802 zDate, zUser);
1803 }
1804 }else{
1805 zLabel = mprintf("%.10s %s %9.9s", zUuid, zDate, zUser);
1806 }
1807 p->nVers++;
1808 p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) );
1809 p->azVers[p->nVers-1] = zLabel;
1810 content_get(pid, &step);
1811
--- src/diff.c
+++ src/diff.c
@@ -1788,23 +1788,23 @@
1788 if( webLabel ){
1789 if (zUuidParentFile) {
1790 zLabel = mprintf(
1791 "<a href='%s/info/%s' %s>%.10s</a> "
1792 "<a href='%s/fdiff?v1=%s&v2=%s' %s>d</a> "
1793 "%s %13.13s",
1794 g.zTop, zUuid, zInfoTarget, zUuid,
1795 g.zTop, zUuidParentFile, zUuidFile, zDiffTarget,
1796 zDate, zUser);
1797 }else{
1798 zLabel = mprintf(
1799 "<a href='%s/info/%s' %s>%.10s</a> "
1800 "%s %13.13s",
1801 g.zTop, zUuid, zInfoTarget, zUuid,
1802 zDate, zUser);
1803 }
1804 }else{
1805 zLabel = mprintf("%.10s %s %13.13s", zUuid, zDate, zUser);
1806 }
1807 p->nVers++;
1808 p->azVers = fossil_realloc(p->azVers, p->nVers*sizeof(p->azVers[0]) );
1809 p->azVers[p->nVers-1] = zLabel;
1810 content_get(pid, &step);
1811
+3 -6
--- src/json.c
+++ src/json.c
@@ -84,17 +84,17 @@
8484
** Print the timing results.
8585
*/
8686
static double endTimer(void){
8787
struct rusage sEnd;
8888
getrusage(RUSAGE_SELF, &sEnd);
89
- return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime)
90
- + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime);
9189
#if 0
9290
printf("CPU Time: user %f sys %f\n",
9391
timeDiff(&sBegin.ru_utime, &sEnd.ru_utime),
9492
timeDiff(&sBegin.ru_stime, &sEnd.ru_stime));
9593
#endif
94
+ return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime)
95
+ + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime);
9696
}
9797
9898
#define BEGIN_TIMER beginTimer()
9999
#define END_TIMER endTimer()
100100
#define HAS_TIMER 1
@@ -162,10 +162,11 @@
162162
FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd;
163163
getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelEnd, &ftUserEnd);
164164
return timeDiff(&ftUserBegin, &ftUserEnd) +
165165
timeDiff(&ftKernelBegin, &ftKernelEnd);
166166
}
167
+ return 0.0;
167168
}
168169
169170
#define BEGIN_TIMER beginTimer()
170171
#define END_TIMER endTimer()
171172
#define HAS_TIMER hasTimer()
@@ -912,11 +913,10 @@
912913
cson_array * target ){
913914
char const * p = zStr /* current byte */;
914915
char const * head /* current start-of-token */;
915916
unsigned int len = 0 /* current token's length */;
916917
int rc = 0 /* return code (number of added elements)*/;
917
- char skipWs = fossil_isspace(separator) ? 0 : 1;
918918
assert( zStr && target );
919919
while( fossil_isspace(*p) ){
920920
++p;
921921
}
922922
head = p;
@@ -1015,11 +1015,10 @@
10151015
** This must only be called once, or an assertion may be triggered.
10161016
*/
10171017
static void json_mode_bootstrap(){
10181018
static char once = 0 /* guard against multiple runs */;
10191019
char const * zPath = P("PATH_INFO");
1020
- cson_value * pathSplit = NULL;
10211020
assert( (0==once) && "json_mode_bootstrap() called too many times!");
10221021
if( once ){
10231022
return;
10241023
}else{
10251024
once = 1;
@@ -1151,11 +1150,10 @@
11511150
g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/;
11521151
}
11531152
11541153
{/* set up JSON output formatting options. */
11551154
int indent = -1;
1156
- char const * indentStr = NULL;
11571155
indent = json_find_option_int("indent",NULL,"I",-1);
11581156
g.json.outOpt.indentation = (0>indent)
11591157
? (g.isHTTP ? 0 : 1)
11601158
: (unsigned char)indent;
11611159
g.json.outOpt.addNewline = g.isHTTP
@@ -1331,11 +1329,10 @@
13311329
if(!g.json.cmd.a){
13321330
return NULL;
13331331
}else{
13341332
cson_value * rc = NULL;
13351333
Blob path = empty_blob;
1336
- char const * part;
13371334
unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/
13381335
unsigned int i = 1;
13391336
for( ; i < aLen; ++i ){
13401337
char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i)));
13411338
if(!part){
13421339
--- src/json.c
+++ src/json.c
@@ -84,17 +84,17 @@
84 ** Print the timing results.
85 */
86 static double endTimer(void){
87 struct rusage sEnd;
88 getrusage(RUSAGE_SELF, &sEnd);
89 return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime)
90 + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime);
91 #if 0
92 printf("CPU Time: user %f sys %f\n",
93 timeDiff(&sBegin.ru_utime, &sEnd.ru_utime),
94 timeDiff(&sBegin.ru_stime, &sEnd.ru_stime));
95 #endif
 
 
96 }
97
98 #define BEGIN_TIMER beginTimer()
99 #define END_TIMER endTimer()
100 #define HAS_TIMER 1
@@ -162,10 +162,11 @@
162 FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd;
163 getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelEnd, &ftUserEnd);
164 return timeDiff(&ftUserBegin, &ftUserEnd) +
165 timeDiff(&ftKernelBegin, &ftKernelEnd);
166 }
 
167 }
168
169 #define BEGIN_TIMER beginTimer()
170 #define END_TIMER endTimer()
171 #define HAS_TIMER hasTimer()
@@ -912,11 +913,10 @@
912 cson_array * target ){
913 char const * p = zStr /* current byte */;
914 char const * head /* current start-of-token */;
915 unsigned int len = 0 /* current token's length */;
916 int rc = 0 /* return code (number of added elements)*/;
917 char skipWs = fossil_isspace(separator) ? 0 : 1;
918 assert( zStr && target );
919 while( fossil_isspace(*p) ){
920 ++p;
921 }
922 head = p;
@@ -1015,11 +1015,10 @@
1015 ** This must only be called once, or an assertion may be triggered.
1016 */
1017 static void json_mode_bootstrap(){
1018 static char once = 0 /* guard against multiple runs */;
1019 char const * zPath = P("PATH_INFO");
1020 cson_value * pathSplit = NULL;
1021 assert( (0==once) && "json_mode_bootstrap() called too many times!");
1022 if( once ){
1023 return;
1024 }else{
1025 once = 1;
@@ -1151,11 +1150,10 @@
1151 g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/;
1152 }
1153
1154 {/* set up JSON output formatting options. */
1155 int indent = -1;
1156 char const * indentStr = NULL;
1157 indent = json_find_option_int("indent",NULL,"I",-1);
1158 g.json.outOpt.indentation = (0>indent)
1159 ? (g.isHTTP ? 0 : 1)
1160 : (unsigned char)indent;
1161 g.json.outOpt.addNewline = g.isHTTP
@@ -1331,11 +1329,10 @@
1331 if(!g.json.cmd.a){
1332 return NULL;
1333 }else{
1334 cson_value * rc = NULL;
1335 Blob path = empty_blob;
1336 char const * part;
1337 unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/
1338 unsigned int i = 1;
1339 for( ; i < aLen; ++i ){
1340 char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i)));
1341 if(!part){
1342
--- src/json.c
+++ src/json.c
@@ -84,17 +84,17 @@
84 ** Print the timing results.
85 */
86 static double endTimer(void){
87 struct rusage sEnd;
88 getrusage(RUSAGE_SELF, &sEnd);
 
 
89 #if 0
90 printf("CPU Time: user %f sys %f\n",
91 timeDiff(&sBegin.ru_utime, &sEnd.ru_utime),
92 timeDiff(&sBegin.ru_stime, &sEnd.ru_stime));
93 #endif
94 return timeDiff(&sBegin.ru_utime, &sEnd.ru_utime)
95 + timeDiff(&sBegin.ru_stime, &sEnd.ru_stime);
96 }
97
98 #define BEGIN_TIMER beginTimer()
99 #define END_TIMER endTimer()
100 #define HAS_TIMER 1
@@ -162,10 +162,11 @@
162 FILETIME ftCreation, ftExit, ftKernelEnd, ftUserEnd;
163 getProcessTimesAddr(hProcess, &ftCreation, &ftExit, &ftKernelEnd, &ftUserEnd);
164 return timeDiff(&ftUserBegin, &ftUserEnd) +
165 timeDiff(&ftKernelBegin, &ftKernelEnd);
166 }
167 return 0.0;
168 }
169
170 #define BEGIN_TIMER beginTimer()
171 #define END_TIMER endTimer()
172 #define HAS_TIMER hasTimer()
@@ -912,11 +913,10 @@
913 cson_array * target ){
914 char const * p = zStr /* current byte */;
915 char const * head /* current start-of-token */;
916 unsigned int len = 0 /* current token's length */;
917 int rc = 0 /* return code (number of added elements)*/;
 
918 assert( zStr && target );
919 while( fossil_isspace(*p) ){
920 ++p;
921 }
922 head = p;
@@ -1015,11 +1015,10 @@
1015 ** This must only be called once, or an assertion may be triggered.
1016 */
1017 static void json_mode_bootstrap(){
1018 static char once = 0 /* guard against multiple runs */;
1019 char const * zPath = P("PATH_INFO");
 
1020 assert( (0==once) && "json_mode_bootstrap() called too many times!");
1021 if( once ){
1022 return;
1023 }else{
1024 once = 1;
@@ -1151,11 +1150,10 @@
1150 g.json.errorDetailParanoia = 0 /*disable error code dumb-down for CLI mode*/;
1151 }
1152
1153 {/* set up JSON output formatting options. */
1154 int indent = -1;
 
1155 indent = json_find_option_int("indent",NULL,"I",-1);
1156 g.json.outOpt.indentation = (0>indent)
1157 ? (g.isHTTP ? 0 : 1)
1158 : (unsigned char)indent;
1159 g.json.outOpt.addNewline = g.isHTTP
@@ -1331,11 +1329,10 @@
1329 if(!g.json.cmd.a){
1330 return NULL;
1331 }else{
1332 cson_value * rc = NULL;
1333 Blob path = empty_blob;
 
1334 unsigned int aLen = g.json.dispatchDepth+1; /*cson_array_length_get(g.json.cmd.a);*/
1335 unsigned int i = 1;
1336 for( ; i < aLen; ++i ){
1337 char const * part = cson_string_cstr(cson_value_get_string(cson_array_get(g.json.cmd.a, i)));
1338 if(!part){
1339
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -48,31 +48,49 @@
4848
payload.artifact property of /json/artifact responses.
4949
*/
5050
artifact_f func;
5151
} ArtifactDispatchEntry;
5252
53
+
54
+/*
55
+** Generates a JSON Array reference holding the parent UUIDs (as strings).
56
+** If it finds no matches then it returns NULL (OOM is a fatal error).
57
+**
58
+** Returned value is NULL or an Array owned by the caller.
59
+*/
60
+cson_value * json_parent_uuids_for_ci( int rid ){
61
+ Stmt q = empty_Stmt;
62
+ cson_array * pParents = NULL;
63
+ db_prepare( &q,
64
+ "SELECT uuid FROM plink, blob"
65
+ " WHERE plink.cid=%d AND blob.rid=plink.pid"
66
+ " ORDER BY plink.isprim DESC",
67
+ rid );
68
+ while( SQLITE_ROW==db_step(&q) ){
69
+ if(!pParents) {
70
+ pParents = cson_new_array();
71
+ }
72
+ cson_array_append( pParents, cson_sqlite3_column_to_value( q.pStmt, 0 ) );
73
+ }
74
+ db_finalize(&q);
75
+ return cson_array_value(pParents);
76
+}
5377
5478
/*
5579
** Generates an artifact Object for the given rid,
5680
** which must refer to a Checkin.
5781
**
5882
** Returned value is NULL or an Object owned by the caller.
5983
*/
6084
cson_value * json_artifact_for_ci( int rid, char showFiles ){
61
- char * zParent = NULL;
6285
cson_value * v = NULL;
6386
Stmt q;
6487
static cson_value * eventTypeLabel = NULL;
6588
if(!eventTypeLabel){
6689
eventTypeLabel = json_new_string("checkin");
6790
json_gc_add("$EVENT_TYPE_LABEL(commit)", eventTypeLabel);
6891
}
69
- zParent = db_text(0,
70
- "SELECT uuid FROM plink, blob"
71
- " WHERE plink.cid=%d AND blob.rid=plink.pid AND plink.isprim",
72
- rid
73
- );
7492
7593
db_prepare(&q,
7694
"SELECT uuid, "
7795
" cast(strftime('%%s',mtime) as int), "
7896
" user, "
@@ -85,14 +103,17 @@
85103
);
86104
if( db_step(&q)==SQLITE_ROW ){
87105
cson_object * o;
88106
cson_value * tmpV = NULL;
89107
const char *zUuid = db_column_text(&q, 0);
90
- char * zTmp;
91108
const char *zUser;
92109
const char *zComment;
93110
char * zEUser, * zEComment;
111
+#define ADD_PRIMARY_PARENT_UUID 0 /* temporary local macro */
112
+#if ADD_PRIMARY_PARENT_UUID
113
+ char * zParent = NULL;
114
+#endif
94115
int mtime, omtime;
95116
v = cson_value_new_object();
96117
o = cson_value_get_object(v);
97118
#define SET(K,V) cson_object_set(o,(K), (V))
98119
SET("type", eventTypeLabel );
@@ -131,30 +152,43 @@
131152
omtime = db_column_int(&q,4);
132153
if(omtime && (omtime!=mtime)){
133154
SET("originTime",json_new_int(omtime));
134155
}
135156
136
- if(zParent){
137
- SET("parentUuid", json_new_string(zParent));
157
+#if ADD_PRIMARY_PARENT_UUID
158
+ zParent = db_text(0,
159
+ "SELECT uuid FROM plink, blob"
160
+ " WHERE plink.cid=%d AND blob.rid=plink.pid"
161
+ " AND plink.isprim",
162
+ rid
163
+ );
164
+ tmpV = zParent ? json_new_string(zParent) : cson_value_null();
165
+ free(zParent);
166
+ zParent = NULL;
167
+ SET("parentUuid", tmpV );
168
+#endif
169
+#undef ADD_PRIMARY_PARENT_UUID
170
+
171
+ tmpV = json_parent_uuids_for_ci(rid);
172
+ if(tmpV){
173
+ SET("parents", tmpV);
138174
}
139175
140176
tmpV = json_tags_for_checkin_rid(rid,0);
141177
if(tmpV){
142178
SET("tags",tmpV);
143179
}
144180
145181
if( showFiles ){
146
- cson_value * fileList = json_get_changed_files(rid);
147
- if(fileList){
148
- SET("files",fileList);
182
+ tmpV = json_get_changed_files(rid);
183
+ if(tmpV){
184
+ SET("files",tmpV);
149185
}
150186
}
151187
152
-
153188
#undef SET
154189
}
155
- free(zParent);
156190
db_finalize(&q);
157191
return v;
158192
}
159193
160194
/*
161195
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -48,31 +48,49 @@
48 payload.artifact property of /json/artifact responses.
49 */
50 artifact_f func;
51 } ArtifactDispatchEntry;
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
54 /*
55 ** Generates an artifact Object for the given rid,
56 ** which must refer to a Checkin.
57 **
58 ** Returned value is NULL or an Object owned by the caller.
59 */
60 cson_value * json_artifact_for_ci( int rid, char showFiles ){
61 char * zParent = NULL;
62 cson_value * v = NULL;
63 Stmt q;
64 static cson_value * eventTypeLabel = NULL;
65 if(!eventTypeLabel){
66 eventTypeLabel = json_new_string("checkin");
67 json_gc_add("$EVENT_TYPE_LABEL(commit)", eventTypeLabel);
68 }
69 zParent = db_text(0,
70 "SELECT uuid FROM plink, blob"
71 " WHERE plink.cid=%d AND blob.rid=plink.pid AND plink.isprim",
72 rid
73 );
74
75 db_prepare(&q,
76 "SELECT uuid, "
77 " cast(strftime('%%s',mtime) as int), "
78 " user, "
@@ -85,14 +103,17 @@
85 );
86 if( db_step(&q)==SQLITE_ROW ){
87 cson_object * o;
88 cson_value * tmpV = NULL;
89 const char *zUuid = db_column_text(&q, 0);
90 char * zTmp;
91 const char *zUser;
92 const char *zComment;
93 char * zEUser, * zEComment;
 
 
 
 
94 int mtime, omtime;
95 v = cson_value_new_object();
96 o = cson_value_get_object(v);
97 #define SET(K,V) cson_object_set(o,(K), (V))
98 SET("type", eventTypeLabel );
@@ -131,30 +152,43 @@
131 omtime = db_column_int(&q,4);
132 if(omtime && (omtime!=mtime)){
133 SET("originTime",json_new_int(omtime));
134 }
135
136 if(zParent){
137 SET("parentUuid", json_new_string(zParent));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138 }
139
140 tmpV = json_tags_for_checkin_rid(rid,0);
141 if(tmpV){
142 SET("tags",tmpV);
143 }
144
145 if( showFiles ){
146 cson_value * fileList = json_get_changed_files(rid);
147 if(fileList){
148 SET("files",fileList);
149 }
150 }
151
152
153 #undef SET
154 }
155 free(zParent);
156 db_finalize(&q);
157 return v;
158 }
159
160 /*
161
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -48,31 +48,49 @@
48 payload.artifact property of /json/artifact responses.
49 */
50 artifact_f func;
51 } ArtifactDispatchEntry;
52
53
54 /*
55 ** Generates a JSON Array reference holding the parent UUIDs (as strings).
56 ** If it finds no matches then it returns NULL (OOM is a fatal error).
57 **
58 ** Returned value is NULL or an Array owned by the caller.
59 */
60 cson_value * json_parent_uuids_for_ci( int rid ){
61 Stmt q = empty_Stmt;
62 cson_array * pParents = NULL;
63 db_prepare( &q,
64 "SELECT uuid FROM plink, blob"
65 " WHERE plink.cid=%d AND blob.rid=plink.pid"
66 " ORDER BY plink.isprim DESC",
67 rid );
68 while( SQLITE_ROW==db_step(&q) ){
69 if(!pParents) {
70 pParents = cson_new_array();
71 }
72 cson_array_append( pParents, cson_sqlite3_column_to_value( q.pStmt, 0 ) );
73 }
74 db_finalize(&q);
75 return cson_array_value(pParents);
76 }
77
78 /*
79 ** Generates an artifact Object for the given rid,
80 ** which must refer to a Checkin.
81 **
82 ** Returned value is NULL or an Object owned by the caller.
83 */
84 cson_value * json_artifact_for_ci( int rid, char showFiles ){
 
85 cson_value * v = NULL;
86 Stmt q;
87 static cson_value * eventTypeLabel = NULL;
88 if(!eventTypeLabel){
89 eventTypeLabel = json_new_string("checkin");
90 json_gc_add("$EVENT_TYPE_LABEL(commit)", eventTypeLabel);
91 }
 
 
 
 
 
92
93 db_prepare(&q,
94 "SELECT uuid, "
95 " cast(strftime('%%s',mtime) as int), "
96 " user, "
@@ -85,14 +103,17 @@
103 );
104 if( db_step(&q)==SQLITE_ROW ){
105 cson_object * o;
106 cson_value * tmpV = NULL;
107 const char *zUuid = db_column_text(&q, 0);
 
108 const char *zUser;
109 const char *zComment;
110 char * zEUser, * zEComment;
111 #define ADD_PRIMARY_PARENT_UUID 0 /* temporary local macro */
112 #if ADD_PRIMARY_PARENT_UUID
113 char * zParent = NULL;
114 #endif
115 int mtime, omtime;
116 v = cson_value_new_object();
117 o = cson_value_get_object(v);
118 #define SET(K,V) cson_object_set(o,(K), (V))
119 SET("type", eventTypeLabel );
@@ -131,30 +152,43 @@
152 omtime = db_column_int(&q,4);
153 if(omtime && (omtime!=mtime)){
154 SET("originTime",json_new_int(omtime));
155 }
156
157 #if ADD_PRIMARY_PARENT_UUID
158 zParent = db_text(0,
159 "SELECT uuid FROM plink, blob"
160 " WHERE plink.cid=%d AND blob.rid=plink.pid"
161 " AND plink.isprim",
162 rid
163 );
164 tmpV = zParent ? json_new_string(zParent) : cson_value_null();
165 free(zParent);
166 zParent = NULL;
167 SET("parentUuid", tmpV );
168 #endif
169 #undef ADD_PRIMARY_PARENT_UUID
170
171 tmpV = json_parent_uuids_for_ci(rid);
172 if(tmpV){
173 SET("parents", tmpV);
174 }
175
176 tmpV = json_tags_for_checkin_rid(rid,0);
177 if(tmpV){
178 SET("tags",tmpV);
179 }
180
181 if( showFiles ){
182 tmpV = json_get_changed_files(rid);
183 if(tmpV){
184 SET("files",tmpV);
185 }
186 }
187
 
188 #undef SET
189 }
 
190 db_finalize(&q);
191 return v;
192 }
193
194 /*
195
--- src/json_diff.c
+++ src/json_diff.c
@@ -37,11 +37,10 @@
3737
int fromid;
3838
int toid;
3939
int outLen;
4040
Blob from = empty_blob, to = empty_blob, out = empty_blob;
4141
cson_value * rc = NULL;
42
- char const * zType = "ci";
4342
int flags = (DIFF_CONTEXT_MASK & nContext)
4443
| (fSbs ? DIFF_SIDEBYSIDE : 0);
4544
fromid = name_to_typed_rid(zFrom, "*");
4645
if(fromid<=0){
4746
json_set_err(FSL_JSON_E_UNRESOLVED_UUID,
4847
--- src/json_diff.c
+++ src/json_diff.c
@@ -37,11 +37,10 @@
37 int fromid;
38 int toid;
39 int outLen;
40 Blob from = empty_blob, to = empty_blob, out = empty_blob;
41 cson_value * rc = NULL;
42 char const * zType = "ci";
43 int flags = (DIFF_CONTEXT_MASK & nContext)
44 | (fSbs ? DIFF_SIDEBYSIDE : 0);
45 fromid = name_to_typed_rid(zFrom, "*");
46 if(fromid<=0){
47 json_set_err(FSL_JSON_E_UNRESOLVED_UUID,
48
--- src/json_diff.c
+++ src/json_diff.c
@@ -37,11 +37,10 @@
37 int fromid;
38 int toid;
39 int outLen;
40 Blob from = empty_blob, to = empty_blob, out = empty_blob;
41 cson_value * rc = NULL;
 
42 int flags = (DIFF_CONTEXT_MASK & nContext)
43 | (fSbs ? DIFF_SIDEBYSIDE : 0);
44 fromid = name_to_typed_rid(zFrom, "*");
45 if(fromid<=0){
46 json_set_err(FSL_JSON_E_UNRESOLVED_UUID,
47
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -405,11 +405,11 @@
405405
cson_value_free( cson_string_value(tags) );
406406
cson_value_free( cson_string_value(isLeaf) );
407407
}
408408
409409
goto end;
410
- error:
410
+
411411
assert( 0 != g.json.resultCode );
412412
cson_value_free(pay);
413413
414414
end:
415415
return pay;
@@ -429,11 +429,10 @@
429429
cson_array * list = NULL;
430430
int check = 0;
431431
char showFiles = -1/*magic number*/;
432432
Stmt q = empty_Stmt;
433433
char warnRowToJsonFailed = 0;
434
- char warnStringToArrayFailed = 0;
435434
Blob sql = empty_blob;
436435
if( !g.perm.Read ){
437436
/* IMO this falls more under the category of g.perm.History, but
438437
i'm following the original timeline impl here.
439438
*/
440439
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -405,11 +405,11 @@
405 cson_value_free( cson_string_value(tags) );
406 cson_value_free( cson_string_value(isLeaf) );
407 }
408
409 goto end;
410 error:
411 assert( 0 != g.json.resultCode );
412 cson_value_free(pay);
413
414 end:
415 return pay;
@@ -429,11 +429,10 @@
429 cson_array * list = NULL;
430 int check = 0;
431 char showFiles = -1/*magic number*/;
432 Stmt q = empty_Stmt;
433 char warnRowToJsonFailed = 0;
434 char warnStringToArrayFailed = 0;
435 Blob sql = empty_blob;
436 if( !g.perm.Read ){
437 /* IMO this falls more under the category of g.perm.History, but
438 i'm following the original timeline impl here.
439 */
440
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -405,11 +405,11 @@
405 cson_value_free( cson_string_value(tags) );
406 cson_value_free( cson_string_value(isLeaf) );
407 }
408
409 goto end;
410
411 assert( 0 != g.json.resultCode );
412 cson_value_free(pay);
413
414 end:
415 return pay;
@@ -429,11 +429,10 @@
429 cson_array * list = NULL;
430 int check = 0;
431 char showFiles = -1/*magic number*/;
432 Stmt q = empty_Stmt;
433 char warnRowToJsonFailed = 0;
 
434 Blob sql = empty_blob;
435 if( !g.perm.Read ){
436 /* IMO this falls more under the category of g.perm.History, but
437 i'm following the original timeline impl here.
438 */
439
+9 -6
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -163,18 +163,13 @@
163163
/*
164164
** Implementation of /json/wiki/get.
165165
**
166166
*/
167167
static cson_value * json_wiki_get(){
168
- int rid;
169
- Manifest *pWiki = 0;
170
- char const * zBody = NULL;
171168
char const * zPageName;
172169
char const * zFormat = NULL;
173
- char * zUuid = NULL;
174170
char contentFormat = -1;
175
- Stmt q;
176171
if( !g.perm.RdWiki && !g.perm.Read ){
177172
json_set_err(FSL_JSON_E_DENIED,
178173
"Requires 'o' or 'j' access.");
179174
return NULL;
180175
}
@@ -347,10 +342,12 @@
347342
*/
348343
static cson_value * json_wiki_list(){
349344
cson_value * listV = NULL;
350345
cson_array * list = NULL;
351346
Stmt q;
347
+ char const verbose = json_find_option_bool("verbose",NULL,"v",0);
348
+
352349
if( !g.perm.RdWiki && !g.perm.Read ){
353350
json_set_err(FSL_JSON_E_DENIED,
354351
"Requires 'j' or 'o' permissions.");
355352
return NULL;
356353
}
@@ -359,11 +356,17 @@
359356
" FROM tag WHERE tagname GLOB 'wiki-*'"
360357
" ORDER BY lower(name)");
361358
listV = cson_value_new_array();
362359
list = cson_value_get_array(listV);
363360
while( SQLITE_ROW == db_step(&q) ){
364
- cson_value * v = cson_sqlite3_column_to_value(q.pStmt,0);
361
+ cson_value * v;
362
+ if( verbose ){
363
+ char const * name = db_column_text(&q,0);
364
+ v = json_get_wiki_page_by_name(name,0);
365
+ }else{
366
+ v = cson_sqlite3_column_to_value(q.pStmt,0);
367
+ }
365368
if(!v){
366369
json_set_err(FSL_JSON_E_UNKNOWN,
367370
"Could not convert wiki name column to JSON.");
368371
goto error;
369372
}else if( 0 != cson_array_append( list, v ) ){
370373
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -163,18 +163,13 @@
163 /*
164 ** Implementation of /json/wiki/get.
165 **
166 */
167 static cson_value * json_wiki_get(){
168 int rid;
169 Manifest *pWiki = 0;
170 char const * zBody = NULL;
171 char const * zPageName;
172 char const * zFormat = NULL;
173 char * zUuid = NULL;
174 char contentFormat = -1;
175 Stmt q;
176 if( !g.perm.RdWiki && !g.perm.Read ){
177 json_set_err(FSL_JSON_E_DENIED,
178 "Requires 'o' or 'j' access.");
179 return NULL;
180 }
@@ -347,10 +342,12 @@
347 */
348 static cson_value * json_wiki_list(){
349 cson_value * listV = NULL;
350 cson_array * list = NULL;
351 Stmt q;
 
 
352 if( !g.perm.RdWiki && !g.perm.Read ){
353 json_set_err(FSL_JSON_E_DENIED,
354 "Requires 'j' or 'o' permissions.");
355 return NULL;
356 }
@@ -359,11 +356,17 @@
359 " FROM tag WHERE tagname GLOB 'wiki-*'"
360 " ORDER BY lower(name)");
361 listV = cson_value_new_array();
362 list = cson_value_get_array(listV);
363 while( SQLITE_ROW == db_step(&q) ){
364 cson_value * v = cson_sqlite3_column_to_value(q.pStmt,0);
 
 
 
 
 
 
365 if(!v){
366 json_set_err(FSL_JSON_E_UNKNOWN,
367 "Could not convert wiki name column to JSON.");
368 goto error;
369 }else if( 0 != cson_array_append( list, v ) ){
370
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -163,18 +163,13 @@
163 /*
164 ** Implementation of /json/wiki/get.
165 **
166 */
167 static cson_value * json_wiki_get(){
 
 
 
168 char const * zPageName;
169 char const * zFormat = NULL;
 
170 char contentFormat = -1;
 
171 if( !g.perm.RdWiki && !g.perm.Read ){
172 json_set_err(FSL_JSON_E_DENIED,
173 "Requires 'o' or 'j' access.");
174 return NULL;
175 }
@@ -347,10 +342,12 @@
342 */
343 static cson_value * json_wiki_list(){
344 cson_value * listV = NULL;
345 cson_array * list = NULL;
346 Stmt q;
347 char const verbose = json_find_option_bool("verbose",NULL,"v",0);
348
349 if( !g.perm.RdWiki && !g.perm.Read ){
350 json_set_err(FSL_JSON_E_DENIED,
351 "Requires 'j' or 'o' permissions.");
352 return NULL;
353 }
@@ -359,11 +356,17 @@
356 " FROM tag WHERE tagname GLOB 'wiki-*'"
357 " ORDER BY lower(name)");
358 listV = cson_value_new_array();
359 list = cson_value_get_array(listV);
360 while( SQLITE_ROW == db_step(&q) ){
361 cson_value * v;
362 if( verbose ){
363 char const * name = db_column_text(&q,0);
364 v = json_get_wiki_page_by_name(name,0);
365 }else{
366 v = cson_sqlite3_column_to_value(q.pStmt,0);
367 }
368 if(!v){
369 json_set_err(FSL_JSON_E_UNKNOWN,
370 "Could not convert wiki name column to JSON.");
371 goto error;
372 }else if( 0 != cson_array_append( list, v ) ){
373
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -341,10 +341,14 @@
341341
# will run on the platform that is doing the build. This is used
342342
# to compile code-generator programs as part of the build process.
343343
# See TCC below for the C compiler for building the finished binary.
344344
#
345345
BCC = gcc
346
+
347
+#### Enable JSON (http://www.json.org) support using "cson"
348
+#
349
+# FOSSIL_ENABLE_JSON = 1
346350
347351
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
348352
#
349353
# FOSSIL_ENABLE_SSL = 1
350354
@@ -435,11 +439,11 @@
435439
TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
436440
endif
437441
438442
# With JSON support
439443
ifdef FOSSIL_ENABLE_JSON
440
-TCC += -DFOSSIL_ENABLE_JSON
444
+TCC += -DFOSSIL_ENABLE_JSON=1
441445
endif
442446
443447
#### Extra arguments for linking the finished binary. Fossil needs
444448
# to link against the Z-Lib compression library. There are no
445449
# other mandatory dependencies. We add the -static option here
446450
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -341,10 +341,14 @@
341 # will run on the platform that is doing the build. This is used
342 # to compile code-generator programs as part of the build process.
343 # See TCC below for the C compiler for building the finished binary.
344 #
345 BCC = gcc
 
 
 
 
346
347 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
348 #
349 # FOSSIL_ENABLE_SSL = 1
350
@@ -435,11 +439,11 @@
435 TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
436 endif
437
438 # With JSON support
439 ifdef FOSSIL_ENABLE_JSON
440 TCC += -DFOSSIL_ENABLE_JSON
441 endif
442
443 #### Extra arguments for linking the finished binary. Fossil needs
444 # to link against the Z-Lib compression library. There are no
445 # other mandatory dependencies. We add the -static option here
446
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -341,10 +341,14 @@
341 # will run on the platform that is doing the build. This is used
342 # to compile code-generator programs as part of the build process.
343 # See TCC below for the C compiler for building the finished binary.
344 #
345 BCC = gcc
346
347 #### Enable JSON (http://www.json.org) support using "cson"
348 #
349 # FOSSIL_ENABLE_JSON = 1
350
351 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
352 #
353 # FOSSIL_ENABLE_SSL = 1
354
@@ -435,11 +439,11 @@
439 TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
440 endif
441
442 # With JSON support
443 ifdef FOSSIL_ENABLE_JSON
444 TCC += -DFOSSIL_ENABLE_JSON=1
445 endif
446
447 #### Extra arguments for linking the finished binary. Fossil needs
448 # to link against the Z-Lib compression library. There are no
449 # other mandatory dependencies. We add the -static option here
450
+10 -4
--- src/merge3.c
+++ src/merge3.c
@@ -395,25 +395,29 @@
395395
Blob *pV2, /* Version merging from (yours) */
396396
Blob *pOut /* Output written here */
397397
){
398398
Blob v1; /* Content of zV1 */
399399
int rc; /* Return code of subroutines and this routine */
400
+ char *zPivot; /* Name of the pivot file */
401
+ char *zOrig; /* Name of the original content file */
402
+ char *zOther; /* Name of the merge file */
400403
401404
blob_read_from_file(&v1, zV1);
402405
rc = blob_merge(pPivot, &v1, pV2, pOut);
403
- if( rc>0 ){
404
- char *zPivot; /* Name of the pivot file */
405
- char *zOrig; /* Name of the original content file */
406
- char *zOther; /* Name of the merge file */
406
+ if( rc!=0 ){
407407
const char *zGMerge; /* Name of the gmerge command */
408408
409409
zPivot = file_newname(zV1, "baseline", 1);
410410
blob_write_to_file(pPivot, zPivot);
411411
zOrig = file_newname(zV1, "original", 1);
412412
blob_write_to_file(&v1, zOrig);
413413
zOther = file_newname(zV1, "merge", 1);
414414
blob_write_to_file(pV2, zOther);
415
+ }
416
+ if( rc>0 ){
417
+ const char *zGMerge; /* Name of the gmerge command */
418
+
415419
zGMerge = db_get("gmerge-command", 0);
416420
if( zGMerge && zGMerge[0] ){
417421
char *zOut; /* Temporary output file */
418422
char *zCmd; /* Command to invoke */
419423
const char *azSubst[8]; /* Strings to be substituted */
@@ -434,12 +438,14 @@
434438
file_delete(zOut);
435439
}
436440
fossil_free(zCmd);
437441
fossil_free(zOut);
438442
}
443
+ }
444
+ if( rc!=0 ){
439445
fossil_free(zPivot);
440446
fossil_free(zOrig);
441447
fossil_free(zOther);
442448
}
443449
blob_reset(&v1);
444450
return rc;
445451
}
446452
--- src/merge3.c
+++ src/merge3.c
@@ -395,25 +395,29 @@
395 Blob *pV2, /* Version merging from (yours) */
396 Blob *pOut /* Output written here */
397 ){
398 Blob v1; /* Content of zV1 */
399 int rc; /* Return code of subroutines and this routine */
 
 
 
400
401 blob_read_from_file(&v1, zV1);
402 rc = blob_merge(pPivot, &v1, pV2, pOut);
403 if( rc>0 ){
404 char *zPivot; /* Name of the pivot file */
405 char *zOrig; /* Name of the original content file */
406 char *zOther; /* Name of the merge file */
407 const char *zGMerge; /* Name of the gmerge command */
408
409 zPivot = file_newname(zV1, "baseline", 1);
410 blob_write_to_file(pPivot, zPivot);
411 zOrig = file_newname(zV1, "original", 1);
412 blob_write_to_file(&v1, zOrig);
413 zOther = file_newname(zV1, "merge", 1);
414 blob_write_to_file(pV2, zOther);
 
 
 
 
415 zGMerge = db_get("gmerge-command", 0);
416 if( zGMerge && zGMerge[0] ){
417 char *zOut; /* Temporary output file */
418 char *zCmd; /* Command to invoke */
419 const char *azSubst[8]; /* Strings to be substituted */
@@ -434,12 +438,14 @@
434 file_delete(zOut);
435 }
436 fossil_free(zCmd);
437 fossil_free(zOut);
438 }
 
 
439 fossil_free(zPivot);
440 fossil_free(zOrig);
441 fossil_free(zOther);
442 }
443 blob_reset(&v1);
444 return rc;
445 }
446
--- src/merge3.c
+++ src/merge3.c
@@ -395,25 +395,29 @@
395 Blob *pV2, /* Version merging from (yours) */
396 Blob *pOut /* Output written here */
397 ){
398 Blob v1; /* Content of zV1 */
399 int rc; /* Return code of subroutines and this routine */
400 char *zPivot; /* Name of the pivot file */
401 char *zOrig; /* Name of the original content file */
402 char *zOther; /* Name of the merge file */
403
404 blob_read_from_file(&v1, zV1);
405 rc = blob_merge(pPivot, &v1, pV2, pOut);
406 if( rc!=0 ){
 
 
 
407 const char *zGMerge; /* Name of the gmerge command */
408
409 zPivot = file_newname(zV1, "baseline", 1);
410 blob_write_to_file(pPivot, zPivot);
411 zOrig = file_newname(zV1, "original", 1);
412 blob_write_to_file(&v1, zOrig);
413 zOther = file_newname(zV1, "merge", 1);
414 blob_write_to_file(pV2, zOther);
415 }
416 if( rc>0 ){
417 const char *zGMerge; /* Name of the gmerge command */
418
419 zGMerge = db_get("gmerge-command", 0);
420 if( zGMerge && zGMerge[0] ){
421 char *zOut; /* Temporary output file */
422 char *zCmd; /* Command to invoke */
423 const char *azSubst[8]; /* Strings to be substituted */
@@ -434,12 +438,14 @@
438 file_delete(zOut);
439 }
440 fossil_free(zCmd);
441 fossil_free(zOut);
442 }
443 }
444 if( rc!=0 ){
445 fossil_free(zPivot);
446 fossil_free(zOrig);
447 fossil_free(zOther);
448 }
449 blob_reset(&v1);
450 return rc;
451 }
452
+23 -15
--- src/rebuild.c
+++ src/rebuild.c
@@ -424,10 +424,11 @@
424424
if( ttyOutput && !g.fQuiet && totalSize>0 ){
425425
processCnt += incrSize;
426426
percent_complete((processCnt*1000)/totalSize);
427427
}
428428
if(!g.fQuiet && ttyOutput ){
429
+ percent_complete(1000);
429430
fossil_print("\n");
430431
}
431432
return errCnt;
432433
}
433434
@@ -485,10 +486,30 @@
485486
}
486487
db_finalize(&q);
487488
488489
db_end_transaction(0);
489490
}
491
+
492
+
493
+/* Reconstruct the private table. The private table contains the rid
494
+** of every manifest that is tagged with "private" and every file that
495
+** is not used by a manifest that is not private.
496
+*/
497
+static void reconstruct_private_table(void){
498
+ db_multi_exec(
499
+ "CREATE TEMP TABLE private_ckin(rid INTEGER PRIMARY KEY);"
500
+ "INSERT INTO private_ckin "
501
+ " SELECT rid FROM tagxref WHERE tagid=%d AND tagtype>0;"
502
+ "INSERT OR IGNORE INTO private"
503
+ " SELECT fid FROM mlink"
504
+ " EXCEPT SELECT fid FROM mlink WHERE mid NOT IN private_ckin;"
505
+ "INSERT OR IGNORE INTO private SELECT rid FROM private_ckin;"
506
+ "DROP TABLE private_ckin;", TAG_PRIVATE
507
+ );
508
+ fix_private_blob_dependencies(0);
509
+}
510
+
490511
491512
/*
492513
** COMMAND: rebuild
493514
**
494515
** Usage: %fossil rebuild ?REPOSITORY? ?OPTIONS?
@@ -551,10 +572,11 @@
551572
db_open_repository(g.zRepositoryName);
552573
}
553574
db_begin_transaction();
554575
ttyOutput = 1;
555576
errCnt = rebuild_db(randomizeFlag, 1, doClustering);
577
+ reconstruct_private_table();
556578
db_multi_exec(
557579
"REPLACE INTO config(name,value,mtime) VALUES('content-schema','%s',now());"
558580
"REPLACE INTO config(name,value,mtime) VALUES('aux-schema','%s',now());",
559581
CONTENT_SCHEMA, AUX_SCHEMA
560582
);
@@ -881,25 +903,11 @@
881903
fossil_print("Reading files from directory \"%s\"...\n", g.argv[3]);
882904
recon_read_dir(g.argv[3]);
883905
fossil_print("\nBuilding the Fossil repository...\n");
884906
885907
rebuild_db(0, 1, 1);
886
-
887
- /* Reconstruct the private table. The private table contains the rid
888
- ** of every manifest that is tagged with "private" and every file that
889
- ** is not used by a manifest that is not private.
890
- */
891
- db_multi_exec(
892
- "CREATE TEMP TABLE private_ckin(rid INTEGER PRIMARY KEY);"
893
- "INSERT INTO private_ckin "
894
- " SELECT rid FROM tagxref WHERE tagid=%d AND tagtype>0;"
895
- "INSERT OR IGNORE INTO private"
896
- " SELECT fid FROM mlink"
897
- " EXCEPT SELECT fid FROM mlink WHERE mid NOT IN private_ckin;"
898
- "INSERT OR IGNORE INTO private SELECT rid FROM private_ckin;"
899
- "DROP TABLE private_ckin;"
900
- );
908
+ reconstruct_private_table();
901909
902910
/* Skip the verify_before_commit() step on a reconstruct. Most artifacts
903911
** will have been changed and verification therefore takes a really, really
904912
** long time.
905913
*/
906914
--- src/rebuild.c
+++ src/rebuild.c
@@ -424,10 +424,11 @@
424 if( ttyOutput && !g.fQuiet && totalSize>0 ){
425 processCnt += incrSize;
426 percent_complete((processCnt*1000)/totalSize);
427 }
428 if(!g.fQuiet && ttyOutput ){
 
429 fossil_print("\n");
430 }
431 return errCnt;
432 }
433
@@ -485,10 +486,30 @@
485 }
486 db_finalize(&q);
487
488 db_end_transaction(0);
489 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
491 /*
492 ** COMMAND: rebuild
493 **
494 ** Usage: %fossil rebuild ?REPOSITORY? ?OPTIONS?
@@ -551,10 +572,11 @@
551 db_open_repository(g.zRepositoryName);
552 }
553 db_begin_transaction();
554 ttyOutput = 1;
555 errCnt = rebuild_db(randomizeFlag, 1, doClustering);
 
556 db_multi_exec(
557 "REPLACE INTO config(name,value,mtime) VALUES('content-schema','%s',now());"
558 "REPLACE INTO config(name,value,mtime) VALUES('aux-schema','%s',now());",
559 CONTENT_SCHEMA, AUX_SCHEMA
560 );
@@ -881,25 +903,11 @@
881 fossil_print("Reading files from directory \"%s\"...\n", g.argv[3]);
882 recon_read_dir(g.argv[3]);
883 fossil_print("\nBuilding the Fossil repository...\n");
884
885 rebuild_db(0, 1, 1);
886
887 /* Reconstruct the private table. The private table contains the rid
888 ** of every manifest that is tagged with "private" and every file that
889 ** is not used by a manifest that is not private.
890 */
891 db_multi_exec(
892 "CREATE TEMP TABLE private_ckin(rid INTEGER PRIMARY KEY);"
893 "INSERT INTO private_ckin "
894 " SELECT rid FROM tagxref WHERE tagid=%d AND tagtype>0;"
895 "INSERT OR IGNORE INTO private"
896 " SELECT fid FROM mlink"
897 " EXCEPT SELECT fid FROM mlink WHERE mid NOT IN private_ckin;"
898 "INSERT OR IGNORE INTO private SELECT rid FROM private_ckin;"
899 "DROP TABLE private_ckin;"
900 );
901
902 /* Skip the verify_before_commit() step on a reconstruct. Most artifacts
903 ** will have been changed and verification therefore takes a really, really
904 ** long time.
905 */
906
--- src/rebuild.c
+++ src/rebuild.c
@@ -424,10 +424,11 @@
424 if( ttyOutput && !g.fQuiet && totalSize>0 ){
425 processCnt += incrSize;
426 percent_complete((processCnt*1000)/totalSize);
427 }
428 if(!g.fQuiet && ttyOutput ){
429 percent_complete(1000);
430 fossil_print("\n");
431 }
432 return errCnt;
433 }
434
@@ -485,10 +486,30 @@
486 }
487 db_finalize(&q);
488
489 db_end_transaction(0);
490 }
491
492
493 /* Reconstruct the private table. The private table contains the rid
494 ** of every manifest that is tagged with "private" and every file that
495 ** is not used by a manifest that is not private.
496 */
497 static void reconstruct_private_table(void){
498 db_multi_exec(
499 "CREATE TEMP TABLE private_ckin(rid INTEGER PRIMARY KEY);"
500 "INSERT INTO private_ckin "
501 " SELECT rid FROM tagxref WHERE tagid=%d AND tagtype>0;"
502 "INSERT OR IGNORE INTO private"
503 " SELECT fid FROM mlink"
504 " EXCEPT SELECT fid FROM mlink WHERE mid NOT IN private_ckin;"
505 "INSERT OR IGNORE INTO private SELECT rid FROM private_ckin;"
506 "DROP TABLE private_ckin;", TAG_PRIVATE
507 );
508 fix_private_blob_dependencies(0);
509 }
510
511
512 /*
513 ** COMMAND: rebuild
514 **
515 ** Usage: %fossil rebuild ?REPOSITORY? ?OPTIONS?
@@ -551,10 +572,11 @@
572 db_open_repository(g.zRepositoryName);
573 }
574 db_begin_transaction();
575 ttyOutput = 1;
576 errCnt = rebuild_db(randomizeFlag, 1, doClustering);
577 reconstruct_private_table();
578 db_multi_exec(
579 "REPLACE INTO config(name,value,mtime) VALUES('content-schema','%s',now());"
580 "REPLACE INTO config(name,value,mtime) VALUES('aux-schema','%s',now());",
581 CONTENT_SCHEMA, AUX_SCHEMA
582 );
@@ -881,25 +903,11 @@
903 fossil_print("Reading files from directory \"%s\"...\n", g.argv[3]);
904 recon_read_dir(g.argv[3]);
905 fossil_print("\nBuilding the Fossil repository...\n");
906
907 rebuild_db(0, 1, 1);
908 reconstruct_private_table();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
909
910 /* Skip the verify_before_commit() step on a reconstruct. Most artifacts
911 ** will have been changed and verification therefore takes a really, really
912 ** long time.
913 */
914
--- src/report.c
+++ src/report.c
@@ -19,13 +19,10 @@
1919
*/
2020
#include "config.h"
2121
#include <time.h>
2222
#include "report.h"
2323
#include <assert.h>
24
-#ifdef FOSSIL_ENABLE_JSON
25
-# include "cson_amalgamation.h"
26
-#endif
2724
2825
/* Forward references to static routines */
2926
static void report_format_hints(void);
3027
3128
/*
3229
--- src/report.c
+++ src/report.c
@@ -19,13 +19,10 @@
19 */
20 #include "config.h"
21 #include <time.h>
22 #include "report.h"
23 #include <assert.h>
24 #ifdef FOSSIL_ENABLE_JSON
25 # include "cson_amalgamation.h"
26 #endif
27
28 /* Forward references to static routines */
29 static void report_format_hints(void);
30
31 /*
32
--- src/report.c
+++ src/report.c
@@ -19,13 +19,10 @@
19 */
20 #include "config.h"
21 #include <time.h>
22 #include "report.h"
23 #include <assert.h>
 
 
 
24
25 /* Forward references to static routines */
26 static void report_format_hints(void);
27
28 /*
29
--- src/timeline.c
+++ src/timeline.c
@@ -20,13 +20,10 @@
2020
*/
2121
#include <string.h>
2222
#include <time.h>
2323
#include "config.h"
2424
#include "timeline.h"
25
-#ifdef FOSSIL_ENABLE_JSON
26
-# include "cson_amalgamation.h"
27
-#endif
2825
2926
/*
3027
** Shorten a UUID so that is the minimum length needed to contain
3128
** at least one digit in the range 'a'..'f'. The minimum length is 10.
3229
*/
3330
--- src/timeline.c
+++ src/timeline.c
@@ -20,13 +20,10 @@
20 */
21 #include <string.h>
22 #include <time.h>
23 #include "config.h"
24 #include "timeline.h"
25 #ifdef FOSSIL_ENABLE_JSON
26 # include "cson_amalgamation.h"
27 #endif
28
29 /*
30 ** Shorten a UUID so that is the minimum length needed to contain
31 ** at least one digit in the range 'a'..'f'. The minimum length is 10.
32 */
33
--- src/timeline.c
+++ src/timeline.c
@@ -20,13 +20,10 @@
20 */
21 #include <string.h>
22 #include <time.h>
23 #include "config.h"
24 #include "timeline.h"
 
 
 
25
26 /*
27 ** Shorten a UUID so that is the minimum length needed to contain
28 ** at least one digit in the range 'a'..'f'. The minimum length is 10.
29 */
30
--- src/timeline.c
+++ src/timeline.c
@@ -20,13 +20,10 @@
2020
*/
2121
#include <string.h>
2222
#include <time.h>
2323
#include "config.h"
2424
#include "timeline.h"
25
-#ifdef FOSSIL_ENABLE_JSON
26
-# include "cson_amalgamation.h"
27
-#endif
2825
2926
/*
3027
** Shorten a UUID so that is the minimum length needed to contain
3128
** at least one digit in the range 'a'..'f'. The minimum length is 10.
3229
*/
3330
--- src/timeline.c
+++ src/timeline.c
@@ -20,13 +20,10 @@
20 */
21 #include <string.h>
22 #include <time.h>
23 #include "config.h"
24 #include "timeline.h"
25 #ifdef FOSSIL_ENABLE_JSON
26 # include "cson_amalgamation.h"
27 #endif
28
29 /*
30 ** Shorten a UUID so that is the minimum length needed to contain
31 ** at least one digit in the range 'a'..'f'. The minimum length is 10.
32 */
33
--- src/timeline.c
+++ src/timeline.c
@@ -20,13 +20,10 @@
20 */
21 #include <string.h>
22 #include <time.h>
23 #include "config.h"
24 #include "timeline.h"
 
 
 
25
26 /*
27 ** Shorten a UUID so that is the minimum length needed to contain
28 ** at least one digit in the range 'a'..'f'. The minimum length is 10.
29 */
30
+1 -1
--- src/update.c
+++ src/update.c
@@ -474,11 +474,11 @@
474474
if( nConflict ){
475475
if( internalUpdate ){
476476
internalConflictCnt = nConflict;
477477
nConflict = 0;
478478
}else{
479
- fossil_print("WARNING: %d merge conflicts", nConflict);
479
+ fossil_warning("WARNING: %d merge conflicts", nConflict);
480480
}
481481
}
482482
if( nOverwrite ){
483483
fossil_warning("WARNING: %d unmanaged files were overwritten",
484484
nOverwrite);
485485
--- src/update.c
+++ src/update.c
@@ -474,11 +474,11 @@
474 if( nConflict ){
475 if( internalUpdate ){
476 internalConflictCnt = nConflict;
477 nConflict = 0;
478 }else{
479 fossil_print("WARNING: %d merge conflicts", nConflict);
480 }
481 }
482 if( nOverwrite ){
483 fossil_warning("WARNING: %d unmanaged files were overwritten",
484 nOverwrite);
485
--- src/update.c
+++ src/update.c
@@ -474,11 +474,11 @@
474 if( nConflict ){
475 if( internalUpdate ){
476 internalConflictCnt = nConflict;
477 nConflict = 0;
478 }else{
479 fossil_warning("WARNING: %d merge conflicts", nConflict);
480 }
481 }
482 if( nOverwrite ){
483 fossil_warning("WARNING: %d unmanaged files were overwritten",
484 nOverwrite);
485
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -24,10 +24,14 @@
2424
# will run on the platform that is doing the build. This is used
2525
# to compile code-generator programs as part of the build process.
2626
# See TCC below for the C compiler for building the finished binary.
2727
#
2828
BCC = gcc
29
+
30
+#### Enable JSON (http://www.json.org) support using "cson"
31
+#
32
+# FOSSIL_ENABLE_JSON = 1
2933
3034
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
3135
#
3236
# FOSSIL_ENABLE_SSL = 1
3337
@@ -118,11 +122,11 @@
118122
TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
119123
endif
120124
121125
# With JSON support
122126
ifdef FOSSIL_ENABLE_JSON
123
-TCC += -DFOSSIL_ENABLE_JSON
127
+TCC += -DFOSSIL_ENABLE_JSON=1
124128
endif
125129
126130
#### Extra arguments for linking the finished binary. Fossil needs
127131
# to link against the Z-Lib compression library. There are no
128132
# other mandatory dependencies. We add the -static option here
129133
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -24,10 +24,14 @@
24 # will run on the platform that is doing the build. This is used
25 # to compile code-generator programs as part of the build process.
26 # See TCC below for the C compiler for building the finished binary.
27 #
28 BCC = gcc
 
 
 
 
29
30 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
31 #
32 # FOSSIL_ENABLE_SSL = 1
33
@@ -118,11 +122,11 @@
118 TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
119 endif
120
121 # With JSON support
122 ifdef FOSSIL_ENABLE_JSON
123 TCC += -DFOSSIL_ENABLE_JSON
124 endif
125
126 #### Extra arguments for linking the finished binary. Fossil needs
127 # to link against the Z-Lib compression library. There are no
128 # other mandatory dependencies. We add the -static option here
129
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -24,10 +24,14 @@
24 # will run on the platform that is doing the build. This is used
25 # to compile code-generator programs as part of the build process.
26 # See TCC below for the C compiler for building the finished binary.
27 #
28 BCC = gcc
29
30 #### Enable JSON (http://www.json.org) support using "cson"
31 #
32 # FOSSIL_ENABLE_JSON = 1
33
34 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
35 #
36 # FOSSIL_ENABLE_SSL = 1
37
@@ -118,11 +122,11 @@
122 TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
123 endif
124
125 # With JSON support
126 ifdef FOSSIL_ENABLE_JSON
127 TCC += -DFOSSIL_ENABLE_JSON=1
128 endif
129
130 #### Extra arguments for linking the finished binary. Fossil needs
131 # to link against the Z-Lib compression library. There are no
132 # other mandatory dependencies. We add the -static option here
133
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -24,10 +24,14 @@
2424
# will run on the platform that is doing the build. This is used
2525
# to compile code-generator programs as part of the build process.
2626
# See TCC below for the C compiler for building the finished binary.
2727
#
2828
BCC = gcc
29
+
30
+#### Enable JSON (http://www.json.org) support using "cson"
31
+#
32
+FOSSIL_ENABLE_JSON = 1
2933
3034
#### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
3135
#
3236
FOSSIL_ENABLE_SSL = 1
3337
@@ -115,10 +119,15 @@
115119
116120
# With Tcl support (statically linked)
117121
ifdef FOSSIL_ENABLE_TCL
118122
TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
119123
endif
124
+
125
+# With JSON support
126
+ifdef FOSSIL_ENABLE_JSON
127
+TCC += -DFOSSIL_ENABLE_JSON=1
128
+endif
120129
121130
#### Extra arguments for linking the finished binary. Fossil needs
122131
# to link against the Z-Lib compression library. There are no
123132
# other mandatory dependencies. We add the -static option here
124133
# so that we can build a static executable that will run in a
@@ -204,10 +213,11 @@
204213
$(SRCDIR)/import.c \
205214
$(SRCDIR)/info.c \
206215
$(SRCDIR)/json.c \
207216
$(SRCDIR)/json_artifact.c \
208217
$(SRCDIR)/json_branch.c \
218
+ $(SRCDIR)/json_config.c \
209219
$(SRCDIR)/json_diff.c \
210220
$(SRCDIR)/json_login.c \
211221
$(SRCDIR)/json_query.c \
212222
$(SRCDIR)/json_report.c \
213223
$(SRCDIR)/json_tag.c \
@@ -300,10 +310,11 @@
300310
$(OBJDIR)/import_.c \
301311
$(OBJDIR)/info_.c \
302312
$(OBJDIR)/json_.c \
303313
$(OBJDIR)/json_artifact_.c \
304314
$(OBJDIR)/json_branch_.c \
315
+ $(OBJDIR)/json_config_.c \
305316
$(OBJDIR)/json_diff_.c \
306317
$(OBJDIR)/json_login_.c \
307318
$(OBJDIR)/json_query_.c \
308319
$(OBJDIR)/json_report_.c \
309320
$(OBJDIR)/json_tag_.c \
@@ -396,10 +407,11 @@
396407
$(OBJDIR)/import.o \
397408
$(OBJDIR)/info.o \
398409
$(OBJDIR)/json.o \
399410
$(OBJDIR)/json_artifact.o \
400411
$(OBJDIR)/json_branch.o \
412
+ $(OBJDIR)/json_config.o \
401413
$(OBJDIR)/json_diff.o \
402414
$(OBJDIR)/json_login.o \
403415
$(OBJDIR)/json_query.o \
404416
$(OBJDIR)/json_report.o \
405417
$(OBJDIR)/json_tag.o \
@@ -519,11 +531,11 @@
519531
520532
521533
$(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
522534
$(MKINDEX) $(TRANS_SRC) >$@
523535
$(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
524
- $(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_diff_.c:$(OBJDIR)/json_diff.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_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)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.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)/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)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.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)/winhttp_.c:$(OBJDIR)/winhttp.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
536
+ $(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_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.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)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.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)/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)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.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)/winhttp_.c:$(OBJDIR)/winhttp.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
525537
echo Done >$(OBJDIR)/headers
526538
527539
$(OBJDIR)/headers: Makefile
528540
Makefile:
529541
$(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -811,10 +823,17 @@
811823
812824
$(OBJDIR)/json_branch.o: $(OBJDIR)/json_branch_.c $(OBJDIR)/json_branch.h $(SRCDIR)/config.h
813825
$(XTCC) -o $(OBJDIR)/json_branch.o -c $(OBJDIR)/json_branch_.c
814826
815827
json_branch.h: $(OBJDIR)/headers
828
+$(OBJDIR)/json_config_.c: $(SRCDIR)/json_config.c $(OBJDIR)/translate
829
+ $(TRANSLATE) $(SRCDIR)/json_config.c >$(OBJDIR)/json_config_.c
830
+
831
+$(OBJDIR)/json_config.o: $(OBJDIR)/json_config_.c $(OBJDIR)/json_config.h $(SRCDIR)/config.h
832
+ $(XTCC) -o $(OBJDIR)/json_config.o -c $(OBJDIR)/json_config_.c
833
+
834
+json_config.h: $(OBJDIR)/headers
816835
$(OBJDIR)/json_diff_.c: $(SRCDIR)/json_diff.c $(OBJDIR)/translate
817836
$(TRANSLATE) $(SRCDIR)/json_diff.c >$(OBJDIR)/json_diff_.c
818837
819838
$(OBJDIR)/json_diff.o: $(OBJDIR)/json_diff_.c $(OBJDIR)/json_diff.h $(SRCDIR)/config.h
820839
$(XTCC) -o $(OBJDIR)/json_diff.o -c $(OBJDIR)/json_diff_.c
@@ -1188,11 +1207,11 @@
11881207
$(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
11891208
11901209
$(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
11911210
$(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o -DCSON_FOSSIL_MODE
11921211
1193
-$(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1212
+$(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
11941213
11951214
$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
11961215
$(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
11971216
11981217
$(OBJDIR)/th.o: $(SRCDIR)/th.c
11991218
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -24,10 +24,14 @@
24 # will run on the platform that is doing the build. This is used
25 # to compile code-generator programs as part of the build process.
26 # See TCC below for the C compiler for building the finished binary.
27 #
28 BCC = gcc
 
 
 
 
29
30 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
31 #
32 FOSSIL_ENABLE_SSL = 1
33
@@ -115,10 +119,15 @@
115
116 # With Tcl support (statically linked)
117 ifdef FOSSIL_ENABLE_TCL
118 TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
119 endif
 
 
 
 
 
120
121 #### Extra arguments for linking the finished binary. Fossil needs
122 # to link against the Z-Lib compression library. There are no
123 # other mandatory dependencies. We add the -static option here
124 # so that we can build a static executable that will run in a
@@ -204,10 +213,11 @@
204 $(SRCDIR)/import.c \
205 $(SRCDIR)/info.c \
206 $(SRCDIR)/json.c \
207 $(SRCDIR)/json_artifact.c \
208 $(SRCDIR)/json_branch.c \
 
209 $(SRCDIR)/json_diff.c \
210 $(SRCDIR)/json_login.c \
211 $(SRCDIR)/json_query.c \
212 $(SRCDIR)/json_report.c \
213 $(SRCDIR)/json_tag.c \
@@ -300,10 +310,11 @@
300 $(OBJDIR)/import_.c \
301 $(OBJDIR)/info_.c \
302 $(OBJDIR)/json_.c \
303 $(OBJDIR)/json_artifact_.c \
304 $(OBJDIR)/json_branch_.c \
 
305 $(OBJDIR)/json_diff_.c \
306 $(OBJDIR)/json_login_.c \
307 $(OBJDIR)/json_query_.c \
308 $(OBJDIR)/json_report_.c \
309 $(OBJDIR)/json_tag_.c \
@@ -396,10 +407,11 @@
396 $(OBJDIR)/import.o \
397 $(OBJDIR)/info.o \
398 $(OBJDIR)/json.o \
399 $(OBJDIR)/json_artifact.o \
400 $(OBJDIR)/json_branch.o \
 
401 $(OBJDIR)/json_diff.o \
402 $(OBJDIR)/json_login.o \
403 $(OBJDIR)/json_query.o \
404 $(OBJDIR)/json_report.o \
405 $(OBJDIR)/json_tag.o \
@@ -519,11 +531,11 @@
519
520
521 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
522 $(MKINDEX) $(TRANS_SRC) >$@
523 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
524 $(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_diff_.c:$(OBJDIR)/json_diff.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_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)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.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)/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)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.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)/winhttp_.c:$(OBJDIR)/winhttp.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
525 echo Done >$(OBJDIR)/headers
526
527 $(OBJDIR)/headers: Makefile
528 Makefile:
529 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -811,10 +823,17 @@
811
812 $(OBJDIR)/json_branch.o: $(OBJDIR)/json_branch_.c $(OBJDIR)/json_branch.h $(SRCDIR)/config.h
813 $(XTCC) -o $(OBJDIR)/json_branch.o -c $(OBJDIR)/json_branch_.c
814
815 json_branch.h: $(OBJDIR)/headers
 
 
 
 
 
 
 
816 $(OBJDIR)/json_diff_.c: $(SRCDIR)/json_diff.c $(OBJDIR)/translate
817 $(TRANSLATE) $(SRCDIR)/json_diff.c >$(OBJDIR)/json_diff_.c
818
819 $(OBJDIR)/json_diff.o: $(OBJDIR)/json_diff_.c $(OBJDIR)/json_diff.h $(SRCDIR)/config.h
820 $(XTCC) -o $(OBJDIR)/json_diff.o -c $(OBJDIR)/json_diff_.c
@@ -1188,11 +1207,11 @@
1188 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1189
1190 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
1191 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o -DCSON_FOSSIL_MODE
1192
1193 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1194
1195 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1196 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1197
1198 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1199
--- win/Makefile.mingw.mistachkin
+++ win/Makefile.mingw.mistachkin
@@ -24,10 +24,14 @@
24 # will run on the platform that is doing the build. This is used
25 # to compile code-generator programs as part of the build process.
26 # See TCC below for the C compiler for building the finished binary.
27 #
28 BCC = gcc
29
30 #### Enable JSON (http://www.json.org) support using "cson"
31 #
32 FOSSIL_ENABLE_JSON = 1
33
34 #### Enable HTTPS support via OpenSSL (links to libssl and libcrypto)
35 #
36 FOSSIL_ENABLE_SSL = 1
37
@@ -115,10 +119,15 @@
119
120 # With Tcl support (statically linked)
121 ifdef FOSSIL_ENABLE_TCL
122 TCC += -DFOSSIL_ENABLE_TCL=1 -DSTATIC_BUILD
123 endif
124
125 # With JSON support
126 ifdef FOSSIL_ENABLE_JSON
127 TCC += -DFOSSIL_ENABLE_JSON=1
128 endif
129
130 #### Extra arguments for linking the finished binary. Fossil needs
131 # to link against the Z-Lib compression library. There are no
132 # other mandatory dependencies. We add the -static option here
133 # so that we can build a static executable that will run in a
@@ -204,10 +213,11 @@
213 $(SRCDIR)/import.c \
214 $(SRCDIR)/info.c \
215 $(SRCDIR)/json.c \
216 $(SRCDIR)/json_artifact.c \
217 $(SRCDIR)/json_branch.c \
218 $(SRCDIR)/json_config.c \
219 $(SRCDIR)/json_diff.c \
220 $(SRCDIR)/json_login.c \
221 $(SRCDIR)/json_query.c \
222 $(SRCDIR)/json_report.c \
223 $(SRCDIR)/json_tag.c \
@@ -300,10 +310,11 @@
310 $(OBJDIR)/import_.c \
311 $(OBJDIR)/info_.c \
312 $(OBJDIR)/json_.c \
313 $(OBJDIR)/json_artifact_.c \
314 $(OBJDIR)/json_branch_.c \
315 $(OBJDIR)/json_config_.c \
316 $(OBJDIR)/json_diff_.c \
317 $(OBJDIR)/json_login_.c \
318 $(OBJDIR)/json_query_.c \
319 $(OBJDIR)/json_report_.c \
320 $(OBJDIR)/json_tag_.c \
@@ -396,10 +407,11 @@
407 $(OBJDIR)/import.o \
408 $(OBJDIR)/info.o \
409 $(OBJDIR)/json.o \
410 $(OBJDIR)/json_artifact.o \
411 $(OBJDIR)/json_branch.o \
412 $(OBJDIR)/json_config.o \
413 $(OBJDIR)/json_diff.o \
414 $(OBJDIR)/json_login.o \
415 $(OBJDIR)/json_query.o \
416 $(OBJDIR)/json_report.o \
417 $(OBJDIR)/json_tag.o \
@@ -519,11 +531,11 @@
531
532
533 $(OBJDIR)/page_index.h: $(TRANS_SRC) $(OBJDIR)/mkindex
534 $(MKINDEX) $(TRANS_SRC) >$@
535 $(OBJDIR)/headers: $(OBJDIR)/page_index.h $(OBJDIR)/makeheaders $(OBJDIR)/VERSION.h
536 $(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_login_.c:$(OBJDIR)/json_login.h $(OBJDIR)/json_query_.c:$(OBJDIR)/json_query.h $(OBJDIR)/json_report_.c:$(OBJDIR)/json_report.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)/main_.c:$(OBJDIR)/main.h $(OBJDIR)/manifest_.c:$(OBJDIR)/manifest.h $(OBJDIR)/md5_.c:$(OBJDIR)/md5.h $(OBJDIR)/merge_.c:$(OBJDIR)/merge.h $(OBJDIR)/merge3_.c:$(OBJDIR)/merge3.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)/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)/update_.c:$(OBJDIR)/update.h $(OBJDIR)/url_.c:$(OBJDIR)/url.h $(OBJDIR)/user_.c:$(OBJDIR)/user.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)/winhttp_.c:$(OBJDIR)/winhttp.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
537 echo Done >$(OBJDIR)/headers
538
539 $(OBJDIR)/headers: Makefile
540 Makefile:
541 $(OBJDIR)/add_.c: $(SRCDIR)/add.c $(OBJDIR)/translate
@@ -811,10 +823,17 @@
823
824 $(OBJDIR)/json_branch.o: $(OBJDIR)/json_branch_.c $(OBJDIR)/json_branch.h $(SRCDIR)/config.h
825 $(XTCC) -o $(OBJDIR)/json_branch.o -c $(OBJDIR)/json_branch_.c
826
827 json_branch.h: $(OBJDIR)/headers
828 $(OBJDIR)/json_config_.c: $(SRCDIR)/json_config.c $(OBJDIR)/translate
829 $(TRANSLATE) $(SRCDIR)/json_config.c >$(OBJDIR)/json_config_.c
830
831 $(OBJDIR)/json_config.o: $(OBJDIR)/json_config_.c $(OBJDIR)/json_config.h $(SRCDIR)/config.h
832 $(XTCC) -o $(OBJDIR)/json_config.o -c $(OBJDIR)/json_config_.c
833
834 json_config.h: $(OBJDIR)/headers
835 $(OBJDIR)/json_diff_.c: $(SRCDIR)/json_diff.c $(OBJDIR)/translate
836 $(TRANSLATE) $(SRCDIR)/json_diff.c >$(OBJDIR)/json_diff_.c
837
838 $(OBJDIR)/json_diff.o: $(OBJDIR)/json_diff_.c $(OBJDIR)/json_diff.h $(SRCDIR)/config.h
839 $(XTCC) -o $(OBJDIR)/json_diff.o -c $(OBJDIR)/json_diff_.c
@@ -1188,11 +1207,11 @@
1207 $(XTCC) -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_THREADSAFE=0 -DSQLITE_DEFAULT_FILE_FORMAT=4 -DSQLITE_ENABLE_STAT3 -Dlocaltime=fossil_localtime -DSQLITE_ENABLE_LOCKING_STYLE=0 -c $(SRCDIR)/sqlite3.c -o $(OBJDIR)/sqlite3.o
1208
1209 $(OBJDIR)/cson_amalgamation.o: $(SRCDIR)/cson_amalgamation.c
1210 $(XTCC) -c $(SRCDIR)/cson_amalgamation.c -o $(OBJDIR)/cson_amalgamation.o -DCSON_FOSSIL_MODE
1211
1212 $(OBJDIR)/json.o $(OBJDIR)/json_artifact.o $(OBJDIR)/json_branch.o $(OBJDIR)/json_config.o $(OBJDIR)/json_diff.o $(OBJDIR)/json_login.o $(OBJDIR)/json_query.o $(OBJDIR)/json_report.o $(OBJDIR)/json_tag.o $(OBJDIR)/json_timeline.o $(OBJDIR)/json_user.o $(OBJDIR)/json_wiki.o : $(SRCDIR)/json_detail.h
1213
1214 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1215 $(XTCC) -Dmain=sqlite3_shell -DSQLITE_OMIT_LOAD_EXTENSION=1 -c $(SRCDIR)/shell.c -o $(OBJDIR)/shell.o
1216
1217 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1218
+92 -98
--- www/stats.wiki
+++ www/stats.wiki
@@ -2,13 +2,14 @@
22
<h1 align="center">Performance Statistics</h1>
33
44
The questions will inevitably arise: How does Fossil perform?
55
Does it use a lot of disk space or bandwidth? Is it scalable?
66
7
-In an attempt to answers these questions, this report looks at five
7
+In an attempt to answers these questions, this report looks at several
88
projects that use fossil for configuration management and examines how
99
well they are working. The following table is a summary of the results.
10
+(Last updated on 2012-02-26.)
1011
Explanation and analysis follows the table.
1112
1213
<table border=1>
1314
<tr>
1415
<th>Project</th>
@@ -21,122 +22,113 @@
2122
<th>Compression Ratio</th>
2223
<th>Clone Bandwidth</th>
2324
</tr>
2425
2526
<tr align="center">
26
-<td>SQLite
27
-<td>28643
28
-<td>6755
29
-<td>3373&nbsp;days<br>9.24&nbsp;yrs
30
-<td>2.00
31
-<td>1.27&nbsp;GB
32
-<td>35.4&nbsp;MB
33
-<td>35:1
34
-<td>982&nbsp;KB&nbsp;up<br>12.4&nbsp;MB&nbsp;down
35
-</tr>
36
-
37
-<tr align="center">
38
-<td>Fossil
39
-<td>4981
40
-<td>1272
41
-<td>764&nbsp;days<br>2.1&nbsp;yrs
42
-<td>1.66
43
-<td>144&nbsp;MB
44
-<td>8.74&nbsp;MB
45
-<td>16:1
46
-<td>128&nbsp;KB&nbsp;up<br>4.49&nbsp;MB&nbsp;down
47
-</tr>
48
-
49
-<tr align="center">
50
-<td>SLT
51
-<td>2062
52
-<td>67
53
-<td>266&nbsp;days
54
-<td>0.25
55
-<td>1.76&nbsp;GB
56
-<td>147&nbsp;MB
57
-<td>11:1
58
-<td>1.1&nbsp;MB&nbsp;up<br>141&nbsp;MB&nbsp;down
59
-</tr>
60
-
61
-<tr align="center">
62
-<td>TH3
63
-<td>1999
64
-<td>429
65
-<td>331&nbsp;days
66
-<td>1.30
67
-<td>70.5&nbsp;MB
68
-<td>6.3&nbsp;MB
69
-<td>11:1
70
-<td>55&nbsp;KB&nbsp;up<br>4.66&nbsp;MB&nbsp;down
71
-</tr>
72
-
73
-<tr align="center">
74
-<td>SQLite Docs
75
-<td>1787
76
-<td>444
77
-<td>650&nbsp;days<br>1.78&nbsp;yrs
78
-<td>0.68
79
-<td>43&nbsp;MB
80
-<td>4.9&nbsp;MB
81
-<td>8:1
82
-<td>46&nbsp;KB&nbsp;up<br>3.35&nbsp;MB&nbsp;down
27
+<td>[http://www.sqlite.org/src/timeline | SQLite]
28
+<td>41113
29
+<td>9943
30
+<td>4290&nbsp;days<br>11.75&nbsp;yrs
31
+<td>2.32
32
+<td>2.09&nbsp;GB
33
+<td>33.2&nbsp;MB
34
+<td>63:1
35
+<td>23.2&nbsp;MB
36
+</tr>
37
+
38
+<tr align="center">
39
+<td>[http://core.tcl.tk/tcl/timeline | TCL]
40
+<td>74806
41
+<td>13541
42
+<td>5085&nbsp;days<br>13.92&nbsp;yrs
43
+<td>2.66
44
+<td>5.2&nbsp;GB
45
+<td>86&nbsp;MB
46
+<td>60:1
47
+<td>67.0&nbsp;MB
48
+</tr>
49
+
50
+<tr align="center">
51
+<td>[/timeline | Fossil]
52
+<td>15561
53
+<td>3764
54
+<td>1681&nbsp;days<br>4.6&nbsp;yrs
55
+<td>2.24
56
+<td>721&nbsp;MB
57
+<td>18.8&nbsp;MB
58
+<td>38:1
59
+<td>12.0&nbsp;MB
60
+</tr>
61
+
62
+<tr align="center">
63
+<td>[http://www.sqlite.org/slt/timeline | SLT]
64
+<td>2174
65
+<td>100
66
+<td>1183&nbsp;days<br>3.24&nbsp;yrs
67
+<td>0.08
68
+<td>1.94&nbsp;GB
69
+<td>143&nbsp;MB
70
+<td>12:1
71
+<td>141&nbsp;MB
72
+</tr>
73
+
74
+<tr align="center">
75
+<td>[http://www.sqlite.org/th3.html | TH3]
76
+<td>5624
77
+<td>1472
78
+<td>1248&nbsp;days<br>3.42&nbsp;yrs
79
+<td>1.78
80
+<td>252&nbsp;MB
81
+<td>12.5&nbsp;MB
82
+<td>20:1
83
+<td>12.2&nbsp;MB
84
+</tr>
85
+
86
+<tr align="center">
87
+<td>[http://www.sqlite.org/docsrc/timeline | SQLite Docs]
88
+<td>3664
89
+<td>1003
90
+<td>1567&nbsp;days<br>4.29&nbsp;yrs
91
+<td>0.64
92
+<td>108&nbsp;MB
93
+<td>6.6&nbsp;MB
94
+<td>16:1
95
+<td>5.71&nbsp;MB
8396
</tr>
8497
8598
</table>
8699
87
-<h2>The Five Projects</h2>
88
-
89
-The five projects listed above were chosen because they have been in
90
-existance for a long time (relative to the age of fossil) or because
91
-they have larges amounts of content. The most important project using
92
-fossil is SQLite. Fossil itself
93
-is built on top of SQLite and so obviously SQLite has to predate fossil.
94
-SQLite was originally versioned using CVS, but recently the entire 9-year
95
-and 320-MB CVS history of SQLite was converted over to Fossil. This is
96
-an important datapoint because it demonstrates fossil's ability to manage
97
-a significant and long-running project.
98
-The next-longest running fossil project is fossil itself, at 2.1 years.
99
-The documentation for SQLite
100
-(identified above as "SQLite Docs") was split off of the main SQLite
101
-source tree and into its own fossil repository about 1.75 years ago.
102
-The "SQL Logic Test" or "SLT" project is a massive
103
-collection of SQL statements and their output used to compare the
104
-processing of SQLite against MySQL, PostgreSQL, Microsoft SQL Server,
105
-and Oracle.
106
-Finally "TH3" is a proprietary set of test cases for SQLite used to give
107
-100% branch test coverage of SQLite on embedded platforms. All projects
108
-except for TH3 are open-source.
109
-
110100
<h2>Measured Attributes</h2>
111101
112
-In fossil, every version of every file, every wiki page, every change to
102
+In Fossil, every version of every file, every wiki page, every change to
113103
every ticket, and every check-in is a separate "artifact". One way to
114
-think of a fossil project is as a bag of artifacts. Of course, there is
115
-a lot more than this going on in fossil. Many of the artifacts have meaning
104
+think of a Fossil project is as a bag of artifacts. Of course, there is
105
+a lot more than this going on in Fossil. Many of the artifacts have meaning
116106
and are related to other artifacts. But at a low level (for example when
117107
synchronizing two instances of the same project) the only thing that matters
118108
is the unordered collection of artifacts. In fact, one of the key
119
-characteristics of fossil is that the entire project history can be
109
+characteristics of Fossil is that the entire project history can be
120110
reconstructed simply by scanning the artifacts in an arbitrary order.
121111
122112
The number of check-ins is the number of times that the "commit" command
123113
has been run. A single check-in might change a 3 or 4 files, or it might
124
-change several dozen different files. Regardless of the number of files
114
+change dozens or hundreds of files. Regardless of the number of files
125115
changed, it still only counts as one check-in.
126116
127117
The "Uncompressed Size" is the total size of all the artifacts within
128
-the fossil repository assuming they were all uncompressed and stored
118
+the repository assuming they were all uncompressed and stored
129119
separately on the disk. Fossil makes use of delta compression between related
130120
versions of the same file, and then uses zlib compression on the resulting
131121
deltas. The total resulting repository size is shown after the uncompressed
132
-size.
122
+size. For this chart, "fossil rebuild --compress" was run on each repository
123
+prior to measuring its compressed size. Repository sizes would typically
124
+be 20% larger without that rebuild.
133125
134126
On the right end of the table, we show the "Clone Bandwidth". This is the
135
-total number of bytes sent from client to server ("uplink") and from server
136
-back to client ("downlink") in order to clone a repository. These byte counts
137
-include HTTP protocol overhead.
127
+total number of bytes sent from server back to the client. The number of
128
+bytes sent from client to server is neglible in comparison.
129
+These byte counts include HTTP protocol overhead.
138130
139131
In the table and throughout this article,
140132
"GB" means gigabytes (10<sup><small>9</small></sup> bytes)
141133
not <a href="http://en.wikipedia.org/wiki/Gibibyte">gibibytes</a>
142134
(2<sup><small>30</small></sup> bytes). Similarly, "MB" and "KB"
@@ -144,22 +136,24 @@
144136
145137
<h2>Analysis And Supplimental Data</h2>
146138
147139
Perhaps the two most interesting datapoints in the above table are SQLite
148140
and SLT. SQLite is a long-running project with long revision chains.
149
-Some of the files in SQLite have been edited close to a thousand times.
141
+Some of the files in SQLite have been edited over a thousand times.
150142
Each of these edits is stored as a delta, and hence the SQLite project
151
-gets excellent 35:1 compression. SLT, on the other hand, consists of
143
+gets excellent 63:1 compression. SLT, on the other hand, consists of
152144
many large (megabyte-sized) SQL scripts that have one or maybe two
153
-versions. There is very little delta compression occurring and so the
145
+edits each. There is very little delta compression occurring and so the
154146
overall repository compression ratio is much lower. Note also that
155147
quite a bit more bandwidth is required to clone SLT than SQLite.
156148
157149
For the first nine years of its development, SQLite was versioned by CVS.
158150
The resulting CVS repository measured over 320MB in size. So, the
159
-developers were
160
-pleasently surprised to see that this entire project could be cloned in
161
-fossil using only about 13MB of network traffic. The "sync" protocol
151
+developers were surprised to see that this entire project could be cloned in
152
+fossil using only about 23.2MB of network traffic. (This 23.2MB includes
153
+all the changes to SQLite that have been made since the conversion from
154
+CVS. Of those changes are omitted, the clone bandwidth drops to 13MB.)
155
+The "sync" protocol
162156
used by fossil has turned out to be surprisingly efficient. A typical
163157
check-in on SQLite might use 3 or 4KB of network bandwidth total. Hardly
164158
worth measuring. The sync protocol is efficient enough that, once cloned,
165
-fossil could easily be used over a dial-up connection.
159
+Fossil could easily be used over a dial-up connection.
166160
--- www/stats.wiki
+++ www/stats.wiki
@@ -2,13 +2,14 @@
2 <h1 align="center">Performance Statistics</h1>
3
4 The questions will inevitably arise: How does Fossil perform?
5 Does it use a lot of disk space or bandwidth? Is it scalable?
6
7 In an attempt to answers these questions, this report looks at five
8 projects that use fossil for configuration management and examines how
9 well they are working. The following table is a summary of the results.
 
10 Explanation and analysis follows the table.
11
12 <table border=1>
13 <tr>
14 <th>Project</th>
@@ -21,122 +22,113 @@
21 <th>Compression Ratio</th>
22 <th>Clone Bandwidth</th>
23 </tr>
24
25 <tr align="center">
26 <td>SQLite
27 <td>28643
28 <td>6755
29 <td>3373&nbsp;days<br>9.24&nbsp;yrs
30 <td>2.00
31 <td>1.27&nbsp;GB
32 <td>35.4&nbsp;MB
33 <td>35:1
34 <td>982&nbsp;KB&nbsp;up<br>12.4&nbsp;MB&nbsp;down
35 </tr>
36
37 <tr align="center">
38 <td>Fossil
39 <td>4981
40 <td>1272
41 <td>764&nbsp;days<br>2.1&nbsp;yrs
42 <td>1.66
43 <td>144&nbsp;MB
44 <td>8.74&nbsp;MB
45 <td>16:1
46 <td>128&nbsp;KB&nbsp;up<br>4.49&nbsp;MB&nbsp;down
47 </tr>
48
49 <tr align="center">
50 <td>SLT
51 <td>2062
52 <td>67
53 <td>266&nbsp;days
54 <td>0.25
55 <td>1.76&nbsp;GB
56 <td>147&nbsp;MB
57 <td>11:1
58 <td>1.1&nbsp;MB&nbsp;up<br>141&nbsp;MB&nbsp;down
59 </tr>
60
61 <tr align="center">
62 <td>TH3
63 <td>1999
64 <td>429
65 <td>331&nbsp;days
66 <td>1.30
67 <td>70.5&nbsp;MB
68 <td>6.3&nbsp;MB
69 <td>11:1
70 <td>55&nbsp;KB&nbsp;up<br>4.66&nbsp;MB&nbsp;down
71 </tr>
72
73 <tr align="center">
74 <td>SQLite Docs
75 <td>1787
76 <td>444
77 <td>650&nbsp;days<br>1.78&nbsp;yrs
78 <td>0.68
79 <td>43&nbsp;MB
80 <td>4.9&nbsp;MB
81 <td>8:1
82 <td>46&nbsp;KB&nbsp;up<br>3.35&nbsp;MB&nbsp;down
 
 
 
 
 
 
 
 
 
 
 
 
83 </tr>
84
85 </table>
86
87 <h2>The Five Projects</h2>
88
89 The five projects listed above were chosen because they have been in
90 existance for a long time (relative to the age of fossil) or because
91 they have larges amounts of content. The most important project using
92 fossil is SQLite. Fossil itself
93 is built on top of SQLite and so obviously SQLite has to predate fossil.
94 SQLite was originally versioned using CVS, but recently the entire 9-year
95 and 320-MB CVS history of SQLite was converted over to Fossil. This is
96 an important datapoint because it demonstrates fossil's ability to manage
97 a significant and long-running project.
98 The next-longest running fossil project is fossil itself, at 2.1 years.
99 The documentation for SQLite
100 (identified above as "SQLite Docs") was split off of the main SQLite
101 source tree and into its own fossil repository about 1.75 years ago.
102 The "SQL Logic Test" or "SLT" project is a massive
103 collection of SQL statements and their output used to compare the
104 processing of SQLite against MySQL, PostgreSQL, Microsoft SQL Server,
105 and Oracle.
106 Finally "TH3" is a proprietary set of test cases for SQLite used to give
107 100% branch test coverage of SQLite on embedded platforms. All projects
108 except for TH3 are open-source.
109
110 <h2>Measured Attributes</h2>
111
112 In fossil, every version of every file, every wiki page, every change to
113 every ticket, and every check-in is a separate "artifact". One way to
114 think of a fossil project is as a bag of artifacts. Of course, there is
115 a lot more than this going on in fossil. Many of the artifacts have meaning
116 and are related to other artifacts. But at a low level (for example when
117 synchronizing two instances of the same project) the only thing that matters
118 is the unordered collection of artifacts. In fact, one of the key
119 characteristics of fossil is that the entire project history can be
120 reconstructed simply by scanning the artifacts in an arbitrary order.
121
122 The number of check-ins is the number of times that the "commit" command
123 has been run. A single check-in might change a 3 or 4 files, or it might
124 change several dozen different files. Regardless of the number of files
125 changed, it still only counts as one check-in.
126
127 The "Uncompressed Size" is the total size of all the artifacts within
128 the fossil repository assuming they were all uncompressed and stored
129 separately on the disk. Fossil makes use of delta compression between related
130 versions of the same file, and then uses zlib compression on the resulting
131 deltas. The total resulting repository size is shown after the uncompressed
132 size.
 
 
133
134 On the right end of the table, we show the "Clone Bandwidth". This is the
135 total number of bytes sent from client to server ("uplink") and from server
136 back to client ("downlink") in order to clone a repository. These byte counts
137 include HTTP protocol overhead.
138
139 In the table and throughout this article,
140 "GB" means gigabytes (10<sup><small>9</small></sup> bytes)
141 not <a href="http://en.wikipedia.org/wiki/Gibibyte">gibibytes</a>
142 (2<sup><small>30</small></sup> bytes). Similarly, "MB" and "KB"
@@ -144,22 +136,24 @@
144
145 <h2>Analysis And Supplimental Data</h2>
146
147 Perhaps the two most interesting datapoints in the above table are SQLite
148 and SLT. SQLite is a long-running project with long revision chains.
149 Some of the files in SQLite have been edited close to a thousand times.
150 Each of these edits is stored as a delta, and hence the SQLite project
151 gets excellent 35:1 compression. SLT, on the other hand, consists of
152 many large (megabyte-sized) SQL scripts that have one or maybe two
153 versions. There is very little delta compression occurring and so the
154 overall repository compression ratio is much lower. Note also that
155 quite a bit more bandwidth is required to clone SLT than SQLite.
156
157 For the first nine years of its development, SQLite was versioned by CVS.
158 The resulting CVS repository measured over 320MB in size. So, the
159 developers were
160 pleasently surprised to see that this entire project could be cloned in
161 fossil using only about 13MB of network traffic. The "sync" protocol
 
 
162 used by fossil has turned out to be surprisingly efficient. A typical
163 check-in on SQLite might use 3 or 4KB of network bandwidth total. Hardly
164 worth measuring. The sync protocol is efficient enough that, once cloned,
165 fossil could easily be used over a dial-up connection.
166
--- www/stats.wiki
+++ www/stats.wiki
@@ -2,13 +2,14 @@
2 <h1 align="center">Performance Statistics</h1>
3
4 The questions will inevitably arise: How does Fossil perform?
5 Does it use a lot of disk space or bandwidth? Is it scalable?
6
7 In an attempt to answers these questions, this report looks at several
8 projects that use fossil for configuration management and examines how
9 well they are working. The following table is a summary of the results.
10 (Last updated on 2012-02-26.)
11 Explanation and analysis follows the table.
12
13 <table border=1>
14 <tr>
15 <th>Project</th>
@@ -21,122 +22,113 @@
22 <th>Compression Ratio</th>
23 <th>Clone Bandwidth</th>
24 </tr>
25
26 <tr align="center">
27 <td>[http://www.sqlite.org/src/timeline | SQLite]
28 <td>41113
29 <td>9943
30 <td>4290&nbsp;days<br>11.75&nbsp;yrs
31 <td>2.32
32 <td>2.09&nbsp;GB
33 <td>33.2&nbsp;MB
34 <td>63:1
35 <td>23.2&nbsp;MB
36 </tr>
37
38 <tr align="center">
39 <td>[http://core.tcl.tk/tcl/timeline | TCL]
40 <td>74806
41 <td>13541
42 <td>5085&nbsp;days<br>13.92&nbsp;yrs
43 <td>2.66
44 <td>5.2&nbsp;GB
45 <td>86&nbsp;MB
46 <td>60:1
47 <td>67.0&nbsp;MB
48 </tr>
49
50 <tr align="center">
51 <td>[/timeline | Fossil]
52 <td>15561
53 <td>3764
54 <td>1681&nbsp;days<br>4.6&nbsp;yrs
55 <td>2.24
56 <td>721&nbsp;MB
57 <td>18.8&nbsp;MB
58 <td>38:1
59 <td>12.0&nbsp;MB
60 </tr>
61
62 <tr align="center">
63 <td>[http://www.sqlite.org/slt/timeline | SLT]
64 <td>2174
65 <td>100
66 <td>1183&nbsp;days<br>3.24&nbsp;yrs
67 <td>0.08
68 <td>1.94&nbsp;GB
69 <td>143&nbsp;MB
70 <td>12:1
71 <td>141&nbsp;MB
72 </tr>
73
74 <tr align="center">
75 <td>[http://www.sqlite.org/th3.html | TH3]
76 <td>5624
77 <td>1472
78 <td>1248&nbsp;days<br>3.42&nbsp;yrs
79 <td>1.78
80 <td>252&nbsp;MB
81 <td>12.5&nbsp;MB
82 <td>20:1
83 <td>12.2&nbsp;MB
84 </tr>
85
86 <tr align="center">
87 <td>[http://www.sqlite.org/docsrc/timeline | SQLite Docs]
88 <td>3664
89 <td>1003
90 <td>1567&nbsp;days<br>4.29&nbsp;yrs
91 <td>0.64
92 <td>108&nbsp;MB
93 <td>6.6&nbsp;MB
94 <td>16:1
95 <td>5.71&nbsp;MB
96 </tr>
97
98 </table>
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100 <h2>Measured Attributes</h2>
101
102 In Fossil, every version of every file, every wiki page, every change to
103 every ticket, and every check-in is a separate "artifact". One way to
104 think of a Fossil project is as a bag of artifacts. Of course, there is
105 a lot more than this going on in Fossil. Many of the artifacts have meaning
106 and are related to other artifacts. But at a low level (for example when
107 synchronizing two instances of the same project) the only thing that matters
108 is the unordered collection of artifacts. In fact, one of the key
109 characteristics of Fossil is that the entire project history can be
110 reconstructed simply by scanning the artifacts in an arbitrary order.
111
112 The number of check-ins is the number of times that the "commit" command
113 has been run. A single check-in might change a 3 or 4 files, or it might
114 change dozens or hundreds of files. Regardless of the number of files
115 changed, it still only counts as one check-in.
116
117 The "Uncompressed Size" is the total size of all the artifacts within
118 the repository assuming they were all uncompressed and stored
119 separately on the disk. Fossil makes use of delta compression between related
120 versions of the same file, and then uses zlib compression on the resulting
121 deltas. The total resulting repository size is shown after the uncompressed
122 size. For this chart, "fossil rebuild --compress" was run on each repository
123 prior to measuring its compressed size. Repository sizes would typically
124 be 20% larger without that rebuild.
125
126 On the right end of the table, we show the "Clone Bandwidth". This is the
127 total number of bytes sent from server back to the client. The number of
128 bytes sent from client to server is neglible in comparison.
129 These byte counts include HTTP protocol overhead.
130
131 In the table and throughout this article,
132 "GB" means gigabytes (10<sup><small>9</small></sup> bytes)
133 not <a href="http://en.wikipedia.org/wiki/Gibibyte">gibibytes</a>
134 (2<sup><small>30</small></sup> bytes). Similarly, "MB" and "KB"
@@ -144,22 +136,24 @@
136
137 <h2>Analysis And Supplimental Data</h2>
138
139 Perhaps the two most interesting datapoints in the above table are SQLite
140 and SLT. SQLite is a long-running project with long revision chains.
141 Some of the files in SQLite have been edited over a thousand times.
142 Each of these edits is stored as a delta, and hence the SQLite project
143 gets excellent 63:1 compression. SLT, on the other hand, consists of
144 many large (megabyte-sized) SQL scripts that have one or maybe two
145 edits each. There is very little delta compression occurring and so the
146 overall repository compression ratio is much lower. Note also that
147 quite a bit more bandwidth is required to clone SLT than SQLite.
148
149 For the first nine years of its development, SQLite was versioned by CVS.
150 The resulting CVS repository measured over 320MB in size. So, the
151 developers were surprised to see that this entire project could be cloned in
152 fossil using only about 23.2MB of network traffic. (This 23.2MB includes
153 all the changes to SQLite that have been made since the conversion from
154 CVS. Of those changes are omitted, the clone bandwidth drops to 13MB.)
155 The "sync" protocol
156 used by fossil has turned out to be surprisingly efficient. A typical
157 check-in on SQLite might use 3 or 4KB of network bandwidth total. Hardly
158 worth measuring. The sync protocol is efficient enough that, once cloned,
159 Fossil could easily be used over a dial-up connection.
160

Keyboard Shortcuts

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