It's all about the answers!

Ask a question

DeliverCombined method does not work when a change set removes a file

Luca Martinucci (1.0k396112) | asked Nov 10 '15, 4:55 a.m.
edited Nov 10 '15, 4:57 a.m.
I have implemented a Java plugin that delivers change sets to a specified stream.
It uses the DeliverCombined method of the IScmService interface.
When the change sets contain only changes to the contents of files, or addition of files, it works fine.
Recently, a user tried to deliver a change set that contained the removal of a file: the delivery was not executed, but no exception was thrown.
It was the only change set being delivered, and the only, so far, to exhibit such a behavior.
In order to promote this change set, we had to manually deliver it: the manual delivery worked fine.
Is this behavior known and documented?
And how can such a case be managed?
Our RTC version is 5.0.2.

Accepted answer

permanent link
Luca Martinucci (1.0k396112) | answered Nov 11 '15, 8:26 a.m.
I found the cause of the problem.
Actually, the DeliverCombined method is working correctly even in this case.
The problem arises after the delivery, when I read the contents of the change sets and retrieve the paths of the objects they contain.
The plugin failed to retrieve the path of a deleted file, because it was no longer present in the stream.
Now I have managed this case (when the kind of change is deletion, I avoid retrieving the path) and the plugin is able to deliver all kinds of change sets.

Ralph Schoon selected this answer as the correct answer

Your answer

Register or 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.