It's all about the answers!

Ask a question

Difficulties merging "evil twin" directories/files


Peter Hendriks (2611) | asked Jan 04 '10, 6:04 a.m.
I am having difficulties merging directories and files which are added at multiple streams/workspaces before being merged together (described as "evil twins" in the Jazz merge article). I tried following the article at: http://jazz.net/library/article/39#Example_6 and the help at:
Resolving Structural Conflicts.

The UI does not seem to respond as indicated in the article. When I add a file in the same location with different contents in multiple changesets (add file, suspend changeset, new changeset with add file same location, different contents, resume suspended) I do not get a content diff. Instead, the UI only shows the contents of the first changeset on the right hand side.

When I add a directory in multiple changesets and merge them together, I get very little feedback on what will happen depending on the type of merge resolution. The help is pretty vague and when I try out the different options it is difficult for me to get the rationale behind the options.

Could anyone explain to me what should happen depending on the choice I make when I try to merge added directories on the same location from multiple changesets?

Also, is there any way to see the contents and original changesets of the files/directories of the two conflicting changesets when doing this kind of merges?

Thank you in advance for any answer!

11 answers



permanent link
Heather Fraser-Dube (4512) | answered Jan 05 '10, 1:45 p.m.
JAZZ DEVELOPER
I tried out evil twin file conflicts and the compare editor on the conflict shows both sides as expected.

Perhaps you were looking at a change within a change set to seek the difference when you get a blank side. This is expected since the change set is about the addition of a file. If this is not the case and continues to be a problem, please open a work item for Source control and provide details and screen shots of your pending changes view (conflicts and change sets) as well as a screen shot of your compare editor.

To try and explain the options you have with Evil twin directories, I will give an example.

I created a folder under the src directory of my project by the name of "a".
Within that pkg, I created 2 files with contents "H.java" and "J.java".

I suspended that change set, then recreated "a", "H.java" and "I.java" checked in and resumed the suspended change set.

I now have a conflict on the folder "a" <Added>. For a description of the conflict, hover over it and press f2 to read the full description.

I also have 2 incidental conflicts on "H.java" and "J.java". Basically what happened here is there is a conflict on something else ("a") that prevents them from being added. Because the parent directory is in conflict, we can't decide how to deal with these items until the parent directory conflict is dealt with.

There are a bunch of ways to resolve the conflicts depending on what you want at the end.

