Merge Result - Where did THAT code come from?

If you are having a problem using Fortress, post a message here.

Moderator: SourceGear

Post Reply
AjarnMark
Posts: 60
Joined: Mon Oct 29, 2007 4:22 pm
Location: Seattle, WA

Merge Result - Where did THAT code come from?

Post by AjarnMark » Wed Jul 23, 2008 11:00 am

In trying to resolve a Merge Conflict, I choose Show Merge and it opened the 3-pane window. In the middle pane ("Merge Result") there are some lines of code that do not have corresponding lines in either the Target File pane or the Origin File pane. So, if the code was not in the Target File and it's not in the Origin File, where in the heck did it come from?

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Jul 23, 2008 12:40 pm

The center pane uses the common parent for the two files as the one to work from for the merge.

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

The center panel.

Post by jeffhostetler » Wed Jul 23, 2008 1:51 pm

While looking at the 3 panel view with the merge result,
you can hit UNDO (or click on the reference view tab at
the bottom) and see all three files as they were before
the merge.

AjarnMark
Posts: 60
Joined: Mon Oct 29, 2007 4:22 pm
Location: Seattle, WA

Post by AjarnMark » Wed Jul 23, 2008 2:51 pm

I see what happened... The common ancestor file had those lines of code in them, and then the developer made the same change (deleting those lines) in two different branches, which when merged together, the process seemed to think that the code lines should still be there.

It seems counter-intuitive to me that it would interpret that the lines should be restored when the action that occurred in the Origin folder was to delete the line.

Does that sound accurate/reasonable to you?

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

that's odd.

Post by jeffhostetler » Wed Jul 23, 2008 3:13 pm

That's odd. If the identical change/delete was made in both branches,
then the merge result should have the change/delete.

If you want to send me a snippet from the 3 input files, I'll take a look
and see if there's anything funny going on. Email (with the link below)
a zip with the 3 files or fragments (the change/delete in question plus
about 10 lines of common lines above and below it).

jeff

AjarnMark
Posts: 60
Joined: Mon Oct 29, 2007 4:22 pm
Location: Seattle, WA

Nevermind...

Post by AjarnMark » Fri Jul 25, 2008 12:10 pm

Nevermind... I think I tricked myself. While extracting the information that you (Jeff) requested, I ran one more test and discovered that what probably happened was that I was looking at the Reference View at the time that I noticed this and got confused.

Unfortunately I cannot examine exactly the same thing as when I posted this question because I had to move on and complete the merge processing. However, I took a copy of the common ancestor and the other files and on-the-side did a re-try of the merge and discovered that (in a different part of the file) in the Reference View, as Beth indicated, it shows the common ancestor which had the lines and both the target and origin where the lines were deleted it showed the void.

So, not being able to exactly recreate what I saw originally, but seeing a look-alike, I'm going to put the blame on myself and consider this a non-issue. Sorry for the false alarm.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Merge Result - Where did THAT code come from?

Post by Beth » Fri Jul 25, 2008 2:23 pm

Just let me know if you see anything else that doesn't seem right. I appreciate the update. Thanks.
Beth Kieler
SourceGear Technical Support

Post Reply