subversion

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

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

Technology:

Vendor Branches for Modules

Use Subversions "vendor branch" capabilities for managing Drupal module installation and updating.

Ross Burton's Vendor Branches in Subversion is a decent explanation of how vendor branching works.
CodeGobbler has an article on SVN repository structure for Drupal projects that includes using svn:externals for modules.

Adding a module to your local Drupal repo
Check out a copy of the module section of your local Drupal SVN repo:

cd /tmp

Disable Subversion Component

Use Trac as just an issue-track and Wiki by disabling the SVN component.

If you just want to use Trac as a Wiki and issue tracker, without any version control subsystem, you can disable it that part.

  1. When initializing a project's environment with trac-admin, don't enter anything for the repository directory (i.e. keep the default).
  2. Add the following to project/conf/trac.ini:
    [components]
    trac.versioncontrol.* = disabled

Technology:

Making Releases

A release or "tag" is just a snapshot of a project in time with a human-friendly name.

http://svnbook.red-bean.com/en/1.4/svn.branchmerge.tags.html

Creating a simple tag

svn copy http://svn.example.com/svn/projectname/trunk \
http://svn.example.com/svn/projectname/tags/release-1.0 \
-m "Tagging the 1.0 release of the 'projectname' project."

Exporting a "clean" copy of your release

Technology:

Working with Projects

General usage tips for working with subversion projects.

Checking out a project

cd /path/to/checkout/location
svn checkout http://<your_svn_server>/svn/projectname/trunk <directory>

Check the status of your project

svn status

Status code meanings:

L abc.c # svn has a lock in its .svn directory for abc.c
M bar.c # the content in bar.c has local modifications
M baz.c # baz.c has property but no content modifications
X 3rd_party # this dir is part of an externals definition

Technology:

Creating Projects

Commands and tips for creating projects.

http://ariejan.net/2006/11/24/svn-how-to-structure-your-repository/
http://ariejan.net/2006/11/21/svn-how-to-release-software-properly/

Importing a Project into SVN
You already have a set of files in /tmp/projectname that you want to make into a new project.

svnadmin create /var/svn/projectname
svn import /tmp/projectname file:///var/svn/projectname -m "initial import"
rm -rf /tmp/project

Fix permissions to the repository:

find /var/svn/projectname -type f -exec chmod 660 {} \;

Technology:

Trac

Trac provides an interface to Subversion, an integrated Wiki and convenient reporting facilities.

Prerequisites

  • Python development libraries
    yum install python-devel
  • setuptools
    Download EasyInstall and run it to install the appropriate setuptools egg for your Python version:

    cd /extra/src
    wget http://peak.telecommunity.com/dist/ez_setup.py
    python ez_setup.py

Technology:

Clients

SVN client options

Technology:

Pages

Subscribe to RSS - subversion

Recent Updates

  • 6 months 3 weeks ago
    1.27.2 update
  • 7 months 5 days ago
    Drupal 10/11 config
  • 7 months 6 days ago
  • PHP
    7 months 6 days ago
    PHP 8.3.11 and AlmaLinux
  • 7 months 1 week ago
    New version of Pound