mercurial/bookmarks.py
changeset 30482 55ec13c82ea0
parent 30481 0a3b11a7489a
child 30582 94de83ed250e
--- a/mercurial/bookmarks.py	Thu Nov 17 00:59:41 2016 -0800
+++ b/mercurial/bookmarks.py	Thu Nov 17 00:59:41 2016 -0800
@@ -296,16 +296,9 @@
             yield k, v
 
 def listbookmarks(repo):
-    # We may try to list bookmarks on a repo type that does not
-    # support it (e.g., statichttprepository).
-    marks = getattr(repo, '_bookmarks', {})
-
     d = {}
-    hasnode = repo.changelog.hasnode
-    for k, v in marks.iteritems():
-        # don't expose local divergent bookmarks
-        if hasnode(v) and ('@' not in k or k.endswith('@')):
-            d[k] = hex(v)
+    for book, node in listbinbookmarks(repo):
+        d[book] = hex(node)
     return d
 
 def pushbookmark(repo, key, old, new):