Say you decide the "a" directory (and its contents) as is in your workspace is the directory are what you want (you don't want the other directory nor its contents). In this case, you would select the conflict on "a" and resolve with mine. The "H.java" (copy in change set accepted) and "J.java" would be deleted because you decided that the proposed "a" directory is not what you want.

If you decide the "a" directory (and its contents) which was accepted but not applied is the directory you want (you don't want the directory you currently have, you want the proposed directory "a" and its contents). In this case you would select the conflict on "a" and resolve with proposed. This would mean that the files "H.java" (copy you had before resuming) and "I.java" would be deleted and you would get the "H.java" and "J.java" from the suspended change set.

But if you wanted both directories and or some of the files within them, you have a bunch of choices...
- You could rename your existing "a" directory to something else and check in that change (the conflict is gone - the "a" proposed can be accepted).
- You could decide to rename the directory "a" that is proposed by selecting the conflict on "a" and using the "move" menu action (the conflict is gone).
- You could decide to put the proposed directory "a" under a different parent (where there is no child "a"). Select the conflict on "a" and use the "move" menu option (the conflict is gone).
- You could decide to keep just the "J.java" file, Select the incidental conflict on "J.jave" and use the "move" action. You can choose your existing "a" directory as the parent.
- You could decide to "merge" the contents of the two "H.java" files. You would open a compare editor on the file. The actual merging is a little harder in this compare editor since it is just a 2-way compare. You may find yourself copy and pasting changes between the panes.
Basically the "move" menu action is to help you bring the conflicted item into your configuration under either a different parent or different name. From there you can further change your files until things are the way you want.

To see the before and after, what you can do is locate the change set in your history and then open it in the change explorer.

I am having difficulties merging directories and files which are added at multiple streams/workspaces before being merged together (described as "evil twins" in the Jazz merge article). I tried following the article at: http://jazz.net/library/article/39#Example_6 and the help at:
Resolving Structural Conflicts.

The UI does not seem to respond as indicated in the article. When I add a file in the same location with different contents in multiple changesets (add file, suspend changeset, new changeset with add file same location, different contents, resume suspended) I do not get a content diff. Instead, the UI only shows the contents of the first changeset on the right hand side.

When I add a directory in multiple changesets and merge them together, I get very little feedback on what will happen depending on the type of merge resolution. The help is pretty vague and when I try out the different options it is difficult for me to get the rationale behind the options.

Could anyone explain to me what should happen depending on the choice I make when I try to merge added directories on the same location from multiple changesets?

Also, is there any way to see the contents and original changesets of the files/directories of the two conflicting changesets when doing this kind of merges?

Thank you in advance for any answer!

permanent link
Peter Hendriks (2611) | answered Jan 06 '10, 8:32 a.m.
Thank you for the detailed answer! I tried it out again on different repo workspaces/projects and on some situations it does work correct. I'll try to come up with a way to reproduce the lack of evil twin compare.

On the directory merge, thanks. I had some problems merging directories where I didn't want to use the same kind of resolutation (mine/proposed/merged) on each file in the directory. If I start in a file, I get some pop-ups of merging the parent, but this will cascade to the other files too. I will try to use the move command to get the merge I want.

In you example, you can also select "resolve as merged" on the directory "a". This results in a remove/add for the files. When would you want to select this merge resolution for the "a" directory (in contrast to resolve with mine/proposed)?

permanent link
Heather Fraser-Dube (4512) | answered Jan 06 '10, 8:44 a.m.
JAZZ DEVELOPER
Resolve as merged probably doesn't make a lot of sense right now with directories in the add-add evil twin case. It might make more sense later when we have properties.

Resolve as merged is very similar to resolve with mine. The difference between the two is that Resolve as merged verifies that the item has been saved since the conflict was introduced. The intention is to help prevent the user from marking something as merged when they did not merge (so they don't lose other people's changes).

Thank you for the detailed answer! I tried it out again on different repo workspaces/projects and on some situations it does work correct. I'll try to come up with a way to reproduce the lack of evil twin compare.

On the directory merge, thanks. I had some problems merging directories where I didn't want to use the same kind of resolutation (mine/proposed/merged) on each file in the directory. If I start in a file, I get some pop-ups of merging the parent, but this will cascade to the other files too. I will try to use the move command to get the merge I want.

In you example, you can also select "resolve as merged" on the directory "a". This results in a remove/add for the files. When would you want to select this merge resolution for the "a" directory (in contrast to resolve with mine/proposed)?

permanent link
Erik anderson (38315029) | answered Jun 01 '10, 2:27 p.m.
Does anyone know if "structural" changes can be resolved with the SCM tool (SCM conlficts ... and SCM resolve ...)? The UI is working fine with regard to evil twins (proposed vs mine vs move), but I can't get the same behavior using the SCM tool.

What SCM commands would I use to resolve the following conflict:

1 scm status -d "C:\Program Files\IBM\TeamConcert2.0.0.2_iFix2\merge-ws"
Workspace: (1162) "foobar 2.0 Merge" <-> (1126) "foobar 2.0"
Component: (1106) "comp1"
Baseline: (1165) 39 "SNAP 20100521.1545"
Component: (1166) "comp2"
Baseline: (1169) 5 "FB1.0_20100528.1107"
Conflicts:
Example1/lwp/evilFile.txt (Added <-> Added)
Outgoing:
Change sets:
(1178) --$ "evil test - source stream"

permanent link
Shashikant Padur (4.2k27) | answered Jun 03 '10, 3:10 a.m.
JAZZ DEVELOPER
Resolve with mine (checked in version)...
1 scm resolve -c Example1/lwp/evilFile.txt

use -p for Resolve with proposed.

permanent link
Yaron Norani (47267064) | answered Jun 03 '10, 8:59 a.m.
Hello,
I am using RTC 2.0.0.2.
I am using also ClearCase Connector in order to Sync ClearCase Stream to RTC.
I have performed all the needed configurations and it works fine.
The connector is using the build mechanism - build engine and definition.
The problem is that currently the build engine is not running and I do not find a way to enable it using the GUI.
Error is: the build enginge process may not be running.

Is there a way to enable it using the GUI?

I guess I will be able to activate it using the cmd.

Thanks,

Yaron

permanent link
Erik anderson (38315029) | answered Jun 03 '10, 9:06 a.m.
Yaron, please post this as a new topic, not as a reply to this thread.

permanent link
Erik anderson (38315029) | answered Jun 03 '10, 9:22 a.m.
Thanks - that worked for and "Add <-> Add"

But if I make another change to the file in the source stream and flow, I get a "Deleted <-> Modified" and the same approach does not work:

2 scm status
Workspace: (1163) "eanderso foobar 2.0 Merge" <-> (1126) "foobar 2.0"
Component: (1106) "comp1"
Baseline: (1165) 39 "SNAP 20100521.1545"
Component: (1166) "comp2"
Baseline: (1169) 5 "FB1.0_20100528.1107"
Conflicts:
Example1/lwp/evilFile.txt (Deleted <-> Modified)
Outgoing:
Change sets:
(1187) --$ "evilFile.txt - another change source stream"

2 scm resolve -c Example1/lwp/evilFile.txt
Cannot resolve conflicts, unmatched items:
\Example1\lwp\evilFile.txt
Problem running 'resolve':
Supplied paths must match existing conflicts

What would I use to resolve with mine?

Comments
Erik anderson commented Dec 18 '12, 4:39 p.m.

Using 3.0.1.3.  Any ideas?

C:\tools\MergeSandbox> scm.exe conflicts
Conflicts:
  C-- /felement.xml (Deleted <-> Modified)

C:\tools\MergeSandbox>  scm.exe resolve -c /felement.xml
Cannot resolve conflicts, unmatched items:
  /felement.xml
Problem running 'resolve':
Supplied paths must match existing conflicts

C:\tools\MergeSandbox>dir
12/18/2012  04:19 PM    <DIR>          .
12/18/2012  04:19 PM    <DIR>          ..
12/18/2012  04:24 PM    <DIR>          .jazz5
12/18/2012  12:12 PM    <DIR>          .metadata
12/18/2012  04:19 PM               210 .project
12/18/2012  04:23 PM             2,165 felement.xml


permanent link
Geoffrey Clemm (30.1k33035) | answered Jun 03 '10, 9:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
To use the Eclipse GUI to activate the synchronizer build engine for a
particular sync stream, you need to be running the Eclipse client on the
machine where you want the sync engine to be running. Then just open
the ClearCase synchronized streams view, right click on the synchronized
stream you are interested in, and select the &quot;Start Synchronization
Engine&quot; operation.

Cheers,
Geoff

On 6/3/2010 9:08 AM, yaron wrote:
Hello,
I am using RTC 2.0.0.2.
I am using also ClearCase Connector in order to Sync ClearCase Stream
to RTC.
I have performed all the needed configurations and it works fine.
The connector is using the build mechanism - build engine and
definition.
The problem is that currently the build engine is not running and I do
not find a way to enable it using the GUI.
Error is: the build enginge process may not be running.

Is there a way to enable it using the GUI?

I guess I will be able to activate it using the cmd.

Thanks,

Yaron

permanent link
Geoffrey Clemm (30.1k33035) | answered Jun 03 '10, 12:47 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Response to this message appears in the same message that was reposted
in its own thread.

Your answer


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.