Fossil SCM

Allow multiple autosync attempts also for the branch and update commands.

andybradford 2014-05-30 14:54 autosync-tries
Commit 87d323d30740daf15d2f7162a4141bc98d88c1e1
2 files changed +1 -1 +2 -1
+1 -1
--- src/branch.c
+++ src/branch.c
@@ -176,11 +176,11 @@
176176
177177
/* Commit */
178178
db_end_transaction(0);
179179
180180
/* Do an autosync push, if requested */
181
- if( !isPrivate ) autosync(SYNC_PUSH);
181
+ if( !isPrivate ) autosync_loop(SYNC_PUSH,db_get_int("autosync-tries", 1));
182182
}
183183
184184
/*
185185
** Prepare a query that will list branches.
186186
**
187187
--- src/branch.c
+++ src/branch.c
@@ -176,11 +176,11 @@
176
177 /* Commit */
178 db_end_transaction(0);
179
180 /* Do an autosync push, if requested */
181 if( !isPrivate ) autosync(SYNC_PUSH);
182 }
183
184 /*
185 ** Prepare a query that will list branches.
186 **
187
--- src/branch.c
+++ src/branch.c
@@ -176,11 +176,11 @@
176
177 /* Commit */
178 db_end_transaction(0);
179
180 /* Do an autosync push, if requested */
181 if( !isPrivate ) autosync_loop(SYNC_PUSH,db_get_int("autosync-tries", 1));
182 }
183
184 /*
185 ** Prepare a query that will list branches.
186 **
187
+2 -1
--- src/update.c
+++ src/update.c
@@ -130,11 +130,12 @@
130130
capture_case_sensitive_option();
131131
db_must_be_within_tree();
132132
vid = db_lget_int("checkout", 0);
133133
user_select();
134134
if( !dryRunFlag && !internalUpdate ){
135
- if( autosync(SYNC_PULL + SYNC_VERBOSE*verboseFlag) ){
135
+ if( autosync_loop(SYNC_PULL + SYNC_VERBOSE*verboseFlag,
136
+ db_get_int("autosync-tries", 1)) ){
136137
fossil_fatal("Cannot proceed with update");
137138
}
138139
}
139140
140141
/* Create any empty directories now, as well as after the update,
141142
--- src/update.c
+++ src/update.c
@@ -130,11 +130,12 @@
130 capture_case_sensitive_option();
131 db_must_be_within_tree();
132 vid = db_lget_int("checkout", 0);
133 user_select();
134 if( !dryRunFlag && !internalUpdate ){
135 if( autosync(SYNC_PULL + SYNC_VERBOSE*verboseFlag) ){
 
136 fossil_fatal("Cannot proceed with update");
137 }
138 }
139
140 /* Create any empty directories now, as well as after the update,
141
--- src/update.c
+++ src/update.c
@@ -130,11 +130,12 @@
130 capture_case_sensitive_option();
131 db_must_be_within_tree();
132 vid = db_lget_int("checkout", 0);
133 user_select();
134 if( !dryRunFlag && !internalUpdate ){
135 if( autosync_loop(SYNC_PULL + SYNC_VERBOSE*verboseFlag,
136 db_get_int("autosync-tries", 1)) ){
137 fossil_fatal("Cannot proceed with update");
138 }
139 }
140
141 /* Create any empty directories now, as well as after the update,
142

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button