Fossil SCM

Remove some tabs and end-of-line whitespace

andygoth 2016-11-07 01:29 trunk
Commit bf9669f55e5fee98d8425e9dc5d090c5c481fddc
+3 -4
--- ajax/index.html
+++ ajax/index.html
@@ -1,12 +1,11 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
54
<head>
6
- <title>Fossil/JSON raw request sending</title>
7
- <meta http-equiv="content-type" content="text/html;charset=utf-8" />
5
+ <title>Fossil/JSON raw request sending</title>
6
+ <meta http-equiv="content-type" content="text/html;charset=utf-8" />
87
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
98
<script type="text/javascript" src="js/whajaj.js"></script>
109
<script type="text/javascript" src="js/fossil-ajaj.js"></script>
1110
1211
<style type='text/css'>
1312
--- ajax/index.html
+++ ajax/index.html
@@ -1,12 +1,11 @@
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
5 <head>
6 <title>Fossil/JSON raw request sending</title>
7 <meta http-equiv="content-type" content="text/html;charset=utf-8" />
8 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
9 <script type="text/javascript" src="js/whajaj.js"></script>
10 <script type="text/javascript" src="js/fossil-ajaj.js"></script>
11
12 <style type='text/css'>
13
--- ajax/index.html
+++ ajax/index.html
@@ -1,12 +1,11 @@
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
4 <head>
5 <title>Fossil/JSON raw request sending</title>
6 <meta http-equiv="content-type" content="text/html;charset=utf-8" />
7 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
8 <script type="text/javascript" src="js/whajaj.js"></script>
9 <script type="text/javascript" src="js/fossil-ajaj.js"></script>
10
11 <style type='text/css'>
12
--- ajax/wiki-editor.html
+++ ajax/wiki-editor.html
@@ -1,12 +1,11 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
54
<head>
6
- <title>Fossil/JSON Wiki Editor Prototype</title>
7
- <meta http-equiv="content-type" content="text/html;charset=utf-8" />
5
+ <title>Fossil/JSON Wiki Editor Prototype</title>
6
+ <meta http-equiv="content-type" content="text/html;charset=utf-8" />
87
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
98
<script type="text/javascript" src="js/whajaj.js"></script>
109
<script type="text/javascript" src="js/fossil-ajaj.js"></script>
1110
1211
<style type='text/css'>
1312
--- ajax/wiki-editor.html
+++ ajax/wiki-editor.html
@@ -1,12 +1,11 @@
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
5 <head>
6 <title>Fossil/JSON Wiki Editor Prototype</title>
7 <meta http-equiv="content-type" content="text/html;charset=utf-8" />
8 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
9 <script type="text/javascript" src="js/whajaj.js"></script>
10 <script type="text/javascript" src="js/fossil-ajaj.js"></script>
11
12 <style type='text/css'>
13
--- ajax/wiki-editor.html
+++ ajax/wiki-editor.html
@@ -1,12 +1,11 @@
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
3
4 <head>
5 <title>Fossil/JSON Wiki Editor Prototype</title>
6 <meta http-equiv="content-type" content="text/html;charset=utf-8" />
7 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
8 <script type="text/javascript" src="js/whajaj.js"></script>
9 <script type="text/javascript" src="js/fossil-ajaj.js"></script>
10
11 <style type='text/css'>
12
--- src/codecheck1.c
+++ src/codecheck1.c
@@ -437,11 +437,11 @@
437437
const char **azArg = 0;
438438
int i, k;
439439
int nErr = 0;
440440
char *acType;
441441
442
- szFName = token_length(zFCall, &eToken, &ln);
442
+ szFName = token_length(zFCall, &eToken, &ln);
443443
zStart = next_non_whitespace(zFCall+szFName, &len, &eToken);
444444
assert( zStart[0]=='(' && len==1 );
445445
len = distance_to(zStart+1, ')');
446446
zCopy = safe_malloc( len + 1 );
447447
memcpy(zCopy, zStart+1, len);
448448
--- src/codecheck1.c
+++ src/codecheck1.c
@@ -437,11 +437,11 @@
437 const char **azArg = 0;
438 int i, k;
439 int nErr = 0;
440 char *acType;
441
442 szFName = token_length(zFCall, &eToken, &ln);
443 zStart = next_non_whitespace(zFCall+szFName, &len, &eToken);
444 assert( zStart[0]=='(' && len==1 );
445 len = distance_to(zStart+1, ')');
446 zCopy = safe_malloc( len + 1 );
447 memcpy(zCopy, zStart+1, len);
448
--- src/codecheck1.c
+++ src/codecheck1.c
@@ -437,11 +437,11 @@
437 const char **azArg = 0;
438 int i, k;
439 int nErr = 0;
440 char *acType;
441
442 szFName = token_length(zFCall, &eToken, &ln);
443 zStart = next_non_whitespace(zFCall+szFName, &len, &eToken);
444 assert( zStart[0]=='(' && len==1 );
445 len = distance_to(zStart+1, ')');
446 zCopy = safe_malloc( len + 1 );
447 memcpy(zCopy, zStart+1, len);
448
+1 -1
--- src/export.c
+++ src/export.c
@@ -282,11 +282,11 @@
282282
}
283283
}
284284
if( unused_mark!=NULL ){
285285
unsigned int mid = atoi(mark.name + 1);
286286
if( mid>=*unused_mark ){
287
- *unused_mark = mid + 1;
287
+ *unused_mark = mid + 1;
288288
}
289289
}
290290
free(mark.name);
291291
}
292292
return 0;
293293
--- src/export.c
+++ src/export.c
@@ -282,11 +282,11 @@
282 }
283 }
284 if( unused_mark!=NULL ){
285 unsigned int mid = atoi(mark.name + 1);
286 if( mid>=*unused_mark ){
287 *unused_mark = mid + 1;
288 }
289 }
290 free(mark.name);
291 }
292 return 0;
293
--- src/export.c
+++ src/export.c
@@ -282,11 +282,11 @@
282 }
283 }
284 if( unused_mark!=NULL ){
285 unsigned int mid = atoi(mark.name + 1);
286 if( mid>=*unused_mark ){
287 *unused_mark = mid + 1;
288 }
289 }
290 free(mark.name);
291 }
292 return 0;
293
+1 -1
--- src/finfo.c
+++ src/finfo.c
@@ -398,11 +398,11 @@
398398
}
399399
blob_reset(&sql);
400400
blob_zero(&title);
401401
if( baseCheckin ){
402402
char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin);
403
- char *zLink = href("%R/info/%!S", zUuid);
403
+ char *zLink = href("%R/info/%!S", zUuid);
404404
if( n>0 ){
405405
blob_appendf(&title, "First %d ancestors of file ", n);
406406
}else{
407407
blob_appendf(&title, "Ancestors of file ");
408408
}
409409
--- src/finfo.c
+++ src/finfo.c
@@ -398,11 +398,11 @@
398 }
399 blob_reset(&sql);
400 blob_zero(&title);
401 if( baseCheckin ){
402 char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin);
403 char *zLink = href("%R/info/%!S", zUuid);
404 if( n>0 ){
405 blob_appendf(&title, "First %d ancestors of file ", n);
406 }else{
407 blob_appendf(&title, "Ancestors of file ");
408 }
409
--- src/finfo.c
+++ src/finfo.c
@@ -398,11 +398,11 @@
398 }
399 blob_reset(&sql);
400 blob_zero(&title);
401 if( baseCheckin ){
402 char *zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", baseCheckin);
403 char *zLink = href("%R/info/%!S", zUuid);
404 if( n>0 ){
405 blob_appendf(&title, "First %d ancestors of file ", n);
406 }else{
407 blob_appendf(&title, "Ancestors of file ");
408 }
409
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -91,11 +91,11 @@
9191
static cson_value * eventTypeLabel = NULL;
9292
if(!eventTypeLabel){
9393
eventTypeLabel = json_new_string("checkin");
9494
json_gc_add("$EVENT_TYPE_LABEL(commit)", eventTypeLabel);
9595
}
96
-
96
+
9797
db_prepare(&q,
9898
"SELECT b.uuid, "
9999
" cast(strftime('%%s',e.mtime) as int), "
100100
" strftime('%%s',e.omtime),"
101101
" e.user, "
@@ -140,11 +140,11 @@
140140
}else{
141141
SET("user",json_new_string(zUser));
142142
}
143143
144144
zComment = db_column_text(&q,4);
145
- zEComment = db_text(0,
145
+ zEComment = db_text(0,
146146
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
147147
TAG_COMMENT, rid);
148148
if(zEComment){
149149
SET("comment",json_new_string(zEComment));
150150
if(0 != fossil_strcmp(zEComment,zComment)){
@@ -244,11 +244,11 @@
244244
**
245245
** If the "format" (CLI: -f) flag is set function returns the same as
246246
** json_wiki_get_content_format_flag(), else it returns true (non-0)
247247
** if either the includeContent (HTTP) or -content|-c boolean flags
248248
** (CLI) are set.
249
-*/
249
+*/
250250
static int json_artifact_get_content_format_flag(){
251251
enum { MagicValue = -9 };
252252
int contentFormat = json_wiki_get_content_format_flag(MagicValue);
253253
if(MagicValue == contentFormat){
254254
contentFormat = json_find_option_bool("includeContent","content","c",0) /* deprecated */ ? -1 : 0;
@@ -270,11 +270,11 @@
270270
}
271271
}
272272
273273
/*
274274
** Internal helper for routines which add a "status" flag to file
275
-** artifact data. isNew and isDel should be the "is this object new?"
275
+** artifact data. isNew and isDel should be the "is this object new?"
276276
** and "is this object removed?" flags of the underlying query. This
277277
** function returns a static string from the set (added, removed,
278278
** modified), depending on the combination of the two args.
279279
**
280280
** Reminder to self: (mlink.pid==0) AS isNew, (mlink.fid==0) AS isDel
@@ -297,11 +297,11 @@
297297
if( ! g.perm.Read ){
298298
json_set_err(FSL_JSON_E_DENIED,
299299
"Requires 'o' privileges.");
300300
return NULL;
301301
}
302
-
302
+
303303
pay = zParent;
304304
305305
contentFormat = json_artifact_get_content_format_flag();
306306
if( 0 != contentFormat ){
307307
Blob content = empty_blob;
@@ -345,11 +345,11 @@
345345
);
346346
if(parentUuid){
347347
cson_object_set( zParent, "parent", json_new_string(parentUuid) );
348348
fossil_free(parentUuid);
349349
}
350
-
350
+
351351
/* Find check-ins associated with this file... */
352352
db_prepare(&q,
353353
"SELECT filename.name AS name, "
354354
" (mlink.pid==0) AS isNew,"
355355
" (mlink.fid==0) AS isDel,"
@@ -376,11 +376,11 @@
376376
TAG_BRANCH, rid
377377
);
378378
/* TODO: add a "state" flag for the file in each check-in,
379379
e.g. "modified", "new", "deleted".
380380
*/
381
- checkin_arr = cson_new_array();
381
+ checkin_arr = cson_new_array();
382382
cson_object_set(pay, "checkins", cson_array_value(checkin_arr));
383383
while( (SQLITE_ROW==db_step(&q) ) ){
384384
cson_object * row = cson_value_get_object(cson_sqlite3_row_to_object(q.pStmt));
385385
/* FIXME: move this isNew/isDel stuff into an SQL CASE statement. */
386386
char const isNew = cson_value_get_bool(cson_object_get(row,"isNew"));
387387
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -91,11 +91,11 @@
91 static cson_value * eventTypeLabel = NULL;
92 if(!eventTypeLabel){
93 eventTypeLabel = json_new_string("checkin");
94 json_gc_add("$EVENT_TYPE_LABEL(commit)", eventTypeLabel);
95 }
96
97 db_prepare(&q,
98 "SELECT b.uuid, "
99 " cast(strftime('%%s',e.mtime) as int), "
100 " strftime('%%s',e.omtime),"
101 " e.user, "
@@ -140,11 +140,11 @@
140 }else{
141 SET("user",json_new_string(zUser));
142 }
143
144 zComment = db_column_text(&q,4);
145 zEComment = db_text(0,
146 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
147 TAG_COMMENT, rid);
148 if(zEComment){
149 SET("comment",json_new_string(zEComment));
150 if(0 != fossil_strcmp(zEComment,zComment)){
@@ -244,11 +244,11 @@
244 **
245 ** If the "format" (CLI: -f) flag is set function returns the same as
246 ** json_wiki_get_content_format_flag(), else it returns true (non-0)
247 ** if either the includeContent (HTTP) or -content|-c boolean flags
248 ** (CLI) are set.
249 */
250 static int json_artifact_get_content_format_flag(){
251 enum { MagicValue = -9 };
252 int contentFormat = json_wiki_get_content_format_flag(MagicValue);
253 if(MagicValue == contentFormat){
254 contentFormat = json_find_option_bool("includeContent","content","c",0) /* deprecated */ ? -1 : 0;
@@ -270,11 +270,11 @@
270 }
271 }
272
273 /*
274 ** Internal helper for routines which add a "status" flag to file
275 ** artifact data. isNew and isDel should be the "is this object new?"
276 ** and "is this object removed?" flags of the underlying query. This
277 ** function returns a static string from the set (added, removed,
278 ** modified), depending on the combination of the two args.
279 **
280 ** Reminder to self: (mlink.pid==0) AS isNew, (mlink.fid==0) AS isDel
@@ -297,11 +297,11 @@
297 if( ! g.perm.Read ){
298 json_set_err(FSL_JSON_E_DENIED,
299 "Requires 'o' privileges.");
300 return NULL;
301 }
302
303 pay = zParent;
304
305 contentFormat = json_artifact_get_content_format_flag();
306 if( 0 != contentFormat ){
307 Blob content = empty_blob;
@@ -345,11 +345,11 @@
345 );
346 if(parentUuid){
347 cson_object_set( zParent, "parent", json_new_string(parentUuid) );
348 fossil_free(parentUuid);
349 }
350
351 /* Find check-ins associated with this file... */
352 db_prepare(&q,
353 "SELECT filename.name AS name, "
354 " (mlink.pid==0) AS isNew,"
355 " (mlink.fid==0) AS isDel,"
@@ -376,11 +376,11 @@
376 TAG_BRANCH, rid
377 );
378 /* TODO: add a "state" flag for the file in each check-in,
379 e.g. "modified", "new", "deleted".
380 */
381 checkin_arr = cson_new_array();
382 cson_object_set(pay, "checkins", cson_array_value(checkin_arr));
383 while( (SQLITE_ROW==db_step(&q) ) ){
384 cson_object * row = cson_value_get_object(cson_sqlite3_row_to_object(q.pStmt));
385 /* FIXME: move this isNew/isDel stuff into an SQL CASE statement. */
386 char const isNew = cson_value_get_bool(cson_object_get(row,"isNew"));
387
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -91,11 +91,11 @@
91 static cson_value * eventTypeLabel = NULL;
92 if(!eventTypeLabel){
93 eventTypeLabel = json_new_string("checkin");
94 json_gc_add("$EVENT_TYPE_LABEL(commit)", eventTypeLabel);
95 }
96
97 db_prepare(&q,
98 "SELECT b.uuid, "
99 " cast(strftime('%%s',e.mtime) as int), "
100 " strftime('%%s',e.omtime),"
101 " e.user, "
@@ -140,11 +140,11 @@
140 }else{
141 SET("user",json_new_string(zUser));
142 }
143
144 zComment = db_column_text(&q,4);
145 zEComment = db_text(0,
146 "SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
147 TAG_COMMENT, rid);
148 if(zEComment){
149 SET("comment",json_new_string(zEComment));
150 if(0 != fossil_strcmp(zEComment,zComment)){
@@ -244,11 +244,11 @@
244 **
245 ** If the "format" (CLI: -f) flag is set function returns the same as
246 ** json_wiki_get_content_format_flag(), else it returns true (non-0)
247 ** if either the includeContent (HTTP) or -content|-c boolean flags
248 ** (CLI) are set.
249 */
250 static int json_artifact_get_content_format_flag(){
251 enum { MagicValue = -9 };
252 int contentFormat = json_wiki_get_content_format_flag(MagicValue);
253 if(MagicValue == contentFormat){
254 contentFormat = json_find_option_bool("includeContent","content","c",0) /* deprecated */ ? -1 : 0;
@@ -270,11 +270,11 @@
270 }
271 }
272
273 /*
274 ** Internal helper for routines which add a "status" flag to file
275 ** artifact data. isNew and isDel should be the "is this object new?"
276 ** and "is this object removed?" flags of the underlying query. This
277 ** function returns a static string from the set (added, removed,
278 ** modified), depending on the combination of the two args.
279 **
280 ** Reminder to self: (mlink.pid==0) AS isNew, (mlink.fid==0) AS isDel
@@ -297,11 +297,11 @@
297 if( ! g.perm.Read ){
298 json_set_err(FSL_JSON_E_DENIED,
299 "Requires 'o' privileges.");
300 return NULL;
301 }
302
303 pay = zParent;
304
305 contentFormat = json_artifact_get_content_format_flag();
306 if( 0 != contentFormat ){
307 Blob content = empty_blob;
@@ -345,11 +345,11 @@
345 );
346 if(parentUuid){
347 cson_object_set( zParent, "parent", json_new_string(parentUuid) );
348 fossil_free(parentUuid);
349 }
350
351 /* Find check-ins associated with this file... */
352 db_prepare(&q,
353 "SELECT filename.name AS name, "
354 " (mlink.pid==0) AS isNew,"
355 " (mlink.fid==0) AS isDel,"
@@ -376,11 +376,11 @@
376 TAG_BRANCH, rid
377 );
378 /* TODO: add a "state" flag for the file in each check-in,
379 e.g. "modified", "new", "deleted".
380 */
381 checkin_arr = cson_new_array();
382 cson_object_set(pay, "checkins", cson_array_value(checkin_arr));
383 while( (SQLITE_ROW==db_step(&q) ) ){
384 cson_object * row = cson_value_get_object(cson_sqlite3_row_to_object(q.pStmt));
385 /* FIXME: move this isNew/isDel stuff into an SQL CASE statement. */
386 char const isNew = cson_value_get_bool(cson_object_get(row,"isNew"));
387
--- src/json_branch.c
+++ src/json_branch.c
@@ -127,11 +127,11 @@
127127
if(zCurrent){
128128
cson_object_set(pay,"current",json_new_string(zCurrent));
129129
}
130130
}
131131
132
-
132
+
133133
branch_prepare_list_query(&q, branchListFlags);
134134
cson_object_set(pay,"branches",listV);
135135
while((SQLITE_ROW==db_step(&q))){
136136
cson_value * v = cson_sqlite3_column_to_value(q.pStmt,0);
137137
if(v){
@@ -281,11 +281,11 @@
281281
while( db_step(&q)==SQLITE_ROW ){
282282
const char *zTag = db_column_text(&q, 0);
283283
blob_appendf(&branch, "T -%F *\n", zTag);
284284
}
285285
db_finalize(&q);
286
-
286
+
287287
blob_appendf(&branch, "U %F\n", g.zLogin);
288288
md5sum_blob(&branch, &mcksum);
289289
blob_appendf(&branch, "Z %b\n", &mcksum);
290290
291291
brid = content_put(&branch);
@@ -302,11 +302,11 @@
302302
*zNewRid = brid;
303303
}
304304
305305
/* Commit */
306306
db_end_transaction(0);
307
-
307
+
308308
#if 0 /* Do an autosync push, if requested */
309309
/* arugable for JSON mode? */
310310
if( !g.isHTTP && !isPrivate ) autosync(SYNC_PUSH);
311311
#endif
312312
return 0;
@@ -356,11 +356,11 @@
356356
opt.isPrivate = (NULL != find_option("private","",0));
357357
}else{
358358
opt.isPrivate = 0;
359359
}
360360
}
361
-
361
+
362362
rc = json_branch_new( &opt, &rid );
363363
if(rc){
364364
json_set_err(rc, opt.rcErrMsg);
365365
goto error;
366366
}
367367
--- src/json_branch.c
+++ src/json_branch.c
@@ -127,11 +127,11 @@
127 if(zCurrent){
128 cson_object_set(pay,"current",json_new_string(zCurrent));
129 }
130 }
131
132
133 branch_prepare_list_query(&q, branchListFlags);
134 cson_object_set(pay,"branches",listV);
135 while((SQLITE_ROW==db_step(&q))){
136 cson_value * v = cson_sqlite3_column_to_value(q.pStmt,0);
137 if(v){
@@ -281,11 +281,11 @@
281 while( db_step(&q)==SQLITE_ROW ){
282 const char *zTag = db_column_text(&q, 0);
283 blob_appendf(&branch, "T -%F *\n", zTag);
284 }
285 db_finalize(&q);
286
287 blob_appendf(&branch, "U %F\n", g.zLogin);
288 md5sum_blob(&branch, &mcksum);
289 blob_appendf(&branch, "Z %b\n", &mcksum);
290
291 brid = content_put(&branch);
@@ -302,11 +302,11 @@
302 *zNewRid = brid;
303 }
304
305 /* Commit */
306 db_end_transaction(0);
307
308 #if 0 /* Do an autosync push, if requested */
309 /* arugable for JSON mode? */
310 if( !g.isHTTP && !isPrivate ) autosync(SYNC_PUSH);
311 #endif
312 return 0;
@@ -356,11 +356,11 @@
356 opt.isPrivate = (NULL != find_option("private","",0));
357 }else{
358 opt.isPrivate = 0;
359 }
360 }
361
362 rc = json_branch_new( &opt, &rid );
363 if(rc){
364 json_set_err(rc, opt.rcErrMsg);
365 goto error;
366 }
367
--- src/json_branch.c
+++ src/json_branch.c
@@ -127,11 +127,11 @@
127 if(zCurrent){
128 cson_object_set(pay,"current",json_new_string(zCurrent));
129 }
130 }
131
132
133 branch_prepare_list_query(&q, branchListFlags);
134 cson_object_set(pay,"branches",listV);
135 while((SQLITE_ROW==db_step(&q))){
136 cson_value * v = cson_sqlite3_column_to_value(q.pStmt,0);
137 if(v){
@@ -281,11 +281,11 @@
281 while( db_step(&q)==SQLITE_ROW ){
282 const char *zTag = db_column_text(&q, 0);
283 blob_appendf(&branch, "T -%F *\n", zTag);
284 }
285 db_finalize(&q);
286
287 blob_appendf(&branch, "U %F\n", g.zLogin);
288 md5sum_blob(&branch, &mcksum);
289 blob_appendf(&branch, "Z %b\n", &mcksum);
290
291 brid = content_put(&branch);
@@ -302,11 +302,11 @@
302 *zNewRid = brid;
303 }
304
305 /* Commit */
306 db_end_transaction(0);
307
308 #if 0 /* Do an autosync push, if requested */
309 /* arugable for JSON mode? */
310 if( !g.isHTTP && !isPrivate ) autosync(SYNC_PUSH);
311 #endif
312 return 0;
@@ -356,11 +356,11 @@
356 opt.isPrivate = (NULL != find_option("private","",0));
357 }else{
358 opt.isPrivate = 0;
359 }
360 }
361
362 rc = json_branch_new( &opt, &rid );
363 if(rc){
364 json_set_err(rc, opt.rcErrMsg);
365 goto error;
366 }
367
+1 -1
--- src/json_diff.c
+++ src/json_diff.c
@@ -129,10 +129,10 @@
129129
pay = cson_new_object();
130130
cson_object_set(pay, "from", json_new_string(zFrom));
131131
cson_object_set(pay, "to", json_new_string(zTo));
132132
cson_object_set(pay, "diff", v);
133133
v = 0;
134
-
134
+
135135
return pay ? cson_object_value(pay) : NULL;
136136
}
137137
138138
#endif /* FOSSIL_ENABLE_JSON */
139139
--- src/json_diff.c
+++ src/json_diff.c
@@ -129,10 +129,10 @@
129 pay = cson_new_object();
130 cson_object_set(pay, "from", json_new_string(zFrom));
131 cson_object_set(pay, "to", json_new_string(zTo));
132 cson_object_set(pay, "diff", v);
133 v = 0;
134
135 return pay ? cson_object_value(pay) : NULL;
136 }
137
138 #endif /* FOSSIL_ENABLE_JSON */
139
--- src/json_diff.c
+++ src/json_diff.c
@@ -129,10 +129,10 @@
129 pay = cson_new_object();
130 cson_object_set(pay, "from", json_new_string(zFrom));
131 cson_object_set(pay, "to", json_new_string(zTo));
132 cson_object_set(pay, "diff", v);
133 v = 0;
134
135 return pay ? cson_object_value(pay) : NULL;
136 }
137
138 #endif /* FOSSIL_ENABLE_JSON */
139
--- src/json_finfo.c
+++ src/json_finfo.c
@@ -56,17 +56,17 @@
5656
5757
if(0==db_int(0,"SELECT 1 FROM filename WHERE name=%Q",zFilename)){
5858
json_set_err(FSL_JSON_E_RESOURCE_NOT_FOUND, "File entry not found.");
5959
return NULL;
6060
}
61
-
61
+
6262
zBefore = json_find_option_cstr("before",NULL,"b");
6363
zAfter = json_find_option_cstr("after",NULL,"a");
6464
limit = json_find_option_int("limit",NULL,"n", -1);
6565
zCheckin = json_find_option_cstr("checkin",NULL,"ci");
6666
67
- blob_append_sql(&sql,
67
+ blob_append_sql(&sql,
6868
/*0*/ "SELECT b.uuid,"
6969
/*1*/ " ci.uuid,"
7070
/*2*/ " (SELECT uuid FROM blob WHERE rid=mlink.fid)," /* Current file uuid */
7171
/*3*/ " cast(strftime('%%s',event.mtime) AS INTEGER),"
7272
/*4*/ " coalesce(event.euser, event.user),"
7373
--- src/json_finfo.c
+++ src/json_finfo.c
@@ -56,17 +56,17 @@
56
57 if(0==db_int(0,"SELECT 1 FROM filename WHERE name=%Q",zFilename)){
58 json_set_err(FSL_JSON_E_RESOURCE_NOT_FOUND, "File entry not found.");
59 return NULL;
60 }
61
62 zBefore = json_find_option_cstr("before",NULL,"b");
63 zAfter = json_find_option_cstr("after",NULL,"a");
64 limit = json_find_option_int("limit",NULL,"n", -1);
65 zCheckin = json_find_option_cstr("checkin",NULL,"ci");
66
67 blob_append_sql(&sql,
68 /*0*/ "SELECT b.uuid,"
69 /*1*/ " ci.uuid,"
70 /*2*/ " (SELECT uuid FROM blob WHERE rid=mlink.fid)," /* Current file uuid */
71 /*3*/ " cast(strftime('%%s',event.mtime) AS INTEGER),"
72 /*4*/ " coalesce(event.euser, event.user),"
73
--- src/json_finfo.c
+++ src/json_finfo.c
@@ -56,17 +56,17 @@
56
57 if(0==db_int(0,"SELECT 1 FROM filename WHERE name=%Q",zFilename)){
58 json_set_err(FSL_JSON_E_RESOURCE_NOT_FOUND, "File entry not found.");
59 return NULL;
60 }
61
62 zBefore = json_find_option_cstr("before",NULL,"b");
63 zAfter = json_find_option_cstr("after",NULL,"a");
64 limit = json_find_option_int("limit",NULL,"n", -1);
65 zCheckin = json_find_option_cstr("checkin",NULL,"ci");
66
67 blob_append_sql(&sql,
68 /*0*/ "SELECT b.uuid,"
69 /*1*/ " ci.uuid,"
70 /*2*/ " (SELECT uuid FROM blob WHERE rid=mlink.fid)," /* Current file uuid */
71 /*3*/ " cast(strftime('%%s',event.mtime) AS INTEGER),"
72 /*4*/ " coalesce(event.euser, event.user),"
73
--- src/json_login.c
+++ src/json_login.c
@@ -157,11 +157,11 @@
157157
cson_object_set(po, "authToken", json_new_string(cookie));
158158
free(cookie);
159159
cson_object_set(po, "name", json_new_string(name));
160160
cap = db_text(NULL, "SELECT cap FROM user WHERE login=%Q", name);
161161
cson_object_set(po, "capabilities", cap ? json_new_string(cap) : cson_value_null() );
162
- free(cap);
162
+ free(cap);
163163
cson_object_set(po, "loginCookieName", json_new_string( login_cookie_name() ) );
164164
/* TODO: add loginExpiryTime to the payload. To do this properly
165165
we "should" add an ([unsigned] int *) to
166166
login_set_user_cookie() and login_set_anon_cookie(), to which
167167
the expiry time is assigned. (Remember that JSON doesn't do
168168
--- src/json_login.c
+++ src/json_login.c
@@ -157,11 +157,11 @@
157 cson_object_set(po, "authToken", json_new_string(cookie));
158 free(cookie);
159 cson_object_set(po, "name", json_new_string(name));
160 cap = db_text(NULL, "SELECT cap FROM user WHERE login=%Q", name);
161 cson_object_set(po, "capabilities", cap ? json_new_string(cap) : cson_value_null() );
162 free(cap);
163 cson_object_set(po, "loginCookieName", json_new_string( login_cookie_name() ) );
164 /* TODO: add loginExpiryTime to the payload. To do this properly
165 we "should" add an ([unsigned] int *) to
166 login_set_user_cookie() and login_set_anon_cookie(), to which
167 the expiry time is assigned. (Remember that JSON doesn't do
168
--- src/json_login.c
+++ src/json_login.c
@@ -157,11 +157,11 @@
157 cson_object_set(po, "authToken", json_new_string(cookie));
158 free(cookie);
159 cson_object_set(po, "name", json_new_string(name));
160 cap = db_text(NULL, "SELECT cap FROM user WHERE login=%Q", name);
161 cson_object_set(po, "capabilities", cap ? json_new_string(cap) : cson_value_null() );
162 free(cap);
163 cson_object_set(po, "loginCookieName", json_new_string( login_cookie_name() ) );
164 /* TODO: add loginExpiryTime to the payload. To do this properly
165 we "should" add an ([unsigned] int *) to
166 login_set_user_cookie() and login_set_anon_cookie(), to which
167 the expiry time is assigned. (Remember that JSON doesn't do
168
--- src/json_report.c
+++ src/json_report.c
@@ -60,11 +60,11 @@
6060
** Searches the environment for a "report" parameter
6161
** (CLI: -report/-r #).
6262
**
6363
** If one is not found and argPos is >0 then json_command_arg()
6464
** is checked.
65
-**
65
+**
6666
** Returns >0 (the report number) on success .
6767
*/
6868
static int json_report_get_number(int argPos){
6969
int nReport = json_find_option_int("report",NULL,"r",-1);
7070
if( (nReport<=0) && cson_value_is_integer(g.json.reqPayload.v)){
@@ -199,11 +199,11 @@
199199
goto error;
200200
}
201201
202202
limit = json_find_option_int("limit",NULL,"n",-1);
203203
204
-
204
+
205205
/* Copy over report's SQL...*/
206206
blob_append(&sql, db_column_text(&q,0), -1);
207207
zTitle = mprintf("%s", db_column_text(&q,1));
208208
db_finalize(&q);
209209
db_prepare(&q, "%s", blob_sql_text(&sql));
210210
--- src/json_report.c
+++ src/json_report.c
@@ -60,11 +60,11 @@
60 ** Searches the environment for a "report" parameter
61 ** (CLI: -report/-r #).
62 **
63 ** If one is not found and argPos is >0 then json_command_arg()
64 ** is checked.
65 **
66 ** Returns >0 (the report number) on success .
67 */
68 static int json_report_get_number(int argPos){
69 int nReport = json_find_option_int("report",NULL,"r",-1);
70 if( (nReport<=0) && cson_value_is_integer(g.json.reqPayload.v)){
@@ -199,11 +199,11 @@
199 goto error;
200 }
201
202 limit = json_find_option_int("limit",NULL,"n",-1);
203
204
205 /* Copy over report's SQL...*/
206 blob_append(&sql, db_column_text(&q,0), -1);
207 zTitle = mprintf("%s", db_column_text(&q,1));
208 db_finalize(&q);
209 db_prepare(&q, "%s", blob_sql_text(&sql));
210
--- src/json_report.c
+++ src/json_report.c
@@ -60,11 +60,11 @@
60 ** Searches the environment for a "report" parameter
61 ** (CLI: -report/-r #).
62 **
63 ** If one is not found and argPos is >0 then json_command_arg()
64 ** is checked.
65 **
66 ** Returns >0 (the report number) on success .
67 */
68 static int json_report_get_number(int argPos){
69 int nReport = json_find_option_int("report",NULL,"r",-1);
70 if( (nReport<=0) && cson_value_is_integer(g.json.reqPayload.v)){
@@ -199,11 +199,11 @@
199 goto error;
200 }
201
202 limit = json_find_option_int("limit",NULL,"n",-1);
203
204
205 /* Copy over report's SQL...*/
206 blob_append(&sql, db_column_text(&q,0), -1);
207 zTitle = mprintf("%s", db_column_text(&q,1));
208 db_finalize(&q);
209 db_prepare(&q, "%s", blob_sql_text(&sql));
210
+6 -6
--- src/json_tag.c
+++ src/json_tag.c
@@ -79,11 +79,11 @@
7979
json_set_err(FSL_JSON_E_MISSING_ARGS,
8080
"'name' parameter is missing.");
8181
return NULL;
8282
}
8383
}
84
-
84
+
8585
zCheckin = json_find_option_cstr("checkin",NULL,NULL);
8686
if( !zCheckin ){
8787
if(!fossil_has_json()){
8888
zCheckin = json_command_arg(4);
8989
}
@@ -163,11 +163,11 @@
163163
json_set_err(FSL_JSON_E_MISSING_ARGS,
164164
"'name' parameter is missing.");
165165
return NULL;
166166
}
167167
}
168
-
168
+
169169
zCheckin = json_find_option_cstr("checkin",NULL,NULL);
170170
if( !zCheckin ){
171171
if(!fossil_has_json()){
172172
zCheckin = json_command_arg(4);
173173
}
@@ -232,15 +232,15 @@
232232
}
233233
}
234234
235235
limit = json_find_option_int("limit",NULL,"n",0);
236236
fRaw = json_find_option_bool("raw",NULL,NULL,0);
237
-
237
+
238238
tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='%s' || %Q",
239239
fRaw ? "" : "sym-",
240240
zName);
241
-
241
+
242242
payV = cson_value_new_object();
243243
pay = cson_value_get_object(payV);
244244
cson_object_set(pay, "name", json_new_string(zName));
245245
cson_object_set(pay, "raw", cson_value_new_bool(fRaw));
246246
cson_object_set(pay, "type", json_new_string(zType2));
@@ -356,11 +356,11 @@
356356
if( zCheckin ){
357357
/**
358358
Tags for a specific check-in. Output format:
359359
360360
RAW mode:
361
-
361
+
362362
{
363363
"sym-tagname": (value || null),
364364
...other tags...
365365
}
366366
@@ -412,11 +412,11 @@
412412
db_finalize(&q);
413413
}else{/* all tags */
414414
/* Output format:
415415
416416
RAW mode:
417
-
417
+
418418
["tagname", "sym-tagname2",...]
419419
420420
Non-raw:
421421
422422
["tagname", "tagname2",...]
423423
--- src/json_tag.c
+++ src/json_tag.c
@@ -79,11 +79,11 @@
79 json_set_err(FSL_JSON_E_MISSING_ARGS,
80 "'name' parameter is missing.");
81 return NULL;
82 }
83 }
84
85 zCheckin = json_find_option_cstr("checkin",NULL,NULL);
86 if( !zCheckin ){
87 if(!fossil_has_json()){
88 zCheckin = json_command_arg(4);
89 }
@@ -163,11 +163,11 @@
163 json_set_err(FSL_JSON_E_MISSING_ARGS,
164 "'name' parameter is missing.");
165 return NULL;
166 }
167 }
168
169 zCheckin = json_find_option_cstr("checkin",NULL,NULL);
170 if( !zCheckin ){
171 if(!fossil_has_json()){
172 zCheckin = json_command_arg(4);
173 }
@@ -232,15 +232,15 @@
232 }
233 }
234
235 limit = json_find_option_int("limit",NULL,"n",0);
236 fRaw = json_find_option_bool("raw",NULL,NULL,0);
237
238 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='%s' || %Q",
239 fRaw ? "" : "sym-",
240 zName);
241
242 payV = cson_value_new_object();
243 pay = cson_value_get_object(payV);
244 cson_object_set(pay, "name", json_new_string(zName));
245 cson_object_set(pay, "raw", cson_value_new_bool(fRaw));
246 cson_object_set(pay, "type", json_new_string(zType2));
@@ -356,11 +356,11 @@
356 if( zCheckin ){
357 /**
358 Tags for a specific check-in. Output format:
359
360 RAW mode:
361
362 {
363 "sym-tagname": (value || null),
364 ...other tags...
365 }
366
@@ -412,11 +412,11 @@
412 db_finalize(&q);
413 }else{/* all tags */
414 /* Output format:
415
416 RAW mode:
417
418 ["tagname", "sym-tagname2",...]
419
420 Non-raw:
421
422 ["tagname", "tagname2",...]
423
--- src/json_tag.c
+++ src/json_tag.c
@@ -79,11 +79,11 @@
79 json_set_err(FSL_JSON_E_MISSING_ARGS,
80 "'name' parameter is missing.");
81 return NULL;
82 }
83 }
84
85 zCheckin = json_find_option_cstr("checkin",NULL,NULL);
86 if( !zCheckin ){
87 if(!fossil_has_json()){
88 zCheckin = json_command_arg(4);
89 }
@@ -163,11 +163,11 @@
163 json_set_err(FSL_JSON_E_MISSING_ARGS,
164 "'name' parameter is missing.");
165 return NULL;
166 }
167 }
168
169 zCheckin = json_find_option_cstr("checkin",NULL,NULL);
170 if( !zCheckin ){
171 if(!fossil_has_json()){
172 zCheckin = json_command_arg(4);
173 }
@@ -232,15 +232,15 @@
232 }
233 }
234
235 limit = json_find_option_int("limit",NULL,"n",0);
236 fRaw = json_find_option_bool("raw",NULL,NULL,0);
237
238 tagid = db_int(0, "SELECT tagid FROM tag WHERE tagname='%s' || %Q",
239 fRaw ? "" : "sym-",
240 zName);
241
242 payV = cson_value_new_object();
243 pay = cson_value_get_object(payV);
244 cson_object_set(pay, "name", json_new_string(zName));
245 cson_object_set(pay, "raw", cson_value_new_bool(fRaw));
246 cson_object_set(pay, "type", json_new_string(zType2));
@@ -356,11 +356,11 @@
356 if( zCheckin ){
357 /**
358 Tags for a specific check-in. Output format:
359
360 RAW mode:
361
362 {
363 "sym-tagname": (value || null),
364 ...other tags...
365 }
366
@@ -412,11 +412,11 @@
412 db_finalize(&q);
413 }else{/* all tags */
414 /* Output format:
415
416 RAW mode:
417
418 ["tagname", "sym-tagname2",...]
419
420 Non-raw:
421
422 ["tagname", "tagname2",...]
423
+6 -6
--- src/json_user.c
+++ src/json_user.c
@@ -69,11 +69,11 @@
6969
db_finalize(&q);
7070
if(NULL == payV){
7171
json_set_err(FSL_JSON_E_UNKNOWN,
7272
"Could not convert user list to JSON.");
7373
}
74
- return payV;
74
+ return payV;
7575
}
7676
7777
/*
7878
** Creates a new JSON Object based on the db state of
7979
** the given user name. On error (no record found)
@@ -93,11 +93,11 @@
9393
zName);
9494
if( (SQLITE_ROW == db_step(&q)) ){
9595
u = cson_sqlite3_row_to_object(q.pStmt);
9696
}
9797
db_finalize(&q);
98
- return u;
98
+ return u;
9999
}
100100
101101
/*
102102
** Identical to json_load_user_by_name(), but expects a user ID. Returns
103103
** NULL if no user found with that ID.
@@ -115,11 +115,11 @@
115115
uid);
116116
if( (SQLITE_ROW == db_step(&q)) ){
117117
u = cson_sqlite3_row_to_object(q.pStmt);
118118
}
119119
db_finalize(&q);
120
- return u;
120
+ return u;
121121
}
122122
123123
124124
/*
125125
** Impl of /json/user/get. Requires admin or setup rights.
@@ -139,11 +139,11 @@
139139
}
140140
payV = json_load_user_by_name(pUser);
141141
if(!payV){
142142
json_set_err(FSL_JSON_E_RESOURCE_NOT_FOUND,"User not found.");
143143
}
144
- return payV;
144
+ return payV;
145145
}
146146
147147
/*
148148
** Expects pUser to contain fossil user fields in JSON form: name,
149149
** uid, info, capabilities, password.
@@ -240,11 +240,11 @@
240240
}
241241
242242
/* Maintenance note: all error-returns from here on out should go
243243
via 'goto error' in order to clean up.
244244
*/
245
-
245
+
246246
if(uid != g.userUid){
247247
if(!g.perm.Admin && !g.perm.Setup){
248248
json_set_err(FSL_JSON_E_DENIED,
249249
"Changing another user's data requires "
250250
"'a' or 's' privileges.");
@@ -336,11 +336,11 @@
336336
if((g.perm.Admin || g.perm.Setup)
337337
&& forceLogout && cson_value_get_bool(forceLogout)){
338338
blob_append(&sql, ", cookie=NULL, cexpire=NULL", -1);
339339
++gotFields;
340340
}
341
-
341
+
342342
if(!gotFields){
343343
json_set_err( FSL_JSON_E_MISSING_ARGS,
344344
"Required user data are missing.");
345345
goto error;
346346
}
347347
--- src/json_user.c
+++ src/json_user.c
@@ -69,11 +69,11 @@
69 db_finalize(&q);
70 if(NULL == payV){
71 json_set_err(FSL_JSON_E_UNKNOWN,
72 "Could not convert user list to JSON.");
73 }
74 return payV;
75 }
76
77 /*
78 ** Creates a new JSON Object based on the db state of
79 ** the given user name. On error (no record found)
@@ -93,11 +93,11 @@
93 zName);
94 if( (SQLITE_ROW == db_step(&q)) ){
95 u = cson_sqlite3_row_to_object(q.pStmt);
96 }
97 db_finalize(&q);
98 return u;
99 }
100
101 /*
102 ** Identical to json_load_user_by_name(), but expects a user ID. Returns
103 ** NULL if no user found with that ID.
@@ -115,11 +115,11 @@
115 uid);
116 if( (SQLITE_ROW == db_step(&q)) ){
117 u = cson_sqlite3_row_to_object(q.pStmt);
118 }
119 db_finalize(&q);
120 return u;
121 }
122
123
124 /*
125 ** Impl of /json/user/get. Requires admin or setup rights.
@@ -139,11 +139,11 @@
139 }
140 payV = json_load_user_by_name(pUser);
141 if(!payV){
142 json_set_err(FSL_JSON_E_RESOURCE_NOT_FOUND,"User not found.");
143 }
144 return payV;
145 }
146
147 /*
148 ** Expects pUser to contain fossil user fields in JSON form: name,
149 ** uid, info, capabilities, password.
@@ -240,11 +240,11 @@
240 }
241
242 /* Maintenance note: all error-returns from here on out should go
243 via 'goto error' in order to clean up.
244 */
245
246 if(uid != g.userUid){
247 if(!g.perm.Admin && !g.perm.Setup){
248 json_set_err(FSL_JSON_E_DENIED,
249 "Changing another user's data requires "
250 "'a' or 's' privileges.");
@@ -336,11 +336,11 @@
336 if((g.perm.Admin || g.perm.Setup)
337 && forceLogout && cson_value_get_bool(forceLogout)){
338 blob_append(&sql, ", cookie=NULL, cexpire=NULL", -1);
339 ++gotFields;
340 }
341
342 if(!gotFields){
343 json_set_err( FSL_JSON_E_MISSING_ARGS,
344 "Required user data are missing.");
345 goto error;
346 }
347
--- src/json_user.c
+++ src/json_user.c
@@ -69,11 +69,11 @@
69 db_finalize(&q);
70 if(NULL == payV){
71 json_set_err(FSL_JSON_E_UNKNOWN,
72 "Could not convert user list to JSON.");
73 }
74 return payV;
75 }
76
77 /*
78 ** Creates a new JSON Object based on the db state of
79 ** the given user name. On error (no record found)
@@ -93,11 +93,11 @@
93 zName);
94 if( (SQLITE_ROW == db_step(&q)) ){
95 u = cson_sqlite3_row_to_object(q.pStmt);
96 }
97 db_finalize(&q);
98 return u;
99 }
100
101 /*
102 ** Identical to json_load_user_by_name(), but expects a user ID. Returns
103 ** NULL if no user found with that ID.
@@ -115,11 +115,11 @@
115 uid);
116 if( (SQLITE_ROW == db_step(&q)) ){
117 u = cson_sqlite3_row_to_object(q.pStmt);
118 }
119 db_finalize(&q);
120 return u;
121 }
122
123
124 /*
125 ** Impl of /json/user/get. Requires admin or setup rights.
@@ -139,11 +139,11 @@
139 }
140 payV = json_load_user_by_name(pUser);
141 if(!payV){
142 json_set_err(FSL_JSON_E_RESOURCE_NOT_FOUND,"User not found.");
143 }
144 return payV;
145 }
146
147 /*
148 ** Expects pUser to contain fossil user fields in JSON form: name,
149 ** uid, info, capabilities, password.
@@ -240,11 +240,11 @@
240 }
241
242 /* Maintenance note: all error-returns from here on out should go
243 via 'goto error' in order to clean up.
244 */
245
246 if(uid != g.userUid){
247 if(!g.perm.Admin && !g.perm.Setup){
248 json_set_err(FSL_JSON_E_DENIED,
249 "Changing another user's data requires "
250 "'a' or 's' privileges.");
@@ -336,11 +336,11 @@
336 if((g.perm.Admin || g.perm.Setup)
337 && forceLogout && cson_value_get_bool(forceLogout)){
338 blob_append(&sql, ", cookie=NULL, cexpire=NULL", -1);
339 ++gotFields;
340 }
341
342 if(!gotFields){
343 json_set_err( FSL_JSON_E_MISSING_ARGS,
344 "Required user data are missing.");
345 goto error;
346 }
347
+8 -8
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -155,11 +155,11 @@
155155
}
156156
/*TODO: add 'T' (tag) fields*/
157157
/*TODO: add the 'A' card (file attachment) entries?*/
158158
manifest_destroy(pWiki);
159159
return cson_object_value(pay);
160
- }
160
+ }
161161
}
162162
163163
/*
164164
** Searches for the latest version of a wiki page with the given
165165
** name. If found it behaves like json_get_wiki_page_by_rid(theRid,
@@ -170,11 +170,11 @@
170170
rid = db_int(0,
171171
"SELECT x.rid FROM tag t, tagxref x, blob b"
172172
" WHERE x.tagid=t.tagid AND t.tagname='wiki-%q' "
173173
" AND b.rid=x.rid"
174174
" ORDER BY x.mtime DESC LIMIT 1",
175
- zPageName
175
+ zPageName
176176
);
177177
if( 0==rid ){
178178
json_set_err( FSL_JSON_E_RESOURCE_NOT_FOUND, "Wiki page not found: %s",
179179
zPageName );
180180
return NULL;
@@ -256,21 +256,21 @@
256256
return NULL;
257257
}
258258
zPageName = json_find_option_cstr2("name",NULL,"n",g.json.dispatchDepth+1);
259259
260260
zSymName = json_find_option_cstr("uuid",NULL,"u");
261
-
261
+
262262
if((!zPageName||!*zPageName) && (!zSymName || !*zSymName)){
263263
json_set_err(FSL_JSON_E_MISSING_ARGS,
264264
"At least one of the 'name' or 'uuid' arguments must be provided.");
265265
return NULL;
266266
}
267267
268268
/* TODO: see if we have a page named zPageName. If not, try to resolve
269269
zPageName as a UUID.
270270
*/
271
-
271
+
272272
contentFormat = json_wiki_get_content_format_flag(contentFormat);
273273
return json_wiki_get_by_name_or_symname( zPageName, zSymName, contentFormat );
274274
}
275275
276276
/*
@@ -524,19 +524,19 @@
524524
json_set_err(FSL_JSON_E_DENIED,
525525
"Requires 'h' permissions.");
526526
return NULL;
527527
}
528528
529
-
529
+
530530
zV1 = json_find_option_cstr2( "v1",NULL, NULL, ++argPos );
531531
zV2 = json_find_option_cstr2( "v2",NULL, NULL, ++argPos );
532532
if(!zV1 || !*zV1 || !zV2 || !*zV2) {
533533
json_set_err(FSL_JSON_E_INVALID_ARGS,
534534
"Requires both 'v1' and 'v2' arguments.");
535535
return NULL;
536536
}
537
-
537
+
538538
r1 = symbolic_name_to_rid( zV1, "w" );
539539
zErrTag = zV1;
540540
if(r1<0){
541541
goto ambiguous;
542542
}else if(0==r1){
@@ -570,11 +570,11 @@
570570
text_diff(&w1, &w2, &d, 0, diffFlags);
571571
blob_reset(&w1);
572572
blob_reset(&w2);
573573
574574
pay = cson_new_object();
575
-
575
+
576576
zUuid = json_wiki_get_uuid_for_rid( pW1->rid );
577577
cson_object_set(pay, "v1", json_new_string(zUuid) );
578578
free(zUuid);
579579
zUuid = json_wiki_get_uuid_for_rid( pW2->rid );
580580
cson_object_set(pay, "v2", json_new_string(zUuid) );
@@ -585,11 +585,11 @@
585585
manifest_destroy(pW2);
586586
587587
cson_object_set(pay, "diff",
588588
cson_value_new_string( blob_str(&d),
589589
(unsigned int)blob_size(&d)));
590
-
590
+
591591
return cson_object_value(pay);
592592
593593
manifest:
594594
json_set_err(FSL_JSON_E_UNKNOWN,
595595
"Could not load wiki manifest for UUID [%s].",
596596
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -155,11 +155,11 @@
155 }
156 /*TODO: add 'T' (tag) fields*/
157 /*TODO: add the 'A' card (file attachment) entries?*/
158 manifest_destroy(pWiki);
159 return cson_object_value(pay);
160 }
161 }
162
163 /*
164 ** Searches for the latest version of a wiki page with the given
165 ** name. If found it behaves like json_get_wiki_page_by_rid(theRid,
@@ -170,11 +170,11 @@
170 rid = db_int(0,
171 "SELECT x.rid FROM tag t, tagxref x, blob b"
172 " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q' "
173 " AND b.rid=x.rid"
174 " ORDER BY x.mtime DESC LIMIT 1",
175 zPageName
176 );
177 if( 0==rid ){
178 json_set_err( FSL_JSON_E_RESOURCE_NOT_FOUND, "Wiki page not found: %s",
179 zPageName );
180 return NULL;
@@ -256,21 +256,21 @@
256 return NULL;
257 }
258 zPageName = json_find_option_cstr2("name",NULL,"n",g.json.dispatchDepth+1);
259
260 zSymName = json_find_option_cstr("uuid",NULL,"u");
261
262 if((!zPageName||!*zPageName) && (!zSymName || !*zSymName)){
263 json_set_err(FSL_JSON_E_MISSING_ARGS,
264 "At least one of the 'name' or 'uuid' arguments must be provided.");
265 return NULL;
266 }
267
268 /* TODO: see if we have a page named zPageName. If not, try to resolve
269 zPageName as a UUID.
270 */
271
272 contentFormat = json_wiki_get_content_format_flag(contentFormat);
273 return json_wiki_get_by_name_or_symname( zPageName, zSymName, contentFormat );
274 }
275
276 /*
@@ -524,19 +524,19 @@
524 json_set_err(FSL_JSON_E_DENIED,
525 "Requires 'h' permissions.");
526 return NULL;
527 }
528
529
530 zV1 = json_find_option_cstr2( "v1",NULL, NULL, ++argPos );
531 zV2 = json_find_option_cstr2( "v2",NULL, NULL, ++argPos );
532 if(!zV1 || !*zV1 || !zV2 || !*zV2) {
533 json_set_err(FSL_JSON_E_INVALID_ARGS,
534 "Requires both 'v1' and 'v2' arguments.");
535 return NULL;
536 }
537
538 r1 = symbolic_name_to_rid( zV1, "w" );
539 zErrTag = zV1;
540 if(r1<0){
541 goto ambiguous;
542 }else if(0==r1){
@@ -570,11 +570,11 @@
570 text_diff(&w1, &w2, &d, 0, diffFlags);
571 blob_reset(&w1);
572 blob_reset(&w2);
573
574 pay = cson_new_object();
575
576 zUuid = json_wiki_get_uuid_for_rid( pW1->rid );
577 cson_object_set(pay, "v1", json_new_string(zUuid) );
578 free(zUuid);
579 zUuid = json_wiki_get_uuid_for_rid( pW2->rid );
580 cson_object_set(pay, "v2", json_new_string(zUuid) );
@@ -585,11 +585,11 @@
585 manifest_destroy(pW2);
586
587 cson_object_set(pay, "diff",
588 cson_value_new_string( blob_str(&d),
589 (unsigned int)blob_size(&d)));
590
591 return cson_object_value(pay);
592
593 manifest:
594 json_set_err(FSL_JSON_E_UNKNOWN,
595 "Could not load wiki manifest for UUID [%s].",
596
--- src/json_wiki.c
+++ src/json_wiki.c
@@ -155,11 +155,11 @@
155 }
156 /*TODO: add 'T' (tag) fields*/
157 /*TODO: add the 'A' card (file attachment) entries?*/
158 manifest_destroy(pWiki);
159 return cson_object_value(pay);
160 }
161 }
162
163 /*
164 ** Searches for the latest version of a wiki page with the given
165 ** name. If found it behaves like json_get_wiki_page_by_rid(theRid,
@@ -170,11 +170,11 @@
170 rid = db_int(0,
171 "SELECT x.rid FROM tag t, tagxref x, blob b"
172 " WHERE x.tagid=t.tagid AND t.tagname='wiki-%q' "
173 " AND b.rid=x.rid"
174 " ORDER BY x.mtime DESC LIMIT 1",
175 zPageName
176 );
177 if( 0==rid ){
178 json_set_err( FSL_JSON_E_RESOURCE_NOT_FOUND, "Wiki page not found: %s",
179 zPageName );
180 return NULL;
@@ -256,21 +256,21 @@
256 return NULL;
257 }
258 zPageName = json_find_option_cstr2("name",NULL,"n",g.json.dispatchDepth+1);
259
260 zSymName = json_find_option_cstr("uuid",NULL,"u");
261
262 if((!zPageName||!*zPageName) && (!zSymName || !*zSymName)){
263 json_set_err(FSL_JSON_E_MISSING_ARGS,
264 "At least one of the 'name' or 'uuid' arguments must be provided.");
265 return NULL;
266 }
267
268 /* TODO: see if we have a page named zPageName. If not, try to resolve
269 zPageName as a UUID.
270 */
271
272 contentFormat = json_wiki_get_content_format_flag(contentFormat);
273 return json_wiki_get_by_name_or_symname( zPageName, zSymName, contentFormat );
274 }
275
276 /*
@@ -524,19 +524,19 @@
524 json_set_err(FSL_JSON_E_DENIED,
525 "Requires 'h' permissions.");
526 return NULL;
527 }
528
529
530 zV1 = json_find_option_cstr2( "v1",NULL, NULL, ++argPos );
531 zV2 = json_find_option_cstr2( "v2",NULL, NULL, ++argPos );
532 if(!zV1 || !*zV1 || !zV2 || !*zV2) {
533 json_set_err(FSL_JSON_E_INVALID_ARGS,
534 "Requires both 'v1' and 'v2' arguments.");
535 return NULL;
536 }
537
538 r1 = symbolic_name_to_rid( zV1, "w" );
539 zErrTag = zV1;
540 if(r1<0){
541 goto ambiguous;
542 }else if(0==r1){
@@ -570,11 +570,11 @@
570 text_diff(&w1, &w2, &d, 0, diffFlags);
571 blob_reset(&w1);
572 blob_reset(&w2);
573
574 pay = cson_new_object();
575
576 zUuid = json_wiki_get_uuid_for_rid( pW1->rid );
577 cson_object_set(pay, "v1", json_new_string(zUuid) );
578 free(zUuid);
579 zUuid = json_wiki_get_uuid_for_rid( pW2->rid );
580 cson_object_set(pay, "v2", json_new_string(zUuid) );
@@ -585,11 +585,11 @@
585 manifest_destroy(pW2);
586
587 cson_object_set(pay, "diff",
588 cson_value_new_string( blob_str(&d),
589 (unsigned int)blob_size(&d)));
590
591 return cson_object_value(pay);
592
593 manifest:
594 json_set_err(FSL_JSON_E_UNKNOWN,
595 "Could not load wiki manifest for UUID [%s].",
596
+1 -1
--- src/main.c
+++ src/main.c
@@ -1616,11 +1616,11 @@
16161616
zNotFound = azRedirect[i*2+1];
16171617
continue;
16181618
}
16191619
db_open_repository(azRedirect[i*2]);
16201620
if( db_exists("SELECT 1 FROM blob WHERE uuid GLOB '%q*'", zName) ||
1621
- db_exists("SELECT 1 FROM ticket WHERE tkt_uuid GLOB '%q*'", zName) ){
1621
+ db_exists("SELECT 1 FROM ticket WHERE tkt_uuid GLOB '%q*'", zName) ){
16221622
cgi_redirectf(azRedirect[i*2+1] /*works-like:"%s"*/, zName);
16231623
return;
16241624
}
16251625
db_close(1);
16261626
}
16271627
--- src/main.c
+++ src/main.c
@@ -1616,11 +1616,11 @@
1616 zNotFound = azRedirect[i*2+1];
1617 continue;
1618 }
1619 db_open_repository(azRedirect[i*2]);
1620 if( db_exists("SELECT 1 FROM blob WHERE uuid GLOB '%q*'", zName) ||
1621 db_exists("SELECT 1 FROM ticket WHERE tkt_uuid GLOB '%q*'", zName) ){
1622 cgi_redirectf(azRedirect[i*2+1] /*works-like:"%s"*/, zName);
1623 return;
1624 }
1625 db_close(1);
1626 }
1627
--- src/main.c
+++ src/main.c
@@ -1616,11 +1616,11 @@
1616 zNotFound = azRedirect[i*2+1];
1617 continue;
1618 }
1619 db_open_repository(azRedirect[i*2]);
1620 if( db_exists("SELECT 1 FROM blob WHERE uuid GLOB '%q*'", zName) ||
1621 db_exists("SELECT 1 FROM ticket WHERE tkt_uuid GLOB '%q*'", zName) ){
1622 cgi_redirectf(azRedirect[i*2+1] /*works-like:"%s"*/, zName);
1623 return;
1624 }
1625 db_close(1);
1626 }
1627
--- src/makeheaders.html
+++ src/makeheaders.html
@@ -1100,11 +1100,11 @@
11001100
<a name="H0017"></a>
11011101
<h2>6.0 History</h2>
11021102
11031103
<p>
11041104
The makeheaders program was first written by D. Richard Hipp
1105
-(also the original author of
1105
+(also the original author of
11061106
<a href="https://sqlite.org/">SQLite</a> and
11071107
<a href="https://www.fossil-scm.org/">Fossil</a>) in 1993.
11081108
Hipp open-sourced the project immediately, but it never caught
11091109
on with any other developers and it continued to be used mostly
11101110
by Hipp himself for over a decade. When Hipp was first writing
11111111
--- src/makeheaders.html
+++ src/makeheaders.html
@@ -1100,11 +1100,11 @@
1100 <a name="H0017"></a>
1101 <h2>6.0 History</h2>
1102
1103 <p>
1104 The makeheaders program was first written by D. Richard Hipp
1105 (also the original author of
1106 <a href="https://sqlite.org/">SQLite</a> and
1107 <a href="https://www.fossil-scm.org/">Fossil</a>) in 1993.
1108 Hipp open-sourced the project immediately, but it never caught
1109 on with any other developers and it continued to be used mostly
1110 by Hipp himself for over a decade. When Hipp was first writing
1111
--- src/makeheaders.html
+++ src/makeheaders.html
@@ -1100,11 +1100,11 @@
1100 <a name="H0017"></a>
1101 <h2>6.0 History</h2>
1102
1103 <p>
1104 The makeheaders program was first written by D. Richard Hipp
1105 (also the original author of
1106 <a href="https://sqlite.org/">SQLite</a> and
1107 <a href="https://www.fossil-scm.org/">Fossil</a>) in 1993.
1108 Hipp open-sourced the project immediately, but it never caught
1109 on with any other developers and it continued to be used mostly
1110 by Hipp himself for over a decade. When Hipp was first writing
1111
+1 -1
--- src/printf.c
+++ src/printf.c
@@ -650,11 +650,11 @@
650650
if( bufpt==0 ){
651651
bufpt = "";
652652
}else if( xtype==etDYNSTRING ){
653653
zExtra = bufpt;
654654
}else if( xtype==etSTRINGID ){
655
- precision = hashDigits(flag_altform2);
655
+ precision = hashDigits(flag_altform2);
656656
}
657657
length = StrNLen32(bufpt, limit);
658658
if( precision>=0 && precision<length ) length = precision;
659659
break;
660660
}
661661
--- src/printf.c
+++ src/printf.c
@@ -650,11 +650,11 @@
650 if( bufpt==0 ){
651 bufpt = "";
652 }else if( xtype==etDYNSTRING ){
653 zExtra = bufpt;
654 }else if( xtype==etSTRINGID ){
655 precision = hashDigits(flag_altform2);
656 }
657 length = StrNLen32(bufpt, limit);
658 if( precision>=0 && precision<length ) length = precision;
659 break;
660 }
661
--- src/printf.c
+++ src/printf.c
@@ -650,11 +650,11 @@
650 if( bufpt==0 ){
651 bufpt = "";
652 }else if( xtype==etDYNSTRING ){
653 zExtra = bufpt;
654 }else if( xtype==etSTRINGID ){
655 precision = hashDigits(flag_altform2);
656 }
657 length = StrNLen32(bufpt, limit);
658 if( precision>=0 && precision<length ) length = precision;
659 break;
660 }
661
--- test/diff-test-1.wiki
+++ test/diff-test-1.wiki
@@ -1,9 +1,9 @@
11
<title>Graph Test One</title>
22
33
This page contains list of URLs of interesting diffs.
4
-Click on all URLs, one by one, to verify
4
+Click on all URLs, one by one, to verify
55
the correct operation of the diff logic.
66
77
* <a href="../../../info/030035345c#chunk73" target="testwindow">
88
Multiple edits on a single line.</a> This is an SQLite version
99
update diff. It is a large diff and contains many other interesting
1010
--- test/diff-test-1.wiki
+++ test/diff-test-1.wiki
@@ -1,9 +1,9 @@
1 <title>Graph Test One</title>
2
3 This page contains list of URLs of interesting diffs.
4 Click on all URLs, one by one, to verify
5 the correct operation of the diff logic.
6
7 * <a href="../../../info/030035345c#chunk73" target="testwindow">
8 Multiple edits on a single line.</a> This is an SQLite version
9 update diff. It is a large diff and contains many other interesting
10
--- test/diff-test-1.wiki
+++ test/diff-test-1.wiki
@@ -1,9 +1,9 @@
1 <title>Graph Test One</title>
2
3 This page contains list of URLs of interesting diffs.
4 Click on all URLs, one by one, to verify
5 the correct operation of the diff logic.
6
7 * <a href="../../../info/030035345c#chunk73" target="testwindow">
8 Multiple edits on a single line.</a> This is an SQLite version
9 update diff. It is a large diff and contains many other interesting
10
--- test/merge1.test
+++ test/merge1.test
@@ -337,11 +337,11 @@
337337
338338
write_file_indented t2 {
339339
abcd
340340
efgh 2
341341
ijkl 2
342
- mnop
342
+ mnop
343343
qrst
344344
uvwx
345345
yzAB 2
346346
CDEF 2
347347
GHIJ 2
@@ -368,11 +368,11 @@
368368
write_file_indented t23 {
369369
abcd
370370
<<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
371371
efgh 2
372372
ijkl 2
373
- mnop
373
+ mnop
374374
qrst
375375
uvwx
376376
yzAB 2
377377
CDEF 2
378378
GHIJ 2
379379
--- test/merge1.test
+++ test/merge1.test
@@ -337,11 +337,11 @@
337
338 write_file_indented t2 {
339 abcd
340 efgh 2
341 ijkl 2
342 mnop
343 qrst
344 uvwx
345 yzAB 2
346 CDEF 2
347 GHIJ 2
@@ -368,11 +368,11 @@
368 write_file_indented t23 {
369 abcd
370 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
371 efgh 2
372 ijkl 2
373 mnop
374 qrst
375 uvwx
376 yzAB 2
377 CDEF 2
378 GHIJ 2
379
--- test/merge1.test
+++ test/merge1.test
@@ -337,11 +337,11 @@
337
338 write_file_indented t2 {
339 abcd
340 efgh 2
341 ijkl 2
342 mnop
343 qrst
344 uvwx
345 yzAB 2
346 CDEF 2
347 GHIJ 2
@@ -368,11 +368,11 @@
368 write_file_indented t23 {
369 abcd
370 <<<<<<< BEGIN MERGE CONFLICT: local copy shown first <<<<<<<<<<<<<<<
371 efgh 2
372 ijkl 2
373 mnop
374 qrst
375 uvwx
376 yzAB 2
377 CDEF 2
378 GHIJ 2
379
--- test/merge3.test
+++ test/merge3.test
@@ -295,11 +295,11 @@
295295
} {
296296
6 7 8
297297
} {
298298
2 3 4 5
299299
} {
300
-
300
+
301301
}
302302
merge-test 44 {
303303
2 3 4 5 6 7 8
304304
} {
305305
6 7 8
306306
--- test/merge3.test
+++ test/merge3.test
@@ -295,11 +295,11 @@
295 } {
296 6 7 8
297 } {
298 2 3 4 5
299 } {
300
301 }
302 merge-test 44 {
303 2 3 4 5 6 7 8
304 } {
305 6 7 8
306
--- test/merge3.test
+++ test/merge3.test
@@ -295,11 +295,11 @@
295 } {
296 6 7 8
297 } {
298 2 3 4 5
299 } {
300
301 }
302 merge-test 44 {
303 2 3 4 5 6 7 8
304 } {
305 6 7 8
306
--- test/merge5.test
+++ test/merge5.test
@@ -33,11 +33,11 @@
3333
protOut " Expected:\n $expected"
3434
protOut " Got:\n $result"
3535
test merge5-$testid 0
3636
} else {
3737
test merge5-$testid 1
38
- }
38
+ }
3939
}
4040
4141
require_no_open_checkout; test_setup ""
4242
4343
# Construct a test repository
4444
--- test/merge5.test
+++ test/merge5.test
@@ -33,11 +33,11 @@
33 protOut " Expected:\n $expected"
34 protOut " Got:\n $result"
35 test merge5-$testid 0
36 } else {
37 test merge5-$testid 1
38 }
39 }
40
41 require_no_open_checkout; test_setup ""
42
43 # Construct a test repository
44
--- test/merge5.test
+++ test/merge5.test
@@ -33,11 +33,11 @@
33 protOut " Expected:\n $expected"
34 protOut " Got:\n $result"
35 test merge5-$testid 0
36 } else {
37 test merge5-$testid 1
38 }
39 }
40
41 require_no_open_checkout; test_setup ""
42
43 # Construct a test repository
44
--- test/revert.test
+++ test/revert.test
@@ -15,11 +15,11 @@
1515
#
1616
############################################################################
1717
#
1818
#
1919
# Tests for 'fossil revert'
20
-#
20
+#
2121
#
2222
2323
# Test 'fossil revert' against expected results from 'fossil changes' and
2424
# 'fossil addremove -n', as well as by verifying the existence of files
2525
# on the file system. 'fossil undo' is called after each test
2626
--- test/revert.test
+++ test/revert.test
@@ -15,11 +15,11 @@
15 #
16 ############################################################################
17 #
18 #
19 # Tests for 'fossil revert'
20 #
21 #
22
23 # Test 'fossil revert' against expected results from 'fossil changes' and
24 # 'fossil addremove -n', as well as by verifying the existence of files
25 # on the file system. 'fossil undo' is called after each test
26
--- test/revert.test
+++ test/revert.test
@@ -15,11 +15,11 @@
15 #
16 ############################################################################
17 #
18 #
19 # Tests for 'fossil revert'
20 #
21 #
22
23 # Test 'fossil revert' against expected results from 'fossil changes' and
24 # 'fossil addremove -n', as well as by verifying the existence of files
25 # on the file system. 'fossil undo' is called after each test
26

Keyboard Shortcuts

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