Install svn: ignore recursively for directory structure

I imported a huge hierarchy of maven projects into the IntelliJ idea, now the idea has created .iml projects at all levels. I would like svn: ignore these files.

There are several similar questions, for example: svn (subversion) ignore specific file types in all subdirectories configured as root?

However: the answer is always applied svn:ignore with the --recursive flag. This is not what I'm looking for, I just want to ignore the files I created, and not set the property to hundreds of directories under it.

Basically, I have a conclusion

 svn status | grep .iml 

which is as follows:

 ? foo/bar/bar.iml ? foo/baz/phleem.iml ? flapp/flapp.iml 

and etc.

What would I like to do for each dir/project.iml entry to add svn:ignore *.iml to dir . I assume that I need to pass the above grep to sed or awk , and from there to svn , but I am fully relative to the exact sed or awk command on the one hand and the exact svn command (with which I will not override the existing svn: ignore values ), on the other hand.

Update: what I'm also not looking for is find based solutions, because maybe there are projects in this hierarchy in which the .iml files are really perfect, and I don't want to interfere with these projects, that's why I want add property only for .iml files created by my IDE.

+4
source share
1 answer

You can configure your client to globally ignore the given file extensions. Just add

 global-ignores = *.iml 

into your Subversion configuration file.

Update: If you want to ignore only iml files in the appropriate directories, you can try

 svn status | grep '^\?.*\.iml' | sed 's=^? *=./=;s=/[^/]*$==' | xargs svn propset svn:ignore '*.iml' 
+8
source

All Articles