Fossil

Check-in [40d5560f22]
Login

Check-in [40d5560f22]

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

Overview
Comment:Minor code style and spacing cleanup.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 40d5560f22f5e8d82e2605683d1c7964bd3f25bc
User & Date: mistachkin 2014-06-13 23:34:07.442
Context
2014-06-14
03:13
Add the "fossil fusefs DIRECTORY" command that mounts a Fuse Filesystem at the given DIRECTORY and populates it with read-only copies of all historical check-ins. This only works on systems that support FuseFS. ... (check-in: 4bf670e612 user: drh tags: trunk)
01:28
Initialize implementation of the "fusefs" command. To make it work, manually edit the Makefile to add -DFOSSIL_HAVE_FUSEFS and -lfuse. Then run "fossil fusefs /tmp/fusefs". Afterwards you can "ls /tmp/fusefs/checkins/trunk" and so forth. ... (check-in: ee5cd77d5a user: drh tags: fusefs)
2014-06-13
23:34
Minor code style and spacing cleanup. ... (check-in: 40d5560f22 user: mistachkin tags: trunk)
14:49
Minor code cleanup for autosync attempts to make the code more legible, no change in functionality. ... (check-in: 2f9c2ea5a5 user: andybradford tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/branch.c.
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
  }


  /* Commit */
  db_end_transaction(0);

  /* Do an autosync push, if requested */
  if( !isPrivate ) autosync_loop(SYNC_PUSH,db_get_int("autosync-tries", 1));
}

/*
** Prepare a query that will list branches.
**
** If (which<0) then the query pulls only closed branches. If
** (which>0) then the query pulls all (closed and opened)







|







174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
  }


  /* Commit */
  db_end_transaction(0);

  /* Do an autosync push, if requested */
  if( !isPrivate ) autosync_loop(SYNC_PUSH, db_get_int("autosync-tries", 1));
}

/*
** Prepare a query that will list branches.
**
** If (which<0) then the query pulls only closed branches. If
** (which>0) then the query pulls all (closed and opened)
Changes to src/sync.c.
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
  url_enable_proxy("via proxy: ");
  rc = client_sync(flags, configSync, 0);
  return rc;
}

/*
** This routine will try a number of times to perform autosync with a
** .5 second sleep between attempts; returning the last autosync status.
*/
int autosync_loop(int flags, int nTries){
  int n = 0;
  int rc = 0;
  while( (n==0 || n < nTries) && (rc = autosync(flags)) ){
    if( rc ){
      if( ++n < nTries ){
        fossil_warning("Autosync failed, making another attempt.");
        sqlite3_sleep(500);
      }else{
        fossil_warning("Autosync failed.");
      }
    }
  }







|




|

|







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
  url_enable_proxy("via proxy: ");
  rc = client_sync(flags, configSync, 0);
  return rc;
}

/*
** This routine will try a number of times to perform autosync with a
** 0.5 second sleep between attempts; returning the last autosync status.
*/
int autosync_loop(int flags, int nTries){
  int n = 0;
  int rc = 0;
  while( (n==0 || n<nTries) && (rc=autosync(flags)) ){
    if( rc ){
      if( ++n<nTries ){
        fossil_warning("Autosync failed, making another attempt.");
        sqlite3_sleep(500);
      }else{
        fossil_warning("Autosync failed.");
      }
    }
  }
Changes to src/update.c.
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
  debugFlag = find_option("debug",0,0)!=0;
  setmtimeFlag = find_option("setmtime",0,0)!=0;
  capture_case_sensitive_option();
  db_must_be_within_tree();
  vid = db_lget_int("checkout", 0);
  user_select();
  if( !dryRunFlag && !internalUpdate ){
    if( autosync_loop(SYNC_PULL + SYNC_VERBOSE*verboseFlag, 
                      db_get_int("autosync-tries", 1)) ){
      fossil_fatal("Cannot proceed with update");
    }
  }
  
  /* Create any empty directories now, as well as after the update,
  ** so changes in settings are reflected now */







|







128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
  debugFlag = find_option("debug",0,0)!=0;
  setmtimeFlag = find_option("setmtime",0,0)!=0;
  capture_case_sensitive_option();
  db_must_be_within_tree();
  vid = db_lget_int("checkout", 0);
  user_select();
  if( !dryRunFlag && !internalUpdate ){
    if( autosync_loop(SYNC_PULL + SYNC_VERBOSE*verboseFlag,
                      db_get_int("autosync-tries", 1)) ){
      fossil_fatal("Cannot proceed with update");
    }
  }
  
  /* Create any empty directories now, as well as after the update,
  ** so changes in settings are reflected now */