Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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:

[auto-props]
*.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

or

find . -name \*.xml | xargs svn propset svn:mime-type text/xml
share|improve this answer
2  
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

 
discard

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.