subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Canfield <andy.canfi...@pimco.mobi>
Subject Re: Subversion on Drupal
Date Fri, 12 Aug 2011 04:38:58 GMT


On 08/12/2011 10:48 AM, Ryan Schmidt wrote:
> On Aug 11, 2011, at 21:56, Andy Canfield wrote:
>
>> My goal in learning Subversion was to put our web site under version control. Now
I have my doubts as to whether Subversion can handle it.
>>
>> The web site uses Drupal. And Drupal has the characteristic that much of the site
is contained in a MySQL database. For example, if I install a module and set it up, the module
is a disk file, but the configuration of that module is in the database. If I make a change,
part of the change may be in a PHP code file on disk, part may be in the database. The database
contains both user data and configuration data, intermingled.
>>
>> I could get Subversion to work. I would have a pre-commit script to back up the database
to a disk file in the working copy.
> Not possible, because the working copy is on the client computer, whereas the pre-commit
hook (and all hooks) run on the server computer. Unless you're saying you're working with
a shared server-side working copy, in which case that's another thing I'd recommend not doing.
My poor expression. It's not on a hook. I mean that when Charlie wants 
to do a checkout, Charlie must do this:
     [1] svn checkout ...
     [2] cd repository
     [3] scripts/post-checkout.sh
My workstation shell script, which is stored in the same repository, 
takes care of reloading the database. I think that the script will work 
for both Linux and OS X; forget Windows.

>> I would have a post-checkout script to reload the database from the disk file.
> There is no post-checkout hook, so this would have to be a script you run manually.
>
Similarly, when Charlie wants to commit, Charlie must do this:
     [1] in GUI, do a Drupal manual backup (maybe I can trigger this in 
a script)
     [1] cd repository
     [2] scripts/pre-commit.sh
     [3] svn commit ...

The pre-commit and post-checkout scripts try to take care of putting the 
database into the revision. They also take care of the problem that some 
files in some directories are created by, and therefore owned by, the 
Apache "user" and must be writable by the Apache "user" in any working 
copy. Subversion stores permissions but does not store ownership;  a 
file owned by user "www-data" under Linux must be writable by user 
"_www" on OS X. And, of course, the scripts would have to fix any other 
problems I run into. Also I might need an "UPDATE" script.


Mime
View raw message