Fossil SCM

Only show propagating tags (not single-checkin tags) in the check-in comment entry template.

drh 2010-01-06 13:48 trunk
Commit 4943c0e50485b3b8fe33a8646db97d2396082659
2 files changed +1 -1 +6 -5
+1 -1
--- src/checkin.c
+++ src/checkin.c
@@ -320,11 +320,11 @@
320320
"#\n", -1
321321
);
322322
if( zBranch && zBranch[0] ){
323323
blob_appendf(&text, "# tags: %s\n#\n", zBranch);
324324
}else{
325
- char *zTags = info_tags_of_checkin(parent_rid);
325
+ char *zTags = info_tags_of_checkin(parent_rid, 1);
326326
if( zTags ) blob_appendf(&text, "# tags: %z\n#\n", zTags);
327327
}
328328
if( g.markPrivate ){
329329
blob_append(&text,
330330
"# PRIVATE BRANCH: This check-in will be private and will not sync to\n"
331331
--- 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 @@
3030
#include <assert.h>
3131
3232
/*
3333
** Return a string (in memory obtained from malloc) holding a
3434
** 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).
3637
**
3738
** Return NULL if there are no such tags.
3839
*/
39
-char *info_tags_of_checkin(int rid){
40
+char *info_tags_of_checkin(int rid, int propagatingOnly){
4041
char *zTags;
4142
zTags = db_text(0, "SELECT group_concat(substr(tagname, 5), ', ')"
4243
" FROM tagxref, tag"
43
- " WHERE tagxref.rid=%d AND tagxref.tagtype>0"
44
+ " WHERE tagxref.rid=%d AND tagxref.tagtype>%d"
4445
" AND tag.tagid=tagxref.tagid"
4546
" AND tag.tagname GLOB 'sym-*'",
46
- rid);
47
+ rid, propagatingOnly!=0);
4748
return zTags;
4849
}
4950
5051
5152
/*
@@ -95,11 +96,11 @@
9596
);
9697
printf("child: %s %s\n", zUuid, zDate);
9798
free(zDate);
9899
}
99100
db_finalize(&q);
100
- zTags = info_tags_of_checkin(rid);
101
+ zTags = info_tags_of_checkin(rid, 0);
101102
if( zTags && zTags[0] ){
102103
printf("tags: %s\n", zTags);
103104
}
104105
free(zTags);
105106
if( zComment ){
106107
--- 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

Keyboard Shortcuts

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