Fossil SCM

Make sure the check-in manifest of a merge child does not include a +close tag referring to the leaf check-in on a private branch, so as not to generate a missing artifact reference on repository clones without that private branch.

florian 2019-09-04 08:46 private-branches
Commit 8268c5dafba8acdf6ca7a24fbd49a9463383dbfcee1e48e3f0216c28d4cb34ec
--- src/checkin.c
+++ src/checkin.c
@@ -1673,10 +1673,18 @@
16731673
while( db_step(&q)==SQLITE_ROW ){
16741674
const char *zIntegrateUuid = db_column_text(&q, 0);
16751675
int rid = db_column_int(&q, 1);
16761676
if( is_a_leaf(rid) && !db_exists("SELECT 1 FROM tagxref "
16771677
" WHERE tagid=%d AND rid=%d AND tagtype>0", TAG_CLOSED, rid)){
1678
+#if 0
1679
+ /* Make sure the check-in manifest of the resulting merge child does not
1680
+ ** include a +close tag referring to the leaf check-in on a private
1681
+ ** branch, so as not to generate a missing artifact reference on
1682
+ ** repository clones without that private branch. The merge command
1683
+ ** should have dropped the --integrate option, at this point. */
1684
+ assert( !content_is_private(rid) );
1685
+#endif
16781686
blob_appendf(pOut, "T +closed %s\n", zIntegrateUuid);
16791687
}
16801688
}
16811689
db_finalize(&q);
16821690
16831691
--- src/checkin.c
+++ src/checkin.c
@@ -1673,10 +1673,18 @@
1673 while( db_step(&q)==SQLITE_ROW ){
1674 const char *zIntegrateUuid = db_column_text(&q, 0);
1675 int rid = db_column_int(&q, 1);
1676 if( is_a_leaf(rid) && !db_exists("SELECT 1 FROM tagxref "
1677 " WHERE tagid=%d AND rid=%d AND tagtype>0", TAG_CLOSED, rid)){
 
 
 
 
 
 
 
 
1678 blob_appendf(pOut, "T +closed %s\n", zIntegrateUuid);
1679 }
1680 }
1681 db_finalize(&q);
1682
1683
--- src/checkin.c
+++ src/checkin.c
@@ -1673,10 +1673,18 @@
1673 while( db_step(&q)==SQLITE_ROW ){
1674 const char *zIntegrateUuid = db_column_text(&q, 0);
1675 int rid = db_column_int(&q, 1);
1676 if( is_a_leaf(rid) && !db_exists("SELECT 1 FROM tagxref "
1677 " WHERE tagid=%d AND rid=%d AND tagtype>0", TAG_CLOSED, rid)){
1678 #if 0
1679 /* Make sure the check-in manifest of the resulting merge child does not
1680 ** include a +close tag referring to the leaf check-in on a private
1681 ** branch, so as not to generate a missing artifact reference on
1682 ** repository clones without that private branch. The merge command
1683 ** should have dropped the --integrate option, at this point. */
1684 assert( !content_is_private(rid) );
1685 #endif
1686 blob_appendf(pOut, "T +closed %s\n", zIntegrateUuid);
1687 }
1688 }
1689 db_finalize(&q);
1690
1691
--- src/merge.c
+++ src/merge.c
@@ -389,10 +389,17 @@
389389
return;
390390
}
391391
if( integrateFlag && !is_a_leaf(mid)){
392392
fossil_warning("ignoring --integrate: %s is not a leaf", g.argv[2]);
393393
integrateFlag = 0;
394
+ }
395
+ if( integrateFlag && content_is_private(mid) ){
396
+ fossil_warning(
397
+ "ignoring --integrate: %s is on a private branch"
398
+ "\n Use \"fossil amend --close\" (after commit) to close the leaf.",
399
+ g.argv[2]);
400
+ integrateFlag = 0;
394401
}
395402
if( verboseFlag ){
396403
print_checkin_description(mid, 12,
397404
integrateFlag ? "integrate:" : "merge-from:");
398405
print_checkin_description(pid, 12, "baseline:");
399406
--- src/merge.c
+++ src/merge.c
@@ -389,10 +389,17 @@
389 return;
390 }
391 if( integrateFlag && !is_a_leaf(mid)){
392 fossil_warning("ignoring --integrate: %s is not a leaf", g.argv[2]);
393 integrateFlag = 0;
 
 
 
 
 
 
 
394 }
395 if( verboseFlag ){
396 print_checkin_description(mid, 12,
397 integrateFlag ? "integrate:" : "merge-from:");
398 print_checkin_description(pid, 12, "baseline:");
399
--- src/merge.c
+++ src/merge.c
@@ -389,10 +389,17 @@
389 return;
390 }
391 if( integrateFlag && !is_a_leaf(mid)){
392 fossil_warning("ignoring --integrate: %s is not a leaf", g.argv[2]);
393 integrateFlag = 0;
394 }
395 if( integrateFlag && content_is_private(mid) ){
396 fossil_warning(
397 "ignoring --integrate: %s is on a private branch"
398 "\n Use \"fossil amend --close\" (after commit) to close the leaf.",
399 g.argv[2]);
400 integrateFlag = 0;
401 }
402 if( verboseFlag ){
403 print_checkin_description(mid, 12,
404 integrateFlag ? "integrate:" : "merge-from:");
405 print_checkin_description(pid, 12, "baseline:");
406

Keyboard Shortcuts

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