Diff
Not logged in

Differences From:

File src/tag.c part of check-in [02a584f7f5] - Add the --private option to the "fossil commit" command. This option creates a private branch which is never pushed. by drh on 2009-08-26 18:25:48. [view]

To:

File src/tag.c part of check-in [7a2c37063a] - merge trunk into creole branch by bob on 2009-09-22 07:49:39. Also file src/tag.c part of check-in [95f5520a09] - Construct event records for tickets correctly even when the ticket change artifacts arrive out of order. by drh on 2009-09-14 14:08:35. [view]

@@ -143,9 +143,9 @@
 
 /*
 ** Insert a tag into the database.
 */
-void tag_insert(
+int tag_insert(
   const char *zTag,        /* Name of the tag (w/o the "+" or "-" prefix */
   int tagtype,             /* 0:cancel  1:singleton  2:propagated */
   const char *zValue,      /* Value if the tag is really a property */
   int srcId,               /* Artifact that contains this tag */
@@ -171,9 +171,9 @@
   rc = db_step(&s);
   db_finalize(&s);
   if( rc==SQLITE_ROW ){
     /* Another entry that is more recent already exists.  Do nothing */
-    return;
+    return tagid;
   }
   db_prepare(&s,
     "REPLACE INTO tagxref(tagid,tagtype,srcId,origid,value,mtime,rid)"
     " VALUES(%d,%d,%d,%d,%Q,:mtime,%d)",
@@ -209,8 +209,9 @@
   }
   if( tagtype==0 || tagtype==2 ){
     tag_propagate(rid, tagid, tagtype, rid, zValue, mtime);
   }
+  return tagid;
 }
 
 
 /*