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.
One answer
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.
Comments
Evan Hughes
JAZZ DEVELOPER Jan 21 '15, 10:18 a.m.Can you tell me more about your use case? Why do you want to know the incoming changes before delivery?
Fran Burgos
Jan 21 '15, 11:03 a.m.@echughes I have reply you in the body of the question because it was too long for a comment. I have extended details.