SVN

Technical Notes

These notes are my personal online notebook of useful commands and "how-to's". You are welcome to make use of them if you find them helpful. They obviously don't come with any warranty! Click on one of the category tags above for the notes in any category.

Website Releases via Subversion (SVN)

This article was originally posted at:
http://labs.redbd.net/blog/index.cfm/2006/7/5/Website-Releases-via-Subversion-SVN
but this site now seems to be dead, so I have recovered it from archive.org and re-posted it.

If I am breaking any copyrights here, please let me know and I will remove it.

Note that Drupal now blocks any path containing "svn-base". See: http://drupal.org/node/28776


Posted At : July 5, 2006 9:54 PM By : Mark

Managing Acquia Drupal with dget and svn

#Create a paths file:
mkdir -p /etc/opt/drupal; vi /etc/opt/drupal/a6paths
drupaldir=/opt/drupal/acquia6
moduledir=/opt/drupal/modules6aq
themedir=/opt/drupal/themes6
scriptdir=/opt/drupal/scripts6
archivedir=/opt/drupal/archive6

#first install of Acquia Drupal as: http://acquia.com/documentation/getting-started/fresh-install/svn
source /etc/opt/drupal/a6paths
mkdir -p $drupaldir
svn checkout https://svn.acquia.com/drupal/branches/1.x-6.x $drupaldir

#create website:
dget create /home/user/webbase dbasename a6paths

Notes on Drupal and Subversion

Putting this code into a page will let it update the site from a repository:

<pre>
<?php system( 'svn up sites/default/...'); ?>
</pre><h1>Done!</h1>

Note that apache must have write permission for the whole directory tree.
I tried the following but couldn't get it to work (probably not in my version of PHP):
svn_checkout('http://myserver.com/svn/demo', '/var/www/html/demo/temp');

If the repository requires a password for update, the following can be done:

Install Subversion on CentOS 5 with Apache


yum install subversion mod_dav_svn
mkdir -p /var/www/svn/test #place to keep repository
svnadmin create --fs-type fsfs /var/www/svn/test #make a test one
chown -R apache.apache /var/www/svn
vim /etc/httpd/conf/httpd.conf #make sure the following two lines are there
LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
#
vim /etc/httpd/conf.d/subversion.conf #and add the following

<Location /svn>
   DAV svn
   SVNParentPath /var/www/svn
   # Limit write permission to list of valid users.

Useful Subversion Links

Syndicate content