Mercurial > hg
changeset 26001:748053b4a66b
revset: make revsbetween public
This patch is part of a series of patches to speed up the computation of
revset.revsbetween by introducing a C implementation. The main motivation is to
speed up smartlog on big repositories. At the end of the series, on our big
repositories the computation of revsbetween is 10-50x faster and smartlog on is
2x-5x faster.
Later in this serie, we want to reuse the implementation of revsbetween in the
changelog module, therefore, we make it public.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Fri, 07 Aug 2015 02:13:42 -0700 |
parents | 1c75249e159b |
children | fd92bfbbe02d |
files | mercurial/revset.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Tue Aug 11 13:19:42 2015 +0800 +++ b/mercurial/revset.py Fri Aug 07 02:13:42 2015 -0700 @@ -87,7 +87,7 @@ return generatorset(iterate(), iterasc=True) -def _revsbetween(repo, roots, heads): +def revsbetween(repo, roots, heads): """Return all paths between roots and heads, inclusive of both endpoint sets.""" if not roots: @@ -406,7 +406,7 @@ def dagrange(repo, subset, x, y): r = fullreposet(repo) - xs = _revsbetween(repo, getset(repo, r, x), getset(repo, r, y)) + xs = revsbetween(repo, getset(repo, r, x), getset(repo, r, y)) # XXX We should combine with subset first: 'subset & baseset(...)'. This is # necessary to ensure we preserve the order in subset. return xs & subset