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

IFlowNodeConnection.compareTo results are truncated.

When I am comparing a workspace to a stream in the GUI, I get complete results.  However, when I use IFlowNodeConnection.compareTo() with the plain java client it appears the results are truncated.  I have tried both with a monitor and without.  

Is there something that limits the results returned when using the API or a way to get the full set?

0 votes



3 answers

Permanent link
It depends on the comparison flags you gave to the compare call. Look at WorkspaceComparisonFlags for the options available.

0 votes

Comments

I am using one of the flags (CHANGE_SET_COMPARISON_ONLY).  The problem is that I am only getting about half of the change sets.  When I compare in the GUI compare,  I get complete the set of changes.  When I use the API, they are all there in the correct order (oldest first) up to a point and it simply stops.  Like some limit has been reached...

I do not see any flags like get all results, etc.  Perhaps I am missing something...

I'm not aware of any limit in the workspace comparison result. Can you provide a code sample or some more detail of what the comparison is supposed to show (ie. incoming/outgoing baselines, incoming/outgoing change sets)?


Permanent link
Here is the sample code, and I get the exact same results using diffRpt.incomingChangeSets() as I do with the code that loops through the components  (just trying diff things...).  It is strange, it matches the GUI client output exactly until it just stops in the middle...  so, the logic seems valid, the compareTo is not returning the complete set...  This is just quick code, so not robust...

    public List<IChangeSetHandle> findChgSets(IWorkspaceConnection older, IWorkspaceConnection newer, String component) {
        IChangeHistorySyncReport diffRpt;
        try {
            diffRpt = older.compareTo(newer, WorkspaceComparisonFlags.CHANGE_SET_COMPARISON_ONLY, Collections.EMPTY_LIST, null);
            List<IChangeSetHandle> result = new LinkedList<IChangeSetHandle>();
            for (Object obj : newer.getComponents()) {
                IComponentHandle handle = (IComponentHandle)obj;
                result.addAll(diffRpt.incomingChangeSets(handle));
            }
//            result.addAll(diffRpt.incomingChangeSets());
            return result;
        } catch (TeamRepositoryException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return null;
    }

0 votes


Permanent link
I have determined the mistake I made...  There was a workspace with the same name as the stream I wanted to compare with.  And in my code where I was establishing the IWorkspaceConnection, I sent in the wrong type and said it was a workspace.  So, I was comparing to someone's workspace instead of the stream I wanted...  Obviously this workspace was not complete.

We figured this out by using scm compare.  As a side note, scm compare found both the workspace and the stream and so it said it was ambiguous.  However, I told it on the command line it was a stream.  So, somehow scm compare is seeing both workspaces and streams even when indicated it was a stream...  Not a big deal...

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
× 10,938
× 411
× 169

Question asked: Feb 11 '14, 3:23 p.m.

Question was seen: 5,589 times

Last updated: Feb 12 '14, 3:32 p.m.

Confirmation Cancel Confirm