[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Auto-upload post-commit hook

From: Duane Griffin <d.griffin_at_psenterprise.com>
Date: 2005-04-25 13:43:24 CEST

Hi folks,

There seems to be quite a few people interested in automatically
uploading changed files through post-commit hooks. I've implemented
something along those lines for versioning system configuration files
here at work, and I hope to eventually use the same system for our
internal and external web-sites.

I've attached the script here in the hope it will be useful for others.
It uses properties to specify what and where to upload, which should
hopefully give you the flexibility to manage any number of machines from
a single repository. At the moment it just uses scp for uploading,
although that is easy to change in the script. I'm also working on
supporting different transport mechanisms via properties, and in
particular uploads to an rsnyc server through the File::RsynchP module.

It sets file meta-data information based on the asvn file:permissions
property (if present) and the commit time.

I've only run and tested the script on Linux, but it should run
more-or-less unchanged on other *NIX systems, and should be fairly easy
to port to Windows (probably just the pathname mangling would need
modifying).

Comments, criticism or suggestions will be gratefully received.

Cheers,
Duane Griffin.

_____________________________________________________________
Duane Griffin
Senior Software Developer

Process Systems Enterprise Limited - "The model company"
Bridge Studios, 107a Hammersmith Bridge Road, London W6 9DA
Call +44 (0)20 8563 0888 or visit us at www.psenterprise.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Received on Mon Apr 25 13:45:48 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.