Stefan Sperling created SVN-4784:
------------------------------------

             Summary: 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


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)

Reply via email to