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

[PATCH] perform keywords substitution in mod_dav_svn

From: jinfroster <jinfroster_at_mail.ru>
Date: Sun, 7 Apr 2013 21:38:07 +0400

Hello, dev!
Here is my second attempt:

Accept "kw" parameter in query string. Treat any value except "0" as a
request to perform server-side keywords substitution in file contents.

* subversion/mod_dav_svn/dav_svn.h
  (struct dav_resource_private): add keyword_subst flag.

* subversion/mod_dav_svn/repos.c
  (svn_subst.h): Add #include.
  (parse_querystring): Set keyword_subst flag if query string contains
    "kw" parameter with any value except "0".
    If keyword_subst flag is set, don't send "Content-length". We
    can't guess the size of expanded stream at the moment.
    If keyword_subst flag is set, perform keywords substitution like
    client-side utilities do.

The URL looks like this:

VB> On Fri, Mar 8, 2013 at 2:24 PM, Ben Reser <ben_at_reser.org> wrote:
VB> On Fri, Mar 8, 2013 at 11:12 AM, Vladimir Berezniker <vmpn_at_hitechman.com> wrote:
>> If someone does not mind explaining. What would be the benefit of having
>> this decision be made by the server vs the client having to request that via
>> a explicit parameter on the request?

VB> It's not so much of a benefit as it is a compatibility problem. We
VB> support WebDAV clients with auto-versioning. WebDAV+auto-versioning
VB> lets you mount a SVN repository as though it was a regular file system
VB> and just start making changes with each change automatically committed
VB> as a revision. These clients are at current indistinguishable from a
VB> web browser, they make similar requests that a web browser would and
VB> don't have some pattern we can key off in the GET request.

VB> When using these clients it's important that we don't present to them
VB> a different version of the file than what the repository actually
VB> stores. Otherwise we break this functionality.

VB> Using a query parameter means you can ask for the keyword expansion
VB> without breaking these clients.

VB> Query parameter makes perfect sense to me. Thank you.

Best regards,
 jinfroster                            mailto:jinfroster_at_mail.ru

Received on 2013-04-07 19:38:42 CEST

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