Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 221820 - DirectoryCleaner should have an exclude property and default excludes
Summary: DirectoryCleaner should have an exclude property and default excludes
Status: CLOSED FIXED
Alias: None
Product: EMFT
Classification: Modeling
Component: MWE (show other bugs)
Version: 0.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Patrick Schonbach CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-07 06:23 EST by Jan Koehnlein CLA
Modified: 2010-05-27 08:00 EDT (History)
4 users (show)

See Also:


Attachments
4.3.1 directorycleaner patch (967 bytes, patch)
2009-01-30 09:46 EST, Knut Wannheden CLA
sven.efftinge: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Koehnlein CLA 2008-03-07 06:23:48 EST
Currently, the DirectoryCleaner deletes all files in a directory.

This causes a lot of troule with versioning systems that store version information in the same directory as the versioned files (CVS, SVN). As the versioning information is deleted, all files are considered completely new, causing a lot of overhead in the repository.

An exclude property (similar to ant) can solve this issue. Consider putting .CVS and .svn in the defaults.
Comment 1 Patrick Schonbach CLA 2008-11-06 12:43:58 EST
This has been implemented for 4.3.1 as requested by Markus Völter, but still has to be merged into EMFT MWE.
Comment 2 Knut Wannheden CLA 2009-01-30 09:46:31 EST
Created attachment 124277 [details]
4.3.1 directorycleaner patch

There is a bug in the implementation of DirectoryCleaner in oAW 4.3.1. The component doesn't work if the target directory contains subdirectories which in turn contain files or folders to be ignored. The attached patch fixes the problem.
Comment 3 Patrick Schonbach CLA 2009-01-30 10:28:12 EST
Fixed in HEAD of oAW 4.x and in MWE.
Comment 4 Knut Wannheden CLA 2009-02-02 04:59:17 EST
It would probably make sense to reuse the DirectoryCleaner logic in the TMF Xtext class org.eclipse.xtext.GeneratorFacade#cleanFolder(String). Then it would also work with SVN as well as delete empty folders.
Comment 5 Patrick Schonbach CLA 2009-02-02 10:44:55 EST
Good idea. I have implemented that.
Comment 6 Patrick Schonbach CLA 2009-06-16 06:11:07 EDT
Verified bugs closed