You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Toby Johnson <to...@etjohnson.us> on 2004/07/28 18:16:41 UTC

text vs. binary files and svn:eol-style

I need clarification on how (when?) svn:eol-style works. I understand 
that when a file is first checked in, Subversion determines whether it's 
binary or text by looking for control characters.

So, is svn:eol-style only consulted when the file in question is 
considered text by Subversion? We have lots of text files on Unix that 
have either no file extension, or that use weird extensions, and it 
would be very difficult to list them all in auto-props (or impossible, 
in the case of the ones without extension). So I'd just like to 
auto-prop *all* files to use svn:eol-style=native.

My inference from the docs is that this would be OK as long as 
Subversion gets the initial guess right as to whether the file is text 
or binary, so even if (for example) a .jpg file gets 
svn:eol-style=native, it won't matter since SVN knows it's really 
binary. Is this correct?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: text vs. binary files and svn:eol-style

Posted by Toby Johnson <to...@etjohnson.us>.
C. Michael Pilato wrote:

>Toby Johnson <to...@etjohnson.us> writes:
>
>[...]
>
>  
>
>>My inference from the docs is that this would be OK as long as
>>Subversion gets the initial guess right as to whether the file is text
>>or binary, so even if (for example) a .jpg file gets
>>svn:eol-style=native, it won't matter since SVN knows it's really
>>binary. Is this correct?
>>    
>>
>
>I believe that this is correct.  Why don't you give it a shot and see
>what happens? :-)
>  
>
I wanted to ask anyway because even if it seemed to work it could always 
come back and bite me a month from now!

However, I found that a warning is generated when you add a binary file 
after the auto-props are set. (Although the warning isn't very 
informative: "svn: File 'desktop.jpg' has binary mime type property", 
but it doesn't mention that this warning happened when trying to set the 
auto-prop).

The attempt to set svn:eol-style fails, but the Add succeeds. However, 
if I was trying to add multiple binary files, only the first binary file 
gets added, and I need to try the Add again to get the others. That 
could get rather tedious!

So it seems there's no good way to set svn:eol-style for all files. Bummer.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: text vs. binary files and svn:eol-style

Posted by Branko Čibej <br...@xbc.nu>.
C. Michael Pilato wrote:

>Toby Johnson <to...@etjohnson.us> writes:
>
>[...]
>
>  
>
>>My inference from the docs is that this would be OK as long as
>>Subversion gets the initial guess right as to whether the file is text
>>or binary, so even if (for example) a .jpg file gets
>>svn:eol-style=native, it won't matter since SVN knows it's really
>>binary. Is this correct?
>>    
>>
>
>I believe that this is correct.  Why don't you give it a shot and see
>what happens? :-)
>  
>
Our policy is to not change file contents by default, but to follow 
users' instructions. Thus, we allow keyword substitution and newline 
translation in files that have a binary mime-type.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: text vs. binary files and svn:eol-style

Posted by "C. Michael Pilato" <cm...@collab.net>.
Toby Johnson <to...@etjohnson.us> writes:

[...]

> My inference from the docs is that this would be OK as long as
> Subversion gets the initial guess right as to whether the file is text
> or binary, so even if (for example) a .jpg file gets
> svn:eol-style=native, it won't matter since SVN knows it's really
> binary. Is this correct?

I believe that this is correct.  Why don't you give it a shot and see
what happens? :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org