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

Re: Server side svn:auto-props, how to set it correctly?

From: Bo Berglund <bo.berglund_at_gmail.com>
Date: Fri, 16 Feb 2018 15:40:16 +0100

On Fri, 16 Feb 2018 05:41:48 -0600, Ryan Schmidt
<subversion-2018_at_ryandesign.com> wrote:

>
>On Feb 15, 2018, at 14:18, Bo Berglund wrote:
>
>> I would like to set our SVN server to enforce some file properties for
>> commonly used files such as images and binary files as well as eol
>> handling between client operating systems.
>
>The server-side auto-props feature can *suggest* properties users should use,
>but if you want to *enforce* that they are used, and prevent commits that don't,
>you have to write a pre-commit hook script to do that.
>
How can a svn server "suggest" that?

I come from CVS where a file that is not marked as binary is processed
with eol-conversion on ceckout and commit. Not the best of worlds
since one has to be careful with how to add files (as text or binary,
default is text).
If one fails here a binary file will be corrupted. Not good.

But it can be fixed by properly configuring the CVSROOT/cvswrappers
file to specify the file type mapping. So that is how we have used
CVS.

When I started to use svn I suddenly realized that the text files were
checked out with UNIX line endings. It happened when a file I looked
at was opened in Notepad and was a single long line....
Other editors and usually also the dev IDE:s can cope and you do not
really feel the difference. So it took a while to see.

This is why I am looking at ways to stop this from happening and I had
to check out every project of the already converted CVS repositories
and use the py script to set the properties for eol-conversion. But
this only works for these files and any future additions would have to
be properly treated, so this is why I was looking for a way to fix it
server side.
If it is possible to circumvent is another issue because then the
developer will have a reason for doing so and it is OK. But normal
project imports should work without having to fix stuff.
So I don't want to do a pre-commit hook to block this.

-- 
Bo Berglund
Developer in Sweden
Received on 2018-02-16 15:40:58 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.