Fossil SCM
More fixes to the unversioned file sync protocol.
Commit
48b9bf351f4a9eaf53cdf175838612f80912ccdd
Parent
a6b66652d1ce91c…
2 files changed
+5
-4
+27
-12
+5
-4
| --- src/unversioned.c | ||
| +++ src/unversioned.c | ||
| @@ -284,28 +284,29 @@ | ||
| 284 | 284 | while( db_step(&q)==SQLITE_ROW ){ |
| 285 | 285 | fossil_print("%s\n", db_column_text(&q,0)); |
| 286 | 286 | } |
| 287 | 287 | }else{ |
| 288 | 288 | db_prepare(&q, |
| 289 | - "SELECT hash, datetime(mtime,'unixepoch'), sz, name, content IS NULL" | |
| 289 | + "SELECT hash, datetime(mtime,'unixepoch'), sz, length(content), name" | |
| 290 | 290 | " FROM unversioned" |
| 291 | 291 | " ORDER BY name;" |
| 292 | 292 | ); |
| 293 | 293 | while( db_step(&q)==SQLITE_ROW ){ |
| 294 | 294 | const char *zHash = db_column_text(&q, 0); |
| 295 | 295 | const char *zNoContent = ""; |
| 296 | 296 | if( zHash==0 ){ |
| 297 | 297 | if( !allFlag ) continue; |
| 298 | 298 | zHash = "(deleted)"; |
| 299 | - }else if( db_column_int(&q,4) ){ | |
| 299 | + }else if( db_column_type(&q,3)==SQLITE_NULL ){ | |
| 300 | 300 | zNoContent = " (no content)"; |
| 301 | 301 | } |
| 302 | - fossil_print("%12.12s %s %8d %s%s\n", | |
| 302 | + fossil_print("%12.12s %s %8d %8d %s%s\n", | |
| 303 | 303 | zHash, |
| 304 | 304 | db_column_text(&q,1), |
| 305 | 305 | db_column_int(&q,2), |
| 306 | - db_column_text(&q,3), | |
| 306 | + db_column_int(&q,3), | |
| 307 | + db_column_text(&q,4), | |
| 307 | 308 | zNoContent |
| 308 | 309 | ); |
| 309 | 310 | } |
| 310 | 311 | } |
| 311 | 312 | db_finalize(&q); |
| 312 | 313 |
| --- src/unversioned.c | |
| +++ src/unversioned.c | |
| @@ -284,28 +284,29 @@ | |
| 284 | while( db_step(&q)==SQLITE_ROW ){ |
| 285 | fossil_print("%s\n", db_column_text(&q,0)); |
| 286 | } |
| 287 | }else{ |
| 288 | db_prepare(&q, |
| 289 | "SELECT hash, datetime(mtime,'unixepoch'), sz, name, content IS NULL" |
| 290 | " FROM unversioned" |
| 291 | " ORDER BY name;" |
| 292 | ); |
| 293 | while( db_step(&q)==SQLITE_ROW ){ |
| 294 | const char *zHash = db_column_text(&q, 0); |
| 295 | const char *zNoContent = ""; |
| 296 | if( zHash==0 ){ |
| 297 | if( !allFlag ) continue; |
| 298 | zHash = "(deleted)"; |
| 299 | }else if( db_column_int(&q,4) ){ |
| 300 | zNoContent = " (no content)"; |
| 301 | } |
| 302 | fossil_print("%12.12s %s %8d %s%s\n", |
| 303 | zHash, |
| 304 | db_column_text(&q,1), |
| 305 | db_column_int(&q,2), |
| 306 | db_column_text(&q,3), |
| 307 | zNoContent |
| 308 | ); |
| 309 | } |
| 310 | } |
| 311 | db_finalize(&q); |
| 312 |
| --- src/unversioned.c | |
| +++ src/unversioned.c | |
| @@ -284,28 +284,29 @@ | |
| 284 | while( db_step(&q)==SQLITE_ROW ){ |
| 285 | fossil_print("%s\n", db_column_text(&q,0)); |
| 286 | } |
| 287 | }else{ |
| 288 | db_prepare(&q, |
| 289 | "SELECT hash, datetime(mtime,'unixepoch'), sz, length(content), name" |
| 290 | " FROM unversioned" |
| 291 | " ORDER BY name;" |
| 292 | ); |
| 293 | while( db_step(&q)==SQLITE_ROW ){ |
| 294 | const char *zHash = db_column_text(&q, 0); |
| 295 | const char *zNoContent = ""; |
| 296 | if( zHash==0 ){ |
| 297 | if( !allFlag ) continue; |
| 298 | zHash = "(deleted)"; |
| 299 | }else if( db_column_type(&q,3)==SQLITE_NULL ){ |
| 300 | zNoContent = " (no content)"; |
| 301 | } |
| 302 | fossil_print("%12.12s %s %8d %8d %s%s\n", |
| 303 | zHash, |
| 304 | db_column_text(&q,1), |
| 305 | db_column_int(&q,2), |
| 306 | db_column_int(&q,3), |
| 307 | db_column_text(&q,4), |
| 308 | zNoContent |
| 309 | ); |
| 310 | } |
| 311 | } |
| 312 | db_finalize(&q); |
| 313 |
+27
-12
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -311,10 +311,11 @@ | ||
| 311 | 311 | Blob *pHash; /* The HASH value */ |
| 312 | 312 | int sz; /* The SIZE */ |
| 313 | 313 | int flags; /* The FLAGS */ |
| 314 | 314 | Blob content; /* The CONTENT */ |
| 315 | 315 | Blob hash; /* Hash computed from CONTENT to compare with HASH */ |
| 316 | + Blob x; /* Compressed content */ | |
| 316 | 317 | Stmt q; /* SQL statements for comparison and insert */ |
| 317 | 318 | int isDelete; /* HASH is "-" indicating this is a delete operation */ |
| 318 | 319 | int nullContent; /* True of CONTENT is NULL */ |
| 319 | 320 | int iStatus; /* Result from unversioned_status() */ |
| 320 | 321 | |
| @@ -329,10 +330,11 @@ | ||
| 329 | 330 | blob_appendf(&pXfer->err, "malformed uvfile line"); |
| 330 | 331 | return; |
| 331 | 332 | } |
| 332 | 333 | blob_init(&content, 0, 0); |
| 333 | 334 | blob_init(&hash, 0, 0); |
| 335 | + blob_init(&x, 0, 0); | |
| 334 | 336 | if( sz>0 && (flags & 0x0005)==0 ){ |
| 335 | 337 | blob_extract(pXfer->pIn, sz, &content); |
| 336 | 338 | nullContent = 0; |
| 337 | 339 | sha1sum_blob(&content, &hash); |
| 338 | 340 | if( blob_compare(&hash, pHash)!=0 ){ |
| @@ -356,35 +358,45 @@ | ||
| 356 | 358 | /* Store the content */ |
| 357 | 359 | isDelete = blob_eq(pHash, "-"); |
| 358 | 360 | if( isDelete ){ |
| 359 | 361 | db_prepare(&q, |
| 360 | 362 | "UPDATE unversioned" |
| 361 | - " SET rcvid=:rcvid, mtime=:mtime, hash=NULL, sz=0, content=NULL" | |
| 363 | + " SET rcvid=:rcvid, mtime=:mtime, hash=NULL, sz=0, encoding=0, content=NULL" | |
| 362 | 364 | " WHERE name=:name" |
| 363 | 365 | ); |
| 366 | + db_bind_int(&q, ":rcvid", g.rcvid); | |
| 364 | 367 | }else if( iStatus==4 ){ |
| 365 | 368 | db_prepare(&q, "UPDATE unversioned SET mtime=:mtime WHERE name=:name"); |
| 366 | 369 | }else{ |
| 367 | 370 | db_prepare(&q, |
| 368 | - "REPLACE INTO unversioned(name, rcvid, mtime, hash, sz, content)" | |
| 369 | - " VALUES(:name,:rcvid,:mtime,:hash,:sz,:content)" | |
| 371 | + "REPLACE INTO unversioned(name, rcvid, mtime, hash, sz, encoding, content)" | |
| 372 | + " VALUES(:name,:rcvid,:mtime,:hash,:sz,:encoding,:content)" | |
| 370 | 373 | ); |
| 374 | + db_bind_int(&q, ":rcvid", g.rcvid); | |
| 375 | + db_bind_text(&q, ":hash", blob_str(pHash)); | |
| 376 | + db_bind_int(&q, ":sz", blob_size(&content)); | |
| 377 | + if( !nullContent ){ | |
| 378 | + blob_compress(&content, &x); | |
| 379 | + if( blob_size(&x) < 0.8*blob_size(&content) ){ | |
| 380 | + db_bind_blob(&q, ":content", &x); | |
| 381 | + db_bind_int(&q, ":encoding", 1); | |
| 382 | + }else{ | |
| 383 | + db_bind_blob(&q, ":content", &content); | |
| 384 | + db_bind_int(&q, ":encoding", 0); | |
| 385 | + } | |
| 386 | + }else{ | |
| 387 | + db_bind_int(&q, ":encoding", 0); | |
| 388 | + } | |
| 371 | 389 | } |
| 372 | 390 | db_bind_text(&q, ":name", blob_str(&pXfer->aToken[1])); |
| 373 | - db_bind_int(&q, ":rcvid", g.rcvid); | |
| 374 | 391 | db_bind_int64(&q, ":mtime", mtime); |
| 375 | - db_bind_text(&q, ":hash", blob_str(pHash)); | |
| 376 | - db_bind_int(&q, ":sz", blob_size(&content)); | |
| 377 | - if( !nullContent ){ | |
| 378 | - blob_compress(&content, &content); | |
| 379 | - db_bind_blob(&q, ":content", &content); | |
| 380 | - } | |
| 381 | 392 | db_step(&q); |
| 382 | 393 | db_finalize(&q); |
| 383 | 394 | db_unset("uv-hash", 0); |
| 384 | 395 | |
| 385 | 396 | end_accept_unversioned_file: |
| 397 | + blob_reset(&x); | |
| 386 | 398 | blob_reset(&content); |
| 387 | 399 | blob_reset(&hash); |
| 388 | 400 | } |
| 389 | 401 | |
| 390 | 402 | /* |
| @@ -654,11 +666,11 @@ | ||
| 654 | 666 | if( db_step(&q1)==SQLITE_ROW ){ |
| 655 | 667 | sqlite3_int64 mtime = db_column_int64(&q1, 0); |
| 656 | 668 | const char *zHash = db_column_text(&q1, 1); |
| 657 | 669 | blob_appendf(pXfer->pOut, "uvfile %s %lld", zName, mtime); |
| 658 | 670 | if( zHash==0 ){ |
| 659 | - blob_append(pXfer->pOut, " 0 0 1\n", -1); | |
| 671 | + blob_append(pXfer->pOut, " - 0 1\n", -1); | |
| 660 | 672 | }else if( noContent ){ |
| 661 | 673 | blob_appendf(pXfer->pOut, " %s %d 4\n", zHash, db_column_int(&q1,3)); |
| 662 | 674 | }else{ |
| 663 | 675 | Blob content; |
| 664 | 676 | blob_init(&content, 0, 0); |
| @@ -1706,11 +1718,11 @@ | ||
| 1706 | 1718 | /* When syncing unversioned files, create a TEMP table in which to store |
| 1707 | 1719 | ** the names of files that do not need to be sent from client to server. |
| 1708 | 1720 | */ |
| 1709 | 1721 | if( syncFlags & SYNC_UNVERSIONED ){ |
| 1710 | 1722 | db_multi_exec( |
| 1711 | - "CREATE TEMP TABLE uv_toSend(" | |
| 1723 | + "CREATE TEMP TABLE uv_tosend(" | |
| 1712 | 1724 | " name TEXT PRIMARY KEY," |
| 1713 | 1725 | " mtimeOnly BOOLEAN" |
| 1714 | 1726 | ") WITHOUT ROWID;" |
| 1715 | 1727 | "INSERT INTO uv_toSend(name,mtimeOnly)" |
| 1716 | 1728 | " SELECT name, 0 FROM unversioned WHERE hash IS NOT NULL;" |
| @@ -1841,10 +1853,11 @@ | ||
| 1841 | 1853 | assert( uvStatus==2 ); |
| 1842 | 1854 | db_prepare(&uvq, "SELECT name, mtimeOnly FROM uv_tosend"); |
| 1843 | 1855 | while( db_step(&uvq)==SQLITE_ROW ){ |
| 1844 | 1856 | send_unversioned_file(&xfer, db_column_text(&uvq,0), db_column_int(&uvq,1)); |
| 1845 | 1857 | nCardSent++; |
| 1858 | + nArtifactSent++; | |
| 1846 | 1859 | } |
| 1847 | 1860 | db_finalize(&uvq); |
| 1848 | 1861 | uvDoPush = 0; |
| 1849 | 1862 | } |
| 1850 | 1863 | |
| @@ -2055,10 +2068,12 @@ | ||
| 2055 | 2068 | } |
| 2056 | 2069 | if( iStatus<=3 ){ |
| 2057 | 2070 | db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName); |
| 2058 | 2071 | }else if( iStatus==4 ){ |
| 2059 | 2072 | db_multi_exec("UPDATE uv_tosend SET mtimeOnly=1 WHERE name=%Q", zName); |
| 2073 | + }else if( iStatus==5 ){ | |
| 2074 | + db_multi_exec("REPLACE INTO uv_tosend(name,mtimeOnly) VALUES(%Q,0)", zName); | |
| 2060 | 2075 | } |
| 2061 | 2076 | }else |
| 2062 | 2077 | |
| 2063 | 2078 | /* push SERVERCODE PRODUCTCODE |
| 2064 | 2079 | ** |
| 2065 | 2080 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -311,10 +311,11 @@ | |
| 311 | Blob *pHash; /* The HASH value */ |
| 312 | int sz; /* The SIZE */ |
| 313 | int flags; /* The FLAGS */ |
| 314 | Blob content; /* The CONTENT */ |
| 315 | Blob hash; /* Hash computed from CONTENT to compare with HASH */ |
| 316 | Stmt q; /* SQL statements for comparison and insert */ |
| 317 | int isDelete; /* HASH is "-" indicating this is a delete operation */ |
| 318 | int nullContent; /* True of CONTENT is NULL */ |
| 319 | int iStatus; /* Result from unversioned_status() */ |
| 320 | |
| @@ -329,10 +330,11 @@ | |
| 329 | blob_appendf(&pXfer->err, "malformed uvfile line"); |
| 330 | return; |
| 331 | } |
| 332 | blob_init(&content, 0, 0); |
| 333 | blob_init(&hash, 0, 0); |
| 334 | if( sz>0 && (flags & 0x0005)==0 ){ |
| 335 | blob_extract(pXfer->pIn, sz, &content); |
| 336 | nullContent = 0; |
| 337 | sha1sum_blob(&content, &hash); |
| 338 | if( blob_compare(&hash, pHash)!=0 ){ |
| @@ -356,35 +358,45 @@ | |
| 356 | /* Store the content */ |
| 357 | isDelete = blob_eq(pHash, "-"); |
| 358 | if( isDelete ){ |
| 359 | db_prepare(&q, |
| 360 | "UPDATE unversioned" |
| 361 | " SET rcvid=:rcvid, mtime=:mtime, hash=NULL, sz=0, content=NULL" |
| 362 | " WHERE name=:name" |
| 363 | ); |
| 364 | }else if( iStatus==4 ){ |
| 365 | db_prepare(&q, "UPDATE unversioned SET mtime=:mtime WHERE name=:name"); |
| 366 | }else{ |
| 367 | db_prepare(&q, |
| 368 | "REPLACE INTO unversioned(name, rcvid, mtime, hash, sz, content)" |
| 369 | " VALUES(:name,:rcvid,:mtime,:hash,:sz,:content)" |
| 370 | ); |
| 371 | } |
| 372 | db_bind_text(&q, ":name", blob_str(&pXfer->aToken[1])); |
| 373 | db_bind_int(&q, ":rcvid", g.rcvid); |
| 374 | db_bind_int64(&q, ":mtime", mtime); |
| 375 | db_bind_text(&q, ":hash", blob_str(pHash)); |
| 376 | db_bind_int(&q, ":sz", blob_size(&content)); |
| 377 | if( !nullContent ){ |
| 378 | blob_compress(&content, &content); |
| 379 | db_bind_blob(&q, ":content", &content); |
| 380 | } |
| 381 | db_step(&q); |
| 382 | db_finalize(&q); |
| 383 | db_unset("uv-hash", 0); |
| 384 | |
| 385 | end_accept_unversioned_file: |
| 386 | blob_reset(&content); |
| 387 | blob_reset(&hash); |
| 388 | } |
| 389 | |
| 390 | /* |
| @@ -654,11 +666,11 @@ | |
| 654 | if( db_step(&q1)==SQLITE_ROW ){ |
| 655 | sqlite3_int64 mtime = db_column_int64(&q1, 0); |
| 656 | const char *zHash = db_column_text(&q1, 1); |
| 657 | blob_appendf(pXfer->pOut, "uvfile %s %lld", zName, mtime); |
| 658 | if( zHash==0 ){ |
| 659 | blob_append(pXfer->pOut, " 0 0 1\n", -1); |
| 660 | }else if( noContent ){ |
| 661 | blob_appendf(pXfer->pOut, " %s %d 4\n", zHash, db_column_int(&q1,3)); |
| 662 | }else{ |
| 663 | Blob content; |
| 664 | blob_init(&content, 0, 0); |
| @@ -1706,11 +1718,11 @@ | |
| 1706 | /* When syncing unversioned files, create a TEMP table in which to store |
| 1707 | ** the names of files that do not need to be sent from client to server. |
| 1708 | */ |
| 1709 | if( syncFlags & SYNC_UNVERSIONED ){ |
| 1710 | db_multi_exec( |
| 1711 | "CREATE TEMP TABLE uv_toSend(" |
| 1712 | " name TEXT PRIMARY KEY," |
| 1713 | " mtimeOnly BOOLEAN" |
| 1714 | ") WITHOUT ROWID;" |
| 1715 | "INSERT INTO uv_toSend(name,mtimeOnly)" |
| 1716 | " SELECT name, 0 FROM unversioned WHERE hash IS NOT NULL;" |
| @@ -1841,10 +1853,11 @@ | |
| 1841 | assert( uvStatus==2 ); |
| 1842 | db_prepare(&uvq, "SELECT name, mtimeOnly FROM uv_tosend"); |
| 1843 | while( db_step(&uvq)==SQLITE_ROW ){ |
| 1844 | send_unversioned_file(&xfer, db_column_text(&uvq,0), db_column_int(&uvq,1)); |
| 1845 | nCardSent++; |
| 1846 | } |
| 1847 | db_finalize(&uvq); |
| 1848 | uvDoPush = 0; |
| 1849 | } |
| 1850 | |
| @@ -2055,10 +2068,12 @@ | |
| 2055 | } |
| 2056 | if( iStatus<=3 ){ |
| 2057 | db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName); |
| 2058 | }else if( iStatus==4 ){ |
| 2059 | db_multi_exec("UPDATE uv_tosend SET mtimeOnly=1 WHERE name=%Q", zName); |
| 2060 | } |
| 2061 | }else |
| 2062 | |
| 2063 | /* push SERVERCODE PRODUCTCODE |
| 2064 | ** |
| 2065 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -311,10 +311,11 @@ | |
| 311 | Blob *pHash; /* The HASH value */ |
| 312 | int sz; /* The SIZE */ |
| 313 | int flags; /* The FLAGS */ |
| 314 | Blob content; /* The CONTENT */ |
| 315 | Blob hash; /* Hash computed from CONTENT to compare with HASH */ |
| 316 | Blob x; /* Compressed content */ |
| 317 | Stmt q; /* SQL statements for comparison and insert */ |
| 318 | int isDelete; /* HASH is "-" indicating this is a delete operation */ |
| 319 | int nullContent; /* True of CONTENT is NULL */ |
| 320 | int iStatus; /* Result from unversioned_status() */ |
| 321 | |
| @@ -329,10 +330,11 @@ | |
| 330 | blob_appendf(&pXfer->err, "malformed uvfile line"); |
| 331 | return; |
| 332 | } |
| 333 | blob_init(&content, 0, 0); |
| 334 | blob_init(&hash, 0, 0); |
| 335 | blob_init(&x, 0, 0); |
| 336 | if( sz>0 && (flags & 0x0005)==0 ){ |
| 337 | blob_extract(pXfer->pIn, sz, &content); |
| 338 | nullContent = 0; |
| 339 | sha1sum_blob(&content, &hash); |
| 340 | if( blob_compare(&hash, pHash)!=0 ){ |
| @@ -356,35 +358,45 @@ | |
| 358 | /* Store the content */ |
| 359 | isDelete = blob_eq(pHash, "-"); |
| 360 | if( isDelete ){ |
| 361 | db_prepare(&q, |
| 362 | "UPDATE unversioned" |
| 363 | " SET rcvid=:rcvid, mtime=:mtime, hash=NULL, sz=0, encoding=0, content=NULL" |
| 364 | " WHERE name=:name" |
| 365 | ); |
| 366 | db_bind_int(&q, ":rcvid", g.rcvid); |
| 367 | }else if( iStatus==4 ){ |
| 368 | db_prepare(&q, "UPDATE unversioned SET mtime=:mtime WHERE name=:name"); |
| 369 | }else{ |
| 370 | db_prepare(&q, |
| 371 | "REPLACE INTO unversioned(name, rcvid, mtime, hash, sz, encoding, content)" |
| 372 | " VALUES(:name,:rcvid,:mtime,:hash,:sz,:encoding,:content)" |
| 373 | ); |
| 374 | db_bind_int(&q, ":rcvid", g.rcvid); |
| 375 | db_bind_text(&q, ":hash", blob_str(pHash)); |
| 376 | db_bind_int(&q, ":sz", blob_size(&content)); |
| 377 | if( !nullContent ){ |
| 378 | blob_compress(&content, &x); |
| 379 | if( blob_size(&x) < 0.8*blob_size(&content) ){ |
| 380 | db_bind_blob(&q, ":content", &x); |
| 381 | db_bind_int(&q, ":encoding", 1); |
| 382 | }else{ |
| 383 | db_bind_blob(&q, ":content", &content); |
| 384 | db_bind_int(&q, ":encoding", 0); |
| 385 | } |
| 386 | }else{ |
| 387 | db_bind_int(&q, ":encoding", 0); |
| 388 | } |
| 389 | } |
| 390 | db_bind_text(&q, ":name", blob_str(&pXfer->aToken[1])); |
| 391 | db_bind_int64(&q, ":mtime", mtime); |
| 392 | db_step(&q); |
| 393 | db_finalize(&q); |
| 394 | db_unset("uv-hash", 0); |
| 395 | |
| 396 | end_accept_unversioned_file: |
| 397 | blob_reset(&x); |
| 398 | blob_reset(&content); |
| 399 | blob_reset(&hash); |
| 400 | } |
| 401 | |
| 402 | /* |
| @@ -654,11 +666,11 @@ | |
| 666 | if( db_step(&q1)==SQLITE_ROW ){ |
| 667 | sqlite3_int64 mtime = db_column_int64(&q1, 0); |
| 668 | const char *zHash = db_column_text(&q1, 1); |
| 669 | blob_appendf(pXfer->pOut, "uvfile %s %lld", zName, mtime); |
| 670 | if( zHash==0 ){ |
| 671 | blob_append(pXfer->pOut, " - 0 1\n", -1); |
| 672 | }else if( noContent ){ |
| 673 | blob_appendf(pXfer->pOut, " %s %d 4\n", zHash, db_column_int(&q1,3)); |
| 674 | }else{ |
| 675 | Blob content; |
| 676 | blob_init(&content, 0, 0); |
| @@ -1706,11 +1718,11 @@ | |
| 1718 | /* When syncing unversioned files, create a TEMP table in which to store |
| 1719 | ** the names of files that do not need to be sent from client to server. |
| 1720 | */ |
| 1721 | if( syncFlags & SYNC_UNVERSIONED ){ |
| 1722 | db_multi_exec( |
| 1723 | "CREATE TEMP TABLE uv_tosend(" |
| 1724 | " name TEXT PRIMARY KEY," |
| 1725 | " mtimeOnly BOOLEAN" |
| 1726 | ") WITHOUT ROWID;" |
| 1727 | "INSERT INTO uv_toSend(name,mtimeOnly)" |
| 1728 | " SELECT name, 0 FROM unversioned WHERE hash IS NOT NULL;" |
| @@ -1841,10 +1853,11 @@ | |
| 1853 | assert( uvStatus==2 ); |
| 1854 | db_prepare(&uvq, "SELECT name, mtimeOnly FROM uv_tosend"); |
| 1855 | while( db_step(&uvq)==SQLITE_ROW ){ |
| 1856 | send_unversioned_file(&xfer, db_column_text(&uvq,0), db_column_int(&uvq,1)); |
| 1857 | nCardSent++; |
| 1858 | nArtifactSent++; |
| 1859 | } |
| 1860 | db_finalize(&uvq); |
| 1861 | uvDoPush = 0; |
| 1862 | } |
| 1863 | |
| @@ -2055,10 +2068,12 @@ | |
| 2068 | } |
| 2069 | if( iStatus<=3 ){ |
| 2070 | db_multi_exec("DELETE FROM uv_tosend WHERE name=%Q", zName); |
| 2071 | }else if( iStatus==4 ){ |
| 2072 | db_multi_exec("UPDATE uv_tosend SET mtimeOnly=1 WHERE name=%Q", zName); |
| 2073 | }else if( iStatus==5 ){ |
| 2074 | db_multi_exec("REPLACE INTO uv_tosend(name,mtimeOnly) VALUES(%Q,0)", zName); |
| 2075 | } |
| 2076 | }else |
| 2077 | |
| 2078 | /* push SERVERCODE PRODUCTCODE |
| 2079 | ** |
| 2080 |