Puzzled about merge conflicts.

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Feb 8 15:53:41 GMT 2010


>>>>> "Óscar" == Óscar Fuentes <ofv at wanadoo.es> writes:

<snip/>

    >> From there, it's a bit harder to guess what you did, but given
    >> the messages below, you probably 'bzr add' the .BASE, .THIS,
    >> .OTHER files, adding to the confusion.

    Óscar> Nope. The only command executed was a `bzr merge
    Óscar> other-branch-ur'.

I see, yes, indeed a contents conflicts, so .bzrignore.OTHER was
(and is) *still* versioned (its contents being the .bzrignore
file from the branch you're merging from).

<snip/>

    >> 'bzr help conflict-types' is supposed to explain the
    >> different types of conflict,

    Óscar> BTW, it is `bzr help conflicts'

Right, 'bzr help conflicts' for bzr-2.0, it has been renamed for
bzr-2.1, sorry.

    >> I suspect that you didn't realize that a 'Content Conflict' was
    >> involved here .

    Óscar> IMO bzr should consider that a text conflict.

Easier said than done, while this appears correct for the case at
hand, it's easy to imagine that a file can be renamed in one
branch, a new one created with the same name and in that case,
you definitely *don't* want them to be considered the same file.

And in your case, you want a text conflict, but that also means
that you want to merge the two files histories. There are plans
for that (search the wiki for path-tokens) but nothing have been
implemented yet.

    >> Yup, no '.THIS' file, so that's not a 'Text Conflict' but indeed
    >> a 'Content Conflict', you're trying to merge two different files
    >> (they have different file-ids) into the same path (yes, they have
    >> the same paths in both branches, yet bzr doesn't see them as the
    >> same file as mentioned above).

    Óscar> Sorry for not being more explicit,

Sorry for my misunderstanding :)


    Óscar> but the "funny effect" I was trying to describe above
    Óscar> was the transformation of `.bzrignore.OTHER' into
    Óscar> `.bzrignore.OTHER.OTHER' after the remerge. A
    Óscar> subsequent remerge will rename it to
    Óscar> `.bzrignore.OTHER.OTHER.OTHER', etc. It was funny too
    Óscar> to see how bzr complains about conflicts on the files
    Óscar> he himself created (the *.OTHER and *.BASE files). It
    Óscar> clearly smells like a bug there.

I think you're right :-/ remerge is supposed to cleanup the
conflicts before remerging, obviously it failed here.

Care to file a bug ?

Anyway, since then, I suppose you sorted out the mess, but just
in case: what you want is merging the content of '.bzrignore' and
'.bzrignore.OTHER' with the help of '.bzrignore.BASE' if needed
and then 'bzr rm .bzrignore.OTHER', bzr resolve .bzrignore.

If you use bzr.dev, the later can be achieved with 'bzr resolve --take-this .bzrignore'

     Vincent





More information about the bazaar mailing list