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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

dploch (Daniel Ploch)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel