Fossil

Check-in [ea27129c]
Login

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

Overview
Comment:Add the "pullonly" option to the "autosync" setting.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ea27129c88e9aae6329ec2725cb88b1787f58d8d
User & Date: drh 2010-01-19 18:28:12
References
2010-01-20
06:00 New ticket [a5403e6e] Clicking on ticket link on Timeline page redirects to Index Page.. artifact: 47c81394 user: anonymous
Context
2010-01-20
15:43
Fix a memory leak in the check-out logic that prevents opening of massive repositories. Ticket [708eab9d48] check-in: 726a13d2 user: drh tags: trunk
2010-01-19
18:28
Add the "pullonly" option to the "autosync" setting. check-in: ea27129c user: drh tags: trunk
17:34
Cleanup of the code used to resolve tag names in contexts where an artifact ID can be entered. check-in: bf56b2dd user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/db.c.

1471
1472
1473
1474
1475
1476
1477
1478
1479
1480

1481
1482
1483
1484
1485
1486
1487
** The "unset" command clears a property setting.
**
**
**    auto-captcha     If enabled, the Login page will provide a button
**                     which uses JavaScript to fill out the captcha for
**                     the "anonymous" user. (Most bots cannot use JavaScript.)
**
**    autosync         If enabled, automatically pull prior to
**                     commit or update and automatically push
**                     after commit or tag or branch creation.

**
**    clearsign        When enabled (the default), fossil will attempt to
**                     sign all commits with gpg.  When disabled, commits will
**                     be unsigned.
**
**    diff-command     External command to run when performing a diff.
**                     If undefined, the internal text diff will be used.







|
|
|
>







1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
** The "unset" command clears a property setting.
**
**
**    auto-captcha     If enabled, the Login page will provide a button
**                     which uses JavaScript to fill out the captcha for
**                     the "anonymous" user. (Most bots cannot use JavaScript.)
**
**    autosync         If enabled, automatically pull prior to commit
**                     or update and automatically push after commit or
**                     tag or branch creation.  If the the value is "pullonly"
**                     then only pull operations occur automatically.
**
**    clearsign        When enabled (the default), fossil will attempt to
**                     sign all commits with gpg.  When disabled, commits will
**                     be unsigned.
**
**    diff-command     External command to run when performing a diff.
**                     If undefined, the internal text diff will be used.

Changes to src/sync.c.

39
40
41
42
43
44
45

46
47
48
49
50








51
52
53
54
55
56
57
/*
** 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 */
  }
  url_parse(zUrl);
  if( g.urlPort!=g.urlDfltPort ){







>



|
|
>
>
>
>
>
>
>
>







39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
** 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;
  const char *zAutosync;
  if( g.fNoSync ){
    return;
  }
  zAutosync = db_get("autosync", 0);
  if( zAutosync ){
    if( (flags & AUTOSYNC_PUSH)!=0 && memcmp(zAutosync,"pull",4)==0 ){
      return;   /* Do not auto-push when autosync=pullonly */
    }
    if( is_false(zAutosync) ){
      return;   /* Autosync is completely off */
    }
  }else{
    /* Autosync defaults on.  To make it default off, "return" here. */
  }
  zUrl = db_get("last-sync-url", 0);
  if( zUrl==0 ){
    return;  /* No default server */
  }
  url_parse(zUrl);
  if( g.urlPort!=g.urlDfltPort ){