Problem in comparing two workjspaces (using RTC SCM Java API
Hello, I am trying to use the SCM API via java
(RTC-Client-2.0.0.2iFix2)
what I am trying to do is to get two workspaces (using their names or UUID's) and then comparing the two workspaces.
final IWorkspace wp1 = ... i get it ...
final IWorkspace wp2 = ... i get it ...
IWorkspaceConnection wp1Conn = wpm.getWorkspaceConnection(wp1, null);
IWorkspaceConnection wp2Conn = wpm.getWorkspaceConnection(wp2, null);
wp1Conn.compareTo(wp2Conn, Integer.MAX_VALUE, null, null);
HERE I GET AN java.lang.IllegalArgumentException
I did not find any javadocs so maybe my approach is not the right one
(RTC-Client-2.0.0.2iFix2)
what I am trying to do is to get two workspaces (using their names or UUID's) and then comparing the two workspaces.
final IWorkspace wp1 = ... i get it ...
final IWorkspace wp2 = ... i get it ...
IWorkspaceConnection wp1Conn = wpm.getWorkspaceConnection(wp1, null);
IWorkspaceConnection wp2Conn = wpm.getWorkspaceConnection(wp2, null);
wp1Conn.compareTo(wp2Conn, Integer.MAX_VALUE, null, null);
HERE I GET AN java.lang.IllegalArgumentException
I did not find any javadocs so maybe my approach is not the right one
One answer
Hi:
Try out the newsgroup "extending Team Concert" to get answers from other developers.
Here's the javadoc. Nice try with MAXINT, but this isn't what the API expects...
HTH,
Christophe
/**
* Compares the change histories of this flow node to the given flow
* object and returns a report describing their relative synchronization.
* <p>
* Active change sets are included even through incoming active change sets
* are never eligible to be accepted.
* </p>
* <p>
* The operation has the following preconditions:
* <ul>
* <li>The client is logged in to the repository.</li>
* </ul>
* The operation throws <code>TeamRepositoryException</code> if any of
* these preconditions are not met. Operations on the resulting report do
* not use the connections or contact the server.
* </p>
*
* @param remoteFlowNode
* the other flow node to compare this one to; must not be
* <code>null</code>
* @param int includeBaselineInfo a bitmask of the different values defined in {@link WorkspaceComparisonFlags}
* for {@link WorkspaceComparisonFlags#CHANGE_SET_COMPARISON_ONLY}, the returned report contains only the
* lists of incoming and outgoing change sets;
* for {@link WorkspaceComparisonFlags#INCLUDE_BASELINE_INFO}, the returned report additional contains
* the lists of incoming and outgoing baselines and the lists
* of just the incoming and outgoing change sets that are after
* the last incoming or outgoing baseline.
* if the mask includes {@link WorkspaceComparisonFlags#INCLUDE_EMPTY_BASELINES}, then the compare report will
* include baselines which are empty wrt their predecessor as well as baselines for which there are
* no incoming or outgoing changes corresponding for.
* if the mask includes {@link WorkspaceComparisonFlags#INCLUDE_REPLACED_COMPONENT_INFO}, then the compare
* report will include information on components that were replaced in remoteFlowNode.
* @param excludedComponents
* the possibly empty list of components (element type:
* {@link IComponentHandle}) to exclude from mention in the
* report; must not be <code>null</code>. It is fine if some of
* the components are not known to either flow node.
* @param monitor
* a progress monitor, or <code>null</code> if progress
* reporting is not desired
* @return a report describing the relative synchronization of the flow
* object with the given flow node; never <code>null</code>;
* @throws NotLoggedInException
* if the operation fails because the client was not logged in
* to the repository
* @throws OperationCanceledException
* if the operation is canceled. Cancellation can occur even if
* no progress monitor is provided.
* @throws ItemNotFoundException
* if the operation fails because the workspace has been deleted
* out from under the IWorkspaceConnection
* @throws TeamRepositoryException
* if the operation fails for any other reason
* @LongOp This is a long operation; it may block indefinitely; must not be
* called from a responsive thread.
*/
Try out the newsgroup "extending Team Concert" to get answers from other developers.
Here's the javadoc. Nice try with MAXINT, but this isn't what the API expects...
HTH,
Christophe
/**
* Compares the change histories of this flow node to the given flow
* object and returns a report describing their relative synchronization.
* <p>
* Active change sets are included even through incoming active change sets
* are never eligible to be accepted.
* </p>
* <p>
* The operation has the following preconditions:
* <ul>
* <li>The client is logged in to the repository.</li>
* </ul>
* The operation throws <code>TeamRepositoryException</code> if any of
* these preconditions are not met. Operations on the resulting report do
* not use the connections or contact the server.
* </p>
*
* @param remoteFlowNode
* the other flow node to compare this one to; must not be
* <code>null</code>
* @param int includeBaselineInfo a bitmask of the different values defined in {@link WorkspaceComparisonFlags}
* for {@link WorkspaceComparisonFlags#CHANGE_SET_COMPARISON_ONLY}, the returned report contains only the
* lists of incoming and outgoing change sets;
* for {@link WorkspaceComparisonFlags#INCLUDE_BASELINE_INFO}, the returned report additional contains
* the lists of incoming and outgoing baselines and the lists
* of just the incoming and outgoing change sets that are after
* the last incoming or outgoing baseline.
* if the mask includes {@link WorkspaceComparisonFlags#INCLUDE_EMPTY_BASELINES}, then the compare report will
* include baselines which are empty wrt their predecessor as well as baselines for which there are
* no incoming or outgoing changes corresponding for.
* if the mask includes {@link WorkspaceComparisonFlags#INCLUDE_REPLACED_COMPONENT_INFO}, then the compare
* report will include information on components that were replaced in remoteFlowNode.
* @param excludedComponents
* the possibly empty list of components (element type:
* {@link IComponentHandle}) to exclude from mention in the
* report; must not be <code>null</code>. It is fine if some of
* the components are not known to either flow node.
* @param monitor
* a progress monitor, or <code>null</code> if progress
* reporting is not desired
* @return a report describing the relative synchronization of the flow
* object with the given flow node; never <code>null</code>;
* @throws NotLoggedInException
* if the operation fails because the client was not logged in
* to the repository
* @throws OperationCanceledException
* if the operation is canceled. Cancellation can occur even if
* no progress monitor is provided.
* @throws ItemNotFoundException
* if the operation fails because the workspace has been deleted
* out from under the IWorkspaceConnection
* @throws TeamRepositoryException
* if the operation fails for any other reason
* @LongOp This is a long operation; it may block indefinitely; must not be
* called from a responsive thread.
*/