Skip to content
Snippets Groups Projects

Draft: evolve: look for split successors of the correct ancestor (issue6648)

Merged Anton Shestakov requested to merge topic/stable/single-successor-6648 into branch/stable
  1. Apr 21, 2022
    • Anton Shestakov's avatar
      evolve: look for split successors of the correct ancestor (issue6648) · 17ffdea0edbb
      Anton Shestakov authored
      Consider two changesets, 1 and 2. 1 is split into two new changesets and 2 is
      pruned. If we stand on 2 and call hg evolve, _singlesuccessor() will traverse
      ancestors of wdp in search of a changeset with successors to update to (it will
      be 1, which was split). In case of a split, select_split_successor() gets
      control. The issue is this function didn't traverse ancestors, and instead
      tried to look up successors of the original changeset (i.e. 2 in our case,
      which was pruned).
      
      We can make select_split_successor() aware of _singlesuccessor() logic by using
      the changeset that actually has successors without traversing ancestors again.
      It's done by storing that changeset in MultipleSuccessorsError exception.
      17ffdea0edbb
Loading