It's all about the answers!

Ask a question

Participant: commit a workingcopy into the stream

N. VD (842634) | asked Feb 06 '15, 10:45 a.m.
I'm working on a server-side participant to change files after delivery.

How can i commit a workingcopy of an IFileItem into the stream?
I have read alot about scmService.batchCommit, but i cannot figure out what are the correct parameters to associate.

Is there some example available? - i have tried this:

Evan Hughes commented Feb 09 '15, 10:43 a.m.

The usual pattern in RTC is to prevent a delivery to a stream that doesn't have the changes you want - that way the stream is moved from one known valid state to the next known valid state. Can you update your question to describe the changes you want to make?

N. VD commented Feb 13 '15, 5:11 a.m.


My goal is to change  the files' content and user-properties.
e.g. automatically assign language definitions (enterprise extensions for system Z)
or changing content like inserting a header with copyright information if it's not already there.

So before the delivery takes place, the file and property changes should be made by a follow-up so other delivers accept changes with correct state into their sandbox. 

Don't know the impact for the developer who delivers: his resource will probably get out-of-sync?

is this a good practice or would you suggest doing it outerwise?
(i'd like to keep the plugin on servers, not in the eclipse IDE since not all customers are using eclipse)

Evan Hughes commented Feb 13 '15, 9:41 a.m.

The recommended approach is to have a delivery advisor that requires the change sets to have the content you want. 

As you say, that stops the user's sandbox from going out of sync, and it gives the user a chance to verify the content that is present in their workspace, rather than creating new content that wasn't present at the time of testing. 

I suggest that you create a server-side delivery (phase 2 - operation id ) advisor. Then add a client side quick fix (using extension point ) that makes the changes you want.

Be the first one to answer this question!

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.