Fossil SCM

Minor clean up to the "ci" command.

drh 2009-12-11 16:29 trunk
Commit 70656d00f6a6f293d7644b436ea885ad42a173e4
1 file changed +7 -5
+7 -5
--- src/checkin.c
+++ src/checkin.c
@@ -549,12 +549,12 @@
549549
vfile_aggregate_checksum_disk(vid, &cksum1);
550550
if( zComment ){
551551
blob_zero(&comment);
552552
blob_append(&comment, zComment, -1);
553553
}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);
556556
}else{
557557
char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'");
558558
prepare_commit_comment(&comment, zInit);
559559
free(zInit);
560560
}
@@ -564,14 +564,16 @@
564564
prompt_user("empty check-in comment. continue (y/N)? ", &ans);
565565
if( blob_str(&ans)[0]!='y' ){
566566
db_end_transaction(1);
567567
exit(1);
568568
}
569
+ }else{
570
+ db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
571
+ db_end_transaction(0);
572
+ db_begin_transaction();
569573
}
570
- db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
571
- db_end_transaction(0);
572
- db_begin_transaction();
574
+
573575
/* Step 1: Insert records for all modified files into the blob
574576
** table. If there were arguments passed to this command, only
575577
** the identified fils are inserted (if they have been modified).
576578
*/
577579
db_prepare(&q,
578580
--- 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

Keyboard Shortcuts

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