You are here

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.

Migrating subversion projects off Google Code

If you want to keep your project in Subversion, Google only gives you automated script for Sourceforge. In fact it is easy to migrate the repo to another host, e.g. Assembla

e.g.

OLDREPO=drupal-contrib
svnrdump dump https://$OLDREPO.googlecode.com/svn | gzip -9 > ${OLDREPO}_dump.gz
gzip -l ${OLDREPO}_dump.gz # find the original size

An open-source assembla space can be created here: www.assembla.com/…n_repository

Topic: 

Clear all the contents of a Git repo

The following steps are suggested here: stackoverflow.com/…-repository

Topic: 

Useful Subversion commands

  • To set Id property (ps is short for propset) and list results:
svn ps svn:keywords Id [file(s)]
svn ps svn:executable yes [file(s)]
svn pd svn:executable [file(s)]   # propdel
svn pl -v [file(s)]
Topic: 

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

Managing Acquia Drupal with dget, dsite and dsvn

#place to put dget scripts

DGETDIR=/root/dget


#get dget suite and install it, editing settings.sh if necessary

svn co http://drupal-get.svn.sourceforge.net/svnroot/drupal-get/trunk $DGETDIR
cp $DGETDIR/rename_to_settings.sh $DGETDIR/settings.sh
$DGETDIR/setup.sh $DGETDIR

#check out drupal core, contrib

dsvn checkout

#use dsite checkout if no need to commit from this site
#and optionally, the Acquia distribution (ignore any warning at the end)

dsvn checkout x x 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.
Topic: 

Useful Subversion Links

Subscribe to RSS - SVN