Diff
Not logged in

Differences From:

File src/info.c part of check-in [bf7ca1a4d8] - Change the page header from Baseline to Check-in on the "vinfo" page. Fix a bug introduced into tagview (ticket 309c57b3d27219fa6ad601c0021dc067a7cb992d). by drh on 2009-01-20 23:47:47. [view]

To:

File src/info.c part of check-in [2521a0a9a7] - The "fossil info" command now shows tags associated with the current check-out. by drh on 2009-01-21 02:54:02. [view]

@@ -40,8 +40,9 @@
 */
 void show_common_info(int rid, const char *zUuidName, int showComment){
   Stmt q;
   char *zComment = 0;
+  char *zTags;
   db_prepare(&q,
     "SELECT uuid"
     "  FROM blob WHERE rid=%d", rid
   );
@@ -63,8 +64,18 @@
     const char *zUuid = db_column_text(&q, 0);
     printf("child:        %s\n", zUuid);
   }
   db_finalize(&q);
+  zTags = db_text(0, "SELECT group_concat(substr(tagname, 5), ', ')"
+                     "  FROM tagxref, tag"
+                     " WHERE tagxref.rid=%d AND tagxref.tagtype>0"
+                     "   AND tag.tagid=tagxref.tagid"
+                     "   AND tag.tagname GLOB 'sym-*'",
+                     rid);
+  if( zTags && zTags[0] ){
+    printf("tags:         %s\n", zTags);
+  }
+  free(zTags);
   if( zComment ){
     printf("comment:\n%s\n", zComment);
     free(zComment);
   }