Diff
Not logged in

Differences From:

File src/tag.c part of check-in [e8c4f69c50] - Change all mentions of "UUID" in the documentation and help screens into either "artifact ID" or "baseline ID" or "ticket ID" as appropriate. "UUID" has a widely recognized meaning that is different from its meaning in fossil. "UUID" is still used in code comments and in variable names. by drh on 2008-10-24 13:27:53. [view]

To:

File src/tag.c part of check-in [7c281b629a] - Prevent tag cancellations from showing in "fossil tag list" and "fossil tag find", and also on the tagview web page, but make them visible with "--raw" or on the RawTags webpage (admin only). Fixes ticket f273b440c38eb8478822812e0730f0fc2c8b4c36. by eric on 2008-12-20 11:36:20. [view]

@@ -404,12 +404,13 @@
 **
 **         List all tags, or if BASELINE is supplied, list
 **         all tags and their values for BASELINE.
 **
-** The option --raw allows the manipulation of all types of
-** tags used for various internal purposes in fossil. You
-** should not use this option to make changes unless you are
-** sure what you are doing.
+** The option --raw allows the manipulation of all types of tags
+** used for various internal purposes in fossil. It also shows
+** "cancel" tags for the "find" and "list" subcommands. You should
+** not use this option to make changes unless you are sure what
+** you are doing.
 **
 ** If you need to use a tagname that might be confused with
 ** a hexadecimal baseline or artifact ID, you can explicitly
 ** disambiguate it by prefixing it with "tag:". For instance:
@@ -484,9 +485,10 @@
     blob_append(&tagname, g.argv[3], strlen(g.argv[3]));
     db_prepare(&q,
       "SELECT blob.uuid FROM tagxref, blob"
       " WHERE tagid=(SELECT tagid FROM tag WHERE tagname=%B)"
-      "   AND blob.rid=tagxref.rid", &tagname
+      "   AND tagxref.tagtype > %d"
+      "   AND blob.rid=tagxref.rid", &tagname, raw ? -1 : 0
     );
     while( db_step(&q)==SQLITE_ROW ){
       printf("%s\n", db_column_text(&q, 0));
     }
@@ -499,10 +501,11 @@
       db_prepare(&q,
         "SELECT tagname FROM tag"
         " WHERE EXISTS(SELECT 1 FROM tagxref"
         "               WHERE tagid=tag.tagid"
-        "                 AND tagtype>0)"
-        " ORDER BY tagname"
+        "                 AND tagtype>%d)"
+        " ORDER BY tagname",
+        raw ? -1 : 0
       );
       while( db_step(&q)==SQLITE_ROW ){
         const char *name = db_column_text(&q, 0);
         if( raw || strncmp(name, prefix, preflen)==0 ){
@@ -514,11 +517,12 @@
       int rid = name_to_rid(g.argv[3]);
       db_prepare(&q,
         "SELECT tagname, value FROM tagxref, tag"
         " WHERE tagxref.rid=%d AND tagxref.tagid=tag.tagid"
-        "   AND tagtype>0"
+        "   AND tagtype>%d"
         " ORDER BY tagname",
-        rid
+        rid,
+        raw ? -1 : 0
       );
       while( db_step(&q)==SQLITE_ROW ){
         const char *zName = db_column_text(&q, 0);
         const char *zValue = db_column_text(&q, 1);