Fossil SCM

On commit, check the repository for changes before starting the write transaction, so that a diff can be run during the check-in comment editing. Ticket [014ac374123d9a6ab6894].

drh 2010-10-15 13:55 trunk
Commit 59f685856bb6a1b9d3e581b7198f8e7e3384efb7
1 file changed +2 -2
+2 -2
--- src/checkin.c
+++ src/checkin.c
@@ -681,15 +681,15 @@
681681
*/
682682
if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){
683683
fossil_fatal("no such user: %s", g.zLogin);
684684
}
685685
686
+ rc = unsaved_changes();
686687
db_begin_transaction();
687688
db_record_repository_filename(0);
688
- rc = unsaved_changes();
689689
if( rc==0 && !isAMerge && !forceFlag ){
690
- fossil_panic("nothing has changed");
690
+ fossil_fatal("nothing has changed");
691691
}
692692
693693
/* If one or more files that were named on the command line have not
694694
** been modified, bail out now.
695695
*/
696696
--- src/checkin.c
+++ src/checkin.c
@@ -681,15 +681,15 @@
681 */
682 if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){
683 fossil_fatal("no such user: %s", g.zLogin);
684 }
685
 
686 db_begin_transaction();
687 db_record_repository_filename(0);
688 rc = unsaved_changes();
689 if( rc==0 && !isAMerge && !forceFlag ){
690 fossil_panic("nothing has changed");
691 }
692
693 /* If one or more files that were named on the command line have not
694 ** been modified, bail out now.
695 */
696
--- src/checkin.c
+++ src/checkin.c
@@ -681,15 +681,15 @@
681 */
682 if( !db_exists("SELECT 1 FROM user WHERE login=%Q", g.zLogin) ){
683 fossil_fatal("no such user: %s", g.zLogin);
684 }
685
686 rc = unsaved_changes();
687 db_begin_transaction();
688 db_record_repository_filename(0);
 
689 if( rc==0 && !isAMerge && !forceFlag ){
690 fossil_fatal("nothing has changed");
691 }
692
693 /* If one or more files that were named on the command line have not
694 ** been modified, bail out now.
695 */
696

Keyboard Shortcuts

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