Fossil SCM
Add the "dbstat" command to "fossil all".
Commit
c6d9b0a06c7980cb8520772949ebed2720576642
Parent
2271ea42fe35fee…
2 files changed
+5
+1
+5
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -98,10 +98,12 @@ | ||
| 98 | 98 | ** carefully review the local checkouts to be operated upon |
| 99 | 99 | ** and the --whatif option to carefully review the files to |
| 100 | 100 | ** be deleted beforehand is highly recommended. The command |
| 101 | 101 | ** line options supported by the clean command itself, if any |
| 102 | 102 | ** are present, are passed along verbatim. |
| 103 | +** | |
| 104 | +** dbstat Run the "dbstat" command on all repositories. | |
| 103 | 105 | ** |
| 104 | 106 | ** extras Shows "extra" files from all local checkouts. The command |
| 105 | 107 | ** line options supported by the extra command itself, if any |
| 106 | 108 | ** are present, are passed along verbatim. |
| 107 | 109 | ** |
| @@ -190,10 +192,13 @@ | ||
| 190 | 192 | collect_argument_value(&extra, "keep"); |
| 191 | 193 | collect_argument(&extra, "temp",0); |
| 192 | 194 | collect_argument(&extra, "verbose","v"); |
| 193 | 195 | collect_argument(&extra, "whatif",0); |
| 194 | 196 | useCheckouts = 1; |
| 197 | + }else if( strncmp(zCmd, "dbstat", n)==0 ){ | |
| 198 | + zCmd = "dbstat -R"; | |
| 199 | + collect_argument(&extra, "brief", "b"); | |
| 195 | 200 | }else if( strncmp(zCmd, "extras", n)==0 ){ |
| 196 | 201 | if( showFile ){ |
| 197 | 202 | zCmd = "extras --chdir"; |
| 198 | 203 | }else{ |
| 199 | 204 | zCmd = "extras --header --chdir"; |
| 200 | 205 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -98,10 +98,12 @@ | |
| 98 | ** carefully review the local checkouts to be operated upon |
| 99 | ** and the --whatif option to carefully review the files to |
| 100 | ** be deleted beforehand is highly recommended. The command |
| 101 | ** line options supported by the clean command itself, if any |
| 102 | ** are present, are passed along verbatim. |
| 103 | ** |
| 104 | ** extras Shows "extra" files from all local checkouts. The command |
| 105 | ** line options supported by the extra command itself, if any |
| 106 | ** are present, are passed along verbatim. |
| 107 | ** |
| @@ -190,10 +192,13 @@ | |
| 190 | collect_argument_value(&extra, "keep"); |
| 191 | collect_argument(&extra, "temp",0); |
| 192 | collect_argument(&extra, "verbose","v"); |
| 193 | collect_argument(&extra, "whatif",0); |
| 194 | useCheckouts = 1; |
| 195 | }else if( strncmp(zCmd, "extras", n)==0 ){ |
| 196 | if( showFile ){ |
| 197 | zCmd = "extras --chdir"; |
| 198 | }else{ |
| 199 | zCmd = "extras --header --chdir"; |
| 200 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -98,10 +98,12 @@ | |
| 98 | ** carefully review the local checkouts to be operated upon |
| 99 | ** and the --whatif option to carefully review the files to |
| 100 | ** be deleted beforehand is highly recommended. The command |
| 101 | ** line options supported by the clean command itself, if any |
| 102 | ** are present, are passed along verbatim. |
| 103 | ** |
| 104 | ** dbstat Run the "dbstat" command on all repositories. |
| 105 | ** |
| 106 | ** extras Shows "extra" files from all local checkouts. The command |
| 107 | ** line options supported by the extra command itself, if any |
| 108 | ** are present, are passed along verbatim. |
| 109 | ** |
| @@ -190,10 +192,13 @@ | |
| 192 | collect_argument_value(&extra, "keep"); |
| 193 | collect_argument(&extra, "temp",0); |
| 194 | collect_argument(&extra, "verbose","v"); |
| 195 | collect_argument(&extra, "whatif",0); |
| 196 | useCheckouts = 1; |
| 197 | }else if( strncmp(zCmd, "dbstat", n)==0 ){ |
| 198 | zCmd = "dbstat -R"; |
| 199 | collect_argument(&extra, "brief", "b"); |
| 200 | }else if( strncmp(zCmd, "extras", n)==0 ){ |
| 201 | if( showFile ){ |
| 202 | zCmd = "extras --chdir"; |
| 203 | }else{ |
| 204 | zCmd = "extras --header --chdir"; |
| 205 |
+1
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -177,10 +177,11 @@ | ||
| 177 | 177 | |
| 178 | 178 | /* We should be done with options.. */ |
| 179 | 179 | verify_all_options(); |
| 180 | 180 | |
| 181 | 181 | fsize = file_size(g.zRepositoryName); |
| 182 | + fossil_print("%*s%s\n", colWidth, "repository-file:", g.zRepositoryName); | |
| 182 | 183 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| 183 | 184 | fossil_print( "%*s%s\n", colWidth, "repository-size:", zBuf ); |
| 184 | 185 | if( !brief ){ |
| 185 | 186 | n = db_int(0, "SELECT count(*) FROM blob"); |
| 186 | 187 | m = db_int(0, "SELECT count(*) FROM delta"); |
| 187 | 188 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -177,10 +177,11 @@ | |
| 177 | |
| 178 | /* We should be done with options.. */ |
| 179 | verify_all_options(); |
| 180 | |
| 181 | fsize = file_size(g.zRepositoryName); |
| 182 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| 183 | fossil_print( "%*s%s\n", colWidth, "repository-size:", zBuf ); |
| 184 | if( !brief ){ |
| 185 | n = db_int(0, "SELECT count(*) FROM blob"); |
| 186 | m = db_int(0, "SELECT count(*) FROM delta"); |
| 187 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -177,10 +177,11 @@ | |
| 177 | |
| 178 | /* We should be done with options.. */ |
| 179 | verify_all_options(); |
| 180 | |
| 181 | fsize = file_size(g.zRepositoryName); |
| 182 | fossil_print("%*s%s\n", colWidth, "repository-file:", g.zRepositoryName); |
| 183 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| 184 | fossil_print( "%*s%s\n", colWidth, "repository-size:", zBuf ); |
| 185 | if( !brief ){ |
| 186 | n = db_int(0, "SELECT count(*) FROM blob"); |
| 187 | m = db_int(0, "SELECT count(*) FROM delta"); |
| 188 |