On Wed, 24 Mar 2010, Tim Starling wrote:
> Hook scripts start with an empty environment instead of inheriting it
> from svnserve or whatever.
>
> This is inconvenient, not least for the case where you want to commit
> something to an svn+ssh server via a local pushmi mirror on file:/// and
> your SSH_AUTH_SOCK is lost so you have to type your passphrase all the time.
As a workaround for this particular issue, you could do the following
without modifying svn at all:
* Run svn through a wrapper script that saves the value of
SSH_AUTH_SOCK to a file whose name is derived from the pid
(e.g. echo $SSH_AUTH_SOCK >/tmp/ssh-auth-sock.$$).
* In the hook script, walk up the chain of parent processes (e.g.
by parsing the output from "ps") until it finds the pid of the
wrapper script; then read the file that the wrapper script saved.
On the other hand, I think it would be reasonable to have a configurable
way of allowing specified environment variables to be passed to hook
scripts.
--apb (Alan Barrett)