Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Improved help text for the autosync setting. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
19d7c5ff7b2f48f6373e85b38d1746cd |
| User & Date: | drh 2021-10-25 10:09:17.965 |
Context
|
2021-10-25
| ||
| 10:36 | Add a comment that documents the CONFIG table keys used by "fossil remote". No changes to code. check-in: 6330e86405 user: drh tags: trunk | |
| 10:09 | Improved help text for the autosync setting. check-in: 19d7c5ff7b user: drh tags: trunk | |
| 09:59 | If the "autosync" setting is "all", then autosync with all repos in "fossil remote list". check-in: 241ade812b user: drh tags: trunk | |
Changes
Changes to src/db.c.
| ︙ | ︙ | |||
3805 3806 3807 3808 3809 3810 3811 | /* ** SETTING: auto-shun boolean default=on ** If enabled, automatically pull the shunning list ** from a server to which the client autosyncs. */ /* ** SETTING: autosync width=16 default=on | > | > | | | > > > | 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 | /* ** SETTING: auto-shun boolean default=on ** If enabled, automatically pull the shunning list ** from a server to which the client autosyncs. */ /* ** SETTING: autosync width=16 default=on ** This setting can be a boolean value (0, 1, on, off, true, false) ** or "pullonly" or "all". ** ** If not false, automatically pull prior to commit ** or update and automatically push after commit or ** tag or branch creation. Except, if the value is ** "pullonly" then only pull operations occur automatically. ** Normally, only the default remote is used, but if the ** value is "all" then push/pull operations occur on all ** remotes. */ /* ** SETTING: autosync-tries width=16 default=1 ** If autosync is enabled setting this to a value greater ** than zero will cause autosync to try no more than this ** number of attempts if there is a sync failure. */ |
| ︙ | ︙ |
Changes to src/sync.c.
| ︙ | ︙ | |||
119 120 121 122 123 124 125 |
int configSync = 0; /* configuration changes transferred */
if( g.fNoSync ){
return 0;
}
zAutosync = db_get("autosync", 0);
if( zAutosync==0 ) zAutosync = "on"; /* defend against misconfig */
if( is_false(zAutosync) ) return 0;
| | > > | | 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
int configSync = 0; /* configuration changes transferred */
if( g.fNoSync ){
return 0;
}
zAutosync = db_get("autosync", 0);
if( zAutosync==0 ) zAutosync = "on"; /* defend against misconfig */
if( is_false(zAutosync) ) return 0;
if( db_get_boolean("dont-push",0)
|| sqlite3_strglob("*pull*", zAutosync)==0
){
flags &= ~SYNC_CKIN_LOCK;
if( flags & SYNC_PUSH ) return 0;
}
if( find_option("verbose","v",0)!=0 ) flags |= SYNC_VERBOSE;
url_parse(0, URL_REMEMBER);
if( g.url.protocol==0 ) return 0;
if( g.url.user!=0 && g.url.passwd==0 ){
g.url.passwd = unobscure(db_get("last-sync-pw", 0));
g.url.flags |= URL_PROMPT_PW;
url_prompt_for_password();
}
g.zHttpAuth = get_httpauth();
if( sqlite3_strglob("*all*", zAutosync)==0 ){
rc = client_sync_all_urls(flags|SYNC_ALLURL, configSync, 0, 0);
}else{
url_remember();
sync_explain(flags);
url_enable_proxy("via proxy: ");
rc = client_sync(flags, configSync, 0, 0);
}
|
| ︙ | ︙ |