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

RE: post-commit.bat and commit-email.pl working for Windows

From: Garrett, Benjamin D <benjamin.d.garrett_at_lmco.com>
Date: 2004-04-15 19:44:44 CEST

I am re-sending this note, since it seems virus scanners had problems with
directly attaching the batch file to the message the first time. The message
was saved here:
http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=9579
though the "search" functionality in the archive can't seem to find it.
(You can view the attachments just fine in this archived version...)

I attached everything in one zip this time, so hopefully it will work.

-----Original Message (slightly modified)-----

I have managed to get a version of the commit-email.pl working for Windows
(I renamed the file to commit-email-win.pl to distinguish it).
I started with Jeff Cave's diffs, applied them to the 1.0.0 version
of the script, and hacked a few other mods to get it to
work for me (I'm not a perl expert). Feel free to use the attached scripts
however you like.

I hacked a fix in the commit-email-win.pl file for the case where an
"anonymous" user performs a commit.

There is also a "mailerDebugLevel" flag which you can use to set the debug
level of the mailer (useful for figuring out why an email wasn't sent).

I also added the ability to use a separate file (emails.lst) to list out
a bunch of email addresses that will receive the email (as opposed to
the argument-style of passing addresses to the
script, though I think that functionality still works). It is not great code :)

Here are some steps to get these scripts running:
 
1) Install ActiveState ActivePerl v5.8.2 or greater (preferably in C:\Perl).
MAKE SURE the path to the perl executable is in your PATH env var!
2) Copy these files: post-commit.bat, commit-email-win.pl, emails.lst
to: C:\pathToYourRepository\hooks (using whatever the correct root path of your
repository is).
3) Look at the post-commit.bat and commit-email-win.pl script files
with a text editor. Edit any hard-coded paths for the correct
(absolute!) paths for your machine, as well as the correct mail server, etc.!
4) NOTE the scripts require a directory called C:\Temp\svnlook to exist!
5) Edit the emails.lst file with the correct emails (each on a separate line)
of whoever you want to receive post-commit emails.
MAKE SURE you leave a trailing "new-line" (CRLF) at the end of
the file!

Still having trouble? Try turning on some of the debug in these files...

Feel free to fix any bugs or problems you might find, or make any other
improvements, and post them to this list.

Thanks,
Ben

Benjamin Garrett
benjamin.d.garrett@lmco.com

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

Received on Thu Apr 15 19:45:39 2004

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.