[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: auto-props syntax in file vs. property

From: Chris <devnullaccount_at_yahoo.se>
Date: Wed, 10 Jan 2018 07:25:07 +0000 (UTC)

Hi Daniel,

thanks for the reply.
You're right that it seems to work when I do "svn add" and with that config file, but when I do the same with svn_apply_autoprops.py, it acts badly. I simply forgot to check the regular add :)
So I get the problem when I do:
  ./svn_apply_autoprops.py --config myconfig /path/to/workspace

Then it will set charset and mime-type as two separate properties.
(and yes, it sets 3 properties overall, I just meant that the mime-type got split into two)

I guess there's something in the parser in svn_apply_autoprops that is misbehaving rather than svn itself. A quick look in that file shows this line:
    for prop in props.split(';'):
Which I suspect is the root cause of the issue, although I haven't verified it yet. I guess I need to figure out some python basics and see if I can ugly-hack that to work for double semicolons.

/Chris

--------------------------------------------
On Tue, 1/9/18, Daniel Shahaf <d.s_at_daniel.shahaf.name> wrote:

 Subject: Re: auto-props syntax in file vs. property
 To: users_at_subversion.apache.org
 Date: Tuesday, January 9, 2018, 5:05 PM
 
 Chris wrote on Tue, 09 Jan 2018
 15:15 +0000:
> When setting
 svn:auto-props, it seems I can do this:
>
 
>  *.java =
 svn:mime-type=text/java;;charset=iso-8859-1;svn:eol-style=LF
>
> That is, use ;; as
 an escape between the "parameters" for file type
 and
> charset. Adding a java-file and
 doing propget gives this:
>
 text/java;charset=iso-8859-1
> Which
 seems to be correct. Right?
 
 Yes.
 
>
 Using the exact same line in ~/.subversion/config seems to
 see "charset"
> as a separate
 property from "mime-type" and set two different
 properties
> on the file with
 "charset" having no meaning.
 
 I can't reproduce this.  With that line in
 ~/.subversion/config I get:
 
 [[[
 % svn add foo.java
 A        foo.java
 % svn pl
 -v foo.java
 Properties on
 'foo.java':
   svn:eol-style
     native
   svn:mime-type
     text/java;charset=iso-8859-1
 ]]]
 
 (The value
 'native' was inherited from svn:auto-props in the
 working
 copy I was testing in.)
 
 Also, does it really set *two*
 properties on the file?  Not three? 
 "svn:mime-type",
 "charset",
 "svn:eol-style"?
 
 What client and version do you use?
 
 Cheers,
 
 Daniel
 
Received on 2018-01-10 08:25:28 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.