views:

65

answers:

2

Say I have a repositry layout like the following:

 |Root
   |->CommonLib
   |->ProjectA.PartA
        |->trunk
            |->lib
            |->src
            //etc
   |->ProjectA.PartB
        |->trunk
            |->lib
            |->src
   //About four more projects.

Now I split them up like this so that I can work on each different section and branch them if I need to.

ProjectA.PartA uses ProjectA.PartB as a reference.

Before I structured it like this I had all the project trunks in one src folder and would just pull that folder down and then add the projects to a solution and just add project references between them.

This worked fine while they where all in the same folder but I feel it probably isn't good practice and it forces you to have the same folder checkout structure or the dependencies break.

My thoughts where to build each project and store the binaries in the CommonLib folder at the root then just uses svn:externals on each project to pull down its dependencies from the CommonLib folder into its lib folder and add a reference it that rather then the project itself.

Would the above solution be better then adding project references?

What's the common practice when having internal project references?

If they are all part of the same "goal" should I just be setting up externals on all the project folders to pull down the dependencies as source?

Thanks.

+2  A: 

SVN copies are cheap and SVN merges are easy. So I would just stick with one root solution and have the projects reference each other. Branch the whole thing if you need to, then re-integrate.

Wyatt Barnett
+1  A: 

Usually I would reference the project from each solution using externals rather than the library itself. In this case it's very important to have unit tests in each project for regression testing.

It's also fine (and probably safer) to store the binaries and reference those with externals. If I was so do this, I would tag each version of the dependency binary and reference that. If I wanted to upgrade, I would change the external to use the new tag - this allows you to more safely upgrade a library.

EDIT: I just realised that you were splitting into 2 parts of the same project - my answer above is for shared libraries across multiple projects. I would keep them in the same trunk as Wyatt said

Luke Schafer