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

Re: 1.1.x client with 1.2.x server

From: James FitzGibbon <jfitzgibbon_at_primustel.ca>
Date: 2005-07-21 12:15:38 CEST

On Jul-21-05, at 4:29 AM, <ulrich.griesser@sdm.de>
<ulrich.griesser@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
----------------------------------------------------------------------------
Received on Thu Jul 21 12:17:26 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.