comparison tests/test-merge-criss-cross.t @ 28011:8abd9f785030

merge: add file ancestor linknode to mergestate During a merge, each file has a current commitnode+filenode, an other commitnode+filenode, and an ancestor commitnode+filenode. The ancestor commitnode is not stored though, and we rely on the ability for the filectx() to look up the commitnode by using the filenode's linkrev. In alternative backends (like remotefilelog), linkrevs may have restriction that prevent arbitrary linkrev look up given a filenode. This patch accounts for that by storing the ancestor commitnode in the merge state so that it is available later at resolve time. This results in some test changes because the ancestor commitnode we're using at resolve time changes slightly. Before, we used the linkrev commit, which is the earliest commit that introduced that particular filenode (which may not be the latest common ancestor of the commits being merged). Now we use the latest common ancestor of the merged commits as the commitnode. This is fine though, because that commit contains the same filenode as the linkrev'd commit.
author Durham Goode <durham@fb.com>
date Fri, 05 Feb 2016 10:22:14 -0800
parents 296d55def9c4
children 6b1fc09c699a
comparison
equal deleted inserted replaced
28010:eb22def9db3b 28011:8abd9f785030
83 f1: remote is newer -> g 83 f1: remote is newer -> g
84 getting f1 84 getting f1
85 f2: versions differ -> m (premerge) 85 f2: versions differ -> m (premerge)
86 picked tool ':dump' for f2 (binary False symlink False changedelete False) 86 picked tool ':dump' for f2 (binary False symlink False changedelete False)
87 merging f2 87 merging f2
88 my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c 88 my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@0f6b37dbe527
89 f2: versions differ -> m (merge) 89 f2: versions differ -> m (merge)
90 picked tool ':dump' for f2 (binary False symlink False changedelete False) 90 picked tool ':dump' for f2 (binary False symlink False changedelete False)
91 my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c 91 my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@0f6b37dbe527
92 1 files updated, 0 files merged, 0 files removed, 1 files unresolved 92 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
93 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon 93 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
94 [1] 94 [1]
95 95
96 $ head * 96 $ head *