Fossil

File History
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History of src/json.c

2018-01-16
16:30
Update the codecheck1.c utility program to find unsafe format strings for recently added varargs functions. Fix unsafe varargs found by this update. This is a continuation of the fix in check-in [3c2ef25d03fb48d5]. file: [20b82a01] check-in: [2fac7df4] user: drh branch: trunk, size: 73132
2017-11-30
17:58
Refactor the symlink processing logic so that most of the file access routines take a new parameter indicating the conditions under which symlinks should and should not be followed. This should fix a few bugs related to symlink processing. Lots of testing required before merging to trunk. file: [31bebf94] check-in: [e7767de2] user: drh branch: symlink-refactor, size: 73126
2017-08-30
14:15
Removed dead reference to g.fNoDirSymlinks. file: [d60c46e8] check-in: [949d777d] user: stephan branch: trunk, size: 73098
2017-03-15
00:41
Added missing reference to the -json-input flag for the json command. file: [cc8d06a2] check-in: [2accaaee] user: stephan branch: trunk, size: 73124
2017-02-01
04:40
Rename and repurpose '--no-symlinks' into '--no-dir-symlinks', to prevent traversing into symlinked directories. Make the '--verily' option to 'clean' imply '--no-dir-symlinks'. file: [f5b7fdcd] check-in: [66406ae9] user: mistachkin branch: noSymlinks, size: 72957
02:16
Add the --no-symlinks global command line option. file: [8fc2bf0d] check-in: [85277aa3] user: mistachkin branch: noSymlinks, size: 72954
2016-08-20
18:16
Fix compilation errors when the JSON feature is enabled. file: [dc2c7f14] check-in: [e2f4f1f8] user: mistachkin branch: omit-db_name, size: 72931
2016-08-19
00:13
Use the new SQLITE_DBCONFIG_MAINDBNAME feature of SQLite to eliminate the need for the db_name() hack. file: [74634a69] check-in: [d858f3da] user: drh branch: omit-db_name, size: 73000
2016-02-09
14:12
json: added a few assertions and changed a few chars to ints to avoid potential signedness problems on ARM. file: [6df1d80d] check-in: [5c0dc2d3] user: stephan branch: trunk, size: 73057
2015-09-16
09:18
Add some "const" keywords in appropriate places. No change in functionality. Eliminates some compiler warnings. file: [18266f27] check-in: [a6fd491d] user: jan.nijtmans branch: trunk, size: 72737
2015-04-08
05:06
Check versioned settings (namely, allow-symlinks) during open. file: [4bfa5f91] check-in: [6a4c3c5e] user: andygoth branch: andygoth-versioned-open, size: 72739
2014-10-20
15:01
Add a custom static analysis program that verifies the arguments to printf-style varargs routines used in Fossil. Adjust the source code to be more robust for printf format errors and to fix a few minor problems found by the static checker. file: [f3969a83] check-in: [0a7e326f] user: drh branch: compile-time-print-checking, size: 72713
2014-09-11
17:25
char-vs-int fixes in the JSON API: caused underflow (and thus incorrect is-flag-set results) on platforms where char is unsigned (Linux/ARM). file: [9b2f51d1] check-in: [57f0bb98] user: stephan branch: trunk, size: 72678
2014-06-12
17:26
merge trunk file: [57a764cb] check-in: [e751da62] user: jan.nijtmans branch: win32-longpath, size: 72701
2014-03-31
17:31
Fixed json.c for g.url changes which could not have been caught by search/replace b/c they are macro-generated. file: [68917a4b] check-in: [bcae843a] user: stephan branch: trunk, size: 72686
2014-02-15
03:03
Further improve reporting of the compiler version information. file: [d3104315] check-in: [b065aff4] user: mistachkin branch: trunk, size: 72672
2013-11-29
11:26
When configuring fossil using "--disable-internal-sqlite" (having SQLite 3.8.1 installed), "./fossil version -v" gives: "SQLite 3.8.2 2013-11-27 14:50:51 c75f561f33", which was not the SQLite version compiled with, neither the SQLite version actually running (3.8.1). file: [814026f0] check-in: [d7806931] user: jan.nijtmans branch: trunk, size: 72672
2013-11-07
13:29
Use fossil_getenv/fossil_fopen in stead of getenv/fopen in a few places, so on Win32 non-ASCII characters in filenames and environment variable values are handled correctly. For shell.c this must be handled by the makefiles, because this file comes from SQLite. file: [bf7c3a16] check-in: [aab8ce2f] user: jan.nijtmans branch: trunk, size: 72662
2013-08-16
03:25
Merge in all new development from trunk. file: [00ee1a79] check-in: [535cba91] user: andybradford branch: ssh-test-http, size: 72633
2013-08-13
13:37
c/the the/the/ file: [7ef14201] check-in: [0b75e2e6] user: jan.nijtmans branch: trunk, size: 72655
2013-07-16
05:47
Remove old SSH transport code and spawn remote fossil http as remote SSH command instead. Also make it possible to configure SSH command prior to cloning. Change remote fossil command to be configurable (really this should probably be simply a matter of fixing PATH on remote end). file: [c1205a3d] check-in: [c38ff36d] user: amb branch: ssh-transport-changes, size: 72637
2013-06-21
07:25
Allow i64 type to be used in JSON in more places, mainly for time values and file sizes. file: [dffc6aee] check-in: [f89a32d7] user: jan.nijtmans branch: trunk, size: 72659
2013-06-20
13:56
Change return type of db_last_insert_rowid() to size_t. file: [fc711732] check-in: [e1cb483a] user: jan.nijtmans branch: size_t-rcvid, size: 72664
2013-05-08
20:09
Reworked the timer IDs to be positive values to simplify error checking a bit. file: [c376d899] check-in: [79945897] user: stephan branch: trunk, size: 72659
19:54
Added fossil_timer_is_active(timerId), removed fossil_has_timer(). file: [32b0f054] check-in: [590406df] user: stephan branch: trunk, size: 72645
19:45
Added fossil_timer_xxx() family of functions and g.mainTimerId. file: [fd270b11] check-in: [e28433a6] user: stephan branch: trunk, size: 72547
2013-04-27
01:28
Added --verbose|-v as alias for --full|-f option to /json/stat, per ML discussion. Removed a stray 's' character, probably a result of a mis-pressed Ctrl-S. file: [8cf587d7] check-in: [e07e1f66] user: stephan branch: trunk, size: 75900
2013-04-26
08:28
Rename --detail, --showfiles, --files to -v|--verbose (but keep original as deprecated) file: [4de91387] check-in: [34ed0afc] user: jan.nijtmans branch: verbose, size: 75977
2013-03-05
12:25
style: use g.zConfigDbName in stead of g.configDbName, as all other strings. file: [e4b806d8] check-in: [a5dc5332] user: jan.nijtmans branch: trunk, size: 75844
12:17
Add check for win32/cygwin whether the config-db is writable in stead of checking that the $HOME directory is writable. Eliminate g.zHome and g.configOpen, in stead use a single g.configDbName. Then people no longer have to guess whether the config db name is ".fossil" or "_fossil". g.zHome was only used for locating the config db, nothing else. file: [7914e0fb] check-in: [473e08a6] user: jan.nijtmans branch: trunk, size: 75843
2013-02-23
10:58
Added /json/status command. file: [1bc9c204] check-in: [d1e4d100] user: stephan branch: trunk, size: 75858
2013-02-21
11:45
more unused variables file: [0ab64b6a] check-in: [1a2e1ea0] user: jan.nijtmans branch: trunk, size: 75501
2013-01-18
11:06
Changed days-per-year from 365.24 to 365.2425, which is (per Wikipedia) more correct over longer time periods (patch from J. van den Hoff). Removed serverId from /json/stat output, analog to commit [6bb63a7364]. file: [b7fa6b4d] check-in: [823d3ed6] user: stephan branch: trunk, size: 75524
2012-11-22
10:16
Modify db_open_config() and associated routines to make their internal state more consistent and discoverable. file: [7c2b9fa4] check-in: [52a68687] user: mistachkin branch: dbOpenConfig, size: 75610
2012-11-04
12:59
Fix typos. file: [b36b961f] check-in: [45065c5c] user: dmitry branch: spelling, size: 75584
2012-11-02
03:30
Add the new moderation permissions to the list maintained by the JSON code. file: [d13b2234] check-in: [1cc7e8ce] user: mistachkin branch: trunk, size: 75584
2012-09-24
09:03
modified fix for [c8c0b78c84], which no longer causes "Usage" printouts to use the full fossil path, even though the command line didn't use the full path file: [6ae61780] check-in: [dacc6946] user: jan.nijtmans branch: trunk, size: 75521
2012-09-02
19:39
Minor additional fixes related to [c8c0b78c84]: - Use _wsystem() in stead of system() on Windows - Use g.argv[0] in stead of fossil_nameofexe() where only printing is involved - Use fossil_nameofexe() where fossil_system() is involved - Move the determination of the full windows path to fossil_nameofexec, so g.argv[0] can always be the unmodified argv[0] - g.argv[0] and fossil_nameofexec() are in utf-8, so we cannot use fprintf directly. Exception: when printing malloc errors. file: [542f41ac] check-in: [be06861f] user: jan.nijtmans branch: ticket-c8c0b78c84, size: 75566
2012-08-29
14:12
merge trunk file: [7cec625f] check-in: [c0378084] user: jan.nijtmans branch: eclipse-project, size: 75590
13:57
Allow UTF-8 characters in sources. translate.exe will translate it to ASCII file: [de26dedc] check-in: [9f6abc59] user: jan.nijtmans branch: msvc-broken, size: 75583
2012-08-22
13:47
new functions fossil_unicode_to_utf8 and fossil_utf8_to_unicode. Modify file_delete, file_tempname, fossil_getenv and fossil_fopen to use it, so now they can handle all unicode characters not only the ones from the mbcs This should allow all filenames and environment variables to contain unicode characters, without problems on WIN32. If main.c is compiled with -DUNICODE -D_UNICODE, then command line arguments allow unicode characters on win32 as well. Build system not adapted for that yet. file: [240cc438] check-in: [65c8ca05] user: jan.nijtmans branch: eclipse-project, size: 75591
2012-07-13
16:56
help text updates. file: [4d41e2be] check-in: [91a740e8] user: stephan branch: trunk, size: 75584
15:06
Several minor internal cleanups to the json code which i thought i had committed last week :/. file: [7f3a2ef3] check-in: [055dfb12] user: stephan branch: trunk, size: 75629
2012-07-05
19:24
Minor interal json refactoring made possible by recent cson changes. file: [d87e42d7] check-in: [e40e79b7] user: stephan branch: trunk, size: 75623
19:03
Pulled in latest cson amalgamation for the cson_type_id addition and started refactoring some O(N) lookups to O(1) based on that addition. file: [9562b606] check-in: [cde55bd7] user: stephan branch: trunk, size: 75656
2012-07-03
21:30
minor cleanups made possible by newer cson APIs. file: [7bdc00d9] check-in: [9be377fe] user: stephan branch: trunk, size: 75417
21:07
Replaced a malloc()/free() with fossil_malloc()/free() and removed the corresponding NULL check (fossil_malloc() dies on error). file: [b688e477] check-in: [6ad70288] user: stephan branch: trunk, size: 75605
2012-06-29
15:59
Update to the latest SQLite4 that requires converting preprocessor macro prefixes from "SQLITE_" to "SQLITE4_". file: [d86a79aa] check-in: [0328d681] user: drh branch: sqlite4, size: 75661
2012-06-27
12:30
Begin a branch that is modified to use sqlite4 instead of sqlite3 as the storage engine. This check-in compiles (on unix) but does not work. file: [8cfd429b] check-in: [68239127] user: drh branch: sqlite4, size: 75651
2012-06-24
03:47
Re-added the jsonApiVersion field to /json/version output. Not sure why i had removed it. /json/report/create now fails with an NYI error instead of succeeding but doing nothing. file: [e5de2245] check-in: [bbcc8fe3] user: stephan branch: trunk, size: 75646
2012-06-20
16:47
comment-after-#ifdef patch from Alexander Orefkov. file: [3326ec23] check-in: [c5d56e49] user: stephan branch: trunk, size: 75650
2012-06-19
13:04
Fix several MSVC compiler warnings, including a couple C99-isms. file: [e481f374] check-in: [80bfcee8] user: mistachkin branch: trunk, size: 75650
2012-04-28
12:07
s/History/Hyperlink/ to accommodate API change. file: [47a98bee] check-in: [89f37c04] user: stephan branch: trunk, size: 75641
2012-03-25
01:27
fixed a horrible varargs misuse. file: [447e8b73] check-in: [a596198c] user: stephan branch: trunk, size: 75655
00:52
switched from vmprintf() to sqlite3_mprintf() to get the extra percent format modifiers. file: [682eae76] check-in: [3acdc5e4] user: stephan branch: trunk, size: 75654
2012-03-18
03:37
removed jsonApiVersion property for the time being. file: [69168bde] check-in: [bf903a4b] user: stephan branch: trunk, size: 75639
2012-03-16
19:01
Removed a duplicated function (different name, same code). file: [737e847b] check-in: [116a0986] user: stephan branch: trunk, size: 75635
15:21
Added initial /json/dir implementation. file: [fee5bce8] check-in: [318a0ac1] user: stephan branch: trunk, size: 75875
2012-03-09
18:43
Added jsonApiVersion to /json/version output. file: [2a637003] check-in: [24d830ca] user: stephan branch: trunk, size: 75265
2012-03-05
20:35
Consolidated some duplicated /json code, removed some dead code. Minor doc additions and cleanups. file: [5c31ecb9] check-in: [6ca400a3] user: stephan branch: trunk, size: 75213
2012-03-02
16:44
Added initial /json/finfo support, but the output structure is up for debate. file: [ea352029] check-in: [f825f8c8] user: stephan branch: trunk, size: 74178
2012-02-23
11:32
Fix warnings in json support code (unused variables, unused label, etc). file: [f2bde118] check-in: [86f6e675] user: mistachkin branch: jsonWarnings, size: 74086
2012-02-17
18:23
Added initial /json/config/get support. file: [3c992cba] check-in: [e5a86795] user: stephan branch: trunk, size: 74214
2012-02-16
22:40
Cleaned up the recently consolidated top-most json command dispatching a bit. file: [b3ad9a27] check-in: [5daadddf] user: stephan branch: trunk, size: 74101
21:37
Refactored some duplicate json-mode command/path dispatching code into a function. file: [390748a7] check-in: [f81e3e7f] user: stephan branch: trunk, size: 74239
21:09
Removed some unused code. minor doc touch-up. file: [387d8fe7] check-in: [cff9ecad] user: stephan branch: trunk, size: 74070
20:57
minor doc touch-ups and one s/cson_value_new_string/json_new_string/. file: [63f394c8] check-in: [9cfe61e0] user: stephan branch: trunk, size: 74729
01:03
Always convert the result of getenv() into UTF8. file: [95d28fa8] check-in: [57152086] user: drh branch: trunk, size: 74604
2012-02-12
10:42
(json wiki get) now supports returning the page metadata without the content. Fixed an arg-forwarding bug in json_find_option_cstr() which caused long-form args to be ignored. file: [069bf877] check-in: [913e0b66] user: stephan branch: trunk, size: 74597
2011-11-05
01:28
json doc updates and removal of some dead code. file: [870377c4] check-in: [0c234bdd] user: stephan branch: trunk, size: 74519
00:13
s/json_tags_for_rid()/json_tags_for_checkin_rid()/g, since that's really what it does. file: [7ac2aa11] check-in: [4ff2e31c] user: stephan branch: trunk, size: 74546
2011-11-04
20:37
Added configure option --enable-json to enable json features. They are disabled by default. file: [2ef342f4] check-in: [525816e6] user: json-demo branch: json, size: 74531
19:39
merged in trunk [1e3cae806885d] and set up the json command/page to be elided when FOSSIL_DISABLE_JSON is defined at build time. file: [227d9fdc] check-in: [44bba06c] user: json-demo branch: json, size: 74419
2011-10-20
07:00
Moved the user-related JSON handlers into their own file. file: [4baaf6ae] check-in: [6e18fc2e] user: stephan branch: json, size: 74285
01:20
Refactored json_stmt_to_array_of_xxx() to actually take a cson_array argument (not generic cson_value arg), now that the cson API allows that simplification. file: [597277f8] check-in: [23a35ba1] user: stephan branch: json, size: 76772
2011-10-19
23:56
Enhanced /json/artifact/FILE_UUID a bit. Now only includes full content if explicitly told to, but returns more metadata even for binary files. file: [7ff56b18] check-in: [2165e77c] user: stephan branch: json, size: 76992
21:13
s/fossil_is_json/fossil_has_json/g. Moved fossil_has_json() (nee fossil_is_json()) decl/docs to json_detail.h. file: [4287f326] check-in: [d2c1ae23] user: stephan branch: json, size: 76897
20:54
Fixed a C99/C++ism. Added json_new_string_f() (printf-style). file: [1432e455] check-in: [f5cc421d] user: stephan branch: json, size: 77424
20:36
A number of small doc improvements. file: [28c3cca9] check-in: [fa17e098] user: stephan branch: json, size: 77158
15:47
fixed json_page_top() and json_cmd_top() to behave as documented when a callback returns non-NULL but does set the error state. file: [b798749e] check-in: [2f48be58] user: stephan branch: json, size: 76597
2011-10-16
10:04
merged/resolved trunk [ee723ed98ddb0a]. file: [434b327a] check-in: [a40ac8fd] user: stephan branch: json, size: 76487
09:49
minor doc clarification. file: [4d7164e7] check-in: [398b53e0] user: stephan branch: json, size: 76448
2011-10-09
12:58
factored out an extraneous parameter to json_gc_add(). file: [49ba8592] check-in: [7a83a5cb] user: stephan branch: json, size: 76424
11:57
fixed: json_cap_value() now returns NULL (instead of prematurely/fataly querying the db) if g.userUid has not been set (i.e. CLI mode). file: [6c498765] check-in: [96920e7c] user: stephan branch: json, size: 76189
11:45
Added global debugFossilG/--json-debug-g boolean to add the "g" output to any response (including (especially) error responses) to simplify debuggering. Requires a|s privileges. file: [a7744223] check-in: [f047bbdd] user: stephan branch: json, size: 76104
11:23
Added /json/g, which dumps the "g" object to JSON (debuggering tool). file: [5413c0cd] check-in: [65e0c94c] user: stephan branch: json, size: 75797
2011-10-08
14:15
getenv() as the fallback strategy for json_getenv() now only enabled in CLI mode. file: [67e07773] check-in: [8c4a23ae] user: stephan branch: json, size: 72423
12:57
"Dispatching" json subcommands now produce more useful error messages when no subcommand is specified. file: [319c1e16] check-in: [a8af09fc] user: stephan branch: json, size: 72339
11:55
fixed a cson mis-use which could cause a crash in some cases due to client-side misachtung of the reference count. file: [bd555464] check-in: [d8fd611f] user: stephan branch: json, size: 70592
10:18
Added /json/report/run. Fixed an SQL syntax bug in report/list (only affected non-priveleged accounts). file: [49fc4586] check-in: [8907163e] user: stephan branch: json, size: 70099
08:46
Added /json/report/list and /json/query. file: [ecff80fe] check-in: [20978b27] user: stephan branch: json, size: 69150
2011-10-07
13:51
First draft, no-frills /json/diff added. file: [c7f8f32f] check-in: [54e1f1a5] user: stephan branch: json, size: 67758
10:59
Pulled in another round of memory optimizations in cson/sqlite3. Added a few minor error reporting cleanups in JSON mode. file: [1aee2abe] check-in: [09e5fcd7] user: stephan branch: json, size: 67671
06:54
Minor internal tweaks. Pulled in lastest cson_amalgamation for the new convenience functions. file: [5705e42f] check-in: [c75759d8] user: stephan branch: json, size: 67228
03:51
fixed how many path parts are generated for the "command" response property. file: [3735e08b] check-in: [3d6cc1df] user: stephan branch: json, size: 67217
02:58
Fixed a minor denkfehler in the "bump <1ms runtime to 1ms" logic. Changed g.json.gc to an array (lower memory and better performance for what we use it for). file: [d1cb203e] check-in: [19276984] user: stephan branch: json, size: 67139
2011-10-06
23:12
Added /json/tag/find. file: [840c01e6] check-in: [9d27ade3] user: stephan branch: json, size: 67191
20:10
Added /json/tag/list and infrastructure for pending (add, cancel, find) ops. file: [20396a47] check-in: [1088cf21] user: stephan branch: json, size: 66706
17:12
Added /json/resultCodes. file: [3adcc3ff] check-in: [71a1d448] user: stephan branch: json, size: 66650
15:51
minor doc fix before switching PCs for the weekend. file: [c0c746b2] check-in: [a403544f] user: stephan branch: json, size: 65016
15:47
fixed comparison logic which broken dumbing-down of error codes (caused them to never be dumbed-down). file: [e3e15e1e] check-in: [f93e059f] user: stephan branch: json, size: 65016
2011-10-05
12:04
experimentally added "command" property to all responses to simplify response handler dispatching in some experimental Java client code. file: [00d07d18] check-in: [8f12ac98] user: stephan branch: json, size: 64974
06:42
A few internal cosmetic cleanups, added json_get_wiki_page_by_rid(). file: [3b20b14c] check-in: [afb3c89f] user: stephan branch: json, size: 64148
02:41
Doh... accidentally changed resultCodes from strings to ints during refactoring. file: [34373657] check-in: [36384da8] user: stephan branch: json, size: 64168
02:26
Consolidated more of the CLI/HTTP/CLI-with-POST arg handling disparities into the json_find_option() family of functions. file: [72b132c2] check-in: [5b4a3f12] user: stephan branch: json, size: 64161
00:53
lots of minor cleanups in JSON error handling (mostly cosmetic). Added some new FOSSIL-xxxx codes. file: [f6244346] check-in: [2e41514f] user: stephan branch: json, size: 61878
2011-10-02
23:59
Minor error handling cleanups (nicer resultText strings). Removed a call to sqlite3_config() from the JSON bootstrap code which _seems_ to be the cause of an SQLITE_MISUSE warning. file: [175699fc] check-in: [af72cc75] user: stephan branch: json, size: 61207
23:21
Fixed an incorrect setting of the content type in one error-handling case. file: [794330e1] check-in: [35e4e918] user: stephan branch: json, size: 61047
22:58
Added /json/branch/create. Finally found g.zErrMsg, and started using it in conjunction with json error reporting. file: [04c3d285] check-in: [8eaf58ee] user: stephan branch: json, size: 61134
21:01
moved /json/branch code into its own file. file: [11387240] check-in: [1a4c874e] user: stephan branch: json, size: 60472
18:18
s/userName/name/, for consistency. file: [d79432d4] check-in: [94689bbf] user: stephan branch: json, size: 63237
12:41
json mode now accepts command=string request parameter if path length is 1 (no subcommand was specified). file: [4604ffb1] check-in: [225fd3da] user: stephan branch: json, size: 62887
12:31
initial code for reading POST data from a file/stdin in CLI mode. file: [3d64c307] check-in: [8145cdbf] user: stephan branch: json, size: 62537
11:43
minor cleanups and doc additions to the json/artifact handling. file: [5e766853] check-in: [6d066783] user: stephan branch: json, size: 61629
10:51
Added missing license header to new files. Updated (c) date to 2011. file: [ca906dc4] check-in: [8a665715] user: stephan branch: json, size: 61680
2011-10-01
06:45
Started refactoring some of the timeline/artifact components into reusable parts. Comment edited only to test json responses which differentiate between pristine and edited commits. file: [b471f66c] check-in: [b1f92572] user: stephan branch: json, size: 61680
05:57
Added json_new_int() convenience function. file: [55729d1d] check-in: [ccd66b9b] user: stephan branch: json, size: 61014
05:09
Added initial /json/artifact code, but it currently can only report the type of a given artifact. file: [efda1d49] check-in: [6372d951] user: stephan branch: json, size: 60927
02:12
Changed /json/login output payload structure. file: [e6b88b8e] check-in: [88ddf2cb] user: stephan branch: json, size: 60778
2011-09-29
21:57
Removed the json warnings bitset crap. Still not sure i like the warnings mechanism at all. file: [322481d1] check-in: [9fe06e2f] user: stephan branch: json, size: 60839
17:03
minor jsonp tweaks. Added some test code for it in the demo app, but there is still some jsonp disconnect between the two AJAJ layers, and i may need to consolidate them to work around it. file: [42a4ccbd] check-in: [f48b687a] user: stephan branch: json, size: 60761
15:23
Added /json/rebuild. Is likely to fail w/ an AJAX timeout for large repos, which will probably cause the rebuild to roll back on the next open :/. Takes 21sec on my 32-bit netbook to rebuild the fossil repo. file: [66d840eb] check-in: [071de8f1] user: stephan branch: json, size: 60619
2011-09-28
21:36
JSON CLI mode now accepts --indent|-I N to set JSON indention level (uses cson_output_opt::indentation semantics). Default for CLI mode is 1 (0 for HTTP mode). file: [8d981b3b] check-in: [30e4ebaa] user: stephan branch: json, size: 59976
2011-09-27
13:22
Added basic timing info to json ops, but "should probably" move the timer start to the app/server init. file: [4786be5d] check-in: [b9ef0fe5] user: stephan branch: json, size: 59120
02:09
Changed /json/stat to use brief mode by default due to relatively high runtime cost, replaced 'brief' param with 'full'. Added json_getenv_bool(). file: [1d6e5845] check-in: [c1914eaa] user: stephan branch: json, size: 55091
01:51
Added "brief" option to /json/stat, mirroring the change in [d01ca14d08]. file: [806fe74f] check-in: [17f11a08] user: stephan branch: json, size: 53971
01:32
Added /json/user/xyz to ajax demo. /json/user/get/USERNAME now works as an alias for ?name=USERNAME. file: [5bf1a0df] check-in: [585be130] user: stephan branch: json, size: 53748
01:18
moved /json/timeline|wiki commands/pages into their own files. file: [046e7e51] check-in: [821830d2] user: stephan branch: json, size: 53401
01:01
Started refactoring specific json command groups into their own files (80kb is getting too big to manage in one file). file: [ad2962c2] check-in: [5d2a516f] user: stephan branch: json, size: 75324
00:34
added /json/user/get. file: [940431eb] check-in: [0c7be1fe] user: stephan branch: json, size: 83288
00:14
added /json/user/list. file: [7b306580] check-in: [59ef1667] user: stephan branch: json, size: 81619
2011-09-26
19:30
made /json/timeline/wiki and /json/wiki/timeline aliases. file: [fe80fa47] check-in: [0475e63d] user: stephan branch: json, size: 80170
2011-09-23
13:10
s/briefText/briefComment/. Fixed a couple memleaks of blob sql. file: [58cb5661] check-in: [ecdbce16] user: stephan branch: json, size: 80134
12:46
Added comment to timeline/ticket. Minor additions to AJAX test pages. file: [96771116] check-in: [de0b860f] user: stephan branch: json, size: 80070
12:29
Implemented /json/timeline/ticket, cleaned up timeline/ci|wiki. file: [28bfcde6] check-in: [42900f30] user: stephan branch: json, size: 80033
10:52
Changed fossil_json_f() callback interface. Refactored json command dispatching a bit. Fixed an ordering problem in the json timelines. Pulled in latest cson_amalgamation. file: [1a082562] check-in: [c24b4450] user: stephan branch: json, size: 77530
01:00
Corrected /json/wiki/save|create to honor the proper g.perm.WrWiki/NewWiki perm, instead of just WrWiki. file: [bc2a96ff] check-in: [d3759cd4] user: stephan branch: json, size: 78596
00:39
Added initial JSONP support, but lacks significant testing. file: [042aeaa5] check-in: [e72ae99d] user: stephan branch: json, size: 78539
2011-09-22
23:40
Added --after/--before support to /json/timeline/ci and wiki. file: [358880ee] check-in: [e01d49b2] user: stephan branch: json, size: 76761
20:07
Implemented /json/timeline/wiki. Fixed --limit/-n handling of timeline/ci. file: [3a66e73d] check-in: [12545465] user: stephan branch: json, size: 75158
19:14
Implemented /json/wiki/create. file: [ff9b6420] check-in: [1df648ab] user: stephan branch: json, size: 71114
17:56
Implemented /json/wiki/save. file: [d28db754] check-in: [2162c86d] user: stephan branch: json, size: 69018
16:27
minor cleanups in the /json/wiki/get and AJAJ code. file: [2cf923ea] check-in: [a9c8a31d] user: stephan branch: json, size: 67769
15:59
Added /json/wiki/get?page=... file: [f8144c21] check-in: [7dc8e9ac] user: stephan branch: json, size: 67590
14:58
Added /json/whoami. file: [00b9334f] check-in: [7a65dd0e] user: stephan branch: json, size: 65276
2011-09-21
21:23
added a FIXME, removed another. Now it's really bed time. file: [8c59807d] check-in: [8b814778] user: stephan branch: json, size: 64111
20:43
/json/branch/list now requires g.perm.Read, like /brlist does. Time for bed... file: [9670495f] check-in: [a37c6a87] user: stephan branch: json, size: 64237
20:03
added current branch name to /json/branch/list payload when in an opened checkout. file: [c64ee781] check-in: [7592fe93] user: stephan branch: json, size: 64075
19:31
added POST.payload to json_getenv() list. Re-organized /json/branch/list CLI/HTTP arg handling to behave sanely in CLI mode. Minor typo fix in main.c. file: [2e2c1555] check-in: [4a9b5164] user: stephan branch: json, size: 63563
18:55
s/branch_prepare_query/branch_prepare_list_query/g file: [7abe1954] check-in: [267739dd] user: stephan branch: json, size: 62646
18:53
changed how /json/branch/list selects whether to look at open/all/closed branches. file: [874b3216] check-in: [14423f32] user: stephan branch: json, size: 62641
18:20
Refactored prepareBranchStatement() to simplify its usage, get rid of ambiguous arg handling, and allow the caller to specify the priority of the all-vs-closed-vs-opened decision. Made it non-static and renamed to branch_prepare_statement() for re-use in /json/branch/list. file: [c051a0df] check-in: [5a81a5ea] user: stephan branch: json, size: 62297
18:10
Minor timeline output cleanups. Added /json/branch/list. file: [e6125667] check-in: [f266ebdd] user: stephan branch: json, size: 62144
17:38
More work on the warnings infrastructure. json_warn() now (experimentally) disallows (elides) duplicate warning codes to simplify downstream loops. Still undecided on that behaviour, though. file: [5c22173e] check-in: [576425e8] user: stephan branch: json, size: 60725
16:31
started adding infrastructure to report non-fatal warnings. file: [b36342e0] check-in: [ad50fe95] user: stephan branch: json, size: 57240
15:22
timeline json refactoring, fixed ordering, split tags into an Array. file: [6a8d3c04] check-in: [d6cbe37b] user: stephan branch: json, size: 56000
14:42
refactored the prototype timeline code, split off completely from www version (different requirements). file: [ab6f77c6] check-in: [1ecf3374] user: stephan branch: json, size: 53498
2011-09-20
22:55
added a couple FIXME notes before bed. file: [75f9f837] check-in: [e7857845] user: stephan branch: json, size: 52430
22:42
Started adding /json/timeline support, but this is gonna be a doozie. Breaking it down into separate calls for ci/wiki/ticket, e.g. /json/timeline/ci because the structures will be different for each. file: [39cd7b39] check-in: [eff3f7d9] user: stephan branch: json, size: 52090
16:45
more minor internal cleanups. s/g.isCGI/g.isHTTP/ to avoid confusion later on. file: [d85d46cb] check-in: [9adc95c4] user: stephan branch: json, size: 48275
16:27
minor internal cleanups and doc additions. file: [63767da5] check-in: [2f3e4385] user: stephan branch: json, size: 47958
16:00
CLI mode now works properly when called using an abbreviated form of "json", e.g. fossil js wiki list. Fixed an incorrect error code in /json/wiki. file: [ca67e48b] check-in: [76d0fa2b] user: stephan branch: json, size: 47145
15:48
Refactored page/command callback to take on argument to simplify certain dispatching ops. json_getenv() now falls back to getenv() if neither the POST data nor cgi_parameter() contains the requested value, but this is basically a workaround for my current inability to add --opt support in CLI mode (due to how HTTP/CLI command handling is consolidated). file: [1402d30e] check-in: [206908fa] user: stephan branch: json, size: 47191
2011-09-19
19:03
Moved a db_finalize() which would not have been called in a couple of error cases. file: [70458fcb] check-in: [afc1cec6] user: stephan branch: json, size: 46028
18:49
fixed a double-free() which could happen in one error case. file: [869a0be5] check-in: [65e946c7] user: stephan branch: json, size: 46028
18:48
Implemented /json/wiki/list (first draft, may change). Pulled in latest cson_sqlite3 additions to simplify the impl. file: [0ad35d3f] check-in: [5cc88946] user: stephan branch: json, size: 46058
17:11
minor cleanups in prep for the "larger" JSON APIs. file: [5362d6cf] check-in: [87e20659] user: stephan branch: json, size: 43865
2011-09-18
19:16
terribly minor internal cleanups. file: [5b828545] check-in: [507a4582] user: stephan branch: json, size: 40505
19:11
One compile fix and MSVC build fix, from Jeff Slutter. file: [f988acf7] check-in: [5f3a98ae] user: stephan branch: json, size: 40383
10:40
Removed some no-longer valid comments after confirming that JSON mode works without cookies. Dumbed-down the various login errors by default (again). file: [4bc9976d] check-in: [52229655] user: stephan branch: json, size: 40383
10:25
Added userName to /json/stat output for the nobody user (it was previously not set in that case). Renamed captcha to password in /json/anonymousPassword. Added NYI (not yet implemented) placeholders for several planned request types. file: [2de4ee85] check-in: [13cc3b82] user: stephan branch: json, size: 40659
08:11
Implemented anonymous user login over JSON. Requires 2 requests (captcha-fetch and then login). file: [a079d2cd] check-in: [cebf9919] user: stephan branch: json, size: 40167
05:45
More cleanups to the cson_cgi removal refactoring. Added common "indent" parameter to control indentation of JSON (uses cson_output_opt.indentation semantics). file: [2645a736] check-in: [b3653265] user: stephan branch: json, size: 37993
04:31
Factored out cson_cgi bits - now using fossil's CGI bits. Removed cson_cgi from cson_amalgamation (cuts its size considerably). Seems to still work, and this removes some discrepancies in how CGI/server modes are handled. file: [1809644e] check-in: [4cf96814] user: stephan branch: json, size: 35747
2011-09-17
23:14
Doc changes only file: [ad920afe] check-in: [5a9e5679] user: stephan branch: json, size: 34786
20:25
added a missing assert() (Thanks, Joe M.) file: [770fcbaf] check-in: [a67c6744] user: stephan branch: json, size: 34224
16:01
More cleaning up of error lower-level handling to output JSON instead of HTML in a few more cases. file: [9008eb28] check-in: [9b842564] user: stephan branch: json, size: 34149
14:24
logout now fails if the auth token is not available to it (as a sanity check and potentially stop someone from logging out someone else). file: [83cd0887] check-in: [affdf56c] user: stephan branch: json, size: 35599
01:25
dropped back to a simpler timestamp generation mechanism. Thanks to Ge Weijers for the input. file: [69a355ed] check-in: [147f4bfb] user: stephan branch: json, size: 34522
2011-09-16
23:29
Added some code for dumbing-down only the different login errors (missing name, missing pw, or no match found). Defaults to dumbed-down mode. file: [94b6ed83] check-in: [388c9888] user: stephan branch: json, size: 34261
23:06
worked around a weird cgi_parameter() bug. We are now not processing the name/password params with the precedence i would like, but it works now in server/cgi modes with GET and POST. file: [59c9d85b] check-in: [b0885e86] user: stephan branch: json, size: 33772
21:39
restructured /json/cap output. file: [7509b0f6] check-in: [7e3902d1] user: stephan branch: json, size: 32200
19:27
implemented /json/logout. file: [3ca1ad93] check-in: [e94605b5] user: stephan branch: json, size: 31584
18:57
Merged trunk [693ab93b7d] to quiet down -Wall. Removed a trailing comma from an enum (-Wall mode). file: [b3945c26] check-in: [98cdd410] user: stephan branch: json, size: 30879
18:55
style conformance touch-ups. file: [8e12157d] check-in: [45cd04f8] user: stephan branch: json, size: 30880
18:39
Refactored the special-case CLI-mode arg/path handling in the CGI/server-mode mechanism. Fixed: server-mode response timestamp was always the time the server process started. file: [f1a14f47] check-in: [0bb82303] user: stephan branch: json, size: 30828
18:29
more cleanups in the json arg/path handling. file: [e1f32c57] check-in: [35b9edba] user: stephan branch: json, size: 30839
17:53
minor cleanups to the json "command path" handling. file: [d2b7eca5] check-in: [2dcc2397] user: stephan branch: json, size: 29699
17:26
Consolidated server/cgi/cli path/arg handling (will break when add --options to CLI mode). file: [ed5bd168] check-in: [c5fbcced] user: stephan branch: json, size: 28885
16:38
fixed an inconsistency in the CLI/CGI args/path handling. Non-CGI server mode is still broken b/c we do not yet have the PATH_INFO (or equivalent) data. file: [3dffb586] check-in: [73591cc7] user: stephan branch: json, size: 27283
2011-09-15
12:03
initial mass-change merge of main repo with my fork. file: [7962436a] check-in: [5b44a419] user: stephan branch: json, size: 26012 Added