Using 6192a67b7962. This was found as a side effect of working on issue5627 fix. $ cat >> $HGRCPATH<<EOF > [extensions] > rebase= > drawdag=$TESTDIR/drawdag.py > [experimental] > evolution=createmarkers, allowunstable > EOF Case 1 $ hg init $ hg debugdrawdag <<'EOS' > E > /| > | D > | | > | C > |/ > B F > |/ > A > EOS $ hg rebase -r C+E -d B .... (crash) .... AssertionError: no base found to rebase on (defineparents called wrong) Case 2 (only rev numbers are different from Case 1, but different crash) $ rm -rf .hg $ hg init $ hg debugdrawdag <<'EOS' > E > /| > | D > | | > | C > |/ > F B > |/ > A > EOS $ hg rebase -r C+E -d F .... (crash) .... ValueError: revlog index out of range Case 3 (copy Case 1 with "G" added, to be more realistic) $ rm -rf .hg $ hg init $ hg debugdrawdag <<'EOS' > E > /| > | D > | | > G C > |/ > B F > |/ > A > EOS $ hg rebase -r C+E -d B .... (crash) .... ValueError: revlog index out of range I believe there are many more interesting test cases, and https://phab.mercurial-scm.org/D21 stack fixes all the crashes with some reasonable behavior.
The first case looks somewhat similar to the issue 5578.
Fixed by https://phab.mercurial-scm.org/D21
Fixed by https://mercurial-scm.org/repo/hg/rev/0975506120fb Jun Wu <quark@fb.com> 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 (please test the fix)
Bug was set to TESTING for 13 days, resolving
Created attachment 2118 [details] Script that triggers the error.
Comment on attachment 2118 [details] Script that triggers the error. My apologies, this was submitted on the wrong bug report. I'd remove it myself but I can't find how to do that. Please disregard.