Fossil

Check-in [9ba6e428]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add the --nosync option to temporarily disable autosync. Useful when off network.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9ba6e4287ba0db011906809a2d71a5eb2fab7d29
User & Date: drh 2008-05-10 17:09:46.000
Context
2008-05-10
17:22
Add the "unset" command for clearing settings. ... (check-in: 41820798 user: drh tags: trunk)
17:09
Add the --nosync option to temporarily disable autosync. Useful when off network. ... (check-in: 9ba6e428 user: drh tags: trunk)
2008-05-07
23:56
Fix a typo on the "stat" page. ... (check-in: cf84ce2d user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
54
55
56
57
58
59
60

61
62
63
64
65
66
67
  char *zRepositoryName;  /* Name of the repository database */
  int localOpen;          /* True if the local database is open */
  char *zLocalRoot;       /* The directory holding the  local database */
  int minPrefix;          /* Number of digits needed for a distinct UUID */
  int fSqlTrace;          /* True if -sqltrace flag is present */
  int fSqlPrint;          /* True if -sqlprint flag is present */
  int fHttpTrace;         /* Trace outbound HTTP requests */

  char *zPath;            /* Name of webpage being served */
  char *zExtra;           /* Extra path information past the webpage name */
  char *zBaseURL;         /* Full text of the URL being served */
  char *zTop;             /* Parent directory of zPath */
  const char *zContentType;  /* The content type of the input HTTP request */
  int iErrPriority;       /* Priority of current error message */
  char *zErrMsg;          /* Text of an error message */







>







54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  char *zRepositoryName;  /* Name of the repository database */
  int localOpen;          /* True if the local database is open */
  char *zLocalRoot;       /* The directory holding the  local database */
  int minPrefix;          /* Number of digits needed for a distinct UUID */
  int fSqlTrace;          /* True if -sqltrace flag is present */
  int fSqlPrint;          /* True if -sqlprint flag is present */
  int fHttpTrace;         /* Trace outbound HTTP requests */
  int fNoSync;            /* Do not do an autosync even.  --nosync */
  char *zPath;            /* Name of webpage being served */
  char *zExtra;           /* Extra path information past the webpage name */
  char *zBaseURL;         /* Full text of the URL being served */
  char *zTop;             /* Parent directory of zPath */
  const char *zContentType;  /* The content type of the input HTTP request */
  int iErrPriority;       /* Priority of current error message */
  char *zErrMsg;          /* Text of an error message */
Changes to src/sync.c.
39
40
41
42
43
44
45



46
47
48
49
50
51
52
/*
** If the respository is configured for autosyncing, then do an
** autosync.  This will be a pull if the argument is true or a push
** if the argument is false.
*/
void autosync(int flags){
  const char *zUrl;



  if( db_get_boolean("autosync", 0)==0 ){
    return;
  }
  zUrl = db_get("last-sync-url", 0);
  if( zUrl==0 ){
    return;  /* No default server */
  }







>
>
>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
** If the respository is configured for autosyncing, then do an
** autosync.  This will be a pull if the argument is true or a push
** if the argument is false.
*/
void autosync(int flags){
  const char *zUrl;
  if( g.fNoSync ){
    return;
  }
  if( db_get_boolean("autosync", 0)==0 ){
    return;
  }
  zUrl = db_get("last-sync-url", 0);
  if( zUrl==0 ){
    return;  /* No default server */
  }
Changes to src/url.c.
146
147
148
149
150
151
152

153
154
155
156
157
158
159
** Extra any proxy options from the command-line.
**
**    --proxy URL|off
**
*/
void url_proxy_options(void){
  zProxyOpt = find_option("proxy", 0, 1);

}

/*
** If the "proxy" setting is defined, then change the URL to refer
** to the proxy server.
*/
void url_enable_proxy(const char *zMsg){







>







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
** Extra any proxy options from the command-line.
**
**    --proxy URL|off
**
*/
void url_proxy_options(void){
  zProxyOpt = find_option("proxy", 0, 1);
  g.fNoSync = find_option("nosync", 0, 0)!=0;
}

/*
** If the "proxy" setting is defined, then change the URL to refer
** to the proxy server.
*/
void url_enable_proxy(const char *zMsg){