| | @@ -2216,10 +2216,12 @@ |
| 2216 | 2216 | Stmt q; /* Query returning all ancestor versions */ |
| 2217 | 2217 | int cnt = 0; /* Number of versions analyzed */ |
| 2218 | 2218 | int iLimit; /* Maximum number of versions to analyze */ |
| 2219 | 2219 | sqlite3_int64 mxTime; /* Halt at this time if not already complete */ |
| 2220 | 2220 | |
| 2221 | + memset(p, 0, sizeof(*p)); |
| 2222 | + |
| 2221 | 2223 | if( zLimit ){ |
| 2222 | 2224 | if( strcmp(zLimit,"none")==0 ){ |
| 2223 | 2225 | iLimit = 0; |
| 2224 | 2226 | mxTime = 0; |
| 2225 | 2227 | }else if( sqlite3_strglob("*[0-9]s", zLimit)==0 ){ |
| | @@ -2235,11 +2237,11 @@ |
| 2235 | 2237 | iLimit = 0; |
| 2236 | 2238 | mxTime = current_time_in_milliseconds()+1000; |
| 2237 | 2239 | } |
| 2238 | 2240 | db_begin_transaction(); |
| 2239 | 2241 | |
| 2240 | | - /* Get the artificate ID for the check-in begin analyzed */ |
| 2242 | + /* Get the artifact ID for the check-in begin analyzed */ |
| 2241 | 2243 | if( zRevision ){ |
| 2242 | 2244 | cid = name_to_typed_rid(zRevision, "ci"); |
| 2243 | 2245 | }else{ |
| 2244 | 2246 | db_must_be_within_tree(); |
| 2245 | 2247 | cid = db_lget_int("checkout", 0); |
| | @@ -2308,10 +2310,19 @@ |
| 2308 | 2310 | blob_reset(&step); |
| 2309 | 2311 | } |
| 2310 | 2312 | p->nVers++; |
| 2311 | 2313 | cnt++; |
| 2312 | 2314 | } |
| 2315 | + |
| 2316 | + if( p->nVers==0 ){ |
| 2317 | + if( zRevision ){ |
| 2318 | + fossil_fatal("file %s does not exist in check-in %s", zFilename, zRevision); |
| 2319 | + }else{ |
| 2320 | + fossil_fatal("no history for file: %s", zFilename); |
| 2321 | + } |
| 2322 | + } |
| 2323 | + |
| 2313 | 2324 | db_finalize(&q); |
| 2314 | 2325 | db_end_transaction(0); |
| 2315 | 2326 | } |
| 2316 | 2327 | |
| 2317 | 2328 | /* |
| 2318 | 2329 | |