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.
Commit
8268c5dafba8acdf6ca7a24fbd49a9463383dbfcee1e48e3f0216c28d4cb34ec
Parent
70849e76417e2e2…
2 files changed
+8
+7
+8
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -1673,10 +1673,18 @@ | ||
| 1673 | 1673 | while( db_step(&q)==SQLITE_ROW ){ |
| 1674 | 1674 | const char *zIntegrateUuid = db_column_text(&q, 0); |
| 1675 | 1675 | int rid = db_column_int(&q, 1); |
| 1676 | 1676 | if( is_a_leaf(rid) && !db_exists("SELECT 1 FROM tagxref " |
| 1677 | 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 | |
| 1678 | 1686 | blob_appendf(pOut, "T +closed %s\n", zIntegrateUuid); |
| 1679 | 1687 | } |
| 1680 | 1688 | } |
| 1681 | 1689 | db_finalize(&q); |
| 1682 | 1690 | |
| 1683 | 1691 |
| --- 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 |
+7
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -389,10 +389,17 @@ | ||
| 389 | 389 | return; |
| 390 | 390 | } |
| 391 | 391 | if( integrateFlag && !is_a_leaf(mid)){ |
| 392 | 392 | fossil_warning("ignoring --integrate: %s is not a leaf", g.argv[2]); |
| 393 | 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; | |
| 394 | 401 | } |
| 395 | 402 | if( verboseFlag ){ |
| 396 | 403 | print_checkin_description(mid, 12, |
| 397 | 404 | integrateFlag ? "integrate:" : "merge-from:"); |
| 398 | 405 | print_checkin_description(pid, 12, "baseline:"); |
| 399 | 406 |
| --- 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 |