Fossil SCM
Immediately stop processing the "all" command if any individual operation fails, unless the --dontstop command-line option is used.
Commit
f5a9e8e61e4cb1b8da1a77ab601a273d9d85576d
Parent
b81112371c25058…
1 file changed
+7
-1
+7
-1
| --- src/allrepo.c | ||
| +++ src/allrepo.c | ||
| @@ -86,10 +86,12 @@ | ||
| 86 | 86 | const char *zCmd; |
| 87 | 87 | char *zSyscmd; |
| 88 | 88 | char *zFossil; |
| 89 | 89 | char *zQFilename; |
| 90 | 90 | int nMissing; |
| 91 | + int stopOnError = find_option("dontstop",0,0)==0; | |
| 92 | + int rc; | |
| 91 | 93 | |
| 92 | 94 | if( g.argc<3 ){ |
| 93 | 95 | usage("list|ls|pull|push|rebuild|sync"); |
| 94 | 96 | } |
| 95 | 97 | n = strlen(g.argv[2]); |
| @@ -140,13 +142,17 @@ | ||
| 140 | 142 | } |
| 141 | 143 | zQFilename = quoteFilename(zFilename); |
| 142 | 144 | zSyscmd = mprintf("%s %s %s", zFossil, zCmd, zQFilename); |
| 143 | 145 | printf("%s\n", zSyscmd); |
| 144 | 146 | fflush(stdout); |
| 145 | - fossil_system(zSyscmd); | |
| 147 | + rc = fossil_system(zSyscmd); | |
| 146 | 148 | free(zSyscmd); |
| 147 | 149 | free(zQFilename); |
| 150 | + if( stopOnError && rc ){ | |
| 151 | + nMissing = 0; | |
| 152 | + break; | |
| 153 | + } | |
| 148 | 154 | } |
| 149 | 155 | |
| 150 | 156 | /* If any repositories whose names appear in the ~/.fossil file could not |
| 151 | 157 | ** be found, remove those names from the ~/.fossil file. |
| 152 | 158 | */ |
| 153 | 159 |
| --- 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 |