Unexpected result from bzr merge: line missing?
Monty Taylor
mordred at inaugust.com
Thu Jul 29 00:33:25 BST 2010
On 07/28/2010 04:24 PM, Terry Jones wrote:
> I guess there's something I'm not understanding then. My understanding was
> that when I looked at any file with conflicts in it, I'd see something
> like:
>
> common1
> <<<<<<< TREE
> text1
> =======
> text2
> >>>>>>> MERGE-SOURCE
> common2
>
> and that I could either use common1/text1/common2 to have things as they
> were in my current tree, or I could use common1/text2/common2 to have
> things as they were in the merge source. I've always resolved conflicts
> that way, usually selecting either text1 or text2 and deleting the other,
> and of course occasionally doing some work to manually merge things *within
> the <<< >>> block*.
>
> But in the current example it's not as simple, because simply removing
> text1 does *not* result in me having the code as it was in the merge
> source. The "about = guessValue(about)" line (416 in the merge source,
> i.e., the trunk) would then be missing.
Sometimes (as you are finding here) you may need to manually decide what
the resulting text will be, and it may very well include some elements
from each block. That's ok - the merge conflicts are essentially places
where it's asking you to make a human choice anyway.
This is actually a really good example of a situation where
understanding of what each change was doing and how to merge them is
important.
> So in this case, the correct resolution (which is not complicated, it's
> simply to have what was in the merge source) requires me to consider code
> that falls *outside* the
>
> <<<<<<< TREE
> text1
> =======
> text2
> >>>>>>> MERGE-SOURCE
>
> block, which I find a bit disturbing / counter-intuitive. How far back in
> the common1 text (or how far forward in the common2 text) am I supposed to
> look before I can be confident I've not overlooked something that bzr merge
> didn't flag for me?
I don't know of many instances (I can't think of any, and I've been a
user for 4 years now) where it got the sections outside of the merge
conflict markers incorrect and I've had to fix it.
More information about the bazaar
mailing list