# HG changeset patch # User Stanislau Hlebik # Date 2016-11-17 08:59:41 # Node ID 55ec13c82ea005bf9a2be08b7bf77980b6ee3997 # Parent 0a3b11a7489a688a055cfbab531ee65f6a57a4f1 bookmarks: use listbinbookmarks() in listbookmarks() diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -296,16 +296,9 @@ def listbinbookmarks(repo): 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):