On 1/22/07, JM Ibanez <[EMAIL PROTECTED]> wrote:
"Ian Dexter R. Marquez" <[EMAIL PROTECTED]> writes:
> <code>
>
> #!/bin/sh
>
> `which svn` update /path/to/webapp/docroot
> echo "Updated" | sendmail -t user
>
> </code>

    So, no, if svn isn't in the PATH, doing 'which svn' will NOT get its
    location there. Might as well do this instead:

<code>
   PATH=$PATH:/path/to/svn/bin

   svn update /path/to/webapp/docroot
</code>



Heh. It did, in my case. As I mentioned, I was a bit lazy, but yes, in
the production script, I did include the PATH and other sanity checks.
Thanks.

By the way, I managed to ferret out the issue. Sheer luck, I suppose,
but when I ran the post-commit script as sudo -u httpd_user, I came
across a permission problem: seems like httpd_user was not able to
write the lock file in /path/to/webapp/docroot/.svn. And I thought
that doing a chmod g+s would do that trick for the rest of that
directory. Sheesh.

Anyway, I've sorted it out: the post-commit is hooked whenever local
and remote users do commits on the repo. I've also cleaned the script
based on your recommendations. I'll be adding a stock mailer script,
too, for notification. (An RSS feed would be nice to have as well, but
it's not a priority.)

In summary, I should have carefully checked permissions in the
repository and working directories.

Thanks for feedback and help.

- Ian

--
Ian Dexter R. Marquez
http://iandexter.net | [EMAIL PROTECTED] (XMPP)
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to