Fossil SCM

Updates to the artifact identifier logic to support Forum.

drh 2018-07-22 18:16 forum-v2
Commit ffe8db5758ddaa2bd3c82739af1a4c1eba9f4ae541269317a329328189919a29
1 file changed +4 -3
+4 -3
--- src/name.c
+++ src/name.c
@@ -94,19 +94,19 @@
9494
** * "next"
9595
**
9696
** Return the RID of the matching artifact. Or return 0 if the name does not
9797
** match any known object. Or return -1 if the name is ambiguous.
9898
**
99
-** The zType parameter specifies the type of artifact: ci, t, w, e, g.
99
+** The zType parameter specifies the type of artifact: ci, t, w, e, g, f.
100100
** If zType is NULL or "" or "*" then any type of artifact will serve.
101101
** If zType is "br" then find the first check-in of the named branch
102102
** rather than the last.
103103
** zType is "ci" in most use cases since we are usually searching for
104104
** a check-in.
105105
**
106106
** Note that the input zTag for types "t" and "e" is the artifact hash of
107
-** the ticket-change or event-change artifact, not the randomly generated
107
+** the ticket-change or technote-change artifact, not the randomly generated
108108
** hexadecimal identifier assigned to tickets and events. Those identifiers
109109
** live in a separate namespace.
110110
*/
111111
int symbolic_name_to_rid(const char *zTag, const char *zType){
112112
int vid;
@@ -603,11 +603,12 @@
603603
if( db_step(&q)==SQLITE_ROW ){
604604
const char *zType;
605605
switch( db_column_text(&q,0)[0] ){
606606
case 'c': zType = "Check-in"; break;
607607
case 'w': zType = "Wiki-edit"; break;
608
- case 'e': zType = "Event"; break;
608
+ case 'e': zType = "Technote"; break;
609
+ case 'f': zType = "Forum-post"; break;
609610
case 't': zType = "Ticket-change"; break;
610611
case 'g': zType = "Tag-change"; break;
611612
default: zType = "Unknown"; break;
612613
}
613614
fossil_print("type: %s by %s on %s\n", zType, db_column_text(&q,2),
614615
--- src/name.c
+++ src/name.c
@@ -94,19 +94,19 @@
94 ** * "next"
95 **
96 ** Return the RID of the matching artifact. Or return 0 if the name does not
97 ** match any known object. Or return -1 if the name is ambiguous.
98 **
99 ** The zType parameter specifies the type of artifact: ci, t, w, e, g.
100 ** If zType is NULL or "" or "*" then any type of artifact will serve.
101 ** If zType is "br" then find the first check-in of the named branch
102 ** rather than the last.
103 ** zType is "ci" in most use cases since we are usually searching for
104 ** a check-in.
105 **
106 ** Note that the input zTag for types "t" and "e" is the artifact hash of
107 ** the ticket-change or event-change artifact, not the randomly generated
108 ** hexadecimal identifier assigned to tickets and events. Those identifiers
109 ** live in a separate namespace.
110 */
111 int symbolic_name_to_rid(const char *zTag, const char *zType){
112 int vid;
@@ -603,11 +603,12 @@
603 if( db_step(&q)==SQLITE_ROW ){
604 const char *zType;
605 switch( db_column_text(&q,0)[0] ){
606 case 'c': zType = "Check-in"; break;
607 case 'w': zType = "Wiki-edit"; break;
608 case 'e': zType = "Event"; break;
 
609 case 't': zType = "Ticket-change"; break;
610 case 'g': zType = "Tag-change"; break;
611 default: zType = "Unknown"; break;
612 }
613 fossil_print("type: %s by %s on %s\n", zType, db_column_text(&q,2),
614
--- src/name.c
+++ src/name.c
@@ -94,19 +94,19 @@
94 ** * "next"
95 **
96 ** Return the RID of the matching artifact. Or return 0 if the name does not
97 ** match any known object. Or return -1 if the name is ambiguous.
98 **
99 ** The zType parameter specifies the type of artifact: ci, t, w, e, g, f.
100 ** If zType is NULL or "" or "*" then any type of artifact will serve.
101 ** If zType is "br" then find the first check-in of the named branch
102 ** rather than the last.
103 ** zType is "ci" in most use cases since we are usually searching for
104 ** a check-in.
105 **
106 ** Note that the input zTag for types "t" and "e" is the artifact hash of
107 ** the ticket-change or technote-change artifact, not the randomly generated
108 ** hexadecimal identifier assigned to tickets and events. Those identifiers
109 ** live in a separate namespace.
110 */
111 int symbolic_name_to_rid(const char *zTag, const char *zType){
112 int vid;
@@ -603,11 +603,12 @@
603 if( db_step(&q)==SQLITE_ROW ){
604 const char *zType;
605 switch( db_column_text(&q,0)[0] ){
606 case 'c': zType = "Check-in"; break;
607 case 'w': zType = "Wiki-edit"; break;
608 case 'e': zType = "Technote"; break;
609 case 'f': zType = "Forum-post"; break;
610 case 't': zType = "Ticket-change"; break;
611 case 'g': zType = "Tag-change"; break;
612 default: zType = "Unknown"; break;
613 }
614 fossil_print("type: %s by %s on %s\n", zType, db_column_text(&q,2),
615

Keyboard Shortcuts

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