Fossil

Diff
Login

Diff

Differences From Artifact [e40da0a778]:

To Artifact [3fcd7211e4]:


286
287
288
289
290
291
292
293
294
295
296



297
298
299
300
301
302
303
      "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 && sync_interrupted()==0
           && (nErr = client_sync(syncFlags,CONFIGSET_ALL,0,0))
    ){
      if( sync_interrupted() ) break;



      if( db_get_int("aux-clone-seqno",1)==1 ){
        fossil_fatal("server returned an error - clone aborted");
      }
      fossil_warning("cloning encountered errors, trying again.");
      sqlite3_sleep(500);
    }
    g.xlinkClusterOnly = 0;







<
|

|
>
>
>







286
287
288
289
290
291
292

293
294
295
296
297
298
299
300
301
302
303
304
305
      "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))
    ){
      if( sync_interrupted() ){
        fossil_warning("clone was interrupted");
        break;
      }
      if( db_get_int("aux-clone-seqno",1)==1 ){
        fossil_fatal("server returned an error - clone aborted");
      }
      fossil_warning("cloning encountered errors, trying again.");
      sqlite3_sleep(500);
    }
    g.xlinkClusterOnly = 0;
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340

341
342
343
344
345
346
347
348
349
350
      if( zCloneCode!=0 && zCloneCode[0]!=0
          && fossil_strcmp(zCloneCode, db_get("aux-clone-code",0))!=0 ){
        fossil_fatal("clone resume from different server not allowed");
      }
    }
    if( nErr ){
      fossil_warning("server returned an error - clone incomplete");
    }else if( sync_interrupted()==1 ){
      fossil_warning("clone was interrupted");
    }else{
      db_unprotect(PROTECT_CONFIG);
      db_multi_exec(
        "DELETE FROM config WHERE name = 'aux-clone-seqno';"
        "DELETE FROM config WHERE name = 'aux-clone-code';"
      );
      db_protect_pop();
    }
    db_end_transaction(0);
    db_close(1);
    db_open_repository(zRepo);
#if !defined(_WIN32)
    signal(SIGINT, SIG_DFL);
#endif
  }
  if( db_exists("SELECT 1 FROM delta WHERE srcId IN phantom") ){

    if( db_get_int("aux-clone-seqno",0)==0 ){
      fossil_fatal("there are unresolved deltas -"
                   " the clone is probabaly incomplete and unusable.");
    }
  }
  if( db_get_int("aux-clone-seqno",0)>1 ){
    fossil_warning("It may be possible to resume the"
           " clone by running the same command again.");
  }else{
    db_begin_transaction();







<
<
















>

<
|







318
319
320
321
322
323
324


325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342

343
344
345
346
347
348
349
350
      if( zCloneCode!=0 && zCloneCode[0]!=0
          && fossil_strcmp(zCloneCode, db_get("aux-clone-code",0))!=0 ){
        fossil_fatal("clone resume from different server not allowed");
      }
    }
    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';"
        "DELETE FROM config WHERE name = 'aux-clone-code';"
      );
      db_protect_pop();
    }
    db_end_transaction(0);
    db_close(1);
    db_open_repository(zRepo);
#if !defined(_WIN32)
    signal(SIGINT, SIG_DFL);
#endif
  }
  if( db_exists("SELECT 1 FROM delta WHERE srcId IN phantom") ){
    fossil_warning("there are unresolved deltas -");
    if( db_get_int("aux-clone-seqno",0)==0 ){

      fossil_fatal("the clone is probabaly incomplete and unusable.");
    }
  }
  if( db_get_int("aux-clone-seqno",0)>1 ){
    fossil_warning("It may be possible to resume the"
           " clone by running the same command again.");
  }else{
    db_begin_transaction();