Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 489649

Summary: Extensive SVN update checks for generated code
Product: [Technology] Subversive Reporter: Andrey Loskutov <loskutov>
Component: CoreAssignee: Alexander Gurov <a.gurov>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0.2   
Target Milestone: 4.6.0   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 392750    

Description Andrey Loskutov CLA 2016-03-15 09:02:22 EDT
We have big projects with lot of generated data inside (xtext + java build). The root directory of the generated files is marked as derived, but I see that SVN update job is pretty busy checking the status of all the children.

I've found that there are at least two prominent places in Subversive where the IResource.isDerived() is checked. This seem not be sufficient, and we probably should replace those calls with IResource.isDerived(IResource.CHECK_ANCESTORS).

The code in question is:
org.eclipse.team.svn.core.utility.FileUtility.isIgnored(IResource)
org.eclipse.team.svn.core.utility.SVNUtility.isIgnored(IResource)

BTW is there any reason why SVNUtility.isIgnored() is implemented differently as FileUtility.isIgnored()?
Comment 1 Alexander Gurov CLA 2016-03-15 09:11:15 EDT
Yes, there is a reason and the reason is that the one in FileUtility is named poorly. They should serve a different purpose: the one in FileUtility should validate if the resource could be managed by SVN plug-in or not, while the one in SVNUtility should match resource against different ignore conditions (except svn:ignore which is actually managed by an SVN client library).
I'm working on refactoring the code now. There is also related tasks like this one - bug 480041 or possibly this one - bug 392750.
Comment 2 Alexander Gurov CLA 2016-03-15 10:04:35 EDT
By the way, you're right, the IResource.CHECK_ANCESTORS flag should be used.
Comment 3 Andrey Loskutov CLA 2016-03-15 10:20:43 EDT
Thanks for the fast fix! Going to test it now :-)