[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: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: Tue, 27 Jan 2009 14:25:04 -0800

On Sun, Jan 4, 2009 at 9:49 PM, 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 ?
>
> Thanks & Regards
> Vishal
>
> 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 ?

The file that was just locked is passed to the script via STDIN. So you have
to do the following (assuming unix-like system):

    read locked_file

and $locked_file will have the file that was just locked.

Note that only one file is passed to the script at a time. That is, if there
are multiple files that are locked, then the script will called that many
number of times; each call with one file.

regards,
-Hari

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1060551

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-27 23:45:26 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.