Fossil SCM
Correct cat command error message on nonexistent file.
Commit
715f88811a2618ac65ad8f90a2ed166c89d2b9ba
Parent
6f2b59270b14600…
1 file changed
+2
-2
+2
-2
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -261,12 +261,12 @@ | ||
| 261 | 261 | verify_all_options(); |
| 262 | 262 | |
| 263 | 263 | for(i=2; i<g.argc; i++){ |
| 264 | 264 | file_tree_name(g.argv[i], &fname, 1); |
| 265 | 265 | blob_zero(&content); |
| 266 | - rc = historical_version_of_file(zRev, blob_str(&fname), &content, 0,0,0,0); | |
| 267 | - if( rc==0 ){ | |
| 266 | + rc = historical_version_of_file(zRev, blob_str(&fname), &content, 0,0,0,2); | |
| 267 | + if( rc==2 ){ | |
| 268 | 268 | fossil_fatal("no such file: %s", g.argv[i]); |
| 269 | 269 | } |
| 270 | 270 | blob_write_to_file(&content, "-"); |
| 271 | 271 | blob_reset(&fname); |
| 272 | 272 | blob_reset(&content); |
| 273 | 273 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -261,12 +261,12 @@ | |
| 261 | verify_all_options(); |
| 262 | |
| 263 | for(i=2; i<g.argc; i++){ |
| 264 | file_tree_name(g.argv[i], &fname, 1); |
| 265 | blob_zero(&content); |
| 266 | rc = historical_version_of_file(zRev, blob_str(&fname), &content, 0,0,0,0); |
| 267 | if( rc==0 ){ |
| 268 | fossil_fatal("no such file: %s", g.argv[i]); |
| 269 | } |
| 270 | blob_write_to_file(&content, "-"); |
| 271 | blob_reset(&fname); |
| 272 | blob_reset(&content); |
| 273 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -261,12 +261,12 @@ | |
| 261 | verify_all_options(); |
| 262 | |
| 263 | for(i=2; i<g.argc; i++){ |
| 264 | file_tree_name(g.argv[i], &fname, 1); |
| 265 | blob_zero(&content); |
| 266 | rc = historical_version_of_file(zRev, blob_str(&fname), &content, 0,0,0,2); |
| 267 | if( rc==2 ){ |
| 268 | fossil_fatal("no such file: %s", g.argv[i]); |
| 269 | } |
| 270 | blob_write_to_file(&content, "-"); |
| 271 | blob_reset(&fname); |
| 272 | blob_reset(&content); |
| 273 |