You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kevin Radke <km...@gmail.com> on 2008/04/10 17:54:25 UTC

[CONTRIB] server-side/add-needs-lock.py

Attached you can find a simple python script that adds missing
svn:needs-lock properties directly to files in the repository as a new
revision.  No working copy is required, but the script must run on
your subversion server.  (Either periodically, or as part of a
post-commit hook script)

I wrote this for a few reasons:

1) It was taking about 45 minutes to do this job on a 40G working copy
with regular svn commands.  This script takes less than 5 minutes.
Really fast if you make it part of your post-commit hook.  (Too many
non-technical users had problems setting up autoprops, so we just
decided to "clean up" after them instead.)
2) I haven't yet sent in an updated patch to allow svn propset on URLs...
3) One of my 2 year old twins has decided I don't need any sleep after
2am, so I had some free time.

This script could (and probably should) be extended to support all
autoprops, like client-side/svn_apply_autoprops.py does.

Comments are welcome.  But please be kind, my python is pretty rusty.

Hopefully someone finds this useful, and possibly it is worthy to be
placed in contrib...

Kevin R.

Re: [CONTRIB] server-side/add-needs-lock.py

Posted by Karl Fogel <kf...@red-bean.com>.
kmradke@rockwellcollins.com writes:
>> Ping.  Has anyone looked at Kevin's contribution?
>
> I know of one other user who found it useful and is using it.  Haven't
> heard anything from the devs...

Added to contrib/server-side/add-needs-lock.py in r30693.

Thanks Kevin, and sorry for the delay.  If you'd like to maintain the
script there from now on, please forward a copy of this mail to
svnadmin{_AT_}svn.collab.net, including in that message your
tigris.org username and, optionally, an htpasswd-crypted password.
(If you don't provide a password, a temporary one will be chosen for
you -- in either case, you can change your password yourself later
<https://svn.collab.net/wpct/>.)  Afterwards, we'll add you to the
appropriate place in the COMMITTERS file.

-Karl

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

Re: [CONTRIB] server-side/add-needs-lock.py

Posted by km...@rockwellcollins.com.
Daniel Shahaf <d....@daniel.shahaf.co.il> wrote on 04/18/2008 06:18:39 AM:
> Kevin Radke wrote on Thu, 10 Apr 2008 at 12:54 -0500:
> > Attached you can find a simple python script that adds missing
> > svn:needs-lock properties directly to files in the repository as a new
> > revision.  No working copy is required, but the script must run on
> > your subversion server.  (Either periodically, or as part of a
> > post-commit hook script)
> > 
> > I wrote this for a few reasons:
> > 
> > 1) It was taking about 45 minutes to do this job on a 40G working copy
> > with regular svn commands.  This script takes less than 5 minutes.
> > Really fast if you make it part of your post-commit hook.  (Too many
> > non-technical users had problems setting up autoprops, so we just
> > decided to "clean up" after them instead.)
> > 2) I haven't yet sent in an updated patch to allow svn propset on 
URLs...
> > 3) One of my 2 year old twins has decided I don't need any sleep after
> > 2am, so I had some free time.
> > 
> > This script could (and probably should) be extended to support all
> > autoprops, like client-side/svn_apply_autoprops.py does.
> > 
> > Comments are welcome.  But please be kind, my python is pretty rusty.
> > 
> > Hopefully someone finds this useful, and possibly it is worthy to be
> > placed in contrib...
> 
> Ping.  Has anyone looked at Kevin's contribution?

I know of one other user who found it useful and is using it.  Haven't
heard anything from the devs...

> Kevin: could your script be implemented in terms of 
svn_apply_autoprops.py?
> Why is a new script needed?

Yes, svn_apply_autoprops.py could be modified to use the python api
and operate directly on the repository.  (In fact, it has a comment
about it should be modified to use the API).
(However, I believe svn_apply_autoprops.py is in the client-side area
 and my version has to run server-side.)

Ideally it would be nice to merge the functionality, but I'm probably
not in a position to perform that merge...

Kevin R.

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

Re: [CONTRIB] server-side/add-needs-lock.py

Posted by Daniel Shahaf <d....@daniel.shahaf.co.il>.
Kevin Radke wrote on Thu, 10 Apr 2008 at 12:54 -0500:
> Attached you can find a simple python script that adds missing
> svn:needs-lock properties directly to files in the repository as a new
> revision.  No working copy is required, but the script must run on
> your subversion server.  (Either periodically, or as part of a
> post-commit hook script)
> 
> I wrote this for a few reasons:
> 
> 1) It was taking about 45 minutes to do this job on a 40G working copy
> with regular svn commands.  This script takes less than 5 minutes.
> Really fast if you make it part of your post-commit hook.  (Too many
> non-technical users had problems setting up autoprops, so we just
> decided to "clean up" after them instead.)
> 2) I haven't yet sent in an updated patch to allow svn propset on URLs...
> 3) One of my 2 year old twins has decided I don't need any sleep after
> 2am, so I had some free time.
> 
> This script could (and probably should) be extended to support all
> autoprops, like client-side/svn_apply_autoprops.py does.
> 
> Comments are welcome.  But please be kind, my python is pretty rusty.
> 
> Hopefully someone finds this useful, and possibly it is worthy to be
> placed in contrib...
> 
> Kevin R.
> 

Ping.  Has anyone looked at Kevin's contribution?

Kevin: could your script be implemented in terms of svn_apply_autoprops.py?
Why is a new script needed?

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