Arun Kulshreshtha <akulshreshtha@janestreet.com> [Tue, 30 Aug 2022 15:29:55 -0400] rev 49503
bisect: avoid copying ancestor list for non-merge commits
During a bisection, hg needs to compute a list of all ancestors for every
candidate commit. This is accomplished via a bottom-up traversal of the set of
candidates, during which each revision's ancestor list is populated using the
ancestor list of its parent(s). Previously, this involved copying the entire
list, which could be very long in if the bisection range was large.
To help improve this, we can observe that each candidate commit is visited
exactly once, at which point its ancestor list is copied into its children's
lists and then dropped. In the case of non-merge commits, a commit's ancestor
list consists exactly of its parent's list plus itself. This means that we can
trivially reuse the parent's existing list for one of its non-merge children,
which avoids copying entirely if that commit is the parent's only child. This
makes bisections over linear ranges of commits much faster.
During some informal testing in the large publicly-available `mozilla-central`
repository, this noticeably sped up bisections over large ranges of history:
Setup:
$ cd mozilla-central
$ hg bisect --reset
$ hg bisect --good 0
$ hg log -r tip -T '{rev}\n'
628417
Test:
$ time hg bisect --bad tip --noupdate
Before:
real 3m35.927s
user 3m35.553s
sys 0m0.319s
After:
real 1m41.142s
user 1m40.810s
sys 0m0.285s
Raphaël Gomès <rgomes@octobus.net> [Mon, 25 Jul 2022 15:39:04 +0200] rev 49502
rhg-status: add support for narrow clones
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Jul 2022 17:07:09 +0200] rev 49501
rust: add support for hints in error messages
This will be used by the narrow support code in the next commit.
Raphaël Gomès <rgomes@octobus.net> [Mon, 11 Jul 2022 11:59:13 +0200] rev 49500
rust: add Debug constraint to Matcher trait
This makes sure we can easily debug which Matcher we're looking at when using
trait objects, and is just generally useful. Effort to make the debugging
output nicer has been kept to a minimum, please feel free to improve.
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Jul 2022 15:37:45 +0200] rev 49499
rhg: add sparse support
Raphaël Gomès <rgomes@octobus.net> [Tue, 19 Jul 2022 15:37:09 +0200] rev 49498
rhg: add debugrhgsparse command to help figure out bugs in rhg
Raphaël Gomès <rgomes@octobus.net> [Tue, 26 Jul 2022 17:33:34 +0200] rev 49497
rhg-status: extract a function for printing pattern file warnings
This will be reused for the warnings produced by the sparse file parsing
functions.
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Jul 2022 17:25:49 +0200] rev 49496
rust-filepatterns: allow overriding default syntax
This will be used when parsing pattern files other than .hgignore like the
sparse spec.
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 Jul 2022 10:15:52 +0200] rev 49495
rhg: don't fallback if `strip` or `rebase` are activated
Neither of these extensions do anything other than add commands, so ignoring
them opens up more of the test suite to rhg.
Raphaël Gomès <rgomes@octobus.net> [Mon, 11 Jul 2022 17:44:03 +0200] rev 49494
rhg: fallback in `debugdata` if repo has `narrow`
Narrow uses ellipsis nodes and debugdata does not understand them yet.