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

AW: Need checkout commits...

From: Felix Gilcher <gilcher_at_exozet.com>
Date: 2005-12-12 11:22:33 CET

Maxx <mailto:maxx@eureca.ru> schrieb am Montag, 12. Dezember 2005 11:10:

> Hello!
>
> We migrate from Visual SourceSafe to Subversion.
> So i must configure subversion for our users:
> a file will block when file is checkout. It is
> need because half of repository files are in
> Microsoft Office format. I try to do this by hook
> scripts. But i appear that hook scripts exist only
> for modify events:

You wouldn't want the file to be locked in the repository when it gets checked out - you never check out a single file, so for a working copy of one directory, all files in the directory would be locked and could not be edited by any other user. What you should do is set the "svn:needs-lock" property so that users must lock the file before editing. This property is supported by recent versions of subversion as well as tortoisesvn. So the workflow gets:

0. user checks out a working copy

1. user locks the file he wishes to edit
2. user edits the file
3. user checks in the file and unlocks it (tortoise gives you the option to keep the lock as well)

4. go back to 1, do an update first

you may wish to use autoprops so that every file gets the svn:needs-lock property. You should as well use a pre-commit hook to enshure that no file can be commited that lacks the property (to keep misconfigured clients from messing up the repository).

>
> http://svn.haxx.se/users/archive-2004-07/0865.shtml
>> We generally only have hooks for write operations, not read.
>>
>> If you post saying exactly what you're trying to do, maybe someone
>> can think of another way.
>>
>> -Karl
>
> So how can i solve my problem? Can i block file in repository by
> hooks? Somebody can say that i can execute two commands: checkout and
> block. But as client we used TortoiseSVN, not a command line.
> Therefore i want to solve my problem on server side.
>
> Thank you.

regards

felix

-- 
Felix Gilcher
Head of IT Development
Exozet Berlin GmbH
Rotherstraße 20
10245 Berlin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Dec 12 11:27:07 2005

This is an archived mail posted to the Subversion Users mailing list.