Fossil SCM

Add the "dbstat" command to "fossil all".

drh 2014-10-14 17:01 trunk
Commit c6d9b0a06c7980cb8520772949ebed2720576642
2 files changed +5 +1
--- src/allrepo.c
+++ src/allrepo.c
@@ -98,10 +98,12 @@
9898
** carefully review the local checkouts to be operated upon
9999
** and the --whatif option to carefully review the files to
100100
** be deleted beforehand is highly recommended. The command
101101
** line options supported by the clean command itself, if any
102102
** are present, are passed along verbatim.
103
+**
104
+** dbstat Run the "dbstat" command on all repositories.
103105
**
104106
** extras Shows "extra" files from all local checkouts. The command
105107
** line options supported by the extra command itself, if any
106108
** are present, are passed along verbatim.
107109
**
@@ -190,10 +192,13 @@
190192
collect_argument_value(&extra, "keep");
191193
collect_argument(&extra, "temp",0);
192194
collect_argument(&extra, "verbose","v");
193195
collect_argument(&extra, "whatif",0);
194196
useCheckouts = 1;
197
+ }else if( strncmp(zCmd, "dbstat", n)==0 ){
198
+ zCmd = "dbstat -R";
199
+ collect_argument(&extra, "brief", "b");
195200
}else if( strncmp(zCmd, "extras", n)==0 ){
196201
if( showFile ){
197202
zCmd = "extras --chdir";
198203
}else{
199204
zCmd = "extras --header --chdir";
200205
--- 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 @@
177177
178178
/* We should be done with options.. */
179179
verify_all_options();
180180
181181
fsize = file_size(g.zRepositoryName);
182
+ fossil_print("%*s%s\n", colWidth, "repository-file:", g.zRepositoryName);
182183
bigSizeName(sizeof(zBuf), zBuf, fsize);
183184
fossil_print( "%*s%s\n", colWidth, "repository-size:", zBuf );
184185
if( !brief ){
185186
n = db_int(0, "SELECT count(*) FROM blob");
186187
m = db_int(0, "SELECT count(*) FROM delta");
187188
--- 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

Keyboard Shortcuts

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