How to use RTC load rule excludeFilter
Hi - I have a component that has directories like this:
root/fred/A/..
root/fred/B/..
root/fred/C/..
I'd like to load just /root/fred/A/.. in an eclipse workspace, that is - I want everything except root/fred/B/* and root/fred/C/*.
I've tried this:
<scm:sourceControlLoadRule xmlns:scm="http://com.ibm.team.scm" eclipseProjectOptions="import" version="1">
<excludeFilter>
<filter name="root/fred/B" />
<filter name="root/fred/C" />
</excludeFilter>
<parentLoadRule>
<component name="C1"/>
<parentFolder repositoryPath="/"/>
<sandboxRelativePath includeRepositoryPath="true"/>
</parentLoadRule>
</scm:sourceControlLoadRule>
It just loads everything. Is there a way to do what I want? It looks as though excludeFilter should work (from this: https://jazz.net/library/article/1015) so I think I probably have the syntax wrong. Does anyone have an example?
I'm using the RTC V5.0 client.
Thanks, Zoe
root/fred/A/..
root/fred/B/..
root/fred/C/..
I'd like to load just /root/fred/A/.. in an eclipse workspace, that is - I want everything except root/fred/B/* and root/fred/C/*.
I've tried this:
<scm:sourceControlLoadRule xmlns:scm="http://com.ibm.team.scm" eclipseProjectOptions="import" version="1">
<excludeFilter>
<filter name="root/fred/B" />
<filter name="root/fred/C" />
</excludeFilter>
<parentLoadRule>
<component name="C1"/>
<parentFolder repositoryPath="/"/>
<sandboxRelativePath includeRepositoryPath="true"/>
</parentLoadRule>
</scm:sourceControlLoadRule>
It just loads everything. Is there a way to do what I want? It looks as though excludeFilter should work (from this: https://jazz.net/library/article/1015) so I think I probably have the syntax wrong. Does anyone have an example?
I'm using the RTC V5.0 client.
Thanks, Zoe
One answer
I believe the <excludefilter> considers only file or folder names. Your loadrule file is using a path instead. The filters "root/fred/B" and "root/fred/C" would not match any name and that is why everything is being loaded.You can try to use <itemLoadrule> instead.For example, the following load rule will load only folder /root/fred/A/ and the .project file at /root/fred (assuming this folder contains the .project file). If your .project file is at different location, you should also include that in the itemLoadRule, otherwise Eclipse project may not be created (the workspace should still be loaded in your sandbox.)<?xml version="1.0" encoding="UTF-8"?><scm:sourceControlLoadRule xmlns:scm="http://com.ibm.team.scm" eclipseProjectOptions="import" version="1"><itemLoadRule><component name="C1"/><item repositoryPath="Fred/.project"/><sandboxRelativePath includeRepositoryPath="true"/></itemLoadRule><itemLoadRule><component name="C1"/><item repositoryPath="Fred/A"/><sandboxRelativePath includeRepositoryPath="true"/></itemLoadRule></scm:sourceControlLoadRule>