Fossil SCM

Update commit [8268c5dafb] to allow the --integrate flag when merging private branches, but postpone the closing leaves of private branches.

florian 2020-04-22 11:42 trunk
Commit 6b6c09c5bff8444590558b44a88968a64c189590994150207425432be008e764
2 files changed +6 -6 -7
+6 -6
--- src/checkin.c
+++ src/checkin.c
@@ -1673,19 +1673,19 @@
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
16791678
/* Make sure the check-in manifest of the resulting merge child does not
16801679
** include a +close tag referring to the leaf check-in on a private
16811680
** 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
+ }
16871687
}
16881688
}
16891689
db_finalize(&q);
16901690
16911691
if( p->azTag ){
16921692
--- 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
--- src/merge.c
+++ src/merge.c
@@ -404,17 +404,10 @@
404404
" Use --force to override.\n");
405405
return;
406406
}
407407
if( integrateFlag && !is_a_leaf(mid)){
408408
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]);
416409
integrateFlag = 0;
417410
}
418411
if( verboseFlag ){
419412
print_checkin_description(mid, 12,
420413
integrateFlag ? "integrate:" : "merge-from:");
421414
--- 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

Keyboard Shortcuts

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