Page 1 of 1

How to resolve/merge repository conflicts with SVN?

Posted: Thu Dec 04, 2014 9:07 am
by ElSticky
Scenario:
We're working with two persons in one solution and both are making changes (we're not interfering with eachothers test cases, so only the Ranorex repository is in common). When we both commit something our repositories become conflicted and we don't know how to merge them. To us it looks like when we merge one thing we'll lose something from the other person and vice versa.

So it becomes difficult to work on it we two persons. If somebody could help us on this?

Re: How to resolve/merge repository conflicts with SVN?

Posted: Thu Dec 04, 2014 2:28 pm
by krstcs
First, I would suggest trying not to work on the same repository if at all possible. You can make one for each of you, and then, after merging the changes, you can copy from one repo to the other in Ranorex. Then just re-commit this as the "catch-up" or "repo-merge". If your modules all use your repo and the other person's modules use their repo, it won't be as big of a problem on merges. But, that means two repos to manage, if you don't want to manually copy/merge from one to the other.

Second, the order and direction of merges is important. I use Git, so it might be a bit different for you, but I always try to merge master into my branch and resolve conflicts before I merge my branch into master. Keeps master clean. If you are both going to merge then one of you should be first. You will need to communicate. Make sure the first person merges from master into their branch. Fix any problems. Then merge that branch back into master. Then the second person does the same and the first will pull back down from the new master.

Third, you will need to learn the structure of the Ranorex Repository. It's XML, so it's not hard, but it also has code-behind. And Ranorex uses GUIDs to identify the repo, the repo objects and all test modules and cases. These GUIDs are the most important part. You can't have two of them that are the same in the same solution. You can generate new ones if you need to, but it is difficult to make sure you insert the correct one in ALL of the right places.

There isn't really a perfect way to handle it, it will be a lot of work, but we can't get around it.

Hope that helps!

Re: How to resolve/merge repository conflicts with SVN?

Posted: Thu Dec 04, 2014 5:11 pm
by ElSticky
Thanks for your suggestions. The first one maybe sounds the best to me. Currently I think we were working in the way of the second solution.

Today we tried to work with 1 repository and tried to manually merge them with KDiff. This seems to work fine but now when I change something with new elements in the repository and then update my project all my new repository elements are gone. It looks like it sets back an older version of my repository. I also saw when updating it creates a repository.bak file so I think this one contains my newly created items and then sets back an old version.

Any idea if this is a setting in SVN or Ranorex and if I can turn it off? I did this several times and everytime I update my own created tests loose their items in the repository.

Re: How to resolve/merge repository conflicts with SVN?

Posted: Thu Dec 04, 2014 5:27 pm
by krstcs
My guess is that this is SVN's merge mechanism, but I don't use it so I couldn't tell you more.

Re: How to resolve/merge repository conflicts with SVN?

Posted: Mon Jun 15, 2015 12:54 pm
by NewLearner
Hi ElSticky,
Did you find any solution to your problem, presently I'm facing same issue, but I'm going to use single object repo for both tests(different person work on same repo)... I just installed tortiseSVN and checking possibilities.. if you have solution pls let me know ..

Thank you....