Patchwork D8670: repoview: use the phasecache directly to determine mutable revisions

login
register
mail settings
Submitter phabricator
Date June 27, 2020, 11:08 p.m.
Message ID <differential-rev-PHID-DREV-msdprjxyxxwdb5ihffpz-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46582/
State New
Headers show

Comments

phabricator - June 27, 2020, 11:08 p.m.
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




To: joerg.sonnenberger, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

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()