简体   繁体   中英

How to delete all “specific file type” files from svn?

Is there a way I can delete all files from svn having a specific file type ?

I want to do this, because my global ignore list is not working, I have added *.dll file type to global ignore pattern but it is still coming in the commit dialog, and I have read somewhere that "files already committed to svn keep coming in commit dialog" if the ignore pattern is added after the files have been committed already.

Select the .dll files, right click -> TortoiseSVN -> Delete and add to ignore list -> Ignore by extension.

After doing that commit the deletion. This will make sure that the dll files are unversioned ( that is deleted from repo but local copies are kept ) and added to the ignore list.

[@manojlds gave a correct and concise answer: that single TortoiseSVN command saves a laborious multi-step operation! I was going to just comment on his answer but I needed a bit more room]

A couple other useful points:

  1. If you have a large tree and a lot of files to process you do not have to repeat the delete-and-ignore for each directory: use the search function in Windows Explorer to list all files of interest in one window (in your case, all dll files in all subdirectories). Then select all files in the search results (control-A) and proceed as manojlds has described to ignore by extension.

  2. @manojlds then indicates to "commit the deletion". Technically, you need to commit both the files marked for deletion and the containing directory: the ignore step actually updates the ignore list of the parent directory . If you have used the mass search/delete-and-ignore as I describe in step 1, the ignore step updates the parent directory of every file you processed, so all of those directories need to be committed to the repository as well.

Unfortunately SVN does not support permanent deletion of files from revision history. http://subversion.apache.org/faq.html#removal

You can try adding the full path of the specific dll file which you have commited before and want to omit. Also make sure it is deleted on the HEAD.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM