Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I change the type of all the files in a repository SVN who have the extension .xml from the type binary to the type text.

It means, is no more necessary to change the type of each file, one by one, but all files with extension .xml in a repository.

share|improve this question
up vote 3 down vote accepted

If you want all new files having a filename ending in .xml be treated as text, you can try the following:

Edit your local svn config file (Typically located in ~/.subversion/config

Add the following to the [auto-props] section:

*.xml = svn:mime-type=text/xml
share|improve this answer

First, do a svn proplist <file> on the file to see what properties are there.

Then, depending on what you see, you will want to use svn propset or svn propdel to set, change, or remove properties to make things sane.

If you want to do this to more than one, you will want to do something like:

svn propset svn:mime-type text/xml *.xml


find . -name \*.xml | xargs svn propset svn:mime-type text/xml
share|improve this answer
It's a bit safer to use find . -name *.xml -print0 | xargs -0 svn propset svn:mime-type text/xml It resists better to strange characters in the filename. – b0fh Feb 22 '10 at 17:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.