Delivering these changes would introduce gaps
I have made some changes to some files and created a new change set and marked it as "Complete" however when I try to deliver them it show me this error: "Delivering these changes would introduce gaps in the stream. You are trying to deliver a subset of the outgoing change sets but they need to be delivered together because of dependencies between them."
I am unable to resolve this error
Note: I have some completed change sets(it won't be delivered, unable to suspend or discard them for the same error ), that have the some common files with change sets to be delivered.
Accepted answer
If you truly don't need that code anymore, you'll have to suspend everything and recreate a new change set that doesn't depend on the change sets you didn't want to deliver.
For example:
1. Change fileA and check it in. Complete the change set and call it CS1.
2. Change fileA and check it in. Complete the change set and call it CS2.
3. Attempt to deliver CS2 and discover it will produce a gap.
To maintain a coherent history, your deliver target (ie. your stream) needs to know the state of fileA before and after your delivery. CS2 describes what happened from CS1 to the end. The gap is the part that describes how fileA got to CS1. You can fix this by suspending both CS1 and CS2 and redoing the changes made in CS2.
Take a look at the history of one of your files that exists in the change sets you want to deliver and also in the change sets that you don't want to deliver. You'll see that trying to deliver some of the change sets will create a gap in the history that is not allowed by SCM.
Comments
Tim's answer is correct.
However, since this question is about gaps, I'd like to point out some new features related to gaps that were delivered after the above question was created/answered.
In RTC 4.0.5 we delivered additional support when trying to accept change sets which have a gap (often encountered when trying to backport fixes). In a very brief summary of the feature, when you accept change sets with a gap, you can now follow a gap workflow that accepts one change set at a time and, for change sets that contain gaps, creates a new change set (with aided traceability), that contains the equivalent changes. This means users will not have to accept the change sets 'as a patch'. Applying change sets as a patch has limitations compared to the new workflow (as discussed in the article below).
This feature is summarized in the RTC 4.0.5 'New & Noteworthy' page: https://jazz.net/downloads/rational-team-concert/releases/4.0.5?p=news#scm-improve-usability-405-m1
<continue reading my next comment below)
Below are some videos which show this feature:
-Accepting multiple change sets with gaps in the RTC 4.0.5 client for Eclipse IDE: https://www.youtube.com/watch?v=28raag5RdzU
-Accepting a change set with a gap in the RTC 4.0.5 client for Eclipse IDE: https://www.youtube.com/watch?v=TucVu_BgB7E
In RTC 5.0 we added a "fill the gap" feature where the change sets that fill the gap are shown to the user, allowing them to either accept all the change sets or to continue with the gap workflow that was available in RTC 4.0.5.
This feature is summarized in the RTC 5.0 'New & Noteworthy' page: https://jazz.net/downloads/rational-team-concert/releases/5.0?p=news#eclipse-fill-gaps
The classes that are involved for filling the gap include (available in RTC 5.0):
client side: IWorkspaceConnection.findChangeSetsToAcceptToFillGap(...)
server side: IScmQueryService.findChangeSetsToAcceptToFillGap(...)
Both features are explained in detail in the "Improved Gap Handling for SCM" article: https://jazz.net/library/article/1372
Comments
Jeff Care
Oct 04 '13, 4:00 p.m.I take it that you are trying to selectively deliver? What's the purpose of the change sets that you mentioned in your note at the end?
Those changesets are the source of your problem.
Yehia Abo Sedera
JAZZ DEVELOPER Oct 04 '13, 4:16 p.m.Currently I don't need them ... it is just bunch of old code that won't be delivered .. any idea how to discard them ??