[Discuss] Any Subversion geniuses out there?
Edward Ned Harvey
blu at nedharvey.com
Fri Dec 2 10:46:12 EST 2011
> From: Matt Shields [mailto:matt at mattshields.org]
>
> dbo.Proc_xxxx.sql: Little-endian UTF-16 Unicode c program text,
with
> CRLF, CR line terminators
> dbo.Proc_yyyy.sql: ASCII c program text, with CRLF line
terminators
>
> In this case I don't believe there is any harm forcing svn to use a
specific
> mime-type since they are both text. I'll check out the check-mime-type.pl
> that Greg mentioned.
This sounds like solid logic to me. I expect the diff & compress algorithms
used internally by svn will probably be the same for both types, because as
you said, they're both text. It is starting to sound like the conclusion
will likely be: It's ok to do it for this case, but not ok in general for
random various mime types in general.
I think you should ask the svn-dev group (different from the users group) if
these two mime types are internally handled any differently from each other.
They'll probably say no, and say it's ok to do. But they'll probably
caution you that it could change in the future, although that seems
unlikely.
The users group would be better for writing the hook script, and the dev
group would be better for understanding the internal behavior.
One other option - You could look through the trac source (I believe it's
php or python) and find the place where it checks the mime type and decides
how it will do the diff. You might just tweak one line inside of trac, to
make it behave the way you want, on the mime type you want.
More information about the Discuss
mailing list