Fossil SCM
New option -c|--ckout to "fossil all ignore"
Commit
14779a31ec6e05a7f74d7fbc874d08d02d84577d
Parent
1159585bdba82d8…
1 file changed
+6
-2
+6
-2
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -79,13 +79,15 @@ | ||
| 79 | 79 | ** |
| 80 | 80 | ** Available operations are: |
| 81 | 81 | ** |
| 82 | 82 | ** ignore Arguments are repositories that should be ignored |
| 83 | 83 | ** by subsequent list, pull, push, rebuild, and sync. |
| 84 | +** The -c|--ckout option causes the listed local checkouts | |
| 85 | +** to be ignored instead. | |
| 84 | 86 | ** |
| 85 | 87 | ** list | ls Display the location of all repositories. |
| 86 | -** The --ckout option causes all local checkouts to be | |
| 88 | +** The -c|--ckout option causes all local checkouts to be | |
| 87 | 89 | ** list instead. |
| 88 | 90 | ** |
| 89 | 91 | ** changes Shows all local checkouts that have uncommitted changes |
| 90 | 92 | ** |
| 91 | 93 | ** pull Run a "pull" operation on all repositories |
| @@ -163,15 +165,17 @@ | ||
| 163 | 165 | useCheckouts = 1; |
| 164 | 166 | stopOnError = 0; |
| 165 | 167 | quiet = 1; |
| 166 | 168 | }else if( strncmp(zCmd, "ignore", n)==0 ){ |
| 167 | 169 | int j; |
| 170 | + useCheckouts = find_option("ckout","c",0)!=0; | |
| 168 | 171 | verify_all_options(); |
| 169 | 172 | db_begin_transaction(); |
| 170 | 173 | for(j=3; j<g.argc; j++){ |
| 171 | 174 | char *zSql = mprintf("DELETE FROM global_config" |
| 172 | - " WHERE name GLOB 'repo:%q'", g.argv[j]); | |
| 175 | + " WHERE name GLOB '%s:%q'", | |
| 176 | + useCheckouts?"ckout":"repo", g.argv[j]); | |
| 173 | 177 | if( dryRunFlag ){ |
| 174 | 178 | fossil_print("%s\n", zSql); |
| 175 | 179 | }else{ |
| 176 | 180 | db_multi_exec("%s", zSql); |
| 177 | 181 | } |
| 178 | 182 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -79,13 +79,15 @@ | |
| 79 | ** |
| 80 | ** Available operations are: |
| 81 | ** |
| 82 | ** ignore Arguments are repositories that should be ignored |
| 83 | ** by subsequent list, pull, push, rebuild, and sync. |
| 84 | ** |
| 85 | ** list | ls Display the location of all repositories. |
| 86 | ** The --ckout option causes all local checkouts to be |
| 87 | ** list instead. |
| 88 | ** |
| 89 | ** changes Shows all local checkouts that have uncommitted changes |
| 90 | ** |
| 91 | ** pull Run a "pull" operation on all repositories |
| @@ -163,15 +165,17 @@ | |
| 163 | useCheckouts = 1; |
| 164 | stopOnError = 0; |
| 165 | quiet = 1; |
| 166 | }else if( strncmp(zCmd, "ignore", n)==0 ){ |
| 167 | int j; |
| 168 | verify_all_options(); |
| 169 | db_begin_transaction(); |
| 170 | for(j=3; j<g.argc; j++){ |
| 171 | char *zSql = mprintf("DELETE FROM global_config" |
| 172 | " WHERE name GLOB 'repo:%q'", g.argv[j]); |
| 173 | if( dryRunFlag ){ |
| 174 | fossil_print("%s\n", zSql); |
| 175 | }else{ |
| 176 | db_multi_exec("%s", zSql); |
| 177 | } |
| 178 |
| --- src/allrepo.c | |
| +++ src/allrepo.c | |
| @@ -79,13 +79,15 @@ | |
| 79 | ** |
| 80 | ** Available operations are: |
| 81 | ** |
| 82 | ** ignore Arguments are repositories that should be ignored |
| 83 | ** by subsequent list, pull, push, rebuild, and sync. |
| 84 | ** The -c|--ckout option causes the listed local checkouts |
| 85 | ** to be ignored instead. |
| 86 | ** |
| 87 | ** list | ls Display the location of all repositories. |
| 88 | ** The -c|--ckout option causes all local checkouts to be |
| 89 | ** list instead. |
| 90 | ** |
| 91 | ** changes Shows all local checkouts that have uncommitted changes |
| 92 | ** |
| 93 | ** pull Run a "pull" operation on all repositories |
| @@ -163,15 +165,17 @@ | |
| 165 | useCheckouts = 1; |
| 166 | stopOnError = 0; |
| 167 | quiet = 1; |
| 168 | }else if( strncmp(zCmd, "ignore", n)==0 ){ |
| 169 | int j; |
| 170 | useCheckouts = find_option("ckout","c",0)!=0; |
| 171 | verify_all_options(); |
| 172 | db_begin_transaction(); |
| 173 | for(j=3; j<g.argc; j++){ |
| 174 | char *zSql = mprintf("DELETE FROM global_config" |
| 175 | " WHERE name GLOB '%s:%q'", |
| 176 | useCheckouts?"ckout":"repo", g.argv[j]); |
| 177 | if( dryRunFlag ){ |
| 178 | fossil_print("%s\n", zSql); |
| 179 | }else{ |
| 180 | db_multi_exec("%s", zSql); |
| 181 | } |
| 182 |