[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: Max Bowsher <maxb_at_ukf.net>
Date: 2005-01-08 18:58:03 CET

SteveKing wrote:
> Hi,
>
> 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?

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.

> 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.

> Better would be a new function to set that string (usefull for those
> clients which use the precompiled language bindings).

A function could though.

I'm not sure if I agree that changing the UA is right though. It is the SVN
libraries which have control over the connection, not whichever client
happens to be telling the libraries what operations to perform.

> 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?

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Jan 8 18:59:46 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.