How to apply the svn 'eol-style' property recursively only on text files?
I need to apply the eol-style property recursively on an existing repository. The 开发者_StackOverflowrepository contains both text files and binaries. I want to apply this property only on the text files, and not on the binary files. How can this be done from the command line or in a script?
Something like
find . -name \*.txt -print0 | xargs -0 svn ps svn:eol-style native
to set svn:eol-style
to native
on all *.txt
files.
Take care, if you do this from a unix/linux environment, the checkin sees the whole file as changed. So as far as I know the only real solution is to do this on a windows machine, either with cygwin or tortoise (you can first search all files which need the eol-style property with agent ransack or other search tool, and select them all-> right click -> Tortoise SVN -> Properties -> new -> eol-style with value native (or if one of the files already have the property it shows up, select edit -> ok and all other files will also be modified).
精彩评论