mercurial/localrepo.py
changeset 18124 79db6d40bced
parent 18123 6fb3b8c61775
child 18125 ad194a8ab5c1
equal deleted inserted replaced
18123:6fb3b8c61775 18124:79db6d40bced
   664 
   664 
   665     def branchmap(self):
   665     def branchmap(self):
   666         '''returns a dictionary {branch: [branchheads]}'''
   666         '''returns a dictionary {branch: [branchheads]}'''
   667         if self.changelog.filteredrevs:
   667         if self.changelog.filteredrevs:
   668             # some changeset are excluded we can't use the cache
   668             # some changeset are excluded we can't use the cache
   669             bmap = {}
   669             bmap = branchmap.branchcache()
   670             branchmap.update(self, bmap, (self[r] for r in self))
   670             branchmap.update(self, bmap, (self[r] for r in self))
   671             return bmap
   671             return bmap
   672         else:
   672         else:
   673             branchmap.updatecache(self)
   673             branchmap.updatecache(self)
   674             return self._branchcache
   674             return self._branchcache
  2493                     rbheads.extend(bheads)
  2493                     rbheads.extend(bheads)
  2494 
  2494 
  2495                 if rbheads:
  2495                 if rbheads:
  2496                     rtiprev = max((int(self.changelog.rev(node))
  2496                     rtiprev = max((int(self.changelog.rev(node))
  2497                             for node in rbheads))
  2497                             for node in rbheads))
  2498                     self._branchcache = rbranchmap
  2498                     self._branchcache = branchmap.branchcache(rbranchmap)
  2499                     rtipnode = self._branchcachetip = self[rtiprev].node()
  2499                     rtipnode = self._branchcachetip = self[rtiprev].node()
  2500                     branchmap.write(self, self._branchcache, rtipnode, rtiprev)
  2500                     branchmap.write(self, self._branchcache, rtipnode, rtiprev)
  2501             self.invalidate()
  2501             self.invalidate()
  2502             return len(self.heads()) + 1
  2502             return len(self.heads()) + 1
  2503         finally:
  2503         finally: