Fossil SCM
Enhance the options for the 'tag cancel' command: add --date-override and --user-override, and show a summary for the help text
Commit
8f2d519bc01d7e142db752b798bcf905896658424d4f228125c11f6beb2ce07f
Parent
2efcd19f14a0f95…
1 file changed
+11
-1
+11
-1
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -394,10 +394,17 @@ | ||
| 394 | 394 | ** |
| 395 | 395 | ** Remove the tag TAGNAME from CHECK-IN, and also remove |
| 396 | 396 | ** the propagation of the tag to any descendants. Use the |
| 397 | 397 | ** the --dryrun or -n options to see what would have happened. |
| 398 | 398 | ** |
| 399 | +** Options: | |
| 400 | +** --raw Raw tag name. | |
| 401 | +** --date-override DATETIME Set date and time deleted. | |
| 402 | +** --user-override USER Name USER when deleting the tag. | |
| 403 | +** --dryrun|-n Display the control artifact, but do | |
| 404 | +** not insert it into the database. | |
| 405 | +** | |
| 399 | 406 | ** %fossil tag find ?OPTIONS? TAGNAME |
| 400 | 407 | ** |
| 401 | 408 | ** List all objects that use TAGNAME. TYPE can be "ci" for |
| 402 | 409 | ** check-ins or "e" for events. The limit option limits the number |
| 403 | 410 | ** of results to the given value. |
| @@ -470,16 +477,19 @@ | ||
| 470 | 477 | |
| 471 | 478 | if( strncmp(g.argv[2],"cancel",n)==0 ){ |
| 472 | 479 | int dryRun = 0; |
| 473 | 480 | int fRaw = find_option("raw","",0)!=0; |
| 474 | 481 | const char *zPrefix = fRaw ? "" : "sym-"; |
| 482 | + const char *zDateOvrd = find_option("date-override",0,1); | |
| 483 | + const char *zUserOvrd = find_option("user-override",0,1); | |
| 475 | 484 | if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN; |
| 476 | 485 | if( g.argc!=5 ){ |
| 477 | 486 | usage("cancel ?options? TAGNAME CHECK-IN"); |
| 478 | 487 | } |
| 479 | 488 | db_begin_transaction(); |
| 480 | - tag_add_artifact(zPrefix, g.argv[3], g.argv[4], 0, dryRun, 0, 0); | |
| 489 | + tag_add_artifact(zPrefix, g.argv[3], g.argv[4], 0, dryRun, | |
| 490 | + zDateOvrd, zUserOvrd); | |
| 481 | 491 | db_end_transaction(0); |
| 482 | 492 | }else |
| 483 | 493 | |
| 484 | 494 | if( strncmp(g.argv[2],"find",n)==0 ){ |
| 485 | 495 | Stmt q; |
| 486 | 496 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -394,10 +394,17 @@ | |
| 394 | ** |
| 395 | ** Remove the tag TAGNAME from CHECK-IN, and also remove |
| 396 | ** the propagation of the tag to any descendants. Use the |
| 397 | ** the --dryrun or -n options to see what would have happened. |
| 398 | ** |
| 399 | ** %fossil tag find ?OPTIONS? TAGNAME |
| 400 | ** |
| 401 | ** List all objects that use TAGNAME. TYPE can be "ci" for |
| 402 | ** check-ins or "e" for events. The limit option limits the number |
| 403 | ** of results to the given value. |
| @@ -470,16 +477,19 @@ | |
| 470 | |
| 471 | if( strncmp(g.argv[2],"cancel",n)==0 ){ |
| 472 | int dryRun = 0; |
| 473 | int fRaw = find_option("raw","",0)!=0; |
| 474 | const char *zPrefix = fRaw ? "" : "sym-"; |
| 475 | if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN; |
| 476 | if( g.argc!=5 ){ |
| 477 | usage("cancel ?options? TAGNAME CHECK-IN"); |
| 478 | } |
| 479 | db_begin_transaction(); |
| 480 | tag_add_artifact(zPrefix, g.argv[3], g.argv[4], 0, dryRun, 0, 0); |
| 481 | db_end_transaction(0); |
| 482 | }else |
| 483 | |
| 484 | if( strncmp(g.argv[2],"find",n)==0 ){ |
| 485 | Stmt q; |
| 486 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -394,10 +394,17 @@ | |
| 394 | ** |
| 395 | ** Remove the tag TAGNAME from CHECK-IN, and also remove |
| 396 | ** the propagation of the tag to any descendants. Use the |
| 397 | ** the --dryrun or -n options to see what would have happened. |
| 398 | ** |
| 399 | ** Options: |
| 400 | ** --raw Raw tag name. |
| 401 | ** --date-override DATETIME Set date and time deleted. |
| 402 | ** --user-override USER Name USER when deleting the tag. |
| 403 | ** --dryrun|-n Display the control artifact, but do |
| 404 | ** not insert it into the database. |
| 405 | ** |
| 406 | ** %fossil tag find ?OPTIONS? TAGNAME |
| 407 | ** |
| 408 | ** List all objects that use TAGNAME. TYPE can be "ci" for |
| 409 | ** check-ins or "e" for events. The limit option limits the number |
| 410 | ** of results to the given value. |
| @@ -470,16 +477,19 @@ | |
| 477 | |
| 478 | if( strncmp(g.argv[2],"cancel",n)==0 ){ |
| 479 | int dryRun = 0; |
| 480 | int fRaw = find_option("raw","",0)!=0; |
| 481 | const char *zPrefix = fRaw ? "" : "sym-"; |
| 482 | const char *zDateOvrd = find_option("date-override",0,1); |
| 483 | const char *zUserOvrd = find_option("user-override",0,1); |
| 484 | if( find_option("dryrun","n",0)!=0 ) dryRun = TAG_ADD_DRYRUN; |
| 485 | if( g.argc!=5 ){ |
| 486 | usage("cancel ?options? TAGNAME CHECK-IN"); |
| 487 | } |
| 488 | db_begin_transaction(); |
| 489 | tag_add_artifact(zPrefix, g.argv[3], g.argv[4], 0, dryRun, |
| 490 | zDateOvrd, zUserOvrd); |
| 491 | db_end_transaction(0); |
| 492 | }else |
| 493 | |
| 494 | if( strncmp(g.argv[2],"find",n)==0 ){ |
| 495 | Stmt q; |
| 496 |