Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How can I find if a file which is being delivered is also in the outgoing (in some change set) of the destination stream?

I have an extension which runs in a Delivery action. The extension gets de files changed inside the change sets. Now would like looking for if there are change sets in the outgoing of the destination stream with this files.

How can I perform this search? Or where can I found documentation about this issue?

EDIT:

This is our use case:

We have 3 stream, A -> B -> C -> D, and a CS1 which is in A and B but not in C, and CS2 which is only in A. In addition CS1 and CS2 have different versions of F1 element. Something like this:

A     ->     B       ->     C      ->    D
|               |
CS1         CS1
(F1)         (F1)
CS2
(F1)

The aim is ban to perform a Deliver A -> B before than delivering B -> C. So I need look for if (F1 is in the outgoing of B) then fails. 

A     ->     B       ->     C      ->    D 
|               |
CS1         CS1
(F1)         (F1)
CS2                                       FAIL!
(F1)

A     ->     B       ->     C      ->    D 
|               |                 |
CS1         CS1           CS1
(F1)         (F1)           (F1)
CS2                                       RIGHT!
(F1)

A     ->     B       ->     C      ->    D 
|               |                 |
CS1         CS1           CS1
(F1)         (F1)           (F1)
CS2         CS2                       DONE A -> B (CS2)
(F1)         (F1)

PS: Granularity is about elements not about change sets.

0 votes

Comments

 Can you tell me more about your use case? Why do you want to know the incoming changes before delivery?


I ask because we have process preconditions that may be useful in this scenario. 

@echughes I have reply you in the body of the question because it was too long for a comment. I have extended details.



One answer

Permanent link
I'm not sure what criteria is used to decide when a CS can move from one stream to the next, but I'm curious if it's possible for you to automate the deliveries from B -> C -> D. Could you do that in a build? If that's the case, then you can remove permission for regular users to deliver to B, C, or D, and trust your build process to perform the promotion properly. 

If that isn't possible, you can use IScmQueryService#findLocateChangeSets() to check to see if the given change set is in the preceding stream.

EDIT: spelling. 

0 votes

Comments
 The criteria is:

1. If a change set in A contains a file which is in a change set of B but not on C then DELIVER FAILS otherwise DELIVER.

Does exist something like #findLocateFiles()? A service which might return in what change sets is a File 

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,944

Question asked: Jan 21 '15, 4:36 a.m.

Question was seen: 3,673 times

Last updated: Jan 26 '15, 6:30 a.m.

Confirmation Cancel Confirm