I recreated my issue in a new empty SVN repository:
Revision 1:
- /trunk/
- /branches/
Operation: add text file "init.txt" to branch "trunk"
Revision 2:
- /trunk/init.txt
- /branches/
Operation: create feature branch based on trunk
Revision 3:
- /trunk/init.txt
- /branches/featureA/init.txt
Operation: add unstable feature to branch
Revision 4:
- /trunk/init.txt
- /branches/featureA/init.txt
- /branches/featureA/unstable.txt
Operation: fix bug in feature branch by adding file "bugfix.conf"
Revision 5:
- /trunk/init.txt
- /branches/featureA/init.txt
- /branches/featureA/unstable.txt
- /branches/featureA/bugfix.conf
Operation: merge "bugfix.conf" back into trunk but skip "unstable.txt"
Screenshot of first merge dialog page
Screenshot of second merge dialog page
Revision 6:
- /trunk/ [svn:mergeinfo=/branches/featureA:3,5]
- /trunk/init.txt
- /trunk/bugfix.conf
- /branches/ [no svn:mergeinfo]
- /branches/featureA/init.txt
- /branches/featureA/unstable.txt
- /branches/featureA/bugfix.conf
Operation: continue working at file "init.txt" trunk
Revision 7:
- /trunk/ [svn:mergeinfo=/branches/featureA:3,5]
- /trunk/init.txt (new content)
- /trunk/bugfix.conf
- /branches/ [no svn:mergeinfo]
- /branches/featureA/init.txt (old content)
- /branches/featureA/unstable.txt
- /branches/featureA/bugfix.conf
Operation: try to synchronize the feature branch with the trunk
Expected outcome: Revision 8:
- /trunk/ [svn:mergeinfo=/branches/featureA:4]
- /trunk/init.txt (new content)
- /trunk/bugfix.conf
- /branches/ [svn:mergeinfo=/trunk:6]
- /branches/featureA/init.txt (new content)
- /branches/featureA/bugfix.conf
First attempt
On feature branch choose "Merge a range of revisions -> all revisions"
Error: "Reintegrate can only be used if revisions 3 through 7 were previously merged from /branches/featureA to the reintegrate source, but this is not the case: trunk Missing ranges /branches/featureA:4"
Why does SVN need revision 4 to also be merged? The whole point of having a separate branch for stable and unstable is to keep some commits away from the other branch. The change (adding file unstable.txt) is completely independent of the other changes.
Second attempt
On feature branch choose "Merge a range of revisions -> Revisions 2-7" (all the revisions I can manually select)
Error: "Tree conflict: The last merge operation tried to add the file 'bugfix.txt', but the file was obstructed in the working copy."
TortoiseSVN allows me to select Revision 6 for merging even though it makes no sense to merge this change because it is already contained in the target branch because it was initially commited there in Revision 5. Why does TortoiseSVN not handle this automatically? Is cherry-picking/merging single commits between the trunk and a feature branches not supported?