You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by hw...@yahoo.de on 2005/09/08 12:41:14 UTC

How to get an hook script (especiallly the mailer.py) working under windows?

First of all: I'm a real beginner in this svn-stuff,
so sorry for my maybe stupid question.

I have an repository, where I put a file called
post-commit.bat in the hook-directory, which has the
function of just creation a .txt-file with a static
text for testing.
When I do a commit, it should create the txt, but it
doesn't, maybe it's a problem with the environmental
settings, but I don't know what to change to get it
work.
Can you help me with this ( I think the explanation in
the svn-book about windows is a bit short for
beginners..)
I'm not able to cahnge the OS, because it's an
existing server, where other apps still are running

When I install the mailer.py later  (again), I have to
also rename the mailer.py and put the mailer.conf in
the conf directorz, right??
Is it enough to run the mailer just with the setting
of t_address and smtp_hostname (the other stuff I can
add later on)
Thanks!!! 


	

	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

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

Re: How to get an hook script (especiallly the mailer.py) working under windows?

Posted by Johan Appelgren <jo...@gmail.com>.
On 9/8/05, hwtoaster-3dc@yahoo.de <hw...@yahoo.de> wrote:
> First of all: I'm a real beginner in this svn-stuff,
> so sorry for my maybe stupid question.
> 
> I have an repository, where I put a file called
> post-commit.bat in the hook-directory, which has the
> function of just creation a .txt-file with a static
> text for testing.
> When I do a commit, it should create the txt, but it
> doesn't, maybe it's a problem with the environmental
> settings, but I don't know what to change to get it
> work.
> Can you help me with this ( I think the explanation in
> the svn-book about windows is a bit short for
> beginners..)
> I'm not able to cahnge the OS, because it's an
> existing server, where other apps still are running
> 
> When I install the mailer.py later  (again), I have to
> also rename the mailer.py and put the mailer.conf in
> the conf directorz, right??
> Is it enough to run the mailer just with the setting
> of t_address and smtp_hostname (the other stuff I can
> add later on)
> Thanks!!!

I think it would be easier to help you if you told us what your
post-commit.bat contains. You are aware that when the hook is run no
enviromental variables are set, as stated here
<http://subversion.tigris.org/faq.html#hook-debugging>? Also, does the
user subversion runs as on your server have write permissions where
you are trying to write the file?

When it comes to mailer.py you have to call it using a post-commit.bat
hook since subversion does not recognize .py files as executable on
windows. Only .exe, .bat and .cmd I think.

/Johan

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


Ant: Re: How to get an hook script (especiallly the mailer.py) working under windows?

Posted by hw...@yahoo.de.
--- Jonathan White <jo...@oeaw.ac.at>
schrieb:

> 
> hwtoaster-3dc@yahoo.de wrote:
> 
> >I have an repository, where I put a file called
> >post-commit.bat in the hook-directory, which has
> the
> >function of just creation a .txt-file with a static
> >text for testing.
> >When I do a commit, it should create the txt, but
> it
> >doesn't, maybe it's a problem with the
> environmental
> >settings, but I don't know what to change to get it
> >work.
> >  
> >
> I was having similar problems - I couldn't get the
> hook script to be
> called until I read Peter McNabs mail to the list
> 'Hook scripts for
> win32'. He adds the Subversion bin folder to the
> path and everything
> works like a dream:
> 
> rem Post-Commit Hook script for Subversion
> @echo off
> rem Add path to Subversion executable
> set path=%path%;c:\Program Files\Subversion\bin
> rem Dump revision
> set destDir=c:\dumps\revisions
> mkdir %destDir%
> svnadmin dump --incremental --deltas --revision %2
> %1 > %destDir%\r%2
> exit 0
> 
> Hope that helps
> 
> Jonnie
> 
> 
> 
Ok, my simple batch file is running now, the error
was, that i tried to write the .txt in the hook
directory, which seems to be forbidden.
So now I can run a batch file after a commit, but I
don't understand who to call the mailer.py, can you
explain that to memore detailed, please (maybe with an
example batch, where you call the mailer.py with its
parameters?)

THANKS!
Franz


	
		
___________________________________________________________ 
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de

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

Re: How to get an hook script (especiallly the mailer.py) working under windows?

Posted by Jonathan White <jo...@oeaw.ac.at>.
hwtoaster-3dc@yahoo.de wrote:

>I have an repository, where I put a file called
>post-commit.bat in the hook-directory, which has the
>function of just creation a .txt-file with a static
>text for testing.
>When I do a commit, it should create the txt, but it
>doesn't, maybe it's a problem with the environmental
>settings, but I don't know what to change to get it
>work.
>  
>
I was having similar problems - I couldn't get the hook script to be
called until I read Peter McNabs mail to the list 'Hook scripts for
win32'. He adds the Subversion bin folder to the path and everything
works like a dream:

rem Post-Commit Hook script for Subversion
@echo off
rem Add path to Subversion executable
set path=%path%;c:\Program Files\Subversion\bin
rem Dump revision
set destDir=c:\dumps\revisions
mkdir %destDir%
svnadmin dump --incremental --deltas --revision %2 %1 > %destDir%\r%2
exit 0

Hope that helps

Jonnie



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