Mercurial > evolve
comparison tests/test-evolve-content-divergent-stack.t @ 5513:a8c21707e9c4
evolve: add test to show broken --continue case of content divergence
This test case demonstrates that during the resolution of content
divergence which includes relocation of "divergent" side but not
"other" and results in merge conflict during relocation, we can
lose some changes.
Next patch will fix this bug.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Wed, 05 Aug 2020 00:16:26 +0530 |
parents | e8660b28bfee |
children | 4c3656aaacc6 |
comparison
equal
deleted
inserted
replaced
5510:9fef6f8790a5 | 5513:a8c21707e9c4 |
---|---|
171 | () [default] draft | 171 | () [default] draft |
172 @ 13:df93a529fa42 watbar to a | 172 @ 13:df93a529fa42 watbar to a |
173 | () [default] draft | 173 | () [default] draft |
174 o 0:8fa14d15e168 added hgignore | 174 o 0:8fa14d15e168 added hgignore |
175 () [default] draft | 175 () [default] draft |
176 | |
177 Testing --continue case when relocating "divergent" | |
178 --------------------------------------------------- | |
179 When no relocation is required for "other", but "divergent" | |
180 hit merge conflict in relocation. This test makes sure that | |
181 content of two divergent csets merged correctly after the | |
182 merge conflict. | |
183 | |
184 $ hg log -r "desc('added c')" -p | |
185 changeset: 17:a18171c7d9e7 | |
186 parent: 15:365f419742a3 | |
187 user: test | |
188 date: Thu Jan 01 00:00:00 1970 +0000 | |
189 summary: added c | |
190 | |
191 diff -r 365f419742a3 -r a18171c7d9e7 c | |
192 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
193 +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
194 @@ -0,0 +1,1 @@ | |
195 +foo | |
196 | |
197 $ hg strip -r 16: --hidden | |
198 saved backup bundle to $TESTTMP/stacktest/.hg/strip-backup/b949c7ad8d83-6039d2cc-backup.hg | |
199 4 new orphan changesets | |
200 4 new content-divergent changesets | |
201 $ hg glog | |
202 o 15:365f419742a3 added b | |
203 | () [default] draft | |
204 @ 13:df93a529fa42 watbar to a | |
205 | () [default] draft | |
206 | * 12:15c781f93cac added d | |
207 | | () [default] draft | |
208 | * 11:9e5fb1d5b955 added c | |
209 | | () [default] draft | |
210 | x 10:88516dccf68a added b | |
211 | | () [default] draft | |
212 | x 9:82b74d5dc678 watbar to a | |
213 |/ () [default] draft | |
214 | * 8:c72d2885eb51 added d | |
215 | | () [default] draft | |
216 | * 7:3ce4be6d8e5e added c | |
217 | | () [default] draft | |
218 | x 6:d5f148423c16 added b | |
219 | | () [default] draft | |
220 | x 5:8e222f257bbf watbar to a | |
221 |/ () [default] draft | |
222 o 0:8fa14d15e168 added hgignore | |
223 () [default] draft | |
224 $ hg next | |
225 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
226 [15] added b | |
227 $ echo conflict > c | |
228 $ hg amend -A | |
229 adding c | |
230 | |
231 add some changes on "other" side, to check later that merging performed correctly | |
232 $ hg up -r 11 | |
233 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
234 $ echo new_file > newfile | |
235 $ hg amend -Am "added c and newfile" | |
236 adding newfile | |
237 | |
238 $ hg evolve --content-divergent -r 7 | |
239 merge:[7] added c | |
240 with: [17] added c and newfile | |
241 base: [3] added c | |
242 rebasing "divergent" content-divergent changeset 3ce4be6d8e5e on fb488ec29dfa | |
243 merging c | |
244 warning: conflicts while merging c! (edit, then use 'hg resolve --mark') | |
245 unresolved merge conflicts | |
246 (see 'hg help evolve.interrupted') | |
247 [1] | |
248 $ echo c > c | |
249 $ hg res -m | |
250 (no more unresolved files) | |
251 continue: hg evolve --continue | |
252 | |
253 $ hg evolve --continue | |
254 evolving 7:3ce4be6d8e5e "added c" | |
255 working directory is now at 9cede3ad51fc | |
256 # XXX: resultant cset should contain the newfile added on "other" side | |
257 $ hg log -p -l1 | |
258 changeset: 19:9cede3ad51fc | |
259 tag: tip | |
260 parent: 16:fb488ec29dfa | |
261 user: test | |
262 date: Thu Jan 01 00:00:00 1970 +0000 | |
263 summary: added c and newfile | |
264 | |
265 diff -r fb488ec29dfa -r 9cede3ad51fc c | |
266 --- a/c Thu Jan 01 00:00:00 1970 +0000 | |
267 +++ b/c Thu Jan 01 00:00:00 1970 +0000 | |
268 @@ -1,1 +1,1 @@ | |
269 -conflict | |
270 +c | |
271 | |
272 | |
176 Resolving content-divergence of a stack with different parents | 273 Resolving content-divergence of a stack with different parents |
177 --------------------------------------------------------- | 274 --------------------------------------------------------- |
178 | 275 |
179 $ cd .. | 276 $ cd .. |
180 $ hg init stackrepo1 | 277 $ hg init stackrepo1 |