Fossil SCM

Removed mperm property from /json/artifact results. Added a TODO.

stephan 2012-03-18 16:35 trunk
Commit afe12e107737a2ea2d36e012628af4fca3e2d6d8
1 file changed +8 -2
--- src/json_artifact.c
+++ src/json_artifact.c
@@ -284,11 +284,14 @@
284284
db_prepare(&q,
285285
"SELECT filename.name AS name, "
286286
" cast(strftime('%%s',event.mtime) as int) AS mtime,"
287287
" coalesce(event.ecomment,event.comment) as comment,"
288288
" 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
290293
" coalesce((SELECT value FROM tagxref"
291294
" WHERE tagid=%d AND tagtype>0 AND "
292295
" rid=mlink.mid),'trunk') as branch"
293296
" FROM mlink, filename, event, blob a, blob b"
294297
" WHERE filename.fnid=mlink.fnid"
@@ -297,10 +300,13 @@
297300
" AND b.rid=mlink.mid"
298301
" AND mlink.fid=%d"
299302
" ORDER BY filename.name, event.mtime",
300303
TAG_BRANCH, rid
301304
);
305
+ /* TODO: add a "state" flag for the file in each checkin,
306
+ e.g. "modified", "new", "deleted".
307
+ */
302308
checkin_arr = cson_new_array();
303309
cson_object_set(pay, "checkins", cson_array_value(checkin_arr));
304310
json_stmt_to_array_of_obj( &q, checkin_arr );
305311
db_finalize(&q);
306312
return cson_object_value(pay);
@@ -318,11 +324,11 @@
318324
cson_value * entry = NULL;
319325
Blob uuid = empty_blob;
320326
int rc;
321327
int rid = 0;
322328
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);
324330
if(!zName || !*zName) {
325331
json_set_err(FSL_JSON_E_MISSING_ARGS,
326332
"Missing 'name' argument.");
327333
return NULL;
328334
}
329335
--- 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

Keyboard Shortcuts

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