Reading my original reply, I see that I could have been clearer: the hooks run as whoever Apache is running as (on Windows, this is LocalSystem). Running the hook from the command line proves nothing, unless you run it as LocalSystem.
What I meant was that, when you use SVN normally (whether it be through SVNKit or not), it'll use the cached credential data from C:\Documents and Settings\whatever-user\Application Data\Subversion\auth.
This is compared with the authn stuff you have configured in Apache (I use mod_auth_sspi to talk to our domain controller; others use mod_auth_ldap to talk to AD; still others use mod_authz_svn to use authz.conf).
Since you've never used SVN from the LocalSystem account, it won't have any credentials cached. You have (at least) the following choices:
1. Log in as LocalSystem (if you're on XP/2003, you can use at.exe for this; google for how -- if you're on Vista/2008, you can't do this). Then run svn from the command line, and get some credentials cached.
2. Run Apache as a different service account, one where you've already cached some credentials.
Cheers,
Roger.
-----Original Message-----
From: hughacland_at_googlemail.com [mailto:hughacland_at_googlemail.com]
Sent: Wed 09 July 2008 14:39
To: Roger Lipscombe
Subject: RE: Very Odd Behaviour of svn update from command line. Bug?
Hi Roger,
Many thanks for your help in this matter. Very much appreciate it. I have taken your advice and thought I might be able to get around the problem by writing a simple java application which would use the SVNKit API (svnkit.jar) to update the working copy. When run from the command line I am happy that the Java application works as intended. I then modified post-commit.bat to run the java app. Again, when post-commit.bat is run from the command line all is ok but once again when Tortoise client commits changes remotely I have exactly the same problem: the working copy is not updated even though I have contained the update command in a separate java program. Very odd behaviour and I am at a loss to explain. There should be no problem with Authentication/Authorization now as the java code works fine when run from the command line...
I would really appreciate your thoughts on this one!
Many thanks,
Hugh
Roger Lipscombe wrote:
>
> The 'svn update' runs under the context of the Apache user, and requires
> that it be able to access the repository.
>
> On Windows, this is the LocalSystem account (by default). Depending on how
> you've got your authentication and authorization set up (I use
> mod_auth_sspi, for example), LocalSystem may not be able to access the
> repository to complete the 'svn update'.
>
> To confirm this, pipe the output from svn update to another file, so you
> can see if it's reporting any errors.
>
> "svn update > foo 2>&1" ought to work.
>
> This doesn't affect "svn info", since (the way you're using it) it only
> accesses the working copy.
>
> Cheers,
> Roger.
>
> -----Original Message-----
> From: HAcland [mailto:hughacland_at_googlemail.com]
> Sent: Mon 07 July 2008 16:12
> To: users_at_subversion.tigris.org
> Subject: Very Odd Behaviour of svn update from command line. Bug?
>
>
> I am using:
>
> MS Windows 2003,
> SVN-win32-1.4.6,
> Apache/2.2.6 (Win32) DAV/2 SVN/1.4.5 mod_ssl/2.2.6 OpenSSL/0.9.8g,
>
> It appears as though there is some kind of an issue with running 'svn
> update' on a working copy from a 'post-commit.bat'. Here's what happens:
>
> Scenario 1:
>
> post-commit.bat:
> D:
> cd D:\***\***\workingCopy\
> PATH C:\Program Files\subversion\svn-win32-1.4.6\bin\;
> svn update
> mkdir demoDirToProveAPoint
> svn info > infofile.txt
>
> C:
> end
>
> Run post-commit.bat from command line directly. No problem at all. Works
> fine and updates the working directory. Also a new directory is correctly
> created called 'demoDirToProveAPoint' and the svn info is correctly piped
> to
> a file called infofile.txt
>
> All great and life is happy when running directly from command line.
>
> Scenario 2:
>
> with exactly the same post-commit.bat
>
> however this time from a remote computer, using Tortoise, a commit is made
> after modifying a file. One would expect the svn hook to kick in at the
> desired time and automatically to run 'post-commit.bat' in exactly the
> same
> way as if it was run from the command line directly.
>
> The result is that the 'mkdir demoDirToMakeAPoint' and 'svn info >
> infofile.txt' work correctly but the 'svn update' fails to action.
>
> What is going on here? Looks like a weird bug. Any one help me out?
>
> thanks
> Hugh
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Very-Odd-Behaviour-of-svn-update-from-command-line.-Bug--tp18319051p18319051.html
> Sent from the Subversion Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>
>
>
> DISCLAIMER: This is a PRIVATE message. If you are not the intended
> recipient, please delete without copying and kindly advise us by e-mail of
> the mistake in delivery. NOTE: Regardless of content, this e-mail shall
> not operate to bind 1E Ltd to any order or other contract unless pursuant
> to explicit written agreement or government initiative expressly
> permitting the use of e-mail for such purpose
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: users-help_at_subversion.tigris.org
>
>
>
Quoted from:
http://www.nabble.com/Very-Odd-Behaviour-of-svn-update-from-command-line.-Bug--tp18319051p18320220.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-07-09 15:48:54 CEST