# HG changeset patch # User Stanislau Hlebik # Date 1479373181 28800 # Node ID 55ec13c82ea005bf9a2be08b7bf77980b6ee3997 # Parent 0a3b11a7489a688a055cfbab531ee65f6a57a4f1 bookmarks: use listbinbookmarks() in listbookmarks() diff -r 0a3b11a7489a -r 55ec13c82ea0 mercurial/bookmarks.py --- 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):