Comments
Patch
@@ -853,7 +853,7 @@ def clearobscaches(repo):
def _mutablerevs(repo):
"""the set of mutable revision in the repository"""
- return repo._phasecache.getrevset(repo, (phases.draft, phases.secret))
+ return repo._phasecache.getrevset(repo, phases.mutablephases)
@cachefor('obsolete')
def _computeobsoleteset(repo):
@@ -126,6 +126,7 @@ from . import (
allphases = public, draft, secret = range(3)
trackedphases = allphases[1:]
phasenames = ['public', 'draft', 'secret']
+mutablephases = tuple(allphases[1:])
def _readroots(repo, phasedefaults=None):
"""Read phase roots from disk
@@ -77,8 +77,7 @@ def computehidden(repo, visibilityexcept
if visibilityexceptions:
hidden -= visibilityexceptions
pfunc = repo.changelog.parentrevs
- mutablephases = (phases.draft, phases.secret)
- mutable = repo._phasecache.getrevset(repo, mutablephases)
+ mutable = repo._phasecache.getrevset(repo, phases.mutablephases)
visible = mutable - hidden
_revealancestors(pfunc, hidden, visible)