Diff
Not logged in

Differences From:

File src/checkout.c part of check-in [e00a5de0f1] - Improvement to the error message issued when the HOME environment variable is missing. Ticket e3c34af10dd28 by drh on 2009-08-01 14:34:24. [view]

To:

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]

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