Fossil SCM
Add the --nosync option to temporarily disable autosync. Useful when off network.
Commit
9ba6e4287ba0db011906809a2d71a5eb2fab7d29
Parent
cf84ce2d8c56805…
3 files changed
+1
+3
+1
+1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -56,10 +56,11 @@ | ||
| 56 | 56 | char *zLocalRoot; /* The directory holding the local database */ |
| 57 | 57 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 58 | 58 | int fSqlTrace; /* True if -sqltrace flag is present */ |
| 59 | 59 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 60 | 60 | int fHttpTrace; /* Trace outbound HTTP requests */ |
| 61 | + int fNoSync; /* Do not do an autosync even. --nosync */ | |
| 61 | 62 | char *zPath; /* Name of webpage being served */ |
| 62 | 63 | char *zExtra; /* Extra path information past the webpage name */ |
| 63 | 64 | char *zBaseURL; /* Full text of the URL being served */ |
| 64 | 65 | char *zTop; /* Parent directory of zPath */ |
| 65 | 66 | const char *zContentType; /* The content type of the input HTTP request */ |
| 66 | 67 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -56,10 +56,11 @@ | |
| 56 | char *zLocalRoot; /* The directory holding the local database */ |
| 57 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 58 | int fSqlTrace; /* True if -sqltrace flag is present */ |
| 59 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 60 | int fHttpTrace; /* Trace outbound HTTP requests */ |
| 61 | char *zPath; /* Name of webpage being served */ |
| 62 | char *zExtra; /* Extra path information past the webpage name */ |
| 63 | char *zBaseURL; /* Full text of the URL being served */ |
| 64 | char *zTop; /* Parent directory of zPath */ |
| 65 | const char *zContentType; /* The content type of the input HTTP request */ |
| 66 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -56,10 +56,11 @@ | |
| 56 | char *zLocalRoot; /* The directory holding the local database */ |
| 57 | int minPrefix; /* Number of digits needed for a distinct UUID */ |
| 58 | int fSqlTrace; /* True if -sqltrace flag is present */ |
| 59 | int fSqlPrint; /* True if -sqlprint flag is present */ |
| 60 | int fHttpTrace; /* Trace outbound HTTP requests */ |
| 61 | int fNoSync; /* Do not do an autosync even. --nosync */ |
| 62 | char *zPath; /* Name of webpage being served */ |
| 63 | char *zExtra; /* Extra path information past the webpage name */ |
| 64 | char *zBaseURL; /* Full text of the URL being served */ |
| 65 | char *zTop; /* Parent directory of zPath */ |
| 66 | const char *zContentType; /* The content type of the input HTTP request */ |
| 67 |
+3
| --- src/sync.c | ||
| +++ src/sync.c | ||
| @@ -41,10 +41,13 @@ | ||
| 41 | 41 | ** autosync. This will be a pull if the argument is true or a push |
| 42 | 42 | ** if the argument is false. |
| 43 | 43 | */ |
| 44 | 44 | void autosync(int flags){ |
| 45 | 45 | const char *zUrl; |
| 46 | + if( g.fNoSync ){ | |
| 47 | + return; | |
| 48 | + } | |
| 46 | 49 | if( db_get_boolean("autosync", 0)==0 ){ |
| 47 | 50 | return; |
| 48 | 51 | } |
| 49 | 52 | zUrl = db_get("last-sync-url", 0); |
| 50 | 53 | if( zUrl==0 ){ |
| 51 | 54 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -41,10 +41,13 @@ | |
| 41 | ** autosync. This will be a pull if the argument is true or a push |
| 42 | ** if the argument is false. |
| 43 | */ |
| 44 | void autosync(int flags){ |
| 45 | const char *zUrl; |
| 46 | if( db_get_boolean("autosync", 0)==0 ){ |
| 47 | return; |
| 48 | } |
| 49 | zUrl = db_get("last-sync-url", 0); |
| 50 | if( zUrl==0 ){ |
| 51 |
| --- src/sync.c | |
| +++ src/sync.c | |
| @@ -41,10 +41,13 @@ | |
| 41 | ** autosync. This will be a pull if the argument is true or a push |
| 42 | ** if the argument is false. |
| 43 | */ |
| 44 | void autosync(int flags){ |
| 45 | const char *zUrl; |
| 46 | if( g.fNoSync ){ |
| 47 | return; |
| 48 | } |
| 49 | if( db_get_boolean("autosync", 0)==0 ){ |
| 50 | return; |
| 51 | } |
| 52 | zUrl = db_get("last-sync-url", 0); |
| 53 | if( zUrl==0 ){ |
| 54 |
+1
| --- src/url.c | ||
| +++ src/url.c | ||
| @@ -148,10 +148,11 @@ | ||
| 148 | 148 | ** --proxy URL|off |
| 149 | 149 | ** |
| 150 | 150 | */ |
| 151 | 151 | void url_proxy_options(void){ |
| 152 | 152 | zProxyOpt = find_option("proxy", 0, 1); |
| 153 | + g.fNoSync = find_option("nosync", 0, 0)!=0; | |
| 153 | 154 | } |
| 154 | 155 | |
| 155 | 156 | /* |
| 156 | 157 | ** If the "proxy" setting is defined, then change the URL to refer |
| 157 | 158 | ** to the proxy server. |
| 158 | 159 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -148,10 +148,11 @@ | |
| 148 | ** --proxy URL|off |
| 149 | ** |
| 150 | */ |
| 151 | void url_proxy_options(void){ |
| 152 | zProxyOpt = find_option("proxy", 0, 1); |
| 153 | } |
| 154 | |
| 155 | /* |
| 156 | ** If the "proxy" setting is defined, then change the URL to refer |
| 157 | ** to the proxy server. |
| 158 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -148,10 +148,11 @@ | |
| 148 | ** --proxy URL|off |
| 149 | ** |
| 150 | */ |
| 151 | void url_proxy_options(void){ |
| 152 | zProxyOpt = find_option("proxy", 0, 1); |
| 153 | g.fNoSync = find_option("nosync", 0, 0)!=0; |
| 154 | } |
| 155 | |
| 156 | /* |
| 157 | ** If the "proxy" setting is defined, then change the URL to refer |
| 158 | ** to the proxy server. |
| 159 |