Fossil SCM
Only show propagating tags (not single-checkin tags) in the check-in comment entry template.
Commit
4943c0e50485b3b8fe33a8646db97d2396082659
Parent
a6303982b01929b…
2 files changed
+1
-1
+6
-5
+1
-1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -320,11 +320,11 @@ | ||
| 320 | 320 | "#\n", -1 |
| 321 | 321 | ); |
| 322 | 322 | if( zBranch && zBranch[0] ){ |
| 323 | 323 | blob_appendf(&text, "# tags: %s\n#\n", zBranch); |
| 324 | 324 | }else{ |
| 325 | - char *zTags = info_tags_of_checkin(parent_rid); | |
| 325 | + char *zTags = info_tags_of_checkin(parent_rid, 1); | |
| 326 | 326 | if( zTags ) blob_appendf(&text, "# tags: %z\n#\n", zTags); |
| 327 | 327 | } |
| 328 | 328 | if( g.markPrivate ){ |
| 329 | 329 | blob_append(&text, |
| 330 | 330 | "# PRIVATE BRANCH: This check-in will be private and will not sync to\n" |
| 331 | 331 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -320,11 +320,11 @@ | |
| 320 | "#\n", -1 |
| 321 | ); |
| 322 | if( zBranch && zBranch[0] ){ |
| 323 | blob_appendf(&text, "# tags: %s\n#\n", zBranch); |
| 324 | }else{ |
| 325 | char *zTags = info_tags_of_checkin(parent_rid); |
| 326 | if( zTags ) blob_appendf(&text, "# tags: %z\n#\n", zTags); |
| 327 | } |
| 328 | if( g.markPrivate ){ |
| 329 | blob_append(&text, |
| 330 | "# PRIVATE BRANCH: This check-in will be private and will not sync to\n" |
| 331 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -320,11 +320,11 @@ | |
| 320 | "#\n", -1 |
| 321 | ); |
| 322 | if( zBranch && zBranch[0] ){ |
| 323 | blob_appendf(&text, "# tags: %s\n#\n", zBranch); |
| 324 | }else{ |
| 325 | char *zTags = info_tags_of_checkin(parent_rid, 1); |
| 326 | if( zTags ) blob_appendf(&text, "# tags: %z\n#\n", zTags); |
| 327 | } |
| 328 | if( g.markPrivate ){ |
| 329 | blob_append(&text, |
| 330 | "# PRIVATE BRANCH: This check-in will be private and will not sync to\n" |
| 331 |
+6
-5
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -30,22 +30,23 @@ | ||
| 30 | 30 | #include <assert.h> |
| 31 | 31 | |
| 32 | 32 | /* |
| 33 | 33 | ** Return a string (in memory obtained from malloc) holding a |
| 34 | 34 | ** comma-separated list of tags that apply to check-in with |
| 35 | -** record-id rid. | |
| 35 | +** record-id rid. If the "propagatingOnly" flag is true, then only | |
| 36 | +** show branch tags (tags that propagate to children). | |
| 36 | 37 | ** |
| 37 | 38 | ** Return NULL if there are no such tags. |
| 38 | 39 | */ |
| 39 | -char *info_tags_of_checkin(int rid){ | |
| 40 | +char *info_tags_of_checkin(int rid, int propagatingOnly){ | |
| 40 | 41 | char *zTags; |
| 41 | 42 | zTags = db_text(0, "SELECT group_concat(substr(tagname, 5), ', ')" |
| 42 | 43 | " FROM tagxref, tag" |
| 43 | - " WHERE tagxref.rid=%d AND tagxref.tagtype>0" | |
| 44 | + " WHERE tagxref.rid=%d AND tagxref.tagtype>%d" | |
| 44 | 45 | " AND tag.tagid=tagxref.tagid" |
| 45 | 46 | " AND tag.tagname GLOB 'sym-*'", |
| 46 | - rid); | |
| 47 | + rid, propagatingOnly!=0); | |
| 47 | 48 | return zTags; |
| 48 | 49 | } |
| 49 | 50 | |
| 50 | 51 | |
| 51 | 52 | /* |
| @@ -95,11 +96,11 @@ | ||
| 95 | 96 | ); |
| 96 | 97 | printf("child: %s %s\n", zUuid, zDate); |
| 97 | 98 | free(zDate); |
| 98 | 99 | } |
| 99 | 100 | db_finalize(&q); |
| 100 | - zTags = info_tags_of_checkin(rid); | |
| 101 | + zTags = info_tags_of_checkin(rid, 0); | |
| 101 | 102 | if( zTags && zTags[0] ){ |
| 102 | 103 | printf("tags: %s\n", zTags); |
| 103 | 104 | } |
| 104 | 105 | free(zTags); |
| 105 | 106 | if( zComment ){ |
| 106 | 107 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -30,22 +30,23 @@ | |
| 30 | #include <assert.h> |
| 31 | |
| 32 | /* |
| 33 | ** Return a string (in memory obtained from malloc) holding a |
| 34 | ** comma-separated list of tags that apply to check-in with |
| 35 | ** record-id rid. |
| 36 | ** |
| 37 | ** Return NULL if there are no such tags. |
| 38 | */ |
| 39 | char *info_tags_of_checkin(int rid){ |
| 40 | char *zTags; |
| 41 | zTags = db_text(0, "SELECT group_concat(substr(tagname, 5), ', ')" |
| 42 | " FROM tagxref, tag" |
| 43 | " WHERE tagxref.rid=%d AND tagxref.tagtype>0" |
| 44 | " AND tag.tagid=tagxref.tagid" |
| 45 | " AND tag.tagname GLOB 'sym-*'", |
| 46 | rid); |
| 47 | return zTags; |
| 48 | } |
| 49 | |
| 50 | |
| 51 | /* |
| @@ -95,11 +96,11 @@ | |
| 95 | ); |
| 96 | printf("child: %s %s\n", zUuid, zDate); |
| 97 | free(zDate); |
| 98 | } |
| 99 | db_finalize(&q); |
| 100 | zTags = info_tags_of_checkin(rid); |
| 101 | if( zTags && zTags[0] ){ |
| 102 | printf("tags: %s\n", zTags); |
| 103 | } |
| 104 | free(zTags); |
| 105 | if( zComment ){ |
| 106 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -30,22 +30,23 @@ | |
| 30 | #include <assert.h> |
| 31 | |
| 32 | /* |
| 33 | ** Return a string (in memory obtained from malloc) holding a |
| 34 | ** comma-separated list of tags that apply to check-in with |
| 35 | ** record-id rid. If the "propagatingOnly" flag is true, then only |
| 36 | ** show branch tags (tags that propagate to children). |
| 37 | ** |
| 38 | ** Return NULL if there are no such tags. |
| 39 | */ |
| 40 | char *info_tags_of_checkin(int rid, int propagatingOnly){ |
| 41 | char *zTags; |
| 42 | zTags = db_text(0, "SELECT group_concat(substr(tagname, 5), ', ')" |
| 43 | " FROM tagxref, tag" |
| 44 | " WHERE tagxref.rid=%d AND tagxref.tagtype>%d" |
| 45 | " AND tag.tagid=tagxref.tagid" |
| 46 | " AND tag.tagname GLOB 'sym-*'", |
| 47 | rid, propagatingOnly!=0); |
| 48 | return zTags; |
| 49 | } |
| 50 | |
| 51 | |
| 52 | /* |
| @@ -95,11 +96,11 @@ | |
| 96 | ); |
| 97 | printf("child: %s %s\n", zUuid, zDate); |
| 98 | free(zDate); |
| 99 | } |
| 100 | db_finalize(&q); |
| 101 | zTags = info_tags_of_checkin(rid, 0); |
| 102 | if( zTags && zTags[0] ){ |
| 103 | printf("tags: %s\n", zTags); |
| 104 | } |
| 105 | free(zTags); |
| 106 | if( zComment ){ |
| 107 |