subversion-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej (JIRA) <j...@apache.org>
Subject [jira] [Comment Edited] (SVN-4784) auto-props cannot match filename patterns starting with [
Date Thu, 06 Dec 2018 08:36:00 GMT

    [ https://issues.apache.org/jira/browse/SVN-4784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16706659#comment-16706659
] 

Branko ─îibej edited comment on SVN-4784 at 12/6/18 8:35 AM:
------------------------------------------------------------

*Proposal*

1. Do not change how the config parser works for this case.

2. Introduce an anchor character for auto-props patterns:
* if the pattern begins with a single caret "{{\^}}", remove that caret from the pattern;
* if the pattern begins with a double caret "{{\^\^}}", replace it with a single caret "{{\^}}".

Examples:
{noformat}
[auto-props]
^^magic = svn:eol-style=native      
^[Dd]ockerfile = svn:eol-style=native      
{noformat}
would be interpreted as:
{noformat}
[auto-props]
^magic = svn:eol-style=native      
[Dd]ockerfile = svn:eol-style=native      
{noformat}



was (Author: brane):
*Proposal*

1. Do not change how the config parser works for this case.

2. Introduce an anchor character for auto-props patterns:
* if the pattern begins with a single caret "{{\^}}", remove that caret from the pattern.
* if the pattern begins with a double caret "{{\^\^}}", replace it with a single caret "{{\^}}";

Examples:
{noformat}
[auto-props]
^^magic = svn:eol-style=native      
^[Dd]ockerfile = svn:eol-style=native      
{noformat}
would be interpreted as:
{noformat}
[auto-props]
^magic = svn:eol-style=native      
[Dd]ockerfile = svn:eol-style=native      
{noformat}


> auto-props cannot match filename patterns starting with [
> ---------------------------------------------------------
>
>                 Key: SVN-4784
>                 URL: https://issues.apache.org/jira/browse/SVN-4784
>             Project: Subversion
>          Issue Type: Bug
>          Components: libsvn_subr
>    Affects Versions: all
>            Reporter: Stefan Sperling
>            Priority: Minor
>
> An auto-props configuration matching the beginning of a path with a character class expression
((such as [a-zA-Z]) doesn't work as expected.
> In the following example, only the first auto-prop option, for *.yaml files, will take
effect:
> {noformat}
> [miscellany]
> enable-auto-props = yes
> [auto-props]
> *.[Yy][Aa][Mm][Ll] = svn:needs-lock;svn:keywords=Date Rev Author URL Id;svn:eol-style=native
> [Dd]ockerfile = svn:keywords=Date Rev Author URL Id;svn:eol-style=native      
> *.[Pp][Ll]  = svn:mime-type=text/x-perl;svn:keywords=Date Rev Author URL Id;svn:eol-style=native;svn:executable
> {noformat}
> This is because the config parser actually evaluates the above example as:
> {noformat}
> [miscellany]
> enable-auto-props = yes
> [auto-props]
> *.[Yy][Aa][Mm][Ll] = svn:needs-lock;svn:keywords=Date Rev Author URL Id;svn:eol-style=native
> [Dd]
> ockerfile = svn:keywords=Date Rev Author URL Id;svn:eol-style=native      
> *.[Pp][Ll]  = svn:mime-type=text/x-perl;svn:keywords=Date Rev Author URL Id;svn:eol-style=native;svn:executable
> {noformat}
> I.e. the parser sees a section called "Dd" which is ignored entirely.
> Indenting "[Dd]ockerfile" by one space will make auto-props work for both test.yaml and
test.pl but neither for dockerfile nor Dockerfile:
> {noformat}
> [miscellany]
> enable-auto-props = yes
> [auto-props]
> *.[Yy][Aa][Mm][Ll] = svn:needs-lock;svn:keywords=Date Rev Author URL Id;svn:eol-style=native
>  [Dd]ockerfile = svn:keywords=Date Rev Author URL Id;svn:eol-style=native      
> *.[Pp][Ll]  = svn:mime-type=text/x-perl;svn:keywords=Date Rev Author URL Id;svn:eol-style=native;svn:executable
> {noformat}
> The above makes the dockerfile entry a continuation line for the previous line,
> and this continuation line seems to be ignored.
> So far, the only known workaround is to avoid use of character class matching in the
first column of a line in the configuration file:
> {noformat}
> [miscellany]
> enable-auto-props = yes
> [auto-props]
> *.[Yy][Aa][Mm][Ll] = svn:needs-lock;svn:keywords=Date Rev Author URL Id;svn:eol-style=native
> Dockerfile = svn:keywords=Date Rev Author URL Id;svn:eol-style=native      
> dockerfile = svn:keywords=Date Rev Author URL Id;svn:eol-style=native      
> *.[Pp][Ll]  = svn:mime-type=text/x-perl;svn:keywords=Date Rev Author URL Id;svn:eol-style=native;svn:executable
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message