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

Re: svn lock command with multiple files/paths

From: Ryan Schmidt <subversion-2008a_at_ryandesign.com>
Date: Wed, 13 Feb 2008 02:35:36 -0600

On Feb 12, 2008, at 19:57, Michael Weaver wrote:

>>> On Feb 12, 2008, at 11:15, Reedick, Andrew wrote:
>>>
>>>> Print the transaction id in each email (to see if svn really is
>>>> breaking locks up into three individual transactions.)
>>>> Try running "svn lock -targets file.txt" to see if that will force
>>>> it into one transaction.
>>>> Post your hook code to see if you're making a dumb mistake
>>>> somewhere.
>>>
>>> But locks do not occur in transactions... No transaction (or
>>> revision) is created when you lock or unlock...
>>
>> Doh! Good point. An even better point can be found in the
>> post-lock.tmpl script (svn 1.4.5):
>>
>> # The paths that were just locked are passed to the hook via STDIN
>> (as
>> # of Subversion 1.2, only one path is passed per invocation, but the
>> # plan is to pass all locked paths at once, so the hook program
>> # should be written accordingly).
>>
>>
>> So only one path is being passed in via STDIN at a time?
>
>
> The subversion book states:
> Additionally, the list of paths locked is passed to the hook
> program via
> standard input, one path per line.
>
> I am guessing the hook templates probably haven't been updated in a
> while....

But what you said you're observing matches the description in the
hook template, doesn't it?

> Right now I am currently testing on the same PC, client and server on
> one machine. Has anyone else successfully passed in all paths to
> stdin?
> I am going to test on two different machines in a min. Also prior to
> 1.2 how has one written a hook script to account for multiple locks,

Prior to Subversion 1.2 there was no locking feature.

http://subversion.tigris.org/svn_1.2_releasenotes.html

> is their a way to tell when all the locks have been performed when
> doing
> individually?

I'm guessing no.

> I could create a text file as all locks come in and then
> when I get the last one send out an email? Is there an easy way to
> tell
> when the last lock is performed?

It doesn't sound like it.

I assume this is just the unimplemented feature whereby the lock
hooks are invoked a single time for all files, instead of separately
for each file. I don't see an enhancement request filed specifically
for this, though these may be related:

http://subversion.tigris.org/issues/show_bug.cgi?id=2263

http://subversion.tigris.org/issues/show_bug.cgi?id=2699

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-13 09:36:20 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.