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

RE: Exclusive Checkout/Edit for Binaries

From: Peter Milliken <PeterM_at_resmed.com.au>
Date: 2004-08-16 22:56:22 CEST

 

2. Pseudo Exclusive check-outs:
Create a script that allows a use to checkout a file (open a file for edit)
and really updates a lock file within my repository or a property upon the
file in question.
 
            To be honest with you, it doesn't sound all that crazy to do,
but my doc folk like to use
            RapidSVN and TortoiseSVN so I might be looking at adding
features to those that I may
            be stuck maintaining if the rest of the community doesn't see
the need for the feature.
 

Peter,
 
Personally I would look at making all the files read-only on the client(s) -
you could use one of the hooks to enforce this I would imagine. Read-only
will remind the user that they haven't obtained the lock as yet.
 
Then I would write a simple script that grabbed an "exclusive lock" on a
file - the user would run the script and it would communicate to a server
that maintains a simple list of files currently locked (path/filename, user
etc), if permission is granted for the lock then the client side script
write enables the file. If the file is locked by somebody else, then the
client side script is informed of which user has the lock and then verbal
communication/cooperation can take place :-)
 
Whilst this is not the ideal (svn with locks is the ideal) I would imagine
that 1.2 is still a significent period of time away i.e. according to recent
email, release candidates are out there for a minimum of 4 weeks before they
become official releases - and 1.1RC2 has only just hit the streets :-)
 
This isn't difficult to implement - I have set up a somewhat similar system
(which was part of a larger management process) in the past.
 
Goodluck,
Peter

Warning: Copyright ResMed. Where the contents of this email and/or attachment includes materials prepared by ResMed, the use of those
materials is subject exclusively to the conditions of engagement between ResMed and the intended recipient.
 
This communication is confidential and may contain legally privileged information.
By the use of email over the Internet or other communication systems, ResMed is not waiving either confidentiality of, or legal
privilege in,the content of the email and of any attachments.
If the recipient of this message is not the intended addressee, please call ResMed immediately on +61 2 9886 5000 Sydney, Australia.
Received on Mon Aug 16 22:57:06 2004

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