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

Re: use hoock script to make an upload file auto lock ?

From: Greg Thomas <thomasgd_at_omc.bt.co.uk>
Date: 2005-11-28 15:40:55 CET

On Mon, 28 Nov 2005 15:16:40 +0100, Flapflap <listes@sans-facon.net>

>I wonder if I can create a script that simply will lock a file when
>upload (using a post-uplaod.tmpl).

It's possible, yes. In your post-commit hook, you'll need to examine
every file that is added to the repository. If it is binary (check the
svn:mime-type - http://subversion.tigris.org/faq.html#binary-files)
then you'll need to check it out, add the svn:needs-lock property, and
commit it back, and then tidy up.

I looked at it, and gave because of the complexity of having a
post-commit hook manage a local working copy. I'd rather wait until
you can use propset on a URL - see bug
http://subversion.tigris.org/issues/show_bug.cgi?id=2238 currently
scheduled for 1.4.

An easier option is to use the auto-props facility
(http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.4) to
set the svn:needs-lock property on files with extensions you add - but
this would need to be done on a per-client basis rather than once at
the server.


This post represents the views of the author and does
not necessarily accurately represent the views of BT.
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Nov 28 15:48:09 2005

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.