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

Re: Identify an text file

From: <kfogel_at_collab.net>
Date: 2004-08-20 15:29:45 CEST

"Sven Steiniger" <Sven.Steiniger@newtron.net> writes:
> I just wondered if there is a safe way to ask subversion if an working file
> is treated as an text file or not.
> I am currently getting the 'svn:mime-type' property and check if it's empty or
> starts with "text/". But the documentation tells
> "For example, if a file's svn:mime-type property is set to a
> non-text MIME type (generally, something that doesn't
> begin with text/, though there are exceptions)"

Actually, your question probably need to be expanded.

What, precisely, do you mean by "is treated as text"? That is, are
you talking about end-of-line translation, or keyword substitution, or
responsiveness to 'svn diff' and/or 'svn merge', or some combination
thereof, or something else entirely?

If you're just interested in mime-types, our (not entirely
satisfactory) solution for now is the function
svn_mime_type_is_binary() in subversion/libsvn_subr/validate.c. See
also

   http://subversion.tigris.org/issues/show_bug.cgi?id=1002

Best,
-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Aug 20 17:07:22 2004

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.