workingctx: overload bookmarks() to return parents' bookmarks stable
authorKevin Bullock <kbullock@ringworld.org>
Wed, 23 Feb 2011 20:47:00 -0600
branchstable
changeset 13476 b85a09f368bd
parent 13475 c7bef25ca393
child 13477 0fb2ff949790
workingctx: overload bookmarks() to return parents' bookmarks This implements workingctx.bookmarks() parallel to workingctx.tags(), overloading the implementation from changectx.
mercurial/context.py
--- a/mercurial/context.py	Fri Feb 25 12:32:15 2011 +0100
+++ b/mercurial/context.py	Wed Feb 23 20:47:00 2011 -0600
@@ -730,6 +730,12 @@
             t.extend(p.tags())
         return t
 
+    def bookmarks(self):
+        b = []
+        for p in self.parents():
+            b.extend(p.bookmarks())
+        return b
+
     def children(self):
         return []