It's all about the answers!

Ask a question

Manual Code Merge?


Alan D (15621211) | asked Sep 15 '10, 9:51 a.m.
retagged Jun 24 '14, 9:50 a.m. by David Lafreniere (4.7k7)
Why does RTC not allow you to perform a manual interactive merge between the classes in 2 streams?

I'm promoting a chuck of code for a test delivery and am getting refusals based around a couple of classes.

Using the Patch function is *very* time consuming as if I take a change set and patch one of the classes inside it, I need to patch all the classes, which then throws up merge conflicts on any dependent classes in other packages, so I need to patch them, and so on. I've been at this for over 7 hours now and am nowhere near the finish, whereas if I could tell RTC "I know what I'm doing, take this line from file 1, this line from file 2 etc" I'd have had this completed in under an hour.

RTC is a great tool in many respects, but this is a major let down.

Any ideas?

11 answers



permanent link
Geoffrey Clemm (30.0k23035) | answered Sep 15 '10, 7:36 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Can you elaborate on what you mean by "getting refusals"?

Cheers,
Geoff

On 9/15/2010 9:53 AM, 1.21Jigawatts wrote:
Why does RTC not allow you to perform a manual interactive merge
between the classes in 2 streams?

I'm promoting a chuck of code for a test delivery and am getting
refusals based around a couple of classes.

Using the Patch function is *very* time consuming as if I take a
change set and patch one of the classes inside it, I need to patch
all the classes, which then throws up merge conflicts on any
dependent classes in other packages, so I need to patch them, and so
on. I've been at this for over 7 hours now and am nowhere near the
finish, whereas if I could tell RTC "I know what I'm doing, take
this line from file 1, this line from file 2 etc" I'd have had
this completed in under an hour.

RTC is a great tool in many respects, but this is a major let down.

Any ideas?

permanent link
Alan D (15621211) | answered Sep 16 '10, 8:04 a.m.
Yes

I'm trying to commit a number of change sets from a DEV stream to a test stream. One class is causing RTC to fail the commit as the delivery will introduce gaps in the stream based on this one file.

My beef is that I know which version of the file I want, but I can't:
1) perform a manul/interactive merge as I don't think this function exists on RTC
2) I can't replace the file in the Test stream with the latest from the DEV stream

I also cannot locate where the gap occured.

This left me with the option of performing a patch on the file. However, the change set contains other files, so these needed to be included in the patch. some of these files are mentioned in other change sets, so they need to be patched also. Those change sets also contain other files which....

I've bodged this today by simply replacing the entire component in TEST with the component from the DEV stream which I'm not very comfortable with.

permanent link
Geoffrey Clemm (30.0k23035) | answered Sep 25 '10, 12:12 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You probably want to look at work item 128329 ("Handling accepting
change sets with gaps via patches is complex and loses traceability
information"), and add a comment to indicate your interest/support.

Cheers,
Geoff

On 9/16/2010 8:08 AM, 1.21Jigawatts wrote:
Yes

I'm trying to commit a number of change sets from a DEV stream to a
test stream. One class is causing RTC to fail the commit as the
delivery will introduce gaps in the stream based on this one file.

My beef is that I know which version of the file I want, but I can't:
1) perform a manul/interactive merge as I don't think this function
exists on RTC
2) I can't replace the file in the Test stream with the latest from
the DEV stream

I also cannot locate where the gap occured.

This left me with the option of performing a patch on the file.
However, the change set contains other files, so these needed to be
included in the patch. some of these files are mentioned in other
change sets, so they need to be patched also. Those change sets also
contain other files which....

I've bodged this today by simply replacing the entire component in
TEST with the component from the DEV stream which I'm not very
comfortable with.

permanent link
Alan D (15621211) | answered Sep 30 '10, 4:51 a.m.
This tool is now unusable.

I have a file that has had *no changes* since RTC was adopted that needs to be deliverd as an E-Fix to a different stream - the stream will not allow the file to be delivered:

"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 don't care what RTC says, there are *no* dependencies on this file. Anyway, I cannot deliver all the change sets as some of these are still undergoing testing.

Why can't I force a merge - I know what files I need, and what lines in those files I need.

This is hopeless.

permanent link
Michael Valenta (3.6k3) | answered Sep 30 '10, 11:06 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
The issue you are hitting is that the deliver workflow does not support
the resolution of gaps or conflicts. What you need to do is create a
workspace off of the target stream, load it into the RTC client and
accept the change set into this workspace. The client will then indicate
that there is a gap and apply the change as a patch. You can then merge
the changes into your local workspace, check them into the remote
workspace and then deliver to the stream.

Michael

1.21Jigawatts wrote:
This tool is now unusable.

I have a file that has had *no changes* since RTC was adopted that
needs to be deliverd as an E-Fix to a different stream - the stream
will not allow the file to be delivered:

"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 don't care what RTC says, there are *no* dependencies on this file.
Anyway, I cannot deliver all the change sets as some of these are
still undergoing testing.

Why can't I force a merge - I know what files I need, and what lines
in those files I need.

This is hopeless.

permanent link
Rahul Pawar (7121) | answered Dec 07 '10, 7:15 a.m.
Hi All

Thanks Michael & Geoff for your replies on this thread. Even I would like to understand the standard process to merge from a 'Production' Stream to a 'Enhancement' Stream using RTC. I was trying out the following on a POC level. It seems to work, but please can anyone confirm this approach is right?

1. As you already suggested I have made two Streams MyProdStream & MyEnhanceStream & their respective Repository Workspaces MyProdWkspace & MyEnhanceWkspace. The production fixes are available in MyProdWkspace and the new functionality being added is available in MyEnhanceWkspace (branch).

