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

Re: How does Subversion decide what gets automatically merged?

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2007-08-11 11:00:55 CEST

On 8/11/07, Ryan Schmidt <subversion-2007b@ryandesign.com> wrote:
>
> On Aug 10, 2007, at 07:55, Rainer Sokoll wrote:
>
> > On Fri, Aug 10, 2007 at 08:48:17AM -0400, Cem Karan wrote:
> >
> >> Do you know the exact file types it thinks of as plain text? I
> >> mean, does
> >> it look at a file, determine that it is all 7-bit printable
> >> ASCII, and from
> >> that guess that it is text, or is there a master list of filename
> >> types that
> >> it looks at and guesses from that which are text?
> >
> > The Book says: it's based on the MIME type:
> > http://svnbook.red-bean.com/nightly/en/svn.forcvs.binary-and-
> > trans.html
>
> Yes, but as it says at the end of that page, svn import will
> automatically assign an svn:mime-type to a file based on some magic
> which is not described. In any case, you can bypass the magic by
> defining in your ~/.subversion/config file which filename extensions
> should be mapped to which MIME types.

I looked up the rule in the source code it is:

Inspecting the first 1024 bytes in the file,
- 85% or more must be in the ranges 0x07-0x0D and 0x20-0x7F
- None of the bytes may be 0x00

If the above holds, the file is probably texty in the sense that it
can be merged. Consider it binary otherwise.

HTH,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Aug 11 10:59:10 2007

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