Differences From:
File
src/name.c
part of check-in
[3984b1b2c1]
- Make the info web page handle symbolic tags as well as UUIDs. Start trying
to make the currently-disabled tagview page more useful.
by
eric on
2008-08-04 20:46:52.
[view]
To:
File
src/name.c
part of check-in
[5fb14b9a0f]
- Include non-sym- tags in tagview web page. Also merge mainline into tagview branch.
by
eric on
2008-08-21 20:59:01.
[view]
@@ -111,18 +111,19 @@
** 2 More than one UUID was found, so this is presumably a
** propagating tag. The return UUID is the most recent,
** which is most likely to be the one wanted.
*/
-int sym_tag_to_uuid(const char *pName, Blob *pUuid){
+int tag_to_uuid(const char *pName, Blob *pUuid,const char *pPrefix){
Stmt q;
int count = 0;
db_prepare(&q,
"SELECT (SELECT uuid FROM blob WHERE rid=objid)"
" FROM tagxref JOIN event ON rid=objid"
- " WHERE tagid=(SELECT tagid FROM tag WHERE tagname='sym-'||%Q)"
+ " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%Q||%Q)"
" AND tagtype>0"
" AND value IS NULL"
" ORDER BY event.mtime DESC",
+ pPrefix,
pName
);
blob_zero(pUuid);
while( db_step(&q)==SQLITE_ROW ){
@@ -133,8 +134,11 @@
db_column_blob(&q, 0, pUuid);
}
db_finalize(&q);
return count;
+}
+int sym_tag_to_uuid(const char *pName, Blob *pUuid){
+ return tag_to_uuid(pName,pUuid,"sym-");
}
/*
** COMMAND: test-name-to-uuid