Fossil SCM

Show check-in tags as part of the output of the "whatis" command.

drh 2012-02-03 14:40 trunk
Commit b4a1c60ef648865a500ea8679b1568138c8f23e1
1 file changed +13 -5
+13 -5
--- src/name.c
+++ src/name.c
@@ -403,16 +403,21 @@
403403
fossil_print("Ambiguous artifact name prefix: %s\n", zName);
404404
}else if( rid==0 ){
405405
fossil_print("Unknown artifact: %s\n", zName);
406406
}else{
407407
Stmt q;
408
- db_prepare(&q, "SELECT uuid, size, datetime(mtime, 'localtime'), ipaddr"
409
- " FROM blob, rcvfrom"
410
- " WHERE rid=%d"
411
- " AND rcvfrom.rcvid=blob.rcvid",
412
- rid);
408
+ db_prepare(&q,
409
+ "SELECT uuid, size, datetime(mtime, 'localtime'), ipaddr,"
410
+ " (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
411
+ " WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
412
+ " AND tagxref.rid=blob.rid AND tagxref.tagtype>0)"
413
+ " FROM blob, rcvfrom"
414
+ " WHERE rid=%d"
415
+ " AND rcvfrom.rcvid=blob.rcvid",
416
+ rid);
413417
if( db_step(&q)==SQLITE_ROW ){
418
+ const char *zTagList = db_column_text(&q, 4);
414419
if( fExtra ){
415420
fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid);
416421
fossil_print("size: %d bytes\n", db_column_int(&q,1));
417422
fossil_print("received: %s from %s\n",
418423
db_column_text(&q, 2),
@@ -419,10 +424,13 @@
419424
db_column_text(&q, 3));
420425
}else{
421426
fossil_print("artifact: %s\n", db_column_text(&q,0));
422427
fossil_print("size: %d bytes\n", db_column_int(&q,1));
423428
}
429
+ if( zTagList && zTagList[0] ){
430
+ fossil_print("tags: %s\n", zTagList);
431
+ }
424432
}
425433
db_finalize(&q);
426434
db_prepare(&q,
427435
"SELECT type, datetime(mtime,'localtime'),"
428436
" coalesce(euser,user), coalesce(ecomment,comment)"
429437
--- src/name.c
+++ src/name.c
@@ -403,16 +403,21 @@
403 fossil_print("Ambiguous artifact name prefix: %s\n", zName);
404 }else if( rid==0 ){
405 fossil_print("Unknown artifact: %s\n", zName);
406 }else{
407 Stmt q;
408 db_prepare(&q, "SELECT uuid, size, datetime(mtime, 'localtime'), ipaddr"
409 " FROM blob, rcvfrom"
410 " WHERE rid=%d"
411 " AND rcvfrom.rcvid=blob.rcvid",
412 rid);
 
 
 
 
413 if( db_step(&q)==SQLITE_ROW ){
 
414 if( fExtra ){
415 fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid);
416 fossil_print("size: %d bytes\n", db_column_int(&q,1));
417 fossil_print("received: %s from %s\n",
418 db_column_text(&q, 2),
@@ -419,10 +424,13 @@
419 db_column_text(&q, 3));
420 }else{
421 fossil_print("artifact: %s\n", db_column_text(&q,0));
422 fossil_print("size: %d bytes\n", db_column_int(&q,1));
423 }
 
 
 
424 }
425 db_finalize(&q);
426 db_prepare(&q,
427 "SELECT type, datetime(mtime,'localtime'),"
428 " coalesce(euser,user), coalesce(ecomment,comment)"
429
--- src/name.c
+++ src/name.c
@@ -403,16 +403,21 @@
403 fossil_print("Ambiguous artifact name prefix: %s\n", zName);
404 }else if( rid==0 ){
405 fossil_print("Unknown artifact: %s\n", zName);
406 }else{
407 Stmt q;
408 db_prepare(&q,
409 "SELECT uuid, size, datetime(mtime, 'localtime'), ipaddr,"
410 " (SELECT group_concat(substr(tagname,5), ', ') FROM tag, tagxref"
411 " WHERE tagname GLOB 'sym-*' AND tag.tagid=tagxref.tagid"
412 " AND tagxref.rid=blob.rid AND tagxref.tagtype>0)"
413 " FROM blob, rcvfrom"
414 " WHERE rid=%d"
415 " AND rcvfrom.rcvid=blob.rcvid",
416 rid);
417 if( db_step(&q)==SQLITE_ROW ){
418 const char *zTagList = db_column_text(&q, 4);
419 if( fExtra ){
420 fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid);
421 fossil_print("size: %d bytes\n", db_column_int(&q,1));
422 fossil_print("received: %s from %s\n",
423 db_column_text(&q, 2),
@@ -419,10 +424,13 @@
424 db_column_text(&q, 3));
425 }else{
426 fossil_print("artifact: %s\n", db_column_text(&q,0));
427 fossil_print("size: %d bytes\n", db_column_int(&q,1));
428 }
429 if( zTagList && zTagList[0] ){
430 fossil_print("tags: %s\n", zTagList);
431 }
432 }
433 db_finalize(&q);
434 db_prepare(&q,
435 "SELECT type, datetime(mtime,'localtime'),"
436 " coalesce(euser,user), coalesce(ecomment,comment)"
437

Keyboard Shortcuts

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