Branch lines and merging back to Main

0
Hi everyone, I have a project that I have been working on for many months now and I am working on a Branch line that I created (Lets call it Ben DevLine)  I did this becuase I wanted to take what I knew was working in the Main Line (which I created along with a Mendix Dev) and carry on developing on  my own branch safe in the knowledge I could get rid of my branch if I messed it up.   I should really now start using the Main Line again so that when I upload it to the Prod environment, it isn’t my branch line being used live. Question is, what is going to happen when I merge them?  The main line hasnt been touched for about 10 months so is very out of date.  I pretty much want to replace it with my Ben DevLine but am worried that if I merge them, I’m going to end up with some cross branch of errors!!   Cheers 
asked
4 answers
4

If your branch line has been created out of mainline and mainline has not been touched since the creation of the branch, the result shoulb be what you expect it to be (mainline equals your branch line).

If there has been changes on the mainline that do not conflict with your branch line, you will get everything from mainline and your branch. That’s also what you want.

If there are changes in mainline that conflict with changes in your branch, you need to resolve them. Mendix can’t know which version is correct. You need to make this decission.

I would just give it a try. Merging does not automatically commit your branch. If it is not working as expected, you can do a fresh checkout without any risk.

answered
1

Create a separate branch (“MainToMergeTo” for instance) from the mainline, merge your branch to “MainToMergeTo” to see the size of problem. Maybe there is no conflict and no problem.

If there is a problem and you have nothing in the mainline of value, use this option :

  • Copy directory <projectdirectory-main>/.svn to <projectdirectory-branch>/.svn
  • Open the project from <projectdirectory-branch>/yourproject.mpr
  • Commit
answered
3

If there wasn’t any change since your last one then you shouldn’t have any issues. If there were different changes on it, it could be possible that you get merge conflicts which you need to solve. You can try to merge and then you see a result on your local copy. If you don’t want to keep this result, you can delete your local copy and check it out again.

But I would suggest to make sure you don#t have uncommitted code on your mainline before start merging.

Also, if you merge multiple committs, I would suggest to merge not more then 5 at once. 

Good luck!

answered
1

I only had 3 conflicts.  Boom :)

answered