diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -284,6 +284,17 @@ def update(repo, parents, node): lockmod.release(tr, lock) return update +def listbinbookmarks(repo): + # We may try to list bookmarks on a repo type that does not + # support it (e.g., statichttprepository). + marks = getattr(repo, '_bookmarks', {}) + + 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('@')): + yield k, v + def listbookmarks(repo): # We may try to list bookmarks on a repo type that does not # support it (e.g., statichttprepository).