Fossil SCM
Minor clean up to the "ci" command.
Commit
70656d00f6a6f293d7644b436ea885ad42a173e4
Parent
18a66ab32baa75c…
1 file changed
+7
-5
+7
-5
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -549,12 +549,12 @@ | ||
| 549 | 549 | vfile_aggregate_checksum_disk(vid, &cksum1); |
| 550 | 550 | if( zComment ){ |
| 551 | 551 | blob_zero(&comment); |
| 552 | 552 | blob_append(&comment, zComment, -1); |
| 553 | 553 | }else if( zCommentFile ){ |
| 554 | - blob_zero(&comment); | |
| 555 | - blob_read_from_file(&comment, zCommentFile); | |
| 554 | + blob_zero(&comment); | |
| 555 | + blob_read_from_file(&comment, zCommentFile); | |
| 556 | 556 | }else{ |
| 557 | 557 | char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'"); |
| 558 | 558 | prepare_commit_comment(&comment, zInit); |
| 559 | 559 | free(zInit); |
| 560 | 560 | } |
| @@ -564,14 +564,16 @@ | ||
| 564 | 564 | prompt_user("empty check-in comment. continue (y/N)? ", &ans); |
| 565 | 565 | if( blob_str(&ans)[0]!='y' ){ |
| 566 | 566 | db_end_transaction(1); |
| 567 | 567 | exit(1); |
| 568 | 568 | } |
| 569 | + }else{ | |
| 570 | + db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment); | |
| 571 | + db_end_transaction(0); | |
| 572 | + db_begin_transaction(); | |
| 569 | 573 | } |
| 570 | - db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment); | |
| 571 | - db_end_transaction(0); | |
| 572 | - db_begin_transaction(); | |
| 574 | + | |
| 573 | 575 | /* Step 1: Insert records for all modified files into the blob |
| 574 | 576 | ** table. If there were arguments passed to this command, only |
| 575 | 577 | ** the identified fils are inserted (if they have been modified). |
| 576 | 578 | */ |
| 577 | 579 | db_prepare(&q, |
| 578 | 580 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -549,12 +549,12 @@ | |
| 549 | vfile_aggregate_checksum_disk(vid, &cksum1); |
| 550 | if( zComment ){ |
| 551 | blob_zero(&comment); |
| 552 | blob_append(&comment, zComment, -1); |
| 553 | }else if( zCommentFile ){ |
| 554 | blob_zero(&comment); |
| 555 | blob_read_from_file(&comment, zCommentFile); |
| 556 | }else{ |
| 557 | char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'"); |
| 558 | prepare_commit_comment(&comment, zInit); |
| 559 | free(zInit); |
| 560 | } |
| @@ -564,14 +564,16 @@ | |
| 564 | prompt_user("empty check-in comment. continue (y/N)? ", &ans); |
| 565 | if( blob_str(&ans)[0]!='y' ){ |
| 566 | db_end_transaction(1); |
| 567 | exit(1); |
| 568 | } |
| 569 | } |
| 570 | db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment); |
| 571 | db_end_transaction(0); |
| 572 | db_begin_transaction(); |
| 573 | /* Step 1: Insert records for all modified files into the blob |
| 574 | ** table. If there were arguments passed to this command, only |
| 575 | ** the identified fils are inserted (if they have been modified). |
| 576 | */ |
| 577 | db_prepare(&q, |
| 578 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -549,12 +549,12 @@ | |
| 549 | vfile_aggregate_checksum_disk(vid, &cksum1); |
| 550 | if( zComment ){ |
| 551 | blob_zero(&comment); |
| 552 | blob_append(&comment, zComment, -1); |
| 553 | }else if( zCommentFile ){ |
| 554 | blob_zero(&comment); |
| 555 | blob_read_from_file(&comment, zCommentFile); |
| 556 | }else{ |
| 557 | char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'"); |
| 558 | prepare_commit_comment(&comment, zInit); |
| 559 | free(zInit); |
| 560 | } |
| @@ -564,14 +564,16 @@ | |
| 564 | prompt_user("empty check-in comment. continue (y/N)? ", &ans); |
| 565 | if( blob_str(&ans)[0]!='y' ){ |
| 566 | db_end_transaction(1); |
| 567 | exit(1); |
| 568 | } |
| 569 | }else{ |
| 570 | db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment); |
| 571 | db_end_transaction(0); |
| 572 | db_begin_transaction(); |
| 573 | } |
| 574 | |
| 575 | /* Step 1: Insert records for all modified files into the blob |
| 576 | ** table. If there were arguments passed to this command, only |
| 577 | ** the identified fils are inserted (if they have been modified). |
| 578 | */ |
| 579 | db_prepare(&q, |
| 580 |