You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Peter Kahn <ci...@gmail.com> on 2006/08/02 19:57:42 UTC

HOOK Script Question: how can I determine url from a transaction with SVNlook

How can I add custom text to the error output for a commit?

I run a repository with http access for browsing and svnserve access for
commits.  I keep on having users checkout with http, not be able to check
in, and then I direct them to my "svn switch --relocate" doc.  I'd like to
have the svn failure message for the commit return text that directs the
users to that doc (so I don't have to).  I already do this for other
situations (like no checkin comment) via hook scripts.  So, I'd like to add
this one to the hook script as well.

My problem is that in the hook script I can get at the local path to the
repository and the transaction name.
What I'd like is the url that was used.

Is there any way for me to get at that or am I trying to reach my goal via
the wrong path?

-- 
Peter Kahn
citizenkahn@gmail.com
citizenkahn@jabber80.com, pkahnpie1@AIM, skype: citizenkahn
http://analogoustendencies.blogspot.com/
Awareness - Intention - Action

Re: HOOK Script Question: how can I determine url from a transaction with SVNlook

Posted by Les Mikesell <le...@gmail.com>.
On Wed, 2006-08-02 at 15:57 -0400, Peter Kahn wrote:
> How can I add custom text to the error output for a commit?
> 
> I run a repository with http access for browsing and svnserve access
> for commits.  I keep on having users checkout with http, not be able
> to check in, and then I direct them to my "svn switch --relocate" doc.
> I'd like to have the svn failure message for the commit return text
> that directs the users to that doc (so I don't have to).  I already do
> this for other situations (like no checkin comment) via hook scripts.
> So, I'd like to add this one to the hook script as well. 
> 
> My problem is that in the hook script I can get at the local path to
> the repository and the transaction name. 
> What I'd like is the url that was used.  
> 
> Is there any way for me to get at that or am I trying to reach my goal
> via the wrong path? 

Wouldn't it be easier to allow writes via http (or https and use that
for browsing too)?

-- 
  Les Mikesell
    lesmikesell@gmail.com


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

Re: HOOK Script Question: how can I determine url from a transaction with SVNlook

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 8/2/06, Peter Kahn <ci...@gmail.com> wrote:
> How can I add custom text to the error output for a commit?
>
> I run a repository with http access for browsing and svnserve access for
> commits.  I keep on having users checkout with http, not be able to check
> in, and then I direct them to my "svn switch --relocate" doc.  I'd like to
> have the svn failure message for the commit return text that directs the
> users to that doc (so I don't have to).  I already do this for other
> situations (like no checkin comment) via hook scripts.  So, I'd like to add
> this one to the hook script as well.
>
> My problem is that in the hook script I can get at the local path to the
> repository and the transaction name.
> What I'd like is the url that was used.
>
> Is there any way for me to get at that or am I trying to reach my goal via
> the wrong path?

svnlook doesn't have access to that information.  It just doesn't
exist at that level.  You'll have to encode that logic into your hook
script, based on your knowledge of the repository's URL.

-garrett

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

Re: HOOK Script Question: how can I determine url from a transaction with SVNlook

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 2, 2006, at 21:57, Peter Kahn wrote:

> I run a repository with http access for browsing and svnserve  
> access for commits.  I keep on having users checkout with http, not  
> be able to check in, and then I direct them to my "svn switch -- 
> relocate" doc.  I'd like to have the svn failure message for the  
> commit return text that directs the users to that doc (so I don't  
> have to).  I already do this for other situations (like no checkin  
> comment) via hook scripts.  So, I'd like to add this one to the  
> hook script as well.
>
> My problem is that in the hook script I can get at the local path  
> to the repository and the transaction name.
> What I'd like is the url that was used.
>
> Is there any way for me to get at that or am I trying to reach my  
> goal via the wrong path?

Presumably you have one repository which is served via both apache  
and svnserve? And you want to allow commits that occurred via  
svnserve but not those that occurred via apache? If apache and  
svnserve run as different users, that might be one way -- if the hook  
is running as the svnserve user, allow it, otherwise not.



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