Mercurial > hg
diff tests/test-copies.t @ 41932:7694b685bb10
copies: handle a case when both merging csets are not descendant of merge base
This patch fix the behaviour of fullcopytracing algorithm in the case
when both the merging csets are not the descendant of merge base.
Although it seems to be the rare case when both the csets are not
descendant of merge base. But it can be seen in most of cases of
content-divergence in evolve extension, where merge base is the common
predecessor.
Previous patch added a test where this algorithm can fail to continue
because of an assumption that only one of the two csets can be dirty.
This patch fix that error.
For refrence I suggest you to look into the previous discussion held
on a patch sent by Pulkit: https://phab.mercurial-scm.org/D3896
Differential Revision: https://phab.mercurial-scm.org/D5963
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Wed, 13 Feb 2019 15:50:14 +0530 |
parents | fc4b7a46fda1 |
children | 5382d8f8530b |
line wrap: on
line diff
--- a/tests/test-copies.t Thu Feb 14 16:09:43 2019 +0530 +++ b/tests/test-copies.t Wed Feb 13 15:50:14 2019 +0530 @@ -554,8 +554,9 @@ b +baba -Test which demonstrate that fullcopytracing algorithm can fail to handle a case when both the csets are dirty ----------------------------------------------------------------------------------------------------------- +Test to make sure that fullcopytracing algorithm don't fail when both the merging csets are dirty +(a dirty cset is one who is not the descendant of merge base) +------------------------------------------------------------------------------------------------- $ newrepo $ echo a > a @@ -628,6 +629,5 @@ Now if we trigger a merge between cset revision 3 and 6 using base revision 4, in this case both the merging csets will be dirty as no one is descendent of base revision: - $ hg graft -r 6 --base 4 --hidden 2>&1 | grep "AssertionError" - AssertionError - + $ hg graft -r 6 --base 4 --hidden -t :other + grafting 6:99802e4f1e46 "added willconflict and d" (tip)