Fossil SCM
Remove superfluous comments.
Commit
08132dd572817055c14f906b8220dbae6c68bc85db50fc1bc06d51cd6b30c1f7
Parent
7124a42cff1e7b7…
3 files changed
-2
+2
-7
+2
-7
-2
| --- src/blob.c | ||
| +++ src/blob.c | ||
| @@ -1335,12 +1335,10 @@ | ||
| 1335 | 1335 | nWrote = fossil_utf8_to_console(blob_buffer(pBlob), blob_size(pBlob), 0); |
| 1336 | 1336 | if( nWrote>=0 ) return nWrote; |
| 1337 | 1337 | fflush(stdout); |
| 1338 | 1338 | _setmode(_fileno(stdout), _O_BINARY); |
| 1339 | 1339 | #endif |
| 1340 | - /* A blob of no bytes can have no buffer, and fwrite() is not to be | |
| 1341 | - ** given a null pointer. */ | |
| 1342 | 1340 | nWrote = blob_size(pBlob)>0 |
| 1343 | 1341 | ? fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), stdout) : 0; |
| 1344 | 1342 | #if defined(_WIN32) |
| 1345 | 1343 | fflush(stdout); |
| 1346 | 1344 | _setmode(_fileno(stdout), _O_TEXT); |
| 1347 | 1345 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -1335,12 +1335,10 @@ | |
| 1335 | nWrote = fossil_utf8_to_console(blob_buffer(pBlob), blob_size(pBlob), 0); |
| 1336 | if( nWrote>=0 ) return nWrote; |
| 1337 | fflush(stdout); |
| 1338 | _setmode(_fileno(stdout), _O_BINARY); |
| 1339 | #endif |
| 1340 | /* A blob of no bytes can have no buffer, and fwrite() is not to be |
| 1341 | ** given a null pointer. */ |
| 1342 | nWrote = blob_size(pBlob)>0 |
| 1343 | ? fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), stdout) : 0; |
| 1344 | #if defined(_WIN32) |
| 1345 | fflush(stdout); |
| 1346 | _setmode(_fileno(stdout), _O_TEXT); |
| 1347 |
| --- src/blob.c | |
| +++ src/blob.c | |
| @@ -1335,12 +1335,10 @@ | |
| 1335 | nWrote = fossil_utf8_to_console(blob_buffer(pBlob), blob_size(pBlob), 0); |
| 1336 | if( nWrote>=0 ) return nWrote; |
| 1337 | fflush(stdout); |
| 1338 | _setmode(_fileno(stdout), _O_BINARY); |
| 1339 | #endif |
| 1340 | nWrote = blob_size(pBlob)>0 |
| 1341 | ? fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), stdout) : 0; |
| 1342 | #if defined(_WIN32) |
| 1343 | fflush(stdout); |
| 1344 | _setmode(_fileno(stdout), _O_TEXT); |
| 1345 |
+2
-7
| --- src/purge.c | ||
| +++ src/purge.c | ||
| @@ -431,12 +431,11 @@ | ||
| 431 | 431 | orid = db_column_int(&q, 4); |
| 432 | 432 | if( orid>0 |
| 433 | 433 | && !db_exists("SELECT 1 FROM blob WHERE rid=%d OR uuid=%Q", |
| 434 | 434 | orid, blob_str(&h1)) |
| 435 | 435 | ){ |
| 436 | - /* Store the artifact under its original record number, so that the | |
| 437 | - ** links that other artifacts still hold to it are whole again. */ | |
| 436 | + /* Restore it under its old record number, which links still name */ | |
| 438 | 437 | db_multi_exec( |
| 439 | 438 | "INSERT INTO blob(rid,rcvid,size,uuid,content)" |
| 440 | 439 | " VALUES(%d,0,-1,%Q,NULL);" |
| 441 | 440 | "INSERT INTO phantom VALUES(%d);", |
| 442 | 441 | orid, blob_str(&h1), orid |
| @@ -605,12 +604,10 @@ | ||
| 605 | 604 | int vid; |
| 606 | 605 | if( find_option("explain",0,0)!=0 || find_option("dry-run",0,0)!=0 ){ |
| 607 | 606 | purgeFlags |= PURGE_EXPLAIN_ONLY; |
| 608 | 607 | } |
| 609 | 608 | verify_all_options(); |
| 610 | - /* Find the current check-out, if there is one in this directory for | |
| 611 | - ** this repository, even when the repository was named with -R. */ | |
| 612 | 609 | vid = 0; |
| 613 | 610 | if( g.localOpen ){ |
| 614 | 611 | vid = db_lget_int("checkout",0); |
| 615 | 612 | }else if( db_open_local(0) |
| 616 | 613 | && db_exists("SELECT 1 WHERE inode(%Q)=inode(%Q)", |
| @@ -714,13 +711,11 @@ | ||
| 714 | 711 | " WHERE uuid IN (SELECT uuid FROM purgeitem WHERE peid=%d);", |
| 715 | 712 | peid |
| 716 | 713 | ); |
| 717 | 714 | manifest_crosslink_begin(); |
| 718 | 715 | purge_item_resurrect(0, 0); |
| 719 | - /* The purge removed the links that kept check-ins held to a purged | |
| 720 | - ** parent. Link those check-ins again from their manifests, now that | |
| 721 | - ** the parent is back under its original record number. */ | |
| 716 | + /* Relink check-ins whose purged parent is now restored */ | |
| 722 | 717 | db_multi_exec( |
| 723 | 718 | "CREATE TEMP TABLE prelink AS" |
| 724 | 719 | " SELECT DISTINCT mid FROM mlink" |
| 725 | 720 | " WHERE pmid IN (SELECT blob.rid FROM blob, purgeitem" |
| 726 | 721 | " WHERE purgeitem.peid=%d" |
| 727 | 722 |
| --- src/purge.c | |
| +++ src/purge.c | |
| @@ -431,12 +431,11 @@ | |
| 431 | orid = db_column_int(&q, 4); |
| 432 | if( orid>0 |
| 433 | && !db_exists("SELECT 1 FROM blob WHERE rid=%d OR uuid=%Q", |
| 434 | orid, blob_str(&h1)) |
| 435 | ){ |
| 436 | /* Store the artifact under its original record number, so that the |
| 437 | ** links that other artifacts still hold to it are whole again. */ |
| 438 | db_multi_exec( |
| 439 | "INSERT INTO blob(rid,rcvid,size,uuid,content)" |
| 440 | " VALUES(%d,0,-1,%Q,NULL);" |
| 441 | "INSERT INTO phantom VALUES(%d);", |
| 442 | orid, blob_str(&h1), orid |
| @@ -605,12 +604,10 @@ | |
| 605 | int vid; |
| 606 | if( find_option("explain",0,0)!=0 || find_option("dry-run",0,0)!=0 ){ |
| 607 | purgeFlags |= PURGE_EXPLAIN_ONLY; |
| 608 | } |
| 609 | verify_all_options(); |
| 610 | /* Find the current check-out, if there is one in this directory for |
| 611 | ** this repository, even when the repository was named with -R. */ |
| 612 | vid = 0; |
| 613 | if( g.localOpen ){ |
| 614 | vid = db_lget_int("checkout",0); |
| 615 | }else if( db_open_local(0) |
| 616 | && db_exists("SELECT 1 WHERE inode(%Q)=inode(%Q)", |
| @@ -714,13 +711,11 @@ | |
| 714 | " WHERE uuid IN (SELECT uuid FROM purgeitem WHERE peid=%d);", |
| 715 | peid |
| 716 | ); |
| 717 | manifest_crosslink_begin(); |
| 718 | purge_item_resurrect(0, 0); |
| 719 | /* The purge removed the links that kept check-ins held to a purged |
| 720 | ** parent. Link those check-ins again from their manifests, now that |
| 721 | ** the parent is back under its original record number. */ |
| 722 | db_multi_exec( |
| 723 | "CREATE TEMP TABLE prelink AS" |
| 724 | " SELECT DISTINCT mid FROM mlink" |
| 725 | " WHERE pmid IN (SELECT blob.rid FROM blob, purgeitem" |
| 726 | " WHERE purgeitem.peid=%d" |
| 727 |
| --- src/purge.c | |
| +++ src/purge.c | |
| @@ -431,12 +431,11 @@ | |
| 431 | orid = db_column_int(&q, 4); |
| 432 | if( orid>0 |
| 433 | && !db_exists("SELECT 1 FROM blob WHERE rid=%d OR uuid=%Q", |
| 434 | orid, blob_str(&h1)) |
| 435 | ){ |
| 436 | /* Restore it under its old record number, which links still name */ |
| 437 | db_multi_exec( |
| 438 | "INSERT INTO blob(rid,rcvid,size,uuid,content)" |
| 439 | " VALUES(%d,0,-1,%Q,NULL);" |
| 440 | "INSERT INTO phantom VALUES(%d);", |
| 441 | orid, blob_str(&h1), orid |
| @@ -605,12 +604,10 @@ | |
| 604 | int vid; |
| 605 | if( find_option("explain",0,0)!=0 || find_option("dry-run",0,0)!=0 ){ |
| 606 | purgeFlags |= PURGE_EXPLAIN_ONLY; |
| 607 | } |
| 608 | verify_all_options(); |
| 609 | vid = 0; |
| 610 | if( g.localOpen ){ |
| 611 | vid = db_lget_int("checkout",0); |
| 612 | }else if( db_open_local(0) |
| 613 | && db_exists("SELECT 1 WHERE inode(%Q)=inode(%Q)", |
| @@ -714,13 +711,11 @@ | |
| 711 | " WHERE uuid IN (SELECT uuid FROM purgeitem WHERE peid=%d);", |
| 712 | peid |
| 713 | ); |
| 714 | manifest_crosslink_begin(); |
| 715 | purge_item_resurrect(0, 0); |
| 716 | /* Relink check-ins whose purged parent is now restored */ |
| 717 | db_multi_exec( |
| 718 | "CREATE TEMP TABLE prelink AS" |
| 719 | " SELECT DISTINCT mid FROM mlink" |
| 720 | " WHERE pmid IN (SELECT blob.rid FROM blob, purgeitem" |
| 721 | " WHERE purgeitem.peid=%d" |
| 722 |
+2
-7
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -253,12 +253,11 @@ | ||
| 253 | 253 | ** If any error occurs, write a message into pErr which has already |
| 254 | 254 | ** be initialized to an empty string. |
| 255 | 255 | ** |
| 256 | 256 | ** Unless cloneFlag is set, the content must have the size USIZE and |
| 257 | 257 | ** give the HASH, or it is refused. The hash of a delta is checked only |
| 258 | -** if DELTASRC is at hand. A clone is not checked here, as it is not in | |
| 259 | -** xfer_accept_file(). | |
| 258 | +** if DELTASRC is at hand. A clone is not checked here. | |
| 260 | 259 | ** |
| 261 | 260 | ** Any artifact successfully received by this routine is considered to |
| 262 | 261 | ** be public and is therefore removed from the "private" table. |
| 263 | 262 | */ |
| 264 | 263 | static void xfer_accept_compressed_file( |
| @@ -303,12 +302,10 @@ | ||
| 303 | 302 | return; |
| 304 | 303 | } |
| 305 | 304 | if( szU==0 |
| 306 | 305 | && (blob_size(&content)<=4 || blob_uncompress(&content, &content)) |
| 307 | 306 | ){ |
| 308 | - /* content_put_ex() takes a size of zero to mean that the content is | |
| 309 | - ** not compressed, so content of no bytes is handed over uncompressed. */ | |
| 310 | 307 | blob_appendf(&pXfer->err, "malformed cfile content"); |
| 311 | 308 | blob_reset(&content); |
| 312 | 309 | return; |
| 313 | 310 | } |
| 314 | 311 | if( pXfer->nToken==5 ){ |
| @@ -3093,13 +3090,11 @@ | ||
| 3093 | 3090 | } |
| 3094 | 3091 | nUncRcvd += blob_size(&recv); |
| 3095 | 3092 | blob_reset(&recv); |
| 3096 | 3093 | nCycle++; |
| 3097 | 3094 | |
| 3098 | - /* A file that the server has never held is in no uvigot card, so the | |
| 3099 | - ** warning above is not given for it. Give it if anything is still | |
| 3100 | - ** queued to send to a server that takes no unversioned content. */ | |
| 3095 | + /* Also warn for files that no uvigot card named */ | |
| 3101 | 3096 | if( uvPullOnly==1 && (syncFlags & SYNC_UV_REVERT)==0 |
| 3102 | 3097 | && db_exists("SELECT 1 FROM uv_tosend") |
| 3103 | 3098 | ){ |
| 3104 | 3099 | uv_pull_only_warning(); |
| 3105 | 3100 | uvPullOnly = 2; |
| 3106 | 3101 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -253,12 +253,11 @@ | |
| 253 | ** If any error occurs, write a message into pErr which has already |
| 254 | ** be initialized to an empty string. |
| 255 | ** |
| 256 | ** Unless cloneFlag is set, the content must have the size USIZE and |
| 257 | ** give the HASH, or it is refused. The hash of a delta is checked only |
| 258 | ** if DELTASRC is at hand. A clone is not checked here, as it is not in |
| 259 | ** xfer_accept_file(). |
| 260 | ** |
| 261 | ** Any artifact successfully received by this routine is considered to |
| 262 | ** be public and is therefore removed from the "private" table. |
| 263 | */ |
| 264 | static void xfer_accept_compressed_file( |
| @@ -303,12 +302,10 @@ | |
| 303 | return; |
| 304 | } |
| 305 | if( szU==0 |
| 306 | && (blob_size(&content)<=4 || blob_uncompress(&content, &content)) |
| 307 | ){ |
| 308 | /* content_put_ex() takes a size of zero to mean that the content is |
| 309 | ** not compressed, so content of no bytes is handed over uncompressed. */ |
| 310 | blob_appendf(&pXfer->err, "malformed cfile content"); |
| 311 | blob_reset(&content); |
| 312 | return; |
| 313 | } |
| 314 | if( pXfer->nToken==5 ){ |
| @@ -3093,13 +3090,11 @@ | |
| 3093 | } |
| 3094 | nUncRcvd += blob_size(&recv); |
| 3095 | blob_reset(&recv); |
| 3096 | nCycle++; |
| 3097 | |
| 3098 | /* A file that the server has never held is in no uvigot card, so the |
| 3099 | ** warning above is not given for it. Give it if anything is still |
| 3100 | ** queued to send to a server that takes no unversioned content. */ |
| 3101 | if( uvPullOnly==1 && (syncFlags & SYNC_UV_REVERT)==0 |
| 3102 | && db_exists("SELECT 1 FROM uv_tosend") |
| 3103 | ){ |
| 3104 | uv_pull_only_warning(); |
| 3105 | uvPullOnly = 2; |
| 3106 |
| --- src/xfer.c | |
| +++ src/xfer.c | |
| @@ -253,12 +253,11 @@ | |
| 253 | ** If any error occurs, write a message into pErr which has already |
| 254 | ** be initialized to an empty string. |
| 255 | ** |
| 256 | ** Unless cloneFlag is set, the content must have the size USIZE and |
| 257 | ** give the HASH, or it is refused. The hash of a delta is checked only |
| 258 | ** if DELTASRC is at hand. A clone is not checked here. |
| 259 | ** |
| 260 | ** Any artifact successfully received by this routine is considered to |
| 261 | ** be public and is therefore removed from the "private" table. |
| 262 | */ |
| 263 | static void xfer_accept_compressed_file( |
| @@ -303,12 +302,10 @@ | |
| 302 | return; |
| 303 | } |
| 304 | if( szU==0 |
| 305 | && (blob_size(&content)<=4 || blob_uncompress(&content, &content)) |
| 306 | ){ |
| 307 | blob_appendf(&pXfer->err, "malformed cfile content"); |
| 308 | blob_reset(&content); |
| 309 | return; |
| 310 | } |
| 311 | if( pXfer->nToken==5 ){ |
| @@ -3093,13 +3090,11 @@ | |
| 3090 | } |
| 3091 | nUncRcvd += blob_size(&recv); |
| 3092 | blob_reset(&recv); |
| 3093 | nCycle++; |
| 3094 | |
| 3095 | /* Also warn for files that no uvigot card named */ |
| 3096 | if( uvPullOnly==1 && (syncFlags & SYNC_UV_REVERT)==0 |
| 3097 | && db_exists("SELECT 1 FROM uv_tosend") |
| 3098 | ){ |
| 3099 | uv_pull_only_warning(); |
| 3100 | uvPullOnly = 2; |
| 3101 |