You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by al...@muly.dk on 2005/11/30 08:47:54 UTC

svn:externals unavailable in hooks ?

hi

i have a post-commit hook that works like a charm.

now we want to run a hook on a path in the repository where one of the 
folders have the svn:externals property

that is we run an svn export and on one of these exported folders there 
is the svn:externals property. (this is confirmed by doing a checkout 
instead of an export and then afterwards checking that the property is 
really there)

if i run the hook from the command line on the server it works 
correctly, but when invoked like a hook it doesn't ?


why is that ?
is there some environment specific i need to look into or ?



svn, version 1.2.0 (r14790)
apache 2.0.54


thanks
./allan






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

Re: svn:externals unavailable in hooks ?

Posted by al...@muly.dk.
Quoting Ryan Schmidt <su...@ryandesign.com>:

> On Nov 30, 2005, at 09:47, allan wrote:
>
>> i have a post-commit hook that works like a charm.
>>
>> now we want to run a hook on a path in the repository where one of  
>> the folders have the svn:externals property
>>
>> that is we run an svn export and on one of these exported folders  
>> there is the svn:externals property. (this is confirmed by doing a  
>> checkout instead of an export and then afterwards checking that the  
>> property is really there)
>>
>> if i run the hook from the command line on the server it works  
>> correctly, but when invoked like a hook it doesn't ?
>>
>>
>> why is that ?
>> is there some environment specific i need to look into or ?
>
> We use externals, and our deployment process involves doing an export
> of a working copy. It works fine for us, with Subversion 1.2.3 served
> over Apache2 with https. I also just tried doing an export directly
> from the repository without an intermediate working copy, and that
> works too. So I don't see why externals would relate to the problem.

> Hooks run with an empty environment... does it still work from the
> command line if you empty the environment first? Assuming you're
> using something Unix-like:
>
> cd /path/to/repository/hooks
> env -i ./post-commit
>
> Are you specifying all paths in the hook as absolute paths?
>
>
> If those tips don't help, maybe send us your post-commit script;
> maybe we can spot something.
>
>
>> svn, version 1.2.0 (r14790)
>
> I'd recommend 1.2.3, of course, not because I'm aware of any specific
> fixes that would relate to this, but just to be as current as possible.


thanks for the input

i agree, why would it relate at all.
my script hangs the moment svn tries to get the externals. ie, after it 
has downloaded all the other stuff without any problems

my $cmd = "path_to_svn_exe export file://localhost/d:/repos/rep_1/path";

my externals URL is an http url specfied like:

   LIB http://domain/rep_1/path

it would be nice if one could just specify the relative repository path
like just "/rep_1/path"

it seems after an empty ENV that http in general is unavailable on our 
sytsem (win32). so i cannot get the http request on an empty ENV.

now i have tried to re-read the ENV (hardcoding) then i can indeed run 
it on the server but NOT via the hook ??

./allan





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

Re: svn:externals unavailable in hooks ?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 30, 2005, at 09:47, allan wrote:

> i have a post-commit hook that works like a charm.
>
> now we want to run a hook on a path in the repository where one of  
> the folders have the svn:externals property
>
> that is we run an svn export and on one of these exported folders  
> there is the svn:externals property. (this is confirmed by doing a  
> checkout instead of an export and then afterwards checking that the  
> property is really there)
>
> if i run the hook from the command line on the server it works  
> correctly, but when invoked like a hook it doesn't ?
>
>
> why is that ?
> is there some environment specific i need to look into or ?

We use externals, and our deployment process involves doing an export  
of a working copy. It works fine for us, with Subversion 1.2.3 served  
over Apache2 with https. I also just tried doing an export directly  
from the repository without an intermediate working copy, and that  
works too. So I don't see why externals would relate to the problem.

Hooks run with an empty environment... does it still work from the  
command line if you empty the environment first? Assuming you're  
using something Unix-like:

cd /path/to/repository/hooks
env -i ./post-commit

Are you specifying all paths in the hook as absolute paths?


If those tips don't help, maybe send us your post-commit script;  
maybe we can spot something.


> svn, version 1.2.0 (r14790)

I'd recommend 1.2.3, of course, not because I'm aware of any specific  
fixes that would relate to this, but just to be as current as possible.


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