Merge Result - Where did THAT code come from?
Moderator: SourceGear
Merge Result - Where did THAT code come from?
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?
-
- Posts: 534
- Joined: Tue Jun 05, 2007 11:37 am
- Location: SourceGear
- Contact:
The center panel.
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.
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.
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?
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?
-
- Posts: 534
- Joined: Tue Jun 05, 2007 11:37 am
- Location: SourceGear
- Contact:
that's odd.
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
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
Nevermind...
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.
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.
Re: Merge Result - Where did THAT code come from?
Just let me know if you see anything else that doesn't seem right. I appreciate the update. Thanks.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support