Fossil SCM

Avoid references to private check-ins in Q-cards of public check-in manifests. This ensures consistent behavior regarding leakage of private check-in hashes, possibly generating "phantoms" on peer repositories, for P- and Q-cards. Depending on the final strategy to minimize leakage and sync traffic overhead of "phantoms", this commit may eventually be reverted.

florian 2020-04-22 11:52 private-branches
Commit 767b175d906b9aef35a4aad16bcead732f6db23df0d5e96a99e910c5242f0b0c
1 file changed +2 -3
+2 -3
--- src/checkin.c
+++ src/checkin.c
@@ -1641,13 +1641,12 @@
16411641
" WHERE (vmerge.id=-1 OR vmerge.id=-2)"
16421642
" ORDER BY 1");
16431643
while( db_step(&q)==SQLITE_ROW ){
16441644
const char *zCherrypickUuid = db_column_text(&q, 0);
16451645
int mid = db_column_int(&q, 1);
1646
- if( mid != vid ){
1647
- blob_appendf(pOut, "Q %s\n", zCherrypickUuid);
1648
- }
1646
+ if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ) continue;
1647
+ blob_appendf(pOut, "Q %s\n", zCherrypickUuid);
16491648
}
16501649
db_finalize(&q);
16511650
16521651
if( p->pCksum ) blob_appendf(pOut, "R %b\n", p->pCksum);
16531652
zColor = p->zColor;
16541653
--- src/checkin.c
+++ src/checkin.c
@@ -1641,13 +1641,12 @@
1641 " WHERE (vmerge.id=-1 OR vmerge.id=-2)"
1642 " ORDER BY 1");
1643 while( db_step(&q)==SQLITE_ROW ){
1644 const char *zCherrypickUuid = db_column_text(&q, 0);
1645 int mid = db_column_int(&q, 1);
1646 if( mid != vid ){
1647 blob_appendf(pOut, "Q %s\n", zCherrypickUuid);
1648 }
1649 }
1650 db_finalize(&q);
1651
1652 if( p->pCksum ) blob_appendf(pOut, "R %b\n", p->pCksum);
1653 zColor = p->zColor;
1654
--- src/checkin.c
+++ src/checkin.c
@@ -1641,13 +1641,12 @@
1641 " WHERE (vmerge.id=-1 OR vmerge.id=-2)"
1642 " ORDER BY 1");
1643 while( db_step(&q)==SQLITE_ROW ){
1644 const char *zCherrypickUuid = db_column_text(&q, 0);
1645 int mid = db_column_int(&q, 1);
1646 if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ) continue;
1647 blob_appendf(pOut, "Q %s\n", zCherrypickUuid);
 
1648 }
1649 db_finalize(&q);
1650
1651 if( p->pCksum ) blob_appendf(pOut, "R %b\n", p->pCksum);
1652 zColor = p->zColor;
1653

Keyboard Shortcuts

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