mercurial/localrepo.py
changeset 17714 5210e5a556d9
parent 17675 8575f4a2126e
child 17715 21c503480986
equal deleted inserted replaced
17713:2c6382772db0 17714:5210e5a556d9
   625         # this private cache holds all heads (not just the branch tips)
   625         # this private cache holds all heads (not just the branch tips)
   626         self._branchcache = partial
   626         self._branchcache = partial
   627 
   627 
   628     def branchmap(self):
   628     def branchmap(self):
   629         '''returns a dictionary {branch: [branchheads]}'''
   629         '''returns a dictionary {branch: [branchheads]}'''
   630         self.updatebranchcache()
   630         if self.changelog.filteredrevs:
   631         return self._branchcache
   631             # some changeset are excluded we can't use the cache
       
   632             branchmap = {}
       
   633             self._updatebranchcache(branchmap, (self[r] for r in self))
       
   634             return branchmap
       
   635         else:
       
   636             self.updatebranchcache()
       
   637             return self._branchcache
       
   638 
   632 
   639 
   633     def _branchtip(self, heads):
   640     def _branchtip(self, heads):
   634         '''return the tipmost branch head in heads'''
   641         '''return the tipmost branch head in heads'''
   635         tip = heads[-1]
   642         tip = heads[-1]
   636         for h in reversed(heads):
   643         for h in reversed(heads):