Fossil SCM

Add the "fossil all config pull" command.

drh 2015-11-10 16:38 trunk
Commit d3b14a8e622e216549e11d24be2b50caab72303f
2 files changed +11 +3 -3
--- src/allrepo.c
+++ src/allrepo.c
@@ -102,10 +102,12 @@
102102
** carefully review the local checkouts to be operated upon
103103
** and the --whatif option to carefully review the files to
104104
** be deleted beforehand is highly recommended. The command
105105
** line options supported by the clean command itself, if any
106106
** are present, are passed along verbatim.
107
+**
108
+** config Only the "config pull AREA" command works.
107109
**
108110
** dbstat Run the "dbstat" command on all repositories.
109111
**
110112
** extras Shows "extra" files from all local checkouts. The command
111113
** line options supported by the extra command itself, if any
@@ -207,10 +209,19 @@
207209
collect_argument(&extra, "no-prompt",0);
208210
collect_argument(&extra, "temp",0);
209211
collect_argument(&extra, "verbose","v");
210212
collect_argument(&extra, "whatif",0);
211213
useCheckouts = 1;
214
+ }else if( strncmp(zCmd, "config", n)==0 ){
215
+ zCmd = "config -R";
216
+ collect_argv(&extra, 3);
217
+ (void)find_option("legacy",0,0);
218
+ (void)find_option("overwrite",0,0);
219
+ verify_all_options();
220
+ if( g.argc!=5 || fossil_strcmp(g.argv[3],"pull")!=0 ){
221
+ usage("configure pull AREA ?OPTIONS?");
222
+ }
212223
}else if( strncmp(zCmd, "dbstat", n)==0 ){
213224
zCmd = "dbstat --omit-version-info -R";
214225
showLabel = 1;
215226
quiet = 1;
216227
collect_argument(&extra, "brief", "b");
217228
--- src/allrepo.c
+++ src/allrepo.c
@@ -102,10 +102,12 @@
102 ** carefully review the local checkouts to be operated upon
103 ** and the --whatif option to carefully review the files to
104 ** be deleted beforehand is highly recommended. The command
105 ** line options supported by the clean command itself, if any
106 ** are present, are passed along verbatim.
 
 
107 **
108 ** dbstat Run the "dbstat" command on all repositories.
109 **
110 ** extras Shows "extra" files from all local checkouts. The command
111 ** line options supported by the extra command itself, if any
@@ -207,10 +209,19 @@
207 collect_argument(&extra, "no-prompt",0);
208 collect_argument(&extra, "temp",0);
209 collect_argument(&extra, "verbose","v");
210 collect_argument(&extra, "whatif",0);
211 useCheckouts = 1;
 
 
 
 
 
 
 
 
 
212 }else if( strncmp(zCmd, "dbstat", n)==0 ){
213 zCmd = "dbstat --omit-version-info -R";
214 showLabel = 1;
215 quiet = 1;
216 collect_argument(&extra, "brief", "b");
217
--- src/allrepo.c
+++ src/allrepo.c
@@ -102,10 +102,12 @@
102 ** carefully review the local checkouts to be operated upon
103 ** and the --whatif option to carefully review the files to
104 ** be deleted beforehand is highly recommended. The command
105 ** line options supported by the clean command itself, if any
106 ** are present, are passed along verbatim.
107 **
108 ** config Only the "config pull AREA" command works.
109 **
110 ** dbstat Run the "dbstat" command on all repositories.
111 **
112 ** extras Shows "extra" files from all local checkouts. The command
113 ** line options supported by the extra command itself, if any
@@ -207,10 +209,19 @@
209 collect_argument(&extra, "no-prompt",0);
210 collect_argument(&extra, "temp",0);
211 collect_argument(&extra, "verbose","v");
212 collect_argument(&extra, "whatif",0);
213 useCheckouts = 1;
214 }else if( strncmp(zCmd, "config", n)==0 ){
215 zCmd = "config -R";
216 collect_argv(&extra, 3);
217 (void)find_option("legacy",0,0);
218 (void)find_option("overwrite",0,0);
219 verify_all_options();
220 if( g.argc!=5 || fossil_strcmp(g.argv[3],"pull")!=0 ){
221 usage("configure pull AREA ?OPTIONS?");
222 }
223 }else if( strncmp(zCmd, "dbstat", n)==0 ){
224 zCmd = "dbstat --omit-version-info -R";
225 showLabel = 1;
226 quiet = 1;
227 collect_argument(&extra, "brief", "b");
228
+3 -3
--- src/configure.c
+++ src/configure.c
@@ -882,15 +882,15 @@
882882
** See also: settings, unset
883883
*/
884884
void configuration_cmd(void){
885885
int n;
886886
const char *zMethod;
887
- if( g.argc<3 ){
888
- usage("export|import|merge|pull|reset ...");
889
- }
890887
db_find_and_open_repository(0, 0);
891888
db_open_config(0);
889
+ if( g.argc<3 ){
890
+ usage("SUBCOMMAND ...");
891
+ }
892892
zMethod = g.argv[2];
893893
n = strlen(zMethod);
894894
if( strncmp(zMethod, "export", n)==0 ){
895895
int mask;
896896
const char *zSince = find_option("since",0,1);
897897
--- src/configure.c
+++ src/configure.c
@@ -882,15 +882,15 @@
882 ** See also: settings, unset
883 */
884 void configuration_cmd(void){
885 int n;
886 const char *zMethod;
887 if( g.argc<3 ){
888 usage("export|import|merge|pull|reset ...");
889 }
890 db_find_and_open_repository(0, 0);
891 db_open_config(0);
 
 
 
892 zMethod = g.argv[2];
893 n = strlen(zMethod);
894 if( strncmp(zMethod, "export", n)==0 ){
895 int mask;
896 const char *zSince = find_option("since",0,1);
897
--- src/configure.c
+++ src/configure.c
@@ -882,15 +882,15 @@
882 ** See also: settings, unset
883 */
884 void configuration_cmd(void){
885 int n;
886 const char *zMethod;
 
 
 
887 db_find_and_open_repository(0, 0);
888 db_open_config(0);
889 if( g.argc<3 ){
890 usage("SUBCOMMAND ...");
891 }
892 zMethod = g.argv[2];
893 n = strlen(zMethod);
894 if( strncmp(zMethod, "export", n)==0 ){
895 int mask;
896 const char *zSince = find_option("since",0,1);
897

Keyboard Shortcuts

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