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

Re: post-commit not happening

From: Christopher Ness <chris_at_nesser.org>
Date: 2005-01-08 22:47:19 CET

On Sat, 2005-08-01 at 13:03 -0800, Marilyn Davis wrote:
> I'm sorry, I didn't realize it was relevent:

No worries, but I'm not sure what language you are writing in here?
Bash? If so kill the quotes I think. Unless you need them for passing
the variables.

In that case when there are strings around a variable in Bash I think
you need to quote the variable in {}'s. It can be tricky.

> ---

#!/bin/bash
REPOS="$1"
REV="$2"

# I kept the REPOS var in quotes just in case there are spaces
# or funny characters passed in.
# The REV var should always be an integer.
/usr/local/bin/svnadmin dump "${REPOS}" -r${REV} --incremental > /backup/increments/${REV}

/bin/cat > /backup/increments/mailer << EOF
From: fishgills@fishgills.net
To: md@deliberate.com
Subject: Commited: "${REV}"

EOF

/bin/cat /backup/increments/${REV} >> /backup/increments/mailer

/usr/exim/bin/exim -oMr DM_OUTSIDE_0_DELIVER_Inbox_none -t -f fishgills@fishgills.net < /backup/increments/mailer

---
> 
> I fixed up the paths; I emptied my PATH; I ran it on the command line
> -- fine.
For testing try this.
   env -i /safe/hooks/post-commit /safe 48
This should truly empty your environment variables AFAIK.  Check `env`'s
man page for more info.
> Is there a log or error output somewhere that I can be looking at?
No log file I know of.  If you want one (you are mostly making one by
building an email for each revision) you need to make one in the script.
Nice to see you trying to answer some questions on the list too!
HTH's
Chris
-- 
Software Engineering IV,
McMaster University
PGP Public Key: http://www.nesser.org/pgp-key/
16:25:26 up 3:07, 1 user, load average: 0.15, 0.21, 0.21 
http://www.fsf.org/philosophy/no-word-attachments.html

Received on Sat Jan 8 22:54:05 2005

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