Fossil SCM

New option -c|--ckout to "fossil all ignore"

jan.nijtmans 2013-04-26 07:11 trunk
Commit 14779a31ec6e05a7f74d7fbc874d08d02d84577d
1 file changed +6 -2
+6 -2
--- src/allrepo.c
+++ src/allrepo.c
@@ -79,13 +79,15 @@
7979
**
8080
** Available operations are:
8181
**
8282
** ignore Arguments are repositories that should be ignored
8383
** by subsequent list, pull, push, rebuild, and sync.
84
+** The -c|--ckout option causes the listed local checkouts
85
+** to be ignored instead.
8486
**
8587
** 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
8789
** list instead.
8890
**
8991
** changes Shows all local checkouts that have uncommitted changes
9092
**
9193
** pull Run a "pull" operation on all repositories
@@ -163,15 +165,17 @@
163165
useCheckouts = 1;
164166
stopOnError = 0;
165167
quiet = 1;
166168
}else if( strncmp(zCmd, "ignore", n)==0 ){
167169
int j;
170
+ useCheckouts = find_option("ckout","c",0)!=0;
168171
verify_all_options();
169172
db_begin_transaction();
170173
for(j=3; j<g.argc; j++){
171174
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]);
173177
if( dryRunFlag ){
174178
fossil_print("%s\n", zSql);
175179
}else{
176180
db_multi_exec("%s", zSql);
177181
}
178182
--- 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

Keyboard Shortcuts

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