You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by ul...@sdm.de on 2005/07/21 08:29:11 UTC

1.1.x client with 1.2.x server

Hi,

I am running a 1.2.x server, because I need the locking feature for binary
files (Word/Excel). 
My users are now running different clients version, spreading from 1.1.3 to
1.2.1. 
How can I now ensure, that files with a set svn:needs-lock property are not
able to be modified or checked-in with a smaller client version than 1.2
(because I want to avoid conflicts)?
Are there any checks I can activate? Or is this a bug or feature?

Thx Uli

Re: 1.1.x client with 1.2.x server

Posted by James FitzGibbon <jf...@primustel.ca>.
On Jul-21-05, at 4:29 AM, <ul...@sdm.de>  
<ul...@sdm.de> wrote:

> My users are now running different clients version, spreading from  
> 1.1.3 to 1.2.1.
> How can I now ensure, that files with a set svn:needs-lock property  
> are not able to be modified or checked-in with a smaller client  
> version than 1.2 (because I want to avoid conflicts)?
>
> Are there any checks I can activate? Or is this a bug or feature?
You can't verify the client version in a server-side hook.  There was  
a thread a few months back about being able to verify client  
capabilities, but I don't recall if changes to effect it made it onto  
the roadmap.  I certainly don't think any released svn code can do  
that yet.

What you can do is verify that anything that has 'svn:needs-lock' set  
is locked in a pre-commit check.

Since 1.[01].x clients cannot establish locks, this will effectively  
prevent them from committing to any such files, but this could also  
be a source of frustration, because they don't see 'svn:needs-lock'  
as anything special and will be able to checkout and modify, then get  
unceremoniously kicked out on commit.  Of course, a client upgrade  
will allow them to continue with the checkin, so long as nobody using  
a 1.2.x client has snagged the lock since their initial checkout.

The pre-commit-check.py script in the contrib/hook-scripts directory  
would be fairly easy to modify to do this, as it gives you a map of  
properties to values.  You just want to check for the existence and  
validity of the 'locked' property if 'svn:needs-lock' has a value.   
contrib/hook-scripts/pre-lock-require-needs-lock.py might also be  
instructional as it contains specific examples of looking at the  
'svn:needs-lock' property of a node in a hook.

Hope that helps.

-- 
j.

James FitzGibbon
Systems Developer, Primus Telecommunications Canada
416.644.6111




-- 
----------------------------------------------------------------------------
This electronic message contains information from Primus Telecommunications
Canada Inc. ("PRIMUS") , which may be legally privileged and confidential.
The information is intended to be for the use of the individual(s) or entity
named above. If you are not the intended recipient, be aware that any
disclosure, copying, distribution or use of the contents of this information
is prohibited. If you have received this electronic message in error, please
notify us by telephone or e-mail (to the number or address above)
immediately. Any views, opinions or advice expressed in this electronic
message are not necessarily the views, opinions or advice of PRIMUS.
It is the responsibility of the recipient to ensure that
any attachments are virus free and PRIMUS bears no responsibility
for any loss or damage arising in any way from the use
thereof.The term "PRIMUS" includes its affiliates.
----------------------------------------------------------------------------
Pour la version en fran�ais de ce message, veuillez voir
 http://www.primustel.ca/fr/legal/cs.htm
----------------------------------------------------------------------------