Fossil SCM
Limit the scope to the error condition to clone operations only for now.
Commit
29e9e84a1ea9a8a63d16af8826f8f5f12d2945e7c983bcfea88f7b96298d90a6
Parent
bdd22578fa90c5b…
2 files changed
+3
-3
+3
-3
+3
-3
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -290,17 +290,17 @@ | ||
| 290 | 290 | clone_ssh_db_set_options(); |
| 291 | 291 | url_get_password_if_needed(); |
| 292 | 292 | g.xlinkClusterOnly = 1; |
| 293 | 293 | while( nResumes++<3 && (nErr = client_sync(syncFlags,CONFIGSET_ALL,0,0)) |
| 294 | 294 | ){ |
| 295 | + if( db_get_int("aux-clone-seqno",1)==1 ){ | |
| 296 | + fossil_fatal("server returned an error - clone aborted"); | |
| 297 | + } | |
| 295 | 298 | if( sync_interrupted() ){ |
| 296 | 299 | fossil_warning("clone was interrupted"); |
| 297 | 300 | break; |
| 298 | 301 | } |
| 299 | - if( db_get_int("aux-clone-seqno",1)==1 ){ | |
| 300 | - fossil_fatal("server returned an error - clone aborted"); | |
| 301 | - } | |
| 302 | 302 | if( nResumes<3 ){ |
| 303 | 303 | fossil_warning("cloning encountered errors, trying again."); |
| 304 | 304 | sqlite3_sleep(500); |
| 305 | 305 | } |
| 306 | 306 | } |
| 307 | 307 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -290,17 +290,17 @@ | |
| 290 | clone_ssh_db_set_options(); |
| 291 | url_get_password_if_needed(); |
| 292 | g.xlinkClusterOnly = 1; |
| 293 | while( nResumes++<3 && (nErr = client_sync(syncFlags,CONFIGSET_ALL,0,0)) |
| 294 | ){ |
| 295 | if( sync_interrupted() ){ |
| 296 | fossil_warning("clone was interrupted"); |
| 297 | break; |
| 298 | } |
| 299 | if( db_get_int("aux-clone-seqno",1)==1 ){ |
| 300 | fossil_fatal("server returned an error - clone aborted"); |
| 301 | } |
| 302 | if( nResumes<3 ){ |
| 303 | fossil_warning("cloning encountered errors, trying again."); |
| 304 | sqlite3_sleep(500); |
| 305 | } |
| 306 | } |
| 307 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -290,17 +290,17 @@ | |
| 290 | clone_ssh_db_set_options(); |
| 291 | url_get_password_if_needed(); |
| 292 | g.xlinkClusterOnly = 1; |
| 293 | while( nResumes++<3 && (nErr = client_sync(syncFlags,CONFIGSET_ALL,0,0)) |
| 294 | ){ |
| 295 | if( db_get_int("aux-clone-seqno",1)==1 ){ |
| 296 | fossil_fatal("server returned an error - clone aborted"); |
| 297 | } |
| 298 | if( sync_interrupted() ){ |
| 299 | fossil_warning("clone was interrupted"); |
| 300 | break; |
| 301 | } |
| 302 | if( nResumes<3 ){ |
| 303 | fossil_warning("cloning encountered errors, trying again."); |
| 304 | sqlite3_sleep(500); |
| 305 | } |
| 306 | } |
| 307 |
+3
-3
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -2035,11 +2035,11 @@ | ||
| 2035 | 2035 | return 0; /* Nothing to do */ |
| 2036 | 2036 | } |
| 2037 | 2037 | |
| 2038 | 2038 | if( (syncFlags & SYNC_CLONE)==0 && db_get_int("aux-clone-seqno",0)>0 ){ |
| 2039 | 2039 | fossil_fatal("Unable to synchronize due to incomplete clone."); |
| 2040 | - }else{ | |
| 2040 | + }else if( (syncFlags & SYNC_CLONE)!=0 ){ | |
| 2041 | 2041 | cloneSeqno = db_get_int("aux-clone-seqno",1); |
| 2042 | 2042 | } |
| 2043 | 2043 | |
| 2044 | 2044 | /* Compute an appropriate project code. zPCode is the project code |
| 2045 | 2045 | ** for the local repository. zAltPCode will usually be NULL, but might |
| @@ -2127,11 +2127,11 @@ | ||
| 2127 | 2127 | ** or push message. |
| 2128 | 2128 | */ |
| 2129 | 2129 | blob_appendf(&send, "pragma client-version %d %d %d\n", |
| 2130 | 2130 | RELEASE_VERSION_NUMBER, MANIFEST_NUMERIC_DATE, |
| 2131 | 2131 | MANIFEST_NUMERIC_TIME); |
| 2132 | - if( syncFlags & SYNC_CLONE ){ | |
| 2132 | + if( (syncFlags & SYNC_CLONE)!=0 ){ | |
| 2133 | 2133 | #if !defined(_WIN32) |
| 2134 | 2134 | signal(SIGINT, sync_sigint_handler); |
| 2135 | 2135 | #endif |
| 2136 | 2136 | if( nCycle<2 ){ |
| 2137 | 2137 | /* Only request this at the beginning of the clone */ |
| @@ -2910,11 +2910,11 @@ | ||
| 2910 | 2910 | /* Continue the clone until we see the clone_seqno 0" card or |
| 2911 | 2911 | ** until we stop receiving artifacts */ |
| 2912 | 2912 | go = 1; |
| 2913 | 2913 | } |
| 2914 | 2914 | } |
| 2915 | - if( go && bSyncGotIntr ){ | |
| 2915 | + if( (syncFlags & SYNC_CLONE)!=0 && bSyncGotIntr && cloneSeqno>0 ){ | |
| 2916 | 2916 | go = 0; |
| 2917 | 2917 | nErr++; |
| 2918 | 2918 | } |
| 2919 | 2919 | |
| 2920 | 2920 | nCardRcvd = 0; |
| 2921 | 2921 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -2035,11 +2035,11 @@ | |
| 2035 | return 0; /* Nothing to do */ |
| 2036 | } |
| 2037 | |
| 2038 | if( (syncFlags & SYNC_CLONE)==0 && db_get_int("aux-clone-seqno",0)>0 ){ |
| 2039 | fossil_fatal("Unable to synchronize due to incomplete clone."); |
| 2040 | }else{ |
| 2041 | cloneSeqno = db_get_int("aux-clone-seqno",1); |
| 2042 | } |
| 2043 | |
| 2044 | /* Compute an appropriate project code. zPCode is the project code |
| 2045 | ** for the local repository. zAltPCode will usually be NULL, but might |
| @@ -2127,11 +2127,11 @@ | |
| 2127 | ** or push message. |
| 2128 | */ |
| 2129 | blob_appendf(&send, "pragma client-version %d %d %d\n", |
| 2130 | RELEASE_VERSION_NUMBER, MANIFEST_NUMERIC_DATE, |
| 2131 | MANIFEST_NUMERIC_TIME); |
| 2132 | if( syncFlags & SYNC_CLONE ){ |
| 2133 | #if !defined(_WIN32) |
| 2134 | signal(SIGINT, sync_sigint_handler); |
| 2135 | #endif |
| 2136 | if( nCycle<2 ){ |
| 2137 | /* Only request this at the beginning of the clone */ |
| @@ -2910,11 +2910,11 @@ | |
| 2910 | /* Continue the clone until we see the clone_seqno 0" card or |
| 2911 | ** until we stop receiving artifacts */ |
| 2912 | go = 1; |
| 2913 | } |
| 2914 | } |
| 2915 | if( go && bSyncGotIntr ){ |
| 2916 | go = 0; |
| 2917 | nErr++; |
| 2918 | } |
| 2919 | |
| 2920 | nCardRcvd = 0; |
| 2921 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -2035,11 +2035,11 @@ | |
| 2035 | return 0; /* Nothing to do */ |
| 2036 | } |
| 2037 | |
| 2038 | if( (syncFlags & SYNC_CLONE)==0 && db_get_int("aux-clone-seqno",0)>0 ){ |
| 2039 | fossil_fatal("Unable to synchronize due to incomplete clone."); |
| 2040 | }else if( (syncFlags & SYNC_CLONE)!=0 ){ |
| 2041 | cloneSeqno = db_get_int("aux-clone-seqno",1); |
| 2042 | } |
| 2043 | |
| 2044 | /* Compute an appropriate project code. zPCode is the project code |
| 2045 | ** for the local repository. zAltPCode will usually be NULL, but might |
| @@ -2127,11 +2127,11 @@ | |
| 2127 | ** or push message. |
| 2128 | */ |
| 2129 | blob_appendf(&send, "pragma client-version %d %d %d\n", |
| 2130 | RELEASE_VERSION_NUMBER, MANIFEST_NUMERIC_DATE, |
| 2131 | MANIFEST_NUMERIC_TIME); |
| 2132 | if( (syncFlags & SYNC_CLONE)!=0 ){ |
| 2133 | #if !defined(_WIN32) |
| 2134 | signal(SIGINT, sync_sigint_handler); |
| 2135 | #endif |
| 2136 | if( nCycle<2 ){ |
| 2137 | /* Only request this at the beginning of the clone */ |
| @@ -2910,11 +2910,11 @@ | |
| 2910 | /* Continue the clone until we see the clone_seqno 0" card or |
| 2911 | ** until we stop receiving artifacts */ |
| 2912 | go = 1; |
| 2913 | } |
| 2914 | } |
| 2915 | if( (syncFlags & SYNC_CLONE)!=0 && bSyncGotIntr && cloneSeqno>0 ){ |
| 2916 | go = 0; |
| 2917 | nErr++; |
| 2918 | } |
| 2919 | |
| 2920 | nCardRcvd = 0; |
| 2921 |