Mercurial > public > mercurial-scm > hg
diff tests/test-convert-hg-source.t @ 44687:1b8fd4af3318
mergestate: store about files resolved in favour of other
Committing a merge sometimes wrongly creates a new filenode where it can re-use
an existing one. This happens because the commit code does it's own calculation
and does not know what happened on merge.
This starts storing information in mergestate about files which were
automatically merged and the other/remote version of file was used.
We need this information at commit to pick the filenode parent for the new
commit.
This issue was found by Pierre-Yves David and idea to store the relevant parts
in mergestate is also suggested by him.
Somethings which can be further investigated are:
1) refactoring of commit logic more to depend on this information
2) maybe a more generic solution?
Differential Revision: https://phab.mercurial-scm.org/D8392
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 09 Apr 2020 16:06:03 +0530 |
parents | fcd7a91dec23 |
children | 78b7eae31488 |
line wrap: on
line diff
--- a/tests/test-convert-hg-source.t Thu Apr 09 15:44:21 2020 -0400 +++ b/tests/test-convert-hg-source.t Thu Apr 09 16:06:03 2020 +0530 @@ -62,9 +62,9 @@ 6 make bar and baz copies of foo 5 merge local copy 4 merge remote copy - 3 Added tag that for changeset 88586c4e9f02 + 3 Added tag that for changeset 8601262d7472 2 Removed tag that - 1 Added tag this for changeset c56a7f387039 + 1 Added tag this for changeset 706614b458c1 0 mark baz executable updating bookmarks $ cd new @@ -76,7 +76,7 @@ #if execbit $ hg bookmarks premerge1 3:973ef48a98a4 - premerge2 8:91d107c423ba + premerge2 8:c4968fdf2e5d #else Different hash because no x bit $ hg bookmarks @@ -96,19 +96,19 @@ 6 make bar and baz copies of foo 5 merge local copy 4 merge remote copy - 3 Added tag that for changeset 88586c4e9f02 + 3 Added tag that for changeset 8601262d7472 2 Removed tag that - 1 Added tag this for changeset c56a7f387039 + 1 Added tag this for changeset 706614b458c1 0 mark baz executable updating bookmarks $ hg -R new log -G -T '{rev} {desc}' o 8 mark baz executable | - o 7 Added tag this for changeset c56a7f387039 + o 7 Added tag this for changeset 706614b458c1 | o 6 Removed tag that | - o 5 Added tag that for changeset 88586c4e9f02 + o 5 Added tag that for changeset 8601262d7472 | o 4 merge remote copy |\