Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

cannot add artifacts to root after loading via loadrule.

i have a component with the name com.org.abc.something

its contents

It has three folders int he root - doc, src, lib.

The requirement is that
1. the component is loaded in the sandbox in the directory structure ../com/org/abc/something
2. contents of lib is loaded directly under ../com/org/abc/something

For this i wrote the following loadrule

<parentLoadRule>
    <component name="com.org.abc.something" />
    <parentFolder repositoryPath="/"/>
    <exclude>
            <filter name="lib"/>
    </exclude>
    <sandboxRelativePath pathPrefix="/com/org/abc/something"/>   
</parentLoadRule>

<parentLoadRule>
    <component name="com.org.abc.something" />
    <parentFolder repositoryPath="/lib"/>
    <sandboxRelativePath pathPrefix="/com/org/abc/something"/>   
</parentLoadRule>

The loading works fine, but there is a problem.
If any new folder/file is added in com/org/abc/something/ , RTC doesn't track it. Which means i am now unable to add any artifacts to the root of the component.
Do you have any suggestions?

0 votes



3 answers

Permanent link
Maxmelbin,

as far as I can tell the way you load, ../com/org/abc/something is a folder where you load the content. This folder is, as far as I can tell not under source control itself, which is why you can not version anything in there.

As far as I can tell, If it where under SCM, you would have not been able to load that way, because the nested folders, also being under SCM would overlap. This is however the experience I have made with experimenting with this for customers. I have no solution at hand at this point in time, unfortunately.

1 vote

Comments

Hi Ralph, consider a slight change in the presented loadrule:
<itemLoadrule>
    <component name="com.org.abc.something"/>
    <item repositoryPath="/lib/aFile.txt"/>
    <sandboxrelativepath pathPrefix="/com/org/abc/something"/>   
</ItemLoadrule>


In this case the behavior described by @Maxmelbin also occurs. Nevertheless I see no reason why.
IMHO RTC should be smart enough to track everything except aFile.txt in folder /com/org/abc/something to com.org.abc.something component.




As far as my experience goes, If you load something like

sandboxrelativepath pathPrefix="/com/org/abc/something"

this means /com/org/abc/something is not under SCM, because you would otherwise get a conflict with another hierarchy in SCM. Hence you can not add something in there and get it versioned.

You would have to create the folder under SCM and then load it there and then you could version its content in SCM.

Your scenario is not different with respect to that fact, as far as I know. Changes are only detected in the folders that are actually under SCM.

Consider:
<parentloadrule>
    <component name="com.org.abc.something"/>
    <parentfolder repositoryPath="/"/>
    <sandboxrelativepath pathPrefix="/com/org/abc/something"/>   
</parentloadrule>

I read this as: Load Component com.org.abc.something as folder com/org/abc/something under the sandbox. In that sense abc level should be associated to RTC component. In addition to that, in this simpler example whatever is added under that folder is tracked, meaning RTC is tracking abc to a component.

Only when a second rule (itemLoadRule) is there this problem exists.

I have investigated loading with load rules recently...... I did load as described above and the path prefix was not in SCM. All I can really say. Your situation might be different. In any case, you might want to create a work item explaining what you expect.

You are right. The example I provided before does not work. But this one works:

    <itemLoadRule alternateName="something">
        <component name="com.org.abc.something"/>
        <item repositoryPath="/"/>
        <sandboxRelativePath pathPrefix="/com/org/abc"/>
    </itemLoadRule>

Anyway, I will create a WI.

Thank you.


Permanent link
A few key points:
- A new file/folder in a sandbox appears in the Unresolved folder of the Pending Changes view only if that new file/folder has been added to a folder in the sandbox that is under version control.
- An itemLoadRule places the file/folder in the sandbox specified by that itemLoadRule under version control.
- A parentLoadRule does *not* place the folder in the sandbox specified by that parentLoadRule under version control, but rather places the specified children of that folder in the sandbox under version control.
- You cannot specify a load rule for a child of a folder in a sandbox that is under version control (the loading of that child is completely determined by the version controlled folder).  

So if you want new children of a specified folder in the sandbox to appear in the Unresolved folder of the Pending Changes view, you must either specify that folder in an itemLoadRule, or you need to specify the *parent folder* of that folder in a parentLoadRule, and then specify that folder in the matching rules for that parentLoadRule.

It sounds like what you want is for a parentLoadRule to also cause a new file/folder in the specified folder in the sandbox to appear in the Pending Changes view.   This is not an unreasonable enhancement request (perhaps the one that you filed?   it would be good post the ID of that work item into this thread), but note that it would introduce a possibility of a conflict, where an "incoming change" could overwrite a file in the Unresolved folder.   But the system could just detect this and create a warning saying "do you want to checkin your change before doing the accept, to avoid overwriting the unresolved change".

1 vote


Permanent link
Yep, you got my point. I will create an RFE soon.

The solution could be also to allow exclusion nodes to ItemLoadRule. But the solution field I leave it to you.

Thanks.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 457
× 57

Question asked: May 06 '14, 4:54 a.m.

Question was seen: 5,368 times

Last updated: May 19 '14, 10:55 a.m.

Confirmation Cancel Confirm