You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Michael Weaver <MW...@viewpointusa.com> on 2008/02/12 16:58:46 UTC

svn lock command with multiple files/paths

When I run the svn lock command, example below, my hook runs 3x and I
get 3 emails one listing with each path below on stdin.  Shouldn't I be
getting a list of files on stdin with the hook being called once, with
one email?  Has anyone ever seen this?  I am running subversion 1.4.5.
I think according to the documentation everything after 1.3 should pass
a list into stdin of the hook?

 

C:\Documents and Settings\MWeaver.viewpoint\Desktop\Test>svn lock "test
folder\n

ew text document (6).txt" "test folder\new text document.txt" "test
folder\new t

ext document (5).txt" -m ""

'New Text Document (5).txt' locked by user 'mjw'.

'New Text Document (6).txt' locked by user 'mjw'.

'New Text Document.txt' locked by user 'mjw'.

 

Thanks,

 

Mike


Re: svn lock command with multiple files/paths

Posted by Steven Bakke <st...@amd.com>.
On Feb 12, 2008, at 11:58 AM, Michael Weaver wrote:

> When I run the svn lock command, example below, my hook runs 3x and  
> I get 3 emails one listing with each path below on stdin.  Shouldn’t  
> I be getting a list of files on stdin with the hook being called  
> once, with one email?  Has anyone ever seen this?  I am running  
> subversion 1.4.5.  I think according to the documentation everything  
> after 1.3 should pass a list into stdin of the hook?
>
> C:\Documents and Settings\MWeaver.viewpoint\Desktop\Test>svn lock  
> "test folder\n
> ew text document (6).txt" "test folder\new text document.txt" "test  
> folder\new t
> ext document (5).txt" -m ""
> 'New Text Document (5).txt' locked by user 'mjw'.
> 'New Text Document (6).txt' locked by user 'mjw'.
> 'New Text Document.txt' locked by user 'mjw'.
>
> Thanks,
>
> Mike

We found a similar behavior with 'svn update'.  As it turns out, the  
svn client will create a separate repository access session for each  
individual file target given on the command-line.  For example:

% svn update file1 file2 file3 file4*

The wildcard expands into an even bigger list of files.  We use svn 
+ssh as our access method and found that it would open a new SSH  
session for each individual target given.  This also happens if you  
directly use the SWIG wrappers.  When you attempt to update a large  
number of individual targets you get a huge overhead from each of the  
individual connections.

Anyhow back to your problem - I would guess it would be very difficult  
to make this command look like a single operation on the server end,  
since it is the client that is producing multiple 'lock' operations.

-Steve




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


RE: svn lock command with multiple files/paths

Posted by Michael Weaver <MW...@viewpointusa.com>.
Good info, thanks for help.

Mike

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2008a@ryandesign.com] 
Sent: Wednesday, February 13, 2008 3:36 AM
To: Michael Weaver
Cc: Reedick, Andrew; Steven Bakke; users@subversion.tigris.org
Subject: Re: svn lock command with multiple files/paths

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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: svn lock command with multiple files/paths

Posted by Ryan Schmidt <su...@ryandesign.com>.
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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: svn lock command with multiple files/paths

Posted by Michael Weaver <MW...@viewpointusa.com>.
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....

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, is
their a way to tell when all the locks have been performed when doing
individually?  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?

Thanks,



-----Original Message-----
From: Reedick, Andrew [mailto:jr9445@ATT.COM] 
Sent: Tuesday, February 12, 2008 4:11 PM
To: Ryan Schmidt; Michael Weaver
Cc: users@subversion.tigris.org
Subject: RE: svn lock command with multiple files/paths


> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008a@ryandesign.com]
> Sent: Tuesday, February 12, 2008 2:51 PM
> To: Reedick, Andrew
> Cc: Michael Weaver; users@subversion.tigris.org
> Subject: Re: svn lock command with multiple files/paths
> 
> 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 information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential, proprietary, and/or
privileged material. Any review, retransmission, dissemination or other
use of, or taking of any action in reliance upon this information by
persons or entities other than the intended recipient is prohibited. If
you received this in error, please contact the sender and delete the
material from all computers. GA621



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


