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

Re: [PATCH]: fix check-mime-type.pl for changes to 'svnlook proplist' output

From: Leo Davis <ldavis_at_speechfxinc.com>
Date: Mon, 17 Mar 2014 13:25:40 -0600


I decided to go with the last approach. I've tried it on subversion 1.1.4 and
1.8.5, and the simple testcases seem to indicate it works on both of them.

I've attached the patch (from trunk) and a small collection of testcases in a

   Fix check-mime-type.pl for output changes to 'svnlook proplist' in a
maximally backward compatible way. Tested against subversion 1.1.4 and 1.8.5.

   The output format of 'svnlook proplist' was changed in revision 1416637.

   See also http://svn.haxx.se/dev/archive-2012-11/0510.shtml

   * contrib/hook-scripts/check-mime-type.pl:
     -- Also test files when properties have been modified, not just added, to
ensure that properties don't vanish.
     -- Replace "svnlook proplist --verbose" with a two step process of
"svnlook proplist" and "svnlook propget". This was done because "svnlook
proplist --verbose" cannot unambiguously be parsed without --xml with
multiline properties.
      -- Remove unused code.


On Monday, March 03, 2014 09:12:32 AM Leo Davis wrote:
> Hello,
> Another approach is to dump 'svnlook proplist' altogether and use 'svnlook
> propget svn:mime-type' and 'svnlook propget svn:eol-style' instead. That
> could be maximally backward compatible without introducing XML.
> Regards,
> Leo
> ________________________________________
> From: Ben Reser <ben_at_reser.org>
> Sent: Sunday, March 02, 2014 11:40 PM
> To: Leo Davis; Daniel Shahaf
> Cc: dev_at_subversion.apache.org
> Subject: Re: [PATCH]: fix check-mime-type.pl for changes to 'svnlook
> proplist' output
> On 3/2/14, 5:34 PM, Leo Davis wrote:
> > As Ben pointed out, the current parser in the script for svnlook <= 1.7.x
> > is broken and unfixable for multiline properties. The closest we can get
> > to DTRT in this case is to have svnlook output XML. Hopefully no one
> > still cares about svnlook <= 1.3 (?) that cannot output XML.>
> > On Mar 2, 2014, at 8:11 AM, "Daniel Shahaf" <d.s_at_daniel.shahaf.name>
> >> One more issue: however you change the parser, it will break if
> >> svnlook1.7 or older is used. It would be nice to DTRT in that case
> >> (either error out or retain the old parser).
> It would be nice to have, but I think the effort to provide it is just too
> great unless we go down the XML path. Which is a pretty large change in the
> requirements of the script.
> Anyone that wants it can go get a copy of the script off the 1.7.x branch
> (assuming we merge the fix to the 1.8.x branch). This is contrib we have no
> compatibility guarantees to worry about either.
> Just put a prominent notice at the top of the script saying that it is only
> intended for use with 1.8.x or newer servers.

Received on 2014-03-17 20:26:24 CET

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