| | @@ -76,11 +76,11 @@ |
| 76 | 76 | |
| 77 | 77 | |
| 78 | 78 | /* |
| 79 | 79 | ** COMMAND: all |
| 80 | 80 | ** |
| 81 | | -** Usage: %fossil all (changes|clean|extra|ignore|list|ls|pull|push|rebuild|sync) |
| 81 | +** Usage: %fossil all (changes|clean|extras|ignore|list|ls|pull|push|rebuild|sync) |
| 82 | 82 | ** |
| 83 | 83 | ** The ~/.fossil file records the location of all repositories for a |
| 84 | 84 | ** user. This command performs certain operations on all repositories |
| 85 | 85 | ** that can be useful before or after a period of disconnected operation. |
| 86 | 86 | ** |
| | @@ -99,16 +99,16 @@ |
| 99 | 99 | ** and the --whatif option to carefully review the files to |
| 100 | 100 | ** be deleted beforehand is highly recommended. The command |
| 101 | 101 | ** line options supported by the clean command itself, if any |
| 102 | 102 | ** are present, are passed along verbatim. |
| 103 | 103 | ** |
| 104 | | -** extra Shows extra files from all local checkouts. The command |
| 104 | +** extras Shows "extra" files from all local checkouts. The command |
| 105 | 105 | ** line options supported by the extra command itself, if any |
| 106 | 106 | ** are present, are passed along verbatim. |
| 107 | 107 | ** |
| 108 | 108 | ** ignore Arguments are repositories that should be ignored by |
| 109 | | -** subsequent clean, extra, list, pull, push, rebuild, and |
| 109 | +** subsequent clean, extras, list, pull, push, rebuild, and |
| 110 | 110 | ** sync operations. The -c|--ckout option causes the listed |
| 111 | 111 | ** local checkouts to be ignored instead. |
| 112 | 112 | ** |
| 113 | 113 | ** list | ls Display the location of all repositories. The -c|--ckout |
| 114 | 114 | ** option causes all local checkouts to be listed instead. |
| | @@ -136,10 +136,11 @@ |
| 136 | 136 | ** when one of the following commands are run against the repository: |
| 137 | 137 | ** clone, info, pull, push, or sync. Even previously ignored repositories |
| 138 | 138 | ** are added back to the list of repositories by these commands. |
| 139 | 139 | ** |
| 140 | 140 | ** Options: |
| 141 | +** --showfile Show the repository or checkout being operated upon. |
| 141 | 142 | ** --dontstop Continue with other repositories even after an error. |
| 142 | 143 | ** --dry-run If given, display instead of run actions. |
| 143 | 144 | */ |
| 144 | 145 | void all_cmd(void){ |
| 145 | 146 | int n; |
| | @@ -150,10 +151,11 @@ |
| 150 | 151 | char *zQFilename; |
| 151 | 152 | Blob extra; |
| 152 | 153 | int useCheckouts = 0; |
| 153 | 154 | int quiet = 0; |
| 154 | 155 | int dryRunFlag = 0; |
| 156 | + int showFile = find_option("showfile",0,0)!=0; |
| 155 | 157 | int stopOnError = find_option("dontstop",0,0)==0; |
| 156 | 158 | int rc; |
| 157 | 159 | int nToDel = 0; |
| 158 | 160 | |
| 159 | 161 | dryRunFlag = find_option("dry-run","n",0)!=0; |
| | @@ -160,11 +162,11 @@ |
| 160 | 162 | if( !dryRunFlag ){ |
| 161 | 163 | dryRunFlag = find_option("test",0,0)!=0; /* deprecated */ |
| 162 | 164 | } |
| 163 | 165 | |
| 164 | 166 | if( g.argc<3 ){ |
| 165 | | - usage("changes|clean|extra|ignore|list|ls|pull|push|rebuild|sync"); |
| 167 | + usage("changes|clean|extras|ignore|list|ls|pull|push|rebuild|sync"); |
| 166 | 168 | } |
| 167 | 169 | n = strlen(g.argv[2]); |
| 168 | 170 | db_open_config(1); |
| 169 | 171 | blob_zero(&extra); |
| 170 | 172 | zCmd = g.argv[2]; |
| | @@ -185,12 +187,12 @@ |
| 185 | 187 | collect_argument_value(&extra, "keep"); |
| 186 | 188 | collect_argument(&extra, "temp",0); |
| 187 | 189 | collect_argument(&extra, "verbose","v"); |
| 188 | 190 | collect_argument(&extra, "whatif",0); |
| 189 | 191 | useCheckouts = 1; |
| 190 | | - }else if( strncmp(zCmd, "extra", n)==0 ){ |
| 191 | | - zCmd = "extra --chdir"; |
| 192 | + }else if( strncmp(zCmd, "extras", n)==0 ){ |
| 193 | + zCmd = "extras --chdir"; |
| 192 | 194 | collect_argument(&extra, "abs-paths",0); |
| 193 | 195 | collect_argument_value(&extra, "case-sensitive"); |
| 194 | 196 | collect_argument(&extra, "dotfiles",0); |
| 195 | 197 | collect_argument_value(&extra, "ignore"); |
| 196 | 198 | collect_argument(&extra, "rel-paths",0); |
| | @@ -254,11 +256,11 @@ |
| 254 | 256 | } |
| 255 | 257 | db_end_transaction(0); |
| 256 | 258 | return; |
| 257 | 259 | }else{ |
| 258 | 260 | fossil_fatal("\"all\" subcommand should be one of: " |
| 259 | | - "changes clean extra ignore list ls push pull rebuild sync"); |
| 261 | + "changes clean extras ignore list ls push pull rebuild sync"); |
| 260 | 262 | } |
| 261 | 263 | verify_all_options(); |
| 262 | 264 | zFossil = quoteFilename(g.nameOfExe); |
| 263 | 265 | if( useCheckouts ){ |
| 264 | 266 | db_prepare(&q, |
| | @@ -287,10 +289,13 @@ |
| 287 | 289 | continue; |
| 288 | 290 | } |
| 289 | 291 | if( zCmd[0]=='l' ){ |
| 290 | 292 | fossil_print("%s\n", zFilename); |
| 291 | 293 | continue; |
| 294 | + }else if( showFile ){ |
| 295 | + fossil_print("%s: %s\n", useCheckouts ? "checkout" : "repository", |
| 296 | + zFilename); |
| 292 | 297 | } |
| 293 | 298 | zQFilename = quoteFilename(zFilename); |
| 294 | 299 | zSyscmd = mprintf("%s %s %s%s", |
| 295 | 300 | zFossil, zCmd, zQFilename, blob_str(&extra)); |
| 296 | 301 | if( !quiet || dryRunFlag ){ |
| 297 | 302 | |