Fossil SCM
Add the "fossil all config pull" command.
Commit
d3b14a8e622e216549e11d24be2b50caab72303f
Parent
5f962bfaf4d53ed…
2 files changed
+11
+3
-3
+11
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -102,10 +102,12 @@ | ||
| 102 | 102 | ** carefully review the local checkouts to be operated upon |
| 103 | 103 | ** and the --whatif option to carefully review the files to |
| 104 | 104 | ** be deleted beforehand is highly recommended. The command |
| 105 | 105 | ** line options supported by the clean command itself, if any |
| 106 | 106 | ** are present, are passed along verbatim. |
| 107 | +** | |
| 108 | +** config Only the "config pull AREA" command works. | |
| 107 | 109 | ** |
| 108 | 110 | ** dbstat Run the "dbstat" command on all repositories. |
| 109 | 111 | ** |
| 110 | 112 | ** extras Shows "extra" files from all local checkouts. The command |
| 111 | 113 | ** line options supported by the extra command itself, if any |
| @@ -207,10 +209,19 @@ | ||
| 207 | 209 | collect_argument(&extra, "no-prompt",0); |
| 208 | 210 | collect_argument(&extra, "temp",0); |
| 209 | 211 | collect_argument(&extra, "verbose","v"); |
| 210 | 212 | collect_argument(&extra, "whatif",0); |
| 211 | 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 | + } | |
| 212 | 223 | }else if( strncmp(zCmd, "dbstat", n)==0 ){ |
| 213 | 224 | zCmd = "dbstat --omit-version-info -R"; |
| 214 | 225 | showLabel = 1; |
| 215 | 226 | quiet = 1; |
| 216 | 227 | collect_argument(&extra, "brief", "b"); |
| 217 | 228 |
| --- 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 @@ | ||
| 882 | 882 | ** See also: settings, unset |
| 883 | 883 | */ |
| 884 | 884 | void configuration_cmd(void){ |
| 885 | 885 | int n; |
| 886 | 886 | const char *zMethod; |
| 887 | - if( g.argc<3 ){ | |
| 888 | - usage("export|import|merge|pull|reset ..."); | |
| 889 | - } | |
| 890 | 887 | db_find_and_open_repository(0, 0); |
| 891 | 888 | db_open_config(0); |
| 889 | + if( g.argc<3 ){ | |
| 890 | + usage("SUBCOMMAND ..."); | |
| 891 | + } | |
| 892 | 892 | zMethod = g.argv[2]; |
| 893 | 893 | n = strlen(zMethod); |
| 894 | 894 | if( strncmp(zMethod, "export", n)==0 ){ |
| 895 | 895 | int mask; |
| 896 | 896 | const char *zSince = find_option("since",0,1); |
| 897 | 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 | 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 |