component load rules don't work on files.
c:\folder1\src1
c:\folder1\src1\abc-fldr
c:\folder1\src1\123-fldr
c:\folder1\src1\file1
I'm having trouble getting the load rules to work on files. The example above, if I only wanted the 123-fldr then I can certainly just have that folder load. However if I also wanted the file1 to load but can't seem to get the rules to load it. I did modify a rule file to include the file but when I use the rule to load a component the file won't be loaded.
c:\folder1\src1\abc-fldr
c:\folder1\src1\123-fldr
c:\folder1\src1\file1
I'm having trouble getting the load rules to work on files. The example above, if I only wanted the 123-fldr then I can certainly just have that folder load. However if I also wanted the file1 to load but can't seem to get the rules to load it. I did modify a rule file to include the file but when I use the rule to load a component the file won't be loaded.
Accepted answer
Hi Jeff,
Below is a rule file that I modified to include single files. I wrote this after reviewing the article linked by Lauren.
I created this by first using the load wizard with "Browse the components to select the folders to be loaded". Then I generated the load file under Window > Preferences "Team > Jazz Source Control > Sandboxes > Generate Load Rules..."
I added two sections. Here are a few comments:
Below is a rule file that I modified to include single files. I wrote this after reviewing the article linked by Lauren.
I created this by first using the load wizard with "Browse the components to select the folders to be loaded". Then I generated the load file under Window > Preferences "Team > Jazz Source Control > Sandboxes > Generate Load Rules..."
I added two sections. Here are a few comments:
- You can only have one <item> per <itemLoadRule>, so you need to add an entire new itemLoadRule to specify your item.
- I specified items using repositoryPath, using itemId/itemType may be more robust in case of renames/moves, you can probably use the command line to find the ids.
-
The below example shows two ways to do this.
- an itemLoadRule to load a single file beside the folder that was part of the original generated rules.
- a parentLoadRule which specifies a folder under which everything matching the include filters will be loaded.
<scm:sourceControlLoadRule version="1" xmlns:scm="http://com.ibm.team.scm"> <itemLoadRule> <component itemId="_erpo0BDuEdyJqvumb3iZNg"/> <!-- <component name="Repository" /> --> <item itemId="_Ig-SMBD1EdyPep3tN74vWg" itemType="folder"/> <!-- <item repositoryPath="/com.ibm.team.repository.client/links/com/ibm/team/links/client/internal" /> --> </itemLoadRule> <!-- addition 1 --> <itemLoadRule> <component itemId="_erpo0BDuEdyJqvumb3iZNg"/> <item repositoryPath="/com.ibm.team.repository.client/links/com/ibm/team/links/client/ILinkEvent.java" /> </itemLoadRule> <!-- addition 1 --> <parentLoadRule> <component itemId="_erpo0BDuEdyJqvumb3iZNg"/> <parentFolder repositoryPath="/com.ibm.team.repository.client" /> <include> <filter name="META-INF" /> <filter name="plugin.xml" /> </include> </parentLoadRule> </scm:sourceControlLoadRule>