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

Re: Commit hooks malfunctioning...

From: <kfogel_at_collab.net>
Date: 2005-01-21 19:05:02 CET

"Dassi, Nasser" <NDassi@141xm.com> writes:
> For Simon and everyone else,
> Same concern (step #3 of 5 fails), more technical example. Running SVN
> 1.1.2 on WinXP. The batch file is anywhere:
> [snip]
> Set workdir=c:\htdocs
> Cd %workdir%
> Svn status > %workdir%\list.txt
> Cscript c:\svnrepos\proj1\hooks\gen_add.vbs (CREATES list_add.txt in
> proper directory)
> Svn add --targets %workdir%\list_add.txt --force
> Del %workdir%\list.txt
> Del %workdir%\list_add.txt
> [/snip]
> The above batch script executes 100% when called directly; however, the
> "svn add" command does not fire when the entire post-commit hook
> executes. I know the other steps are executed because if I comment-out
> the file deletion lines, the files remain and are clearly populated (the
> "gen_add.vbs" parses the SVN STATUS output into filename-only entries).
> Any help is very much appreciated. Thanks...

The environment the hooks run in is different when invoked directly by
you, versus invoked by Subversion as part of a commit.

In the latter case, the hook program typically does not inherit the
environment of its parent process. For example, a common problem is
for the PATH ($PATH or %PATH, in Unix and Windows respectively)
environment variable to not be set to its usual value, so that
subprograms fail to launch unless invoked via absolute path. If
you're having unexpected problems with a hook program, the culprit is
probably unusual (or missing) environment variables like PATH.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jan 21 19:16:31 2005

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