You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@subversion.apache.org by "Stefan Sperling (JIRA)" <ji...@apache.org> on 2018/11/12 09:49:00 UTC

[jira] [Commented] (SVN-4784) auto-props cannot match filename patterns starting with [

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

Stefan Sperling commented on SVN-4784:
--------------------------------------

A similar problem exists in the authz parser:

"Access control via authz cannot handle square brackets in paths"
https://issues.apache.org/jira/browse/SVN-4204

> 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)