39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
-
+
|
*/
cson_value * json_artifact_for_ci( int rid, char showFiles ){
char const * zParent = NULL;
cson_value * v = NULL;
Stmt q;
static cson_value * eventTypeLabel = NULL;
if(!eventTypeLabel){
eventTypeLabel = json_new_string("commit");
eventTypeLabel = json_new_string("checkin");
json_gc_add("$EVENT_TYPE_LABEL(commit)", eventTypeLabel, 1);
}
zParent = db_text(0,
"SELECT uuid FROM plink, blob"
" WHERE plink.cid=%d AND blob.rid=plink.pid AND plink.isprim",
rid
);
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
-
+
|
const char *zUuid = db_column_text(&q, 0);
char * zTmp;
const char *zUser;
const char *zComment;
char * zEUser, * zEComment;
int mtime, omtime;
#define SET(K,V) cson_object_set(o,(K), (V))
SET("artifactType", eventTypeLabel );
SET("type", eventTypeLabel );
SET("uuid",json_new_string(zUuid));
SET("isLeaf", cson_value_new_bool(is_a_leaf(rid)));
zUser = db_column_text(&q,2);
zEUser = db_text(0,
"SELECT value FROM tagxref WHERE tagid=%d AND rid=%d",
TAG_USER, rid);
if(zEUser){
|