I've answered this question a few times on IRC, and have decided that
that constitutes "frequent" ... so:
[[[
Add more detail to ``Why aren't my repository hooks working?''
]]]
Index: faq.html
===================================================================
--- faq.html (revision 13185)
+++ faq.html (working copy)
@@ -182,9 +182,7 @@
with Apache on Win32 and I'm getting an error saying that the
module cannot be found, yet the mod_dav_svn.so file is right
there in <tt>\Apache\modules.</tt></a></li>
-<li><a href="#hook-environment">Why aren't my repository hooks working?
- They're supposed to invoke external programs, but the invocations
- never seem to happen.</a></li>
+<li>Why aren't my repository hooks working?</li>
<li><a href="#diff-cmd">Why does my --diff-cmd complain about '-u'?
I tried to override it with --extensions, but it's not working.</a></li>
<li><a href="#plaintext-passwords">Ahhh! I just discovered that my
@@ -2388,10 +2386,12 @@
<![CDATA[-----------------------------------------------------------]]>
<a name="win32-hooks"></a> <!-- for compatibility with old question -->
-<h3><a name="hook-environment" title="#hook-environment"
- >Why aren't my repository hooks working?
+<h3><a name="hook-debugging" title="#hook-debugging"
+ >Why aren't my repository hooks working?</a></h3>
+ <ul>
+ <li>
They're supposed to invoke external programs, but the invocations
- never seem to happen.</a></h3>
+ never seem to happen.
<p>When invoking other programs from repository hook scripts, try
using absolute paths. The environment the hooks get when Subversion
@@ -2400,7 +2400,30 @@
environment the hooks get when you test them by hand. In particular,
$PATH on Unix, or %PATH% on Windows, may not have all the directories
you expect.</p>
-
+</li>
+ <li>General tips</li>
+<p>
+If you're using Linux or Unix, try running the script "by hand", after
+ doing the following preparation:
+ <ol>
+ <li>Use "sudo" or similar to become the user who normally
+ would run the script. This might be <tt>httpd</tt> or
+ <tt>www-data</tt>, for example, if you're using Apache;
+ it might be a user like <tt>svn</tt> if you're running
+ svnserve and have created a special user.</li>
+ <li>
+ Invoke the script with the "env" program. Here's an
+ example for the post-commit hook:
+<blockquote><pre>
+ $ env - ./pre-commit /var/lib/svn-repos 1234
+</pre></blockquote>
+ </li>
+ <li>
+ Check your console for errors.
+ </li>
+ </ol>
+</p>
+</ul>
<![CDATA[-----------------------------------------------------------]]>
--
We don't know how to use the security and encryption features
of our e-mail server. We are so confused that we cannot even be
certain that this e-mail was delivered to the proper person. So,
if you received this e-mail because of our incompetence, please
delete it and notify us as soon as possible. Notice that this is
being written in the most scary legalistic way, so no one notices
how incompetent we are.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 1 19:49:16 2005