mercurial/obsolete.py
changeset 18275 9818f22785b7
parent 18271 67872e939945
child 18276 834ef7e70d0f
equal deleted inserted replaced
18274:254b708fd37d 18275:9818f22785b7
   658     return obs
   658     return obs
   659 
   659 
   660 @cachefor('unstable')
   660 @cachefor('unstable')
   661 def _computeunstableset(repo):
   661 def _computeunstableset(repo):
   662     """the set of non obsolete revisions with obsolete parents"""
   662     """the set of non obsolete revisions with obsolete parents"""
   663     return set(repo.revs('(obsolete()::) - obsolete()'))
   663     # revset is not efficient enough here
       
   664     # we do (obsolete()::) - obsolete() by hand
       
   665     obs = getrevs(repo, 'obsolete')
       
   666     if not obs:
       
   667         return set()
       
   668     cl = repo.changelog
       
   669     return set(r for r in cl.descendants(obs) if r not in obs)
   664 
   670 
   665 @cachefor('suspended')
   671 @cachefor('suspended')
   666 def _computesuspendedset(repo):
   672 def _computesuspendedset(repo):
   667     """the set of obsolete parents with non obsolete descendants"""
   673     """the set of obsolete parents with non obsolete descendants"""
   668     return set(repo.revs('obsolete() and obsolete()::unstable()'))
   674     return set(repo.revs('obsolete() and obsolete()::unstable()'))