Question:

About merging in SVN

by  |  earlier

0 LIKES UnLike

If two people are merging there changes into the trunk at the same time, will svn manage all of it? Meaning, it will do the first merge completely first, then do the second merge, or will they just overlap and cause unwanted results?

 Tags:

   Report

2 ANSWERS


  1. if the changes don't clash it'll do it automatically, if you get a clash then it'll walk you through choosing which clashing bit of code gets merged in.


  2. SVN will only demand intervention, if there are conflicts, i.e., source code affected in the different branches are in the same lines. In that case, developers for both branches should collaborate to resolve the conflicts. Working together is the only safe way to determine which of the conflict-ing changes should be merged to the trunk.

    If no conflicts are detected, the merges will just "automagically" happen. However, the fact that no conflicts are reported is not necessarily a perfectly good thing. There could be unrecognized cross-purpose issues that SVN won't detect. The better approach, if the branches contain the potential for significant modifications of overlapping elements of the repository is careful, sequential merges with oversight and collaboration between developers who are very well-acquainted with the intent of their respective branches. Good commit comments at the branch level can help make this a much easier task.

    It's lots less time-consuming and painful to merge safely and cooperatively with the developers on other branches than to have to revert everything and start over. Merge, test, and verify (QA) the updates to the trunk for one branch at a time to avoid headaches. Be  considerate and disciplined.
You're reading: About merging in SVN

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.