comparison mercurial/obsolete.py @ 38157:02f992ac26e9

phases: define an official tuple of mutable phases Such tuple was already manually defined in a couple of place. Having an official definition makes it easy to introduce of new phases.
author Boris Feld <boris.feld@octobus.net>
date Tue, 22 May 2018 18:10:00 +0200
parents d30810d09d6f
children 6b5ca1d0aa1e
comparison
equal deleted inserted replaced
38156:5b592ac502ef 38157:02f992ac26e9
851 if 'obsstore' in repo._filecache: 851 if 'obsstore' in repo._filecache:
852 repo.obsstore.caches.clear() 852 repo.obsstore.caches.clear()
853 853
854 def _mutablerevs(repo): 854 def _mutablerevs(repo):
855 """the set of mutable revision in the repository""" 855 """the set of mutable revision in the repository"""
856 return repo._phasecache.getrevset(repo, (phases.draft, phases.secret)) 856 return repo._phasecache.getrevset(repo, phases.mutablephases)
857 857
858 @cachefor('obsolete') 858 @cachefor('obsolete')
859 def _computeobsoleteset(repo): 859 def _computeobsoleteset(repo):
860 """the set of obsolete revisions""" 860 """the set of obsolete revisions"""
861 getnode = repo.changelog.node 861 getnode = repo.changelog.node