Fossil SCM

Print an "Internal Error" if the update command is unable to find a version to update to.

drh 2011-05-21 16:45 trunk
Commit 88e9f24affa25e315a2fb0667c40097eb41166e8
1 file changed +4
--- src/update.c
+++ src/update.c
@@ -176,10 +176,14 @@
176176
}
177177
tid = db_int(0, "SELECT rid FROM leaves, event"
178178
" WHERE event.objid=leaves.rid"
179179
" ORDER BY event.mtime DESC");
180180
}
181
+
182
+ if( tid==0 ){
183
+ fossil_panic("Internal Error: unable to find a version to update to.");
184
+ }
181185
182186
if( tid==vid && !verboseFlag ) return; /* Nothing to update */
183187
db_begin_transaction();
184188
vfile_check_signature(vid, 1, 0);
185189
if( !nochangeFlag && !internalUpdate ) undo_begin();
186190
--- src/update.c
+++ src/update.c
@@ -176,10 +176,14 @@
176 }
177 tid = db_int(0, "SELECT rid FROM leaves, event"
178 " WHERE event.objid=leaves.rid"
179 " ORDER BY event.mtime DESC");
180 }
 
 
 
 
181
182 if( tid==vid && !verboseFlag ) return; /* Nothing to update */
183 db_begin_transaction();
184 vfile_check_signature(vid, 1, 0);
185 if( !nochangeFlag && !internalUpdate ) undo_begin();
186
--- src/update.c
+++ src/update.c
@@ -176,10 +176,14 @@
176 }
177 tid = db_int(0, "SELECT rid FROM leaves, event"
178 " WHERE event.objid=leaves.rid"
179 " ORDER BY event.mtime DESC");
180 }
181
182 if( tid==0 ){
183 fossil_panic("Internal Error: unable to find a version to update to.");
184 }
185
186 if( tid==vid && !verboseFlag ) return; /* Nothing to update */
187 db_begin_transaction();
188 vfile_check_signature(vid, 1, 0);
189 if( !nochangeFlag && !internalUpdate ) undo_begin();
190

Keyboard Shortcuts

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