-
- Downloads
rebase: rewrite core algorithm (issue5578) (issue5630)
"defineparents" is the core algorithm of rebase. The old code has too many tech debts (like outdated comments, confusing assertions, etc) and is very error-prone to be improved. This patch rewrites "defineparents" to make the code easier to reason about, and solve a bunch of issues, including: - Assertion error: no base found (demonstrated by D212, issue5578) - Asymmetric result (demonstrated by D211, "F with one parent") - Wrong new parent (demonstrated by D262, "C':A'A'") - "revlog index out of range" (demonstrated by D262, issue5630) - "nothing to merge" (demonstrated by D262) As a side effect, merge base decision has been made more solid - rebase now prints out explicitly what could go wrong when it cannot find a unique suitable merge base. .. fix:: Issue 5578, Issue 5630 Core rebase algorithm has been rewritten to be more robust. Differential Revision: https://phab.mercurial-scm.org/D21
Showing
- hgext/rebase.py 164 additions, 113 deletionshgext/rebase.py
- tests/test-rebase-brute-force.t 3 additions, 3 deletionstests/test-rebase-brute-force.t
- tests/test-rebase-newancestor.t 99 additions, 1 deletiontests/test-rebase-newancestor.t
- tests/test-rebase-obsolete.t 46 additions, 36 deletionstests/test-rebase-obsolete.t
Loading
Please register or sign in to comment