RE: svn lock command with multiple files/paths

Posted by Michael Weaver <MW...@viewpointusa.com>.
Yes, One path is passed in.  So when locking three files I get three
emails.  Each email contains the path to one of the three files.  Each
time the hook runs, stdin has only one path and its called 3x.    

-----Original Message-----
From: Reedick, Andrew [mailto:jr9445@ATT.COM] 
Sent: Tuesday, February 12, 2008 4:11 PM
To: Ryan Schmidt; Michael Weaver
Cc: users@subversion.tigris.org
Subject: RE: svn lock command with multiple files/paths


> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008a@ryandesign.com]
> Sent: Tuesday, February 12, 2008 2:51 PM
> To: Reedick, Andrew
> Cc: Michael Weaver; users@subversion.tigris.org
> Subject: Re: svn lock command with multiple files/paths
> 
> 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 information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential, proprietary, and/or
privileged material. Any review, retransmission, dissemination or other
use of, or taking of any action in reliance upon this information by
persons or entities other than the intended recipient is prohibited. If
you received this in error, please contact the sender and delete the
material from all computers. GA621



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


RE: svn lock command with multiple files/paths

Posted by "Reedick, Andrew" <jr...@ATT.COM>.
> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008a@ryandesign.com]
> Sent: Tuesday, February 12, 2008 2:51 PM
> To: Reedick, Andrew
> Cc: Michael Weaver; users@subversion.tigris.org
> Subject: Re: svn lock command with multiple files/paths
> 
> 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 information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621



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


Re: svn lock command with multiple files/paths

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 12, 2008, at 11:15, Reedick, Andrew wrote:

>> When I run the svn lock command, example below, my hook runs 3x  
>> and I get 3 emails one listing with each path below on stdin.   
>> Shouldn’t I be getting a list of files on stdin with the hook  
>> being called once, with one email?  Has anyone ever seen this?  I  
>> am running subversion 1.4.5.  I think according to the  
>> documentation everything after 1.3 should pass a list into stdin  
>> of the hook?
>>
>> C:\Documents and Settings\MWeaver.viewpoint\Desktop\Test>svn lock  
>> "test folder\n
>> ew text document (6).txt" "test folder\new text document.txt"  
>> "test folder\new t
>> ext document (5).txt" -m ""
>> 'New Text Document (5).txt' locked by user 'mjw'.
>> 'New Text Document (6).txt' locked by user 'mjw'.
>> 'New Text Document.txt' locked by user 'mjw'.
>
>
> 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...



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


RE: svn lock command with multiple files/paths

Posted by "Reedick, Andrew" <jr...@ATT.COM>.
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.

 

 

From: Michael Weaver [mailto:MWeaver@viewpointusa.com] 
Sent: Tuesday, February 12, 2008 11:59 AM
To: users@subversion.tigris.org
Subject: svn lock command with multiple files/paths

 

When I run the svn lock command, example below, my hook runs 3x and I
get 3 emails one listing with each path below on stdin.  Shouldn't I be
getting a list of files on stdin with the hook being called once, with
one email?  Has anyone ever seen this?  I am running subversion 1.4.5.
I think according to the documentation everything after 1.3 should pass
a list into stdin of the hook?

 

C:\Documents and Settings\MWeaver.viewpoint\Desktop\Test>svn lock "test
folder\n

ew text document (6).txt" "test folder\new text document.txt" "test
folder\new t

ext document (5).txt" -m ""

'New Text Document (5).txt' locked by user 'mjw'.

'New Text Document (6).txt' locked by user 'mjw'.

'New Text Document.txt' locked by user 'mjw'.

 

Thanks,

 

Mike


*****

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA621