I have multiple website projects in a single repository each of which have a copy of WordPress. Updating WordPress means updating all project folders and keeping redundant copies. This is useful for my rsync scripts which sync the entire folder. It also gives me fully working local copies of the site.
There are a number of ways I can see of improving this and would like some feedback. I'm on Windows and recently migrated to Subversion.
What's the best approach and are there any alternate solutions?
One option would be to separate the WordPress bits out into a separate repository (since it's not really part of your projects, it's just something you use to build them), and then use svn:externals to fetch that into your projects in the correct locations.
Externals Definitions in the SVN book
If you're already hosting all of the sites together in one repository, svn:externals can be used to pull different parts of the same repository together in various ways.
E.g. with a repository like
repo/site1 repo/site2 repo/commonPieces
You can introduce an "svn:externals" property on the site1 and site2 dirs that says "commonPieces url-to-repo/commonPieces".
You'll want to avoid any recursion loops here obviously. But this has the advantage that everything's in the same repository and can share history -- you can pull things that are becoming more common from site1 or site2 into commonPieces using "svn copy".
Compare our current solution where I'm working -- migrating stuff from our separate project repositories into a single also-separate "coreLibraries" repository loses the development history. Since we commonly develop features for one project and then decide to re-use them, this loss of history happens a lot...
Edit: it's worth remembering that while "svn update" on site1 will automatically update commonPieces with this "svn:externals" property in place, a "svn commit" on site1 will not show things that have changed in site1/commonPieces. You'll have to make two separate commits, one from site1 and one from site1/commonPieces.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With