rebase: avoid defining two lists with the same contents
In abort(), there's "dstates" and "rebased" that are identical, which
they seem to have been since
0806823370d8 (rebase: properly calculate
descendant set when aborting (
issue3332), 2012-03-22). Let's
de-duplicate. I don't know what "dstates" means, but "rebased" makes
sense (it's the list of rebased revisions), so let's pick that.
Differential Revision: https://phab.mercurial-scm.org/D2878
tests: demonstrate aborted rebase strips commits that didn't need rebasing
I haven't verified, but this has probably been broken ever since I
added the feature in
78496ac30025 (rebase: allow rebase even if some
revisions need no rebase (BC) (
issue5422), 2017-05-11).
Differential Revision: https://phab.mercurial-scm.org/D2877
hgweb: convert an assert to a ProgrammingError
Because assert may get optimized away.
Differential Revision: https://phab.mercurial-scm.org/D2882
filemerge: give some variables in _xmerge more descriptive names
Differential Revision: https://phab.mercurial-scm.org/D2886
rebase: allow in-memory merge of the working copy parent
Before this patch and when the rebase involved the working copy parent
(and thus the working copy too), we would not do in-memory rebase even
if requested to. The in-code comment explains that the reason had
something to do with avoiding an extra update, but I don't know which
update that refers to. Perhaps an earlier version of the code used to
update to the destination before rebasing even if in-memory rebase was
requested? That seems to not be done at least since
aa660c1203a9
(rebase: do not bail on uncomitted changes if rebasing in-memory,
2017-12-07).
To see if this still made it slower, I create a single tiny commit on
top of one branch of the mozilla-unified repo (commit
a1098c82 to be
exact) and rebased it to another branch (commit
d4e9a7be). Before this
patch that took 11.8s and after this patch it took 8.6s (I only did
two runs each, but the timings were very consistent).
Differential Revision: https://phab.mercurial-scm.org/D2876