| | @@ -158,12 +158,11 @@ |
| 158 | 158 | const char *zTag, /* Name of the tag (w/o the "+" or "-" prefix */ |
| 159 | 159 | int tagtype, /* 0:cancel 1:singleton 2:propagated */ |
| 160 | 160 | const char *zValue, /* Value if the tag is really a property */ |
| 161 | 161 | int srcId, /* Artifact that contains this tag */ |
| 162 | 162 | double mtime, /* Timestamp. Use default if <=0.0 */ |
| 163 | | - int rid, /* Artifact to which the tag is to attached */ |
| 164 | | - const char *zComment /* Comment for the tag */ |
| 163 | + int rid /* Artifact to which the tag is to attached */ |
| 165 | 164 | ){ |
| 166 | 165 | Stmt s; |
| 167 | 166 | const char *zCol; |
| 168 | 167 | int tagid = tag_findid(zTag, 1); |
| 169 | 168 | int rc; |
| | @@ -184,13 +183,13 @@ |
| 184 | 183 | if( rc==SQLITE_ROW ){ |
| 185 | 184 | /* Another entry that is more recent already exists. Do nothing */ |
| 186 | 185 | return tagid; |
| 187 | 186 | } |
| 188 | 187 | db_prepare(&s, |
| 189 | | - "REPLACE INTO tagxref(tagid,tagtype,srcId,origid,value,mtime,rid,tagcomment)" |
| 190 | | - " VALUES(%d,%d,%d,%d,%Q,:mtime,%d,%Q)", |
| 191 | | - tagid, tagtype, srcId, rid, zValue, rid, zComment |
| 188 | + "REPLACE INTO tagxref(tagid,tagtype,srcId,origid,value,mtime,rid)" |
| 189 | + " VALUES(%d,%d,%d,%d,%Q,:mtime,%d)", |
| 190 | + tagid, tagtype, srcId, rid, zValue, rid |
| 192 | 191 | ); |
| 193 | 192 | db_bind_double(&s, ":mtime", mtime); |
| 194 | 193 | db_step(&s); |
| 195 | 194 | db_finalize(&s); |
| 196 | 195 | if( tagid==TAG_BRANCH ) leaf_eventually_check(rid); |
| | @@ -276,11 +275,11 @@ |
| 276 | 275 | fossil_fatal("no such object: %s", g.argv[3]); |
| 277 | 276 | } |
| 278 | 277 | g.markPrivate = content_is_private(rid); |
| 279 | 278 | zValue = g.argc==5 ? g.argv[4] : 0; |
| 280 | 279 | db_begin_transaction(); |
| 281 | | - tag_insert(zTag, tagtype, zValue, -1, 0.0, rid, NULL); |
| 280 | + tag_insert(zTag, tagtype, zValue, -1, 0.0, rid); |
| 282 | 281 | db_end_transaction(0); |
| 283 | 282 | } |
| 284 | 283 | |
| 285 | 284 | /* |
| 286 | 285 | ** OR this value into the tagtype argument to tag_add_artifact to |
| | @@ -303,11 +302,10 @@ |
| 303 | 302 | const char *zPrefix, /* Prefix to prepend to tag name */ |
| 304 | 303 | const char *zTagname, /* The tag to add or cancel */ |
| 305 | 304 | const char *zObjName, /* Name of object attached to */ |
| 306 | 305 | const char *zValue, /* Value for the tag. Might be NULL */ |
| 307 | 306 | int tagtype, /* 0:cancel 1:singleton 2:propagated */ |
| 308 | | - const char *zComment, /* Comment for the tag */ |
| 309 | 307 | const char *zDateOvrd, /* Override date string */ |
| 310 | 308 | const char *zUserOvrd /* Override user name */ |
| 311 | 309 | ){ |
| 312 | 310 | int rid; |
| 313 | 311 | int nrid; |
| | @@ -341,11 +339,10 @@ |
| 341 | 339 | " a hexadecimal artifact ID", |
| 342 | 340 | zTagname |
| 343 | 341 | ); |
| 344 | 342 | } |
| 345 | 343 | #endif |
| 346 | | - if( zComment ) blob_appendf(&ctrl, "C %F\n", zComment); |
| 347 | 344 | zDate = date_in_standard_format(zDateOvrd ? zDateOvrd : "now"); |
| 348 | 345 | blob_appendf(&ctrl, "D %s\n", zDate); |
| 349 | 346 | blob_appendf(&ctrl, "T %c%s%F %b", |
| 350 | 347 | zTagtype[tagtype], zPrefix, zTagname, &uuid); |
| 351 | 348 | if( tagtype>0 && zValue && zValue[0] ){ |
| | @@ -382,11 +379,10 @@ |
| 382 | 379 | ** the tag value propagates to all descendants of CHECK-IN |
| 383 | 380 | ** |
| 384 | 381 | ** Options: |
| 385 | 382 | ** --raw Raw tag name. |
| 386 | 383 | ** --propagate Propagating tag. |
| 387 | | -** --comment Set a comment for the tag. |
| 388 | 384 | ** --date-override DATETIME Set date and time added. |
| 389 | 385 | ** --user-override USER Name USER when adding the tag. |
| 390 | 386 | ** --dryrun|-n Display the tag text, but do not |
| 391 | 387 | ** actually insert it into the database. |
| 392 | 388 | ** |
| | @@ -454,21 +450,20 @@ |
| 454 | 450 | } |
| 455 | 451 | |
| 456 | 452 | if( strncmp(g.argv[2],"add",n)==0 ){ |
| 457 | 453 | char *zValue; |
| 458 | 454 | int dryRun = 0; |
| 459 | | - const char *zComment = find_option("comment",0,1); |
| 460 | 455 | const char *zDateOvrd = find_option("date-override",0,1); |
| 461 | 456 | const char *zUserOvrd = find_option("user-override",0,1); |
| 462 | 457 | if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN; |
| 463 | 458 | if( g.argc!=5 && g.argc!=6 ){ |
| 464 | 459 | usage("add ?options? TAGNAME CHECK-IN ?VALUE?"); |
| 465 | 460 | } |
| 466 | 461 | zValue = g.argc==6 ? g.argv[5] : 0; |
| 467 | 462 | db_begin_transaction(); |
| 468 | 463 | tag_add_artifact(zPrefix, g.argv[3], g.argv[4], zValue, |
| 469 | | - 1+fPropagate+dryRun,zComment,zDateOvrd,zUserOvrd); |
| 464 | + 1+fPropagate+dryRun,zDateOvrd,zUserOvrd); |
| 470 | 465 | db_end_transaction(0); |
| 471 | 466 | }else |
| 472 | 467 | |
| 473 | 468 | if( strncmp(g.argv[2],"branch",n)==0 ){ |
| 474 | 469 | fossil_fatal("the \"fossil tag branch\" command is discontinued\n" |
| | @@ -480,11 +475,11 @@ |
| 480 | 475 | if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN; |
| 481 | 476 | if( g.argc!=5 ){ |
| 482 | 477 | usage("cancel ?options? TAGNAME CHECK-IN"); |
| 483 | 478 | } |
| 484 | 479 | db_begin_transaction(); |
| 485 | | - tag_add_artifact(zPrefix, g.argv[3], g.argv[4], 0, dryRun, 0, 0, 0); |
| 480 | + tag_add_artifact(zPrefix, g.argv[3], g.argv[4], 0, dryRun, 0, 0); |
| 486 | 481 | db_end_transaction(0); |
| 487 | 482 | }else |
| 488 | 483 | |
| 489 | 484 | if( strncmp(g.argv[2],"find",n)==0 ){ |
| 490 | 485 | Stmt q; |
| | @@ -636,14 +631,14 @@ |
| 636 | 631 | zUuid = rid_to_uuid(pid); |
| 637 | 632 | blob_append(&value, zUuid, UUID_SIZE); |
| 638 | 633 | fossil_free(zUuid); |
| 639 | 634 | } |
| 640 | 635 | if( bTest && !dryRun ){ |
| 641 | | - tag_insert("parent", 1, blob_str(&value), -1, 0.0, rid, NULL); |
| 636 | + tag_insert("parent", 1, blob_str(&value), -1, 0.0, rid); |
| 642 | 637 | }else{ |
| 643 | 638 | zUuid = rid_to_uuid(rid); |
| 644 | | - tag_add_artifact("","parent",zUuid,blob_str(&value),1|dryRun,0,0,0); |
| 639 | + tag_add_artifact("","parent",zUuid,blob_str(&value),1|dryRun,0,0); |
| 645 | 640 | } |
| 646 | 641 | } |
| 647 | 642 | |
| 648 | 643 | |
| 649 | 644 | /* |
| 650 | 645 | |