[Request] [+ ] D8670: repoview: use the phasecache directly to determine mutable revisions

joerg.sonnenberger (Joerg Sonnenberger) phabricator at mercurial-scm.org
Sat Jun 27 23:08:41 UTC 2020


joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This speeds up no-change updates from 1.3s to 0.85s for my NetBSD test
  repository.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8670

AFFECTED FILES
  mercurial/repoview.py

CHANGE DETAILS

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -130,9 +130,7 @@
     assert not repo.changelog.filteredrevs
     # fast check to avoid revset call on huge repo
     if repo._phasecache.hasnonpublicphases(repo):
-        getphase = repo._phasecache.phase
-        maymutable = filterrevs(repo, b'base')
-        return frozenset(r for r in maymutable if getphase(repo, r))
+        return frozenset(repo._phasecache.getrevset(repo, phases.mutablephases))
     return frozenset()
 
 



To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200627/0b5f51d0/attachment.html>


More information about the Mercurial-patches mailing list