Overview
SHA1 Hash: | c774e298c3f213f7487fb0ba638edfa3f1b89edf |
---|---|
Date: | 2009-09-18 20:58:06 |
User: | drh |
Comment: | On the "checkout" command, make sure the argument specifies a check-in
and not some other object. Ticket |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/checkout.c from [9058612e32] to [975bc66779].
@@ -71,11 +71,14 @@ if( name_to_uuid(&uuid, 1) ){ 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; }