Fossil SCM
Move vfile_check_signature into "finfo --status" branch. The other options don't use it and it involves a lot of IO.
Commit
ae84e6c7d1b14febea30e29f7d936b19657080c5
Parent
7563c241ce93422…
1 file changed
+6
-7
+6
-7
| --- src/finfo.c | ||
| +++ src/finfo.c | ||
| @@ -39,24 +39,23 @@ | ||
| 39 | 39 | ** The -p form, there's an optional flag "-r|--revision REVISION". The |
| 40 | 40 | ** specified version (or the latest checked out version) is printed to |
| 41 | 41 | ** stdout. |
| 42 | 42 | */ |
| 43 | 43 | void finfo_cmd(void){ |
| 44 | - int vid; | |
| 45 | - | |
| 46 | 44 | db_must_be_within_tree(); |
| 47 | - vid = db_lget_int("checkout", 0); | |
| 48 | - if( vid==0 ){ | |
| 49 | - fossil_panic("no checkout to finfo files in"); | |
| 50 | - } | |
| 51 | - vfile_check_signature(vid, 1, 0); | |
| 52 | 45 | if (find_option("status","s",0)) { |
| 53 | 46 | Stmt q; |
| 54 | 47 | Blob line; |
| 55 | 48 | Blob fname; |
| 49 | + int vid; | |
| 56 | 50 | |
| 57 | 51 | if( g.argc!=3 ) usage("-s|--status FILENAME"); |
| 52 | + vid = db_lget_int("checkout", 0); | |
| 53 | + if( vid==0 ){ | |
| 54 | + fossil_panic("no checkout to finfo files in"); | |
| 55 | + } | |
| 56 | + vfile_check_signature(vid, 1, 0); | |
| 58 | 57 | file_tree_name(g.argv[2], &fname, 1); |
| 59 | 58 | db_prepare(&q, |
| 60 | 59 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)" |
| 61 | 60 | " FROM vfile WHERE vfile.pathname=%B", &fname); |
| 62 | 61 | blob_zero(&line); |
| 63 | 62 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -39,24 +39,23 @@ | |
| 39 | ** The -p form, there's an optional flag "-r|--revision REVISION". The |
| 40 | ** specified version (or the latest checked out version) is printed to |
| 41 | ** stdout. |
| 42 | */ |
| 43 | void finfo_cmd(void){ |
| 44 | int vid; |
| 45 | |
| 46 | db_must_be_within_tree(); |
| 47 | vid = db_lget_int("checkout", 0); |
| 48 | if( vid==0 ){ |
| 49 | fossil_panic("no checkout to finfo files in"); |
| 50 | } |
| 51 | vfile_check_signature(vid, 1, 0); |
| 52 | if (find_option("status","s",0)) { |
| 53 | Stmt q; |
| 54 | Blob line; |
| 55 | Blob fname; |
| 56 | |
| 57 | if( g.argc!=3 ) usage("-s|--status FILENAME"); |
| 58 | file_tree_name(g.argv[2], &fname, 1); |
| 59 | db_prepare(&q, |
| 60 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)" |
| 61 | " FROM vfile WHERE vfile.pathname=%B", &fname); |
| 62 | blob_zero(&line); |
| 63 |
| --- src/finfo.c | |
| +++ src/finfo.c | |
| @@ -39,24 +39,23 @@ | |
| 39 | ** The -p form, there's an optional flag "-r|--revision REVISION". The |
| 40 | ** specified version (or the latest checked out version) is printed to |
| 41 | ** stdout. |
| 42 | */ |
| 43 | void finfo_cmd(void){ |
| 44 | db_must_be_within_tree(); |
| 45 | if (find_option("status","s",0)) { |
| 46 | Stmt q; |
| 47 | Blob line; |
| 48 | Blob fname; |
| 49 | int vid; |
| 50 | |
| 51 | if( g.argc!=3 ) usage("-s|--status FILENAME"); |
| 52 | vid = db_lget_int("checkout", 0); |
| 53 | if( vid==0 ){ |
| 54 | fossil_panic("no checkout to finfo files in"); |
| 55 | } |
| 56 | vfile_check_signature(vid, 1, 0); |
| 57 | file_tree_name(g.argv[2], &fname, 1); |
| 58 | db_prepare(&q, |
| 59 | "SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)" |
| 60 | " FROM vfile WHERE vfile.pathname=%B", &fname); |
| 61 | blob_zero(&line); |
| 62 |