It's all about the answers!

Ask a question

How to get the changes in a delivery participant (follow-up)

N. VD (842334) | asked Feb 06 '15, 7:17 a.m.

I am creating a participant to modify Files that have been deliverd in to the stream.
The participant is running after a delivery into the stream.

How can i get the changed files in this participant?
I have obtained the workspace already, but am not sure if i can get the changes from there.

One answer

permanent link
Evan Hughes (2.4k1318) | answered Feb 09 '15, 11:03 a.m.
You can call AdvisableOperation#getOperationData() to get an explanation of what the operation is doing. Delivery operations will return an IScmDeltaSource that describes the changes.

For delivery you'll get IChangeHistoryAddOperandDelta which lists the new change sets, while phase 2 delivery will give you a IChangeHistoryModificationDelta which provides access to the changes on the files.

If you're validating change sets (ie, ensuring they have appropriate links/comments), you should use a deliver phase 1 advisor (which runs against operation If you're validating changes to files/folders you should run against deliver phase 2 (operation The two operations are split up for performance reasons.

Your answer

Register or to post your answer.