Diff
Not logged in

Differences From:

File src/checkout.c part of check-in [7a2c37063a] - merge trunk into creole branch by bob on 2009-09-22 07:49:39. Also file src/checkout.c part of check-in [c774e298c3] - On the "checkout" command, make sure the argument specifies a check-in and not some other object. Ticket 867f23ff79. by drh on 2009-09-18 20:58:06. [view]

To:

File src/checkout.c part of check-in [999b1779e7] - Make use of the is_a_version() function to check for valid version IDs in the checkout command. Ticket 2de4ae605844fe3f. by drh on 2009-10-31 13:11:35. [view]

@@ -74,9 +74,9 @@
   vid = db_int(0, "SELECT rid FROM blob WHERE uuid=%B", &uuid);
   if( vid==0 ){
     fossil_fatal("no such check-in: %s", g.argv[2]);
   }
-  if( !db_exists("SELECT 1 FROM mlink WHERE mid=%d", vid) ){
+  if( !is_a_version(vid) ){
     fossil_fatal("object [%.10s] is not a check-in", blob_str(&uuid));
   }
   load_vfile_from_rid(vid);
   return vid;