##// END OF EJS Templates
context: add method to return all bookmarks pointing to a node
David Soria Parra -
r13384:caa56175 default
parent child Browse files
Show More
@@ -114,6 +114,8 b' class changectx(object):'
114 return self._changeset[5]
114 return self._changeset[5]
115 def tags(self):
115 def tags(self):
116 return self._repo.nodetags(self._node)
116 return self._repo.nodetags(self._node)
117 def bookmarks(self):
118 return self._repo.nodebookmarks(self._node)
117
119
118 def parents(self):
120 def parents(self):
119 """return contexts for each parent changeset"""
121 """return contexts for each parent changeset"""
@@ -399,6 +399,13 b' class localrepository(repo.repository):'
399 tags.sort()
399 tags.sort()
400 return self.nodetagscache.get(node, [])
400 return self.nodetagscache.get(node, [])
401
401
402 def nodebookmarks(self, node):
403 marks = []
404 for bookmark, n in self._bookmarks.iteritems():
405 if n == node:
406 marks.append(bookmark)
407 return sorted(marks)
408
402 def _branchtags(self, partial, lrev):
409 def _branchtags(self, partial, lrev):
403 # TODO: rename this function?
410 # TODO: rename this function?
404 tiprev = len(self) - 1
411 tiprev = len(self) - 1
General Comments 0
You need to be logged in to leave comments. Login now