Paul Lussier wrote:
> After reading all the responses thus far, it seems that there aren't
> a lot us who understand what the --*-template switches do, or are for.
> Even after reading the description in chpt. 8, I still don't quite
> get it. Of course, of all the repos I've created, I'm the only one
> using any of them, and I have yet to muck around with a lot of the
> more advanced features.
>
> So, could some kind soul who *has* figured these --*-template
> switches out provide a working example of why/how these things are
> useful in the real world (I live in "theory", everything works here :)
If you look in the "templates/on-disk/default" subdirectory of your subversion
working copy then you will see a set of directories and files that should look
very familiar to you. You can copy this hierarchy elsewhere, add any files and
directories you want, and then use that as the template for new repositories.
For example, I added post-commit hook and post-revprop-change hook scripts that
use the email perl scripts (from "tools/hook-scripts") to email commit messages.
I parameterized them using environment variables located at the top of the files
to make subsequent edits easier.
I also added a pre-revprop-change hook that allows editing log messages and
stores the old log messages in a new repository directory called "log-changes"
where each is indexed by revision number.
I then removed the annoying README file.
This way when I'm telling co-workers how to setup a repo I can just tell them to
run 'svnadmin create --on-disk-template /path/to/the/template /path/to/repo' and
then to edit the variables at the top of each executable in the hooks directory.
The scripts are setup so that they still work (although without sending email)
if they aren't edited so the chance for a user-screw-up is quite a bit lower
than if they were doing all of this by hand.
Then I can point them to my modified hot-backup.py script designed for nightly
cron jobs that stored bzip'd tar files of the repos rather than an uncompressed
copy.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 17 03:58:23 2003