Fossil SCM
Update commit [8268c5dafb] to allow the --integrate flag when merging private branches, but postpone the closing leaves of private branches.
Commit
6b6c09c5bff8444590558b44a88968a64c189590994150207425432be008e764
Parent
c435144c700b00e…
2 files changed
+6
-6
-7
+6
-6
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -1673,19 +1673,19 @@ | ||
| 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 | 1678 | /* Make sure the check-in manifest of the resulting merge child does not |
| 1680 | 1679 | ** include a +close tag referring to the leaf check-in on a private |
| 1681 | 1680 | ** 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); | |
| 1681 | + ** repository clones without that private branch. Instead, the leaf of | |
| 1682 | + ** the private branch will be closed later by a separate private control | |
| 1683 | + ** artifact. */ | |
| 1684 | + if( !content_is_private(rid) ){ | |
| 1685 | + blob_appendf(pOut, "T +closed %s\n", zIntegrateUuid); | |
| 1686 | + } | |
| 1687 | 1687 | } |
| 1688 | 1688 | } |
| 1689 | 1689 | db_finalize(&q); |
| 1690 | 1690 | |
| 1691 | 1691 | if( p->azTag ){ |
| 1692 | 1692 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1673,19 +1673,19 @@ | |
| 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 | if( p->azTag ){ |
| 1692 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -1673,19 +1673,19 @@ | |
| 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 | /* Make sure the check-in manifest of the resulting merge child does not |
| 1679 | ** include a +close tag referring to the leaf check-in on a private |
| 1680 | ** branch, so as not to generate a missing artifact reference on |
| 1681 | ** repository clones without that private branch. Instead, the leaf of |
| 1682 | ** the private branch will be closed later by a separate private control |
| 1683 | ** artifact. */ |
| 1684 | if( !content_is_private(rid) ){ |
| 1685 | blob_appendf(pOut, "T +closed %s\n", zIntegrateUuid); |
| 1686 | } |
| 1687 | } |
| 1688 | } |
| 1689 | db_finalize(&q); |
| 1690 | |
| 1691 | if( p->azTag ){ |
| 1692 |
-7
| --- src/merge.c | ||
| +++ src/merge.c | ||
| @@ -404,17 +404,10 @@ | ||
| 404 | 404 | " Use --force to override.\n"); |
| 405 | 405 | return; |
| 406 | 406 | } |
| 407 | 407 | if( integrateFlag && !is_a_leaf(mid)){ |
| 408 | 408 | fossil_warning("ignoring --integrate: %s is not a leaf", g.argv[2]); |
| 409 | - integrateFlag = 0; | |
| 410 | - } | |
| 411 | - if( integrateFlag && content_is_private(mid) ){ | |
| 412 | - fossil_warning( | |
| 413 | - "ignoring --integrate: %s is on a private branch" | |
| 414 | - "\n Use \"fossil amend --close\" (after commit) to close the leaf.", | |
| 415 | - g.argv[2]); | |
| 416 | 409 | integrateFlag = 0; |
| 417 | 410 | } |
| 418 | 411 | if( verboseFlag ){ |
| 419 | 412 | print_checkin_description(mid, 12, |
| 420 | 413 | integrateFlag ? "integrate:" : "merge-from:"); |
| 421 | 414 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -404,17 +404,10 @@ | |
| 404 | " Use --force to override.\n"); |
| 405 | return; |
| 406 | } |
| 407 | if( integrateFlag && !is_a_leaf(mid)){ |
| 408 | fossil_warning("ignoring --integrate: %s is not a leaf", g.argv[2]); |
| 409 | integrateFlag = 0; |
| 410 | } |
| 411 | if( integrateFlag && content_is_private(mid) ){ |
| 412 | fossil_warning( |
| 413 | "ignoring --integrate: %s is on a private branch" |
| 414 | "\n Use \"fossil amend --close\" (after commit) to close the leaf.", |
| 415 | g.argv[2]); |
| 416 | integrateFlag = 0; |
| 417 | } |
| 418 | if( verboseFlag ){ |
| 419 | print_checkin_description(mid, 12, |
| 420 | integrateFlag ? "integrate:" : "merge-from:"); |
| 421 |
| --- src/merge.c | |
| +++ src/merge.c | |
| @@ -404,17 +404,10 @@ | |
| 404 | " Use --force to override.\n"); |
| 405 | return; |
| 406 | } |
| 407 | if( integrateFlag && !is_a_leaf(mid)){ |
| 408 | fossil_warning("ignoring --integrate: %s is not a leaf", g.argv[2]); |
| 409 | integrateFlag = 0; |
| 410 | } |
| 411 | if( verboseFlag ){ |
| 412 | print_checkin_description(mid, 12, |
| 413 | integrateFlag ? "integrate:" : "merge-from:"); |
| 414 |