You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steve Whitson <st...@gmail.com> on 2008/09/24 14:24:36 UTC
eol-style native
Hi,
Is there a way I can turn off the automatic setting of the property
svn:eol-style native?
I would prefer to turn this feature off per repository. I have some
repositories that may benefit from this feature and others where it will
just get in the way. If not per-repository, is it possible server
wide? Doing this per-user (client) config sounds awful cumbersome and
problematic in my environment.
While reviewing the per-client choice, I've looked at the client
[auto-props] section in a config file, but I don't see how to turn of
such a feature (eol-style =native), only how to add it.
Thanks much,
-Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: eol-style native
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 25, 2008, at 05:49, Steve Whitson wrote:
> I see the discussions on 'auto-props' and the need for a feature
> allowing for clients to get these settings from the server. I look
> forward to that feature being implemented, since my setting of
> these only fixes what I put in this repository today. Ensuring
> each developer's client environment sticks to our defined auto-
> props configuration is not going to be easy.
Write a pre-commit hook enforcing whatever policy you want. If a
commit doesn't have the characteristics you require, reject the
commit by exiting with a nonzero status, and print an error
explaining your policy to the committer.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: eol-style native
Posted by Steve Whitson <st...@gmail.com>.
Ryan Schmidt wrote:
> On Sep 24, 2008, at 21:32, David Weintraub wrote:
>
>> On Wed, Sep 24, 2008 at 9:40 PM, Andy Levy <an...@gmail.com> wrote:
>>> On Wed, Sep 24, 2008 at 21:22, David Weintraub <qa...@gmail.com>
>>> wrote:
>>>> On Wed, Sep 24, 2008 at 5:28 PM, Steve Whitson
>>>> <st...@gmail.com> wrote:
>>>>> One other issue here is that in order to maintain softlinks I have
>>>>> to keep
>>>>> the master working (reference) copies on unix, which leads to
>>>>> problems when
>>>>> auto-props is turned on and eol-style is native... especially when
>>>>> expectation is that the eol doesn' t change between platforms.
>>>>> For some
>>>>> tools/languages/scripts that's not an issue, for others it is.
>>>>
>>>> Have you looked at svn:eol-style=share?
>>>>
>>>> That keeps the line endings in the repository as Unix LF, but changes
>>>> them in your working copy depending upon the platform you use. On
>>>> Unix, they'll be LF, on Windows, they'll be CRLF.
>>>
>>> I don't see share as a valid value for this property in
>>> http://svnbook.red-bean.com/en/1.5/svn.advanced.props.file-portability.html#svn.advanced.props.special.eol-style
>>>
>>>
>>> What you describe is how svn:eol-style=native behaves.
>>
>> Sorry. I've been up pretty late, and I'm getting this mixed up with
>> Perforce. Yes, I'm thinking of snv:eol-style=native.
>>
>> That's a problem when you work with a bunch of different systems all
>> at the same time.
>
> Well it sounds like Steve is already using svn:eol-style=native, and
> the problem he's running into is that he wants to share a working copy
> between Windows and Unix computers. He needs to check out the working
> copy on Unix (so that the Unix part can use the symlinks that are
> checked into his repository). But since the eol translation only
> happens at checkout / update time, this means that the line endings
> are Unix (because the checkout was done on Unix) but this means when
> you access the working copy from Windows, Windows programs won't know
> how to deal with it.
>
> Where I worked, we set svn:eol-style=LF instead so it didn't matter
> where it was checked out. And we trained all our Windows software to
> know how to deal with files with LF line endings.
Thanks for the feedback! :)
My initial problem was to understand why eol-style was being set to
native. This was being done by smartsvn, the gui I used on unix
(auto-props are on and this is its default). If I had used only the svn
client, this issue would never have come up (using the config defaults,
as I did in another repository). I have many text-files that the format
should not be touched, but left as the tool wrote them. These are not
to be readable and are basically xml format, and frequently over 60meg.
Some of these files were set to native, and some were not. So, while
correcting these I discovered that anything of type text was (pretty
much) set to native (not good!). So, I destroyed this new database and
started again, this time using auto-props and haveing everything
explicilty set. Ok, somewhat of a trivial pain, but this will help keep
things in order (as they should be). We have some (text) files which
are best keep with LF eol, and others that should be kept with CRLF eol
(for human readability, espeically when considering customers). Our
developers know how to use editors that are support both, but usually
don't keep up with this issue (since their editor does). I end up with
a mixed set in the repositories depending on the defaults for the editor
they used, or on which platform they wrote the file. I must say,
explicitly setting the eol-style is much better than where I came from
(leaving everything as the developer left it, or as their tools left it).
So, all in all, this was a good exercise for me, just not one I wanted
to face while bringing across an initial baseline to create this
repository with.
I see the discussions on 'auto-props' and the need for a feature
allowing for clients to get these settings from the server. I look
forward to that feature being implemented, since my setting of these
only fixes what I put in this repository today. Ensuring each
developer's client environment sticks to our defined auto-props
configuration is not going to be easy.
Thank much,
-Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: eol-style native
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 24, 2008, at 21:32, David Weintraub wrote:
> On Wed, Sep 24, 2008 at 9:40 PM, Andy Levy <an...@gmail.com>
> wrote:
>> On Wed, Sep 24, 2008 at 21:22, David Weintraub <qa...@gmail.com>
>> wrote:
>>> On Wed, Sep 24, 2008 at 5:28 PM, Steve Whitson
>>> <st...@gmail.com> wrote:
>>>> One other issue here is that in order to maintain softlinks I
>>>> have to keep
>>>> the master working (reference) copies on unix, which leads to
>>>> problems when
>>>> auto-props is turned on and eol-style is native... especially when
>>>> expectation is that the eol doesn' t change between platforms.
>>>> For some
>>>> tools/languages/scripts that's not an issue, for others it is.
>>>
>>> Have you looked at svn:eol-style=share?
>>>
>>> That keeps the line endings in the repository as Unix LF, but
>>> changes
>>> them in your working copy depending upon the platform you use. On
>>> Unix, they'll be LF, on Windows, they'll be CRLF.
>>
>> I don't see share as a valid value for this property in
>> http://svnbook.red-bean.com/en/1.5/svn.advanced.props.file-
>> portability.html#svn.advanced.props.special.eol-style
>>
>> What you describe is how svn:eol-style=native behaves.
>
> Sorry. I've been up pretty late, and I'm getting this mixed up with
> Perforce. Yes, I'm thinking of snv:eol-style=native.
>
> That's a problem when you work with a bunch of different systems all
> at the same time.
Well it sounds like Steve is already using svn:eol-style=native, and
the problem he's running into is that he wants to share a working
copy between Windows and Unix computers. He needs to check out the
working copy on Unix (so that the Unix part can use the symlinks that
are checked into his repository). But since the eol translation only
happens at checkout / update time, this means that the line endings
are Unix (because the checkout was done on Unix) but this means when
you access the working copy from Windows, Windows programs won't know
how to deal with it.
Where I worked, we set svn:eol-style=LF instead so it didn't matter
where it was checked out. And we trained all our Windows software to
know how to deal with files with LF line endings.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: eol-style native
Posted by David Weintraub <qa...@gmail.com>.
Sorry. I've been up pretty late, and I'm getting this mixed up with
Perforce. Yes, I'm thinking of snv:eol-style=native.
That's a problem when you work with a bunch of different systems all
at the same time.
--
David Weintraub
qazwart@gmail.com
On Wed, Sep 24, 2008 at 9:40 PM, Andy Levy <an...@gmail.com> wrote:
> On Wed, Sep 24, 2008 at 21:22, David Weintraub <qa...@gmail.com> wrote:
>> On Wed, Sep 24, 2008 at 5:28 PM, Steve Whitson <st...@gmail.com> wrote:
>>> One other issue here is that in order to maintain softlinks I have to keep
>>> the master working (reference) copies on unix, which leads to problems when
>>> auto-props is turned on and eol-style is native... especially when
>>> expectation is that the eol doesn' t change between platforms. For some
>>> tools/languages/scripts that's not an issue, for others it is.
>>
>> Have you looked at svn:eol-style=share?
>>
>> That keeps the line endings in the repository as Unix LF, but changes
>> them in your working copy depending upon the platform you use. On
>> Unix, they'll be LF, on Windows, they'll be CRLF.
>
> I don't see share as a valid value for this property in
> http://svnbook.red-bean.com/en/1.5/svn.advanced.props.file-portability.html#svn.advanced.props.special.eol-style
>
> What you describe is how svn:eol-style=native behaves.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: eol-style native
Posted by Andy Levy <an...@gmail.com>.
On Wed, Sep 24, 2008 at 21:22, David Weintraub <qa...@gmail.com> wrote:
> On Wed, Sep 24, 2008 at 5:28 PM, Steve Whitson <st...@gmail.com> wrote:
>> One other issue here is that in order to maintain softlinks I have to keep
>> the master working (reference) copies on unix, which leads to problems when
>> auto-props is turned on and eol-style is native... especially when
>> expectation is that the eol doesn' t change between platforms. For some
>> tools/languages/scripts that's not an issue, for others it is.
>
> Have you looked at svn:eol-style=share?
>
> That keeps the line endings in the repository as Unix LF, but changes
> them in your working copy depending upon the platform you use. On
> Unix, they'll be LF, on Windows, they'll be CRLF.
I don't see share as a valid value for this property in
http://svnbook.red-bean.com/en/1.5/svn.advanced.props.file-portability.html#svn.advanced.props.special.eol-style
What you describe is how svn:eol-style=native behaves.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: eol-style native
Posted by David Weintraub <qa...@gmail.com>.
On Wed, Sep 24, 2008 at 5:28 PM, Steve Whitson <st...@gmail.com> wrote:
> One other issue here is that in order to maintain softlinks I have to keep
> the master working (reference) copies on unix, which leads to problems when
> auto-props is turned on and eol-style is native... especially when
> expectation is that the eol doesn' t change between platforms. For some
> tools/languages/scripts that's not an issue, for others it is.
Have you looked at svn:eol-style=share?
That keeps the line endings in the repository as Unix LF, but changes
them in your working copy depending upon the platform you use. On
Unix, they'll be LF, on Windows, they'll be CRLF.
--
David Weintraub
qazwart@gmail.com
> Thanks Ryan for the response.
>
> I see now that the properties I received were the defaults in the client I
> used (smartsvn defaults).
>
> I have many files that are in xml format, but should be treated as binary
> (application/octet-stream as their mime-type). Also, most of our current
> audience viewing our documents, text files, etc, are on ms-windows, but that
> may change. So, for now readable text files need to remain CRLF eol-style.
> Other text files are best saved with LF eol-style. Yes, this is deducable
> through extensions (99.9% of the time). I have setup the autoprops on my
> windows config (for tortoise client and command line svn), and will do the
> same for my command-line unix config, and will have to figure out how to get
> this into smartsvn too (should be easy). Now for all my users :). I guess
> I'll have to type up usage instructions, and try to get consenses from our
> diverse multi-target projects. Leaving things as they were produced by the
> developers, or as they were produced by their tools is usually the safest
> bet from my experience... although customers typically like things (readable
> text files) in the format of the platform they use.
>
> A work in progress,
> -Steve
>
> Ryan Schmidt wrote:
>>
>> On Sep 24, 2008, at 09:24, Steve Whitson wrote:
>>
>>> Is there a way I can turn off the automatic setting of the property
>>> svn:eol-style native?
>>
>> It is off by default. To turn it on for, say, all .txt files, you add this
>> to your client's Subversion config file:
>>
>> *.txt = svn:eol-style=native
>>
>> So, if you want Subversion to not automatically add that property to those
>> files, simply remove that line from your config file again.
>>
>>> I would prefer to turn this feature off per repository. I have some
>>> repositories that may benefit from this feature and others where it will
>>> just get in the way. If not per-repository, is it possible server wide?
>>> Doing this per-user (client) config sounds awful cumbersome and problematic
>>> in my environment.
>>
>> Automatic properties are a client-side setting only.
>>
>> You can write a pre-commit hook for your repository which prevents commits
>> which do not meet your requirements. For example, for one repository, you
>> can require that all .txt files have this property set, and for another
>> repository, you can require that it not be set, if that's what you want.
>> Committers are responsible for adding or not adding the property, as needed.
>>
>> If you look at "svn help commit" you'll see a "--config-dir" argument.
>> Users can set up a config directory per repository, and whenever they commit
>> to a particular repository, they can use the --config-dir argument to
>> specify the config dir for that repository. That way they can set up
>> different auto-props rules for different repositories. I admit that's not as
>> convenient as Subversion automatically knowing what rules to use for what
>> repository, but it is the only thing Subversion offers at this point.
>>
>>> While reviewing the per-client choice, I've looked at the client
>>> [auto-props] section in a config file, but I don't see how to turn of such a
>>> feature (eol-style =native), only how to add it.
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: eol-style native
Posted by Steve Whitson <st...@gmail.com>.
Thanks Ryan for the response.
I see now that the properties I received were the defaults in the client
I used (smartsvn defaults).
I have many files that are in xml format, but should be treated as
binary (application/octet-stream as their mime-type). Also, most of our
current audience viewing our documents, text files, etc, are on
ms-windows, but that may change. So, for now readable text files need
to remain CRLF eol-style. Other text files are best saved with LF
eol-style. Yes, this is deducable through extensions (99.9% of the
time). I have setup the autoprops on my windows config (for tortoise
client and command line svn), and will do the same for my command-line
unix config, and will have to figure out how to get this into smartsvn
too (should be easy). Now for all my users :). I guess I'll have to
type up usage instructions, and try to get consenses from our diverse
multi-target projects. Leaving things as they were produced by the
developers, or as they were produced by their tools is usually the
safest bet from my experience... although customers typically like
things (readable text files) in the format of the platform they use.
One other issue here is that in order to maintain softlinks I have to
keep the master working (reference) copies on unix, which leads to
problems when auto-props is turned on and eol-style is native...
especially when expectation is that the eol doesn' t change between
platforms. For some tools/languages/scripts that's not an issue, for
others it is.
A work in progress,
-Steve
Ryan Schmidt wrote:
> On Sep 24, 2008, at 09:24, Steve Whitson wrote:
>
>> Is there a way I can turn off the automatic setting of the property
>> svn:eol-style native?
>
> It is off by default. To turn it on for, say, all .txt files, you add
> this to your client's Subversion config file:
>
> *.txt = svn:eol-style=native
>
> So, if you want Subversion to not automatically add that property to
> those files, simply remove that line from your config file again.
>
>> I would prefer to turn this feature off per repository. I have some
>> repositories that may benefit from this feature and others where it
>> will just get in the way. If not per-repository, is it possible
>> server wide? Doing this per-user (client) config sounds awful
>> cumbersome and problematic in my environment.
>
> Automatic properties are a client-side setting only.
>
> You can write a pre-commit hook for your repository which prevents
> commits which do not meet your requirements. For example, for one
> repository, you can require that all .txt files have this property
> set, and for another repository, you can require that it not be set,
> if that's what you want. Committers are responsible for adding or not
> adding the property, as needed.
>
> If you look at "svn help commit" you'll see a "--config-dir" argument.
> Users can set up a config directory per repository, and whenever they
> commit to a particular repository, they can use the --config-dir
> argument to specify the config dir for that repository. That way they
> can set up different auto-props rules for different repositories. I
> admit that's not as convenient as Subversion automatically knowing
> what rules to use for what repository, but it is the only thing
> Subversion offers at this point.
>
>> While reviewing the per-client choice, I've looked at the client
>> [auto-props] section in a config file, but I don't see how to turn of
>> such a feature (eol-style =native), only how to add it.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: eol-style native
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 24, 2008, at 09:24, Steve Whitson wrote:
> Is there a way I can turn off the automatic setting of the property
> svn:eol-style native?
It is off by default. To turn it on for, say, all .txt files, you add
this to your client's Subversion config file:
*.txt = svn:eol-style=native
So, if you want Subversion to not automatically add that property to
those files, simply remove that line from your config file again.
> I would prefer to turn this feature off per repository. I have
> some repositories that may benefit from this feature and others
> where it will just get in the way. If not per-repository, is it
> possible server wide? Doing this per-user (client) config sounds
> awful cumbersome and problematic in my environment.
Automatic properties are a client-side setting only.
You can write a pre-commit hook for your repository which prevents
commits which do not meet your requirements. For example, for one
repository, you can require that all .txt files have this property
set, and for another repository, you can require that it not be set,
if that's what you want. Committers are responsible for adding or not
adding the property, as needed.
If you look at "svn help commit" you'll see a "--config-dir"
argument. Users can set up a config directory per repository, and
whenever they commit to a particular repository, they can use the --
config-dir argument to specify the config dir for that repository.
That way they can set up different auto-props rules for different
repositories. I admit that's not as convenient as Subversion
automatically knowing what rules to use for what repository, but it
is the only thing Subversion offers at this point.
> While reviewing the per-client choice, I've looked at the client
> [auto-props] section in a config file, but I don't see how to turn
> of such a feature (eol-style =native), only how to add it.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: eol-style native
Posted by Steve Whitson <st...@gmail.com>.
I failed to mention, this is on subversion 1.5.2.
Steve Whitson wrote:
> Hi,
>
> Is there a way I can turn off the automatic setting of the property
> svn:eol-style native?
>
> I would prefer to turn this feature off per repository. I have some
> repositories that may benefit from this feature and others where it
> will just get in the way. If not per-repository, is it possible
> server wide? Doing this per-user (client) config sounds awful
> cumbersome and problematic in my environment.
>
> While reviewing the per-client choice, I've looked at the client
> [auto-props] section in a config file, but I don't see how to turn of
> such a feature (eol-style =native), only how to add it.
>
> Thanks much,
> -Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org