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

Re: Client version from Server side

From: Blair Zajac <blair_at_orcaware.com>
Date: Mon, 30 Mar 2009 17:56:46 -0700

Ryan Schmidt wrote:
> On Mar 30, 2009, at 05:09, Alain Palamara wrote:
>
>> Is there a way to know the client version from the server part (i.e in
>> a hook script). I know this question was already posted, but I don't
>> saw a clear answer (the thread diverged on other subject).
>
> I think the answer is no.
>
>
>> My point is to ask the user to upgrade their client to a minimal
>> version the next time he commit. I know it should not be a problem
>> to use older client with newer server, but I don't want to support
>> questions about missing features of older version (we mainly use
>> Tortoise as client). Of course our users are all "in House", this is
>> not question of open project repositories.
>
> I believe there is a way for the server to know if the client has the
> new merging support in Subversion 1.5. So there is a way you can
> block clients < 1.5. But I don't think there's any way to get more
> specific than that, or to know exactly what version the client is.

The start-commit script is passed a colon-separated list of capabilities
reported by the client.

Here's the text from a newly created start-commit script:

# The start-commit hook is invoked before a Subversion txn is created
# in the process of doing a commit. Subversion runs this hook
# by invoking a program (script, executable, binary, etc.) named
# 'start-commit' (for which this file is a template)
# with the following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] USER (the authenticated user attempting to commit)
# [3] CAPABILITIES (a colon-separated list of capabilities reported
# by the client; see note below)
#
# Note: The CAPABILITIES parameter is new in Subversion 1.5, and 1.5
# clients will typically report at least the "mergeinfo" capability.
# If there are other capabilities, then the list is colon-separated,
# e.g.: "mergeinfo:some-other-capability" (the order is undefined).
#
# The list is self-reported by the client. Therefore, you should not
# make security assumptions based on the capabilities list, nor should
# you assume that clients reliably report every capability they have.

Regards,
Blair

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1488849

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-03-31 02:58:00 CEST

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.