You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Dan Shookowsky <ds...@gmail.com> on 2006/07/10 18:26:43 UTC

Probably a simple problem with hook script

I'm writing a hook script to update a working copy on post-commit.
The target platforms are Windows for both the apache/subversion server
and for the working copy location.  The working copy is located on a
separate box from the apache/subversion server.  The issue right now
is that the hook executes but fails with no indication of what
happened.

What I've done so far:
* Apache is only internal, not exposed to the world.  This allows us
to use windows accounts for authentication/authorization to the
repository.  The apache server has a self-signed certificate that I've
trusted.

* The apache account is a domain user account that also owns the
repository and has write access to the WC folder.

*  I've echoed the environment variables in-use while the batch file
is running and they are not substantially different from those present
when the script is run interactively at a command prompt (with the
extra AP_PARENT_ID).  At the command prompt, the script is successful.

*  The script performs a svn info on the repository and redirects
output to a log file.  This shows that the repository is accessible
when running under apache.

* Output redirection from the svn update "uncpathname"  ends up with a
0-length file

The actual command line looks like this:
svn update "\\UNCPathToWC" --username "domain\user" --password
"password" > E:\logs\post-commit.log

Can someone please tell me I'm an idiot and I'm forgetting one tiny detail?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Probably a simple problem with hook script

Posted by Dan Shookowsky <ds...@gmail.com>.
On 7/10/06, Dan Shookowsky <ds...@gmail.com> wrote:
> On 7/10/06, Ryan Schmidt <su...@ryandesign.com> wrote:
> > On Jul 10, 2006, at 20:26, Dan Shookowsky wrote:
> >
> > > * Output redirection from the svn update "uncpathname"  ends up with a
> > > 0-length file
> > >
> > > The actual command line looks like this:
> > > svn update "\\UNCPathToWC" --username "domain\user" --password
> > > "password" > E:\logs\post-commit.log
> >
> > Are you remembering to either use the complete absolute path to the
> > svn command (isn't it svn.exe on Windows?), or else setting the path
> > to something useful before calling svn?
> >
>
> yes...the path is set correctly and I've confirmed this by dumping the
> environment variables and the output of the svn info command.  I've
> just done a test of this with a local working copy and it has been
> successful...now I just need to figure out why it's not working on the
> remote path name when executed under apache.
>
In the end it appears to be an issue with a space in the remote folder
name....despite the fact that I had quotes around the path.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Probably a simple problem with hook script

Posted by Dan Shookowsky <ds...@gmail.com>.
On 7/10/06, Ryan Schmidt <su...@ryandesign.com> wrote:
> On Jul 10, 2006, at 20:26, Dan Shookowsky wrote:
>
> > * Output redirection from the svn update "uncpathname"  ends up with a
> > 0-length file
> >
> > The actual command line looks like this:
> > svn update "\\UNCPathToWC" --username "domain\user" --password
> > "password" > E:\logs\post-commit.log
>
> Are you remembering to either use the complete absolute path to the
> svn command (isn't it svn.exe on Windows?), or else setting the path
> to something useful before calling svn?
>

yes...the path is set correctly and I've confirmed this by dumping the
environment variables and the output of the svn info command.  I've
just done a test of this with a local working copy and it has been
successful...now I just need to figure out why it's not working on the
remote path name when executed under apache.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Probably a simple problem with hook script

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 10, 2006, at 20:26, Dan Shookowsky wrote:

> * Output redirection from the svn update "uncpathname"  ends up with a
> 0-length file
>
> The actual command line looks like this:
> svn update "\\UNCPathToWC" --username "domain\user" --password
> "password" > E:\logs\post-commit.log

Are you remembering to either use the complete absolute path to the  
svn command (isn't it svn.exe on Windows?), or else setting the path  
to something useful before calling svn?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Probably a simple problem with hook script

Posted by Dan Shookowsky <ds...@gmail.com>.
On 7/10/06, Gavin Lambert <ga...@compacsort.com> wrote:
> Quoth Dan Shookowsky <ma...@gmail.com>:
> > I'm writing a hook script to update a working copy on
> > post-commit. The target platforms are Windows for both the
> > apache/subversion server and for the working copy location.
> > The working copy is located on a separate box from the
> > apache/subversion server.  The issue right now is that the
> > hook executes but fails with no indication of what happened.
> [...]
> > The actual command line looks like this:
> > svn update "\\UNCPathToWC" --username "domain\user"
> > --password "password" > E:\logs\post-commit.log
>
> If it's writing to stderr rather than stdout then you'd need to redirect
> that as well.  I think you put 2>&1 or 2&>1 (I forget which) at the end
> of the command line to do that.
>
>

Thanks for the tip...I was getting used to all the other shortcomings
of the windows command shell and didn't expect stderr redirection to
be in there...this should help.

BTW it's 2>&1

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx?mfr=true

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Probably a simple problem with hook script

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Dan Shookowsky <ma...@gmail.com>:
> I'm writing a hook script to update a working copy on
> post-commit. The target platforms are Windows for both the
> apache/subversion server and for the working copy location.
> The working copy is located on a separate box from the
> apache/subversion server.  The issue right now is that the
> hook executes but fails with no indication of what happened.
[...]
> The actual command line looks like this:
> svn update "\\UNCPathToWC" --username "domain\user"
> --password "password" > E:\logs\post-commit.log

If it's writing to stderr rather than stdout then you'd need to redirect
that as well.  I think you put 2>&1 or 2&>1 (I forget which) at the end
of the command line to do that.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org