Fossil SCM
Show check-in tags as part of the output of the "whatis" command.
Commit
b4a1c60ef648865a500ea8679b1568138c8f23e1
Parent
356c12641c0731d…
1 file changed
+13
-5
+13
-5
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -403,16 +403,21 @@ | ||
| 403 | 403 | fossil_print("Ambiguous artifact name prefix: %s\n", zName); |
| 404 | 404 | }else if( rid==0 ){ |
| 405 | 405 | fossil_print("Unknown artifact: %s\n", zName); |
| 406 | 406 | }else{ |
| 407 | 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); | |
| 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); | |
| 413 | 417 | if( db_step(&q)==SQLITE_ROW ){ |
| 418 | + const char *zTagList = db_column_text(&q, 4); | |
| 414 | 419 | if( fExtra ){ |
| 415 | 420 | fossil_print("artifact: %s (%d)\n", db_column_text(&q,0), rid); |
| 416 | 421 | fossil_print("size: %d bytes\n", db_column_int(&q,1)); |
| 417 | 422 | fossil_print("received: %s from %s\n", |
| 418 | 423 | db_column_text(&q, 2), |
| @@ -419,10 +424,13 @@ | ||
| 419 | 424 | db_column_text(&q, 3)); |
| 420 | 425 | }else{ |
| 421 | 426 | fossil_print("artifact: %s\n", db_column_text(&q,0)); |
| 422 | 427 | fossil_print("size: %d bytes\n", db_column_int(&q,1)); |
| 423 | 428 | } |
| 429 | + if( zTagList && zTagList[0] ){ | |
| 430 | + fossil_print("tags: %s\n", zTagList); | |
| 431 | + } | |
| 424 | 432 | } |
| 425 | 433 | db_finalize(&q); |
| 426 | 434 | db_prepare(&q, |
| 427 | 435 | "SELECT type, datetime(mtime,'localtime')," |
| 428 | 436 | " coalesce(euser,user), coalesce(ecomment,comment)" |
| 429 | 437 |
| --- 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 |