Skip to content
  • Sushil Khanchi's avatar
    evolve: use 3-way merge to check if only one of them was moved · 65b37900d477
    Sushil Khanchi authored
    While deciding the resolution parent for content-divergence resolution,
    now we use 3-way merge logic to check, if only one of them was moved from its
    original position by applying the logic on following:
    (parent of "base", parent of "divergent", parent of "other")
    
    Before this patch, we always set the parent of ahead one (from the two
    divergent cset) as resolution parent and then make sure both are located
    on resolution parent and perform 3-way merge to get resultant cset.
    
    But now, if the reason behind content-divergence is that one side amended
    some content changes while other moved forward/backward in the dag;
    we set the parent of relocated one as resolution parent and then make sure both
    are on resolution parent and perform 3-way merge.
    
    This patch also adds few new lines to support a case where "one cset moved
    somewhere; other moved to successor of base.p1()"
    
    Changes is test files reflect the changed behavior.
    65b37900d477