Fossil SCM

Move vfile_check_signature into "finfo --status" branch. The other options don't use it and it involves a lot of IO.

joerg 2011-03-25 02:55 trunk
Commit ae84e6c7d1b14febea30e29f7d936b19657080c5
1 file changed +6 -7
+6 -7
--- src/finfo.c
+++ src/finfo.c
@@ -39,24 +39,23 @@
3939
** The -p form, there's an optional flag "-r|--revision REVISION". The
4040
** specified version (or the latest checked out version) is printed to
4141
** stdout.
4242
*/
4343
void finfo_cmd(void){
44
- int vid;
45
-
4644
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);
5245
if (find_option("status","s",0)) {
5346
Stmt q;
5447
Blob line;
5548
Blob fname;
49
+ int vid;
5650
5751
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);
5857
file_tree_name(g.argv[2], &fname, 1);
5958
db_prepare(&q,
6059
"SELECT pathname, deleted, rid, chnged, coalesce(origname!=pathname,0)"
6160
" FROM vfile WHERE vfile.pathname=%B", &fname);
6261
blob_zero(&line);
6362
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button