| | @@ -76,11 +76,11 @@ |
| 76 | 76 | } |
| 77 | 77 | #endif |
| 78 | 78 | if( find_option("verbose","v",0)!=0 ) flags |= SYNC_VERBOSE; |
| 79 | 79 | fossil_print("Autosync: %s\n", g.url.canonical); |
| 80 | 80 | url_enable_proxy("via proxy: "); |
| 81 | | - rc = client_sync(flags, configSync, 0); |
| 81 | + rc = client_sync(flags, configSync, 0, 0); |
| 82 | 82 | return rc; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /* |
| 86 | 86 | ** This routine will try a number of times to perform autosync with a |
| | @@ -217,12 +217,13 @@ |
| 217 | 217 | ** -B|--httpauth USER:PASS Credentials for the simple HTTP auth protocol, |
| 218 | 218 | ** if required by the remote website |
| 219 | 219 | ** --from-parent-project Pull content from the parent project |
| 220 | 220 | ** --ipv4 Use only IPv4, not IPv6 |
| 221 | 221 | ** --once Do not remember URL for subsequent syncs |
| 222 | | -** --proxy PROXY Use the specified HTTP proxy |
| 223 | 222 | ** --private Pull private branches too |
| 223 | +** --project-code CODE Use CODE as the project code |
| 224 | +** --proxy PROXY Use the specified HTTP proxy |
| 224 | 225 | ** -R|--repository REPO Local repository to pull into |
| 225 | 226 | ** --ssl-identity FILE Local SSL credentials, if requested by remote |
| 226 | 227 | ** --ssh-command SSH Use SSH as the "ssh" command |
| 227 | 228 | ** -v|--verbose Additional (debugging) output |
| 228 | 229 | ** --verily Exchange extra information with the remote |
| | @@ -231,19 +232,20 @@ |
| 231 | 232 | ** See also: clone, config pull, push, remote-url, sync |
| 232 | 233 | */ |
| 233 | 234 | void pull_cmd(void){ |
| 234 | 235 | unsigned configFlags = 0; |
| 235 | 236 | unsigned syncFlags = SYNC_PULL; |
| 237 | + const char *zAltPCode = find_option("project-code",0,1); |
| 236 | 238 | if( find_option("from-parent-project",0,0)!=0 ){ |
| 237 | 239 | syncFlags |= SYNC_FROMPARENT; |
| 238 | 240 | } |
| 239 | 241 | process_sync_args(&configFlags, &syncFlags, 0); |
| 240 | 242 | |
| 241 | 243 | /* We should be done with options.. */ |
| 242 | 244 | verify_all_options(); |
| 243 | 245 | |
| 244 | | - client_sync(syncFlags, configFlags, 0); |
| 246 | + client_sync(syncFlags, configFlags, 0, zAltPCode); |
| 245 | 247 | } |
| 246 | 248 | |
| 247 | 249 | /* |
| 248 | 250 | ** COMMAND: push |
| 249 | 251 | ** |
| | @@ -285,11 +287,11 @@ |
| 285 | 287 | verify_all_options(); |
| 286 | 288 | |
| 287 | 289 | if( db_get_boolean("dont-push",0) ){ |
| 288 | 290 | fossil_fatal("pushing is prohibited: the 'dont-push' option is set"); |
| 289 | 291 | } |
| 290 | | - client_sync(syncFlags, 0, 0); |
| 292 | + client_sync(syncFlags, 0, 0, 0); |
| 291 | 293 | } |
| 292 | 294 | |
| 293 | 295 | |
| 294 | 296 | /* |
| 295 | 297 | ** COMMAND: sync |
| | @@ -332,11 +334,11 @@ |
| 332 | 334 | |
| 333 | 335 | /* We should be done with options.. */ |
| 334 | 336 | verify_all_options(); |
| 335 | 337 | |
| 336 | 338 | if( db_get_boolean("dont-push",0) ) syncFlags &= ~SYNC_PUSH; |
| 337 | | - client_sync(syncFlags, configFlags, 0); |
| 339 | + client_sync(syncFlags, configFlags, 0, 0); |
| 338 | 340 | if( (syncFlags & SYNC_PUSH)==0 ){ |
| 339 | 341 | fossil_warning("pull only: the 'dont-push' option is set"); |
| 340 | 342 | } |
| 341 | 343 | } |
| 342 | 344 | |
| | @@ -347,11 +349,11 @@ |
| 347 | 349 | void sync_unversioned(unsigned syncFlags){ |
| 348 | 350 | unsigned configFlags = 0; |
| 349 | 351 | (void)find_option("uv-noop",0,0); |
| 350 | 352 | process_sync_args(&configFlags, &syncFlags, 1); |
| 351 | 353 | verify_all_options(); |
| 352 | | - client_sync(syncFlags, 0, 0); |
| 354 | + client_sync(syncFlags, 0, 0, 0); |
| 353 | 355 | } |
| 354 | 356 | |
| 355 | 357 | /* |
| 356 | 358 | ** COMMAND: remote-url |
| 357 | 359 | ** |
| 358 | 360 | |