Fossil SCM
If the "autosync" setting is "all", then autosync with all repos in "fossil remote list".
Commit
241ade812bebdbcaadd47f11c9f0dc5d7fdd05da4dd79e3ac192a07440482a10
Parent
7f2e34c5c4498b5…
1 file changed
+9
-5
+9
-5
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -125,23 +125,27 @@ | ||
| 125 | 125 | if( is_false(zAutosync) ) return 0; |
| 126 | 126 | if( db_get_boolean("dont-push",0) || fossil_strncmp(zAutosync,"pull",4)==0 ){ |
| 127 | 127 | flags &= ~SYNC_CKIN_LOCK; |
| 128 | 128 | if( flags & SYNC_PUSH ) return 0; |
| 129 | 129 | } |
| 130 | + if( find_option("verbose","v",0)!=0 ) flags |= SYNC_VERBOSE; | |
| 130 | 131 | url_parse(0, URL_REMEMBER); |
| 131 | 132 | if( g.url.protocol==0 ) return 0; |
| 132 | 133 | if( g.url.user!=0 && g.url.passwd==0 ){ |
| 133 | 134 | g.url.passwd = unobscure(db_get("last-sync-pw", 0)); |
| 134 | 135 | g.url.flags |= URL_PROMPT_PW; |
| 135 | 136 | url_prompt_for_password(); |
| 136 | 137 | } |
| 137 | 138 | g.zHttpAuth = get_httpauth(); |
| 138 | - url_remember(); | |
| 139 | - if( find_option("verbose","v",0)!=0 ) flags |= SYNC_VERBOSE; | |
| 140 | - fossil_print("Autosync: %s\n", g.url.canonical); | |
| 141 | - url_enable_proxy("via proxy: "); | |
| 142 | - rc = client_sync(flags, configSync, 0, 0); | |
| 139 | + if( fossil_strcmp(zAutosync,"all")==0 ){ | |
| 140 | + rc = client_sync_all_urls(flags|SYNC_ALLURL, configSync, 0, 0); | |
| 141 | + }else{ | |
| 142 | + url_remember(); | |
| 143 | + sync_explain(flags); | |
| 144 | + url_enable_proxy("via proxy: "); | |
| 145 | + rc = client_sync(flags, configSync, 0, 0); | |
| 146 | + } | |
| 143 | 147 | return rc; |
| 144 | 148 | } |
| 145 | 149 | |
| 146 | 150 | /* |
| 147 | 151 | ** This routine will try a number of times to perform autosync with a |
| 148 | 152 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -125,23 +125,27 @@ | |
| 125 | if( is_false(zAutosync) ) return 0; |
| 126 | if( db_get_boolean("dont-push",0) || fossil_strncmp(zAutosync,"pull",4)==0 ){ |
| 127 | flags &= ~SYNC_CKIN_LOCK; |
| 128 | if( flags & SYNC_PUSH ) return 0; |
| 129 | } |
| 130 | url_parse(0, URL_REMEMBER); |
| 131 | if( g.url.protocol==0 ) return 0; |
| 132 | if( g.url.user!=0 && g.url.passwd==0 ){ |
| 133 | g.url.passwd = unobscure(db_get("last-sync-pw", 0)); |
| 134 | g.url.flags |= URL_PROMPT_PW; |
| 135 | url_prompt_for_password(); |
| 136 | } |
| 137 | g.zHttpAuth = get_httpauth(); |
| 138 | url_remember(); |
| 139 | if( find_option("verbose","v",0)!=0 ) flags |= SYNC_VERBOSE; |
| 140 | fossil_print("Autosync: %s\n", g.url.canonical); |
| 141 | url_enable_proxy("via proxy: "); |
| 142 | rc = client_sync(flags, configSync, 0, 0); |
| 143 | return rc; |
| 144 | } |
| 145 | |
| 146 | /* |
| 147 | ** This routine will try a number of times to perform autosync with a |
| 148 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -125,23 +125,27 @@ | |
| 125 | if( is_false(zAutosync) ) return 0; |
| 126 | if( db_get_boolean("dont-push",0) || fossil_strncmp(zAutosync,"pull",4)==0 ){ |
| 127 | flags &= ~SYNC_CKIN_LOCK; |
| 128 | if( flags & SYNC_PUSH ) return 0; |
| 129 | } |
| 130 | if( find_option("verbose","v",0)!=0 ) flags |= SYNC_VERBOSE; |
| 131 | url_parse(0, URL_REMEMBER); |
| 132 | if( g.url.protocol==0 ) return 0; |
| 133 | if( g.url.user!=0 && g.url.passwd==0 ){ |
| 134 | g.url.passwd = unobscure(db_get("last-sync-pw", 0)); |
| 135 | g.url.flags |= URL_PROMPT_PW; |
| 136 | url_prompt_for_password(); |
| 137 | } |
| 138 | g.zHttpAuth = get_httpauth(); |
| 139 | if( fossil_strcmp(zAutosync,"all")==0 ){ |
| 140 | rc = client_sync_all_urls(flags|SYNC_ALLURL, configSync, 0, 0); |
| 141 | }else{ |
| 142 | url_remember(); |
| 143 | sync_explain(flags); |
| 144 | url_enable_proxy("via proxy: "); |
| 145 | rc = client_sync(flags, configSync, 0, 0); |
| 146 | } |
| 147 | return rc; |
| 148 | } |
| 149 | |
| 150 | /* |
| 151 | ** This routine will try a number of times to perform autosync with a |
| 152 |