Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
44686:bca57ad9e630 | 44687:1b8fd4af3318 |
---|---|
60 8 add foo bar | 60 8 add foo bar |
61 7 change foo | 61 7 change foo |
62 6 make bar and baz copies of foo | 62 6 make bar and baz copies of foo |
63 5 merge local copy | 63 5 merge local copy |
64 4 merge remote copy | 64 4 merge remote copy |
65 3 Added tag that for changeset 88586c4e9f02 | 65 3 Added tag that for changeset 8601262d7472 |
66 2 Removed tag that | 66 2 Removed tag that |
67 1 Added tag this for changeset c56a7f387039 | 67 1 Added tag this for changeset 706614b458c1 |
68 0 mark baz executable | 68 0 mark baz executable |
69 updating bookmarks | 69 updating bookmarks |
70 $ cd new | 70 $ cd new |
71 $ hg out ../orig | 71 $ hg out ../orig |
72 comparing with ../orig | 72 comparing with ../orig |
74 no changes found | 74 no changes found |
75 [1] | 75 [1] |
76 #if execbit | 76 #if execbit |
77 $ hg bookmarks | 77 $ hg bookmarks |
78 premerge1 3:973ef48a98a4 | 78 premerge1 3:973ef48a98a4 |
79 premerge2 8:91d107c423ba | 79 premerge2 8:c4968fdf2e5d |
80 #else | 80 #else |
81 Different hash because no x bit | 81 Different hash because no x bit |
82 $ hg bookmarks | 82 $ hg bookmarks |
83 premerge1 3:973ef48a98a4 | 83 premerge1 3:973ef48a98a4 |
84 premerge2 8:3537b15eaaca | 84 premerge2 8:3537b15eaaca |
94 8 add foo bar | 94 8 add foo bar |
95 7 change foo | 95 7 change foo |
96 6 make bar and baz copies of foo | 96 6 make bar and baz copies of foo |
97 5 merge local copy | 97 5 merge local copy |
98 4 merge remote copy | 98 4 merge remote copy |
99 3 Added tag that for changeset 88586c4e9f02 | 99 3 Added tag that for changeset 8601262d7472 |
100 2 Removed tag that | 100 2 Removed tag that |
101 1 Added tag this for changeset c56a7f387039 | 101 1 Added tag this for changeset 706614b458c1 |
102 0 mark baz executable | 102 0 mark baz executable |
103 updating bookmarks | 103 updating bookmarks |
104 $ hg -R new log -G -T '{rev} {desc}' | 104 $ hg -R new log -G -T '{rev} {desc}' |
105 o 8 mark baz executable | 105 o 8 mark baz executable |
106 | | 106 | |
107 o 7 Added tag this for changeset c56a7f387039 | 107 o 7 Added tag this for changeset 706614b458c1 |
108 | | 108 | |
109 o 6 Removed tag that | 109 o 6 Removed tag that |
110 | | 110 | |
111 o 5 Added tag that for changeset 88586c4e9f02 | 111 o 5 Added tag that for changeset 8601262d7472 |
112 | | 112 | |
113 o 4 merge remote copy | 113 o 4 merge remote copy |
114 |\ | 114 |\ |
115 +---o 3 merge local copy | 115 +---o 3 merge local copy |
116 | |/ | 116 | |/ |