comparison mercurial/branchmap.py @ 20190:d5d25e541637

branchmap: introduce iterbranches() method
author Brodie Rao <brodie@sf.io>
date Mon, 16 Sep 2013 01:08:29 -0700
parents 3a3727829607
children 4edd179fefb8
comparison
equal deleted inserted replaced
20189:1831993d0902 20190:d5d25e541637
183 heads = self[branch] 183 heads = self[branch]
184 if not closed: 184 if not closed:
185 heads = [h for h in heads if h not in self._closednodes] 185 heads = [h for h in heads if h not in self._closednodes]
186 return heads 186 return heads
187 187
188 def iterbranches(self):
189 for bn, heads in self.iteritems():
190 yield (bn, heads) + self._branchtip(heads)
191
188 def copy(self): 192 def copy(self):
189 """return an deep copy of the branchcache object""" 193 """return an deep copy of the branchcache object"""
190 return branchcache(self, self.tipnode, self.tiprev, self.filteredhash, 194 return branchcache(self, self.tipnode, self.tiprev, self.filteredhash,
191 self._closednodes) 195 self._closednodes)
192 196