##// END OF EJS Templates
branchmap: introduce branchtip() method
Brodie Rao -
r20186:f5b461a4 default
parent child Browse files
Show More
@@ -166,6 +166,19 b' class branchcache(dict):'
166 166 except IndexError:
167 167 return False
168 168
169 def _branchtip(self, heads):
170 tip = heads[-1]
171 closed = True
172 for h in reversed(heads):
173 if h not in self._closednodes:
174 tip = h
175 closed = False
176 break
177 return tip, closed
178
179 def branchtip(self, branch):
180 return self._branchtip(self[branch])[0]
181
169 182 def copy(self):
170 183 """return an deep copy of the branchcache object"""
171 184 return branchcache(self, self.tipnode, self.tiprev, self.filteredhash,
General Comments 0
You need to be logged in to leave comments. Login now