Mercurial > hg
comparison tests/test-graft.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 | 78b9fdb844c1 |
children | 0707bbec682d |
comparison
equal
deleted
inserted
replaced
28010:eb22def9db3b | 28011:8abd9f785030 |
---|---|
187 getting d | 187 getting d |
188 b: remote unchanged -> k | 188 b: remote unchanged -> k |
189 e: versions differ -> m (premerge) | 189 e: versions differ -> m (premerge) |
190 picked tool ':merge' for e (binary False symlink False changedelete False) | 190 picked tool ':merge' for e (binary False symlink False changedelete False) |
191 merging e | 191 merging e |
192 my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 | 192 my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 |
193 e: versions differ -> m (merge) | 193 e: versions differ -> m (merge) |
194 picked tool ':merge' for e (binary False symlink False changedelete False) | 194 picked tool ':merge' for e (binary False symlink False changedelete False) |
195 my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622 | 195 my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304 |
196 warning: conflicts while merging e! (edit, then use 'hg resolve --mark') | 196 warning: conflicts while merging e! (edit, then use 'hg resolve --mark') |
197 abort: unresolved conflicts, can't continue | 197 abort: unresolved conflicts, can't continue |
198 (use hg resolve and hg graft --continue --log) | 198 (use hg resolve and hg graft --continue --log) |
199 [255] | 199 [255] |
200 | 200 |