Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch private-branches Excluding Merge-Ins
This is equivalent to a diff from c435144c70 to e1e618d17f
|
2020-04-28
| ||
| 12:06 | Update the documentation to mention the separate control artifacts created to close private branches that were merged with the `--integrate' option. ... (Closed-Leaf check-in: e1e618d17f user: florian tags: private-branches) | |
|
2020-04-22
| ||
| 11:52 | The "history" view of an edited post in the Forum shows all entries as text/plain. See discussion [https://fossil-scm.org/forum/forumpost/bb906aa6ab|on the Fossil forum]. ... (check-in: f7c869b9fb user: drh tags: trunk) | |
| 11:52 | 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. ... (check-in: 767b175d90 user: florian tags: private-branches) | |
| 11:43 | Update commit [8268c5dafb] to allow the --integrate flag when merging private branches, but postpone the closing leaves of private branches. ... (check-in: 6b6c09c5bf user: florian tags: private-branches) | |
|
2020-04-20
| ||
| 20:13 | Experimental fix for link failure under --with-openssl=tree on some platforms (found on CentOS 6) where OpenSSL needs -lpthread to link. Not on trunk because we probably need something more subtle than this to make it work broadly. ... (Closed-Leaf check-in: 8a046acb99 user: wyoung tags: openssl-needs-lpthread) | |
| 17:37 | Update the built-in SQLite to the latest 3.32.0 alpha that includes the fix that omits O_NOFOLLOW when trying to open a directory just to fsync() it. ... (check-in: c435144c70 user: drh tags: trunk) | |
|
2020-04-19
| ||
| 19:14 | Change log updates. ... (check-in: 088b44b310 user: drh tags: trunk) | |
Changes to src/checkin.c.
| ︙ | ︙ | |||
1639 1640 1641 1642 1643 1644 1645 |
"SELECT CASE vmerge.id WHEN -1 THEN '+' ELSE '-' END || mhash, merge"
" FROM vmerge"
" WHERE (vmerge.id=-1 OR vmerge.id=-2)"
" ORDER BY 1");
while( db_step(&q)==SQLITE_ROW ){
const char *zCherrypickUuid = db_column_text(&q, 0);
int mid = db_column_int(&q, 1);
| | | < | 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 |
"SELECT CASE vmerge.id WHEN -1 THEN '+' ELSE '-' END || mhash, merge"
" FROM vmerge"
" WHERE (vmerge.id=-1 OR vmerge.id=-2)"
" ORDER BY 1");
while( db_step(&q)==SQLITE_ROW ){
const char *zCherrypickUuid = db_column_text(&q, 0);
int mid = db_column_int(&q, 1);
if( (!g.markPrivate && content_is_private(mid)) || (mid == vid) ) continue;
blob_appendf(pOut, "Q %s\n", zCherrypickUuid);
}
db_finalize(&q);
if( p->pCksum ) blob_appendf(pOut, "R %b\n", p->pCksum);
zColor = p->zColor;
if( p->zBranch && p->zBranch[0] ){
/* Set tags for the new branch */
|
| ︙ | ︙ | |||
1671 1672 1673 1674 1675 1676 1677 |
" WHERE id %s ORDER BY 1",
p->integrateFlag ? "IN(0,-4)" : "=(-4)");
while( db_step(&q)==SQLITE_ROW ){
const char *zIntegrateUuid = db_column_text(&q, 0);
int rid = db_column_int(&q, 1);
if( is_a_leaf(rid) && !db_exists("SELECT 1 FROM tagxref "
" WHERE tagid=%d AND rid=%d AND tagtype>0", TAG_CLOSED, rid)){
| < | | > | < | > | 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 |
" WHERE id %s ORDER BY 1",
p->integrateFlag ? "IN(0,-4)" : "=(-4)");
while( db_step(&q)==SQLITE_ROW ){
const char *zIntegrateUuid = db_column_text(&q, 0);
int rid = db_column_int(&q, 1);
if( is_a_leaf(rid) && !db_exists("SELECT 1 FROM tagxref "
" WHERE tagid=%d AND rid=%d AND tagtype>0", TAG_CLOSED, rid)){
/* Make sure the check-in manifest of the resulting 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. Instead, the leaf of
** the private branch will be closed later by a separate private control
** artifact. */
if( !content_is_private(rid) ){
blob_appendf(pOut, "T +closed %s\n", zIntegrateUuid);
}
}
}
db_finalize(&q);
if( p->azTag ){
for(i=0; p->azTag[i]; i++){
/* Add a symbolic tag to this check-in. The tag names have already
|
| ︙ | ︙ | |||
2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 | Manifest *pManifest; /* Manifest structure */ Blob manifest; /* Manifest in baseline form */ Blob muuid; /* Manifest uuid */ Blob cksum1, cksum2; /* Before and after commit checksums */ Blob cksum1b; /* Checksum recorded in the manifest */ int szD; /* Size of the delta manifest */ int szB; /* Size of the baseline manifest */ int nConflict = 0; /* Number of unresolved merge conflicts */ int abortCommit = 0; /* Abort the commit due to text format conversions */ Blob ans; /* Answer to continuation prompts */ char cReply; /* First character of ans */ int bRecheck = 0; /* Repeat fork and closed-branch checks*/ memset(&sCiInfo, 0, sizeof(sCiInfo)); | > | 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 | Manifest *pManifest; /* Manifest structure */ Blob manifest; /* Manifest in baseline form */ Blob muuid; /* Manifest uuid */ Blob cksum1, cksum2; /* Before and after commit checksums */ Blob cksum1b; /* Checksum recorded in the manifest */ int szD; /* Size of the delta manifest */ int szB; /* Size of the baseline manifest */ int nClosedPrivateLeaves = 0; /* Number of closed private leafs */ int nConflict = 0; /* Number of unresolved merge conflicts */ int abortCommit = 0; /* Abort the commit due to text format conversions */ Blob ans; /* Answer to continuation prompts */ char cReply; /* First character of ans */ int bRecheck = 0; /* Repeat fork and closed-branch checks*/ memset(&sCiInfo, 0, sizeof(sCiInfo)); |
| ︙ | ︙ | |||
2559 2560 2561 2562 2563 2564 2565 |
assert( blob_is_reset(&manifest) );
content_deltify(vid, &nvid, 1, 0);
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
db_prepare(&q, "SELECT mhash,merge FROM vmerge WHERE id=-4");
while( db_step(&q)==SQLITE_ROW ){
const char *zIntegrateUuid = db_column_text(&q, 0);
| > | > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 |
assert( blob_is_reset(&manifest) );
content_deltify(vid, &nvid, 1, 0);
zUuid = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", nvid);
db_prepare(&q, "SELECT mhash,merge FROM vmerge WHERE id=-4");
while( db_step(&q)==SQLITE_ROW ){
const char *zIntegrateUuid = db_column_text(&q, 0);
int rid = db_column_int(&q, 1);
if( is_a_leaf(rid) ){
if( !content_is_private(rid) ){
fossil_print("Closed: %s\n", zIntegrateUuid);
}else{
/* Close leaves of private branches by separate private control
** artifacts. */
Blob bCtrl; /* Control artifact to close the private leaf */
char *zCtrlDate; /* Timestamp of check-in plus N seconds */
Blob bCtrlXsum; /* Checksum of the control artifact */
int iCtrlRid; /* RID of the control artifact */
if( db_exists(
"SELECT 1 FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>0",
TAG_CLOSED, rid) ){
continue; /* Already closed. */
}
nClosedPrivateLeaves++;
blob_zero(&bCtrl);
zCtrlDate = db_text(0,
"SELECT"
" strftime('%%Y-%%m-%%dT%%H:%%M:%%f',mtime,'+%d seconds')"
" FROM event WHERE objid=%d",
nClosedPrivateLeaves, nvid);
blob_appendf(&bCtrl, "D %z\n", date_in_standard_format(zCtrlDate));
if( zCtrlDate ) fossil_free(zCtrlDate);
blob_appendf(&bCtrl, "T +closed %s\n", zIntegrateUuid);
blob_appendf(&bCtrl, "U %F\n",
sCiInfo.zUserOvrd ? sCiInfo.zUserOvrd : login_name());
md5sum_blob(&bCtrl, &bCtrlXsum);
blob_appendf(&bCtrl, "Z %b\n", &bCtrlXsum);
blob_reset(&bCtrlXsum);
iCtrlRid = content_put_ex(&bCtrl, 0, 0, 0, /*isPrivate=*/1);
if( iCtrlRid==0 ){
fossil_fatal("trouble committing control artifact: %s", g.zErrMsg);
}
fossil_print("Closed: %s (private)\n", zIntegrateUuid);
if( dryRunFlag ) fossil_print("%s", blob_str(&bCtrl));
if( manifest_crosslink(iCtrlRid, &bCtrl,
dryRunFlag ? MC_NONE : MC_PERMIT_HOOKS)==0 ){
fossil_fatal("%s", g.zErrMsg);
}
}
}else{
fossil_print("Not_Closed: %s (not a leaf any more)\n", zIntegrateUuid);
}
}
db_finalize(&q);
fossil_print("New_Version: %s\n", zUuid);
|
| ︙ | ︙ |
Changes to src/merge.c.
| ︙ | ︙ | |||
402 403 404 405 406 407 408 |
if( !forceFlag && mid==pid ){
fossil_print("Merge skipped because it is a no-op. "
" Use --force to override.\n");
return;
}
if( integrateFlag && !is_a_leaf(mid)){
fossil_warning("ignoring --integrate: %s is not a leaf", g.argv[2]);
| < < < < < < < | 402 403 404 405 406 407 408 409 410 411 412 413 414 415 |
if( !forceFlag && mid==pid ){
fossil_print("Merge skipped because it is a no-op. "
" Use --force to override.\n");
return;
}
if( integrateFlag && !is_a_leaf(mid)){
fossil_warning("ignoring --integrate: %s is not a leaf", g.argv[2]);
integrateFlag = 0;
}
if( verboseFlag ){
print_checkin_description(mid, 12,
integrateFlag ? "integrate:" : "merge-from:");
print_checkin_description(pid, 12, "baseline:");
}
|
| ︙ | ︙ |
Changes to www/private.wiki.
| ︙ | ︙ | |||
38 39 40 41 42 43 44 | visible to other users of the project. A private branch created with Fossil version 1.30 or newer can also be converted into a public branch using the <code>fossil publish</code> command. However, there is no way to convert a private branch created with older versions of Fossil into a public branch. | | | > > | | | | < < | 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | visible to other users of the project. A private branch created with Fossil version 1.30 or newer can also be converted into a public branch using the <code>fossil publish</code> command. However, there is no way to convert a private branch created with older versions of Fossil into a public branch. If the <code>--integrate</code> option of <code>fossil merge</code> (to close the merged branch when committing) is used for a private branch, a separate control artifact to apply the <code>+close</code> tag is created and added to the repository during the commit process. Managing the <code>+close</code> tag directly from the check-in manifest of the resulting merge child would generate a reference to the leaf check-in on the private branch, and generate a missing artifact reference (a "phantom") on repository clones without that private branch. <h2>Syncing Private Branches</h2> A private branch normally stays on the one repository where it was originally created. But sometimes you want to share private branches with another repository. For example, you might be building a cross-platform application and have separate repositories on your Windows laptop, |
| ︙ | ︙ |