AW: Merge does not list file as conflict although file has been changed
Matthias Tietz
tietz at symmedia.de
Thu Jul 11 06:59:52 UTC 2013
Hello Simon,
Many thanks! I have done what you suggested and no changes have been
displayed. I will try to understand what happens during the merges but
yesterday I couldn't see any problem. Just to get more familiar with the
details: Is there some detailed description about the logic of merging
respectively the "calculation" of conflicts. As I supposed so far a file
will be marked as a conflict when the file content in one head is different
to another. This seems not to be correct.
Kind regards
Matthias
-----Ursprüngliche Nachricht-----
Von: Simon King [mailto:simon at simonking.org.uk]
Gesendet: Donnerstag, 11. Juli 2013 00:44
An: Matthias Tietz
Cc: mercurial at selenic.com
Betreff: Re: Merge does not list file as conflict although file has been
changed
On 10 Jul 2013, at 17:25, "Matthias Tietz" <tietz at symmedia.de> wrote:
> Dear Mercurial users,
>
> We are quite new in using hg and satisfied. Unfortunately we are a bit
confused currently because we have the effect that a file change is not
marked as conflict during a merge. We are confused because inside one named
branch the file change has been marked as conflict respectively was detected
as change and the relevant file was updated. But now always the former
content is used and no conflict is being displayed.
>
> Version information:
> - We are using TortoiseHg 2.8.1 (includes Mercurial 2.6.2)
> Scenario:
> - We have several open heads inside a named branch and we are
going to merge all open heads to one main line.
> - Now there is the effect that a change of one file is not
recognized. That means: I expect that Mercurial will mark a file as conflict
because the content has changed in one of heads
> - The file size has not changed
> - Confusing is as described above that the change will be applied
in one merge (see figure 2)
> - But now if I do a merge does not lead to the expected result.
>
> What are we doing wrong? I hope that there is a logical explanation. Maybe
you can send me some additional documentation links to be able to understand
the logic. Maybe there is a bug in Mercurial what I still do not believe.
>
> Additional information:
> - Due to the fact that some colleagues are not familiar in using
version control systems there have been done several unnecessary merges. Is
there some logic that can lead to such an effect? That means a change will
be ignored because of XY?
> - I am not sure what kind of information I could send to explain
it in a good way.
>
The first thing to check is the common ancestor of the 2 revisions you are
merging. You can find this with something like:
hg log -r "ancestor(<rev1>, <rev2>)"
Having got that revision, you can then check the changes that have happened
to the file in question on each branch:
hg diff -r <ancestor> -r <rev1> <filename>
hg diff -r <ancestor> -r <rev2> <filename>
If those diffs don't show you the changes you expect, then one of the
"unnecessary merges" that you mention may be the cause of the problem.
If you *do* see the changes you expected in the output from the diffs, then
something else is going on. You could try running the merge with the --debug
flag, which will output a lot more information, including the exact
revisions that mercurial is using for each file.
Hope that helps,
Simon
More information about the Mercurial
mailing list