mercurial/bookmarks.py
branchstable
changeset 18496 d1c13a4dc638
parent 18471 2096e025a728
child 18513 37ce336ab2dd
--- a/mercurial/bookmarks.py	Sun Jan 27 14:24:37 2013 -0600
+++ b/mercurial/bookmarks.py	Sun Jan 27 15:13:53 2013 -0600
@@ -183,9 +183,10 @@
     marks = getattr(repo, '_bookmarks', {})
 
     d = {}
+    hasnode = repo.changelog.hasnode
     for k, v in marks.iteritems():
         # don't expose local divergent bookmarks
-        if '@' not in k or k.endswith('@'):
+        if hasnode(v) and ('@' not in k or k.endswith('@')):
             d[k] = hex(v)
     return d