You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by si <ss...@gmail.com> on 2006/01/12 04:03:18 UTC
Re: Retrieving commit information in post-commit hook & hook script s tandard output
Hi Tejinder,
> svn log --revision HEAD --verbose > CommitInfo.txt
>
> The commit occurs but I don't see the CommitInfo output file.
Perhaps it's related to the "Tip" in:
http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks
Or it's also in <repos>/hooks/post-commit.tmpl
# The hook program typically does not inherit the environment of
# its parent process. For example, a common problem is for the
# PATH 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 may be unusual (or missing) environment variables.
so try /path/to/svn ... maybe that will sort you out.
> Also, I've noticed that any output sent to standard out (screen) by the
> hooks is not displayed to the user. Is there any way to make it possible to
> write to the standard output?
AFAIK You can use stderr in the pre-commit hook,
from <repos>/hooks/pre-commit.tmpl:
# If the hook program exits with success, the txn is committed; but
# if it exits with failure (non-zero), the txn is aborted, no commit
# takes place, and STDERR is returned to the client. The hook
# program can use the 'svnlook' utility to help it examine the txn.
I believe the other pre-... hooks follow the same behaviour.
peace
si
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org