简体   繁体   中英

How to partial reintegrate a branch to trunk?

I searched a lot about this topic but did not found a convincing answer.

I have a branch B that is used for Feature F1, F2 and F3. Commits for the features a mixed (eg a commit for F1, commit for F2, commit for F1). Feature F1 is now finished should be reintegrated to the trunk but F2 and F3 are not.

As far as I understand it, reintegration to the trunk (using --reintegrate) is different from a normal svn merge and thus svn merge is not usable in this scenario (correct?). The svnbook mentions such a selective merge as cherry-picking but only from trunk/branch to branch. However, --reintegrate would also bring F2 and F3 to the trunk.

How (if possible at all) can I reintegrate selected revisions from branch B to the trunk and then continue to finish the other features in branch B?

Some answers I found mention to svn merge the revisions to trunk and then block those revisions in the branch using --record-only. However, I'm not sure if this is good practice due to the fundamental difference of svn merge and svn merge --reintegrate. Wouldn't svn merge from branch to trunk duplicate the changesets in the trunk that were previously synced to the branch?

Can't see any problem here.

Just perform cherry-pick merge from branch to trunk (merge ranges or revisions), next merges will not see at merged changesets again (if server supports mergeinfo)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM