[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: How to get File Path in post-lock

From: Andy Levy <andy.levy_at_gmail.com>
Date: Thu, 8 Jan 2009 08:47:01 -0500

On Wed, Jan 7, 2009 at 23:37, Vishal Gangwal
<vishalgangwal_at_waterford.org> wrote:
>
> Thanks !! for the prompt response.
>
> Can we get particular file path which is just locked at that moment
> using post-lock hook script?
> , As using lslocks $REPOS_PATH | grep $USER will get all files that are
> locked by that user till that moment.
>
> Let me explain our scenario - if say one file is locked by the user , we
> want to lock few more related files depending on that file using
> post-lock hook script.
>
> Is there any other way apart from post-lock hook script which will give
> file path which is just locked at that moment in that transaction ?

Could you instead check in the pre-lock that he's locking all the
required files, and reject the lock request if that's not
happening/not possible?

AFAIK, a lock has to be done from a WC, you can't lock a file in the
repository via URL without a corresponding WC.

> And what exactly the post-lock hook template means by this - " The paths
> that were just locked are passed to the hook via STDIN " ?
>
> Thanks & Regards
> Vishal
>
> -----Original Message-----
> From: Daniel Shahaf [mailto:d.s_at_daniel.shahaf.name]
> Sent: Wednesday, January 07, 2009 8:02 PM
> To: Andy Levy
> Cc: Vishal Gangwal; users_at_subversion.tigris.org
> Subject: Re: How to get File Path in post-lock
>
> Andy Levy wrote on Wed, 7 Jan 2009 at 08:58 -0500:
>> On Wed, Jan 7, 2009 at 00:42, Vishal Gangwal
>> <vishalgangwal_at_waterford.org> wrote:
>> > Hi
>> >
>> > In post-lock hook script of subversion we get repos-path and user as
>
>> > arguments .
>> > Can we get the file path which is locked in post-lock hook script ?
> If yes
>> > how to get it ?
>>
>
> See hooks/post-lock.tmpl.
>
>> svnadmin lslocks $REPOS_PATH | grep $USER will get you all files that
>> are locked by that user.
>>
>>
>
Received on 2009-01-08 14:48:04 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.