4

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.

2 Answers 2

4

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
4

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
1
  • 3
    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, 2010 at 17:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .