subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bo Berglund <bo.bergl...@gmail.com>
Subject Re: Server side svn:auto-props, how to set it correctly?
Date Fri, 16 Feb 2018 14:40:16 GMT
On Fri, 16 Feb 2018 05:41:48 -0600, Ryan Schmidt
<subversion-2018@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


Mime
View raw message