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

Re[2]: [PATCH] implement keywords substitution in mod_dav_svn

From: jinfroster <jinfroster_at_mail.ru>
Date: Sun, 10 Feb 2013 20:20:06 +0400

Hello,

CMP> On 02/04/2013 09:55 AM, C. Michael Pilato wrote:
>> On 02/04/2013 06:30 AM, Philip Martin wrote:
>>> jinfroster <jinfroster_at_mail.ru> writes:
>>>
>>>> Add "SVNKeywordSubstitution" per-directory (repository) mod_dav_svn
>>>> configuration parameter (default is "Off"). Implement keywords
>>>> substitution.
>>>
>>>> * subversion/mod_dav_svn/repos.c
>>>> (set_headers):
>>>> If parameter SVNKeywordSubstitution is On, don't send
>>>> "Content-length". We can't guess the size of expanded stream at
>>>> the moment (..is that bad?)
>>>> (deliver):
>>>> If parameter SVNKeywordSubstitution is On, perform keywords
>>>> substitution, like client-side utilities do.
>>>
>>> Does your Subversion client use neon? I think this causes the server to
>>> send expanded keywords in response to GET requests and so will break
>>> Subversion clients using serf.
>>
>> Yes, that's precisely what it does. But the problem isn't limited to Serf
>> clients. Any call to svn_ra_get_file() -- for example, to support 'svn cat'
>> -- will suffer. So, yeah, cool idea, but unfortunately the patch is
>> unacceptable as-is.

CMP> Sorry, hit send too fast. That should be "... Any call to svn_ra_get_file()
CMP> with Neon ..."

You are right! With this patch SVN client complains on bad checksums...
Sorry, didn't test that well.
But SVN clients do keywords substitution themselves. The idea was to
implement substitution for dumb HTTP clients which are missing it.

Would it be sufficent to check 'is_svn_client'?

          if (dav_svn__get_keyword_substitution_flag(resource->info->r)
              && !resource->info->repos->is_svn_client)
            {
            ...

If there are more troubles/questions, please point on them to me.
I'm willing to work on this patch if it has chances to be accepted :)

-- 
Best regards,
 jinfroster                            mailto:jinfroster_at_mail.ru
Received on 2013-02-10 17:20:45 CET

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.