142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
** See also: [[init]], [[open]]
*/
void clone_cmd(void){
char *zPassword;
const char *zDefaultUser; /* Optional name of the default user */
const char *zHttpAuth; /* HTTP Authorization user:pass information */
int nErr = 0;
int urlFlags = URL_PROMPT_PW | URL_REMEMBER;
int syncFlags = SYNC_CLONE;
int noCompress = find_option("nocompress",0,0)!=0;
int noOpen = find_option("no-open",0,0)!=0;
int allowNested = find_option("nested",0,0)!=0; /* Used by open */
int bResume = 0; /* Set if a previous clone failed */
const char *zRepo = 0; /* Name of the new local repository file */
|
>
|
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
** See also: [[init]], [[open]]
*/
void clone_cmd(void){
char *zPassword;
const char *zDefaultUser; /* Optional name of the default user */
const char *zHttpAuth; /* HTTP Authorization user:pass information */
int nErr = 0;
int nResumes = 0;
int urlFlags = URL_PROMPT_PW | URL_REMEMBER;
int syncFlags = SYNC_CLONE;
int noCompress = find_option("nocompress",0,0)!=0;
int noOpen = find_option("no-open",0,0)!=0;
int allowNested = find_option("nested",0,0)!=0; /* Used by open */
int bResume = 0; /* Set if a previous clone failed */
const char *zRepo = 0; /* Name of the new local repository file */
|
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
"DELETE FROM config WHERE name='project-code';"
);
db_protect_pop();
url_enable_proxy(0);
clone_ssh_db_set_options();
url_get_password_if_needed();
g.xlinkClusterOnly = 1;
nErr = client_sync(syncFlags,CONFIGSET_ALL,0,0);
g.xlinkClusterOnly = 0;
verify_cancel();
if( nErr ){
fossil_warning("server returned an error - clone incomplete");
}else{
db_unprotect(PROTECT_CONFIG);
db_multi_exec("DELETE FROM config WHERE name = 'aux-clone-seqno';");
|
|
>
>
>
|
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
|
"DELETE FROM config WHERE name='project-code';"
);
db_protect_pop();
url_enable_proxy(0);
clone_ssh_db_set_options();
url_get_password_if_needed();
g.xlinkClusterOnly = 1;
while( nResumes++<3 && (nErr = client_sync(syncFlags,CONFIGSET_ALL,0,0)) ){
fossil_warning("cloning encountered errors, trying again.");
sqlite3_sleep(500);
}
g.xlinkClusterOnly = 0;
verify_cancel();
if( nErr ){
fossil_warning("server returned an error - clone incomplete");
}else{
db_unprotect(PROTECT_CONFIG);
db_multi_exec("DELETE FROM config WHERE name = 'aux-clone-seqno';");
|