Fossil SCM

Immediately stop processing the "all" command if any individual operation fails, unless the --dontstop command-line option is used.

drh 2011-02-24 23:41 trunk
Commit f5a9e8e61e4cb1b8da1a77ab601a273d9d85576d
1 file changed +7 -1
+7 -1
--- src/allrepo.c
+++ src/allrepo.c
@@ -86,10 +86,12 @@
8686
const char *zCmd;
8787
char *zSyscmd;
8888
char *zFossil;
8989
char *zQFilename;
9090
int nMissing;
91
+ int stopOnError = find_option("dontstop",0,0)==0;
92
+ int rc;
9193
9294
if( g.argc<3 ){
9395
usage("list|ls|pull|push|rebuild|sync");
9496
}
9597
n = strlen(g.argv[2]);
@@ -140,13 +142,17 @@
140142
}
141143
zQFilename = quoteFilename(zFilename);
142144
zSyscmd = mprintf("%s %s %s", zFossil, zCmd, zQFilename);
143145
printf("%s\n", zSyscmd);
144146
fflush(stdout);
145
- fossil_system(zSyscmd);
147
+ rc = fossil_system(zSyscmd);
146148
free(zSyscmd);
147149
free(zQFilename);
150
+ if( stopOnError && rc ){
151
+ nMissing = 0;
152
+ break;
153
+ }
148154
}
149155
150156
/* If any repositories whose names appear in the ~/.fossil file could not
151157
** be found, remove those names from the ~/.fossil file.
152158
*/
153159
--- src/allrepo.c
+++ src/allrepo.c
@@ -86,10 +86,12 @@
86 const char *zCmd;
87 char *zSyscmd;
88 char *zFossil;
89 char *zQFilename;
90 int nMissing;
 
 
91
92 if( g.argc<3 ){
93 usage("list|ls|pull|push|rebuild|sync");
94 }
95 n = strlen(g.argv[2]);
@@ -140,13 +142,17 @@
140 }
141 zQFilename = quoteFilename(zFilename);
142 zSyscmd = mprintf("%s %s %s", zFossil, zCmd, zQFilename);
143 printf("%s\n", zSyscmd);
144 fflush(stdout);
145 fossil_system(zSyscmd);
146 free(zSyscmd);
147 free(zQFilename);
 
 
 
 
148 }
149
150 /* If any repositories whose names appear in the ~/.fossil file could not
151 ** be found, remove those names from the ~/.fossil file.
152 */
153
--- src/allrepo.c
+++ src/allrepo.c
@@ -86,10 +86,12 @@
86 const char *zCmd;
87 char *zSyscmd;
88 char *zFossil;
89 char *zQFilename;
90 int nMissing;
91 int stopOnError = find_option("dontstop",0,0)==0;
92 int rc;
93
94 if( g.argc<3 ){
95 usage("list|ls|pull|push|rebuild|sync");
96 }
97 n = strlen(g.argv[2]);
@@ -140,13 +142,17 @@
142 }
143 zQFilename = quoteFilename(zFilename);
144 zSyscmd = mprintf("%s %s %s", zFossil, zCmd, zQFilename);
145 printf("%s\n", zSyscmd);
146 fflush(stdout);
147 rc = fossil_system(zSyscmd);
148 free(zSyscmd);
149 free(zQFilename);
150 if( stopOnError && rc ){
151 nMissing = 0;
152 break;
153 }
154 }
155
156 /* If any repositories whose names appear in the ~/.fossil file could not
157 ** be found, remove those names from the ~/.fossil file.
158 */
159

Keyboard Shortcuts

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