Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] Any Subversion geniuses out there?



Hi Matt,

You'll want a pre-commit hook that will do the mime-type checking/setting

This perl script which comes with should get you started
http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/check-mime-type.pl

Greg Rundlett
my public PGP key<http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x5E07A26B877CEBF6>


On Thu, Dec 1, 2011 at 4:43 PM, Matt Shields <matt at mattshields.org> wrote:

> It's a long story but basically we have a number of developers that all use
> MS Sql Server Management Studio to write/edit their schema (along with
> other tools such as Visual Studio, notepad, etc).  For some reason when you
> create a .sql script using SSMS even though it's text it does some funky
> encoding and when the developer checks in the code it adds the mime-type of
> application/octet-stream (a binary file).  Because of this we can't review
> diff's directly in Trac, we need to do them one by one on our computer.
>  Using any other tool to create the .sql files is fine but it's something
> about SSMS.
>
> Now, getting the developers to use another tools isn't an option.  Adding a
> setting to their svn config is a pain because as developers come and go
> it's an additional step that needs to happen to every computer install.
>  What I was wondering is it possible in Subversion when a changeset is
> being committed that a hook could be used to change the mime-type.  So if
> the file being committed is a *.sql, then it would override whatever
> mime-type the client is saying and apply text/x-sql.
>
> If this is possible, anyone have an example?  I'm sort of familiar with the
> hooks and how they work, I installed one that emails me when a commit
> happens with the changes, but would just need to know how to do a mime-type
> change based on file extension.
>
> Matthew Shields
> Owner
> BeanTown Host - Web Hosting, Domain Names, Dedicated Servers, Colocation,
> Managed Services
> www.beantownhost.com
> www.sysadminvalley.com
> www.jeeprally.com
> Like us on Facebook <http://www.facebook.com/beantownhost>
> Follow us on Twitter <https://twitter.com/#!/beantownhost>
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://lists.blu.org/mailman/listinfo/discuss
>



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org