views:

52

answers:

2

How do I track and manage the dependencies of software modules under version control?

I am building several websites, each of which uses a particular Apache configuration, particular Django code, a shared Python library, and some shared Javascript. For each site these pieces are interdependent -- if the server code changes, the Javascript might change with it, or vice-versa.

I could put the whole thing under one project, but this seems unwieldy. But if I put them under separate projects, then I have to track the elements' dependencies by version. "DjangoStuff v. 14 works with JavascriptStuff v.20, but not v.21. JavaScriptStuff v.21 works with DjangoStuff v.15."

What is the best approach here? I'm using Subversion. (I've heard rumors that it's no longer cool, but it's meeting my needs and I'd prefer to stick with it for now.)

+4  A: 

Using Externals in Subversion, you can have your master project refer to all the dependency projects. By default, an external reference in Subversion refers to whatever the current version is, but you can add an external reference that refers to a specific version of another repository (using the -r notation as in the "toolkit" example on that page).

Greg Hewgill
+1  A: 

svn:externals is a property you set on a directory to tell Subversion to pull in additional materials whenever that directory is checked out. You can specify:

  • The same or a different repository
  • A particular revision to pull in
  • Where to place the materials once Subversion grabs them
Michael Hackner