¿Qué archivo se guarda en el trabajo de combinación de tres vías con Mercurial?

I have the three way merge window open in Mercurial:

  • I was on branch A: hg update A.
  • I want to merge with branch B : hg merge B

Quiero saber que es local, base y other.

Yo leo esto ¿Cómo funciona la fusión de 3 vías en Mercurial / Meld? pero no pudo conseguirlo.

Now I want to know which file from local, base, other I need to save? Do I need to make all files the same? Will this change files in other branches or it will only save in my current branch A only, and other branches won't be touched?

preguntado el 09 de septiembre de 13 a las 02:09

1 Respuestas

En tu ejemplo:

  • local is the last changeset on branch A.
  • other is the last changeset on branch B.
  • base is the newest changeset which is an ancestor of the both branches.

If you just do the commands that you listed above (hg update A, hg merge B) then you won't get a choice of which files to take because Mercurial will make that choice for you where it can.

The only time that you'll need to make a decision is if a file has been changed in both branches in a way that Mercurial can't automatically resolve. In that case, you'll be presented with your merge program of choice to resolve the conflicts. You have to look at the changes made in each branch and manually decide how they need to be combined. If another developer made one of the changes then you might need to ask them to help with the merge.

Si lo hace hg update A, hg merge B then the only branch that will be affected is A.

Respondido el 09 de Septiembre de 13 a las 08:09

For example i made chnage in branch B and then some chnage in branch A. Now i get the meld tool with three files. now i want to know that which file from local , other , base , will be saved for branch A. bceause i don't want to touch branch B' file because that was bug fix branch - user26

Typically the one in the middle. If you don't know how to use meld, don't use it. I always use ui.merge=internal:merge with Mercurial. For me, this is much preferable. - Timbre

What is still missing here is which of the three open filenames to put the merged version in and save. - steve corona

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.