We use one branch for the our upcoming release, and trunk for the next release (later).
For example: v1.1 -> v1.2 -> trunk (Where v1.1 is in production, v1.2 is the upcoming release and trunk will turn into v1.3 closer to release).
While working on the upcoming release, we check in using SVN (TortoiseSVN). The problem with this is that all check ins must be manually merged to trunk if it's a change that will be relevant for later releases as well (Most changes in other words).
The problem is that when the developers are stressed, they tend to forget to merge. The consequence of this is that a fix which is done in a branch may need to be fixed again later because the developer forgot to merge the fix from branch to trunk
Is there a way to automatically merge the code to trunk when a check-in is made to the branch?
This basic syntax— svn merge URL —tells Subversion to merge all changes which have not been previously merged from the URL to the current working directory (which is typically the root of your working copy).
You can use svn merge to “undo” the change in your working copy, and then commit the local modification to the repository. All you need to do is to specify a reverse difference. (You can do this by specifying --revision 392:391 , or by an equivalent --change -392 .)
Yes , it is possible , and there is an open source project that does it!
check out https://github.com/liveperson/Auto-Merger
we are constantly working with it and it saves so much time and helps avoiding all those missed merges bugs.
No and I would strictly discourage from it. There are so many possible side effects that you will encouter with an automatic merging.
How would you resolve conflicts? The more development means more changes in branch and trunk, means more conflicts at merging. The merge must be done by hand.
What about unwanted merges? There are things (like changing version numbers, dependencies, etc.) you don't want to merge back. With an automatic merge you had to reverse merge the merges, wich causes more confusion and work.
With the merge tracking feature of SVN 1.5 you'll get good information and see if someone hasn't merged his/her changes back to trunk. You just have to use it properly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With