Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN Automatic merge to branch on check in [closed]

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?

like image 803
Unyttig Avatar asked Nov 27 '09 12:11

Unyttig


People also ask

What is a svn Sync merge?

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).

Can svn merge be undone?

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 .)


2 Answers

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.

like image 87
Elyran Avatar answered Nov 08 '22 23:11

Elyran


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.

like image 41
Hardcoded Avatar answered Nov 08 '22 21:11

Hardcoded