DSpace in SVN

My use of SVN to handle updates and patches to DSpace.

My DSpace code is in an SVN repository for the library, signified here by $SVNHOME. Our live machine runs off the code in projects/dspace/trunk. Any modifications to our local DSpace instance are checked into trunk.

The official releases from dspace.org go in projects/dspace/branches/official. What I mean by this is that the "official" branch (as well as trunk) started as an exact copy of the dspace-1.4-source released by dspace.org. Each time a new version is released (e.g. 1.4.1, 1.4.2, etc.), I copy that release over whatever's in projects/dspace/branches/official and then remove extra files until the following returns nothing:

$ diff -r src/dspace-1.4.2-source/ svn/library/projects/dspace/branches/official/ | grep -v .svn$

Then I commit that as the update to the official branch.

The log looks like so:

gsf@manheim:~/svn/library/projects/dspace/branches/official$ svn log
------------------------------------------------------------------------
r171 | gsf24 | 2007-07-26 12:53:39 -0400 (Thu, 26 Jul 2007) | 1 line

official update 1.4.2-beta to 1.4.2
------------------------------------------------------------------------
r168 | gsf24 | 2007-05-08 18:28:03 -0400 (Tue, 08 May 2007) | 1 line

official update 1.4.1 to 1.4.2-beta
------------------------------------------------------------------------
r131 | gsf24 | 2007-01-24 17:11:07 -0500 (Wed, 24 Jan 2007) | 1 line

moved dspace/branches/dspace-official to dspace/branches/official
------------------------------------------------------------------------
r94 | gsf24 | 2007-01-19 14:52:27 -0500 (Fri, 19 Jan 2007) | 1 line

dspace-official update from 1.4 to 1.4.1
------------------------------------------------------------------------
r92 | gsf24 | 2007-01-19 12:27:02 -0500 (Fri, 19 Jan 2007) | 1 line

import dspace-1.4-source into branches/dspace-official
------------------------------------------------------------------------

To upgrade the trunk, which includes local changes, from 1.4.1 to 1.4.2-beta, for example, I would then execute the following from within a working copy of the trunk:

$ svn merge -r 167:168 $SVNHOME/projects/dspace/branches/official

svn st should then list a large number of modified files, and possibly a few conflicting ones. I go in and resolve the conflicts, commit that to trunk, and, ta-da, my local instance has been upgraded.

As an aside, this technique obviates the need for JSPs in jsp/local/. Local JSPs would just need to be modified upon upgrade to take advantage of UI advances anyway, so I prefer to edit the general JSPs and resolve conflicts.

keywords: svn, subversion, DSpace created 2007-01-19 last modified 2008-08-01