2. In Team Artifacts view, select the two workspaces, Right + Click --> Compare With --> Each Other. This opens the Change Explorer View

3. Expand the Component, 'Only in MyProdWkspace'. This shows all the files changed / new / deleted grouped by Change Sets from the MyProdWkspace.

4. Select the relevant Change Sets, Right + Click --> New --> Patch & Save in a file MaintenancePatch_DDMMYY.diff

5. In Package Explorer view of MyEnhanceWkspace, Right + Click --> Team --> Apply Patch. Select the file MaintenancePatch_DDMMYY.diff & Finish. This opens the Pending Changes View

6. Expand the Pending Patches. Select Change Set, Right + Click --> Merge into Workspace. All non-conflicting changes will be merged and the rest will be shown with a Red icon. Double click the Red icon files, manually compare and merge them in Eclipse Compare Editor.

7. Check in the merged changes to MyEnhanceWkspace & then Deliver to MyEnhanceStream.

Is this process for merging production fixes to the enhancement stream correct?
Thanks!

Rahul

Comments
David Lafreniere commented Jun 20 '14, 4:53 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

That would be correct for any version of RTC prior to 4.0.5. See my answer which talks about the features delivered in RTC 4.0.5 and 5.0 around gap handling (and up-vote the answer if you agree it solves your use case, since there are a lot of answered to this question)


permanent link
Geoffrey Clemm (30.0k23035) | answered Dec 07 '10, 11:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Two comments.

- Whenever possible, you want to just deliver a change-set directly from
one stream to another ... and not create a patch (a patch is a new copy
of the change-set, which introduces traceability issues). The only time
you want to create patch is when you have to, and the only time you have
to deliver via a patch is when the change set you want to deliver
"depends on" another change set that you don't want to deliver. (A
change set Y depends on another change set X if Y modifies a file that
has previously been modified by X.) You'll know when you have to create
a patch when your attempt to deliver the change set results in a "gap
error" (the "gap" is the dependent change set that you didn't want to
deliver).

- There are a couple of bugs with patching that are being fixed in the
upcoming 3.0 iFix1 (mostly around a patch that both modifies a file and
renames that file).

Cheers,
Geoff



On 12/7/2010 7:23 AM, techforum99 wrote:
Hi All

Thanks Michael& Geoff for your replies on this thread. Even I
would like to understand the standard process to merge from a
'Production' Stream to a 'Enhancement' Stream using RTC. I was trying
out the following on a POC level. It seems to work, but please can
anyone confirm this approach is right?

1. As you already suggested I have made two Streams MyProdStream&
MyEnhanceStream& their respective Repository Workspaces
MyProdWkspace& MyEnhanceWkspace. The production fixes are
available in MyProdWkspace and the new functionality being added is
available in MyEnhanceWkspace (branch).

2. In Team Artifacts view, select the two workspaces, Right + Click
--> Compare With --> Each Other. This opens the Change Explorer
View

3. Expand the Component, 'Only in MyProdWkspace'. This shows all the
files changed / new / deleted grouped by Change Sets from the
MyProdWkspace.

4. Select the relevant Change Sets, Right + Click --> New --
Patch& Save in a file MaintenancePatch_DDMMYY.diff

5. In Package Explorer view of MyEnhanceWkspace, Right + Click --
Team --> Apply Patch. Select the file MaintenancePatch_DDMMYY.diff
& Finish. This opens the Pending Changes View

6. Expand the Pending Patches. Select Change Set, Right + Click --
Merge into Workspace. All non-conflicting changes will be merged and
the rest will be shown with a Red icon. Double click the Red icon
files, manually compare and merge them in Eclipse Compare Editor.

7. Check in the merged changes to MyEnhanceWkspace& then Deliver
to MyEnhanceStream.

Is this process for merging production fixes to the enhancement stream
correct?
Thanks!

Rahul

permanent link
Rahul Pawar (7121) | answered Dec 08 '10, 7:07 a.m.
Thanks Geoff for the quick reply. I was trying to understand in more detail what you meant by
"Whenever possible, you want to just deliver a change-set directly from one stream to another ... and not create a patch"

Were you trying to suggest the following:
1. Instead of creating a Patch as written in Step 4 of my earlier post, just Right+Click on the ChangeSet --> Accept, from the MyProdWkspace into the MyEnhanceWkspace.

2. Then in the Pending Changes view --> Unresolved tree, either Auto-Merge OR Manually merge the files in MyEnhanceWkspace.

3. Then Deliver this Outgoing tree to the MyEnhanceStream Stream.

Is this correct?

Thanks again!
Rahul

permanent link
Geoffrey Clemm (30.0k23035) | answered Dec 08 '10, 11:23 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Yes, that is correct.

Cheers,
Geoff

On 12/8/2010 7:08 AM, techforum99 wrote:
Thanks Geoff for the quick reply. I was trying to understand in more
detail what you meant by
"Whenever possible,
you want to just deliver a change-set directly from one stream to
another ... and not create a patch"

Were you trying to suggest the following:
1. Instead of creating a Patch as written in Step 4 of my earlier
post, just Right+Click on the ChangeSet --> Accept, from the
MyProdWkspace into the MyEnhanceWkspace.

2. Then in the Pending Changes view --> Unresolved tree, either
Auto-Merge OR Manually merge the files in MyEnhanceWkspace.

3. Then Deliver this Outgoing tree to the MyEnhanceStream Stream.

Is this correct?

Thanks again!
Rahul

permanent link
Rahul Pawar (7121) | answered Dec 09 '10, 2:04 a.m.
Thanks a Lot, Geoff!

Your answer


Register or to post your answer.