mercurial/obsolete.py
changeset 32729 c8177792fef6
parent 32692 9576974a3b6d
child 32774 5ffb138d7b1a
equal deleted inserted replaced
32728:3e8eb6d84a5c 32729:c8177792fef6
   750             pendingnodes = set([m[0] for m in direct])
   750             pendingnodes = set([m[0] for m in direct])
   751             seenmarkers |= direct
   751             seenmarkers |= direct
   752             pendingnodes -= seennodes
   752             pendingnodes -= seennodes
   753             seennodes |= pendingnodes
   753             seennodes |= pendingnodes
   754         return seenmarkers
   754         return seenmarkers
       
   755 
       
   756 def makestore(ui, repo):
       
   757     """Create an obsstore instance from a repo."""
       
   758     # read default format for new obsstore.
       
   759     # developer config: format.obsstore-version
       
   760     defaultformat = ui.configint('format', 'obsstore-version', None)
       
   761     # rely on obsstore class default when possible.
       
   762     kwargs = {}
       
   763     if defaultformat is not None:
       
   764         kwargs['defaultformat'] = defaultformat
       
   765     readonly = not isenabled(repo, createmarkersopt)
       
   766     store = obsstore(repo.svfs, readonly=readonly, **kwargs)
       
   767     if store and readonly:
       
   768         ui.warn(_('obsolete feature not enabled but %i markers found!\n')
       
   769                 % len(list(store)))
       
   770     return store
   755 
   771 
   756 def _filterprunes(markers):
   772 def _filterprunes(markers):
   757     """return a set with no prune markers"""
   773     """return a set with no prune markers"""
   758     return set(m for m in markers if m[1])
   774     return set(m for m in markers if m[1])
   759 
   775