What are the implications of creating a branch from a trunk subfolder in SVN?

I thought that usually when you enter the branches, you will enter the whole chest, but in my company I saw people fall into the subfolders of the trunk and deeper - are there any practical consequences of this, except for confusion when you try to find the right one catalog in the torso to merge back?

+7
source share
2 answers

The problem is not branching .. this is a merge:

Never merge back into such a subtree folder. What for? Subversion will save its merge information to this subtree folder. And once that happens, no one else will be able to use merge-reintegrate.

See additional information :

Avoid merging subtrees and mergeinfo subtree, merge only to the root of your branches, not subdirectories or files

This means that as long as you have a merge subtree in your chest, you cannot use the -reintegrate option, which you should usually use, because merging is a lot easier this way.

+7
source

exactly what you said. SVN is flexible enough to allow you to turn around from anywhere in the tree, which is impressive until you want to merge it, and then it's hard for you to manage the mess created. Now it makes sense sometimes (for example, you have a top-level directory with other things there, or you need a very special localized branch to fix a specific error), but in general you want everything to be easier for you.

This means choosing a root to be used as your branch, and stick to it even if it means branching only from the top level. After that, everything becomes much simpler. The branching cost is negligible, even if you do.

+3
source

All Articles