On 2009-06-10, Borek Bernard <borekb_at_gmail.com> wrote:
> I'm running Apache 2.2 server (Windows) with SVN 1.6.2 and want to update my production server after each commit. Therefore, I've set up a post-commit hook like this:
>
>
> svn update \\myserver\livefolder
> exit 0
>
>
> When I execute this post-commit.bat script on command line, it works fine. However, when the hook script gets executed by Apache, my production server isn't updated. To help debug the issue, this is how I amended the script:
>
>
> echo %time% > mylog.txt
> svn update \\myserver\livefolder
> exit 0
>
>
> Normally, in mylog.txt file, I should see something like
>
>
> 13:44:11.91
> U \\wendy\wendyd\worddocs\temp.txt
> Updated to revision 35.
>
>
> which I indeed do when the script is run from the command line but when I run it via the commit operation, I can see only the timestamp. Isn't it weird that the svn update doesn't output anything? Not even "updated to revision XYZ"? At the same time, I think the command doesn't crash because all the subsequent lines (if there are any) are executed just fine.
>
> Even more curiously, when I add some other server like \\testserver\testlocation to the script (after the failing production server), it gets updated fine.
The user account Apache is running under doesn't have the appropriate
permissions on the UNC path you're attempting to update. When you log
in and run it, it's using your credentials, not Apache's.
Doing things like this across different servers can get tricky.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2360953
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-06-10 17:22:38 CEST