Fossil SCM
Removed mperm property from /json/artifact results. Added a TODO.
Commit
afe12e107737a2ea2d36e012628af4fca3e2d6d8
Parent
7b89c7b5b3e1ec6…
1 file changed
+8
-2
+8
-2
| --- src/json_artifact.c | ||
| +++ src/json_artifact.c | ||
| @@ -284,11 +284,14 @@ | ||
| 284 | 284 | db_prepare(&q, |
| 285 | 285 | "SELECT filename.name AS name, " |
| 286 | 286 | " cast(strftime('%%s',event.mtime) as int) AS mtime," |
| 287 | 287 | " coalesce(event.ecomment,event.comment) as comment," |
| 288 | 288 | " coalesce(event.euser,event.user) as user," |
| 289 | - " b.uuid as uuid, mlink.mperm as mperm," | |
| 289 | + " b.uuid as uuid, " | |
| 290 | +#if 0 | |
| 291 | + " mlink.mperm as mperm," | |
| 292 | +#endif | |
| 290 | 293 | " coalesce((SELECT value FROM tagxref" |
| 291 | 294 | " WHERE tagid=%d AND tagtype>0 AND " |
| 292 | 295 | " rid=mlink.mid),'trunk') as branch" |
| 293 | 296 | " FROM mlink, filename, event, blob a, blob b" |
| 294 | 297 | " WHERE filename.fnid=mlink.fnid" |
| @@ -297,10 +300,13 @@ | ||
| 297 | 300 | " AND b.rid=mlink.mid" |
| 298 | 301 | " AND mlink.fid=%d" |
| 299 | 302 | " ORDER BY filename.name, event.mtime", |
| 300 | 303 | TAG_BRANCH, rid |
| 301 | 304 | ); |
| 305 | + /* TODO: add a "state" flag for the file in each checkin, | |
| 306 | + e.g. "modified", "new", "deleted". | |
| 307 | + */ | |
| 302 | 308 | checkin_arr = cson_new_array(); |
| 303 | 309 | cson_object_set(pay, "checkins", cson_array_value(checkin_arr)); |
| 304 | 310 | json_stmt_to_array_of_obj( &q, checkin_arr ); |
| 305 | 311 | db_finalize(&q); |
| 306 | 312 | return cson_object_value(pay); |
| @@ -318,11 +324,11 @@ | ||
| 318 | 324 | cson_value * entry = NULL; |
| 319 | 325 | Blob uuid = empty_blob; |
| 320 | 326 | int rc; |
| 321 | 327 | int rid = 0; |
| 322 | 328 | ArtifactDispatchEntry const * dispatcher = &ArtifactDispatchList[0]; |
| 323 | - zName = json_find_option_cstr2("name", NULL, NULL, 2); | |
| 329 | + zName = json_find_option_cstr2("name", NULL, NULL, g.json.dispatchDepth+1); | |
| 324 | 330 | if(!zName || !*zName) { |
| 325 | 331 | json_set_err(FSL_JSON_E_MISSING_ARGS, |
| 326 | 332 | "Missing 'name' argument."); |
| 327 | 333 | return NULL; |
| 328 | 334 | } |
| 329 | 335 |
| --- src/json_artifact.c | |
| +++ src/json_artifact.c | |
| @@ -284,11 +284,14 @@ | |
| 284 | db_prepare(&q, |
| 285 | "SELECT filename.name AS name, " |
| 286 | " cast(strftime('%%s',event.mtime) as int) AS mtime," |
| 287 | " coalesce(event.ecomment,event.comment) as comment," |
| 288 | " coalesce(event.euser,event.user) as user," |
| 289 | " b.uuid as uuid, mlink.mperm as mperm," |
| 290 | " coalesce((SELECT value FROM tagxref" |
| 291 | " WHERE tagid=%d AND tagtype>0 AND " |
| 292 | " rid=mlink.mid),'trunk') as branch" |
| 293 | " FROM mlink, filename, event, blob a, blob b" |
| 294 | " WHERE filename.fnid=mlink.fnid" |
| @@ -297,10 +300,13 @@ | |
| 297 | " AND b.rid=mlink.mid" |
| 298 | " AND mlink.fid=%d" |
| 299 | " ORDER BY filename.name, event.mtime", |
| 300 | TAG_BRANCH, rid |
| 301 | ); |
| 302 | checkin_arr = cson_new_array(); |
| 303 | cson_object_set(pay, "checkins", cson_array_value(checkin_arr)); |
| 304 | json_stmt_to_array_of_obj( &q, checkin_arr ); |
| 305 | db_finalize(&q); |
| 306 | return cson_object_value(pay); |
| @@ -318,11 +324,11 @@ | |
| 318 | cson_value * entry = NULL; |
| 319 | Blob uuid = empty_blob; |
| 320 | int rc; |
| 321 | int rid = 0; |
| 322 | ArtifactDispatchEntry const * dispatcher = &ArtifactDispatchList[0]; |
| 323 | zName = json_find_option_cstr2("name", NULL, NULL, 2); |
| 324 | if(!zName || !*zName) { |
| 325 | json_set_err(FSL_JSON_E_MISSING_ARGS, |
| 326 | "Missing 'name' argument."); |
| 327 | return NULL; |
| 328 | } |
| 329 |
| --- src/json_artifact.c | |
| +++ src/json_artifact.c | |
| @@ -284,11 +284,14 @@ | |
| 284 | db_prepare(&q, |
| 285 | "SELECT filename.name AS name, " |
| 286 | " cast(strftime('%%s',event.mtime) as int) AS mtime," |
| 287 | " coalesce(event.ecomment,event.comment) as comment," |
| 288 | " coalesce(event.euser,event.user) as user," |
| 289 | " b.uuid as uuid, " |
| 290 | #if 0 |
| 291 | " mlink.mperm as mperm," |
| 292 | #endif |
| 293 | " coalesce((SELECT value FROM tagxref" |
| 294 | " WHERE tagid=%d AND tagtype>0 AND " |
| 295 | " rid=mlink.mid),'trunk') as branch" |
| 296 | " FROM mlink, filename, event, blob a, blob b" |
| 297 | " WHERE filename.fnid=mlink.fnid" |
| @@ -297,10 +300,13 @@ | |
| 300 | " AND b.rid=mlink.mid" |
| 301 | " AND mlink.fid=%d" |
| 302 | " ORDER BY filename.name, event.mtime", |
| 303 | TAG_BRANCH, rid |
| 304 | ); |
| 305 | /* TODO: add a "state" flag for the file in each checkin, |
| 306 | e.g. "modified", "new", "deleted". |
| 307 | */ |
| 308 | checkin_arr = cson_new_array(); |
| 309 | cson_object_set(pay, "checkins", cson_array_value(checkin_arr)); |
| 310 | json_stmt_to_array_of_obj( &q, checkin_arr ); |
| 311 | db_finalize(&q); |
| 312 | return cson_object_value(pay); |
| @@ -318,11 +324,11 @@ | |
| 324 | cson_value * entry = NULL; |
| 325 | Blob uuid = empty_blob; |
| 326 | int rc; |
| 327 | int rid = 0; |
| 328 | ArtifactDispatchEntry const * dispatcher = &ArtifactDispatchList[0]; |
| 329 | zName = json_find_option_cstr2("name", NULL, NULL, g.json.dispatchDepth+1); |
| 330 | if(!zName || !*zName) { |
| 331 | json_set_err(FSL_JSON_E_MISSING_ARGS, |
| 332 | "Missing 'name' argument."); |
| 333 | return NULL; |
| 334 | } |
| 335 |