You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Flapflap <li...@sans-facon.net> on 2005/11/28 14:16:40 UTC
use hoock script to make an upload file auto lock ?
Hi there,
I got svn on a svnserver on w2k server.
I wonder if I can create a script that simply will lock a file when
upload (using a post-uplaod.tmpl). Is it possible event on windows ?
Thanks
--
Flapflap[at]sans-facon.net --
DevBlog : http://www.kilooctet.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: use hoock script to make an upload file auto lock ?
Posted by Greg Thomas <th...@omc.bt.co.uk>.
On Mon, 28 Nov 2005 15:16:40 +0100, Flapflap <li...@sans-facon.net>
wrote:
>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.
Greg
--
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
Re: use hoock script to make an upload file auto lock ?
Posted by Flapflap <li...@sans-facon.net>.
Flapflap a écrit :
> Hi there,
>
> I got svn on a svnserver on w2k server.
In fact my svnserver is on windows but my repository will all be set in
a linux server...
>
> I wonder if I can create a script that simply will lock a file when
> upload (using a post-uplaod.tmpl). Is it possible event on windows ?
>
> Thanks
>
--
Flapflap[at]sans-facon.net --
DevBlog : http://www.kilooctet.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org