SVN Folder Structure

directory-structuresvn

expanding this question: SVN projects folder structure

Beside various projects I have a Modules collection containing project independant functionality used by all projects.

How can I structure the folders so that I can apply TAGs for one selected Project AND the Modules at a given revision?

Using the following setup I'll have to tag Modules AND the Project_1 independantly. This means I have to kepp track of which revision of modules and the project belong together at which release…

/Modules

  • trunk
  • tags
    • TAG_Project_1_release_0_1
  • branches

/Project_1

  • trunk
  • tags
    • TAG_release_0_1
  • branches

Using setup 2 will result in tagging modules and ALL projects.

/trunk

  • Modules
  • Project_1
  • Project_2

/tags

  • TAG_OF_TRUNK_Project_1_Release_01

/branches

  • Modules
  • Project_1
  • Project_2

What I want is ONLY ONE Tag containing Project_1 and Modules without Project_2, so I guess it must be setup 2 somehow.

Can anyone push me into the right direction on how to achieve this?

Best Answer

Tagging is cheap, and takes almost no space in repository. I wouldn't worry about having extra project in some tag folder, but you can always remove extra projects after the tagging.

That being said, I actually prefer the first approach, because you have more freedom there. Freedom comes with a price, but the price here is small.

EDIT: Tagging and branching are essentially the same operation in SVN. When you branch some folder you are creating a snapshot-copy of that folder. This "snapshot" part is important, because any changes in original folder will stay there, and will not propagate to branched folder. Only difference between tag and branch is that SVN client will warn you about changing something in folder whose path contains "tag".

So, any of the two options is tag-safe in regard to the issue of changing the contents after the tag. Tag folder will not be changed, only the folder where you actually made the changes.

EDIT2: You may consider a third option:

Modules
  branches/tags/trunk
Project_1
  branches/tags/trunk
Project_2
  branches/tags/trunk
Solutions
  Solution_1
    branches/tags/trunk
      svn:externals : Modules + Project_1
  Solution_2
    branches/tags/trunk
      svn:externals : Modules + Project_1

Your working folders are Solutions/Solution_1/trunk and Solutions/Solution_2/trunk. Those folders are essentially empty, but they contain svn:externals property that is set up to appropriate trunk folders. When you want to branch or tag something you make branches in Modules/Project_X folders, and then make a branch in Solution_X folder with svn:externals property changed to new appropriate folders. Tagging is the same as branching, but you would "fix" the revision of every external.

Related Topic