Fossil SCM

Remove superfluous comments.

dmestas 2026-11-18 14:17 UTC small-fixes-2
Commit 08132dd572817055c14f906b8220dbae6c68bc85db50fc1bc06d51cd6b30c1f7
3 files changed -2 +2 -7 +2 -7
-2
--- src/blob.c
+++ src/blob.c
@@ -1335,12 +1335,10 @@
13351335
nWrote = fossil_utf8_to_console(blob_buffer(pBlob), blob_size(pBlob), 0);
13361336
if( nWrote>=0 ) return nWrote;
13371337
fflush(stdout);
13381338
_setmode(_fileno(stdout), _O_BINARY);
13391339
#endif
1340
- /* A blob of no bytes can have no buffer, and fwrite() is not to be
1341
- ** given a null pointer. */
13421340
nWrote = blob_size(pBlob)>0
13431341
? fwrite(blob_buffer(pBlob), 1, blob_size(pBlob), stdout) : 0;
13441342
#if defined(_WIN32)
13451343
fflush(stdout);
13461344
_setmode(_fileno(stdout), _O_TEXT);
13471345
--- 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 @@
431431
orid = db_column_int(&q, 4);
432432
if( orid>0
433433
&& !db_exists("SELECT 1 FROM blob WHERE rid=%d OR uuid=%Q",
434434
orid, blob_str(&h1))
435435
){
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 */
438437
db_multi_exec(
439438
"INSERT INTO blob(rid,rcvid,size,uuid,content)"
440439
" VALUES(%d,0,-1,%Q,NULL);"
441440
"INSERT INTO phantom VALUES(%d);",
442441
orid, blob_str(&h1), orid
@@ -605,12 +604,10 @@
605604
int vid;
606605
if( find_option("explain",0,0)!=0 || find_option("dry-run",0,0)!=0 ){
607606
purgeFlags |= PURGE_EXPLAIN_ONLY;
608607
}
609608
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. */
612609
vid = 0;
613610
if( g.localOpen ){
614611
vid = db_lget_int("checkout",0);
615612
}else if( db_open_local(0)
616613
&& db_exists("SELECT 1 WHERE inode(%Q)=inode(%Q)",
@@ -714,13 +711,11 @@
714711
" WHERE uuid IN (SELECT uuid FROM purgeitem WHERE peid=%d);",
715712
peid
716713
);
717714
manifest_crosslink_begin();
718715
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 */
722717
db_multi_exec(
723718
"CREATE TEMP TABLE prelink AS"
724719
" SELECT DISTINCT mid FROM mlink"
725720
" WHERE pmid IN (SELECT blob.rid FROM blob, purgeitem"
726721
" WHERE purgeitem.peid=%d"
727722
--- 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 @@
253253
** If any error occurs, write a message into pErr which has already
254254
** be initialized to an empty string.
255255
**
256256
** Unless cloneFlag is set, the content must have the size USIZE and
257257
** 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.
260259
**
261260
** Any artifact successfully received by this routine is considered to
262261
** be public and is therefore removed from the "private" table.
263262
*/
264263
static void xfer_accept_compressed_file(
@@ -303,12 +302,10 @@
303302
return;
304303
}
305304
if( szU==0
306305
&& (blob_size(&content)<=4 || blob_uncompress(&content, &content))
307306
){
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. */
310307
blob_appendf(&pXfer->err, "malformed cfile content");
311308
blob_reset(&content);
312309
return;
313310
}
314311
if( pXfer->nToken==5 ){
@@ -3093,13 +3090,11 @@
30933090
}
30943091
nUncRcvd += blob_size(&recv);
30953092
blob_reset(&recv);
30963093
nCycle++;
30973094
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 */
31013096
if( uvPullOnly==1 && (syncFlags & SYNC_UV_REVERT)==0
31023097
&& db_exists("SELECT 1 FROM uv_tosend")
31033098
){
31043099
uv_pull_only_warning();
31053100
uvPullOnly = 2;
31063101
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button