Skip to main content

subversion

Piston

Posted in

"Ease your vendor branch management worries with Piston

Piston is a utility that eases vendor branch management. This is similar to svn:externals, except you have a local copy of the files, which you can modify at will. As long as the changes are mergeable, you should have no problems.
Install Piston
First, you need to have Ruby installed (even though we aren't doing any programming in Ruby) in order to run Piston:

yum install ruby
yum install rdoc


cd /extra/src

Upgrading

Posted in

Upgrading to a new version Subversion server software.

  1. Shut down svnserve, Apache, and anything else that might be accessing the repository:
    svc -d /service/apache
  2. Dump a backup of the repository using the currently installed Subversion:
    svnadmin dump /var/svn/repo_name > dumpfile.txt
  3. Move the current repository to make room for a new one:
    mv /var/svn/repo_name /var/svn/repo_name-old
  4. Install the new version of subversion.
  5. Create a new repository:
    svnadmin create /var/svn/repo-name

Backups and Mirrors

Posted in

Backing up and/or mirroring your Subversion repositories.

Backing up your repository

  • Shut down svnserve, Apache, and anything else that might be accessing the repository:
    svc -d /service/apache
  • Dump a backup of the repository:
    • Uncompressed:
      svnadmin dump /var/svn/repo_name > dumpfile.txt
    • Compressed:
      svnadmin dump /var/svn/repo_name | gzip -9 > dumpfile.gz
    • Compressed, with a datestamp:
      svnadmin dump /var/svn/repo_name | gzip -9 > `date "+dumpfile_%Y-%m-%d_%H:%M:%S.gz"`
  • Load a database dump:

Server

Posted in

Howto pages for a Subversion server.

Resolving Conflicts

Posted in

What to do when two people have made changes to the same project.

http://ariejan.net/2007/07/04/how-to-resolve-subversion-conflicts/

  • Scrap your local changes
    svn revert MYFILE
    svn update MYFILE
  • Keep your changes and scrap the other person's
    An ls command in the directory will show 4 files related to the one in conflict:

    • MYFILE – the original with markers
    • MYFILE.mine – your version
    • MYFILE.r5 – the original your worked with
    • MYFILE.r6 – the most update version from your colleague

Panther SVN Client Build

Posted in

Attempts to build SVN 1.6.1 for Mac OS X 10.3 (Panther) that has only the built-in Apache (1.3).

http://hivelogic.com/articles/view/svn_on_os_x
http://www.nearinfinity.com/blogs/scott_leberknight/building_subversion_svn_1_4.html

cd ~
wget http://subversion.tigris.org/downloads/subversion-1.6.1.tar.gz
tar
zxvf subversion-1.6.1.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.1.tar.gz
tar
zxvf subversion-deps-1.6.1.tar.gz
cd subversion-1.6.1

Configure it to not look for a bunch of the server-required dependencies:
./configure \
--without-berkeley-db \
--without-apache \
--without-apxs \
--without-swig

Branches

Posted in

How to branch a project to work on a fork of your code.

Creating a branch

svn copy http://<your.svn.server>/svn/project/trunk \
http://<your.svn.server>/svn/project/branches/branchname \
-m "Creating branch of /project/trunk"

Switching a Working Copy

Updating Drupal Core

Posted in

We've been recommending that you use Subversion to manage your Drupal site, so these instructions are geared towards using it to upgrade.

The instructions also presume that your site can be taken offline during the upgrading process. If you've have a site that you can't take offline while the process is completed, you've got a whole other set of complicated issues to deal with!

These instructions were written based on upgrading Drupal 6.14 to Drupal 6.15.

Prepare the current site

Installing modules with Piston

While vendor branches in a subversion repo can improve the process of upgrading modules, Piston is a great way to make things even easier.

Installing a module with Piston

cd /path/to/your/drupal/website/sites/all/modules
piston import http://<your_drupal_repo>/svn/drupal/modules/<module_name>/current <module_name>

Upgrading a module
cd /path/to/your/drupal/website/sites/all/modules
piston update <module_name>

Drupal SVN Repo

Posted in

Build a Subversion repository to hold multiple versions of Drupal core, modules and themes for building your Drupal-powered websites.

cd /tmp
mkdir drupal
cd drupal
mkdir 6.x 5.x
mkdir 6.x/core 6.x/modules 6.x/themes 6.x/core/current
mkdir 5.x/core 5.x/modules 5.x/themes 5.x/core/current

Create the Subversion project:

svnadmin create /var/svn/drupal
svn import /tmp/drupal file:///var/svn/drupal -m "Initial import of Drupal repo."
find /var/svn/drupal -type f -exec chmod 660 {} \;
find /var/svn/drupal -type d -exec chmod 2770 {} \;
chown -R nobody.nobody /var/svn/drupal

Create the Trac project:

cd /var/trac
trac-admin drupal initenv
Syndicate content