You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Lorenz <lo...@yahoo.com> on 2013/05/24 14:39:04 UTC
custom keyword expansion
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.
I this a bug or a feature 8-)
Could that be fixed/changed? For instance by defining %= similar to %_
The goal is to expand
<attribute name="SAL" value="SAL-EAGLE:$">
to
<attribute name="SAL" value="SAL-EAGLE:"/><attribute
name="BRD-SVN-REV" value="1234"/><attribute name="dummy" value=" $">
I anyone is interested in why I want to do such obscure things, just
ask and I try to explain 8-)
And last but not least: could that be incorporated into the 1.8
release?
Pretty, pretty please.
--
Lorenz
Re: custom keyword expansion
Posted by Lorenz <lo...@yahoo.com>.
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
Re: custom keyword expansion
Posted by Branko Čibej <br...@wandisco.com>.
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
Re: custom keyword expansion
Posted by Lorenz <lo...@yahoo.com>.
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.
2) additional enhancement request
would it be possible to add '%n' for newline?
--
Lorenz
Re: custom keyword expansion
Posted by Lorenz <lo...@yahoo.com>.
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.
--
Lorenz
Re: custom keyword expansion
Posted by Stefan Sperling <st...@elego.de>.
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.
>
> I this a bug or a feature 8-)
>
> Could that be fixed/changed? For instance by defining %= similar to %_
>
>
> The goal is to expand
>
> <attribute name="SAL" value="SAL-EAGLE:$">
>
> to
>
> <attribute name="SAL" value="SAL-EAGLE:"/><attribute
> name="BRD-SVN-REV" value="1234"/><attribute name="dummy" value=" $">
>
> I anyone is interested in why I want to do such obscure things, just
> ask and I try to explain 8-)
>
>
>
> And last but not least: could that be incorporated into the 1.8
> release?
> Pretty, pretty please.
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 your report!