[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: Branko Čibej <brane_at_wandisco.com>
Date: Mon, 27 May 2013 11:07:43 +0200

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.

> 2) additional enhancement request
>
> would it be possible to add '%n' for newline?

No; In Subversion, keyword expansions are single-line.

-- Brane

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Received on 2013-05-27 11:08:29 CEST

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