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

Re: custom keyword expansion

From: Lorenz <lorenznl_at_yahoo.com>
Date: Mon, 27 May 2013 09:50:08 +0000

Branko ?ibej wrote:
>On 27.05.2013 10:46, Lorenz wrote:
>> Lorenz wrote:
>>> Stefan Sperling wrote:
>>>> On Fri, May 24, 2013 at 12:39:04PM +0000, Lorenz wrote:
>>>>> I'm playing around with the new custom keyword expansion.
>>>>>
>>>>> I would like to create a keyword like:
>>>>>
>>>>>
>>>>> SAL-EAGLE="/><attribute%_name="BRD-SVN-REV"%_value="%r"/><attribute%_name="dummy"%_value="
>>>>>
>>>>> Problem is, that as soon as I incorporate a '=' character in my
>>>>> definition, keyword expansion for that keyword stops working.
>>>>> [...]
>>>> Fixed in http://svn.apache.org/r1486072 and nominated for backport
>>>> to the 1.8.x series. Not sure if this fix will make 1.8.0, but it
>>>> should make 1.8.1.
>>> thanks for the quick fix.
>>>
>>> I'm using a TSVN nightly in the moment. If the fix doesn't make it
>>> into 1.8.0 I possibly just grab a the next TSVN nightly that contains
>>> it.
>> 1) There still seems to be a bug in the custom keyword expansion
>> (using the TSVN nightly which pulls from subversions 1.8.x branch from
>> last night).
>>
>> When I use the attached text file with
>>
>> svn propset svn:keywords -F val.txt <file-path>
>>
>> to set the keywords, I get an incomplete expansion.
>>
>> The file contains
>>
>> <attribute name="SAL-EAGLE" value="$Sal-Eagle:$"/>
>>
>> which gets expanded to
>>
>> <attribute name="SAL-EAGLE" value="$Sal-Eagle: "/><attribute
>> name="SVN-A" value="LL"/><attribute name="SVN-B"
>> value="untitled.sch"/><attribute name="SVN-D" value="2013-05-27
>> 08:27:28Z"/><attribute name="SVN-P"
>> value="eagleTests2/untitled.sch"/><attribute name="SVN-R"
>> value="162"/><attrib $"/>
>>
>> please note that the expansion is cut-off in the middle of
>> '<attribute'. That's 256 character if I count correctly. Looks like a
>> fixed and to small buffer size.
>
>That is not a bug. See
>
>http://subversion.apache.org/docs/release-notes/1.8.html#custom-keywords
>
>which clearly states that the limit for keyword expansions is 255 bytes.
>This limit is intentional and has been there pretty much since keywords
>were invented in Subversion.

I learned about custom keyword expansion from the mailing list, and
didn't read the release notes 8-(.

I can live with that, it only means I need to split my custum keyword
up.

I would suggest to mention that limit in the 'svn help propset' test
though!

>> 2) additional enhancement request
>>
>> would it be possible to add '%n' for newline?
>
>No; In Subversion, keyword expansions are single-line.

would have cleaned up the xml formating in my intended target files,
but works without it too.

-- 
Lorenz
Received on 2013-05-27 11:47:44 CEST

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.