How to manage source code using SVN? branching, merging

We are a team of 4 developers / friends located in different places. We all started working on ProjectX and created branches A, B, C, and D using Subversion.

We only have basic knowledge of the version that controls the source code. The other day, one of us just tried to merge Branch A with B, C and D and B tried to merge with A, C and D. (and they didn’t even know how to merge it: D, just right-click> merge> merge a number of changes). We got some conflicts, resolved them. I tried to merge again, right-click again .....) Conflicts again.

Now that all the code has been corrupted. we have 4 different code copies (D lacks the functionality of B, but has C, etc.). Thus, I went through many streams here on SO, read the SVN book and especially this article (how to relate it correctly) helped in understanding how to combine branches and trunk. I think I have a better understanding of the future. But how do I get out of the current situation?

My questions:

  • Since 4 of us are working on the same project, but usually working on different bits, should we have only one branch? and then create 4 working copies, and then commit and update only. As soon as we are ready to merge the trunk to the branch, the branch to the trunk? as suggested in the above article
  • Can you suggest any workflow so that we can get our 4 branches in the trunk, and then I can take the export to restart the version from scratch.
  • Also, I think that if you go back with 4 branches, each of us will daily / regularly update our branch and receive changes from the trunk (merging) and merge local changes back into trunk ?? (instead of trying to merge with the branch: -D)

Please indicate which work flow should we use? so its minimal pain in maintaining the code. Thanks.

+3
source share
7 answers

. , "" - . (, Maven, Ant ..) (, Hudson, Cruise, TeamCity ..). SCM (Subversion), , , , . , (.. - ).

. , , - "" . , 1.0 , , 1.0 ( , ), , (, 2.0).

Pragmatic Version Control Subversion. SCM Subversion.

+8
  • . "". . , , . , ( , ) , .
  • , .
  • 4 . .
+2

, Eric Sink howto.

, .

+2

- CR ( /// ..). :

  • CR CMT ( , Bugzilla);

  • CR. , , . :

    projectName_crNumber_crCreationDate_developerId

  • (, ..) , , CR ( CR) CM (Configuration Manager), ( );

  • , CR (build_xxx), . , .

  • , / ( CR).

. , . . .

+2

, 4 , , 4 . , , . .

, , , , . , 2.0, 2.1, 2.0 . 2.1 , 2.0 2.1 . , .

- , ( ) , . , , , . , .

+1

, , . , , , .

SVN ( ) , , , ( , ) , .

(, ). , -, , . , , .

0

SVN, , , DVCS, Mercurial, Git, .

For SVN, from my past experience, as a rule, it is better to keep the torso where everything merged (see examples here ). Each person must unite back into the trunk, and then merge with the trunk into their branch. Merging branch to branch in SVN seems bad.

0
source

Source: https://habr.com/ru/post/1718823/


All Articles