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

Re: Request: make the user agent string a define

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-01-08 19:14:24 CET

Max Bowsher wrote:
> SteveKing wrote:
>> A feature which is requested often on the TSVN mailing list is the
>> ability to check the client version in a pre-commit hook.
>> (the latest request was because they wanted to reject commits from TSVN
>> clients which don't have the bugtraq features implemented yet)
> For the non TSVN users here, could you explain what these features are?

TSVN introduced some properties which it uses to make it easier for
users to enter issue numbers into a log message.
The document describing this is located here:

Other properties TSVN introduced and which users/admins make want to
enforce a minimum TSVN version numbers are documented here:

> Perhaps because I don't understand that, I can't see any reason to
> forbid a client which can talk a compatible protocol from communicating
> with a Subversion server.

It's not to forbid a reliable client. It's to forcing users to update
their clients (e.g. in case of a security bug in older versions or in
this case to enforce a client which has certain features so users don't
forget to enter an issue number, write a log message with a minimum log
message size, ...)

>> I've searched the mailing lists and found that this is already possible
>> if the repository is hosted on an Apache server.
>> (http://svn.haxx.se/dev/archive-2003-05/1680.shtml)
>> Then I looked at the source where that agent string is set/sent:
>> subversion/libsvn_ra_dav/session.c, line 659,660 (1.1.2 tag)
>> ne_set_useragent(sess, "SVN/" SVN_VERSION);
>> ne_set_useragent(sess2, "SVN/" SVN_VERSION);
>> As it is now, another client can't change that string to something else
>> (e.g. "TSVN/1.1.2"), so I'd like to request that this is changed into a
>> define (which of course defaults to "SVN/"SVN_VERSION) but can be
>> changed by a client when compiling/linking to the Subversion libs.
> I don't think that a define can do that.

Why not? You can write something like
and then use SVN_AGENT_STRING in those two lines mentioned above.
A client could then compile the Subversion libs with SVN_AGENT_STRING
set to something else.

>> Even better would be if Subversion would allow to set revprops with
>> every command that affects the repository. That way, a new revprop (e.g.
>> svn:user-agent) could be written every time. This would also have the
>> advantage that you could later check each revision and find out with
>> which client is was made. And of course it wouldn't be restricted to
>> Apache based repositories.
> Logging the useragent of every commit into a revprop?
> My initial reaction is "yuck!".
> What real use could this data be put to?

Think about a statistics page generated of a repository. Or do you think
that all those web statistics which show the browser (type and version)
with which the webpage was accessed are completely useless too?
Sure, it's not something that's very important, but surely 'nice to have'.

Also, revprops can be checked in a pre-commit hook.


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jan 8 19:15:33 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.