comparison mercurial/branchmap.py @ 20188:3a3727829607

branchmap: introduce branchheads() method
author Brodie Rao <brodie@sf.io>
date Mon, 16 Sep 2013 01:08:29 -0700
parents f5b461a4bc55
children d5d25e541637
comparison
equal deleted inserted replaced
20187:4d6d5ef88538 20188:3a3727829607
177 return tip, closed 177 return tip, closed
178 178
179 def branchtip(self, branch): 179 def branchtip(self, branch):
180 return self._branchtip(self[branch])[0] 180 return self._branchtip(self[branch])[0]
181 181
182 def branchheads(self, branch, closed=False):
183 heads = self[branch]
184 if not closed:
185 heads = [h for h in heads if h not in self._closednodes]
186 return heads
187
182 def copy(self): 188 def copy(self):
183 """return an deep copy of the branchcache object""" 189 """return an deep copy of the branchcache object"""
184 return branchcache(self, self.tipnode, self.tiprev, self.filteredhash, 190 return branchcache(self, self.tipnode, self.tiprev, self.filteredhash,
185 self._closednodes) 191 self._closednodes)
186 192