tags:

views:

202

answers:

2

Where I work I have several projects in separate repositories. Each project shares a lot of common code that I want to pull out into a distinct project. I'm thinking of calling the project with the following scheme: Company.Department.Common or Company.Department.Utility.

I've constructed a project for this and it has an automated build script (as does every other project).

My question is that I would like to refactor my existing projects to depend on this new project. One method that is quite basic but not exactly what I am looking for is to simply build my Utility project, copy the DLL to my lib folder in my consuming project, and check that DLL in with that consuming project.

I personally feel that method is quite poor. I would like to have a reference to my Utility project and will perform a svn-update and build of the Utility project before the build of the consuming project.

FYI, the kind of code that's in the Utlity project are Logging facilities, BDD Unit Testing classes, IoC faclities, and Common Company.Department focused classes.

Hope my question isn't too vague, but with some answers I may be able to sharpen the focus on exactly what I would like to do.

Lastly, this is for .Net projects and using NAnt as the build script, and svn for code versioning.

+1  A: 

Have you checked out the svn:externals feature? This allows you to make a different repository appear as a subdirectory of a higher level repository. If I understand what you're trying to do, this might help.

Greg Hewgill
I heard somewhere that there are issues with using an svn:externals within the same repository (most notably when it comes to doing backups, that it causes evil circular checkouts). Do you know if that's (still) an issue?
Andrew Edgecombe
I've never used svn:externals while pointing to the same repository. That certainly sounds like it could cause problems, as svn:externals is intended to point to some *other* repository.
Greg Hewgill
+5  A: 

Greg is right in that you will probably want to use the svn:external feature. I created a step by step guide on how to do this on Windows with TortoiseSVN. I found it quite confusing the first couple times I used it. I created the guide, so that I can look it up, because I don't do it all the time.

Using svn:externals with Windows

hectorsosajr
Thanks, next step for me is to figure out the integration of the external source, but at least the first step is figured out.
Scott Muc