Java API : accept and WorkspaceUpdateDilemmaHandler - documentaion other than Java API ?
I'm writing an automation that receives list of files in file system (in RTC sandbox), finds the related incoming change-sets and then accepts these change-sets. I wrote a prototype, based on com.ibm.team.filesystem.client.operations.IWorkspaceUpdateOperation and com.ibm.team.filesystem.client.operations.WorkspaceUpdateDilemmaHandler. Now I'm reviewing WorkspaceUpdateDilemmaHandler and trying to map all the scenarios that could go wrong, so I can decide how to react to each scenario. Is there a documentation that can help with the list of erroneous scenarios ? How to create these scenarios ? For example, how do I create "stale data" ? Is n-way conflict relevant to the kind of accept I'm using, or it is relevant only for accepting baselines ?
Accepted answer
There is no other documentation, we only have the Javadoc.
You may have to ask each question separately in the hopes to get answers.
Q: stale data:
A: Stale data might happen if you have multiple clients operating against the same repository workspace (which is a workflow that we do not support) - often you will see this manifest in the Pending Changes view as an 'out of sync' state. But when the operations or other API run, the server would throw a StaleDataException if we are passing in data which has since changed in the server.
Q: n-way conflict
A: The nWayConflict() was added in: Add dilemma handler to accept that supports accepting change sets when a baseline results in an n-way conflict (349749)
This only happens when accepting a baseline.
WarnWorkspaceUpdate shows that the dialog shown to user says:
"Accepting the baseline from component ''{0}'' will cause too many conflicts in your repository workspace
because of change set reordering.
Do you want a merge change set to be created that can resolve these conflicts?"
because of change set reordering.
Do you want a merge change set to be created that can resolve these conflicts?"