Check-in [70656d00f6]
Not logged in
Overview

SHA1 Hash:70656d00f6a6f293d7644b436ea885ad42a173e4
Date: 2009-12-11 16:29:00
User: drh
Comment:Minor clean up to the "ci" command.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified src/checkin.c from [59bae90aed] to [c1819242e8].

@@ -549,12 +549,12 @@
   vfile_aggregate_checksum_disk(vid, &cksum1);
   if( zComment ){
     blob_zero(&comment);
     blob_append(&comment, zComment, -1);
   }else if( zCommentFile ){
-      blob_zero(&comment);
-      blob_read_from_file(&comment, zCommentFile);
+    blob_zero(&comment);
+    blob_read_from_file(&comment, zCommentFile);
   }else{
     char *zInit = db_text(0, "SELECT value FROM vvar WHERE name='ci-comment'");
     prepare_commit_comment(&comment, zInit);
     free(zInit);
   }
@@ -564,14 +564,16 @@
     prompt_user("empty check-in comment.  continue (y/N)? ", &ans);
     if( blob_str(&ans)[0]!='y' ){
       db_end_transaction(1);
       exit(1);
     }
-  }
-  db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
-  db_end_transaction(0);
-  db_begin_transaction();
+  }else{
+    db_multi_exec("REPLACE INTO vvar VALUES('ci-comment',%B)", &comment);
+    db_end_transaction(0);
+    db_begin_transaction();
+  }
+
   /* Step 1: Insert records for all modified files into the blob
   ** table. If there were arguments passed to this command, only
   ** the identified fils are inserted (if they have been modified).
   */
   db_prepare(&q,